diff --git a/go.mod b/go.mod index b25fe587..52543d53 100644 --- a/go.mod +++ b/go.mod @@ -19,6 +19,6 @@ require ( github.com/pierrec/lz4 v2.0.5+incompatible // indirect github.com/stoewer/go-strcase v1.0.2 github.com/terraform-providers/terraform-provider-random v2.0.0+incompatible - golang.org/x/oauth2 v0.0.0-20190220154721-9b3c75971fc9 - google.golang.org/api v0.1.0 + golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421 + google.golang.org/api v0.4.0 ) diff --git a/go.sum b/go.sum index bd7018ca..51b68e7a 100644 --- a/go.sum +++ b/go.sum @@ -173,6 +173,7 @@ github.com/hashicorp/go-uuid v1.0.1 h1:fv1ep09latC32wFoVwnqcnKJGnMSdBanPczbHAYm1 github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-version v1.1.0 h1:bPIoEKD27tNdebFGGxxYwcL4nepeY4j1QP23PFRGzg0= github.com/hashicorp/go-version v1.1.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/golang-lru v0.5.0 h1:CL2msUPvZTLb5O648aiLNJw3hnBxN2+1Jq8rCOH9wdo= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/hcl v0.0.0-20170504190234-a4b07c25de5f/go.mod h1:oZtUIOe8dh44I2q6ScRibXws4Ajl+d+nod3AaR9vL5w= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= @@ -366,6 +367,8 @@ github.com/zclconf/go-cty v0.0.0-20190320224746-fd76348b9329 h1:ne520NlvoncW5zfB github.com/zclconf/go-cty v0.0.0-20190320224746-fd76348b9329/go.mod h1:xnAOWiHeOqg2nWS62VtQ7pbOu17FtxJNW8RLEih+O3s= go.opencensus.io v0.18.0 h1:Mk5rgZcggtbvtAun5aJzAtjKKN/t0R3jJPlWILlv938= go.opencensus.io v0.18.0/go.mod h1:vKdFvxhtzZ9onBp9VKHK8z/sRpBMnKAsufL7wlDrCOA= +go.opencensus.io v0.21.0 h1:mU6zScU4U1YAFPHEHYk+3JC4SY7JxgkqS10ZOSyksNg= +go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= @@ -382,6 +385,8 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180811021610-c39426892332/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -399,11 +404,15 @@ golang.org/x/oauth2 v0.0.0-20181017192945-9dcd33a902f4/go.mod h1:N/0e6XlmueqKjAG golang.org/x/oauth2 v0.0.0-20181203162652-d668ce993890/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190220154721-9b3c75971fc9 h1:pfyU+l9dEu0vZzDDMsdAKa1gZbJYEn6urYXj/+Xkz7s= golang.org/x/oauth2 v0.0.0-20190220154721-9b3c75971fc9/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421 h1:Wo7BWFiOk0QRFMLYMqJGFMd9CgUAcGx7V+qEg/h5IBI= +golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/perf v0.0.0-20180704124530-6e6d33e29852/go.mod h1:JLpeXjPJfIyPr5TlbXLkXWLhP8nz10XfvxElABhCtcw= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6 h1:bjcUS9ztw9kFmmIxJInhon/0Is3p+EHBKNgquIzo1OI= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -424,10 +433,15 @@ golang.org/x/time v0.0.0-20190308202827-9d24e82272b4 h1:SvFZT6jyqRaOeXpc5h/JSfZe golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030000716-a0a13e073c7b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= google.golang.org/api v0.0.0-20180910000450-7ca32eb868bf/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= google.golang.org/api v0.0.0-20181030000543-1d582fd0359e/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= google.golang.org/api v0.1.0 h1:K6z2u68e86TPdSdefXdzvXgR1zEMa+459vBSfWYAZkI= google.golang.org/api v0.1.0/go.mod h1:UGEZY7KEX120AnNLIHFMKIo4obdJhkp2tPbaPlQx13Y= +google.golang.org/api v0.4.0 h1:KKgc1aqhV8wDPbDzlDtpvyjZFY3vjz85FP7p4wcQUyI= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.3.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -439,11 +453,15 @@ google.golang.org/genproto v0.0.0-20181029155118-b69ba1387ce2/go.mod h1:JiN7NxoA google.golang.org/genproto v0.0.0-20181202183823-bd91e49a0898/go.mod h1:7Ep/1NZk928CDR8SjdVbjWNpdIf6nzjE3BTgJDr2Atg= google.golang.org/genproto v0.0.0-20190201180003-4b09977fb922 h1:mBVYJnbrXLA/ZCBTCe7PtEgAUP+1bg92qTaFoPHdz+8= google.golang.org/genproto v0.0.0-20190201180003-4b09977fb922/go.mod h1:L3J43x8/uS+qIUoksaLKe6OS3nUKxOKuIFz1sl2/jx4= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19 h1:Lj2SnHtxkRGJDqnGaSjo+CCdIieEnwVazbOXILwQemk= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.16.0/go.mod h1:0JHn/cJsOMiMfNA9+DeHDlAU7KAAB5GDlYFpa9MZMio= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.18.0 h1:IZl7mfBGfbhYx2p2rKRtYgDFw6SBz+kclmxYrCksPPA= google.golang.org/grpc v1.18.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= +google.golang.org/grpc v1.19.0 h1:cfg4PD8YEdSFnm7qLV4++93WcmhH2nIUhMjhdCvl3j8= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -457,6 +475,7 @@ gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= grpc.go4.org v0.0.0-20170609214715-11d0a25b4919/go.mod h1:77eQGdRu53HpSqPFJFmuJdjuHRquDANNeA4x7B8WQ9o= honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= howett.net/plist v0.0.0-20181124034731-591f970eefbb/go.mod h1:vMygbs4qMhSZSc4lCUl2OEE+rDiIIJAIdR4m7MiMcm0= labix.org/v2/mgo v0.0.0-20140701140051-000000000287/go.mod h1:Lg7AYkt1uXJoR9oeSZ3W/8IXLdvOfIITgZnommstyz4= diff --git a/vendor/github.com/hashicorp/golang-lru/LICENSE b/vendor/github.com/hashicorp/golang-lru/LICENSE new file mode 100644 index 00000000..be2cc4df --- /dev/null +++ b/vendor/github.com/hashicorp/golang-lru/LICENSE @@ -0,0 +1,362 @@ +Mozilla Public License, version 2.0 + +1. Definitions + +1.1. "Contributor" + + means each individual or legal entity that creates, contributes to the + creation of, or owns Covered Software. + +1.2. "Contributor Version" + + means the combination of the Contributions of others (if any) used by a + Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + + means Source Code Form to which the initial Contributor has attached the + notice in Exhibit A, the Executable Form of such Source Code Form, and + Modifications of such Source Code Form, in each case including portions + thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + a. that the initial Contributor has attached the notice described in + Exhibit B to the Covered Software; or + + b. that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the terms of + a Secondary License. + +1.6. "Executable Form" + + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + + means a work that combines Covered Software with other material, in a + separate file or files, that is not Covered Software. + +1.8. "License" + + means this document. + +1.9. "Licensable" + + means having the right to grant, to the maximum extent possible, whether + at the time of the initial grant or subsequently, any and all of the + rights conveyed by this License. + +1.10. "Modifications" + + means any of the following: + + a. any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered Software; or + + b. any new file in Source Code Form that contains any Covered Software. + +1.11. "Patent Claims" of a Contributor + + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the License, + by the making, using, selling, offering for sale, having made, import, + or transfer of either its Contributions or its Contributor Version. + +1.12. "Secondary License" + + means either the GNU General Public License, Version 2.0, the GNU Lesser + General Public License, Version 2.1, the GNU Affero General Public + License, Version 3.0, or any later versions of those licenses. + +1.13. "Source Code Form" + + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that controls, is + controlled by, or is under common control with You. For purposes of this + definition, "control" means (a) the power, direct or indirect, to cause + the direction or management of such entity, whether by contract or + otherwise, or (b) ownership of more than fifty percent (50%) of the + outstanding shares or beneficial ownership of such entity. + + +2. License Grants and Conditions + +2.1. Grants + + Each Contributor hereby grants You a world-wide, royalty-free, + non-exclusive license: + + a. under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + + b. under Patent Claims of such Contributor to make, use, sell, offer for + sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + + The licenses granted in Section 2.1 with respect to any Contribution + become effective for each Contribution on the date the Contributor first + distributes such Contribution. + +2.3. Limitations on Grant Scope + + The licenses granted in this Section 2 are the only rights granted under + this License. No additional rights or licenses will be implied from the + distribution or licensing of Covered Software under this License. + Notwithstanding Section 2.1(b) above, no patent license is granted by a + Contributor: + + a. for any code that a Contributor has removed from Covered Software; or + + b. for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + + c. under Patent Claims infringed by Covered Software in the absence of + its Contributions. + + This License does not grant any rights in the trademarks, service marks, + or logos of any Contributor (except as may be necessary to comply with + the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + + No Contributor makes additional grants as a result of Your choice to + distribute the Covered Software under a subsequent version of this + License (see Section 10.2) or under the terms of a Secondary License (if + permitted under the terms of Section 3.3). + +2.5. Representation + + Each Contributor represents that the Contributor believes its + Contributions are its original creation(s) or it has sufficient rights to + grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + + This License is not intended to limit any rights You have under + applicable copyright doctrines of fair use, fair dealing, or other + equivalents. + +2.7. Conditions + + Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in + Section 2.1. + + +3. Responsibilities + +3.1. Distribution of Source Form + + All distribution of Covered Software in Source Code Form, including any + Modifications that You create or to which You contribute, must be under + the terms of this License. You must inform recipients that the Source + Code Form of the Covered Software is governed by the terms of this + License, and how they can obtain a copy of this License. You may not + attempt to alter or restrict the recipients' rights in the Source Code + Form. + +3.2. Distribution of Executable Form + + If You distribute Covered Software in Executable Form then: + + a. such Covered Software must also be made available in Source Code Form, + as described in Section 3.1, and You must inform recipients of the + Executable Form how they can obtain a copy of such Source Code Form by + reasonable means in a timely manner, at a charge no more than the cost + of distribution to the recipient; and + + b. You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter the + recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + + You may create and distribute a Larger Work under terms of Your choice, + provided that You also comply with the requirements of this License for + the Covered Software. If the Larger Work is a combination of Covered + Software with a work governed by one or more Secondary Licenses, and the + Covered Software is not Incompatible With Secondary Licenses, this + License permits You to additionally distribute such Covered Software + under the terms of such Secondary License(s), so that the recipient of + the Larger Work may, at their option, further distribute the Covered + Software under the terms of either this License or such Secondary + License(s). + +3.4. Notices + + You may not remove or alter the substance of any license notices + (including copyright notices, patent notices, disclaimers of warranty, or + limitations of liability) contained within the Source Code Form of the + Covered Software, except that You may alter any license notices to the + extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + + You may choose to offer, and to charge a fee for, warranty, support, + indemnity or liability obligations to one or more recipients of Covered + Software. However, You may do so only on Your own behalf, and not on + behalf of any Contributor. You must make it absolutely clear that any + such warranty, support, indemnity, or liability obligation is offered by + You alone, and You hereby agree to indemnify every Contributor for any + liability incurred by such Contributor as a result of warranty, support, + indemnity or liability terms You offer. You may include additional + disclaimers of warranty and limitations of liability specific to any + jurisdiction. + +4. Inability to Comply Due to Statute or Regulation + + If it is impossible for You to comply with any of the terms of this License + with respect to some or all of the Covered Software due to statute, + judicial order, or regulation then You must: (a) comply with the terms of + this License to the maximum extent possible; and (b) describe the + limitations and the code they affect. Such description must be placed in a + text file included with all distributions of the Covered Software under + this License. Except to the extent prohibited by statute or regulation, + such description must be sufficiently detailed for a recipient of ordinary + skill to be able to understand it. + +5. Termination + +5.1. The rights granted under this License will terminate automatically if You + fail to comply with any of its terms. However, if You become compliant, + then the rights granted under this License from a particular Contributor + are reinstated (a) provisionally, unless and until such Contributor + explicitly and finally terminates Your grants, and (b) on an ongoing + basis, if such Contributor fails to notify You of the non-compliance by + some reasonable means prior to 60 days after You have come back into + compliance. Moreover, Your grants from a particular Contributor are + reinstated on an ongoing basis if such Contributor notifies You of the + non-compliance by some reasonable means, this is the first time You have + received notice of non-compliance with this License from such + Contributor, and You become compliant prior to 30 days after Your receipt + of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent + infringement claim (excluding declaratory judgment actions, + counter-claims, and cross-claims) alleging that a Contributor Version + directly or indirectly infringes any patent, then the rights granted to + You by any and all Contributors for the Covered Software under Section + 2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user + license agreements (excluding distributors and resellers) which have been + validly granted by You or Your distributors under this License prior to + termination shall survive termination. + +6. Disclaimer of Warranty + + Covered Software is provided under this License on an "as is" basis, + without warranty of any kind, either expressed, implied, or statutory, + including, without limitation, warranties that the Covered Software is free + of defects, merchantable, fit for a particular purpose or non-infringing. + The entire risk as to the quality and performance of the Covered Software + is with You. Should any Covered Software prove defective in any respect, + You (not any Contributor) assume the cost of any necessary servicing, + repair, or correction. This disclaimer of warranty constitutes an essential + part of this License. No use of any Covered Software is authorized under + this License except under this disclaimer. + +7. Limitation of Liability + + Under no circumstances and under no legal theory, whether tort (including + negligence), contract, or otherwise, shall any Contributor, or anyone who + distributes Covered Software as permitted above, be liable to You for any + direct, indirect, special, incidental, or consequential damages of any + character including, without limitation, damages for lost profits, loss of + goodwill, work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses, even if such party shall have been + informed of the possibility of such damages. This limitation of liability + shall not apply to liability for death or personal injury resulting from + such party's negligence to the extent applicable law prohibits such + limitation. Some jurisdictions do not allow the exclusion or limitation of + incidental or consequential damages, so this exclusion and limitation may + not apply to You. + +8. Litigation + + Any litigation relating to this License may be brought only in the courts + of a jurisdiction where the defendant maintains its principal place of + business and such litigation shall be governed by laws of that + jurisdiction, without reference to its conflict-of-law provisions. Nothing + in this Section shall prevent a party's ability to bring cross-claims or + counter-claims. + +9. Miscellaneous + + This License represents the complete agreement concerning the subject + matter hereof. If any provision of this License is held to be + unenforceable, such provision shall be reformed only to the extent + necessary to make it enforceable. Any law or regulation which provides that + the language of a contract shall be construed against the drafter shall not + be used to construe this License against a Contributor. + + +10. Versions of the License + +10.1. New Versions + + Mozilla Foundation is the license steward. Except as provided in Section + 10.3, no one other than the license steward has the right to modify or + publish new versions of this License. Each version will be given a + distinguishing version number. + +10.2. Effect of New Versions + + You may distribute the Covered Software under the terms of the version + of the License under which You originally received the Covered Software, + or under the terms of any subsequent version published by the license + steward. + +10.3. Modified Versions + + If you create software not governed by this License, and you want to + create a new license for such software, you may create and use a + modified version of this License if you rename the license and remove + any references to the name of the license steward (except to note that + such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary + Licenses If You choose to distribute Source Code Form that is + Incompatible With Secondary Licenses under the terms of this version of + the License, the notice described in Exhibit B of this License must be + attached. + +Exhibit A - Source Code Form License Notice + + This Source Code Form is subject to the + terms of the Mozilla Public License, v. + 2.0. If a copy of the MPL was not + distributed with this file, You can + obtain one at + http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular file, +then You may include the notice in a location (such as a LICENSE file in a +relevant directory) where a recipient would be likely to look for such a +notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice + + This Source Code Form is "Incompatible + With Secondary Licenses", as defined by + the Mozilla Public License, v. 2.0. diff --git a/vendor/github.com/hashicorp/golang-lru/simplelru/lru.go b/vendor/github.com/hashicorp/golang-lru/simplelru/lru.go new file mode 100644 index 00000000..5673773b --- /dev/null +++ b/vendor/github.com/hashicorp/golang-lru/simplelru/lru.go @@ -0,0 +1,161 @@ +package simplelru + +import ( + "container/list" + "errors" +) + +// EvictCallback is used to get a callback when a cache entry is evicted +type EvictCallback func(key interface{}, value interface{}) + +// LRU implements a non-thread safe fixed size LRU cache +type LRU struct { + size int + evictList *list.List + items map[interface{}]*list.Element + onEvict EvictCallback +} + +// entry is used to hold a value in the evictList +type entry struct { + key interface{} + value interface{} +} + +// NewLRU constructs an LRU of the given size +func NewLRU(size int, onEvict EvictCallback) (*LRU, error) { + if size <= 0 { + return nil, errors.New("Must provide a positive size") + } + c := &LRU{ + size: size, + evictList: list.New(), + items: make(map[interface{}]*list.Element), + onEvict: onEvict, + } + return c, nil +} + +// Purge is used to completely clear the cache. +func (c *LRU) Purge() { + for k, v := range c.items { + if c.onEvict != nil { + c.onEvict(k, v.Value.(*entry).value) + } + delete(c.items, k) + } + c.evictList.Init() +} + +// Add adds a value to the cache. Returns true if an eviction occurred. +func (c *LRU) Add(key, value interface{}) (evicted bool) { + // Check for existing item + if ent, ok := c.items[key]; ok { + c.evictList.MoveToFront(ent) + ent.Value.(*entry).value = value + return false + } + + // Add new item + ent := &entry{key, value} + entry := c.evictList.PushFront(ent) + c.items[key] = entry + + evict := c.evictList.Len() > c.size + // Verify size not exceeded + if evict { + c.removeOldest() + } + return evict +} + +// Get looks up a key's value from the cache. +func (c *LRU) Get(key interface{}) (value interface{}, ok bool) { + if ent, ok := c.items[key]; ok { + c.evictList.MoveToFront(ent) + return ent.Value.(*entry).value, true + } + return +} + +// Contains checks if a key is in the cache, without updating the recent-ness +// or deleting it for being stale. +func (c *LRU) Contains(key interface{}) (ok bool) { + _, ok = c.items[key] + return ok +} + +// Peek returns the key value (or undefined if not found) without updating +// the "recently used"-ness of the key. +func (c *LRU) Peek(key interface{}) (value interface{}, ok bool) { + var ent *list.Element + if ent, ok = c.items[key]; ok { + return ent.Value.(*entry).value, true + } + return nil, ok +} + +// Remove removes the provided key from the cache, returning if the +// key was contained. +func (c *LRU) Remove(key interface{}) (present bool) { + if ent, ok := c.items[key]; ok { + c.removeElement(ent) + return true + } + return false +} + +// RemoveOldest removes the oldest item from the cache. +func (c *LRU) RemoveOldest() (key interface{}, value interface{}, ok bool) { + ent := c.evictList.Back() + if ent != nil { + c.removeElement(ent) + kv := ent.Value.(*entry) + return kv.key, kv.value, true + } + return nil, nil, false +} + +// GetOldest returns the oldest entry +func (c *LRU) GetOldest() (key interface{}, value interface{}, ok bool) { + ent := c.evictList.Back() + if ent != nil { + kv := ent.Value.(*entry) + return kv.key, kv.value, true + } + return nil, nil, false +} + +// Keys returns a slice of the keys in the cache, from oldest to newest. +func (c *LRU) Keys() []interface{} { + keys := make([]interface{}, len(c.items)) + i := 0 + for ent := c.evictList.Back(); ent != nil; ent = ent.Prev() { + keys[i] = ent.Value.(*entry).key + i++ + } + return keys +} + +// Len returns the number of items in the cache. +func (c *LRU) Len() int { + return c.evictList.Len() +} + +// removeOldest removes the oldest item from the cache. +func (c *LRU) removeOldest() { + ent := c.evictList.Back() + if ent != nil { + c.removeElement(ent) + } +} + +// removeElement is used to remove a given list element from the cache +func (c *LRU) removeElement(e *list.Element) { + c.evictList.Remove(e) + kv := e.Value.(*entry) + delete(c.items, kv.key) + if c.onEvict != nil { + c.onEvict(kv.key, kv.value) + } +} diff --git a/vendor/github.com/hashicorp/golang-lru/simplelru/lru_interface.go b/vendor/github.com/hashicorp/golang-lru/simplelru/lru_interface.go new file mode 100644 index 00000000..74c70774 --- /dev/null +++ b/vendor/github.com/hashicorp/golang-lru/simplelru/lru_interface.go @@ -0,0 +1,36 @@ +package simplelru + +// LRUCache is the interface for simple LRU cache. +type LRUCache interface { + // Adds a value to the cache, returns true if an eviction occurred and + // updates the "recently used"-ness of the key. + Add(key, value interface{}) bool + + // Returns key's value from the cache and + // updates the "recently used"-ness of the key. #value, isFound + Get(key interface{}) (value interface{}, ok bool) + + // Check if a key exsists in cache without updating the recent-ness. + Contains(key interface{}) (ok bool) + + // Returns key's value without updating the "recently used"-ness of the key. + Peek(key interface{}) (value interface{}, ok bool) + + // Removes a key from the cache. + Remove(key interface{}) bool + + // Removes the oldest entry from cache. + RemoveOldest() (interface{}, interface{}, bool) + + // Returns the oldest entry from the cache. #key, value, isFound + GetOldest() (interface{}, interface{}, bool) + + // Returns a slice of the keys in the cache, from oldest to newest. + Keys() []interface{} + + // Returns the number of items in the cache. + Len() int + + // Clear all cache entries + Purge() +} diff --git a/vendor/go.opencensus.io/.travis.yml b/vendor/go.opencensus.io/.travis.yml index 73c8571c..bd6b66ee 100644 --- a/vendor/go.opencensus.io/.travis.yml +++ b/vendor/go.opencensus.io/.travis.yml @@ -1,27 +1,17 @@ language: go -go: - # 1.8 is tested by AppVeyor - - 1.11.x - go_import_path: go.opencensus.io -# Don't email me the results of the test runs. -notifications: - email: false +go: + - 1.11.x + +env: + global: + GO111MODULE=on before_script: - - GO_FILES=$(find . -iname '*.go' | grep -v /vendor/) # All the .go files, excluding vendor/ if any - - PKGS=$(go list ./... | grep -v /vendor/) # All the import paths, excluding vendor/ if any - - curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh # Install latest dep release - - go get github.com/rakyll/embedmd + - make install-tools script: - - embedmd -d README.md # Ensure embedded code is up-to-date - - go build ./... # Ensure dependency updates don't break build - - if [ -n "$(gofmt -s -l $GO_FILES)" ]; then echo "gofmt the following files:"; gofmt -s -l $GO_FILES; exit 1; fi - - go vet ./... - - go test -v -race $PKGS # Run all the tests with the race detector enabled - - GOARCH=386 go test -v $PKGS # Run all tests against a 386 architecture - - 'if [[ $TRAVIS_GO_VERSION = 1.8* ]]; then ! golint ./... | grep -vE "(_mock|_string|\.pb)\.go:"; fi' - - go run internal/check/version.go + - make travis-ci + - go run internal/check/version.go # TODO move this to makefile diff --git a/vendor/go.opencensus.io/CONTRIBUTING.md b/vendor/go.opencensus.io/CONTRIBUTING.md index 3f3aed39..1ba3962c 100644 --- a/vendor/go.opencensus.io/CONTRIBUTING.md +++ b/vendor/go.opencensus.io/CONTRIBUTING.md @@ -41,7 +41,8 @@ git remote add fork git@github.com:YOUR_GITHUB_USERNAME/opencensus-go.git Run tests: ``` -$ go test ./... +$ make install-tools # Only first time. +$ make ``` Checkout a new branch, make modifications and push the branch to your fork: @@ -54,3 +55,9 @@ $ git push fork feature ``` Open a pull request against the main opencensus-go repo. + +## General Notes +This project uses Appveyor and Travis for CI. + +The dependencies are managed with `go mod` if you work with the sources under your +`$GOPATH` you need to set the environment variable `GO111MODULE=on`. \ No newline at end of file diff --git a/vendor/go.opencensus.io/Makefile b/vendor/go.opencensus.io/Makefile new file mode 100644 index 00000000..457866cb --- /dev/null +++ b/vendor/go.opencensus.io/Makefile @@ -0,0 +1,96 @@ +# TODO: Fix this on windows. +ALL_SRC := $(shell find . -name '*.go' \ + -not -path './vendor/*' \ + -not -path '*/gen-go/*' \ + -type f | sort) +ALL_PKGS := $(shell go list $(sort $(dir $(ALL_SRC)))) + +GOTEST_OPT?=-v -race -timeout 30s +GOTEST_OPT_WITH_COVERAGE = $(GOTEST_OPT) -coverprofile=coverage.txt -covermode=atomic +GOTEST=go test +GOFMT=gofmt +GOLINT=golint +GOVET=go vet +EMBEDMD=embedmd +# TODO decide if we need to change these names. +TRACE_ID_LINT_EXCEPTION="type name will be used as trace.TraceID by other packages" +TRACE_OPTION_LINT_EXCEPTION="type name will be used as trace.TraceOptions by other packages" +README_FILES := $(shell find . -name '*README.md' | sort | tr '\n' ' ') + +.DEFAULT_GOAL := fmt-lint-vet-embedmd-test + +.PHONY: fmt-lint-vet-embedmd-test +fmt-lint-vet-embedmd-test: fmt lint vet embedmd test + +# TODO enable test-with-coverage in tavis +.PHONY: travis-ci +travis-ci: fmt lint vet embedmd test test-386 + +all-pkgs: + @echo $(ALL_PKGS) | tr ' ' '\n' | sort + +all-srcs: + @echo $(ALL_SRC) | tr ' ' '\n' | sort + +.PHONY: test +test: + $(GOTEST) $(GOTEST_OPT) $(ALL_PKGS) + +.PHONY: test-386 +test-386: + GOARCH=386 $(GOTEST) -v -timeout 30s $(ALL_PKGS) + +.PHONY: test-with-coverage +test-with-coverage: + $(GOTEST) $(GOTEST_OPT_WITH_COVERAGE) $(ALL_PKGS) + +.PHONY: fmt +fmt: + @FMTOUT=`$(GOFMT) -s -l $(ALL_SRC) 2>&1`; \ + if [ "$$FMTOUT" ]; then \ + echo "$(GOFMT) FAILED => gofmt the following files:\n"; \ + echo "$$FMTOUT\n"; \ + exit 1; \ + else \ + echo "Fmt finished successfully"; \ + fi + +.PHONY: lint +lint: + @LINTOUT=`$(GOLINT) $(ALL_PKGS) | grep -v $(TRACE_ID_LINT_EXCEPTION) | grep -v $(TRACE_OPTION_LINT_EXCEPTION) 2>&1`; \ + if [ "$$LINTOUT" ]; then \ + echo "$(GOLINT) FAILED => clean the following lint errors:\n"; \ + echo "$$LINTOUT\n"; \ + exit 1; \ + else \ + echo "Lint finished successfully"; \ + fi + +.PHONY: vet +vet: + # TODO: Understand why go vet downloads "github.com/google/go-cmp v0.2.0" + @VETOUT=`$(GOVET) ./... | grep -v "go: downloading" 2>&1`; \ + if [ "$$VETOUT" ]; then \ + echo "$(GOVET) FAILED => go vet the following files:\n"; \ + echo "$$VETOUT\n"; \ + exit 1; \ + else \ + echo "Vet finished successfully"; \ + fi + +.PHONY: embedmd +embedmd: + @EMBEDMDOUT=`$(EMBEDMD) -d $(README_FILES) 2>&1`; \ + if [ "$$EMBEDMDOUT" ]; then \ + echo "$(EMBEDMD) FAILED => embedmd the following files:\n"; \ + echo "$$EMBEDMDOUT\n"; \ + exit 1; \ + else \ + echo "Embedmd finished successfully"; \ + fi + +.PHONY: install-tools +install-tools: + go get -u golang.org/x/tools/cmd/cover + go get -u golang.org/x/lint/golint + go get -u github.com/rakyll/embedmd diff --git a/vendor/go.opencensus.io/README.md b/vendor/go.opencensus.io/README.md index 97d66983..3f40ed5c 100644 --- a/vendor/go.opencensus.io/README.md +++ b/vendor/go.opencensus.io/README.md @@ -29,7 +29,7 @@ integration with your RPC framework: * [net/http](https://godoc.org/go.opencensus.io/plugin/ochttp) * [gRPC](https://godoc.org/go.opencensus.io/plugin/ocgrpc) -* [database/sql](https://godoc.org/github.com/basvanbeek/ocsql) +* [database/sql](https://godoc.org/github.com/opencensus-integrations/ocsql) * [Go kit](https://godoc.org/github.com/go-kit/kit/tracing/opencensus) * [Groupcache](https://godoc.org/github.com/orijtech/groupcache) * [Caddy webserver](https://godoc.org/github.com/orijtech/caddy) @@ -123,7 +123,7 @@ Currently three types of aggregations are supported: [embedmd]:# (internal/readme/stats.go aggs) ```go -distAgg := view.Distribution(0, 1<<32, 2<<32, 3<<32) +distAgg := view.Distribution(1<<32, 2<<32, 3<<32) countAgg := view.Count() sumAgg := view.Sum() ``` @@ -136,7 +136,7 @@ if err := view.Register(&view.View{ Name: "example.com/video_size_distribution", Description: "distribution of processed video size over time", Measure: videoSize, - Aggregation: view.Distribution(0, 1<<32, 2<<32, 3<<32), + Aggregation: view.Distribution(1<<32, 2<<32, 3<<32), }); err != nil { log.Fatalf("Failed to register view: %v", err) } diff --git a/vendor/go.opencensus.io/appveyor.yml b/vendor/go.opencensus.io/appveyor.yml index 98057888..12bd7c4c 100644 --- a/vendor/go.opencensus.io/appveyor.yml +++ b/vendor/go.opencensus.io/appveyor.yml @@ -12,6 +12,7 @@ environment: install: - set PATH=%GOPATH%\bin;c:\go\bin;%PATH% + - choco upgrade golang --version 1.11.5 # Temporary fix because of a go.sum bug in 1.11 - go version - go env diff --git a/vendor/go.opencensus.io/exemplar/exemplar.go b/vendor/go.opencensus.io/exemplar/exemplar.go deleted file mode 100644 index e676df83..00000000 --- a/vendor/go.opencensus.io/exemplar/exemplar.go +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright 2018, OpenCensus 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 exemplar implements support for exemplars. Exemplars are additional -// data associated with each measurement. -// -// Their purpose it to provide an example of the kind of thing -// (request, RPC, trace span, etc.) that resulted in that measurement. -package exemplar - -import ( - "context" - "time" -) - -const ( - KeyTraceID = "trace_id" - KeySpanID = "span_id" - KeyPrefixTag = "tag:" -) - -// Exemplar is an example data point associated with each bucket of a -// distribution type aggregation. -type Exemplar struct { - Value float64 // the value that was recorded - Timestamp time.Time // the time the value was recorded - Attachments Attachments // attachments (if any) -} - -// Attachments is a map of extra values associated with a recorded data point. -// The map should only be mutated from AttachmentExtractor functions. -type Attachments map[string]string - -// AttachmentExtractor is a function capable of extracting exemplar attachments -// from the context used to record measurements. -// The map passed to the function should be mutated and returned. It will -// initially be nil: the first AttachmentExtractor that would like to add keys to the -// map is responsible for initializing it. -type AttachmentExtractor func(ctx context.Context, a Attachments) Attachments - -var extractors []AttachmentExtractor - -// RegisterAttachmentExtractor registers the given extractor associated with the exemplar -// type name. -// -// Extractors will be used to attempt to extract exemplars from the context -// associated with each recorded measurement. -// -// Packages that support exemplars should register their extractor functions on -// initialization. -// -// RegisterAttachmentExtractor should not be called after any measurements have -// been recorded. -func RegisterAttachmentExtractor(e AttachmentExtractor) { - extractors = append(extractors, e) -} - -// NewFromContext extracts exemplars from the given context. -// Each registered AttachmentExtractor (see RegisterAttachmentExtractor) is called in an -// unspecified order to add attachments to the exemplar. -func AttachmentsFromContext(ctx context.Context) Attachments { - var a Attachments - for _, extractor := range extractors { - a = extractor(ctx, a) - } - return a -} diff --git a/vendor/go.opencensus.io/go.mod b/vendor/go.opencensus.io/go.mod index 1236f4c2..8b7d38e9 100644 --- a/vendor/go.opencensus.io/go.mod +++ b/vendor/go.opencensus.io/go.mod @@ -1,25 +1,10 @@ module go.opencensus.io require ( - git.apache.org/thrift.git v0.0.0-20180902110319-2566ecd5d999 - github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973 - github.com/ghodss/yaml v1.0.0 // indirect - github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b // indirect github.com/golang/protobuf v1.2.0 github.com/google/go-cmp v0.2.0 - github.com/grpc-ecosystem/grpc-gateway v1.5.0 // indirect - github.com/matttproud/golang_protobuf_extensions v1.0.1 - github.com/openzipkin/zipkin-go v0.1.1 - github.com/prometheus/client_golang v0.8.0 - github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910 - github.com/prometheus/common v0.0.0-20180801064454-c7de2306084e - github.com/prometheus/procfs v0.0.0-20180725123919-05ee40e3a273 - golang.org/x/net v0.0.0-20180906233101-161cd47e91fd - golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f - golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e - golang.org/x/text v0.3.0 - google.golang.org/api v0.0.0-20180910000450-7ca32eb868bf - google.golang.org/genproto v0.0.0-20180831171423-11092d34479b - google.golang.org/grpc v1.14.0 - gopkg.in/yaml.v2 v2.2.1 // indirect + github.com/hashicorp/golang-lru v0.5.0 + golang.org/x/net v0.0.0-20190311183353-d8887717615a + google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19 // indirect + google.golang.org/grpc v1.19.0 ) diff --git a/vendor/go.opencensus.io/go.sum b/vendor/go.opencensus.io/go.sum index 3e0bab88..cbb37036 100644 --- a/vendor/go.opencensus.io/go.sum +++ b/vendor/go.opencensus.io/go.sum @@ -1,48 +1,50 @@ -git.apache.org/thrift.git v0.0.0-20180807212849-6e67faa92827/go.mod h1:fPE2ZNJGynbRyZ4dJvy6G277gSllfV2HJqblrnkyeyg= -git.apache.org/thrift.git v0.0.0-20180902110319-2566ecd5d999 h1:sihTnRgTOUSCQz0iS0pjZuFQy/z7GXCJgSBg3+rZKHw= -git.apache.org/thrift.git v0.0.0-20180902110319-2566ecd5d999/go.mod h1:fPE2ZNJGynbRyZ4dJvy6G277gSllfV2HJqblrnkyeyg= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973 h1:xJ4a3vCFaGF/jqvzLMYoU8P317H5OQ+Via4RmuPwCS0= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= -github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/google/go-cmp v0.2.0 h1:+dTQ8DZQJz0Mb/HjFlkptS1FeQ4cWSnN941F8aEG4SQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/grpc-ecosystem/grpc-gateway v1.5.0 h1:WcmKMm43DR7RdtlkEXQJyo5ws8iTp98CyhCCbOHMvNI= -github.com/grpc-ecosystem/grpc-gateway v1.5.0/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpgL2+G+NZTnrVHpWWfpdw= -github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= -github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/openzipkin/zipkin-go v0.1.1 h1:A/ADD6HaPnAKj3yS7HjGHRK77qi41Hi0DirOOIQAeIw= -github.com/openzipkin/zipkin-go v0.1.1/go.mod h1:NtoC/o8u3JlF1lSlyPNswIbeQH9bJTmOf0Erfk+hxe8= -github.com/prometheus/client_golang v0.8.0 h1:1921Yw9Gc3iSc4VQh3PIoOqgPCZS7G/4xQNVUp8Mda8= -github.com/prometheus/client_golang v0.8.0/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910 h1:idejC8f05m9MGOsuEi1ATq9shN03HrxNkD/luQvxCv8= -github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/common v0.0.0-20180801064454-c7de2306084e h1:n/3MEhJQjQxrOUCzh1Y3Re6aJUUWRp2M9+Oc3eVn/54= -github.com/prometheus/common v0.0.0-20180801064454-c7de2306084e/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/procfs v0.0.0-20180725123919-05ee40e3a273 h1:agujYaXJSxSo18YNX3jzl+4G6Bstwt+kqv47GS12uL0= -github.com/prometheus/procfs v0.0.0-20180725123919-05ee40e3a273/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -golang.org/x/net v0.0.0-20180821023952-922f4815f713/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180906233101-161cd47e91fd h1:nTDtHvHSdCn1m6ITfMRqtOd/9+7a3s8RBNOZ3eYZzJA= -golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +github.com/hashicorp/golang-lru v0.5.0 h1:CL2msUPvZTLb5O648aiLNJw3hnBxN2+1Jq8rCOH9wdo= +github.com/hashicorp/golang-lru v0.5.0 h1:CL2msUPvZTLb5O648aiLNJw3hnBxN2+1Jq8rCOH9wdo= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a h1:oWX7TPOiFAMXLq8o0ikBYfCJVlRHBcsciT5bXOrH628= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f h1:wMNYb4v58l5UBM7MYRLPG6ZhfOqbKu7X5eyFl8ZhKvA= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180821140842-3b58ed4ad339/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e h1:o3PsSEY8E4eXWkXrIP9YJALUkVZqzHJT5DOasTyn8Vs= -golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f h1:Bl/8QSvNqXvPGPGXa2z5xUTmV7VDcZyvRZ+QQXkXTZQ= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6 h1:bjcUS9ztw9kFmmIxJInhon/0Is3p+EHBKNgquIzo1OI= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a h1:1BGLXjeY4akVXGgbC9HugT3Jv3hCI0z56oJR5vAMgBU= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -google.golang.org/api v0.0.0-20180818000503-e21acd801f91/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= -google.golang.org/api v0.0.0-20180910000450-7ca32eb868bf h1:rjxqQmxjyqerRKEj+tZW+MCm4LgpFXu18bsEoCMgDsk= -google.golang.org/api v0.0.0-20180910000450-7ca32eb868bf/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8 h1:Nw54tB0rB7hY/N0NQvRW8DG4Yk3Q6T9cu9RcFQDu1tc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20180831171423-11092d34479b h1:lohp5blsw53GBXtLyLNaTXPXS9pJ1tiTw61ZHUoE9Qw= -google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/grpc v1.14.0 h1:ArxJuB1NWfPY6r9Gp9gqwplT0Ge7nqv9msgu03lHLmo= -google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/yaml.v2 v2.2.1 h1:mUhvW9EsL+naU5Q3cakzfE91YhliOondGd6ZrsDBHQE= -gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19 h1:Lj2SnHtxkRGJDqnGaSjo+CCdIieEnwVazbOXILwQemk= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/grpc v1.19.0 h1:cfg4PD8YEdSFnm7qLV4++93WcmhH2nIUhMjhdCvl3j8= +google.golang.org/grpc v1.19.0 h1:cfg4PD8YEdSFnm7qLV4++93WcmhH2nIUhMjhdCvl3j8= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/vendor/go.opencensus.io/internal/internal.go b/vendor/go.opencensus.io/internal/internal.go index e1d1238d..9a638781 100644 --- a/vendor/go.opencensus.io/internal/internal.go +++ b/vendor/go.opencensus.io/internal/internal.go @@ -18,12 +18,12 @@ import ( "fmt" "time" - "go.opencensus.io" + opencensus "go.opencensus.io" ) // UserAgent is the user agent to be added to the outgoing // requests from the exporters. -var UserAgent = fmt.Sprintf("opencensus-go [%s]", opencensus.Version()) +var UserAgent = fmt.Sprintf("opencensus-go/%s", opencensus.Version()) // MonotonicEndTime returns the end time at present // but offset from start, monotonically. diff --git a/vendor/go.opencensus.io/internal/tagencoding/tagencoding.go b/vendor/go.opencensus.io/internal/tagencoding/tagencoding.go index 3b1af8b4..41b2c3fc 100644 --- a/vendor/go.opencensus.io/internal/tagencoding/tagencoding.go +++ b/vendor/go.opencensus.io/internal/tagencoding/tagencoding.go @@ -17,6 +17,7 @@ // used interally by the stats collector. package tagencoding // import "go.opencensus.io/internal/tagencoding" +// Values represent the encoded buffer for the values. type Values struct { Buffer []byte WriteIndex int @@ -31,6 +32,7 @@ func (vb *Values) growIfRequired(expected int) { } } +// WriteValue is the helper method to encode Values from map[Key][]byte. func (vb *Values) WriteValue(v []byte) { length := len(v) & 0xff vb.growIfRequired(1 + length) @@ -49,7 +51,7 @@ func (vb *Values) WriteValue(v []byte) { vb.WriteIndex += length } -// ReadValue is the helper method to read the values when decoding valuesBytes to a map[Key][]byte. +// ReadValue is the helper method to decode Values to a map[Key][]byte. func (vb *Values) ReadValue() []byte { // read length of v length := int(vb.Buffer[vb.ReadIndex]) @@ -67,6 +69,7 @@ func (vb *Values) ReadValue() []byte { return v } +// Bytes returns a reference to already written bytes in the Buffer. func (vb *Values) Bytes() []byte { return vb.Buffer[:vb.WriteIndex] } diff --git a/vendor/go.opencensus.io/internal/traceinternals.go b/vendor/go.opencensus.io/internal/traceinternals.go index 553ca68d..073af7b4 100644 --- a/vendor/go.opencensus.io/internal/traceinternals.go +++ b/vendor/go.opencensus.io/internal/traceinternals.go @@ -22,6 +22,7 @@ import ( // TODO(#412): remove this var Trace interface{} +// LocalSpanStoreEnabled true if the local span store is enabled. var LocalSpanStoreEnabled bool // BucketConfiguration stores the number of samples to store for span buckets diff --git a/vendor/go.opencensus.io/stats/internal/validation.go b/vendor/go.opencensus.io/metric/metricdata/doc.go similarity index 72% rename from vendor/go.opencensus.io/stats/internal/validation.go rename to vendor/go.opencensus.io/metric/metricdata/doc.go index b946667f..52a7b3bf 100644 --- a/vendor/go.opencensus.io/stats/internal/validation.go +++ b/vendor/go.opencensus.io/metric/metricdata/doc.go @@ -12,17 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -package internal // import "go.opencensus.io/stats/internal" - -const ( - MaxNameLength = 255 -) - -func IsPrintable(str string) bool { - for _, r := range str { - if !(r >= ' ' && r <= '~') { - return false - } - } - return true -} +// Package metricdata contains the metrics data model. +// +// This is an EXPERIMENTAL package, and may change in arbitrary ways without +// notice. +package metricdata // import "go.opencensus.io/metric/metricdata" diff --git a/vendor/go.opencensus.io/metric/metricdata/exemplar.go b/vendor/go.opencensus.io/metric/metricdata/exemplar.go new file mode 100644 index 00000000..12695ce2 --- /dev/null +++ b/vendor/go.opencensus.io/metric/metricdata/exemplar.go @@ -0,0 +1,38 @@ +// Copyright 2018, OpenCensus 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 metricdata + +import ( + "time" +) + +// Exemplars keys. +const ( + AttachmentKeySpanContext = "SpanContext" +) + +// Exemplar is an example data point associated with each bucket of a +// distribution type aggregation. +// +// Their purpose is to provide an example of the kind of thing +// (request, RPC, trace span, etc.) that resulted in that measurement. +type Exemplar struct { + Value float64 // the value that was recorded + Timestamp time.Time // the time the value was recorded + Attachments Attachments // attachments (if any) +} + +// Attachments is a map of extra values associated with a recorded data point. +type Attachments map[string]interface{} diff --git a/vendor/go.opencensus.io/metric/metricdata/label.go b/vendor/go.opencensus.io/metric/metricdata/label.go new file mode 100644 index 00000000..aadae41e --- /dev/null +++ b/vendor/go.opencensus.io/metric/metricdata/label.go @@ -0,0 +1,35 @@ +// Copyright 2018, OpenCensus 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 metricdata + +// LabelKey represents key of a label. It has optional +// description attribute. +type LabelKey struct { + Key string + Description string +} + +// LabelValue represents the value of a label. +// The zero value represents a missing label value, which may be treated +// differently to an empty string value by some back ends. +type LabelValue struct { + Value string // string value of the label + Present bool // flag that indicated whether a value is present or not +} + +// NewLabelValue creates a new non-nil LabelValue that represents the given string. +func NewLabelValue(val string) LabelValue { + return LabelValue{Value: val, Present: true} +} diff --git a/vendor/go.opencensus.io/metric/metricdata/metric.go b/vendor/go.opencensus.io/metric/metricdata/metric.go new file mode 100644 index 00000000..8293712c --- /dev/null +++ b/vendor/go.opencensus.io/metric/metricdata/metric.go @@ -0,0 +1,46 @@ +// Copyright 2018, OpenCensus 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 metricdata + +import ( + "time" + + "go.opencensus.io/resource" +) + +// Descriptor holds metadata about a metric. +type Descriptor struct { + Name string // full name of the metric + Description string // human-readable description + Unit Unit // units for the measure + Type Type // type of measure + LabelKeys []LabelKey // label keys +} + +// Metric represents a quantity measured against a resource with different +// label value combinations. +type Metric struct { + Descriptor Descriptor // metric descriptor + Resource *resource.Resource // resource against which this was measured + TimeSeries []*TimeSeries // one time series for each combination of label values +} + +// TimeSeries is a sequence of points associated with a combination of label +// values. +type TimeSeries struct { + LabelValues []LabelValue // label values, same order as keys in the metric descriptor + Points []Point // points sequence + StartTime time.Time // time we started recording this time series +} diff --git a/vendor/go.opencensus.io/metric/metricdata/point.go b/vendor/go.opencensus.io/metric/metricdata/point.go new file mode 100644 index 00000000..7fe057b1 --- /dev/null +++ b/vendor/go.opencensus.io/metric/metricdata/point.go @@ -0,0 +1,193 @@ +// Copyright 2018, OpenCensus 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 metricdata + +import ( + "time" +) + +// Point is a single data point of a time series. +type Point struct { + // Time is the point in time that this point represents in a time series. + Time time.Time + // Value is the value of this point. Prefer using ReadValue to switching on + // the value type, since new value types might be added. + Value interface{} +} + +//go:generate stringer -type ValueType + +// NewFloat64Point creates a new Point holding a float64 value. +func NewFloat64Point(t time.Time, val float64) Point { + return Point{ + Value: val, + Time: t, + } +} + +// NewInt64Point creates a new Point holding an int64 value. +func NewInt64Point(t time.Time, val int64) Point { + return Point{ + Value: val, + Time: t, + } +} + +// NewDistributionPoint creates a new Point holding a Distribution value. +func NewDistributionPoint(t time.Time, val *Distribution) Point { + return Point{ + Value: val, + Time: t, + } +} + +// NewSummaryPoint creates a new Point holding a Summary value. +func NewSummaryPoint(t time.Time, val *Summary) Point { + return Point{ + Value: val, + Time: t, + } +} + +// ValueVisitor allows reading the value of a point. +type ValueVisitor interface { + VisitFloat64Value(float64) + VisitInt64Value(int64) + VisitDistributionValue(*Distribution) + VisitSummaryValue(*Summary) +} + +// ReadValue accepts a ValueVisitor and calls the appropriate method with the +// value of this point. +// Consumers of Point should use this in preference to switching on the type +// of the value directly, since new value types may be added. +func (p Point) ReadValue(vv ValueVisitor) { + switch v := p.Value.(type) { + case int64: + vv.VisitInt64Value(v) + case float64: + vv.VisitFloat64Value(v) + case *Distribution: + vv.VisitDistributionValue(v) + case *Summary: + vv.VisitSummaryValue(v) + default: + panic("unexpected value type") + } +} + +// Distribution contains summary statistics for a population of values. It +// optionally contains a histogram representing the distribution of those +// values across a set of buckets. +type Distribution struct { + // Count is the number of values in the population. Must be non-negative. This value + // must equal the sum of the values in bucket_counts if a histogram is + // provided. + Count int64 + // Sum is the sum of the values in the population. If count is zero then this field + // must be zero. + Sum float64 + // SumOfSquaredDeviation is the sum of squared deviations from the mean of the values in the + // population. For values x_i this is: + // + // Sum[i=1..n]((x_i - mean)^2) + // + // Knuth, "The Art of Computer Programming", Vol. 2, page 323, 3rd edition + // describes Welford's method for accumulating this sum in one pass. + // + // If count is zero then this field must be zero. + SumOfSquaredDeviation float64 + // BucketOptions describes the bounds of the histogram buckets in this + // distribution. + // + // A Distribution may optionally contain a histogram of the values in the + // population. + // + // If nil, there is no associated histogram. + BucketOptions *BucketOptions + // Bucket If the distribution does not have a histogram, then omit this field. + // If there is a histogram, then the sum of the values in the Bucket counts + // must equal the value in the count field of the distribution. + Buckets []Bucket +} + +// BucketOptions describes the bounds of the histogram buckets in this +// distribution. +type BucketOptions struct { + // Bounds specifies a set of bucket upper bounds. + // This defines len(bounds) + 1 (= N) buckets. The boundaries for bucket + // index i are: + // + // [0, Bounds[i]) for i == 0 + // [Bounds[i-1], Bounds[i]) for 0 < i < N-1 + // [Bounds[i-1], +infinity) for i == N-1 + Bounds []float64 +} + +// Bucket represents a single bucket (value range) in a distribution. +type Bucket struct { + // Count is the number of values in each bucket of the histogram, as described in + // bucket_bounds. + Count int64 + // Exemplar associated with this bucket (if any). + Exemplar *Exemplar +} + +// Summary is a representation of percentiles. +type Summary struct { + // Count is the cumulative count (if available). + Count int64 + // Sum is the cumulative sum of values (if available). + Sum float64 + // HasCountAndSum is true if Count and Sum are available. + HasCountAndSum bool + // Snapshot represents percentiles calculated over an arbitrary time window. + // The values in this struct can be reset at arbitrary unknown times, with + // the requirement that all of them are reset at the same time. + Snapshot Snapshot +} + +// Snapshot represents percentiles over an arbitrary time. +// The values in this struct can be reset at arbitrary unknown times, with +// the requirement that all of them are reset at the same time. +type Snapshot struct { + // Count is the number of values in the snapshot. Optional since some systems don't + // expose this. Set to 0 if not available. + Count int64 + // Sum is the sum of values in the snapshot. Optional since some systems don't + // expose this. If count is 0 then this field must be zero. + Sum float64 + // Percentiles is a map from percentile (range (0-100.0]) to the value of + // the percentile. + Percentiles map[float64]float64 +} + +//go:generate stringer -type Type + +// Type is the overall type of metric, including its value type and whether it +// represents a cumulative total (since the start time) or if it represents a +// gauge value. +type Type int + +// Metric types. +const ( + TypeGaugeInt64 Type = iota + TypeGaugeFloat64 + TypeGaugeDistribution + TypeCumulativeInt64 + TypeCumulativeFloat64 + TypeCumulativeDistribution + TypeSummary +) diff --git a/vendor/go.opencensus.io/metric/metricdata/type_string.go b/vendor/go.opencensus.io/metric/metricdata/type_string.go new file mode 100644 index 00000000..c3f8ec27 --- /dev/null +++ b/vendor/go.opencensus.io/metric/metricdata/type_string.go @@ -0,0 +1,16 @@ +// Code generated by "stringer -type Type"; DO NOT EDIT. + +package metricdata + +import "strconv" + +const _Type_name = "TypeGaugeInt64TypeGaugeFloat64TypeGaugeDistributionTypeCumulativeInt64TypeCumulativeFloat64TypeCumulativeDistributionTypeSummary" + +var _Type_index = [...]uint8{0, 14, 30, 51, 70, 91, 117, 128} + +func (i Type) String() string { + if i < 0 || i >= Type(len(_Type_index)-1) { + return "Type(" + strconv.FormatInt(int64(i), 10) + ")" + } + return _Type_name[_Type_index[i]:_Type_index[i+1]] +} diff --git a/vendor/go.opencensus.io/trace/exemplar.go b/vendor/go.opencensus.io/metric/metricdata/unit.go similarity index 52% rename from vendor/go.opencensus.io/trace/exemplar.go rename to vendor/go.opencensus.io/metric/metricdata/unit.go index 416d8059..b483a137 100644 --- a/vendor/go.opencensus.io/trace/exemplar.go +++ b/vendor/go.opencensus.io/metric/metricdata/unit.go @@ -12,32 +12,16 @@ // See the License for the specific language governing permissions and // limitations under the License. -package trace +package metricdata -import ( - "context" - "encoding/hex" +// Unit is a string encoded according to the case-sensitive abbreviations from the +// Unified Code for Units of Measure: http://unitsofmeasure.org/ucum.html +type Unit string - "go.opencensus.io/exemplar" +// Predefined units. To record against a unit not represented here, create your +// own Unit type constant from a string. +const ( + UnitDimensionless Unit = "1" + UnitBytes Unit = "By" + UnitMilliseconds Unit = "ms" ) - -func init() { - exemplar.RegisterAttachmentExtractor(attachSpanContext) -} - -func attachSpanContext(ctx context.Context, a exemplar.Attachments) exemplar.Attachments { - span := FromContext(ctx) - if span == nil { - return a - } - sc := span.SpanContext() - if !sc.IsSampled() { - return a - } - if a == nil { - a = make(exemplar.Attachments) - } - a[exemplar.KeyTraceID] = hex.EncodeToString(sc.TraceID[:]) - a[exemplar.KeySpanID] = hex.EncodeToString(sc.SpanID[:]) - return a -} diff --git a/vendor/go.opencensus.io/metric/metricproducer/manager.go b/vendor/go.opencensus.io/metric/metricproducer/manager.go new file mode 100644 index 00000000..ca1f3904 --- /dev/null +++ b/vendor/go.opencensus.io/metric/metricproducer/manager.go @@ -0,0 +1,78 @@ +// Copyright 2019, OpenCensus 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 metricproducer + +import ( + "sync" +) + +// Manager maintains a list of active producers. Producers can register +// with the manager to allow readers to read all metrics provided by them. +// Readers can retrieve all producers registered with the manager, +// read metrics from the producers and export them. +type Manager struct { + mu sync.RWMutex + producers map[Producer]struct{} +} + +var prodMgr *Manager +var once sync.Once + +// GlobalManager is a single instance of producer manager +// that is used by all producers and all readers. +func GlobalManager() *Manager { + once.Do(func() { + prodMgr = &Manager{} + prodMgr.producers = make(map[Producer]struct{}) + }) + return prodMgr +} + +// AddProducer adds the producer to the Manager if it is not already present. +func (pm *Manager) AddProducer(producer Producer) { + if producer == nil { + return + } + pm.mu.Lock() + defer pm.mu.Unlock() + pm.producers[producer] = struct{}{} +} + +// DeleteProducer deletes the producer from the Manager if it is present. +func (pm *Manager) DeleteProducer(producer Producer) { + if producer == nil { + return + } + pm.mu.Lock() + defer pm.mu.Unlock() + delete(pm.producers, producer) +} + +// GetAll returns a slice of all producer currently registered with +// the Manager. For each call it generates a new slice. The slice +// should not be cached as registration may change at any time. It is +// typically called periodically by exporter to read metrics from +// the producers. +func (pm *Manager) GetAll() []Producer { + pm.mu.Lock() + defer pm.mu.Unlock() + producers := make([]Producer, len(pm.producers)) + i := 0 + for producer := range pm.producers { + producers[i] = producer + i++ + } + return producers +} diff --git a/vendor/go.opencensus.io/metric/metricproducer/producer.go b/vendor/go.opencensus.io/metric/metricproducer/producer.go new file mode 100644 index 00000000..6cee9ed1 --- /dev/null +++ b/vendor/go.opencensus.io/metric/metricproducer/producer.go @@ -0,0 +1,28 @@ +// Copyright 2019, OpenCensus 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 metricproducer + +import ( + "go.opencensus.io/metric/metricdata" +) + +// Producer is a source of metrics. +type Producer interface { + // Read should return the current values of all metrics supported by this + // metric provider. + // The returned metrics should be unique for each combination of name and + // resource. + Read() []*metricdata.Metric +} diff --git a/vendor/go.opencensus.io/opencensus.go b/vendor/go.opencensus.io/opencensus.go index 62f03486..d2565f1e 100644 --- a/vendor/go.opencensus.io/opencensus.go +++ b/vendor/go.opencensus.io/opencensus.go @@ -17,5 +17,5 @@ package opencensus // import "go.opencensus.io" // Version is the current release version of OpenCensus in use. func Version() string { - return "0.18.0" + return "0.21.0" } diff --git a/vendor/go.opencensus.io/plugin/ocgrpc/stats_common.go b/vendor/go.opencensus.io/plugin/ocgrpc/stats_common.go index 1737809e..0ae56918 100644 --- a/vendor/go.opencensus.io/plugin/ocgrpc/stats_common.go +++ b/vendor/go.opencensus.io/plugin/ocgrpc/stats_common.go @@ -22,9 +22,11 @@ import ( "sync/atomic" "time" + "go.opencensus.io/metric/metricdata" ocstats "go.opencensus.io/stats" "go.opencensus.io/stats/view" "go.opencensus.io/tag" + "go.opencensus.io/trace" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" "google.golang.org/grpc/stats" @@ -51,9 +53,9 @@ type rpcData struct { // The following variables define the default hard-coded auxiliary data used by // both the default GRPC client and GRPC server metrics. var ( - DefaultBytesDistribution = view.Distribution(0, 1024, 2048, 4096, 16384, 65536, 262144, 1048576, 4194304, 16777216, 67108864, 268435456, 1073741824, 4294967296) - DefaultMillisecondsDistribution = view.Distribution(0, 0.01, 0.05, 0.1, 0.3, 0.6, 0.8, 1, 2, 3, 4, 5, 6, 8, 10, 13, 16, 20, 25, 30, 40, 50, 65, 80, 100, 130, 160, 200, 250, 300, 400, 500, 650, 800, 1000, 2000, 5000, 10000, 20000, 50000, 100000) - DefaultMessageCountDistribution = view.Distribution(0, 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536) + DefaultBytesDistribution = view.Distribution(1024, 2048, 4096, 16384, 65536, 262144, 1048576, 4194304, 16777216, 67108864, 268435456, 1073741824, 4294967296) + DefaultMillisecondsDistribution = view.Distribution(0.01, 0.05, 0.1, 0.3, 0.6, 0.8, 1, 2, 3, 4, 5, 6, 8, 10, 13, 16, 20, 25, 30, 40, 50, 65, 80, 100, 130, 160, 200, 250, 300, 400, 500, 650, 800, 1000, 2000, 5000, 10000, 20000, 50000, 100000) + DefaultMessageCountDistribution = view.Distribution(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536) ) // Server tags are applied to the context used to process each RPC, as well as @@ -141,27 +143,31 @@ func handleRPCEnd(ctx context.Context, s *stats.End) { } latencyMillis := float64(elapsedTime) / float64(time.Millisecond) + attachments := getSpanCtxAttachment(ctx) if s.Client { - ocstats.RecordWithTags(ctx, - []tag.Mutator{ + ocstats.RecordWithOptions(ctx, + ocstats.WithTags( tag.Upsert(KeyClientMethod, methodName(d.method)), - tag.Upsert(KeyClientStatus, st), - }, - ClientSentBytesPerRPC.M(atomic.LoadInt64(&d.sentBytes)), - ClientSentMessagesPerRPC.M(atomic.LoadInt64(&d.sentCount)), - ClientReceivedMessagesPerRPC.M(atomic.LoadInt64(&d.recvCount)), - ClientReceivedBytesPerRPC.M(atomic.LoadInt64(&d.recvBytes)), - ClientRoundtripLatency.M(latencyMillis)) + tag.Upsert(KeyClientStatus, st)), + ocstats.WithAttachments(attachments), + ocstats.WithMeasurements( + ClientSentBytesPerRPC.M(atomic.LoadInt64(&d.sentBytes)), + ClientSentMessagesPerRPC.M(atomic.LoadInt64(&d.sentCount)), + ClientReceivedMessagesPerRPC.M(atomic.LoadInt64(&d.recvCount)), + ClientReceivedBytesPerRPC.M(atomic.LoadInt64(&d.recvBytes)), + ClientRoundtripLatency.M(latencyMillis))) } else { - ocstats.RecordWithTags(ctx, - []tag.Mutator{ + ocstats.RecordWithOptions(ctx, + ocstats.WithTags( tag.Upsert(KeyServerStatus, st), - }, - ServerSentBytesPerRPC.M(atomic.LoadInt64(&d.sentBytes)), - ServerSentMessagesPerRPC.M(atomic.LoadInt64(&d.sentCount)), - ServerReceivedMessagesPerRPC.M(atomic.LoadInt64(&d.recvCount)), - ServerReceivedBytesPerRPC.M(atomic.LoadInt64(&d.recvBytes)), - ServerLatency.M(latencyMillis)) + ), + ocstats.WithAttachments(attachments), + ocstats.WithMeasurements( + ServerSentBytesPerRPC.M(atomic.LoadInt64(&d.sentBytes)), + ServerSentMessagesPerRPC.M(atomic.LoadInt64(&d.sentCount)), + ServerReceivedMessagesPerRPC.M(atomic.LoadInt64(&d.recvCount)), + ServerReceivedBytesPerRPC.M(atomic.LoadInt64(&d.recvBytes)), + ServerLatency.M(latencyMillis))) } } @@ -206,3 +212,16 @@ func statusCodeToString(s *status.Status) string { return "CODE_" + strconv.FormatInt(int64(c), 10) } } + +func getSpanCtxAttachment(ctx context.Context) metricdata.Attachments { + attachments := map[string]interface{}{} + span := trace.FromContext(ctx) + if span == nil { + return attachments + } + spanCtx := span.SpanContext() + if spanCtx.IsSampled() { + attachments[metricdata.AttachmentKeySpanContext] = spanCtx + } + return attachments +} diff --git a/vendor/go.opencensus.io/plugin/ochttp/client_stats.go b/vendor/go.opencensus.io/plugin/ochttp/client_stats.go index 066ebb87..17142aab 100644 --- a/vendor/go.opencensus.io/plugin/ochttp/client_stats.go +++ b/vendor/go.opencensus.io/plugin/ochttp/client_stats.go @@ -34,8 +34,8 @@ type statsTransport struct { // RoundTrip implements http.RoundTripper, delegating to Base and recording stats for the request. func (t statsTransport) RoundTrip(req *http.Request) (*http.Response, error) { ctx, _ := tag.New(req.Context(), - tag.Upsert(KeyClientHost, req.URL.Host), - tag.Upsert(Host, req.URL.Host), + tag.Upsert(KeyClientHost, req.Host), + tag.Upsert(Host, req.Host), tag.Upsert(KeyClientPath, req.URL.Path), tag.Upsert(Path, req.URL.Path), tag.Upsert(KeyClientMethod, req.Method), @@ -61,11 +61,14 @@ func (t statsTransport) RoundTrip(req *http.Request) (*http.Response, error) { track.end() } else { track.statusCode = resp.StatusCode + if req.Method != "HEAD" { + track.respContentLength = resp.ContentLength + } if resp.Body == nil { track.end() } else { track.body = resp.Body - resp.Body = track + resp.Body = wrappedBody(track, resp.Body) } } return resp, err @@ -82,13 +85,14 @@ func (t statsTransport) CancelRequest(req *http.Request) { } type tracker struct { - ctx context.Context - respSize int64 - reqSize int64 - start time.Time - body io.ReadCloser - statusCode int - endOnce sync.Once + ctx context.Context + respSize int64 + respContentLength int64 + reqSize int64 + start time.Time + body io.ReadCloser + statusCode int + endOnce sync.Once } var _ io.ReadCloser = (*tracker)(nil) @@ -96,9 +100,13 @@ var _ io.ReadCloser = (*tracker)(nil) func (t *tracker) end() { t.endOnce.Do(func() { latencyMs := float64(time.Since(t.start)) / float64(time.Millisecond) + respSize := t.respSize + if t.respSize == 0 && t.respContentLength > 0 { + respSize = t.respContentLength + } m := []stats.Measurement{ ClientSentBytes.M(t.reqSize), - ClientReceivedBytes.M(t.respSize), + ClientReceivedBytes.M(respSize), ClientRoundtripLatency.M(latencyMs), ClientLatency.M(latencyMs), ClientResponseBytes.M(t.respSize), @@ -116,9 +124,9 @@ func (t *tracker) end() { func (t *tracker) Read(b []byte) (int, error) { n, err := t.body.Read(b) + t.respSize += int64(n) switch err { case nil: - t.respSize += int64(n) return n, nil case io.EOF: t.end() diff --git a/vendor/go.opencensus.io/plugin/ochttp/propagation/b3/b3.go b/vendor/go.opencensus.io/plugin/ochttp/propagation/b3/b3.go index f777772e..2f1c7f00 100644 --- a/vendor/go.opencensus.io/plugin/ochttp/propagation/b3/b3.go +++ b/vendor/go.opencensus.io/plugin/ochttp/propagation/b3/b3.go @@ -38,7 +38,7 @@ const ( // because there are additional fields not represented in the // OpenCensus span context. Spans created from the incoming // header will be the direct children of the client-side span. -// Similarly, reciever of the outgoing spans should use client-side +// Similarly, receiver of the outgoing spans should use client-side // span created by OpenCensus as the parent. type HTTPFormat struct{} diff --git a/vendor/go.opencensus.io/plugin/ochttp/route.go b/vendor/go.opencensus.io/plugin/ochttp/route.go index dbe22d58..5e6a3430 100644 --- a/vendor/go.opencensus.io/plugin/ochttp/route.go +++ b/vendor/go.opencensus.io/plugin/ochttp/route.go @@ -15,11 +15,21 @@ package ochttp import ( + "context" "net/http" "go.opencensus.io/tag" ) +// SetRoute sets the http_server_route tag to the given value. +// It's useful when an HTTP framework does not support the http.Handler interface +// and using WithRouteTag is not an option, but provides a way to hook into the request flow. +func SetRoute(ctx context.Context, route string) { + if a, ok := ctx.Value(addedTagsKey{}).(*addedTags); ok { + a.t = append(a.t, tag.Upsert(KeyServerRoute, route)) + } +} + // WithRouteTag returns an http.Handler that records stats with the // http_server_route tag set to the given value. func WithRouteTag(handler http.Handler, route string) http.Handler { diff --git a/vendor/go.opencensus.io/plugin/ochttp/server.go b/vendor/go.opencensus.io/plugin/ochttp/server.go index ff72de97..4f6404fa 100644 --- a/vendor/go.opencensus.io/plugin/ochttp/server.go +++ b/vendor/go.opencensus.io/plugin/ochttp/server.go @@ -118,12 +118,18 @@ func (h *Handler) startTrace(w http.ResponseWriter, r *http.Request) (*http.Requ span.AddLink(trace.Link{ TraceID: sc.TraceID, SpanID: sc.SpanID, - Type: trace.LinkTypeChild, + Type: trace.LinkTypeParent, Attributes: nil, }) } } span.AddAttributes(requestAttrs(r)...) + if r.Body == nil { + // TODO: Handle cases where ContentLength is not set. + } else if r.ContentLength > 0 { + span.AddMessageReceiveEvent(0, /* TODO: messageID */ + int64(r.ContentLength), -1) + } return r.WithContext(ctx), span.End } @@ -136,7 +142,7 @@ func (h *Handler) extractSpanContext(r *http.Request) (trace.SpanContext, bool) func (h *Handler) startStats(w http.ResponseWriter, r *http.Request) (http.ResponseWriter, func(tags *addedTags)) { ctx, _ := tag.New(r.Context(), - tag.Upsert(Host, r.URL.Host), + tag.Upsert(Host, r.Host), tag.Upsert(Path, r.URL.Path), tag.Upsert(Method, r.Method)) track := &trackingResponseWriter{ @@ -201,6 +207,9 @@ func (t *trackingResponseWriter) Header() http.Header { func (t *trackingResponseWriter) Write(data []byte) (int, error) { n, err := t.writer.Write(data) t.respSize += int64(n) + // Add message event for request bytes sent. + span := trace.FromContext(t.ctx) + span.AddMessageSendEvent(0 /* TODO: messageID */, int64(n), -1) return n, err } diff --git a/vendor/go.opencensus.io/plugin/ochttp/stats.go b/vendor/go.opencensus.io/plugin/ochttp/stats.go index 46dcc8e5..63bbcda5 100644 --- a/vendor/go.opencensus.io/plugin/ochttp/stats.go +++ b/vendor/go.opencensus.io/plugin/ochttp/stats.go @@ -20,19 +20,31 @@ import ( "go.opencensus.io/tag" ) -// The following client HTTP measures are supported for use in custom views. +// Deprecated: client HTTP measures. var ( // Deprecated: Use a Count aggregation over one of the other client measures to achieve the same effect. - ClientRequestCount = stats.Int64("opencensus.io/http/client/request_count", "Number of HTTP requests started", stats.UnitDimensionless) + ClientRequestCount = stats.Int64( + "opencensus.io/http/client/request_count", + "Number of HTTP requests started", + stats.UnitDimensionless) // Deprecated: Use ClientSentBytes. - ClientRequestBytes = stats.Int64("opencensus.io/http/client/request_bytes", "HTTP request body size if set as ContentLength (uncompressed)", stats.UnitBytes) + ClientRequestBytes = stats.Int64( + "opencensus.io/http/client/request_bytes", + "HTTP request body size if set as ContentLength (uncompressed)", + stats.UnitBytes) // Deprecated: Use ClientReceivedBytes. - ClientResponseBytes = stats.Int64("opencensus.io/http/client/response_bytes", "HTTP response body size (uncompressed)", stats.UnitBytes) + ClientResponseBytes = stats.Int64( + "opencensus.io/http/client/response_bytes", + "HTTP response body size (uncompressed)", + stats.UnitBytes) // Deprecated: Use ClientRoundtripLatency. - ClientLatency = stats.Float64("opencensus.io/http/client/latency", "End-to-end latency", stats.UnitMilliseconds) + ClientLatency = stats.Float64( + "opencensus.io/http/client/latency", + "End-to-end latency", + stats.UnitMilliseconds) ) -// Client measures supported for use in custom views. +// The following client HTTP measures are supported for use in custom views. var ( ClientSentBytes = stats.Int64( "opencensus.io/http/client/sent_bytes", @@ -53,10 +65,22 @@ var ( // The following server HTTP measures are supported for use in custom views: var ( - ServerRequestCount = stats.Int64("opencensus.io/http/server/request_count", "Number of HTTP requests started", stats.UnitDimensionless) - ServerRequestBytes = stats.Int64("opencensus.io/http/server/request_bytes", "HTTP request body size if set as ContentLength (uncompressed)", stats.UnitBytes) - ServerResponseBytes = stats.Int64("opencensus.io/http/server/response_bytes", "HTTP response body size (uncompressed)", stats.UnitBytes) - ServerLatency = stats.Float64("opencensus.io/http/server/latency", "End-to-end latency", stats.UnitMilliseconds) + ServerRequestCount = stats.Int64( + "opencensus.io/http/server/request_count", + "Number of HTTP requests started", + stats.UnitDimensionless) + ServerRequestBytes = stats.Int64( + "opencensus.io/http/server/request_bytes", + "HTTP request body size if set as ContentLength (uncompressed)", + stats.UnitBytes) + ServerResponseBytes = stats.Int64( + "opencensus.io/http/server/response_bytes", + "HTTP response body size (uncompressed)", + stats.UnitBytes) + ServerLatency = stats.Float64( + "opencensus.io/http/server/latency", + "End-to-end latency", + stats.UnitMilliseconds) ) // The following tags are applied to stats recorded by this package. Host, Path @@ -104,11 +128,11 @@ var ( // Default distributions used by views in this package. var ( - DefaultSizeDistribution = view.Distribution(0, 1024, 2048, 4096, 16384, 65536, 262144, 1048576, 4194304, 16777216, 67108864, 268435456, 1073741824, 4294967296) - DefaultLatencyDistribution = view.Distribution(0, 1, 2, 3, 4, 5, 6, 8, 10, 13, 16, 20, 25, 30, 40, 50, 65, 80, 100, 130, 160, 200, 250, 300, 400, 500, 650, 800, 1000, 2000, 5000, 10000, 20000, 50000, 100000) + DefaultSizeDistribution = view.Distribution(1024, 2048, 4096, 16384, 65536, 262144, 1048576, 4194304, 16777216, 67108864, 268435456, 1073741824, 4294967296) + DefaultLatencyDistribution = view.Distribution(1, 2, 3, 4, 5, 6, 8, 10, 13, 16, 20, 25, 30, 40, 50, 65, 80, 100, 130, 160, 200, 250, 300, 400, 500, 650, 800, 1000, 2000, 5000, 10000, 20000, 50000, 100000) ) -// Package ochttp provides some convenience views. +// Package ochttp provides some convenience views for client measures. // You still need to register these views for data to actually be collected. var ( ClientSentBytesDistribution = &view.View{ @@ -144,6 +168,7 @@ var ( } ) +// Deprecated: Old client Views. var ( // Deprecated: No direct replacement, but see ClientCompletedCount. ClientRequestCountView = &view.View{ @@ -161,7 +186,7 @@ var ( Aggregation: DefaultSizeDistribution, } - // Deprecated: Use ClientReceivedBytesDistribution. + // Deprecated: Use ClientReceivedBytesDistribution instead. ClientResponseBytesView = &view.View{ Name: "opencensus.io/http/client/response_bytes", Description: "Size distribution of HTTP response body", @@ -169,7 +194,7 @@ var ( Aggregation: DefaultSizeDistribution, } - // Deprecated: Use ClientRoundtripLatencyDistribution. + // Deprecated: Use ClientRoundtripLatencyDistribution instead. ClientLatencyView = &view.View{ Name: "opencensus.io/http/client/latency", Description: "Latency distribution of HTTP requests", @@ -177,7 +202,7 @@ var ( Aggregation: DefaultLatencyDistribution, } - // Deprecated: Use ClientCompletedCount. + // Deprecated: Use ClientCompletedCount instead. ClientRequestCountByMethod = &view.View{ Name: "opencensus.io/http/client/request_count_by_method", Description: "Client request count by HTTP method", @@ -186,7 +211,7 @@ var ( Aggregation: view.Count(), } - // Deprecated: Use ClientCompletedCount. + // Deprecated: Use ClientCompletedCount instead. ClientResponseCountByStatusCode = &view.View{ Name: "opencensus.io/http/client/response_count_by_status_code", Description: "Client response count by status code", @@ -196,6 +221,8 @@ var ( } ) +// Package ochttp provides some convenience views for server measures. +// You still need to register these views for data to actually be collected. var ( ServerRequestCountView = &view.View{ Name: "opencensus.io/http/server/request_count", diff --git a/vendor/go.opencensus.io/plugin/ochttp/trace.go b/vendor/go.opencensus.io/plugin/ochttp/trace.go index 819a2d5f..c23b97fb 100644 --- a/vendor/go.opencensus.io/plugin/ochttp/trace.go +++ b/vendor/go.opencensus.io/plugin/ochttp/trace.go @@ -34,6 +34,7 @@ const ( HostAttribute = "http.host" MethodAttribute = "http.method" PathAttribute = "http.path" + URLAttribute = "http.url" UserAgentAttribute = "http.user_agent" StatusCodeAttribute = "http.status_code" ) @@ -93,7 +94,8 @@ func (t *traceTransport) RoundTrip(req *http.Request) (*http.Response, error) { // span.End() will be invoked after // a read from resp.Body returns io.EOF or when // resp.Body.Close() is invoked. - resp.Body = &bodyTracker{rc: resp.Body, span: span} + bt := &bodyTracker{rc: resp.Body, span: span} + resp.Body = wrappedBody(bt, resp.Body) return resp, err } @@ -149,12 +151,21 @@ func spanNameFromURL(req *http.Request) string { } func requestAttrs(r *http.Request) []trace.Attribute { - return []trace.Attribute{ + userAgent := r.UserAgent() + + attrs := make([]trace.Attribute, 0, 5) + attrs = append(attrs, trace.StringAttribute(PathAttribute, r.URL.Path), - trace.StringAttribute(HostAttribute, r.URL.Host), + trace.StringAttribute(URLAttribute, r.URL.String()), + trace.StringAttribute(HostAttribute, r.Host), trace.StringAttribute(MethodAttribute, r.Method), - trace.StringAttribute(UserAgentAttribute, r.UserAgent()), + ) + + if userAgent != "" { + attrs = append(attrs, trace.StringAttribute(UserAgentAttribute, userAgent)) } + + return attrs } func responseAttrs(resp *http.Response) []trace.Attribute { diff --git a/vendor/go.opencensus.io/plugin/ochttp/wrapped_body.go b/vendor/go.opencensus.io/plugin/ochttp/wrapped_body.go new file mode 100644 index 00000000..7d75cae2 --- /dev/null +++ b/vendor/go.opencensus.io/plugin/ochttp/wrapped_body.go @@ -0,0 +1,44 @@ +// Copyright 2019, OpenCensus 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 ochttp + +import ( + "io" +) + +// wrappedBody returns a wrapped version of the original +// Body and only implements the same combination of additional +// interfaces as the original. +func wrappedBody(wrapper io.ReadCloser, body io.ReadCloser) io.ReadCloser { + var ( + wr, i0 = body.(io.Writer) + ) + switch { + case !i0: + return struct { + io.ReadCloser + }{wrapper} + + case i0: + return struct { + io.ReadCloser + io.Writer + }{wrapper, wr} + default: + return struct { + io.ReadCloser + }{wrapper} + } +} diff --git a/vendor/go.opencensus.io/resource/resource.go b/vendor/go.opencensus.io/resource/resource.go new file mode 100644 index 00000000..b1764e1d --- /dev/null +++ b/vendor/go.opencensus.io/resource/resource.go @@ -0,0 +1,164 @@ +// Copyright 2018, OpenCensus 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 resource provides functionality for resource, which capture +// identifying information about the entities for which signals are exported. +package resource + +import ( + "context" + "fmt" + "os" + "regexp" + "sort" + "strconv" + "strings" +) + +// Environment variables used by FromEnv to decode a resource. +const ( + EnvVarType = "OC_RESOURCE_TYPE" + EnvVarLabels = "OC_RESOURCE_LABELS" +) + +// Resource describes an entity about which identifying information and metadata is exposed. +// For example, a type "k8s.io/container" may hold labels describing the pod name and namespace. +type Resource struct { + Type string + Labels map[string]string +} + +// EncodeLabels encodes a labels map to a string as provided via the OC_RESOURCE_LABELS environment variable. +func EncodeLabels(labels map[string]string) string { + sortedKeys := make([]string, 0, len(labels)) + for k := range labels { + sortedKeys = append(sortedKeys, k) + } + sort.Strings(sortedKeys) + + s := "" + for i, k := range sortedKeys { + if i > 0 { + s += "," + } + s += k + "=" + strconv.Quote(labels[k]) + } + return s +} + +var labelRegex = regexp.MustCompile(`^\s*([[:ascii:]]{1,256}?)=("[[:ascii:]]{0,256}?")\s*,`) + +// DecodeLabels decodes a serialized label map as used in the OC_RESOURCE_LABELS variable. +// A list of labels of the form `="",="",...` is accepted. +// Domain names and paths are accepted as label keys. +// Most users will want to use FromEnv instead. +func DecodeLabels(s string) (map[string]string, error) { + m := map[string]string{} + // Ensure a trailing comma, which allows us to keep the regex simpler + s = strings.TrimRight(strings.TrimSpace(s), ",") + "," + + for len(s) > 0 { + match := labelRegex.FindStringSubmatch(s) + if len(match) == 0 { + return nil, fmt.Errorf("invalid label formatting, remainder: %s", s) + } + v := match[2] + if v == "" { + v = match[3] + } else { + var err error + if v, err = strconv.Unquote(v); err != nil { + return nil, fmt.Errorf("invalid label formatting, remainder: %s, err: %s", s, err) + } + } + m[match[1]] = v + + s = s[len(match[0]):] + } + return m, nil +} + +// FromEnv is a detector that loads resource information from the OC_RESOURCE_TYPE +// and OC_RESOURCE_labelS environment variables. +func FromEnv(context.Context) (*Resource, error) { + res := &Resource{ + Type: strings.TrimSpace(os.Getenv(EnvVarType)), + } + labels := strings.TrimSpace(os.Getenv(EnvVarLabels)) + if labels == "" { + return res, nil + } + var err error + if res.Labels, err = DecodeLabels(labels); err != nil { + return nil, err + } + return res, nil +} + +var _ Detector = FromEnv + +// merge resource information from b into a. In case of a collision, a takes precedence. +func merge(a, b *Resource) *Resource { + if a == nil { + return b + } + if b == nil { + return a + } + res := &Resource{ + Type: a.Type, + Labels: map[string]string{}, + } + if res.Type == "" { + res.Type = b.Type + } + for k, v := range b.Labels { + res.Labels[k] = v + } + // Labels from resource a overwrite labels from resource b. + for k, v := range a.Labels { + res.Labels[k] = v + } + return res +} + +// Detector attempts to detect resource information. +// If the detector cannot find resource information, the returned resource is nil but no +// error is returned. +// An error is only returned on unexpected failures. +type Detector func(context.Context) (*Resource, error) + +// MultiDetector returns a Detector that calls all input detectors in order and +// merges each result with the previous one. In case a type of label key is already set, +// the first set value is takes precedence. +// It returns on the first error that a sub-detector encounters. +func MultiDetector(detectors ...Detector) Detector { + return func(ctx context.Context) (*Resource, error) { + return detectAll(ctx, detectors...) + } +} + +// detectall calls all input detectors sequentially an merges each result with the previous one. +// It returns on the first error that a sub-detector encounters. +func detectAll(ctx context.Context, detectors ...Detector) (*Resource, error) { + var res *Resource + for _, d := range detectors { + r, err := d(ctx) + if err != nil { + return nil, err + } + res = merge(res, r) + } + return res, nil +} diff --git a/vendor/go.opencensus.io/stats/internal/record.go b/vendor/go.opencensus.io/stats/internal/record.go index ed545520..36935e62 100644 --- a/vendor/go.opencensus.io/stats/internal/record.go +++ b/vendor/go.opencensus.io/stats/internal/record.go @@ -19,7 +19,7 @@ import ( ) // DefaultRecorder will be called for each Record call. -var DefaultRecorder func(tags *tag.Map, measurement interface{}, attachments map[string]string) +var DefaultRecorder func(tags *tag.Map, measurement interface{}, attachments map[string]interface{}) // SubscriptionReporter reports when a view subscribed with a measure. var SubscriptionReporter func(measure string) diff --git a/vendor/go.opencensus.io/stats/measure.go b/vendor/go.opencensus.io/stats/measure.go index 64d02b19..1ffd3cef 100644 --- a/vendor/go.opencensus.io/stats/measure.go +++ b/vendor/go.opencensus.io/stats/measure.go @@ -68,21 +68,6 @@ func (m *measureDescriptor) subscribed() bool { return atomic.LoadInt32(&m.subs) == 1 } -// Name returns the name of the measure. -func (m *measureDescriptor) Name() string { - return m.name -} - -// Description returns the description of the measure. -func (m *measureDescriptor) Description() string { - return m.description -} - -// Unit returns the unit of the measure. -func (m *measureDescriptor) Unit() string { - return m.unit -} - var ( mu sync.RWMutex measures = make(map[string]*measureDescriptor) @@ -108,8 +93,9 @@ func registerMeasureHandle(name, desc, unit string) *measureDescriptor { // provides methods to create measurements of their kind. For example, Int64Measure // provides M to convert an int64 into a measurement. type Measurement struct { - v float64 - m *measureDescriptor + v float64 + m Measure + desc *measureDescriptor } // Value returns the value of the Measurement as a float64. diff --git a/vendor/go.opencensus.io/stats/measure_float64.go b/vendor/go.opencensus.io/stats/measure_float64.go index acedb21c..f02c1eda 100644 --- a/vendor/go.opencensus.io/stats/measure_float64.go +++ b/vendor/go.opencensus.io/stats/measure_float64.go @@ -17,13 +17,17 @@ package stats // Float64Measure is a measure for float64 values. type Float64Measure struct { - *measureDescriptor + desc *measureDescriptor } // M creates a new float64 measurement. // Use Record to record measurements. func (m *Float64Measure) M(v float64) Measurement { - return Measurement{m: m.measureDescriptor, v: v} + return Measurement{ + m: m, + desc: m.desc, + v: v, + } } // Float64 creates a new measure for float64 values. @@ -34,3 +38,18 @@ func Float64(name, description, unit string) *Float64Measure { mi := registerMeasureHandle(name, description, unit) return &Float64Measure{mi} } + +// Name returns the name of the measure. +func (m *Float64Measure) Name() string { + return m.desc.name +} + +// Description returns the description of the measure. +func (m *Float64Measure) Description() string { + return m.desc.description +} + +// Unit returns the unit of the measure. +func (m *Float64Measure) Unit() string { + return m.desc.unit +} diff --git a/vendor/go.opencensus.io/stats/measure_int64.go b/vendor/go.opencensus.io/stats/measure_int64.go index c4243ba7..d101d797 100644 --- a/vendor/go.opencensus.io/stats/measure_int64.go +++ b/vendor/go.opencensus.io/stats/measure_int64.go @@ -17,13 +17,17 @@ package stats // Int64Measure is a measure for int64 values. type Int64Measure struct { - *measureDescriptor + desc *measureDescriptor } // M creates a new int64 measurement. // Use Record to record measurements. func (m *Int64Measure) M(v int64) Measurement { - return Measurement{m: m.measureDescriptor, v: float64(v)} + return Measurement{ + m: m, + desc: m.desc, + v: float64(v), + } } // Int64 creates a new measure for int64 values. @@ -34,3 +38,18 @@ func Int64(name, description, unit string) *Int64Measure { mi := registerMeasureHandle(name, description, unit) return &Int64Measure{mi} } + +// Name returns the name of the measure. +func (m *Int64Measure) Name() string { + return m.desc.name +} + +// Description returns the description of the measure. +func (m *Int64Measure) Description() string { + return m.desc.description +} + +// Unit returns the unit of the measure. +func (m *Int64Measure) Unit() string { + return m.desc.unit +} diff --git a/vendor/go.opencensus.io/stats/record.go b/vendor/go.opencensus.io/stats/record.go index 0aced02c..ad469118 100644 --- a/vendor/go.opencensus.io/stats/record.go +++ b/vendor/go.opencensus.io/stats/record.go @@ -18,7 +18,7 @@ package stats import ( "context" - "go.opencensus.io/exemplar" + "go.opencensus.io/metric/metricdata" "go.opencensus.io/stats/internal" "go.opencensus.io/tag" ) @@ -31,27 +31,48 @@ func init() { } } +type recordOptions struct { + attachments metricdata.Attachments + mutators []tag.Mutator + measurements []Measurement +} + +// WithAttachments applies provided exemplar attachments. +func WithAttachments(attachments metricdata.Attachments) Options { + return func(ro *recordOptions) { + ro.attachments = attachments + } +} + +// WithTags applies provided tag mutators. +func WithTags(mutators ...tag.Mutator) Options { + return func(ro *recordOptions) { + ro.mutators = mutators + } +} + +// WithMeasurements applies provided measurements. +func WithMeasurements(measurements ...Measurement) Options { + return func(ro *recordOptions) { + ro.measurements = measurements + } +} + +// Options apply changes to recordOptions. +type Options func(*recordOptions) + +func createRecordOption(ros ...Options) *recordOptions { + o := &recordOptions{} + for _, ro := range ros { + ro(o) + } + return o +} + // Record records one or multiple measurements with the same context at once. // If there are any tags in the context, measurements will be tagged with them. func Record(ctx context.Context, ms ...Measurement) { - recorder := internal.DefaultRecorder - if recorder == nil { - return - } - if len(ms) == 0 { - return - } - record := false - for _, m := range ms { - if m.m.subscribed() { - record = true - break - } - } - if !record { - return - } - recorder(tag.FromContext(ctx), ms, exemplar.AttachmentsFromContext(ctx)) + RecordWithOptions(ctx, WithMeasurements(ms...)) } // RecordWithTags records one or multiple measurements at once. @@ -60,10 +81,37 @@ func Record(ctx context.Context, ms ...Measurement) { // RecordWithTags is useful if you want to record with tag mutations but don't want // to propagate the mutations in the context. func RecordWithTags(ctx context.Context, mutators []tag.Mutator, ms ...Measurement) error { - ctx, err := tag.New(ctx, mutators...) - if err != nil { - return err + return RecordWithOptions(ctx, WithTags(mutators...), WithMeasurements(ms...)) +} + +// RecordWithOptions records measurements from the given options (if any) against context +// and tags and attachments in the options (if any). +// If there are any tags in the context, measurements will be tagged with them. +func RecordWithOptions(ctx context.Context, ros ...Options) error { + o := createRecordOption(ros...) + if len(o.measurements) == 0 { + return nil } - Record(ctx, ms...) + recorder := internal.DefaultRecorder + if recorder == nil { + return nil + } + record := false + for _, m := range o.measurements { + if m.desc.subscribed() { + record = true + break + } + } + if !record { + return nil + } + if len(o.mutators) > 0 { + var err error + if ctx, err = tag.New(ctx, o.mutators...); err != nil { + return err + } + } + recorder(tag.FromContext(ctx), o.measurements, o.attachments) return nil } diff --git a/vendor/go.opencensus.io/stats/view/aggregation_data.go b/vendor/go.opencensus.io/stats/view/aggregation_data.go index 960b9460..d500e67f 100644 --- a/vendor/go.opencensus.io/stats/view/aggregation_data.go +++ b/vendor/go.opencensus.io/stats/view/aggregation_data.go @@ -17,8 +17,9 @@ package view import ( "math" + "time" - "go.opencensus.io/exemplar" + "go.opencensus.io/metric/metricdata" ) // AggregationData represents an aggregated value from a collection. @@ -26,9 +27,10 @@ import ( // Mosts users won't directly access aggregration data. type AggregationData interface { isAggregationData() bool - addSample(e *exemplar.Exemplar) + addSample(v float64, attachments map[string]interface{}, t time.Time) clone() AggregationData equal(other AggregationData) bool + toPoint(t metricdata.Type, time time.Time) metricdata.Point } const epsilon = 1e-9 @@ -43,7 +45,7 @@ type CountData struct { func (a *CountData) isAggregationData() bool { return true } -func (a *CountData) addSample(_ *exemplar.Exemplar) { +func (a *CountData) addSample(_ float64, _ map[string]interface{}, _ time.Time) { a.Value = a.Value + 1 } @@ -60,6 +62,15 @@ func (a *CountData) equal(other AggregationData) bool { return a.Value == a2.Value } +func (a *CountData) toPoint(metricType metricdata.Type, t time.Time) metricdata.Point { + switch metricType { + case metricdata.TypeCumulativeInt64: + return metricdata.NewInt64Point(t, a.Value) + default: + panic("unsupported metricdata.Type") + } +} + // SumData is the aggregated data for the Sum aggregation. // A sum aggregation processes data and sums up the recordings. // @@ -70,8 +81,8 @@ type SumData struct { func (a *SumData) isAggregationData() bool { return true } -func (a *SumData) addSample(e *exemplar.Exemplar) { - a.Value += e.Value +func (a *SumData) addSample(v float64, _ map[string]interface{}, _ time.Time) { + a.Value += v } func (a *SumData) clone() AggregationData { @@ -86,6 +97,17 @@ func (a *SumData) equal(other AggregationData) bool { return math.Pow(a.Value-a2.Value, 2) < epsilon } +func (a *SumData) toPoint(metricType metricdata.Type, t time.Time) metricdata.Point { + switch metricType { + case metricdata.TypeCumulativeInt64: + return metricdata.NewInt64Point(t, int64(a.Value)) + case metricdata.TypeCumulativeFloat64: + return metricdata.NewFloat64Point(t, a.Value) + default: + panic("unsupported metricdata.Type") + } +} + // DistributionData is the aggregated data for the // Distribution aggregation. // @@ -102,7 +124,7 @@ type DistributionData struct { CountPerBucket []int64 // number of occurrences per bucket // ExemplarsPerBucket is slice the same length as CountPerBucket containing // an exemplar for the associated bucket, or nil. - ExemplarsPerBucket []*exemplar.Exemplar + ExemplarsPerBucket []*metricdata.Exemplar bounds []float64 // histogram distribution of the values } @@ -110,7 +132,7 @@ func newDistributionData(bounds []float64) *DistributionData { bucketCount := len(bounds) + 1 return &DistributionData{ CountPerBucket: make([]int64, bucketCount), - ExemplarsPerBucket: make([]*exemplar.Exemplar, bucketCount), + ExemplarsPerBucket: make([]*metricdata.Exemplar, bucketCount), bounds: bounds, Min: math.MaxFloat64, Max: math.SmallestNonzeroFloat64, @@ -129,64 +151,62 @@ func (a *DistributionData) variance() float64 { func (a *DistributionData) isAggregationData() bool { return true } -func (a *DistributionData) addSample(e *exemplar.Exemplar) { - f := e.Value - if f < a.Min { - a.Min = f +// TODO(songy23): support exemplar attachments. +func (a *DistributionData) addSample(v float64, attachments map[string]interface{}, t time.Time) { + if v < a.Min { + a.Min = v } - if f > a.Max { - a.Max = f + if v > a.Max { + a.Max = v } a.Count++ - a.addToBucket(e) + a.addToBucket(v, attachments, t) if a.Count == 1 { - a.Mean = f + a.Mean = v return } oldMean := a.Mean - a.Mean = a.Mean + (f-a.Mean)/float64(a.Count) - a.SumOfSquaredDev = a.SumOfSquaredDev + (f-oldMean)*(f-a.Mean) + a.Mean = a.Mean + (v-a.Mean)/float64(a.Count) + a.SumOfSquaredDev = a.SumOfSquaredDev + (v-oldMean)*(v-a.Mean) } -func (a *DistributionData) addToBucket(e *exemplar.Exemplar) { +func (a *DistributionData) addToBucket(v float64, attachments map[string]interface{}, t time.Time) { var count *int64 - var ex **exemplar.Exemplar - for i, b := range a.bounds { - if e.Value < b { + var i int + var b float64 + for i, b = range a.bounds { + if v < b { count = &a.CountPerBucket[i] - ex = &a.ExemplarsPerBucket[i] break } } - if count == nil { - count = &a.CountPerBucket[len(a.bounds)] - ex = &a.ExemplarsPerBucket[len(a.bounds)] + if count == nil { // Last bucket. + i = len(a.bounds) + count = &a.CountPerBucket[i] } *count++ - *ex = maybeRetainExemplar(*ex, e) + if exemplar := getExemplar(v, attachments, t); exemplar != nil { + a.ExemplarsPerBucket[i] = exemplar + } } -func maybeRetainExemplar(old, cur *exemplar.Exemplar) *exemplar.Exemplar { - if old == nil { - return cur +func getExemplar(v float64, attachments map[string]interface{}, t time.Time) *metricdata.Exemplar { + if len(attachments) == 0 { + return nil } - - // Heuristic to pick the "better" exemplar: first keep the one with a - // sampled trace attachment, if neither have a trace attachment, pick the - // one with more attachments. - _, haveTraceID := cur.Attachments[exemplar.KeyTraceID] - if haveTraceID || len(cur.Attachments) >= len(old.Attachments) { - return cur + return &metricdata.Exemplar{ + Value: v, + Timestamp: t, + Attachments: attachments, } - return old } func (a *DistributionData) clone() AggregationData { c := *a c.CountPerBucket = append([]int64(nil), a.CountPerBucket...) - c.ExemplarsPerBucket = append([]*exemplar.Exemplar(nil), a.ExemplarsPerBucket...) + c.ExemplarsPerBucket = append([]*metricdata.Exemplar(nil), a.ExemplarsPerBucket...) return &c } @@ -209,6 +229,33 @@ func (a *DistributionData) equal(other AggregationData) bool { return a.Count == a2.Count && a.Min == a2.Min && a.Max == a2.Max && math.Pow(a.Mean-a2.Mean, 2) < epsilon && math.Pow(a.variance()-a2.variance(), 2) < epsilon } +func (a *DistributionData) toPoint(metricType metricdata.Type, t time.Time) metricdata.Point { + switch metricType { + case metricdata.TypeCumulativeDistribution: + buckets := []metricdata.Bucket{} + for i := 0; i < len(a.CountPerBucket); i++ { + buckets = append(buckets, metricdata.Bucket{ + Count: a.CountPerBucket[i], + Exemplar: a.ExemplarsPerBucket[i], + }) + } + bucketOptions := &metricdata.BucketOptions{Bounds: a.bounds} + + val := &metricdata.Distribution{ + Count: a.Count, + Sum: a.Sum(), + SumOfSquaredDeviation: a.SumOfSquaredDev, + BucketOptions: bucketOptions, + Buckets: buckets, + } + return metricdata.NewDistributionPoint(t, val) + + default: + // TODO: [rghetia] when we have a use case for TypeGaugeDistribution. + panic("unsupported metricdata.Type") + } +} + // LastValueData returns the last value recorded for LastValue aggregation. type LastValueData struct { Value float64 @@ -218,8 +265,8 @@ func (l *LastValueData) isAggregationData() bool { return true } -func (l *LastValueData) addSample(e *exemplar.Exemplar) { - l.Value = e.Value +func (l *LastValueData) addSample(v float64, _ map[string]interface{}, _ time.Time) { + l.Value = v } func (l *LastValueData) clone() AggregationData { @@ -233,3 +280,14 @@ func (l *LastValueData) equal(other AggregationData) bool { } return l.Value == a2.Value } + +func (l *LastValueData) toPoint(metricType metricdata.Type, t time.Time) metricdata.Point { + switch metricType { + case metricdata.TypeGaugeInt64: + return metricdata.NewInt64Point(t, int64(l.Value)) + case metricdata.TypeGaugeFloat64: + return metricdata.NewFloat64Point(t, l.Value) + default: + panic("unsupported metricdata.Type") + } +} diff --git a/vendor/go.opencensus.io/stats/view/collector.go b/vendor/go.opencensus.io/stats/view/collector.go index 32415d48..8a6a2c0f 100644 --- a/vendor/go.opencensus.io/stats/view/collector.go +++ b/vendor/go.opencensus.io/stats/view/collector.go @@ -17,8 +17,7 @@ package view import ( "sort" - - "go.opencensus.io/exemplar" + "time" "go.opencensus.io/internal/tagencoding" "go.opencensus.io/tag" @@ -33,13 +32,13 @@ type collector struct { a *Aggregation } -func (c *collector) addSample(s string, e *exemplar.Exemplar) { +func (c *collector) addSample(s string, v float64, attachments map[string]interface{}, t time.Time) { aggregator, ok := c.signatures[s] if !ok { aggregator = c.a.newData() c.signatures[s] = aggregator } - aggregator.addSample(e) + aggregator.addSample(v, attachments, t) } // collectRows returns a snapshot of the collected Row values. diff --git a/vendor/go.opencensus.io/stats/view/view.go b/vendor/go.opencensus.io/stats/view/view.go index c2a08af6..37f88e1d 100644 --- a/vendor/go.opencensus.io/stats/view/view.go +++ b/vendor/go.opencensus.io/stats/view/view.go @@ -17,16 +17,15 @@ package view import ( "bytes" + "errors" "fmt" "reflect" "sort" "sync/atomic" "time" - "go.opencensus.io/exemplar" - + "go.opencensus.io/metric/metricdata" "go.opencensus.io/stats" - "go.opencensus.io/stats/internal" "go.opencensus.io/tag" ) @@ -69,6 +68,11 @@ func (v *View) same(other *View) bool { v.Measure.Name() == other.Measure.Name() } +// ErrNegativeBucketBounds error returned if histogram contains negative bounds. +// +// Deprecated: this should not be public. +var ErrNegativeBucketBounds = errors.New("negative bucket bounds not supported") + // canonicalize canonicalizes v by setting explicit // defaults for Name and Description and sorting the TagKeys func (v *View) canonicalize() error { @@ -90,20 +94,40 @@ func (v *View) canonicalize() error { sort.Slice(v.TagKeys, func(i, j int) bool { return v.TagKeys[i].Name() < v.TagKeys[j].Name() }) + sort.Float64s(v.Aggregation.Buckets) + for _, b := range v.Aggregation.Buckets { + if b < 0 { + return ErrNegativeBucketBounds + } + } + // drop 0 bucket silently. + v.Aggregation.Buckets = dropZeroBounds(v.Aggregation.Buckets...) + return nil } +func dropZeroBounds(bounds ...float64) []float64 { + for i, bound := range bounds { + if bound > 0 { + return bounds[i:] + } + } + return []float64{} +} + // viewInternal is the internal representation of a View. type viewInternal struct { - view *View // view is the canonicalized View definition associated with this view. - subscribed uint32 // 1 if someone is subscribed and data need to be exported, use atomic to access - collector *collector + view *View // view is the canonicalized View definition associated with this view. + subscribed uint32 // 1 if someone is subscribed and data need to be exported, use atomic to access + collector *collector + metricDescriptor *metricdata.Descriptor } func newViewInternal(v *View) (*viewInternal, error) { return &viewInternal{ - view: v, - collector: &collector{make(map[string]AggregationData), v.Aggregation}, + view: v, + collector: &collector{make(map[string]AggregationData), v.Aggregation}, + metricDescriptor: viewToMetricDescriptor(v), }, nil } @@ -129,12 +153,12 @@ func (v *viewInternal) collectedRows() []*Row { return v.collector.collectedRows(v.view.TagKeys) } -func (v *viewInternal) addSample(m *tag.Map, e *exemplar.Exemplar) { +func (v *viewInternal) addSample(m *tag.Map, val float64, attachments map[string]interface{}, t time.Time) { if !v.isSubscribed() { return } sig := string(encodeWithKeys(m, v.view.TagKeys)) - v.collector.addSample(sig, e) + v.collector.addSample(sig, val, attachments, t) } // A Data is a set of rows about usage of the single measure associated @@ -174,11 +198,23 @@ func (r *Row) Equal(other *Row) bool { return reflect.DeepEqual(r.Tags, other.Tags) && r.Data.equal(other.Data) } -func checkViewName(name string) error { - if len(name) > internal.MaxNameLength { - return fmt.Errorf("view name cannot be larger than %v", internal.MaxNameLength) +const maxNameLength = 255 + +// Returns true if the given string contains only printable characters. +func isPrintable(str string) bool { + for _, r := range str { + if !(r >= ' ' && r <= '~') { + return false + } } - if !internal.IsPrintable(name) { + return true +} + +func checkViewName(name string) error { + if len(name) > maxNameLength { + return fmt.Errorf("view name cannot be larger than %v", maxNameLength) + } + if !isPrintable(name) { return fmt.Errorf("view name needs to be an ASCII string") } return nil diff --git a/vendor/go.opencensus.io/stats/view/view_to_metric.go b/vendor/go.opencensus.io/stats/view/view_to_metric.go new file mode 100644 index 00000000..010f81ba --- /dev/null +++ b/vendor/go.opencensus.io/stats/view/view_to_metric.go @@ -0,0 +1,140 @@ +// Copyright 2019, OpenCensus 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 view + +import ( + "time" + + "go.opencensus.io/metric/metricdata" + "go.opencensus.io/stats" +) + +func getUnit(unit string) metricdata.Unit { + switch unit { + case "1": + return metricdata.UnitDimensionless + case "ms": + return metricdata.UnitMilliseconds + case "By": + return metricdata.UnitBytes + } + return metricdata.UnitDimensionless +} + +func getType(v *View) metricdata.Type { + m := v.Measure + agg := v.Aggregation + + switch agg.Type { + case AggTypeSum: + switch m.(type) { + case *stats.Int64Measure: + return metricdata.TypeCumulativeInt64 + case *stats.Float64Measure: + return metricdata.TypeCumulativeFloat64 + default: + panic("unexpected measure type") + } + case AggTypeDistribution: + return metricdata.TypeCumulativeDistribution + case AggTypeLastValue: + switch m.(type) { + case *stats.Int64Measure: + return metricdata.TypeGaugeInt64 + case *stats.Float64Measure: + return metricdata.TypeGaugeFloat64 + default: + panic("unexpected measure type") + } + case AggTypeCount: + switch m.(type) { + case *stats.Int64Measure: + return metricdata.TypeCumulativeInt64 + case *stats.Float64Measure: + return metricdata.TypeCumulativeInt64 + default: + panic("unexpected measure type") + } + default: + panic("unexpected aggregation type") + } +} + +func getLableKeys(v *View) []metricdata.LabelKey { + labelKeys := []metricdata.LabelKey{} + for _, k := range v.TagKeys { + labelKeys = append(labelKeys, metricdata.LabelKey{Key: k.Name()}) + } + return labelKeys +} + +func viewToMetricDescriptor(v *View) *metricdata.Descriptor { + return &metricdata.Descriptor{ + Name: v.Name, + Description: v.Description, + Unit: getUnit(v.Measure.Unit()), + Type: getType(v), + LabelKeys: getLableKeys(v), + } +} + +func toLabelValues(row *Row, expectedKeys []metricdata.LabelKey) []metricdata.LabelValue { + labelValues := []metricdata.LabelValue{} + tagMap := make(map[string]string) + for _, tag := range row.Tags { + tagMap[tag.Key.Name()] = tag.Value + } + + for _, key := range expectedKeys { + if val, ok := tagMap[key.Key]; ok { + labelValues = append(labelValues, metricdata.NewLabelValue(val)) + } else { + labelValues = append(labelValues, metricdata.LabelValue{}) + } + } + return labelValues +} + +func rowToTimeseries(v *viewInternal, row *Row, now time.Time, startTime time.Time) *metricdata.TimeSeries { + return &metricdata.TimeSeries{ + Points: []metricdata.Point{row.Data.toPoint(v.metricDescriptor.Type, now)}, + LabelValues: toLabelValues(row, v.metricDescriptor.LabelKeys), + StartTime: startTime, + } +} + +func viewToMetric(v *viewInternal, now time.Time, startTime time.Time) *metricdata.Metric { + if v.metricDescriptor.Type == metricdata.TypeGaugeInt64 || + v.metricDescriptor.Type == metricdata.TypeGaugeFloat64 { + startTime = time.Time{} + } + + rows := v.collectedRows() + if len(rows) == 0 { + return nil + } + + ts := []*metricdata.TimeSeries{} + for _, row := range rows { + ts = append(ts, rowToTimeseries(v, row, now, startTime)) + } + + m := &metricdata.Metric{ + Descriptor: *v.metricDescriptor, + TimeSeries: ts, + } + return m +} diff --git a/vendor/go.opencensus.io/stats/view/worker.go b/vendor/go.opencensus.io/stats/view/worker.go index 63b0ee3c..2f3c018a 100644 --- a/vendor/go.opencensus.io/stats/view/worker.go +++ b/vendor/go.opencensus.io/stats/view/worker.go @@ -17,8 +17,11 @@ package view import ( "fmt" + "sync" "time" + "go.opencensus.io/metric/metricdata" + "go.opencensus.io/metric/metricproducer" "go.opencensus.io/stats" "go.opencensus.io/stats/internal" "go.opencensus.io/tag" @@ -43,6 +46,7 @@ type worker struct { timer *time.Ticker c chan command quit, done chan bool + mu sync.RWMutex } var defaultWorker *worker @@ -64,11 +68,6 @@ func Find(name string) (v *View) { // Register begins collecting data for the given views. // Once a view is registered, it reports data to the registered exporters. func Register(views ...*View) error { - for _, v := range views { - if err := v.canonicalize(); err != nil { - return err - } - } req := ®isterViewReq{ views: views, err: make(chan error), @@ -107,7 +106,7 @@ func RetrieveData(viewName string) ([]*Row, error) { return resp.rows, resp.err } -func record(tags *tag.Map, ms interface{}, attachments map[string]string) { +func record(tags *tag.Map, ms interface{}, attachments map[string]interface{}) { req := &recordReq{ tm: tags, ms: ms.([]stats.Measurement), @@ -148,6 +147,9 @@ func newWorker() *worker { } func (w *worker) start() { + prodMgr := metricproducer.GlobalManager() + prodMgr.AddProducer(w) + for { select { case cmd := <-w.c: @@ -164,6 +166,9 @@ func (w *worker) start() { } func (w *worker) stop() { + prodMgr := metricproducer.GlobalManager() + prodMgr.DeleteProducer(w) + w.quit <- true <-w.done } @@ -181,6 +186,8 @@ func (w *worker) getMeasureRef(name string) *measureRef { } func (w *worker) tryRegisterView(v *View) (*viewInternal, error) { + w.mu.Lock() + defer w.mu.Unlock() vi, err := newViewInternal(v) if err != nil { return nil, err @@ -200,6 +207,12 @@ func (w *worker) tryRegisterView(v *View) (*viewInternal, error) { return vi, nil } +func (w *worker) unregisterView(viewName string) { + w.mu.Lock() + defer w.mu.Unlock() + delete(w.views, viewName) +} + func (w *worker) reportView(v *viewInternal, now time.Time) { if !v.isSubscribed() { return @@ -223,7 +236,46 @@ func (w *worker) reportView(v *viewInternal, now time.Time) { } func (w *worker) reportUsage(now time.Time) { + w.mu.Lock() + defer w.mu.Unlock() for _, v := range w.views { w.reportView(v, now) } } + +func (w *worker) toMetric(v *viewInternal, now time.Time) *metricdata.Metric { + if !v.isSubscribed() { + return nil + } + + _, ok := w.startTimes[v] + if !ok { + w.startTimes[v] = now + } + + var startTime time.Time + if v.metricDescriptor.Type == metricdata.TypeGaugeInt64 || + v.metricDescriptor.Type == metricdata.TypeGaugeFloat64 { + startTime = time.Time{} + } else { + startTime = w.startTimes[v] + } + + return viewToMetric(v, now, startTime) +} + +// Read reads all view data and returns them as metrics. +// It is typically invoked by metric reader to export stats in metric format. +func (w *worker) Read() []*metricdata.Metric { + w.mu.Lock() + defer w.mu.Unlock() + now := time.Now() + metrics := make([]*metricdata.Metric, 0, len(w.views)) + for _, v := range w.views { + metric := w.toMetric(v, now) + if metric != nil { + metrics = append(metrics, metric) + } + } + return metrics +} diff --git a/vendor/go.opencensus.io/stats/view/worker_commands.go b/vendor/go.opencensus.io/stats/view/worker_commands.go index b38f26f4..0267e179 100644 --- a/vendor/go.opencensus.io/stats/view/worker_commands.go +++ b/vendor/go.opencensus.io/stats/view/worker_commands.go @@ -21,8 +21,6 @@ import ( "strings" "time" - "go.opencensus.io/exemplar" - "go.opencensus.io/stats" "go.opencensus.io/stats/internal" "go.opencensus.io/tag" @@ -58,6 +56,12 @@ type registerViewReq struct { } func (cmd *registerViewReq) handleCommand(w *worker) { + for _, v := range cmd.views { + if err := v.canonicalize(); err != nil { + cmd.err <- err + return + } + } var errstr []string for _, view := range cmd.views { vi, err := w.tryRegisterView(view) @@ -99,7 +103,7 @@ func (cmd *unregisterFromViewReq) handleCommand(w *worker) { // The collected data can be cleared. vi.clearRows() } - delete(w.views, name) + w.unregisterView(name) } cmd.done <- struct{}{} } @@ -117,6 +121,8 @@ type retrieveDataResp struct { } func (cmd *retrieveDataReq) handleCommand(w *worker) { + w.mu.Lock() + defer w.mu.Unlock() vi, ok := w.views[cmd.v] if !ok { cmd.c <- &retrieveDataResp{ @@ -144,23 +150,20 @@ func (cmd *retrieveDataReq) handleCommand(w *worker) { type recordReq struct { tm *tag.Map ms []stats.Measurement - attachments map[string]string + attachments map[string]interface{} t time.Time } func (cmd *recordReq) handleCommand(w *worker) { + w.mu.Lock() + defer w.mu.Unlock() for _, m := range cmd.ms { if (m == stats.Measurement{}) { // not registered continue } ref := w.getMeasureRef(m.Measure().Name()) for v := range ref.views { - e := &exemplar.Exemplar{ - Value: m.Value(), - Timestamp: cmd.t, - Attachments: cmd.attachments, - } - v.addSample(cmd.tm, e) + v.addSample(cmd.tm, m.Value(), cmd.attachments, time.Now()) } } } diff --git a/vendor/go.opencensus.io/tag/context.go b/vendor/go.opencensus.io/tag/context.go index dcc13f49..b27d1b26 100644 --- a/vendor/go.opencensus.io/tag/context.go +++ b/vendor/go.opencensus.io/tag/context.go @@ -17,8 +17,6 @@ package tag import ( "context" - - "go.opencensus.io/exemplar" ) // FromContext returns the tag map stored in the context. @@ -43,25 +41,3 @@ func NewContext(ctx context.Context, m *Map) context.Context { type ctxKey struct{} var mapCtxKey = ctxKey{} - -func init() { - exemplar.RegisterAttachmentExtractor(extractTagsAttachments) -} - -func extractTagsAttachments(ctx context.Context, a exemplar.Attachments) exemplar.Attachments { - m := FromContext(ctx) - if m == nil { - return a - } - if len(m.m) == 0 { - return a - } - if a == nil { - a = make(map[string]string) - } - - for k, v := range m.m { - a[exemplar.KeyPrefixTag+k.Name()] = v - } - return a -} diff --git a/vendor/go.opencensus.io/tag/map.go b/vendor/go.opencensus.io/tag/map.go index 5b72ba6a..0272ef85 100644 --- a/vendor/go.opencensus.io/tag/map.go +++ b/vendor/go.opencensus.io/tag/map.go @@ -28,10 +28,15 @@ type Tag struct { Value string } +type tagContent struct { + value string + m metadatas +} + // Map is a map of tags. Use New to create a context containing // a new Map. type Map struct { - m map[Key]string + m map[Key]tagContent } // Value returns the value for the key if a value for the key exists. @@ -40,7 +45,7 @@ func (m *Map) Value(k Key) (string, bool) { return "", false } v, ok := m.m[k] - return v, ok + return v.value, ok } func (m *Map) String() string { @@ -62,21 +67,21 @@ func (m *Map) String() string { return buffer.String() } -func (m *Map) insert(k Key, v string) { +func (m *Map) insert(k Key, v string, md metadatas) { if _, ok := m.m[k]; ok { return } - m.m[k] = v + m.m[k] = tagContent{value: v, m: md} } -func (m *Map) update(k Key, v string) { +func (m *Map) update(k Key, v string, md metadatas) { if _, ok := m.m[k]; ok { - m.m[k] = v + m.m[k] = tagContent{value: v, m: md} } } -func (m *Map) upsert(k Key, v string) { - m.m[k] = v +func (m *Map) upsert(k Key, v string, md metadatas) { + m.m[k] = tagContent{value: v, m: md} } func (m *Map) delete(k Key) { @@ -84,7 +89,7 @@ func (m *Map) delete(k Key) { } func newMap() *Map { - return &Map{m: make(map[Key]string)} + return &Map{m: make(map[Key]tagContent)} } // Mutator modifies a tag map. @@ -95,13 +100,17 @@ type Mutator interface { // Insert returns a mutator that inserts a // value associated with k. If k already exists in the tag map, // mutator doesn't update the value. -func Insert(k Key, v string) Mutator { +// Metadata applies metadata to the tag. It is optional. +// Metadatas are applied in the order in which it is provided. +// If more than one metadata updates the same attribute then +// the update from the last metadata prevails. +func Insert(k Key, v string, mds ...Metadata) Mutator { return &mutator{ fn: func(m *Map) (*Map, error) { if !checkValue(v) { return nil, errInvalidValue } - m.insert(k, v) + m.insert(k, v, createMetadatas(mds...)) return m, nil }, } @@ -110,13 +119,17 @@ func Insert(k Key, v string) Mutator { // Update returns a mutator that updates the // value of the tag associated with k with v. If k doesn't // exists in the tag map, the mutator doesn't insert the value. -func Update(k Key, v string) Mutator { +// Metadata applies metadata to the tag. It is optional. +// Metadatas are applied in the order in which it is provided. +// If more than one metadata updates the same attribute then +// the update from the last metadata prevails. +func Update(k Key, v string, mds ...Metadata) Mutator { return &mutator{ fn: func(m *Map) (*Map, error) { if !checkValue(v) { return nil, errInvalidValue } - m.update(k, v) + m.update(k, v, createMetadatas(mds...)) return m, nil }, } @@ -126,18 +139,37 @@ func Update(k Key, v string) Mutator { // value of the tag associated with k with v. It inserts the // value if k doesn't exist already. It mutates the value // if k already exists. -func Upsert(k Key, v string) Mutator { +// Metadata applies metadata to the tag. It is optional. +// Metadatas are applied in the order in which it is provided. +// If more than one metadata updates the same attribute then +// the update from the last metadata prevails. +func Upsert(k Key, v string, mds ...Metadata) Mutator { return &mutator{ fn: func(m *Map) (*Map, error) { if !checkValue(v) { return nil, errInvalidValue } - m.upsert(k, v) + m.upsert(k, v, createMetadatas(mds...)) return m, nil }, } } +func createMetadatas(mds ...Metadata) metadatas { + var metas metadatas + if len(mds) > 0 { + for _, md := range mds { + if md != nil { + md(&metas) + } + } + } else { + WithTTL(TTLUnlimitedPropagation)(&metas) + } + return metas + +} + // Delete returns a mutator that deletes // the value associated with k. func Delete(k Key) Mutator { @@ -160,10 +192,10 @@ func New(ctx context.Context, mutator ...Mutator) (context.Context, error) { if !checkKeyName(k.Name()) { return ctx, fmt.Errorf("key:%q: %v", k, errInvalidKeyName) } - if !checkValue(v) { + if !checkValue(v.value) { return ctx, fmt.Errorf("key:%q value:%q: %v", k.Name(), v, errInvalidValue) } - m.insert(k, v) + m.insert(k, v.value, v.m) } } var err error diff --git a/vendor/go.opencensus.io/tag/map_codec.go b/vendor/go.opencensus.io/tag/map_codec.go index 3e998950..f8b58276 100644 --- a/vendor/go.opencensus.io/tag/map_codec.go +++ b/vendor/go.opencensus.io/tag/map_codec.go @@ -162,14 +162,19 @@ func (eg *encoderGRPC) bytes() []byte { // Encode encodes the tag map into a []byte. It is useful to propagate // the tag maps on wire in binary format. func Encode(m *Map) []byte { + if m == nil { + return nil + } eg := &encoderGRPC{ buf: make([]byte, len(m.m)), } eg.writeByte(byte(tagsVersionID)) for k, v := range m.m { - eg.writeByte(byte(keyTypeString)) - eg.writeStringWithVarintLen(k.name) - eg.writeBytesWithVarintLen([]byte(v)) + if v.m.ttl.ttl == valueTTLUnlimitedPropagation { + eg.writeByte(byte(keyTypeString)) + eg.writeStringWithVarintLen(k.name) + eg.writeBytesWithVarintLen([]byte(v.value)) + } } return eg.bytes() } @@ -187,7 +192,7 @@ func Decode(bytes []byte) (*Map, error) { // DecodeEach decodes the given serialized tag map, calling handler for each // tag key and value decoded. -func DecodeEach(bytes []byte, fn func(key Key, val string)) error { +func DecodeEach(bytes []byte, fn func(key Key, val string, md metadatas)) error { eg := &encoderGRPC{ buf: bytes, } @@ -225,7 +230,7 @@ func DecodeEach(bytes []byte, fn func(key Key, val string)) error { if !checkValue(val) { return errInvalidValue } - fn(key, val) + fn(key, val, createMetadatas(WithTTL(TTLUnlimitedPropagation))) if err != nil { return err } diff --git a/vendor/go.opencensus.io/tag/metadata.go b/vendor/go.opencensus.io/tag/metadata.go new file mode 100644 index 00000000..6571a583 --- /dev/null +++ b/vendor/go.opencensus.io/tag/metadata.go @@ -0,0 +1,52 @@ +// Copyright 2019, OpenCensus 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 tag + +const ( + // valueTTLNoPropagation prevents tag from propagating. + valueTTLNoPropagation = 0 + + // valueTTLUnlimitedPropagation allows tag to propagate without any limits on number of hops. + valueTTLUnlimitedPropagation = -1 +) + +// TTL is metadata that specifies number of hops a tag can propagate. +// Details about TTL metadata is specified at https://github.com/census-instrumentation/opencensus-specs/blob/master/tags/TagMap.md#tagmetadata +type TTL struct { + ttl int +} + +var ( + // TTLUnlimitedPropagation is TTL metadata that allows tag to propagate without any limits on number of hops. + TTLUnlimitedPropagation = TTL{ttl: valueTTLUnlimitedPropagation} + + // TTLNoPropagation is TTL metadata that prevents tag from propagating. + TTLNoPropagation = TTL{ttl: valueTTLNoPropagation} +) + +type metadatas struct { + ttl TTL +} + +// Metadata applies metadatas specified by the function. +type Metadata func(*metadatas) + +// WithTTL applies metadata with provided ttl. +func WithTTL(ttl TTL) Metadata { + return func(m *metadatas) { + m.ttl = ttl + } +} diff --git a/vendor/go.opencensus.io/tag/profile_19.go b/vendor/go.opencensus.io/tag/profile_19.go index f81cd0b4..b34d95e3 100644 --- a/vendor/go.opencensus.io/tag/profile_19.go +++ b/vendor/go.opencensus.io/tag/profile_19.go @@ -25,7 +25,7 @@ func do(ctx context.Context, f func(ctx context.Context)) { m := FromContext(ctx) keyvals := make([]string, 0, 2*len(m.m)) for k, v := range m.m { - keyvals = append(keyvals, k.Name(), v) + keyvals = append(keyvals, k.Name(), v.value) } pprof.Do(ctx, pprof.Labels(keyvals...), f) } diff --git a/vendor/go.opencensus.io/trace/basetypes.go b/vendor/go.opencensus.io/trace/basetypes.go index 01f0f908..0c54492a 100644 --- a/vendor/go.opencensus.io/trace/basetypes.go +++ b/vendor/go.opencensus.io/trace/basetypes.go @@ -59,6 +59,11 @@ func Int64Attribute(key string, value int64) Attribute { return Attribute{key: key, value: value} } +// Float64Attribute returns a float64-valued attribute. +func Float64Attribute(key string, value float64) Attribute { + return Attribute{key: key, value: value} +} + // StringAttribute returns a string-valued attribute. func StringAttribute(key string, value string) Attribute { return Attribute{key: key, value: value} @@ -71,8 +76,8 @@ type LinkType int32 // LinkType values. const ( LinkTypeUnspecified LinkType = iota // The relationship of the two spans is unknown. - LinkTypeChild // The current span is a child of the linked span. - LinkTypeParent // The current span is the parent of the linked span. + LinkTypeChild // The linked span is a child of the current span. + LinkTypeParent // The linked span is the parent of the current span. ) // Link represents a reference from one span to another span. diff --git a/vendor/go.opencensus.io/trace/config.go b/vendor/go.opencensus.io/trace/config.go index 0816892e..775f8274 100644 --- a/vendor/go.opencensus.io/trace/config.go +++ b/vendor/go.opencensus.io/trace/config.go @@ -27,10 +27,36 @@ type Config struct { // IDGenerator is for internal use only. IDGenerator internal.IDGenerator + + // MaxAnnotationEventsPerSpan is max number of annotation events per span + MaxAnnotationEventsPerSpan int + + // MaxMessageEventsPerSpan is max number of message events per span + MaxMessageEventsPerSpan int + + // MaxAnnotationEventsPerSpan is max number of attributes per span + MaxAttributesPerSpan int + + // MaxLinksPerSpan is max number of links per span + MaxLinksPerSpan int } var configWriteMu sync.Mutex +const ( + // DefaultMaxAnnotationEventsPerSpan is default max number of annotation events per span + DefaultMaxAnnotationEventsPerSpan = 32 + + // DefaultMaxMessageEventsPerSpan is default max number of message events per span + DefaultMaxMessageEventsPerSpan = 128 + + // DefaultMaxAttributesPerSpan is default max number of attributes per span + DefaultMaxAttributesPerSpan = 32 + + // DefaultMaxLinksPerSpan is default max number of links per span + DefaultMaxLinksPerSpan = 32 +) + // ApplyConfig applies changes to the global tracing configuration. // // Fields not provided in the given config are going to be preserved. @@ -44,5 +70,17 @@ func ApplyConfig(cfg Config) { if cfg.IDGenerator != nil { c.IDGenerator = cfg.IDGenerator } + if cfg.MaxAnnotationEventsPerSpan > 0 { + c.MaxAnnotationEventsPerSpan = cfg.MaxAnnotationEventsPerSpan + } + if cfg.MaxMessageEventsPerSpan > 0 { + c.MaxMessageEventsPerSpan = cfg.MaxMessageEventsPerSpan + } + if cfg.MaxAttributesPerSpan > 0 { + c.MaxAttributesPerSpan = cfg.MaxAttributesPerSpan + } + if cfg.MaxLinksPerSpan > 0 { + c.MaxLinksPerSpan = cfg.MaxLinksPerSpan + } config.Store(&c) } diff --git a/vendor/go.opencensus.io/trace/evictedqueue.go b/vendor/go.opencensus.io/trace/evictedqueue.go new file mode 100644 index 00000000..ffc264f2 --- /dev/null +++ b/vendor/go.opencensus.io/trace/evictedqueue.go @@ -0,0 +1,38 @@ +// Copyright 2019, OpenCensus 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 trace + +type evictedQueue struct { + queue []interface{} + capacity int + droppedCount int +} + +func newEvictedQueue(capacity int) *evictedQueue { + eq := &evictedQueue{ + capacity: capacity, + queue: make([]interface{}, 0), + } + + return eq +} + +func (eq *evictedQueue) add(value interface{}) { + if len(eq.queue) == eq.capacity { + eq.queue = eq.queue[1:] + eq.droppedCount++ + } + eq.queue = append(eq.queue, value) +} diff --git a/vendor/go.opencensus.io/trace/export.go b/vendor/go.opencensus.io/trace/export.go index 77a8c735..e0d9a4b9 100644 --- a/vendor/go.opencensus.io/trace/export.go +++ b/vendor/go.opencensus.io/trace/export.go @@ -85,6 +85,13 @@ type SpanData struct { Annotations []Annotation MessageEvents []MessageEvent Status - Links []Link - HasRemoteParent bool + Links []Link + HasRemoteParent bool + DroppedAttributeCount int + DroppedAnnotationCount int + DroppedMessageEventCount int + DroppedLinkCount int + + // ChildSpanCount holds the number of child span created for this span. + ChildSpanCount int } diff --git a/vendor/go.opencensus.io/trace/internal/internal.go b/vendor/go.opencensus.io/trace/internal/internal.go index 1c8b9b34..7e808d8f 100644 --- a/vendor/go.opencensus.io/trace/internal/internal.go +++ b/vendor/go.opencensus.io/trace/internal/internal.go @@ -15,6 +15,7 @@ // Package internal provides trace internals. package internal +// IDGenerator allows custom generators for TraceId and SpanId. type IDGenerator interface { NewTraceID() [16]byte NewSpanID() [8]byte diff --git a/vendor/go.opencensus.io/trace/lrumap.go b/vendor/go.opencensus.io/trace/lrumap.go new file mode 100644 index 00000000..3f80a336 --- /dev/null +++ b/vendor/go.opencensus.io/trace/lrumap.go @@ -0,0 +1,37 @@ +// Copyright 2019, OpenCensus 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 trace + +import ( + "github.com/hashicorp/golang-lru/simplelru" +) + +type lruMap struct { + simpleLruMap *simplelru.LRU + droppedCount int +} + +func newLruMap(size int) *lruMap { + lm := &lruMap{} + lm.simpleLruMap, _ = simplelru.NewLRU(size, nil) + return lm +} + +func (lm *lruMap) add(key, value interface{}) { + evicted := lm.simpleLruMap.Add(key, value) + if evicted { + lm.droppedCount++ + } +} diff --git a/vendor/go.opencensus.io/trace/trace.go b/vendor/go.opencensus.io/trace/trace.go index 9e5e5f03..38ead7bf 100644 --- a/vendor/go.opencensus.io/trace/trace.go +++ b/vendor/go.opencensus.io/trace/trace.go @@ -42,6 +42,20 @@ type Span struct { data *SpanData mu sync.Mutex // protects the contents of *data (but not the pointer value.) spanContext SpanContext + + // lruAttributes are capped at configured limit. When the capacity is reached an oldest entry + // is removed to create room for a new entry. + lruAttributes *lruMap + + // annotations are stored in FIFO queue capped by configured limit. + annotations *evictedQueue + + // messageEvents are stored in FIFO queue capped by configured limit. + messageEvents *evictedQueue + + // links are stored in FIFO queue capped by configured limit. + links *evictedQueue + // spanStore is the spanStore this span belongs to, if any, otherwise it is nil. *spanStore endOnce sync.Once @@ -156,6 +170,7 @@ func StartSpan(ctx context.Context, name string, o ...StartOption) (context.Cont var opts StartOptions var parent SpanContext if p := FromContext(ctx); p != nil { + p.addChild() parent = p.spanContext } for _, op := range o { @@ -226,6 +241,11 @@ func startSpanInternal(name string, hasParent bool, parent SpanContext, remotePa Name: name, HasRemoteParent: remoteParent, } + span.lruAttributes = newLruMap(cfg.MaxAttributesPerSpan) + span.annotations = newEvictedQueue(cfg.MaxAnnotationEventsPerSpan) + span.messageEvents = newEvictedQueue(cfg.MaxMessageEventsPerSpan) + span.links = newEvictedQueue(cfg.MaxLinksPerSpan) + if hasParent { span.data.ParentSpanID = parent.SpanID } @@ -276,11 +296,21 @@ func (s *Span) makeSpanData() *SpanData { var sd SpanData s.mu.Lock() sd = *s.data - if s.data.Attributes != nil { - sd.Attributes = make(map[string]interface{}) - for k, v := range s.data.Attributes { - sd.Attributes[k] = v - } + if s.lruAttributes.simpleLruMap.Len() > 0 { + sd.Attributes = s.lruAttributesToAttributeMap() + sd.DroppedAttributeCount = s.lruAttributes.droppedCount + } + if len(s.annotations.queue) > 0 { + sd.Annotations = s.interfaceArrayToAnnotationArray() + sd.DroppedAnnotationCount = s.annotations.droppedCount + } + if len(s.messageEvents.queue) > 0 { + sd.MessageEvents = s.interfaceArrayToMessageEventArray() + sd.DroppedMessageEventCount = s.messageEvents.droppedCount + } + if len(s.links.queue) > 0 { + sd.Links = s.interfaceArrayToLinksArray() + sd.DroppedLinkCount = s.links.droppedCount } s.mu.Unlock() return &sd @@ -314,6 +344,57 @@ func (s *Span) SetStatus(status Status) { s.mu.Unlock() } +func (s *Span) interfaceArrayToLinksArray() []Link { + linksArr := make([]Link, 0) + for _, value := range s.links.queue { + linksArr = append(linksArr, value.(Link)) + } + return linksArr +} + +func (s *Span) interfaceArrayToMessageEventArray() []MessageEvent { + messageEventArr := make([]MessageEvent, 0) + for _, value := range s.messageEvents.queue { + messageEventArr = append(messageEventArr, value.(MessageEvent)) + } + return messageEventArr +} + +func (s *Span) interfaceArrayToAnnotationArray() []Annotation { + annotationArr := make([]Annotation, 0) + for _, value := range s.annotations.queue { + annotationArr = append(annotationArr, value.(Annotation)) + } + return annotationArr +} + +func (s *Span) lruAttributesToAttributeMap() map[string]interface{} { + attributes := make(map[string]interface{}) + for _, key := range s.lruAttributes.simpleLruMap.Keys() { + value, ok := s.lruAttributes.simpleLruMap.Get(key) + if ok { + keyStr := key.(string) + attributes[keyStr] = value + } + } + return attributes +} + +func (s *Span) copyToCappedAttributes(attributes []Attribute) { + for _, a := range attributes { + s.lruAttributes.add(a.key, a.value) + } +} + +func (s *Span) addChild() { + if !s.IsRecordingEvents() { + return + } + s.mu.Lock() + s.data.ChildSpanCount++ + s.mu.Unlock() +} + // AddAttributes sets attributes in the span. // // Existing attributes whose keys appear in the attributes parameter are overwritten. @@ -322,10 +403,7 @@ func (s *Span) AddAttributes(attributes ...Attribute) { return } s.mu.Lock() - if s.data.Attributes == nil { - s.data.Attributes = make(map[string]interface{}) - } - copyAttributes(s.data.Attributes, attributes) + s.copyToCappedAttributes(attributes) s.mu.Unlock() } @@ -345,7 +423,7 @@ func (s *Span) lazyPrintfInternal(attributes []Attribute, format string, a ...in m = make(map[string]interface{}) copyAttributes(m, attributes) } - s.data.Annotations = append(s.data.Annotations, Annotation{ + s.annotations.add(Annotation{ Time: now, Message: msg, Attributes: m, @@ -361,7 +439,7 @@ func (s *Span) printStringInternal(attributes []Attribute, str string) { a = make(map[string]interface{}) copyAttributes(a, attributes) } - s.data.Annotations = append(s.data.Annotations, Annotation{ + s.annotations.add(Annotation{ Time: now, Message: str, Attributes: a, @@ -398,7 +476,7 @@ func (s *Span) AddMessageSendEvent(messageID, uncompressedByteSize, compressedBy } now := time.Now() s.mu.Lock() - s.data.MessageEvents = append(s.data.MessageEvents, MessageEvent{ + s.messageEvents.add(MessageEvent{ Time: now, EventType: MessageEventTypeSent, MessageID: messageID, @@ -420,7 +498,7 @@ func (s *Span) AddMessageReceiveEvent(messageID, uncompressedByteSize, compresse } now := time.Now() s.mu.Lock() - s.data.MessageEvents = append(s.data.MessageEvents, MessageEvent{ + s.messageEvents.add(MessageEvent{ Time: now, EventType: MessageEventTypeRecv, MessageID: messageID, @@ -436,7 +514,7 @@ func (s *Span) AddLink(l Link) { return } s.mu.Lock() - s.data.Links = append(s.data.Links, l) + s.links.add(l) s.mu.Unlock() } @@ -468,8 +546,12 @@ func init() { gen.spanIDInc |= 1 config.Store(&Config{ - DefaultSampler: ProbabilitySampler(defaultSamplingProbability), - IDGenerator: gen, + DefaultSampler: ProbabilitySampler(defaultSamplingProbability), + IDGenerator: gen, + MaxAttributesPerSpan: DefaultMaxAttributesPerSpan, + MaxAnnotationEventsPerSpan: DefaultMaxAnnotationEventsPerSpan, + MaxMessageEventsPerSpan: DefaultMaxMessageEventsPerSpan, + MaxLinksPerSpan: DefaultMaxLinksPerSpan, }) } diff --git a/vendor/golang.org/x/oauth2/google/google.go b/vendor/golang.org/x/oauth2/google/google.go index 4b0b5472..df8e87d7 100644 --- a/vendor/golang.org/x/oauth2/google/google.go +++ b/vendor/golang.org/x/oauth2/google/google.go @@ -20,12 +20,12 @@ import ( // Endpoint is Google's OAuth 2.0 endpoint. var Endpoint = oauth2.Endpoint{ AuthURL: "https://accounts.google.com/o/oauth2/auth", - TokenURL: "https://accounts.google.com/o/oauth2/token", + TokenURL: "https://oauth2.googleapis.com/token", AuthStyle: oauth2.AuthStyleInParams, } // JWTTokenURL is Google's OAuth 2.0 token URL to use with the JWT flow. -const JWTTokenURL = "https://accounts.google.com/o/oauth2/token" +const JWTTokenURL = "https://oauth2.googleapis.com/token" // ConfigFromJSON uses a Google Developers Console client_credentials.json // file to construct a config. diff --git a/vendor/golang.org/x/oauth2/internal/token.go b/vendor/golang.org/x/oauth2/internal/token.go index 955d5a02..83f7847e 100644 --- a/vendor/golang.org/x/oauth2/internal/token.go +++ b/vendor/golang.org/x/oauth2/internal/token.go @@ -11,6 +11,7 @@ import ( "fmt" "io" "io/ioutil" + "math" "mime" "net/http" "net/url" @@ -90,6 +91,9 @@ func (e *expirationTime) UnmarshalJSON(b []byte) error { if err != nil { return err } + if i > math.MaxInt32 { + i = math.MaxInt32 + } *e = expirationTime(i) return nil } diff --git a/vendor/google.golang.org/api/appengine/v1/appengine-api.json b/vendor/google.golang.org/api/appengine/v1/appengine-api.json index e2ba353c..51092f74 100644 --- a/vendor/google.golang.org/api/appengine/v1/appengine-api.json +++ b/vendor/google.golang.org/api/appengine/v1/appengine-api.json @@ -188,7 +188,7 @@ ] }, "repair": { - "description": "Recreates the required App Engine features for the specified App Engine application, for example a Cloud Storage bucket or App Engine service account. Use this method if you receive an error message about a missing feature, for example, Error retrieving the App Engine service account.", + "description": "Recreates the required App Engine features for the specified App Engine application, for example a Cloud Storage bucket or App Engine service account. Use this method if you receive an error message about a missing feature, for example, Error retrieving the App Engine service account. If you have deleted your App Engine service account, this will not be able to recreate it. Instead, you should attempt to use the IAM undelete API if possible at https://cloud.google.com/iam/reference/rest/v1/projects.serviceAccounts/undelete?apix_params=%7B\"name\"%3A\"projects%2F-%2FserviceAccounts%2Funique_id\"%2C\"resource\"%3A%7B%7D%7D . If the deletion was recent, the numeric ID can be found in the Cloud Console Activity Log.", "flatPath": "v1/apps/{appsId}:repair", "httpMethod": "POST", "id": "appengine.apps.repair", @@ -1572,7 +1572,7 @@ } } }, - "revision": "20181218", + "revision": "20190411", "rootUrl": "https://appengine.googleapis.com/", "schemas": { "ApiConfigHandler": { @@ -2173,6 +2173,10 @@ "splitHealthChecks": { "description": "Boolean value indicating if split health checks should be used instead of the legacy health checks. At an app.yaml level, this means defaulting to 'readiness_check' and 'liveness_check' values instead of 'health_check' ones. Once the legacy 'health_check' behavior is deprecated, and this value is always true, this setting can be removed.", "type": "boolean" + }, + "useContainerOptimizedOs": { + "description": "If true, use Container-Optimized OS (https://cloud.google.com/container-optimized-os/) base image for VMs, rather than a base Debian image.", + "type": "boolean" } }, "type": "object" @@ -2711,6 +2715,10 @@ "description": "Google Compute Engine network where the virtual machines are created. Specify the short name, not the resource path.Defaults to default.", "type": "string" }, + "sessionAffinity": { + "description": "Enable session affinity. Only applicable in the App Engine flexible environment.", + "type": "boolean" + }, "subnetworkName": { "description": "Google Cloud Platform sub-network where the virtual machines are created. Specify the short name, not the resource path.If a subnetwork name is specified, a network name will also be required unless it is for the default network.\nIf the network that the instance is being created in is a Legacy network, then the IP address is allocated from the IPv4Range.\nIf the network that the instance is being created in is an auto Subnet Mode Network, then only network name should be specified (not the subnetwork_name) and the IP address is created from the IPCidrRange of the subnetwork that exists in that zone for that network.\nIf the network that the instance is being created in is a custom Subnet Mode Network, then the subnetwork_name must be specified and the IP address is created from the IPCidrRange of the subnetwork.If specified, the subnetwork must exist in the same region as the App Engine flexible environment application.", "type": "string" @@ -2780,39 +2788,6 @@ }, "type": "object" }, - "OperationMetadata": { - "description": "Metadata for the given google.longrunning.Operation.", - "id": "OperationMetadata", - "properties": { - "endTime": { - "description": "Timestamp that this operation completed.@OutputOnly", - "format": "google-datetime", - "type": "string" - }, - "insertTime": { - "description": "Timestamp that this operation was created.@OutputOnly", - "format": "google-datetime", - "type": "string" - }, - "method": { - "description": "API method that initiated this operation. Example: google.appengine.v1beta4.Version.CreateVersion.@OutputOnly", - "type": "string" - }, - "operationType": { - "description": "Type of this operation. Deprecated, use method field instead. Example: \"create_version\".@OutputOnly", - "type": "string" - }, - "target": { - "description": "Name of the resource that this operation is acting on. Example: apps/myapp/modules/default.@OutputOnly", - "type": "string" - }, - "user": { - "description": "User who requested this operation.@OutputOnly", - "type": "string" - } - }, - "type": "object" - }, "OperationMetadataV1": { "description": "Metadata for the given google.longrunning.Operation.", "id": "OperationMetadataV1", @@ -2942,35 +2917,6 @@ }, "type": "object" }, - "OperationMetadataV1Beta5": { - "description": "Metadata for the given google.longrunning.Operation.", - "id": "OperationMetadataV1Beta5", - "properties": { - "endTime": { - "description": "Timestamp that this operation completed.@OutputOnly", - "format": "google-datetime", - "type": "string" - }, - "insertTime": { - "description": "Timestamp that this operation was created.@OutputOnly", - "format": "google-datetime", - "type": "string" - }, - "method": { - "description": "API method name that initiated this operation. Example: google.appengine.v1beta5.Version.CreateVersion.@OutputOnly", - "type": "string" - }, - "target": { - "description": "Name of the resource that this operation is acting on. Example: apps/myapp/services/default.@OutputOnly", - "type": "string" - }, - "user": { - "description": "User who requested this operation.@OutputOnly", - "type": "string" - } - }, - "type": "object" - }, "ReadinessCheck": { "description": "Readiness checking configuration for VM instances. Unhealthy instances are removed from traffic rotation.", "id": "ReadinessCheck", @@ -3582,8 +3528,12 @@ "description": "Whether to deploy this version in a container on a virtual machine.", "type": "boolean" }, + "vpcAccessConnector": { + "$ref": "VpcAccessConnector", + "description": "Enables VPC connectivity for standard apps." + }, "zones": { - "description": "The Google Compute Engine zones that are supported by this version in the App Engine flexible environment.", + "description": "The Google Compute Engine zones that are supported by this version in the App Engine flexible environment. Deprecated.", "items": { "type": "string" }, @@ -3612,6 +3562,17 @@ }, "type": "object" }, + "VpcAccessConnector": { + "description": "VPC access connector specification.", + "id": "VpcAccessConnector", + "properties": { + "name": { + "description": "Full Serverless VPC Access Connector name e.g. /projects/my-project/locations/us-central1/connectors/c1.", + "type": "string" + } + }, + "type": "object" + }, "ZipInfo": { "description": "The zip file information for a zip deployment.", "id": "ZipInfo", diff --git a/vendor/google.golang.org/api/appengine/v1/appengine-gen.go b/vendor/google.golang.org/api/appengine/v1/appengine-gen.go index 9244d8bb..6f312ae1 100644 --- a/vendor/google.golang.org/api/appengine/v1/appengine-gen.go +++ b/vendor/google.golang.org/api/appengine/v1/appengine-gen.go @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. All rights reserved. +// Copyright 2019 Google LLC. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. @@ -6,13 +6,39 @@ // Package appengine provides access to the App Engine Admin API. // -// See https://cloud.google.com/appengine/docs/admin-api/ +// For product documentation, see: https://cloud.google.com/appengine/docs/admin-api/ +// +// Creating a client // // Usage example: // // import "google.golang.org/api/appengine/v1" // ... -// appengineService, err := appengine.New(oauthHttpClient) +// ctx := context.Background() +// appengineService, err := appengine.NewService(ctx) +// +// In this example, Google Application Default Credentials are used for authentication. +// +// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// +// Other authentication options +// +// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// +// appengineService, err := appengine.NewService(ctx, option.WithScopes(appengine.CloudPlatformReadOnlyScope)) +// +// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// +// appengineService, err := appengine.NewService(ctx, option.WithAPIKey("AIza...")) +// +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// +// config := &oauth2.Config{...} +// // ... +// token, err := config.Exchange(ctx, ...) +// appengineService, err := appengine.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) +// +// See https://godoc.org/google.golang.org/api/option/ for details on options. package appengine // import "google.golang.org/api/appengine/v1" import ( @@ -29,6 +55,8 @@ import ( gensupport "google.golang.org/api/gensupport" googleapi "google.golang.org/api/googleapi" + option "google.golang.org/api/option" + htransport "google.golang.org/api/transport/http" ) // Always reference these packages, just in case the auto-generated code @@ -62,6 +90,34 @@ const ( CloudPlatformReadOnlyScope = "https://www.googleapis.com/auth/cloud-platform.read-only" ) +// NewService creates a new APIService. +func NewService(ctx context.Context, opts ...option.ClientOption) (*APIService, error) { + scopesOption := option.WithScopes( + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + ) + // NOTE: prepend, so we don't override user-specified scopes. + opts = append([]option.ClientOption{scopesOption}, opts...) + client, endpoint, err := htransport.NewClient(ctx, opts...) + if err != nil { + return nil, err + } + s, err := New(client) + if err != nil { + return nil, err + } + if endpoint != "" { + s.BasePath = endpoint + } + return s, nil +} + +// New creates a new APIService. It uses the provided http.Client for requests. +// +// Deprecated: please use NewService instead. +// To provide a custom HTTP client, use option.WithHTTPClient. +// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. func New(client *http.Client) (*APIService, error) { if client == nil { return nil, errors.New("client is nil") @@ -1304,6 +1360,11 @@ type FeatureSettings struct { // always true, this setting can be removed. SplitHealthChecks bool `json:"splitHealthChecks,omitempty"` + // UseContainerOptimizedOs: If true, use Container-Optimized OS + // (https://cloud.google.com/container-optimized-os/) base image for + // VMs, rather than a base Debian image. + UseContainerOptimizedOs bool `json:"useContainerOptimizedOs,omitempty"` + // ForceSendFields is a list of field names (e.g. "SplitHealthChecks") // to unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, @@ -2252,6 +2313,10 @@ type Network struct { // default. Name string `json:"name,omitempty"` + // SessionAffinity: Enable session affinity. Only applicable in the App + // Engine flexible environment. + SessionAffinity bool `json:"sessionAffinity,omitempty"` + // SubnetworkName: Google Cloud Platform sub-network where the virtual // machines are created. Specify the short name, not the resource // path.If a subnetwork name is specified, a network name will also be @@ -2395,53 +2460,6 @@ func (s *Operation) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// OperationMetadata: Metadata for the given -// google.longrunning.Operation. -type OperationMetadata struct { - // EndTime: Timestamp that this operation completed.@OutputOnly - EndTime string `json:"endTime,omitempty"` - - // InsertTime: Timestamp that this operation was created.@OutputOnly - InsertTime string `json:"insertTime,omitempty"` - - // Method: API method that initiated this operation. Example: - // google.appengine.v1beta4.Version.CreateVersion.@OutputOnly - Method string `json:"method,omitempty"` - - // OperationType: Type of this operation. Deprecated, use method field - // instead. Example: "create_version".@OutputOnly - OperationType string `json:"operationType,omitempty"` - - // Target: Name of the resource that this operation is acting on. - // Example: apps/myapp/modules/default.@OutputOnly - Target string `json:"target,omitempty"` - - // User: User who requested this operation.@OutputOnly - User string `json:"user,omitempty"` - - // ForceSendFields is a list of field names (e.g. "EndTime") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "EndTime") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *OperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod OperationMetadata - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // OperationMetadataV1: Metadata for the given // google.longrunning.Operation. type OperationMetadataV1 struct { @@ -2607,49 +2625,6 @@ func (s *OperationMetadataV1Beta) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// OperationMetadataV1Beta5: Metadata for the given -// google.longrunning.Operation. -type OperationMetadataV1Beta5 struct { - // EndTime: Timestamp that this operation completed.@OutputOnly - EndTime string `json:"endTime,omitempty"` - - // InsertTime: Timestamp that this operation was created.@OutputOnly - InsertTime string `json:"insertTime,omitempty"` - - // Method: API method name that initiated this operation. Example: - // google.appengine.v1beta5.Version.CreateVersion.@OutputOnly - Method string `json:"method,omitempty"` - - // Target: Name of the resource that this operation is acting on. - // Example: apps/myapp/services/default.@OutputOnly - Target string `json:"target,omitempty"` - - // User: User who requested this operation.@OutputOnly - User string `json:"user,omitempty"` - - // ForceSendFields is a list of field names (e.g. "EndTime") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "EndTime") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *OperationMetadataV1Beta5) MarshalJSON() ([]byte, error) { - type NoMethod OperationMetadataV1Beta5 - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // ReadinessCheck: Readiness checking configuration for VM instances. // Unhealthy instances are removed from traffic rotation. type ReadinessCheck struct { @@ -3562,8 +3537,11 @@ type Version struct { // machine. Vm bool `json:"vm,omitempty"` + // VpcAccessConnector: Enables VPC connectivity for standard apps. + VpcAccessConnector *VpcAccessConnector `json:"vpcAccessConnector,omitempty"` + // Zones: The Google Compute Engine zones that are supported by this - // version in the App Engine flexible environment. + // version in the App Engine flexible environment. Deprecated. Zones []string `json:"zones,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -3642,6 +3620,35 @@ func (s *Volume) UnmarshalJSON(data []byte) error { return nil } +// VpcAccessConnector: VPC access connector specification. +type VpcAccessConnector struct { + // Name: Full Serverless VPC Access Connector name e.g. + // /projects/my-project/locations/us-central1/connectors/c1. + Name string `json:"name,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Name") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Name") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *VpcAccessConnector) MarshalJSON() ([]byte, error) { + type NoMethod VpcAccessConnector + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ZipInfo: The zip file information for a zip deployment. type ZipInfo struct { // FilesCount: An estimate of the number of files in a zip for a zip @@ -4124,7 +4131,11 @@ type AppsRepairCall struct { // App Engine application, for example a Cloud Storage bucket or App // Engine service account. Use this method if you receive an error // message about a missing feature, for example, Error retrieving the -// App Engine service account. +// App Engine service account. If you have deleted your App Engine +// service account, this will not be able to recreate it. Instead, you +// should attempt to use the IAM undelete API if possible at +// https://cloud.google.com/iam/reference/rest/v1/projects.serviceAccounts/undelete?apix_params=%7B"name"%3A"projects%2F-%2FserviceAccounts%2Funique_id"%2C"resource"%3A%7B%7D%7D . If the deletion was recent, the numeric ID can be found in the Cloud Console Activity +// Log. func (r *AppsService) Repair(appsId string, repairapplicationrequest *RepairApplicationRequest) *AppsRepairCall { c := &AppsRepairCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.appsId = appsId @@ -4222,7 +4233,7 @@ func (c *AppsRepairCall) Do(opts ...googleapi.CallOption) (*Operation, error) { } return ret, nil // { - // "description": "Recreates the required App Engine features for the specified App Engine application, for example a Cloud Storage bucket or App Engine service account. Use this method if you receive an error message about a missing feature, for example, Error retrieving the App Engine service account.", + // "description": "Recreates the required App Engine features for the specified App Engine application, for example a Cloud Storage bucket or App Engine service account. Use this method if you receive an error message about a missing feature, for example, Error retrieving the App Engine service account. If you have deleted your App Engine service account, this will not be able to recreate it. Instead, you should attempt to use the IAM undelete API if possible at https://cloud.google.com/iam/reference/rest/v1/projects.serviceAccounts/undelete?apix_params=%7B\"name\"%3A\"projects%2F-%2FserviceAccounts%2Funique_id\"%2C\"resource\"%3A%7B%7D%7D . If the deletion was recent, the numeric ID can be found in the Cloud Console Activity Log.", // "flatPath": "v1/apps/{appsId}:repair", // "httpMethod": "POST", // "id": "appengine.apps.repair", diff --git a/vendor/google.golang.org/api/bigquery/v2/bigquery-api.json b/vendor/google.golang.org/api/bigquery/v2/bigquery-api.json index 0b991b83..13f363a3 100644 --- a/vendor/google.golang.org/api/bigquery/v2/bigquery-api.json +++ b/vendor/google.golang.org/api/bigquery/v2/bigquery-api.json @@ -32,7 +32,7 @@ "description": "A data platform for customers to create, manage, share and query data.", "discoveryVersion": "v1", "documentationLink": "https://cloud.google.com/bigquery/", - "etag": "\"J3WqvAcMk4eQjJXvfSI4Yr8VouA/eFeCSA4VWy7K7nrpB2R4OL12KqY\"", + "etag": "\"VPK3KBfpaEgZ16pozGOoMYfKc0U/a2nlJZeJWR_msdw4HiE_dxM8apw\"", "icons": { "x16": "https://www.google.com/images/icons/product/search-16.gif", "x32": "https://www.google.com/images/icons/product/search-32.gif" @@ -998,7 +998,7 @@ } } }, - "revision": "20181216", + "revision": "20190308", "rootUrl": "https://www.googleapis.com/", "schemas": { "BigQueryModelTraining": { @@ -1097,6 +1097,98 @@ }, "type": "object" }, + "BqmlIterationResult": { + "id": "BqmlIterationResult", + "properties": { + "durationMs": { + "description": "[Output-only, Beta] Time taken to run the training iteration in milliseconds.", + "format": "int64", + "type": "string" + }, + "evalLoss": { + "description": "[Output-only, Beta] Eval loss computed on the eval data at the end of the iteration. The eval loss is used for early stopping to avoid overfitting. No eval loss if eval_split_method option is specified as no_split or auto_split with input data size less than 500 rows.", + "format": "double", + "type": "number" + }, + "index": { + "description": "[Output-only, Beta] Index of the ML training iteration, starting from zero for each training run.", + "format": "int32", + "type": "integer" + }, + "learnRate": { + "description": "[Output-only, Beta] Learning rate used for this iteration, it varies for different training iterations if learn_rate_strategy option is not constant.", + "format": "double", + "type": "number" + }, + "trainingLoss": { + "description": "[Output-only, Beta] Training loss computed on the training data at the end of the iteration. The training loss function is defined by model type.", + "format": "double", + "type": "number" + } + }, + "type": "object" + }, + "BqmlTrainingRun": { + "id": "BqmlTrainingRun", + "properties": { + "iterationResults": { + "description": "[Output-only, Beta] List of each iteration results.", + "items": { + "$ref": "BqmlIterationResult" + }, + "type": "array" + }, + "startTime": { + "description": "[Output-only, Beta] Training run start time in milliseconds since the epoch.", + "format": "date-time", + "type": "string" + }, + "state": { + "description": "[Output-only, Beta] Different state applicable for a training run. IN PROGRESS: Training run is in progress. FAILED: Training run ended due to a non-retryable failure. SUCCEEDED: Training run successfully completed. CANCELLED: Training run cancelled by the user.", + "type": "string" + }, + "trainingOptions": { + "description": "[Output-only, Beta] Training options used by this training run. These options are mutable for subsequent training runs. Default values are explicitly stored for options not specified in the input query of the first training run. For subsequent training runs, any option not explicitly specified in the input query will be copied from the previous training run.", + "properties": { + "earlyStop": { + "type": "boolean" + }, + "l1Reg": { + "format": "double", + "type": "number" + }, + "l2Reg": { + "format": "double", + "type": "number" + }, + "learnRate": { + "format": "double", + "type": "number" + }, + "learnRateStrategy": { + "type": "string" + }, + "lineSearchInitLearnRate": { + "format": "double", + "type": "number" + }, + "maxIteration": { + "format": "int64", + "type": "string" + }, + "minRelProgress": { + "format": "double", + "type": "number" + }, + "warmStart": { + "type": "boolean" + } + }, + "type": "object" + } + }, + "type": "object" + }, "Clustering": { "id": "Clustering", "properties": { @@ -1151,23 +1243,27 @@ "items": { "properties": { "domain": { - "description": "[Pick one] A domain to grant access to. Any users signed in with the domain specified will be granted the specified access. Example: \"example.com\".", + "description": "[Pick one] A domain to grant access to. Any users signed in with the domain specified will be granted the specified access. Example: \"example.com\". Maps to IAM policy member \"domain:DOMAIN\".", "type": "string" }, "groupByEmail": { - "description": "[Pick one] An email address of a Google Group to grant access to.", + "description": "[Pick one] An email address of a Google Group to grant access to. Maps to IAM policy member \"group:GROUP\".", + "type": "string" + }, + "iamMember": { + "description": "[Pick one] Some other type of member that appears in the IAM Policy but isn't a user, group, domain, or special group.", "type": "string" }, "role": { - "description": "[Required] Describes the rights granted to the user specified by the other member of the access object. The following string values are supported: READER, WRITER, OWNER.", + "description": "[Required] An IAM role ID that should be granted to the user, group, or domain specified in this access entry. The following legacy mappings will be applied: OWNER roles/bigquery.dataOwner WRITER roles/bigquery.dataEditor READER roles/bigquery.dataViewer This field will accept any of the above formats, but will return only the legacy format. For example, if you set this field to \"roles/bigquery.dataOwner\", it will be returned back as \"OWNER\".", "type": "string" }, "specialGroup": { - "description": "[Pick one] A special group to grant access to. Possible values include: projectOwners: Owners of the enclosing project. projectReaders: Readers of the enclosing project. projectWriters: Writers of the enclosing project. allAuthenticatedUsers: All authenticated BigQuery users.", + "description": "[Pick one] A special group to grant access to. Possible values include: projectOwners: Owners of the enclosing project. projectReaders: Readers of the enclosing project. projectWriters: Writers of the enclosing project. allAuthenticatedUsers: All authenticated BigQuery users. Maps to similarly-named IAM members.", "type": "string" }, "userByEmail": { - "description": "[Pick one] An email address of a user to grant access to. For example: fred@example.com.", + "description": "[Pick one] An email address of a user to grant access to. For example: fred@example.com. Maps to IAM policy member \"user:EMAIL\" or \"serviceAccount:EMAIL\".", "type": "string" }, "view": { @@ -1332,6 +1428,13 @@ "friendlyName": { "description": "[Optional] The friendly name for the destination table. This will only be used if the destination table is newly created. If the table already exists and a value different than the current friendly name is provided, the job will fail.", "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "[Optional] The labels associated with this table. You can use these to organize and group your tables. This will only be used if the destination table is newly created. If the table already exists and labels are different than the current labels are provided, the job will fail.", + "type": "object" } }, "type": "object" @@ -1562,6 +1665,10 @@ "$ref": "GoogleSheetsOptions", "description": "[Optional] Additional options if sourceFormat is set to GOOGLE_SHEETS." }, + "hivePartitioningMode": { + "description": "[Optional, Experimental] If hive partitioning is enabled, which mode to use. Two modes are supported: - AUTO: automatically infer partition key name(s) and type(s). - STRINGS: automatic infer partition key name(s). All types are strings. Not all storage formats support hive partitioning -- requesting hive partitioning on an unsupported format will lead to an error.", + "type": "string" + }, "ignoreUnknownValues": { "description": "[Optional] Indicates if BigQuery should allow extra values that are not represented in the table schema. If true, the extra values are ignored. If false, records with extra columns are treated as bad records, and if there are too many bad records, an invalid error is returned in the job result. The default value is false. The sourceFormat property determines what BigQuery treats as an extra value: CSV: Trailing columns JSON: Named values that don't match any column names Google Cloud Bigtable: This setting is ignored. Google Cloud Datastore backups: This setting is ignored. Avro: This setting is ignored.", "type": "boolean" @@ -1683,37 +1790,6 @@ }, "type": "object" }, - "IterationResult": { - "id": "IterationResult", - "properties": { - "durationMs": { - "description": "[Output-only, Beta] Time taken to run the training iteration in milliseconds.", - "format": "int64", - "type": "string" - }, - "evalLoss": { - "description": "[Output-only, Beta] Eval loss computed on the eval data at the end of the iteration. The eval loss is used for early stopping to avoid overfitting. No eval loss if eval_split_method option is specified as no_split or auto_split with input data size less than 500 rows.", - "format": "double", - "type": "number" - }, - "index": { - "description": "[Output-only, Beta] Index of the ML training iteration, starting from zero for each training run.", - "format": "int32", - "type": "integer" - }, - "learnRate": { - "description": "[Output-only, Beta] Learning rate used for this iteration, it varies for different training iterations if learn_rate_strategy option is not constant.", - "format": "double", - "type": "number" - }, - "trainingLoss": { - "description": "[Output-only, Beta] Training loss computed on the training data at the end of the iteration. The training loss function is defined by model type.", - "format": "double", - "type": "number" - } - }, - "type": "object" - }, "Job": { "id": "Job", "properties": { @@ -1895,6 +1971,10 @@ "description": "[Optional] The separator for fields in a CSV file. The separator can be any ISO-8859-1 single-byte character. To use a character in the range 128-255, you must encode the character as UTF8. BigQuery converts the string to ISO-8859-1 encoding, and then uses the first byte of the encoded string to split the data in its raw, binary state. BigQuery also supports the escape sequence \"\\t\" to specify a tab separator. The default value is a comma (',').", "type": "string" }, + "hivePartitioningMode": { + "description": "[Optional, Experimental] If hive partitioning is enabled, which mode to use. Two modes are supported: - AUTO: automatically infer partition key name(s) and type(s). - STRINGS: automatic infer partition key name(s). All types are strings. Not all storage formats support hive partitioning -- requesting hive partitioning on an unsupported format will lead to an error.", + "type": "string" + }, "ignoreUnknownValues": { "description": "[Optional] Indicates if BigQuery should allow extra values that are not represented in the table schema. If true, the extra values are ignored. If false, records with extra columns are treated as bad records, and if there are too many bad records, an invalid error is returned in the job result. The default value is false. The sourceFormat property determines what BigQuery treats as an extra value: CSV: Trailing columns JSON: Named values that don't match any column names", "type": "boolean" @@ -2240,6 +2320,15 @@ "$ref": "JobStatistics3", "description": "[Output-only] Statistics for a load job." }, + "numChildJobs": { + "description": "[Output-only] Number of child jobs executed.", + "format": "int64", + "type": "string" + }, + "parentJobId": { + "description": "[Output-only] If this is a child job, the id of the parent.", + "type": "string" + }, "query": { "$ref": "JobStatistics2", "description": "[Output-only] Statistics for a query job." @@ -2303,6 +2392,10 @@ "description": "The DDL operation performed, possibly dependent on the pre-existence of the DDL target. Possible values (new values might be added in the future): \"CREATE\": The query created the DDL target. \"SKIP\": No-op. Example cases: the query is CREATE TABLE IF NOT EXISTS while the table already exists, or the query is DROP TABLE IF EXISTS while the table does not exist. \"REPLACE\": The query replaced the DDL target. Example case: the query is CREATE OR REPLACE TABLE, and the table already exists. \"DROP\": The query deleted the DDL target.", "type": "string" }, + "ddlTargetRoutine": { + "$ref": "RoutineReference", + "description": "The DDL target routine. Present only for CREATE/DROP FUNCTION/PROCEDURE queries." + }, "ddlTargetTable": { "$ref": "TableReference", "description": "The DDL target table. Present only for CREATE/DROP TABLE/VIEW queries." @@ -2368,7 +2461,7 @@ "description": "[Output-only] The schema of the results. Present only for successful dry run of non-legacy SQL queries." }, "statementType": { - "description": "The type of query statement, if valid. Possible values (new values might be added in the future): \"SELECT\": SELECT query. \"INSERT\": INSERT query; see https://cloud.google.com/bigquery/docs/reference/standard-sql/data-manipulation-language. \"UPDATE\": UPDATE query; see https://cloud.google.com/bigquery/docs/reference/standard-sql/data-manipulation-language. \"DELETE\": DELETE query; see https://cloud.google.com/bigquery/docs/reference/standard-sql/data-manipulation-language. \"MERGE\": MERGE query; see https://cloud.google.com/bigquery/docs/reference/standard-sql/data-manipulation-language. \"CREATE_TABLE\": CREATE [OR REPLACE] TABLE without AS SELECT. \"CREATE_TABLE_AS_SELECT\": CREATE [OR REPLACE] TABLE ... AS SELECT ... . \"DROP_TABLE\": DROP TABLE query. \"CREATE_VIEW\": CREATE [OR REPLACE] VIEW ... AS SELECT ... . \"DROP_VIEW\": DROP VIEW query. \"ALTER_TABLE\": ALTER TABLE query. \"ALTER_VIEW\": ALTER VIEW query.", + "description": "The type of query statement, if valid. Possible values (new values might be added in the future): \"SELECT\": SELECT query. \"INSERT\": INSERT query; see https://cloud.google.com/bigquery/docs/reference/standard-sql/data-manipulation-language. \"UPDATE\": UPDATE query; see https://cloud.google.com/bigquery/docs/reference/standard-sql/data-manipulation-language. \"DELETE\": DELETE query; see https://cloud.google.com/bigquery/docs/reference/standard-sql/data-manipulation-language. \"MERGE\": MERGE query; see https://cloud.google.com/bigquery/docs/reference/standard-sql/data-manipulation-language. \"CREATE_TABLE\": CREATE [OR REPLACE] TABLE without AS SELECT. \"CREATE_TABLE_AS_SELECT\": CREATE [OR REPLACE] TABLE ... AS SELECT ... . \"DROP_TABLE\": DROP TABLE query. \"CREATE_VIEW\": CREATE [OR REPLACE] VIEW ... AS SELECT ... . \"DROP_VIEW\": DROP VIEW query. \"CREATE_FUNCTION\": CREATE FUNCTION query. \"DROP_FUNCTION\" : DROP FUNCTION query. \"ALTER_TABLE\": ALTER TABLE query. \"ALTER_VIEW\": ALTER VIEW query.", "type": "string" }, "timeline": { @@ -2389,7 +2482,7 @@ "type": "string" }, "totalBytesProcessedAccuracy": { - "description": "[Output-only] For dry-run jobs, totalBytesProcessed is an estimate and this field specifies the accuracy of the estimate. Possible values can be: UNKNOWN: accuracy of the estimate is unknown. PRECISE: estimate is precise. LOWER_BOUND: estimate is lower bound of what the query would cost. UPPER_BOUND: estiamte is upper bound of what the query would cost.", + "description": "[Output-only] For dry-run jobs, totalBytesProcessed is an estimate and this field specifies the accuracy of the estimate. Possible values can be: UNKNOWN: accuracy of the estimate is unknown. PRECISE: estimate is precise. LOWER_BOUND: estimate is lower bound of what the query would cost. UPPER_BOUND: estimate is upper bound of what the query would cost.", "type": "string" }, "totalPartitionsProcessed": { @@ -2453,6 +2546,11 @@ "type": "string" }, "type": "array" + }, + "inputBytes": { + "description": "[Output-only] Number of user bytes extracted into the result. This is the byte count as computed by BigQuery for billing purposes.", + "format": "int64", + "type": "string" } }, "type": "object" @@ -2529,7 +2627,7 @@ "trainingRuns": { "description": "[Output-only, Beta] Information about ml training runs, each training run comprises of multiple iterations and there may be multiple training runs for the model if warm start is used or if a user decides to continue a previously cancelled query.", "items": { - "$ref": "TrainingRun" + "$ref": "BqmlTrainingRun" }, "type": "array" } @@ -2867,6 +2965,24 @@ }, "type": "object" }, + "RoutineReference": { + "id": "RoutineReference", + "properties": { + "datasetId": { + "description": "[Required] The ID of the dataset containing this routine.", + "type": "string" + }, + "projectId": { + "description": "[Required] The ID of the project containing this routine.", + "type": "string" + }, + "routineId": { + "description": "[Required] The ID of the routine. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 256 characters.", + "type": "string" + } + }, + "type": "object" + }, "Streamingbuffer": { "id": "Streamingbuffer", "properties": { @@ -3133,6 +3249,19 @@ "TableFieldSchema": { "id": "TableFieldSchema", "properties": { + "categories": { + "description": "[Optional] The categories attached to this field, used for field-level access control.", + "properties": { + "names": { + "description": "A list of category resource names. For example, \"projects/1/taxonomies/2/categories/3\". At most 5 categories are allowed.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "description": { "description": "[Optional] The field description. The maximum length is 1,024 characters.", "type": "string" @@ -3320,8 +3449,6 @@ "type": "string" }, "requirePartitionFilter": { - "default": "false", - "description": "[Beta] [Optional] If set to true, queries over this table require a partition filter that can be used for partition elimination to be specified.", "type": "boolean" }, "type": { @@ -3331,67 +3458,6 @@ }, "type": "object" }, - "TrainingRun": { - "id": "TrainingRun", - "properties": { - "iterationResults": { - "description": "[Output-only, Beta] List of each iteration results.", - "items": { - "$ref": "IterationResult" - }, - "type": "array" - }, - "startTime": { - "description": "[Output-only, Beta] Training run start time in milliseconds since the epoch.", - "format": "date-time", - "type": "string" - }, - "state": { - "description": "[Output-only, Beta] Different state applicable for a training run. IN PROGRESS: Training run is in progress. FAILED: Training run ended due to a non-retryable failure. SUCCEEDED: Training run successfully completed. CANCELLED: Training run cancelled by the user.", - "type": "string" - }, - "trainingOptions": { - "description": "[Output-only, Beta] Training options used by this training run. These options are mutable for subsequent training runs. Default values are explicitly stored for options not specified in the input query of the first training run. For subsequent training runs, any option not explicitly specified in the input query will be copied from the previous training run.", - "properties": { - "earlyStop": { - "type": "boolean" - }, - "l1Reg": { - "format": "double", - "type": "number" - }, - "l2Reg": { - "format": "double", - "type": "number" - }, - "learnRate": { - "format": "double", - "type": "number" - }, - "learnRateStrategy": { - "type": "string" - }, - "lineSearchInitLearnRate": { - "format": "double", - "type": "number" - }, - "maxIteration": { - "format": "int64", - "type": "string" - }, - "minRelProgress": { - "format": "double", - "type": "number" - }, - "warmStart": { - "type": "boolean" - } - }, - "type": "object" - } - }, - "type": "object" - }, "UserDefinedFunctionResource": { "id": "UserDefinedFunctionResource", "properties": { diff --git a/vendor/google.golang.org/api/bigquery/v2/bigquery-gen.go b/vendor/google.golang.org/api/bigquery/v2/bigquery-gen.go index b66a9d76..16f8377c 100644 --- a/vendor/google.golang.org/api/bigquery/v2/bigquery-gen.go +++ b/vendor/google.golang.org/api/bigquery/v2/bigquery-gen.go @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. All rights reserved. +// Copyright 2019 Google LLC. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. @@ -8,13 +8,39 @@ // // This package is DEPRECATED. Use package cloud.google.com/go/bigquery instead. // -// See https://cloud.google.com/bigquery/ +// For product documentation, see: https://cloud.google.com/bigquery/ +// +// Creating a client // // Usage example: // // import "google.golang.org/api/bigquery/v2" // ... -// bigqueryService, err := bigquery.New(oauthHttpClient) +// ctx := context.Background() +// bigqueryService, err := bigquery.NewService(ctx) +// +// In this example, Google Application Default Credentials are used for authentication. +// +// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// +// Other authentication options +// +// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// +// bigqueryService, err := bigquery.NewService(ctx, option.WithScopes(bigquery.DevstorageReadWriteScope)) +// +// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// +// bigqueryService, err := bigquery.NewService(ctx, option.WithAPIKey("AIza...")) +// +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// +// config := &oauth2.Config{...} +// // ... +// token, err := config.Exchange(ctx, ...) +// bigqueryService, err := bigquery.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) +// +// See https://godoc.org/google.golang.org/api/option/ for details on options. package bigquery // import "google.golang.org/api/bigquery/v2" import ( @@ -31,6 +57,8 @@ import ( gensupport "google.golang.org/api/gensupport" googleapi "google.golang.org/api/googleapi" + option "google.golang.org/api/option" + htransport "google.golang.org/api/transport/http" ) // Always reference these packages, just in case the auto-generated code @@ -76,6 +104,38 @@ const ( DevstorageReadWriteScope = "https://www.googleapis.com/auth/devstorage.read_write" ) +// NewService creates a new Service. +func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { + scopesOption := option.WithScopes( + "https://www.googleapis.com/auth/bigquery", + "https://www.googleapis.com/auth/bigquery.insertdata", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/devstorage.full_control", + "https://www.googleapis.com/auth/devstorage.read_only", + "https://www.googleapis.com/auth/devstorage.read_write", + ) + // NOTE: prepend, so we don't override user-specified scopes. + opts = append([]option.ClientOption{scopesOption}, opts...) + client, endpoint, err := htransport.NewClient(ctx, opts...) + if err != nil { + return nil, err + } + s, err := New(client) + if err != nil { + return nil, err + } + if endpoint != "" { + s.BasePath = endpoint + } + return s, nil +} + +// New creates a new Service. It uses the provided http.Client for requests. +// +// Deprecated: please use NewService instead. +// To provide a custom HTTP client, use option.WithHTTPClient. +// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. func New(client *http.Client) (*Service, error) { if client == nil { return nil, errors.New("client is nil") @@ -362,6 +422,190 @@ func (s *BigtableOptions) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type BqmlIterationResult struct { + // DurationMs: [Output-only, Beta] Time taken to run the training + // iteration in milliseconds. + DurationMs int64 `json:"durationMs,omitempty,string"` + + // EvalLoss: [Output-only, Beta] Eval loss computed on the eval data at + // the end of the iteration. The eval loss is used for early stopping to + // avoid overfitting. No eval loss if eval_split_method option is + // specified as no_split or auto_split with input data size less than + // 500 rows. + EvalLoss float64 `json:"evalLoss,omitempty"` + + // Index: [Output-only, Beta] Index of the ML training iteration, + // starting from zero for each training run. + Index int64 `json:"index,omitempty"` + + // LearnRate: [Output-only, Beta] Learning rate used for this iteration, + // it varies for different training iterations if learn_rate_strategy + // option is not constant. + LearnRate float64 `json:"learnRate,omitempty"` + + // TrainingLoss: [Output-only, Beta] Training loss computed on the + // training data at the end of the iteration. The training loss function + // is defined by model type. + TrainingLoss float64 `json:"trainingLoss,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DurationMs") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DurationMs") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *BqmlIterationResult) MarshalJSON() ([]byte, error) { + type NoMethod BqmlIterationResult + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *BqmlIterationResult) UnmarshalJSON(data []byte) error { + type NoMethod BqmlIterationResult + var s1 struct { + EvalLoss gensupport.JSONFloat64 `json:"evalLoss"` + LearnRate gensupport.JSONFloat64 `json:"learnRate"` + TrainingLoss gensupport.JSONFloat64 `json:"trainingLoss"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.EvalLoss = float64(s1.EvalLoss) + s.LearnRate = float64(s1.LearnRate) + s.TrainingLoss = float64(s1.TrainingLoss) + return nil +} + +type BqmlTrainingRun struct { + // IterationResults: [Output-only, Beta] List of each iteration results. + IterationResults []*BqmlIterationResult `json:"iterationResults,omitempty"` + + // StartTime: [Output-only, Beta] Training run start time in + // milliseconds since the epoch. + StartTime string `json:"startTime,omitempty"` + + // State: [Output-only, Beta] Different state applicable for a training + // run. IN PROGRESS: Training run is in progress. FAILED: Training run + // ended due to a non-retryable failure. SUCCEEDED: Training run + // successfully completed. CANCELLED: Training run cancelled by the + // user. + State string `json:"state,omitempty"` + + // TrainingOptions: [Output-only, Beta] Training options used by this + // training run. These options are mutable for subsequent training runs. + // Default values are explicitly stored for options not specified in the + // input query of the first training run. For subsequent training runs, + // any option not explicitly specified in the input query will be copied + // from the previous training run. + TrainingOptions *BqmlTrainingRunTrainingOptions `json:"trainingOptions,omitempty"` + + // ForceSendFields is a list of field names (e.g. "IterationResults") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "IterationResults") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *BqmlTrainingRun) MarshalJSON() ([]byte, error) { + type NoMethod BqmlTrainingRun + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// BqmlTrainingRunTrainingOptions: [Output-only, Beta] Training options +// used by this training run. These options are mutable for subsequent +// training runs. Default values are explicitly stored for options not +// specified in the input query of the first training run. For +// subsequent training runs, any option not explicitly specified in the +// input query will be copied from the previous training run. +type BqmlTrainingRunTrainingOptions struct { + EarlyStop bool `json:"earlyStop,omitempty"` + + L1Reg float64 `json:"l1Reg,omitempty"` + + L2Reg float64 `json:"l2Reg,omitempty"` + + LearnRate float64 `json:"learnRate,omitempty"` + + LearnRateStrategy string `json:"learnRateStrategy,omitempty"` + + LineSearchInitLearnRate float64 `json:"lineSearchInitLearnRate,omitempty"` + + MaxIteration int64 `json:"maxIteration,omitempty,string"` + + MinRelProgress float64 `json:"minRelProgress,omitempty"` + + WarmStart bool `json:"warmStart,omitempty"` + + // ForceSendFields is a list of field names (e.g. "EarlyStop") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "EarlyStop") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *BqmlTrainingRunTrainingOptions) MarshalJSON() ([]byte, error) { + type NoMethod BqmlTrainingRunTrainingOptions + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *BqmlTrainingRunTrainingOptions) UnmarshalJSON(data []byte) error { + type NoMethod BqmlTrainingRunTrainingOptions + var s1 struct { + L1Reg gensupport.JSONFloat64 `json:"l1Reg"` + L2Reg gensupport.JSONFloat64 `json:"l2Reg"` + LearnRate gensupport.JSONFloat64 `json:"learnRate"` + LineSearchInitLearnRate gensupport.JSONFloat64 `json:"lineSearchInitLearnRate"` + MinRelProgress gensupport.JSONFloat64 `json:"minRelProgress"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.L1Reg = float64(s1.L1Reg) + s.L2Reg = float64(s1.L2Reg) + s.LearnRate = float64(s1.LearnRate) + s.LineSearchInitLearnRate = float64(s1.LineSearchInitLearnRate) + s.MinRelProgress = float64(s1.MinRelProgress) + return nil +} + type Clustering struct { // Fields: [Repeated] One or more fields on which data should be // clustered. Only top-level, non-repeated, simple-type fields are @@ -577,27 +821,36 @@ func (s *Dataset) MarshalJSON() ([]byte, error) { type DatasetAccess struct { // Domain: [Pick one] A domain to grant access to. Any users signed in // with the domain specified will be granted the specified access. - // Example: "example.com". + // Example: "example.com". Maps to IAM policy member "domain:DOMAIN". Domain string `json:"domain,omitempty"` // GroupByEmail: [Pick one] An email address of a Google Group to grant - // access to. + // access to. Maps to IAM policy member "group:GROUP". GroupByEmail string `json:"groupByEmail,omitempty"` - // Role: [Required] Describes the rights granted to the user specified - // by the other member of the access object. The following string values - // are supported: READER, WRITER, OWNER. + // IamMember: [Pick one] Some other type of member that appears in the + // IAM Policy but isn't a user, group, domain, or special group. + IamMember string `json:"iamMember,omitempty"` + + // Role: [Required] An IAM role ID that should be granted to the user, + // group, or domain specified in this access entry. The following legacy + // mappings will be applied: OWNER roles/bigquery.dataOwner WRITER + // roles/bigquery.dataEditor READER roles/bigquery.dataViewer This + // field will accept any of the above formats, but will return only the + // legacy format. For example, if you set this field to + // "roles/bigquery.dataOwner", it will be returned back as "OWNER". Role string `json:"role,omitempty"` // SpecialGroup: [Pick one] A special group to grant access to. Possible // values include: projectOwners: Owners of the enclosing project. // projectReaders: Readers of the enclosing project. projectWriters: // Writers of the enclosing project. allAuthenticatedUsers: All - // authenticated BigQuery users. + // authenticated BigQuery users. Maps to similarly-named IAM members. SpecialGroup string `json:"specialGroup,omitempty"` // UserByEmail: [Pick one] An email address of a user to grant access - // to. For example: fred@example.com. + // to. For example: fred@example.com. Maps to IAM policy member + // "user:EMAIL" or "serviceAccount:EMAIL". UserByEmail string `json:"userByEmail,omitempty"` // View: [Pick one] A view from a different dataset to grant access to. @@ -767,6 +1020,13 @@ type DestinationTableProperties struct { // friendly name is provided, the job will fail. FriendlyName string `json:"friendlyName,omitempty"` + // Labels: [Optional] The labels associated with this table. You can use + // these to organize and group your tables. This will only be used if + // the destination table is newly created. If the table already exists + // and labels are different than the current labels are provided, the + // job will fail. + Labels map[string]string `json:"labels,omitempty"` + // ForceSendFields is a list of field names (e.g. "Description") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, @@ -1065,6 +1325,14 @@ type ExternalDataConfiguration struct { // set to GOOGLE_SHEETS. GoogleSheetsOptions *GoogleSheetsOptions `json:"googleSheetsOptions,omitempty"` + // HivePartitioningMode: [Optional, Experimental] If hive partitioning + // is enabled, which mode to use. Two modes are supported: - AUTO: + // automatically infer partition key name(s) and type(s). - STRINGS: + // automatic infer partition key name(s). All types are strings. Not all + // storage formats support hive partitioning -- requesting hive + // partitioning on an unsupported format will lead to an error. + HivePartitioningMode string `json:"hivePartitioningMode,omitempty"` + // IgnoreUnknownValues: [Optional] Indicates if BigQuery should allow // extra values that are not represented in the table schema. If true, // the extra values are ignored. If false, records with extra columns @@ -1295,73 +1563,6 @@ func (s *GoogleSheetsOptions) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type IterationResult struct { - // DurationMs: [Output-only, Beta] Time taken to run the training - // iteration in milliseconds. - DurationMs int64 `json:"durationMs,omitempty,string"` - - // EvalLoss: [Output-only, Beta] Eval loss computed on the eval data at - // the end of the iteration. The eval loss is used for early stopping to - // avoid overfitting. No eval loss if eval_split_method option is - // specified as no_split or auto_split with input data size less than - // 500 rows. - EvalLoss float64 `json:"evalLoss,omitempty"` - - // Index: [Output-only, Beta] Index of the ML training iteration, - // starting from zero for each training run. - Index int64 `json:"index,omitempty"` - - // LearnRate: [Output-only, Beta] Learning rate used for this iteration, - // it varies for different training iterations if learn_rate_strategy - // option is not constant. - LearnRate float64 `json:"learnRate,omitempty"` - - // TrainingLoss: [Output-only, Beta] Training loss computed on the - // training data at the end of the iteration. The training loss function - // is defined by model type. - TrainingLoss float64 `json:"trainingLoss,omitempty"` - - // ForceSendFields is a list of field names (e.g. "DurationMs") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "DurationMs") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *IterationResult) MarshalJSON() ([]byte, error) { - type NoMethod IterationResult - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *IterationResult) UnmarshalJSON(data []byte) error { - type NoMethod IterationResult - var s1 struct { - EvalLoss gensupport.JSONFloat64 `json:"evalLoss"` - LearnRate gensupport.JSONFloat64 `json:"learnRate"` - TrainingLoss gensupport.JSONFloat64 `json:"trainingLoss"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.EvalLoss = float64(s1.EvalLoss) - s.LearnRate = float64(s1.LearnRate) - s.TrainingLoss = float64(s1.TrainingLoss) - return nil -} - type Job struct { // Configuration: [Required] Describes the job configuration. Configuration *JobConfiguration `json:"configuration,omitempty"` @@ -1630,6 +1831,14 @@ type JobConfigurationLoad struct { // specify a tab separator. The default value is a comma (','). FieldDelimiter string `json:"fieldDelimiter,omitempty"` + // HivePartitioningMode: [Optional, Experimental] If hive partitioning + // is enabled, which mode to use. Two modes are supported: - AUTO: + // automatically infer partition key name(s) and type(s). - STRINGS: + // automatic infer partition key name(s). All types are strings. Not all + // storage formats support hive partitioning -- requesting hive + // partitioning on an unsupported format will lead to an error. + HivePartitioningMode string `json:"hivePartitioningMode,omitempty"` + // IgnoreUnknownValues: [Optional] Indicates if BigQuery should allow // extra values that are not represented in the table schema. If true, // the extra values are ignored. If false, records with extra columns @@ -2155,6 +2364,13 @@ type JobStatistics struct { // Load: [Output-only] Statistics for a load job. Load *JobStatistics3 `json:"load,omitempty"` + // NumChildJobs: [Output-only] Number of child jobs executed. + NumChildJobs int64 `json:"numChildJobs,omitempty,string"` + + // ParentJobId: [Output-only] If this is a child job, the id of the + // parent. + ParentJobId string `json:"parentJobId,omitempty"` + // Query: [Output-only] Statistics for a query job. Query *JobStatistics2 `json:"query,omitempty"` @@ -2267,6 +2483,10 @@ type JobStatistics2 struct { // query deleted the DDL target. DdlOperationPerformed string `json:"ddlOperationPerformed,omitempty"` + // DdlTargetRoutine: The DDL target routine. Present only for + // CREATE/DROP FUNCTION/PROCEDURE queries. + DdlTargetRoutine *RoutineReference `json:"ddlTargetRoutine,omitempty"` + // DdlTargetTable: The DDL target table. Present only for CREATE/DROP // TABLE/VIEW queries. DdlTargetTable *TableReference `json:"ddlTargetTable,omitempty"` @@ -2311,7 +2531,7 @@ type JobStatistics2 struct { // StatementType: The type of query statement, if valid. Possible values // (new values might be added in the future): "SELECT": SELECT query. // "INSERT": INSERT query; see - // https://cloud.google.com/bigquery/docs/reference/standard-sql/data-manipulation-language. "UPDATE": UPDATE query; see https://cloud.google.com/bigquery/docs/reference/standard-sql/data-manipulation-language. "DELETE": DELETE query; see https://cloud.google.com/bigquery/docs/reference/standard-sql/data-manipulation-language. "MERGE": MERGE query; see https://cloud.google.com/bigquery/docs/reference/standard-sql/data-manipulation-language. "CREATE_TABLE": CREATE [OR REPLACE] TABLE without AS SELECT. "CREATE_TABLE_AS_SELECT": CREATE [OR REPLACE] TABLE ... AS SELECT ... . "DROP_TABLE": DROP TABLE query. "CREATE_VIEW": CREATE [OR REPLACE] VIEW ... AS SELECT ... . "DROP_VIEW": DROP VIEW query. "ALTER_TABLE": ALTER TABLE query. "ALTER_VIEW": ALTER VIEW + // https://cloud.google.com/bigquery/docs/reference/standard-sql/data-manipulation-language. "UPDATE": UPDATE query; see https://cloud.google.com/bigquery/docs/reference/standard-sql/data-manipulation-language. "DELETE": DELETE query; see https://cloud.google.com/bigquery/docs/reference/standard-sql/data-manipulation-language. "MERGE": MERGE query; see https://cloud.google.com/bigquery/docs/reference/standard-sql/data-manipulation-language. "CREATE_TABLE": CREATE [OR REPLACE] TABLE without AS SELECT. "CREATE_TABLE_AS_SELECT": CREATE [OR REPLACE] TABLE ... AS SELECT ... . "DROP_TABLE": DROP TABLE query. "CREATE_VIEW": CREATE [OR REPLACE] VIEW ... AS SELECT ... . "DROP_VIEW": DROP VIEW query. "CREATE_FUNCTION": CREATE FUNCTION query. "DROP_FUNCTION" : DROP FUNCTION query. "ALTER_TABLE": ALTER TABLE query. "ALTER_VIEW": ALTER VIEW // query. StatementType string `json:"statementType,omitempty"` @@ -2329,7 +2549,7 @@ type JobStatistics2 struct { // accuracy of the estimate. Possible values can be: UNKNOWN: accuracy // of the estimate is unknown. PRECISE: estimate is precise. // LOWER_BOUND: estimate is lower bound of what the query would cost. - // UPPER_BOUND: estiamte is upper bound of what the query would cost. + // UPPER_BOUND: estimate is upper bound of what the query would cost. TotalBytesProcessedAccuracy string `json:"totalBytesProcessedAccuracy,omitempty"` // TotalPartitionsProcessed: [Output-only] Total number of partitions @@ -2452,6 +2672,11 @@ type JobStatistics4 struct { // specified in the 'destinationUris' field. DestinationUriFileCounts googleapi.Int64s `json:"destinationUriFileCounts,omitempty"` + // InputBytes: [Output-only] Number of user bytes extracted into the + // result. This is the byte count as computed by BigQuery for billing + // purposes. + InputBytes int64 `json:"inputBytes,omitempty,string"` + // ForceSendFields is a list of field names (e.g. // "DestinationUriFileCounts") to unconditionally include in API // requests. By default, fields with empty values are omitted from API @@ -2559,7 +2784,7 @@ type ModelDefinition struct { // each training run comprises of multiple iterations and there may be // multiple training runs for the model if warm start is used or if a // user decides to continue a previously cancelled query. - TrainingRuns []*TrainingRun `json:"trainingRuns,omitempty"` + TrainingRuns []*BqmlTrainingRun `json:"trainingRuns,omitempty"` // ForceSendFields is a list of field names (e.g. "ModelOptions") to // unconditionally include in API requests. By default, fields with @@ -3151,6 +3376,41 @@ func (s *RangePartitioningRange) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type RoutineReference struct { + // DatasetId: [Required] The ID of the dataset containing this routine. + DatasetId string `json:"datasetId,omitempty"` + + // ProjectId: [Required] The ID of the project containing this routine. + ProjectId string `json:"projectId,omitempty"` + + // RoutineId: [Required] The ID of the routine. The ID must contain only + // letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum + // length is 256 characters. + RoutineId string `json:"routineId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DatasetId") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DatasetId") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *RoutineReference) MarshalJSON() ([]byte, error) { + type NoMethod RoutineReference + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type Streamingbuffer struct { // EstimatedBytes: [Output-only] A lower-bound estimate of the number of // bytes currently in the streaming buffer. @@ -3566,6 +3826,10 @@ func (s *TableDataList) MarshalJSON() ([]byte, error) { } type TableFieldSchema struct { + // Categories: [Optional] The categories attached to this field, used + // for field-level access control. + Categories *TableFieldSchemaCategories `json:"categories,omitempty"` + // Description: [Optional] The field description. The maximum length is // 1,024 characters. Description string `json:"description,omitempty"` @@ -3590,7 +3854,7 @@ type TableFieldSchema struct { // nested schema) or STRUCT (same as RECORD). Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "Description") to + // ForceSendFields is a list of field names (e.g. "Categories") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the @@ -3598,10 +3862,10 @@ type TableFieldSchema struct { // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Description") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "Categories") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` @@ -3613,6 +3877,37 @@ func (s *TableFieldSchema) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// TableFieldSchemaCategories: [Optional] The categories attached to +// this field, used for field-level access control. +type TableFieldSchemaCategories struct { + // Names: A list of category resource names. For example, + // "projects/1/taxonomies/2/categories/3". At most 5 categories are + // allowed. + Names []string `json:"names,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Names") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Names") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *TableFieldSchemaCategories) MarshalJSON() ([]byte, error) { + type NoMethod TableFieldSchemaCategories + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type TableList struct { // Etag: A hash of this page of results. Etag string `json:"etag,omitempty"` @@ -3853,9 +4148,6 @@ type TimePartitioning struct { // REQUIRED. Field string `json:"field,omitempty"` - // RequirePartitionFilter: [Beta] [Optional] If set to true, queries - // over this table require a partition filter that can be used for - // partition elimination to be specified. RequirePartitionFilter bool `json:"requirePartitionFilter,omitempty"` // Type: [Required] The only type supported is DAY, which will generate @@ -3885,123 +4177,6 @@ func (s *TimePartitioning) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type TrainingRun struct { - // IterationResults: [Output-only, Beta] List of each iteration results. - IterationResults []*IterationResult `json:"iterationResults,omitempty"` - - // StartTime: [Output-only, Beta] Training run start time in - // milliseconds since the epoch. - StartTime string `json:"startTime,omitempty"` - - // State: [Output-only, Beta] Different state applicable for a training - // run. IN PROGRESS: Training run is in progress. FAILED: Training run - // ended due to a non-retryable failure. SUCCEEDED: Training run - // successfully completed. CANCELLED: Training run cancelled by the - // user. - State string `json:"state,omitempty"` - - // TrainingOptions: [Output-only, Beta] Training options used by this - // training run. These options are mutable for subsequent training runs. - // Default values are explicitly stored for options not specified in the - // input query of the first training run. For subsequent training runs, - // any option not explicitly specified in the input query will be copied - // from the previous training run. - TrainingOptions *TrainingRunTrainingOptions `json:"trainingOptions,omitempty"` - - // ForceSendFields is a list of field names (e.g. "IterationResults") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "IterationResults") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *TrainingRun) MarshalJSON() ([]byte, error) { - type NoMethod TrainingRun - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// TrainingRunTrainingOptions: [Output-only, Beta] Training options used -// by this training run. These options are mutable for subsequent -// training runs. Default values are explicitly stored for options not -// specified in the input query of the first training run. For -// subsequent training runs, any option not explicitly specified in the -// input query will be copied from the previous training run. -type TrainingRunTrainingOptions struct { - EarlyStop bool `json:"earlyStop,omitempty"` - - L1Reg float64 `json:"l1Reg,omitempty"` - - L2Reg float64 `json:"l2Reg,omitempty"` - - LearnRate float64 `json:"learnRate,omitempty"` - - LearnRateStrategy string `json:"learnRateStrategy,omitempty"` - - LineSearchInitLearnRate float64 `json:"lineSearchInitLearnRate,omitempty"` - - MaxIteration int64 `json:"maxIteration,omitempty,string"` - - MinRelProgress float64 `json:"minRelProgress,omitempty"` - - WarmStart bool `json:"warmStart,omitempty"` - - // ForceSendFields is a list of field names (e.g. "EarlyStop") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "EarlyStop") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TrainingRunTrainingOptions) MarshalJSON() ([]byte, error) { - type NoMethod TrainingRunTrainingOptions - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *TrainingRunTrainingOptions) UnmarshalJSON(data []byte) error { - type NoMethod TrainingRunTrainingOptions - var s1 struct { - L1Reg gensupport.JSONFloat64 `json:"l1Reg"` - L2Reg gensupport.JSONFloat64 `json:"l2Reg"` - LearnRate gensupport.JSONFloat64 `json:"learnRate"` - LineSearchInitLearnRate gensupport.JSONFloat64 `json:"lineSearchInitLearnRate"` - MinRelProgress gensupport.JSONFloat64 `json:"minRelProgress"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.L1Reg = float64(s1.L1Reg) - s.L2Reg = float64(s1.L2Reg) - s.LearnRate = float64(s1.LearnRate) - s.LineSearchInitLearnRate = float64(s1.LineSearchInitLearnRate) - s.MinRelProgress = float64(s1.MinRelProgress) - return nil -} - type UserDefinedFunctionResource struct { // InlineCode: [Pick one] An inline resource that contains code for a // user-defined function (UDF). Providing a inline code resource is @@ -5688,7 +5863,7 @@ func (c *JobsInsertCall) doRequest(alt string) (*http.Response, error) { return nil, err } req.Header = reqHeaders - gensupport.SetGetBody(req, getBody) + req.GetBody = getBody googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, }) diff --git a/vendor/google.golang.org/api/cloudbilling/v1/cloudbilling-api.json b/vendor/google.golang.org/api/cloudbilling/v1/cloudbilling-api.json index f751de24..c7e89356 100644 --- a/vendor/google.golang.org/api/cloudbilling/v1/cloudbilling-api.json +++ b/vendor/google.golang.org/api/cloudbilling/v1/cloudbilling-api.json @@ -175,7 +175,7 @@ ] }, "list": { - "description": "Lists the billing accounts that the current authenticated user has\npermission to [view](https://cloud.google.com/billing/docs/how-to/billing-access).", + "description": "Lists the billing accounts that the current authenticated user has\npermission to\n[view](https://cloud.google.com/billing/docs/how-to/billing-access).", "flatPath": "v1/billingAccounts", "httpMethod": "GET", "id": "cloudbilling.billingAccounts.list", @@ -488,7 +488,7 @@ } } }, - "revision": "20180806", + "revision": "20190416", "rootUrl": "https://cloudbilling.googleapis.com/", "schemas": { "AggregationInfo": { @@ -606,10 +606,10 @@ "properties": { "condition": { "$ref": "Expr", - "description": "Unimplemented. The condition that is associated with this binding.\nNOTE: an unsatisfied condition will not allow user access via current\nbinding. Different bindings, including their conditions, are examined\nindependently." + "description": "The condition that is associated with this binding.\nNOTE: An unsatisfied condition will not allow user access via current\nbinding. Different bindings, including their conditions, are examined\nindependently." }, "members": { - "description": "Specifies the identities requesting access for a Cloud Platform resource.\n`members` can have the following values:\n\n* `allUsers`: A special identifier that represents anyone who is\n on the internet; with or without a Google account.\n\n* `allAuthenticatedUsers`: A special identifier that represents anyone\n who is authenticated with a Google account or a service account.\n\n* `user:{emailid}`: An email address that represents a specific Google\n account. For example, `alice@gmail.com` .\n\n\n* `serviceAccount:{emailid}`: An email address that represents a service\n account. For example, `my-other-app@appspot.gserviceaccount.com`.\n\n* `group:{emailid}`: An email address that represents a Google group.\n For example, `admins@example.com`.\n\n\n* `domain:{domain}`: A Google Apps domain name that represents all the\n users of that domain. For example, `google.com` or `example.com`.\n\n", + "description": "Specifies the identities requesting access for a Cloud Platform resource.\n`members` can have the following values:\n\n* `allUsers`: A special identifier that represents anyone who is\n on the internet; with or without a Google account.\n\n* `allAuthenticatedUsers`: A special identifier that represents anyone\n who is authenticated with a Google account or a service account.\n\n* `user:{emailid}`: An email address that represents a specific Google\n account. For example, `alice@gmail.com` .\n\n\n* `serviceAccount:{emailid}`: An email address that represents a service\n account. For example, `my-other-app@appspot.gserviceaccount.com`.\n\n* `group:{emailid}`: An email address that represents a Google group.\n For example, `admins@example.com`.\n\n\n* `domain:{domain}`: The G Suite domain (primary) that represents all the\n users of that domain. For example, `google.com` or `example.com`.\n\n", "items": { "type": "string" }, @@ -888,6 +888,10 @@ "description": "Encapsulates a single service in Google Cloud Platform.", "id": "Service", "properties": { + "businessEntityName": { + "description": "The business under which the service is offered.\nEx. \"businessEntities/GCP\", \"businessEntities/Maps\"", + "type": "string" + }, "displayName": { "description": "A human readable display name for this service.", "type": "string" diff --git a/vendor/google.golang.org/api/cloudbilling/v1/cloudbilling-gen.go b/vendor/google.golang.org/api/cloudbilling/v1/cloudbilling-gen.go index c2fd3aac..4c002edf 100644 --- a/vendor/google.golang.org/api/cloudbilling/v1/cloudbilling-gen.go +++ b/vendor/google.golang.org/api/cloudbilling/v1/cloudbilling-gen.go @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. All rights reserved. +// Copyright 2019 Google LLC. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. @@ -6,13 +6,35 @@ // Package cloudbilling provides access to the Cloud Billing API. // -// See https://cloud.google.com/billing/ +// For product documentation, see: https://cloud.google.com/billing/ +// +// Creating a client // // Usage example: // // import "google.golang.org/api/cloudbilling/v1" // ... -// cloudbillingService, err := cloudbilling.New(oauthHttpClient) +// ctx := context.Background() +// cloudbillingService, err := cloudbilling.NewService(ctx) +// +// In this example, Google Application Default Credentials are used for authentication. +// +// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// +// Other authentication options +// +// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// +// cloudbillingService, err := cloudbilling.NewService(ctx, option.WithAPIKey("AIza...")) +// +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// +// config := &oauth2.Config{...} +// // ... +// token, err := config.Exchange(ctx, ...) +// cloudbillingService, err := cloudbilling.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) +// +// See https://godoc.org/google.golang.org/api/option/ for details on options. package cloudbilling // import "google.golang.org/api/cloudbilling/v1" import ( @@ -29,6 +51,8 @@ import ( gensupport "google.golang.org/api/gensupport" googleapi "google.golang.org/api/googleapi" + option "google.golang.org/api/option" + htransport "google.golang.org/api/transport/http" ) // Always reference these packages, just in case the auto-generated code @@ -56,6 +80,32 @@ const ( CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" ) +// NewService creates a new APIService. +func NewService(ctx context.Context, opts ...option.ClientOption) (*APIService, error) { + scopesOption := option.WithScopes( + "https://www.googleapis.com/auth/cloud-platform", + ) + // NOTE: prepend, so we don't override user-specified scopes. + opts = append([]option.ClientOption{scopesOption}, opts...) + client, endpoint, err := htransport.NewClient(ctx, opts...) + if err != nil { + return nil, err + } + s, err := New(client) + if err != nil { + return nil, err + } + if endpoint != "" { + s.BasePath = endpoint + } + return s, nil +} + +// New creates a new APIService. It uses the provided http.Client for requests. +// +// Deprecated: please use NewService instead. +// To provide a custom HTTP client, use option.WithHTTPClient. +// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. func New(client *http.Client) (*APIService, error) { if client == nil { return nil, errors.New("client is nil") @@ -401,9 +451,8 @@ func (s *BillingAccount) MarshalJSON() ([]byte, error) { // Binding: Associates `members` with a `role`. type Binding struct { - // Condition: Unimplemented. The condition that is associated with this - // binding. - // NOTE: an unsatisfied condition will not allow user access via + // Condition: The condition that is associated with this binding. + // NOTE: An unsatisfied condition will not allow user access via // current // binding. Different bindings, including their conditions, are // examined @@ -437,7 +486,7 @@ type Binding struct { // For example, `admins@example.com`. // // - // * `domain:{domain}`: A Google Apps domain name that represents all + // * `domain:{domain}`: The G Suite domain (primary) that represents all // the // users of that domain. For example, `google.com` or // `example.com`. @@ -1129,6 +1178,11 @@ func (s *ProjectBillingInfo) MarshalJSON() ([]byte, error) { // Service: Encapsulates a single service in Google Cloud Platform. type Service struct { + // BusinessEntityName: The business under which the service is + // offered. + // Ex. "businessEntities/GCP", "businessEntities/Maps" + BusinessEntityName string `json:"businessEntityName,omitempty"` + // DisplayName: A human readable display name for this service. DisplayName string `json:"displayName,omitempty"` @@ -1140,20 +1194,21 @@ type Service struct { // Example: "DA34-426B-A397" ServiceId string `json:"serviceId,omitempty"` - // ForceSendFields is a list of field names (e.g. "DisplayName") to - // unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "BusinessEntityName") + // to unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DisplayName") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "BusinessEntityName") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } @@ -1834,8 +1889,10 @@ type BillingAccountsListCall struct { // List: Lists the billing accounts that the current authenticated user // has -// permission to -// [view](https://cloud.google.com/billing/docs/how-to/billing-access). +// permission +// to +// [view](https://cloud.google.com/billing/docs/how-to/billing-access) +// . func (r *BillingAccountsService) List() *BillingAccountsListCall { c := &BillingAccountsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} return c @@ -1971,7 +2028,7 @@ func (c *BillingAccountsListCall) Do(opts ...googleapi.CallOption) (*ListBilling } return ret, nil // { - // "description": "Lists the billing accounts that the current authenticated user has\npermission to [view](https://cloud.google.com/billing/docs/how-to/billing-access).", + // "description": "Lists the billing accounts that the current authenticated user has\npermission to\n[view](https://cloud.google.com/billing/docs/how-to/billing-access).", // "flatPath": "v1/billingAccounts", // "httpMethod": "GET", // "id": "cloudbilling.billingAccounts.list", diff --git a/vendor/google.golang.org/api/cloudbuild/v1/cloudbuild-api.json b/vendor/google.golang.org/api/cloudbuild/v1/cloudbuild-api.json index 0f0dfc77..81077eb7 100644 --- a/vendor/google.golang.org/api/cloudbuild/v1/cloudbuild-api.json +++ b/vendor/google.golang.org/api/cloudbuild/v1/cloudbuild-api.json @@ -474,6 +474,17 @@ "projectId" ], "parameters": { + "pageSize": { + "description": "Number of results to return in the list.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Token to provide to skip to a particular spot in the list.", + "location": "query", + "type": "string" + }, "projectId": { "description": "ID of the project for which to list BuildTriggers.", "location": "path", @@ -562,7 +573,7 @@ } } }, - "revision": "20181018", + "revision": "20190323", "rootUrl": "https://cloudbuild.googleapis.com/", "schemas": { "ArtifactObjects": { @@ -1011,6 +1022,10 @@ "description": "Path, from the source root, to a file whose contents is used for the\ntemplate.", "type": "string" }, + "github": { + "$ref": "GitHubEventsConfig", + "description": "GitHubEventsConfig describes the configuration of a trigger that creates\na build whenever a GitHub event is received." + }, "id": { "description": "Output only. Unique identifier of the trigger.", "type": "string" @@ -1074,6 +1089,12 @@ "properties": {}, "type": "object" }, + "CheckSuiteFilter": { + "description": "A CheckSuiteFilter is a filter that indicates that we should build on all\ncheck suite events.", + "id": "CheckSuiteFilter", + "properties": {}, + "type": "object" + }, "Empty": { "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", "id": "Empty", @@ -1094,6 +1115,38 @@ }, "type": "object" }, + "GitHubEventsConfig": { + "description": "GitHubEventsConfig describes the configuration of a trigger that creates a\nbuild whenever a GitHub event is received.\n\nThis message is experimental.", + "id": "GitHubEventsConfig", + "properties": { + "checkSuite": { + "$ref": "CheckSuiteFilter", + "description": "Output only. Indicates that a build was generated from a check suite\nevent." + }, + "installationId": { + "description": "The installationID that emmits the GitHub event.", + "format": "int64", + "type": "string" + }, + "name": { + "description": "Name of the repository.", + "type": "string" + }, + "owner": { + "description": "Owner of the repository.", + "type": "string" + }, + "pullRequest": { + "$ref": "PullRequestFilter", + "description": "filter to match changes in pull requests." + }, + "push": { + "$ref": "PushFilter", + "description": "filter to match changes in refs like branches, tags." + } + }, + "type": "object" + }, "Hash": { "description": "Container message for hash values.", "id": "Hash", @@ -1124,6 +1177,10 @@ "description": "Response containing existing `BuildTriggers`.", "id": "ListBuildTriggersResponse", "properties": { + "nextPageToken": { + "description": "Token to receive the next page of results.", + "type": "string" + }, "triggers": { "description": "`BuildTriggers` for the project, sorted by `create_time` descending.", "items": { @@ -1205,6 +1262,44 @@ }, "type": "object" }, + "PullRequestFilter": { + "description": "PullRequestFilter contains filter properties for matching GitHub Pull\nRequests.", + "id": "PullRequestFilter", + "properties": { + "branch": { + "description": "Regex of branches to match.\n\nThe syntax of the regular expressions accepted is the syntax accepted by\nRE2 and described at https://github.com/google/re2/wiki/Syntax", + "type": "string" + }, + "commentControl": { + "description": "Whether to block builds on a \"/gcbrun\" comment from a repository owner or\ncollaborator.", + "enum": [ + "COMMENTS_DISABLED", + "COMMENTS_ENABLED" + ], + "enumDescriptions": [ + "Do not require comments on Pull Requests before builds are triggered.", + "Enforce that repository owners or collaborators must comment on Pull\nRequests before builds are triggered." + ], + "type": "string" + } + }, + "type": "object" + }, + "PushFilter": { + "description": "Push contains filter properties for matching GitHub git pushes.", + "id": "PushFilter", + "properties": { + "branch": { + "description": "Regexes of branches to match.\n\nThe syntax of the regular expressions accepted is the syntax accepted by\nRE2 and described at https://github.com/google/re2/wiki/Syntax", + "type": "string" + }, + "tag": { + "description": "Regexes of tags to match.\n\nThe syntax of the regular expressions accepted is the syntax accepted by\nRE2 and described at https://github.com/google/re2/wiki/Syntax", + "type": "string" + } + }, + "type": "object" + }, "RepoSource": { "description": "Location of the source in a Google Cloud Source Repository.", "id": "RepoSource", @@ -1244,6 +1339,10 @@ "description": "Path to the artifact manifest. Only populated when artifacts are uploaded.", "type": "string" }, + "artifactTiming": { + "$ref": "TimeSpan", + "description": "Time to push all non-container artifacts." + }, "buildStepImages": { "description": "List of build step digests, in the order corresponding to build step\nindices.", "items": { @@ -1322,7 +1421,7 @@ "additionalProperties": { "$ref": "FileHashes" }, - "description": "Output only. Hash(es) of the build source, which can be used to verify that\nthe originalsource integrity was maintained in the build. Note that\n`FileHashes` willonly be populated if `BuildOptions` has requested a\n`SourceProvenanceHash`.\n\nThe keys to this map are file paths used as build source and the values\ncontain the hash values for those files.\n\nIf the build source came in a single package such as a gzipped tarfile\n(`.tar.gz`), the `FileHash` will be for the single path to that file.", + "description": "Output only. Hash(es) of the build source, which can be used to verify that\nthe original source integrity was maintained in the build. Note that\n`FileHashes` will only be populated if `BuildOptions` has requested a\n`SourceProvenanceHash`.\n\nThe keys to this map are file paths used as build source and the values\ncontain the hash values for those files.\n\nIf the build source came in a single package such as a gzipped tarfile\n(`.tar.gz`), the `FileHash` will be for the single path to that file.", "type": "object" }, "resolvedRepoSource": { @@ -1337,7 +1436,7 @@ "type": "object" }, "Status": { - "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", + "description": "The `Status` type defines a logical error model that is suitable for\ndifferent programming environments, including REST APIs and RPC APIs. It is\nused by [gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error\nmessage, and error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", "id": "Status", "properties": { "code": { diff --git a/vendor/google.golang.org/api/cloudbuild/v1/cloudbuild-gen.go b/vendor/google.golang.org/api/cloudbuild/v1/cloudbuild-gen.go index 6cd10797..64ceda7c 100644 --- a/vendor/google.golang.org/api/cloudbuild/v1/cloudbuild-gen.go +++ b/vendor/google.golang.org/api/cloudbuild/v1/cloudbuild-gen.go @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. All rights reserved. +// Copyright 2019 Google LLC. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. @@ -6,13 +6,35 @@ // Package cloudbuild provides access to the Cloud Build API. // -// See https://cloud.google.com/cloud-build/docs/ +// For product documentation, see: https://cloud.google.com/cloud-build/docs/ +// +// Creating a client // // Usage example: // // import "google.golang.org/api/cloudbuild/v1" // ... -// cloudbuildService, err := cloudbuild.New(oauthHttpClient) +// ctx := context.Background() +// cloudbuildService, err := cloudbuild.NewService(ctx) +// +// In this example, Google Application Default Credentials are used for authentication. +// +// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// +// Other authentication options +// +// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// +// cloudbuildService, err := cloudbuild.NewService(ctx, option.WithAPIKey("AIza...")) +// +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// +// config := &oauth2.Config{...} +// // ... +// token, err := config.Exchange(ctx, ...) +// cloudbuildService, err := cloudbuild.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) +// +// See https://godoc.org/google.golang.org/api/option/ for details on options. package cloudbuild // import "google.golang.org/api/cloudbuild/v1" import ( @@ -29,6 +51,8 @@ import ( gensupport "google.golang.org/api/gensupport" googleapi "google.golang.org/api/googleapi" + option "google.golang.org/api/option" + htransport "google.golang.org/api/transport/http" ) // Always reference these packages, just in case the auto-generated code @@ -56,6 +80,32 @@ const ( CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" ) +// NewService creates a new Service. +func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { + scopesOption := option.WithScopes( + "https://www.googleapis.com/auth/cloud-platform", + ) + // NOTE: prepend, so we don't override user-specified scopes. + opts = append([]option.ClientOption{scopesOption}, opts...) + client, endpoint, err := htransport.NewClient(ctx, opts...) + if err != nil { + return nil, err + } + s, err := New(client) + if err != nil { + return nil, err + } + if endpoint != "" { + s.BasePath = endpoint + } + return s, nil +} + +// New creates a new Service. It uses the provided http.Client for requests. +// +// Deprecated: please use NewService instead. +// To provide a custom HTTP client, use option.WithHTTPClient. +// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. func New(client *http.Client) (*Service, error) { if client == nil { return nil, errors.New("client is nil") @@ -797,6 +847,11 @@ type BuildTrigger struct { // template. Filename string `json:"filename,omitempty"` + // Github: GitHubEventsConfig describes the configuration of a trigger + // that creates + // a build whenever a GitHub event is received. + Github *GitHubEventsConfig `json:"github,omitempty"` + // Id: Output only. Unique identifier of the trigger. Id string `json:"id,omitempty"` @@ -915,6 +970,12 @@ type CancelBuildRequest struct { type CancelOperationRequest struct { } +// CheckSuiteFilter: A CheckSuiteFilter is a filter that indicates that +// we should build on all +// check suite events. +type CheckSuiteFilter struct { +} + // Empty: A generic empty message that you can re-use to avoid defining // duplicated // empty messages in your APIs. A typical example is to use it as the @@ -964,6 +1025,55 @@ func (s *FileHashes) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GitHubEventsConfig: GitHubEventsConfig describes the configuration of +// a trigger that creates a +// build whenever a GitHub event is received. +// +// This message is experimental. +type GitHubEventsConfig struct { + // CheckSuite: Output only. Indicates that a build was generated from a + // check suite + // event. + CheckSuite *CheckSuiteFilter `json:"checkSuite,omitempty"` + + // InstallationId: The installationID that emmits the GitHub event. + InstallationId int64 `json:"installationId,omitempty,string"` + + // Name: Name of the repository. + Name string `json:"name,omitempty"` + + // Owner: Owner of the repository. + Owner string `json:"owner,omitempty"` + + // PullRequest: filter to match changes in pull requests. + PullRequest *PullRequestFilter `json:"pullRequest,omitempty"` + + // Push: filter to match changes in refs like branches, tags. + Push *PushFilter `json:"push,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CheckSuite") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CheckSuite") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GitHubEventsConfig) MarshalJSON() ([]byte, error) { + type NoMethod GitHubEventsConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Hash: Container message for hash values. type Hash struct { // Type: The type of hash that was performed. @@ -1003,6 +1113,9 @@ func (s *Hash) MarshalJSON() ([]byte, error) { // ListBuildTriggersResponse: Response containing existing // `BuildTriggers`. type ListBuildTriggersResponse struct { + // NextPageToken: Token to receive the next page of results. + NextPageToken string `json:"nextPageToken,omitempty"` + // Triggers: `BuildTriggers` for the project, sorted by `create_time` // descending. Triggers []*BuildTrigger `json:"triggers,omitempty"` @@ -1011,7 +1124,7 @@ type ListBuildTriggersResponse struct { // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Triggers") to + // ForceSendFields is a list of field names (e.g. "NextPageToken") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the @@ -1019,10 +1132,10 @@ type ListBuildTriggersResponse struct { // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Triggers") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` @@ -1181,6 +1294,92 @@ func (s *Operation) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// PullRequestFilter: PullRequestFilter contains filter properties for +// matching GitHub Pull +// Requests. +type PullRequestFilter struct { + // Branch: Regex of branches to match. + // + // The syntax of the regular expressions accepted is the syntax accepted + // by + // RE2 and described at https://github.com/google/re2/wiki/Syntax + Branch string `json:"branch,omitempty"` + + // CommentControl: Whether to block builds on a "/gcbrun" comment from a + // repository owner or + // collaborator. + // + // Possible values: + // "COMMENTS_DISABLED" - Do not require comments on Pull Requests + // before builds are triggered. + // "COMMENTS_ENABLED" - Enforce that repository owners or + // collaborators must comment on Pull + // Requests before builds are triggered. + CommentControl string `json:"commentControl,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Branch") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Branch") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PullRequestFilter) MarshalJSON() ([]byte, error) { + type NoMethod PullRequestFilter + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// PushFilter: Push contains filter properties for matching GitHub git +// pushes. +type PushFilter struct { + // Branch: Regexes of branches to match. + // + // The syntax of the regular expressions accepted is the syntax accepted + // by + // RE2 and described at https://github.com/google/re2/wiki/Syntax + Branch string `json:"branch,omitempty"` + + // Tag: Regexes of tags to match. + // + // The syntax of the regular expressions accepted is the syntax accepted + // by + // RE2 and described at https://github.com/google/re2/wiki/Syntax + Tag string `json:"tag,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Branch") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Branch") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PushFilter) MarshalJSON() ([]byte, error) { + type NoMethod PushFilter + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // RepoSource: Location of the source in a Google Cloud Source // Repository. type RepoSource struct { @@ -1240,6 +1439,9 @@ type Results struct { // artifacts are uploaded. ArtifactManifest string `json:"artifactManifest,omitempty"` + // ArtifactTiming: Time to push all non-container artifacts. + ArtifactTiming *TimeSpan `json:"artifactTiming,omitempty"` + // BuildStepImages: List of build step digests, in the order // corresponding to build step // indices. @@ -1373,9 +1575,9 @@ func (s *Source) MarshalJSON() ([]byte, error) { type SourceProvenance struct { // FileHashes: Output only. Hash(es) of the build source, which can be // used to verify that - // the originalsource integrity was maintained in the build. Note + // the original source integrity was maintained in the build. Note // that - // `FileHashes` willonly be populated if `BuildOptions` has requested + // `FileHashes` will only be populated if `BuildOptions` has requested // a // `SourceProvenanceHash`. // @@ -1422,20 +1624,20 @@ func (s *SourceProvenance) MarshalJSON() ([]byte, error) { } // Status: The `Status` type defines a logical error model that is -// suitable for different -// programming environments, including REST APIs and RPC APIs. It is -// used by -// [gRPC](https://github.com/grpc). The error model is designed to -// be: +// suitable for +// different programming environments, including REST APIs and RPC APIs. +// It is +// used by [gRPC](https://github.com/grpc). The error model is designed +// to be: // // - Simple to use and understand for most users // - Flexible enough to meet unexpected needs // // # Overview // -// The `Status` message contains three pieces of data: error code, error -// message, -// and error details. The error code should be an enum value +// The `Status` message contains three pieces of data: error code, +// error +// message, and error details. The error code should be an enum value // of // google.rpc.Code, but it may accept additional error codes if needed. // The @@ -3471,6 +3673,20 @@ func (r *ProjectsTriggersService) List(projectId string) *ProjectsTriggersListCa return c } +// PageSize sets the optional parameter "pageSize": Number of results to +// return in the list. +func (c *ProjectsTriggersListCall) PageSize(pageSize int64) *ProjectsTriggersListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Token to provide +// to skip to a particular spot in the list. +func (c *ProjectsTriggersListCall) PageToken(pageToken string) *ProjectsTriggersListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -3577,6 +3793,17 @@ func (c *ProjectsTriggersListCall) Do(opts ...googleapi.CallOption) (*ListBuildT // "projectId" // ], // "parameters": { + // "pageSize": { + // "description": "Number of results to return in the list.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Token to provide to skip to a particular spot in the list.", + // "location": "query", + // "type": "string" + // }, // "projectId": { // "description": "ID of the project for which to list BuildTriggers.", // "location": "path", @@ -3595,6 +3822,27 @@ func (c *ProjectsTriggersListCall) Do(opts ...googleapi.CallOption) (*ListBuildT } +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsTriggersListCall) Pages(ctx context.Context, f func(*ListBuildTriggersResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + // method id "cloudbuild.projects.triggers.patch": type ProjectsTriggersPatchCall struct { diff --git a/vendor/google.golang.org/api/cloudfunctions/v1/cloudfunctions-api.json b/vendor/google.golang.org/api/cloudfunctions/v1/cloudfunctions-api.json index 963af7e9..fa46892e 100644 --- a/vendor/google.golang.org/api/cloudfunctions/v1/cloudfunctions-api.json +++ b/vendor/google.golang.org/api/cloudfunctions/v1/cloudfunctions-api.json @@ -139,12 +139,12 @@ "parameterOrder": [], "parameters": { "filter": { - "description": "The standard list filter.", + "description": "Required. A filter for matching the requested operations.\u003cbr\u003e\u003cbr\u003e The supported formats of \u003cb\u003efilter\u003c/b\u003e are:\u003cbr\u003e To query for specific function: \u003ccode\u003eproject:*,location:*,function:*\u003c/code\u003e\u003cbr\u003e To query for all of the latest operations for a project: \u003ccode\u003eproject:*,latest:true\u003c/code\u003e", "location": "query", "type": "string" }, "name": { - "description": "The name of the operation's parent resource.", + "description": "Must not be set.", "location": "query", "type": "string" }, @@ -220,7 +220,7 @@ "functions": { "methods": { "call": { - "description": "Synchronously invokes a deployed Cloud Function. To be used for testing\npurposes as very limited traffic is allowed. For more information on\nthe actual limits refer to [API Calls](\nhttps://cloud.google.com/functions/quotas#rate_limits).", + "description": "Synchronously invokes a deployed Cloud Function. To be used for testing\npurposes as very limited traffic is allowed. For more information on\nthe actual limits, refer to\n[Rate Limits](https://cloud.google.com/functions/quotas#rate_limits).", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/functions/{functionsId}:call", "httpMethod": "POST", "id": "cloudfunctions.projects.locations.functions.call", @@ -329,7 +329,7 @@ ] }, "generateUploadUrl": { - "description": "Returns a signed URL for uploading a function source code.\nFor more information about the signed URL usage see:\nhttps://cloud.google.com/storage/docs/access-control/signed-urls.\nOnce the function source code upload is complete, the used signed\nURL should be provided in CreateFunction or UpdateFunction request\nas a reference to the function source code.\n\nWhen uploading source code to the generated signed URL, please follow\nthese restrictions:\n\n* Source file type should be a zip file.\n* Source file size should not exceed 100MB limit.\n\nWhen making a HTTP PUT request, these two headers need to be specified:\n\n* `content-type: application/zip`\n* `x-goog-content-length-range: 0,104857600`", + "description": "Returns a signed URL for uploading a function source code.\nFor more information about the signed URL usage see:\nhttps://cloud.google.com/storage/docs/access-control/signed-urls.\nOnce the function source code upload is complete, the used signed\nURL should be provided in CreateFunction or UpdateFunction request\nas a reference to the function source code.\n\nWhen uploading source code to the generated signed URL, please follow\nthese restrictions:\n\n* Source file type should be a zip file.\n* Source file size should not exceed 100MB limit.\n* No credentials should be attached - the signed URLs provide access to the\n target bucket using internal service identity; if credentials were\n attached, the identity from the credentials would be used, but that\n identity does not have permissions to upload files to the URL.\n\nWhen making a HTTP PUT request, these two headers need to be specified:\n\n* `content-type: application/zip`\n* `x-goog-content-length-range: 0,104857600`\n\nAnd this header SHOULD NOT be specified:\n\n* `Authorization: Bearer YOUR_TOKEN`", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/functions:generateUploadUrl", "httpMethod": "POST", "id": "cloudfunctions.projects.locations.functions.generateUploadUrl", @@ -382,7 +382,7 @@ ] }, "getIamPolicy": { - "description": "Gets the access control policy for a resource.\nReturns an empty policy if the resource exists and does not have a policy\nset.", + "description": "Gets the IAM access control policy for a function.\nReturns an empty policy if the function exists and does not have a policy\nset.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/functions/{functionsId}:getIamPolicy", "httpMethod": "GET", "id": "cloudfunctions.projects.locations.functions.getIamPolicy", @@ -477,7 +477,7 @@ ] }, "setIamPolicy": { - "description": "Sets the access control policy on the specified resource. Replaces any\nexisting policy.", + "description": "Sets the IAM access control policy on the specified function.\nReplaces any existing policy.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/functions/{functionsId}:setIamPolicy", "httpMethod": "POST", "id": "cloudfunctions.projects.locations.functions.setIamPolicy", @@ -505,7 +505,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.\nIf the resource does not exist, this will return an empty set of\npermissions, not a NOT_FOUND error.\n\nNote: This operation is designed to be used for building permission-aware\nUIs and command-line tools, not for authorization checking. This operation\nmay \"fail open\" without warning.", + "description": "Tests the specified permissions against the IAM access control policy\nfor a function.\nIf the function does not exist, this will return an empty set of\npermissions, not a NOT_FOUND error.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/functions/{functionsId}:testIamPermissions", "httpMethod": "POST", "id": "cloudfunctions.projects.locations.functions.testIamPermissions", @@ -539,7 +539,7 @@ } } }, - "revision": "20181202", + "revision": "20190406", "rootUrl": "https://cloudfunctions.googleapis.com/", "schemas": { "AuditConfig": { @@ -596,10 +596,10 @@ "properties": { "condition": { "$ref": "Expr", - "description": "Unimplemented. The condition that is associated with this binding.\nNOTE: an unsatisfied condition will not allow user access via current\nbinding. Different bindings, including their conditions, are examined\nindependently." + "description": "The condition that is associated with this binding.\nNOTE: An unsatisfied condition will not allow user access via current\nbinding. Different bindings, including their conditions, are examined\nindependently." }, "members": { - "description": "Specifies the identities requesting access for a Cloud Platform resource.\n`members` can have the following values:\n\n* `allUsers`: A special identifier that represents anyone who is\n on the internet; with or without a Google account.\n\n* `allAuthenticatedUsers`: A special identifier that represents anyone\n who is authenticated with a Google account or a service account.\n\n* `user:{emailid}`: An email address that represents a specific Google\n account. For example, `alice@gmail.com` .\n\n\n* `serviceAccount:{emailid}`: An email address that represents a service\n account. For example, `my-other-app@appspot.gserviceaccount.com`.\n\n* `group:{emailid}`: An email address that represents a Google group.\n For example, `admins@example.com`.\n\n\n* `domain:{domain}`: A Google Apps domain name that represents all the\n users of that domain. For example, `google.com` or `example.com`.\n\n", + "description": "Specifies the identities requesting access for a Cloud Platform resource.\n`members` can have the following values:\n\n* `allUsers`: A special identifier that represents anyone who is\n on the internet; with or without a Google account.\n\n* `allAuthenticatedUsers`: A special identifier that represents anyone\n who is authenticated with a Google account or a service account.\n\n* `user:{emailid}`: An email address that represents a specific Google\n account. For example, `alice@gmail.com` .\n\n\n* `serviceAccount:{emailid}`: An email address that represents a service\n account. For example, `my-other-app@appspot.gserviceaccount.com`.\n\n* `group:{emailid}`: An email address that represents a Google group.\n For example, `admins@example.com`.\n\n\n* `domain:{domain}`: The G Suite domain (primary) that represents all the\n users of that domain. For example, `google.com` or `example.com`.\n\n", "items": { "type": "string" }, @@ -682,7 +682,7 @@ "type": "object" }, "maxInstances": { - "description": "The limit on the maximum number of function instances that may coexist at a\ngiven time. This feature is currently in alpha, available only for\nwhitelisted users.", + "description": "The limit on the maximum number of function instances that may coexist at a\ngiven time.", "format": "int32", "type": "integer" }, @@ -695,11 +695,11 @@ "type": "string" }, "runtime": { - "description": "The runtime in which the function is going to run. If empty, defaults to\nNode.js 6.", + "description": "Required. The runtime in which the function is going to run. Choices:\n\n* `nodejs6`: Node.js 6\n* `nodejs8`: Node.js 8\n* `nodejs10`: Node.js 10\n* `python37`: Python 3.7\n* `go111`: Go 1.11", "type": "string" }, "serviceAccountEmail": { - "description": "Output only. The email of the function's service account.", + "description": "The email of the function's service account. If empty, defaults to\n{project_id}@appspot.gserviceaccount.com.", "type": "string" }, "sourceArchiveUrl": { @@ -1146,7 +1146,7 @@ "type": "object" }, "Status": { - "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", + "description": "The `Status` type defines a logical error model that is suitable for\ndifferent programming environments, including REST APIs and RPC APIs. It is\nused by [gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error\nmessage, and error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", "id": "Status", "properties": { "code": { diff --git a/vendor/google.golang.org/api/cloudfunctions/v1/cloudfunctions-gen.go b/vendor/google.golang.org/api/cloudfunctions/v1/cloudfunctions-gen.go index fc234443..ac2fe1a1 100644 --- a/vendor/google.golang.org/api/cloudfunctions/v1/cloudfunctions-gen.go +++ b/vendor/google.golang.org/api/cloudfunctions/v1/cloudfunctions-gen.go @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. All rights reserved. +// Copyright 2019 Google LLC. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. @@ -6,13 +6,35 @@ // Package cloudfunctions provides access to the Cloud Functions API. // -// See https://cloud.google.com/functions +// For product documentation, see: https://cloud.google.com/functions +// +// Creating a client // // Usage example: // // import "google.golang.org/api/cloudfunctions/v1" // ... -// cloudfunctionsService, err := cloudfunctions.New(oauthHttpClient) +// ctx := context.Background() +// cloudfunctionsService, err := cloudfunctions.NewService(ctx) +// +// In this example, Google Application Default Credentials are used for authentication. +// +// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// +// Other authentication options +// +// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// +// cloudfunctionsService, err := cloudfunctions.NewService(ctx, option.WithAPIKey("AIza...")) +// +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// +// config := &oauth2.Config{...} +// // ... +// token, err := config.Exchange(ctx, ...) +// cloudfunctionsService, err := cloudfunctions.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) +// +// See https://godoc.org/google.golang.org/api/option/ for details on options. package cloudfunctions // import "google.golang.org/api/cloudfunctions/v1" import ( @@ -29,6 +51,8 @@ import ( gensupport "google.golang.org/api/gensupport" googleapi "google.golang.org/api/googleapi" + option "google.golang.org/api/option" + htransport "google.golang.org/api/transport/http" ) // Always reference these packages, just in case the auto-generated code @@ -56,6 +80,32 @@ const ( CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" ) +// NewService creates a new Service. +func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { + scopesOption := option.WithScopes( + "https://www.googleapis.com/auth/cloud-platform", + ) + // NOTE: prepend, so we don't override user-specified scopes. + opts = append([]option.ClientOption{scopesOption}, opts...) + client, endpoint, err := htransport.NewClient(ctx, opts...) + if err != nil { + return nil, err + } + s, err := New(client) + if err != nil { + return nil, err + } + if endpoint != "" { + s.BasePath = endpoint + } + return s, nil +} + +// New creates a new Service. It uses the provided http.Client for requests. +// +// Deprecated: please use NewService instead. +// To provide a custom HTTP client, use option.WithHTTPClient. +// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. func New(client *http.Client) (*Service, error) { if client == nil { return nil, errors.New("client is nil") @@ -281,9 +331,8 @@ func (s *AuditLogConfig) MarshalJSON() ([]byte, error) { // Binding: Associates `members` with a `role`. type Binding struct { - // Condition: Unimplemented. The condition that is associated with this - // binding. - // NOTE: an unsatisfied condition will not allow user access via + // Condition: The condition that is associated with this binding. + // NOTE: An unsatisfied condition will not allow user access via // current // binding. Different bindings, including their conditions, are // examined @@ -317,7 +366,7 @@ type Binding struct { // For example, `admins@example.com`. // // - // * `domain:{domain}`: A Google Apps domain name that represents all + // * `domain:{domain}`: The G Suite domain (primary) that represents all // the // users of that domain. For example, `google.com` or // `example.com`. @@ -466,9 +515,7 @@ type CloudFunction struct { // MaxInstances: The limit on the maximum number of function instances // that may coexist at a - // given time. This feature is currently in alpha, available only - // for - // whitelisted users. + // given time. MaxInstances int64 `json:"maxInstances,omitempty"` // Name: A user-defined name of the function. Function names must be @@ -504,13 +551,19 @@ type CloudFunction struct { // users. Network string `json:"network,omitempty"` - // Runtime: The runtime in which the function is going to run. If empty, - // defaults to - // Node.js 6. + // Runtime: Required. The runtime in which the function is going to run. + // Choices: + // + // * `nodejs6`: Node.js 6 + // * `nodejs8`: Node.js 8 + // * `nodejs10`: Node.js 10 + // * `python37`: Python 3.7 + // * `go111`: Go 1.11 Runtime string `json:"runtime,omitempty"` - // ServiceAccountEmail: Output only. The email of the function's service - // account. + // ServiceAccountEmail: The email of the function's service account. If + // empty, defaults to + // {project_id}@appspot.gserviceaccount.com. ServiceAccountEmail string `json:"serviceAccountEmail,omitempty"` // SourceArchiveUrl: The Google Cloud Storage URL, starting with gs://, @@ -1473,20 +1526,20 @@ func (s *SourceRepository) MarshalJSON() ([]byte, error) { } // Status: The `Status` type defines a logical error model that is -// suitable for different -// programming environments, including REST APIs and RPC APIs. It is -// used by -// [gRPC](https://github.com/grpc). The error model is designed to -// be: +// suitable for +// different programming environments, including REST APIs and RPC APIs. +// It is +// used by [gRPC](https://github.com/grpc). The error model is designed +// to be: // // - Simple to use and understand for most users // - Flexible enough to meet unexpected needs // // # Overview // -// The `Status` message contains three pieces of data: error code, error -// message, -// and error details. The error code should be an enum value +// The `Status` message contains three pieces of data: error code, +// error +// message, and error details. The error code should be an enum value // of // google.rpc.Code, but it may accept additional error codes if needed. // The @@ -1840,15 +1893,18 @@ func (r *OperationsService) List() *OperationsListCall { return c } -// Filter sets the optional parameter "filter": The standard list -// filter. +// Filter sets the optional parameter "filter": Required. A filter for +// matching the requested operations.

The supported formats of +// filter are:
To query for specific function: +// project:*,location:*,function:*
To query for all of +// the latest operations for a project: +// project:*,latest:true func (c *OperationsListCall) Filter(filter string) *OperationsListCall { c.urlParams_.Set("filter", filter) return c } -// Name sets the optional parameter "name": The name of the operation's -// parent resource. +// Name sets the optional parameter "name": Must not be set. func (c *OperationsListCall) Name(name string) *OperationsListCall { c.urlParams_.Set("name", name) return c @@ -1970,12 +2026,12 @@ func (c *OperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsRe // "parameterOrder": [], // "parameters": { // "filter": { - // "description": "The standard list filter.", + // "description": "Required. A filter for matching the requested operations.\u003cbr\u003e\u003cbr\u003e The supported formats of \u003cb\u003efilter\u003c/b\u003e are:\u003cbr\u003e To query for specific function: \u003ccode\u003eproject:*,location:*,function:*\u003c/code\u003e\u003cbr\u003e To query for all of the latest operations for a project: \u003ccode\u003eproject:*,latest:true\u003c/code\u003e", // "location": "query", // "type": "string" // }, // "name": { - // "description": "The name of the operation's parent resource.", + // "description": "Must not be set.", // "location": "query", // "type": "string" // }, @@ -2240,9 +2296,8 @@ type ProjectsLocationsFunctionsCallCall struct { // testing // purposes as very limited traffic is allowed. For more information // on -// the actual limits refer to [API -// Calls]( -// https://cloud.google.com/functions/quotas#rate_limits). +// the actual limits, refer to +// [Rate Limits](https://cloud.google.com/functions/quotas#rate_limits). func (r *ProjectsLocationsFunctionsService) Call(name string, callfunctionrequest *CallFunctionRequest) *ProjectsLocationsFunctionsCallCall { c := &ProjectsLocationsFunctionsCallCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -2340,7 +2395,7 @@ func (c *ProjectsLocationsFunctionsCallCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Synchronously invokes a deployed Cloud Function. To be used for testing\npurposes as very limited traffic is allowed. For more information on\nthe actual limits refer to [API Calls](\nhttps://cloud.google.com/functions/quotas#rate_limits).", + // "description": "Synchronously invokes a deployed Cloud Function. To be used for testing\npurposes as very limited traffic is allowed. For more information on\nthe actual limits, refer to\n[Rate Limits](https://cloud.google.com/functions/quotas#rate_limits).", // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/functions/{functionsId}:call", // "httpMethod": "POST", // "id": "cloudfunctions.projects.locations.functions.call", @@ -2819,12 +2874,23 @@ type ProjectsLocationsFunctionsGenerateUploadUrlCall struct { // // * Source file type should be a zip file. // * Source file size should not exceed 100MB limit. +// * No credentials should be attached - the signed URLs provide access +// to the +// target bucket using internal service identity; if credentials were +// attached, the identity from the credentials would be used, but +// that +// identity does not have permissions to upload files to the +// URL. // // When making a HTTP PUT request, these two headers need to be // specified: // // * `content-type: application/zip` // * `x-goog-content-length-range: 0,104857600` +// +// And this header SHOULD NOT be specified: +// +// * `Authorization: Bearer YOUR_TOKEN` func (r *ProjectsLocationsFunctionsService) GenerateUploadUrl(parent string, generateuploadurlrequest *GenerateUploadUrlRequest) *ProjectsLocationsFunctionsGenerateUploadUrlCall { c := &ProjectsLocationsFunctionsGenerateUploadUrlCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -2922,7 +2988,7 @@ func (c *ProjectsLocationsFunctionsGenerateUploadUrlCall) Do(opts ...googleapi.C } return ret, nil // { - // "description": "Returns a signed URL for uploading a function source code.\nFor more information about the signed URL usage see:\nhttps://cloud.google.com/storage/docs/access-control/signed-urls.\nOnce the function source code upload is complete, the used signed\nURL should be provided in CreateFunction or UpdateFunction request\nas a reference to the function source code.\n\nWhen uploading source code to the generated signed URL, please follow\nthese restrictions:\n\n* Source file type should be a zip file.\n* Source file size should not exceed 100MB limit.\n\nWhen making a HTTP PUT request, these two headers need to be specified:\n\n* `content-type: application/zip`\n* `x-goog-content-length-range: 0,104857600`", + // "description": "Returns a signed URL for uploading a function source code.\nFor more information about the signed URL usage see:\nhttps://cloud.google.com/storage/docs/access-control/signed-urls.\nOnce the function source code upload is complete, the used signed\nURL should be provided in CreateFunction or UpdateFunction request\nas a reference to the function source code.\n\nWhen uploading source code to the generated signed URL, please follow\nthese restrictions:\n\n* Source file type should be a zip file.\n* Source file size should not exceed 100MB limit.\n* No credentials should be attached - the signed URLs provide access to the\n target bucket using internal service identity; if credentials were\n attached, the identity from the credentials would be used, but that\n identity does not have permissions to upload files to the URL.\n\nWhen making a HTTP PUT request, these two headers need to be specified:\n\n* `content-type: application/zip`\n* `x-goog-content-length-range: 0,104857600`\n\nAnd this header SHOULD NOT be specified:\n\n* `Authorization: Bearer YOUR_TOKEN`", // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/functions:generateUploadUrl", // "httpMethod": "POST", // "id": "cloudfunctions.projects.locations.functions.generateUploadUrl", @@ -3107,8 +3173,9 @@ type ProjectsLocationsFunctionsGetIamPolicyCall struct { header_ http.Header } -// GetIamPolicy: Gets the access control policy for a resource. -// Returns an empty policy if the resource exists and does not have a +// GetIamPolicy: Gets the IAM access control policy for a +// function. +// Returns an empty policy if the function exists and does not have a // policy // set. func (r *ProjectsLocationsFunctionsService) GetIamPolicy(resource string) *ProjectsLocationsFunctionsGetIamPolicyCall { @@ -3215,7 +3282,7 @@ func (c *ProjectsLocationsFunctionsGetIamPolicyCall) Do(opts ...googleapi.CallOp } return ret, nil // { - // "description": "Gets the access control policy for a resource.\nReturns an empty policy if the resource exists and does not have a policy\nset.", + // "description": "Gets the IAM access control policy for a function.\nReturns an empty policy if the function exists and does not have a policy\nset.", // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/functions/{functionsId}:getIamPolicy", // "httpMethod": "GET", // "id": "cloudfunctions.projects.locations.functions.getIamPolicy", @@ -3599,9 +3666,9 @@ type ProjectsLocationsFunctionsSetIamPolicyCall struct { header_ http.Header } -// SetIamPolicy: Sets the access control policy on the specified -// resource. Replaces any -// existing policy. +// SetIamPolicy: Sets the IAM access control policy on the specified +// function. +// Replaces any existing policy. func (r *ProjectsLocationsFunctionsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsFunctionsSetIamPolicyCall { c := &ProjectsLocationsFunctionsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.resource = resource @@ -3699,7 +3766,7 @@ func (c *ProjectsLocationsFunctionsSetIamPolicyCall) Do(opts ...googleapi.CallOp } return ret, nil // { - // "description": "Sets the access control policy on the specified resource. Replaces any\nexisting policy.", + // "description": "Sets the IAM access control policy on the specified function.\nReplaces any existing policy.", // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/functions/{functionsId}:setIamPolicy", // "httpMethod": "POST", // "id": "cloudfunctions.projects.locations.functions.setIamPolicy", @@ -3740,17 +3807,12 @@ type ProjectsLocationsFunctionsTestIamPermissionsCall struct { header_ http.Header } -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. -// If the resource does not exist, this will return an empty set +// TestIamPermissions: Tests the specified permissions against the IAM +// access control policy +// for a function. +// If the function does not exist, this will return an empty set // of // permissions, not a NOT_FOUND error. -// -// Note: This operation is designed to be used for building -// permission-aware -// UIs and command-line tools, not for authorization checking. This -// operation -// may "fail open" without warning. func (r *ProjectsLocationsFunctionsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsFunctionsTestIamPermissionsCall { c := &ProjectsLocationsFunctionsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.resource = resource @@ -3848,7 +3910,7 @@ func (c *ProjectsLocationsFunctionsTestIamPermissionsCall) Do(opts ...googleapi. } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.\nIf the resource does not exist, this will return an empty set of\npermissions, not a NOT_FOUND error.\n\nNote: This operation is designed to be used for building permission-aware\nUIs and command-line tools, not for authorization checking. This operation\nmay \"fail open\" without warning.", + // "description": "Tests the specified permissions against the IAM access control policy\nfor a function.\nIf the function does not exist, this will return an empty set of\npermissions, not a NOT_FOUND error.", // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/functions/{functionsId}:testIamPermissions", // "httpMethod": "POST", // "id": "cloudfunctions.projects.locations.functions.testIamPermissions", diff --git a/vendor/google.golang.org/api/cloudiot/v1/cloudiot-api.json b/vendor/google.golang.org/api/cloudiot/v1/cloudiot-api.json index 0399858b..278dba8c 100644 --- a/vendor/google.golang.org/api/cloudiot/v1/cloudiot-api.json +++ b/vendor/google.golang.org/api/cloudiot/v1/cloudiot-api.json @@ -1184,7 +1184,7 @@ } } }, - "revision": "20181120", + "revision": "20190409", "rootUrl": "https://cloudiot.googleapis.com/", "schemas": { "BindDeviceToGatewayRequest": { @@ -1214,10 +1214,10 @@ "properties": { "condition": { "$ref": "Expr", - "description": "Unimplemented. The condition that is associated with this binding.\nNOTE: an unsatisfied condition will not allow user access via current\nbinding. Different bindings, including their conditions, are examined\nindependently." + "description": "The condition that is associated with this binding.\nNOTE: An unsatisfied condition will not allow user access via current\nbinding. Different bindings, including their conditions, are examined\nindependently." }, "members": { - "description": "Specifies the identities requesting access for a Cloud Platform resource.\n`members` can have the following values:\n\n* `allUsers`: A special identifier that represents anyone who is\n on the internet; with or without a Google account.\n\n* `allAuthenticatedUsers`: A special identifier that represents anyone\n who is authenticated with a Google account or a service account.\n\n* `user:{emailid}`: An email address that represents a specific Google\n account. For example, `alice@gmail.com` .\n\n\n* `serviceAccount:{emailid}`: An email address that represents a service\n account. For example, `my-other-app@appspot.gserviceaccount.com`.\n\n* `group:{emailid}`: An email address that represents a Google group.\n For example, `admins@example.com`.\n\n\n* `domain:{domain}`: A Google Apps domain name that represents all the\n users of that domain. For example, `google.com` or `example.com`.\n\n", + "description": "Specifies the identities requesting access for a Cloud Platform resource.\n`members` can have the following values:\n\n* `allUsers`: A special identifier that represents anyone who is\n on the internet; with or without a Google account.\n\n* `allAuthenticatedUsers`: A special identifier that represents anyone\n who is authenticated with a Google account or a service account.\n\n* `user:{emailid}`: An email address that represents a specific Google\n account. For example, `alice@gmail.com` .\n\n\n* `serviceAccount:{emailid}`: An email address that represents a service\n account. For example, `my-other-app@appspot.gserviceaccount.com`.\n\n* `group:{emailid}`: An email address that represents a Google group.\n For example, `admins@example.com`.\n\n\n* `domain:{domain}`: The G Suite domain (primary) that represents all the\n users of that domain. For example, `google.com` or `example.com`.\n\n", "items": { "type": "string" }, @@ -1806,7 +1806,7 @@ "type": "object" }, "Status": { - "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", + "description": "The `Status` type defines a logical error model that is suitable for\ndifferent programming environments, including REST APIs and RPC APIs. It is\nused by [gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error\nmessage, and error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", "id": "Status", "properties": { "code": { diff --git a/vendor/google.golang.org/api/cloudiot/v1/cloudiot-gen.go b/vendor/google.golang.org/api/cloudiot/v1/cloudiot-gen.go index 50e4306b..876b2c9c 100644 --- a/vendor/google.golang.org/api/cloudiot/v1/cloudiot-gen.go +++ b/vendor/google.golang.org/api/cloudiot/v1/cloudiot-gen.go @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. All rights reserved. +// Copyright 2019 Google LLC. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. @@ -6,13 +6,39 @@ // Package cloudiot provides access to the Cloud IoT API. // -// See https://cloud.google.com/iot +// For product documentation, see: https://cloud.google.com/iot +// +// Creating a client // // Usage example: // // import "google.golang.org/api/cloudiot/v1" // ... -// cloudiotService, err := cloudiot.New(oauthHttpClient) +// ctx := context.Background() +// cloudiotService, err := cloudiot.NewService(ctx) +// +// In this example, Google Application Default Credentials are used for authentication. +// +// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// +// Other authentication options +// +// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// +// cloudiotService, err := cloudiot.NewService(ctx, option.WithScopes(cloudiot.CloudiotScope)) +// +// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// +// cloudiotService, err := cloudiot.NewService(ctx, option.WithAPIKey("AIza...")) +// +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// +// config := &oauth2.Config{...} +// // ... +// token, err := config.Exchange(ctx, ...) +// cloudiotService, err := cloudiot.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) +// +// See https://godoc.org/google.golang.org/api/option/ for details on options. package cloudiot // import "google.golang.org/api/cloudiot/v1" import ( @@ -29,6 +55,8 @@ import ( gensupport "google.golang.org/api/gensupport" googleapi "google.golang.org/api/googleapi" + option "google.golang.org/api/option" + htransport "google.golang.org/api/transport/http" ) // Always reference these packages, just in case the auto-generated code @@ -59,6 +87,33 @@ const ( CloudiotScope = "https://www.googleapis.com/auth/cloudiot" ) +// NewService creates a new Service. +func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { + scopesOption := option.WithScopes( + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudiot", + ) + // NOTE: prepend, so we don't override user-specified scopes. + opts = append([]option.ClientOption{scopesOption}, opts...) + client, endpoint, err := htransport.NewClient(ctx, opts...) + if err != nil { + return nil, err + } + s, err := New(client) + if err != nil { + return nil, err + } + if endpoint != "" { + s.BasePath = endpoint + } + return s, nil +} + +// New creates a new Service. It uses the provided http.Client for requests. +// +// Deprecated: please use NewService instead. +// To provide a custom HTTP client, use option.WithHTTPClient. +// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. func New(client *http.Client) (*Service, error) { if client == nil { return nil, errors.New("client is nil") @@ -246,9 +301,8 @@ type BindDeviceToGatewayResponse struct { // Binding: Associates `members` with a `role`. type Binding struct { - // Condition: Unimplemented. The condition that is associated with this - // binding. - // NOTE: an unsatisfied condition will not allow user access via + // Condition: The condition that is associated with this binding. + // NOTE: An unsatisfied condition will not allow user access via // current // binding. Different bindings, including their conditions, are // examined @@ -282,7 +336,7 @@ type Binding struct { // For example, `admins@example.com`. // // - // * `domain:{domain}`: A Google Apps domain name that represents all + // * `domain:{domain}`: The G Suite domain (primary) that represents all // the // users of that domain. For example, `google.com` or // `example.com`. @@ -1572,20 +1626,20 @@ func (s *StateNotificationConfig) MarshalJSON() ([]byte, error) { } // Status: The `Status` type defines a logical error model that is -// suitable for different -// programming environments, including REST APIs and RPC APIs. It is -// used by -// [gRPC](https://github.com/grpc). The error model is designed to -// be: +// suitable for +// different programming environments, including REST APIs and RPC APIs. +// It is +// used by [gRPC](https://github.com/grpc). The error model is designed +// to be: // // - Simple to use and understand for most users // - Flexible enough to meet unexpected needs // // # Overview // -// The `Status` message contains three pieces of data: error code, error -// message, -// and error details. The error code should be an enum value +// The `Status` message contains three pieces of data: error code, +// error +// message, and error details. The error code should be an enum value // of // google.rpc.Code, but it may accept additional error codes if needed. // The diff --git a/vendor/google.golang.org/api/cloudkms/v1/cloudkms-api.json b/vendor/google.golang.org/api/cloudkms/v1/cloudkms-api.json index b6063ef1..56fe6c2a 100644 --- a/vendor/google.golang.org/api/cloudkms/v1/cloudkms-api.json +++ b/vendor/google.golang.org/api/cloudkms/v1/cloudkms-api.json @@ -4,6 +4,9 @@ "scopes": { "https://www.googleapis.com/auth/cloud-platform": { "description": "View and manage your data across Google Cloud Platform services" + }, + "https://www.googleapis.com/auth/cloudkms": { + "description": "View and manage your keys and secrets stored in Cloud Key Management Service" } } } @@ -130,7 +133,8 @@ "$ref": "Location" }, "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudkms" ] }, "list": { @@ -171,7 +175,8 @@ "$ref": "ListLocationsResponse" }, "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudkms" ] } }, @@ -208,7 +213,8 @@ "$ref": "KeyRing" }, "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudkms" ] }, "get": { @@ -233,7 +239,8 @@ "$ref": "KeyRing" }, "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudkms" ] }, "getIamPolicy": { @@ -258,7 +265,8 @@ "$ref": "Policy" }, "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudkms" ] }, "list": { @@ -294,7 +302,8 @@ "$ref": "ListKeyRingsResponse" }, "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudkms" ] }, "setIamPolicy": { @@ -322,7 +331,8 @@ "$ref": "Policy" }, "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudkms" ] }, "testIamPermissions": { @@ -350,7 +360,8 @@ "$ref": "TestIamPermissionsResponse" }, "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudkms" ] } }, @@ -387,7 +398,8 @@ "$ref": "CryptoKey" }, "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudkms" ] }, "decrypt": { @@ -415,7 +427,8 @@ "$ref": "DecryptResponse" }, "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudkms" ] }, "encrypt": { @@ -443,7 +456,8 @@ "$ref": "EncryptResponse" }, "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudkms" ] }, "get": { @@ -468,7 +482,8 @@ "$ref": "CryptoKey" }, "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudkms" ] }, "getIamPolicy": { @@ -493,7 +508,8 @@ "$ref": "Policy" }, "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudkms" ] }, "list": { @@ -538,7 +554,8 @@ "$ref": "ListCryptoKeysResponse" }, "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudkms" ] }, "patch": { @@ -572,7 +589,8 @@ "$ref": "CryptoKey" }, "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudkms" ] }, "setIamPolicy": { @@ -600,7 +618,8 @@ "$ref": "Policy" }, "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudkms" ] }, "testIamPermissions": { @@ -628,7 +647,8 @@ "$ref": "TestIamPermissionsResponse" }, "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudkms" ] }, "updatePrimaryVersion": { @@ -656,7 +676,8 @@ "$ref": "CryptoKey" }, "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudkms" ] } }, @@ -688,7 +709,8 @@ "$ref": "AsymmetricDecryptResponse" }, "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudkms" ] }, "asymmetricSign": { @@ -716,7 +738,8 @@ "$ref": "AsymmetricSignResponse" }, "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudkms" ] }, "create": { @@ -744,7 +767,8 @@ "$ref": "CryptoKeyVersion" }, "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudkms" ] }, "destroy": { @@ -772,7 +796,8 @@ "$ref": "CryptoKeyVersion" }, "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudkms" ] }, "get": { @@ -797,7 +822,8 @@ "$ref": "CryptoKeyVersion" }, "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudkms" ] }, "getPublicKey": { @@ -822,7 +848,8 @@ "$ref": "PublicKey" }, "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudkms" ] }, "list": { @@ -867,7 +894,8 @@ "$ref": "ListCryptoKeyVersionsResponse" }, "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudkms" ] }, "patch": { @@ -901,7 +929,8 @@ "$ref": "CryptoKeyVersion" }, "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudkms" ] }, "restore": { @@ -929,7 +958,8 @@ "$ref": "CryptoKeyVersion" }, "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudkms" ] } } @@ -960,7 +990,8 @@ "$ref": "Policy" }, "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudkms" ] }, "setIamPolicy": { @@ -988,7 +1019,8 @@ "$ref": "Policy" }, "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudkms" ] }, "testIamPermissions": { @@ -1016,7 +1048,8 @@ "$ref": "TestIamPermissionsResponse" }, "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudkms" ] } } @@ -1028,7 +1061,7 @@ } } }, - "revision": "20181210", + "revision": "20190321", "rootUrl": "https://cloudkms.googleapis.com/", "schemas": { "AsymmetricDecryptRequest": { @@ -1132,10 +1165,10 @@ "properties": { "condition": { "$ref": "Expr", - "description": "Unimplemented. The condition that is associated with this binding.\nNOTE: an unsatisfied condition will not allow user access via current\nbinding. Different bindings, including their conditions, are examined\nindependently." + "description": "The condition that is associated with this binding.\nNOTE: an unsatisfied condition will not allow user access via current\nbinding. Different bindings, including their conditions, are examined\nindependently." }, "members": { - "description": "Specifies the identities requesting access for a Cloud Platform resource.\n`members` can have the following values:\n\n* `allUsers`: A special identifier that represents anyone who is\n on the internet; with or without a Google account.\n\n* `allAuthenticatedUsers`: A special identifier that represents anyone\n who is authenticated with a Google account or a service account.\n\n* `user:{emailid}`: An email address that represents a specific Google\n account. For example, `alice@gmail.com` .\n\n\n* `serviceAccount:{emailid}`: An email address that represents a service\n account. For example, `my-other-app@appspot.gserviceaccount.com`.\n\n* `group:{emailid}`: An email address that represents a Google group.\n For example, `admins@example.com`.\n\n\n* `domain:{domain}`: A Google Apps domain name that represents all the\n users of that domain. For example, `google.com` or `example.com`.\n\n", + "description": "Specifies the identities requesting access for a Cloud Platform resource.\n`members` can have the following values:\n\n* `allUsers`: A special identifier that represents anyone who is\n on the internet; with or without a Google account.\n\n* `allAuthenticatedUsers`: A special identifier that represents anyone\n who is authenticated with a Google account or a service account.\n\n* `user:{emailid}`: An email address that represents a specific Google\n account. For example, `alice@gmail.com` .\n\n\n* `serviceAccount:{emailid}`: An email address that represents a service\n account. For example, `my-other-app@appspot.gserviceaccount.com`.\n\n* `group:{emailid}`: An email address that represents a Google group.\n For example, `admins@example.com`.\n\n\n* `domain:{domain}`: The G Suite domain (primary) that represents all the\n users of that domain. For example, `google.com` or `example.com`.\n\n", "items": { "type": "string" }, @@ -1489,7 +1522,7 @@ "type": "object" }, "KeyOperationAttestation": { - "description": "Contains an HSM-generated attestation about a key operation.", + "description": "Contains an HSM-generated attestation about a key operation. For more\ninformation, see [Verifying attestations]\n(https://cloud.google.com/kms/docs/attest-key).", "id": "KeyOperationAttestation", "properties": { "content": { @@ -1501,11 +1534,13 @@ "description": "Output only. The format of the attestation data.", "enum": [ "ATTESTATION_FORMAT_UNSPECIFIED", - "CAVIUM_V1_COMPRESSED" + "CAVIUM_V1_COMPRESSED", + "CAVIUM_V2_COMPRESSED" ], "enumDescriptions": [ "Not specified.", - "Cavium HSM attestation compressed with gzip. Note that this format is\ndefined by Cavium and subject to change at any time." + "Cavium HSM attestation compressed with gzip. Note that this format is\ndefined by Cavium and subject to change at any time.", + "Cavium HSM attestation V2 compressed with gzip. This is a new format\nintroduced in Cavium's version 3.2-08." ], "type": "string" } diff --git a/vendor/google.golang.org/api/cloudkms/v1/cloudkms-gen.go b/vendor/google.golang.org/api/cloudkms/v1/cloudkms-gen.go index 113c59db..e30a0e3b 100644 --- a/vendor/google.golang.org/api/cloudkms/v1/cloudkms-gen.go +++ b/vendor/google.golang.org/api/cloudkms/v1/cloudkms-gen.go @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. All rights reserved. +// Copyright 2019 Google LLC. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. @@ -8,13 +8,39 @@ // // This package is DEPRECATED. Use package cloud.google.com/go/kms/apiv1 instead. // -// See https://cloud.google.com/kms/ +// For product documentation, see: https://cloud.google.com/kms/ +// +// Creating a client // // Usage example: // // import "google.golang.org/api/cloudkms/v1" // ... -// cloudkmsService, err := cloudkms.New(oauthHttpClient) +// ctx := context.Background() +// cloudkmsService, err := cloudkms.NewService(ctx) +// +// In this example, Google Application Default Credentials are used for authentication. +// +// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// +// Other authentication options +// +// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// +// cloudkmsService, err := cloudkms.NewService(ctx, option.WithScopes(cloudkms.CloudkmsScope)) +// +// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// +// cloudkmsService, err := cloudkms.NewService(ctx, option.WithAPIKey("AIza...")) +// +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// +// config := &oauth2.Config{...} +// // ... +// token, err := config.Exchange(ctx, ...) +// cloudkmsService, err := cloudkms.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) +// +// See https://godoc.org/google.golang.org/api/option/ for details on options. package cloudkms // import "google.golang.org/api/cloudkms/v1" import ( @@ -31,6 +57,8 @@ import ( gensupport "google.golang.org/api/gensupport" googleapi "google.golang.org/api/googleapi" + option "google.golang.org/api/option" + htransport "google.golang.org/api/transport/http" ) // Always reference these packages, just in case the auto-generated code @@ -56,8 +84,39 @@ const basePath = "https://cloudkms.googleapis.com/" const ( // View and manage your data across Google Cloud Platform services CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" + + // View and manage your keys and secrets stored in Cloud Key Management + // Service + CloudkmsScope = "https://www.googleapis.com/auth/cloudkms" ) +// NewService creates a new Service. +func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { + scopesOption := option.WithScopes( + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudkms", + ) + // NOTE: prepend, so we don't override user-specified scopes. + opts = append([]option.ClientOption{scopesOption}, opts...) + client, endpoint, err := htransport.NewClient(ctx, opts...) + if err != nil { + return nil, err + } + s, err := New(client) + if err != nil { + return nil, err + } + if endpoint != "" { + s.BasePath = endpoint + } + return s, nil +} + +// New creates a new Service. It uses the provided http.Client for requests. +// +// Deprecated: please use NewService instead. +// To provide a custom HTTP client, use option.WithHTTPClient. +// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. func New(client *http.Client) (*Service, error) { if client == nil { return nil, errors.New("client is nil") @@ -438,8 +497,7 @@ func (s *AuditLogConfig) MarshalJSON() ([]byte, error) { // Binding: Associates `members` with a `role`. type Binding struct { - // Condition: Unimplemented. The condition that is associated with this - // binding. + // Condition: The condition that is associated with this binding. // NOTE: an unsatisfied condition will not allow user access via // current // binding. Different bindings, including their conditions, are @@ -474,7 +532,7 @@ type Binding struct { // For example, `admins@example.com`. // // - // * `domain:{domain}`: A Google Apps domain name that represents all + // * `domain:{domain}`: The G Suite domain (primary) that represents all // the // users of that domain. For example, `google.com` or // `example.com`. @@ -1105,7 +1163,10 @@ func (s *Expr) MarshalJSON() ([]byte, error) { } // KeyOperationAttestation: Contains an HSM-generated attestation about -// a key operation. +// a key operation. For more +// information, see [Verifying +// attestations] +// (https://cloud.google.com/kms/docs/attest-key). type KeyOperationAttestation struct { // Content: Output only. The attestation data provided by the HSM when // the key @@ -1119,6 +1180,9 @@ type KeyOperationAttestation struct { // "CAVIUM_V1_COMPRESSED" - Cavium HSM attestation compressed with // gzip. Note that this format is // defined by Cavium and subject to change at any time. + // "CAVIUM_V2_COMPRESSED" - Cavium HSM attestation V2 compressed with + // gzip. This is a new format + // introduced in Cavium's version 3.2-08. Format string `json:"format,omitempty"` // ForceSendFields is a list of field names (e.g. "Content") to @@ -1903,7 +1967,8 @@ func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, // "$ref": "Location" // }, // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloudkms" // ] // } @@ -2084,7 +2149,8 @@ func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocat // "$ref": "ListLocationsResponse" // }, // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloudkms" // ] // } @@ -2257,7 +2323,8 @@ func (c *ProjectsLocationsKeyRingsCreateCall) Do(opts ...googleapi.CallOption) ( // "$ref": "KeyRing" // }, // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloudkms" // ] // } @@ -2400,7 +2467,8 @@ func (c *ProjectsLocationsKeyRingsGetCall) Do(opts ...googleapi.CallOption) (*Ke // "$ref": "KeyRing" // }, // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloudkms" // ] // } @@ -2546,7 +2614,8 @@ func (c *ProjectsLocationsKeyRingsGetIamPolicyCall) Do(opts ...googleapi.CallOpt // "$ref": "Policy" // }, // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloudkms" // ] // } @@ -2721,7 +2790,8 @@ func (c *ProjectsLocationsKeyRingsListCall) Do(opts ...googleapi.CallOption) (*L // "$ref": "ListKeyRingsResponse" // }, // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloudkms" // ] // } @@ -2883,7 +2953,8 @@ func (c *ProjectsLocationsKeyRingsSetIamPolicyCall) Do(opts ...googleapi.CallOpt // "$ref": "Policy" // }, // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloudkms" // ] // } @@ -3032,7 +3103,8 @@ func (c *ProjectsLocationsKeyRingsTestIamPermissionsCall) Do(opts ...googleapi.C // "$ref": "TestIamPermissionsResponse" // }, // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloudkms" // ] // } @@ -3188,7 +3260,8 @@ func (c *ProjectsLocationsKeyRingsCryptoKeysCreateCall) Do(opts ...googleapi.Cal // "$ref": "CryptoKey" // }, // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloudkms" // ] // } @@ -3329,7 +3402,8 @@ func (c *ProjectsLocationsKeyRingsCryptoKeysDecryptCall) Do(opts ...googleapi.Ca // "$ref": "DecryptResponse" // }, // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloudkms" // ] // } @@ -3471,7 +3545,8 @@ func (c *ProjectsLocationsKeyRingsCryptoKeysEncryptCall) Do(opts ...googleapi.Ca // "$ref": "EncryptResponse" // }, // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloudkms" // ] // } @@ -3615,7 +3690,8 @@ func (c *ProjectsLocationsKeyRingsCryptoKeysGetCall) Do(opts ...googleapi.CallOp // "$ref": "CryptoKey" // }, // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloudkms" // ] // } @@ -3761,7 +3837,8 @@ func (c *ProjectsLocationsKeyRingsCryptoKeysGetIamPolicyCall) Do(opts ...googlea // "$ref": "Policy" // }, // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloudkms" // ] // } @@ -3957,7 +4034,8 @@ func (c *ProjectsLocationsKeyRingsCryptoKeysListCall) Do(opts ...googleapi.CallO // "$ref": "ListCryptoKeysResponse" // }, // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloudkms" // ] // } @@ -4130,7 +4208,8 @@ func (c *ProjectsLocationsKeyRingsCryptoKeysPatchCall) Do(opts ...googleapi.Call // "$ref": "CryptoKey" // }, // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloudkms" // ] // } @@ -4271,7 +4350,8 @@ func (c *ProjectsLocationsKeyRingsCryptoKeysSetIamPolicyCall) Do(opts ...googlea // "$ref": "Policy" // }, // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloudkms" // ] // } @@ -4420,7 +4500,8 @@ func (c *ProjectsLocationsKeyRingsCryptoKeysTestIamPermissionsCall) Do(opts ...g // "$ref": "TestIamPermissionsResponse" // }, // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloudkms" // ] // } @@ -4562,7 +4643,8 @@ func (c *ProjectsLocationsKeyRingsCryptoKeysUpdatePrimaryVersionCall) Do(opts .. // "$ref": "CryptoKey" // }, // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloudkms" // ] // } @@ -4705,7 +4787,8 @@ func (c *ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsAsymmetricDecryptCa // "$ref": "AsymmetricDecryptResponse" // }, // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloudkms" // ] // } @@ -4848,7 +4931,8 @@ func (c *ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsAsymmetricSignCall) // "$ref": "AsymmetricSignResponse" // }, // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloudkms" // ] // } @@ -4991,7 +5075,8 @@ func (c *ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsCreateCall) Do(opts // "$ref": "CryptoKeyVersion" // }, // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloudkms" // ] // } @@ -5142,7 +5227,8 @@ func (c *ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsDestroyCall) Do(opt // "$ref": "CryptoKeyVersion" // }, // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloudkms" // ] // } @@ -5285,7 +5371,8 @@ func (c *ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsGetCall) Do(opts .. // "$ref": "CryptoKeyVersion" // }, // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloudkms" // ] // } @@ -5432,7 +5519,8 @@ func (c *ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsGetPublicKeyCall) D // "$ref": "PublicKey" // }, // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloudkms" // ] // } @@ -5628,7 +5716,8 @@ func (c *ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsListCall) Do(opts . // "$ref": "ListCryptoKeyVersionsResponse" // }, // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloudkms" // ] // } @@ -5808,7 +5897,8 @@ func (c *ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsPatchCall) Do(opts // "$ref": "CryptoKeyVersion" // }, // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloudkms" // ] // } @@ -5954,7 +6044,8 @@ func (c *ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsRestoreCall) Do(opt // "$ref": "CryptoKeyVersion" // }, // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloudkms" // ] // } @@ -6100,7 +6191,8 @@ func (c *ProjectsLocationsKeyRingsImportJobsGetIamPolicyCall) Do(opts ...googlea // "$ref": "Policy" // }, // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloudkms" // ] // } @@ -6241,7 +6333,8 @@ func (c *ProjectsLocationsKeyRingsImportJobsSetIamPolicyCall) Do(opts ...googlea // "$ref": "Policy" // }, // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloudkms" // ] // } @@ -6390,7 +6483,8 @@ func (c *ProjectsLocationsKeyRingsImportJobsTestIamPermissionsCall) Do(opts ...g // "$ref": "TestIamPermissionsResponse" // }, // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloudkms" // ] // } diff --git a/vendor/google.golang.org/api/cloudresourcemanager/v1/cloudresourcemanager-api.json b/vendor/google.golang.org/api/cloudresourcemanager/v1/cloudresourcemanager-api.json index ee94510f..88f0e014 100644 --- a/vendor/google.golang.org/api/cloudresourcemanager/v1/cloudresourcemanager-api.json +++ b/vendor/google.golang.org/api/cloudresourcemanager/v1/cloudresourcemanager-api.json @@ -461,7 +461,7 @@ ], "parameters": { "name": { - "description": "The resource name of the Organization to fetch, e.g. \"organizations/1234\".", + "description": "The resource name of the Organization to fetch. This is the organization's\nrelative path in the API, formatted as \"organizations/[organizationId]\".\nFor example, \"organizations/1234\".", "location": "path", "pattern": "^organizations/[^/]+$", "required": true, @@ -947,7 +947,7 @@ "parameterOrder": [], "parameters": { "filter": { - "description": "An expression for filtering the results of the request. Filter rules are\ncase insensitive. The fields eligible for filtering are:\n\n+ `name`\n+ `id`\n+ \u003ccode\u003elabels.\u003cem\u003ekey\u003c/em\u003e\u003c/code\u003e where *key* is the name of a label\n\nSome examples of using labels as filters:\n\n|Filter|Description|\n|------|-----------|\n|name:how*|The project's name starts with \"how\".|\n|name:Howl|The project's name is `Howl` or `howl`.|\n|name:HOWL|Equivalent to above.|\n|NAME:howl|Equivalent to above.|\n|labels.color:*|The project has the label `color`.|\n|labels.color:red|The project's label `color` has the value `red`.|\n|labels.color:red\u0026nbsp;labels.size:big|The project's label `color` has the value `red` and its label `size` has the value `big`.\n\nIf you specify a filter that has both `parent.type` and `parent.id`, then\nthe `resourcemanager.projects.list` permission is checked on the parent.\nIf the user has this permission, all projects under the parent will be\nreturned after remaining filters have been applied. If the user lacks this\npermission, then all projects for which the user has the\n`resourcemanager.projects.get` permission will be returned after remaining\nfilters have been applied. If no filter is specified, the call will return\nprojects for which the user has `resourcemanager.projects.get` permissions.\n\nOptional.", + "description": "An expression for filtering the results of the request. Filter rules are\ncase insensitive. The fields eligible for filtering are:\n\n+ `name`\n+ `id`\n+ \u003ccode\u003elabels.\u003cem\u003ekey\u003c/em\u003e\u003c/code\u003e where *key* is the name of a label\n\nSome examples of using labels as filters:\n\n|Filter|Description|\n|------|-----------|\n|name:how*|The project's name starts with \"how\".|\n|name:Howl|The project's name is `Howl` or `howl`.|\n|name:HOWL|Equivalent to above.|\n|NAME:howl|Equivalent to above.|\n|labels.color:*|The project has the label `color`.|\n|labels.color:red|The project's label `color` has the value `red`.|\n|labels.color:red\u0026nbsp;labels.size:big|The project's label `color` has the\nvalue `red` and its label `size` has the value `big`.\n\nIf you specify a filter that has both `parent.type` and `parent.id`, then\nthe `resourcemanager.projects.list` permission is checked on the parent.\nIf the user has this permission, all projects under the parent will be\nreturned after remaining filters have been applied. If the user lacks this\npermission, then all projects for which the user has the\n`resourcemanager.projects.get` permission will be returned after remaining\nfilters have been applied. If no filter is specified, the call will return\nprojects for which the user has `resourcemanager.projects.get` permissions.\n\nOptional.", "location": "query", "type": "string" }, @@ -1170,7 +1170,7 @@ } } }, - "revision": "20181015", + "revision": "20190417", "rootUrl": "https://cloudresourcemanager.googleapis.com/", "schemas": { "Ancestor": { @@ -1238,10 +1238,10 @@ "properties": { "condition": { "$ref": "Expr", - "description": "Unimplemented. The condition that is associated with this binding.\nNOTE: an unsatisfied condition will not allow user access via current\nbinding. Different bindings, including their conditions, are examined\nindependently." + "description": "The condition that is associated with this binding.\nNOTE: An unsatisfied condition will not allow user access via current\nbinding. Different bindings, including their conditions, are examined\nindependently." }, "members": { - "description": "Specifies the identities requesting access for a Cloud Platform resource.\n`members` can have the following values:\n\n* `allUsers`: A special identifier that represents anyone who is\n on the internet; with or without a Google account.\n\n* `allAuthenticatedUsers`: A special identifier that represents anyone\n who is authenticated with a Google account or a service account.\n\n* `user:{emailid}`: An email address that represents a specific Google\n account. For example, `alice@gmail.com` .\n\n\n* `serviceAccount:{emailid}`: An email address that represents a service\n account. For example, `my-other-app@appspot.gserviceaccount.com`.\n\n* `group:{emailid}`: An email address that represents a Google group.\n For example, `admins@example.com`.\n\n\n* `domain:{domain}`: A Google Apps domain name that represents all the\n users of that domain. For example, `google.com` or `example.com`.\n\n", + "description": "Specifies the identities requesting access for a Cloud Platform resource.\n`members` can have the following values:\n\n* `allUsers`: A special identifier that represents anyone who is\n on the internet; with or without a Google account.\n\n* `allAuthenticatedUsers`: A special identifier that represents anyone\n who is authenticated with a Google account or a service account.\n\n* `user:{emailid}`: An email address that represents a specific Google\n account. For example, `alice@gmail.com` .\n\n\n* `serviceAccount:{emailid}`: An email address that represents a service\n account. For example, `my-other-app@appspot.gserviceaccount.com`.\n\n* `group:{emailid}`: An email address that represents a Google group.\n For example, `admins@example.com`.\n\n\n* `domain:{domain}`: The G Suite domain (primary) that represents all the\n users of that domain. For example, `google.com` or `example.com`.\n\n", "items": { "type": "string" }, @@ -1265,7 +1265,7 @@ "id": "BooleanPolicy", "properties": { "enforced": { - "description": "If `true`, then the `Policy` is enforced. If `false`, then any\nconfiguration is acceptable.\n\nSuppose you have a `Constraint` `constraints/compute.disableSerialPortAccess`\nwith `constraint_default` set to `ALLOW`. A `Policy` for that\n`Constraint` exhibits the following behavior:\n - If the `Policy` at this resource has enforced set to `false`, serial\n port connection attempts will be allowed.\n - If the `Policy` at this resource has enforced set to `true`, serial\n port connection attempts will be refused.\n - If the `Policy` at this resource is `RestoreDefault`, serial port\n connection attempts will be allowed.\n - If no `Policy` is set at this resource or anywhere higher in the\n resource hierarchy, serial port connection attempts will be allowed.\n - If no `Policy` is set at this resource, but one exists higher in the\n resource hierarchy, the behavior is as if the`Policy` were set at\n this resource.\n\nThe following examples demonstrate the different possible layerings:\n\nExample 1 (nearest `Constraint` wins):\n `organizations/foo` has a `Policy` with:\n {enforced: false}\n `projects/bar` has no `Policy` set.\nThe constraint at `projects/bar` and `organizations/foo` will not be\nenforced.\n\nExample 2 (enforcement gets replaced):\n `organizations/foo` has a `Policy` with:\n {enforced: false}\n `projects/bar` has a `Policy` with:\n {enforced: true}\nThe constraint at `organizations/foo` is not enforced.\nThe constraint at `projects/bar` is enforced.\n\nExample 3 (RestoreDefault):\n `organizations/foo` has a `Policy` with:\n {enforced: true}\n `projects/bar` has a `Policy` with:\n {RestoreDefault: {}}\nThe constraint at `organizations/foo` is enforced.\nThe constraint at `projects/bar` is not enforced, because\n`constraint_default` for the `Constraint` is `ALLOW`.", + "description": "If `true`, then the `Policy` is enforced. If `false`, then any\nconfiguration is acceptable.\n\nSuppose you have a `Constraint`\n`constraints/compute.disableSerialPortAccess` with `constraint_default`\nset to `ALLOW`. A `Policy` for that `Constraint` exhibits the following\nbehavior:\n - If the `Policy` at this resource has enforced set to `false`, serial\n port connection attempts will be allowed.\n - If the `Policy` at this resource has enforced set to `true`, serial\n port connection attempts will be refused.\n - If the `Policy` at this resource is `RestoreDefault`, serial port\n connection attempts will be allowed.\n - If no `Policy` is set at this resource or anywhere higher in the\n resource hierarchy, serial port connection attempts will be allowed.\n - If no `Policy` is set at this resource, but one exists higher in the\n resource hierarchy, the behavior is as if the`Policy` were set at\n this resource.\n\nThe following examples demonstrate the different possible layerings:\n\nExample 1 (nearest `Constraint` wins):\n `organizations/foo` has a `Policy` with:\n {enforced: false}\n `projects/bar` has no `Policy` set.\nThe constraint at `projects/bar` and `organizations/foo` will not be\nenforced.\n\nExample 2 (enforcement gets replaced):\n `organizations/foo` has a `Policy` with:\n {enforced: false}\n `projects/bar` has a `Policy` with:\n {enforced: true}\nThe constraint at `organizations/foo` is not enforced.\nThe constraint at `projects/bar` is enforced.\n\nExample 3 (RestoreDefault):\n `organizations/foo` has a `Policy` with:\n {enforced: true}\n `projects/bar` has a `Policy` with:\n {RestoreDefault: {}}\nThe constraint at `organizations/foo` is enforced.\nThe constraint at `projects/bar` is not enforced, because\n`constraint_default` for the `Constraint` is `ALLOW`.", "type": "boolean" } }, @@ -1861,7 +1861,7 @@ "type": "string" }, "name": { - "description": "The user-assigned display name of the Project.\nIt must be 4 to 30 characters.\nAllowed characters are: lowercase and uppercase letters, numbers,\nhyphen, single-quote, double-quote, space, and exclamation point.\n\nExample: \u003ccode\u003eMy Project\u003c/code\u003e\nRead-write.", + "description": "The optional user-assigned display name of the Project.\nWhen present it must be between 4 to 30 characters.\nAllowed characters are: lowercase and uppercase letters, numbers,\nhyphen, single-quote, double-quote, space, and exclamation point.\n\nExample: \u003ccode\u003eMy Project\u003c/code\u003e\nRead-write.", "type": "string" }, "parent": { @@ -1987,7 +1987,7 @@ "type": "object" }, "Status": { - "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", + "description": "The `Status` type defines a logical error model that is suitable for\ndifferent programming environments, including REST APIs and RPC APIs. It is\nused by [gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error\nmessage, and error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", "id": "Status", "properties": { "code": { diff --git a/vendor/google.golang.org/api/cloudresourcemanager/v1/cloudresourcemanager-gen.go b/vendor/google.golang.org/api/cloudresourcemanager/v1/cloudresourcemanager-gen.go index 81376269..0e38161a 100644 --- a/vendor/google.golang.org/api/cloudresourcemanager/v1/cloudresourcemanager-gen.go +++ b/vendor/google.golang.org/api/cloudresourcemanager/v1/cloudresourcemanager-gen.go @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. All rights reserved. +// Copyright 2019 Google LLC. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. @@ -6,13 +6,39 @@ // Package cloudresourcemanager provides access to the Cloud Resource Manager API. // -// See https://cloud.google.com/resource-manager +// For product documentation, see: https://cloud.google.com/resource-manager +// +// Creating a client // // Usage example: // // import "google.golang.org/api/cloudresourcemanager/v1" // ... -// cloudresourcemanagerService, err := cloudresourcemanager.New(oauthHttpClient) +// ctx := context.Background() +// cloudresourcemanagerService, err := cloudresourcemanager.NewService(ctx) +// +// In this example, Google Application Default Credentials are used for authentication. +// +// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// +// Other authentication options +// +// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// +// cloudresourcemanagerService, err := cloudresourcemanager.NewService(ctx, option.WithScopes(cloudresourcemanager.CloudPlatformReadOnlyScope)) +// +// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// +// cloudresourcemanagerService, err := cloudresourcemanager.NewService(ctx, option.WithAPIKey("AIza...")) +// +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// +// config := &oauth2.Config{...} +// // ... +// token, err := config.Exchange(ctx, ...) +// cloudresourcemanagerService, err := cloudresourcemanager.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) +// +// See https://godoc.org/google.golang.org/api/option/ for details on options. package cloudresourcemanager // import "google.golang.org/api/cloudresourcemanager/v1" import ( @@ -29,6 +55,8 @@ import ( gensupport "google.golang.org/api/gensupport" googleapi "google.golang.org/api/googleapi" + option "google.golang.org/api/option" + htransport "google.golang.org/api/transport/http" ) // Always reference these packages, just in case the auto-generated code @@ -59,6 +87,33 @@ const ( CloudPlatformReadOnlyScope = "https://www.googleapis.com/auth/cloud-platform.read-only" ) +// NewService creates a new Service. +func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { + scopesOption := option.WithScopes( + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + ) + // NOTE: prepend, so we don't override user-specified scopes. + opts = append([]option.ClientOption{scopesOption}, opts...) + client, endpoint, err := htransport.NewClient(ctx, opts...) + if err != nil { + return nil, err + } + s, err := New(client) + if err != nil { + return nil, err + } + if endpoint != "" { + s.BasePath = endpoint + } + return s, nil +} + +// New creates a new Service. It uses the provided http.Client for requests. +// +// Deprecated: please use NewService instead. +// To provide a custom HTTP client, use option.WithHTTPClient. +// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. func New(client *http.Client) (*Service, error) { if client == nil { return nil, errors.New("client is nil") @@ -324,9 +379,8 @@ func (s *AuditLogConfig) MarshalJSON() ([]byte, error) { // Binding: Associates `members` with a `role`. type Binding struct { - // Condition: Unimplemented. The condition that is associated with this - // binding. - // NOTE: an unsatisfied condition will not allow user access via + // Condition: The condition that is associated with this binding. + // NOTE: An unsatisfied condition will not allow user access via // current // binding. Different bindings, including their conditions, are // examined @@ -360,7 +414,7 @@ type Binding struct { // For example, `admins@example.com`. // // - // * `domain:{domain}`: A Google Apps domain name that represents all + // * `domain:{domain}`: The G Suite domain (primary) that represents all // the // users of that domain. For example, `google.com` or // `example.com`. @@ -414,11 +468,13 @@ type BooleanPolicy struct { // any // configuration is acceptable. // - // Suppose you have a `Constraint` - // `constraints/compute.disableSerialPortAccess` - // with `constraint_default` set to `ALLOW`. A `Policy` for - // that - // `Constraint` exhibits the following behavior: + // Suppose you have a + // `Constraint` + // `constraints/compute.disableSerialPortAccess` with + // `constraint_default` + // set to `ALLOW`. A `Policy` for that `Constraint` exhibits the + // following + // behavior: // - If the `Policy` at this resource has enforced set to `false`, // serial // port connection attempts will be allowed. @@ -1907,8 +1963,8 @@ type Project struct { // not returned by the API. LifecycleState string `json:"lifecycleState,omitempty"` - // Name: The user-assigned display name of the Project. - // It must be 4 to 30 characters. + // Name: The optional user-assigned display name of the Project. + // When present it must be between 4 to 30 characters. // Allowed characters are: lowercase and uppercase letters, // numbers, // hyphen, single-quote, double-quote, space, and exclamation @@ -2258,20 +2314,20 @@ func (s *SetOrgPolicyRequest) MarshalJSON() ([]byte, error) { } // Status: The `Status` type defines a logical error model that is -// suitable for different -// programming environments, including REST APIs and RPC APIs. It is -// used by -// [gRPC](https://github.com/grpc). The error model is designed to -// be: +// suitable for +// different programming environments, including REST APIs and RPC APIs. +// It is +// used by [gRPC](https://github.com/grpc). The error model is designed +// to be: // // - Simple to use and understand for most users // - Flexible enough to meet unexpected needs // // # Overview // -// The `Status` message contains three pieces of data: error code, error -// message, -// and error details. The error code should be an enum value +// The `Status` message contains three pieces of data: error code, +// error +// message, and error details. The error code should be an enum value // of // google.rpc.Code, but it may accept additional error codes if needed. // The @@ -4390,7 +4446,7 @@ func (c *OrganizationsGetCall) Do(opts ...googleapi.CallOption) (*Organization, // ], // "parameters": { // "name": { - // "description": "The resource name of the Organization to fetch, e.g. \"organizations/1234\".", + // "description": "The resource name of the Organization to fetch. This is the organization's\nrelative path in the API, formatted as \"organizations/[organizationId]\".\nFor example, \"organizations/1234\".", // "location": "path", // "pattern": "^organizations/[^/]+$", // "required": true, @@ -7003,7 +7059,8 @@ func (r *ProjectsService) List() *ProjectsListCall { // |labels.color:red|The project's label `color` has the value // `red`.| // |labels.color:red labels.size:big|The project's label `color` -// has the value `red` and its label `size` has the value `big`. +// has the +// value `red` and its label `size` has the value `big`. // // If you specify a filter that has both `parent.type` and `parent.id`, // then @@ -7145,7 +7202,7 @@ func (c *ProjectsListCall) Do(opts ...googleapi.CallOption) (*ListProjectsRespon // "parameterOrder": [], // "parameters": { // "filter": { - // "description": "An expression for filtering the results of the request. Filter rules are\ncase insensitive. The fields eligible for filtering are:\n\n+ `name`\n+ `id`\n+ \u003ccode\u003elabels.\u003cem\u003ekey\u003c/em\u003e\u003c/code\u003e where *key* is the name of a label\n\nSome examples of using labels as filters:\n\n|Filter|Description|\n|------|-----------|\n|name:how*|The project's name starts with \"how\".|\n|name:Howl|The project's name is `Howl` or `howl`.|\n|name:HOWL|Equivalent to above.|\n|NAME:howl|Equivalent to above.|\n|labels.color:*|The project has the label `color`.|\n|labels.color:red|The project's label `color` has the value `red`.|\n|labels.color:red\u0026nbsp;labels.size:big|The project's label `color` has the value `red` and its label `size` has the value `big`.\n\nIf you specify a filter that has both `parent.type` and `parent.id`, then\nthe `resourcemanager.projects.list` permission is checked on the parent.\nIf the user has this permission, all projects under the parent will be\nreturned after remaining filters have been applied. If the user lacks this\npermission, then all projects for which the user has the\n`resourcemanager.projects.get` permission will be returned after remaining\nfilters have been applied. If no filter is specified, the call will return\nprojects for which the user has `resourcemanager.projects.get` permissions.\n\nOptional.", + // "description": "An expression for filtering the results of the request. Filter rules are\ncase insensitive. The fields eligible for filtering are:\n\n+ `name`\n+ `id`\n+ \u003ccode\u003elabels.\u003cem\u003ekey\u003c/em\u003e\u003c/code\u003e where *key* is the name of a label\n\nSome examples of using labels as filters:\n\n|Filter|Description|\n|------|-----------|\n|name:how*|The project's name starts with \"how\".|\n|name:Howl|The project's name is `Howl` or `howl`.|\n|name:HOWL|Equivalent to above.|\n|NAME:howl|Equivalent to above.|\n|labels.color:*|The project has the label `color`.|\n|labels.color:red|The project's label `color` has the value `red`.|\n|labels.color:red\u0026nbsp;labels.size:big|The project's label `color` has the\nvalue `red` and its label `size` has the value `big`.\n\nIf you specify a filter that has both `parent.type` and `parent.id`, then\nthe `resourcemanager.projects.list` permission is checked on the parent.\nIf the user has this permission, all projects under the parent will be\nreturned after remaining filters have been applied. If the user lacks this\npermission, then all projects for which the user has the\n`resourcemanager.projects.get` permission will be returned after remaining\nfilters have been applied. If no filter is specified, the call will return\nprojects for which the user has `resourcemanager.projects.get` permissions.\n\nOptional.", // "location": "query", // "type": "string" // }, diff --git a/vendor/google.golang.org/api/cloudresourcemanager/v2beta1/cloudresourcemanager-api.json b/vendor/google.golang.org/api/cloudresourcemanager/v2beta1/cloudresourcemanager-api.json index 866ccd50..3e0ad2d0 100644 --- a/vendor/google.golang.org/api/cloudresourcemanager/v2beta1/cloudresourcemanager-api.json +++ b/vendor/google.golang.org/api/cloudresourcemanager/v2beta1/cloudresourcemanager-api.json @@ -252,7 +252,7 @@ ] }, "move": { - "description": "Moves a Folder under a new resource parent.\nReturns an Operation which can be used to track the progress of the\nfolder move workflow.\nUpon success the Operation.response field will be populated with the\nmoved Folder.\nUpon failure, a FolderOperationError categorizing the failure cause will\nbe returned - if the failure occurs synchronously then the\nFolderOperationError will be returned via the Status.details field\nand if it occurs asynchronously then the FolderOperation will be returned\nvia the the Operation.error field.\nIn addition, the Operation.metadata field will be populated with a\nFolderOperation message as an aid to stateless clients.\nFolder moves will be rejected if they violate either the naming, height\nor fanout constraints described in the\nCreateFolder documentation.\nThe caller must have `resourcemanager.folders.move` permission on the\nfolder's current and proposed new parent.", + "description": "Moves a Folder under a new resource parent.\nReturns an Operation which can be used to track the progress of the\nfolder move workflow.\nUpon success the Operation.response field will be populated with the\nmoved Folder.\nUpon failure, a FolderOperationError categorizing the failure cause will\nbe returned - if the failure occurs synchronously then the\nFolderOperationError will be returned via the Status.details field\nand if it occurs asynchronously then the FolderOperation will be returned\nvia the Operation.error field.\nIn addition, the Operation.metadata field will be populated with a\nFolderOperation message as an aid to stateless clients.\nFolder moves will be rejected if they violate either the naming, height\nor fanout constraints described in the\nCreateFolder documentation.\nThe caller must have `resourcemanager.folders.move` permission on the\nfolder's current and proposed new parent.", "flatPath": "v2/folders/{foldersId}:move", "httpMethod": "POST", "id": "cloudresourcemanager.folders.move", @@ -449,7 +449,7 @@ } } }, - "revision": "20181015", + "revision": "20190403", "rootUrl": "https://cloudresourcemanager.googleapis.com/", "schemas": { "AuditConfig": { @@ -506,10 +506,10 @@ "properties": { "condition": { "$ref": "Expr", - "description": "Unimplemented. The condition that is associated with this binding.\nNOTE: an unsatisfied condition will not allow user access via current\nbinding. Different bindings, including their conditions, are examined\nindependently." + "description": "The condition that is associated with this binding.\nNOTE: An unsatisfied condition will not allow user access via current\nbinding. Different bindings, including their conditions, are examined\nindependently." }, "members": { - "description": "Specifies the identities requesting access for a Cloud Platform resource.\n`members` can have the following values:\n\n* `allUsers`: A special identifier that represents anyone who is\n on the internet; with or without a Google account.\n\n* `allAuthenticatedUsers`: A special identifier that represents anyone\n who is authenticated with a Google account or a service account.\n\n* `user:{emailid}`: An email address that represents a specific Google\n account. For example, `alice@gmail.com` .\n\n\n* `serviceAccount:{emailid}`: An email address that represents a service\n account. For example, `my-other-app@appspot.gserviceaccount.com`.\n\n* `group:{emailid}`: An email address that represents a Google group.\n For example, `admins@example.com`.\n\n\n* `domain:{domain}`: A Google Apps domain name that represents all the\n users of that domain. For example, `google.com` or `example.com`.\n\n", + "description": "Specifies the identities requesting access for a Cloud Platform resource.\n`members` can have the following values:\n\n* `allUsers`: A special identifier that represents anyone who is\n on the internet; with or without a Google account.\n\n* `allAuthenticatedUsers`: A special identifier that represents anyone\n who is authenticated with a Google account or a service account.\n\n* `user:{emailid}`: An email address that represents a specific Google\n account. For example, `alice@gmail.com` .\n\n\n* `serviceAccount:{emailid}`: An email address that represents a service\n account. For example, `my-other-app@appspot.gserviceaccount.com`.\n\n* `group:{emailid}`: An email address that represents a Google group.\n For example, `admins@example.com`.\n\n\n* `domain:{domain}`: The G Suite domain (primary) that represents all the\n users of that domain. For example, `google.com` or `example.com`.\n\n", "items": { "type": "string" }, @@ -786,7 +786,7 @@ "type": "string" }, "query": { - "description": "Search criteria used to select the Folders to return.\nIf no search criteria is specified then all accessible folders will be\nreturned.\n\nQuery expressions can be used to restrict results based upon displayName,\nlifecycleState and parent, where the operators `=`, `NOT`, `AND` and `OR`\ncan be used along with the suffix wildcard symbol `*`.\n\nThe displayName field in a query expression should use escaped quotes\nfor values that include whitespace to prevent unexpected behavior.\n\nSome example queries are:\n\n|Query | Description|\n|----- | -----------|\n|displayName=Test* | Folders whose display name starts with \"Test\".|\n|lifecycleState=ACTIVE | Folders whose lifecycleState is ACTIVE.|\n|parent=folders/123 | Folders whose parent is \"folders/123\".|\n|parent=folders/123 AND lifecycleState=ACTIVE | Active folders whose parent is \"folders/123\".|\n|displayName=\\\\\"Test String\\\\\"|Folders whose display name includes both \"Test\" and \"String\".|", + "description": "Search criteria used to select the Folders to return.\nIf no search criteria is specified then all accessible folders will be\nreturned.\n\nQuery expressions can be used to restrict results based upon displayName,\nlifecycleState and parent, where the operators `=`, `NOT`, `AND` and `OR`\ncan be used along with the suffix wildcard symbol `*`.\n\nThe displayName field in a query expression should use escaped quotes\nfor values that include whitespace to prevent unexpected behavior.\n\nSome example queries are:\n\n|Query | Description|\n|----- | -----------|\n|displayName=Test* | Folders whose display name starts with \"Test\".|\n|lifecycleState=ACTIVE | Folders whose lifecycleState is ACTIVE.|\n|parent=folders/123 | Folders whose parent is \"folders/123\".|\n|parent=folders/123 AND lifecycleState=ACTIVE | Active folders whose parent\nis \"folders/123\".| |displayName=\\\\\"Test String\\\\\"|Folders whose display\nname includes both \"Test\" and \"String\".|", "type": "string" } }, @@ -827,7 +827,7 @@ "type": "object" }, "Status": { - "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", + "description": "The `Status` type defines a logical error model that is suitable for\ndifferent programming environments, including REST APIs and RPC APIs. It is\nused by [gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error\nmessage, and error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", "id": "Status", "properties": { "code": { diff --git a/vendor/google.golang.org/api/cloudresourcemanager/v2beta1/cloudresourcemanager-gen.go b/vendor/google.golang.org/api/cloudresourcemanager/v2beta1/cloudresourcemanager-gen.go index 8f14740b..57ac1d25 100644 --- a/vendor/google.golang.org/api/cloudresourcemanager/v2beta1/cloudresourcemanager-gen.go +++ b/vendor/google.golang.org/api/cloudresourcemanager/v2beta1/cloudresourcemanager-gen.go @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. All rights reserved. +// Copyright 2019 Google LLC. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. @@ -6,13 +6,39 @@ // Package cloudresourcemanager provides access to the Cloud Resource Manager API. // -// See https://cloud.google.com/resource-manager +// For product documentation, see: https://cloud.google.com/resource-manager +// +// Creating a client // // Usage example: // // import "google.golang.org/api/cloudresourcemanager/v2beta1" // ... -// cloudresourcemanagerService, err := cloudresourcemanager.New(oauthHttpClient) +// ctx := context.Background() +// cloudresourcemanagerService, err := cloudresourcemanager.NewService(ctx) +// +// In this example, Google Application Default Credentials are used for authentication. +// +// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// +// Other authentication options +// +// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// +// cloudresourcemanagerService, err := cloudresourcemanager.NewService(ctx, option.WithScopes(cloudresourcemanager.CloudPlatformReadOnlyScope)) +// +// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// +// cloudresourcemanagerService, err := cloudresourcemanager.NewService(ctx, option.WithAPIKey("AIza...")) +// +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// +// config := &oauth2.Config{...} +// // ... +// token, err := config.Exchange(ctx, ...) +// cloudresourcemanagerService, err := cloudresourcemanager.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) +// +// See https://godoc.org/google.golang.org/api/option/ for details on options. package cloudresourcemanager // import "google.golang.org/api/cloudresourcemanager/v2beta1" import ( @@ -29,6 +55,8 @@ import ( gensupport "google.golang.org/api/gensupport" googleapi "google.golang.org/api/googleapi" + option "google.golang.org/api/option" + htransport "google.golang.org/api/transport/http" ) // Always reference these packages, just in case the auto-generated code @@ -59,6 +87,33 @@ const ( CloudPlatformReadOnlyScope = "https://www.googleapis.com/auth/cloud-platform.read-only" ) +// NewService creates a new Service. +func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { + scopesOption := option.WithScopes( + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + ) + // NOTE: prepend, so we don't override user-specified scopes. + opts = append([]option.ClientOption{scopesOption}, opts...) + client, endpoint, err := htransport.NewClient(ctx, opts...) + if err != nil { + return nil, err + } + s, err := New(client) + if err != nil { + return nil, err + } + if endpoint != "" { + s.BasePath = endpoint + } + return s, nil +} + +// New creates a new Service. It uses the provided http.Client for requests. +// +// Deprecated: please use NewService instead. +// To provide a custom HTTP client, use option.WithHTTPClient. +// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. func New(client *http.Client) (*Service, error) { if client == nil { return nil, errors.New("client is nil") @@ -260,9 +315,8 @@ func (s *AuditLogConfig) MarshalJSON() ([]byte, error) { // Binding: Associates `members` with a `role`. type Binding struct { - // Condition: Unimplemented. The condition that is associated with this - // binding. - // NOTE: an unsatisfied condition will not allow user access via + // Condition: The condition that is associated with this binding. + // NOTE: An unsatisfied condition will not allow user access via // current // binding. Different bindings, including their conditions, are // examined @@ -296,7 +350,7 @@ type Binding struct { // For example, `admins@example.com`. // // - // * `domain:{domain}`: A Google Apps domain name that represents all + // * `domain:{domain}`: The G Suite domain (primary) that represents all // the // users of that domain. For example, `google.com` or // `example.com`. @@ -898,9 +952,10 @@ type SearchFoldersRequest struct { // |parent=folders/123 | Folders whose parent is // "folders/123".| // |parent=folders/123 AND lifecycleState=ACTIVE | Active folders whose - // parent is "folders/123".| - // |displayName=\\"Test String\\"|Folders whose display name includes - // both "Test" and "String".| + // parent + // is "folders/123".| |displayName=\\"Test String\\"|Folders whose + // display + // name includes both "Test" and "String".| Query string `json:"query,omitempty"` // ForceSendFields is a list of field names (e.g. "PageSize") to @@ -1008,20 +1063,20 @@ func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) { } // Status: The `Status` type defines a logical error model that is -// suitable for different -// programming environments, including REST APIs and RPC APIs. It is -// used by -// [gRPC](https://github.com/grpc). The error model is designed to -// be: +// suitable for +// different programming environments, including REST APIs and RPC APIs. +// It is +// used by [gRPC](https://github.com/grpc). The error model is designed +// to be: // // - Simple to use and understand for most users // - Flexible enough to meet unexpected needs // // # Overview // -// The `Status` message contains three pieces of data: error code, error -// message, -// and error details. The error code should be an enum value +// The `Status` message contains three pieces of data: error code, +// error +// message, and error details. The error code should be an enum value // of // google.rpc.Code, but it may accept additional error codes if needed. // The @@ -2064,7 +2119,7 @@ type FoldersMoveCall struct { // field // and if it occurs asynchronously then the FolderOperation will be // returned -// via the the Operation.error field. +// via the Operation.error field. // In addition, the Operation.metadata field will be populated with // a // FolderOperation message as an aid to stateless clients. @@ -2172,7 +2227,7 @@ func (c *FoldersMoveCall) Do(opts ...googleapi.CallOption) (*Operation, error) { } return ret, nil // { - // "description": "Moves a Folder under a new resource parent.\nReturns an Operation which can be used to track the progress of the\nfolder move workflow.\nUpon success the Operation.response field will be populated with the\nmoved Folder.\nUpon failure, a FolderOperationError categorizing the failure cause will\nbe returned - if the failure occurs synchronously then the\nFolderOperationError will be returned via the Status.details field\nand if it occurs asynchronously then the FolderOperation will be returned\nvia the the Operation.error field.\nIn addition, the Operation.metadata field will be populated with a\nFolderOperation message as an aid to stateless clients.\nFolder moves will be rejected if they violate either the naming, height\nor fanout constraints described in the\nCreateFolder documentation.\nThe caller must have `resourcemanager.folders.move` permission on the\nfolder's current and proposed new parent.", + // "description": "Moves a Folder under a new resource parent.\nReturns an Operation which can be used to track the progress of the\nfolder move workflow.\nUpon success the Operation.response field will be populated with the\nmoved Folder.\nUpon failure, a FolderOperationError categorizing the failure cause will\nbe returned - if the failure occurs synchronously then the\nFolderOperationError will be returned via the Status.details field\nand if it occurs asynchronously then the FolderOperation will be returned\nvia the Operation.error field.\nIn addition, the Operation.metadata field will be populated with a\nFolderOperation message as an aid to stateless clients.\nFolder moves will be rejected if they violate either the naming, height\nor fanout constraints described in the\nCreateFolder documentation.\nThe caller must have `resourcemanager.folders.move` permission on the\nfolder's current and proposed new parent.", // "flatPath": "v2/folders/{foldersId}:move", // "httpMethod": "POST", // "id": "cloudresourcemanager.folders.move", diff --git a/vendor/google.golang.org/api/composer/v1beta1/composer-api.json b/vendor/google.golang.org/api/composer/v1beta1/composer-api.json index d001267b..799795c2 100644 --- a/vendor/google.golang.org/api/composer/v1beta1/composer-api.json +++ b/vendor/google.golang.org/api/composer/v1beta1/composer-api.json @@ -260,6 +260,46 @@ } } }, + "imageVersions": { + "methods": { + "list": { + "description": "List ImageVersions for provided location.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/imageVersions", + "httpMethod": "GET", + "id": "composer.projects.locations.imageVersions.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "The maximum number of image_versions to return.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The next_page_token value returned from a previous List request, if any.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "List ImageVersions in the given project and location, in the form:\n\"projects/{projectId}/locations/{locationId}\"", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+parent}/imageVersions", + "response": { + "$ref": "ListImageVersionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, "operations": { "methods": { "delete": { @@ -360,7 +400,7 @@ } } }, - "revision": "20181217", + "revision": "20190323", "rootUrl": "https://composer.googleapis.com/", "schemas": { "Empty": { @@ -450,6 +490,10 @@ "format": "int32", "type": "integer" }, + "privateEnvironmentConfig": { + "$ref": "PrivateEnvironmentConfig", + "description": "The configuration used for the Private IP Cloud Composer environment." + }, "softwareConfig": { "$ref": "SoftwareConfig", "description": "The configuration settings for software inside the environment." @@ -457,6 +501,55 @@ }, "type": "object" }, + "IPAllocationPolicy": { + "description": "Configuration for controlling how IPs are allocated in the\nGKE cluster.", + "id": "IPAllocationPolicy", + "properties": { + "clusterIpv4CidrBlock": { + "description": "Optional. The IP address range used to allocate IP addresses to pods in\nthe cluster.\n\nThis field is applicable only when `use_ip_aliases` is true.\n\nSet to blank to have GKE choose a range with the default size.\n\nSet to /netmask (e.g. `/14`) to have GKE choose a range with a specific\nnetmask.\n\nSet to a\n[CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)\nnotation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g.\n`10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range\nto use.\nSpecify `cluster_secondary_range_name` or `cluster_ipv4_cidr_block`\nbut not both.", + "type": "string" + }, + "clusterSecondaryRangeName": { + "description": "Optional. The name of the cluster's secondary range used to allocate\nIP addresses to pods. Specify either `cluster_secondary_range_name`\nor `cluster_ipv4_cidr_block` but not both.\n\nThis field is applicable only when `use_ip_aliases` is true.", + "type": "string" + }, + "servicesIpv4CidrBlock": { + "description": "Optional. The IP address range of the services IP addresses in this\ncluster.\n\nThis field is applicable only when `use_ip_aliases` is true.\n\nSet to blank to have GKE choose a range with the default size.\n\nSet to /netmask (e.g. `/14`) to have GKE choose a range with a specific\nnetmask.\n\nSet to a\n[CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)\nnotation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g.\n`10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range\nto use.\nSpecify `services_secondary_range_name` or `services_ipv4_cidr_block`\nbut not both.", + "type": "string" + }, + "servicesSecondaryRangeName": { + "description": "Optional. The name of the services' secondary range used to allocate\nIP addresses to the cluster. Specify either `services_secondary_range_name`\nor `services_ipv4_cidr_block` but not both.\n\nThis field is applicable only when `use_ip_aliases` is true.", + "type": "string" + }, + "useIpAliases": { + "description": "Optional. Whether or not to enable Alias IPs in the GKE cluster.\nIf `true`, a VPC-native cluster is created.", + "type": "boolean" + } + }, + "type": "object" + }, + "ImageVersion": { + "description": "Image Version information", + "id": "ImageVersion", + "properties": { + "imageVersionId": { + "description": "The string identifier of the ImageVersion, in the form:\n\"composer-x.y.z-airflow-a.b(.c)\"", + "type": "string" + }, + "isDefault": { + "description": "Whether this is the default ImageVersion used by Composer during\nenvironment creation if no input ImageVersion is specified.", + "type": "boolean" + }, + "supportedPythonVersions": { + "description": "supported python versions", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "ListEnvironmentsResponse": { "description": "The environments in a project and location.", "id": "ListEnvironmentsResponse", @@ -475,6 +568,24 @@ }, "type": "object" }, + "ListImageVersionsResponse": { + "description": "The ImageVersions in a project and location.", + "id": "ListImageVersionsResponse", + "properties": { + "imageVersions": { + "description": "The list of supported ImageVersions in a location.", + "items": { + "$ref": "ImageVersion" + }, + "type": "array" + }, + "nextPageToken": { + "description": "The page token used to query for the next page if one exists.", + "type": "string" + } + }, + "type": "object" + }, "ListOperationsResponse": { "description": "The response message for Operations.ListOperations.", "id": "ListOperationsResponse", @@ -502,6 +613,10 @@ "format": "int32", "type": "integer" }, + "ipAllocationPolicy": { + "$ref": "IPAllocationPolicy", + "description": "Optional. The IPAllocationPolicy fields for the GKE cluster." + }, "location": { "description": "Optional. The Compute Engine [zone](/compute/docs/regions-zones) in which\nto deploy the VMs used to run the Apache Airflow software, specified as a\n[relative resource name](/apis/design/resource_names#relative_resource_name).\nFor example: \"projects/{projectId}/zones/{zoneId}\".\n\nThis `location` must belong to the enclosing environment's project and\nlocation. If both this field and `nodeConfig.machineType` are specified,\n`nodeConfig.machineType` must belong to this `location`; if both are\nunspecified, the service will pick a zone in the Compute Engine region\ncorresponding to the Cloud Composer location, and propagate that choice to\nboth fields. If only one field (`location` or `nodeConfig.machineType`) is\nspecified, the location information from the specified field will be\npropagated to the unspecified field.", "type": "string" @@ -515,7 +630,7 @@ "type": "string" }, "oauthScopes": { - "description": "Optional. The set of Google API scopes to be made available on all\nnode VMs. Defaults to\n[\"https://www.googleapis.com/auth/cloud-platform\"] and must be included in\nthe list of specified scopes. Cannot be updated.", + "description": "Optional. The set of Google API scopes to be made available on all\nnode VMs. If `oauth_scopes` is empty, defaults to\n[\"https://www.googleapis.com/auth/cloud-platform\"]. Cannot be updated.", "items": { "type": "string" }, @@ -526,7 +641,7 @@ "type": "string" }, "subnetwork": { - "description": "Optional. The Compute Engine subnetwork to be used for machine\ncommunications, specified as a\n[relative resource name](/apis/design/resource_names#relative_resource_name).\nFor example:\n\"projects/{projectId}/regions/{regionId}/subnetworks/{subnetworkId}\"\n\nIf a subnetwork is provided, `nodeConfig.network` must also be provided,\nand the subnetwork must belong to the same project as the network.\n\nFor Shared VPC, you must configure the subnetwork with secondary ranges\nnamed \u003cstrong\u003ecomposer-pods\u003c/strong\u003e and\n\u003cstrong\u003ecomposer-services\u003c/strong\u003e to support Alias IPs.", + "description": "Optional. The Compute Engine subnetwork to be used for machine\ncommunications, specified as a\n[relative resource name](/apis/design/resource_names#relative_resource_name).\nFor example:\n\"projects/{projectId}/regions/{regionId}/subnetworks/{subnetworkId}\"\n\nIf a subnetwork is provided, `nodeConfig.network` must also be provided,\nand the subnetwork must belong to the enclosing environment's project and\nlocation.", "type": "string" }, "tags": { @@ -633,6 +748,36 @@ }, "type": "object" }, + "PrivateClusterConfig": { + "description": "Configuration options for the private GKE cluster in a Cloud Composer\nenvironment.", + "id": "PrivateClusterConfig", + "properties": { + "enablePrivateEndpoint": { + "description": "Optional. If `true`, access to the public endpoint of the GKE cluster is\ndenied.", + "type": "boolean" + }, + "masterIpv4CidrBlock": { + "description": "The IP range in CIDR notation to use for the hosted master network. This\nrange is used for assigning internal IP addresses to the cluster\nmaster or set of masters and to the internal load balancer virtual IP.\nThis range must not overlap with any other ranges in use\nwithin the cluster's network. If left blank, the default value of\n'172.16.0.0/28' is used.", + "type": "string" + } + }, + "type": "object" + }, + "PrivateEnvironmentConfig": { + "description": "The configuration information for configuring a Private IP Cloud Composer\nenvironment.", + "id": "PrivateEnvironmentConfig", + "properties": { + "enablePrivateEnvironment": { + "description": "Optional. If `true`, a Private IP Cloud Composer environment is created.\nIf this field is true, `use_ip_aliases` must be true.", + "type": "boolean" + }, + "privateClusterConfig": { + "$ref": "PrivateClusterConfig", + "description": "Optional. Configuration for the private GKE cluster for a Private IP\nCloud Composer environment." + } + }, + "type": "object" + }, "SoftwareConfig": { "description": "Specifies the selection and configuration of software inside the environment.", "id": "SoftwareConfig", @@ -652,7 +797,7 @@ "type": "object" }, "imageVersion": { - "description": "The version of the software running in the environment.\nThis encapsulates both the version of Cloud Composer functionality and the\nversion of Apache Airflow. It must match the regular expression\n`composer-([0-9]+\\.[0-9]+\\.[0-9]+|latest)-airflow-[0-9]+\\.[0-9]+(\\.[0-9]+.*)?`.\nWhen used as input, the server will also check if the provided version is\nsupported and deny the request for an unsupported version.\n\nThe Cloud Composer portion of the version is a\n[semantic version](https://semver.org) or `latest`. The patch version\ncan be omitted and the current Cloud Composer patch version\nwill be selected.\nWhen `latest` is provided instead of an explicit version number,\nthe server will replace `latest` with the current Cloud Composer version\nand store that version number in the same field.\n\nThe portion of the image version that follows \u003cem\u003eairflow-\u003c/em\u003e is an official\nApache Airflow repository\n[release name](https://github.com/apache/incubator-airflow/releases).\n\nSupported values for input are:\n* `composer-latest-airflow-1.10.0`\n* `composer-latest-airflow-1.9.0`\n* `composer-latest-airflow-1.10`\n* `composer-latest-airflow-1.9`\n* `composer-1.3.0-airflow-1.10.0`\n* `composer-1.3.0-airflow-1.9.0`\n* `composer-1.3.0-airflow-1.10`\n* `composer-1.3.0-airflow-1.9`\n\nSee also [Release Notes](/composer/docs/release-notes).", + "description": "The version of the software running in the environment.\nThis encapsulates both the version of Cloud Composer functionality and the\nversion of Apache Airflow. It must match the regular expression\n`composer-([0-9]+\\.[0-9]+\\.[0-9]+|latest)-airflow-[0-9]+\\.[0-9]+(\\.[0-9]+.*)?`.\nWhen used as input, the server also checks if the provided version is\nsupported and denies the request for an unsupported version.\n\nThe Cloud Composer portion of the version is a\n[semantic version](https://semver.org) or `latest`. When the patch version\nis omitted, the current Cloud Composer patch version is selected.\nWhen `latest` is provided instead of an explicit version number,\nthe server replaces `latest` with the current Cloud Composer version\nand stores that version number in the same field.\n\nThe portion of the image version that follows \u003cem\u003eairflow-\u003c/em\u003e is an\nofficial Apache Airflow repository\n[release name](https://github.com/apache/incubator-airflow/releases).\n\nSee also [Version List](/composer/docs/concepts/versioning/composer-versions).", "type": "string" }, "pypiPackages": { @@ -670,7 +815,7 @@ "type": "object" }, "Status": { - "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", + "description": "The `Status` type defines a logical error model that is suitable for\ndifferent programming environments, including REST APIs and RPC APIs. It is\nused by [gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error\nmessage, and error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", "id": "Status", "properties": { "code": { diff --git a/vendor/google.golang.org/api/composer/v1beta1/composer-gen.go b/vendor/google.golang.org/api/composer/v1beta1/composer-gen.go index f0b11178..c6e1d9fe 100644 --- a/vendor/google.golang.org/api/composer/v1beta1/composer-gen.go +++ b/vendor/google.golang.org/api/composer/v1beta1/composer-gen.go @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. All rights reserved. +// Copyright 2019 Google LLC. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. @@ -6,13 +6,35 @@ // Package composer provides access to the Cloud Composer API. // -// See https://cloud.google.com/composer/ +// For product documentation, see: https://cloud.google.com/composer/ +// +// Creating a client // // Usage example: // // import "google.golang.org/api/composer/v1beta1" // ... -// composerService, err := composer.New(oauthHttpClient) +// ctx := context.Background() +// composerService, err := composer.NewService(ctx) +// +// In this example, Google Application Default Credentials are used for authentication. +// +// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// +// Other authentication options +// +// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// +// composerService, err := composer.NewService(ctx, option.WithAPIKey("AIza...")) +// +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// +// config := &oauth2.Config{...} +// // ... +// token, err := config.Exchange(ctx, ...) +// composerService, err := composer.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) +// +// See https://godoc.org/google.golang.org/api/option/ for details on options. package composer // import "google.golang.org/api/composer/v1beta1" import ( @@ -29,6 +51,8 @@ import ( gensupport "google.golang.org/api/gensupport" googleapi "google.golang.org/api/googleapi" + option "google.golang.org/api/option" + htransport "google.golang.org/api/transport/http" ) // Always reference these packages, just in case the auto-generated code @@ -56,6 +80,32 @@ const ( CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" ) +// NewService creates a new Service. +func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { + scopesOption := option.WithScopes( + "https://www.googleapis.com/auth/cloud-platform", + ) + // NOTE: prepend, so we don't override user-specified scopes. + opts = append([]option.ClientOption{scopesOption}, opts...) + client, endpoint, err := htransport.NewClient(ctx, opts...) + if err != nil { + return nil, err + } + s, err := New(client) + if err != nil { + return nil, err + } + if endpoint != "" { + s.BasePath = endpoint + } + return s, nil +} + +// New creates a new Service. It uses the provided http.Client for requests. +// +// Deprecated: please use NewService instead. +// To provide a custom HTTP client, use option.WithHTTPClient. +// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. func New(client *http.Client) (*Service, error) { if client == nil { return nil, errors.New("client is nil") @@ -95,6 +145,7 @@ type ProjectsService struct { func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { rs := &ProjectsLocationsService{s: s} rs.Environments = NewProjectsLocationsEnvironmentsService(s) + rs.ImageVersions = NewProjectsLocationsImageVersionsService(s) rs.Operations = NewProjectsLocationsOperationsService(s) return rs } @@ -104,6 +155,8 @@ type ProjectsLocationsService struct { Environments *ProjectsLocationsEnvironmentsService + ImageVersions *ProjectsLocationsImageVersionsService + Operations *ProjectsLocationsOperationsService } @@ -116,6 +169,15 @@ type ProjectsLocationsEnvironmentsService struct { s *Service } +func NewProjectsLocationsImageVersionsService(s *Service) *ProjectsLocationsImageVersionsService { + rs := &ProjectsLocationsImageVersionsService{s: s} + return rs +} + +type ProjectsLocationsImageVersionsService struct { + s *Service +} + func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService { rs := &ProjectsLocationsOperationsService{s: s} return rs @@ -255,6 +317,10 @@ type EnvironmentConfig struct { // used to run this environment. NodeCount int64 `json:"nodeCount,omitempty"` + // PrivateEnvironmentConfig: The configuration used for the Private IP + // Cloud Composer environment. + PrivateEnvironmentConfig *PrivateEnvironmentConfig `json:"privateEnvironmentConfig,omitempty"` + // SoftwareConfig: The configuration settings for software inside the // environment. SoftwareConfig *SoftwareConfig `json:"softwareConfig,omitempty"` @@ -282,6 +348,149 @@ func (s *EnvironmentConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// IPAllocationPolicy: Configuration for controlling how IPs are +// allocated in the +// GKE cluster. +type IPAllocationPolicy struct { + // ClusterIpv4CidrBlock: Optional. The IP address range used to allocate + // IP addresses to pods in + // the cluster. + // + // This field is applicable only when `use_ip_aliases` is true. + // + // Set to blank to have GKE choose a range with the default size. + // + // Set to /netmask (e.g. `/14`) to have GKE choose a range with a + // specific + // netmask. + // + // Set to + // a + // [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) + // + // notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks + // (e.g. + // `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific + // range + // to use. + // Specify `cluster_secondary_range_name` or + // `cluster_ipv4_cidr_block` + // but not both. + ClusterIpv4CidrBlock string `json:"clusterIpv4CidrBlock,omitempty"` + + // ClusterSecondaryRangeName: Optional. The name of the cluster's + // secondary range used to allocate + // IP addresses to pods. Specify either + // `cluster_secondary_range_name` + // or `cluster_ipv4_cidr_block` but not both. + // + // This field is applicable only when `use_ip_aliases` is true. + ClusterSecondaryRangeName string `json:"clusterSecondaryRangeName,omitempty"` + + // ServicesIpv4CidrBlock: Optional. The IP address range of the services + // IP addresses in this + // cluster. + // + // This field is applicable only when `use_ip_aliases` is true. + // + // Set to blank to have GKE choose a range with the default size. + // + // Set to /netmask (e.g. `/14`) to have GKE choose a range with a + // specific + // netmask. + // + // Set to + // a + // [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) + // + // notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks + // (e.g. + // `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific + // range + // to use. + // Specify `services_secondary_range_name` or + // `services_ipv4_cidr_block` + // but not both. + ServicesIpv4CidrBlock string `json:"servicesIpv4CidrBlock,omitempty"` + + // ServicesSecondaryRangeName: Optional. The name of the services' + // secondary range used to allocate + // IP addresses to the cluster. Specify either + // `services_secondary_range_name` + // or `services_ipv4_cidr_block` but not both. + // + // This field is applicable only when `use_ip_aliases` is true. + ServicesSecondaryRangeName string `json:"servicesSecondaryRangeName,omitempty"` + + // UseIpAliases: Optional. Whether or not to enable Alias IPs in the GKE + // cluster. + // If `true`, a VPC-native cluster is created. + UseIpAliases bool `json:"useIpAliases,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "ClusterIpv4CidrBlock") to unconditionally include in API requests. + // By default, fields with empty values are omitted from API requests. + // However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ClusterIpv4CidrBlock") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *IPAllocationPolicy) MarshalJSON() ([]byte, error) { + type NoMethod IPAllocationPolicy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ImageVersion: Image Version information +type ImageVersion struct { + // ImageVersionId: The string identifier of the ImageVersion, in the + // form: + // "composer-x.y.z-airflow-a.b(.c)" + ImageVersionId string `json:"imageVersionId,omitempty"` + + // IsDefault: Whether this is the default ImageVersion used by Composer + // during + // environment creation if no input ImageVersion is specified. + IsDefault bool `json:"isDefault,omitempty"` + + // SupportedPythonVersions: supported python versions + SupportedPythonVersions []string `json:"supportedPythonVersions,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ImageVersionId") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ImageVersionId") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *ImageVersion) MarshalJSON() ([]byte, error) { + type NoMethod ImageVersion + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ListEnvironmentsResponse: The environments in a project and location. type ListEnvironmentsResponse struct { // Environments: The list of environments returned by a @@ -319,6 +528,43 @@ func (s *ListEnvironmentsResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ListImageVersionsResponse: The ImageVersions in a project and +// location. +type ListImageVersionsResponse struct { + // ImageVersions: The list of supported ImageVersions in a location. + ImageVersions []*ImageVersion `json:"imageVersions,omitempty"` + + // NextPageToken: The page token used to query for the next page if one + // exists. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "ImageVersions") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ImageVersions") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListImageVersionsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListImageVersionsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ListOperationsResponse: The response message for // Operations.ListOperations. type ListOperationsResponse struct { @@ -365,6 +611,10 @@ type NodeConfig struct { // If unspecified, defaults to 100GB. Cannot be updated. DiskSizeGb int64 `json:"diskSizeGb,omitempty"` + // IpAllocationPolicy: Optional. The IPAllocationPolicy fields for the + // GKE cluster. + IpAllocationPolicy *IPAllocationPolicy `json:"ipAllocationPolicy,omitempty"` + // Location: Optional. The Compute Engine // [zone](/compute/docs/regions-zones) in which // to deploy the VMs used to run the Apache Airflow software, specified @@ -441,11 +691,10 @@ type NodeConfig struct { // OauthScopes: Optional. The set of Google API scopes to be made // available on all - // node VMs. Defaults + // node VMs. If `oauth_scopes` is empty, defaults // to - // ["https://www.googleapis.com/auth/cloud-platform"] and must be - // included in - // the list of specified scopes. Cannot be updated. + // ["https://www.googleapis.com/auth/cloud-platform"]. Cannot be + // updated. OauthScopes []string `json:"oauthScopes,omitempty"` // ServiceAccount: Optional. The Google Cloud Platform Service Account @@ -467,14 +716,9 @@ type NodeConfig struct { // // If a subnetwork is provided, `nodeConfig.network` must also be // provided, - // and the subnetwork must belong to the same project as the - // network. - // - // For Shared VPC, you must configure the subnetwork with secondary - // ranges - // named composer-pods + // and the subnetwork must belong to the enclosing environment's project // and - // composer-services to support Alias IPs. + // location. Subnetwork string `json:"subnetwork,omitempty"` // Tags: Optional. The list of instance tags applied to all node VMs. @@ -650,6 +894,91 @@ func (s *OperationMetadata) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// PrivateClusterConfig: Configuration options for the private GKE +// cluster in a Cloud Composer +// environment. +type PrivateClusterConfig struct { + // EnablePrivateEndpoint: Optional. If `true`, access to the public + // endpoint of the GKE cluster is + // denied. + EnablePrivateEndpoint bool `json:"enablePrivateEndpoint,omitempty"` + + // MasterIpv4CidrBlock: The IP range in CIDR notation to use for the + // hosted master network. This + // range is used for assigning internal IP addresses to the + // cluster + // master or set of masters and to the internal load balancer virtual + // IP. + // This range must not overlap with any other ranges in use + // within the cluster's network. If left blank, the default value + // of + // '172.16.0.0/28' is used. + MasterIpv4CidrBlock string `json:"masterIpv4CidrBlock,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "EnablePrivateEndpoint") to unconditionally include in API requests. + // By default, fields with empty values are omitted from API requests. + // However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "EnablePrivateEndpoint") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *PrivateClusterConfig) MarshalJSON() ([]byte, error) { + type NoMethod PrivateClusterConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// PrivateEnvironmentConfig: The configuration information for +// configuring a Private IP Cloud Composer +// environment. +type PrivateEnvironmentConfig struct { + // EnablePrivateEnvironment: Optional. If `true`, a Private IP Cloud + // Composer environment is created. + // If this field is true, `use_ip_aliases` must be true. + EnablePrivateEnvironment bool `json:"enablePrivateEnvironment,omitempty"` + + // PrivateClusterConfig: Optional. Configuration for the private GKE + // cluster for a Private IP + // Cloud Composer environment. + PrivateClusterConfig *PrivateClusterConfig `json:"privateClusterConfig,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "EnablePrivateEnvironment") to unconditionally include in API + // requests. By default, fields with empty values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "EnablePrivateEnvironment") + // to include in API requests with the JSON null value. By default, + // fields with empty values are omitted from API requests. However, any + // field with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *PrivateEnvironmentConfig) MarshalJSON() ([]byte, error) { + type NoMethod PrivateEnvironmentConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // SoftwareConfig: Specifies the selection and configuration of software // inside the environment. type SoftwareConfig struct { @@ -717,38 +1046,28 @@ type SoftwareConfig struct { // expression // `composer-([0-9]+\.[0-9]+\.[0-9]+|latest)-airflow-[0-9]+\.[ // 0-9]+(\.[0-9]+.*)?`. - // When used as input, the server will also check if the provided - // version is - // supported and deny the request for an unsupported version. + // When used as input, the server also checks if the provided version + // is + // supported and denies the request for an unsupported version. // // The Cloud Composer portion of the version is a - // [semantic version](https://semver.org) or `latest`. The patch + // [semantic version](https://semver.org) or `latest`. When the patch // version - // can be omitted and the current Cloud Composer patch version - // will be selected. + // is omitted, the current Cloud Composer patch version is + // selected. // When `latest` is provided instead of an explicit version number, - // the server will replace `latest` with the current Cloud Composer + // the server replaces `latest` with the current Cloud Composer // version - // and store that version number in the same field. + // and stores that version number in the same field. // - // The portion of the image version that follows airflow- is an - // official - // Apache Airflow repository + // The portion of the image version that follows airflow- is + // an + // official Apache Airflow repository // [release // name](https://github.com/apache/incubator-airflow/releases). // - // Supporte - // d values for input are: - // * `composer-latest-airflow-1.10.0` - // * `composer-latest-airflow-1.9.0` - // * `composer-latest-airflow-1.10` - // * `composer-latest-airflow-1.9` - // * `composer-1.3.0-airflow-1.10.0` - // * `composer-1.3.0-airflow-1.9.0` - // * `composer-1.3.0-airflow-1.10` - // * `composer-1.3.0-airflow-1.9` - // - // See also [Release Notes](/composer/docs/release-notes). + // See also [Version + // List](/composer/docs/concepts/versioning/composer-versions). ImageVersion string `json:"imageVersion,omitempty"` // PypiPackages: Optional. Custom Python Package Index (PyPI) packages @@ -800,20 +1119,20 @@ func (s *SoftwareConfig) MarshalJSON() ([]byte, error) { } // Status: The `Status` type defines a logical error model that is -// suitable for different -// programming environments, including REST APIs and RPC APIs. It is -// used by -// [gRPC](https://github.com/grpc). The error model is designed to -// be: +// suitable for +// different programming environments, including REST APIs and RPC APIs. +// It is +// used by [gRPC](https://github.com/grpc). The error model is designed +// to be: // // - Simple to use and understand for most users // - Flexible enough to meet unexpected needs // // # Overview // -// The `Status` message contains three pieces of data: error code, error -// message, -// and error details. The error code should be an enum value +// The `Status` message contains three pieces of data: error code, +// error +// message, and error details. The error code should be an enum value // of // google.rpc.Code, but it may accept additional error codes if needed. // The @@ -1846,6 +2165,195 @@ func (c *ProjectsLocationsEnvironmentsPatchCall) Do(opts ...googleapi.CallOption } +// method id "composer.projects.locations.imageVersions.list": + +type ProjectsLocationsImageVersionsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: List ImageVersions for provided location. +func (r *ProjectsLocationsImageVersionsService) List(parent string) *ProjectsLocationsImageVersionsListCall { + c := &ProjectsLocationsImageVersionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of image_versions to return. +func (c *ProjectsLocationsImageVersionsListCall) PageSize(pageSize int64) *ProjectsLocationsImageVersionsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The +// next_page_token value returned from a previous List request, if any. +func (c *ProjectsLocationsImageVersionsListCall) PageToken(pageToken string) *ProjectsLocationsImageVersionsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsImageVersionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsImageVersionsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsImageVersionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsImageVersionsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsImageVersionsListCall) Context(ctx context.Context) *ProjectsLocationsImageVersionsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsImageVersionsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsImageVersionsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/imageVersions") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "composer.projects.locations.imageVersions.list" call. +// Exactly one of *ListImageVersionsResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *ListImageVersionsResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsImageVersionsListCall) Do(opts ...googleapi.CallOption) (*ListImageVersionsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &ListImageVersionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "List ImageVersions for provided location.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/imageVersions", + // "httpMethod": "GET", + // "id": "composer.projects.locations.imageVersions.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "pageSize": { + // "description": "The maximum number of image_versions to return.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The next_page_token value returned from a previous List request, if any.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "List ImageVersions in the given project and location, in the form:\n\"projects/{projectId}/locations/{locationId}\"", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+parent}/imageVersions", + // "response": { + // "$ref": "ListImageVersionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsImageVersionsListCall) Pages(ctx context.Context, f func(*ListImageVersionsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + // method id "composer.projects.locations.operations.delete": type ProjectsLocationsOperationsDeleteCall struct { diff --git a/vendor/google.golang.org/api/compute/v0.beta/compute-api.json b/vendor/google.golang.org/api/compute/v0.beta/compute-api.json index 37e0d739..d8ab327d 100644 --- a/vendor/google.golang.org/api/compute/v0.beta/compute-api.json +++ b/vendor/google.golang.org/api/compute/v0.beta/compute-api.json @@ -29,7 +29,7 @@ "description": "Creates and runs virtual machines on Google Cloud Platform.", "discoveryVersion": "v1", "documentationLink": "https://developers.google.com/compute/docs/reference/latest/", - "etag": "\"J3WqvAcMk4eQjJXvfSI4Yr8VouA/hpAivS3Oe8CKVoCbwnyJCYDdS-0\"", + "etag": "\"VPK3KBfpaEgZ16pozGOoMYfKc0U/FcIdq7K0sVtzHMLqHzM5hbg05bw\"", "icons": { "x16": "https://www.google.com/images/icons/product/compute_engine-16.png", "x32": "https://www.google.com/images/icons/product/compute_engine-32.png" @@ -150,7 +150,7 @@ "acceleratorType": { "description": "Name of the accelerator type to return.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -302,7 +302,7 @@ "address": { "description": "Name of the address resource to delete.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -348,7 +348,7 @@ "address": { "description": "Name of the address resource to return.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -571,376 +571,6 @@ } } }, - "allocations": { - "methods": { - "aggregatedList": { - "description": "Retrieves an aggregated list of allocations.", - "httpMethod": "GET", - "id": "compute.allocations.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "{project}/aggregated/allocations", - "response": { - "$ref": "AllocationAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "description": "Deletes the specified allocation.", - "httpMethod": "DELETE", - "id": "compute.allocations.delete", - "parameterOrder": [ - "project", - "zone", - "allocation" - ], - "parameters": { - "allocation": { - "description": "Name of the allocation to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "Name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "{project}/zones/{zone}/allocations/{allocation}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Retrieves all information of the specified allocation.", - "httpMethod": "GET", - "id": "compute.allocations.get", - "parameterOrder": [ - "project", - "zone", - "allocation" - ], - "parameters": { - "allocation": { - "description": "Name of the allocation to retrieve.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "zone": { - "description": "Name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "{project}/zones/{zone}/allocations/{allocation}", - "response": { - "$ref": "Allocation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", - "httpMethod": "GET", - "id": "compute.allocations.getIamPolicy", - "parameterOrder": [ - "project", - "zone", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "{project}/zones/{zone}/allocations/{resource}/getIamPolicy", - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a new allocation.", - "httpMethod": "POST", - "id": "compute.allocations.insert", - "parameterOrder": [ - "project", - "zone" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "Name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "{project}/zones/{zone}/allocations", - "request": { - "$ref": "Allocation" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "A list all the allocations that have been configured for the specified project in specified zone.", - "httpMethod": "GET", - "id": "compute.allocations.list", - "parameterOrder": [ - "project", - "zone" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "zone": { - "description": "Name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "{project}/zones/{zone}/allocations", - "response": { - "$ref": "AllocationList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "setIamPolicy": { - "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", - "httpMethod": "POST", - "id": "compute.allocations.setIamPolicy", - "parameterOrder": [ - "project", - "zone", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "{project}/zones/{zone}/allocations/{resource}/setIamPolicy", - "request": { - "$ref": "ZoneSetPolicyRequest" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "httpMethod": "POST", - "id": "compute.allocations.testIamPermissions", - "parameterOrder": [ - "project", - "zone", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "{project}/zones/{zone}/allocations/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, "autoscalers": { "methods": { "aggregatedList": { @@ -1005,7 +635,7 @@ "autoscaler": { "description": "Name of the autoscaler to delete.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -1051,7 +681,7 @@ "autoscaler": { "description": "Name of the autoscaler to return.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -1190,7 +820,7 @@ "autoscaler": { "description": "Name of the autoscaler to patch.", "location": "query", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "type": "string" }, "project": { @@ -1282,7 +912,7 @@ "autoscaler": { "description": "Name of the autoscaler to update.", "location": "query", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "type": "string" }, "project": { @@ -1373,7 +1003,7 @@ "backendBucket": { "description": "Name of the BackendBucket resource to delete.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -1455,7 +1085,7 @@ "backendBucket": { "description": "Name of the BackendBucket resource to return.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -1571,7 +1201,7 @@ "backendBucket": { "description": "Name of the BackendBucket resource to patch.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -1612,7 +1242,7 @@ "backendBucket": { "description": "Name of the BackendBucket resource to update.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -1746,7 +1376,7 @@ "backendService": { "description": "Name of the BackendService resource to delete.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -1828,7 +1458,7 @@ "backendService": { "description": "Name of the BackendService resource to return.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -1862,7 +1492,7 @@ "backendService": { "description": "Name of the BackendService resource to which the queried instance belongs.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -2098,7 +1728,7 @@ "backendService": { "description": "Name of the BackendService resource to update.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -2193,7 +1823,7 @@ "diskType": { "description": "Name of the disk type to return.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -2904,6 +2534,237 @@ } } }, + "externalVpnGateways": { + "methods": { + "delete": { + "description": "Deletes the specified externalVpnGateway.", + "httpMethod": "DELETE", + "id": "compute.externalVpnGateways.delete", + "parameterOrder": [ + "project", + "externalVpnGateway" + ], + "parameters": { + "externalVpnGateway": { + "description": "Name of the externalVpnGateways to delete.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "{project}/global/externalVpnGateways/{externalVpnGateway}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "get": { + "description": "Returns the specified externalVpnGateway. Get a list of available externalVpnGateways by making a list() request.", + "httpMethod": "GET", + "id": "compute.externalVpnGateways.get", + "parameterOrder": [ + "project", + "externalVpnGateway" + ], + "parameters": { + "externalVpnGateway": { + "description": "Name of the externalVpnGateway to return.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + } + }, + "path": "{project}/global/externalVpnGateways/{externalVpnGateway}", + "response": { + "$ref": "ExternalVpnGateway" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "insert": { + "description": "Creates a ExternalVpnGateway in the specified project using the data included in the request.", + "httpMethod": "POST", + "id": "compute.externalVpnGateways.insert", + "parameterOrder": [ + "project" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "{project}/global/externalVpnGateways", + "request": { + "$ref": "ExternalVpnGateway" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "list": { + "description": "Retrieves the list of ExternalVpnGateway available to the specified project.", + "httpMethod": "GET", + "id": "compute.externalVpnGateways.list", + "parameterOrder": [ + "project" + ], + "parameters": { + "filter": { + "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).", + "location": "query", + "type": "string" + }, + "maxResults": { + "default": "500", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", + "format": "uint32", + "location": "query", + "minimum": "0", + "type": "integer" + }, + "orderBy": { + "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", + "location": "query", + "type": "string" + }, + "pageToken": { + "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", + "location": "query", + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + } + }, + "path": "{project}/global/externalVpnGateways", + "response": { + "$ref": "ExternalVpnGatewayList" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "setLabels": { + "description": "Sets the labels on an ExternalVpnGateway. To learn more about labels, read the Labeling Resources documentation.", + "httpMethod": "POST", + "id": "compute.externalVpnGateways.setLabels", + "parameterOrder": [ + "project", + "resource" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "resource": { + "description": "Name or id of the resource for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + } + }, + "path": "{project}/global/externalVpnGateways/{resource}/setLabels", + "request": { + "$ref": "GlobalSetLabelsRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource.", + "httpMethod": "POST", + "id": "compute.externalVpnGateways.testIamPermissions", + "parameterOrder": [ + "project", + "resource" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "resource": { + "description": "Name or id of the resource for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + } + }, + "path": "{project}/global/externalVpnGateways/{resource}/testIamPermissions", + "request": { + "$ref": "TestPermissionsRequest" + }, + "response": { + "$ref": "TestPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + } + } + }, "firewalls": { "methods": { "delete": { @@ -3245,7 +3106,7 @@ "forwardingRule": { "description": "Name of the ForwardingRule resource to delete.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -3291,7 +3152,7 @@ "forwardingRule": { "description": "Name of the ForwardingRule resource to return.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -3418,6 +3279,55 @@ "https://www.googleapis.com/auth/compute.readonly" ] }, + "patch": { + "description": "Updates the specified forwarding rule with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. Currently, you can only patch the network_tier field.", + "httpMethod": "PATCH", + "id": "compute.forwardingRules.patch", + "parameterOrder": [ + "project", + "region", + "forwardingRule" + ], + "parameters": { + "forwardingRule": { + "description": "Name of the ForwardingRule resource to patch.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region scoping this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "{project}/regions/{region}/forwardingRules/{forwardingRule}", + "request": { + "$ref": "ForwardingRule" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, "setLabels": { "description": "Sets the labels on the specified resource. To learn more about labels, read the Labeling Resources documentation.", "httpMethod": "POST", @@ -3480,7 +3390,7 @@ "forwardingRule": { "description": "Name of the ForwardingRule resource in which target is to be set.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -3577,7 +3487,7 @@ "address": { "description": "Name of the address resource to delete.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -3615,7 +3525,7 @@ "address": { "description": "Name of the address resource to return.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -3808,7 +3718,7 @@ "forwardingRule": { "description": "Name of the ForwardingRule resource to delete.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -3846,7 +3756,7 @@ "forwardingRule": { "description": "Name of the ForwardingRule resource to return.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -3950,6 +3860,47 @@ "https://www.googleapis.com/auth/compute.readonly" ] }, + "patch": { + "description": "Updates the specified forwarding rule with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. Currently, you can only patch the network_tier field.", + "httpMethod": "PATCH", + "id": "compute.globalForwardingRules.patch", + "parameterOrder": [ + "project", + "forwardingRule" + ], + "parameters": { + "forwardingRule": { + "description": "Name of the ForwardingRule resource to patch.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "{project}/global/forwardingRules/{forwardingRule}", + "request": { + "$ref": "ForwardingRule" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, "setLabels": { "description": "Sets the labels on the specified resource. To learn more about labels, read the Labeling Resources documentation.", "httpMethod": "POST", @@ -3998,7 +3949,7 @@ "forwardingRule": { "description": "Name of the ForwardingRule resource in which target is to be set.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -4129,7 +4080,7 @@ "operation": { "description": "Name of the Operations resource to delete.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -4159,7 +4110,7 @@ "operation": { "description": "Name of the Operations resource to return.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -4246,7 +4197,7 @@ "healthCheck": { "description": "Name of the HealthCheck resource to delete.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -4284,7 +4235,7 @@ "healthCheck": { "description": "Name of the HealthCheck resource to return.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -4400,7 +4351,7 @@ "healthCheck": { "description": "Name of the HealthCheck resource to patch.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -4478,7 +4429,7 @@ "healthCheck": { "description": "Name of the HealthCheck resource to update.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -4523,7 +4474,7 @@ "httpHealthCheck": { "description": "Name of the HttpHealthCheck resource to delete.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -4561,7 +4512,7 @@ "httpHealthCheck": { "description": "Name of the HttpHealthCheck resource to return.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -4677,7 +4628,7 @@ "httpHealthCheck": { "description": "Name of the HttpHealthCheck resource to patch.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -4755,7 +4706,7 @@ "httpHealthCheck": { "description": "Name of the HttpHealthCheck resource to update.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -4800,7 +4751,7 @@ "httpsHealthCheck": { "description": "Name of the HttpsHealthCheck resource to delete.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -4838,7 +4789,7 @@ "httpsHealthCheck": { "description": "Name of the HttpsHealthCheck resource to return.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -4954,7 +4905,7 @@ "httpsHealthCheck": { "description": "Name of the HttpsHealthCheck resource to patch.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -5032,7 +4983,7 @@ "httpsHealthCheck": { "description": "Name of the HttpsHealthCheck resource to update.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -5545,6 +5496,48 @@ "https://www.googleapis.com/auth/compute.readonly" ] }, + "applyUpdatesToInstances": { + "description": "Apply changes to selected instances on the managed instance group. This method can be used to apply new overrides and/or new versions.", + "httpMethod": "POST", + "id": "compute.instanceGroupManagers.applyUpdatesToInstances", + "parameterOrder": [ + "project", + "zone", + "instanceGroupManager" + ], + "parameters": { + "instanceGroupManager": { + "description": "The name of the managed instance group, should conform to RFC1035.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "zone": { + "description": "The name of the zone where the managed instance group is located. Should conform to RFC1035.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/applyUpdatesToInstances", + "request": { + "$ref": "InstanceGroupManagersApplyUpdatesRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, "delete": { "description": "Deletes the specified managed instance group and all of the instances in that group. Note that the instance group must not belong to a backend service. Read Deleting an instance group for more information.", "httpMethod": "DELETE", @@ -6751,7 +6744,7 @@ "instanceTemplates": { "methods": { "delete": { - "description": "Deletes the specified instance template. Deleting an instance template is permanent and cannot be undone. It's not possible to delete templates which are in use by an instance group.", + "description": "Deletes the specified instance template. Deleting an instance template is permanent and cannot be undone. It is not possible to delete templates that are already in use by a managed instance group.", "httpMethod": "DELETE", "id": "compute.instanceTemplates.delete", "parameterOrder": [ @@ -6762,7 +6755,7 @@ "instanceTemplate": { "description": "The name of the instance template to delete.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -6800,7 +6793,7 @@ "instanceTemplate": { "description": "The name of the instance template.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -6890,7 +6883,7 @@ ] }, "list": { - "description": "Retrieves a list of instance templates that are contained within the specified project and zone.", + "description": "Retrieves a list of instance templates that are contained within the specified project.", "httpMethod": "GET", "id": "compute.instanceTemplates.list", "parameterOrder": [ @@ -7131,7 +7124,7 @@ ], "parameters": { "forceAttach": { - "description": "Whether to force attach the disk even if it's currently attached to another instance. This is only available for regional disks.", + "description": "Whether to force attach the disk even if it's currently attached to another instance.", "location": "query", "type": "boolean" }, @@ -7526,6 +7519,48 @@ "https://www.googleapis.com/auth/compute.readonly" ] }, + "getShieldedInstanceIdentity": { + "description": "Returns the Shielded Instance Identity of an instance", + "httpMethod": "GET", + "id": "compute.instances.getShieldedInstanceIdentity", + "parameterOrder": [ + "project", + "zone", + "instance" + ], + "parameters": { + "instance": { + "description": "Name or id of the instance scoping this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "zone": { + "description": "The name of the zone for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + } + }, + "path": "{project}/zones/{zone}/instances/{instance}/getShieldedInstanceIdentity", + "response": { + "$ref": "ShieldedInstanceIdentity" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, "getShieldedVmIdentity": { "description": "Returns the Shielded VM Identity of an instance", "httpMethod": "GET", @@ -7737,7 +7772,7 @@ ] }, "reset": { - "description": "Performs a reset on the instance. For more information, see Resetting an instance.", + "description": "Performs a reset on the instance. This is a hard reset the VM does not do a graceful shutdown. For more information, see Resetting an instance.", "httpMethod": "POST", "id": "compute.instances.reset", "parameterOrder": [ @@ -8331,6 +8366,55 @@ "https://www.googleapis.com/auth/compute" ] }, + "setShieldedInstanceIntegrityPolicy": { + "description": "Sets the Shielded Instance integrity policy for an instance. You can only use this method on a running instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + "httpMethod": "PATCH", + "id": "compute.instances.setShieldedInstanceIntegrityPolicy", + "parameterOrder": [ + "project", + "zone", + "instance" + ], + "parameters": { + "instance": { + "description": "Name or id of the instance scoping this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "zone": { + "description": "The name of the zone for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + } + }, + "path": "{project}/zones/{zone}/instances/{instance}/setShieldedInstanceIntegrityPolicy", + "request": { + "$ref": "ShieldedInstanceIntegrityPolicy" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, "setShieldedVmIntegrityPolicy": { "description": "Sets the Shielded VM integrity policy for a VM instance. You can only use this method on a running VM instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", "httpMethod": "PATCH", @@ -8868,6 +8952,55 @@ "https://www.googleapis.com/auth/compute" ] }, + "updateShieldedInstanceConfig": { + "description": "Updates the Shielded Instance config for an instance. You can only use this method on a stopped instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + "httpMethod": "PATCH", + "id": "compute.instances.updateShieldedInstanceConfig", + "parameterOrder": [ + "project", + "zone", + "instance" + ], + "parameters": { + "instance": { + "description": "Name or id of the instance scoping this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "zone": { + "description": "The name of the zone for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + } + }, + "path": "{project}/zones/{zone}/instances/{instance}/updateShieldedInstanceConfig", + "request": { + "$ref": "ShieldedInstanceConfig" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, "updateShieldedVmConfig": { "description": "Updates the Shielded VM config for a VM instance. You can only use this method on a stopped VM instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", "httpMethod": "PATCH", @@ -8983,7 +9116,7 @@ "interconnectAttachment": { "description": "Name of the interconnect attachment to delete.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -9029,7 +9162,7 @@ "interconnectAttachment": { "description": "Name of the interconnect attachment to return.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -9169,7 +9302,7 @@ "interconnectAttachment": { "description": "Name of the interconnect attachment to patch.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -9315,7 +9448,7 @@ "interconnectLocation": { "description": "Name of the interconnect location to return.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -9402,7 +9535,7 @@ "interconnect": { "description": "Name of the interconnect to delete.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -9440,7 +9573,7 @@ "interconnect": { "description": "Name of the interconnect to return.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -9474,7 +9607,7 @@ "interconnect": { "description": "Name of the interconnect resource to query.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -9590,7 +9723,7 @@ "interconnect": { "description": "Name of the interconnect to update.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -9746,7 +9879,7 @@ "license": { "description": "Name of the license resource to delete.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -9784,7 +9917,7 @@ "license": { "description": "Name of the License resource to return.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -9806,6 +9939,40 @@ "https://www.googleapis.com/auth/compute.readonly" ] }, + "getIamPolicy": { + "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + "httpMethod": "GET", + "id": "compute.licenses.getIamPolicy", + "parameterOrder": [ + "project", + "resource" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "resource": { + "description": "Name or id of the resource for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + } + }, + "path": "{project}/global/licenses/{resource}/getIamPolicy", + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, "insert": { "description": "Create a License resource in the specified project.", "httpMethod": "POST", @@ -9993,7 +10160,7 @@ "machineType": { "description": "Name of the machine type to return.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -10754,7 +10921,7 @@ "network": { "description": "Name of the network for this request.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "required": true, "type": "string" }, @@ -11011,7 +11178,7 @@ "nodeGroup": { "description": "Name of the NodeGroup resource.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -11109,7 +11276,7 @@ "nodeGroup": { "description": "Name of the NodeGroup resource to delete.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -11155,7 +11322,7 @@ "nodeGroup": { "description": "Name of the NodeGroup resource to delete.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -11204,7 +11371,7 @@ "nodeGroup": { "description": "Name of the node group to return.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -11407,7 +11574,7 @@ "nodeGroup": { "description": "Name of the NodeGroup resource whose nodes you want to list.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -11501,9 +11668,9 @@ ], "parameters": { "nodeGroup": { - "description": "Name of the NodeGroup resource to delete.", + "description": "Name of the NodeGroup resource to update.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -11650,7 +11817,7 @@ "nodeTemplate": { "description": "Name of the NodeTemplate resource to delete.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -11696,7 +11863,7 @@ "nodeTemplate": { "description": "Name of the node template to return.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -12020,7 +12187,7 @@ "nodeType": { "description": "Name of the node type to return.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -12571,7 +12738,7 @@ "autoscaler": { "description": "Name of the autoscaler to delete.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -12617,7 +12784,7 @@ "autoscaler": { "description": "Name of the autoscaler to return.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -12756,7 +12923,7 @@ "autoscaler": { "description": "Name of the autoscaler to patch.", "location": "query", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "type": "string" }, "project": { @@ -12848,7 +13015,7 @@ "autoscaler": { "description": "Name of the autoscaler to update.", "location": "query", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "type": "string" }, "project": { @@ -12900,7 +13067,7 @@ "backendService": { "description": "Name of the BackendService resource to delete.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -12946,7 +13113,7 @@ "backendService": { "description": "Name of the BackendService resource to return.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -12988,7 +13155,7 @@ "backendService": { "description": "Name of the BackendService resource for which to get health.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -13224,7 +13391,7 @@ "backendService": { "description": "Name of the BackendService resource to update.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -13326,7 +13493,7 @@ "commitment": { "description": "Name of the commitment to return.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -13452,6 +13619,55 @@ "https://www.googleapis.com/auth/compute", "https://www.googleapis.com/auth/compute.readonly" ] + }, + "updateReservations": { + "description": "Update the shape of reservations for GPUS/Local SSDs of reservations within the commitments.", + "httpMethod": "POST", + "id": "compute.regionCommitments.updateReservations", + "parameterOrder": [ + "project", + "region", + "commitment" + ], + "parameters": { + "commitment": { + "description": "Name of the commitment of which the reservation's capacities are being updated.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "{project}/regions/{region}/commitments/{commitment}/updateReservations", + "request": { + "$ref": "RegionCommitmentsUpdateReservationsRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] } } }, @@ -13470,7 +13686,7 @@ "diskType": { "description": "Name of the disk type to return.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -13745,6 +13961,48 @@ "https://www.googleapis.com/auth/compute.readonly" ] }, + "getIamPolicy": { + "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + "httpMethod": "GET", + "id": "compute.regionDisks.getIamPolicy", + "parameterOrder": [ + "project", + "region", + "resource" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "The name of the region for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "resource": { + "description": "Name or id of the resource for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + } + }, + "path": "{project}/regions/{region}/disks/{resource}/getIamPolicy", + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, "insert": { "description": "Creates a persistent regional disk in the specified project using the data included in the request.", "httpMethod": "POST", @@ -13946,6 +14204,50 @@ "https://www.googleapis.com/auth/compute" ] }, + "setIamPolicy": { + "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + "httpMethod": "POST", + "id": "compute.regionDisks.setIamPolicy", + "parameterOrder": [ + "project", + "region", + "resource" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "The name of the region for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "resource": { + "description": "Name or id of the resource for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + } + }, + "path": "{project}/regions/{region}/disks/{resource}/setIamPolicy", + "request": { + "$ref": "RegionSetPolicyRequest" + }, + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, "setLabels": { "description": "Sets the labels on the target regional disk.", "httpMethod": "POST", @@ -14091,6 +14393,48 @@ "https://www.googleapis.com/auth/compute" ] }, + "applyUpdatesToInstances": { + "description": "Apply updates to selected instances the managed instance group.", + "httpMethod": "POST", + "id": "compute.regionInstanceGroupManagers.applyUpdatesToInstances", + "parameterOrder": [ + "project", + "region", + "instanceGroupManager" + ], + "parameters": { + "instanceGroupManager": { + "description": "The name of the managed instance group, should conform to RFC1035.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region scoping this request, should conform to RFC1035.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/applyUpdatesToInstances", + "request": { + "$ref": "RegionInstanceGroupManagersApplyUpdatesRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, "delete": { "description": "Deletes the specified managed instance group and all of the instances in that group.", "httpMethod": "DELETE", @@ -15036,7 +15380,7 @@ "operation": { "description": "Name of the Operations resource to delete.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -15074,7 +15418,7 @@ "operation": { "description": "Name of the Operations resource to return.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -15183,7 +15527,7 @@ "region": { "description": "Name of the region resource to return.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -15249,6 +15593,425 @@ } } }, + "reservations": { + "methods": { + "aggregatedList": { + "description": "Retrieves an aggregated list of reservations.", + "httpMethod": "GET", + "id": "compute.reservations.aggregatedList", + "parameterOrder": [ + "project" + ], + "parameters": { + "filter": { + "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).", + "location": "query", + "type": "string" + }, + "maxResults": { + "default": "500", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", + "format": "uint32", + "location": "query", + "minimum": "0", + "type": "integer" + }, + "orderBy": { + "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", + "location": "query", + "type": "string" + }, + "pageToken": { + "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", + "location": "query", + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + } + }, + "path": "{project}/aggregated/reservations", + "response": { + "$ref": "ReservationAggregatedList" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "delete": { + "description": "Deletes the specified reservation.", + "httpMethod": "DELETE", + "id": "compute.reservations.delete", + "parameterOrder": [ + "project", + "zone", + "reservation" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "reservation": { + "description": "Name of the reservation to delete.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "zone": { + "description": "Name of the zone for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + } + }, + "path": "{project}/zones/{zone}/reservations/{reservation}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "get": { + "description": "Retrieves all information of the specified reservation.", + "httpMethod": "GET", + "id": "compute.reservations.get", + "parameterOrder": [ + "project", + "zone", + "reservation" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "reservation": { + "description": "Name of the reservation to retrieve.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "zone": { + "description": "Name of the zone for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + } + }, + "path": "{project}/zones/{zone}/reservations/{reservation}", + "response": { + "$ref": "Reservation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "getIamPolicy": { + "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + "httpMethod": "GET", + "id": "compute.reservations.getIamPolicy", + "parameterOrder": [ + "project", + "zone", + "resource" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "resource": { + "description": "Name or id of the resource for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "zone": { + "description": "The name of the zone for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + } + }, + "path": "{project}/zones/{zone}/reservations/{resource}/getIamPolicy", + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "insert": { + "description": "Creates a new reservation.", + "httpMethod": "POST", + "id": "compute.reservations.insert", + "parameterOrder": [ + "project", + "zone" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "zone": { + "description": "Name of the zone for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + } + }, + "path": "{project}/zones/{zone}/reservations", + "request": { + "$ref": "Reservation" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "list": { + "description": "A list all the reservations that have been configured for the specified project in specified zone.", + "httpMethod": "GET", + "id": "compute.reservations.list", + "parameterOrder": [ + "project", + "zone" + ], + "parameters": { + "filter": { + "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).", + "location": "query", + "type": "string" + }, + "maxResults": { + "default": "500", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", + "format": "uint32", + "location": "query", + "minimum": "0", + "type": "integer" + }, + "orderBy": { + "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", + "location": "query", + "type": "string" + }, + "pageToken": { + "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", + "location": "query", + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "zone": { + "description": "Name of the zone for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + } + }, + "path": "{project}/zones/{zone}/reservations", + "response": { + "$ref": "ReservationList" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "resize": { + "description": "Resizes the reservation (applicable to standalone reservations only)", + "httpMethod": "POST", + "id": "compute.reservations.resize", + "parameterOrder": [ + "project", + "zone", + "reservation" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "reservation": { + "description": "Name of the reservation to update.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "zone": { + "description": "Name of the zone for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + } + }, + "path": "{project}/zones/{zone}/reservations/{reservation}/resize", + "request": { + "$ref": "ReservationsResizeRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "setIamPolicy": { + "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + "httpMethod": "POST", + "id": "compute.reservations.setIamPolicy", + "parameterOrder": [ + "project", + "zone", + "resource" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "resource": { + "description": "Name or id of the resource for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "zone": { + "description": "The name of the zone for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + } + }, + "path": "{project}/zones/{zone}/reservations/{resource}/setIamPolicy", + "request": { + "$ref": "ZoneSetPolicyRequest" + }, + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource.", + "httpMethod": "POST", + "id": "compute.reservations.testIamPermissions", + "parameterOrder": [ + "project", + "zone", + "resource" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "resource": { + "description": "Name or id of the resource for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "zone": { + "description": "The name of the zone for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + } + }, + "path": "{project}/zones/{zone}/reservations/{resource}/testIamPermissions", + "request": { + "$ref": "TestPermissionsRequest" + }, + "response": { + "$ref": "TestPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + } + } + }, "resourcePolicies": { "methods": { "aggregatedList": { @@ -15332,7 +16095,7 @@ "resourcePolicy": { "description": "Name of the resource policy to delete.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -15373,7 +16136,7 @@ "resourcePolicy": { "description": "Name of the resource policy to retrieve.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -15616,7 +16379,7 @@ "router": { "description": "Name of the Router resource to delete.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -15657,7 +16420,7 @@ "router": { "description": "Name of the Router resource to return.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -15722,7 +16485,7 @@ "router": { "description": "Name of the Router resource to query for Nat Mapping information of VM endpoints.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -15764,7 +16527,7 @@ "router": { "description": "Name of the Router resource to query.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -15909,7 +16672,7 @@ "router": { "description": "Name of the Router resource to patch.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -15953,7 +16716,7 @@ "router": { "description": "Name of the Router resource to query.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -16048,7 +16811,7 @@ "router": { "description": "Name of the Router resource to update.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -16283,7 +17046,7 @@ "securityPolicy": { "description": "Name of the security policy to update.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -16329,7 +17092,7 @@ "securityPolicy": { "description": "Name of the security policy to delete.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -16362,7 +17125,7 @@ "securityPolicy": { "description": "Name of the security policy to get.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -16402,7 +17165,7 @@ "securityPolicy": { "description": "Name of the security policy to which the queried rule belongs.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -16576,7 +17339,7 @@ "securityPolicy": { "description": "Name of the security policy to update.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -16618,7 +17381,7 @@ "securityPolicy": { "description": "Name of the security policy to update.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -16665,7 +17428,7 @@ "securityPolicy": { "description": "Name of the security policy to update.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -17048,7 +17811,7 @@ "sslCertificate": { "description": "Name of the SslCertificate resource to delete.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -17081,7 +17844,7 @@ "sslCertificate": { "description": "Name of the SslCertificate resource to return.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -17582,7 +18345,7 @@ "subnetwork": { "description": "Name of the Subnetwork resource to delete.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -17628,7 +18391,7 @@ "subnetwork": { "description": "Name of the Subnetwork resource to update.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -17672,7 +18435,7 @@ "subnetwork": { "description": "Name of the Subnetwork resource to return.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -17908,7 +18671,7 @@ "subnetwork": { "description": "Name of the Subnetwork resource to patch.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -18001,7 +18764,7 @@ "subnetwork": { "description": "Name of the Subnetwork resource.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -18091,7 +18854,7 @@ "targetHttpProxy": { "description": "Name of the TargetHttpProxy resource to delete.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -18124,7 +18887,7 @@ "targetHttpProxy": { "description": "Name of the TargetHttpProxy resource to return.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -18245,7 +19008,7 @@ "targetHttpProxy": { "description": "Name of the TargetHttpProxy to set a URL map for.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -18327,7 +19090,7 @@ "targetHttpsProxy": { "description": "Name of the TargetHttpsProxy resource to delete.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -18360,7 +19123,7 @@ "targetHttpsProxy": { "description": "Name of the TargetHttpsProxy resource to return.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -18521,7 +19284,7 @@ "targetHttpsProxy": { "description": "Name of the TargetHttpsProxy resource to set an SslCertificates resource for.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -18602,7 +19365,7 @@ "targetHttpsProxy": { "description": "Name of the TargetHttpsProxy resource whose URL map is to be set.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -18734,7 +19497,7 @@ "targetInstance": { "description": "Name of the TargetInstance resource to delete.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -18775,7 +19538,7 @@ "targetInstance": { "description": "Name of the TargetInstance resource to return.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -18976,7 +19739,7 @@ "targetPool": { "description": "Name of the target pool to add a health check to.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -19025,7 +19788,7 @@ "targetPool": { "description": "Name of the TargetPool resource to add instances to.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -19123,7 +19886,7 @@ "targetPool": { "description": "Name of the TargetPool resource to delete.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -19164,7 +19927,7 @@ "targetPool": { "description": "Name of the TargetPool resource to return.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -19206,7 +19969,7 @@ "targetPool": { "description": "Name of the TargetPool resource to which the queried instance belongs.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -19354,7 +20117,7 @@ "targetPool": { "description": "Name of the target pool to remove health checks from.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -19403,7 +20166,7 @@ "targetPool": { "description": "Name of the TargetPool resource to remove instances from.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -19458,7 +20221,7 @@ "targetPool": { "description": "Name of the TargetPool resource to set a backup pool for.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -19548,7 +20311,7 @@ "targetSslProxy": { "description": "Name of the TargetSslProxy resource to delete.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -19581,7 +20344,7 @@ "targetSslProxy": { "description": "Name of the TargetSslProxy resource to return.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -19702,7 +20465,7 @@ "targetSslProxy": { "description": "Name of the TargetSslProxy resource whose BackendService resource is to be set.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -19743,7 +20506,7 @@ "targetSslProxy": { "description": "Name of the TargetSslProxy resource whose ProxyHeader is to be set.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -19784,7 +20547,7 @@ "targetSslProxy": { "description": "Name of the TargetSslProxy resource whose SslCertificate resource is to be set.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -19906,7 +20669,7 @@ "targetTcpProxy": { "description": "Name of the TargetTcpProxy resource to delete.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -19939,7 +20702,7 @@ "targetTcpProxy": { "description": "Name of the TargetTcpProxy resource to return.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -20060,7 +20823,7 @@ "targetTcpProxy": { "description": "Name of the TargetTcpProxy resource whose BackendService resource is to be set.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -20101,7 +20864,7 @@ "targetTcpProxy": { "description": "Name of the TargetTcpProxy resource whose ProxyHeader is to be set.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -20203,7 +20966,7 @@ "targetVpnGateway": { "description": "Name of the target VPN gateway to delete.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -20244,7 +21007,7 @@ "targetVpnGateway": { "description": "Name of the target VPN gateway to return.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -20479,7 +21242,7 @@ "urlMap": { "description": "Name of the UrlMap resource to delete.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -20512,7 +21275,7 @@ "urlMap": { "description": "Name of the UrlMap resource to return.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -20584,7 +21347,7 @@ "urlMap": { "description": "Name of the UrlMap scoping this request.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -20674,7 +21437,7 @@ "urlMap": { "description": "Name of the UrlMap resource to patch.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -20752,7 +21515,7 @@ "urlMap": { "description": "Name of the UrlMap resource to update.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -20788,7 +21551,7 @@ "urlMap": { "description": "Name of the UrlMap resource to be validated as.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -20807,6 +21570,336 @@ } } }, + "vpnGateways": { + "methods": { + "aggregatedList": { + "description": "Retrieves an aggregated list of VPN gateways.", + "httpMethod": "GET", + "id": "compute.vpnGateways.aggregatedList", + "parameterOrder": [ + "project" + ], + "parameters": { + "filter": { + "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).", + "location": "query", + "type": "string" + }, + "maxResults": { + "default": "500", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", + "format": "uint32", + "location": "query", + "minimum": "0", + "type": "integer" + }, + "orderBy": { + "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", + "location": "query", + "type": "string" + }, + "pageToken": { + "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", + "location": "query", + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + } + }, + "path": "{project}/aggregated/vpnGateways", + "response": { + "$ref": "VpnGatewayAggregatedList" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "delete": { + "description": "Deletes the specified VPN gateway.", + "httpMethod": "DELETE", + "id": "compute.vpnGateways.delete", + "parameterOrder": [ + "project", + "region", + "vpnGateway" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "vpnGateway": { + "description": "Name of the VPN gateway to delete.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + } + }, + "path": "{project}/regions/{region}/vpnGateways/{vpnGateway}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "get": { + "description": "Returns the specified VPN gateway. Gets a list of available VPN gateways by making a list() request.", + "httpMethod": "GET", + "id": "compute.vpnGateways.get", + "parameterOrder": [ + "project", + "region", + "vpnGateway" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "vpnGateway": { + "description": "Name of the VPN gateway to return.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + } + }, + "path": "{project}/regions/{region}/vpnGateways/{vpnGateway}", + "response": { + "$ref": "VpnGateway" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "getStatus": { + "description": "Returns the status for the specified VPN gateway.", + "httpMethod": "GET", + "id": "compute.vpnGateways.getStatus", + "parameterOrder": [ + "project", + "region", + "vpnGateway" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "vpnGateway": { + "description": "Name of the VPN gateway to return.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + } + }, + "path": "{project}/regions/{region}/vpnGateways/{vpnGateway}/getStatus", + "response": { + "$ref": "VpnGatewaysGetStatusResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "insert": { + "description": "Creates a VPN gateway in the specified project and region using the data included in the request.", + "httpMethod": "POST", + "id": "compute.vpnGateways.insert", + "parameterOrder": [ + "project", + "region" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "{project}/regions/{region}/vpnGateways", + "request": { + "$ref": "VpnGateway" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "list": { + "description": "Retrieves a list of VPN gateways available to the specified project and region.", + "httpMethod": "GET", + "id": "compute.vpnGateways.list", + "parameterOrder": [ + "project", + "region" + ], + "parameters": { + "filter": { + "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).", + "location": "query", + "type": "string" + }, + "maxResults": { + "default": "500", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", + "format": "uint32", + "location": "query", + "minimum": "0", + "type": "integer" + }, + "orderBy": { + "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", + "location": "query", + "type": "string" + }, + "pageToken": { + "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", + "location": "query", + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + } + }, + "path": "{project}/regions/{region}/vpnGateways", + "response": { + "$ref": "VpnGatewayList" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "setLabels": { + "description": "Sets the labels on a VpnGateway. To learn more about labels, read the Labeling Resources documentation.", + "httpMethod": "POST", + "id": "compute.vpnGateways.setLabels", + "parameterOrder": [ + "project", + "region", + "resource" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "The region for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "resource": { + "description": "Name or id of the resource for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + } + }, + "path": "{project}/regions/{region}/vpnGateways/{resource}/setLabels", + "request": { + "$ref": "RegionSetLabelsRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + } + } + }, "vpnTunnels": { "methods": { "aggregatedList": { @@ -20890,7 +21983,7 @@ "vpnTunnel": { "description": "Name of the VpnTunnel resource to delete.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -20931,7 +22024,7 @@ "vpnTunnel": { "description": "Name of the VpnTunnel resource to return.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -21155,7 +22248,7 @@ "operation": { "description": "Name of the Operations resource to delete.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -21193,7 +22286,7 @@ "operation": { "description": "Name of the Operations resource to return.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -21302,7 +22395,7 @@ "zone": { "description": "Name of the zone resource to return.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -21369,7 +22462,7 @@ } } }, - "revision": "20181130", + "revision": "20190403", "rootUrl": "https://www.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -21382,7 +22475,7 @@ "type": "integer" }, "acceleratorType": { - "description": "Full or partial URL of the accelerator type resource to attach to this instance. If you are creating an instance template, specify only the accelerator name.", + "description": "Full or partial URL of the accelerator type resource to attach to this instance. For example: projects/my-project/zones/us-central1-c/acceleratorTypes/nvidia-tesla-p100 If you are creating an instance template, specify only the accelerator name. See GPUs on Compute Engine for a full list of accelerator types.", "type": "string" } }, @@ -21906,9 +22999,11 @@ "enum": [ "DNS_RESOLVER", "GCE_ENDPOINT", + "NAT_AUTO", "VPC_PEERING" ], "enumDescriptions": [ + "", "", "", "" @@ -22284,362 +23379,8 @@ }, "type": "object" }, - "Allocation": { - "description": "Allocation resource", - "id": "Allocation", - "properties": { - "creationTimestamp": { - "description": "[Output Only] Creation timestamp in RFC3339 text format.", - "type": "string" - }, - "description": { - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#allocation", - "description": "[Output Only] Type of the resource. Always compute#allocations for allocations.", - "type": "string" - }, - "name": { - "annotations": { - "required": [ - "compute.instances.insert" - ] - }, - "description": "The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined fully-qualified URL for this resource.", - "type": "string" - }, - "specificAllocation": { - "$ref": "AllocationSpecificSKUAllocation" - }, - "specificAllocationRequired": { - "description": "Indicates whether the allocation can be consumed by VMs with \"any allocation\" defined. If the field is set, then only VMs that target the allocation by name using --allocation-affinity can consume this allocation.", - "type": "boolean" - }, - "zone": { - "type": "string" - } - }, - "type": "object" - }, - "AllocationAffinity": { - "description": "AllocationAffinity is the configuration of desired allocation which this instance could take capacity from.", - "id": "AllocationAffinity", - "properties": { - "consumeAllocationType": { - "enum": [ - "ANY_ALLOCATION", - "NO_ALLOCATION", - "SPECIFIC_ALLOCATION", - "UNSPECIFIED" - ], - "enumDescriptions": [ - "", - "", - "", - "" - ], - "type": "string" - }, - "key": { - "description": "Corresponds to the label key of allocation resource.", - "type": "string" - }, - "values": { - "description": "Corresponds to the label values of allocation resource.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "AllocationAggregatedList": { - "description": "Contains a list of allocations.", - "id": "AllocationAggregatedList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "AllocationsScopedList", - "description": "Name of the scope containing this set of allocations." - }, - "description": "A list of Allocation resources.", - "type": "object" - }, - "kind": { - "default": "compute#allocationAggregatedList", - "description": "Type of resource.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "AllocationList": { - "id": "AllocationList", - "properties": { - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "type": "string" - }, - "items": { - "description": "[Output Only] A list of Allocation resources.", - "items": { - "$ref": "Allocation" - }, - "type": "array" - }, - "kind": { - "default": "compute#allocationList", - "description": "[Output Only] Type of resource.Always compute#allocationsList for listsof allocations", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "AllocationSpecificSKUAllocation": { - "description": "This allocation type allows to pre allocate specific instance configuration.", - "id": "AllocationSpecificSKUAllocation", - "properties": { - "count": { - "description": "Specifies number of resources that are allocated.", - "format": "int64", - "type": "string" - }, - "inUseCount": { - "description": "[OutputOnly] Indicates how many resource are in use.", - "format": "int64", - "type": "string" - }, - "instanceProperties": { - "$ref": "AllocationSpecificSKUAllocationAllocatedInstanceProperties" - } - }, - "type": "object" - }, - "AllocationSpecificSKUAllocationAllocatedInstanceProperties": { - "description": "Properties of the SKU instances being reserved.", - "id": "AllocationSpecificSKUAllocationAllocatedInstanceProperties", - "properties": { - "guestAccelerators": { - "description": "Specifies accelerator type and count.", - "items": { - "$ref": "AcceleratorConfig" - }, - "type": "array" - }, - "localSsds": { - "description": "Specifies amount of local ssd to reserve with each instance. The type of disk is local-ssd.", - "items": { - "$ref": "AllocationSpecificSKUAllocationAllocatedInstancePropertiesAllocatedDisk" - }, - "type": "array" - }, - "machineType": { - "description": "Specifies type of machine (name only) which has fixed number of vCPUs and fixed amount of memory. This also includes specifying custom machine type following custom-NUMBER_OF_CPUS-AMOUNT_OF_MEMORY pattern.", - "type": "string" - }, - "minCpuPlatform": { - "description": "Minimum cpu platform the allocation.", - "type": "string" - } - }, - "type": "object" - }, - "AllocationSpecificSKUAllocationAllocatedInstancePropertiesAllocatedDisk": { - "id": "AllocationSpecificSKUAllocationAllocatedInstancePropertiesAllocatedDisk", + "AllocationSpecificSKUAllocationAllocatedInstancePropertiesReservedDisk": { + "id": "AllocationSpecificSKUAllocationAllocatedInstancePropertiesReservedDisk", "properties": { "diskSizeGb": { "description": "Specifies the size of the disk in base-2 GB.", @@ -22661,96 +23402,52 @@ }, "type": "object" }, - "AllocationsScopedList": { - "id": "AllocationsScopedList", + "AllocationSpecificSKUAllocationReservedInstanceProperties": { + "description": "Properties of the SKU instances being reserved.", + "id": "AllocationSpecificSKUAllocationReservedInstanceProperties", "properties": { - "allocations": { - "description": "A list of allocations contained in this scope.", + "guestAccelerators": { + "description": "Specifies accelerator type and count.", "items": { - "$ref": "Allocation" + "$ref": "AcceleratorConfig" }, "type": "array" }, - "warning": { - "description": "Informational warning which replaces the list of allocations when the list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } + "localSsds": { + "description": "Specifies amount of local ssd to reserve with each instance. The type of disk is local-ssd.", + "items": { + "$ref": "AllocationSpecificSKUAllocationAllocatedInstancePropertiesReservedDisk" }, - "type": "object" + "type": "array" + }, + "machineType": { + "description": "Specifies type of machine (name only) which has fixed number of vCPUs and fixed amount of memory. This also includes specifying custom machine type following custom-NUMBER_OF_CPUS-AMOUNT_OF_MEMORY pattern.", + "type": "string" + }, + "minCpuPlatform": { + "description": "Minimum cpu platform the reservation.", + "type": "string" + } + }, + "type": "object" + }, + "AllocationSpecificSKUReservation": { + "description": "This reservation type allows to pre allocate specific instance configuration.", + "id": "AllocationSpecificSKUReservation", + "properties": { + "count": { + "description": "Specifies number of resources that are allocated.", + "format": "int64", + "type": "string" + }, + "inUseCount": { + "description": "[OutputOnly] Indicates how many resource are in use.", + "format": "int64", + "type": "string" + }, + "instanceProperties": { + "$ref": "AllocationSpecificSKUAllocationReservedInstanceProperties", + "description": "The instance properties for this specific sku reservation." } }, "type": "object" @@ -22768,7 +23465,7 @@ "type": "boolean" }, "deviceName": { - "description": "Specifies a unique device name of your choice that is reflected into the /dev/disk/by-id/google-* tree of a Linux operating system running within the instance. This name can be used to reference the device for mounting, resizing, and so on, from within the instance.\n\nIf not specified, the server chooses a default device name to apply to this disk, in the form persistent-disks-x, where x is a number assigned by Google Compute Engine. This field is only applicable for persistent disks.", + "description": "Specifies a unique device name of your choice that is reflected into the /dev/disk/by-id/google-* tree of a Linux operating system running within the instance. This name can be used to reference the device for mounting, resizing, and so on, from within the instance.\n\nIf not specified, the server chooses a default device name to apply to this disk, in the form persistent-disk-x, where x is a number assigned by Google Compute Engine. This field is only applicable for persistent disks.", "type": "string" }, "diskEncryptionKey": { @@ -22867,6 +23564,13 @@ "description": "Specifies the disk type to use to create the instance. If not specified, the default is pd-standard, specified using the full URL. For example:\nhttps://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard\n\n\nOther values include pd-ssd and local-ssd. If you define this field, you can provide either the full or partial URL. For example, the following are valid values: \n- https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType \n- projects/project/zones/zone/diskTypes/diskType \n- zones/zone/diskTypes/diskType Note that for InstanceTemplate, this is the name of the disk type, not URL.", "type": "string" }, + "guestOsFeatures": { + "description": "A list of features to enable on the guest operating system. Applicable only for bootable images. Read Enabling guest operating system features to see a list of available options.\n\nGuest OS features are applied by merging initializeParams.guestOsFeatures and disks.guestOsFeatures", + "items": { + "$ref": "GuestOsFeature" + }, + "type": "array" + }, "labels": { "additionalProperties": { "type": "string" @@ -22874,6 +23578,13 @@ "description": "Labels to apply to this disk. These can be later modified by the disks.setLabels method. This field is only applicable for persistent disks.", "type": "object" }, + "resourcePolicies": { + "description": "Resource policies applied to this disk for automatic snapshot creations. Specified using the full or partial URL. For instance template, specify only the resource policy name.", + "items": { + "type": "string" + }, + "type": "array" + }, "sourceImage": { "description": "The source image to create this disk. When creating a new instance, one of initializeParams.sourceImage or disks.source is required except for local SSD.\n\nTo create a disk with one of the public operating system images, specify the image by its family name. For example, specify family/debian-9 to use the latest Debian 9 image:\nprojects/debian-cloud/global/images/family/debian-9\n\n\nAlternatively, use a specific version of a public operating system image:\nprojects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD\n\n\nTo create a disk with a custom image that you created, specify the image name in the following format:\nglobal/images/my-custom-image\n\n\nYou can also specify a custom image by its image family, which returns the latest version of the image in that family. Replace the image name with family/family-name:\nglobal/images/family/my-image-family\n\n\nIf the source image is deleted later, this field will not be set.", "type": "string" @@ -22881,6 +23592,14 @@ "sourceImageEncryptionKey": { "$ref": "CustomerEncryptionKey", "description": "The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key.\n\nInstance templates do not store customer-supplied encryption keys, so you cannot create disks for instances in a managed instance group if the source images are encrypted with your own keys." + }, + "sourceSnapshot": { + "description": "The source snapshot to create this disk. When creating a new instance, one of initializeParams.sourceSnapshot or disks.source is required except for local SSD.\n\nTo create a disk with a snapshot that you created, specify the snapshot name in the following format:\nglobal/snapshots/my-backup\n\n\nIf the source snapshot is deleted later, this field will not be set.", + "type": "string" + }, + "sourceSnapshotEncryptionKey": { + "$ref": "CustomerEncryptionKey", + "description": "The customer-supplied encryption key of the source snapshot." } }, "type": "object" @@ -23502,7 +24221,7 @@ "id": "AutoscalingPolicyLoadBalancingUtilization", "properties": { "utilizationTarget": { - "description": "Fraction of backend capacity utilization (set in HTTP(s) load balancing configuration) that autoscaler should maintain. Must be a positive float value. If not defined, the default is 0.8.", + "description": "Fraction of backend capacity utilization (set in HTTP(S) load balancing configuration) that autoscaler should maintain. Must be a positive float value. If not defined, the default is 0.8.", "format": "double", "type": "number" } @@ -23536,6 +24255,10 @@ "description": "An optional description of this resource. Provide this property when you create the resource.", "type": "string" }, + "failover": { + "description": "This field designates whether this is a failover backend. More than one failover backend can be configured for a given BackendService.", + "type": "boolean" + }, "group": { "description": "The fully-qualified URL of an Instance Group or Network Endpoint Group resource. In case of instance group this defines the list of instances that serve traffic. Member virtual machine instances from each instance group must live in the same zone as the instance group itself. No two backends in a backend service are allowed to use same Instance Group resource.\n\nFor Network Endpoint Groups this defines list of endpoints. All endpoints of Network Endpoint Group must be hosted on instances located in the same zone as the Network Endpoint Group.\n\nBackend service can not contain mix of Instance Group and Network Endpoint Group backends.\n\nNote that you must specify an Instance Group or Network Endpoint Group resource using the fully-qualified URL, rather than a partial URL.\n\nWhen the BackendService has load balancing scheme INTERNAL, the instance group must be within the same region as the BackendService. Network Endpoint Groups are not supported for INTERNAL load balancing scheme.", "type": "string" @@ -23797,6 +24520,9 @@ "description": "If true, enable Cloud CDN for this BackendService.\n\nWhen the load balancing scheme is INTERNAL, this field is not used.", "type": "boolean" }, + "failoverPolicy": { + "$ref": "BackendServiceFailoverPolicy" + }, "fingerprint": { "description": "Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a BackendService. An up-to-date fingerprint must be provided in order to update the BackendService, otherwise the request will fail with error 412 conditionNotMet.\n\nTo see the latest fingerprint, make a get() request to retrieve a BackendService.", "format": "byte", @@ -23827,15 +24553,21 @@ "enum": [ "EXTERNAL", "INTERNAL", + "INTERNAL_SELF_MANAGED", "INVALID_LOAD_BALANCING_SCHEME" ], "enumDescriptions": [ + "", "", "", "" ], "type": "string" }, + "logConfig": { + "$ref": "BackendServiceLogConfig", + "description": "This field denotes the logging options for the load balancer traffic served by this backend service. If logging is enabled, logs will be exported to Stackdriver." + }, "name": { "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", @@ -24044,6 +24776,25 @@ }, "type": "object" }, + "BackendServiceFailoverPolicy": { + "id": "BackendServiceFailoverPolicy", + "properties": { + "disableConnectionDrainOnFailover": { + "description": "On failover or failback, this field indicates whether connection drain will be honored. Setting this to true has the following effect: connections to the old active pool are not drained. Connections to the new active pool use the timeout of 10 min (currently fixed). Setting to false has the following effect: both old and new connections will have a drain timeout of 10 min.\n\nThis can be set to true only if the protocol is TCP.\n\nThe default is false.", + "type": "boolean" + }, + "dropTrafficIfUnhealthy": { + "description": "This option is used only when no healthy VMs are detected in the primary and backup instance groups. When set to true, traffic is dropped. When set to false, new connections are sent across all VMs in the primary group.\n\nThe default is false.", + "type": "boolean" + }, + "failoverRatio": { + "description": "The value of the field must be in [0, 1]. If the ratio of the healthy VMs in the primary backend is at or below this number, traffic arriving at the load-balanced IP will be directed to the failover backend.\n\nIn case where 'failoverRatio' is not set or all the VMs in the backup backend are unhealthy, the traffic will be directed back to the primary backend in the \"force\" mode, where traffic will be spread to the healthy VMs with the best effort, or to all VMs when no VM is healthy.\n\nThis field is only used with l4 load balancing.", + "format": "float", + "type": "number" + } + }, + "type": "object" + }, "BackendServiceGroupHealth": { "id": "BackendServiceGroupHealth", "properties": { @@ -24194,6 +24945,22 @@ }, "type": "object" }, + "BackendServiceLogConfig": { + "description": "The available logging options for the load balancer traffic served by this backend service.", + "id": "BackendServiceLogConfig", + "properties": { + "enable": { + "description": "This field denotes whether to enable logging for the load balancer traffic served by this backend service.", + "type": "boolean" + }, + "sampleRate": { + "description": "This field can only be specified if logging is enabled for this backend service. The value of the field must be in [0, 1]. This configures the sampling rate of requests to the load balancer where 1.0 means all logged requests are reported and 0.0 means no logged requests are reported. The default value is 1.0.", + "format": "float", + "type": "number" + } + }, + "type": "object" + }, "BackendServiceReference": { "id": "BackendServiceReference", "properties": { @@ -24303,10 +25070,10 @@ "properties": { "condition": { "$ref": "Expr", - "description": "Unimplemented. The condition that is associated with this binding. NOTE: an unsatisfied condition will not allow user access via current binding. Different bindings, including their conditions, are examined independently." + "description": "The condition that is associated with this binding. NOTE: An unsatisfied condition will not allow user access via current binding. Different bindings, including their conditions, are examined independently." }, "members": { - "description": "Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:\n\n* `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.\n\n* `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.\n\n* `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@gmail.com` .\n\n\n\n* `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.\n\n* `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.\n\n\n\n* `domain:{domain}`: A Google Apps domain name that represents all the users of that domain. For example, `google.com` or `example.com`.", + "description": "Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:\n\n* `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.\n\n* `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.\n\n* `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@gmail.com` .\n\n\n\n* `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.\n\n* `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.\n\n\n\n* `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.", "items": { "type": "string" }, @@ -24369,13 +25136,6 @@ "description": "Represents a Commitment resource. Creating a Commitment resource means that you are purchasing a committed use contract with an explicit start and end time. You can create commitments based on vCPUs and memory usage and receive discounted rates. For full details, read Signing Up for Committed Use Discounts.\n\nCommitted use discounts are subject to Google Cloud Platform's Service Specific Terms. By purchasing a committed use discount, you agree to these terms. Committed use discounts will not renew, so you must purchase a new commitment to continue receiving discounts. (== resource_for beta.commitments ==) (== resource_for v1.commitments ==)", "id": "Commitment", "properties": { - "allocations": { - "description": "List of allocations for this commitment.", - "items": { - "$ref": "Allocation" - }, - "type": "array" - }, "creationTimestamp": { "description": "[Output Only] Creation timestamp in RFC3339 text format.", "type": "string" @@ -24421,6 +25181,13 @@ "description": "[Output Only] URL of the region where this commitment may be used.", "type": "string" }, + "reservations": { + "description": "List of reservations for this commitment.", + "items": { + "$ref": "Reservation" + }, + "type": "array" + }, "resources": { "description": "A list of commitment amounts for particular resources. Note that VCPU and MEMORY resource commitments must occur together.", "items": { @@ -24845,12 +25612,8 @@ ], "type": "string" }, - "value": { - "description": "DEPRECATED. Use 'values' instead.", - "type": "string" - }, "values": { - "description": "The objects of the condition. This is mutually exclusive with 'value'.", + "description": "The objects of the condition.", "items": { "type": "string" }, @@ -24929,13 +25692,15 @@ "type": "string" }, "state": { - "description": "The deprecation state of this resource. This can be DEPRECATED, OBSOLETE, or DELETED. Operations which create a new resource using a DEPRECATED resource will return successfully, but with a warning indicating the deprecated resource and recommending its replacement. Operations which use OBSOLETE or DELETED resources will be rejected and result in an error.", + "description": "The deprecation state of this resource. This can be ACTIVE, DEPRECATED, OBSOLETE, or DELETED. Operations which communicate the end of life date for an image, can use ACTIVE. Operations which create a new resource using a DEPRECATED resource will return successfully, but with a warning indicating the deprecated resource and recommending its replacement. Operations which use OBSOLETE or DELETED resources will be rejected and result in an error.", "enum": [ + "ACTIVE", "DELETED", "DEPRECATED", "OBSOLETE" ], "enumDescriptions": [ + "", "", "", "" @@ -25087,6 +25852,7 @@ "description": "[Output Only] The status of disk creation.", "enum": [ "CREATING", + "DELETING", "FAILED", "READY", "RESTORING" @@ -25095,6 +25861,7 @@ "", "", "", + "", "" ], "type": "string" @@ -26123,6 +26890,209 @@ }, "type": "object" }, + "ExternalVpnGateway": { + "description": "External VPN gateway is the on-premises VPN gateway(s) or another cloud provider?s VPN gateway that connects to your Google Cloud VPN gateway. To create a highly available VPN from Google Cloud to your on-premises side or another Cloud provider's VPN gateway, you must create a external VPN gateway resource in GCP, which provides the information to GCP about your external VPN gateway.", + "id": "ExternalVpnGateway", + "properties": { + "creationTimestamp": { + "description": "[Output Only] Creation timestamp in RFC3339 text format.", + "type": "string" + }, + "description": { + "description": "An optional description of this resource. Provide this property when you create the resource.", + "type": "string" + }, + "id": { + "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", + "format": "uint64", + "type": "string" + }, + "interfaces": { + "description": "List of interfaces for this external VPN gateway.", + "items": { + "$ref": "ExternalVpnGatewayInterface" + }, + "type": "array" + }, + "kind": { + "default": "compute#externalVpnGateway", + "description": "[Output Only] Type of the resource. Always compute#externalVpnGateway for externalVpnGateways.", + "type": "string" + }, + "labelFingerprint": { + "description": "A fingerprint for the labels being applied to this ExternalVpnGateway, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the request will fail with error 412 conditionNotMet.\n\nTo see the latest fingerprint, make a get() request to retrieve an ExternalVpnGateway.", + "format": "byte", + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Labels to apply to this ExternalVpnGateway resource. These can be later modified by the setLabels method. Each label key/value must comply with RFC1035. Label values may be empty.", + "type": "object" + }, + "name": { + "annotations": { + "required": [ + "compute.externalVpnGateways.insert" + ] + }, + "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "type": "string" + }, + "redundancyType": { + "description": "Indicates the user-supplied redundancy type of this external VPN gateway.", + "enum": [ + "FOUR_IPS_REDUNDANCY", + "SINGLE_IP_INTERNALLY_REDUNDANT", + "TWO_IPS_REDUNDANCY" + ], + "enumDescriptions": [ + "", + "", + "" + ], + "type": "string" + }, + "selfLink": { + "description": "[Output Only] Server-defined URL for the resource.", + "type": "string" + } + }, + "type": "object" + }, + "ExternalVpnGatewayInterface": { + "description": "The interface for the external VPN gateway.", + "id": "ExternalVpnGatewayInterface", + "properties": { + "id": { + "description": "The numeric ID of this interface. The allowed input values for this id for different redundancy types of external VPN gateway: SINGLE_IP_INTERNALLY_REDUNDANT - 0 TWO_IPS_REDUNDANCY - 0, 1 FOUR_IPS_REDUNDANCY - 0, 1, 2, 3", + "format": "uint32", + "type": "integer" + }, + "ipAddress": { + "description": "IP address of the interface in the external VPN gateway. Only IPv4 is supported. This IP address can be either from your on-premise gateway or another Cloud provider?s VPN gateway, it cannot be an IP address from Google Compute Engine.", + "type": "string" + } + }, + "type": "object" + }, + "ExternalVpnGatewayList": { + "description": "Response to the list request, and contains a list of externalVpnGateways.", + "id": "ExternalVpnGatewayList", + "properties": { + "etag": { + "type": "string" + }, + "id": { + "description": "[Output Only] Unique identifier for the resource; defined by the server.", + "type": "string" + }, + "items": { + "description": "A list of ExternalVpnGateway resources.", + "items": { + "$ref": "ExternalVpnGateway" + }, + "type": "array" + }, + "kind": { + "default": "compute#externalVpnGatewayList", + "description": "[Output Only] Type of resource. Always compute#externalVpnGatewayList for lists of externalVpnGateways.", + "type": "string" + }, + "nextPageToken": { + "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.", + "type": "string" + }, + "selfLink": { + "description": "[Output Only] Server-defined URL for this resource.", + "type": "string" + }, + "warning": { + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", + "enum": [ + "CLEANUP_FAILED", + "DEPRECATED_RESOURCE_USED", + "DEPRECATED_TYPE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "EXPERIMENTAL_TYPE_USED", + "EXTERNAL_API_WARNING", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "MISSING_TYPE_DEPENDENCY", + "NEXT_HOP_ADDRESS_NOT_ASSIGNED", + "NEXT_HOP_CANNOT_IP_FORWARD", + "NEXT_HOP_INSTANCE_NOT_FOUND", + "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", + "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", + "NO_RESULTS_ON_PAGE", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", + "RESOURCE_NOT_DELETED", + "SCHEMA_VALIDATION_IGNORED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNDECLARED_PROPERTIES", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ], + "type": "string" + }, + "data": { + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "properties": { + "key": { + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).", + "type": "string" + }, + "value": { + "description": "[Output Only] A warning data value corresponding to the key.", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "[Output Only] A human-readable description of the warning code.", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, "Firewall": { "description": "Represents a Firewall resource.", "id": "Firewall", @@ -26406,7 +27376,7 @@ "id": "FixedOrPercent", "properties": { "calculated": { - "description": "[Output Only] Absolute value of VM instances calculated based on the specific mode.\n\n \n- If the value is fixed, then the caculated value is equal to the fixed value. \n- If the value is a percent, then the calculated value is percent/100 * targetSize. For example, the calculated value of a 80% of a managed instance group with 150 instances would be (80/100 * 150) = 120 VM instances. If there is a remainder, the number is rounded up.", + "description": "[Output Only] Absolute value of VM instances calculated based on the specific mode.\n\n \n- If the value is fixed, then the calculated value is equal to the fixed value. \n- If the value is a percent, then the calculated value is percent/100 * targetSize. For example, the calculated value of a 80% of a managed instance group with 150 instances would be (80/100 * 150) = 120 VM instances. If there is a remainder, the number is rounded up.", "format": "int32", "type": "integer" }, @@ -26455,6 +27425,10 @@ "description": "This field is used along with the backend_service field for internal load balancing or with the target field for internal TargetInstance. This field cannot be used with port or portRange fields.\n\nWhen the load balancing scheme is INTERNAL and protocol is TCP/UDP, specify this field to allow packets addressed to any ports will be forwarded to the backends configured with this forwarding rule.", "type": "boolean" }, + "allowGlobalAccess": { + "description": "This field is used along with the backend_service field for internal load balancing or with the target field for internal TargetInstance. If the field is set to TRUE, clients can access ILB from all regions. Otherwise only allows access from clients in the same region as the internal load balancer.", + "type": "boolean" + }, "backendService": { "description": "This field is only used for INTERNAL load balancing.\n\nFor internal load balancing, this field identifies the BackendService resource to receive the matched traffic.", "type": "string" @@ -26467,6 +27441,11 @@ "description": "An optional description of this resource. Provide this property when you create the resource.", "type": "string" }, + "fingerprint": { + "description": "Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a ForwardingRule. Include the fingerprint in patch request to ensure that you do not overwrite changes that were applied from another concurrent request.\n\nTo see the latest fingerprint, make a get() request to retrieve a ForwardingRule.", + "format": "byte", + "type": "string" + }, "id": { "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", "format": "uint64", @@ -26508,9 +27487,11 @@ "enum": [ "EXTERNAL", "INTERNAL", + "INTERNAL_SELF_MANAGED", "INVALID" ], "enumDescriptions": [ + "", "", "", "" @@ -26571,7 +27552,7 @@ "type": "string" }, "target": { - "description": "The URL of the target resource to receive the matched traffic. For regional forwarding rules, this target must live in the same region as the forwarding rule. For global forwarding rules, this target must be a global load balancing resource. The forwarded traffic must be of a type appropriate to the target object. For INTERNAL_SELF_MANAGED\" load balancing, only HTTP and HTTPS targets are valid.", + "description": "The URL of the target resource to receive the matched traffic. For regional forwarding rules, this target must live in the same region as the forwarding rule. For global forwarding rules, this target must be a global load balancing resource. The forwarded traffic must be of a type appropriate to the target object. For INTERNAL_SELF_MANAGED load balancing, only HTTP and HTTPS targets are valid.", "type": "string" } }, @@ -27256,7 +28237,7 @@ "type": "integer" }, "type": { - "description": "Specifies the type of the healthCheck, either TCP, SSL, HTTP or HTTPS. If not specified, the default is TCP. Exactly one of the protocol-specific health check field must be specified, which must match type field.", + "description": "Specifies the type of the healthCheck, either TCP, SSL, HTTP, HTTPS or HTTP2. If not specified, the default is TCP. Exactly one of the protocol-specific health check field must be specified, which must match type field.", "enum": [ "HTTP", "HTTP2", @@ -27952,7 +28933,7 @@ "type": "string" }, "sha1Checksum": { - "description": "An optional SHA1 checksum of the disk image before unpackaging; provided by the client when the disk image is created.", + "description": "An optional SHA1 checksum of the disk image before unpackaging provided by the client when the disk image is created.", "pattern": "[a-f0-9]{40}", "type": "string" }, @@ -28022,11 +29003,13 @@ "status": { "description": "[Output Only] The status of the image. An image can be used to create other resources, such as instances, only after the image has been successfully created and the status is set to READY. Possible values are FAILED, PENDING, or READY.", "enum": [ + "DELETING", "FAILED", "PENDING", "READY" ], "enumDescriptions": [ + "", "", "", "" @@ -28152,10 +29135,6 @@ "description": "An Instance resource. (== resource_for beta.instances ==) (== resource_for v1.instances ==)", "id": "Instance", "properties": { - "allocationAffinity": { - "$ref": "AllocationAffinity", - "description": "The configuration of desired allocations which this Instance could consume capacity from." - }, "canIpForward": { "description": "Allows this instance to send and receive packets with non-matching destination or source IPs. This is required if you plan to use this instance to forward routes. For more information, see Enabling IP Forwarding.", "type": "boolean" @@ -28253,6 +29232,10 @@ }, "type": "array" }, + "reservationAffinity": { + "$ref": "ReservationAffinity", + "description": "The configuration of desired allocations which this Instance could consume capacity from." + }, "scheduling": { "$ref": "Scheduling", "description": "Sets the scheduling options for this instance." @@ -28268,6 +29251,12 @@ }, "type": "array" }, + "shieldedInstanceConfig": { + "$ref": "ShieldedInstanceConfig" + }, + "shieldedInstanceIntegrityPolicy": { + "$ref": "ShieldedInstanceIntegrityPolicy" + }, "shieldedVmConfig": { "$ref": "ShieldedVmConfig" }, @@ -28282,6 +29271,7 @@ "description": "[Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, STOPPED, SUSPENDING, SUSPENDED, and TERMINATED.", "enum": [ "PROVISIONING", + "REPAIRING", "RUNNING", "STAGING", "STOPPED", @@ -28298,6 +29288,7 @@ "", "", "", + "", "" ], "type": "string" @@ -28817,7 +29808,7 @@ }, "pendingActions": { "$ref": "InstanceGroupManagerPendingActionsSummary", - "description": "[Output Only] The list of instance actions and the number of instances in this managed instance group that are pending for each of those actions." + "description": "[Deprecated] This field is deprecated and will be removed. Prefer using the status field instead. Please contact cloud-updater-feedback@google.com to leave feedback if your workload relies on this field. [Output Only] The list of instance actions and the number of instances in this managed instance group that are pending for each of those actions." }, "region": { "description": "[Output Only] The URL of the region where the managed instance group resides (for regional resources).", @@ -28858,7 +29849,7 @@ "description": "The update policy for this managed instance group." }, "versions": { - "description": "Specifies the instance templates used by this managed instance group to create instances.\n\nEach version is defined by an instanceTemplate. Every template can appear at most once per instance group. This field overrides the top-level instanceTemplate field. Read more about the relationships between these fields. Exactly one version must leave the targetSize field unset. That version will be applied to all remaining instances. For more information, read about canary updates.", + "description": "Specifies the instance templates used by this managed instance group to create instances.\n\nEach version is defined by an instanceTemplate and a name. Every version can appear at most once per instance group. This field overrides the top-level instanceTemplate field. Read more about the relationships between these fields. Exactly one version must leave the targetSize field unset. That version will be applied to all remaining instances. For more information, read about canary updates.", "items": { "$ref": "InstanceGroupManagerVersion" }, @@ -29166,22 +30157,22 @@ "id": "InstanceGroupManagerPendingActionsSummary", "properties": { "creating": { - "description": "[Output Only] The number of instances in the managed instance group that are pending to be created.", + "description": "[Deprecated] This field is deprecated and will be removed. Prefer using the status field instead. Please contact cloud-updater-feedback@google.com to leave feedback if your workload relies on this field. [Output Only] The number of instances in the managed instance group that are pending to be created.", "format": "int32", "type": "integer" }, "deleting": { - "description": "[Output Only] The number of instances in the managed instance group that are pending to be deleted.", + "description": "[Deprecated] This field is deprecated and will be removed. Prefer using the status field instead. Please contact cloud-updater-feedback@google.com to leave feedback if your workload relies on this field. [Output Only] The number of instances in the managed instance group that are pending to be deleted.", "format": "int32", "type": "integer" }, "recreating": { - "description": "[Output Only] The number of instances in the managed instance group that are pending to be recreated.", + "description": "[Deprecated] This field is deprecated and will be removed. Prefer using the status field instead. Please contact cloud-updater-feedback@google.com to leave feedback if your workload relies on this field. [Output Only] The number of instances in the managed instance group that are pending to be recreated.", "format": "int32", "type": "integer" }, "restarting": { - "description": "[Output Only] The number of instances in the managed instance group that are pending to be restarted.", + "description": "[Deprecated] This field is deprecated and will be removed. Prefer using the status field instead. Please contact cloud-updater-feedback@google.com to leave feedback if your workload relies on this field. [Output Only] The number of instances in the managed instance group that are pending to be restarted.", "format": "int32", "type": "integer" } @@ -29194,6 +30185,20 @@ "isStable": { "description": "[Output Only] A bit indicating whether the managed instance group is in a stable state. A stable state means that: none of the instances in the managed instance group is currently undergoing any type of change (for example, creation, restart, or deletion); no future changes are scheduled for instances in the managed instance group; and the managed instance group itself is not being modified.", "type": "boolean" + }, + "versionTarget": { + "$ref": "InstanceGroupManagerStatusVersionTarget", + "description": "[Output Only] A status of consistency of Instances' versions with their target version specified by version field on Instance Group Manager." + } + }, + "type": "object" + }, + "InstanceGroupManagerStatusVersionTarget": { + "id": "InstanceGroupManagerStatusVersionTarget", + "properties": { + "isReached": { + "description": "[Output Only] A bit indicating whether version target has been reached in this managed instance group, i.e. all instances are in their target version. Instances' target version are specified by version field on Instance Group Manager.", + "type": "boolean" } }, "type": "object" @@ -29201,6 +30206,17 @@ "InstanceGroupManagerUpdatePolicy": { "id": "InstanceGroupManagerUpdatePolicy", "properties": { + "instanceRedistributionType": { + "enum": [ + "NONE", + "PROACTIVE" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + }, "maxSurge": { "$ref": "FixedOrPercent", "description": "The maximum number of instances that can be created above the specified targetSize during the update process. By default, a fixed value of 1 is used. This value can be either a fixed number or a percentage if the instance group has 10 or more instances. If you set a percentage, the number of instances will be rounded up if necessary.\n\nAt least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxSurge." @@ -29244,6 +30260,7 @@ "id": "InstanceGroupManagerVersion", "properties": { "instanceTemplate": { + "description": "The URL of the instance template that is specified for this managed instance group. The group uses this template to create new instances in the managed instance group until the `targetSize` for this version is reached.", "type": "string" }, "name": { @@ -29270,6 +30287,44 @@ }, "type": "object" }, + "InstanceGroupManagersApplyUpdatesRequest": { + "description": "InstanceGroupManagers.applyUpdatesToInstances", + "id": "InstanceGroupManagersApplyUpdatesRequest", + "properties": { + "instances": { + "description": "The list of URLs of one or more instances for which we want to apply updates on this managed instance group. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].", + "items": { + "type": "string" + }, + "type": "array" + }, + "minimalAction": { + "description": "The minimal action that should be perfomed on the instances. By default NONE.", + "enum": [ + "REPLACE", + "RESTART" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + }, + "mostDisruptiveAllowedAction": { + "description": "The most disruptive action that allowed to be performed on the instances. By default REPLACE.", + "enum": [ + "REPLACE", + "RESTART" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + } + }, + "type": "object" + }, "InstanceGroupManagersDeleteInstancesRequest": { "id": "InstanceGroupManagersDeleteInstancesRequest", "properties": { @@ -29971,10 +31026,6 @@ "description": "", "id": "InstanceProperties", "properties": { - "allocationAffinity": { - "$ref": "AllocationAffinity", - "description": "The configuration of desired allocations which this Instance could consume capacity from." - }, "canIpForward": { "description": "Enables instances created based on this template to send packets with source IP addresses other than their own and receive packets with destination IP addresses other than their own. If these instances will be used as an IP gateway or it will be set as the next-hop in a Route resource, specify true. If unsure, leave this set to false. See the Enable IP forwarding documentation for more information.", "type": "boolean" @@ -29990,6 +31041,10 @@ }, "type": "array" }, + "displayDevice": { + "$ref": "DisplayDevice", + "description": "Display Device properties to enable support for remote display products like: Teradici, VNC and TeamViewer" + }, "guestAccelerators": { "description": "A list of guest accelerator cards' type and count to use for instances created from the instance template.", "items": { @@ -30028,6 +31083,10 @@ }, "type": "array" }, + "reservationAffinity": { + "$ref": "ReservationAffinity", + "description": "The configuration of desired reservations which this Instance could consume capacity from." + }, "scheduling": { "$ref": "Scheduling", "description": "Specifies the scheduling options for the instances that are created from this template." @@ -30039,6 +31098,9 @@ }, "type": "array" }, + "shieldedInstanceConfig": { + "$ref": "ShieldedInstanceConfig" + }, "shieldedVmConfig": { "$ref": "ShieldedVmConfig", "description": "Specifies the Shielded VM options for the instances that are created from this template." @@ -30241,6 +31303,7 @@ "description": "[Output Only] The status of the instance.", "enum": [ "PROVISIONING", + "REPAIRING", "RUNNING", "STAGING", "STOPPED", @@ -30257,6 +31320,7 @@ "", "", "", + "", "" ], "type": "string" @@ -30494,7 +31558,7 @@ "type": "string" }, "googleReferenceId": { - "description": "[Output Only] Google reference ID; to be used when raising support tickets with Google or otherwise to debug backend connectivity issues.", + "description": "[Output Only] Google reference ID to be used when raising support tickets with Google or otherwise to debug backend connectivity issues.", "type": "string" }, "id": { @@ -30541,11 +31605,13 @@ "type": "object" }, "linkType": { - "description": "Type of link requested. This field indicates speed of each of the links in the bundle, not the entire bundle. Only 10G per link is allowed for a dedicated interconnect. Options: Ethernet_10G_LR", + "description": "Type of link requested. This field indicates speed of each of the links in the bundle, not the entire bundle.", "enum": [ + "LINK_TYPE_ETHERNET_100G_LR", "LINK_TYPE_ETHERNET_10G_LR" ], "enumDescriptions": [ + "", "" ], "type": "string" @@ -31242,6 +32308,7 @@ "id": "InterconnectDiagnosticsLinkOpticalPower", "properties": { "state": { + "description": "The status of the current value when compared to the warning and alarm levels for the receiving or transmitting transceiver. Possible states include: \n- OK: The value has not crossed a warning threshold. \n- LOW_WARNING: The value has crossed below the low warning threshold. \n- HIGH_WARNING: The value has crossed above the high warning threshold. \n- LOW_ALARM: The value has crossed below the low alarm threshold. \n- HIGH_ALARM: The value has crossed above the high alarm threshold.", "enum": [ "HIGH_ALARM", "HIGH_WARNING", @@ -31259,7 +32326,7 @@ "type": "string" }, "value": { - "description": "Value of the current optical power, read in dBm. Take a known good optical value, give it a 10% margin and trigger warnings relative to that value. In general, a -7dBm warning and a -11dBm alarm are good optical value estimates for most links.", + "description": "Value of the current receiving or transmitting optical power, read in dBm. Take a known good optical value, give it a 10% margin and trigger warnings relative to that value. In general, a -7dBm warning and a -11dBm alarm are good optical value estimates for most links.", "format": "float", "type": "number" } @@ -31288,10 +32355,12 @@ "$ref": "InterconnectDiagnosticsLinkLACPStatus" }, "receivingOpticalPower": { - "$ref": "InterconnectDiagnosticsLinkOpticalPower" + "$ref": "InterconnectDiagnosticsLinkOpticalPower", + "description": "An InterconnectDiagnostics.LinkOpticalPower object, describing the current value and status of the received light level." }, "transmittingOpticalPower": { - "$ref": "InterconnectDiagnosticsLinkOpticalPower" + "$ref": "InterconnectDiagnosticsLinkOpticalPower", + "description": "An InterconnectDiagnostics.LinkOpticalPower object, describing the current value and status of the transmitted light level." } }, "type": "object" @@ -32505,6 +33574,7 @@ "description": "[Output Only] The status of the instance. This field is empty when the instance does not exist.", "enum": [ "PROVISIONING", + "REPAIRING", "RUNNING", "STAGING", "STOPPED", @@ -32521,6 +33591,7 @@ "", "", "", + "", "" ], "type": "string" @@ -32651,7 +33722,7 @@ "id": "Network", "properties": { "IPv4Range": { - "description": "The range of internal addresses that are legal on this network. This range is a CIDR specification, for example: 192.168.0.0/16. Provided by the client when the network is created.", + "description": "Deprecated in favor of subnet mode networks. The range of internal addresses that are legal on this network. This range is a CIDR specification, for example: 192.168.0.0/16. Provided by the client when the network is created.", "pattern": "[0-9]{1,3}(?:\\.[0-9]{1,3}){3}/[0-9]{1,2}", "type": "string" }, @@ -33479,7 +34550,7 @@ "id": "NetworkPeering", "properties": { "autoCreateRoutes": { - "description": "Indicates whether full mesh connectivity is created and managed automatically. When it is set to true, Google Compute Engine will automatically create and manage the routes between two networks when the state is ACTIVE. Otherwise, user needs to create routes manually to route packets to peer network.", + "description": "This field will be deprecated soon. Prefer using exchange_subnet_routes instead. Indicates whether full mesh connectivity is created and managed automatically. When it is set to true, Google Compute Engine will automatically create and manage the routes between two networks when the state is ACTIVE. Otherwise, user needs to create routes manually to route packets to peer network.", "type": "boolean" }, "exchangeSubnetRoutes": { @@ -33544,7 +34615,7 @@ "id": "NetworksAddPeeringRequest", "properties": { "autoCreateRoutes": { - "description": "Whether Google Compute Engine manages the routes automatically.", + "description": "This field will be deprecated soon. Prefer using exchange_subnet_routes in network_peering instead. Whether Google Compute Engine manages the routes automatically.", "type": "boolean" }, "name": { @@ -33587,7 +34658,7 @@ "type": "object" }, "NodeGroup": { - "description": "A NodeGroup resource.", + "description": "A NodeGroup resource. To create a node group, you must first create a node templates. To learn more about node groups and sole-tenant nodes, read the Sole-tenant nodes documentation. (== resource_for beta.nodeGroups ==) (== resource_for v1.nodeGroups ==)", "id": "NodeGroup", "properties": { "creationTimestamp": { @@ -33889,6 +34960,10 @@ "description": "The type of this node.", "type": "string" }, + "serverBinding": { + "$ref": "ServerBinding", + "description": "Binding properties for the physical server." + }, "status": { "enum": [ "CREATING", @@ -34148,7 +35223,7 @@ "type": "object" }, "NodeTemplate": { - "description": "A Node Template resource.", + "description": "A Node Template resource. To learn more about node templates and sole-tenant nodes, read the Sole-tenant nodes documentation. (== resource_for beta.nodeTemplates ==) (== resource_for v1.nodeTemplates ==)", "id": "NodeTemplate", "properties": { "creationTimestamp": { @@ -34196,6 +35271,10 @@ "description": "[Output Only] Server-defined URL for the resource.", "type": "string" }, + "serverBinding": { + "$ref": "ServerBinding", + "description": "Binding properties for the physical server." + }, "status": { "description": "[Output Only] The status of the node template. One of the following values: CREATING, READY, and DELETING.", "enum": [ @@ -35471,7 +36550,7 @@ "id": "PathMatcher", "properties": { "defaultService": { - "description": "The full or partial URL to the BackendService resource. This will be used if none of the pathRules or routeRules defined by this PathMatcher are matched. For example, the following are all valid URLs to a BackendService resource: \n- https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService \n- compute/v1/projects/project/global/backendServices/backendService \n- global/backendServices/backendService \nUse defaultService instead of defaultRouteAction when simple routing to a backend service is desired and other advanced capabilities like traffic splitting and URL rewrites are not required.\nOnly one of defaultService, defaultRouteAction or defaultUrlRedirect must be set.\nAuthorization requires one or more of the following Google IAM permissions on the specified resource default_service: \n- compute.backendBuckets.use \n- compute.backendServices.use", + "description": "The full or partial URL to the BackendService resource. This will be used if none of the pathRules or routeRules defined by this PathMatcher are matched. For example, the following are all valid URLs to a BackendService resource: \n- https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService \n- compute/v1/projects/project/global/backendServices/backendService \n- global/backendServices/backendService If defaultRouteAction is additionally specified, advanced routing actions like URL Rewrites, etc. take effect prior to sending the request to the backend. However, if defaultService is specified, defaultRouteAction cannot contain any weightedBackendServices. Conversely, if defaultRouteAction specifies any weightedBackendServices, defaultService must not be specified.\nOnly one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.\nAuthorization requires one or more of the following Google IAM permissions on the specified resource default_service: \n- compute.backendBuckets.use \n- compute.backendServices.use", "type": "string" }, "description": { @@ -35504,7 +36583,7 @@ "type": "array" }, "service": { - "description": "The URL of the backend service resource if this rule is matched.\nUse service instead of routeAction when simple routing to a backend service is desired and other advanced capabilities like traffic splitting and rewrites are not required.\nOnly one of service, routeAction or urlRedirect should must be set.", + "description": "The full or partial URL of the backend service resource to which traffic is directed if this rule is matched. If routeAction is additionally specified, advanced routing actions like URL Rewrites, etc. take effect prior to sending the request to the backend. However, if service is specified, routeAction cannot contain any weightedBackendService s. Conversely, if routeAction specifies any weightedBackendServices, service must not be specified.\nOnly one of urlRedirect, service or routeAction.weightedBackendService must be set.", "type": "string" } }, @@ -35737,6 +36816,7 @@ "CPUS", "CPUS_ALL_REGIONS", "DISKS_TOTAL_GB", + "EXTERNAL_VPN_GATEWAYS", "FIREWALLS", "FORWARDING_RULES", "GLOBAL_INTERNAL_ADDRESSES", @@ -35753,6 +36833,7 @@ "INTERNAL_ADDRESSES", "IN_USE_ADDRESSES", "IN_USE_BACKUP_SCHEDULES", + "IN_USE_SNAPSHOT_SCHEDULES", "LOCAL_SSD_TOTAL_GB", "NETWORKS", "NETWORK_ENDPOINT_GROUPS", @@ -35863,10 +36944,16 @@ "", "", "", + "", + "", "" ], "type": "string" }, + "owner": { + "description": "[Output Only] Owning resource. This is the resource on which this quota is applied.", + "type": "string" + }, "usage": { "description": "[Output Only] Current usage of this metric.", "format": "double", @@ -36074,6 +37161,19 @@ }, "type": "object" }, + "RegionCommitmentsUpdateReservationsRequest": { + "id": "RegionCommitmentsUpdateReservationsRequest", + "properties": { + "reservations": { + "description": "List of reservations for the capacity move of VMs with accelerators and local ssds.", + "items": { + "$ref": "Reservation" + }, + "type": "array" + } + }, + "type": "object" + }, "RegionDiskTypeList": { "id": "RegionDiskTypeList", "properties": { @@ -36459,6 +37559,44 @@ }, "type": "object" }, + "RegionInstanceGroupManagersApplyUpdatesRequest": { + "description": "InstanceGroupManagers.applyUpdatesToInstances", + "id": "RegionInstanceGroupManagersApplyUpdatesRequest", + "properties": { + "instances": { + "description": "The list of instances for which we want to apply changes on this managed instance group.", + "items": { + "type": "string" + }, + "type": "array" + }, + "minimalAction": { + "description": "The minimal action that should be perfomed on the instances. By default NONE.", + "enum": [ + "REPLACE", + "RESTART" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + }, + "mostDisruptiveAllowedAction": { + "description": "The most disruptive action that allowed to be performed on the instances. By default REPLACE.", + "enum": [ + "REPLACE", + "RESTART" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + } + }, + "type": "object" + }, "RegionInstanceGroupManagersDeleteInstancesRequest": { "id": "RegionInstanceGroupManagersDeleteInstancesRequest", "properties": { @@ -36846,10 +37984,431 @@ }, "type": "object" }, + "Reservation": { + "description": "Reservation resource", + "id": "Reservation", + "properties": { + "commitment": { + "description": "[OutputOnly] Full or partial url for parent commitment for reservations which are tied to a commitment.", + "type": "string" + }, + "creationTimestamp": { + "description": "[Output Only] Creation timestamp in RFC3339 text format.", + "type": "string" + }, + "description": { + "description": "An optional description of this resource. Provide this property when you create the resource.", + "type": "string" + }, + "id": { + "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", + "format": "uint64", + "type": "string" + }, + "kind": { + "default": "compute#reservation", + "description": "[Output Only] Type of the resource. Always compute#reservations for reservations.", + "type": "string" + }, + "name": { + "annotations": { + "required": [ + "compute.instances.insert" + ] + }, + "description": "The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "type": "string" + }, + "selfLink": { + "description": "[Output Only] Server-defined fully-qualified URL for this resource.", + "type": "string" + }, + "specificReservation": { + "$ref": "AllocationSpecificSKUReservation", + "description": "Reservation for instances with specific machine shapes." + }, + "specificReservationRequired": { + "description": "Indicates whether the reservation can be consumed by VMs with \"any reservation\" defined. If the field is set, then only VMs that target the reservation by name using --reservation-affinity can consume this reservation.", + "type": "boolean" + }, + "zone": { + "description": "Zone in which the reservation resides, must be provided if reservation is created with commitment creation.", + "type": "string" + } + }, + "type": "object" + }, + "ReservationAffinity": { + "description": "AllocationAffinity is the configuration of desired allocation which this instance could take capacity from.", + "id": "ReservationAffinity", + "properties": { + "consumeReservationType": { + "enum": [ + "ANY_RESERVATION", + "NO_RESERVATION", + "SPECIFIC_RESERVATION", + "UNSPECIFIED" + ], + "enumDescriptions": [ + "", + "", + "", + "" + ], + "type": "string" + }, + "key": { + "description": "Corresponds to the label key of reservation resource.", + "type": "string" + }, + "values": { + "description": "Corresponds to the label values of reservation resource.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "ReservationAggregatedList": { + "description": "Contains a list of reservations.", + "id": "ReservationAggregatedList", + "properties": { + "id": { + "description": "[Output Only] Unique identifier for the resource; defined by the server.", + "type": "string" + }, + "items": { + "additionalProperties": { + "$ref": "ReservationsScopedList", + "description": "Name of the scope containing this set of reservations." + }, + "description": "A list of Allocation resources.", + "type": "object" + }, + "kind": { + "default": "compute#reservationAggregatedList", + "description": "Type of resource.", + "type": "string" + }, + "nextPageToken": { + "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.", + "type": "string" + }, + "selfLink": { + "description": "[Output Only] Server-defined URL for this resource.", + "type": "string" + }, + "warning": { + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", + "enum": [ + "CLEANUP_FAILED", + "DEPRECATED_RESOURCE_USED", + "DEPRECATED_TYPE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "EXPERIMENTAL_TYPE_USED", + "EXTERNAL_API_WARNING", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "MISSING_TYPE_DEPENDENCY", + "NEXT_HOP_ADDRESS_NOT_ASSIGNED", + "NEXT_HOP_CANNOT_IP_FORWARD", + "NEXT_HOP_INSTANCE_NOT_FOUND", + "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", + "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", + "NO_RESULTS_ON_PAGE", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", + "RESOURCE_NOT_DELETED", + "SCHEMA_VALIDATION_IGNORED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNDECLARED_PROPERTIES", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ], + "type": "string" + }, + "data": { + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "properties": { + "key": { + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).", + "type": "string" + }, + "value": { + "description": "[Output Only] A warning data value corresponding to the key.", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "[Output Only] A human-readable description of the warning code.", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "ReservationList": { + "id": "ReservationList", + "properties": { + "id": { + "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", + "type": "string" + }, + "items": { + "description": "[Output Only] A list of Allocation resources.", + "items": { + "$ref": "Reservation" + }, + "type": "array" + }, + "kind": { + "default": "compute#reservationList", + "description": "[Output Only] Type of resource.Always compute#reservationsList for listsof reservations", + "type": "string" + }, + "nextPageToken": { + "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.", + "type": "string" + }, + "selfLink": { + "description": "[Output Only] Server-defined URL for this resource.", + "type": "string" + }, + "warning": { + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", + "enum": [ + "CLEANUP_FAILED", + "DEPRECATED_RESOURCE_USED", + "DEPRECATED_TYPE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "EXPERIMENTAL_TYPE_USED", + "EXTERNAL_API_WARNING", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "MISSING_TYPE_DEPENDENCY", + "NEXT_HOP_ADDRESS_NOT_ASSIGNED", + "NEXT_HOP_CANNOT_IP_FORWARD", + "NEXT_HOP_INSTANCE_NOT_FOUND", + "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", + "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", + "NO_RESULTS_ON_PAGE", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", + "RESOURCE_NOT_DELETED", + "SCHEMA_VALIDATION_IGNORED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNDECLARED_PROPERTIES", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ], + "type": "string" + }, + "data": { + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "properties": { + "key": { + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).", + "type": "string" + }, + "value": { + "description": "[Output Only] A warning data value corresponding to the key.", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "[Output Only] A human-readable description of the warning code.", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "ReservationsResizeRequest": { + "id": "ReservationsResizeRequest", + "properties": { + "specificSkuCount": { + "description": "Number of allocated resources can be resized with minimum = 1 and maximum = 1000.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, + "ReservationsScopedList": { + "id": "ReservationsScopedList", + "properties": { + "reservations": { + "description": "A list of reservations contained in this scope.", + "items": { + "$ref": "Reservation" + }, + "type": "array" + }, + "warning": { + "description": "Informational warning which replaces the list of reservations when the list is empty.", + "properties": { + "code": { + "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", + "enum": [ + "CLEANUP_FAILED", + "DEPRECATED_RESOURCE_USED", + "DEPRECATED_TYPE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "EXPERIMENTAL_TYPE_USED", + "EXTERNAL_API_WARNING", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "MISSING_TYPE_DEPENDENCY", + "NEXT_HOP_ADDRESS_NOT_ASSIGNED", + "NEXT_HOP_CANNOT_IP_FORWARD", + "NEXT_HOP_INSTANCE_NOT_FOUND", + "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", + "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", + "NO_RESULTS_ON_PAGE", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", + "RESOURCE_NOT_DELETED", + "SCHEMA_VALIDATION_IGNORED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNDECLARED_PROPERTIES", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ], + "type": "string" + }, + "data": { + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "properties": { + "key": { + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).", + "type": "string" + }, + "value": { + "description": "[Output Only] A warning data value corresponding to the key.", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "[Output Only] A human-readable description of the warning code.", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, "ResourceCommitment": { "description": "Commitment for a particular resource (a Commitment is composed of one or more of these).", "id": "ResourceCommitment", "properties": { + "acceleratorType": { + "description": "Name of the accelerator type resource. Applicable only when the type is ACCELERATOR.", + "type": "string" + }, "amount": { "description": "The amount of the resource purchased (in a type-dependent unit, such as bytes). For vCPUs, this can just be an integer. For memory, this must be provided in MB. Memory must be a multiple of 256 MB, with up to 6.5GB of memory per every vCPU.", "format": "int64", @@ -36858,11 +38417,15 @@ "type": { "description": "Type of resource for which this commitment applies. Possible values are VCPU and MEMORY", "enum": [ + "ACCELERATOR", + "LOCAL_SSD", "MEMORY", "UNSPECIFIED", "VCPU" ], "enumDescriptions": [ + "", + "", "", "", "" @@ -36979,10 +38542,6 @@ "ResourcePolicy": { "id": "ResourcePolicy", "properties": { - "backupSchedulePolicy": { - "$ref": "ResourcePolicyBackupSchedulePolicy", - "description": "Resource policy for persistent disks for creating snapshots." - }, "creationTimestamp": { "description": "[Output Only] Creation timestamp in RFC3339 text format.", "type": "string" @@ -37016,6 +38575,26 @@ "selfLink": { "description": "[Output Only] Server-defined fully-qualified URL for this resource.", "type": "string" + }, + "snapshotSchedulePolicy": { + "$ref": "ResourcePolicySnapshotSchedulePolicy", + "description": "Resource policy for persistent disks for creating snapshots." + }, + "status": { + "description": "[Output Only] The status of resource policy creation.", + "enum": [ + "CREATING", + "DELETING", + "INVALID", + "READY" + ], + "enumDescriptions": [ + "", + "", + "", + "" + ], + "type": "string" } }, "type": "object" @@ -37136,100 +38715,21 @@ }, "type": "object" }, - "ResourcePolicyBackupSchedulePolicy": { - "description": "A backup schedule policy specifies when and how frequently snapshots are to be created for the target disk. Also specifies how many and how long these scheduled snapshots should be retained.", - "id": "ResourcePolicyBackupSchedulePolicy", - "properties": { - "retentionPolicy": { - "$ref": "ResourcePolicyBackupSchedulePolicyRetentionPolicy", - "description": "Retention policy applied to snapshots created by this resource policy." - }, - "schedule": { - "$ref": "ResourcePolicyBackupSchedulePolicySchedule", - "description": "A Vm Maintenance Policy specifies what kind of infrastructure maintenance we are allowed to perform on this VM and when. Schedule that is applied to disks covered by this policy." - }, - "snapshotProperties": { - "$ref": "ResourcePolicyBackupSchedulePolicySnapshotProperties", - "description": "Properties with which snapshots are created such as labels, encryption keys." - } - }, - "type": "object" - }, - "ResourcePolicyBackupSchedulePolicyRetentionPolicy": { - "description": "Policy for retention of scheduled snapshots.", - "id": "ResourcePolicyBackupSchedulePolicyRetentionPolicy", - "properties": { - "maxRetentionDays": { - "description": "Maximum age of the snapshot that is allowed to be kept.", - "format": "int32", - "type": "integer" - }, - "onSourceDiskDelete": { - "description": "Specifies the behavior to apply to scheduled snapshots when the source disk is deleted.", - "enum": [ - "APPLY_RETENTION_POLICY", - "KEEP_AUTO_SNAPSHOTS", - "UNSPECIFIED_ON_SOURCE_DISK_DELETE" - ], - "enumDescriptions": [ - "", - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "ResourcePolicyBackupSchedulePolicySchedule": { - "description": "A schedule for disks where the schedueled operations are performed.", - "id": "ResourcePolicyBackupSchedulePolicySchedule", - "properties": { - "dailySchedule": { - "$ref": "ResourcePolicyDailyCycle" - }, - "hourlySchedule": { - "$ref": "ResourcePolicyHourlyCycle" - }, - "weeklySchedule": { - "$ref": "ResourcePolicyWeeklyCycle" - } - }, - "type": "object" - }, - "ResourcePolicyBackupSchedulePolicySnapshotProperties": { - "description": "Specified snapshot properties for scheduled snapshots created by this policy.", - "id": "ResourcePolicyBackupSchedulePolicySnapshotProperties", - "properties": { - "guestFlush": { - "description": "Indication to perform a ?guest aware? snapshot.", - "type": "boolean" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Labels to apply to scheduled snapshots. These can be later modified by the setLabels method. Label values may be empty.", - "type": "object" - } - }, - "type": "object" - }, "ResourcePolicyDailyCycle": { "description": "Time window specified for daily operations.", "id": "ResourcePolicyDailyCycle", "properties": { "daysInCycle": { - "description": "Allows to define schedule that runs every nth day of the month.", + "description": "Defines a schedule that runs every nth day of the month.", "format": "int32", "type": "integer" }, "duration": { - "description": "[Output only] Duration of the time window, automatically chosen to be smallest possible in the given scenario.", + "description": "[Output only] A predetermined duration for the window, automatically chosen to be the smallest possible in the given scenario.", "type": "string" }, "startTime": { - "description": "Time within the window to start the operations. It must be in format \"HH:MM\", where HH : [00-23] and MM : [00-00] GMT.", + "description": "Start time of the window. This must be in UTC format that resolves to one of 00:00, 04:00, 08:00, 12:00, 16:00, or 20:00. For example, both 13:00-5 and 08:00 are valid.", "type": "string" } }, @@ -37369,6 +38869,92 @@ }, "type": "object" }, + "ResourcePolicySnapshotSchedulePolicy": { + "description": "A snapshot schedule policy specifies when and how frequently snapshots are to be created for the target disk. Also specifies how many and how long these scheduled snapshots should be retained.", + "id": "ResourcePolicySnapshotSchedulePolicy", + "properties": { + "retentionPolicy": { + "$ref": "ResourcePolicySnapshotSchedulePolicyRetentionPolicy", + "description": "Retention policy applied to snapshots created by this resource policy." + }, + "schedule": { + "$ref": "ResourcePolicySnapshotSchedulePolicySchedule", + "description": "A Vm Maintenance Policy specifies what kind of infrastructure maintenance we are allowed to perform on this VM and when. Schedule that is applied to disks covered by this policy." + }, + "snapshotProperties": { + "$ref": "ResourcePolicySnapshotSchedulePolicySnapshotProperties", + "description": "Properties with which snapshots are created such as labels, encryption keys." + } + }, + "type": "object" + }, + "ResourcePolicySnapshotSchedulePolicyRetentionPolicy": { + "description": "Policy for retention of scheduled snapshots.", + "id": "ResourcePolicySnapshotSchedulePolicyRetentionPolicy", + "properties": { + "maxRetentionDays": { + "description": "Maximum age of the snapshot that is allowed to be kept.", + "format": "int32", + "type": "integer" + }, + "onSourceDiskDelete": { + "description": "Specifies the behavior to apply to scheduled snapshots when the source disk is deleted.", + "enum": [ + "APPLY_RETENTION_POLICY", + "KEEP_AUTO_SNAPSHOTS", + "UNSPECIFIED_ON_SOURCE_DISK_DELETE" + ], + "enumDescriptions": [ + "", + "", + "" + ], + "type": "string" + } + }, + "type": "object" + }, + "ResourcePolicySnapshotSchedulePolicySchedule": { + "description": "A schedule for disks where the schedueled operations are performed.", + "id": "ResourcePolicySnapshotSchedulePolicySchedule", + "properties": { + "dailySchedule": { + "$ref": "ResourcePolicyDailyCycle" + }, + "hourlySchedule": { + "$ref": "ResourcePolicyHourlyCycle" + }, + "weeklySchedule": { + "$ref": "ResourcePolicyWeeklyCycle" + } + }, + "type": "object" + }, + "ResourcePolicySnapshotSchedulePolicySnapshotProperties": { + "description": "Specified snapshot properties for scheduled snapshots created by this policy.", + "id": "ResourcePolicySnapshotSchedulePolicySnapshotProperties", + "properties": { + "guestFlush": { + "description": "Indication to perform a ?guest aware? snapshot.", + "type": "boolean" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Labels to apply to scheduled snapshots. These can be later modified by the setLabels method. Label values may be empty.", + "type": "object" + }, + "storageLocations": { + "description": "GCS bucket storage location of the auto snapshot (regional or multi-regional).", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "ResourcePolicyWeeklyCycle": { "description": "Time window specified for weekly operations.", "id": "ResourcePolicyWeeklyCycle", @@ -37483,6 +39069,10 @@ "description": "The URL to an instance that should handle matching packets. You can specify this as a full or partial URL. For example:\nhttps://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/", "type": "string" }, + "nextHopInterconnectAttachment": { + "description": "[Output Only] The URL to an InterconnectAttachment which is the next hop for the route. This field will only be populated for the dynamic routes generated by Cloud Router with a linked interconnectAttachment.", + "type": "string" + }, "nextHopIp": { "description": "The network IP address of an instance that should handle matching packets. Only IPv4 is supported.", "type": "string" @@ -38205,6 +39795,10 @@ "format": "int32", "type": "integer" }, + "logConfig": { + "$ref": "RouterNatLogConfig", + "description": "Configure logging on this NAT." + }, "minPortsPerVm": { "description": "Minimum number of ports allocated to a VM from this NAT config. If not set, a default number of ports is allocated to a VM. This gets rounded up to the nearest power of 2. Eg. if the value of this field is 50, at least 64 ports will be allocated to a VM.", "format": "int32", @@ -38273,6 +39867,31 @@ }, "type": "object" }, + "RouterNatLogConfig": { + "description": "Configuration of logging on a NAT.", + "id": "RouterNatLogConfig", + "properties": { + "enable": { + "description": "Indicates whether or not to export logs. This is false by default.", + "type": "boolean" + }, + "filter": { + "description": "Specifies the desired filtering of logs on this NAT. If unspecified, logs are exported for all connections handled by this NAT.", + "enum": [ + "ALL", + "ERRORS_ONLY", + "TRANSLATIONS_ONLY" + ], + "enumDescriptions": [ + "", + "", + "" + ], + "type": "string" + } + }, + "type": "object" + }, "RouterNatSubnetworkToNat": { "description": "Defines the IP ranges that want to use NAT for a subnetwork.", "id": "RouterNatSubnetworkToNat", @@ -38405,7 +40024,7 @@ "type": "object" }, "RouterStatusNatStatus": { - "description": "Status of a NAT contained in this router.", + "description": "Status of a NAT contained in this router. Next tag: 9", "id": "RouterStatusNatStatus", "properties": { "autoAllocatedNatIps": { @@ -39038,6 +40657,25 @@ }, "type": "object" }, + "ServerBinding": { + "id": "ServerBinding", + "properties": { + "type": { + "enum": [ + "RESTART_NODE_ON_ANY_SERVER", + "RESTART_NODE_ON_MINIMAL_SERVERS", + "SERVER_BINDING_TYPE_UNSPECIFIED" + ], + "enumDescriptions": [ + "", + "", + "" + ], + "type": "string" + } + }, + "type": "object" + }, "ServiceAccount": { "description": "A service account.", "id": "ServiceAccount", @@ -39056,6 +40694,71 @@ }, "type": "object" }, + "ShieldedInstanceConfig": { + "description": "A set of Shielded Instance options.", + "id": "ShieldedInstanceConfig", + "properties": { + "enableIntegrityMonitoring": { + "description": "Defines whether the instance has integrity monitoring enabled.", + "type": "boolean" + }, + "enableSecureBoot": { + "description": "Defines whether the instance has Secure Boot enabled.", + "type": "boolean" + }, + "enableVtpm": { + "description": "Defines whether the instance has the vTPM enabled.", + "type": "boolean" + } + }, + "type": "object" + }, + "ShieldedInstanceIdentity": { + "description": "A shielded Instance identity entry.", + "id": "ShieldedInstanceIdentity", + "properties": { + "encryptionKey": { + "$ref": "ShieldedInstanceIdentityEntry", + "description": "An Endorsement Key (EK) issued to the Shielded Instance's vTPM." + }, + "kind": { + "default": "compute#shieldedInstanceIdentity", + "description": "[Output Only] Type of the resource. Always compute#shieldedInstanceIdentity for shielded Instance identity entry.", + "type": "string" + }, + "signingKey": { + "$ref": "ShieldedInstanceIdentityEntry", + "description": "An Attestation Key (AK) issued to the Shielded Instance's vTPM." + } + }, + "type": "object" + }, + "ShieldedInstanceIdentityEntry": { + "description": "A Shielded Instance Identity Entry.", + "id": "ShieldedInstanceIdentityEntry", + "properties": { + "ekCert": { + "description": "A PEM-encoded X.509 certificate. This field can be empty.", + "type": "string" + }, + "ekPub": { + "description": "A PEM-encoded public key.", + "type": "string" + } + }, + "type": "object" + }, + "ShieldedInstanceIntegrityPolicy": { + "description": "The policy describes the baseline against which Instance boot integrity is measured.", + "id": "ShieldedInstanceIntegrityPolicy", + "properties": { + "updateAutoLearnPolicy": { + "description": "Updates the integrity policy baseline using the measurements from the VM instance's most recent boot.", + "type": "boolean" + } + }, + "type": "object" + }, "ShieldedVmConfig": { "description": "A set of Shielded VM options.", "id": "ShieldedVmConfig", @@ -39096,7 +40799,7 @@ "type": "object" }, "ShieldedVmIdentityEntry": { - "description": "A Shielded VM Identity Entry.", + "description": "A Shielded Instance Identity Entry.", "id": "ShieldedVmIdentityEntry", "properties": { "ekCert": { @@ -39995,6 +41698,10 @@ "description": "[Output Only] Type of the resource. Always compute#subnetwork for Subnetwork resources.", "type": "string" }, + "logConfig": { + "$ref": "SubnetworkLogConfig", + "description": "This field denotes the logging options for the load balancer traffic served by this backend service. If logging is enabled, logs will be exported to Stackdriver." + }, "name": { "description": "The name of the resource, provided by the client when initially creating the resource. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", @@ -40250,6 +41957,54 @@ }, "type": "object" }, + "SubnetworkLogConfig": { + "description": "The available logging options for this subnetwork.", + "id": "SubnetworkLogConfig", + "properties": { + "aggregationInterval": { + "description": "Can only be specified if VPC flow logging for this subnetwork is enabled. Toggles the aggregation interval for collecting flow logs. Increasing the interval time will reduce the amount of generated flow logs for long lasting connections. Default is an interval of 5 seconds per connection.", + "enum": [ + "INTERVAL_10_MIN", + "INTERVAL_15_MIN", + "INTERVAL_1_MIN", + "INTERVAL_30_SEC", + "INTERVAL_5_MIN", + "INTERVAL_5_SEC" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "" + ], + "type": "string" + }, + "enable": { + "description": "Whether to enable flow logging for this subnetwork. If this field is not explicitly set, it will not appear in get listings. If not set the default behavior is to disable flow logging.", + "type": "boolean" + }, + "flowSampling": { + "description": "Can only be specified if VPC flow logging for this subnetwork is enabled. The value of the field must be in [0, 1]. Set the sampling rate of VPC flow logs within the subnetwork where 1.0 means all collected logs are reported and 0.0 means no logs are reported. Default is 0.5 which means half of all collected logs are reported.", + "format": "float", + "type": "number" + }, + "metadata": { + "description": "Can only be specified if VPC flow logging for this subnetwork is enabled. Configures whether metadata fields should be added to the reported VPC flow logs. Default is INCLUDE_ALL_METADATA.", + "enum": [ + "EXCLUDE_ALL_METADATA", + "INCLUDE_ALL_METADATA" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + } + }, + "type": "object" + }, "SubnetworkSecondaryRange": { "description": "Represents a secondary IP range of a subnetwork.", "id": "SubnetworkSecondaryRange", @@ -42066,7 +43821,7 @@ "type": "string" }, "forwardingRules": { - "description": "[Output Only] A list of URLs to the ForwardingRule resources. ForwardingRules are created using compute.forwardingRules.insert and associated to a VPN gateway.", + "description": "[Output Only] A list of URLs to the ForwardingRule resources. ForwardingRules are created using compute.forwardingRules.insert and associated with a VPN gateway.", "items": { "type": "string" }, @@ -42122,7 +43877,7 @@ "type": "string" }, "status": { - "description": "[Output Only] The status of the VPN gateway.", + "description": "[Output Only] The status of the VPN gateway, which can be one of the following: CREATING, READY, FAILED, or DELETING.", "enum": [ "CREATING", "DELETING", @@ -42138,7 +43893,7 @@ "type": "string" }, "tunnels": { - "description": "[Output Only] A list of URLs to VpnTunnel resources. VpnTunnels are created using compute.vpntunnels.insert method and associated to a VPN gateway.", + "description": "[Output Only] A list of URLs to VpnTunnel resources. VpnTunnels are created using the compute.vpntunnels.insert method and associated with a VPN gateway.", "items": { "type": "string" }, @@ -42375,7 +44130,7 @@ "id": "TargetVpnGatewaysScopedList", "properties": { "targetVpnGateways": { - "description": "[Output Only] A list of target vpn gateways contained in this scope.", + "description": "[Output Only] A list of target VPN gateways contained in this scope.", "items": { "$ref": "TargetVpnGateway" }, @@ -42518,7 +44273,7 @@ "type": "string" }, "defaultService": { - "description": "The URL of the backendService resource if none of the hostRules match.\nUse defaultService instead of defaultRouteAction when simple routing to a backendService is desired and other advanced capabilities like traffic splitting and rewrites are not required.\nOnly one of defaultService, defaultRouteAction or defaultUrlRedirect should must be set.", + "description": "The full or partial URL of the defaultService resource to which traffic is directed if none of the hostRules match. If defaultRouteAction is additionally specified, advanced routing actions like URL Rewrites, etc. take effect prior to sending the request to the backend. However, if defaultService is specified, defaultRouteAction cannot contain any weightedBackendServices. Conversely, if routeAction specifies any weightedBackendServices, service must not be specified.\nOnly one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.", "type": "string" }, "description": { @@ -43086,6 +44841,509 @@ }, "type": "object" }, + "VpnGateway": { + "description": "Represents a VPN gateway resource.", + "id": "VpnGateway", + "properties": { + "creationTimestamp": { + "description": "[Output Only] Creation timestamp in RFC3339 text format.", + "type": "string" + }, + "description": { + "description": "An optional description of this resource. Provide this property when you create the resource.", + "type": "string" + }, + "id": { + "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", + "format": "uint64", + "type": "string" + }, + "kind": { + "default": "compute#vpnGateway", + "description": "[Output Only] Type of resource. Always compute#vpnGateway for VPN gateways.", + "type": "string" + }, + "labelFingerprint": { + "description": "A fingerprint for the labels being applied to this VpnGateway, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the request will fail with error 412 conditionNotMet.\n\nTo see the latest fingerprint, make a get() request to retrieve an VpnGateway.", + "format": "byte", + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Labels to apply to this VpnGateway resource. These can be later modified by the setLabels method. Each label key/value must comply with RFC1035. Label values may be empty.", + "type": "object" + }, + "name": { + "annotations": { + "required": [ + "compute.vpnGateways.insert" + ] + }, + "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "type": "string" + }, + "network": { + "annotations": { + "required": [ + "compute.vpnGateways.insert" + ] + }, + "description": "URL of the network to which this VPN gateway is attached. Provided by the client when the VPN gateway is created.", + "type": "string" + }, + "region": { + "description": "[Output Only] URL of the region where the VPN gateway resides.", + "type": "string" + }, + "selfLink": { + "description": "[Output Only] Server-defined URL for the resource.", + "type": "string" + }, + "vpnInterfaces": { + "description": "[Output Only] A list of interfaces on this VPN gateway.", + "items": { + "$ref": "VpnGatewayVpnGatewayInterface" + }, + "type": "array" + } + }, + "type": "object" + }, + "VpnGatewayAggregatedList": { + "id": "VpnGatewayAggregatedList", + "properties": { + "id": { + "description": "[Output Only] Unique identifier for the resource; defined by the server.", + "type": "string" + }, + "items": { + "additionalProperties": { + "$ref": "VpnGatewaysScopedList", + "description": "[Output Only] Name of the scope containing this set of VPN gateways." + }, + "description": "A list of VpnGateway resources.", + "type": "object" + }, + "kind": { + "default": "compute#vpnGatewayAggregatedList", + "description": "[Output Only] Type of resource. Always compute#vpnGateway for VPN gateways.", + "type": "string" + }, + "nextPageToken": { + "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.", + "type": "string" + }, + "selfLink": { + "description": "[Output Only] Server-defined URL for this resource.", + "type": "string" + }, + "warning": { + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", + "enum": [ + "CLEANUP_FAILED", + "DEPRECATED_RESOURCE_USED", + "DEPRECATED_TYPE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "EXPERIMENTAL_TYPE_USED", + "EXTERNAL_API_WARNING", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "MISSING_TYPE_DEPENDENCY", + "NEXT_HOP_ADDRESS_NOT_ASSIGNED", + "NEXT_HOP_CANNOT_IP_FORWARD", + "NEXT_HOP_INSTANCE_NOT_FOUND", + "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", + "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", + "NO_RESULTS_ON_PAGE", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", + "RESOURCE_NOT_DELETED", + "SCHEMA_VALIDATION_IGNORED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNDECLARED_PROPERTIES", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ], + "type": "string" + }, + "data": { + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "properties": { + "key": { + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).", + "type": "string" + }, + "value": { + "description": "[Output Only] A warning data value corresponding to the key.", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "[Output Only] A human-readable description of the warning code.", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "VpnGatewayList": { + "description": "Contains a list of VpnGateway resources.", + "id": "VpnGatewayList", + "properties": { + "id": { + "description": "[Output Only] Unique identifier for the resource; defined by the server.", + "type": "string" + }, + "items": { + "description": "A list of VpnGateway resources.", + "items": { + "$ref": "VpnGateway" + }, + "type": "array" + }, + "kind": { + "default": "compute#vpnGatewayList", + "description": "[Output Only] Type of resource. Always compute#vpnGateway for VPN gateways.", + "type": "string" + }, + "nextPageToken": { + "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.", + "type": "string" + }, + "selfLink": { + "description": "[Output Only] Server-defined URL for this resource.", + "type": "string" + }, + "warning": { + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", + "enum": [ + "CLEANUP_FAILED", + "DEPRECATED_RESOURCE_USED", + "DEPRECATED_TYPE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "EXPERIMENTAL_TYPE_USED", + "EXTERNAL_API_WARNING", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "MISSING_TYPE_DEPENDENCY", + "NEXT_HOP_ADDRESS_NOT_ASSIGNED", + "NEXT_HOP_CANNOT_IP_FORWARD", + "NEXT_HOP_INSTANCE_NOT_FOUND", + "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", + "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", + "NO_RESULTS_ON_PAGE", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", + "RESOURCE_NOT_DELETED", + "SCHEMA_VALIDATION_IGNORED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNDECLARED_PROPERTIES", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ], + "type": "string" + }, + "data": { + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "properties": { + "key": { + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).", + "type": "string" + }, + "value": { + "description": "[Output Only] A warning data value corresponding to the key.", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "[Output Only] A human-readable description of the warning code.", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "VpnGatewayStatus": { + "id": "VpnGatewayStatus", + "properties": { + "vpnConnections": { + "description": "List of VPN connection for this VpnGateway.", + "items": { + "$ref": "VpnGatewayStatusVpnConnection" + }, + "type": "array" + } + }, + "type": "object" + }, + "VpnGatewayStatusHighAvailabilityRequirementState": { + "description": "Describes the high availability requirement state for the VPN connection between this Cloud VPN gateway and a peer gateway.", + "id": "VpnGatewayStatusHighAvailabilityRequirementState", + "properties": { + "state": { + "description": "Indicates the high availability requirement state for the VPN connection. Valid values are CONNECTION_REDUNDANCY_MET, CONNECTION_REDUNDANCY_NOT_MET.", + "enum": [ + "CONNECTION_REDUNDANCY_MET", + "CONNECTION_REDUNDANCY_NOT_MET" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + }, + "unsatisfiedReason": { + "description": "Indicates the reason why the VPN connection does not meet the high availability redundancy criteria/requirement. Valid values is INCOMPLETE_TUNNELS_COVERAGE.", + "enum": [ + "INCOMPLETE_TUNNELS_COVERAGE" + ], + "enumDescriptions": [ + "" + ], + "type": "string" + } + }, + "type": "object" + }, + "VpnGatewayStatusTunnel": { + "description": "Contains some information about a VPN tunnel.", + "id": "VpnGatewayStatusTunnel", + "properties": { + "localGatewayInterface": { + "description": "The VPN gateway interface this VPN tunnel is associated with.", + "format": "uint32", + "type": "integer" + }, + "peerGatewayInterface": { + "description": "The peer gateway interface this VPN tunnel is connected to, the peer gateway could either be an external VPN gateway or GCP VPN gateway.", + "format": "uint32", + "type": "integer" + }, + "tunnelUrl": { + "description": "URL reference to the VPN tunnel.", + "type": "string" + } + }, + "type": "object" + }, + "VpnGatewayStatusVpnConnection": { + "description": "A VPN connection contains all VPN tunnels connected from this VpnGateway to the same peer gateway. The peer gateway could either be a external VPN gateway or GCP VPN gateway.", + "id": "VpnGatewayStatusVpnConnection", + "properties": { + "peerExternalGateway": { + "description": "URL reference to the peer external VPN gateways to which the VPN tunnels in this VPN connection are connected. This field is mutually exclusive with peer_gcp_gateway.", + "type": "string" + }, + "peerGcpGateway": { + "description": "URL reference to the peer side VPN gateways to which the VPN tunnels in this VPN connection are connected. This field is mutually exclusive with peer_gcp_gateway.", + "type": "string" + }, + "state": { + "$ref": "VpnGatewayStatusHighAvailabilityRequirementState", + "description": "HighAvailabilityRequirementState for the VPN connection." + }, + "tunnels": { + "description": "List of VPN tunnels that are in this VPN connection.", + "items": { + "$ref": "VpnGatewayStatusTunnel" + }, + "type": "array" + } + }, + "type": "object" + }, + "VpnGatewayVpnGatewayInterface": { + "description": "A VPN gateway interface.", + "id": "VpnGatewayVpnGatewayInterface", + "properties": { + "id": { + "description": "The numeric ID of this VPN gateway interface.", + "format": "uint32", + "type": "integer" + }, + "ipAddress": { + "description": "The external IP address for this VPN gateway interface.", + "type": "string" + } + }, + "type": "object" + }, + "VpnGatewaysGetStatusResponse": { + "id": "VpnGatewaysGetStatusResponse", + "properties": { + "result": { + "$ref": "VpnGatewayStatus" + } + }, + "type": "object" + }, + "VpnGatewaysScopedList": { + "id": "VpnGatewaysScopedList", + "properties": { + "vpnGateways": { + "description": "[Output Only] A list of VPN gateways contained in this scope.", + "items": { + "$ref": "VpnGateway" + }, + "type": "array" + }, + "warning": { + "description": "[Output Only] Informational warning which replaces the list of addresses when the list is empty.", + "properties": { + "code": { + "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", + "enum": [ + "CLEANUP_FAILED", + "DEPRECATED_RESOURCE_USED", + "DEPRECATED_TYPE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "EXPERIMENTAL_TYPE_USED", + "EXTERNAL_API_WARNING", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "MISSING_TYPE_DEPENDENCY", + "NEXT_HOP_ADDRESS_NOT_ASSIGNED", + "NEXT_HOP_CANNOT_IP_FORWARD", + "NEXT_HOP_INSTANCE_NOT_FOUND", + "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", + "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", + "NO_RESULTS_ON_PAGE", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", + "RESOURCE_NOT_DELETED", + "SCHEMA_VALIDATION_IGNORED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNDECLARED_PROPERTIES", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ], + "type": "string" + }, + "data": { + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "properties": { + "key": { + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).", + "type": "string" + }, + "value": { + "description": "[Output Only] A warning data value corresponding to the key.", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "[Output Only] A human-readable description of the warning code.", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, "VpnTunnel": { "description": "VPN tunnel resource. (== resource_for beta.vpnTunnels ==) (== resource_for v1.vpnTunnels ==)", "id": "VpnTunnel", @@ -43108,7 +45366,7 @@ "type": "string" }, "ikeVersion": { - "description": "IKE protocol version to use when establishing the VPN tunnel with peer VPN gateway. Acceptable IKE versions are 1 or 2. Default version is 2.", + "description": "IKE protocol version to use when establishing the VPN tunnel with the peer VPN gateway. Acceptable IKE versions are 1 or 2. The default version is 2.", "format": "int32", "type": "integer" }, @@ -43130,7 +45388,7 @@ "type": "object" }, "localTrafficSelector": { - "description": "Local traffic selector to use when establishing the VPN tunnel with peer VPN gateway. The value should be a CIDR formatted string, for example: 192.168.0.0/16. The ranges should be disjoint. Only IPv4 is supported.", + "description": "Local traffic selector to use when establishing the VPN tunnel with the peer VPN gateway. The value should be a CIDR formatted string, for example: 192.168.0.0/16. The ranges must be disjoint. Only IPv4 is supported.", "items": { "type": "string" }, @@ -43146,6 +45404,19 @@ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "type": "string" }, + "peerExternalGateway": { + "description": "URL of the peer side external VPN gateway to which this VPN tunnel is connected. Provided by the client when the VPN tunnel is created. This field is exclusive with the field peerGcpGateway.", + "type": "string" + }, + "peerExternalGatewayInterface": { + "description": "The interface ID of the external VPN gateway to which this VPN tunnel is connected. Provided by the client when the VPN tunnel is created.", + "format": "int32", + "type": "integer" + }, + "peerGcpGateway": { + "description": "URL of the peer side HA GCP VPN gateway to which this VPN tunnel is connected. Provided by the client when the VPN tunnel is created. This field can be used when creating highly available VPN from VPC network to VPC network, the field is exclusive with the field peerExternalGateway. If provided, the VPN tunnel will automatically use the same vpnGatewayInterface ID in the peer GCP VPN gateway.", + "type": "string" + }, "peerIp": { "description": "IP address of the peer VPN gateway. Only IPv4 is supported.", "type": "string" @@ -43155,14 +45426,14 @@ "type": "string" }, "remoteTrafficSelector": { - "description": "Remote traffic selectors to use when establishing the VPN tunnel with peer VPN gateway. The value should be a CIDR formatted string, for example: 192.168.0.0/16. The ranges should be disjoint. Only IPv4 is supported.", + "description": "Remote traffic selectors to use when establishing the VPN tunnel with the peer VPN gateway. The value should be a CIDR formatted string, for example: 192.168.0.0/16. The ranges should be disjoint. Only IPv4 is supported.", "items": { "type": "string" }, "type": "array" }, "router": { - "description": "URL of router resource to be used for dynamic routing.", + "description": "URL of the router resource to be used for dynamic routing.", "type": "string" }, "selfLink": { @@ -43178,7 +45449,7 @@ "type": "string" }, "status": { - "description": "[Output Only] The status of the VPN tunnel.", + "description": "[Output Only] The status of the VPN tunnel, which can be one of the following: \n- PROVISIONING: Resource is being allocated for the VPN tunnel. \n- WAITING_FOR_FULL_CONFIG: Waiting to receive all VPN-related configs from the user. Network, TargetVpnGateway, VpnTunnel, ForwardingRule, and Route resources are needed to setup the VPN tunnel. \n- FIRST_HANDSHAKE: Successful first handshake with the peer VPN. \n- ESTABLISHED: Secure session is successfully established with the peer VPN. \n- NETWORK_ERROR: Deprecated, replaced by NO_INCOMING_PACKETS \n- AUTHORIZATION_ERROR: Auth error (for example, bad shared secret). \n- NEGOTIATION_FAILURE: Handshake failed. \n- DEPROVISIONING: Resources are being deallocated for the VPN tunnel. \n- FAILED: Tunnel creation has failed and the tunnel is not ready to be used.", "enum": [ "ALLOCATING_RESOURCES", "AUTHORIZATION_ERROR", @@ -43212,6 +45483,15 @@ "targetVpnGateway": { "description": "URL of the Target VPN gateway with which this VPN tunnel is associated. Provided by the client when the VPN tunnel is created.", "type": "string" + }, + "vpnGateway": { + "description": "URL of the VPN gateway with which this VPN tunnel is associated. Provided by the client when the VPN tunnel is created. This must be used (instead of target_vpn_gateway) if a High Availability VPN gateway resource is created.", + "type": "string" + }, + "vpnGatewayInterface": { + "description": "The interface ID of the VPN gateway with which this VPN tunnel is associated.", + "format": "int32", + "type": "integer" } }, "type": "object" @@ -43226,7 +45506,7 @@ "items": { "additionalProperties": { "$ref": "VpnTunnelsScopedList", - "description": "Name of the scope containing this set of vpn tunnels." + "description": "Name of the scope containing this set of VPN tunnels." }, "description": "A list of VpnTunnelsScopedList resources.", "type": "object" @@ -43444,7 +45724,7 @@ "id": "VpnTunnelsScopedList", "properties": { "vpnTunnels": { - "description": "A list of vpn tunnels contained in this scope.", + "description": "A list of VPN tunnels contained in this scope.", "items": { "$ref": "VpnTunnel" }, @@ -43703,7 +45983,7 @@ "type": "object" }, "Zone": { - "description": "A Zone resource. (== resource_for beta.zones ==) (== resource_for v1.zones ==)", + "description": "A Zone resource. (== resource_for beta.zones ==) (== resource_for v1.zones ==) Next ID: 17", "id": "Zone", "properties": { "availableCpuPlatforms": { diff --git a/vendor/google.golang.org/api/compute/v0.beta/compute-gen.go b/vendor/google.golang.org/api/compute/v0.beta/compute-gen.go index 6f11e2e8..5686d6c3 100644 --- a/vendor/google.golang.org/api/compute/v0.beta/compute-gen.go +++ b/vendor/google.golang.org/api/compute/v0.beta/compute-gen.go @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. All rights reserved. +// Copyright 2019 Google LLC. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. @@ -6,13 +6,39 @@ // Package compute provides access to the Compute Engine API. // -// See https://developers.google.com/compute/docs/reference/latest/ +// For product documentation, see: https://developers.google.com/compute/docs/reference/latest/ +// +// Creating a client // // Usage example: // // import "google.golang.org/api/compute/v0.beta" // ... -// computeService, err := compute.New(oauthHttpClient) +// ctx := context.Background() +// computeService, err := compute.NewService(ctx) +// +// In this example, Google Application Default Credentials are used for authentication. +// +// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// +// Other authentication options +// +// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// +// computeService, err := compute.NewService(ctx, option.WithScopes(compute.DevstorageReadWriteScope)) +// +// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// +// computeService, err := compute.NewService(ctx, option.WithAPIKey("AIza...")) +// +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// +// config := &oauth2.Config{...} +// // ... +// token, err := config.Exchange(ctx, ...) +// computeService, err := compute.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) +// +// See https://godoc.org/google.golang.org/api/option/ for details on options. package compute // import "google.golang.org/api/compute/v0.beta" import ( @@ -29,6 +55,8 @@ import ( gensupport "google.golang.org/api/gensupport" googleapi "google.golang.org/api/googleapi" + option "google.golang.org/api/option" + htransport "google.golang.org/api/transport/http" ) // Always reference these packages, just in case the auto-generated code @@ -71,6 +99,37 @@ const ( DevstorageReadWriteScope = "https://www.googleapis.com/auth/devstorage.read_write" ) +// NewService creates a new Service. +func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { + scopesOption := option.WithScopes( + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly", + "https://www.googleapis.com/auth/devstorage.full_control", + "https://www.googleapis.com/auth/devstorage.read_only", + "https://www.googleapis.com/auth/devstorage.read_write", + ) + // NOTE: prepend, so we don't override user-specified scopes. + opts = append([]option.ClientOption{scopesOption}, opts...) + client, endpoint, err := htransport.NewClient(ctx, opts...) + if err != nil { + return nil, err + } + s, err := New(client) + if err != nil { + return nil, err + } + if endpoint != "" { + s.BasePath = endpoint + } + return s, nil +} + +// New creates a new Service. It uses the provided http.Client for requests. +// +// Deprecated: please use NewService instead. +// To provide a custom HTTP client, use option.WithHTTPClient. +// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. func New(client *http.Client) (*Service, error) { if client == nil { return nil, errors.New("client is nil") @@ -78,12 +137,12 @@ func New(client *http.Client) (*Service, error) { s := &Service{client: client, BasePath: basePath} s.AcceleratorTypes = NewAcceleratorTypesService(s) s.Addresses = NewAddressesService(s) - s.Allocations = NewAllocationsService(s) s.Autoscalers = NewAutoscalersService(s) s.BackendBuckets = NewBackendBucketsService(s) s.BackendServices = NewBackendServicesService(s) s.DiskTypes = NewDiskTypesService(s) s.Disks = NewDisksService(s) + s.ExternalVpnGateways = NewExternalVpnGatewaysService(s) s.Firewalls = NewFirewallsService(s) s.ForwardingRules = NewForwardingRulesService(s) s.GlobalAddresses = NewGlobalAddressesService(s) @@ -118,6 +177,7 @@ func New(client *http.Client) (*Service, error) { s.RegionInstanceGroups = NewRegionInstanceGroupsService(s) s.RegionOperations = NewRegionOperationsService(s) s.Regions = NewRegionsService(s) + s.Reservations = NewReservationsService(s) s.ResourcePolicies = NewResourcePoliciesService(s) s.Routers = NewRoutersService(s) s.Routes = NewRoutesService(s) @@ -134,6 +194,7 @@ func New(client *http.Client) (*Service, error) { s.TargetTcpProxies = NewTargetTcpProxiesService(s) s.TargetVpnGateways = NewTargetVpnGatewaysService(s) s.UrlMaps = NewUrlMapsService(s) + s.VpnGateways = NewVpnGatewaysService(s) s.VpnTunnels = NewVpnTunnelsService(s) s.ZoneOperations = NewZoneOperationsService(s) s.Zones = NewZonesService(s) @@ -149,8 +210,6 @@ type Service struct { Addresses *AddressesService - Allocations *AllocationsService - Autoscalers *AutoscalersService BackendBuckets *BackendBucketsService @@ -161,6 +220,8 @@ type Service struct { Disks *DisksService + ExternalVpnGateways *ExternalVpnGatewaysService + Firewalls *FirewallsService ForwardingRules *ForwardingRulesService @@ -229,6 +290,8 @@ type Service struct { Regions *RegionsService + Reservations *ReservationsService + ResourcePolicies *ResourcePoliciesService Routers *RoutersService @@ -261,6 +324,8 @@ type Service struct { UrlMaps *UrlMapsService + VpnGateways *VpnGatewaysService + VpnTunnels *VpnTunnelsService ZoneOperations *ZoneOperationsService @@ -293,15 +358,6 @@ type AddressesService struct { s *Service } -func NewAllocationsService(s *Service) *AllocationsService { - rs := &AllocationsService{s: s} - return rs -} - -type AllocationsService struct { - s *Service -} - func NewAutoscalersService(s *Service) *AutoscalersService { rs := &AutoscalersService{s: s} return rs @@ -347,6 +403,15 @@ type DisksService struct { s *Service } +func NewExternalVpnGatewaysService(s *Service) *ExternalVpnGatewaysService { + rs := &ExternalVpnGatewaysService{s: s} + return rs +} + +type ExternalVpnGatewaysService struct { + s *Service +} + func NewFirewallsService(s *Service) *FirewallsService { rs := &FirewallsService{s: s} return rs @@ -653,6 +718,15 @@ type RegionsService struct { s *Service } +func NewReservationsService(s *Service) *ReservationsService { + rs := &ReservationsService{s: s} + return rs +} + +type ReservationsService struct { + s *Service +} + func NewResourcePoliciesService(s *Service) *ResourcePoliciesService { rs := &ResourcePoliciesService{s: s} return rs @@ -797,6 +871,15 @@ type UrlMapsService struct { s *Service } +func NewVpnGatewaysService(s *Service) *VpnGatewaysService { + rs := &VpnGatewaysService{s: s} + return rs +} + +type VpnGatewaysService struct { + s *Service +} + func NewVpnTunnelsService(s *Service) *VpnTunnelsService { rs := &VpnTunnelsService{s: s} return rs @@ -832,8 +915,11 @@ type AcceleratorConfig struct { AcceleratorCount int64 `json:"acceleratorCount,omitempty"` // AcceleratorType: Full or partial URL of the accelerator type resource - // to attach to this instance. If you are creating an instance template, - // specify only the accelerator name. + // to attach to this instance. For example: + // projects/my-project/zones/us-central1-c/acceleratorTypes/nvidia-tesla- + // p100 If you are creating an instance template, specify only the + // accelerator name. See GPUs on Compute Engine for a full list of + // accelerator types. AcceleratorType string `json:"acceleratorType,omitempty"` // ForceSendFields is a list of field names (e.g. "AcceleratorCount") to @@ -1545,6 +1631,7 @@ type Address struct { // Possible values: // "DNS_RESOLVER" // "GCE_ENDPOINT" + // "NAT_AUTO" // "VPC_PEERING" Purpose string `json:"purpose,omitempty"` @@ -2088,502 +2175,7 @@ func (s *AliasIpRange) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Allocation: Allocation resource -type Allocation struct { - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - Description string `json:"description,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // Kind: [Output Only] Type of the resource. Always compute#allocations - // for allocations. - Kind string `json:"kind,omitempty"` - - // Name: The name of the resource, provided by the client when initially - // creating the resource. The resource name must be 1-63 characters - // long, and comply with RFC1035. Specifically, the name must be 1-63 - // characters long and match the regular expression - // `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be - // a lowercase letter, and all following characters must be a dash, - // lowercase letter, or digit, except the last character, which cannot - // be a dash. - Name string `json:"name,omitempty"` - - // SelfLink: [Output Only] Server-defined fully-qualified URL for this - // resource. - SelfLink string `json:"selfLink,omitempty"` - - SpecificAllocation *AllocationSpecificSKUAllocation `json:"specificAllocation,omitempty"` - - // SpecificAllocationRequired: Indicates whether the allocation can be - // consumed by VMs with "any allocation" defined. If the field is set, - // then only VMs that target the allocation by name using - // --allocation-affinity can consume this allocation. - SpecificAllocationRequired bool `json:"specificAllocationRequired,omitempty"` - - Zone string `json:"zone,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CreationTimestamp") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *Allocation) MarshalJSON() ([]byte, error) { - type NoMethod Allocation - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// AllocationAffinity: AllocationAffinity is the configuration of -// desired allocation which this instance could take capacity from. -type AllocationAffinity struct { - // Possible values: - // "ANY_ALLOCATION" - // "NO_ALLOCATION" - // "SPECIFIC_ALLOCATION" - // "UNSPECIFIED" - ConsumeAllocationType string `json:"consumeAllocationType,omitempty"` - - // Key: Corresponds to the label key of allocation resource. - Key string `json:"key,omitempty"` - - // Values: Corresponds to the label values of allocation resource. - Values []string `json:"values,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "ConsumeAllocationType") to unconditionally include in API requests. - // By default, fields with empty values are omitted from API requests. - // However, any non-pointer, non-interface field appearing in - // ForceSendFields will be sent to the server regardless of whether the - // field is empty or not. This may be used to include empty fields in - // Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ConsumeAllocationType") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *AllocationAffinity) MarshalJSON() ([]byte, error) { - type NoMethod AllocationAffinity - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// AllocationAggregatedList: Contains a list of allocations. -type AllocationAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of Allocation resources. - Items map[string]AllocationsScopedList `json:"items,omitempty"` - - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // Warning: [Output Only] Informational warning message. - Warning *AllocationAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *AllocationAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod AllocationAggregatedList - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// AllocationAggregatedListWarning: [Output Only] Informational warning -// message. -type AllocationAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in - // the response. - // - // Possible values: - // "CLEANUP_FAILED" - // "DEPRECATED_RESOURCE_USED" - // "DEPRECATED_TYPE_USED" - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - // "EXPERIMENTAL_TYPE_USED" - // "EXTERNAL_API_WARNING" - // "FIELD_VALUE_OVERRIDEN" - // "INJECTED_KERNELS_DEPRECATED" - // "MISSING_TYPE_DEPENDENCY" - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - // "NEXT_HOP_CANNOT_IP_FORWARD" - // "NEXT_HOP_INSTANCE_NOT_FOUND" - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - // "NEXT_HOP_NOT_RUNNING" - // "NOT_CRITICAL_ERROR" - // "NO_RESULTS_ON_PAGE" - // "REQUIRED_TOS_AGREEMENT" - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - // "RESOURCE_NOT_DELETED" - // "SCHEMA_VALIDATION_IGNORED" - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - // "UNDECLARED_PROPERTIES" - // "UNREACHABLE" - Code string `json:"code,omitempty"` - - // Data: [Output Only] Metadata about this warning in key: value format. - // For example: - // "data": [ { "key": "scope", "value": "zones/us-east1-d" } - Data []*AllocationAggregatedListWarningData `json:"data,omitempty"` - - // Message: [Output Only] A human-readable description of the warning - // code. - Message string `json:"message,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Code") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Code") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *AllocationAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod AllocationAggregatedListWarning - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type AllocationAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being returned. For example, for warnings where there are no results - // in a list request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP - // forwarding). - Key string `json:"key,omitempty"` - - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Key") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Key") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *AllocationAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod AllocationAggregatedListWarningData - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type AllocationList struct { - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id string `json:"id,omitempty"` - - // Items: [Output Only] A list of Allocation resources. - Items []*Allocation `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource.Always compute#allocationsList - // for listsof allocations - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // Warning: [Output Only] Informational warning message. - Warning *AllocationListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *AllocationList) MarshalJSON() ([]byte, error) { - type NoMethod AllocationList - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// AllocationListWarning: [Output Only] Informational warning message. -type AllocationListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in - // the response. - // - // Possible values: - // "CLEANUP_FAILED" - // "DEPRECATED_RESOURCE_USED" - // "DEPRECATED_TYPE_USED" - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - // "EXPERIMENTAL_TYPE_USED" - // "EXTERNAL_API_WARNING" - // "FIELD_VALUE_OVERRIDEN" - // "INJECTED_KERNELS_DEPRECATED" - // "MISSING_TYPE_DEPENDENCY" - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - // "NEXT_HOP_CANNOT_IP_FORWARD" - // "NEXT_HOP_INSTANCE_NOT_FOUND" - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - // "NEXT_HOP_NOT_RUNNING" - // "NOT_CRITICAL_ERROR" - // "NO_RESULTS_ON_PAGE" - // "REQUIRED_TOS_AGREEMENT" - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - // "RESOURCE_NOT_DELETED" - // "SCHEMA_VALIDATION_IGNORED" - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - // "UNDECLARED_PROPERTIES" - // "UNREACHABLE" - Code string `json:"code,omitempty"` - - // Data: [Output Only] Metadata about this warning in key: value format. - // For example: - // "data": [ { "key": "scope", "value": "zones/us-east1-d" } - Data []*AllocationListWarningData `json:"data,omitempty"` - - // Message: [Output Only] A human-readable description of the warning - // code. - Message string `json:"message,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Code") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Code") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *AllocationListWarning) MarshalJSON() ([]byte, error) { - type NoMethod AllocationListWarning - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type AllocationListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being returned. For example, for warnings where there are no results - // in a list request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP - // forwarding). - Key string `json:"key,omitempty"` - - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Key") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Key") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *AllocationListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod AllocationListWarningData - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// AllocationSpecificSKUAllocation: This allocation type allows to pre -// allocate specific instance configuration. -type AllocationSpecificSKUAllocation struct { - // Count: Specifies number of resources that are allocated. - Count int64 `json:"count,omitempty,string"` - - // InUseCount: [OutputOnly] Indicates how many resource are in use. - InUseCount int64 `json:"inUseCount,omitempty,string"` - - InstanceProperties *AllocationSpecificSKUAllocationAllocatedInstanceProperties `json:"instanceProperties,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Count") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Count") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *AllocationSpecificSKUAllocation) MarshalJSON() ([]byte, error) { - type NoMethod AllocationSpecificSKUAllocation - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// AllocationSpecificSKUAllocationAllocatedInstanceProperties: -// Properties of the SKU instances being reserved. -type AllocationSpecificSKUAllocationAllocatedInstanceProperties struct { - // GuestAccelerators: Specifies accelerator type and count. - GuestAccelerators []*AcceleratorConfig `json:"guestAccelerators,omitempty"` - - // LocalSsds: Specifies amount of local ssd to reserve with each - // instance. The type of disk is local-ssd. - LocalSsds []*AllocationSpecificSKUAllocationAllocatedInstancePropertiesAllocatedDisk `json:"localSsds,omitempty"` - - // MachineType: Specifies type of machine (name only) which has fixed - // number of vCPUs and fixed amount of memory. This also includes - // specifying custom machine type following - // custom-NUMBER_OF_CPUS-AMOUNT_OF_MEMORY pattern. - MachineType string `json:"machineType,omitempty"` - - // MinCpuPlatform: Minimum cpu platform the allocation. - MinCpuPlatform string `json:"minCpuPlatform,omitempty"` - - // ForceSendFields is a list of field names (e.g. "GuestAccelerators") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "GuestAccelerators") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *AllocationSpecificSKUAllocationAllocatedInstanceProperties) MarshalJSON() ([]byte, error) { - type NoMethod AllocationSpecificSKUAllocationAllocatedInstanceProperties - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type AllocationSpecificSKUAllocationAllocatedInstancePropertiesAllocatedDisk struct { +type AllocationSpecificSKUAllocationAllocatedInstancePropertiesReservedDisk struct { // DiskSizeGb: Specifies the size of the disk in base-2 GB. DiskSizeGb int64 `json:"diskSizeGb,omitempty,string"` @@ -2614,86 +2206,69 @@ type AllocationSpecificSKUAllocationAllocatedInstancePropertiesAllocatedDisk str NullFields []string `json:"-"` } -func (s *AllocationSpecificSKUAllocationAllocatedInstancePropertiesAllocatedDisk) MarshalJSON() ([]byte, error) { - type NoMethod AllocationSpecificSKUAllocationAllocatedInstancePropertiesAllocatedDisk +func (s *AllocationSpecificSKUAllocationAllocatedInstancePropertiesReservedDisk) MarshalJSON() ([]byte, error) { + type NoMethod AllocationSpecificSKUAllocationAllocatedInstancePropertiesReservedDisk raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type AllocationsScopedList struct { - // Allocations: A list of allocations contained in this scope. - Allocations []*Allocation `json:"allocations,omitempty"` +// AllocationSpecificSKUAllocationReservedInstanceProperties: Properties +// of the SKU instances being reserved. +type AllocationSpecificSKUAllocationReservedInstanceProperties struct { + // GuestAccelerators: Specifies accelerator type and count. + GuestAccelerators []*AcceleratorConfig `json:"guestAccelerators,omitempty"` - // Warning: Informational warning which replaces the list of allocations - // when the list is empty. - Warning *AllocationsScopedListWarning `json:"warning,omitempty"` + // LocalSsds: Specifies amount of local ssd to reserve with each + // instance. The type of disk is local-ssd. + LocalSsds []*AllocationSpecificSKUAllocationAllocatedInstancePropertiesReservedDisk `json:"localSsds,omitempty"` - // ForceSendFields is a list of field names (e.g. "Allocations") to - // unconditionally include in API requests. By default, fields with + // MachineType: Specifies type of machine (name only) which has fixed + // number of vCPUs and fixed amount of memory. This also includes + // specifying custom machine type following + // custom-NUMBER_OF_CPUS-AMOUNT_OF_MEMORY pattern. + MachineType string `json:"machineType,omitempty"` + + // MinCpuPlatform: Minimum cpu platform the reservation. + MinCpuPlatform string `json:"minCpuPlatform,omitempty"` + + // ForceSendFields is a list of field names (e.g. "GuestAccelerators") + // to unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Allocations") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "GuestAccelerators") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *AllocationsScopedList) MarshalJSON() ([]byte, error) { - type NoMethod AllocationsScopedList +func (s *AllocationSpecificSKUAllocationReservedInstanceProperties) MarshalJSON() ([]byte, error) { + type NoMethod AllocationSpecificSKUAllocationReservedInstanceProperties raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// AllocationsScopedListWarning: Informational warning which replaces -// the list of allocations when the list is empty. -type AllocationsScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in - // the response. - // - // Possible values: - // "CLEANUP_FAILED" - // "DEPRECATED_RESOURCE_USED" - // "DEPRECATED_TYPE_USED" - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - // "EXPERIMENTAL_TYPE_USED" - // "EXTERNAL_API_WARNING" - // "FIELD_VALUE_OVERRIDEN" - // "INJECTED_KERNELS_DEPRECATED" - // "MISSING_TYPE_DEPENDENCY" - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - // "NEXT_HOP_CANNOT_IP_FORWARD" - // "NEXT_HOP_INSTANCE_NOT_FOUND" - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - // "NEXT_HOP_NOT_RUNNING" - // "NOT_CRITICAL_ERROR" - // "NO_RESULTS_ON_PAGE" - // "REQUIRED_TOS_AGREEMENT" - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - // "RESOURCE_NOT_DELETED" - // "SCHEMA_VALIDATION_IGNORED" - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - // "UNDECLARED_PROPERTIES" - // "UNREACHABLE" - Code string `json:"code,omitempty"` +// AllocationSpecificSKUReservation: This reservation type allows to pre +// allocate specific instance configuration. +type AllocationSpecificSKUReservation struct { + // Count: Specifies number of resources that are allocated. + Count int64 `json:"count,omitempty,string"` - // Data: [Output Only] Metadata about this warning in key: value format. - // For example: - // "data": [ { "key": "scope", "value": "zones/us-east1-d" } - Data []*AllocationsScopedListWarningData `json:"data,omitempty"` + // InUseCount: [OutputOnly] Indicates how many resource are in use. + InUseCount int64 `json:"inUseCount,omitempty,string"` - // Message: [Output Only] A human-readable description of the warning - // code. - Message string `json:"message,omitempty"` + // InstanceProperties: The instance properties for this specific sku + // reservation. + InstanceProperties *AllocationSpecificSKUAllocationReservedInstanceProperties `json:"instanceProperties,omitempty"` - // ForceSendFields is a list of field names (e.g. "Code") to + // ForceSendFields is a list of field names (e.g. "Count") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the @@ -2701,7 +2276,7 @@ type AllocationsScopedListWarning struct { // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API + // NullFields is a list of field names (e.g. "Count") to include in API // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -2710,45 +2285,8 @@ type AllocationsScopedListWarning struct { NullFields []string `json:"-"` } -func (s *AllocationsScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod AllocationsScopedListWarning - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type AllocationsScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being returned. For example, for warnings where there are no results - // in a list request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP - // forwarding). - Key string `json:"key,omitempty"` - - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Key") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Key") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *AllocationsScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod AllocationsScopedListWarningData +func (s *AllocationSpecificSKUReservation) MarshalJSON() ([]byte, error) { + type NoMethod AllocationSpecificSKUReservation raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } @@ -2771,7 +2309,7 @@ type AttachedDisk struct { // the instance. // // If not specified, the server chooses a default device name to apply - // to this disk, in the form persistent-disks-x, where x is a number + // to this disk, in the form persistent-disk-x, where x is a number // assigned by Google Compute Engine. This field is only applicable for // persistent disks. DeviceName string `json:"deviceName,omitempty"` @@ -2929,11 +2467,24 @@ type AttachedDiskInitializeParams struct { // is the name of the disk type, not URL. DiskType string `json:"diskType,omitempty"` + // GuestOsFeatures: A list of features to enable on the guest operating + // system. Applicable only for bootable images. Read Enabling guest + // operating system features to see a list of available options. + // + // Guest OS features are applied by merging + // initializeParams.guestOsFeatures and disks.guestOsFeatures + GuestOsFeatures []*GuestOsFeature `json:"guestOsFeatures,omitempty"` + // Labels: Labels to apply to this disk. These can be later modified by // the disks.setLabels method. This field is only applicable for // persistent disks. Labels map[string]string `json:"labels,omitempty"` + // ResourcePolicies: Resource policies applied to this disk for + // automatic snapshot creations. Specified using the full or partial + // URL. For instance template, specify only the resource policy name. + ResourcePolicies []string `json:"resourcePolicies,omitempty"` + // SourceImage: The source image to create this disk. When creating a // new instance, one of initializeParams.sourceImage or disks.source is // required except for local SSD. @@ -2977,6 +2528,23 @@ type AttachedDiskInitializeParams struct { // the source images are encrypted with your own keys. SourceImageEncryptionKey *CustomerEncryptionKey `json:"sourceImageEncryptionKey,omitempty"` + // SourceSnapshot: The source snapshot to create this disk. When + // creating a new instance, one of initializeParams.sourceSnapshot or + // disks.source is required except for local SSD. + // + // To create a disk with a snapshot that you created, specify the + // snapshot name in the following + // format: + // global/snapshots/my-backup + // + // + // If the source snapshot is deleted later, this field will not be set. + SourceSnapshot string `json:"sourceSnapshot,omitempty"` + + // SourceSnapshotEncryptionKey: The customer-supplied encryption key of + // the source snapshot. + SourceSnapshotEncryptionKey *CustomerEncryptionKey `json:"sourceSnapshotEncryptionKey,omitempty"` + // ForceSendFields is a list of field names (e.g. "Description") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, @@ -3977,7 +3545,7 @@ func (s *AutoscalingPolicyCustomMetricUtilization) UnmarshalJSON(data []byte) er // of autoscaling based on load balancing. type AutoscalingPolicyLoadBalancingUtilization struct { // UtilizationTarget: Fraction of backend capacity utilization (set in - // HTTP(s) load balancing configuration) that autoscaler should + // HTTP(S) load balancing configuration) that autoscaler should // maintain. Must be a positive float value. If not defined, the default // is 0.8. UtilizationTarget float64 `json:"utilizationTarget,omitempty"` @@ -4050,6 +3618,11 @@ type Backend struct { // property when you create the resource. Description string `json:"description,omitempty"` + // Failover: This field designates whether this is a failover backend. + // More than one failover backend can be configured for a given + // BackendService. + Failover bool `json:"failover,omitempty"` + // Group: The fully-qualified URL of an Instance Group or Network // Endpoint Group resource. In case of instance group this defines the // list of instances that serve traffic. Member virtual machine @@ -4475,6 +4048,8 @@ type BackendService struct { // When the load balancing scheme is INTERNAL, this field is not used. EnableCDN bool `json:"enableCDN,omitempty"` + FailoverPolicy *BackendServiceFailoverPolicy `json:"failoverPolicy,omitempty"` + // Fingerprint: Fingerprint of this resource. A hash of the contents // stored in this object. This field is used in optimistic locking. This // field will be ignored when inserting a BackendService. An up-to-date @@ -4514,9 +4089,15 @@ type BackendService struct { // Possible values: // "EXTERNAL" // "INTERNAL" + // "INTERNAL_SELF_MANAGED" // "INVALID_LOAD_BALANCING_SCHEME" LoadBalancingScheme string `json:"loadBalancingScheme,omitempty"` + // LogConfig: This field denotes the logging options for the load + // balancer traffic served by this backend service. If logging is + // enabled, logs will be exported to Stackdriver. + LogConfig *BackendServiceLogConfig `json:"logConfig,omitempty"` + // Name: Name of the resource. Provided by the client when the resource // is created. The name must be 1-63 characters long, and comply with // RFC1035. Specifically, the name must be 1-63 characters long and @@ -4822,6 +4403,81 @@ func (s *BackendServiceCdnPolicy) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type BackendServiceFailoverPolicy struct { + // DisableConnectionDrainOnFailover: On failover or failback, this field + // indicates whether connection drain will be honored. Setting this to + // true has the following effect: connections to the old active pool are + // not drained. Connections to the new active pool use the timeout of 10 + // min (currently fixed). Setting to false has the following effect: + // both old and new connections will have a drain timeout of 10 + // min. + // + // This can be set to true only if the protocol is TCP. + // + // The default is false. + DisableConnectionDrainOnFailover bool `json:"disableConnectionDrainOnFailover,omitempty"` + + // DropTrafficIfUnhealthy: This option is used only when no healthy VMs + // are detected in the primary and backup instance groups. When set to + // true, traffic is dropped. When set to false, new connections are sent + // across all VMs in the primary group. + // + // The default is false. + DropTrafficIfUnhealthy bool `json:"dropTrafficIfUnhealthy,omitempty"` + + // FailoverRatio: The value of the field must be in [0, 1]. If the ratio + // of the healthy VMs in the primary backend is at or below this number, + // traffic arriving at the load-balanced IP will be directed to the + // failover backend. + // + // In case where 'failoverRatio' is not set or all the VMs in the backup + // backend are unhealthy, the traffic will be directed back to the + // primary backend in the "force" mode, where traffic will be spread to + // the healthy VMs with the best effort, or to all VMs when no VM is + // healthy. + // + // This field is only used with l4 load balancing. + FailoverRatio float64 `json:"failoverRatio,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "DisableConnectionDrainOnFailover") to unconditionally include in API + // requests. By default, fields with empty values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. + // "DisableConnectionDrainOnFailover") to include in API requests with + // the JSON null value. By default, fields with empty values are omitted + // from API requests. However, any field with an empty value appearing + // in NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *BackendServiceFailoverPolicy) MarshalJSON() ([]byte, error) { + type NoMethod BackendServiceFailoverPolicy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *BackendServiceFailoverPolicy) UnmarshalJSON(data []byte) error { + type NoMethod BackendServiceFailoverPolicy + var s1 struct { + FailoverRatio gensupport.JSONFloat64 `json:"failoverRatio"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.FailoverRatio = float64(s1.FailoverRatio) + return nil +} + type BackendServiceGroupHealth struct { // HealthStatus: Health state of the backend instances or endpoints in // requested instance or network endpoint group, determined based on @@ -5050,6 +4706,57 @@ func (s *BackendServiceListWarningData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// BackendServiceLogConfig: The available logging options for the load +// balancer traffic served by this backend service. +type BackendServiceLogConfig struct { + // Enable: This field denotes whether to enable logging for the load + // balancer traffic served by this backend service. + Enable bool `json:"enable,omitempty"` + + // SampleRate: This field can only be specified if logging is enabled + // for this backend service. The value of the field must be in [0, 1]. + // This configures the sampling rate of requests to the load balancer + // where 1.0 means all logged requests are reported and 0.0 means no + // logged requests are reported. The default value is 1.0. + SampleRate float64 `json:"sampleRate,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Enable") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Enable") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *BackendServiceLogConfig) MarshalJSON() ([]byte, error) { + type NoMethod BackendServiceLogConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *BackendServiceLogConfig) UnmarshalJSON(data []byte) error { + type NoMethod BackendServiceLogConfig + var s1 struct { + SampleRate gensupport.JSONFloat64 `json:"sampleRate"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.SampleRate = float64(s1.SampleRate) + return nil +} + type BackendServiceReference struct { BackendService string `json:"backendService,omitempty"` @@ -5213,10 +4920,10 @@ func (s *BackendServicesScopedListWarningData) MarshalJSON() ([]byte, error) { // Binding: Associates `members` with a `role`. type Binding struct { - // Condition: Unimplemented. The condition that is associated with this - // binding. NOTE: an unsatisfied condition will not allow user access - // via current binding. Different bindings, including their conditions, - // are examined independently. + // Condition: The condition that is associated with this binding. NOTE: + // An unsatisfied condition will not allow user access via current + // binding. Different bindings, including their conditions, are examined + // independently. Condition *Expr `json:"condition,omitempty"` // Members: Specifies the identities requesting access for a Cloud @@ -5243,7 +4950,7 @@ type Binding struct { // // // - // * `domain:{domain}`: A Google Apps domain name that represents all + // * `domain:{domain}`: The G Suite domain (primary) that represents all // the users of that domain. For example, `google.com` or `example.com`. Members []string `json:"members,omitempty"` @@ -5369,9 +5076,6 @@ func (s *CacheKeyPolicy) MarshalJSON() ([]byte, error) { // must purchase a new commitment to continue receiving discounts. (== // resource_for beta.commitments ==) (== resource_for v1.commitments ==) type Commitment struct { - // Allocations: List of allocations for this commitment. - Allocations []*Allocation `json:"allocations,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text // format. CreationTimestamp string `json:"creationTimestamp,omitempty"` @@ -5415,6 +5119,9 @@ type Commitment struct { // used. Region string `json:"region,omitempty"` + // Reservations: List of reservations for this commitment. + Reservations []*Reservation `json:"reservations,omitempty"` + // Resources: A list of commitment amounts for particular resources. // Note that VCPU and MEMORY resource commitments must occur together. Resources []*ResourceCommitment `json:"resources,omitempty"` @@ -5445,20 +5152,21 @@ type Commitment struct { // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Allocations") to - // unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "CreationTimestamp") + // to unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Allocations") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "CreationTimestamp") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } @@ -5951,11 +5659,7 @@ type Condition struct { // "SERVICE" Sys string `json:"sys,omitempty"` - // Value: DEPRECATED. Use 'values' instead. - Value string `json:"value,omitempty"` - - // Values: The objects of the condition. This is mutually exclusive with - // 'value'. + // Values: The objects of the condition. Values []string `json:"values,omitempty"` // ForceSendFields is a list of field names (e.g. "Iam") to @@ -6123,14 +5827,16 @@ type DeprecationStatus struct { // resource as the deprecated resource. Replacement string `json:"replacement,omitempty"` - // State: The deprecation state of this resource. This can be - // DEPRECATED, OBSOLETE, or DELETED. Operations which create a new - // resource using a DEPRECATED resource will return successfully, but - // with a warning indicating the deprecated resource and recommending - // its replacement. Operations which use OBSOLETE or DELETED resources - // will be rejected and result in an error. + // State: The deprecation state of this resource. This can be ACTIVE, + // DEPRECATED, OBSOLETE, or DELETED. Operations which communicate the + // end of life date for an image, can use ACTIVE. Operations which + // create a new resource using a DEPRECATED resource will return + // successfully, but with a warning indicating the deprecated resource + // and recommending its replacement. Operations which use OBSOLETE or + // DELETED resources will be rejected and result in an error. // // Possible values: + // "ACTIVE" // "DELETED" // "DEPRECATED" // "OBSOLETE" @@ -6348,6 +6054,7 @@ type Disk struct { // // Possible values: // "CREATING" + // "DELETING" // "FAILED" // "READY" // "RESTORING" @@ -7892,6 +7599,296 @@ func (s *Expr) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ExternalVpnGateway: External VPN gateway is the on-premises VPN +// gateway(s) or another cloud provider?s VPN gateway that connects to +// your Google Cloud VPN gateway. To create a highly available VPN from +// Google Cloud to your on-premises side or another Cloud provider's VPN +// gateway, you must create a external VPN gateway resource in GCP, +// which provides the information to GCP about your external VPN +// gateway. +type ExternalVpnGateway struct { + // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text + // format. + CreationTimestamp string `json:"creationTimestamp,omitempty"` + + // Description: An optional description of this resource. Provide this + // property when you create the resource. + Description string `json:"description,omitempty"` + + // Id: [Output Only] The unique identifier for the resource. This + // identifier is defined by the server. + Id uint64 `json:"id,omitempty,string"` + + // Interfaces: List of interfaces for this external VPN gateway. + Interfaces []*ExternalVpnGatewayInterface `json:"interfaces,omitempty"` + + // Kind: [Output Only] Type of the resource. Always + // compute#externalVpnGateway for externalVpnGateways. + Kind string `json:"kind,omitempty"` + + // LabelFingerprint: A fingerprint for the labels being applied to this + // ExternalVpnGateway, which is essentially a hash of the labels set + // used for optimistic locking. The fingerprint is initially generated + // by Compute Engine and changes after every request to modify or update + // labels. You must always provide an up-to-date fingerprint hash in + // order to update or change labels, otherwise the request will fail + // with error 412 conditionNotMet. + // + // To see the latest fingerprint, make a get() request to retrieve an + // ExternalVpnGateway. + LabelFingerprint string `json:"labelFingerprint,omitempty"` + + // Labels: Labels to apply to this ExternalVpnGateway resource. These + // can be later modified by the setLabels method. Each label key/value + // must comply with RFC1035. Label values may be empty. + Labels map[string]string `json:"labels,omitempty"` + + // Name: Name of the resource. Provided by the client when the resource + // is created. The name must be 1-63 characters long, and comply with + // RFC1035. Specifically, the name must be 1-63 characters long and + // match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means + // the first character must be a lowercase letter, and all following + // characters must be a dash, lowercase letter, or digit, except the + // last character, which cannot be a dash. + Name string `json:"name,omitempty"` + + // RedundancyType: Indicates the user-supplied redundancy type of this + // external VPN gateway. + // + // Possible values: + // "FOUR_IPS_REDUNDANCY" + // "SINGLE_IP_INTERNALLY_REDUNDANT" + // "TWO_IPS_REDUNDANCY" + RedundancyType string `json:"redundancyType,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for the resource. + SelfLink string `json:"selfLink,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "CreationTimestamp") + // to unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreationTimestamp") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *ExternalVpnGateway) MarshalJSON() ([]byte, error) { + type NoMethod ExternalVpnGateway + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ExternalVpnGatewayInterface: The interface for the external VPN +// gateway. +type ExternalVpnGatewayInterface struct { + // Id: The numeric ID of this interface. The allowed input values for + // this id for different redundancy types of external VPN gateway: + // SINGLE_IP_INTERNALLY_REDUNDANT - 0 TWO_IPS_REDUNDANCY - 0, 1 + // FOUR_IPS_REDUNDANCY - 0, 1, 2, 3 + Id int64 `json:"id,omitempty"` + + // IpAddress: IP address of the interface in the external VPN gateway. + // Only IPv4 is supported. This IP address can be either from your + // on-premise gateway or another Cloud provider?s VPN gateway, it cannot + // be an IP address from Google Compute Engine. + IpAddress string `json:"ipAddress,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Id") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Id") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ExternalVpnGatewayInterface) MarshalJSON() ([]byte, error) { + type NoMethod ExternalVpnGatewayInterface + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ExternalVpnGatewayList: Response to the list request, and contains a +// list of externalVpnGateways. +type ExternalVpnGatewayList struct { + Etag string `json:"etag,omitempty"` + + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. + Id string `json:"id,omitempty"` + + // Items: A list of ExternalVpnGateway resources. + Items []*ExternalVpnGateway `json:"items,omitempty"` + + // Kind: [Output Only] Type of resource. Always + // compute#externalVpnGatewayList for lists of externalVpnGateways. + Kind string `json:"kind,omitempty"` + + // NextPageToken: [Output Only] This token allows you to get the next + // page of results for list requests. If the number of results is larger + // than maxResults, use the nextPageToken as a value for the query + // parameter pageToken in the next list request. Subsequent list + // requests will have their own nextPageToken to continue paging through + // the results. + NextPageToken string `json:"nextPageToken,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for this resource. + SelfLink string `json:"selfLink,omitempty"` + + // Warning: [Output Only] Informational warning message. + Warning *ExternalVpnGatewayListWarning `json:"warning,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Etag") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Etag") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ExternalVpnGatewayList) MarshalJSON() ([]byte, error) { + type NoMethod ExternalVpnGatewayList + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ExternalVpnGatewayListWarning: [Output Only] Informational warning +// message. +type ExternalVpnGatewayListWarning struct { + // Code: [Output Only] A warning code, if applicable. For example, + // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in + // the response. + // + // Possible values: + // "CLEANUP_FAILED" + // "DEPRECATED_RESOURCE_USED" + // "DEPRECATED_TYPE_USED" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "EXPERIMENTAL_TYPE_USED" + // "EXTERNAL_API_WARNING" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "MISSING_TYPE_DEPENDENCY" + // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" + // "NEXT_HOP_CANNOT_IP_FORWARD" + // "NEXT_HOP_INSTANCE_NOT_FOUND" + // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" + // "NEXT_HOP_NOT_RUNNING" + // "NOT_CRITICAL_ERROR" + // "NO_RESULTS_ON_PAGE" + // "REQUIRED_TOS_AGREEMENT" + // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" + // "RESOURCE_NOT_DELETED" + // "SCHEMA_VALIDATION_IGNORED" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "UNDECLARED_PROPERTIES" + // "UNREACHABLE" + Code string `json:"code,omitempty"` + + // Data: [Output Only] Metadata about this warning in key: value format. + // For example: + // "data": [ { "key": "scope", "value": "zones/us-east1-d" } + Data []*ExternalVpnGatewayListWarningData `json:"data,omitempty"` + + // Message: [Output Only] A human-readable description of the warning + // code. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ExternalVpnGatewayListWarning) MarshalJSON() ([]byte, error) { + type NoMethod ExternalVpnGatewayListWarning + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type ExternalVpnGatewayListWarningData struct { + // Key: [Output Only] A key that provides more detail on the warning + // being returned. For example, for warnings where there are no results + // in a list request for a particular zone, this key might be scope and + // the key value might be the zone name. Other examples might be a key + // indicating a deprecated resource and a suggested replacement, or a + // warning about invalid network settings (for example, if an instance + // attempts to perform IP forwarding but is not enabled for IP + // forwarding). + Key string `json:"key,omitempty"` + + // Value: [Output Only] A warning data value corresponding to the key. + Value string `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Key") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Key") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ExternalVpnGatewayListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod ExternalVpnGatewayListWarningData + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Firewall: Represents a Firewall resource. type Firewall struct { // Allowed: The list of ALLOW rules specified by this firewall. Each @@ -8332,7 +8329,7 @@ type FixedOrPercent struct { // based on the specific mode. // // - // - If the value is fixed, then the caculated value is equal to the + // - If the value is fixed, then the calculated value is equal to the // fixed value. // - If the value is a percent, then the calculated value is percent/100 // * targetSize. For example, the calculated value of a 80% of a managed @@ -8444,6 +8441,13 @@ type ForwardingRule struct { // forwarded to the backends configured with this forwarding rule. AllPorts bool `json:"allPorts,omitempty"` + // AllowGlobalAccess: This field is used along with the backend_service + // field for internal load balancing or with the target field for + // internal TargetInstance. If the field is set to TRUE, clients can + // access ILB from all regions. Otherwise only allows access from + // clients in the same region as the internal load balancer. + AllowGlobalAccess bool `json:"allowGlobalAccess,omitempty"` + // BackendService: This field is only used for INTERNAL load // balancing. // @@ -8459,6 +8463,16 @@ type ForwardingRule struct { // property when you create the resource. Description string `json:"description,omitempty"` + // Fingerprint: Fingerprint of this resource. A hash of the contents + // stored in this object. This field is used in optimistic locking. This + // field will be ignored when inserting a ForwardingRule. Include the + // fingerprint in patch request to ensure that you do not overwrite + // changes that were applied from another concurrent request. + // + // To see the latest fingerprint, make a get() request to retrieve a + // ForwardingRule. + Fingerprint string `json:"fingerprint,omitempty"` + // Id: [Output Only] The unique identifier for the resource. This // identifier is defined by the server. Id uint64 `json:"id,omitempty,string"` @@ -8506,6 +8520,7 @@ type ForwardingRule struct { // Possible values: // "EXTERNAL" // "INTERNAL" + // "INTERNAL_SELF_MANAGED" // "INVALID" LoadBalancingScheme string `json:"loadBalancingScheme,omitempty"` @@ -8618,8 +8633,8 @@ type ForwardingRule struct { // same region as the forwarding rule. For global forwarding rules, this // target must be a global load balancing resource. The forwarded // traffic must be of a type appropriate to the target object. For - // INTERNAL_SELF_MANAGED" load balancing, only HTTP and HTTPS targets - // are valid. + // INTERNAL_SELF_MANAGED load balancing, only HTTP and HTTPS targets are + // valid. Target string `json:"target,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -9650,10 +9665,10 @@ type HealthCheck struct { // greater value than checkIntervalSec. TimeoutSec int64 `json:"timeoutSec,omitempty"` - // Type: Specifies the type of the healthCheck, either TCP, SSL, HTTP or - // HTTPS. If not specified, the default is TCP. Exactly one of the - // protocol-specific health check field must be specified, which must - // match type field. + // Type: Specifies the type of the healthCheck, either TCP, SSL, HTTP, + // HTTPS or HTTP2. If not specified, the default is TCP. Exactly one of + // the protocol-specific health check field must be specified, which + // must match type field. // // Possible values: // "HTTP" @@ -10667,6 +10682,7 @@ type Image struct { // Possible values are FAILED, PENDING, or READY. // // Possible values: + // "DELETING" // "FAILED" // "PENDING" // "READY" @@ -10712,7 +10728,7 @@ type ImageRawDisk struct { ContainerType string `json:"containerType,omitempty"` // Sha1Checksum: An optional SHA1 checksum of the disk image before - // unpackaging; provided by the client when the disk image is created. + // unpackaging provided by the client when the disk image is created. Sha1Checksum string `json:"sha1Checksum,omitempty"` // Source: The full Google Cloud Storage URL where the disk image is @@ -10900,10 +10916,6 @@ func (s *ImageListWarningData) MarshalJSON() ([]byte, error) { // Instance: An Instance resource. (== resource_for beta.instances ==) // (== resource_for v1.instances ==) type Instance struct { - // AllocationAffinity: The configuration of desired allocations which - // this Instance could consume capacity from. - AllocationAffinity *AllocationAffinity `json:"allocationAffinity,omitempty"` - // CanIpForward: Allows this instance to send and receive packets with // non-matching destination or source IPs. This is required if you plan // to use this instance to forward routes. For more information, see @@ -11010,6 +11022,10 @@ type Instance struct { // Multiple interfaces are supported per instance. NetworkInterfaces []*NetworkInterface `json:"networkInterfaces,omitempty"` + // ReservationAffinity: The configuration of desired allocations which + // this Instance could consume capacity from. + ReservationAffinity *ReservationAffinity `json:"reservationAffinity,omitempty"` + // Scheduling: Sets the scheduling options for this instance. Scheduling *Scheduling `json:"scheduling,omitempty"` @@ -11025,6 +11041,10 @@ type Instance struct { // instance. See Service Accounts for more information. ServiceAccounts []*ServiceAccount `json:"serviceAccounts,omitempty"` + ShieldedInstanceConfig *ShieldedInstanceConfig `json:"shieldedInstanceConfig,omitempty"` + + ShieldedInstanceIntegrityPolicy *ShieldedInstanceIntegrityPolicy `json:"shieldedInstanceIntegrityPolicy,omitempty"` + ShieldedVmConfig *ShieldedVmConfig `json:"shieldedVmConfig,omitempty"` ShieldedVmIntegrityPolicy *ShieldedVmIntegrityPolicy `json:"shieldedVmIntegrityPolicy,omitempty"` @@ -11039,6 +11059,7 @@ type Instance struct { // // Possible values: // "PROVISIONING" + // "REPAIRING" // "RUNNING" // "STAGING" // "STOPPED" @@ -11068,21 +11089,20 @@ type Instance struct { // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "AllocationAffinity") - // to unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "CanIpForward") to + // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AllocationAffinity") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "CanIpForward") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } @@ -11728,9 +11748,12 @@ type InstanceGroupManager struct { // complementary to this Instance Group Manager. NamedPorts []*NamedPort `json:"namedPorts,omitempty"` - // PendingActions: [Output Only] The list of instance actions and the - // number of instances in this managed instance group that are pending - // for each of those actions. + // PendingActions: [Deprecated] This field is deprecated and will be + // removed. Prefer using the status field instead. Please contact + // cloud-updater-feedback@google.com to leave feedback if your workload + // relies on this field. [Output Only] The list of instance actions and + // the number of instances in this managed instance group that are + // pending for each of those actions. PendingActions *InstanceGroupManagerPendingActionsSummary `json:"pendingActions,omitempty"` // Region: [Output Only] The URL of the region where the managed @@ -11767,12 +11790,12 @@ type InstanceGroupManager struct { // Versions: Specifies the instance templates used by this managed // instance group to create instances. // - // Each version is defined by an instanceTemplate. Every template can - // appear at most once per instance group. This field overrides the - // top-level instanceTemplate field. Read more about the relationships - // between these fields. Exactly one version must leave the targetSize - // field unset. That version will be applied to all remaining instances. - // For more information, read about canary updates. + // Each version is defined by an instanceTemplate and a name. Every + // version can appear at most once per instance group. This field + // overrides the top-level instanceTemplate field. Read more about the + // relationships between these fields. Exactly one version must leave + // the targetSize field unset. That version will be applied to all + // remaining instances. For more information, read about canary updates. Versions []*InstanceGroupManagerVersion `json:"versions,omitempty"` // Zone: [Output Only] The URL of the zone where the managed instance @@ -12238,20 +12261,32 @@ func (s *InstanceGroupManagerListWarningData) MarshalJSON() ([]byte, error) { } type InstanceGroupManagerPendingActionsSummary struct { - // Creating: [Output Only] The number of instances in the managed - // instance group that are pending to be created. + // Creating: [Deprecated] This field is deprecated and will be removed. + // Prefer using the status field instead. Please contact + // cloud-updater-feedback@google.com to leave feedback if your workload + // relies on this field. [Output Only] The number of instances in the + // managed instance group that are pending to be created. Creating int64 `json:"creating,omitempty"` - // Deleting: [Output Only] The number of instances in the managed - // instance group that are pending to be deleted. + // Deleting: [Deprecated] This field is deprecated and will be removed. + // Prefer using the status field instead. Please contact + // cloud-updater-feedback@google.com to leave feedback if your workload + // relies on this field. [Output Only] The number of instances in the + // managed instance group that are pending to be deleted. Deleting int64 `json:"deleting,omitempty"` - // Recreating: [Output Only] The number of instances in the managed - // instance group that are pending to be recreated. + // Recreating: [Deprecated] This field is deprecated and will be + // removed. Prefer using the status field instead. Please contact + // cloud-updater-feedback@google.com to leave feedback if your workload + // relies on this field. [Output Only] The number of instances in the + // managed instance group that are pending to be recreated. Recreating int64 `json:"recreating,omitempty"` - // Restarting: [Output Only] The number of instances in the managed - // instance group that are pending to be restarted. + // Restarting: [Deprecated] This field is deprecated and will be + // removed. Prefer using the status field instead. Please contact + // cloud-updater-feedback@google.com to leave feedback if your workload + // relies on this field. [Output Only] The number of instances in the + // managed instance group that are pending to be restarted. Restarting int64 `json:"restarting,omitempty"` // ForceSendFields is a list of field names (e.g. "Creating") to @@ -12286,6 +12321,11 @@ type InstanceGroupManagerStatus struct { // group; and the managed instance group itself is not being modified. IsStable bool `json:"isStable,omitempty"` + // VersionTarget: [Output Only] A status of consistency of Instances' + // versions with their target version specified by version field on + // Instance Group Manager. + VersionTarget *InstanceGroupManagerStatusVersionTarget `json:"versionTarget,omitempty"` + // ForceSendFields is a list of field names (e.g. "IsStable") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, @@ -12309,7 +12349,42 @@ func (s *InstanceGroupManagerStatus) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type InstanceGroupManagerStatusVersionTarget struct { + // IsReached: [Output Only] A bit indicating whether version target has + // been reached in this managed instance group, i.e. all instances are + // in their target version. Instances' target version are specified by + // version field on Instance Group Manager. + IsReached bool `json:"isReached,omitempty"` + + // ForceSendFields is a list of field names (e.g. "IsReached") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "IsReached") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *InstanceGroupManagerStatusVersionTarget) MarshalJSON() ([]byte, error) { + type NoMethod InstanceGroupManagerStatusVersionTarget + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type InstanceGroupManagerUpdatePolicy struct { + // Possible values: + // "NONE" + // "PROACTIVE" + InstanceRedistributionType string `json:"instanceRedistributionType,omitempty"` + // MaxSurge: The maximum number of instances that can be created above // the specified targetSize during the update process. By default, a // fixed value of 1 is used. This value can be either a fixed number or @@ -12363,20 +12438,22 @@ type InstanceGroupManagerUpdatePolicy struct { // "PROACTIVE" Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "MaxSurge") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. + // "InstanceRedistributionType") to unconditionally include in API + // requests. By default, fields with empty values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "MaxSurge") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. + // "InstanceRedistributionType") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted + // from API requests. However, any field with an empty value appearing + // in NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. NullFields []string `json:"-"` } @@ -12387,6 +12464,10 @@ func (s *InstanceGroupManagerUpdatePolicy) MarshalJSON() ([]byte, error) { } type InstanceGroupManagerVersion struct { + // InstanceTemplate: The URL of the instance template that is specified + // for this managed instance group. The group uses this template to + // create new instances in the managed instance group until the + // `targetSize` for this version is reached. InstanceTemplate string `json:"instanceTemplate,omitempty"` // Name: Name of the version. Unique among all versions in the scope of @@ -12458,6 +12539,54 @@ func (s *InstanceGroupManagersAbandonInstancesRequest) MarshalJSON() ([]byte, er return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// InstanceGroupManagersApplyUpdatesRequest: +// InstanceGroupManagers.applyUpdatesToInstances +type InstanceGroupManagersApplyUpdatesRequest struct { + // Instances: The list of URLs of one or more instances for which we + // want to apply updates on this managed instance group. This can be a + // full URL or a partial URL, such as + // zones/[ZONE]/instances/[INSTANCE_NAME]. + Instances []string `json:"instances,omitempty"` + + // MinimalAction: The minimal action that should be perfomed on the + // instances. By default NONE. + // + // Possible values: + // "REPLACE" + // "RESTART" + MinimalAction string `json:"minimalAction,omitempty"` + + // MostDisruptiveAllowedAction: The most disruptive action that allowed + // to be performed on the instances. By default REPLACE. + // + // Possible values: + // "REPLACE" + // "RESTART" + MostDisruptiveAllowedAction string `json:"mostDisruptiveAllowedAction,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Instances") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Instances") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *InstanceGroupManagersApplyUpdatesRequest) MarshalJSON() ([]byte, error) { + type NoMethod InstanceGroupManagersApplyUpdatesRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type InstanceGroupManagersDeleteInstancesRequest struct { // Instances: The URLs of one or more instances to delete. This can be a // full URL or a partial URL, such as @@ -13616,10 +13745,6 @@ func (s *InstanceMoveRequest) MarshalJSON() ([]byte, error) { } type InstanceProperties struct { - // AllocationAffinity: The configuration of desired allocations which - // this Instance could consume capacity from. - AllocationAffinity *AllocationAffinity `json:"allocationAffinity,omitempty"` - // CanIpForward: Enables instances created based on this template to // send packets with source IP addresses other than their own and // receive packets with destination IP addresses other than their own. @@ -13637,6 +13762,10 @@ type InstanceProperties struct { // are created from this template. Disks []*AttachedDisk `json:"disks,omitempty"` + // DisplayDevice: Display Device properties to enable support for remote + // display products like: Teradici, VNC and TeamViewer + DisplayDevice *DisplayDevice `json:"displayDevice,omitempty"` + // GuestAccelerators: A list of guest accelerator cards' type and count // to use for instances created from the instance template. GuestAccelerators []*AcceleratorConfig `json:"guestAccelerators,omitempty"` @@ -13667,6 +13796,10 @@ type InstanceProperties struct { // interface. NetworkInterfaces []*NetworkInterface `json:"networkInterfaces,omitempty"` + // ReservationAffinity: The configuration of desired reservations which + // this Instance could consume capacity from. + ReservationAffinity *ReservationAffinity `json:"reservationAffinity,omitempty"` + // Scheduling: Specifies the scheduling options for the instances that // are created from this template. Scheduling *Scheduling `json:"scheduling,omitempty"` @@ -13677,6 +13810,8 @@ type InstanceProperties struct { // to obtain the access tokens for these instances. ServiceAccounts []*ServiceAccount `json:"serviceAccounts,omitempty"` + ShieldedInstanceConfig *ShieldedInstanceConfig `json:"shieldedInstanceConfig,omitempty"` + // ShieldedVmConfig: Specifies the Shielded VM options for the instances // that are created from this template. ShieldedVmConfig *ShieldedVmConfig `json:"shieldedVmConfig,omitempty"` @@ -13687,21 +13822,20 @@ type InstanceProperties struct { // within the list must comply with RFC1035. Tags *Tags `json:"tags,omitempty"` - // ForceSendFields is a list of field names (e.g. "AllocationAffinity") - // to unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "CanIpForward") to + // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AllocationAffinity") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "CanIpForward") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } @@ -13981,6 +14115,7 @@ type InstanceWithNamedPorts struct { // // Possible values: // "PROVISIONING" + // "REPAIRING" // "RUNNING" // "STAGING" // "STOPPED" @@ -14409,7 +14544,7 @@ type Interconnect struct { // side of the Interconnect link. This can be used only for ping tests. GoogleIpAddress string `json:"googleIpAddress,omitempty"` - // GoogleReferenceId: [Output Only] Google reference ID; to be used when + // GoogleReferenceId: [Output Only] Google reference ID to be used when // raising support tickets with Google or otherwise to debug backend // connectivity issues. GoogleReferenceId string `json:"googleReferenceId,omitempty"` @@ -14453,10 +14588,10 @@ type Interconnect struct { Labels map[string]string `json:"labels,omitempty"` // LinkType: Type of link requested. This field indicates speed of each - // of the links in the bundle, not the entire bundle. Only 10G per link - // is allowed for a dedicated interconnect. Options: Ethernet_10G_LR + // of the links in the bundle, not the entire bundle. // // Possible values: + // "LINK_TYPE_ETHERNET_100G_LR" // "LINK_TYPE_ETHERNET_10G_LR" LinkType string `json:"linkType,omitempty"` @@ -15423,6 +15558,17 @@ func (s *InterconnectDiagnosticsLinkLACPStatus) MarshalJSON() ([]byte, error) { } type InterconnectDiagnosticsLinkOpticalPower struct { + // State: The status of the current value when compared to the warning + // and alarm levels for the receiving or transmitting transceiver. + // Possible states include: + // - OK: The value has not crossed a warning threshold. + // - LOW_WARNING: The value has crossed below the low warning threshold. + // + // - HIGH_WARNING: The value has crossed above the high warning + // threshold. + // - LOW_ALARM: The value has crossed below the low alarm threshold. + // - HIGH_ALARM: The value has crossed above the high alarm threshold. + // // Possible values: // "HIGH_ALARM" // "HIGH_WARNING" @@ -15431,10 +15577,11 @@ type InterconnectDiagnosticsLinkOpticalPower struct { // "OK" State string `json:"state,omitempty"` - // Value: Value of the current optical power, read in dBm. Take a known - // good optical value, give it a 10% margin and trigger warnings - // relative to that value. In general, a -7dBm warning and a -11dBm - // alarm are good optical value estimates for most links. + // Value: Value of the current receiving or transmitting optical power, + // read in dBm. Take a known good optical value, give it a 10% margin + // and trigger warnings relative to that value. In general, a -7dBm + // warning and a -11dBm alarm are good optical value estimates for most + // links. Value float64 `json:"value,omitempty"` // ForceSendFields is a list of field names (e.g. "State") to @@ -15490,8 +15637,14 @@ type InterconnectDiagnosticsLinkStatus struct { LacpStatus *InterconnectDiagnosticsLinkLACPStatus `json:"lacpStatus,omitempty"` + // ReceivingOpticalPower: An InterconnectDiagnostics.LinkOpticalPower + // object, describing the current value and status of the received light + // level. ReceivingOpticalPower *InterconnectDiagnosticsLinkOpticalPower `json:"receivingOpticalPower,omitempty"` + // TransmittingOpticalPower: An InterconnectDiagnostics.LinkOpticalPower + // object, describing the current value and status of the transmitted + // light level. TransmittingOpticalPower *InterconnectDiagnosticsLinkOpticalPower `json:"transmittingOpticalPower,omitempty"` // ForceSendFields is a list of field names (e.g. "ArpCaches") to @@ -17190,6 +17343,7 @@ type ManagedInstance struct { // // Possible values: // "PROVISIONING" + // "REPAIRING" // "RUNNING" // "STAGING" // "STOPPED" @@ -17472,9 +17626,10 @@ func (s *NamedPort) MarshalJSON() ([]byte, error) { // (VPC) Network Overview for more information. (== resource_for // v1.networks ==) (== resource_for beta.networks ==) type Network struct { - // IPv4Range: The range of internal addresses that are legal on this - // network. This range is a CIDR specification, for example: - // 192.168.0.0/16. Provided by the client when the network is created. + // IPv4Range: Deprecated in favor of subnet mode networks. The range of + // internal addresses that are legal on this network. This range is a + // CIDR specification, for example: 192.168.0.0/16. Provided by the + // client when the network is created. IPv4Range string `json:"IPv4Range,omitempty"` // AutoCreateSubnetworks: When set to true, the VPC network is created @@ -18704,11 +18859,12 @@ func (s *NetworkListWarningData) MarshalJSON() ([]byte, error) { // flag indicating whether Google Compute Engine should automatically // create routes for the peering. type NetworkPeering struct { - // AutoCreateRoutes: Indicates whether full mesh connectivity is created - // and managed automatically. When it is set to true, Google Compute - // Engine will automatically create and manage the routes between two - // networks when the state is ACTIVE. Otherwise, user needs to create - // routes manually to route packets to peer network. + // AutoCreateRoutes: This field will be deprecated soon. Prefer using + // exchange_subnet_routes instead. Indicates whether full mesh + // connectivity is created and managed automatically. When it is set to + // true, Google Compute Engine will automatically create and manage the + // routes between two networks when the state is ACTIVE. Otherwise, user + // needs to create routes manually to route packets to peer network. AutoCreateRoutes bool `json:"autoCreateRoutes,omitempty"` // ExchangeSubnetRoutes: Whether full mesh connectivity is created and @@ -18816,8 +18972,9 @@ func (s *NetworkRoutingConfig) MarshalJSON() ([]byte, error) { } type NetworksAddPeeringRequest struct { - // AutoCreateRoutes: Whether Google Compute Engine manages the routes - // automatically. + // AutoCreateRoutes: This field will be deprecated soon. Prefer using + // exchange_subnet_routes in network_peering instead. Whether Google + // Compute Engine manages the routes automatically. AutoCreateRoutes bool `json:"autoCreateRoutes,omitempty"` // Name: Name of the peering, which should conform to RFC1035. @@ -18914,7 +19071,10 @@ func (s *NetworksUpdatePeeringRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// NodeGroup: A NodeGroup resource. +// NodeGroup: A NodeGroup resource. To create a node group, you must +// first create a node templates. To learn more about node groups and +// sole-tenant nodes, read the Sole-tenant nodes documentation. (== +// resource_for beta.nodeGroups ==) (== resource_for v1.nodeGroups ==) type NodeGroup struct { // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text // format. @@ -19311,6 +19471,9 @@ type NodeGroupNode struct { // NodeType: The type of this node. NodeType string `json:"nodeType,omitempty"` + // ServerBinding: Binding properties for the physical server. + ServerBinding *ServerBinding `json:"serverBinding,omitempty"` + // Possible values: // "CREATING" // "DELETING" @@ -19715,7 +19878,10 @@ func (s *NodeGroupsSetNodeTemplateRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// NodeTemplate: A Node Template resource. +// NodeTemplate: A Node Template resource. To learn more about node +// templates and sole-tenant nodes, read the Sole-tenant nodes +// documentation. (== resource_for beta.nodeTemplates ==) (== +// resource_for v1.nodeTemplates ==) type NodeTemplate struct { // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text // format. @@ -19766,6 +19932,9 @@ type NodeTemplate struct { // SelfLink: [Output Only] Server-defined URL for the resource. SelfLink string `json:"selfLink,omitempty"` + // ServerBinding: Binding properties for the physical server. + ServerBinding *ServerBinding `json:"serverBinding,omitempty"` + // Status: [Output Only] The status of the node template. One of the // following values: CREATING, READY, and DELETING. // @@ -21558,12 +21727,15 @@ type PathMatcher struct { // https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService // - compute/v1/projects/project/global/backendServices/backendService // - // - global/backendServices/backendService - // Use defaultService instead of defaultRouteAction when simple routing - // to a backend service is desired and other advanced capabilities like - // traffic splitting and URL rewrites are not required. - // Only one of defaultService, defaultRouteAction or defaultUrlRedirect - // must be set. + // - global/backendServices/backendService If defaultRouteAction is + // additionally specified, advanced routing actions like URL Rewrites, + // etc. take effect prior to sending the request to the backend. + // However, if defaultService is specified, defaultRouteAction cannot + // contain any weightedBackendServices. Conversely, if + // defaultRouteAction specifies any weightedBackendServices, + // defaultService must not be specified. + // Only one of defaultService, defaultUrlRedirect or + // defaultRouteAction.weightedBackendService must be set. // Authorization requires one or more of the following Google IAM // permissions on the specified resource default_service: // - compute.backendBuckets.use @@ -21620,12 +21792,15 @@ type PathRule struct { // or #, and those chars are not allowed here. Paths []string `json:"paths,omitempty"` - // Service: The URL of the backend service resource if this rule is - // matched. - // Use service instead of routeAction when simple routing to a backend - // service is desired and other advanced capabilities like traffic - // splitting and rewrites are not required. - // Only one of service, routeAction or urlRedirect should must be set. + // Service: The full or partial URL of the backend service resource to + // which traffic is directed if this rule is matched. If routeAction is + // additionally specified, advanced routing actions like URL Rewrites, + // etc. take effect prior to sending the request to the backend. + // However, if service is specified, routeAction cannot contain any + // weightedBackendService s. Conversely, if routeAction specifies any + // weightedBackendServices, service must not be specified. + // Only one of urlRedirect, service or + // routeAction.weightedBackendService must be set. Service string `json:"service,omitempty"` // ForceSendFields is a list of field names (e.g. "Paths") to @@ -22043,6 +22218,7 @@ type Quota struct { // "CPUS" // "CPUS_ALL_REGIONS" // "DISKS_TOTAL_GB" + // "EXTERNAL_VPN_GATEWAYS" // "FIREWALLS" // "FORWARDING_RULES" // "GLOBAL_INTERNAL_ADDRESSES" @@ -22059,6 +22235,7 @@ type Quota struct { // "INTERNAL_ADDRESSES" // "IN_USE_ADDRESSES" // "IN_USE_BACKUP_SCHEDULES" + // "IN_USE_SNAPSHOT_SCHEDULES" // "LOCAL_SSD_TOTAL_GB" // "NETWORKS" // "NETWORK_ENDPOINT_GROUPS" @@ -22104,6 +22281,10 @@ type Quota struct { // "VPN_TUNNELS" Metric string `json:"metric,omitempty"` + // Owner: [Output Only] Owning resource. This is the resource on which + // this quota is applied. + Owner string `json:"owner,omitempty"` + // Usage: [Output Only] Current usage of this metric. Usage float64 `json:"usage,omitempty"` @@ -22411,6 +22592,34 @@ func (s *RegionAutoscalerListWarningData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type RegionCommitmentsUpdateReservationsRequest struct { + // Reservations: List of reservations for the capacity move of VMs with + // accelerators and local ssds. + Reservations []*Reservation `json:"reservations,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Reservations") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Reservations") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *RegionCommitmentsUpdateReservationsRequest) MarshalJSON() ([]byte, error) { + type NoMethod RegionCommitmentsUpdateReservationsRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type RegionDiskTypeList struct { // Id: [Output Only] Unique identifier for the resource; defined by the // server. @@ -22992,6 +23201,52 @@ func (s *RegionInstanceGroupManagersAbandonInstancesRequest) MarshalJSON() ([]by return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// RegionInstanceGroupManagersApplyUpdatesRequest: +// InstanceGroupManagers.applyUpdatesToInstances +type RegionInstanceGroupManagersApplyUpdatesRequest struct { + // Instances: The list of instances for which we want to apply changes + // on this managed instance group. + Instances []string `json:"instances,omitempty"` + + // MinimalAction: The minimal action that should be perfomed on the + // instances. By default NONE. + // + // Possible values: + // "REPLACE" + // "RESTART" + MinimalAction string `json:"minimalAction,omitempty"` + + // MostDisruptiveAllowedAction: The most disruptive action that allowed + // to be performed on the instances. By default REPLACE. + // + // Possible values: + // "REPLACE" + // "RESTART" + MostDisruptiveAllowedAction string `json:"mostDisruptiveAllowedAction,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Instances") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Instances") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *RegionInstanceGroupManagersApplyUpdatesRequest) MarshalJSON() ([]byte, error) { + type NoMethod RegionInstanceGroupManagersApplyUpdatesRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type RegionInstanceGroupManagersDeleteInstancesRequest struct { // Instances: The URLs of one or more instances to delete. This can be a // full URL or a partial URL, such as @@ -23636,9 +23891,602 @@ func (s *RegionSetPolicyRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// Reservation: Reservation resource +type Reservation struct { + // Commitment: [OutputOnly] Full or partial url for parent commitment + // for reservations which are tied to a commitment. + Commitment string `json:"commitment,omitempty"` + + // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text + // format. + CreationTimestamp string `json:"creationTimestamp,omitempty"` + + // Description: An optional description of this resource. Provide this + // property when you create the resource. + Description string `json:"description,omitempty"` + + // Id: [Output Only] The unique identifier for the resource. This + // identifier is defined by the server. + Id uint64 `json:"id,omitempty,string"` + + // Kind: [Output Only] Type of the resource. Always compute#reservations + // for reservations. + Kind string `json:"kind,omitempty"` + + // Name: The name of the resource, provided by the client when initially + // creating the resource. The resource name must be 1-63 characters + // long, and comply with RFC1035. Specifically, the name must be 1-63 + // characters long and match the regular expression + // `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be + // a lowercase letter, and all following characters must be a dash, + // lowercase letter, or digit, except the last character, which cannot + // be a dash. + Name string `json:"name,omitempty"` + + // SelfLink: [Output Only] Server-defined fully-qualified URL for this + // resource. + SelfLink string `json:"selfLink,omitempty"` + + // SpecificReservation: Reservation for instances with specific machine + // shapes. + SpecificReservation *AllocationSpecificSKUReservation `json:"specificReservation,omitempty"` + + // SpecificReservationRequired: Indicates whether the reservation can be + // consumed by VMs with "any reservation" defined. If the field is set, + // then only VMs that target the reservation by name using + // --reservation-affinity can consume this reservation. + SpecificReservationRequired bool `json:"specificReservationRequired,omitempty"` + + // Zone: Zone in which the reservation resides, must be provided if + // reservation is created with commitment creation. + Zone string `json:"zone,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Commitment") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Commitment") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Reservation) MarshalJSON() ([]byte, error) { + type NoMethod Reservation + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ReservationAffinity: AllocationAffinity is the configuration of +// desired allocation which this instance could take capacity from. +type ReservationAffinity struct { + // Possible values: + // "ANY_RESERVATION" + // "NO_RESERVATION" + // "SPECIFIC_RESERVATION" + // "UNSPECIFIED" + ConsumeReservationType string `json:"consumeReservationType,omitempty"` + + // Key: Corresponds to the label key of reservation resource. + Key string `json:"key,omitempty"` + + // Values: Corresponds to the label values of reservation resource. + Values []string `json:"values,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "ConsumeReservationType") to unconditionally include in API requests. + // By default, fields with empty values are omitted from API requests. + // However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ConsumeReservationType") + // to include in API requests with the JSON null value. By default, + // fields with empty values are omitted from API requests. However, any + // field with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *ReservationAffinity) MarshalJSON() ([]byte, error) { + type NoMethod ReservationAffinity + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ReservationAggregatedList: Contains a list of reservations. +type ReservationAggregatedList struct { + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. + Id string `json:"id,omitempty"` + + // Items: A list of Allocation resources. + Items map[string]ReservationsScopedList `json:"items,omitempty"` + + // Kind: Type of resource. + Kind string `json:"kind,omitempty"` + + // NextPageToken: [Output Only] This token allows you to get the next + // page of results for list requests. If the number of results is larger + // than maxResults, use the nextPageToken as a value for the query + // parameter pageToken in the next list request. Subsequent list + // requests will have their own nextPageToken to continue paging through + // the results. + NextPageToken string `json:"nextPageToken,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for this resource. + SelfLink string `json:"selfLink,omitempty"` + + // Warning: [Output Only] Informational warning message. + Warning *ReservationAggregatedListWarning `json:"warning,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Id") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Id") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ReservationAggregatedList) MarshalJSON() ([]byte, error) { + type NoMethod ReservationAggregatedList + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ReservationAggregatedListWarning: [Output Only] Informational warning +// message. +type ReservationAggregatedListWarning struct { + // Code: [Output Only] A warning code, if applicable. For example, + // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in + // the response. + // + // Possible values: + // "CLEANUP_FAILED" + // "DEPRECATED_RESOURCE_USED" + // "DEPRECATED_TYPE_USED" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "EXPERIMENTAL_TYPE_USED" + // "EXTERNAL_API_WARNING" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "MISSING_TYPE_DEPENDENCY" + // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" + // "NEXT_HOP_CANNOT_IP_FORWARD" + // "NEXT_HOP_INSTANCE_NOT_FOUND" + // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" + // "NEXT_HOP_NOT_RUNNING" + // "NOT_CRITICAL_ERROR" + // "NO_RESULTS_ON_PAGE" + // "REQUIRED_TOS_AGREEMENT" + // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" + // "RESOURCE_NOT_DELETED" + // "SCHEMA_VALIDATION_IGNORED" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "UNDECLARED_PROPERTIES" + // "UNREACHABLE" + Code string `json:"code,omitempty"` + + // Data: [Output Only] Metadata about this warning in key: value format. + // For example: + // "data": [ { "key": "scope", "value": "zones/us-east1-d" } + Data []*ReservationAggregatedListWarningData `json:"data,omitempty"` + + // Message: [Output Only] A human-readable description of the warning + // code. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ReservationAggregatedListWarning) MarshalJSON() ([]byte, error) { + type NoMethod ReservationAggregatedListWarning + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type ReservationAggregatedListWarningData struct { + // Key: [Output Only] A key that provides more detail on the warning + // being returned. For example, for warnings where there are no results + // in a list request for a particular zone, this key might be scope and + // the key value might be the zone name. Other examples might be a key + // indicating a deprecated resource and a suggested replacement, or a + // warning about invalid network settings (for example, if an instance + // attempts to perform IP forwarding but is not enabled for IP + // forwarding). + Key string `json:"key,omitempty"` + + // Value: [Output Only] A warning data value corresponding to the key. + Value string `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Key") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Key") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ReservationAggregatedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod ReservationAggregatedListWarningData + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type ReservationList struct { + // Id: [Output Only] The unique identifier for the resource. This + // identifier is defined by the server. + Id string `json:"id,omitempty"` + + // Items: [Output Only] A list of Allocation resources. + Items []*Reservation `json:"items,omitempty"` + + // Kind: [Output Only] Type of resource.Always compute#reservationsList + // for listsof reservations + Kind string `json:"kind,omitempty"` + + // NextPageToken: [Output Only] This token allows you to get the next + // page of results for list requests. If the number of results is larger + // than maxResults, use the nextPageToken as a value for the query + // parameter pageToken in the next list request. Subsequent list + // requests will have their own nextPageToken to continue paging through + // the results. + NextPageToken string `json:"nextPageToken,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for this resource. + SelfLink string `json:"selfLink,omitempty"` + + // Warning: [Output Only] Informational warning message. + Warning *ReservationListWarning `json:"warning,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Id") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Id") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ReservationList) MarshalJSON() ([]byte, error) { + type NoMethod ReservationList + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ReservationListWarning: [Output Only] Informational warning message. +type ReservationListWarning struct { + // Code: [Output Only] A warning code, if applicable. For example, + // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in + // the response. + // + // Possible values: + // "CLEANUP_FAILED" + // "DEPRECATED_RESOURCE_USED" + // "DEPRECATED_TYPE_USED" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "EXPERIMENTAL_TYPE_USED" + // "EXTERNAL_API_WARNING" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "MISSING_TYPE_DEPENDENCY" + // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" + // "NEXT_HOP_CANNOT_IP_FORWARD" + // "NEXT_HOP_INSTANCE_NOT_FOUND" + // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" + // "NEXT_HOP_NOT_RUNNING" + // "NOT_CRITICAL_ERROR" + // "NO_RESULTS_ON_PAGE" + // "REQUIRED_TOS_AGREEMENT" + // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" + // "RESOURCE_NOT_DELETED" + // "SCHEMA_VALIDATION_IGNORED" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "UNDECLARED_PROPERTIES" + // "UNREACHABLE" + Code string `json:"code,omitempty"` + + // Data: [Output Only] Metadata about this warning in key: value format. + // For example: + // "data": [ { "key": "scope", "value": "zones/us-east1-d" } + Data []*ReservationListWarningData `json:"data,omitempty"` + + // Message: [Output Only] A human-readable description of the warning + // code. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ReservationListWarning) MarshalJSON() ([]byte, error) { + type NoMethod ReservationListWarning + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type ReservationListWarningData struct { + // Key: [Output Only] A key that provides more detail on the warning + // being returned. For example, for warnings where there are no results + // in a list request for a particular zone, this key might be scope and + // the key value might be the zone name. Other examples might be a key + // indicating a deprecated resource and a suggested replacement, or a + // warning about invalid network settings (for example, if an instance + // attempts to perform IP forwarding but is not enabled for IP + // forwarding). + Key string `json:"key,omitempty"` + + // Value: [Output Only] A warning data value corresponding to the key. + Value string `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Key") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Key") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ReservationListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod ReservationListWarningData + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type ReservationsResizeRequest struct { + // SpecificSkuCount: Number of allocated resources can be resized with + // minimum = 1 and maximum = 1000. + SpecificSkuCount int64 `json:"specificSkuCount,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "SpecificSkuCount") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "SpecificSkuCount") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *ReservationsResizeRequest) MarshalJSON() ([]byte, error) { + type NoMethod ReservationsResizeRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type ReservationsScopedList struct { + // Reservations: A list of reservations contained in this scope. + Reservations []*Reservation `json:"reservations,omitempty"` + + // Warning: Informational warning which replaces the list of + // reservations when the list is empty. + Warning *ReservationsScopedListWarning `json:"warning,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Reservations") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Reservations") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ReservationsScopedList) MarshalJSON() ([]byte, error) { + type NoMethod ReservationsScopedList + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ReservationsScopedListWarning: Informational warning which replaces +// the list of reservations when the list is empty. +type ReservationsScopedListWarning struct { + // Code: [Output Only] A warning code, if applicable. For example, + // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in + // the response. + // + // Possible values: + // "CLEANUP_FAILED" + // "DEPRECATED_RESOURCE_USED" + // "DEPRECATED_TYPE_USED" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "EXPERIMENTAL_TYPE_USED" + // "EXTERNAL_API_WARNING" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "MISSING_TYPE_DEPENDENCY" + // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" + // "NEXT_HOP_CANNOT_IP_FORWARD" + // "NEXT_HOP_INSTANCE_NOT_FOUND" + // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" + // "NEXT_HOP_NOT_RUNNING" + // "NOT_CRITICAL_ERROR" + // "NO_RESULTS_ON_PAGE" + // "REQUIRED_TOS_AGREEMENT" + // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" + // "RESOURCE_NOT_DELETED" + // "SCHEMA_VALIDATION_IGNORED" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "UNDECLARED_PROPERTIES" + // "UNREACHABLE" + Code string `json:"code,omitempty"` + + // Data: [Output Only] Metadata about this warning in key: value format. + // For example: + // "data": [ { "key": "scope", "value": "zones/us-east1-d" } + Data []*ReservationsScopedListWarningData `json:"data,omitempty"` + + // Message: [Output Only] A human-readable description of the warning + // code. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ReservationsScopedListWarning) MarshalJSON() ([]byte, error) { + type NoMethod ReservationsScopedListWarning + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type ReservationsScopedListWarningData struct { + // Key: [Output Only] A key that provides more detail on the warning + // being returned. For example, for warnings where there are no results + // in a list request for a particular zone, this key might be scope and + // the key value might be the zone name. Other examples might be a key + // indicating a deprecated resource and a suggested replacement, or a + // warning about invalid network settings (for example, if an instance + // attempts to perform IP forwarding but is not enabled for IP + // forwarding). + Key string `json:"key,omitempty"` + + // Value: [Output Only] A warning data value corresponding to the key. + Value string `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Key") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Key") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ReservationsScopedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod ReservationsScopedListWarningData + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ResourceCommitment: Commitment for a particular resource (a // Commitment is composed of one or more of these). type ResourceCommitment struct { + // AcceleratorType: Name of the accelerator type resource. Applicable + // only when the type is ACCELERATOR. + AcceleratorType string `json:"acceleratorType,omitempty"` + // Amount: The amount of the resource purchased (in a type-dependent // unit, such as bytes). For vCPUs, this can just be an integer. For // memory, this must be provided in MB. Memory must be a multiple of 256 @@ -23649,12 +24497,14 @@ type ResourceCommitment struct { // values are VCPU and MEMORY // // Possible values: + // "ACCELERATOR" + // "LOCAL_SSD" // "MEMORY" // "UNSPECIFIED" // "VCPU" Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "Amount") to + // ForceSendFields is a list of field names (e.g. "AcceleratorType") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the @@ -23662,12 +24512,13 @@ type ResourceCommitment struct { // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Amount") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "AcceleratorType") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } @@ -23840,10 +24691,6 @@ func (s *ResourcePoliciesScopedListWarningData) MarshalJSON() ([]byte, error) { } type ResourcePolicy struct { - // BackupSchedulePolicy: Resource policy for persistent disks for - // creating snapshots. - BackupSchedulePolicy *ResourcePolicyBackupSchedulePolicy `json:"backupSchedulePolicy,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text // format. CreationTimestamp string `json:"creationTimestamp,omitempty"` @@ -23874,20 +24721,32 @@ type ResourcePolicy struct { // resource. SelfLink string `json:"selfLink,omitempty"` + // SnapshotSchedulePolicy: Resource policy for persistent disks for + // creating snapshots. + SnapshotSchedulePolicy *ResourcePolicySnapshotSchedulePolicy `json:"snapshotSchedulePolicy,omitempty"` + + // Status: [Output Only] The status of resource policy creation. + // + // Possible values: + // "CREATING" + // "DELETING" + // "INVALID" + // "READY" + Status string `json:"status,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. - // "BackupSchedulePolicy") to unconditionally include in API requests. - // By default, fields with empty values are omitted from API requests. - // However, any non-pointer, non-interface field appearing in - // ForceSendFields will be sent to the server regardless of whether the - // field is empty or not. This may be used to include empty fields in - // Patch requests. + // ForceSendFields is a list of field names (e.g. "CreationTimestamp") + // to unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BackupSchedulePolicy") to + // NullFields is a list of field names (e.g. "CreationTimestamp") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -24060,165 +24919,19 @@ func (s *ResourcePolicyAggregatedListWarningData) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ResourcePolicyBackupSchedulePolicy: A backup schedule policy -// specifies when and how frequently snapshots are to be created for the -// target disk. Also specifies how many and how long these scheduled -// snapshots should be retained. -type ResourcePolicyBackupSchedulePolicy struct { - // RetentionPolicy: Retention policy applied to snapshots created by - // this resource policy. - RetentionPolicy *ResourcePolicyBackupSchedulePolicyRetentionPolicy `json:"retentionPolicy,omitempty"` - - // Schedule: A Vm Maintenance Policy specifies what kind of - // infrastructure maintenance we are allowed to perform on this VM and - // when. Schedule that is applied to disks covered by this policy. - Schedule *ResourcePolicyBackupSchedulePolicySchedule `json:"schedule,omitempty"` - - // SnapshotProperties: Properties with which snapshots are created such - // as labels, encryption keys. - SnapshotProperties *ResourcePolicyBackupSchedulePolicySnapshotProperties `json:"snapshotProperties,omitempty"` - - // ForceSendFields is a list of field names (e.g. "RetentionPolicy") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "RetentionPolicy") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *ResourcePolicyBackupSchedulePolicy) MarshalJSON() ([]byte, error) { - type NoMethod ResourcePolicyBackupSchedulePolicy - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ResourcePolicyBackupSchedulePolicyRetentionPolicy: Policy for -// retention of scheduled snapshots. -type ResourcePolicyBackupSchedulePolicyRetentionPolicy struct { - // MaxRetentionDays: Maximum age of the snapshot that is allowed to be - // kept. - MaxRetentionDays int64 `json:"maxRetentionDays,omitempty"` - - // OnSourceDiskDelete: Specifies the behavior to apply to scheduled - // snapshots when the source disk is deleted. - // - // Possible values: - // "APPLY_RETENTION_POLICY" - // "KEEP_AUTO_SNAPSHOTS" - // "UNSPECIFIED_ON_SOURCE_DISK_DELETE" - OnSourceDiskDelete string `json:"onSourceDiskDelete,omitempty"` - - // ForceSendFields is a list of field names (e.g. "MaxRetentionDays") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "MaxRetentionDays") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *ResourcePolicyBackupSchedulePolicyRetentionPolicy) MarshalJSON() ([]byte, error) { - type NoMethod ResourcePolicyBackupSchedulePolicyRetentionPolicy - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ResourcePolicyBackupSchedulePolicySchedule: A schedule for disks -// where the schedueled operations are performed. -type ResourcePolicyBackupSchedulePolicySchedule struct { - DailySchedule *ResourcePolicyDailyCycle `json:"dailySchedule,omitempty"` - - HourlySchedule *ResourcePolicyHourlyCycle `json:"hourlySchedule,omitempty"` - - WeeklySchedule *ResourcePolicyWeeklyCycle `json:"weeklySchedule,omitempty"` - - // ForceSendFields is a list of field names (e.g. "DailySchedule") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "DailySchedule") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ResourcePolicyBackupSchedulePolicySchedule) MarshalJSON() ([]byte, error) { - type NoMethod ResourcePolicyBackupSchedulePolicySchedule - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ResourcePolicyBackupSchedulePolicySnapshotProperties: Specified -// snapshot properties for scheduled snapshots created by this policy. -type ResourcePolicyBackupSchedulePolicySnapshotProperties struct { - // GuestFlush: Indication to perform a ?guest aware? snapshot. - GuestFlush bool `json:"guestFlush,omitempty"` - - // Labels: Labels to apply to scheduled snapshots. These can be later - // modified by the setLabels method. Label values may be empty. - Labels map[string]string `json:"labels,omitempty"` - - // ForceSendFields is a list of field names (e.g. "GuestFlush") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "GuestFlush") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ResourcePolicyBackupSchedulePolicySnapshotProperties) MarshalJSON() ([]byte, error) { - type NoMethod ResourcePolicyBackupSchedulePolicySnapshotProperties - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // ResourcePolicyDailyCycle: Time window specified for daily operations. type ResourcePolicyDailyCycle struct { - // DaysInCycle: Allows to define schedule that runs every nth day of the - // month. + // DaysInCycle: Defines a schedule that runs every nth day of the month. DaysInCycle int64 `json:"daysInCycle,omitempty"` - // Duration: [Output only] Duration of the time window, automatically - // chosen to be smallest possible in the given scenario. + // Duration: [Output only] A predetermined duration for the window, + // automatically chosen to be the smallest possible in the given + // scenario. Duration string `json:"duration,omitempty"` - // StartTime: Time within the window to start the operations. It must be - // in format "HH:MM", where HH : [00-23] and MM : [00-00] GMT. + // StartTime: Start time of the window. This must be in UTC format that + // resolves to one of 00:00, 04:00, 08:00, 12:00, 16:00, or 20:00. For + // example, both 13:00-5 and 08:00 are valid. StartTime string `json:"startTime,omitempty"` // ForceSendFields is a list of field names (e.g. "DaysInCycle") to @@ -24438,6 +25151,157 @@ func (s *ResourcePolicyListWarningData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ResourcePolicySnapshotSchedulePolicy: A snapshot schedule policy +// specifies when and how frequently snapshots are to be created for the +// target disk. Also specifies how many and how long these scheduled +// snapshots should be retained. +type ResourcePolicySnapshotSchedulePolicy struct { + // RetentionPolicy: Retention policy applied to snapshots created by + // this resource policy. + RetentionPolicy *ResourcePolicySnapshotSchedulePolicyRetentionPolicy `json:"retentionPolicy,omitempty"` + + // Schedule: A Vm Maintenance Policy specifies what kind of + // infrastructure maintenance we are allowed to perform on this VM and + // when. Schedule that is applied to disks covered by this policy. + Schedule *ResourcePolicySnapshotSchedulePolicySchedule `json:"schedule,omitempty"` + + // SnapshotProperties: Properties with which snapshots are created such + // as labels, encryption keys. + SnapshotProperties *ResourcePolicySnapshotSchedulePolicySnapshotProperties `json:"snapshotProperties,omitempty"` + + // ForceSendFields is a list of field names (e.g. "RetentionPolicy") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "RetentionPolicy") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *ResourcePolicySnapshotSchedulePolicy) MarshalJSON() ([]byte, error) { + type NoMethod ResourcePolicySnapshotSchedulePolicy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ResourcePolicySnapshotSchedulePolicyRetentionPolicy: Policy for +// retention of scheduled snapshots. +type ResourcePolicySnapshotSchedulePolicyRetentionPolicy struct { + // MaxRetentionDays: Maximum age of the snapshot that is allowed to be + // kept. + MaxRetentionDays int64 `json:"maxRetentionDays,omitempty"` + + // OnSourceDiskDelete: Specifies the behavior to apply to scheduled + // snapshots when the source disk is deleted. + // + // Possible values: + // "APPLY_RETENTION_POLICY" + // "KEEP_AUTO_SNAPSHOTS" + // "UNSPECIFIED_ON_SOURCE_DISK_DELETE" + OnSourceDiskDelete string `json:"onSourceDiskDelete,omitempty"` + + // ForceSendFields is a list of field names (e.g. "MaxRetentionDays") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "MaxRetentionDays") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *ResourcePolicySnapshotSchedulePolicyRetentionPolicy) MarshalJSON() ([]byte, error) { + type NoMethod ResourcePolicySnapshotSchedulePolicyRetentionPolicy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ResourcePolicySnapshotSchedulePolicySchedule: A schedule for disks +// where the schedueled operations are performed. +type ResourcePolicySnapshotSchedulePolicySchedule struct { + DailySchedule *ResourcePolicyDailyCycle `json:"dailySchedule,omitempty"` + + HourlySchedule *ResourcePolicyHourlyCycle `json:"hourlySchedule,omitempty"` + + WeeklySchedule *ResourcePolicyWeeklyCycle `json:"weeklySchedule,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DailySchedule") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DailySchedule") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ResourcePolicySnapshotSchedulePolicySchedule) MarshalJSON() ([]byte, error) { + type NoMethod ResourcePolicySnapshotSchedulePolicySchedule + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ResourcePolicySnapshotSchedulePolicySnapshotProperties: Specified +// snapshot properties for scheduled snapshots created by this policy. +type ResourcePolicySnapshotSchedulePolicySnapshotProperties struct { + // GuestFlush: Indication to perform a ?guest aware? snapshot. + GuestFlush bool `json:"guestFlush,omitempty"` + + // Labels: Labels to apply to scheduled snapshots. These can be later + // modified by the setLabels method. Label values may be empty. + Labels map[string]string `json:"labels,omitempty"` + + // StorageLocations: GCS bucket storage location of the auto snapshot + // (regional or multi-regional). + StorageLocations []string `json:"storageLocations,omitempty"` + + // ForceSendFields is a list of field names (e.g. "GuestFlush") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "GuestFlush") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ResourcePolicySnapshotSchedulePolicySnapshotProperties) MarshalJSON() ([]byte, error) { + type NoMethod ResourcePolicySnapshotSchedulePolicySnapshotProperties + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ResourcePolicyWeeklyCycle: Time window specified for weekly // operations. type ResourcePolicyWeeklyCycle struct { @@ -24589,6 +25453,12 @@ type Route struct { // zone/instances/ NextHopInstance string `json:"nextHopInstance,omitempty"` + // NextHopInterconnectAttachment: [Output Only] The URL to an + // InterconnectAttachment which is the next hop for the route. This + // field will only be populated for the dynamic routes generated by + // Cloud Router with a linked interconnectAttachment. + NextHopInterconnectAttachment string `json:"nextHopInterconnectAttachment,omitempty"` + // NextHopIp: The network IP address of an instance that should handle // matching packets. Only IPv4 is supported. NextHopIp string `json:"nextHopIp,omitempty"` @@ -25545,6 +26415,9 @@ type RouterNat struct { // Defaults to 30s if not set. IcmpIdleTimeoutSec int64 `json:"icmpIdleTimeoutSec,omitempty"` + // LogConfig: Configure logging on this NAT. + LogConfig *RouterNatLogConfig `json:"logConfig,omitempty"` + // MinPortsPerVm: Minimum number of ports allocated to a VM from this // NAT config. If not set, a default number of ports is allocated to a // VM. This gets rounded up to the nearest power of 2. Eg. if the value @@ -25621,6 +26494,45 @@ func (s *RouterNat) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// RouterNatLogConfig: Configuration of logging on a NAT. +type RouterNatLogConfig struct { + // Enable: Indicates whether or not to export logs. This is false by + // default. + Enable bool `json:"enable,omitempty"` + + // Filter: Specifies the desired filtering of logs on this NAT. If + // unspecified, logs are exported for all connections handled by this + // NAT. + // + // Possible values: + // "ALL" + // "ERRORS_ONLY" + // "TRANSLATIONS_ONLY" + Filter string `json:"filter,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Enable") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Enable") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *RouterNatLogConfig) MarshalJSON() ([]byte, error) { + type NoMethod RouterNatLogConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // RouterNatSubnetworkToNat: Defines the IP ranges that want to use NAT // for a subnetwork. type RouterNatSubnetworkToNat struct { @@ -25766,7 +26678,8 @@ func (s *RouterStatusBgpPeerStatus) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// RouterStatusNatStatus: Status of a NAT contained in this router. +// RouterStatusNatStatus: Status of a NAT contained in this router. Next +// tag: 9 type RouterStatusNatStatus struct { // AutoAllocatedNatIps: A list of IPs auto-allocated for NAT. Example: // ["1.1.1.1", "129.2.16.89"] @@ -26761,6 +27674,36 @@ func (s *SerialPortOutput) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type ServerBinding struct { + // Possible values: + // "RESTART_NODE_ON_ANY_SERVER" + // "RESTART_NODE_ON_MINIMAL_SERVERS" + // "SERVER_BINDING_TYPE_UNSPECIFIED" + Type string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Type") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Type") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ServerBinding) MarshalJSON() ([]byte, error) { + type NoMethod ServerBinding + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ServiceAccount: A service account. type ServiceAccount struct { // Email: Email address of the service account. @@ -26793,6 +27736,149 @@ func (s *ServiceAccount) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ShieldedInstanceConfig: A set of Shielded Instance options. +type ShieldedInstanceConfig struct { + // EnableIntegrityMonitoring: Defines whether the instance has integrity + // monitoring enabled. + EnableIntegrityMonitoring bool `json:"enableIntegrityMonitoring,omitempty"` + + // EnableSecureBoot: Defines whether the instance has Secure Boot + // enabled. + EnableSecureBoot bool `json:"enableSecureBoot,omitempty"` + + // EnableVtpm: Defines whether the instance has the vTPM enabled. + EnableVtpm bool `json:"enableVtpm,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "EnableIntegrityMonitoring") to unconditionally include in API + // requests. By default, fields with empty values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. + // "EnableIntegrityMonitoring") to include in API requests with the JSON + // null value. By default, fields with empty values are omitted from API + // requests. However, any field with an empty value appearing in + // NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ShieldedInstanceConfig) MarshalJSON() ([]byte, error) { + type NoMethod ShieldedInstanceConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ShieldedInstanceIdentity: A shielded Instance identity entry. +type ShieldedInstanceIdentity struct { + // EncryptionKey: An Endorsement Key (EK) issued to the Shielded + // Instance's vTPM. + EncryptionKey *ShieldedInstanceIdentityEntry `json:"encryptionKey,omitempty"` + + // Kind: [Output Only] Type of the resource. Always + // compute#shieldedInstanceIdentity for shielded Instance identity + // entry. + Kind string `json:"kind,omitempty"` + + // SigningKey: An Attestation Key (AK) issued to the Shielded Instance's + // vTPM. + SigningKey *ShieldedInstanceIdentityEntry `json:"signingKey,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "EncryptionKey") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "EncryptionKey") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ShieldedInstanceIdentity) MarshalJSON() ([]byte, error) { + type NoMethod ShieldedInstanceIdentity + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ShieldedInstanceIdentityEntry: A Shielded Instance Identity Entry. +type ShieldedInstanceIdentityEntry struct { + // EkCert: A PEM-encoded X.509 certificate. This field can be empty. + EkCert string `json:"ekCert,omitempty"` + + // EkPub: A PEM-encoded public key. + EkPub string `json:"ekPub,omitempty"` + + // ForceSendFields is a list of field names (e.g. "EkCert") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "EkCert") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ShieldedInstanceIdentityEntry) MarshalJSON() ([]byte, error) { + type NoMethod ShieldedInstanceIdentityEntry + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ShieldedInstanceIntegrityPolicy: The policy describes the baseline +// against which Instance boot integrity is measured. +type ShieldedInstanceIntegrityPolicy struct { + // UpdateAutoLearnPolicy: Updates the integrity policy baseline using + // the measurements from the VM instance's most recent boot. + UpdateAutoLearnPolicy bool `json:"updateAutoLearnPolicy,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "UpdateAutoLearnPolicy") to unconditionally include in API requests. + // By default, fields with empty values are omitted from API requests. + // However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "UpdateAutoLearnPolicy") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *ShieldedInstanceIntegrityPolicy) MarshalJSON() ([]byte, error) { + type NoMethod ShieldedInstanceIntegrityPolicy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ShieldedVmConfig: A set of Shielded VM options. type ShieldedVmConfig struct { // EnableIntegrityMonitoring: Defines whether the instance has integrity @@ -26871,7 +27957,7 @@ func (s *ShieldedVmIdentity) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ShieldedVmIdentityEntry: A Shielded VM Identity Entry. +// ShieldedVmIdentityEntry: A Shielded Instance Identity Entry. type ShieldedVmIdentityEntry struct { // EkCert: A PEM-encoded X.509 certificate. This field can be empty. EkCert string `json:"ekCert,omitempty"` @@ -28125,6 +29211,11 @@ type Subnetwork struct { // for Subnetwork resources. Kind string `json:"kind,omitempty"` + // LogConfig: This field denotes the logging options for the load + // balancer traffic served by this backend service. If logging is + // enabled, logs will be exported to Stackdriver. + LogConfig *SubnetworkLogConfig `json:"logConfig,omitempty"` + // Name: The name of the resource, provided by the client when initially // creating the resource. The name must be 1-63 characters long, and // comply with RFC1035. Specifically, the name must be 1-63 characters @@ -28499,6 +29590,84 @@ func (s *SubnetworkListWarningData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// SubnetworkLogConfig: The available logging options for this +// subnetwork. +type SubnetworkLogConfig struct { + // AggregationInterval: Can only be specified if VPC flow logging for + // this subnetwork is enabled. Toggles the aggregation interval for + // collecting flow logs. Increasing the interval time will reduce the + // amount of generated flow logs for long lasting connections. Default + // is an interval of 5 seconds per connection. + // + // Possible values: + // "INTERVAL_10_MIN" + // "INTERVAL_15_MIN" + // "INTERVAL_1_MIN" + // "INTERVAL_30_SEC" + // "INTERVAL_5_MIN" + // "INTERVAL_5_SEC" + AggregationInterval string `json:"aggregationInterval,omitempty"` + + // Enable: Whether to enable flow logging for this subnetwork. If this + // field is not explicitly set, it will not appear in get listings. If + // not set the default behavior is to disable flow logging. + Enable bool `json:"enable,omitempty"` + + // FlowSampling: Can only be specified if VPC flow logging for this + // subnetwork is enabled. The value of the field must be in [0, 1]. Set + // the sampling rate of VPC flow logs within the subnetwork where 1.0 + // means all collected logs are reported and 0.0 means no logs are + // reported. Default is 0.5 which means half of all collected logs are + // reported. + FlowSampling float64 `json:"flowSampling,omitempty"` + + // Metadata: Can only be specified if VPC flow logging for this + // subnetwork is enabled. Configures whether metadata fields should be + // added to the reported VPC flow logs. Default is INCLUDE_ALL_METADATA. + // + // Possible values: + // "EXCLUDE_ALL_METADATA" + // "INCLUDE_ALL_METADATA" + Metadata string `json:"metadata,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AggregationInterval") + // to unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AggregationInterval") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *SubnetworkLogConfig) MarshalJSON() ([]byte, error) { + type NoMethod SubnetworkLogConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *SubnetworkLogConfig) UnmarshalJSON(data []byte) error { + type NoMethod SubnetworkLogConfig + var s1 struct { + FlowSampling gensupport.JSONFloat64 `json:"flowSampling"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.FlowSampling = float64(s1.FlowSampling) + return nil +} + // SubnetworkSecondaryRange: Represents a secondary IP range of a // subnetwork. type SubnetworkSecondaryRange struct { @@ -31304,7 +32473,7 @@ type TargetVpnGateway struct { // ForwardingRules: [Output Only] A list of URLs to the ForwardingRule // resources. ForwardingRules are created using - // compute.forwardingRules.insert and associated to a VPN gateway. + // compute.forwardingRules.insert and associated with a VPN gateway. ForwardingRules []string `json:"forwardingRules,omitempty"` // Id: [Output Only] The unique identifier for the resource. This @@ -31353,7 +32522,8 @@ type TargetVpnGateway struct { // SelfLink: [Output Only] Server-defined URL for the resource. SelfLink string `json:"selfLink,omitempty"` - // Status: [Output Only] The status of the VPN gateway. + // Status: [Output Only] The status of the VPN gateway, which can be one + // of the following: CREATING, READY, FAILED, or DELETING. // // Possible values: // "CREATING" @@ -31363,8 +32533,8 @@ type TargetVpnGateway struct { Status string `json:"status,omitempty"` // Tunnels: [Output Only] A list of URLs to VpnTunnel resources. - // VpnTunnels are created using compute.vpntunnels.insert method and - // associated to a VPN gateway. + // VpnTunnels are created using the compute.vpntunnels.insert method and + // associated with a VPN gateway. Tunnels []string `json:"tunnels,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -31707,7 +32877,7 @@ func (s *TargetVpnGatewayListWarningData) MarshalJSON() ([]byte, error) { } type TargetVpnGatewaysScopedList struct { - // TargetVpnGateways: [Output Only] A list of target vpn gateways + // TargetVpnGateways: [Output Only] A list of target VPN gateways // contained in this scope. TargetVpnGateways []*TargetVpnGateway `json:"targetVpnGateways,omitempty"` @@ -31942,13 +33112,16 @@ type UrlMap struct { // format. CreationTimestamp string `json:"creationTimestamp,omitempty"` - // DefaultService: The URL of the backendService resource if none of the - // hostRules match. - // Use defaultService instead of defaultRouteAction when simple routing - // to a backendService is desired and other advanced capabilities like - // traffic splitting and rewrites are not required. - // Only one of defaultService, defaultRouteAction or defaultUrlRedirect - // should must be set. + // DefaultService: The full or partial URL of the defaultService + // resource to which traffic is directed if none of the hostRules match. + // If defaultRouteAction is additionally specified, advanced routing + // actions like URL Rewrites, etc. take effect prior to sending the + // request to the backend. However, if defaultService is specified, + // defaultRouteAction cannot contain any weightedBackendServices. + // Conversely, if routeAction specifies any weightedBackendServices, + // service must not be specified. + // Only one of defaultService, defaultUrlRedirect or + // defaultRouteAction.weightedBackendService must be set. DefaultService string `json:"defaultService,omitempty"` // Description: An optional description of this resource. Provide this @@ -32847,6 +34020,754 @@ func (s *VmEndpointNatMappingsListWarningData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// VpnGateway: Represents a VPN gateway resource. +type VpnGateway struct { + // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text + // format. + CreationTimestamp string `json:"creationTimestamp,omitempty"` + + // Description: An optional description of this resource. Provide this + // property when you create the resource. + Description string `json:"description,omitempty"` + + // Id: [Output Only] The unique identifier for the resource. This + // identifier is defined by the server. + Id uint64 `json:"id,omitempty,string"` + + // Kind: [Output Only] Type of resource. Always compute#vpnGateway for + // VPN gateways. + Kind string `json:"kind,omitempty"` + + // LabelFingerprint: A fingerprint for the labels being applied to this + // VpnGateway, which is essentially a hash of the labels set used for + // optimistic locking. The fingerprint is initially generated by Compute + // Engine and changes after every request to modify or update labels. + // You must always provide an up-to-date fingerprint hash in order to + // update or change labels, otherwise the request will fail with error + // 412 conditionNotMet. + // + // To see the latest fingerprint, make a get() request to retrieve an + // VpnGateway. + LabelFingerprint string `json:"labelFingerprint,omitempty"` + + // Labels: Labels to apply to this VpnGateway resource. These can be + // later modified by the setLabels method. Each label key/value must + // comply with RFC1035. Label values may be empty. + Labels map[string]string `json:"labels,omitempty"` + + // Name: Name of the resource. Provided by the client when the resource + // is created. The name must be 1-63 characters long, and comply with + // RFC1035. Specifically, the name must be 1-63 characters long and + // match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means + // the first character must be a lowercase letter, and all following + // characters must be a dash, lowercase letter, or digit, except the + // last character, which cannot be a dash. + Name string `json:"name,omitempty"` + + // Network: URL of the network to which this VPN gateway is attached. + // Provided by the client when the VPN gateway is created. + Network string `json:"network,omitempty"` + + // Region: [Output Only] URL of the region where the VPN gateway + // resides. + Region string `json:"region,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for the resource. + SelfLink string `json:"selfLink,omitempty"` + + // VpnInterfaces: [Output Only] A list of interfaces on this VPN + // gateway. + VpnInterfaces []*VpnGatewayVpnGatewayInterface `json:"vpnInterfaces,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "CreationTimestamp") + // to unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreationTimestamp") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *VpnGateway) MarshalJSON() ([]byte, error) { + type NoMethod VpnGateway + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type VpnGatewayAggregatedList struct { + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. + Id string `json:"id,omitempty"` + + // Items: A list of VpnGateway resources. + Items map[string]VpnGatewaysScopedList `json:"items,omitempty"` + + // Kind: [Output Only] Type of resource. Always compute#vpnGateway for + // VPN gateways. + Kind string `json:"kind,omitempty"` + + // NextPageToken: [Output Only] This token allows you to get the next + // page of results for list requests. If the number of results is larger + // than maxResults, use the nextPageToken as a value for the query + // parameter pageToken in the next list request. Subsequent list + // requests will have their own nextPageToken to continue paging through + // the results. + NextPageToken string `json:"nextPageToken,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for this resource. + SelfLink string `json:"selfLink,omitempty"` + + // Warning: [Output Only] Informational warning message. + Warning *VpnGatewayAggregatedListWarning `json:"warning,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Id") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Id") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *VpnGatewayAggregatedList) MarshalJSON() ([]byte, error) { + type NoMethod VpnGatewayAggregatedList + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// VpnGatewayAggregatedListWarning: [Output Only] Informational warning +// message. +type VpnGatewayAggregatedListWarning struct { + // Code: [Output Only] A warning code, if applicable. For example, + // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in + // the response. + // + // Possible values: + // "CLEANUP_FAILED" + // "DEPRECATED_RESOURCE_USED" + // "DEPRECATED_TYPE_USED" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "EXPERIMENTAL_TYPE_USED" + // "EXTERNAL_API_WARNING" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "MISSING_TYPE_DEPENDENCY" + // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" + // "NEXT_HOP_CANNOT_IP_FORWARD" + // "NEXT_HOP_INSTANCE_NOT_FOUND" + // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" + // "NEXT_HOP_NOT_RUNNING" + // "NOT_CRITICAL_ERROR" + // "NO_RESULTS_ON_PAGE" + // "REQUIRED_TOS_AGREEMENT" + // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" + // "RESOURCE_NOT_DELETED" + // "SCHEMA_VALIDATION_IGNORED" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "UNDECLARED_PROPERTIES" + // "UNREACHABLE" + Code string `json:"code,omitempty"` + + // Data: [Output Only] Metadata about this warning in key: value format. + // For example: + // "data": [ { "key": "scope", "value": "zones/us-east1-d" } + Data []*VpnGatewayAggregatedListWarningData `json:"data,omitempty"` + + // Message: [Output Only] A human-readable description of the warning + // code. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *VpnGatewayAggregatedListWarning) MarshalJSON() ([]byte, error) { + type NoMethod VpnGatewayAggregatedListWarning + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type VpnGatewayAggregatedListWarningData struct { + // Key: [Output Only] A key that provides more detail on the warning + // being returned. For example, for warnings where there are no results + // in a list request for a particular zone, this key might be scope and + // the key value might be the zone name. Other examples might be a key + // indicating a deprecated resource and a suggested replacement, or a + // warning about invalid network settings (for example, if an instance + // attempts to perform IP forwarding but is not enabled for IP + // forwarding). + Key string `json:"key,omitempty"` + + // Value: [Output Only] A warning data value corresponding to the key. + Value string `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Key") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Key") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *VpnGatewayAggregatedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod VpnGatewayAggregatedListWarningData + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// VpnGatewayList: Contains a list of VpnGateway resources. +type VpnGatewayList struct { + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. + Id string `json:"id,omitempty"` + + // Items: A list of VpnGateway resources. + Items []*VpnGateway `json:"items,omitempty"` + + // Kind: [Output Only] Type of resource. Always compute#vpnGateway for + // VPN gateways. + Kind string `json:"kind,omitempty"` + + // NextPageToken: [Output Only] This token allows you to get the next + // page of results for list requests. If the number of results is larger + // than maxResults, use the nextPageToken as a value for the query + // parameter pageToken in the next list request. Subsequent list + // requests will have their own nextPageToken to continue paging through + // the results. + NextPageToken string `json:"nextPageToken,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for this resource. + SelfLink string `json:"selfLink,omitempty"` + + // Warning: [Output Only] Informational warning message. + Warning *VpnGatewayListWarning `json:"warning,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Id") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Id") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *VpnGatewayList) MarshalJSON() ([]byte, error) { + type NoMethod VpnGatewayList + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// VpnGatewayListWarning: [Output Only] Informational warning message. +type VpnGatewayListWarning struct { + // Code: [Output Only] A warning code, if applicable. For example, + // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in + // the response. + // + // Possible values: + // "CLEANUP_FAILED" + // "DEPRECATED_RESOURCE_USED" + // "DEPRECATED_TYPE_USED" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "EXPERIMENTAL_TYPE_USED" + // "EXTERNAL_API_WARNING" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "MISSING_TYPE_DEPENDENCY" + // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" + // "NEXT_HOP_CANNOT_IP_FORWARD" + // "NEXT_HOP_INSTANCE_NOT_FOUND" + // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" + // "NEXT_HOP_NOT_RUNNING" + // "NOT_CRITICAL_ERROR" + // "NO_RESULTS_ON_PAGE" + // "REQUIRED_TOS_AGREEMENT" + // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" + // "RESOURCE_NOT_DELETED" + // "SCHEMA_VALIDATION_IGNORED" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "UNDECLARED_PROPERTIES" + // "UNREACHABLE" + Code string `json:"code,omitempty"` + + // Data: [Output Only] Metadata about this warning in key: value format. + // For example: + // "data": [ { "key": "scope", "value": "zones/us-east1-d" } + Data []*VpnGatewayListWarningData `json:"data,omitempty"` + + // Message: [Output Only] A human-readable description of the warning + // code. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *VpnGatewayListWarning) MarshalJSON() ([]byte, error) { + type NoMethod VpnGatewayListWarning + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type VpnGatewayListWarningData struct { + // Key: [Output Only] A key that provides more detail on the warning + // being returned. For example, for warnings where there are no results + // in a list request for a particular zone, this key might be scope and + // the key value might be the zone name. Other examples might be a key + // indicating a deprecated resource and a suggested replacement, or a + // warning about invalid network settings (for example, if an instance + // attempts to perform IP forwarding but is not enabled for IP + // forwarding). + Key string `json:"key,omitempty"` + + // Value: [Output Only] A warning data value corresponding to the key. + Value string `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Key") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Key") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *VpnGatewayListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod VpnGatewayListWarningData + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type VpnGatewayStatus struct { + // VpnConnections: List of VPN connection for this VpnGateway. + VpnConnections []*VpnGatewayStatusVpnConnection `json:"vpnConnections,omitempty"` + + // ForceSendFields is a list of field names (e.g. "VpnConnections") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "VpnConnections") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *VpnGatewayStatus) MarshalJSON() ([]byte, error) { + type NoMethod VpnGatewayStatus + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// VpnGatewayStatusHighAvailabilityRequirementState: Describes the high +// availability requirement state for the VPN connection between this +// Cloud VPN gateway and a peer gateway. +type VpnGatewayStatusHighAvailabilityRequirementState struct { + // State: Indicates the high availability requirement state for the VPN + // connection. Valid values are CONNECTION_REDUNDANCY_MET, + // CONNECTION_REDUNDANCY_NOT_MET. + // + // Possible values: + // "CONNECTION_REDUNDANCY_MET" + // "CONNECTION_REDUNDANCY_NOT_MET" + State string `json:"state,omitempty"` + + // UnsatisfiedReason: Indicates the reason why the VPN connection does + // not meet the high availability redundancy criteria/requirement. Valid + // values is INCOMPLETE_TUNNELS_COVERAGE. + // + // Possible values: + // "INCOMPLETE_TUNNELS_COVERAGE" + UnsatisfiedReason string `json:"unsatisfiedReason,omitempty"` + + // ForceSendFields is a list of field names (e.g. "State") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "State") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *VpnGatewayStatusHighAvailabilityRequirementState) MarshalJSON() ([]byte, error) { + type NoMethod VpnGatewayStatusHighAvailabilityRequirementState + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// VpnGatewayStatusTunnel: Contains some information about a VPN tunnel. +type VpnGatewayStatusTunnel struct { + // LocalGatewayInterface: The VPN gateway interface this VPN tunnel is + // associated with. + LocalGatewayInterface int64 `json:"localGatewayInterface,omitempty"` + + // PeerGatewayInterface: The peer gateway interface this VPN tunnel is + // connected to, the peer gateway could either be an external VPN + // gateway or GCP VPN gateway. + PeerGatewayInterface int64 `json:"peerGatewayInterface,omitempty"` + + // TunnelUrl: URL reference to the VPN tunnel. + TunnelUrl string `json:"tunnelUrl,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "LocalGatewayInterface") to unconditionally include in API requests. + // By default, fields with empty values are omitted from API requests. + // However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "LocalGatewayInterface") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *VpnGatewayStatusTunnel) MarshalJSON() ([]byte, error) { + type NoMethod VpnGatewayStatusTunnel + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// VpnGatewayStatusVpnConnection: A VPN connection contains all VPN +// tunnels connected from this VpnGateway to the same peer gateway. The +// peer gateway could either be a external VPN gateway or GCP VPN +// gateway. +type VpnGatewayStatusVpnConnection struct { + // PeerExternalGateway: URL reference to the peer external VPN gateways + // to which the VPN tunnels in this VPN connection are connected. This + // field is mutually exclusive with peer_gcp_gateway. + PeerExternalGateway string `json:"peerExternalGateway,omitempty"` + + // PeerGcpGateway: URL reference to the peer side VPN gateways to which + // the VPN tunnels in this VPN connection are connected. This field is + // mutually exclusive with peer_gcp_gateway. + PeerGcpGateway string `json:"peerGcpGateway,omitempty"` + + // State: HighAvailabilityRequirementState for the VPN connection. + State *VpnGatewayStatusHighAvailabilityRequirementState `json:"state,omitempty"` + + // Tunnels: List of VPN tunnels that are in this VPN connection. + Tunnels []*VpnGatewayStatusTunnel `json:"tunnels,omitempty"` + + // ForceSendFields is a list of field names (e.g. "PeerExternalGateway") + // to unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "PeerExternalGateway") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *VpnGatewayStatusVpnConnection) MarshalJSON() ([]byte, error) { + type NoMethod VpnGatewayStatusVpnConnection + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// VpnGatewayVpnGatewayInterface: A VPN gateway interface. +type VpnGatewayVpnGatewayInterface struct { + // Id: The numeric ID of this VPN gateway interface. + Id int64 `json:"id,omitempty"` + + // IpAddress: The external IP address for this VPN gateway interface. + IpAddress string `json:"ipAddress,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Id") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Id") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *VpnGatewayVpnGatewayInterface) MarshalJSON() ([]byte, error) { + type NoMethod VpnGatewayVpnGatewayInterface + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type VpnGatewaysGetStatusResponse struct { + Result *VpnGatewayStatus `json:"result,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Result") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Result") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *VpnGatewaysGetStatusResponse) MarshalJSON() ([]byte, error) { + type NoMethod VpnGatewaysGetStatusResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type VpnGatewaysScopedList struct { + // VpnGateways: [Output Only] A list of VPN gateways contained in this + // scope. + VpnGateways []*VpnGateway `json:"vpnGateways,omitempty"` + + // Warning: [Output Only] Informational warning which replaces the list + // of addresses when the list is empty. + Warning *VpnGatewaysScopedListWarning `json:"warning,omitempty"` + + // ForceSendFields is a list of field names (e.g. "VpnGateways") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "VpnGateways") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *VpnGatewaysScopedList) MarshalJSON() ([]byte, error) { + type NoMethod VpnGatewaysScopedList + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// VpnGatewaysScopedListWarning: [Output Only] Informational warning +// which replaces the list of addresses when the list is empty. +type VpnGatewaysScopedListWarning struct { + // Code: [Output Only] A warning code, if applicable. For example, + // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in + // the response. + // + // Possible values: + // "CLEANUP_FAILED" + // "DEPRECATED_RESOURCE_USED" + // "DEPRECATED_TYPE_USED" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "EXPERIMENTAL_TYPE_USED" + // "EXTERNAL_API_WARNING" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "MISSING_TYPE_DEPENDENCY" + // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" + // "NEXT_HOP_CANNOT_IP_FORWARD" + // "NEXT_HOP_INSTANCE_NOT_FOUND" + // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" + // "NEXT_HOP_NOT_RUNNING" + // "NOT_CRITICAL_ERROR" + // "NO_RESULTS_ON_PAGE" + // "REQUIRED_TOS_AGREEMENT" + // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" + // "RESOURCE_NOT_DELETED" + // "SCHEMA_VALIDATION_IGNORED" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "UNDECLARED_PROPERTIES" + // "UNREACHABLE" + Code string `json:"code,omitempty"` + + // Data: [Output Only] Metadata about this warning in key: value format. + // For example: + // "data": [ { "key": "scope", "value": "zones/us-east1-d" } + Data []*VpnGatewaysScopedListWarningData `json:"data,omitempty"` + + // Message: [Output Only] A human-readable description of the warning + // code. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *VpnGatewaysScopedListWarning) MarshalJSON() ([]byte, error) { + type NoMethod VpnGatewaysScopedListWarning + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type VpnGatewaysScopedListWarningData struct { + // Key: [Output Only] A key that provides more detail on the warning + // being returned. For example, for warnings where there are no results + // in a list request for a particular zone, this key might be scope and + // the key value might be the zone name. Other examples might be a key + // indicating a deprecated resource and a suggested replacement, or a + // warning about invalid network settings (for example, if an instance + // attempts to perform IP forwarding but is not enabled for IP + // forwarding). + Key string `json:"key,omitempty"` + + // Value: [Output Only] A warning data value corresponding to the key. + Value string `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Key") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Key") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *VpnGatewaysScopedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod VpnGatewaysScopedListWarningData + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // VpnTunnel: VPN tunnel resource. (== resource_for beta.vpnTunnels ==) // (== resource_for v1.vpnTunnels ==) type VpnTunnel struct { @@ -32867,8 +34788,8 @@ type VpnTunnel struct { Id uint64 `json:"id,omitempty,string"` // IkeVersion: IKE protocol version to use when establishing the VPN - // tunnel with peer VPN gateway. Acceptable IKE versions are 1 or 2. - // Default version is 2. + // tunnel with the peer VPN gateway. Acceptable IKE versions are 1 or 2. + // The default version is 2. IkeVersion int64 `json:"ikeVersion,omitempty"` // Kind: [Output Only] Type of resource. Always compute#vpnTunnel for @@ -32893,8 +34814,8 @@ type VpnTunnel struct { Labels map[string]string `json:"labels,omitempty"` // LocalTrafficSelector: Local traffic selector to use when establishing - // the VPN tunnel with peer VPN gateway. The value should be a CIDR - // formatted string, for example: 192.168.0.0/16. The ranges should be + // the VPN tunnel with the peer VPN gateway. The value should be a CIDR + // formatted string, for example: 192.168.0.0/16. The ranges must be // disjoint. Only IPv4 is supported. LocalTrafficSelector []string `json:"localTrafficSelector,omitempty"` @@ -32907,6 +34828,26 @@ type VpnTunnel struct { // last character, which cannot be a dash. Name string `json:"name,omitempty"` + // PeerExternalGateway: URL of the peer side external VPN gateway to + // which this VPN tunnel is connected. Provided by the client when the + // VPN tunnel is created. This field is exclusive with the field + // peerGcpGateway. + PeerExternalGateway string `json:"peerExternalGateway,omitempty"` + + // PeerExternalGatewayInterface: The interface ID of the external VPN + // gateway to which this VPN tunnel is connected. Provided by the client + // when the VPN tunnel is created. + PeerExternalGatewayInterface int64 `json:"peerExternalGatewayInterface,omitempty"` + + // PeerGcpGateway: URL of the peer side HA GCP VPN gateway to which this + // VPN tunnel is connected. Provided by the client when the VPN tunnel + // is created. This field can be used when creating highly available VPN + // from VPC network to VPC network, the field is exclusive with the + // field peerExternalGateway. If provided, the VPN tunnel will + // automatically use the same vpnGatewayInterface ID in the peer GCP VPN + // gateway. + PeerGcpGateway string `json:"peerGcpGateway,omitempty"` + // PeerIp: IP address of the peer VPN gateway. Only IPv4 is supported. PeerIp string `json:"peerIp,omitempty"` @@ -32916,12 +34857,12 @@ type VpnTunnel struct { Region string `json:"region,omitempty"` // RemoteTrafficSelector: Remote traffic selectors to use when - // establishing the VPN tunnel with peer VPN gateway. The value should - // be a CIDR formatted string, for example: 192.168.0.0/16. The ranges - // should be disjoint. Only IPv4 is supported. + // establishing the VPN tunnel with the peer VPN gateway. The value + // should be a CIDR formatted string, for example: 192.168.0.0/16. The + // ranges should be disjoint. Only IPv4 is supported. RemoteTrafficSelector []string `json:"remoteTrafficSelector,omitempty"` - // Router: URL of router resource to be used for dynamic routing. + // Router: URL of the router resource to be used for dynamic routing. Router string `json:"router,omitempty"` // SelfLink: [Output Only] Server-defined URL for the resource. @@ -32934,7 +34875,23 @@ type VpnTunnel struct { // SharedSecretHash: Hash of the shared secret. SharedSecretHash string `json:"sharedSecretHash,omitempty"` - // Status: [Output Only] The status of the VPN tunnel. + // Status: [Output Only] The status of the VPN tunnel, which can be one + // of the following: + // - PROVISIONING: Resource is being allocated for the VPN tunnel. + // - WAITING_FOR_FULL_CONFIG: Waiting to receive all VPN-related configs + // from the user. Network, TargetVpnGateway, VpnTunnel, ForwardingRule, + // and Route resources are needed to setup the VPN tunnel. + // - FIRST_HANDSHAKE: Successful first handshake with the peer VPN. + // - ESTABLISHED: Secure session is successfully established with the + // peer VPN. + // - NETWORK_ERROR: Deprecated, replaced by NO_INCOMING_PACKETS + // - AUTHORIZATION_ERROR: Auth error (for example, bad shared secret). + // + // - NEGOTIATION_FAILURE: Handshake failed. + // - DEPROVISIONING: Resources are being deallocated for the VPN tunnel. + // + // - FAILED: Tunnel creation has failed and the tunnel is not ready to + // be used. // // Possible values: // "ALLOCATING_RESOURCES" @@ -32956,6 +34913,16 @@ type VpnTunnel struct { // created. TargetVpnGateway string `json:"targetVpnGateway,omitempty"` + // VpnGateway: URL of the VPN gateway with which this VPN tunnel is + // associated. Provided by the client when the VPN tunnel is created. + // This must be used (instead of target_vpn_gateway) if a High + // Availability VPN gateway resource is created. + VpnGateway string `json:"vpnGateway,omitempty"` + + // VpnGatewayInterface: The interface ID of the VPN gateway with which + // this VPN tunnel is associated. + VpnGatewayInterface int64 `json:"vpnGatewayInterface,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -33295,7 +35262,7 @@ func (s *VpnTunnelListWarningData) MarshalJSON() ([]byte, error) { } type VpnTunnelsScopedList struct { - // VpnTunnels: A list of vpn tunnels contained in this scope. + // VpnTunnels: A list of VPN tunnels contained in this scope. VpnTunnels []*VpnTunnel `json:"vpnTunnels,omitempty"` // Warning: Informational warning which replaces the list of addresses @@ -33689,7 +35656,7 @@ func (s *XpnResourceId) MarshalJSON() ([]byte, error) { } // Zone: A Zone resource. (== resource_for beta.zones ==) (== -// resource_for v1.zones ==) +// resource_for v1.zones ==) Next ID: 17 type Zone struct { // AvailableCpuPlatforms: [Output Only] Available cpu/platform // selections for the zone. @@ -34373,7 +36340,7 @@ func (c *AcceleratorTypesGetCall) Do(opts ...googleapi.CallOption) (*Accelerator // "acceleratorType": { // "description": "Name of the accelerator type to return.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -35060,7 +37027,7 @@ func (c *AddressesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, erro // "address": { // "description": "Name of the address resource to delete.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -35231,7 +37198,7 @@ func (c *AddressesGetCall) Do(opts ...googleapi.CallOption) (*Address, error) { // "address": { // "description": "Name of the address resource to return.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -36052,1527 +38019,6 @@ func (c *AddressesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*Tes } -// method id "compute.allocations.aggregatedList": - -type AllocationsAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of allocations. -func (r *AllocationsService) AggregatedList(project string) *AllocationsAggregatedListCall { - c := &AllocationsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. The expression must specify -// the field name, a comparison operator, and the value that you want to -// use for filtering. The value must be a string, a number, or a -// boolean. The comparison operator must be either =, !=, >, or <. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named example-instance by specifying name != -// example-instance. -// -// You can also filter nested fields. For example, you could specify -// scheduling.automaticRestart = false to include instances only if they -// are not scheduled for automatic restarts. You can use filtering on -// nested fields to filter based on resource labels. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake"). By default, each expression is an -// AND expression. However, you can include AND and OR expressions -// explicitly. For example, (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = -// true). -func (c *AllocationsAggregatedListCall) Filter(filter string) *AllocationsAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *AllocationsAggregatedListCall) MaxResults(maxResults int64) *AllocationsAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *AllocationsAggregatedListCall) OrderBy(orderBy string) *AllocationsAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *AllocationsAggregatedListCall) PageToken(pageToken string) *AllocationsAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *AllocationsAggregatedListCall) Fields(s ...googleapi.Field) *AllocationsAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *AllocationsAggregatedListCall) IfNoneMatch(entityTag string) *AllocationsAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *AllocationsAggregatedListCall) Context(ctx context.Context) *AllocationsAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *AllocationsAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AllocationsAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/allocations") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.allocations.aggregatedList" call. -// Exactly one of *AllocationAggregatedList or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *AllocationAggregatedList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *AllocationsAggregatedListCall) Do(opts ...googleapi.CallOption) (*AllocationAggregatedList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &AllocationAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves an aggregated list of allocations.", - // "httpMethod": "GET", - // "id": "compute.allocations.aggregatedList", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/aggregated/allocations", - // "response": { - // "$ref": "AllocationAggregatedList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *AllocationsAggregatedListCall) Pages(ctx context.Context, f func(*AllocationAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.allocations.delete": - -type AllocationsDeleteCall struct { - s *Service - project string - zone string - allocation string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified allocation. -func (r *AllocationsService) Delete(project string, zone string, allocation string) *AllocationsDeleteCall { - c := &AllocationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.allocation = allocation - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *AllocationsDeleteCall) RequestId(requestId string) *AllocationsDeleteCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *AllocationsDeleteCall) Fields(s ...googleapi.Field) *AllocationsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *AllocationsDeleteCall) Context(ctx context.Context) *AllocationsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *AllocationsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AllocationsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/allocations/{allocation}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "allocation": c.allocation, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.allocations.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *AllocationsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified allocation.", - // "httpMethod": "DELETE", - // "id": "compute.allocations.delete", - // "parameterOrder": [ - // "project", - // "zone", - // "allocation" - // ], - // "parameters": { - // "allocation": { - // "description": "Name of the allocation to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "Name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/allocations/{allocation}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.allocations.get": - -type AllocationsGetCall struct { - s *Service - project string - zone string - allocation string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Retrieves all information of the specified allocation. -func (r *AllocationsService) Get(project string, zone string, allocation string) *AllocationsGetCall { - c := &AllocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.allocation = allocation - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *AllocationsGetCall) Fields(s ...googleapi.Field) *AllocationsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *AllocationsGetCall) IfNoneMatch(entityTag string) *AllocationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *AllocationsGetCall) Context(ctx context.Context) *AllocationsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *AllocationsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AllocationsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/allocations/{allocation}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "allocation": c.allocation, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.allocations.get" call. -// Exactly one of *Allocation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Allocation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *AllocationsGetCall) Do(opts ...googleapi.CallOption) (*Allocation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Allocation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves all information of the specified allocation.", - // "httpMethod": "GET", - // "id": "compute.allocations.get", - // "parameterOrder": [ - // "project", - // "zone", - // "allocation" - // ], - // "parameters": { - // "allocation": { - // "description": "Name of the allocation to retrieve.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "Name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/allocations/{allocation}", - // "response": { - // "$ref": "Allocation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.allocations.getIamPolicy": - -type AllocationsGetIamPolicyCall struct { - s *Service - project string - zone string - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetIamPolicy: Gets the access control policy for a resource. May be -// empty if no such policy or resource exists. -func (r *AllocationsService) GetIamPolicy(project string, zone string, resource string) *AllocationsGetIamPolicyCall { - c := &AllocationsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.resource = resource - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *AllocationsGetIamPolicyCall) Fields(s ...googleapi.Field) *AllocationsGetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *AllocationsGetIamPolicyCall) IfNoneMatch(entityTag string) *AllocationsGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *AllocationsGetIamPolicyCall) Context(ctx context.Context) *AllocationsGetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *AllocationsGetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AllocationsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/allocations/{resource}/getIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.allocations.getIamPolicy" call. -// Exactly one of *Policy or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Policy.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *AllocationsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Policy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", - // "httpMethod": "GET", - // "id": "compute.allocations.getIamPolicy", - // "parameterOrder": [ - // "project", - // "zone", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name or id of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/allocations/{resource}/getIamPolicy", - // "response": { - // "$ref": "Policy" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.allocations.insert": - -type AllocationsInsertCall struct { - s *Service - project string - zone string - allocation *Allocation - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a new allocation. -func (r *AllocationsService) Insert(project string, zone string, allocation *Allocation) *AllocationsInsertCall { - c := &AllocationsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.allocation = allocation - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *AllocationsInsertCall) RequestId(requestId string) *AllocationsInsertCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *AllocationsInsertCall) Fields(s ...googleapi.Field) *AllocationsInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *AllocationsInsertCall) Context(ctx context.Context) *AllocationsInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *AllocationsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AllocationsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.allocation) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/allocations") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.allocations.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *AllocationsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a new allocation.", - // "httpMethod": "POST", - // "id": "compute.allocations.insert", - // "parameterOrder": [ - // "project", - // "zone" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "Name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/allocations", - // "request": { - // "$ref": "Allocation" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.allocations.list": - -type AllocationsListCall struct { - s *Service - project string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: A list all the allocations that have been configured for the -// specified project in specified zone. -func (r *AllocationsService) List(project string, zone string) *AllocationsListCall { - c := &AllocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. The expression must specify -// the field name, a comparison operator, and the value that you want to -// use for filtering. The value must be a string, a number, or a -// boolean. The comparison operator must be either =, !=, >, or <. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named example-instance by specifying name != -// example-instance. -// -// You can also filter nested fields. For example, you could specify -// scheduling.automaticRestart = false to include instances only if they -// are not scheduled for automatic restarts. You can use filtering on -// nested fields to filter based on resource labels. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake"). By default, each expression is an -// AND expression. However, you can include AND and OR expressions -// explicitly. For example, (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = -// true). -func (c *AllocationsListCall) Filter(filter string) *AllocationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *AllocationsListCall) MaxResults(maxResults int64) *AllocationsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *AllocationsListCall) OrderBy(orderBy string) *AllocationsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *AllocationsListCall) PageToken(pageToken string) *AllocationsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *AllocationsListCall) Fields(s ...googleapi.Field) *AllocationsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *AllocationsListCall) IfNoneMatch(entityTag string) *AllocationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *AllocationsListCall) Context(ctx context.Context) *AllocationsListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *AllocationsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AllocationsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/allocations") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.allocations.list" call. -// Exactly one of *AllocationList or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *AllocationList.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *AllocationsListCall) Do(opts ...googleapi.CallOption) (*AllocationList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &AllocationList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "A list all the allocations that have been configured for the specified project in specified zone.", - // "httpMethod": "GET", - // "id": "compute.allocations.list", - // "parameterOrder": [ - // "project", - // "zone" - // ], - // "parameters": { - // "filter": { - // "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "Name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/allocations", - // "response": { - // "$ref": "AllocationList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *AllocationsListCall) Pages(ctx context.Context, f func(*AllocationList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.allocations.setIamPolicy": - -type AllocationsSetIamPolicyCall struct { - s *Service - project string - zone string - resource string - zonesetpolicyrequest *ZoneSetPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetIamPolicy: Sets the access control policy on the specified -// resource. Replaces any existing policy. -func (r *AllocationsService) SetIamPolicy(project string, zone string, resource string, zonesetpolicyrequest *ZoneSetPolicyRequest) *AllocationsSetIamPolicyCall { - c := &AllocationsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.resource = resource - c.zonesetpolicyrequest = zonesetpolicyrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *AllocationsSetIamPolicyCall) Fields(s ...googleapi.Field) *AllocationsSetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *AllocationsSetIamPolicyCall) Context(ctx context.Context) *AllocationsSetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *AllocationsSetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AllocationsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.zonesetpolicyrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/allocations/{resource}/setIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.allocations.setIamPolicy" call. -// Exactly one of *Policy or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Policy.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *AllocationsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Policy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", - // "httpMethod": "POST", - // "id": "compute.allocations.setIamPolicy", - // "parameterOrder": [ - // "project", - // "zone", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name or id of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/allocations/{resource}/setIamPolicy", - // "request": { - // "$ref": "ZoneSetPolicyRequest" - // }, - // "response": { - // "$ref": "Policy" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.allocations.testIamPermissions": - -type AllocationsTestIamPermissionsCall struct { - s *Service - project string - zone string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. -func (r *AllocationsService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *AllocationsTestIamPermissionsCall { - c := &AllocationsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *AllocationsTestIamPermissionsCall) Fields(s ...googleapi.Field) *AllocationsTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *AllocationsTestIamPermissionsCall) Context(ctx context.Context) *AllocationsTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *AllocationsTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AllocationsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/allocations/{resource}/testIamPermissions") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.allocations.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *AllocationsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "httpMethod": "POST", - // "id": "compute.allocations.testIamPermissions", - // "parameterOrder": [ - // "project", - // "zone", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name or id of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/allocations/{resource}/testIamPermissions", - // "request": { - // "$ref": "TestPermissionsRequest" - // }, - // "response": { - // "$ref": "TestPermissionsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - // method id "compute.autoscalers.aggregatedList": type AutoscalersAggregatedListCall struct { @@ -37963,7 +38409,7 @@ func (c *AutoscalersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, er // "autoscaler": { // "description": "Name of the autoscaler to delete.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -38134,7 +38580,7 @@ func (c *AutoscalersGetCall) Do(opts ...googleapi.CallOption) (*Autoscaler, erro // "autoscaler": { // "description": "Name of the autoscaler to return.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -38755,7 +39201,7 @@ func (c *AutoscalersPatchCall) Do(opts ...googleapi.CallOption) (*Operation, err // "autoscaler": { // "description": "Name of the autoscaler to patch.", // "location": "query", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "type": "string" // }, // "project": { @@ -39106,7 +39552,7 @@ func (c *AutoscalersUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, er // "autoscaler": { // "description": "Name of the autoscaler to update.", // "location": "query", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "type": "string" // }, // "project": { @@ -39453,7 +39899,7 @@ func (c *BackendBucketsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, // "backendBucket": { // "description": "Name of the BackendBucket resource to delete.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -39785,7 +40231,7 @@ func (c *BackendBucketsGetCall) Do(opts ...googleapi.CallOption) (*BackendBucket // "backendBucket": { // "description": "Name of the BackendBucket resource to return.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -40370,7 +40816,7 @@ func (c *BackendBucketsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, // "backendBucket": { // "description": "Name of the BackendBucket resource to patch.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -40545,7 +40991,7 @@ func (c *BackendBucketsUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, // "backendBucket": { // "description": "Name of the BackendBucket resource to update.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -41139,7 +41585,7 @@ func (c *BackendServicesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation // "backendService": { // "description": "Name of the BackendService resource to delete.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -41472,7 +41918,7 @@ func (c *BackendServicesGetCall) Do(opts ...googleapi.CallOption) (*BackendServi // "backendService": { // "description": "Name of the BackendService resource to return.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -41622,7 +42068,7 @@ func (c *BackendServicesGetHealthCall) Do(opts ...googleapi.CallOption) (*Backen // "backendService": { // "description": "Name of the BackendService resource to which the queried instance belongs.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -42721,7 +43167,7 @@ func (c *BackendServicesUpdateCall) Do(opts ...googleapi.CallOption) (*Operation // "backendService": { // "description": "Name of the BackendService resource to update.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -43141,7 +43587,7 @@ func (c *DiskTypesGetCall) Do(opts ...googleapi.CallOption) (*DiskType, error) { // "diskType": { // "description": "Name of the disk type to return.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -45922,6 +46368,1045 @@ func (c *DisksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPer } +// method id "compute.externalVpnGateways.delete": + +type ExternalVpnGatewaysDeleteCall struct { + s *Service + project string + externalVpnGateway string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes the specified externalVpnGateway. +func (r *ExternalVpnGatewaysService) Delete(project string, externalVpnGateway string) *ExternalVpnGatewaysDeleteCall { + c := &ExternalVpnGatewaysDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.externalVpnGateway = externalVpnGateway + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *ExternalVpnGatewaysDeleteCall) RequestId(requestId string) *ExternalVpnGatewaysDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ExternalVpnGatewaysDeleteCall) Fields(s ...googleapi.Field) *ExternalVpnGatewaysDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ExternalVpnGatewaysDeleteCall) Context(ctx context.Context) *ExternalVpnGatewaysDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ExternalVpnGatewaysDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ExternalVpnGatewaysDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/externalVpnGateways/{externalVpnGateway}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "externalVpnGateway": c.externalVpnGateway, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.externalVpnGateways.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ExternalVpnGatewaysDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes the specified externalVpnGateway.", + // "httpMethod": "DELETE", + // "id": "compute.externalVpnGateways.delete", + // "parameterOrder": [ + // "project", + // "externalVpnGateway" + // ], + // "parameters": { + // "externalVpnGateway": { + // "description": "Name of the externalVpnGateways to delete.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "{project}/global/externalVpnGateways/{externalVpnGateway}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.externalVpnGateways.get": + +type ExternalVpnGatewaysGetCall struct { + s *Service + project string + externalVpnGateway string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Returns the specified externalVpnGateway. Get a list of +// available externalVpnGateways by making a list() request. +func (r *ExternalVpnGatewaysService) Get(project string, externalVpnGateway string) *ExternalVpnGatewaysGetCall { + c := &ExternalVpnGatewaysGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.externalVpnGateway = externalVpnGateway + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ExternalVpnGatewaysGetCall) Fields(s ...googleapi.Field) *ExternalVpnGatewaysGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ExternalVpnGatewaysGetCall) IfNoneMatch(entityTag string) *ExternalVpnGatewaysGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ExternalVpnGatewaysGetCall) Context(ctx context.Context) *ExternalVpnGatewaysGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ExternalVpnGatewaysGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ExternalVpnGatewaysGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/externalVpnGateways/{externalVpnGateway}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "externalVpnGateway": c.externalVpnGateway, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.externalVpnGateways.get" call. +// Exactly one of *ExternalVpnGateway or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ExternalVpnGateway.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ExternalVpnGatewaysGetCall) Do(opts ...googleapi.CallOption) (*ExternalVpnGateway, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &ExternalVpnGateway{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns the specified externalVpnGateway. Get a list of available externalVpnGateways by making a list() request.", + // "httpMethod": "GET", + // "id": "compute.externalVpnGateways.get", + // "parameterOrder": [ + // "project", + // "externalVpnGateway" + // ], + // "parameters": { + // "externalVpnGateway": { + // "description": "Name of the externalVpnGateway to return.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/global/externalVpnGateways/{externalVpnGateway}", + // "response": { + // "$ref": "ExternalVpnGateway" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.externalVpnGateways.insert": + +type ExternalVpnGatewaysInsertCall struct { + s *Service + project string + externalvpngateway *ExternalVpnGateway + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Insert: Creates a ExternalVpnGateway in the specified project using +// the data included in the request. +func (r *ExternalVpnGatewaysService) Insert(project string, externalvpngateway *ExternalVpnGateway) *ExternalVpnGatewaysInsertCall { + c := &ExternalVpnGatewaysInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.externalvpngateway = externalvpngateway + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *ExternalVpnGatewaysInsertCall) RequestId(requestId string) *ExternalVpnGatewaysInsertCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ExternalVpnGatewaysInsertCall) Fields(s ...googleapi.Field) *ExternalVpnGatewaysInsertCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ExternalVpnGatewaysInsertCall) Context(ctx context.Context) *ExternalVpnGatewaysInsertCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ExternalVpnGatewaysInsertCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ExternalVpnGatewaysInsertCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.externalvpngateway) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/externalVpnGateways") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.externalVpnGateways.insert" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ExternalVpnGatewaysInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a ExternalVpnGateway in the specified project using the data included in the request.", + // "httpMethod": "POST", + // "id": "compute.externalVpnGateways.insert", + // "parameterOrder": [ + // "project" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "{project}/global/externalVpnGateways", + // "request": { + // "$ref": "ExternalVpnGateway" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.externalVpnGateways.list": + +type ExternalVpnGatewaysListCall struct { + s *Service + project string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Retrieves the list of ExternalVpnGateway available to the +// specified project. +func (r *ExternalVpnGatewaysService) List(project string) *ExternalVpnGatewaysListCall { + c := &ExternalVpnGatewaysListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. The expression must specify +// the field name, a comparison operator, and the value that you want to +// use for filtering. The value must be a string, a number, or a +// boolean. The comparison operator must be either =, !=, >, or <. +// +// For example, if you are filtering Compute Engine instances, you can +// exclude instances named example-instance by specifying name != +// example-instance. +// +// You can also filter nested fields. For example, you could specify +// scheduling.automaticRestart = false to include instances only if they +// are not scheduled for automatic restarts. You can use filtering on +// nested fields to filter based on resource labels. +// +// To filter on multiple expressions, provide each separate expression +// within parentheses. For example, (scheduling.automaticRestart = true) +// (cpuPlatform = "Intel Skylake"). By default, each expression is an +// AND expression. However, you can include AND and OR expressions +// explicitly. For example, (cpuPlatform = "Intel Skylake") OR +// (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = +// true). +func (c *ExternalVpnGatewaysListCall) Filter(filter string) *ExternalVpnGatewaysListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum +// number of results per page that should be returned. If the number of +// available results is larger than maxResults, Compute Engine returns a +// nextPageToken that can be used to get the next page of results in +// subsequent list requests. Acceptable values are 0 to 500, inclusive. +// (Default: 500) +func (c *ExternalVpnGatewaysListCall) MaxResults(maxResults int64) *ExternalVpnGatewaysListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, results are returned in alphanumerical +// order based on the resource name. +// +// You can also sort results in descending order based on the creation +// timestamp using orderBy="creationTimestamp desc". This sorts results +// based on the creationTimestamp field in reverse chronological order +// (newest result first). Use this to sort resources like operations so +// that the newest operation is returned first. +// +// Currently, only sorting by name or creationTimestamp desc is +// supported. +func (c *ExternalVpnGatewaysListCall) OrderBy(orderBy string) *ExternalVpnGatewaysListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page +// token to use. Set pageToken to the nextPageToken returned by a +// previous list request to get the next page of results. +func (c *ExternalVpnGatewaysListCall) PageToken(pageToken string) *ExternalVpnGatewaysListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ExternalVpnGatewaysListCall) Fields(s ...googleapi.Field) *ExternalVpnGatewaysListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ExternalVpnGatewaysListCall) IfNoneMatch(entityTag string) *ExternalVpnGatewaysListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ExternalVpnGatewaysListCall) Context(ctx context.Context) *ExternalVpnGatewaysListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ExternalVpnGatewaysListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ExternalVpnGatewaysListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/externalVpnGateways") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.externalVpnGateways.list" call. +// Exactly one of *ExternalVpnGatewayList or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ExternalVpnGatewayList.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ExternalVpnGatewaysListCall) Do(opts ...googleapi.CallOption) (*ExternalVpnGatewayList, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &ExternalVpnGatewayList{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves the list of ExternalVpnGateway available to the specified project.", + // "httpMethod": "GET", + // "id": "compute.externalVpnGateways.list", + // "parameterOrder": [ + // "project" + // ], + // "parameters": { + // "filter": { + // "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", + // "format": "uint32", + // "location": "query", + // "minimum": "0", + // "type": "integer" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageToken": { + // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/global/externalVpnGateways", + // "response": { + // "$ref": "ExternalVpnGatewayList" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ExternalVpnGatewaysListCall) Pages(ctx context.Context, f func(*ExternalVpnGatewayList) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "compute.externalVpnGateways.setLabels": + +type ExternalVpnGatewaysSetLabelsCall struct { + s *Service + project string + resource string + globalsetlabelsrequest *GlobalSetLabelsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetLabels: Sets the labels on an ExternalVpnGateway. To learn more +// about labels, read the Labeling Resources documentation. +func (r *ExternalVpnGatewaysService) SetLabels(project string, resource string, globalsetlabelsrequest *GlobalSetLabelsRequest) *ExternalVpnGatewaysSetLabelsCall { + c := &ExternalVpnGatewaysSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.resource = resource + c.globalsetlabelsrequest = globalsetlabelsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ExternalVpnGatewaysSetLabelsCall) Fields(s ...googleapi.Field) *ExternalVpnGatewaysSetLabelsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ExternalVpnGatewaysSetLabelsCall) Context(ctx context.Context) *ExternalVpnGatewaysSetLabelsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ExternalVpnGatewaysSetLabelsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ExternalVpnGatewaysSetLabelsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.globalsetlabelsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/externalVpnGateways/{resource}/setLabels") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.externalVpnGateways.setLabels" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ExternalVpnGatewaysSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Sets the labels on an ExternalVpnGateway. To learn more about labels, read the Labeling Resources documentation.", + // "httpMethod": "POST", + // "id": "compute.externalVpnGateways.setLabels", + // "parameterOrder": [ + // "project", + // "resource" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "resource": { + // "description": "Name or id of the resource for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/global/externalVpnGateways/{resource}/setLabels", + // "request": { + // "$ref": "GlobalSetLabelsRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.externalVpnGateways.testIamPermissions": + +type ExternalVpnGatewaysTestIamPermissionsCall struct { + s *Service + project string + resource string + testpermissionsrequest *TestPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TestIamPermissions: Returns permissions that a caller has on the +// specified resource. +func (r *ExternalVpnGatewaysService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *ExternalVpnGatewaysTestIamPermissionsCall { + c := &ExternalVpnGatewaysTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.resource = resource + c.testpermissionsrequest = testpermissionsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ExternalVpnGatewaysTestIamPermissionsCall) Fields(s ...googleapi.Field) *ExternalVpnGatewaysTestIamPermissionsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ExternalVpnGatewaysTestIamPermissionsCall) Context(ctx context.Context) *ExternalVpnGatewaysTestIamPermissionsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ExternalVpnGatewaysTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ExternalVpnGatewaysTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/externalVpnGateways/{resource}/testIamPermissions") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.externalVpnGateways.testIamPermissions" call. +// Exactly one of *TestPermissionsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *TestPermissionsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ExternalVpnGatewaysTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &TestPermissionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns permissions that a caller has on the specified resource.", + // "httpMethod": "POST", + // "id": "compute.externalVpnGateways.testIamPermissions", + // "parameterOrder": [ + // "project", + // "resource" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "resource": { + // "description": "Name or id of the resource for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/global/externalVpnGateways/{resource}/testIamPermissions", + // "request": { + // "$ref": "TestPermissionsRequest" + // }, + // "response": { + // "$ref": "TestPermissionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + // method id "compute.firewalls.delete": type FirewallsDeleteCall struct { @@ -47560,7 +49045,7 @@ func (c *ForwardingRulesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation // "forwardingRule": { // "description": "Name of the ForwardingRule resource to delete.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -47731,7 +49216,7 @@ func (c *ForwardingRulesGetCall) Do(opts ...googleapi.CallOption) (*ForwardingRu // "forwardingRule": { // "description": "Name of the ForwardingRule resource to return.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -48203,6 +49688,194 @@ func (c *ForwardingRulesListCall) Pages(ctx context.Context, f func(*ForwardingR } } +// method id "compute.forwardingRules.patch": + +type ForwardingRulesPatchCall struct { + s *Service + project string + region string + forwardingRule string + forwardingrule *ForwardingRule + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the specified forwarding rule with the data included +// in the request. This method supports PATCH semantics and uses the +// JSON merge patch format and processing rules. Currently, you can only +// patch the network_tier field. +func (r *ForwardingRulesService) Patch(project string, region string, forwardingRule string, forwardingrule *ForwardingRule) *ForwardingRulesPatchCall { + c := &ForwardingRulesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.forwardingRule = forwardingRule + c.forwardingrule = forwardingrule + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *ForwardingRulesPatchCall) RequestId(requestId string) *ForwardingRulesPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ForwardingRulesPatchCall) Fields(s ...googleapi.Field) *ForwardingRulesPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ForwardingRulesPatchCall) Context(ctx context.Context) *ForwardingRulesPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ForwardingRulesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ForwardingRulesPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.forwardingrule) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/forwardingRules/{forwardingRule}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "forwardingRule": c.forwardingRule, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.forwardingRules.patch" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ForwardingRulesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates the specified forwarding rule with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. Currently, you can only patch the network_tier field.", + // "httpMethod": "PATCH", + // "id": "compute.forwardingRules.patch", + // "parameterOrder": [ + // "project", + // "region", + // "forwardingRule" + // ], + // "parameters": { + // "forwardingRule": { + // "description": "Name of the ForwardingRule resource to patch.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/forwardingRules/{forwardingRule}", + // "request": { + // "$ref": "ForwardingRule" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + // method id "compute.forwardingRules.setLabels": type ForwardingRulesSetLabelsCall struct { @@ -48537,7 +50210,7 @@ func (c *ForwardingRulesSetTargetCall) Do(opts ...googleapi.CallOption) (*Operat // "forwardingRule": { // "description": "Name of the ForwardingRule resource in which target is to be set.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -48875,7 +50548,7 @@ func (c *GlobalAddressesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation // "address": { // "description": "Name of the address resource to delete.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -49036,7 +50709,7 @@ func (c *GlobalAddressesGetCall) Do(opts ...googleapi.CallOption) (*Address, err // "address": { // "description": "Name of the address resource to return.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -49917,7 +51590,7 @@ func (c *GlobalForwardingRulesDeleteCall) Do(opts ...googleapi.CallOption) (*Ope // "forwardingRule": { // "description": "Name of the ForwardingRule resource to delete.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -50078,7 +51751,7 @@ func (c *GlobalForwardingRulesGetCall) Do(opts ...googleapi.CallOption) (*Forwar // "forwardingRule": { // "description": "Name of the ForwardingRule resource to return.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -50521,6 +52194,183 @@ func (c *GlobalForwardingRulesListCall) Pages(ctx context.Context, f func(*Forwa } } +// method id "compute.globalForwardingRules.patch": + +type GlobalForwardingRulesPatchCall struct { + s *Service + project string + forwardingRule string + forwardingrule *ForwardingRule + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the specified forwarding rule with the data included +// in the request. This method supports PATCH semantics and uses the +// JSON merge patch format and processing rules. Currently, you can only +// patch the network_tier field. +func (r *GlobalForwardingRulesService) Patch(project string, forwardingRule string, forwardingrule *ForwardingRule) *GlobalForwardingRulesPatchCall { + c := &GlobalForwardingRulesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.forwardingRule = forwardingRule + c.forwardingrule = forwardingrule + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *GlobalForwardingRulesPatchCall) RequestId(requestId string) *GlobalForwardingRulesPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *GlobalForwardingRulesPatchCall) Fields(s ...googleapi.Field) *GlobalForwardingRulesPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *GlobalForwardingRulesPatchCall) Context(ctx context.Context) *GlobalForwardingRulesPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *GlobalForwardingRulesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *GlobalForwardingRulesPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.forwardingrule) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/forwardingRules/{forwardingRule}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "forwardingRule": c.forwardingRule, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.globalForwardingRules.patch" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *GlobalForwardingRulesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates the specified forwarding rule with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. Currently, you can only patch the network_tier field.", + // "httpMethod": "PATCH", + // "id": "compute.globalForwardingRules.patch", + // "parameterOrder": [ + // "project", + // "forwardingRule" + // ], + // "parameters": { + // "forwardingRule": { + // "description": "Name of the ForwardingRule resource to patch.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "{project}/global/forwardingRules/{forwardingRule}", + // "request": { + // "$ref": "ForwardingRule" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + // method id "compute.globalForwardingRules.setLabels": type GlobalForwardingRulesSetLabelsCall struct { @@ -50816,7 +52666,7 @@ func (c *GlobalForwardingRulesSetTargetCall) Do(opts ...googleapi.CallOption) (* // "forwardingRule": { // "description": "Name of the ForwardingRule resource in which target is to be set.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -51344,7 +53194,7 @@ func (c *GlobalOperationsDeleteCall) Do(opts ...googleapi.CallOption) error { // "operation": { // "description": "Name of the Operations resource to delete.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -51497,7 +53347,7 @@ func (c *GlobalOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, // "operation": { // "description": "Name of the Operations resource to return.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -51910,7 +53760,7 @@ func (c *HealthChecksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, e // "healthCheck": { // "description": "Name of the HealthCheck resource to delete.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -52070,7 +53920,7 @@ func (c *HealthChecksGetCall) Do(opts ...googleapi.CallOption) (*HealthCheck, er // "healthCheck": { // "description": "Name of the HealthCheck resource to return.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -52655,7 +54505,7 @@ func (c *HealthChecksPatchCall) Do(opts ...googleapi.CallOption) (*Operation, er // "healthCheck": { // "description": "Name of the HealthCheck resource to patch.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -52982,7 +54832,7 @@ func (c *HealthChecksUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, e // "healthCheck": { // "description": "Name of the HealthCheck resource to update.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -53150,7 +55000,7 @@ func (c *HttpHealthChecksDeleteCall) Do(opts ...googleapi.CallOption) (*Operatio // "httpHealthCheck": { // "description": "Name of the HttpHealthCheck resource to delete.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -53311,7 +55161,7 @@ func (c *HttpHealthChecksGetCall) Do(opts ...googleapi.CallOption) (*HttpHealthC // "httpHealthCheck": { // "description": "Name of the HttpHealthCheck resource to return.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -53899,7 +55749,7 @@ func (c *HttpHealthChecksPatchCall) Do(opts ...googleapi.CallOption) (*Operation // "httpHealthCheck": { // "description": "Name of the HttpHealthCheck resource to patch.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -54227,7 +56077,7 @@ func (c *HttpHealthChecksUpdateCall) Do(opts ...googleapi.CallOption) (*Operatio // "httpHealthCheck": { // "description": "Name of the HttpHealthCheck resource to update.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -54394,7 +56244,7 @@ func (c *HttpsHealthChecksDeleteCall) Do(opts ...googleapi.CallOption) (*Operati // "httpsHealthCheck": { // "description": "Name of the HttpsHealthCheck resource to delete.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -54554,7 +56404,7 @@ func (c *HttpsHealthChecksGetCall) Do(opts ...googleapi.CallOption) (*HttpsHealt // "httpsHealthCheck": { // "description": "Name of the HttpsHealthCheck resource to return.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -55139,7 +56989,7 @@ func (c *HttpsHealthChecksPatchCall) Do(opts ...googleapi.CallOption) (*Operatio // "httpsHealthCheck": { // "description": "Name of the HttpsHealthCheck resource to patch.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -55466,7 +57316,7 @@ func (c *HttpsHealthChecksUpdateCall) Do(opts ...googleapi.CallOption) (*Operati // "httpsHealthCheck": { // "description": "Name of the HttpsHealthCheck resource to update.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -57654,6 +59504,167 @@ func (c *InstanceGroupManagersAggregatedListCall) Pages(ctx context.Context, f f } } +// method id "compute.instanceGroupManagers.applyUpdatesToInstances": + +type InstanceGroupManagersApplyUpdatesToInstancesCall struct { + s *Service + project string + zone string + instanceGroupManager string + instancegroupmanagersapplyupdatesrequest *InstanceGroupManagersApplyUpdatesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// ApplyUpdatesToInstances: Apply changes to selected instances on the +// managed instance group. This method can be used to apply new +// overrides and/or new versions. +func (r *InstanceGroupManagersService) ApplyUpdatesToInstances(project string, zone string, instanceGroupManager string, instancegroupmanagersapplyupdatesrequest *InstanceGroupManagersApplyUpdatesRequest) *InstanceGroupManagersApplyUpdatesToInstancesCall { + c := &InstanceGroupManagersApplyUpdatesToInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + c.instanceGroupManager = instanceGroupManager + c.instancegroupmanagersapplyupdatesrequest = instancegroupmanagersapplyupdatesrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *InstanceGroupManagersApplyUpdatesToInstancesCall) Fields(s ...googleapi.Field) *InstanceGroupManagersApplyUpdatesToInstancesCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *InstanceGroupManagersApplyUpdatesToInstancesCall) Context(ctx context.Context) *InstanceGroupManagersApplyUpdatesToInstancesCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *InstanceGroupManagersApplyUpdatesToInstancesCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *InstanceGroupManagersApplyUpdatesToInstancesCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanagersapplyupdatesrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/applyUpdatesToInstances") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "zone": c.zone, + "instanceGroupManager": c.instanceGroupManager, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.instanceGroupManagers.applyUpdatesToInstances" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *InstanceGroupManagersApplyUpdatesToInstancesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Apply changes to selected instances on the managed instance group. This method can be used to apply new overrides and/or new versions.", + // "httpMethod": "POST", + // "id": "compute.instanceGroupManagers.applyUpdatesToInstances", + // "parameterOrder": [ + // "project", + // "zone", + // "instanceGroupManager" + // ], + // "parameters": { + // "instanceGroupManager": { + // "description": "The name of the managed instance group, should conform to RFC1035.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "zone": { + // "description": "The name of the zone where the managed instance group is located. Should conform to RFC1035.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/applyUpdatesToInstances", + // "request": { + // "$ref": "InstanceGroupManagersApplyUpdatesRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + // method id "compute.instanceGroupManagers.delete": type InstanceGroupManagersDeleteCall struct { @@ -62622,8 +64633,8 @@ type InstanceTemplatesDeleteCall struct { } // Delete: Deletes the specified instance template. Deleting an instance -// template is permanent and cannot be undone. It's not possible to -// delete templates which are in use by an instance group. +// template is permanent and cannot be undone. It is not possible to +// delete templates that are already in use by a managed instance group. // For details, see https://cloud.google.com/compute/docs/reference/latest/instanceTemplates/delete func (r *InstanceTemplatesService) Delete(project string, instanceTemplate string) *InstanceTemplatesDeleteCall { c := &InstanceTemplatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -62737,7 +64748,7 @@ func (c *InstanceTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*Operati } return ret, nil // { - // "description": "Deletes the specified instance template. Deleting an instance template is permanent and cannot be undone. It's not possible to delete templates which are in use by an instance group.", + // "description": "Deletes the specified instance template. Deleting an instance template is permanent and cannot be undone. It is not possible to delete templates that are already in use by a managed instance group.", // "httpMethod": "DELETE", // "id": "compute.instanceTemplates.delete", // "parameterOrder": [ @@ -62748,7 +64759,7 @@ func (c *InstanceTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*Operati // "instanceTemplate": { // "description": "The name of the instance template to delete.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -62909,7 +64920,7 @@ func (c *InstanceTemplatesGetCall) Do(opts ...googleapi.CallOption) (*InstanceTe // "instanceTemplate": { // "description": "The name of the instance template.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -63270,7 +65281,7 @@ type InstanceTemplatesListCall struct { } // List: Retrieves a list of instance templates that are contained -// within the specified project and zone. +// within the specified project. // For details, see https://cloud.google.com/compute/docs/reference/latest/instanceTemplates/list func (r *InstanceTemplatesService) List(project string) *InstanceTemplatesListCall { c := &InstanceTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -63439,7 +65450,7 @@ func (c *InstanceTemplatesListCall) Do(opts ...googleapi.CallOption) (*InstanceT } return ret, nil // { - // "description": "Retrieves a list of instance templates that are contained within the specified project and zone.", + // "description": "Retrieves a list of instance templates that are contained within the specified project.", // "httpMethod": "GET", // "id": "compute.instanceTemplates.list", // "parameterOrder": [ @@ -64291,7 +66302,7 @@ func (r *InstancesService) AttachDisk(project string, zone string, instance stri // ForceAttach sets the optional parameter "forceAttach": Whether to // force attach the disk even if it's currently attached to another -// instance. This is only available for regional disks. +// instance. func (c *InstancesAttachDiskCall) ForceAttach(forceAttach bool) *InstancesAttachDiskCall { c.urlParams_.Set("forceAttach", fmt.Sprint(forceAttach)) return c @@ -64418,7 +66429,7 @@ func (c *InstancesAttachDiskCall) Do(opts ...googleapi.CallOption) (*Operation, // ], // "parameters": { // "forceAttach": { - // "description": "Whether to force attach the disk even if it's currently attached to another instance. This is only available for regional disks.", + // "description": "Whether to force attach the disk even if it's currently attached to another instance.", // "location": "query", // "type": "boolean" // }, @@ -65744,6 +67755,173 @@ func (c *InstancesGetSerialPortOutputCall) Do(opts ...googleapi.CallOption) (*Se } +// method id "compute.instances.getShieldedInstanceIdentity": + +type InstancesGetShieldedInstanceIdentityCall struct { + s *Service + project string + zone string + instance string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetShieldedInstanceIdentity: Returns the Shielded Instance Identity +// of an instance +func (r *InstancesService) GetShieldedInstanceIdentity(project string, zone string, instance string) *InstancesGetShieldedInstanceIdentityCall { + c := &InstancesGetShieldedInstanceIdentityCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + c.instance = instance + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *InstancesGetShieldedInstanceIdentityCall) Fields(s ...googleapi.Field) *InstancesGetShieldedInstanceIdentityCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *InstancesGetShieldedInstanceIdentityCall) IfNoneMatch(entityTag string) *InstancesGetShieldedInstanceIdentityCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *InstancesGetShieldedInstanceIdentityCall) Context(ctx context.Context) *InstancesGetShieldedInstanceIdentityCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *InstancesGetShieldedInstanceIdentityCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *InstancesGetShieldedInstanceIdentityCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/getShieldedInstanceIdentity") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "zone": c.zone, + "instance": c.instance, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.instances.getShieldedInstanceIdentity" call. +// Exactly one of *ShieldedInstanceIdentity or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *ShieldedInstanceIdentity.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *InstancesGetShieldedInstanceIdentityCall) Do(opts ...googleapi.CallOption) (*ShieldedInstanceIdentity, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &ShieldedInstanceIdentity{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns the Shielded Instance Identity of an instance", + // "httpMethod": "GET", + // "id": "compute.instances.getShieldedInstanceIdentity", + // "parameterOrder": [ + // "project", + // "zone", + // "instance" + // ], + // "parameters": { + // "instance": { + // "description": "Name or id of the instance scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "zone": { + // "description": "The name of the zone for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/zones/{zone}/instances/{instance}/getShieldedInstanceIdentity", + // "response": { + // "$ref": "ShieldedInstanceIdentity" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + // method id "compute.instances.getShieldedVmIdentity": type InstancesGetShieldedVmIdentityCall struct { @@ -66658,8 +68836,9 @@ type InstancesResetCall struct { header_ http.Header } -// Reset: Performs a reset on the instance. For more information, see -// Resetting an instance. +// Reset: Performs a reset on the instance. This is a hard reset the VM +// does not do a graceful shutdown. For more information, see Resetting +// an instance. // For details, see https://cloud.google.com/compute/docs/reference/latest/instances/reset func (r *InstancesService) Reset(project string, zone string, instance string) *InstancesResetCall { c := &InstancesResetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -66775,7 +68954,7 @@ func (c *InstancesResetCall) Do(opts ...googleapi.CallOption) (*Operation, error } return ret, nil // { - // "description": "Performs a reset on the instance. For more information, see Resetting an instance.", + // "description": "Performs a reset on the instance. This is a hard reset the VM does not do a graceful shutdown. For more information, see Resetting an instance.", // "httpMethod": "POST", // "id": "compute.instances.reset", // "parameterOrder": [ @@ -68859,6 +71038,194 @@ func (c *InstancesSetServiceAccountCall) Do(opts ...googleapi.CallOption) (*Oper } +// method id "compute.instances.setShieldedInstanceIntegrityPolicy": + +type InstancesSetShieldedInstanceIntegrityPolicyCall struct { + s *Service + project string + zone string + instance string + shieldedinstanceintegritypolicy *ShieldedInstanceIntegrityPolicy + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetShieldedInstanceIntegrityPolicy: Sets the Shielded Instance +// integrity policy for an instance. You can only use this method on a +// running instance. This method supports PATCH semantics and uses the +// JSON merge patch format and processing rules. +func (r *InstancesService) SetShieldedInstanceIntegrityPolicy(project string, zone string, instance string, shieldedinstanceintegritypolicy *ShieldedInstanceIntegrityPolicy) *InstancesSetShieldedInstanceIntegrityPolicyCall { + c := &InstancesSetShieldedInstanceIntegrityPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + c.instance = instance + c.shieldedinstanceintegritypolicy = shieldedinstanceintegritypolicy + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *InstancesSetShieldedInstanceIntegrityPolicyCall) RequestId(requestId string) *InstancesSetShieldedInstanceIntegrityPolicyCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *InstancesSetShieldedInstanceIntegrityPolicyCall) Fields(s ...googleapi.Field) *InstancesSetShieldedInstanceIntegrityPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *InstancesSetShieldedInstanceIntegrityPolicyCall) Context(ctx context.Context) *InstancesSetShieldedInstanceIntegrityPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *InstancesSetShieldedInstanceIntegrityPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *InstancesSetShieldedInstanceIntegrityPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.shieldedinstanceintegritypolicy) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/setShieldedInstanceIntegrityPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "zone": c.zone, + "instance": c.instance, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.instances.setShieldedInstanceIntegrityPolicy" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *InstancesSetShieldedInstanceIntegrityPolicyCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Sets the Shielded Instance integrity policy for an instance. You can only use this method on a running instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + // "httpMethod": "PATCH", + // "id": "compute.instances.setShieldedInstanceIntegrityPolicy", + // "parameterOrder": [ + // "project", + // "zone", + // "instance" + // ], + // "parameters": { + // "instance": { + // "description": "Name or id of the instance scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "zone": { + // "description": "The name of the zone for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/zones/{zone}/instances/{instance}/setShieldedInstanceIntegrityPolicy", + // "request": { + // "$ref": "ShieldedInstanceIntegrityPolicy" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + // method id "compute.instances.setShieldedVmIntegrityPolicy": type InstancesSetShieldedVmIntegrityPolicyCall struct { @@ -70865,6 +73232,194 @@ func (c *InstancesUpdateNetworkInterfaceCall) Do(opts ...googleapi.CallOption) ( } +// method id "compute.instances.updateShieldedInstanceConfig": + +type InstancesUpdateShieldedInstanceConfigCall struct { + s *Service + project string + zone string + instance string + shieldedinstanceconfig *ShieldedInstanceConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// UpdateShieldedInstanceConfig: Updates the Shielded Instance config +// for an instance. You can only use this method on a stopped instance. +// This method supports PATCH semantics and uses the JSON merge patch +// format and processing rules. +func (r *InstancesService) UpdateShieldedInstanceConfig(project string, zone string, instance string, shieldedinstanceconfig *ShieldedInstanceConfig) *InstancesUpdateShieldedInstanceConfigCall { + c := &InstancesUpdateShieldedInstanceConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + c.instance = instance + c.shieldedinstanceconfig = shieldedinstanceconfig + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *InstancesUpdateShieldedInstanceConfigCall) RequestId(requestId string) *InstancesUpdateShieldedInstanceConfigCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *InstancesUpdateShieldedInstanceConfigCall) Fields(s ...googleapi.Field) *InstancesUpdateShieldedInstanceConfigCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *InstancesUpdateShieldedInstanceConfigCall) Context(ctx context.Context) *InstancesUpdateShieldedInstanceConfigCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *InstancesUpdateShieldedInstanceConfigCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *InstancesUpdateShieldedInstanceConfigCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.shieldedinstanceconfig) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/updateShieldedInstanceConfig") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "zone": c.zone, + "instance": c.instance, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.instances.updateShieldedInstanceConfig" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *InstancesUpdateShieldedInstanceConfigCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates the Shielded Instance config for an instance. You can only use this method on a stopped instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + // "httpMethod": "PATCH", + // "id": "compute.instances.updateShieldedInstanceConfig", + // "parameterOrder": [ + // "project", + // "zone", + // "instance" + // ], + // "parameters": { + // "instance": { + // "description": "Name or id of the instance scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "zone": { + // "description": "The name of the zone for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/zones/{zone}/instances/{instance}/updateShieldedInstanceConfig", + // "request": { + // "$ref": "ShieldedInstanceConfig" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + // method id "compute.instances.updateShieldedVmConfig": type InstancesUpdateShieldedVmConfigCall struct { @@ -71445,7 +74000,7 @@ func (c *InterconnectAttachmentsDeleteCall) Do(opts ...googleapi.CallOption) (*O // "interconnectAttachment": { // "description": "Name of the interconnect attachment to delete.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -71615,7 +74170,7 @@ func (c *InterconnectAttachmentsGetCall) Do(opts ...googleapi.CallOption) (*Inte // "interconnectAttachment": { // "description": "Name of the interconnect attachment to return.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -72233,7 +74788,7 @@ func (c *InterconnectAttachmentsPatchCall) Do(opts ...googleapi.CallOption) (*Op // "interconnectAttachment": { // "description": "Name of the interconnect attachment to patch.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -72753,7 +75308,7 @@ func (c *InterconnectLocationsGetCall) Do(opts ...googleapi.CallOption) (*Interc // "interconnectLocation": { // "description": "Name of the interconnect location to return.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -73165,7 +75720,7 @@ func (c *InterconnectsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, // "interconnect": { // "description": "Name of the interconnect to delete.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -73325,7 +75880,7 @@ func (c *InterconnectsGetCall) Do(opts ...googleapi.CallOption) (*Interconnect, // "interconnect": { // "description": "Name of the interconnect to return.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -73482,7 +76037,7 @@ func (c *InterconnectsGetDiagnosticsCall) Do(opts ...googleapi.CallOption) (*Int // "interconnect": { // "description": "Name of the interconnect resource to query.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -74067,7 +76622,7 @@ func (c *InterconnectsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, e // "interconnect": { // "description": "Name of the interconnect to update.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -74693,7 +77248,7 @@ func (c *LicensesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error // "license": { // "description": "Name of the license resource to delete.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -74853,7 +77408,7 @@ func (c *LicensesGetCall) Do(opts ...googleapi.CallOption) (*License, error) { // "license": { // "description": "Name of the License resource to return.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -74878,6 +77433,162 @@ func (c *LicensesGetCall) Do(opts ...googleapi.CallOption) (*License, error) { } +// method id "compute.licenses.getIamPolicy": + +type LicensesGetIamPolicyCall struct { + s *Service + project string + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetIamPolicy: Gets the access control policy for a resource. May be +// empty if no such policy or resource exists. +func (r *LicensesService) GetIamPolicy(project string, resource string) *LicensesGetIamPolicyCall { + c := &LicensesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.resource = resource + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *LicensesGetIamPolicyCall) Fields(s ...googleapi.Field) *LicensesGetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *LicensesGetIamPolicyCall) IfNoneMatch(entityTag string) *LicensesGetIamPolicyCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *LicensesGetIamPolicyCall) Context(ctx context.Context) *LicensesGetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *LicensesGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *LicensesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/licenses/{resource}/getIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.licenses.getIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *LicensesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + // "httpMethod": "GET", + // "id": "compute.licenses.getIamPolicy", + // "parameterOrder": [ + // "project", + // "resource" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "resource": { + // "description": "Name or id of the resource for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/global/licenses/{resource}/getIamPolicy", + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + // method id "compute.licenses.insert": type LicensesInsertCall struct { @@ -75839,7 +78550,7 @@ func (c *MachineTypesGetCall) Do(opts ...googleapi.CallOption) (*MachineType, er // "machineType": { // "description": "Name of the machine type to return.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -79126,7 +81837,7 @@ func (c *NetworksListPeeringRoutesCall) Do(opts ...googleapi.CallOption) (*Excha // "network": { // "description": "Name of the network for this request.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, // "type": "string" // }, @@ -80182,7 +82893,7 @@ func (c *NodeGroupsAddNodesCall) Do(opts ...googleapi.CallOption) (*Operation, e // "nodeGroup": { // "description": "Name of the NodeGroup resource.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -80612,7 +83323,7 @@ func (c *NodeGroupsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, err // "nodeGroup": { // "description": "Name of the NodeGroup resource to delete.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -80794,7 +83505,7 @@ func (c *NodeGroupsDeleteNodesCall) Do(opts ...googleapi.CallOption) (*Operation // "nodeGroup": { // "description": "Name of the NodeGroup resource to delete.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -80969,7 +83680,7 @@ func (c *NodeGroupsGetCall) Do(opts ...googleapi.CallOption) (*NodeGroup, error) // "nodeGroup": { // "description": "Name of the node group to return.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -81812,7 +84523,7 @@ func (c *NodeGroupsListNodesCall) Do(opts ...googleapi.CallOption) (*NodeGroupsL // "nodeGroup": { // "description": "Name of the NodeGroup resource whose nodes you want to list.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -82181,9 +84892,9 @@ func (c *NodeGroupsSetNodeTemplateCall) Do(opts ...googleapi.CallOption) (*Opera // ], // "parameters": { // "nodeGroup": { - // "description": "Name of the NodeGroup resource to delete.", + // "description": "Name of the NodeGroup resource to update.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -82775,7 +85486,7 @@ func (c *NodeTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, // "nodeTemplate": { // "description": "Name of the NodeTemplate resource to delete.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -82946,7 +85657,7 @@ func (c *NodeTemplatesGetCall) Do(opts ...googleapi.CallOption) (*NodeTemplate, // "nodeTemplate": { // "description": "Name of the node template to return.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -84294,7 +87005,7 @@ func (c *NodeTypesGetCall) Do(opts ...googleapi.CallOption) (*NodeType, error) { // "nodeType": { // "description": "Name of the node type to return.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -86978,7 +89689,7 @@ func (c *RegionAutoscalersDeleteCall) Do(opts ...googleapi.CallOption) (*Operati // "autoscaler": { // "description": "Name of the autoscaler to delete.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -87148,7 +89859,7 @@ func (c *RegionAutoscalersGetCall) Do(opts ...googleapi.CallOption) (*Autoscaler // "autoscaler": { // "description": "Name of the autoscaler to return.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -87769,7 +90480,7 @@ func (c *RegionAutoscalersPatchCall) Do(opts ...googleapi.CallOption) (*Operatio // "autoscaler": { // "description": "Name of the autoscaler to patch.", // "location": "query", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "type": "string" // }, // "project": { @@ -88120,7 +90831,7 @@ func (c *RegionAutoscalersUpdateCall) Do(opts ...googleapi.CallOption) (*Operati // "autoscaler": { // "description": "Name of the autoscaler to update.", // "location": "query", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "type": "string" // }, // "project": { @@ -88297,7 +91008,7 @@ func (c *RegionBackendServicesDeleteCall) Do(opts ...googleapi.CallOption) (*Ope // "backendService": { // "description": "Name of the BackendService resource to delete.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -88467,7 +91178,7 @@ func (c *RegionBackendServicesGetCall) Do(opts ...googleapi.CallOption) (*Backen // "backendService": { // "description": "Name of the BackendService resource to return.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -88627,7 +91338,7 @@ func (c *RegionBackendServicesGetHealthCall) Do(opts ...googleapi.CallOption) (* // "backendService": { // "description": "Name of the BackendService resource for which to get health.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -89604,7 +92315,7 @@ func (c *RegionBackendServicesUpdateCall) Do(opts ...googleapi.CallOption) (*Ope // "backendService": { // "description": "Name of the BackendService resource to update.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -90029,7 +92740,7 @@ func (c *RegionCommitmentsGetCall) Do(opts ...googleapi.CallOption) (*Commitment // "commitment": { // "description": "Name of the commitment to return.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -90499,6 +93210,192 @@ func (c *RegionCommitmentsListCall) Pages(ctx context.Context, f func(*Commitmen } } +// method id "compute.regionCommitments.updateReservations": + +type RegionCommitmentsUpdateReservationsCall struct { + s *Service + project string + region string + commitment string + regioncommitmentsupdatereservationsrequest *RegionCommitmentsUpdateReservationsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// UpdateReservations: Update the shape of reservations for GPUS/Local +// SSDs of reservations within the commitments. +func (r *RegionCommitmentsService) UpdateReservations(project string, region string, commitment string, regioncommitmentsupdatereservationsrequest *RegionCommitmentsUpdateReservationsRequest) *RegionCommitmentsUpdateReservationsCall { + c := &RegionCommitmentsUpdateReservationsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.commitment = commitment + c.regioncommitmentsupdatereservationsrequest = regioncommitmentsupdatereservationsrequest + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *RegionCommitmentsUpdateReservationsCall) RequestId(requestId string) *RegionCommitmentsUpdateReservationsCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *RegionCommitmentsUpdateReservationsCall) Fields(s ...googleapi.Field) *RegionCommitmentsUpdateReservationsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *RegionCommitmentsUpdateReservationsCall) Context(ctx context.Context) *RegionCommitmentsUpdateReservationsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *RegionCommitmentsUpdateReservationsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionCommitmentsUpdateReservationsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.regioncommitmentsupdatereservationsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/commitments/{commitment}/updateReservations") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "commitment": c.commitment, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionCommitments.updateReservations" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *RegionCommitmentsUpdateReservationsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Update the shape of reservations for GPUS/Local SSDs of reservations within the commitments.", + // "httpMethod": "POST", + // "id": "compute.regionCommitments.updateReservations", + // "parameterOrder": [ + // "project", + // "region", + // "commitment" + // ], + // "parameters": { + // "commitment": { + // "description": "Name of the commitment of which the reservation's capacities are being updated.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/commitments/{commitment}/updateReservations", + // "request": { + // "$ref": "RegionCommitmentsUpdateReservationsRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + // method id "compute.regionDiskTypes.get": type RegionDiskTypesGetCall struct { @@ -90634,7 +93531,7 @@ func (c *RegionDiskTypesGetCall) Do(opts ...googleapi.CallOption) (*DiskType, er // "diskType": { // "description": "Name of the disk type to return.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -91644,6 +94541,173 @@ func (c *RegionDisksGetCall) Do(opts ...googleapi.CallOption) (*Disk, error) { } +// method id "compute.regionDisks.getIamPolicy": + +type RegionDisksGetIamPolicyCall struct { + s *Service + project string + region string + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetIamPolicy: Gets the access control policy for a resource. May be +// empty if no such policy or resource exists. +func (r *RegionDisksService) GetIamPolicy(project string, region string, resource string) *RegionDisksGetIamPolicyCall { + c := &RegionDisksGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.resource = resource + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *RegionDisksGetIamPolicyCall) Fields(s ...googleapi.Field) *RegionDisksGetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *RegionDisksGetIamPolicyCall) IfNoneMatch(entityTag string) *RegionDisksGetIamPolicyCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *RegionDisksGetIamPolicyCall) Context(ctx context.Context) *RegionDisksGetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *RegionDisksGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionDisksGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/disks/{resource}/getIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionDisks.getIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *RegionDisksGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + // "httpMethod": "GET", + // "id": "compute.regionDisks.getIamPolicy", + // "parameterOrder": [ + // "project", + // "region", + // "resource" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "The name of the region for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "resource": { + // "description": "Name or id of the resource for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/disks/{resource}/getIamPolicy", + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + // method id "compute.regionDisks.insert": type RegionDisksInsertCall struct { @@ -92465,6 +95529,168 @@ func (c *RegionDisksResizeCall) Do(opts ...googleapi.CallOption) (*Operation, er } +// method id "compute.regionDisks.setIamPolicy": + +type RegionDisksSetIamPolicyCall struct { + s *Service + project string + region string + resource string + regionsetpolicyrequest *RegionSetPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetIamPolicy: Sets the access control policy on the specified +// resource. Replaces any existing policy. +func (r *RegionDisksService) SetIamPolicy(project string, region string, resource string, regionsetpolicyrequest *RegionSetPolicyRequest) *RegionDisksSetIamPolicyCall { + c := &RegionDisksSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.resource = resource + c.regionsetpolicyrequest = regionsetpolicyrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *RegionDisksSetIamPolicyCall) Fields(s ...googleapi.Field) *RegionDisksSetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *RegionDisksSetIamPolicyCall) Context(ctx context.Context) *RegionDisksSetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *RegionDisksSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionDisksSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.regionsetpolicyrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/disks/{resource}/setIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionDisks.setIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *RegionDisksSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + // "httpMethod": "POST", + // "id": "compute.regionDisks.setIamPolicy", + // "parameterOrder": [ + // "project", + // "region", + // "resource" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "The name of the region for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "resource": { + // "description": "Name or id of the resource for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/disks/{resource}/setIamPolicy", + // "request": { + // "$ref": "RegionSetPolicyRequest" + // }, + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + // method id "compute.regionDisks.setLabels": type RegionDisksSetLabelsCall struct { @@ -93012,6 +96238,166 @@ func (c *RegionInstanceGroupManagersAbandonInstancesCall) Do(opts ...googleapi.C } +// method id "compute.regionInstanceGroupManagers.applyUpdatesToInstances": + +type RegionInstanceGroupManagersApplyUpdatesToInstancesCall struct { + s *Service + project string + region string + instanceGroupManager string + regioninstancegroupmanagersapplyupdatesrequest *RegionInstanceGroupManagersApplyUpdatesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// ApplyUpdatesToInstances: Apply updates to selected instances the +// managed instance group. +func (r *RegionInstanceGroupManagersService) ApplyUpdatesToInstances(project string, region string, instanceGroupManager string, regioninstancegroupmanagersapplyupdatesrequest *RegionInstanceGroupManagersApplyUpdatesRequest) *RegionInstanceGroupManagersApplyUpdatesToInstancesCall { + c := &RegionInstanceGroupManagersApplyUpdatesToInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.instanceGroupManager = instanceGroupManager + c.regioninstancegroupmanagersapplyupdatesrequest = regioninstancegroupmanagersapplyupdatesrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *RegionInstanceGroupManagersApplyUpdatesToInstancesCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersApplyUpdatesToInstancesCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *RegionInstanceGroupManagersApplyUpdatesToInstancesCall) Context(ctx context.Context) *RegionInstanceGroupManagersApplyUpdatesToInstancesCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *RegionInstanceGroupManagersApplyUpdatesToInstancesCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionInstanceGroupManagersApplyUpdatesToInstancesCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.regioninstancegroupmanagersapplyupdatesrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/applyUpdatesToInstances") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "instanceGroupManager": c.instanceGroupManager, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionInstanceGroupManagers.applyUpdatesToInstances" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *RegionInstanceGroupManagersApplyUpdatesToInstancesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Apply updates to selected instances the managed instance group.", + // "httpMethod": "POST", + // "id": "compute.regionInstanceGroupManagers.applyUpdatesToInstances", + // "parameterOrder": [ + // "project", + // "region", + // "instanceGroupManager" + // ], + // "parameters": { + // "instanceGroupManager": { + // "description": "The name of the managed instance group, should conform to RFC1035.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region scoping this request, should conform to RFC1035.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/applyUpdatesToInstances", + // "request": { + // "$ref": "RegionInstanceGroupManagersApplyUpdatesRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + // method id "compute.regionInstanceGroupManagers.delete": type RegionInstanceGroupManagersDeleteCall struct { @@ -96881,7 +100267,7 @@ func (c *RegionOperationsDeleteCall) Do(opts ...googleapi.CallOption) error { // "operation": { // "description": "Name of the Operations resource to delete.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -97044,7 +100430,7 @@ func (c *RegionOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, // "operation": { // "description": "Name of the Operations resource to return.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -97479,7 +100865,7 @@ func (c *RegionsGetCall) Do(opts ...googleapi.CallOption) (*Region, error) { // "region": { // "description": "Name of the region resource to return.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -97750,6 +101136,1713 @@ func (c *RegionsListCall) Pages(ctx context.Context, f func(*RegionList) error) } } +// method id "compute.reservations.aggregatedList": + +type ReservationsAggregatedListCall struct { + s *Service + project string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// AggregatedList: Retrieves an aggregated list of reservations. +func (r *ReservationsService) AggregatedList(project string) *ReservationsAggregatedListCall { + c := &ReservationsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. The expression must specify +// the field name, a comparison operator, and the value that you want to +// use for filtering. The value must be a string, a number, or a +// boolean. The comparison operator must be either =, !=, >, or <. +// +// For example, if you are filtering Compute Engine instances, you can +// exclude instances named example-instance by specifying name != +// example-instance. +// +// You can also filter nested fields. For example, you could specify +// scheduling.automaticRestart = false to include instances only if they +// are not scheduled for automatic restarts. You can use filtering on +// nested fields to filter based on resource labels. +// +// To filter on multiple expressions, provide each separate expression +// within parentheses. For example, (scheduling.automaticRestart = true) +// (cpuPlatform = "Intel Skylake"). By default, each expression is an +// AND expression. However, you can include AND and OR expressions +// explicitly. For example, (cpuPlatform = "Intel Skylake") OR +// (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = +// true). +func (c *ReservationsAggregatedListCall) Filter(filter string) *ReservationsAggregatedListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum +// number of results per page that should be returned. If the number of +// available results is larger than maxResults, Compute Engine returns a +// nextPageToken that can be used to get the next page of results in +// subsequent list requests. Acceptable values are 0 to 500, inclusive. +// (Default: 500) +func (c *ReservationsAggregatedListCall) MaxResults(maxResults int64) *ReservationsAggregatedListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, results are returned in alphanumerical +// order based on the resource name. +// +// You can also sort results in descending order based on the creation +// timestamp using orderBy="creationTimestamp desc". This sorts results +// based on the creationTimestamp field in reverse chronological order +// (newest result first). Use this to sort resources like operations so +// that the newest operation is returned first. +// +// Currently, only sorting by name or creationTimestamp desc is +// supported. +func (c *ReservationsAggregatedListCall) OrderBy(orderBy string) *ReservationsAggregatedListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page +// token to use. Set pageToken to the nextPageToken returned by a +// previous list request to get the next page of results. +func (c *ReservationsAggregatedListCall) PageToken(pageToken string) *ReservationsAggregatedListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ReservationsAggregatedListCall) Fields(s ...googleapi.Field) *ReservationsAggregatedListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ReservationsAggregatedListCall) IfNoneMatch(entityTag string) *ReservationsAggregatedListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ReservationsAggregatedListCall) Context(ctx context.Context) *ReservationsAggregatedListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ReservationsAggregatedListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ReservationsAggregatedListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/reservations") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.reservations.aggregatedList" call. +// Exactly one of *ReservationAggregatedList or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *ReservationAggregatedList.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ReservationsAggregatedListCall) Do(opts ...googleapi.CallOption) (*ReservationAggregatedList, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &ReservationAggregatedList{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves an aggregated list of reservations.", + // "httpMethod": "GET", + // "id": "compute.reservations.aggregatedList", + // "parameterOrder": [ + // "project" + // ], + // "parameters": { + // "filter": { + // "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", + // "format": "uint32", + // "location": "query", + // "minimum": "0", + // "type": "integer" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageToken": { + // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/aggregated/reservations", + // "response": { + // "$ref": "ReservationAggregatedList" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ReservationsAggregatedListCall) Pages(ctx context.Context, f func(*ReservationAggregatedList) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "compute.reservations.delete": + +type ReservationsDeleteCall struct { + s *Service + project string + zone string + reservation string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes the specified reservation. +func (r *ReservationsService) Delete(project string, zone string, reservation string) *ReservationsDeleteCall { + c := &ReservationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + c.reservation = reservation + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *ReservationsDeleteCall) RequestId(requestId string) *ReservationsDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ReservationsDeleteCall) Fields(s ...googleapi.Field) *ReservationsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ReservationsDeleteCall) Context(ctx context.Context) *ReservationsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ReservationsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ReservationsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/reservations/{reservation}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "zone": c.zone, + "reservation": c.reservation, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.reservations.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ReservationsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes the specified reservation.", + // "httpMethod": "DELETE", + // "id": "compute.reservations.delete", + // "parameterOrder": [ + // "project", + // "zone", + // "reservation" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "reservation": { + // "description": "Name of the reservation to delete.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // }, + // "zone": { + // "description": "Name of the zone for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/zones/{zone}/reservations/{reservation}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.reservations.get": + +type ReservationsGetCall struct { + s *Service + project string + zone string + reservation string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Retrieves all information of the specified reservation. +func (r *ReservationsService) Get(project string, zone string, reservation string) *ReservationsGetCall { + c := &ReservationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + c.reservation = reservation + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ReservationsGetCall) Fields(s ...googleapi.Field) *ReservationsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ReservationsGetCall) IfNoneMatch(entityTag string) *ReservationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ReservationsGetCall) Context(ctx context.Context) *ReservationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ReservationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ReservationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/reservations/{reservation}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "zone": c.zone, + "reservation": c.reservation, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.reservations.get" call. +// Exactly one of *Reservation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Reservation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ReservationsGetCall) Do(opts ...googleapi.CallOption) (*Reservation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Reservation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves all information of the specified reservation.", + // "httpMethod": "GET", + // "id": "compute.reservations.get", + // "parameterOrder": [ + // "project", + // "zone", + // "reservation" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "reservation": { + // "description": "Name of the reservation to retrieve.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // }, + // "zone": { + // "description": "Name of the zone for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/zones/{zone}/reservations/{reservation}", + // "response": { + // "$ref": "Reservation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.reservations.getIamPolicy": + +type ReservationsGetIamPolicyCall struct { + s *Service + project string + zone string + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetIamPolicy: Gets the access control policy for a resource. May be +// empty if no such policy or resource exists. +func (r *ReservationsService) GetIamPolicy(project string, zone string, resource string) *ReservationsGetIamPolicyCall { + c := &ReservationsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + c.resource = resource + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ReservationsGetIamPolicyCall) Fields(s ...googleapi.Field) *ReservationsGetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ReservationsGetIamPolicyCall) IfNoneMatch(entityTag string) *ReservationsGetIamPolicyCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ReservationsGetIamPolicyCall) Context(ctx context.Context) *ReservationsGetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ReservationsGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ReservationsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/reservations/{resource}/getIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "zone": c.zone, + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.reservations.getIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ReservationsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + // "httpMethod": "GET", + // "id": "compute.reservations.getIamPolicy", + // "parameterOrder": [ + // "project", + // "zone", + // "resource" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "resource": { + // "description": "Name or id of the resource for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // }, + // "zone": { + // "description": "The name of the zone for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/zones/{zone}/reservations/{resource}/getIamPolicy", + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.reservations.insert": + +type ReservationsInsertCall struct { + s *Service + project string + zone string + reservation *Reservation + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Insert: Creates a new reservation. +func (r *ReservationsService) Insert(project string, zone string, reservation *Reservation) *ReservationsInsertCall { + c := &ReservationsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + c.reservation = reservation + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *ReservationsInsertCall) RequestId(requestId string) *ReservationsInsertCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ReservationsInsertCall) Fields(s ...googleapi.Field) *ReservationsInsertCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ReservationsInsertCall) Context(ctx context.Context) *ReservationsInsertCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ReservationsInsertCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ReservationsInsertCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.reservation) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/reservations") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "zone": c.zone, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.reservations.insert" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ReservationsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a new reservation.", + // "httpMethod": "POST", + // "id": "compute.reservations.insert", + // "parameterOrder": [ + // "project", + // "zone" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "zone": { + // "description": "Name of the zone for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/zones/{zone}/reservations", + // "request": { + // "$ref": "Reservation" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.reservations.list": + +type ReservationsListCall struct { + s *Service + project string + zone string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: A list all the reservations that have been configured for the +// specified project in specified zone. +func (r *ReservationsService) List(project string, zone string) *ReservationsListCall { + c := &ReservationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. The expression must specify +// the field name, a comparison operator, and the value that you want to +// use for filtering. The value must be a string, a number, or a +// boolean. The comparison operator must be either =, !=, >, or <. +// +// For example, if you are filtering Compute Engine instances, you can +// exclude instances named example-instance by specifying name != +// example-instance. +// +// You can also filter nested fields. For example, you could specify +// scheduling.automaticRestart = false to include instances only if they +// are not scheduled for automatic restarts. You can use filtering on +// nested fields to filter based on resource labels. +// +// To filter on multiple expressions, provide each separate expression +// within parentheses. For example, (scheduling.automaticRestart = true) +// (cpuPlatform = "Intel Skylake"). By default, each expression is an +// AND expression. However, you can include AND and OR expressions +// explicitly. For example, (cpuPlatform = "Intel Skylake") OR +// (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = +// true). +func (c *ReservationsListCall) Filter(filter string) *ReservationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum +// number of results per page that should be returned. If the number of +// available results is larger than maxResults, Compute Engine returns a +// nextPageToken that can be used to get the next page of results in +// subsequent list requests. Acceptable values are 0 to 500, inclusive. +// (Default: 500) +func (c *ReservationsListCall) MaxResults(maxResults int64) *ReservationsListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, results are returned in alphanumerical +// order based on the resource name. +// +// You can also sort results in descending order based on the creation +// timestamp using orderBy="creationTimestamp desc". This sorts results +// based on the creationTimestamp field in reverse chronological order +// (newest result first). Use this to sort resources like operations so +// that the newest operation is returned first. +// +// Currently, only sorting by name or creationTimestamp desc is +// supported. +func (c *ReservationsListCall) OrderBy(orderBy string) *ReservationsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page +// token to use. Set pageToken to the nextPageToken returned by a +// previous list request to get the next page of results. +func (c *ReservationsListCall) PageToken(pageToken string) *ReservationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ReservationsListCall) Fields(s ...googleapi.Field) *ReservationsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ReservationsListCall) IfNoneMatch(entityTag string) *ReservationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ReservationsListCall) Context(ctx context.Context) *ReservationsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ReservationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ReservationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/reservations") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "zone": c.zone, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.reservations.list" call. +// Exactly one of *ReservationList or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *ReservationList.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ReservationsListCall) Do(opts ...googleapi.CallOption) (*ReservationList, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &ReservationList{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "A list all the reservations that have been configured for the specified project in specified zone.", + // "httpMethod": "GET", + // "id": "compute.reservations.list", + // "parameterOrder": [ + // "project", + // "zone" + // ], + // "parameters": { + // "filter": { + // "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", + // "format": "uint32", + // "location": "query", + // "minimum": "0", + // "type": "integer" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageToken": { + // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "zone": { + // "description": "Name of the zone for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/zones/{zone}/reservations", + // "response": { + // "$ref": "ReservationList" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ReservationsListCall) Pages(ctx context.Context, f func(*ReservationList) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "compute.reservations.resize": + +type ReservationsResizeCall struct { + s *Service + project string + zone string + reservation string + reservationsresizerequest *ReservationsResizeRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Resize: Resizes the reservation (applicable to standalone +// reservations only) +func (r *ReservationsService) Resize(project string, zone string, reservation string, reservationsresizerequest *ReservationsResizeRequest) *ReservationsResizeCall { + c := &ReservationsResizeCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + c.reservation = reservation + c.reservationsresizerequest = reservationsresizerequest + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *ReservationsResizeCall) RequestId(requestId string) *ReservationsResizeCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ReservationsResizeCall) Fields(s ...googleapi.Field) *ReservationsResizeCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ReservationsResizeCall) Context(ctx context.Context) *ReservationsResizeCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ReservationsResizeCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ReservationsResizeCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.reservationsresizerequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/reservations/{reservation}/resize") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "zone": c.zone, + "reservation": c.reservation, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.reservations.resize" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ReservationsResizeCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Resizes the reservation (applicable to standalone reservations only)", + // "httpMethod": "POST", + // "id": "compute.reservations.resize", + // "parameterOrder": [ + // "project", + // "zone", + // "reservation" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "reservation": { + // "description": "Name of the reservation to update.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "zone": { + // "description": "Name of the zone for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/zones/{zone}/reservations/{reservation}/resize", + // "request": { + // "$ref": "ReservationsResizeRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.reservations.setIamPolicy": + +type ReservationsSetIamPolicyCall struct { + s *Service + project string + zone string + resource string + zonesetpolicyrequest *ZoneSetPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetIamPolicy: Sets the access control policy on the specified +// resource. Replaces any existing policy. +func (r *ReservationsService) SetIamPolicy(project string, zone string, resource string, zonesetpolicyrequest *ZoneSetPolicyRequest) *ReservationsSetIamPolicyCall { + c := &ReservationsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + c.resource = resource + c.zonesetpolicyrequest = zonesetpolicyrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ReservationsSetIamPolicyCall) Fields(s ...googleapi.Field) *ReservationsSetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ReservationsSetIamPolicyCall) Context(ctx context.Context) *ReservationsSetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ReservationsSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ReservationsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.zonesetpolicyrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/reservations/{resource}/setIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "zone": c.zone, + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.reservations.setIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ReservationsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + // "httpMethod": "POST", + // "id": "compute.reservations.setIamPolicy", + // "parameterOrder": [ + // "project", + // "zone", + // "resource" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "resource": { + // "description": "Name or id of the resource for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // }, + // "zone": { + // "description": "The name of the zone for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/zones/{zone}/reservations/{resource}/setIamPolicy", + // "request": { + // "$ref": "ZoneSetPolicyRequest" + // }, + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.reservations.testIamPermissions": + +type ReservationsTestIamPermissionsCall struct { + s *Service + project string + zone string + resource string + testpermissionsrequest *TestPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TestIamPermissions: Returns permissions that a caller has on the +// specified resource. +func (r *ReservationsService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *ReservationsTestIamPermissionsCall { + c := &ReservationsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + c.resource = resource + c.testpermissionsrequest = testpermissionsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ReservationsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ReservationsTestIamPermissionsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ReservationsTestIamPermissionsCall) Context(ctx context.Context) *ReservationsTestIamPermissionsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ReservationsTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ReservationsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/reservations/{resource}/testIamPermissions") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "zone": c.zone, + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.reservations.testIamPermissions" call. +// Exactly one of *TestPermissionsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *TestPermissionsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ReservationsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &TestPermissionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns permissions that a caller has on the specified resource.", + // "httpMethod": "POST", + // "id": "compute.reservations.testIamPermissions", + // "parameterOrder": [ + // "project", + // "zone", + // "resource" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "resource": { + // "description": "Name or id of the resource for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // }, + // "zone": { + // "description": "The name of the zone for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/zones/{zone}/reservations/{resource}/testIamPermissions", + // "request": { + // "$ref": "TestPermissionsRequest" + // }, + // "response": { + // "$ref": "TestPermissionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + // method id "compute.resourcePolicies.aggregatedList": type ResourcePoliciesAggregatedListCall struct { @@ -98159,7 +103252,7 @@ func (c *ResourcePoliciesDeleteCall) Do(opts ...googleapi.CallOption) (*Operatio // "resourcePolicy": { // "description": "Name of the resource policy to delete.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -98324,7 +103417,7 @@ func (c *ResourcePoliciesGetCall) Do(opts ...googleapi.CallOption) (*ResourcePol // "resourcePolicy": { // "description": "Name of the resource policy to retrieve.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -99351,7 +104444,7 @@ func (c *RoutersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) // "router": { // "description": "Name of the Router resource to delete.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -99517,7 +104610,7 @@ func (c *RoutersGetCall) Do(opts ...googleapi.CallOption) (*Router, error) { // "router": { // "description": "Name of the Router resource to return.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -99770,7 +104863,7 @@ func (c *RoutersGetNatMappingInfoCall) Do(opts ...googleapi.CallOption) (*VmEndp // "router": { // "description": "Name of the Router resource to query for Nat Mapping information of VM endpoints.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -99958,7 +105051,7 @@ func (c *RoutersGetRouterStatusCall) Do(opts ...googleapi.CallOption) (*RouterSt // "router": { // "description": "Name of the Router resource to query.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -100581,7 +105674,7 @@ func (c *RoutersPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) // "router": { // "description": "Name of the Router resource to patch.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -100744,7 +105837,7 @@ func (c *RoutersPreviewCall) Do(opts ...googleapi.CallOption) (*RoutersPreviewRe // "router": { // "description": "Name of the Router resource to query.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -101094,7 +106187,7 @@ func (c *RoutersUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) // "router": { // "description": "Name of the Router resource to update.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -102143,7 +107236,7 @@ func (c *SecurityPoliciesAddRuleCall) Do(opts ...googleapi.CallOption) (*Operati // "securityPolicy": { // "description": "Name of the security policy to update.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -102315,7 +107408,7 @@ func (c *SecurityPoliciesDeleteCall) Do(opts ...googleapi.CallOption) (*Operatio // "securityPolicy": { // "description": "Name of the security policy to delete.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -102470,7 +107563,7 @@ func (c *SecurityPoliciesGetCall) Do(opts ...googleapi.CallOption) (*SecurityPol // "securityPolicy": { // "description": "Name of the security policy to get.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -102638,7 +107731,7 @@ func (c *SecurityPoliciesGetRuleCall) Do(opts ...googleapi.CallOption) (*Securit // "securityPolicy": { // "description": "Name of the security policy to which the queried rule belongs.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -103472,7 +108565,7 @@ func (c *SecurityPoliciesPatchCall) Do(opts ...googleapi.CallOption) (*Operation // "securityPolicy": { // "description": "Name of the security policy to update.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -103642,7 +108735,7 @@ func (c *SecurityPoliciesPatchRuleCall) Do(opts ...googleapi.CallOption) (*Opera // "securityPolicy": { // "description": "Name of the security policy to update.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -103803,7 +108896,7 @@ func (c *SecurityPoliciesRemoveRuleCall) Do(opts ...googleapi.CallOption) (*Oper // "securityPolicy": { // "description": "Name of the security policy to update.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -105461,7 +110554,7 @@ func (c *SslCertificatesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation // "sslCertificate": { // "description": "Name of the SslCertificate resource to delete.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -105616,7 +110709,7 @@ func (c *SslCertificatesGetCall) Do(opts ...googleapi.CallOption) (*SslCertifica // "sslCertificate": { // "description": "Name of the SslCertificate resource to return.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -107906,7 +112999,7 @@ func (c *SubnetworksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, er // "subnetwork": { // "description": "Name of the Subnetwork resource to delete.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -108089,7 +113182,7 @@ func (c *SubnetworksExpandIpCidrRangeCall) Do(opts ...googleapi.CallOption) (*Op // "subnetwork": { // "description": "Name of the Subnetwork resource to update.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -108258,7 +113351,7 @@ func (c *SubnetworksGetCall) Do(opts ...googleapi.CallOption) (*Subnetwork, erro // "subnetwork": { // "description": "Name of the Subnetwork resource to return.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -109300,7 +114393,7 @@ func (c *SubnetworksPatchCall) Do(opts ...googleapi.CallOption) (*Operation, err // "subnetwork": { // "description": "Name of the Subnetwork resource to patch.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -109649,7 +114742,7 @@ func (c *SubnetworksSetPrivateIpGoogleAccessCall) Do(opts ...googleapi.CallOptio // "subnetwork": { // "description": "Name of the Subnetwork resource.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -109980,7 +115073,7 @@ func (c *TargetHttpProxiesDeleteCall) Do(opts ...googleapi.CallOption) (*Operati // "targetHttpProxy": { // "description": "Name of the TargetHttpProxy resource to delete.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -110136,7 +115229,7 @@ func (c *TargetHttpProxiesGetCall) Do(opts ...googleapi.CallOption) (*TargetHttp // "targetHttpProxy": { // "description": "Name of the TargetHttpProxy resource to return.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -110727,7 +115820,7 @@ func (c *TargetHttpProxiesSetUrlMapCall) Do(opts ...googleapi.CallOption) (*Oper // "targetHttpProxy": { // "description": "Name of the TargetHttpProxy to set a URL map for.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -111046,7 +116139,7 @@ func (c *TargetHttpsProxiesDeleteCall) Do(opts ...googleapi.CallOption) (*Operat // "targetHttpsProxy": { // "description": "Name of the TargetHttpsProxy resource to delete.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -111201,7 +116294,7 @@ func (c *TargetHttpsProxiesGetCall) Do(opts ...googleapi.CallOption) (*TargetHtt // "targetHttpsProxy": { // "description": "Name of the TargetHttpsProxy resource to return.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -111962,7 +117055,7 @@ func (c *TargetHttpsProxiesSetSslCertificatesCall) Do(opts ...googleapi.CallOpti // "targetHttpsProxy": { // "description": "Name of the TargetHttpsProxy resource to set an SslCertificates resource for.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -112313,7 +117406,7 @@ func (c *TargetHttpsProxiesSetUrlMapCall) Do(opts ...googleapi.CallOption) (*Ope // "targetHttpsProxy": { // "description": "Name of the TargetHttpsProxy resource whose URL map is to be set.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -112889,7 +117982,7 @@ func (c *TargetInstancesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation // "targetInstance": { // "description": "Name of the TargetInstance resource to delete.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -113056,7 +118149,7 @@ func (c *TargetInstancesGetCall) Do(opts ...googleapi.CallOption) (*TargetInstan // "targetInstance": { // "description": "Name of the TargetInstance resource to return.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -113850,7 +118943,7 @@ func (c *TargetPoolsAddHealthCheckCall) Do(opts ...googleapi.CallOption) (*Opera // "targetPool": { // "description": "Name of the target pool to add a health check to.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -114036,7 +119129,7 @@ func (c *TargetPoolsAddInstanceCall) Do(opts ...googleapi.CallOption) (*Operatio // "targetPool": { // "description": "Name of the TargetPool resource to add instances to.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -114467,7 +119560,7 @@ func (c *TargetPoolsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, er // "targetPool": { // "description": "Name of the TargetPool resource to delete.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -114634,7 +119727,7 @@ func (c *TargetPoolsGetCall) Do(opts ...googleapi.CallOption) (*TargetPool, erro // "targetPool": { // "description": "Name of the TargetPool resource to return.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -114795,7 +119888,7 @@ func (c *TargetPoolsGetHealthCall) Do(opts ...googleapi.CallOption) (*TargetPool // "targetPool": { // "description": "Name of the TargetPool resource to which the queried instance belongs.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -115422,7 +120515,7 @@ func (c *TargetPoolsRemoveHealthCheckCall) Do(opts ...googleapi.CallOption) (*Op // "targetPool": { // "description": "Name of the target pool to remove health checks from.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -115608,7 +120701,7 @@ func (c *TargetPoolsRemoveInstanceCall) Do(opts ...googleapi.CallOption) (*Opera // "targetPool": { // "description": "Name of the TargetPool resource to remove instances from.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -115807,7 +120900,7 @@ func (c *TargetPoolsSetBackupCall) Do(opts ...googleapi.CallOption) (*Operation, // "targetPool": { // "description": "Name of the TargetPool resource to set a backup pool for.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -116137,7 +121230,7 @@ func (c *TargetSslProxiesDeleteCall) Do(opts ...googleapi.CallOption) (*Operatio // "targetSslProxy": { // "description": "Name of the TargetSslProxy resource to delete.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -116292,7 +121385,7 @@ func (c *TargetSslProxiesGetCall) Do(opts ...googleapi.CallOption) (*TargetSslPr // "targetSslProxy": { // "description": "Name of the TargetSslProxy resource to return.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -116880,7 +121973,7 @@ func (c *TargetSslProxiesSetBackendServiceCall) Do(opts ...googleapi.CallOption) // "targetSslProxy": { // "description": "Name of the TargetSslProxy resource whose BackendService resource is to be set.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -117054,7 +122147,7 @@ func (c *TargetSslProxiesSetProxyHeaderCall) Do(opts ...googleapi.CallOption) (* // "targetSslProxy": { // "description": "Name of the TargetSslProxy resource whose ProxyHeader is to be set.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -117228,7 +122321,7 @@ func (c *TargetSslProxiesSetSslCertificatesCall) Do(opts ...googleapi.CallOption // "targetSslProxy": { // "description": "Name of the TargetSslProxy resource whose SslCertificate resource is to be set.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -117723,7 +122816,7 @@ func (c *TargetTcpProxiesDeleteCall) Do(opts ...googleapi.CallOption) (*Operatio // "targetTcpProxy": { // "description": "Name of the TargetTcpProxy resource to delete.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -117878,7 +122971,7 @@ func (c *TargetTcpProxiesGetCall) Do(opts ...googleapi.CallOption) (*TargetTcpPr // "targetTcpProxy": { // "description": "Name of the TargetTcpProxy resource to return.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -118466,7 +123559,7 @@ func (c *TargetTcpProxiesSetBackendServiceCall) Do(opts ...googleapi.CallOption) // "targetTcpProxy": { // "description": "Name of the TargetTcpProxy resource whose BackendService resource is to be set.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -118640,7 +123733,7 @@ func (c *TargetTcpProxiesSetProxyHeaderCall) Do(opts ...googleapi.CallOption) (* // "targetTcpProxy": { // "description": "Name of the TargetTcpProxy resource whose ProxyHeader is to be set.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -119069,7 +124162,7 @@ func (c *TargetVpnGatewaysDeleteCall) Do(opts ...googleapi.CallOption) (*Operati // "targetVpnGateway": { // "description": "Name of the target VPN gateway to delete.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -119235,7 +124328,7 @@ func (c *TargetVpnGatewaysGetCall) Do(opts ...googleapi.CallOption) (*TargetVpnG // "targetVpnGateway": { // "description": "Name of the target VPN gateway to return.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -120188,7 +125281,7 @@ func (c *UrlMapsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) // "urlMap": { // "description": "Name of the UrlMap resource to delete.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -120344,7 +125437,7 @@ func (c *UrlMapsGetCall) Do(opts ...googleapi.CallOption) (*UrlMap, error) { // "urlMap": { // "description": "Name of the UrlMap resource to return.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -120682,7 +125775,7 @@ func (c *UrlMapsInvalidateCacheCall) Do(opts ...googleapi.CallOption) (*Operatio // "urlMap": { // "description": "Name of the UrlMap scoping this request.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -121112,7 +126205,7 @@ func (c *UrlMapsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) // "urlMap": { // "description": "Name of the UrlMap resource to patch.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -121440,7 +126533,7 @@ func (c *UrlMapsUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) // "urlMap": { // "description": "Name of the UrlMap resource to update.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -121593,7 +126686,7 @@ func (c *UrlMapsValidateCall) Do(opts ...googleapi.CallOption) (*UrlMapsValidate // "urlMap": { // "description": "Name of the UrlMap resource to be validated as.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -121613,6 +126706,1389 @@ func (c *UrlMapsValidateCall) Do(opts ...googleapi.CallOption) (*UrlMapsValidate } +// method id "compute.vpnGateways.aggregatedList": + +type VpnGatewaysAggregatedListCall struct { + s *Service + project string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// AggregatedList: Retrieves an aggregated list of VPN gateways. +func (r *VpnGatewaysService) AggregatedList(project string) *VpnGatewaysAggregatedListCall { + c := &VpnGatewaysAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. The expression must specify +// the field name, a comparison operator, and the value that you want to +// use for filtering. The value must be a string, a number, or a +// boolean. The comparison operator must be either =, !=, >, or <. +// +// For example, if you are filtering Compute Engine instances, you can +// exclude instances named example-instance by specifying name != +// example-instance. +// +// You can also filter nested fields. For example, you could specify +// scheduling.automaticRestart = false to include instances only if they +// are not scheduled for automatic restarts. You can use filtering on +// nested fields to filter based on resource labels. +// +// To filter on multiple expressions, provide each separate expression +// within parentheses. For example, (scheduling.automaticRestart = true) +// (cpuPlatform = "Intel Skylake"). By default, each expression is an +// AND expression. However, you can include AND and OR expressions +// explicitly. For example, (cpuPlatform = "Intel Skylake") OR +// (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = +// true). +func (c *VpnGatewaysAggregatedListCall) Filter(filter string) *VpnGatewaysAggregatedListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum +// number of results per page that should be returned. If the number of +// available results is larger than maxResults, Compute Engine returns a +// nextPageToken that can be used to get the next page of results in +// subsequent list requests. Acceptable values are 0 to 500, inclusive. +// (Default: 500) +func (c *VpnGatewaysAggregatedListCall) MaxResults(maxResults int64) *VpnGatewaysAggregatedListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, results are returned in alphanumerical +// order based on the resource name. +// +// You can also sort results in descending order based on the creation +// timestamp using orderBy="creationTimestamp desc". This sorts results +// based on the creationTimestamp field in reverse chronological order +// (newest result first). Use this to sort resources like operations so +// that the newest operation is returned first. +// +// Currently, only sorting by name or creationTimestamp desc is +// supported. +func (c *VpnGatewaysAggregatedListCall) OrderBy(orderBy string) *VpnGatewaysAggregatedListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page +// token to use. Set pageToken to the nextPageToken returned by a +// previous list request to get the next page of results. +func (c *VpnGatewaysAggregatedListCall) PageToken(pageToken string) *VpnGatewaysAggregatedListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *VpnGatewaysAggregatedListCall) Fields(s ...googleapi.Field) *VpnGatewaysAggregatedListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *VpnGatewaysAggregatedListCall) IfNoneMatch(entityTag string) *VpnGatewaysAggregatedListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *VpnGatewaysAggregatedListCall) Context(ctx context.Context) *VpnGatewaysAggregatedListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *VpnGatewaysAggregatedListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *VpnGatewaysAggregatedListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/vpnGateways") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.vpnGateways.aggregatedList" call. +// Exactly one of *VpnGatewayAggregatedList or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *VpnGatewayAggregatedList.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *VpnGatewaysAggregatedListCall) Do(opts ...googleapi.CallOption) (*VpnGatewayAggregatedList, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &VpnGatewayAggregatedList{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves an aggregated list of VPN gateways.", + // "httpMethod": "GET", + // "id": "compute.vpnGateways.aggregatedList", + // "parameterOrder": [ + // "project" + // ], + // "parameters": { + // "filter": { + // "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", + // "format": "uint32", + // "location": "query", + // "minimum": "0", + // "type": "integer" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageToken": { + // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/aggregated/vpnGateways", + // "response": { + // "$ref": "VpnGatewayAggregatedList" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *VpnGatewaysAggregatedListCall) Pages(ctx context.Context, f func(*VpnGatewayAggregatedList) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "compute.vpnGateways.delete": + +type VpnGatewaysDeleteCall struct { + s *Service + project string + region string + vpnGateway string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes the specified VPN gateway. +func (r *VpnGatewaysService) Delete(project string, region string, vpnGateway string) *VpnGatewaysDeleteCall { + c := &VpnGatewaysDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.vpnGateway = vpnGateway + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *VpnGatewaysDeleteCall) RequestId(requestId string) *VpnGatewaysDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *VpnGatewaysDeleteCall) Fields(s ...googleapi.Field) *VpnGatewaysDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *VpnGatewaysDeleteCall) Context(ctx context.Context) *VpnGatewaysDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *VpnGatewaysDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *VpnGatewaysDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/vpnGateways/{vpnGateway}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "vpnGateway": c.vpnGateway, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.vpnGateways.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *VpnGatewaysDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes the specified VPN gateway.", + // "httpMethod": "DELETE", + // "id": "compute.vpnGateways.delete", + // "parameterOrder": [ + // "project", + // "region", + // "vpnGateway" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "vpnGateway": { + // "description": "Name of the VPN gateway to delete.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/vpnGateways/{vpnGateway}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.vpnGateways.get": + +type VpnGatewaysGetCall struct { + s *Service + project string + region string + vpnGateway string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Returns the specified VPN gateway. Gets a list of available VPN +// gateways by making a list() request. +func (r *VpnGatewaysService) Get(project string, region string, vpnGateway string) *VpnGatewaysGetCall { + c := &VpnGatewaysGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.vpnGateway = vpnGateway + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *VpnGatewaysGetCall) Fields(s ...googleapi.Field) *VpnGatewaysGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *VpnGatewaysGetCall) IfNoneMatch(entityTag string) *VpnGatewaysGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *VpnGatewaysGetCall) Context(ctx context.Context) *VpnGatewaysGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *VpnGatewaysGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *VpnGatewaysGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/vpnGateways/{vpnGateway}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "vpnGateway": c.vpnGateway, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.vpnGateways.get" call. +// Exactly one of *VpnGateway or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *VpnGateway.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *VpnGatewaysGetCall) Do(opts ...googleapi.CallOption) (*VpnGateway, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &VpnGateway{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns the specified VPN gateway. Gets a list of available VPN gateways by making a list() request.", + // "httpMethod": "GET", + // "id": "compute.vpnGateways.get", + // "parameterOrder": [ + // "project", + // "region", + // "vpnGateway" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "vpnGateway": { + // "description": "Name of the VPN gateway to return.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/vpnGateways/{vpnGateway}", + // "response": { + // "$ref": "VpnGateway" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.vpnGateways.getStatus": + +type VpnGatewaysGetStatusCall struct { + s *Service + project string + region string + vpnGateway string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetStatus: Returns the status for the specified VPN gateway. +func (r *VpnGatewaysService) GetStatus(project string, region string, vpnGateway string) *VpnGatewaysGetStatusCall { + c := &VpnGatewaysGetStatusCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.vpnGateway = vpnGateway + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *VpnGatewaysGetStatusCall) Fields(s ...googleapi.Field) *VpnGatewaysGetStatusCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *VpnGatewaysGetStatusCall) IfNoneMatch(entityTag string) *VpnGatewaysGetStatusCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *VpnGatewaysGetStatusCall) Context(ctx context.Context) *VpnGatewaysGetStatusCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *VpnGatewaysGetStatusCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *VpnGatewaysGetStatusCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/vpnGateways/{vpnGateway}/getStatus") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "vpnGateway": c.vpnGateway, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.vpnGateways.getStatus" call. +// Exactly one of *VpnGatewaysGetStatusResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *VpnGatewaysGetStatusResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *VpnGatewaysGetStatusCall) Do(opts ...googleapi.CallOption) (*VpnGatewaysGetStatusResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &VpnGatewaysGetStatusResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns the status for the specified VPN gateway.", + // "httpMethod": "GET", + // "id": "compute.vpnGateways.getStatus", + // "parameterOrder": [ + // "project", + // "region", + // "vpnGateway" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "vpnGateway": { + // "description": "Name of the VPN gateway to return.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/vpnGateways/{vpnGateway}/getStatus", + // "response": { + // "$ref": "VpnGatewaysGetStatusResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.vpnGateways.insert": + +type VpnGatewaysInsertCall struct { + s *Service + project string + region string + vpngateway *VpnGateway + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Insert: Creates a VPN gateway in the specified project and region +// using the data included in the request. +func (r *VpnGatewaysService) Insert(project string, region string, vpngateway *VpnGateway) *VpnGatewaysInsertCall { + c := &VpnGatewaysInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.vpngateway = vpngateway + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *VpnGatewaysInsertCall) RequestId(requestId string) *VpnGatewaysInsertCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *VpnGatewaysInsertCall) Fields(s ...googleapi.Field) *VpnGatewaysInsertCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *VpnGatewaysInsertCall) Context(ctx context.Context) *VpnGatewaysInsertCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *VpnGatewaysInsertCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *VpnGatewaysInsertCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.vpngateway) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/vpnGateways") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.vpnGateways.insert" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *VpnGatewaysInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a VPN gateway in the specified project and region using the data included in the request.", + // "httpMethod": "POST", + // "id": "compute.vpnGateways.insert", + // "parameterOrder": [ + // "project", + // "region" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/vpnGateways", + // "request": { + // "$ref": "VpnGateway" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.vpnGateways.list": + +type VpnGatewaysListCall struct { + s *Service + project string + region string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Retrieves a list of VPN gateways available to the specified +// project and region. +func (r *VpnGatewaysService) List(project string, region string) *VpnGatewaysListCall { + c := &VpnGatewaysListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. The expression must specify +// the field name, a comparison operator, and the value that you want to +// use for filtering. The value must be a string, a number, or a +// boolean. The comparison operator must be either =, !=, >, or <. +// +// For example, if you are filtering Compute Engine instances, you can +// exclude instances named example-instance by specifying name != +// example-instance. +// +// You can also filter nested fields. For example, you could specify +// scheduling.automaticRestart = false to include instances only if they +// are not scheduled for automatic restarts. You can use filtering on +// nested fields to filter based on resource labels. +// +// To filter on multiple expressions, provide each separate expression +// within parentheses. For example, (scheduling.automaticRestart = true) +// (cpuPlatform = "Intel Skylake"). By default, each expression is an +// AND expression. However, you can include AND and OR expressions +// explicitly. For example, (cpuPlatform = "Intel Skylake") OR +// (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = +// true). +func (c *VpnGatewaysListCall) Filter(filter string) *VpnGatewaysListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum +// number of results per page that should be returned. If the number of +// available results is larger than maxResults, Compute Engine returns a +// nextPageToken that can be used to get the next page of results in +// subsequent list requests. Acceptable values are 0 to 500, inclusive. +// (Default: 500) +func (c *VpnGatewaysListCall) MaxResults(maxResults int64) *VpnGatewaysListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, results are returned in alphanumerical +// order based on the resource name. +// +// You can also sort results in descending order based on the creation +// timestamp using orderBy="creationTimestamp desc". This sorts results +// based on the creationTimestamp field in reverse chronological order +// (newest result first). Use this to sort resources like operations so +// that the newest operation is returned first. +// +// Currently, only sorting by name or creationTimestamp desc is +// supported. +func (c *VpnGatewaysListCall) OrderBy(orderBy string) *VpnGatewaysListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page +// token to use. Set pageToken to the nextPageToken returned by a +// previous list request to get the next page of results. +func (c *VpnGatewaysListCall) PageToken(pageToken string) *VpnGatewaysListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *VpnGatewaysListCall) Fields(s ...googleapi.Field) *VpnGatewaysListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *VpnGatewaysListCall) IfNoneMatch(entityTag string) *VpnGatewaysListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *VpnGatewaysListCall) Context(ctx context.Context) *VpnGatewaysListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *VpnGatewaysListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *VpnGatewaysListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/vpnGateways") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.vpnGateways.list" call. +// Exactly one of *VpnGatewayList or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *VpnGatewayList.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *VpnGatewaysListCall) Do(opts ...googleapi.CallOption) (*VpnGatewayList, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &VpnGatewayList{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves a list of VPN gateways available to the specified project and region.", + // "httpMethod": "GET", + // "id": "compute.vpnGateways.list", + // "parameterOrder": [ + // "project", + // "region" + // ], + // "parameters": { + // "filter": { + // "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", + // "format": "uint32", + // "location": "query", + // "minimum": "0", + // "type": "integer" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageToken": { + // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/vpnGateways", + // "response": { + // "$ref": "VpnGatewayList" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *VpnGatewaysListCall) Pages(ctx context.Context, f func(*VpnGatewayList) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "compute.vpnGateways.setLabels": + +type VpnGatewaysSetLabelsCall struct { + s *Service + project string + region string + resource string + regionsetlabelsrequest *RegionSetLabelsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetLabels: Sets the labels on a VpnGateway. To learn more about +// labels, read the Labeling Resources documentation. +func (r *VpnGatewaysService) SetLabels(project string, region string, resource string, regionsetlabelsrequest *RegionSetLabelsRequest) *VpnGatewaysSetLabelsCall { + c := &VpnGatewaysSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.resource = resource + c.regionsetlabelsrequest = regionsetlabelsrequest + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *VpnGatewaysSetLabelsCall) RequestId(requestId string) *VpnGatewaysSetLabelsCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *VpnGatewaysSetLabelsCall) Fields(s ...googleapi.Field) *VpnGatewaysSetLabelsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *VpnGatewaysSetLabelsCall) Context(ctx context.Context) *VpnGatewaysSetLabelsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *VpnGatewaysSetLabelsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *VpnGatewaysSetLabelsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.regionsetlabelsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/vpnGateways/{resource}/setLabels") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.vpnGateways.setLabels" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *VpnGatewaysSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Sets the labels on a VpnGateway. To learn more about labels, read the Labeling Resources documentation.", + // "httpMethod": "POST", + // "id": "compute.vpnGateways.setLabels", + // "parameterOrder": [ + // "project", + // "region", + // "resource" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "The region for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "resource": { + // "description": "Name or id of the resource for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/vpnGateways/{resource}/setLabels", + // "request": { + // "$ref": "RegionSetLabelsRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + // method id "compute.vpnTunnels.aggregatedList": type VpnTunnelsAggregatedListCall struct { @@ -122022,7 +128498,7 @@ func (c *VpnTunnelsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, err // "vpnTunnel": { // "description": "Name of the VpnTunnel resource to delete.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -122188,7 +128664,7 @@ func (c *VpnTunnelsGetCall) Do(opts ...googleapi.CallOption) (*VpnTunnel, error) // "vpnTunnel": { // "description": "Name of the VpnTunnel resource to return.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -123089,7 +129565,7 @@ func (c *ZoneOperationsDeleteCall) Do(opts ...googleapi.CallOption) error { // "operation": { // "description": "Name of the Operations resource to delete.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -123252,7 +129728,7 @@ func (c *ZoneOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, er // "operation": { // "description": "Name of the Operations resource to return.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -123687,7 +130163,7 @@ func (c *ZonesGetCall) Do(opts ...googleapi.CallOption) (*Zone, error) { // "zone": { // "description": "Name of the zone resource to return.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } diff --git a/vendor/google.golang.org/api/compute/v1/compute-api.json b/vendor/google.golang.org/api/compute/v1/compute-api.json index 2b7e314e..9de328d0 100644 --- a/vendor/google.golang.org/api/compute/v1/compute-api.json +++ b/vendor/google.golang.org/api/compute/v1/compute-api.json @@ -29,7 +29,7 @@ "description": "Creates and runs virtual machines on Google Cloud Platform.", "discoveryVersion": "v1", "documentationLink": "https://developers.google.com/compute/docs/reference/latest/", - "etag": "\"J3WqvAcMk4eQjJXvfSI4Yr8VouA/m6oCgMxscM7YlnV69HIdTmFUj8g\"", + "etag": "\"VPK3KBfpaEgZ16pozGOoMYfKc0U/L7OHwc6Gh2BR8n3__eQkZu5iQsE\"", "icons": { "x16": "https://www.google.com/images/icons/product/compute_engine-16.png", "x32": "https://www.google.com/images/icons/product/compute_engine-32.png" @@ -150,7 +150,7 @@ "acceleratorType": { "description": "Name of the accelerator type to return.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -302,7 +302,7 @@ "address": { "description": "Name of the address resource to delete.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -348,7 +348,7 @@ "address": { "description": "Name of the address resource to return.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -541,7 +541,7 @@ "autoscaler": { "description": "Name of the autoscaler to delete.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -587,7 +587,7 @@ "autoscaler": { "description": "Name of the autoscaler to return.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -726,7 +726,7 @@ "autoscaler": { "description": "Name of the autoscaler to patch.", "location": "query", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "type": "string" }, "project": { @@ -773,7 +773,7 @@ "autoscaler": { "description": "Name of the autoscaler to update.", "location": "query", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "type": "string" }, "project": { @@ -864,7 +864,7 @@ "backendBucket": { "description": "Name of the BackendBucket resource to delete.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -946,7 +946,7 @@ "backendBucket": { "description": "Name of the BackendBucket resource to return.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -1062,7 +1062,7 @@ "backendBucket": { "description": "Name of the BackendBucket resource to patch.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -1103,7 +1103,7 @@ "backendBucket": { "description": "Name of the BackendBucket resource to update.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -1237,7 +1237,7 @@ "backendService": { "description": "Name of the BackendService resource to delete.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -1319,7 +1319,7 @@ "backendService": { "description": "Name of the BackendService resource to return.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -1353,7 +1353,7 @@ "backendService": { "description": "Name of the BackendService resource to which the queried instance belongs.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -1552,7 +1552,7 @@ "backendService": { "description": "Name of the BackendService resource to update.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -1647,7 +1647,7 @@ "diskType": { "description": "Name of the disk type to return.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -2564,7 +2564,7 @@ "forwardingRule": { "description": "Name of the ForwardingRule resource to delete.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -2610,7 +2610,7 @@ "forwardingRule": { "description": "Name of the ForwardingRule resource to return.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -2750,7 +2750,7 @@ "forwardingRule": { "description": "Name of the ForwardingRule resource in which target is to be set.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -2802,7 +2802,7 @@ "address": { "description": "Name of the address resource to delete.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -2840,7 +2840,7 @@ "address": { "description": "Name of the address resource to return.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -2960,7 +2960,7 @@ "forwardingRule": { "description": "Name of the ForwardingRule resource to delete.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -2998,7 +2998,7 @@ "forwardingRule": { "description": "Name of the ForwardingRule resource to return.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -3114,7 +3114,7 @@ "forwardingRule": { "description": "Name of the ForwardingRule resource in which target is to be set.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -3208,7 +3208,7 @@ "operation": { "description": "Name of the Operations resource to delete.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -3238,7 +3238,7 @@ "operation": { "description": "Name of the Operations resource to return.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -3325,7 +3325,7 @@ "healthCheck": { "description": "Name of the HealthCheck resource to delete.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -3363,7 +3363,7 @@ "healthCheck": { "description": "Name of the HealthCheck resource to return.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -3479,7 +3479,7 @@ "healthCheck": { "description": "Name of the HealthCheck resource to patch.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -3520,7 +3520,7 @@ "healthCheck": { "description": "Name of the HealthCheck resource to update.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -3565,7 +3565,7 @@ "httpHealthCheck": { "description": "Name of the HttpHealthCheck resource to delete.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -3603,7 +3603,7 @@ "httpHealthCheck": { "description": "Name of the HttpHealthCheck resource to return.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -3719,7 +3719,7 @@ "httpHealthCheck": { "description": "Name of the HttpHealthCheck resource to patch.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -3760,7 +3760,7 @@ "httpHealthCheck": { "description": "Name of the HttpHealthCheck resource to update.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -3805,7 +3805,7 @@ "httpsHealthCheck": { "description": "Name of the HttpsHealthCheck resource to delete.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -3843,7 +3843,7 @@ "httpsHealthCheck": { "description": "Name of the HttpsHealthCheck resource to return.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -3959,7 +3959,7 @@ "httpsHealthCheck": { "description": "Name of the HttpsHealthCheck resource to patch.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -4000,7 +4000,7 @@ "httpsHealthCheck": { "description": "Name of the HttpsHealthCheck resource to update.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -5488,7 +5488,7 @@ "instanceTemplates": { "methods": { "delete": { - "description": "Deletes the specified instance template. Deleting an instance template is permanent and cannot be undone. It's not possible to delete templates which are in use by an instance group.", + "description": "Deletes the specified instance template. Deleting an instance template is permanent and cannot be undone. It is not possible to delete templates that are already in use by a managed instance group.", "httpMethod": "DELETE", "id": "compute.instanceTemplates.delete", "parameterOrder": [ @@ -5499,7 +5499,7 @@ "instanceTemplate": { "description": "The name of the instance template to delete.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -5537,7 +5537,7 @@ "instanceTemplate": { "description": "The name of the instance template.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -5627,7 +5627,7 @@ ] }, "list": { - "description": "Retrieves a list of instance templates that are contained within the specified project and zone.", + "description": "Retrieves a list of instance templates that are contained within the specified project.", "httpMethod": "GET", "id": "compute.instanceTemplates.list", "parameterOrder": [ @@ -5868,7 +5868,7 @@ ], "parameters": { "forceAttach": { - "description": "Whether to force attach the disk even if it's currently attached to another instance. This is only available for regional disks.", + "description": "Whether to force attach the disk even if it's currently attached to another instance.", "location": "query", "type": "boolean" }, @@ -6211,6 +6211,48 @@ "https://www.googleapis.com/auth/compute.readonly" ] }, + "getShieldedInstanceIdentity": { + "description": "Returns the Shielded Instance Identity of an instance", + "httpMethod": "GET", + "id": "compute.instances.getShieldedInstanceIdentity", + "parameterOrder": [ + "project", + "zone", + "instance" + ], + "parameters": { + "instance": { + "description": "Name or id of the instance scoping this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "zone": { + "description": "The name of the zone for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + } + }, + "path": "{project}/zones/{zone}/instances/{instance}/getShieldedInstanceIdentity", + "response": { + "$ref": "ShieldedInstanceIdentity" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, "insert": { "description": "Creates an instance resource in the specified project using the data included in the request.", "httpMethod": "POST", @@ -6380,7 +6422,7 @@ ] }, "reset": { - "description": "Performs a reset on the instance. For more information, see Resetting an instance.", + "description": "Performs a reset on the instance. This is a hard reset the VM does not do a graceful shutdown. For more information, see Resetting an instance.", "httpMethod": "POST", "id": "compute.instances.reset", "parameterOrder": [ @@ -6925,6 +6967,55 @@ "https://www.googleapis.com/auth/compute" ] }, + "setShieldedInstanceIntegrityPolicy": { + "description": "Sets the Shielded Instance integrity policy for an instance. You can only use this method on a running instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + "httpMethod": "PATCH", + "id": "compute.instances.setShieldedInstanceIntegrityPolicy", + "parameterOrder": [ + "project", + "zone", + "instance" + ], + "parameters": { + "instance": { + "description": "Name or id of the instance scoping this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "zone": { + "description": "The name of the zone for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + } + }, + "path": "{project}/zones/{zone}/instances/{instance}/setShieldedInstanceIntegrityPolicy", + "request": { + "$ref": "ShieldedInstanceIntegrityPolicy" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, "setTags": { "description": "Sets network tags for the specified instance to the data included in the request.", "httpMethod": "POST", @@ -7312,6 +7403,55 @@ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute" ] + }, + "updateShieldedInstanceConfig": { + "description": "Updates the Shielded Instance config for an instance. You can only use this method on a stopped instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + "httpMethod": "PATCH", + "id": "compute.instances.updateShieldedInstanceConfig", + "parameterOrder": [ + "project", + "zone", + "instance" + ], + "parameters": { + "instance": { + "description": "Name or id of the instance scoping this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "zone": { + "description": "The name of the zone for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + } + }, + "path": "{project}/zones/{zone}/instances/{instance}/updateShieldedInstanceConfig", + "request": { + "$ref": "ShieldedInstanceConfig" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] } } }, @@ -7379,7 +7519,7 @@ "interconnectAttachment": { "description": "Name of the interconnect attachment to delete.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -7425,7 +7565,7 @@ "interconnectAttachment": { "description": "Name of the interconnect attachment to return.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -7565,7 +7705,7 @@ "interconnectAttachment": { "description": "Name of the interconnect attachment to patch.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -7617,7 +7757,7 @@ "interconnectLocation": { "description": "Name of the interconnect location to return.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -7704,7 +7844,7 @@ "interconnect": { "description": "Name of the interconnect to delete.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -7742,7 +7882,7 @@ "interconnect": { "description": "Name of the interconnect to return.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -7776,7 +7916,7 @@ "interconnect": { "description": "Name of the interconnect resource to query.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -7892,7 +8032,7 @@ "interconnect": { "description": "Name of the interconnect to update.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -8012,7 +8152,7 @@ "license": { "description": "Name of the license resource to delete.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -8050,7 +8190,7 @@ "license": { "description": "Name of the License resource to return.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -8330,7 +8470,7 @@ "machineType": { "description": "Name of the machine type to return.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -8418,6 +8558,444 @@ } } }, + "networkEndpointGroups": { + "methods": { + "aggregatedList": { + "description": "Retrieves the list of network endpoint groups and sorts them by zone.", + "httpMethod": "GET", + "id": "compute.networkEndpointGroups.aggregatedList", + "parameterOrder": [ + "project" + ], + "parameters": { + "filter": { + "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).", + "location": "query", + "type": "string" + }, + "maxResults": { + "default": "500", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", + "format": "uint32", + "location": "query", + "minimum": "0", + "type": "integer" + }, + "orderBy": { + "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", + "location": "query", + "type": "string" + }, + "pageToken": { + "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", + "location": "query", + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + } + }, + "path": "{project}/aggregated/networkEndpointGroups", + "response": { + "$ref": "NetworkEndpointGroupAggregatedList" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "attachNetworkEndpoints": { + "description": "Attach a list of network endpoints to the specified network endpoint group.", + "httpMethod": "POST", + "id": "compute.networkEndpointGroups.attachNetworkEndpoints", + "parameterOrder": [ + "project", + "zone", + "networkEndpointGroup" + ], + "parameters": { + "networkEndpointGroup": { + "description": "The name of the network endpoint group where you are attaching network endpoints to. It should comply with RFC1035.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "zone": { + "description": "The name of the zone where the network endpoint group is located. It should comply with RFC1035.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}/attachNetworkEndpoints", + "request": { + "$ref": "NetworkEndpointGroupsAttachEndpointsRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "delete": { + "description": "Deletes the specified network endpoint group. The network endpoints in the NEG and the VM instances they belong to are not terminated when the NEG is deleted. Note that the NEG cannot be deleted if there are backend services referencing it.", + "httpMethod": "DELETE", + "id": "compute.networkEndpointGroups.delete", + "parameterOrder": [ + "project", + "zone", + "networkEndpointGroup" + ], + "parameters": { + "networkEndpointGroup": { + "description": "The name of the network endpoint group to delete. It should comply with RFC1035.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "zone": { + "description": "The name of the zone where the network endpoint group is located. It should comply with RFC1035.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "detachNetworkEndpoints": { + "description": "Detach a list of network endpoints from the specified network endpoint group.", + "httpMethod": "POST", + "id": "compute.networkEndpointGroups.detachNetworkEndpoints", + "parameterOrder": [ + "project", + "zone", + "networkEndpointGroup" + ], + "parameters": { + "networkEndpointGroup": { + "description": "The name of the network endpoint group where you are removing network endpoints. It should comply with RFC1035.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "zone": { + "description": "The name of the zone where the network endpoint group is located. It should comply with RFC1035.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}/detachNetworkEndpoints", + "request": { + "$ref": "NetworkEndpointGroupsDetachEndpointsRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "get": { + "description": "Returns the specified network endpoint group. Gets a list of available network endpoint groups by making a list() request.", + "httpMethod": "GET", + "id": "compute.networkEndpointGroups.get", + "parameterOrder": [ + "project", + "zone", + "networkEndpointGroup" + ], + "parameters": { + "networkEndpointGroup": { + "description": "The name of the network endpoint group. It should comply with RFC1035.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "zone": { + "description": "The name of the zone where the network endpoint group is located. It should comply with RFC1035.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}", + "response": { + "$ref": "NetworkEndpointGroup" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "insert": { + "description": "Creates a network endpoint group in the specified project using the parameters that are included in the request.", + "httpMethod": "POST", + "id": "compute.networkEndpointGroups.insert", + "parameterOrder": [ + "project", + "zone" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "zone": { + "description": "The name of the zone where you want to create the network endpoint group. It should comply with RFC1035.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "{project}/zones/{zone}/networkEndpointGroups", + "request": { + "$ref": "NetworkEndpointGroup" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "list": { + "description": "Retrieves the list of network endpoint groups that are located in the specified project and zone.", + "httpMethod": "GET", + "id": "compute.networkEndpointGroups.list", + "parameterOrder": [ + "project", + "zone" + ], + "parameters": { + "filter": { + "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).", + "location": "query", + "type": "string" + }, + "maxResults": { + "default": "500", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", + "format": "uint32", + "location": "query", + "minimum": "0", + "type": "integer" + }, + "orderBy": { + "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", + "location": "query", + "type": "string" + }, + "pageToken": { + "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", + "location": "query", + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "zone": { + "description": "The name of the zone where the network endpoint group is located. It should comply with RFC1035.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "{project}/zones/{zone}/networkEndpointGroups", + "response": { + "$ref": "NetworkEndpointGroupList" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "listNetworkEndpoints": { + "description": "Lists the network endpoints in the specified network endpoint group.", + "httpMethod": "POST", + "id": "compute.networkEndpointGroups.listNetworkEndpoints", + "parameterOrder": [ + "project", + "zone", + "networkEndpointGroup" + ], + "parameters": { + "filter": { + "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).", + "location": "query", + "type": "string" + }, + "maxResults": { + "default": "500", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", + "format": "uint32", + "location": "query", + "minimum": "0", + "type": "integer" + }, + "networkEndpointGroup": { + "description": "The name of the network endpoint group from which you want to generate a list of included network endpoints. It should comply with RFC1035.", + "location": "path", + "required": true, + "type": "string" + }, + "orderBy": { + "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", + "location": "query", + "type": "string" + }, + "pageToken": { + "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", + "location": "query", + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "zone": { + "description": "The name of the zone where the network endpoint group is located. It should comply with RFC1035.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}/listNetworkEndpoints", + "request": { + "$ref": "NetworkEndpointGroupsListEndpointsRequest" + }, + "response": { + "$ref": "NetworkEndpointGroupsListNetworkEndpoints" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource.", + "httpMethod": "POST", + "id": "compute.networkEndpointGroups.testIamPermissions", + "parameterOrder": [ + "project", + "zone", + "resource" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "resource": { + "description": "Name or id of the resource for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "zone": { + "description": "The name of the zone for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + } + }, + "path": "{project}/zones/{zone}/networkEndpointGroups/{resource}/testIamPermissions", + "request": { + "$ref": "TestPermissionsRequest" + }, + "response": { + "$ref": "TestPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + } + } + }, "networks": { "methods": { "addPeering": { @@ -8752,7 +9330,7 @@ "nodeGroup": { "description": "Name of the NodeGroup resource.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -8850,7 +9428,7 @@ "nodeGroup": { "description": "Name of the NodeGroup resource to delete.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -8896,7 +9474,7 @@ "nodeGroup": { "description": "Name of the NodeGroup resource to delete.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -8945,7 +9523,7 @@ "nodeGroup": { "description": "Name of the node group to return.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -9148,7 +9726,7 @@ "nodeGroup": { "description": "Name of the NodeGroup resource whose nodes you want to list.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -9242,9 +9820,9 @@ ], "parameters": { "nodeGroup": { - "description": "Name of the NodeGroup resource to delete.", + "description": "Name of the NodeGroup resource to update.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -9391,7 +9969,7 @@ "nodeTemplate": { "description": "Name of the NodeTemplate resource to delete.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -9437,7 +10015,7 @@ "nodeTemplate": { "description": "Name of the node template to return.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -9761,7 +10339,7 @@ "nodeType": { "description": "Name of the node type to return.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -10312,7 +10890,7 @@ "autoscaler": { "description": "Name of the autoscaler to delete.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -10358,7 +10936,7 @@ "autoscaler": { "description": "Name of the autoscaler to return.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -10497,7 +11075,7 @@ "autoscaler": { "description": "Name of the autoscaler to patch.", "location": "query", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "type": "string" }, "project": { @@ -10544,7 +11122,7 @@ "autoscaler": { "description": "Name of the autoscaler to update.", "location": "query", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "type": "string" }, "project": { @@ -10596,7 +11174,7 @@ "backendService": { "description": "Name of the BackendService resource to delete.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -10642,7 +11220,7 @@ "backendService": { "description": "Name of the BackendService resource to return.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -10684,7 +11262,7 @@ "backendService": { "description": "Name of the BackendService resource for which to get health.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -10875,7 +11453,7 @@ "backendService": { "description": "Name of the BackendService resource to update.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -10977,7 +11555,7 @@ "commitment": { "description": "Name of the commitment to return.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -11121,7 +11699,7 @@ "diskType": { "description": "Name of the disk type to return.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -12405,7 +12983,7 @@ "operation": { "description": "Name of the Operations resource to delete.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -12443,7 +13021,7 @@ "operation": { "description": "Name of the Operations resource to return.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -12552,7 +13130,7 @@ "region": { "description": "Name of the region resource to return.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -12701,7 +13279,7 @@ "router": { "description": "Name of the Router resource to delete.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -12742,7 +13320,7 @@ "router": { "description": "Name of the Router resource to return.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -12807,7 +13385,7 @@ "router": { "description": "Name of the Router resource to query for Nat Mapping information of VM endpoints.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -12849,7 +13427,7 @@ "router": { "description": "Name of the Router resource to query.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -12994,7 +13572,7 @@ "router": { "description": "Name of the Router resource to patch.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -13038,7 +13616,7 @@ "router": { "description": "Name of the Router resource to query.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -13088,7 +13666,7 @@ "router": { "description": "Name of the Router resource to update.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -13286,7 +13864,7 @@ "securityPolicy": { "description": "Name of the security policy to update.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -13327,7 +13905,7 @@ "securityPolicy": { "description": "Name of the security policy to delete.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -13360,7 +13938,7 @@ "securityPolicy": { "description": "Name of the security policy to get.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -13400,7 +13978,7 @@ "securityPolicy": { "description": "Name of the security policy to which the queried rule belongs.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -13521,7 +14099,7 @@ "securityPolicy": { "description": "Name of the security policy to update.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -13563,7 +14141,7 @@ "securityPolicy": { "description": "Name of the security policy to update.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -13605,7 +14183,7 @@ "securityPolicy": { "description": "Name of the security policy to update.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -13915,7 +14493,7 @@ "sslCertificate": { "description": "Name of the SslCertificate resource to delete.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -13948,7 +14526,7 @@ "sslCertificate": { "description": "Name of the SslCertificate resource to return.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -14375,7 +14953,7 @@ "subnetwork": { "description": "Name of the Subnetwork resource to delete.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -14421,7 +14999,7 @@ "subnetwork": { "description": "Name of the Subnetwork resource to update.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -14465,7 +15043,7 @@ "subnetwork": { "description": "Name of the Subnetwork resource to return.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -14701,7 +15279,7 @@ "subnetwork": { "description": "Name of the Subnetwork resource to patch.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -14794,7 +15372,7 @@ "subnetwork": { "description": "Name of the Subnetwork resource.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -14884,7 +15462,7 @@ "targetHttpProxy": { "description": "Name of the TargetHttpProxy resource to delete.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -14917,7 +15495,7 @@ "targetHttpProxy": { "description": "Name of the TargetHttpProxy resource to return.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -15038,7 +15616,7 @@ "targetHttpProxy": { "description": "Name of the TargetHttpProxy to set a URL map for.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -15083,7 +15661,7 @@ "targetHttpsProxy": { "description": "Name of the TargetHttpsProxy resource to delete.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -15116,7 +15694,7 @@ "targetHttpsProxy": { "description": "Name of the TargetHttpsProxy resource to return.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -15277,7 +15855,7 @@ "targetHttpsProxy": { "description": "Name of the TargetHttpsProxy resource to set an SslCertificates resource for.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -15358,7 +15936,7 @@ "targetHttpsProxy": { "description": "Name of the TargetHttpsProxy resource whose URL map is to be set.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -15453,7 +16031,7 @@ "targetInstance": { "description": "Name of the TargetInstance resource to delete.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -15494,7 +16072,7 @@ "targetInstance": { "description": "Name of the TargetInstance resource to return.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -15650,7 +16228,7 @@ "targetPool": { "description": "Name of the target pool to add a health check to.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -15699,7 +16277,7 @@ "targetPool": { "description": "Name of the TargetPool resource to add instances to.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -15797,7 +16375,7 @@ "targetPool": { "description": "Name of the TargetPool resource to delete.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -15838,7 +16416,7 @@ "targetPool": { "description": "Name of the TargetPool resource to return.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -15880,7 +16458,7 @@ "targetPool": { "description": "Name of the TargetPool resource to which the queried instance belongs.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -16028,7 +16606,7 @@ "targetPool": { "description": "Name of the target pool to remove health checks from.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -16077,7 +16655,7 @@ "targetPool": { "description": "Name of the TargetPool resource to remove instances from.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -16132,7 +16710,7 @@ "targetPool": { "description": "Name of the TargetPool resource to set a backup pool for.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -16177,7 +16755,7 @@ "targetSslProxy": { "description": "Name of the TargetSslProxy resource to delete.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -16210,7 +16788,7 @@ "targetSslProxy": { "description": "Name of the TargetSslProxy resource to return.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -16331,7 +16909,7 @@ "targetSslProxy": { "description": "Name of the TargetSslProxy resource whose BackendService resource is to be set.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -16372,7 +16950,7 @@ "targetSslProxy": { "description": "Name of the TargetSslProxy resource whose ProxyHeader is to be set.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -16413,7 +16991,7 @@ "targetSslProxy": { "description": "Name of the TargetSslProxy resource whose SslCertificate resource is to be set.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -16498,7 +17076,7 @@ "targetTcpProxy": { "description": "Name of the TargetTcpProxy resource to delete.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -16531,7 +17109,7 @@ "targetTcpProxy": { "description": "Name of the TargetTcpProxy resource to return.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -16652,7 +17230,7 @@ "targetTcpProxy": { "description": "Name of the TargetTcpProxy resource whose BackendService resource is to be set.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -16693,7 +17271,7 @@ "targetTcpProxy": { "description": "Name of the TargetTcpProxy resource whose ProxyHeader is to be set.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -16795,7 +17373,7 @@ "targetVpnGateway": { "description": "Name of the target VPN gateway to delete.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -16836,7 +17414,7 @@ "targetVpnGateway": { "description": "Name of the target VPN gateway to return.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -16977,7 +17555,7 @@ "urlMap": { "description": "Name of the UrlMap resource to delete.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -17010,7 +17588,7 @@ "urlMap": { "description": "Name of the UrlMap resource to return.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -17082,7 +17660,7 @@ "urlMap": { "description": "Name of the UrlMap scoping this request.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -17172,7 +17750,7 @@ "urlMap": { "description": "Name of the UrlMap resource to patch.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -17213,7 +17791,7 @@ "urlMap": { "description": "Name of the UrlMap resource to update.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -17249,7 +17827,7 @@ "urlMap": { "description": "Name of the UrlMap resource to be validated as.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -17351,7 +17929,7 @@ "vpnTunnel": { "description": "Name of the VpnTunnel resource to delete.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -17392,7 +17970,7 @@ "vpnTunnel": { "description": "Name of the VpnTunnel resource to return.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -17522,7 +18100,7 @@ "operation": { "description": "Name of the Operations resource to delete.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -17560,7 +18138,7 @@ "operation": { "description": "Name of the Operations resource to return.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -17669,7 +18247,7 @@ "zone": { "description": "Name of the zone resource to return.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } @@ -17736,7 +18314,7 @@ } } }, - "revision": "20181130", + "revision": "20190403", "rootUrl": "https://www.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -17749,7 +18327,7 @@ "type": "integer" }, "acceleratorType": { - "description": "Full or partial URL of the accelerator type resource to attach to this instance. If you are creating an instance template, specify only the accelerator name.", + "description": "Full or partial URL of the accelerator type resource to attach to this instance. For example: projects/my-project/zones/us-central1-c/acceleratorTypes/nvidia-tesla-p100 If you are creating an instance template, specify only the accelerator name. See GPUs on Compute Engine for a full list of accelerator types.", "type": "string" } }, @@ -18261,9 +18839,11 @@ "enum": [ "DNS_RESOLVER", "GCE_ENDPOINT", + "NAT_AUTO", "VPC_PEERING" ], "enumDescriptions": [ + "", "", "", "" @@ -18652,7 +19232,7 @@ "type": "boolean" }, "deviceName": { - "description": "Specifies a unique device name of your choice that is reflected into the /dev/disk/by-id/google-* tree of a Linux operating system running within the instance. This name can be used to reference the device for mounting, resizing, and so on, from within the instance.\n\nIf not specified, the server chooses a default device name to apply to this disk, in the form persistent-disks-x, where x is a number assigned by Google Compute Engine. This field is only applicable for persistent disks.", + "description": "Specifies a unique device name of your choice that is reflected into the /dev/disk/by-id/google-* tree of a Linux operating system running within the instance. This name can be used to reference the device for mounting, resizing, and so on, from within the instance.\n\nIf not specified, the server chooses a default device name to apply to this disk, in the form persistent-disk-x, where x is a number assigned by Google Compute Engine. This field is only applicable for persistent disks.", "type": "string" }, "diskEncryptionKey": { @@ -19377,7 +19957,7 @@ "id": "AutoscalingPolicyLoadBalancingUtilization", "properties": { "utilizationTarget": { - "description": "Fraction of backend capacity utilization (set in HTTP(s) load balancing configuration) that autoscaler should maintain. Must be a positive float value. If not defined, the default is 0.8.", + "description": "Fraction of backend capacity utilization (set in HTTP(S) load balancing configuration) that autoscaler should maintain. Must be a positive float value. If not defined, the default is 0.8.", "format": "double", "type": "number" } @@ -19420,6 +20000,11 @@ "format": "int32", "type": "integer" }, + "maxConnectionsPerEndpoint": { + "description": "The max number of simultaneous connections that a single backend network endpoint can handle. This is used to calculate the capacity of the group. Can be used in either CONNECTION or UTILIZATION balancing modes. For CONNECTION mode, either maxConnections or maxConnectionsPerEndpoint must be set.\n\nThis cannot be used for internal load balancing.", + "format": "int32", + "type": "integer" + }, "maxConnectionsPerInstance": { "description": "The max number of simultaneous connections that a single backend instance can handle. This is used to calculate the capacity of the group. Can be used in either CONNECTION or UTILIZATION balancing modes. For CONNECTION mode, either maxConnections or maxConnectionsPerInstance must be set.\n\nThis cannot be used for internal load balancing.", "format": "int32", @@ -19430,6 +20015,11 @@ "format": "int32", "type": "integer" }, + "maxRatePerEndpoint": { + "description": "The max requests per second (RPS) that a single backend network endpoint can handle. This is used to calculate the capacity of the group. Can be used in either balancing mode. For RATE mode, either maxRate or maxRatePerEndpoint must be set.\n\nThis cannot be used for internal load balancing.", + "format": "float", + "type": "number" + }, "maxRatePerInstance": { "description": "The max requests per second (RPS) that a single backend instance can handle. This is used to calculate the capacity of the group. Can be used in either balancing mode. For RATE mode, either maxRate or maxRatePerInstance must be set.\n\nThis cannot be used for internal load balancing.", "format": "float", @@ -19647,6 +20237,13 @@ "description": "[Output Only] Creation timestamp in RFC3339 text format.", "type": "string" }, + "customRequestHeaders": { + "description": "Headers that the HTTP/S load balancer should add to proxied requests.", + "items": { + "type": "string" + }, + "type": "array" + }, "description": { "description": "An optional description of this resource. Provide this property when you create the resource.", "type": "string" @@ -19712,6 +20309,7 @@ "description": "The protocol this BackendService uses to communicate with backends.\n\nPossible values are HTTP, HTTPS, TCP, and SSL. The default is HTTP.\n\nFor internal load balancing, the possible values are TCP and UDP, and the default is TCP.", "enum": [ "HTTP", + "HTTP2", "HTTPS", "SSL", "TCP", @@ -19722,6 +20320,7 @@ "", "", "", + "", "" ], "type": "string" @@ -20050,6 +20649,15 @@ }, "type": "object" }, + "BackendServiceReference": { + "id": "BackendServiceReference", + "properties": { + "backendService": { + "type": "string" + } + }, + "type": "object" + }, "BackendServicesScopedList": { "id": "BackendServicesScopedList", "properties": { @@ -20150,10 +20758,10 @@ "properties": { "condition": { "$ref": "Expr", - "description": "Unimplemented. The condition that is associated with this binding. NOTE: an unsatisfied condition will not allow user access via current binding. Different bindings, including their conditions, are examined independently." + "description": "The condition that is associated with this binding. NOTE: An unsatisfied condition will not allow user access via current binding. Different bindings, including their conditions, are examined independently." }, "members": { - "description": "Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:\n\n* `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.\n\n* `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.\n\n* `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@gmail.com` .\n\n\n\n* `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.\n\n* `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.\n\n\n\n* `domain:{domain}`: A Google Apps domain name that represents all the users of that domain. For example, `google.com` or `example.com`.", + "description": "Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:\n\n* `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.\n\n* `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.\n\n* `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@gmail.com` .\n\n\n\n* `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.\n\n* `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.\n\n\n\n* `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.", "items": { "type": "string" }, @@ -20685,12 +21293,8 @@ ], "type": "string" }, - "value": { - "description": "DEPRECATED. Use 'values' instead.", - "type": "string" - }, "values": { - "description": "The objects of the condition. This is mutually exclusive with 'value'.", + "description": "The objects of the condition.", "items": { "type": "string" }, @@ -20765,13 +21369,15 @@ "type": "string" }, "state": { - "description": "The deprecation state of this resource. This can be DEPRECATED, OBSOLETE, or DELETED. Operations which create a new resource using a DEPRECATED resource will return successfully, but with a warning indicating the deprecated resource and recommending its replacement. Operations which use OBSOLETE or DELETED resources will be rejected and result in an error.", + "description": "The deprecation state of this resource. This can be ACTIVE, DEPRECATED, OBSOLETE, or DELETED. Operations which communicate the end of life date for an image, can use ACTIVE. Operations which create a new resource using a DEPRECATED resource will return successfully, but with a warning indicating the deprecated resource and recommending its replacement. Operations which use OBSOLETE or DELETED resources will be rejected and result in an error.", "enum": [ + "ACTIVE", "DELETED", "DEPRECATED", "OBSOLETE" ], "enumDescriptions": [ + "", "", "", "" @@ -20916,6 +21522,7 @@ "description": "[Output Only] The status of disk creation.", "enum": [ "CREATING", + "DELETING", "FAILED", "READY", "RESTORING" @@ -20924,6 +21531,7 @@ "", "", "", + "", "" ], "type": "string" @@ -22028,6 +22636,28 @@ }, "type": "object" }, + "FixedOrPercent": { + "description": "Encapsulates numeric value that can be either absolute or relative.", + "id": "FixedOrPercent", + "properties": { + "calculated": { + "description": "[Output Only] Absolute value of VM instances calculated based on the specific mode.\n\n \n- If the value is fixed, then the calculated value is equal to the fixed value. \n- If the value is a percent, then the calculated value is percent/100 * targetSize. For example, the calculated value of a 80% of a managed instance group with 150 instances would be (80/100 * 150) = 120 VM instances. If there is a remainder, the number is rounded up.", + "format": "int32", + "type": "integer" + }, + "fixed": { + "description": "Specifies a fixed number of VM instances. This must be a positive integer.", + "format": "int32", + "type": "integer" + }, + "percent": { + "description": "Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, "ForwardingRule": { "description": "A ForwardingRule resource. A ForwardingRule resource specifies which pool of target virtual machines to forward a packet to if it matches the given [IPAddress, IPProtocol, ports] tuple. (== resource_for beta.forwardingRules ==) (== resource_for v1.forwardingRules ==) (== resource_for beta.globalForwardingRules ==) (== resource_for v1.globalForwardingRules ==) (== resource_for beta.regionForwardingRules ==) (== resource_for v1.regionForwardingRules ==)", "id": "ForwardingRule", @@ -22056,6 +22686,10 @@ ], "type": "string" }, + "allPorts": { + "description": "This field is used along with the backend_service field for internal load balancing or with the target field for internal TargetInstance. This field cannot be used with port or portRange fields.\n\nWhen the load balancing scheme is INTERNAL and protocol is TCP/UDP, specify this field to allow packets addressed to any ports will be forwarded to the backends configured with this forwarding rule.", + "type": "boolean" + }, "backendService": { "description": "This field is only used for INTERNAL load balancing.\n\nFor internal load balancing, this field identifies the BackendService resource to receive the matched traffic.", "type": "string" @@ -22146,12 +22780,21 @@ "description": "[Output Only] Server-defined URL for the resource.", "type": "string" }, + "serviceLabel": { + "description": "An optional prefix to the service name for this Forwarding Rule. If specified, will be the first label of the fully qualified service name.\n\nThe label must be 1-63 characters long, and comply with RFC1035. Specifically, the label must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.\n\nThis field is only used for internal load balancing.", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "type": "string" + }, + "serviceName": { + "description": "[Output Only] The internal fully qualified service name for this Forwarding Rule.\n\nThis field is only used for internal load balancing.", + "type": "string" + }, "subnetwork": { "description": "This field is only used for INTERNAL load balancing.\n\nFor internal load balancing, this field identifies the subnetwork that the load balanced IP should belong to for this Forwarding Rule.\n\nIf the network specified is in auto subnet mode, this field is optional. However, if the network is in custom subnet mode, a subnetwork must be specified.", "type": "string" }, "target": { - "description": "The URL of the target resource to receive the matched traffic. For regional forwarding rules, this target must live in the same region as the forwarding rule. For global forwarding rules, this target must be a global load balancing resource. The forwarded traffic must be of a type appropriate to the target object. For INTERNAL_SELF_MANAGED\" load balancing, only HTTP and HTTPS targets are valid.", + "description": "The URL of the target resource to receive the matched traffic. For regional forwarding rules, this target must live in the same region as the forwarding rule. For global forwarding rules, this target must be a global load balancing resource. The forwarded traffic must be of a type appropriate to the target object. For INTERNAL_SELF_MANAGED load balancing, only HTTP and HTTPS targets are valid.", "type": "string" } }, @@ -22381,6 +23024,15 @@ }, "type": "object" }, + "ForwardingRuleReference": { + "id": "ForwardingRuleReference", + "properties": { + "forwardingRule": { + "type": "string" + } + }, + "type": "object" + }, "ForwardingRulesScopedList": { "id": "ForwardingRulesScopedList", "properties": { @@ -22542,6 +23194,59 @@ }, "type": "object" }, + "HTTP2HealthCheck": { + "id": "HTTP2HealthCheck", + "properties": { + "host": { + "description": "The value of the host header in the HTTP/2 health check request. If left empty (default value), the IP on behalf of which this health check is performed will be used.", + "type": "string" + }, + "port": { + "description": "The TCP port number for the health check request. The default value is 443. Valid values are 1 through 65535.", + "format": "int32", + "type": "integer" + }, + "portName": { + "description": "Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence.", + "type": "string" + }, + "portSpecification": { + "description": "Specifies how port is selected for health checking, can be one of following values:\nUSE_FIXED_PORT: The port number in\nport\nis used for health checking.\nUSE_NAMED_PORT: The\nportName\nis used for health checking.\nUSE_SERVING_PORT: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking.\n\n\nIf not specified, HTTP2 health check follows behavior specified in\nport\nand\nportName\nfields.", + "enum": [ + "USE_FIXED_PORT", + "USE_NAMED_PORT", + "USE_SERVING_PORT" + ], + "enumDescriptions": [ + "", + "", + "" + ], + "type": "string" + }, + "proxyHeader": { + "description": "Specifies the type of proxy header to append before sending data to the backend, either NONE or PROXY_V1. The default is NONE.", + "enum": [ + "NONE", + "PROXY_V1" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + }, + "requestPath": { + "description": "The request path of the HTTP/2 health check request. The default value is /.", + "type": "string" + }, + "response": { + "description": "The string to match anywhere in the first 1024 bytes of the response body. If left empty (the default value), the status code determines health. The response data can only be ASCII.", + "type": "string" + } + }, + "type": "object" + }, "HTTPHealthCheck": { "id": "HTTPHealthCheck", "properties": { @@ -22558,6 +23263,20 @@ "description": "Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence.", "type": "string" }, + "portSpecification": { + "description": "Specifies how port is selected for health checking, can be one of following values:\nUSE_FIXED_PORT: The port number in\nport\nis used for health checking.\nUSE_NAMED_PORT: The\nportName\nis used for health checking.\nUSE_SERVING_PORT: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking.\n\n\nIf not specified, HTTP health check follows behavior specified in\nport\nand\nportName\nfields.", + "enum": [ + "USE_FIXED_PORT", + "USE_NAMED_PORT", + "USE_SERVING_PORT" + ], + "enumDescriptions": [ + "", + "", + "" + ], + "type": "string" + }, "proxyHeader": { "description": "Specifies the type of proxy header to append before sending data to the backend, either NONE or PROXY_V1. The default is NONE.", "enum": [ @@ -22597,6 +23316,20 @@ "description": "Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence.", "type": "string" }, + "portSpecification": { + "description": "Specifies how port is selected for health checking, can be one of following values:\nUSE_FIXED_PORT: The port number in\nport\nis used for health checking.\nUSE_NAMED_PORT: The\nportName\nis used for health checking.\nUSE_SERVING_PORT: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking.\n\n\nIf not specified, HTTPS health check follows behavior specified in\nport\nand\nportName\nfields.", + "enum": [ + "USE_FIXED_PORT", + "USE_NAMED_PORT", + "USE_SERVING_PORT" + ], + "enumDescriptions": [ + "", + "", + "" + ], + "type": "string" + }, "proxyHeader": { "description": "Specifies the type of proxy header to append before sending data to the backend, either NONE or PROXY_V1. The default is NONE.", "enum": [ @@ -22642,6 +23375,9 @@ "format": "int32", "type": "integer" }, + "http2HealthCheck": { + "$ref": "HTTP2HealthCheck" + }, "httpHealthCheck": { "$ref": "HTTPHealthCheck" }, @@ -22679,9 +23415,10 @@ "type": "integer" }, "type": { - "description": "Specifies the type of the healthCheck, either TCP, SSL, HTTP or HTTPS. If not specified, the default is TCP. Exactly one of the protocol-specific health check field must be specified, which must match type field.", + "description": "Specifies the type of the healthCheck, either TCP, SSL, HTTP, HTTPS or HTTP2. If not specified, the default is TCP. Exactly one of the protocol-specific health check field must be specified, which must match type field.", "enum": [ "HTTP", + "HTTP2", "HTTPS", "INVALID", "SSL", @@ -22692,6 +23429,7 @@ "", "", "", + "", "" ], "type": "string" @@ -22857,6 +23595,40 @@ }, "type": "object" }, + "HealthStatusForNetworkEndpoint": { + "id": "HealthStatusForNetworkEndpoint", + "properties": { + "backendService": { + "$ref": "BackendServiceReference", + "description": "URL of the backend service associated with the health state of the network endpoint." + }, + "forwardingRule": { + "$ref": "ForwardingRuleReference", + "description": "URL of the forwarding rule associated with the health state of the network endpoint." + }, + "healthCheck": { + "$ref": "HealthCheckReference", + "description": "URL of the health check associated with the health state of the network endpoint." + }, + "healthState": { + "description": "Health state of the network endpoint determined based on the health checks configured.", + "enum": [ + "DRAINING", + "HEALTHY", + "UNHEALTHY", + "UNKNOWN" + ], + "enumDescriptions": [ + "", + "", + "", + "" + ], + "type": "string" + } + }, + "type": "object" + }, "HostRule": { "description": "UrlMaps A host-matching rule for a URL. If matched, will use the named PathMatcher to select the BackendService.", "id": "HostRule", @@ -23339,7 +24111,7 @@ "type": "string" }, "sha1Checksum": { - "description": "An optional SHA1 checksum of the disk image before unpackaging; provided by the client when the disk image is created.", + "description": "An optional SHA1 checksum of the disk image before unpackaging provided by the client when the disk image is created.", "pattern": "[a-f0-9]{40}", "type": "string" }, @@ -23409,11 +24181,13 @@ "status": { "description": "[Output Only] The status of the image. An image can be used to create other resources, such as instances, only after the image has been successfully created and the status is set to READY. Possible values are FAILED, PENDING, or READY.", "enum": [ + "DELETING", "FAILED", "PENDING", "READY" ], "enumDescriptions": [ + "", "", "", "" @@ -23573,6 +24347,9 @@ }, "type": "array" }, + "hostname": { + "type": "string" + }, "id": { "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", "format": "uint64", @@ -23644,6 +24421,12 @@ }, "type": "array" }, + "shieldedInstanceConfig": { + "$ref": "ShieldedInstanceConfig" + }, + "shieldedInstanceIntegrityPolicy": { + "$ref": "ShieldedInstanceIntegrityPolicy" + }, "startRestricted": { "description": "[Output Only] Whether a VM has been restricted for start because Compute Engine has detected suspicious activity.", "type": "boolean" @@ -23652,6 +24435,7 @@ "description": "[Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, STOPPED, SUSPENDING, SUSPENDED, and TERMINATED.", "enum": [ "PROVISIONING", + "REPAIRING", "RUNNING", "STAGING", "STOPPED", @@ -23668,6 +24452,7 @@ "", "", "", + "", "" ], "type": "string" @@ -24099,6 +24884,13 @@ "description": "An Instance Group Manager resource. (== resource_for beta.instanceGroupManagers ==) (== resource_for v1.instanceGroupManagers ==) (== resource_for beta.regionInstanceGroupManagers ==) (== resource_for v1.regionInstanceGroupManagers ==)", "id": "InstanceGroupManager", "properties": { + "autoHealingPolicies": { + "description": "The autohealing policy for this managed instance group. You can specify only one value.", + "items": { + "$ref": "InstanceGroupManagerAutoHealingPolicy" + }, + "type": "array" + }, "baseInstanceName": { "annotations": { "required": [ @@ -24174,6 +24966,10 @@ "description": "[Output Only] The URL for this managed instance group. The server defines this URL.", "type": "string" }, + "status": { + "$ref": "InstanceGroupManagerStatus", + "description": "[Output Only] The status of this managed instance group." + }, "targetPools": { "description": "The URLs for all TargetPool resources to which instances in the instanceGroup field are added. The target pools automatically apply to all of the instances in the managed instance group.", "items": { @@ -24192,6 +24988,17 @@ "format": "int32", "type": "integer" }, + "updatePolicy": { + "$ref": "InstanceGroupManagerUpdatePolicy", + "description": "The update policy for this managed instance group." + }, + "versions": { + "description": "Specifies the instance templates used by this managed instance group to create instances.\n\nEach version is defined by an instanceTemplate and a name. Every version can appear at most once per instance group. This field overrides the top-level instanceTemplate field. Read more about the relationships between these fields. Exactly one version must leave the targetSize field unset. That version will be applied to all remaining instances. For more information, read about canary updates.", + "items": { + "$ref": "InstanceGroupManagerVersion" + }, + "type": "array" + }, "zone": { "description": "[Output Only] The URL of the zone where the managed instance group is located (for zonal resources).", "type": "string" @@ -24362,6 +25169,22 @@ }, "type": "object" }, + "InstanceGroupManagerAutoHealingPolicy": { + "description": "", + "id": "InstanceGroupManagerAutoHealingPolicy", + "properties": { + "healthCheck": { + "description": "The URL for the health check that signals autohealing.", + "type": "string" + }, + "initialDelaySec": { + "description": "The number of seconds that the managed instance group waits before it applies autohealing policies to new instances or recently recreated instances. This initial delay allows instances to initialize and run their startup scripts before the instance group determines that they are UNHEALTHY. This prevents the managed instance group from recreating its instances prematurely. This value must be from range [0, 3600].", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, "InstanceGroupManagerList": { "description": "[Output Only] A list of managed instance groups.", "id": "InstanceGroupManagerList", @@ -24474,6 +25297,71 @@ }, "type": "object" }, + "InstanceGroupManagerStatus": { + "id": "InstanceGroupManagerStatus", + "properties": { + "isStable": { + "description": "[Output Only] A bit indicating whether the managed instance group is in a stable state. A stable state means that: none of the instances in the managed instance group is currently undergoing any type of change (for example, creation, restart, or deletion); no future changes are scheduled for instances in the managed instance group; and the managed instance group itself is not being modified.", + "type": "boolean" + } + }, + "type": "object" + }, + "InstanceGroupManagerUpdatePolicy": { + "id": "InstanceGroupManagerUpdatePolicy", + "properties": { + "maxSurge": { + "$ref": "FixedOrPercent", + "description": "The maximum number of instances that can be created above the specified targetSize during the update process. By default, a fixed value of 1 is used. This value can be either a fixed number or a percentage if the instance group has 10 or more instances. If you set a percentage, the number of instances will be rounded up if necessary.\n\nAt least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxSurge." + }, + "maxUnavailable": { + "$ref": "FixedOrPercent", + "description": "The maximum number of instances that can be unavailable during the update process. An instance is considered available if all of the following conditions are satisfied:\n\n \n- The instance's status is RUNNING. \n- If there is a health check on the instance group, the instance's liveness health check result must be HEALTHY at least once. If there is no health check on the group, then the instance only needs to have a status of RUNNING to be considered available. By default, a fixed value of 1 is used. This value can be either a fixed number or a percentage if the instance group has 10 or more instances. If you set a percentage, the number of instances will be rounded up if necessary.\n\nAt least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxUnavailable." + }, + "minimalAction": { + "description": "Minimal action to be taken on an instance. You can specify either RESTART to restart existing instances or REPLACE to delete and create new instances from the target template. If you specify a RESTART, the Updater will attempt to perform that action only. However, if the Updater determines that the minimal action you specify is not enough to perform the update, it might perform a more disruptive action.", + "enum": [ + "REPLACE", + "RESTART" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + }, + "type": { + "enum": [ + "OPPORTUNISTIC", + "PROACTIVE" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + } + }, + "type": "object" + }, + "InstanceGroupManagerVersion": { + "id": "InstanceGroupManagerVersion", + "properties": { + "instanceTemplate": { + "description": "The URL of the instance template that is specified for this managed instance group. The group uses this template to create new instances in the managed instance group until the `targetSize` for this version is reached.", + "type": "string" + }, + "name": { + "description": "Name of the version. Unique among all versions in the scope of this managed instance group.", + "type": "string" + }, + "targetSize": { + "$ref": "FixedOrPercent", + "description": "Specifies the intended number of instances to be created from the instanceTemplate. The final number of instances created from the template will be equal to: \n- If expressed as a fixed number, the minimum of either targetSize.fixed or instanceGroupManager.targetSize is used. \n- if expressed as a percent, the targetSize would be (targetSize.percent/100 * InstanceGroupManager.targetSize) If there is a remainder, the number is rounded up. If unset, this version will update any remaining instances not updated by another version. Read Starting a canary update for more information." + } + }, + "type": "object" + }, "InstanceGroupManagersAbandonInstancesRequest": { "id": "InstanceGroupManagersAbandonInstancesRequest", "properties": { @@ -25221,6 +26109,9 @@ }, "type": "array" }, + "shieldedInstanceConfig": { + "$ref": "ShieldedInstanceConfig" + }, "tags": { "$ref": "Tags", "description": "A list of tags to apply to the instances that are created from this template. The tags identify valid sources or targets for network firewalls. The setTags method can modify this list of tags. Each tag within the list must comply with RFC1035." @@ -25419,6 +26310,7 @@ "description": "[Output Only] The status of the instance.", "enum": [ "PROVISIONING", + "REPAIRING", "RUNNING", "STAGING", "STOPPED", @@ -25435,6 +26327,7 @@ "", "", "", + "", "" ], "type": "string" @@ -25655,7 +26548,7 @@ "type": "string" }, "googleReferenceId": { - "description": "[Output Only] Google reference ID; to be used when raising support tickets with Google or otherwise to debug backend connectivity issues.", + "description": "[Output Only] Google reference ID to be used when raising support tickets with Google or otherwise to debug backend connectivity issues.", "type": "string" }, "id": { @@ -25690,7 +26583,7 @@ "type": "string" }, "linkType": { - "description": "Type of link requested. This field indicates speed of each of the links in the bundle, not the entire bundle. Only 10G per link is allowed for a dedicated interconnect. Options: Ethernet_10G_LR", + "description": "Type of link requested. This field indicates speed of each of the links in the bundle, not the entire bundle.", "enum": [ "LINK_TYPE_ETHERNET_10G_LR" ], @@ -26379,6 +27272,7 @@ "id": "InterconnectDiagnosticsLinkOpticalPower", "properties": { "state": { + "description": "The status of the current value when compared to the warning and alarm levels for the receiving or transmitting transceiver. Possible states include: \n- OK: The value has not crossed a warning threshold. \n- LOW_WARNING: The value has crossed below the low warning threshold. \n- HIGH_WARNING: The value has crossed above the high warning threshold. \n- LOW_ALARM: The value has crossed below the low alarm threshold. \n- HIGH_ALARM: The value has crossed above the high alarm threshold.", "enum": [ "HIGH_ALARM", "HIGH_WARNING", @@ -26396,7 +27290,7 @@ "type": "string" }, "value": { - "description": "Value of the current optical power, read in dBm. Take a known good optical value, give it a 10% margin and trigger warnings relative to that value. In general, a -7dBm warning and a -11dBm alarm are good optical value estimates for most links.", + "description": "Value of the current receiving or transmitting optical power, read in dBm. Take a known good optical value, give it a 10% margin and trigger warnings relative to that value. In general, a -7dBm warning and a -11dBm alarm are good optical value estimates for most links.", "format": "float", "type": "number" } @@ -26425,10 +27319,12 @@ "$ref": "InterconnectDiagnosticsLinkLACPStatus" }, "receivingOpticalPower": { - "$ref": "InterconnectDiagnosticsLinkOpticalPower" + "$ref": "InterconnectDiagnosticsLinkOpticalPower", + "description": "An InterconnectDiagnostics.LinkOpticalPower object, describing the current value and status of the received light level." }, "transmittingOpticalPower": { - "$ref": "InterconnectDiagnosticsLinkOpticalPower" + "$ref": "InterconnectDiagnosticsLinkOpticalPower", + "description": "An InterconnectDiagnostics.LinkOpticalPower object, describing the current value and status of the transmitted light level." } }, "type": "object" @@ -26633,6 +27529,18 @@ "selfLink": { "description": "[Output Only] Server-defined URL for the resource.", "type": "string" + }, + "status": { + "description": "[Output Only] The status of this InterconnectLocation. If the status is AVAILABLE, new Interconnects may be provisioned in this InterconnectLocation. Otherwise, no new Interconnects may be provisioned.", + "enum": [ + "AVAILABLE", + "CLOSED" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" } }, "type": "object" @@ -27649,6 +28557,7 @@ "description": "[Output Only] The status of the instance. This field is empty when the instance does not exist.", "enum": [ "PROVISIONING", + "REPAIRING", "RUNNING", "STAGING", "STOPPED", @@ -27665,6 +28574,7 @@ "", "", "", + "", "" ], "type": "string" @@ -27672,6 +28582,10 @@ "lastAttempt": { "$ref": "ManagedInstanceLastAttempt", "description": "[Output Only] Information about the last attempt to create or delete the instance." + }, + "version": { + "$ref": "ManagedInstanceVersion", + "description": "[Output Only] Intended version of this instance." } }, "type": "object" @@ -27709,6 +28623,20 @@ }, "type": "object" }, + "ManagedInstanceVersion": { + "id": "ManagedInstanceVersion", + "properties": { + "instanceTemplate": { + "description": "[Output Only] The intended template of the instance. This field is empty when current_action is one of { DELETING, ABANDONING }.", + "type": "string" + }, + "name": { + "description": "[Output Only] Name of the version.", + "type": "string" + } + }, + "type": "object" + }, "Metadata": { "description": "A metadata key/value entry.", "id": "Metadata", @@ -27777,7 +28705,7 @@ "id": "Network", "properties": { "IPv4Range": { - "description": "The range of internal addresses that are legal on this network. This range is a CIDR specification, for example: 192.168.0.0/16. Provided by the client when the network is created.", + "description": "Deprecated in favor of subnet mode networks. The range of internal addresses that are legal on this network. This range is a CIDR specification, for example: 192.168.0.0/16. Provided by the client when the network is created.", "pattern": "[0-9]{1,3}(?:\\.[0-9]{1,3}){3}/[0-9]{1,2}", "type": "string" }, @@ -27843,6 +28771,576 @@ }, "type": "object" }, + "NetworkEndpoint": { + "description": "The network endpoint.", + "id": "NetworkEndpoint", + "properties": { + "instance": { + "description": "The name for a specific VM instance that the IP address belongs to. This is required for network endpoints of type GCE_VM_IP_PORT. The instance must be in the same zone of network endpoint group.\n\nThe name must be 1-63 characters long, and comply with RFC1035.", + "type": "string" + }, + "ipAddress": { + "description": "Optional IPv4 address of network endpoint. The IP address must belong to a VM in GCE (either the primary IP or as part of an aliased IP range). If the IP address is not specified, then the primary IP address for the VM instance in the network that the network endpoint group belongs to will be used.", + "type": "string" + }, + "port": { + "description": "Optional port number of network endpoint. If not specified and the NetworkEndpointGroup.network_endpoint_type is GCE_IP_PORT, the defaultPort for the network endpoint group will be used.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "NetworkEndpointGroup": { + "description": "Represents a collection of network endpoints.", + "id": "NetworkEndpointGroup", + "properties": { + "creationTimestamp": { + "description": "[Output Only] Creation timestamp in RFC3339 text format.", + "type": "string" + }, + "defaultPort": { + "description": "The default port used if the port number is not specified in the network endpoint.", + "format": "int32", + "type": "integer" + }, + "description": { + "description": "An optional description of this resource. Provide this property when you create the resource.", + "type": "string" + }, + "id": { + "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", + "format": "uint64", + "type": "string" + }, + "kind": { + "default": "compute#networkEndpointGroup", + "description": "[Output Only] Type of the resource. Always compute#networkEndpointGroup for network endpoint group.", + "type": "string" + }, + "name": { + "description": "Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", + "type": "string" + }, + "network": { + "description": "The URL of the network to which all network endpoints in the NEG belong. Uses \"default\" project network if unspecified.", + "type": "string" + }, + "networkEndpointType": { + "description": "Type of network endpoints in this network endpoint group. Currently the only supported value is GCE_VM_IP_PORT.", + "enum": [ + "GCE_VM_IP_PORT" + ], + "enumDescriptions": [ + "" + ], + "type": "string" + }, + "selfLink": { + "description": "[Output Only] Server-defined URL for the resource.", + "type": "string" + }, + "size": { + "description": "[Output only] Number of network endpoints in the network endpoint group.", + "format": "int32", + "type": "integer" + }, + "subnetwork": { + "description": "Optional URL of the subnetwork to which all network endpoints in the NEG belong.", + "type": "string" + }, + "zone": { + "description": "[Output Only] The URL of the zone where the network endpoint group is located.", + "type": "string" + } + }, + "type": "object" + }, + "NetworkEndpointGroupAggregatedList": { + "id": "NetworkEndpointGroupAggregatedList", + "properties": { + "id": { + "description": "[Output Only] Unique identifier for the resource; defined by the server.", + "type": "string" + }, + "items": { + "additionalProperties": { + "$ref": "NetworkEndpointGroupsScopedList", + "description": "The name of the scope that contains this set of network endpoint groups." + }, + "description": "A list of NetworkEndpointGroupsScopedList resources.", + "type": "object" + }, + "kind": { + "default": "compute#networkEndpointGroupAggregatedList", + "description": "[Output Only] The resource type, which is always compute#networkEndpointGroupAggregatedList for aggregated lists of network endpoint groups.", + "type": "string" + }, + "nextPageToken": { + "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.", + "type": "string" + }, + "selfLink": { + "description": "[Output Only] Server-defined URL for this resource.", + "type": "string" + }, + "warning": { + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", + "enum": [ + "CLEANUP_FAILED", + "DEPRECATED_RESOURCE_USED", + "DEPRECATED_TYPE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "EXPERIMENTAL_TYPE_USED", + "EXTERNAL_API_WARNING", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "MISSING_TYPE_DEPENDENCY", + "NEXT_HOP_ADDRESS_NOT_ASSIGNED", + "NEXT_HOP_CANNOT_IP_FORWARD", + "NEXT_HOP_INSTANCE_NOT_FOUND", + "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", + "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", + "NO_RESULTS_ON_PAGE", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", + "RESOURCE_NOT_DELETED", + "SCHEMA_VALIDATION_IGNORED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNDECLARED_PROPERTIES", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ], + "type": "string" + }, + "data": { + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "properties": { + "key": { + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).", + "type": "string" + }, + "value": { + "description": "[Output Only] A warning data value corresponding to the key.", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "[Output Only] A human-readable description of the warning code.", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "NetworkEndpointGroupList": { + "id": "NetworkEndpointGroupList", + "properties": { + "id": { + "description": "[Output Only] Unique identifier for the resource; defined by the server.", + "type": "string" + }, + "items": { + "description": "A list of NetworkEndpointGroup resources.", + "items": { + "$ref": "NetworkEndpointGroup" + }, + "type": "array" + }, + "kind": { + "default": "compute#networkEndpointGroupList", + "description": "[Output Only] The resource type, which is always compute#networkEndpointGroupList for network endpoint group lists.", + "type": "string" + }, + "nextPageToken": { + "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.", + "type": "string" + }, + "selfLink": { + "description": "[Output Only] Server-defined URL for this resource.", + "type": "string" + }, + "warning": { + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", + "enum": [ + "CLEANUP_FAILED", + "DEPRECATED_RESOURCE_USED", + "DEPRECATED_TYPE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "EXPERIMENTAL_TYPE_USED", + "EXTERNAL_API_WARNING", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "MISSING_TYPE_DEPENDENCY", + "NEXT_HOP_ADDRESS_NOT_ASSIGNED", + "NEXT_HOP_CANNOT_IP_FORWARD", + "NEXT_HOP_INSTANCE_NOT_FOUND", + "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", + "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", + "NO_RESULTS_ON_PAGE", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", + "RESOURCE_NOT_DELETED", + "SCHEMA_VALIDATION_IGNORED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNDECLARED_PROPERTIES", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ], + "type": "string" + }, + "data": { + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "properties": { + "key": { + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).", + "type": "string" + }, + "value": { + "description": "[Output Only] A warning data value corresponding to the key.", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "[Output Only] A human-readable description of the warning code.", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "NetworkEndpointGroupsAttachEndpointsRequest": { + "id": "NetworkEndpointGroupsAttachEndpointsRequest", + "properties": { + "networkEndpoints": { + "description": "The list of network endpoints to be attached.", + "items": { + "$ref": "NetworkEndpoint" + }, + "type": "array" + } + }, + "type": "object" + }, + "NetworkEndpointGroupsDetachEndpointsRequest": { + "id": "NetworkEndpointGroupsDetachEndpointsRequest", + "properties": { + "networkEndpoints": { + "description": "The list of network endpoints to be detached.", + "items": { + "$ref": "NetworkEndpoint" + }, + "type": "array" + } + }, + "type": "object" + }, + "NetworkEndpointGroupsListEndpointsRequest": { + "id": "NetworkEndpointGroupsListEndpointsRequest", + "properties": { + "healthStatus": { + "description": "Optional query parameter for showing the health status of each network endpoint. Valid options are SKIP or SHOW. If you don't specifiy this parameter, the health status of network endpoints will not be provided.", + "enum": [ + "SHOW", + "SKIP" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + } + }, + "type": "object" + }, + "NetworkEndpointGroupsListNetworkEndpoints": { + "id": "NetworkEndpointGroupsListNetworkEndpoints", + "properties": { + "id": { + "description": "[Output Only] Unique identifier for the resource; defined by the server.", + "type": "string" + }, + "items": { + "description": "A list of NetworkEndpointWithHealthStatus resources.", + "items": { + "$ref": "NetworkEndpointWithHealthStatus" + }, + "type": "array" + }, + "kind": { + "default": "compute#networkEndpointGroupsListNetworkEndpoints", + "description": "[Output Only] The resource type, which is always compute#networkEndpointGroupsListNetworkEndpoints for the list of network endpoints in the specified network endpoint group.", + "type": "string" + }, + "nextPageToken": { + "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.", + "type": "string" + }, + "warning": { + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", + "enum": [ + "CLEANUP_FAILED", + "DEPRECATED_RESOURCE_USED", + "DEPRECATED_TYPE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "EXPERIMENTAL_TYPE_USED", + "EXTERNAL_API_WARNING", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "MISSING_TYPE_DEPENDENCY", + "NEXT_HOP_ADDRESS_NOT_ASSIGNED", + "NEXT_HOP_CANNOT_IP_FORWARD", + "NEXT_HOP_INSTANCE_NOT_FOUND", + "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", + "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", + "NO_RESULTS_ON_PAGE", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", + "RESOURCE_NOT_DELETED", + "SCHEMA_VALIDATION_IGNORED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNDECLARED_PROPERTIES", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ], + "type": "string" + }, + "data": { + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "properties": { + "key": { + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).", + "type": "string" + }, + "value": { + "description": "[Output Only] A warning data value corresponding to the key.", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "[Output Only] A human-readable description of the warning code.", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "NetworkEndpointGroupsScopedList": { + "id": "NetworkEndpointGroupsScopedList", + "properties": { + "networkEndpointGroups": { + "description": "[Output Only] The list of network endpoint groups that are contained in this scope.", + "items": { + "$ref": "NetworkEndpointGroup" + }, + "type": "array" + }, + "warning": { + "description": "[Output Only] An informational warning that replaces the list of network endpoint groups when the list is empty.", + "properties": { + "code": { + "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", + "enum": [ + "CLEANUP_FAILED", + "DEPRECATED_RESOURCE_USED", + "DEPRECATED_TYPE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "EXPERIMENTAL_TYPE_USED", + "EXTERNAL_API_WARNING", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "MISSING_TYPE_DEPENDENCY", + "NEXT_HOP_ADDRESS_NOT_ASSIGNED", + "NEXT_HOP_CANNOT_IP_FORWARD", + "NEXT_HOP_INSTANCE_NOT_FOUND", + "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", + "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", + "NO_RESULTS_ON_PAGE", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", + "RESOURCE_NOT_DELETED", + "SCHEMA_VALIDATION_IGNORED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNDECLARED_PROPERTIES", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ], + "type": "string" + }, + "data": { + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "properties": { + "key": { + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).", + "type": "string" + }, + "value": { + "description": "[Output Only] A warning data value corresponding to the key.", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "[Output Only] A human-readable description of the warning code.", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "NetworkEndpointWithHealthStatus": { + "id": "NetworkEndpointWithHealthStatus", + "properties": { + "healths": { + "description": "[Output only] The health status of network endpoint;", + "items": { + "$ref": "HealthStatusForNetworkEndpoint" + }, + "type": "array" + }, + "networkEndpoint": { + "$ref": "NetworkEndpoint", + "description": "[Output only] The network endpoint;" + } + }, + "type": "object" + }, "NetworkInterface": { "description": "A network interface resource attached to an instance.", "id": "NetworkInterface", @@ -28007,7 +29505,11 @@ "id": "NetworkPeering", "properties": { "autoCreateRoutes": { - "description": "Indicates whether full mesh connectivity is created and managed automatically. When it is set to true, Google Compute Engine will automatically create and manage the routes between two networks when the state is ACTIVE. Otherwise, user needs to create routes manually to route packets to peer network.", + "description": "This field will be deprecated soon. Prefer using exchange_subnet_routes instead. Indicates whether full mesh connectivity is created and managed automatically. When it is set to true, Google Compute Engine will automatically create and manage the routes between two networks when the state is ACTIVE. Otherwise, user needs to create routes manually to route packets to peer network.", + "type": "boolean" + }, + "exchangeSubnetRoutes": { + "description": "Whether full mesh connectivity is created and managed automatically. When it is set to true, Google Compute Engine will automatically create and manage the routes between two networks when the peering state is ACTIVE. Otherwise, user needs to create routes manually to route packets to peer network.", "type": "boolean" }, "name": { @@ -28060,7 +29562,7 @@ "id": "NetworksAddPeeringRequest", "properties": { "autoCreateRoutes": { - "description": "Whether Google Compute Engine manages the routes automatically.", + "description": "This field will be deprecated soon. Prefer using exchange_subnet_routes in network_peering instead. Whether Google Compute Engine manages the routes automatically.", "type": "boolean" }, "name": { @@ -28072,6 +29574,10 @@ "description": "Name of the peering, which should conform to RFC1035.", "type": "string" }, + "networkPeering": { + "$ref": "NetworkPeering", + "description": "Network peering parameters. In order to specify route policies for peering using import/export custom routes, you will have to fill all peering related parameters (name, peer network, exchange_subnet_routes) in network_peeringfield. Corresponding fields in NetworksAddPeeringRequest will be deprecated soon." + }, "peerNetwork": { "description": "URL of the peer network. It can be either full URL or partial URL. The peer network may belong to a different project. If the partial URL does not contain project, it is assumed that the peer network is in the same project as the current network.", "type": "string" @@ -28090,7 +29596,7 @@ "type": "object" }, "NodeGroup": { - "description": "A NodeGroup resource.", + "description": "A NodeGroup resource. To create a node group, you must first create a node templates. To learn more about node groups and sole-tenant nodes, read the Sole-tenant nodes documentation. (== resource_for beta.nodeGroups ==) (== resource_for v1.nodeGroups ==)", "id": "NodeGroup", "properties": { "creationTimestamp": { @@ -28651,7 +30157,7 @@ "type": "object" }, "NodeTemplate": { - "description": "A Node Template resource.", + "description": "A Node Template resource. To learn more about node templates and sole-tenant nodes, read the Sole-tenant nodes documentation. (== resource_for beta.nodeTemplates ==) (== resource_for v1.nodeTemplates ==)", "id": "NodeTemplate", "properties": { "creationTimestamp": { @@ -29974,7 +31480,7 @@ "id": "PathMatcher", "properties": { "defaultService": { - "description": "The full or partial URL to the BackendService resource. This will be used if none of the pathRules or routeRules defined by this PathMatcher are matched. For example, the following are all valid URLs to a BackendService resource: \n- https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService \n- compute/v1/projects/project/global/backendServices/backendService \n- global/backendServices/backendService \nUse defaultService instead of defaultRouteAction when simple routing to a backend service is desired and other advanced capabilities like traffic splitting and URL rewrites are not required.\nOnly one of defaultService, defaultRouteAction or defaultUrlRedirect must be set.\nAuthorization requires one or more of the following Google IAM permissions on the specified resource default_service: \n- compute.backendBuckets.use \n- compute.backendServices.use", + "description": "The full or partial URL to the BackendService resource. This will be used if none of the pathRules or routeRules defined by this PathMatcher are matched. For example, the following are all valid URLs to a BackendService resource: \n- https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService \n- compute/v1/projects/project/global/backendServices/backendService \n- global/backendServices/backendService If defaultRouteAction is additionally specified, advanced routing actions like URL Rewrites, etc. take effect prior to sending the request to the backend. However, if defaultService is specified, defaultRouteAction cannot contain any weightedBackendServices. Conversely, if defaultRouteAction specifies any weightedBackendServices, defaultService must not be specified.\nOnly one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.\nAuthorization requires one or more of the following Google IAM permissions on the specified resource default_service: \n- compute.backendBuckets.use \n- compute.backendServices.use", "type": "string" }, "description": { @@ -30007,7 +31513,7 @@ "type": "array" }, "service": { - "description": "The URL of the backend service resource if this rule is matched.\nUse service instead of routeAction when simple routing to a backend service is desired and other advanced capabilities like traffic splitting and rewrites are not required.\nOnly one of service, routeAction or urlRedirect should must be set.", + "description": "The full or partial URL of the backend service resource to which traffic is directed if this rule is matched. If routeAction is additionally specified, advanced routing actions like URL Rewrites, etc. take effect prior to sending the request to the backend. However, if service is specified, routeAction cannot contain any weightedBackendService s. Conversely, if routeAction specifies any weightedBackendServices, service must not be specified.\nOnly one of urlRedirect, service or routeAction.weightedBackendService must be set.", "type": "string" } }, @@ -30227,6 +31733,7 @@ "CPUS", "CPUS_ALL_REGIONS", "DISKS_TOTAL_GB", + "EXTERNAL_VPN_GATEWAYS", "FIREWALLS", "FORWARDING_RULES", "GLOBAL_INTERNAL_ADDRESSES", @@ -30243,8 +31750,10 @@ "INTERNAL_ADDRESSES", "IN_USE_ADDRESSES", "IN_USE_BACKUP_SCHEDULES", + "IN_USE_SNAPSHOT_SCHEDULES", "LOCAL_SSD_TOTAL_GB", "NETWORKS", + "NETWORK_ENDPOINT_GROUPS", "NVIDIA_K80_GPUS", "NVIDIA_P100_GPUS", "NVIDIA_P100_VWS_GPUS", @@ -30351,10 +31860,17 @@ "", "", "", + "", + "", + "", "" ], "type": "string" }, + "owner": { + "description": "[Output Only] Owning resource. This is the resource on which this quota is applied.", + "type": "string" + }, "usage": { "description": "[Output Only] Current usage of this metric.", "format": "double", @@ -32308,7 +33824,7 @@ "type": "object" }, "RouterStatusNatStatus": { - "description": "Status of a NAT contained in this router.", + "description": "Status of a NAT contained in this router. Next tag: 9", "id": "RouterStatusNatStatus", "properties": { "autoAllocatedNatIps": { @@ -32545,6 +34061,20 @@ "description": "Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence.", "type": "string" }, + "portSpecification": { + "description": "Specifies how port is selected for health checking, can be one of following values:\nUSE_FIXED_PORT: The port number in\nport\nis used for health checking.\nUSE_NAMED_PORT: The\nportName\nis used for health checking.\nUSE_SERVING_PORT: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking.\n\n\nIf not specified, SSL health check follows behavior specified in\nport\nand\nportName\nfields.", + "enum": [ + "USE_FIXED_PORT", + "USE_NAMED_PORT", + "USE_SERVING_PORT" + ], + "enumDescriptions": [ + "", + "", + "" + ], + "type": "string" + }, "proxyHeader": { "description": "Specifies the type of proxy header to append before sending data to the backend, either NONE or PROXY_V1. The default is NONE.", "enum": [ @@ -32911,6 +34441,71 @@ }, "type": "object" }, + "ShieldedInstanceConfig": { + "description": "A set of Shielded Instance options.", + "id": "ShieldedInstanceConfig", + "properties": { + "enableIntegrityMonitoring": { + "description": "Defines whether the instance has integrity monitoring enabled.", + "type": "boolean" + }, + "enableSecureBoot": { + "description": "Defines whether the instance has Secure Boot enabled.", + "type": "boolean" + }, + "enableVtpm": { + "description": "Defines whether the instance has the vTPM enabled.", + "type": "boolean" + } + }, + "type": "object" + }, + "ShieldedInstanceIdentity": { + "description": "A shielded Instance identity entry.", + "id": "ShieldedInstanceIdentity", + "properties": { + "encryptionKey": { + "$ref": "ShieldedInstanceIdentityEntry", + "description": "An Endorsement Key (EK) issued to the Shielded Instance's vTPM." + }, + "kind": { + "default": "compute#shieldedInstanceIdentity", + "description": "[Output Only] Type of the resource. Always compute#shieldedInstanceIdentity for shielded Instance identity entry.", + "type": "string" + }, + "signingKey": { + "$ref": "ShieldedInstanceIdentityEntry", + "description": "An Attestation Key (AK) issued to the Shielded Instance's vTPM." + } + }, + "type": "object" + }, + "ShieldedInstanceIdentityEntry": { + "description": "A Shielded Instance Identity Entry.", + "id": "ShieldedInstanceIdentityEntry", + "properties": { + "ekCert": { + "description": "A PEM-encoded X.509 certificate. This field can be empty.", + "type": "string" + }, + "ekPub": { + "description": "A PEM-encoded public key.", + "type": "string" + } + }, + "type": "object" + }, + "ShieldedInstanceIntegrityPolicy": { + "description": "The policy describes the baseline against which Instance boot integrity is measured.", + "id": "ShieldedInstanceIntegrityPolicy", + "properties": { + "updateAutoLearnPolicy": { + "description": "Updates the integrity policy baseline using the measurements from the VM instance's most recent boot.", + "type": "boolean" + } + }, + "type": "object" + }, "SignedUrlKey": { "description": "Represents a customer-supplied Signing Key used by Cloud CDN Signed URLs", "id": "SignedUrlKey", @@ -33040,6 +34635,13 @@ "" ], "type": "string" + }, + "storageLocations": { + "description": "GCS bucket storage location of the snapshot (regional or multi-regional).", + "items": { + "type": "string" + }, + "type": "array" } }, "type": "object" @@ -34058,6 +35660,20 @@ "description": "Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence.", "type": "string" }, + "portSpecification": { + "description": "Specifies how port is selected for health checking, can be one of following values:\nUSE_FIXED_PORT: The port number in\nport\nis used for health checking.\nUSE_NAMED_PORT: The\nportName\nis used for health checking.\nUSE_SERVING_PORT: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking.\n\n\nIf not specified, TCP health check follows behavior specified in\nport\nand\nportName\nfields.", + "enum": [ + "USE_FIXED_PORT", + "USE_NAMED_PORT", + "USE_SERVING_PORT" + ], + "enumDescriptions": [ + "", + "", + "" + ], + "type": "string" + }, "proxyHeader": { "description": "Specifies the type of proxy header to append before sending data to the backend, either NONE or PROXY_V1. The default is NONE.", "enum": [ @@ -35720,7 +37336,7 @@ "type": "string" }, "forwardingRules": { - "description": "[Output Only] A list of URLs to the ForwardingRule resources. ForwardingRules are created using compute.forwardingRules.insert and associated to a VPN gateway.", + "description": "[Output Only] A list of URLs to the ForwardingRule resources. ForwardingRules are created using compute.forwardingRules.insert and associated with a VPN gateway.", "items": { "type": "string" }, @@ -35764,7 +37380,7 @@ "type": "string" }, "status": { - "description": "[Output Only] The status of the VPN gateway.", + "description": "[Output Only] The status of the VPN gateway, which can be one of the following: CREATING, READY, FAILED, or DELETING.", "enum": [ "CREATING", "DELETING", @@ -35780,7 +37396,7 @@ "type": "string" }, "tunnels": { - "description": "[Output Only] A list of URLs to VpnTunnel resources. VpnTunnels are created using compute.vpntunnels.insert method and associated to a VPN gateway.", + "description": "[Output Only] A list of URLs to VpnTunnel resources. VpnTunnels are created using the compute.vpntunnels.insert method and associated with a VPN gateway.", "items": { "type": "string" }, @@ -36017,7 +37633,7 @@ "id": "TargetVpnGatewaysScopedList", "properties": { "targetVpnGateways": { - "description": "[Output Only] A list of target vpn gateways contained in this scope.", + "description": "[Output Only] A list of target VPN gateways contained in this scope.", "items": { "$ref": "TargetVpnGateway" }, @@ -36160,7 +37776,7 @@ "type": "string" }, "defaultService": { - "description": "The URL of the backendService resource if none of the hostRules match.\nUse defaultService instead of defaultRouteAction when simple routing to a backendService is desired and other advanced capabilities like traffic splitting and rewrites are not required.\nOnly one of defaultService, defaultRouteAction or defaultUrlRedirect should must be set.", + "description": "The full or partial URL of the defaultService resource to which traffic is directed if none of the hostRules match. If defaultRouteAction is additionally specified, advanced routing actions like URL Rewrites, etc. take effect prior to sending the request to the backend. However, if defaultService is specified, defaultRouteAction cannot contain any weightedBackendServices. Conversely, if routeAction specifies any weightedBackendServices, service must not be specified.\nOnly one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.", "type": "string" }, "description": { @@ -36750,7 +38366,7 @@ "type": "string" }, "ikeVersion": { - "description": "IKE protocol version to use when establishing the VPN tunnel with peer VPN gateway. Acceptable IKE versions are 1 or 2. Default version is 2.", + "description": "IKE protocol version to use when establishing the VPN tunnel with the peer VPN gateway. Acceptable IKE versions are 1 or 2. The default version is 2.", "format": "int32", "type": "integer" }, @@ -36760,7 +38376,7 @@ "type": "string" }, "localTrafficSelector": { - "description": "Local traffic selector to use when establishing the VPN tunnel with peer VPN gateway. The value should be a CIDR formatted string, for example: 192.168.0.0/16. The ranges should be disjoint. Only IPv4 is supported.", + "description": "Local traffic selector to use when establishing the VPN tunnel with the peer VPN gateway. The value should be a CIDR formatted string, for example: 192.168.0.0/16. The ranges must be disjoint. Only IPv4 is supported.", "items": { "type": "string" }, @@ -36785,14 +38401,14 @@ "type": "string" }, "remoteTrafficSelector": { - "description": "Remote traffic selectors to use when establishing the VPN tunnel with peer VPN gateway. The value should be a CIDR formatted string, for example: 192.168.0.0/16. The ranges should be disjoint. Only IPv4 is supported.", + "description": "Remote traffic selectors to use when establishing the VPN tunnel with the peer VPN gateway. The value should be a CIDR formatted string, for example: 192.168.0.0/16. The ranges should be disjoint. Only IPv4 is supported.", "items": { "type": "string" }, "type": "array" }, "router": { - "description": "URL of router resource to be used for dynamic routing.", + "description": "URL of the router resource to be used for dynamic routing.", "type": "string" }, "selfLink": { @@ -36808,7 +38424,7 @@ "type": "string" }, "status": { - "description": "[Output Only] The status of the VPN tunnel.", + "description": "[Output Only] The status of the VPN tunnel, which can be one of the following: \n- PROVISIONING: Resource is being allocated for the VPN tunnel. \n- WAITING_FOR_FULL_CONFIG: Waiting to receive all VPN-related configs from the user. Network, TargetVpnGateway, VpnTunnel, ForwardingRule, and Route resources are needed to setup the VPN tunnel. \n- FIRST_HANDSHAKE: Successful first handshake with the peer VPN. \n- ESTABLISHED: Secure session is successfully established with the peer VPN. \n- NETWORK_ERROR: Deprecated, replaced by NO_INCOMING_PACKETS \n- AUTHORIZATION_ERROR: Auth error (for example, bad shared secret). \n- NEGOTIATION_FAILURE: Handshake failed. \n- DEPROVISIONING: Resources are being deallocated for the VPN tunnel. \n- FAILED: Tunnel creation has failed and the tunnel is not ready to be used.", "enum": [ "ALLOCATING_RESOURCES", "AUTHORIZATION_ERROR", @@ -36856,7 +38472,7 @@ "items": { "additionalProperties": { "$ref": "VpnTunnelsScopedList", - "description": "Name of the scope containing this set of vpn tunnels." + "description": "Name of the scope containing this set of VPN tunnels." }, "description": "A list of VpnTunnelsScopedList resources.", "type": "object" @@ -37074,7 +38690,7 @@ "id": "VpnTunnelsScopedList", "properties": { "vpnTunnels": { - "description": "A list of vpn tunnels contained in this scope.", + "description": "A list of VPN tunnels contained in this scope.", "items": { "$ref": "VpnTunnel" }, @@ -37299,7 +38915,7 @@ "type": "object" }, "Zone": { - "description": "A Zone resource. (== resource_for beta.zones ==) (== resource_for v1.zones ==)", + "description": "A Zone resource. (== resource_for beta.zones ==) (== resource_for v1.zones ==) Next ID: 17", "id": "Zone", "properties": { "availableCpuPlatforms": { diff --git a/vendor/google.golang.org/api/compute/v1/compute-gen.go b/vendor/google.golang.org/api/compute/v1/compute-gen.go index e0047223..a8d3b1a6 100644 --- a/vendor/google.golang.org/api/compute/v1/compute-gen.go +++ b/vendor/google.golang.org/api/compute/v1/compute-gen.go @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. All rights reserved. +// Copyright 2019 Google LLC. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. @@ -6,13 +6,39 @@ // Package compute provides access to the Compute Engine API. // -// See https://developers.google.com/compute/docs/reference/latest/ +// For product documentation, see: https://developers.google.com/compute/docs/reference/latest/ +// +// Creating a client // // Usage example: // // import "google.golang.org/api/compute/v1" // ... -// computeService, err := compute.New(oauthHttpClient) +// ctx := context.Background() +// computeService, err := compute.NewService(ctx) +// +// In this example, Google Application Default Credentials are used for authentication. +// +// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// +// Other authentication options +// +// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// +// computeService, err := compute.NewService(ctx, option.WithScopes(compute.DevstorageReadWriteScope)) +// +// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// +// computeService, err := compute.NewService(ctx, option.WithAPIKey("AIza...")) +// +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// +// config := &oauth2.Config{...} +// // ... +// token, err := config.Exchange(ctx, ...) +// computeService, err := compute.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) +// +// See https://godoc.org/google.golang.org/api/option/ for details on options. package compute // import "google.golang.org/api/compute/v1" import ( @@ -29,6 +55,8 @@ import ( gensupport "google.golang.org/api/gensupport" googleapi "google.golang.org/api/googleapi" + option "google.golang.org/api/option" + htransport "google.golang.org/api/transport/http" ) // Always reference these packages, just in case the auto-generated code @@ -71,6 +99,37 @@ const ( DevstorageReadWriteScope = "https://www.googleapis.com/auth/devstorage.read_write" ) +// NewService creates a new Service. +func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { + scopesOption := option.WithScopes( + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly", + "https://www.googleapis.com/auth/devstorage.full_control", + "https://www.googleapis.com/auth/devstorage.read_only", + "https://www.googleapis.com/auth/devstorage.read_write", + ) + // NOTE: prepend, so we don't override user-specified scopes. + opts = append([]option.ClientOption{scopesOption}, opts...) + client, endpoint, err := htransport.NewClient(ctx, opts...) + if err != nil { + return nil, err + } + s, err := New(client) + if err != nil { + return nil, err + } + if endpoint != "" { + s.BasePath = endpoint + } + return s, nil +} + +// New creates a new Service. It uses the provided http.Client for requests. +// +// Deprecated: please use NewService instead. +// To provide a custom HTTP client, use option.WithHTTPClient. +// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. func New(client *http.Client) (*Service, error) { if client == nil { return nil, errors.New("client is nil") @@ -102,6 +161,7 @@ func New(client *http.Client) (*Service, error) { s.LicenseCodes = NewLicenseCodesService(s) s.Licenses = NewLicensesService(s) s.MachineTypes = NewMachineTypesService(s) + s.NetworkEndpointGroups = NewNetworkEndpointGroupsService(s) s.Networks = NewNetworksService(s) s.NodeGroups = NewNodeGroupsService(s) s.NodeTemplates = NewNodeTemplatesService(s) @@ -194,6 +254,8 @@ type Service struct { MachineTypes *MachineTypesService + NetworkEndpointGroups *NetworkEndpointGroupsService + Networks *NetworksService NodeGroups *NodeGroupsService @@ -500,6 +562,15 @@ type MachineTypesService struct { s *Service } +func NewNetworkEndpointGroupsService(s *Service) *NetworkEndpointGroupsService { + rs := &NetworkEndpointGroupsService{s: s} + return rs +} + +type NetworkEndpointGroupsService struct { + s *Service +} + func NewNetworksService(s *Service) *NetworksService { rs := &NetworksService{s: s} return rs @@ -796,8 +867,11 @@ type AcceleratorConfig struct { AcceleratorCount int64 `json:"acceleratorCount,omitempty"` // AcceleratorType: Full or partial URL of the accelerator type resource - // to attach to this instance. If you are creating an instance template, - // specify only the accelerator name. + // to attach to this instance. For example: + // projects/my-project/zones/us-central1-c/acceleratorTypes/nvidia-tesla- + // p100 If you are creating an instance template, specify only the + // accelerator name. See GPUs on Compute Engine for a full list of + // accelerator types. AcceleratorType string `json:"acceleratorType,omitempty"` // ForceSendFields is a list of field names (e.g. "AcceleratorCount") to @@ -1492,6 +1566,7 @@ type Address struct { // Possible values: // "DNS_RESOLVER" // "GCE_ENDPOINT" + // "NAT_AUTO" // "VPC_PEERING" Purpose string `json:"purpose,omitempty"` @@ -2053,7 +2128,7 @@ type AttachedDisk struct { // the instance. // // If not specified, the server chooses a default device name to apply - // to this disk, in the form persistent-disks-x, where x is a number + // to this disk, in the form persistent-disk-x, where x is a number // assigned by Google Compute Engine. This field is only applicable for // persistent disks. DeviceName string `json:"deviceName,omitempty"` @@ -3206,7 +3281,7 @@ func (s *AutoscalingPolicyCustomMetricUtilization) UnmarshalJSON(data []byte) er // of autoscaling based on load balancing. type AutoscalingPolicyLoadBalancingUtilization struct { // UtilizationTarget: Fraction of backend capacity utilization (set in - // HTTP(s) load balancing configuration) that autoscaler should + // HTTP(S) load balancing configuration) that autoscaler should // maintain. Must be a positive float value. If not defined, the default // is 0.8. UtilizationTarget float64 `json:"utilizationTarget,omitempty"` @@ -3311,6 +3386,15 @@ type Backend struct { // This cannot be used for internal load balancing. MaxConnections int64 `json:"maxConnections,omitempty"` + // MaxConnectionsPerEndpoint: The max number of simultaneous connections + // that a single backend network endpoint can handle. This is used to + // calculate the capacity of the group. Can be used in either CONNECTION + // or UTILIZATION balancing modes. For CONNECTION mode, either + // maxConnections or maxConnectionsPerEndpoint must be set. + // + // This cannot be used for internal load balancing. + MaxConnectionsPerEndpoint int64 `json:"maxConnectionsPerEndpoint,omitempty"` + // MaxConnectionsPerInstance: The max number of simultaneous connections // that a single backend instance can handle. This is used to calculate // the capacity of the group. Can be used in either CONNECTION or @@ -3328,6 +3412,14 @@ type Backend struct { // This cannot be used for internal load balancing. MaxRate int64 `json:"maxRate,omitempty"` + // MaxRatePerEndpoint: The max requests per second (RPS) that a single + // backend network endpoint can handle. This is used to calculate the + // capacity of the group. Can be used in either balancing mode. For RATE + // mode, either maxRate or maxRatePerEndpoint must be set. + // + // This cannot be used for internal load balancing. + MaxRatePerEndpoint float64 `json:"maxRatePerEndpoint,omitempty"` + // MaxRatePerInstance: The max requests per second (RPS) that a single // backend instance can handle. This is used to calculate the capacity // of the group. Can be used in either balancing mode. For RATE mode, @@ -3370,6 +3462,7 @@ func (s *Backend) UnmarshalJSON(data []byte) error { type NoMethod Backend var s1 struct { CapacityScaler gensupport.JSONFloat64 `json:"capacityScaler"` + MaxRatePerEndpoint gensupport.JSONFloat64 `json:"maxRatePerEndpoint"` MaxRatePerInstance gensupport.JSONFloat64 `json:"maxRatePerInstance"` MaxUtilization gensupport.JSONFloat64 `json:"maxUtilization"` *NoMethod @@ -3379,6 +3472,7 @@ func (s *Backend) UnmarshalJSON(data []byte) error { return err } s.CapacityScaler = float64(s1.CapacityScaler) + s.MaxRatePerEndpoint = float64(s1.MaxRatePerEndpoint) s.MaxRatePerInstance = float64(s1.MaxRatePerInstance) s.MaxUtilization = float64(s1.MaxUtilization) return nil @@ -3672,6 +3766,10 @@ type BackendService struct { // format. CreationTimestamp string `json:"creationTimestamp,omitempty"` + // CustomRequestHeaders: Headers that the HTTP/S load balancer should + // add to proxied requests. + CustomRequestHeaders []string `json:"customRequestHeaders,omitempty"` + // Description: An optional description of this resource. Provide this // property when you create the resource. Description string `json:"description,omitempty"` @@ -3756,6 +3854,7 @@ type BackendService struct { // // Possible values: // "HTTP" + // "HTTP2" // "HTTPS" // "SSL" // "TCP" @@ -4255,6 +4354,33 @@ func (s *BackendServiceListWarningData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type BackendServiceReference struct { + BackendService string `json:"backendService,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BackendService") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "BackendService") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *BackendServiceReference) MarshalJSON() ([]byte, error) { + type NoMethod BackendServiceReference + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type BackendServicesScopedList struct { // BackendServices: A list of BackendServices contained in this scope. BackendServices []*BackendService `json:"backendServices,omitempty"` @@ -4391,10 +4517,10 @@ func (s *BackendServicesScopedListWarningData) MarshalJSON() ([]byte, error) { // Binding: Associates `members` with a `role`. type Binding struct { - // Condition: Unimplemented. The condition that is associated with this - // binding. NOTE: an unsatisfied condition will not allow user access - // via current binding. Different bindings, including their conditions, - // are examined independently. + // Condition: The condition that is associated with this binding. NOTE: + // An unsatisfied condition will not allow user access via current + // binding. Different bindings, including their conditions, are examined + // independently. Condition *Expr `json:"condition,omitempty"` // Members: Specifies the identities requesting access for a Cloud @@ -4421,7 +4547,7 @@ type Binding struct { // // // - // * `domain:{domain}`: A Google Apps domain name that represents all + // * `domain:{domain}`: The G Suite domain (primary) that represents all // the users of that domain. For example, `google.com` or `example.com`. Members []string `json:"members,omitempty"` @@ -5127,11 +5253,7 @@ type Condition struct { // "SERVICE" Sys string `json:"sys,omitempty"` - // Value: DEPRECATED. Use 'values' instead. - Value string `json:"value,omitempty"` - - // Values: The objects of the condition. This is mutually exclusive with - // 'value'. + // Values: The objects of the condition. Values []string `json:"values,omitempty"` // ForceSendFields is a list of field names (e.g. "Iam") to @@ -5284,14 +5406,16 @@ type DeprecationStatus struct { // resource as the deprecated resource. Replacement string `json:"replacement,omitempty"` - // State: The deprecation state of this resource. This can be - // DEPRECATED, OBSOLETE, or DELETED. Operations which create a new - // resource using a DEPRECATED resource will return successfully, but - // with a warning indicating the deprecated resource and recommending - // its replacement. Operations which use OBSOLETE or DELETED resources - // will be rejected and result in an error. + // State: The deprecation state of this resource. This can be ACTIVE, + // DEPRECATED, OBSOLETE, or DELETED. Operations which communicate the + // end of life date for an image, can use ACTIVE. Operations which + // create a new resource using a DEPRECATED resource will return + // successfully, but with a warning indicating the deprecated resource + // and recommending its replacement. Operations which use OBSOLETE or + // DELETED resources will be rejected and result in an error. // // Possible values: + // "ACTIVE" // "DELETED" // "DEPRECATED" // "OBSOLETE" @@ -5505,6 +5629,7 @@ type Disk struct { // // Possible values: // "CREATING" + // "DELETING" // "FAILED" // "READY" // "RESTORING" @@ -7184,6 +7309,52 @@ func (s *FirewallLogConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// FixedOrPercent: Encapsulates numeric value that can be either +// absolute or relative. +type FixedOrPercent struct { + // Calculated: [Output Only] Absolute value of VM instances calculated + // based on the specific mode. + // + // + // - If the value is fixed, then the calculated value is equal to the + // fixed value. + // - If the value is a percent, then the calculated value is percent/100 + // * targetSize. For example, the calculated value of a 80% of a managed + // instance group with 150 instances would be (80/100 * 150) = 120 VM + // instances. If there is a remainder, the number is rounded up. + Calculated int64 `json:"calculated,omitempty"` + + // Fixed: Specifies a fixed number of VM instances. This must be a + // positive integer. + Fixed int64 `json:"fixed,omitempty"` + + // Percent: Specifies a percentage of instances between 0 to 100%, + // inclusive. For example, specify 80 for 80%. + Percent int64 `json:"percent,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Calculated") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Calculated") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *FixedOrPercent) MarshalJSON() ([]byte, error) { + type NoMethod FixedOrPercent + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ForwardingRule: A ForwardingRule resource. A ForwardingRule resource // specifies which pool of target virtual machines to forward a packet // to if it matches the given [IPAddress, IPProtocol, ports] tuple. (== @@ -7247,6 +7418,16 @@ type ForwardingRule struct { // "UDP" IPProtocol string `json:"IPProtocol,omitempty"` + // AllPorts: This field is used along with the backend_service field for + // internal load balancing or with the target field for internal + // TargetInstance. This field cannot be used with port or portRange + // fields. + // + // When the load balancing scheme is INTERNAL and protocol is TCP/UDP, + // specify this field to allow packets addressed to any ports will be + // forwarded to the backends configured with this forwarding rule. + AllPorts bool `json:"allPorts,omitempty"` + // BackendService: This field is only used for INTERNAL load // balancing. // @@ -7368,6 +7549,26 @@ type ForwardingRule struct { // SelfLink: [Output Only] Server-defined URL for the resource. SelfLink string `json:"selfLink,omitempty"` + // ServiceLabel: An optional prefix to the service name for this + // Forwarding Rule. If specified, will be the first label of the fully + // qualified service name. + // + // The label must be 1-63 characters long, and comply with RFC1035. + // Specifically, the label must be 1-63 characters long and match the + // regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first + // character must be a lowercase letter, and all following characters + // must be a dash, lowercase letter, or digit, except the last + // character, which cannot be a dash. + // + // This field is only used for internal load balancing. + ServiceLabel string `json:"serviceLabel,omitempty"` + + // ServiceName: [Output Only] The internal fully qualified service name + // for this Forwarding Rule. + // + // This field is only used for internal load balancing. + ServiceName string `json:"serviceName,omitempty"` + // Subnetwork: This field is only used for INTERNAL load balancing. // // For internal load balancing, this field identifies the subnetwork @@ -7384,8 +7585,8 @@ type ForwardingRule struct { // same region as the forwarding rule. For global forwarding rules, this // target must be a global load balancing resource. The forwarded // traffic must be of a type appropriate to the target object. For - // INTERNAL_SELF_MANAGED" load balancing, only HTTP and HTTPS targets - // are valid. + // INTERNAL_SELF_MANAGED load balancing, only HTTP and HTTPS targets are + // valid. Target string `json:"target,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -7725,6 +7926,33 @@ func (s *ForwardingRuleListWarningData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type ForwardingRuleReference struct { + ForwardingRule string `json:"forwardingRule,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ForwardingRule") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ForwardingRule") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *ForwardingRuleReference) MarshalJSON() ([]byte, error) { + type NoMethod ForwardingRuleReference + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type ForwardingRulesScopedList struct { // ForwardingRules: A list of forwarding rules contained in this scope. ForwardingRules []*ForwardingRule `json:"forwardingRules,omitempty"` @@ -7978,6 +8206,88 @@ func (s *GuestOsFeature) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type HTTP2HealthCheck struct { + // Host: The value of the host header in the HTTP/2 health check + // request. If left empty (default value), the IP on behalf of which + // this health check is performed will be used. + Host string `json:"host,omitempty"` + + // Port: The TCP port number for the health check request. The default + // value is 443. Valid values are 1 through 65535. + Port int64 `json:"port,omitempty"` + + // PortName: Port name as defined in InstanceGroup#NamedPort#name. If + // both port and port_name are defined, port takes precedence. + PortName string `json:"portName,omitempty"` + + // PortSpecification: Specifies how port is selected for health + // checking, can be one of following values: + // USE_FIXED_PORT: The port number in + // port + // is used for health checking. + // USE_NAMED_PORT: The + // portName + // is used for health checking. + // USE_SERVING_PORT: For NetworkEndpointGroup, the port specified for + // each network endpoint is used for health checking. For other + // backends, the port or named port specified in the Backend Service is + // used for health checking. + // + // + // If not specified, HTTP2 health check follows behavior specified + // in + // port + // and + // portName + // fields. + // + // Possible values: + // "USE_FIXED_PORT" + // "USE_NAMED_PORT" + // "USE_SERVING_PORT" + PortSpecification string `json:"portSpecification,omitempty"` + + // ProxyHeader: Specifies the type of proxy header to append before + // sending data to the backend, either NONE or PROXY_V1. The default is + // NONE. + // + // Possible values: + // "NONE" + // "PROXY_V1" + ProxyHeader string `json:"proxyHeader,omitempty"` + + // RequestPath: The request path of the HTTP/2 health check request. The + // default value is /. + RequestPath string `json:"requestPath,omitempty"` + + // Response: The string to match anywhere in the first 1024 bytes of the + // response body. If left empty (the default value), the status code + // determines health. The response data can only be ASCII. + Response string `json:"response,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Host") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Host") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *HTTP2HealthCheck) MarshalJSON() ([]byte, error) { + type NoMethod HTTP2HealthCheck + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type HTTPHealthCheck struct { // Host: The value of the host header in the HTTP health check request. // If left empty (default value), the IP on behalf of which this health @@ -7992,6 +8302,33 @@ type HTTPHealthCheck struct { // both port and port_name are defined, port takes precedence. PortName string `json:"portName,omitempty"` + // PortSpecification: Specifies how port is selected for health + // checking, can be one of following values: + // USE_FIXED_PORT: The port number in + // port + // is used for health checking. + // USE_NAMED_PORT: The + // portName + // is used for health checking. + // USE_SERVING_PORT: For NetworkEndpointGroup, the port specified for + // each network endpoint is used for health checking. For other + // backends, the port or named port specified in the Backend Service is + // used for health checking. + // + // + // If not specified, HTTP health check follows behavior specified + // in + // port + // and + // portName + // fields. + // + // Possible values: + // "USE_FIXED_PORT" + // "USE_NAMED_PORT" + // "USE_SERVING_PORT" + PortSpecification string `json:"portSpecification,omitempty"` + // ProxyHeader: Specifies the type of proxy header to append before // sending data to the backend, either NONE or PROXY_V1. The default is // NONE. @@ -8047,6 +8384,33 @@ type HTTPSHealthCheck struct { // both port and port_name are defined, port takes precedence. PortName string `json:"portName,omitempty"` + // PortSpecification: Specifies how port is selected for health + // checking, can be one of following values: + // USE_FIXED_PORT: The port number in + // port + // is used for health checking. + // USE_NAMED_PORT: The + // portName + // is used for health checking. + // USE_SERVING_PORT: For NetworkEndpointGroup, the port specified for + // each network endpoint is used for health checking. For other + // backends, the port or named port specified in the Backend Service is + // used for health checking. + // + // + // If not specified, HTTPS health check follows behavior specified + // in + // port + // and + // portName + // fields. + // + // Possible values: + // "USE_FIXED_PORT" + // "USE_NAMED_PORT" + // "USE_SERVING_PORT" + PortSpecification string `json:"portSpecification,omitempty"` + // ProxyHeader: Specifies the type of proxy header to append before // sending data to the backend, either NONE or PROXY_V1. The default is // NONE. @@ -8108,6 +8472,8 @@ type HealthCheck struct { // after this many consecutive successes. The default value is 2. HealthyThreshold int64 `json:"healthyThreshold,omitempty"` + Http2HealthCheck *HTTP2HealthCheck `json:"http2HealthCheck,omitempty"` + HttpHealthCheck *HTTPHealthCheck `json:"httpHealthCheck,omitempty"` HttpsHealthCheck *HTTPSHealthCheck `json:"httpsHealthCheck,omitempty"` @@ -8140,13 +8506,14 @@ type HealthCheck struct { // greater value than checkIntervalSec. TimeoutSec int64 `json:"timeoutSec,omitempty"` - // Type: Specifies the type of the healthCheck, either TCP, SSL, HTTP or - // HTTPS. If not specified, the default is TCP. Exactly one of the - // protocol-specific health check field must be specified, which must - // match type field. + // Type: Specifies the type of the healthCheck, either TCP, SSL, HTTP, + // HTTPS or HTTP2. If not specified, the default is TCP. Exactly one of + // the protocol-specific health check field must be specified, which + // must match type field. // // Possible values: // "HTTP" + // "HTTP2" // "HTTPS" // "INVALID" // "SSL" @@ -8412,6 +8779,53 @@ func (s *HealthStatus) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type HealthStatusForNetworkEndpoint struct { + // BackendService: URL of the backend service associated with the health + // state of the network endpoint. + BackendService *BackendServiceReference `json:"backendService,omitempty"` + + // ForwardingRule: URL of the forwarding rule associated with the health + // state of the network endpoint. + ForwardingRule *ForwardingRuleReference `json:"forwardingRule,omitempty"` + + // HealthCheck: URL of the health check associated with the health state + // of the network endpoint. + HealthCheck *HealthCheckReference `json:"healthCheck,omitempty"` + + // HealthState: Health state of the network endpoint determined based on + // the health checks configured. + // + // Possible values: + // "DRAINING" + // "HEALTHY" + // "UNHEALTHY" + // "UNKNOWN" + HealthState string `json:"healthState,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BackendService") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "BackendService") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *HealthStatusForNetworkEndpoint) MarshalJSON() ([]byte, error) { + type NoMethod HealthStatusForNetworkEndpoint + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // HostRule: UrlMaps A host-matching rule for a URL. If matched, will // use the named PathMatcher to select the BackendService. type HostRule struct { @@ -9109,6 +9523,7 @@ type Image struct { // Possible values are FAILED, PENDING, or READY. // // Possible values: + // "DELETING" // "FAILED" // "PENDING" // "READY" @@ -9154,7 +9569,7 @@ type ImageRawDisk struct { ContainerType string `json:"containerType,omitempty"` // Sha1Checksum: An optional SHA1 checksum of the disk image before - // unpackaging; provided by the client when the disk image is created. + // unpackaging provided by the client when the disk image is created. Sha1Checksum string `json:"sha1Checksum,omitempty"` // Source: The full Google Cloud Storage URL where the disk image is @@ -9371,6 +9786,8 @@ type Instance struct { // attached to the instance. GuestAccelerators []*AcceleratorConfig `json:"guestAccelerators,omitempty"` + Hostname string `json:"hostname,omitempty"` + // Id: [Output Only] The unique identifier for the resource. This // identifier is defined by the server. Id uint64 `json:"id,omitempty,string"` @@ -9458,6 +9875,10 @@ type Instance struct { // instance. See Service Accounts for more information. ServiceAccounts []*ServiceAccount `json:"serviceAccounts,omitempty"` + ShieldedInstanceConfig *ShieldedInstanceConfig `json:"shieldedInstanceConfig,omitempty"` + + ShieldedInstanceIntegrityPolicy *ShieldedInstanceIntegrityPolicy `json:"shieldedInstanceIntegrityPolicy,omitempty"` + // StartRestricted: [Output Only] Whether a VM has been restricted for // start because Compute Engine has detected suspicious activity. StartRestricted bool `json:"startRestricted,omitempty"` @@ -9468,6 +9889,7 @@ type Instance struct { // // Possible values: // "PROVISIONING" + // "REPAIRING" // "RUNNING" // "STAGING" // "STOPPED" @@ -10087,6 +10509,10 @@ func (s *InstanceGroupListWarningData) MarshalJSON() ([]byte, error) { // beta.regionInstanceGroupManagers ==) (== resource_for // v1.regionInstanceGroupManagers ==) type InstanceGroupManager struct { + // AutoHealingPolicies: The autohealing policy for this managed instance + // group. You can specify only one value. + AutoHealingPolicies []*InstanceGroupManagerAutoHealingPolicy `json:"autoHealingPolicies,omitempty"` + // BaseInstanceName: The base instance name to use for instances in this // group. The value must be 1-58 characters long. Instances are named by // appending a hyphen and a random four-character string to the base @@ -10152,6 +10578,9 @@ type InstanceGroupManager struct { // server defines this URL. SelfLink string `json:"selfLink,omitempty"` + // Status: [Output Only] The status of this managed instance group. + Status *InstanceGroupManagerStatus `json:"status,omitempty"` + // TargetPools: The URLs for all TargetPool resources to which instances // in the instanceGroup field are added. The target pools automatically // apply to all of the instances in the managed instance group. @@ -10162,6 +10591,20 @@ type InstanceGroupManager struct { // Resizing the group changes this number. TargetSize int64 `json:"targetSize,omitempty"` + // UpdatePolicy: The update policy for this managed instance group. + UpdatePolicy *InstanceGroupManagerUpdatePolicy `json:"updatePolicy,omitempty"` + + // Versions: Specifies the instance templates used by this managed + // instance group to create instances. + // + // Each version is defined by an instanceTemplate and a name. Every + // version can appear at most once per instance group. This field + // overrides the top-level instanceTemplate field. Read more about the + // relationships between these fields. Exactly one version must leave + // the targetSize field unset. That version will be applied to all + // remaining instances. For more information, read about canary updates. + Versions []*InstanceGroupManagerVersion `json:"versions,omitempty"` + // Zone: [Output Only] The URL of the zone where the managed instance // group is located (for zonal resources). Zone string `json:"zone,omitempty"` @@ -10170,15 +10613,15 @@ type InstanceGroupManager struct { // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "BaseInstanceName") to - // unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "AutoHealingPolicies") + // to unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BaseInstanceName") to + // NullFields is a list of field names (e.g. "AutoHealingPolicies") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -10430,6 +10873,42 @@ func (s *InstanceGroupManagerAggregatedListWarningData) MarshalJSON() ([]byte, e return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type InstanceGroupManagerAutoHealingPolicy struct { + // HealthCheck: The URL for the health check that signals autohealing. + HealthCheck string `json:"healthCheck,omitempty"` + + // InitialDelaySec: The number of seconds that the managed instance + // group waits before it applies autohealing policies to new instances + // or recently recreated instances. This initial delay allows instances + // to initialize and run their startup scripts before the instance group + // determines that they are UNHEALTHY. This prevents the managed + // instance group from recreating its instances prematurely. This value + // must be from range [0, 3600]. + InitialDelaySec int64 `json:"initialDelaySec,omitempty"` + + // ForceSendFields is a list of field names (e.g. "HealthCheck") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "HealthCheck") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *InstanceGroupManagerAutoHealingPolicy) MarshalJSON() ([]byte, error) { + type NoMethod InstanceGroupManagerAutoHealingPolicy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // InstanceGroupManagerList: [Output Only] A list of managed instance // groups. type InstanceGroupManagerList struct { @@ -10588,6 +11067,157 @@ func (s *InstanceGroupManagerListWarningData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type InstanceGroupManagerStatus struct { + // IsStable: [Output Only] A bit indicating whether the managed instance + // group is in a stable state. A stable state means that: none of the + // instances in the managed instance group is currently undergoing any + // type of change (for example, creation, restart, or deletion); no + // future changes are scheduled for instances in the managed instance + // group; and the managed instance group itself is not being modified. + IsStable bool `json:"isStable,omitempty"` + + // ForceSendFields is a list of field names (e.g. "IsStable") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "IsStable") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *InstanceGroupManagerStatus) MarshalJSON() ([]byte, error) { + type NoMethod InstanceGroupManagerStatus + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type InstanceGroupManagerUpdatePolicy struct { + // MaxSurge: The maximum number of instances that can be created above + // the specified targetSize during the update process. By default, a + // fixed value of 1 is used. This value can be either a fixed number or + // a percentage if the instance group has 10 or more instances. If you + // set a percentage, the number of instances will be rounded up if + // necessary. + // + // At least one of either maxSurge or maxUnavailable must be greater + // than 0. Learn more about maxSurge. + MaxSurge *FixedOrPercent `json:"maxSurge,omitempty"` + + // MaxUnavailable: The maximum number of instances that can be + // unavailable during the update process. An instance is considered + // available if all of the following conditions are satisfied: + // + // + // - The instance's status is RUNNING. + // - If there is a health check on the instance group, the instance's + // liveness health check result must be HEALTHY at least once. If there + // is no health check on the group, then the instance only needs to have + // a status of RUNNING to be considered available. By default, a fixed + // value of 1 is used. This value can be either a fixed number or a + // percentage if the instance group has 10 or more instances. If you set + // a percentage, the number of instances will be rounded up if + // necessary. + // + // At least one of either maxSurge or maxUnavailable must be greater + // than 0. Learn more about maxUnavailable. + MaxUnavailable *FixedOrPercent `json:"maxUnavailable,omitempty"` + + // MinimalAction: Minimal action to be taken on an instance. You can + // specify either RESTART to restart existing instances or REPLACE to + // delete and create new instances from the target template. If you + // specify a RESTART, the Updater will attempt to perform that action + // only. However, if the Updater determines that the minimal action you + // specify is not enough to perform the update, it might perform a more + // disruptive action. + // + // Possible values: + // "REPLACE" + // "RESTART" + MinimalAction string `json:"minimalAction,omitempty"` + + // Possible values: + // "OPPORTUNISTIC" + // "PROACTIVE" + Type string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "MaxSurge") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "MaxSurge") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *InstanceGroupManagerUpdatePolicy) MarshalJSON() ([]byte, error) { + type NoMethod InstanceGroupManagerUpdatePolicy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type InstanceGroupManagerVersion struct { + // InstanceTemplate: The URL of the instance template that is specified + // for this managed instance group. The group uses this template to + // create new instances in the managed instance group until the + // `targetSize` for this version is reached. + InstanceTemplate string `json:"instanceTemplate,omitempty"` + + // Name: Name of the version. Unique among all versions in the scope of + // this managed instance group. + Name string `json:"name,omitempty"` + + // TargetSize: Specifies the intended number of instances to be created + // from the instanceTemplate. The final number of instances created from + // the template will be equal to: + // - If expressed as a fixed number, the minimum of either + // targetSize.fixed or instanceGroupManager.targetSize is used. + // - if expressed as a percent, the targetSize would be + // (targetSize.percent/100 * InstanceGroupManager.targetSize) If there + // is a remainder, the number is rounded up. If unset, this version + // will update any remaining instances not updated by another version. + // Read Starting a canary update for more information. + TargetSize *FixedOrPercent `json:"targetSize,omitempty"` + + // ForceSendFields is a list of field names (e.g. "InstanceTemplate") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "InstanceTemplate") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *InstanceGroupManagerVersion) MarshalJSON() ([]byte, error) { + type NoMethod InstanceGroupManagerVersion + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type InstanceGroupManagersAbandonInstancesRequest struct { // Instances: The URLs of one or more instances to abandon. This can be // a full URL or a partial URL, such as @@ -11743,6 +12373,8 @@ type InstanceProperties struct { // to obtain the access tokens for these instances. ServiceAccounts []*ServiceAccount `json:"serviceAccounts,omitempty"` + ShieldedInstanceConfig *ShieldedInstanceConfig `json:"shieldedInstanceConfig,omitempty"` + // Tags: A list of tags to apply to the instances that are created from // this template. The tags identify valid sources or targets for network // firewalls. The setTags method can modify this list of tags. Each tag @@ -12042,6 +12674,7 @@ type InstanceWithNamedPorts struct { // // Possible values: // "PROVISIONING" + // "REPAIRING" // "RUNNING" // "STAGING" // "STOPPED" @@ -12428,7 +13061,7 @@ type Interconnect struct { // side of the Interconnect link. This can be used only for ping tests. GoogleIpAddress string `json:"googleIpAddress,omitempty"` - // GoogleReferenceId: [Output Only] Google reference ID; to be used when + // GoogleReferenceId: [Output Only] Google reference ID to be used when // raising support tickets with Google or otherwise to debug backend // connectivity issues. GoogleReferenceId string `json:"googleReferenceId,omitempty"` @@ -12455,8 +13088,7 @@ type Interconnect struct { Kind string `json:"kind,omitempty"` // LinkType: Type of link requested. This field indicates speed of each - // of the links in the bundle, not the entire bundle. Only 10G per link - // is allowed for a dedicated interconnect. Options: Ethernet_10G_LR + // of the links in the bundle, not the entire bundle. // // Possible values: // "LINK_TYPE_ETHERNET_10G_LR" @@ -13408,6 +14040,17 @@ func (s *InterconnectDiagnosticsLinkLACPStatus) MarshalJSON() ([]byte, error) { } type InterconnectDiagnosticsLinkOpticalPower struct { + // State: The status of the current value when compared to the warning + // and alarm levels for the receiving or transmitting transceiver. + // Possible states include: + // - OK: The value has not crossed a warning threshold. + // - LOW_WARNING: The value has crossed below the low warning threshold. + // + // - HIGH_WARNING: The value has crossed above the high warning + // threshold. + // - LOW_ALARM: The value has crossed below the low alarm threshold. + // - HIGH_ALARM: The value has crossed above the high alarm threshold. + // // Possible values: // "HIGH_ALARM" // "HIGH_WARNING" @@ -13416,10 +14059,11 @@ type InterconnectDiagnosticsLinkOpticalPower struct { // "OK" State string `json:"state,omitempty"` - // Value: Value of the current optical power, read in dBm. Take a known - // good optical value, give it a 10% margin and trigger warnings - // relative to that value. In general, a -7dBm warning and a -11dBm - // alarm are good optical value estimates for most links. + // Value: Value of the current receiving or transmitting optical power, + // read in dBm. Take a known good optical value, give it a 10% margin + // and trigger warnings relative to that value. In general, a -7dBm + // warning and a -11dBm alarm are good optical value estimates for most + // links. Value float64 `json:"value,omitempty"` // ForceSendFields is a list of field names (e.g. "State") to @@ -13475,8 +14119,14 @@ type InterconnectDiagnosticsLinkStatus struct { LacpStatus *InterconnectDiagnosticsLinkLACPStatus `json:"lacpStatus,omitempty"` + // ReceivingOpticalPower: An InterconnectDiagnostics.LinkOpticalPower + // object, describing the current value and status of the received light + // level. ReceivingOpticalPower *InterconnectDiagnosticsLinkOpticalPower `json:"receivingOpticalPower,omitempty"` + // TransmittingOpticalPower: An InterconnectDiagnostics.LinkOpticalPower + // object, describing the current value and status of the transmitted + // light level. TransmittingOpticalPower *InterconnectDiagnosticsLinkOpticalPower `json:"transmittingOpticalPower,omitempty"` // ForceSendFields is a list of field names (e.g. "ArpCaches") to @@ -13731,6 +14381,16 @@ type InterconnectLocation struct { // SelfLink: [Output Only] Server-defined URL for the resource. SelfLink string `json:"selfLink,omitempty"` + // Status: [Output Only] The status of this InterconnectLocation. If the + // status is AVAILABLE, new Interconnects may be provisioned in this + // InterconnectLocation. Otherwise, no new Interconnects may be + // provisioned. + // + // Possible values: + // "AVAILABLE" + // "CLOSED" + Status string `json:"status,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -15200,6 +15860,7 @@ type ManagedInstance struct { // // Possible values: // "PROVISIONING" + // "REPAIRING" // "RUNNING" // "STAGING" // "STOPPED" @@ -15213,6 +15874,9 @@ type ManagedInstance struct { // create or delete the instance. LastAttempt *ManagedInstanceLastAttempt `json:"lastAttempt,omitempty"` + // Version: [Output Only] Intended version of this instance. + Version *ManagedInstanceVersion `json:"version,omitempty"` + // ForceSendFields is a list of field names (e.g. "CurrentAction") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, @@ -15328,6 +15992,39 @@ func (s *ManagedInstanceLastAttemptErrorsErrors) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type ManagedInstanceVersion struct { + // InstanceTemplate: [Output Only] The intended template of the + // instance. This field is empty when current_action is one of { + // DELETING, ABANDONING }. + InstanceTemplate string `json:"instanceTemplate,omitempty"` + + // Name: [Output Only] Name of the version. + Name string `json:"name,omitempty"` + + // ForceSendFields is a list of field names (e.g. "InstanceTemplate") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "InstanceTemplate") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *ManagedInstanceVersion) MarshalJSON() ([]byte, error) { + type NoMethod ManagedInstanceVersion + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Metadata: A metadata key/value entry. type Metadata struct { // Fingerprint: Specifies a fingerprint for this request, which is @@ -15446,9 +16143,10 @@ func (s *NamedPort) MarshalJSON() ([]byte, error) { // (VPC) Network Overview for more information. (== resource_for // v1.networks ==) (== resource_for beta.networks ==) type Network struct { - // IPv4Range: The range of internal addresses that are legal on this - // network. This range is a CIDR specification, for example: - // 192.168.0.0/16. Provided by the client when the network is created. + // IPv4Range: Deprecated in favor of subnet mode networks. The range of + // internal addresses that are legal on this network. This range is a + // CIDR specification, for example: 192.168.0.0/16. Provided by the + // client when the network is created. IPv4Range string `json:"IPv4Range,omitempty"` // AutoCreateSubnetworks: When set to true, the VPC network is created @@ -15531,6 +16229,857 @@ func (s *Network) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// NetworkEndpoint: The network endpoint. +type NetworkEndpoint struct { + // Instance: The name for a specific VM instance that the IP address + // belongs to. This is required for network endpoints of type + // GCE_VM_IP_PORT. The instance must be in the same zone of network + // endpoint group. + // + // The name must be 1-63 characters long, and comply with RFC1035. + Instance string `json:"instance,omitempty"` + + // IpAddress: Optional IPv4 address of network endpoint. The IP address + // must belong to a VM in GCE (either the primary IP or as part of an + // aliased IP range). If the IP address is not specified, then the + // primary IP address for the VM instance in the network that the + // network endpoint group belongs to will be used. + IpAddress string `json:"ipAddress,omitempty"` + + // Port: Optional port number of network endpoint. If not specified and + // the NetworkEndpointGroup.network_endpoint_type is GCE_IP_PORT, the + // defaultPort for the network endpoint group will be used. + Port int64 `json:"port,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Instance") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Instance") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *NetworkEndpoint) MarshalJSON() ([]byte, error) { + type NoMethod NetworkEndpoint + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// NetworkEndpointGroup: Represents a collection of network endpoints. +type NetworkEndpointGroup struct { + // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text + // format. + CreationTimestamp string `json:"creationTimestamp,omitempty"` + + // DefaultPort: The default port used if the port number is not + // specified in the network endpoint. + DefaultPort int64 `json:"defaultPort,omitempty"` + + // Description: An optional description of this resource. Provide this + // property when you create the resource. + Description string `json:"description,omitempty"` + + // Id: [Output Only] The unique identifier for the resource. This + // identifier is defined by the server. + Id uint64 `json:"id,omitempty,string"` + + // Kind: [Output Only] Type of the resource. Always + // compute#networkEndpointGroup for network endpoint group. + Kind string `json:"kind,omitempty"` + + // Name: Name of the resource; provided by the client when the resource + // is created. The name must be 1-63 characters long, and comply with + // RFC1035. Specifically, the name must be 1-63 characters long and + // match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means + // the first character must be a lowercase letter, and all following + // characters must be a dash, lowercase letter, or digit, except the + // last character, which cannot be a dash. + Name string `json:"name,omitempty"` + + // Network: The URL of the network to which all network endpoints in the + // NEG belong. Uses "default" project network if unspecified. + Network string `json:"network,omitempty"` + + // NetworkEndpointType: Type of network endpoints in this network + // endpoint group. Currently the only supported value is GCE_VM_IP_PORT. + // + // Possible values: + // "GCE_VM_IP_PORT" + NetworkEndpointType string `json:"networkEndpointType,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for the resource. + SelfLink string `json:"selfLink,omitempty"` + + // Size: [Output only] Number of network endpoints in the network + // endpoint group. + Size int64 `json:"size,omitempty"` + + // Subnetwork: Optional URL of the subnetwork to which all network + // endpoints in the NEG belong. + Subnetwork string `json:"subnetwork,omitempty"` + + // Zone: [Output Only] The URL of the zone where the network endpoint + // group is located. + Zone string `json:"zone,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "CreationTimestamp") + // to unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreationTimestamp") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *NetworkEndpointGroup) MarshalJSON() ([]byte, error) { + type NoMethod NetworkEndpointGroup + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type NetworkEndpointGroupAggregatedList struct { + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. + Id string `json:"id,omitempty"` + + // Items: A list of NetworkEndpointGroupsScopedList resources. + Items map[string]NetworkEndpointGroupsScopedList `json:"items,omitempty"` + + // Kind: [Output Only] The resource type, which is always + // compute#networkEndpointGroupAggregatedList for aggregated lists of + // network endpoint groups. + Kind string `json:"kind,omitempty"` + + // NextPageToken: [Output Only] This token allows you to get the next + // page of results for list requests. If the number of results is larger + // than maxResults, use the nextPageToken as a value for the query + // parameter pageToken in the next list request. Subsequent list + // requests will have their own nextPageToken to continue paging through + // the results. + NextPageToken string `json:"nextPageToken,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for this resource. + SelfLink string `json:"selfLink,omitempty"` + + // Warning: [Output Only] Informational warning message. + Warning *NetworkEndpointGroupAggregatedListWarning `json:"warning,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Id") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Id") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *NetworkEndpointGroupAggregatedList) MarshalJSON() ([]byte, error) { + type NoMethod NetworkEndpointGroupAggregatedList + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// NetworkEndpointGroupAggregatedListWarning: [Output Only] +// Informational warning message. +type NetworkEndpointGroupAggregatedListWarning struct { + // Code: [Output Only] A warning code, if applicable. For example, + // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in + // the response. + // + // Possible values: + // "CLEANUP_FAILED" + // "DEPRECATED_RESOURCE_USED" + // "DEPRECATED_TYPE_USED" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "EXPERIMENTAL_TYPE_USED" + // "EXTERNAL_API_WARNING" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "MISSING_TYPE_DEPENDENCY" + // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" + // "NEXT_HOP_CANNOT_IP_FORWARD" + // "NEXT_HOP_INSTANCE_NOT_FOUND" + // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" + // "NEXT_HOP_NOT_RUNNING" + // "NOT_CRITICAL_ERROR" + // "NO_RESULTS_ON_PAGE" + // "REQUIRED_TOS_AGREEMENT" + // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" + // "RESOURCE_NOT_DELETED" + // "SCHEMA_VALIDATION_IGNORED" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "UNDECLARED_PROPERTIES" + // "UNREACHABLE" + Code string `json:"code,omitempty"` + + // Data: [Output Only] Metadata about this warning in key: value format. + // For example: + // "data": [ { "key": "scope", "value": "zones/us-east1-d" } + Data []*NetworkEndpointGroupAggregatedListWarningData `json:"data,omitempty"` + + // Message: [Output Only] A human-readable description of the warning + // code. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *NetworkEndpointGroupAggregatedListWarning) MarshalJSON() ([]byte, error) { + type NoMethod NetworkEndpointGroupAggregatedListWarning + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type NetworkEndpointGroupAggregatedListWarningData struct { + // Key: [Output Only] A key that provides more detail on the warning + // being returned. For example, for warnings where there are no results + // in a list request for a particular zone, this key might be scope and + // the key value might be the zone name. Other examples might be a key + // indicating a deprecated resource and a suggested replacement, or a + // warning about invalid network settings (for example, if an instance + // attempts to perform IP forwarding but is not enabled for IP + // forwarding). + Key string `json:"key,omitempty"` + + // Value: [Output Only] A warning data value corresponding to the key. + Value string `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Key") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Key") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *NetworkEndpointGroupAggregatedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod NetworkEndpointGroupAggregatedListWarningData + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type NetworkEndpointGroupList struct { + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. + Id string `json:"id,omitempty"` + + // Items: A list of NetworkEndpointGroup resources. + Items []*NetworkEndpointGroup `json:"items,omitempty"` + + // Kind: [Output Only] The resource type, which is always + // compute#networkEndpointGroupList for network endpoint group lists. + Kind string `json:"kind,omitempty"` + + // NextPageToken: [Output Only] This token allows you to get the next + // page of results for list requests. If the number of results is larger + // than maxResults, use the nextPageToken as a value for the query + // parameter pageToken in the next list request. Subsequent list + // requests will have their own nextPageToken to continue paging through + // the results. + NextPageToken string `json:"nextPageToken,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for this resource. + SelfLink string `json:"selfLink,omitempty"` + + // Warning: [Output Only] Informational warning message. + Warning *NetworkEndpointGroupListWarning `json:"warning,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Id") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Id") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *NetworkEndpointGroupList) MarshalJSON() ([]byte, error) { + type NoMethod NetworkEndpointGroupList + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// NetworkEndpointGroupListWarning: [Output Only] Informational warning +// message. +type NetworkEndpointGroupListWarning struct { + // Code: [Output Only] A warning code, if applicable. For example, + // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in + // the response. + // + // Possible values: + // "CLEANUP_FAILED" + // "DEPRECATED_RESOURCE_USED" + // "DEPRECATED_TYPE_USED" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "EXPERIMENTAL_TYPE_USED" + // "EXTERNAL_API_WARNING" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "MISSING_TYPE_DEPENDENCY" + // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" + // "NEXT_HOP_CANNOT_IP_FORWARD" + // "NEXT_HOP_INSTANCE_NOT_FOUND" + // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" + // "NEXT_HOP_NOT_RUNNING" + // "NOT_CRITICAL_ERROR" + // "NO_RESULTS_ON_PAGE" + // "REQUIRED_TOS_AGREEMENT" + // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" + // "RESOURCE_NOT_DELETED" + // "SCHEMA_VALIDATION_IGNORED" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "UNDECLARED_PROPERTIES" + // "UNREACHABLE" + Code string `json:"code,omitempty"` + + // Data: [Output Only] Metadata about this warning in key: value format. + // For example: + // "data": [ { "key": "scope", "value": "zones/us-east1-d" } + Data []*NetworkEndpointGroupListWarningData `json:"data,omitempty"` + + // Message: [Output Only] A human-readable description of the warning + // code. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *NetworkEndpointGroupListWarning) MarshalJSON() ([]byte, error) { + type NoMethod NetworkEndpointGroupListWarning + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type NetworkEndpointGroupListWarningData struct { + // Key: [Output Only] A key that provides more detail on the warning + // being returned. For example, for warnings where there are no results + // in a list request for a particular zone, this key might be scope and + // the key value might be the zone name. Other examples might be a key + // indicating a deprecated resource and a suggested replacement, or a + // warning about invalid network settings (for example, if an instance + // attempts to perform IP forwarding but is not enabled for IP + // forwarding). + Key string `json:"key,omitempty"` + + // Value: [Output Only] A warning data value corresponding to the key. + Value string `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Key") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Key") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *NetworkEndpointGroupListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod NetworkEndpointGroupListWarningData + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type NetworkEndpointGroupsAttachEndpointsRequest struct { + // NetworkEndpoints: The list of network endpoints to be attached. + NetworkEndpoints []*NetworkEndpoint `json:"networkEndpoints,omitempty"` + + // ForceSendFields is a list of field names (e.g. "NetworkEndpoints") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NetworkEndpoints") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *NetworkEndpointGroupsAttachEndpointsRequest) MarshalJSON() ([]byte, error) { + type NoMethod NetworkEndpointGroupsAttachEndpointsRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type NetworkEndpointGroupsDetachEndpointsRequest struct { + // NetworkEndpoints: The list of network endpoints to be detached. + NetworkEndpoints []*NetworkEndpoint `json:"networkEndpoints,omitempty"` + + // ForceSendFields is a list of field names (e.g. "NetworkEndpoints") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NetworkEndpoints") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *NetworkEndpointGroupsDetachEndpointsRequest) MarshalJSON() ([]byte, error) { + type NoMethod NetworkEndpointGroupsDetachEndpointsRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type NetworkEndpointGroupsListEndpointsRequest struct { + // HealthStatus: Optional query parameter for showing the health status + // of each network endpoint. Valid options are SKIP or SHOW. If you + // don't specifiy this parameter, the health status of network endpoints + // will not be provided. + // + // Possible values: + // "SHOW" + // "SKIP" + HealthStatus string `json:"healthStatus,omitempty"` + + // ForceSendFields is a list of field names (e.g. "HealthStatus") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "HealthStatus") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *NetworkEndpointGroupsListEndpointsRequest) MarshalJSON() ([]byte, error) { + type NoMethod NetworkEndpointGroupsListEndpointsRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type NetworkEndpointGroupsListNetworkEndpoints struct { + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. + Id string `json:"id,omitempty"` + + // Items: A list of NetworkEndpointWithHealthStatus resources. + Items []*NetworkEndpointWithHealthStatus `json:"items,omitempty"` + + // Kind: [Output Only] The resource type, which is always + // compute#networkEndpointGroupsListNetworkEndpoints for the list of + // network endpoints in the specified network endpoint group. + Kind string `json:"kind,omitempty"` + + // NextPageToken: [Output Only] This token allows you to get the next + // page of results for list requests. If the number of results is larger + // than maxResults, use the nextPageToken as a value for the query + // parameter pageToken in the next list request. Subsequent list + // requests will have their own nextPageToken to continue paging through + // the results. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Warning: [Output Only] Informational warning message. + Warning *NetworkEndpointGroupsListNetworkEndpointsWarning `json:"warning,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Id") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Id") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *NetworkEndpointGroupsListNetworkEndpoints) MarshalJSON() ([]byte, error) { + type NoMethod NetworkEndpointGroupsListNetworkEndpoints + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// NetworkEndpointGroupsListNetworkEndpointsWarning: [Output Only] +// Informational warning message. +type NetworkEndpointGroupsListNetworkEndpointsWarning struct { + // Code: [Output Only] A warning code, if applicable. For example, + // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in + // the response. + // + // Possible values: + // "CLEANUP_FAILED" + // "DEPRECATED_RESOURCE_USED" + // "DEPRECATED_TYPE_USED" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "EXPERIMENTAL_TYPE_USED" + // "EXTERNAL_API_WARNING" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "MISSING_TYPE_DEPENDENCY" + // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" + // "NEXT_HOP_CANNOT_IP_FORWARD" + // "NEXT_HOP_INSTANCE_NOT_FOUND" + // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" + // "NEXT_HOP_NOT_RUNNING" + // "NOT_CRITICAL_ERROR" + // "NO_RESULTS_ON_PAGE" + // "REQUIRED_TOS_AGREEMENT" + // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" + // "RESOURCE_NOT_DELETED" + // "SCHEMA_VALIDATION_IGNORED" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "UNDECLARED_PROPERTIES" + // "UNREACHABLE" + Code string `json:"code,omitempty"` + + // Data: [Output Only] Metadata about this warning in key: value format. + // For example: + // "data": [ { "key": "scope", "value": "zones/us-east1-d" } + Data []*NetworkEndpointGroupsListNetworkEndpointsWarningData `json:"data,omitempty"` + + // Message: [Output Only] A human-readable description of the warning + // code. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *NetworkEndpointGroupsListNetworkEndpointsWarning) MarshalJSON() ([]byte, error) { + type NoMethod NetworkEndpointGroupsListNetworkEndpointsWarning + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type NetworkEndpointGroupsListNetworkEndpointsWarningData struct { + // Key: [Output Only] A key that provides more detail on the warning + // being returned. For example, for warnings where there are no results + // in a list request for a particular zone, this key might be scope and + // the key value might be the zone name. Other examples might be a key + // indicating a deprecated resource and a suggested replacement, or a + // warning about invalid network settings (for example, if an instance + // attempts to perform IP forwarding but is not enabled for IP + // forwarding). + Key string `json:"key,omitempty"` + + // Value: [Output Only] A warning data value corresponding to the key. + Value string `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Key") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Key") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *NetworkEndpointGroupsListNetworkEndpointsWarningData) MarshalJSON() ([]byte, error) { + type NoMethod NetworkEndpointGroupsListNetworkEndpointsWarningData + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type NetworkEndpointGroupsScopedList struct { + // NetworkEndpointGroups: [Output Only] The list of network endpoint + // groups that are contained in this scope. + NetworkEndpointGroups []*NetworkEndpointGroup `json:"networkEndpointGroups,omitempty"` + + // Warning: [Output Only] An informational warning that replaces the + // list of network endpoint groups when the list is empty. + Warning *NetworkEndpointGroupsScopedListWarning `json:"warning,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "NetworkEndpointGroups") to unconditionally include in API requests. + // By default, fields with empty values are omitted from API requests. + // However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NetworkEndpointGroups") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *NetworkEndpointGroupsScopedList) MarshalJSON() ([]byte, error) { + type NoMethod NetworkEndpointGroupsScopedList + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// NetworkEndpointGroupsScopedListWarning: [Output Only] An +// informational warning that replaces the list of network endpoint +// groups when the list is empty. +type NetworkEndpointGroupsScopedListWarning struct { + // Code: [Output Only] A warning code, if applicable. For example, + // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in + // the response. + // + // Possible values: + // "CLEANUP_FAILED" + // "DEPRECATED_RESOURCE_USED" + // "DEPRECATED_TYPE_USED" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "EXPERIMENTAL_TYPE_USED" + // "EXTERNAL_API_WARNING" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "MISSING_TYPE_DEPENDENCY" + // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" + // "NEXT_HOP_CANNOT_IP_FORWARD" + // "NEXT_HOP_INSTANCE_NOT_FOUND" + // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" + // "NEXT_HOP_NOT_RUNNING" + // "NOT_CRITICAL_ERROR" + // "NO_RESULTS_ON_PAGE" + // "REQUIRED_TOS_AGREEMENT" + // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" + // "RESOURCE_NOT_DELETED" + // "SCHEMA_VALIDATION_IGNORED" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "UNDECLARED_PROPERTIES" + // "UNREACHABLE" + Code string `json:"code,omitempty"` + + // Data: [Output Only] Metadata about this warning in key: value format. + // For example: + // "data": [ { "key": "scope", "value": "zones/us-east1-d" } + Data []*NetworkEndpointGroupsScopedListWarningData `json:"data,omitempty"` + + // Message: [Output Only] A human-readable description of the warning + // code. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *NetworkEndpointGroupsScopedListWarning) MarshalJSON() ([]byte, error) { + type NoMethod NetworkEndpointGroupsScopedListWarning + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type NetworkEndpointGroupsScopedListWarningData struct { + // Key: [Output Only] A key that provides more detail on the warning + // being returned. For example, for warnings where there are no results + // in a list request for a particular zone, this key might be scope and + // the key value might be the zone name. Other examples might be a key + // indicating a deprecated resource and a suggested replacement, or a + // warning about invalid network settings (for example, if an instance + // attempts to perform IP forwarding but is not enabled for IP + // forwarding). + Key string `json:"key,omitempty"` + + // Value: [Output Only] A warning data value corresponding to the key. + Value string `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Key") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Key") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *NetworkEndpointGroupsScopedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod NetworkEndpointGroupsScopedListWarningData + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type NetworkEndpointWithHealthStatus struct { + // Healths: [Output only] The health status of network endpoint; + Healths []*HealthStatusForNetworkEndpoint `json:"healths,omitempty"` + + // NetworkEndpoint: [Output only] The network endpoint; + NetworkEndpoint *NetworkEndpoint `json:"networkEndpoint,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Healths") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Healths") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *NetworkEndpointWithHealthStatus) MarshalJSON() ([]byte, error) { + type NoMethod NetworkEndpointWithHealthStatus + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // NetworkInterface: A network interface resource attached to an // instance. type NetworkInterface struct { @@ -15778,13 +17327,21 @@ func (s *NetworkListWarningData) MarshalJSON() ([]byte, error) { // flag indicating whether Google Compute Engine should automatically // create routes for the peering. type NetworkPeering struct { - // AutoCreateRoutes: Indicates whether full mesh connectivity is created - // and managed automatically. When it is set to true, Google Compute - // Engine will automatically create and manage the routes between two - // networks when the state is ACTIVE. Otherwise, user needs to create - // routes manually to route packets to peer network. + // AutoCreateRoutes: This field will be deprecated soon. Prefer using + // exchange_subnet_routes instead. Indicates whether full mesh + // connectivity is created and managed automatically. When it is set to + // true, Google Compute Engine will automatically create and manage the + // routes between two networks when the state is ACTIVE. Otherwise, user + // needs to create routes manually to route packets to peer network. AutoCreateRoutes bool `json:"autoCreateRoutes,omitempty"` + // ExchangeSubnetRoutes: Whether full mesh connectivity is created and + // managed automatically. When it is set to true, Google Compute Engine + // will automatically create and manage the routes between two networks + // when the peering state is ACTIVE. Otherwise, user needs to create + // routes manually to route packets to peer network. + ExchangeSubnetRoutes bool `json:"exchangeSubnetRoutes,omitempty"` + // Name: Name of this peering. Provided by the client when the peering // is created. The name must comply with RFC1035. Specifically, the name // must be 1-63 characters long and match regular expression @@ -15875,13 +17432,21 @@ func (s *NetworkRoutingConfig) MarshalJSON() ([]byte, error) { } type NetworksAddPeeringRequest struct { - // AutoCreateRoutes: Whether Google Compute Engine manages the routes - // automatically. + // AutoCreateRoutes: This field will be deprecated soon. Prefer using + // exchange_subnet_routes in network_peering instead. Whether Google + // Compute Engine manages the routes automatically. AutoCreateRoutes bool `json:"autoCreateRoutes,omitempty"` // Name: Name of the peering, which should conform to RFC1035. Name string `json:"name,omitempty"` + // NetworkPeering: Network peering parameters. In order to specify route + // policies for peering using import/export custom routes, you will have + // to fill all peering related parameters (name, peer network, + // exchange_subnet_routes) in network_peeringfield. Corresponding fields + // in NetworksAddPeeringRequest will be deprecated soon. + NetworkPeering *NetworkPeering `json:"networkPeering,omitempty"` + // PeerNetwork: URL of the peer network. It can be either full URL or // partial URL. The peer network may belong to a different project. If // the partial URL does not contain project, it is assumed that the peer @@ -15939,7 +17504,10 @@ func (s *NetworksRemovePeeringRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// NodeGroup: A NodeGroup resource. +// NodeGroup: A NodeGroup resource. To create a node group, you must +// first create a node templates. To learn more about node groups and +// sole-tenant nodes, read the Sole-tenant nodes documentation. (== +// resource_for beta.nodeGroups ==) (== resource_for v1.nodeGroups ==) type NodeGroup struct { // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text // format. @@ -16740,7 +18308,10 @@ func (s *NodeGroupsSetNodeTemplateRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// NodeTemplate: A Node Template resource. +// NodeTemplate: A Node Template resource. To learn more about node +// templates and sole-tenant nodes, read the Sole-tenant nodes +// documentation. (== resource_for beta.nodeTemplates ==) (== +// resource_for v1.nodeTemplates ==) type NodeTemplate struct { // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text // format. @@ -18583,12 +20154,15 @@ type PathMatcher struct { // https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService // - compute/v1/projects/project/global/backendServices/backendService // - // - global/backendServices/backendService - // Use defaultService instead of defaultRouteAction when simple routing - // to a backend service is desired and other advanced capabilities like - // traffic splitting and URL rewrites are not required. - // Only one of defaultService, defaultRouteAction or defaultUrlRedirect - // must be set. + // - global/backendServices/backendService If defaultRouteAction is + // additionally specified, advanced routing actions like URL Rewrites, + // etc. take effect prior to sending the request to the backend. + // However, if defaultService is specified, defaultRouteAction cannot + // contain any weightedBackendServices. Conversely, if + // defaultRouteAction specifies any weightedBackendServices, + // defaultService must not be specified. + // Only one of defaultService, defaultUrlRedirect or + // defaultRouteAction.weightedBackendService must be set. // Authorization requires one or more of the following Google IAM // permissions on the specified resource default_service: // - compute.backendBuckets.use @@ -18645,12 +20219,15 @@ type PathRule struct { // or #, and those chars are not allowed here. Paths []string `json:"paths,omitempty"` - // Service: The URL of the backend service resource if this rule is - // matched. - // Use service instead of routeAction when simple routing to a backend - // service is desired and other advanced capabilities like traffic - // splitting and rewrites are not required. - // Only one of service, routeAction or urlRedirect should must be set. + // Service: The full or partial URL of the backend service resource to + // which traffic is directed if this rule is matched. If routeAction is + // additionally specified, advanced routing actions like URL Rewrites, + // etc. take effect prior to sending the request to the backend. + // However, if service is specified, routeAction cannot contain any + // weightedBackendService s. Conversely, if routeAction specifies any + // weightedBackendServices, service must not be specified. + // Only one of urlRedirect, service or + // routeAction.weightedBackendService must be set. Service string `json:"service,omitempty"` // ForceSendFields is a list of field names (e.g. "Paths") to @@ -19039,6 +20616,7 @@ type Quota struct { // "CPUS" // "CPUS_ALL_REGIONS" // "DISKS_TOTAL_GB" + // "EXTERNAL_VPN_GATEWAYS" // "FIREWALLS" // "FORWARDING_RULES" // "GLOBAL_INTERNAL_ADDRESSES" @@ -19055,8 +20633,10 @@ type Quota struct { // "INTERNAL_ADDRESSES" // "IN_USE_ADDRESSES" // "IN_USE_BACKUP_SCHEDULES" + // "IN_USE_SNAPSHOT_SCHEDULES" // "LOCAL_SSD_TOTAL_GB" // "NETWORKS" + // "NETWORK_ENDPOINT_GROUPS" // "NVIDIA_K80_GPUS" // "NVIDIA_P100_GPUS" // "NVIDIA_P100_VWS_GPUS" @@ -19099,6 +20679,10 @@ type Quota struct { // "VPN_TUNNELS" Metric string `json:"metric,omitempty"` + // Owner: [Output Only] Owning resource. This is the resource on which + // this quota is applied. + Owner string `json:"owner,omitempty"` + // Usage: [Output Only] Current usage of this metric. Usage float64 `json:"usage,omitempty"` @@ -21852,7 +23436,8 @@ func (s *RouterStatusBgpPeerStatus) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// RouterStatusNatStatus: Status of a NAT contained in this router. +// RouterStatusNatStatus: Status of a NAT contained in this router. Next +// tag: 9 type RouterStatusNatStatus struct { // AutoAllocatedNatIps: A list of IPs auto-allocated for NAT. Example: // ["1.1.1.1", "129.2.16.89"] @@ -22170,6 +23755,33 @@ type SSLHealthCheck struct { // both port and port_name are defined, port takes precedence. PortName string `json:"portName,omitempty"` + // PortSpecification: Specifies how port is selected for health + // checking, can be one of following values: + // USE_FIXED_PORT: The port number in + // port + // is used for health checking. + // USE_NAMED_PORT: The + // portName + // is used for health checking. + // USE_SERVING_PORT: For NetworkEndpointGroup, the port specified for + // each network endpoint is used for health checking. For other + // backends, the port or named port specified in the Backend Service is + // used for health checking. + // + // + // If not specified, SSL health check follows behavior specified + // in + // port + // and + // portName + // fields. + // + // Possible values: + // "USE_FIXED_PORT" + // "USE_NAMED_PORT" + // "USE_SERVING_PORT" + PortSpecification string `json:"portSpecification,omitempty"` + // ProxyHeader: Specifies the type of proxy header to append before // sending data to the backend, either NONE or PROXY_V1. The default is // NONE. @@ -22773,6 +24385,149 @@ func (s *ServiceAccount) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ShieldedInstanceConfig: A set of Shielded Instance options. +type ShieldedInstanceConfig struct { + // EnableIntegrityMonitoring: Defines whether the instance has integrity + // monitoring enabled. + EnableIntegrityMonitoring bool `json:"enableIntegrityMonitoring,omitempty"` + + // EnableSecureBoot: Defines whether the instance has Secure Boot + // enabled. + EnableSecureBoot bool `json:"enableSecureBoot,omitempty"` + + // EnableVtpm: Defines whether the instance has the vTPM enabled. + EnableVtpm bool `json:"enableVtpm,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "EnableIntegrityMonitoring") to unconditionally include in API + // requests. By default, fields with empty values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. + // "EnableIntegrityMonitoring") to include in API requests with the JSON + // null value. By default, fields with empty values are omitted from API + // requests. However, any field with an empty value appearing in + // NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ShieldedInstanceConfig) MarshalJSON() ([]byte, error) { + type NoMethod ShieldedInstanceConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ShieldedInstanceIdentity: A shielded Instance identity entry. +type ShieldedInstanceIdentity struct { + // EncryptionKey: An Endorsement Key (EK) issued to the Shielded + // Instance's vTPM. + EncryptionKey *ShieldedInstanceIdentityEntry `json:"encryptionKey,omitempty"` + + // Kind: [Output Only] Type of the resource. Always + // compute#shieldedInstanceIdentity for shielded Instance identity + // entry. + Kind string `json:"kind,omitempty"` + + // SigningKey: An Attestation Key (AK) issued to the Shielded Instance's + // vTPM. + SigningKey *ShieldedInstanceIdentityEntry `json:"signingKey,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "EncryptionKey") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "EncryptionKey") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ShieldedInstanceIdentity) MarshalJSON() ([]byte, error) { + type NoMethod ShieldedInstanceIdentity + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ShieldedInstanceIdentityEntry: A Shielded Instance Identity Entry. +type ShieldedInstanceIdentityEntry struct { + // EkCert: A PEM-encoded X.509 certificate. This field can be empty. + EkCert string `json:"ekCert,omitempty"` + + // EkPub: A PEM-encoded public key. + EkPub string `json:"ekPub,omitempty"` + + // ForceSendFields is a list of field names (e.g. "EkCert") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "EkCert") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ShieldedInstanceIdentityEntry) MarshalJSON() ([]byte, error) { + type NoMethod ShieldedInstanceIdentityEntry + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ShieldedInstanceIntegrityPolicy: The policy describes the baseline +// against which Instance boot integrity is measured. +type ShieldedInstanceIntegrityPolicy struct { + // UpdateAutoLearnPolicy: Updates the integrity policy baseline using + // the measurements from the VM instance's most recent boot. + UpdateAutoLearnPolicy bool `json:"updateAutoLearnPolicy,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "UpdateAutoLearnPolicy") to unconditionally include in API requests. + // By default, fields with empty values are omitted from API requests. + // However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "UpdateAutoLearnPolicy") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *ShieldedInstanceIntegrityPolicy) MarshalJSON() ([]byte, error) { + type NoMethod ShieldedInstanceIntegrityPolicy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // SignedUrlKey: Represents a customer-supplied Signing Key used by // Cloud CDN Signed URLs type SignedUrlKey struct { @@ -22928,6 +24683,10 @@ type Snapshot struct { // "UP_TO_DATE" StorageBytesStatus string `json:"storageBytesStatus,omitempty"` + // StorageLocations: GCS bucket storage location of the snapshot + // (regional or multi-regional). + StorageLocations []string `json:"storageLocations,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -24449,6 +26208,33 @@ type TCPHealthCheck struct { // both port and port_name are defined, port takes precedence. PortName string `json:"portName,omitempty"` + // PortSpecification: Specifies how port is selected for health + // checking, can be one of following values: + // USE_FIXED_PORT: The port number in + // port + // is used for health checking. + // USE_NAMED_PORT: The + // portName + // is used for health checking. + // USE_SERVING_PORT: For NetworkEndpointGroup, the port specified for + // each network endpoint is used for health checking. For other + // backends, the port or named port specified in the Backend Service is + // used for health checking. + // + // + // If not specified, TCP health check follows behavior specified + // in + // port + // and + // portName + // fields. + // + // Possible values: + // "USE_FIXED_PORT" + // "USE_NAMED_PORT" + // "USE_SERVING_PORT" + PortSpecification string `json:"portSpecification,omitempty"` + // ProxyHeader: Specifies the type of proxy header to append before // sending data to the backend, either NONE or PROXY_V1. The default is // NONE. @@ -26987,7 +28773,7 @@ type TargetVpnGateway struct { // ForwardingRules: [Output Only] A list of URLs to the ForwardingRule // resources. ForwardingRules are created using - // compute.forwardingRules.insert and associated to a VPN gateway. + // compute.forwardingRules.insert and associated with a VPN gateway. ForwardingRules []string `json:"forwardingRules,omitempty"` // Id: [Output Only] The unique identifier for the resource. This @@ -27019,7 +28805,8 @@ type TargetVpnGateway struct { // SelfLink: [Output Only] Server-defined URL for the resource. SelfLink string `json:"selfLink,omitempty"` - // Status: [Output Only] The status of the VPN gateway. + // Status: [Output Only] The status of the VPN gateway, which can be one + // of the following: CREATING, READY, FAILED, or DELETING. // // Possible values: // "CREATING" @@ -27029,8 +28816,8 @@ type TargetVpnGateway struct { Status string `json:"status,omitempty"` // Tunnels: [Output Only] A list of URLs to VpnTunnel resources. - // VpnTunnels are created using compute.vpntunnels.insert method and - // associated to a VPN gateway. + // VpnTunnels are created using the compute.vpntunnels.insert method and + // associated with a VPN gateway. Tunnels []string `json:"tunnels,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -27373,7 +29160,7 @@ func (s *TargetVpnGatewayListWarningData) MarshalJSON() ([]byte, error) { } type TargetVpnGatewaysScopedList struct { - // TargetVpnGateways: [Output Only] A list of target vpn gateways + // TargetVpnGateways: [Output Only] A list of target VPN gateways // contained in this scope. TargetVpnGateways []*TargetVpnGateway `json:"targetVpnGateways,omitempty"` @@ -27608,13 +29395,16 @@ type UrlMap struct { // format. CreationTimestamp string `json:"creationTimestamp,omitempty"` - // DefaultService: The URL of the backendService resource if none of the - // hostRules match. - // Use defaultService instead of defaultRouteAction when simple routing - // to a backendService is desired and other advanced capabilities like - // traffic splitting and rewrites are not required. - // Only one of defaultService, defaultRouteAction or defaultUrlRedirect - // should must be set. + // DefaultService: The full or partial URL of the defaultService + // resource to which traffic is directed if none of the hostRules match. + // If defaultRouteAction is additionally specified, advanced routing + // actions like URL Rewrites, etc. take effect prior to sending the + // request to the backend. However, if defaultService is specified, + // defaultRouteAction cannot contain any weightedBackendServices. + // Conversely, if routeAction specifies any weightedBackendServices, + // service must not be specified. + // Only one of defaultService, defaultUrlRedirect or + // defaultRouteAction.weightedBackendService must be set. DefaultService string `json:"defaultService,omitempty"` // Description: An optional description of this resource. Provide this @@ -28533,8 +30323,8 @@ type VpnTunnel struct { Id uint64 `json:"id,omitempty,string"` // IkeVersion: IKE protocol version to use when establishing the VPN - // tunnel with peer VPN gateway. Acceptable IKE versions are 1 or 2. - // Default version is 2. + // tunnel with the peer VPN gateway. Acceptable IKE versions are 1 or 2. + // The default version is 2. IkeVersion int64 `json:"ikeVersion,omitempty"` // Kind: [Output Only] Type of resource. Always compute#vpnTunnel for @@ -28542,8 +30332,8 @@ type VpnTunnel struct { Kind string `json:"kind,omitempty"` // LocalTrafficSelector: Local traffic selector to use when establishing - // the VPN tunnel with peer VPN gateway. The value should be a CIDR - // formatted string, for example: 192.168.0.0/16. The ranges should be + // the VPN tunnel with the peer VPN gateway. The value should be a CIDR + // formatted string, for example: 192.168.0.0/16. The ranges must be // disjoint. Only IPv4 is supported. LocalTrafficSelector []string `json:"localTrafficSelector,omitempty"` @@ -28565,12 +30355,12 @@ type VpnTunnel struct { Region string `json:"region,omitempty"` // RemoteTrafficSelector: Remote traffic selectors to use when - // establishing the VPN tunnel with peer VPN gateway. The value should - // be a CIDR formatted string, for example: 192.168.0.0/16. The ranges - // should be disjoint. Only IPv4 is supported. + // establishing the VPN tunnel with the peer VPN gateway. The value + // should be a CIDR formatted string, for example: 192.168.0.0/16. The + // ranges should be disjoint. Only IPv4 is supported. RemoteTrafficSelector []string `json:"remoteTrafficSelector,omitempty"` - // Router: URL of router resource to be used for dynamic routing. + // Router: URL of the router resource to be used for dynamic routing. Router string `json:"router,omitempty"` // SelfLink: [Output Only] Server-defined URL for the resource. @@ -28583,7 +30373,23 @@ type VpnTunnel struct { // SharedSecretHash: Hash of the shared secret. SharedSecretHash string `json:"sharedSecretHash,omitempty"` - // Status: [Output Only] The status of the VPN tunnel. + // Status: [Output Only] The status of the VPN tunnel, which can be one + // of the following: + // - PROVISIONING: Resource is being allocated for the VPN tunnel. + // - WAITING_FOR_FULL_CONFIG: Waiting to receive all VPN-related configs + // from the user. Network, TargetVpnGateway, VpnTunnel, ForwardingRule, + // and Route resources are needed to setup the VPN tunnel. + // - FIRST_HANDSHAKE: Successful first handshake with the peer VPN. + // - ESTABLISHED: Secure session is successfully established with the + // peer VPN. + // - NETWORK_ERROR: Deprecated, replaced by NO_INCOMING_PACKETS + // - AUTHORIZATION_ERROR: Auth error (for example, bad shared secret). + // + // - NEGOTIATION_FAILURE: Handshake failed. + // - DEPROVISIONING: Resources are being deallocated for the VPN tunnel. + // + // - FAILED: Tunnel creation has failed and the tunnel is not ready to + // be used. // // Possible values: // "ALLOCATING_RESOURCES" @@ -28944,7 +30750,7 @@ func (s *VpnTunnelListWarningData) MarshalJSON() ([]byte, error) { } type VpnTunnelsScopedList struct { - // VpnTunnels: A list of vpn tunnels contained in this scope. + // VpnTunnels: A list of VPN tunnels contained in this scope. VpnTunnels []*VpnTunnel `json:"vpnTunnels,omitempty"` // Warning: Informational warning which replaces the list of addresses @@ -29268,7 +31074,7 @@ func (s *XpnResourceId) MarshalJSON() ([]byte, error) { } // Zone: A Zone resource. (== resource_for beta.zones ==) (== -// resource_for v1.zones ==) +// resource_for v1.zones ==) Next ID: 17 type Zone struct { // AvailableCpuPlatforms: [Output Only] Available cpu/platform // selections for the zone. @@ -29952,7 +31758,7 @@ func (c *AcceleratorTypesGetCall) Do(opts ...googleapi.CallOption) (*Accelerator // "acceleratorType": { // "description": "Name of the accelerator type to return.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -30639,7 +32445,7 @@ func (c *AddressesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, erro // "address": { // "description": "Name of the address resource to delete.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -30810,7 +32616,7 @@ func (c *AddressesGetCall) Do(opts ...googleapi.CallOption) (*Address, error) { // "address": { // "description": "Name of the address resource to return.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -31672,7 +33478,7 @@ func (c *AutoscalersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, er // "autoscaler": { // "description": "Name of the autoscaler to delete.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -31843,7 +33649,7 @@ func (c *AutoscalersGetCall) Do(opts ...googleapi.CallOption) (*Autoscaler, erro // "autoscaler": { // "description": "Name of the autoscaler to return.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -32464,7 +34270,7 @@ func (c *AutoscalersPatchCall) Do(opts ...googleapi.CallOption) (*Operation, err // "autoscaler": { // "description": "Name of the autoscaler to patch.", // "location": "query", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "type": "string" // }, // "project": { @@ -32652,7 +34458,7 @@ func (c *AutoscalersUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, er // "autoscaler": { // "description": "Name of the autoscaler to update.", // "location": "query", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "type": "string" // }, // "project": { @@ -32999,7 +34805,7 @@ func (c *BackendBucketsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, // "backendBucket": { // "description": "Name of the BackendBucket resource to delete.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -33331,7 +35137,7 @@ func (c *BackendBucketsGetCall) Do(opts ...googleapi.CallOption) (*BackendBucket // "backendBucket": { // "description": "Name of the BackendBucket resource to return.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -33916,7 +35722,7 @@ func (c *BackendBucketsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, // "backendBucket": { // "description": "Name of the BackendBucket resource to patch.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -34091,7 +35897,7 @@ func (c *BackendBucketsUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, // "backendBucket": { // "description": "Name of the BackendBucket resource to update.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -34685,7 +36491,7 @@ func (c *BackendServicesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation // "backendService": { // "description": "Name of the BackendService resource to delete.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -35018,7 +36824,7 @@ func (c *BackendServicesGetCall) Do(opts ...googleapi.CallOption) (*BackendServi // "backendService": { // "description": "Name of the BackendService resource to return.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -35168,7 +36974,7 @@ func (c *BackendServicesGetHealthCall) Do(opts ...googleapi.CallOption) (*Backen // "backendService": { // "description": "Name of the BackendService resource to which the queried instance belongs.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -36115,7 +37921,7 @@ func (c *BackendServicesUpdateCall) Do(opts ...googleapi.CallOption) (*Operation // "backendService": { // "description": "Name of the BackendService resource to update.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -36535,7 +38341,7 @@ func (c *DiskTypesGetCall) Do(opts ...googleapi.CallOption) (*DiskType, error) { // "diskType": { // "description": "Name of the disk type to return.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -40430,7 +42236,7 @@ func (c *ForwardingRulesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation // "forwardingRule": { // "description": "Name of the ForwardingRule resource to delete.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -40601,7 +42407,7 @@ func (c *ForwardingRulesGetCall) Do(opts ...googleapi.CallOption) (*ForwardingRu // "forwardingRule": { // "description": "Name of the ForwardingRule resource to return.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -41221,7 +43027,7 @@ func (c *ForwardingRulesSetTargetCall) Do(opts ...googleapi.CallOption) (*Operat // "forwardingRule": { // "description": "Name of the ForwardingRule resource in which target is to be set.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -41396,7 +43202,7 @@ func (c *GlobalAddressesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation // "address": { // "description": "Name of the address resource to delete.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -41557,7 +43363,7 @@ func (c *GlobalAddressesGetCall) Do(opts ...googleapi.CallOption) (*Address, err // "address": { // "description": "Name of the address resource to return.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -42135,7 +43941,7 @@ func (c *GlobalForwardingRulesDeleteCall) Do(opts ...googleapi.CallOption) (*Ope // "forwardingRule": { // "description": "Name of the ForwardingRule resource to delete.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -42296,7 +44102,7 @@ func (c *GlobalForwardingRulesGetCall) Do(opts ...googleapi.CallOption) (*Forwar // "forwardingRule": { // "description": "Name of the ForwardingRule resource to return.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -42883,7 +44689,7 @@ func (c *GlobalForwardingRulesSetTargetCall) Do(opts ...googleapi.CallOption) (* // "forwardingRule": { // "description": "Name of the ForwardingRule resource in which target is to be set.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -43259,7 +45065,7 @@ func (c *GlobalOperationsDeleteCall) Do(opts ...googleapi.CallOption) error { // "operation": { // "description": "Name of the Operations resource to delete.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -43412,7 +45218,7 @@ func (c *GlobalOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, // "operation": { // "description": "Name of the Operations resource to return.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -43825,7 +45631,7 @@ func (c *HealthChecksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, e // "healthCheck": { // "description": "Name of the HealthCheck resource to delete.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -43985,7 +45791,7 @@ func (c *HealthChecksGetCall) Do(opts ...googleapi.CallOption) (*HealthCheck, er // "healthCheck": { // "description": "Name of the HealthCheck resource to return.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -44570,7 +46376,7 @@ func (c *HealthChecksPatchCall) Do(opts ...googleapi.CallOption) (*Operation, er // "healthCheck": { // "description": "Name of the HealthCheck resource to patch.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -44745,7 +46551,7 @@ func (c *HealthChecksUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, e // "healthCheck": { // "description": "Name of the HealthCheck resource to update.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -44913,7 +46719,7 @@ func (c *HttpHealthChecksDeleteCall) Do(opts ...googleapi.CallOption) (*Operatio // "httpHealthCheck": { // "description": "Name of the HttpHealthCheck resource to delete.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -45074,7 +46880,7 @@ func (c *HttpHealthChecksGetCall) Do(opts ...googleapi.CallOption) (*HttpHealthC // "httpHealthCheck": { // "description": "Name of the HttpHealthCheck resource to return.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -45662,7 +47468,7 @@ func (c *HttpHealthChecksPatchCall) Do(opts ...googleapi.CallOption) (*Operation // "httpHealthCheck": { // "description": "Name of the HttpHealthCheck resource to patch.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -45838,7 +47644,7 @@ func (c *HttpHealthChecksUpdateCall) Do(opts ...googleapi.CallOption) (*Operatio // "httpHealthCheck": { // "description": "Name of the HttpHealthCheck resource to update.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -46005,7 +47811,7 @@ func (c *HttpsHealthChecksDeleteCall) Do(opts ...googleapi.CallOption) (*Operati // "httpsHealthCheck": { // "description": "Name of the HttpsHealthCheck resource to delete.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -46165,7 +47971,7 @@ func (c *HttpsHealthChecksGetCall) Do(opts ...googleapi.CallOption) (*HttpsHealt // "httpsHealthCheck": { // "description": "Name of the HttpsHealthCheck resource to return.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -46750,7 +48556,7 @@ func (c *HttpsHealthChecksPatchCall) Do(opts ...googleapi.CallOption) (*Operatio // "httpsHealthCheck": { // "description": "Name of the HttpsHealthCheck resource to patch.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -46925,7 +48731,7 @@ func (c *HttpsHealthChecksUpdateCall) Do(opts ...googleapi.CallOption) (*Operati // "httpsHealthCheck": { // "description": "Name of the HttpsHealthCheck resource to update.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -53166,8 +54972,8 @@ type InstanceTemplatesDeleteCall struct { } // Delete: Deletes the specified instance template. Deleting an instance -// template is permanent and cannot be undone. It's not possible to -// delete templates which are in use by an instance group. +// template is permanent and cannot be undone. It is not possible to +// delete templates that are already in use by a managed instance group. // For details, see https://cloud.google.com/compute/docs/reference/latest/instanceTemplates/delete func (r *InstanceTemplatesService) Delete(project string, instanceTemplate string) *InstanceTemplatesDeleteCall { c := &InstanceTemplatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -53281,7 +55087,7 @@ func (c *InstanceTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*Operati } return ret, nil // { - // "description": "Deletes the specified instance template. Deleting an instance template is permanent and cannot be undone. It's not possible to delete templates which are in use by an instance group.", + // "description": "Deletes the specified instance template. Deleting an instance template is permanent and cannot be undone. It is not possible to delete templates that are already in use by a managed instance group.", // "httpMethod": "DELETE", // "id": "compute.instanceTemplates.delete", // "parameterOrder": [ @@ -53292,7 +55098,7 @@ func (c *InstanceTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*Operati // "instanceTemplate": { // "description": "The name of the instance template to delete.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -53453,7 +55259,7 @@ func (c *InstanceTemplatesGetCall) Do(opts ...googleapi.CallOption) (*InstanceTe // "instanceTemplate": { // "description": "The name of the instance template.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -53814,7 +55620,7 @@ type InstanceTemplatesListCall struct { } // List: Retrieves a list of instance templates that are contained -// within the specified project and zone. +// within the specified project. // For details, see https://cloud.google.com/compute/docs/reference/latest/instanceTemplates/list func (r *InstanceTemplatesService) List(project string) *InstanceTemplatesListCall { c := &InstanceTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -53983,7 +55789,7 @@ func (c *InstanceTemplatesListCall) Do(opts ...googleapi.CallOption) (*InstanceT } return ret, nil // { - // "description": "Retrieves a list of instance templates that are contained within the specified project and zone.", + // "description": "Retrieves a list of instance templates that are contained within the specified project.", // "httpMethod": "GET", // "id": "compute.instanceTemplates.list", // "parameterOrder": [ @@ -54835,7 +56641,7 @@ func (r *InstancesService) AttachDisk(project string, zone string, instance stri // ForceAttach sets the optional parameter "forceAttach": Whether to // force attach the disk even if it's currently attached to another -// instance. This is only available for regional disks. +// instance. func (c *InstancesAttachDiskCall) ForceAttach(forceAttach bool) *InstancesAttachDiskCall { c.urlParams_.Set("forceAttach", fmt.Sprint(forceAttach)) return c @@ -54962,7 +56768,7 @@ func (c *InstancesAttachDiskCall) Do(opts ...googleapi.CallOption) (*Operation, // ], // "parameters": { // "forceAttach": { - // "description": "Whether to force attach the disk even if it's currently attached to another instance. This is only available for regional disks.", + // "description": "Whether to force attach the disk even if it's currently attached to another instance.", // "location": "query", // "type": "boolean" // }, @@ -56098,6 +57904,173 @@ func (c *InstancesGetSerialPortOutputCall) Do(opts ...googleapi.CallOption) (*Se } +// method id "compute.instances.getShieldedInstanceIdentity": + +type InstancesGetShieldedInstanceIdentityCall struct { + s *Service + project string + zone string + instance string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetShieldedInstanceIdentity: Returns the Shielded Instance Identity +// of an instance +func (r *InstancesService) GetShieldedInstanceIdentity(project string, zone string, instance string) *InstancesGetShieldedInstanceIdentityCall { + c := &InstancesGetShieldedInstanceIdentityCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + c.instance = instance + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *InstancesGetShieldedInstanceIdentityCall) Fields(s ...googleapi.Field) *InstancesGetShieldedInstanceIdentityCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *InstancesGetShieldedInstanceIdentityCall) IfNoneMatch(entityTag string) *InstancesGetShieldedInstanceIdentityCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *InstancesGetShieldedInstanceIdentityCall) Context(ctx context.Context) *InstancesGetShieldedInstanceIdentityCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *InstancesGetShieldedInstanceIdentityCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *InstancesGetShieldedInstanceIdentityCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/getShieldedInstanceIdentity") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "zone": c.zone, + "instance": c.instance, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.instances.getShieldedInstanceIdentity" call. +// Exactly one of *ShieldedInstanceIdentity or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *ShieldedInstanceIdentity.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *InstancesGetShieldedInstanceIdentityCall) Do(opts ...googleapi.CallOption) (*ShieldedInstanceIdentity, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &ShieldedInstanceIdentity{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns the Shielded Instance Identity of an instance", + // "httpMethod": "GET", + // "id": "compute.instances.getShieldedInstanceIdentity", + // "parameterOrder": [ + // "project", + // "zone", + // "instance" + // ], + // "parameters": { + // "instance": { + // "description": "Name or id of the instance scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "zone": { + // "description": "The name of the zone for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/zones/{zone}/instances/{instance}/getShieldedInstanceIdentity", + // "response": { + // "$ref": "ShieldedInstanceIdentity" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + // method id "compute.instances.insert": type InstancesInsertCall struct { @@ -56845,8 +58818,9 @@ type InstancesResetCall struct { header_ http.Header } -// Reset: Performs a reset on the instance. For more information, see -// Resetting an instance. +// Reset: Performs a reset on the instance. This is a hard reset the VM +// does not do a graceful shutdown. For more information, see Resetting +// an instance. // For details, see https://cloud.google.com/compute/docs/reference/latest/instances/reset func (r *InstancesService) Reset(project string, zone string, instance string) *InstancesResetCall { c := &InstancesResetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -56962,7 +58936,7 @@ func (c *InstancesResetCall) Do(opts ...googleapi.CallOption) (*Operation, error } return ret, nil // { - // "description": "Performs a reset on the instance. For more information, see Resetting an instance.", + // "description": "Performs a reset on the instance. This is a hard reset the VM does not do a graceful shutdown. For more information, see Resetting an instance.", // "httpMethod": "POST", // "id": "compute.instances.reset", // "parameterOrder": [ @@ -58860,6 +60834,194 @@ func (c *InstancesSetServiceAccountCall) Do(opts ...googleapi.CallOption) (*Oper } +// method id "compute.instances.setShieldedInstanceIntegrityPolicy": + +type InstancesSetShieldedInstanceIntegrityPolicyCall struct { + s *Service + project string + zone string + instance string + shieldedinstanceintegritypolicy *ShieldedInstanceIntegrityPolicy + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetShieldedInstanceIntegrityPolicy: Sets the Shielded Instance +// integrity policy for an instance. You can only use this method on a +// running instance. This method supports PATCH semantics and uses the +// JSON merge patch format and processing rules. +func (r *InstancesService) SetShieldedInstanceIntegrityPolicy(project string, zone string, instance string, shieldedinstanceintegritypolicy *ShieldedInstanceIntegrityPolicy) *InstancesSetShieldedInstanceIntegrityPolicyCall { + c := &InstancesSetShieldedInstanceIntegrityPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + c.instance = instance + c.shieldedinstanceintegritypolicy = shieldedinstanceintegritypolicy + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *InstancesSetShieldedInstanceIntegrityPolicyCall) RequestId(requestId string) *InstancesSetShieldedInstanceIntegrityPolicyCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *InstancesSetShieldedInstanceIntegrityPolicyCall) Fields(s ...googleapi.Field) *InstancesSetShieldedInstanceIntegrityPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *InstancesSetShieldedInstanceIntegrityPolicyCall) Context(ctx context.Context) *InstancesSetShieldedInstanceIntegrityPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *InstancesSetShieldedInstanceIntegrityPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *InstancesSetShieldedInstanceIntegrityPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.shieldedinstanceintegritypolicy) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/setShieldedInstanceIntegrityPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "zone": c.zone, + "instance": c.instance, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.instances.setShieldedInstanceIntegrityPolicy" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *InstancesSetShieldedInstanceIntegrityPolicyCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Sets the Shielded Instance integrity policy for an instance. You can only use this method on a running instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + // "httpMethod": "PATCH", + // "id": "compute.instances.setShieldedInstanceIntegrityPolicy", + // "parameterOrder": [ + // "project", + // "zone", + // "instance" + // ], + // "parameters": { + // "instance": { + // "description": "Name or id of the instance scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "zone": { + // "description": "The name of the zone for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/zones/{zone}/instances/{instance}/setShieldedInstanceIntegrityPolicy", + // "request": { + // "$ref": "ShieldedInstanceIntegrityPolicy" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + // method id "compute.instances.setTags": type InstancesSetTagsCall struct { @@ -60297,6 +62459,194 @@ func (c *InstancesUpdateNetworkInterfaceCall) Do(opts ...googleapi.CallOption) ( } +// method id "compute.instances.updateShieldedInstanceConfig": + +type InstancesUpdateShieldedInstanceConfigCall struct { + s *Service + project string + zone string + instance string + shieldedinstanceconfig *ShieldedInstanceConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// UpdateShieldedInstanceConfig: Updates the Shielded Instance config +// for an instance. You can only use this method on a stopped instance. +// This method supports PATCH semantics and uses the JSON merge patch +// format and processing rules. +func (r *InstancesService) UpdateShieldedInstanceConfig(project string, zone string, instance string, shieldedinstanceconfig *ShieldedInstanceConfig) *InstancesUpdateShieldedInstanceConfigCall { + c := &InstancesUpdateShieldedInstanceConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + c.instance = instance + c.shieldedinstanceconfig = shieldedinstanceconfig + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *InstancesUpdateShieldedInstanceConfigCall) RequestId(requestId string) *InstancesUpdateShieldedInstanceConfigCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *InstancesUpdateShieldedInstanceConfigCall) Fields(s ...googleapi.Field) *InstancesUpdateShieldedInstanceConfigCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *InstancesUpdateShieldedInstanceConfigCall) Context(ctx context.Context) *InstancesUpdateShieldedInstanceConfigCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *InstancesUpdateShieldedInstanceConfigCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *InstancesUpdateShieldedInstanceConfigCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.shieldedinstanceconfig) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/updateShieldedInstanceConfig") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "zone": c.zone, + "instance": c.instance, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.instances.updateShieldedInstanceConfig" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *InstancesUpdateShieldedInstanceConfigCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates the Shielded Instance config for an instance. You can only use this method on a stopped instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + // "httpMethod": "PATCH", + // "id": "compute.instances.updateShieldedInstanceConfig", + // "parameterOrder": [ + // "project", + // "zone", + // "instance" + // ], + // "parameters": { + // "instance": { + // "description": "Name or id of the instance scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "zone": { + // "description": "The name of the zone for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/zones/{zone}/instances/{instance}/updateShieldedInstanceConfig", + // "request": { + // "$ref": "ShieldedInstanceConfig" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + // method id "compute.interconnectAttachments.aggregatedList": type InterconnectAttachmentsAggregatedListCall struct { @@ -60689,7 +63039,7 @@ func (c *InterconnectAttachmentsDeleteCall) Do(opts ...googleapi.CallOption) (*O // "interconnectAttachment": { // "description": "Name of the interconnect attachment to delete.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -60859,7 +63209,7 @@ func (c *InterconnectAttachmentsGetCall) Do(opts ...googleapi.CallOption) (*Inte // "interconnectAttachment": { // "description": "Name of the interconnect attachment to return.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -61477,7 +63827,7 @@ func (c *InterconnectAttachmentsPatchCall) Do(opts ...googleapi.CallOption) (*Op // "interconnectAttachment": { // "description": "Name of the interconnect attachment to patch.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -61648,7 +63998,7 @@ func (c *InterconnectLocationsGetCall) Do(opts ...googleapi.CallOption) (*Interc // "interconnectLocation": { // "description": "Name of the interconnect location to return.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -62060,7 +64410,7 @@ func (c *InterconnectsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, // "interconnect": { // "description": "Name of the interconnect to delete.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -62220,7 +64570,7 @@ func (c *InterconnectsGetCall) Do(opts ...googleapi.CallOption) (*Interconnect, // "interconnect": { // "description": "Name of the interconnect to return.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -62377,7 +64727,7 @@ func (c *InterconnectsGetDiagnosticsCall) Do(opts ...googleapi.CallOption) (*Int // "interconnect": { // "description": "Name of the interconnect resource to query.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -62962,7 +65312,7 @@ func (c *InterconnectsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, e // "interconnect": { // "description": "Name of the interconnect to update.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -63437,7 +65787,7 @@ func (c *LicensesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error // "license": { // "description": "Name of the license resource to delete.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -63597,7 +65947,7 @@ func (c *LicensesGetCall) Do(opts ...googleapi.CallOption) (*License, error) { // "license": { // "description": "Name of the License resource to return.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -64891,7 +67241,7 @@ func (c *MachineTypesGetCall) Do(opts ...googleapi.CallOption) (*MachineType, er // "machineType": { // "description": "Name of the machine type to return.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -65187,6 +67537,1837 @@ func (c *MachineTypesListCall) Pages(ctx context.Context, f func(*MachineTypeLis } } +// method id "compute.networkEndpointGroups.aggregatedList": + +type NetworkEndpointGroupsAggregatedListCall struct { + s *Service + project string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// AggregatedList: Retrieves the list of network endpoint groups and +// sorts them by zone. +func (r *NetworkEndpointGroupsService) AggregatedList(project string) *NetworkEndpointGroupsAggregatedListCall { + c := &NetworkEndpointGroupsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. The expression must specify +// the field name, a comparison operator, and the value that you want to +// use for filtering. The value must be a string, a number, or a +// boolean. The comparison operator must be either =, !=, >, or <. +// +// For example, if you are filtering Compute Engine instances, you can +// exclude instances named example-instance by specifying name != +// example-instance. +// +// You can also filter nested fields. For example, you could specify +// scheduling.automaticRestart = false to include instances only if they +// are not scheduled for automatic restarts. You can use filtering on +// nested fields to filter based on resource labels. +// +// To filter on multiple expressions, provide each separate expression +// within parentheses. For example, (scheduling.automaticRestart = true) +// (cpuPlatform = "Intel Skylake"). By default, each expression is an +// AND expression. However, you can include AND and OR expressions +// explicitly. For example, (cpuPlatform = "Intel Skylake") OR +// (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = +// true). +func (c *NetworkEndpointGroupsAggregatedListCall) Filter(filter string) *NetworkEndpointGroupsAggregatedListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum +// number of results per page that should be returned. If the number of +// available results is larger than maxResults, Compute Engine returns a +// nextPageToken that can be used to get the next page of results in +// subsequent list requests. Acceptable values are 0 to 500, inclusive. +// (Default: 500) +func (c *NetworkEndpointGroupsAggregatedListCall) MaxResults(maxResults int64) *NetworkEndpointGroupsAggregatedListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, results are returned in alphanumerical +// order based on the resource name. +// +// You can also sort results in descending order based on the creation +// timestamp using orderBy="creationTimestamp desc". This sorts results +// based on the creationTimestamp field in reverse chronological order +// (newest result first). Use this to sort resources like operations so +// that the newest operation is returned first. +// +// Currently, only sorting by name or creationTimestamp desc is +// supported. +func (c *NetworkEndpointGroupsAggregatedListCall) OrderBy(orderBy string) *NetworkEndpointGroupsAggregatedListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page +// token to use. Set pageToken to the nextPageToken returned by a +// previous list request to get the next page of results. +func (c *NetworkEndpointGroupsAggregatedListCall) PageToken(pageToken string) *NetworkEndpointGroupsAggregatedListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *NetworkEndpointGroupsAggregatedListCall) Fields(s ...googleapi.Field) *NetworkEndpointGroupsAggregatedListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *NetworkEndpointGroupsAggregatedListCall) IfNoneMatch(entityTag string) *NetworkEndpointGroupsAggregatedListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *NetworkEndpointGroupsAggregatedListCall) Context(ctx context.Context) *NetworkEndpointGroupsAggregatedListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *NetworkEndpointGroupsAggregatedListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *NetworkEndpointGroupsAggregatedListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/networkEndpointGroups") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.networkEndpointGroups.aggregatedList" call. +// Exactly one of *NetworkEndpointGroupAggregatedList or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *NetworkEndpointGroupAggregatedList.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *NetworkEndpointGroupsAggregatedListCall) Do(opts ...googleapi.CallOption) (*NetworkEndpointGroupAggregatedList, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &NetworkEndpointGroupAggregatedList{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves the list of network endpoint groups and sorts them by zone.", + // "httpMethod": "GET", + // "id": "compute.networkEndpointGroups.aggregatedList", + // "parameterOrder": [ + // "project" + // ], + // "parameters": { + // "filter": { + // "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", + // "format": "uint32", + // "location": "query", + // "minimum": "0", + // "type": "integer" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageToken": { + // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/aggregated/networkEndpointGroups", + // "response": { + // "$ref": "NetworkEndpointGroupAggregatedList" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *NetworkEndpointGroupsAggregatedListCall) Pages(ctx context.Context, f func(*NetworkEndpointGroupAggregatedList) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "compute.networkEndpointGroups.attachNetworkEndpoints": + +type NetworkEndpointGroupsAttachNetworkEndpointsCall struct { + s *Service + project string + zone string + networkEndpointGroup string + networkendpointgroupsattachendpointsrequest *NetworkEndpointGroupsAttachEndpointsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// AttachNetworkEndpoints: Attach a list of network endpoints to the +// specified network endpoint group. +func (r *NetworkEndpointGroupsService) AttachNetworkEndpoints(project string, zone string, networkEndpointGroup string, networkendpointgroupsattachendpointsrequest *NetworkEndpointGroupsAttachEndpointsRequest) *NetworkEndpointGroupsAttachNetworkEndpointsCall { + c := &NetworkEndpointGroupsAttachNetworkEndpointsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + c.networkEndpointGroup = networkEndpointGroup + c.networkendpointgroupsattachendpointsrequest = networkendpointgroupsattachendpointsrequest + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *NetworkEndpointGroupsAttachNetworkEndpointsCall) RequestId(requestId string) *NetworkEndpointGroupsAttachNetworkEndpointsCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *NetworkEndpointGroupsAttachNetworkEndpointsCall) Fields(s ...googleapi.Field) *NetworkEndpointGroupsAttachNetworkEndpointsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *NetworkEndpointGroupsAttachNetworkEndpointsCall) Context(ctx context.Context) *NetworkEndpointGroupsAttachNetworkEndpointsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *NetworkEndpointGroupsAttachNetworkEndpointsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *NetworkEndpointGroupsAttachNetworkEndpointsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.networkendpointgroupsattachendpointsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}/attachNetworkEndpoints") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "zone": c.zone, + "networkEndpointGroup": c.networkEndpointGroup, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.networkEndpointGroups.attachNetworkEndpoints" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *NetworkEndpointGroupsAttachNetworkEndpointsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Attach a list of network endpoints to the specified network endpoint group.", + // "httpMethod": "POST", + // "id": "compute.networkEndpointGroups.attachNetworkEndpoints", + // "parameterOrder": [ + // "project", + // "zone", + // "networkEndpointGroup" + // ], + // "parameters": { + // "networkEndpointGroup": { + // "description": "The name of the network endpoint group where you are attaching network endpoints to. It should comply with RFC1035.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "zone": { + // "description": "The name of the zone where the network endpoint group is located. It should comply with RFC1035.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}/attachNetworkEndpoints", + // "request": { + // "$ref": "NetworkEndpointGroupsAttachEndpointsRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.networkEndpointGroups.delete": + +type NetworkEndpointGroupsDeleteCall struct { + s *Service + project string + zone string + networkEndpointGroup string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes the specified network endpoint group. The network +// endpoints in the NEG and the VM instances they belong to are not +// terminated when the NEG is deleted. Note that the NEG cannot be +// deleted if there are backend services referencing it. +func (r *NetworkEndpointGroupsService) Delete(project string, zone string, networkEndpointGroup string) *NetworkEndpointGroupsDeleteCall { + c := &NetworkEndpointGroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + c.networkEndpointGroup = networkEndpointGroup + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *NetworkEndpointGroupsDeleteCall) RequestId(requestId string) *NetworkEndpointGroupsDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *NetworkEndpointGroupsDeleteCall) Fields(s ...googleapi.Field) *NetworkEndpointGroupsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *NetworkEndpointGroupsDeleteCall) Context(ctx context.Context) *NetworkEndpointGroupsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *NetworkEndpointGroupsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *NetworkEndpointGroupsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "zone": c.zone, + "networkEndpointGroup": c.networkEndpointGroup, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.networkEndpointGroups.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *NetworkEndpointGroupsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes the specified network endpoint group. The network endpoints in the NEG and the VM instances they belong to are not terminated when the NEG is deleted. Note that the NEG cannot be deleted if there are backend services referencing it.", + // "httpMethod": "DELETE", + // "id": "compute.networkEndpointGroups.delete", + // "parameterOrder": [ + // "project", + // "zone", + // "networkEndpointGroup" + // ], + // "parameters": { + // "networkEndpointGroup": { + // "description": "The name of the network endpoint group to delete. It should comply with RFC1035.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "zone": { + // "description": "The name of the zone where the network endpoint group is located. It should comply with RFC1035.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.networkEndpointGroups.detachNetworkEndpoints": + +type NetworkEndpointGroupsDetachNetworkEndpointsCall struct { + s *Service + project string + zone string + networkEndpointGroup string + networkendpointgroupsdetachendpointsrequest *NetworkEndpointGroupsDetachEndpointsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// DetachNetworkEndpoints: Detach a list of network endpoints from the +// specified network endpoint group. +func (r *NetworkEndpointGroupsService) DetachNetworkEndpoints(project string, zone string, networkEndpointGroup string, networkendpointgroupsdetachendpointsrequest *NetworkEndpointGroupsDetachEndpointsRequest) *NetworkEndpointGroupsDetachNetworkEndpointsCall { + c := &NetworkEndpointGroupsDetachNetworkEndpointsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + c.networkEndpointGroup = networkEndpointGroup + c.networkendpointgroupsdetachendpointsrequest = networkendpointgroupsdetachendpointsrequest + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *NetworkEndpointGroupsDetachNetworkEndpointsCall) RequestId(requestId string) *NetworkEndpointGroupsDetachNetworkEndpointsCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *NetworkEndpointGroupsDetachNetworkEndpointsCall) Fields(s ...googleapi.Field) *NetworkEndpointGroupsDetachNetworkEndpointsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *NetworkEndpointGroupsDetachNetworkEndpointsCall) Context(ctx context.Context) *NetworkEndpointGroupsDetachNetworkEndpointsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *NetworkEndpointGroupsDetachNetworkEndpointsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *NetworkEndpointGroupsDetachNetworkEndpointsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.networkendpointgroupsdetachendpointsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}/detachNetworkEndpoints") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "zone": c.zone, + "networkEndpointGroup": c.networkEndpointGroup, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.networkEndpointGroups.detachNetworkEndpoints" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *NetworkEndpointGroupsDetachNetworkEndpointsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Detach a list of network endpoints from the specified network endpoint group.", + // "httpMethod": "POST", + // "id": "compute.networkEndpointGroups.detachNetworkEndpoints", + // "parameterOrder": [ + // "project", + // "zone", + // "networkEndpointGroup" + // ], + // "parameters": { + // "networkEndpointGroup": { + // "description": "The name of the network endpoint group where you are removing network endpoints. It should comply with RFC1035.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "zone": { + // "description": "The name of the zone where the network endpoint group is located. It should comply with RFC1035.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}/detachNetworkEndpoints", + // "request": { + // "$ref": "NetworkEndpointGroupsDetachEndpointsRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.networkEndpointGroups.get": + +type NetworkEndpointGroupsGetCall struct { + s *Service + project string + zone string + networkEndpointGroup string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Returns the specified network endpoint group. Gets a list of +// available network endpoint groups by making a list() request. +func (r *NetworkEndpointGroupsService) Get(project string, zone string, networkEndpointGroup string) *NetworkEndpointGroupsGetCall { + c := &NetworkEndpointGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + c.networkEndpointGroup = networkEndpointGroup + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *NetworkEndpointGroupsGetCall) Fields(s ...googleapi.Field) *NetworkEndpointGroupsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *NetworkEndpointGroupsGetCall) IfNoneMatch(entityTag string) *NetworkEndpointGroupsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *NetworkEndpointGroupsGetCall) Context(ctx context.Context) *NetworkEndpointGroupsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *NetworkEndpointGroupsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *NetworkEndpointGroupsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "zone": c.zone, + "networkEndpointGroup": c.networkEndpointGroup, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.networkEndpointGroups.get" call. +// Exactly one of *NetworkEndpointGroup or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *NetworkEndpointGroup.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *NetworkEndpointGroupsGetCall) Do(opts ...googleapi.CallOption) (*NetworkEndpointGroup, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &NetworkEndpointGroup{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns the specified network endpoint group. Gets a list of available network endpoint groups by making a list() request.", + // "httpMethod": "GET", + // "id": "compute.networkEndpointGroups.get", + // "parameterOrder": [ + // "project", + // "zone", + // "networkEndpointGroup" + // ], + // "parameters": { + // "networkEndpointGroup": { + // "description": "The name of the network endpoint group. It should comply with RFC1035.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "zone": { + // "description": "The name of the zone where the network endpoint group is located. It should comply with RFC1035.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}", + // "response": { + // "$ref": "NetworkEndpointGroup" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.networkEndpointGroups.insert": + +type NetworkEndpointGroupsInsertCall struct { + s *Service + project string + zone string + networkendpointgroup *NetworkEndpointGroup + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Insert: Creates a network endpoint group in the specified project +// using the parameters that are included in the request. +func (r *NetworkEndpointGroupsService) Insert(project string, zone string, networkendpointgroup *NetworkEndpointGroup) *NetworkEndpointGroupsInsertCall { + c := &NetworkEndpointGroupsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + c.networkendpointgroup = networkendpointgroup + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *NetworkEndpointGroupsInsertCall) RequestId(requestId string) *NetworkEndpointGroupsInsertCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *NetworkEndpointGroupsInsertCall) Fields(s ...googleapi.Field) *NetworkEndpointGroupsInsertCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *NetworkEndpointGroupsInsertCall) Context(ctx context.Context) *NetworkEndpointGroupsInsertCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *NetworkEndpointGroupsInsertCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *NetworkEndpointGroupsInsertCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.networkendpointgroup) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/networkEndpointGroups") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "zone": c.zone, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.networkEndpointGroups.insert" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *NetworkEndpointGroupsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a network endpoint group in the specified project using the parameters that are included in the request.", + // "httpMethod": "POST", + // "id": "compute.networkEndpointGroups.insert", + // "parameterOrder": [ + // "project", + // "zone" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "zone": { + // "description": "The name of the zone where you want to create the network endpoint group. It should comply with RFC1035.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/zones/{zone}/networkEndpointGroups", + // "request": { + // "$ref": "NetworkEndpointGroup" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.networkEndpointGroups.list": + +type NetworkEndpointGroupsListCall struct { + s *Service + project string + zone string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Retrieves the list of network endpoint groups that are located +// in the specified project and zone. +func (r *NetworkEndpointGroupsService) List(project string, zone string) *NetworkEndpointGroupsListCall { + c := &NetworkEndpointGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. The expression must specify +// the field name, a comparison operator, and the value that you want to +// use for filtering. The value must be a string, a number, or a +// boolean. The comparison operator must be either =, !=, >, or <. +// +// For example, if you are filtering Compute Engine instances, you can +// exclude instances named example-instance by specifying name != +// example-instance. +// +// You can also filter nested fields. For example, you could specify +// scheduling.automaticRestart = false to include instances only if they +// are not scheduled for automatic restarts. You can use filtering on +// nested fields to filter based on resource labels. +// +// To filter on multiple expressions, provide each separate expression +// within parentheses. For example, (scheduling.automaticRestart = true) +// (cpuPlatform = "Intel Skylake"). By default, each expression is an +// AND expression. However, you can include AND and OR expressions +// explicitly. For example, (cpuPlatform = "Intel Skylake") OR +// (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = +// true). +func (c *NetworkEndpointGroupsListCall) Filter(filter string) *NetworkEndpointGroupsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum +// number of results per page that should be returned. If the number of +// available results is larger than maxResults, Compute Engine returns a +// nextPageToken that can be used to get the next page of results in +// subsequent list requests. Acceptable values are 0 to 500, inclusive. +// (Default: 500) +func (c *NetworkEndpointGroupsListCall) MaxResults(maxResults int64) *NetworkEndpointGroupsListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, results are returned in alphanumerical +// order based on the resource name. +// +// You can also sort results in descending order based on the creation +// timestamp using orderBy="creationTimestamp desc". This sorts results +// based on the creationTimestamp field in reverse chronological order +// (newest result first). Use this to sort resources like operations so +// that the newest operation is returned first. +// +// Currently, only sorting by name or creationTimestamp desc is +// supported. +func (c *NetworkEndpointGroupsListCall) OrderBy(orderBy string) *NetworkEndpointGroupsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page +// token to use. Set pageToken to the nextPageToken returned by a +// previous list request to get the next page of results. +func (c *NetworkEndpointGroupsListCall) PageToken(pageToken string) *NetworkEndpointGroupsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *NetworkEndpointGroupsListCall) Fields(s ...googleapi.Field) *NetworkEndpointGroupsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *NetworkEndpointGroupsListCall) IfNoneMatch(entityTag string) *NetworkEndpointGroupsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *NetworkEndpointGroupsListCall) Context(ctx context.Context) *NetworkEndpointGroupsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *NetworkEndpointGroupsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *NetworkEndpointGroupsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/networkEndpointGroups") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "zone": c.zone, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.networkEndpointGroups.list" call. +// Exactly one of *NetworkEndpointGroupList or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *NetworkEndpointGroupList.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *NetworkEndpointGroupsListCall) Do(opts ...googleapi.CallOption) (*NetworkEndpointGroupList, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &NetworkEndpointGroupList{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves the list of network endpoint groups that are located in the specified project and zone.", + // "httpMethod": "GET", + // "id": "compute.networkEndpointGroups.list", + // "parameterOrder": [ + // "project", + // "zone" + // ], + // "parameters": { + // "filter": { + // "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", + // "format": "uint32", + // "location": "query", + // "minimum": "0", + // "type": "integer" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageToken": { + // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "zone": { + // "description": "The name of the zone where the network endpoint group is located. It should comply with RFC1035.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/zones/{zone}/networkEndpointGroups", + // "response": { + // "$ref": "NetworkEndpointGroupList" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *NetworkEndpointGroupsListCall) Pages(ctx context.Context, f func(*NetworkEndpointGroupList) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "compute.networkEndpointGroups.listNetworkEndpoints": + +type NetworkEndpointGroupsListNetworkEndpointsCall struct { + s *Service + project string + zone string + networkEndpointGroup string + networkendpointgroupslistendpointsrequest *NetworkEndpointGroupsListEndpointsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// ListNetworkEndpoints: Lists the network endpoints in the specified +// network endpoint group. +func (r *NetworkEndpointGroupsService) ListNetworkEndpoints(project string, zone string, networkEndpointGroup string, networkendpointgroupslistendpointsrequest *NetworkEndpointGroupsListEndpointsRequest) *NetworkEndpointGroupsListNetworkEndpointsCall { + c := &NetworkEndpointGroupsListNetworkEndpointsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + c.networkEndpointGroup = networkEndpointGroup + c.networkendpointgroupslistendpointsrequest = networkendpointgroupslistendpointsrequest + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. The expression must specify +// the field name, a comparison operator, and the value that you want to +// use for filtering. The value must be a string, a number, or a +// boolean. The comparison operator must be either =, !=, >, or <. +// +// For example, if you are filtering Compute Engine instances, you can +// exclude instances named example-instance by specifying name != +// example-instance. +// +// You can also filter nested fields. For example, you could specify +// scheduling.automaticRestart = false to include instances only if they +// are not scheduled for automatic restarts. You can use filtering on +// nested fields to filter based on resource labels. +// +// To filter on multiple expressions, provide each separate expression +// within parentheses. For example, (scheduling.automaticRestart = true) +// (cpuPlatform = "Intel Skylake"). By default, each expression is an +// AND expression. However, you can include AND and OR expressions +// explicitly. For example, (cpuPlatform = "Intel Skylake") OR +// (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = +// true). +func (c *NetworkEndpointGroupsListNetworkEndpointsCall) Filter(filter string) *NetworkEndpointGroupsListNetworkEndpointsCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum +// number of results per page that should be returned. If the number of +// available results is larger than maxResults, Compute Engine returns a +// nextPageToken that can be used to get the next page of results in +// subsequent list requests. Acceptable values are 0 to 500, inclusive. +// (Default: 500) +func (c *NetworkEndpointGroupsListNetworkEndpointsCall) MaxResults(maxResults int64) *NetworkEndpointGroupsListNetworkEndpointsCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, results are returned in alphanumerical +// order based on the resource name. +// +// You can also sort results in descending order based on the creation +// timestamp using orderBy="creationTimestamp desc". This sorts results +// based on the creationTimestamp field in reverse chronological order +// (newest result first). Use this to sort resources like operations so +// that the newest operation is returned first. +// +// Currently, only sorting by name or creationTimestamp desc is +// supported. +func (c *NetworkEndpointGroupsListNetworkEndpointsCall) OrderBy(orderBy string) *NetworkEndpointGroupsListNetworkEndpointsCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page +// token to use. Set pageToken to the nextPageToken returned by a +// previous list request to get the next page of results. +func (c *NetworkEndpointGroupsListNetworkEndpointsCall) PageToken(pageToken string) *NetworkEndpointGroupsListNetworkEndpointsCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *NetworkEndpointGroupsListNetworkEndpointsCall) Fields(s ...googleapi.Field) *NetworkEndpointGroupsListNetworkEndpointsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *NetworkEndpointGroupsListNetworkEndpointsCall) Context(ctx context.Context) *NetworkEndpointGroupsListNetworkEndpointsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *NetworkEndpointGroupsListNetworkEndpointsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *NetworkEndpointGroupsListNetworkEndpointsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.networkendpointgroupslistendpointsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}/listNetworkEndpoints") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "zone": c.zone, + "networkEndpointGroup": c.networkEndpointGroup, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.networkEndpointGroups.listNetworkEndpoints" call. +// Exactly one of *NetworkEndpointGroupsListNetworkEndpoints or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *NetworkEndpointGroupsListNetworkEndpoints.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *NetworkEndpointGroupsListNetworkEndpointsCall) Do(opts ...googleapi.CallOption) (*NetworkEndpointGroupsListNetworkEndpoints, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &NetworkEndpointGroupsListNetworkEndpoints{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists the network endpoints in the specified network endpoint group.", + // "httpMethod": "POST", + // "id": "compute.networkEndpointGroups.listNetworkEndpoints", + // "parameterOrder": [ + // "project", + // "zone", + // "networkEndpointGroup" + // ], + // "parameters": { + // "filter": { + // "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", + // "format": "uint32", + // "location": "query", + // "minimum": "0", + // "type": "integer" + // }, + // "networkEndpointGroup": { + // "description": "The name of the network endpoint group from which you want to generate a list of included network endpoints. It should comply with RFC1035.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageToken": { + // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "zone": { + // "description": "The name of the zone where the network endpoint group is located. It should comply with RFC1035.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}/listNetworkEndpoints", + // "request": { + // "$ref": "NetworkEndpointGroupsListEndpointsRequest" + // }, + // "response": { + // "$ref": "NetworkEndpointGroupsListNetworkEndpoints" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *NetworkEndpointGroupsListNetworkEndpointsCall) Pages(ctx context.Context, f func(*NetworkEndpointGroupsListNetworkEndpoints) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "compute.networkEndpointGroups.testIamPermissions": + +type NetworkEndpointGroupsTestIamPermissionsCall struct { + s *Service + project string + zone string + resource string + testpermissionsrequest *TestPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TestIamPermissions: Returns permissions that a caller has on the +// specified resource. +func (r *NetworkEndpointGroupsService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *NetworkEndpointGroupsTestIamPermissionsCall { + c := &NetworkEndpointGroupsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + c.resource = resource + c.testpermissionsrequest = testpermissionsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *NetworkEndpointGroupsTestIamPermissionsCall) Fields(s ...googleapi.Field) *NetworkEndpointGroupsTestIamPermissionsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *NetworkEndpointGroupsTestIamPermissionsCall) Context(ctx context.Context) *NetworkEndpointGroupsTestIamPermissionsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *NetworkEndpointGroupsTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *NetworkEndpointGroupsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/networkEndpointGroups/{resource}/testIamPermissions") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "zone": c.zone, + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.networkEndpointGroups.testIamPermissions" call. +// Exactly one of *TestPermissionsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *TestPermissionsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *NetworkEndpointGroupsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &TestPermissionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns permissions that a caller has on the specified resource.", + // "httpMethod": "POST", + // "id": "compute.networkEndpointGroups.testIamPermissions", + // "parameterOrder": [ + // "project", + // "zone", + // "resource" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "resource": { + // "description": "Name or id of the resource for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // }, + // "zone": { + // "description": "The name of the zone for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/zones/{zone}/networkEndpointGroups/{resource}/testIamPermissions", + // "request": { + // "$ref": "TestPermissionsRequest" + // }, + // "response": { + // "$ref": "TestPermissionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + // method id "compute.networks.addPeering": type NetworksAddPeeringCall struct { @@ -66762,7 +70943,7 @@ func (c *NodeGroupsAddNodesCall) Do(opts ...googleapi.CallOption) (*Operation, e // "nodeGroup": { // "description": "Name of the NodeGroup resource.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -67192,7 +71373,7 @@ func (c *NodeGroupsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, err // "nodeGroup": { // "description": "Name of the NodeGroup resource to delete.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -67374,7 +71555,7 @@ func (c *NodeGroupsDeleteNodesCall) Do(opts ...googleapi.CallOption) (*Operation // "nodeGroup": { // "description": "Name of the NodeGroup resource to delete.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -67549,7 +71730,7 @@ func (c *NodeGroupsGetCall) Do(opts ...googleapi.CallOption) (*NodeGroup, error) // "nodeGroup": { // "description": "Name of the node group to return.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -68392,7 +72573,7 @@ func (c *NodeGroupsListNodesCall) Do(opts ...googleapi.CallOption) (*NodeGroupsL // "nodeGroup": { // "description": "Name of the NodeGroup resource whose nodes you want to list.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -68761,9 +72942,9 @@ func (c *NodeGroupsSetNodeTemplateCall) Do(opts ...googleapi.CallOption) (*Opera // ], // "parameters": { // "nodeGroup": { - // "description": "Name of the NodeGroup resource to delete.", + // "description": "Name of the NodeGroup resource to update.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -69355,7 +73536,7 @@ func (c *NodeTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, // "nodeTemplate": { // "description": "Name of the NodeTemplate resource to delete.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -69526,7 +73707,7 @@ func (c *NodeTemplatesGetCall) Do(opts ...googleapi.CallOption) (*NodeTemplate, // "nodeTemplate": { // "description": "Name of the node template to return.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -70874,7 +75055,7 @@ func (c *NodeTypesGetCall) Do(opts ...googleapi.CallOption) (*NodeType, error) { // "nodeType": { // "description": "Name of the node type to return.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -73558,7 +77739,7 @@ func (c *RegionAutoscalersDeleteCall) Do(opts ...googleapi.CallOption) (*Operati // "autoscaler": { // "description": "Name of the autoscaler to delete.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -73728,7 +77909,7 @@ func (c *RegionAutoscalersGetCall) Do(opts ...googleapi.CallOption) (*Autoscaler // "autoscaler": { // "description": "Name of the autoscaler to return.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -74349,7 +78530,7 @@ func (c *RegionAutoscalersPatchCall) Do(opts ...googleapi.CallOption) (*Operatio // "autoscaler": { // "description": "Name of the autoscaler to patch.", // "location": "query", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "type": "string" // }, // "project": { @@ -74537,7 +78718,7 @@ func (c *RegionAutoscalersUpdateCall) Do(opts ...googleapi.CallOption) (*Operati // "autoscaler": { // "description": "Name of the autoscaler to update.", // "location": "query", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "type": "string" // }, // "project": { @@ -74714,7 +78895,7 @@ func (c *RegionBackendServicesDeleteCall) Do(opts ...googleapi.CallOption) (*Ope // "backendService": { // "description": "Name of the BackendService resource to delete.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -74884,7 +79065,7 @@ func (c *RegionBackendServicesGetCall) Do(opts ...googleapi.CallOption) (*Backen // "backendService": { // "description": "Name of the BackendService resource to return.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -75044,7 +79225,7 @@ func (c *RegionBackendServicesGetHealthCall) Do(opts ...googleapi.CallOption) (* // "backendService": { // "description": "Name of the BackendService resource for which to get health.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -75858,7 +80039,7 @@ func (c *RegionBackendServicesUpdateCall) Do(opts ...googleapi.CallOption) (*Ope // "backendService": { // "description": "Name of the BackendService resource to update.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -76283,7 +80464,7 @@ func (c *RegionCommitmentsGetCall) Do(opts ...googleapi.CallOption) (*Commitment // "commitment": { // "description": "Name of the commitment to return.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -76888,7 +81069,7 @@ func (c *RegionDiskTypesGetCall) Do(opts ...googleapi.CallOption) (*DiskType, er // "diskType": { // "description": "Name of the disk type to return.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -82043,7 +86224,7 @@ func (c *RegionOperationsDeleteCall) Do(opts ...googleapi.CallOption) error { // "operation": { // "description": "Name of the Operations resource to delete.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -82206,7 +86387,7 @@ func (c *RegionOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, // "operation": { // "description": "Name of the Operations resource to return.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -82641,7 +86822,7 @@ func (c *RegionsGetCall) Do(opts ...googleapi.CallOption) (*Region, error) { // "region": { // "description": "Name of the region resource to return.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -83321,7 +87502,7 @@ func (c *RoutersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) // "router": { // "description": "Name of the Router resource to delete.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -83487,7 +87668,7 @@ func (c *RoutersGetCall) Do(opts ...googleapi.CallOption) (*Router, error) { // "router": { // "description": "Name of the Router resource to return.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -83740,7 +87921,7 @@ func (c *RoutersGetNatMappingInfoCall) Do(opts ...googleapi.CallOption) (*VmEndp // "router": { // "description": "Name of the Router resource to query for Nat Mapping information of VM endpoints.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -83928,7 +88109,7 @@ func (c *RoutersGetRouterStatusCall) Do(opts ...googleapi.CallOption) (*RouterSt // "router": { // "description": "Name of the Router resource to query.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -84551,7 +88732,7 @@ func (c *RoutersPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) // "router": { // "description": "Name of the Router resource to patch.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -84714,7 +88895,7 @@ func (c *RoutersPreviewCall) Do(opts ...googleapi.CallOption) (*RoutersPreviewRe // "router": { // "description": "Name of the Router resource to query.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -84901,7 +89082,7 @@ func (c *RoutersUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) // "router": { // "description": "Name of the Router resource to update.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -85791,7 +89972,7 @@ func (c *SecurityPoliciesAddRuleCall) Do(opts ...googleapi.CallOption) (*Operati // "securityPolicy": { // "description": "Name of the security policy to update.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -85958,7 +90139,7 @@ func (c *SecurityPoliciesDeleteCall) Do(opts ...googleapi.CallOption) (*Operatio // "securityPolicy": { // "description": "Name of the security policy to delete.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -86113,7 +90294,7 @@ func (c *SecurityPoliciesGetCall) Do(opts ...googleapi.CallOption) (*SecurityPol // "securityPolicy": { // "description": "Name of the security policy to get.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -86281,7 +90462,7 @@ func (c *SecurityPoliciesGetRuleCall) Do(opts ...googleapi.CallOption) (*Securit // "securityPolicy": { // "description": "Name of the security policy to which the queried rule belongs.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -86870,7 +91051,7 @@ func (c *SecurityPoliciesPatchCall) Do(opts ...googleapi.CallOption) (*Operation // "securityPolicy": { // "description": "Name of the security policy to update.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -87033,7 +91214,7 @@ func (c *SecurityPoliciesPatchRuleCall) Do(opts ...googleapi.CallOption) (*Opera // "securityPolicy": { // "description": "Name of the security policy to update.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -87189,7 +91370,7 @@ func (c *SecurityPoliciesRemoveRuleCall) Do(opts ...googleapi.CallOption) (*Oper // "securityPolicy": { // "description": "Name of the security policy to update.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -88544,7 +92725,7 @@ func (c *SslCertificatesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation // "sslCertificate": { // "description": "Name of the SslCertificate resource to delete.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -88699,7 +92880,7 @@ func (c *SslCertificatesGetCall) Do(opts ...googleapi.CallOption) (*SslCertifica // "sslCertificate": { // "description": "Name of the SslCertificate resource to return.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -90685,7 +94866,7 @@ func (c *SubnetworksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, er // "subnetwork": { // "description": "Name of the Subnetwork resource to delete.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -90868,7 +95049,7 @@ func (c *SubnetworksExpandIpCidrRangeCall) Do(opts ...googleapi.CallOption) (*Op // "subnetwork": { // "description": "Name of the Subnetwork resource to update.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -91037,7 +95218,7 @@ func (c *SubnetworksGetCall) Do(opts ...googleapi.CallOption) (*Subnetwork, erro // "subnetwork": { // "description": "Name of the Subnetwork resource to return.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -92079,7 +96260,7 @@ func (c *SubnetworksPatchCall) Do(opts ...googleapi.CallOption) (*Operation, err // "subnetwork": { // "description": "Name of the Subnetwork resource to patch.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -92428,7 +96609,7 @@ func (c *SubnetworksSetPrivateIpGoogleAccessCall) Do(opts ...googleapi.CallOptio // "subnetwork": { // "description": "Name of the Subnetwork resource.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -92759,7 +96940,7 @@ func (c *TargetHttpProxiesDeleteCall) Do(opts ...googleapi.CallOption) (*Operati // "targetHttpProxy": { // "description": "Name of the TargetHttpProxy resource to delete.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -92915,7 +97096,7 @@ func (c *TargetHttpProxiesGetCall) Do(opts ...googleapi.CallOption) (*TargetHttp // "targetHttpProxy": { // "description": "Name of the TargetHttpProxy resource to return.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -93506,7 +97687,7 @@ func (c *TargetHttpProxiesSetUrlMapCall) Do(opts ...googleapi.CallOption) (*Oper // "targetHttpProxy": { // "description": "Name of the TargetHttpProxy to set a URL map for.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -93673,7 +97854,7 @@ func (c *TargetHttpsProxiesDeleteCall) Do(opts ...googleapi.CallOption) (*Operat // "targetHttpsProxy": { // "description": "Name of the TargetHttpsProxy resource to delete.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -93828,7 +98009,7 @@ func (c *TargetHttpsProxiesGetCall) Do(opts ...googleapi.CallOption) (*TargetHtt // "targetHttpsProxy": { // "description": "Name of the TargetHttpsProxy resource to return.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -94589,7 +98770,7 @@ func (c *TargetHttpsProxiesSetSslCertificatesCall) Do(opts ...googleapi.CallOpti // "targetHttpsProxy": { // "description": "Name of the TargetHttpsProxy resource to set an SslCertificates resource for.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -94940,7 +99121,7 @@ func (c *TargetHttpsProxiesSetUrlMapCall) Do(opts ...googleapi.CallOption) (*Ope // "targetHttpsProxy": { // "description": "Name of the TargetHttpsProxy resource whose URL map is to be set.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -95364,7 +99545,7 @@ func (c *TargetInstancesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation // "targetInstance": { // "description": "Name of the TargetInstance resource to delete.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -95531,7 +99712,7 @@ func (c *TargetInstancesGetCall) Do(opts ...googleapi.CallOption) (*TargetInstan // "targetInstance": { // "description": "Name of the TargetInstance resource to return.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -96162,7 +100343,7 @@ func (c *TargetPoolsAddHealthCheckCall) Do(opts ...googleapi.CallOption) (*Opera // "targetPool": { // "description": "Name of the target pool to add a health check to.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -96348,7 +100529,7 @@ func (c *TargetPoolsAddInstanceCall) Do(opts ...googleapi.CallOption) (*Operatio // "targetPool": { // "description": "Name of the TargetPool resource to add instances to.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -96779,7 +100960,7 @@ func (c *TargetPoolsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, er // "targetPool": { // "description": "Name of the TargetPool resource to delete.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -96946,7 +101127,7 @@ func (c *TargetPoolsGetCall) Do(opts ...googleapi.CallOption) (*TargetPool, erro // "targetPool": { // "description": "Name of the TargetPool resource to return.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -97107,7 +101288,7 @@ func (c *TargetPoolsGetHealthCall) Do(opts ...googleapi.CallOption) (*TargetPool // "targetPool": { // "description": "Name of the TargetPool resource to which the queried instance belongs.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -97734,7 +101915,7 @@ func (c *TargetPoolsRemoveHealthCheckCall) Do(opts ...googleapi.CallOption) (*Op // "targetPool": { // "description": "Name of the target pool to remove health checks from.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -97920,7 +102101,7 @@ func (c *TargetPoolsRemoveInstanceCall) Do(opts ...googleapi.CallOption) (*Opera // "targetPool": { // "description": "Name of the TargetPool resource to remove instances from.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -98119,7 +102300,7 @@ func (c *TargetPoolsSetBackupCall) Do(opts ...googleapi.CallOption) (*Operation, // "targetPool": { // "description": "Name of the TargetPool resource to set a backup pool for.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -98286,7 +102467,7 @@ func (c *TargetSslProxiesDeleteCall) Do(opts ...googleapi.CallOption) (*Operatio // "targetSslProxy": { // "description": "Name of the TargetSslProxy resource to delete.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -98441,7 +102622,7 @@ func (c *TargetSslProxiesGetCall) Do(opts ...googleapi.CallOption) (*TargetSslPr // "targetSslProxy": { // "description": "Name of the TargetSslProxy resource to return.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -99029,7 +103210,7 @@ func (c *TargetSslProxiesSetBackendServiceCall) Do(opts ...googleapi.CallOption) // "targetSslProxy": { // "description": "Name of the TargetSslProxy resource whose BackendService resource is to be set.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -99203,7 +103384,7 @@ func (c *TargetSslProxiesSetProxyHeaderCall) Do(opts ...googleapi.CallOption) (* // "targetSslProxy": { // "description": "Name of the TargetSslProxy resource whose ProxyHeader is to be set.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -99377,7 +103558,7 @@ func (c *TargetSslProxiesSetSslCertificatesCall) Do(opts ...googleapi.CallOption // "targetSslProxy": { // "description": "Name of the TargetSslProxy resource whose SslCertificate resource is to be set.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -99720,7 +103901,7 @@ func (c *TargetTcpProxiesDeleteCall) Do(opts ...googleapi.CallOption) (*Operatio // "targetTcpProxy": { // "description": "Name of the TargetTcpProxy resource to delete.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -99875,7 +104056,7 @@ func (c *TargetTcpProxiesGetCall) Do(opts ...googleapi.CallOption) (*TargetTcpPr // "targetTcpProxy": { // "description": "Name of the TargetTcpProxy resource to return.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -100463,7 +104644,7 @@ func (c *TargetTcpProxiesSetBackendServiceCall) Do(opts ...googleapi.CallOption) // "targetTcpProxy": { // "description": "Name of the TargetTcpProxy resource whose BackendService resource is to be set.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -100637,7 +104818,7 @@ func (c *TargetTcpProxiesSetProxyHeaderCall) Do(opts ...googleapi.CallOption) (* // "targetTcpProxy": { // "description": "Name of the TargetTcpProxy resource whose ProxyHeader is to be set.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -101066,7 +105247,7 @@ func (c *TargetVpnGatewaysDeleteCall) Do(opts ...googleapi.CallOption) (*Operati // "targetVpnGateway": { // "description": "Name of the target VPN gateway to delete.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -101232,7 +105413,7 @@ func (c *TargetVpnGatewaysGetCall) Do(opts ...googleapi.CallOption) (*TargetVpnG // "targetVpnGateway": { // "description": "Name of the target VPN gateway to return.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -101836,7 +106017,7 @@ func (c *UrlMapsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) // "urlMap": { // "description": "Name of the UrlMap resource to delete.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -101992,7 +106173,7 @@ func (c *UrlMapsGetCall) Do(opts ...googleapi.CallOption) (*UrlMap, error) { // "urlMap": { // "description": "Name of the UrlMap resource to return.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -102330,7 +106511,7 @@ func (c *UrlMapsInvalidateCacheCall) Do(opts ...googleapi.CallOption) (*Operatio // "urlMap": { // "description": "Name of the UrlMap scoping this request.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -102760,7 +106941,7 @@ func (c *UrlMapsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) // "urlMap": { // "description": "Name of the UrlMap resource to patch.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -102936,7 +107117,7 @@ func (c *UrlMapsUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) // "urlMap": { // "description": "Name of the UrlMap resource to update.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -103089,7 +107270,7 @@ func (c *UrlMapsValidateCall) Do(opts ...googleapi.CallOption) (*UrlMapsValidate // "urlMap": { // "description": "Name of the UrlMap resource to be validated as.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -103518,7 +107699,7 @@ func (c *VpnTunnelsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, err // "vpnTunnel": { // "description": "Name of the VpnTunnel resource to delete.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -103684,7 +107865,7 @@ func (c *VpnTunnelsGetCall) Do(opts ...googleapi.CallOption) (*VpnTunnel, error) // "vpnTunnel": { // "description": "Name of the VpnTunnel resource to return.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } @@ -104236,7 +108417,7 @@ func (c *ZoneOperationsDeleteCall) Do(opts ...googleapi.CallOption) error { // "operation": { // "description": "Name of the Operations resource to delete.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -104399,7 +108580,7 @@ func (c *ZoneOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, er // "operation": { // "description": "Name of the Operations resource to return.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -104834,7 +109015,7 @@ func (c *ZonesGetCall) Do(opts ...googleapi.CallOption) (*Zone, error) { // "zone": { // "description": "Name of the zone resource to return.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } diff --git a/vendor/google.golang.org/api/container/v1/container-api.json b/vendor/google.golang.org/api/container/v1/container-api.json index e8718f8f..eaf548fe 100644 --- a/vendor/google.golang.org/api/container/v1/container-api.json +++ b/vendor/google.golang.org/api/container/v1/container-api.json @@ -106,10 +106,59 @@ "resources": { "projects": { "resources": { + "aggregated": { + "resources": { + "usableSubnetworks": { + "methods": { + "list": { + "description": "Lists subnetworks that are usable for creating clusters in a project.", + "flatPath": "v1/projects/{projectsId}/aggregated/usableSubnetworks", + "httpMethod": "GET", + "id": "container.projects.aggregated.usableSubnetworks.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Filtering currently only supports equality on the networkProjectId and must\nbe in the form: \"networkProjectId=[PROJECTID]\", where `networkProjectId`\nis the project which owns the listed subnetworks. This defaults to the\nparent project ID.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "The max number of results per page that should be returned. If the number\nof available results is larger than `page_size`, a `next_page_token` is\nreturned which can be used to get the next page of results in subsequent\nrequests. Acceptable values are 0 to 500, inclusive. (Default: 500)", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Specifies a page token to use. Set this to the nextPageToken returned by\nprevious list requests to get the next page of results.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "The parent project where subnetworks are usable.\nSpecified in the format 'projects/*'.", + "location": "path", + "pattern": "^projects/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/aggregated/usableSubnetworks", + "response": { + "$ref": "ListUsableSubnetworksResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + }, "locations": { "methods": { "getServerConfig": { - "description": "Returns configuration info about the Kubernetes Engine service.", + "description": "Returns configuration info about the Google Kubernetes Engine service.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serverConfig", "httpMethod": "GET", "id": "container.projects.locations.getServerConfig", @@ -118,7 +167,7 @@ ], "parameters": { "name": { - "description": "The name (project and location) of the server config to get\nSpecified in the format 'projects/*/locations/*'.", + "description": "The name (project and location) of the server config to get,\nspecified in the format 'projects/*/locations/*'.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+$", "required": true, @@ -176,7 +225,7 @@ ] }, "create": { - "description": "Creates a cluster, consisting of the specified number and type of Google\nCompute Engine instances.\n\nBy default, the cluster is created in the project's\n[default network](/compute/docs/networks-and-firewalls#networks).\n\nOne firewall is added for the cluster. After cluster creation,\nthe cluster creates routes for each node to allow the containers\non that node to communicate with all other instances in the\ncluster.\n\nFinally, an entry is added to the project's global metadata indicating\nwhich CIDR range is being used by the cluster.", + "description": "Creates a cluster, consisting of the specified number and type of Google\nCompute Engine instances.\n\nBy default, the cluster is created in the project's\n[default network](/compute/docs/networks-and-firewalls#networks).\n\nOne firewall is added for the cluster. After cluster creation,\nthe Kubelet creates routes for each node to allow the containers\non that node to communicate with all other instances in the\ncluster.\n\nFinally, an entry is added to the project's global metadata indicating\nwhich CIDR range the cluster is using.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters", "httpMethod": "POST", "id": "container.projects.locations.clusters.create", @@ -204,7 +253,7 @@ ] }, "delete": { - "description": "Deletes the cluster, including the Kubernetes endpoint and all worker\nnodes.\n\nFirewalls and routes that were configured during cluster creation\nare also deleted.\n\nOther Google Compute Engine resources that might be in use by the cluster\n(e.g. load balancer resources) will not be deleted if they weren't present\nat the initial create time.", + "description": "Deletes the cluster, including the Kubernetes endpoint and all worker\nnodes.\n\nFirewalls and routes that were configured during cluster creation\nare also deleted.\n\nOther Google Compute Engine resources that might be in use by the cluster,\nsuch as load balancer resources, are not deleted if they weren't present\nwhen the cluster was initially created.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}", "httpMethod": "DELETE", "id": "container.projects.locations.clusters.delete", @@ -283,6 +332,31 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "getJwks": { + "description": "Gets the public component of the cluster signing keys in\nJSON Web Key format.\nThis API is not yet intended for general use, and is not available for all\nclusters.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/jwks", + "httpMethod": "GET", + "id": "container.projects.locations.clusters.getJwks", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "The cluster (project, location, cluster id) to get keys for. Specified in\nthe format 'projects/*/locations/*/clusters/*'.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/jwks", + "response": { + "$ref": "GetJSONWebKeysResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "list": { "description": "Lists all clusters owned by a project in either the specified zone or all\nzones.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters", @@ -459,7 +533,7 @@ ] }, "setMasterAuth": { - "description": "Used to set master auth materials. Currently supports :-\nChanging the admin password for a specific cluster.\nThis can be either via password generation or explicitly set the password.", + "description": "Sets master auth materials. Currently supports changing the admin password\nor a specific cluster, either via password generation or explicitly setting\nthe password.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:setMasterAuth", "httpMethod": "POST", "id": "container.projects.locations.clusters.setMasterAuth", @@ -515,7 +589,7 @@ ] }, "setNetworkPolicy": { - "description": "Enables/Disables Network Policy for a cluster.", + "description": "Enables or disables Network Policy for a cluster.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:setNetworkPolicy", "httpMethod": "POST", "id": "container.projects.locations.clusters.setNetworkPolicy", @@ -571,7 +645,7 @@ ] }, "startIpRotation": { - "description": "Start master IP rotation.", + "description": "Starts master IP rotation.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:startIpRotation", "httpMethod": "POST", "id": "container.projects.locations.clusters.startIpRotation", @@ -732,7 +806,7 @@ ] }, "get": { - "description": "Retrieves the node pool requested.", + "description": "Retrieves the requested node pool.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/nodePools/{nodePoolsId}", "httpMethod": "GET", "id": "container.projects.locations.clusters.nodePools.get", @@ -817,7 +891,7 @@ ] }, "rollback": { - "description": "Roll back the previously Aborted or Failed NodePool upgrade.\nThis will be an no-op if the last upgrade successfully completed.", + "description": "Rolls back a previously Aborted or Failed NodePool upgrade.\nThis makes no changes if the last upgrade successfully completed.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/nodePools/{nodePoolsId}:rollback", "httpMethod": "POST", "id": "container.projects.locations.clusters.nodePools.rollback", @@ -845,7 +919,7 @@ ] }, "setAutoscaling": { - "description": "Sets the autoscaling settings for a specific node pool.", + "description": "Sets the autoscaling settings for the specified node pool.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/nodePools/{nodePoolsId}:setAutoscaling", "httpMethod": "POST", "id": "container.projects.locations.clusters.nodePools.setAutoscaling", @@ -929,7 +1003,7 @@ ] }, "update": { - "description": "Updates the version and/or image type for a specific node pool.", + "description": "Updates the version and/or image type for the specified node pool.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/nodePools/{nodePoolsId}", "httpMethod": "PUT", "id": "container.projects.locations.clusters.nodePools.update", @@ -957,6 +1031,35 @@ ] } } + }, + "well-known": { + "methods": { + "getOpenid-configuration": { + "description": "Gets the OIDC discovery document for the cluster.\nSee the\n[OpenID Connect Discovery 1.0\nspecification](https://openid.net/specs/openid-connect-discovery-1_0.html)\nfor details.\nThis API is not yet intended for general use, and is not available for all\nclusters.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/.well-known/openid-configuration", + "httpMethod": "GET", + "id": "container.projects.locations.clusters.well-known.getOpenid-configuration", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "The cluster (project, location, cluster id) to get the discovery document\nfor. Specified in the format 'projects/*/locations/*/clusters/*'.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/.well-known/openid-configuration", + "response": { + "$ref": "GetOpenIDConfigResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } } } }, @@ -1072,7 +1175,7 @@ "zones": { "methods": { "getServerconfig": { - "description": "Returns configuration info about the Kubernetes Engine service.", + "description": "Returns configuration info about the Google Kubernetes Engine service.", "flatPath": "v1/projects/{projectId}/zones/{zone}/serverconfig", "httpMethod": "GET", "id": "container.projects.zones.getServerconfig", @@ -1082,7 +1185,7 @@ ], "parameters": { "name": { - "description": "The name (project and location) of the server config to get\nSpecified in the format 'projects/*/locations/*'.", + "description": "The name (project and location) of the server config to get,\nspecified in the format 'projects/*/locations/*'.", "location": "query", "type": "string" }, @@ -1194,7 +1297,7 @@ ] }, "create": { - "description": "Creates a cluster, consisting of the specified number and type of Google\nCompute Engine instances.\n\nBy default, the cluster is created in the project's\n[default network](/compute/docs/networks-and-firewalls#networks).\n\nOne firewall is added for the cluster. After cluster creation,\nthe cluster creates routes for each node to allow the containers\non that node to communicate with all other instances in the\ncluster.\n\nFinally, an entry is added to the project's global metadata indicating\nwhich CIDR range is being used by the cluster.", + "description": "Creates a cluster, consisting of the specified number and type of Google\nCompute Engine instances.\n\nBy default, the cluster is created in the project's\n[default network](/compute/docs/networks-and-firewalls#networks).\n\nOne firewall is added for the cluster. After cluster creation,\nthe Kubelet creates routes for each node to allow the containers\non that node to communicate with all other instances in the\ncluster.\n\nFinally, an entry is added to the project's global metadata indicating\nwhich CIDR range the cluster is using.", "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters", "httpMethod": "POST", "id": "container.projects.zones.clusters.create", @@ -1228,7 +1331,7 @@ ] }, "delete": { - "description": "Deletes the cluster, including the Kubernetes endpoint and all worker\nnodes.\n\nFirewalls and routes that were configured during cluster creation\nare also deleted.\n\nOther Google Compute Engine resources that might be in use by the cluster\n(e.g. load balancer resources) will not be deleted if they weren't present\nat the initial create time.", + "description": "Deletes the cluster, including the Kubernetes endpoint and all worker\nnodes.\n\nFirewalls and routes that were configured during cluster creation\nare also deleted.\n\nOther Google Compute Engine resources that might be in use by the cluster,\nsuch as load balancer resources, are not deleted if they weren't present\nwhen the cluster was initially created.", "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}", "httpMethod": "DELETE", "id": "container.projects.zones.clusters.delete", @@ -1637,7 +1740,7 @@ ] }, "setMasterAuth": { - "description": "Used to set master auth materials. Currently supports :-\nChanging the admin password for a specific cluster.\nThis can be either via password generation or explicitly set the password.", + "description": "Sets master auth materials. Currently supports changing the admin password\nor a specific cluster, either via password generation or explicitly setting\nthe password.", "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setMasterAuth", "httpMethod": "POST", "id": "container.projects.zones.clusters.setMasterAuth", @@ -1678,7 +1781,7 @@ ] }, "setNetworkPolicy": { - "description": "Enables/Disables Network Policy for a cluster.", + "description": "Enables or disables Network Policy for a cluster.", "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setNetworkPolicy", "httpMethod": "POST", "id": "container.projects.zones.clusters.setNetworkPolicy", @@ -1719,7 +1822,7 @@ ] }, "startIpRotation": { - "description": "Start master IP rotation.", + "description": "Starts master IP rotation.", "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:startIpRotation", "httpMethod": "POST", "id": "container.projects.zones.clusters.startIpRotation", @@ -1805,7 +1908,7 @@ "nodePools": { "methods": { "autoscaling": { - "description": "Sets the autoscaling settings for a specific node pool.", + "description": "Sets the autoscaling settings for the specified node pool.", "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/autoscaling", "httpMethod": "POST", "id": "container.projects.zones.clusters.nodePools.autoscaling", @@ -1944,7 +2047,7 @@ ] }, "get": { - "description": "Retrieves the node pool requested.", + "description": "Retrieves the requested node pool.", "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}", "httpMethod": "GET", "id": "container.projects.zones.clusters.nodePools.get", @@ -2037,7 +2140,7 @@ ] }, "rollback": { - "description": "Roll back the previously Aborted or Failed NodePool upgrade.\nThis will be an no-op if the last upgrade successfully completed.", + "description": "Rolls back a previously Aborted or Failed NodePool upgrade.\nThis makes no changes if the last upgrade successfully completed.", "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}:rollback", "httpMethod": "POST", "id": "container.projects.zones.clusters.nodePools.rollback", @@ -2181,7 +2284,7 @@ ] }, "update": { - "description": "Updates the version and/or image type for a specific node pool.", + "description": "Updates the version and/or image type for the specified node pool.", "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/update", "httpMethod": "POST", "id": "container.projects.zones.clusters.nodePools.update", @@ -2361,7 +2464,7 @@ } } }, - "revision": "20181109", + "revision": "20190319", "rootUrl": "https://container.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -2500,9 +2603,13 @@ "type": "integer" }, "currentNodeVersion": { - "description": "[Output only] Deprecated, use\n[NodePool.version](/kubernetes-engine/docs/reference/rest/v1/projects.zones.clusters.nodePool)\ninstead. The current version of the node software components. If they are\ncurrently at multiple versions because they're in the process of being\nupgraded, this reflects the minimum version of all nodes.", + "description": "[Output only] Deprecated, use\n[NodePools.version](/kubernetes-engine/docs/reference/rest/v1/projects.zones.clusters.nodePools)\ninstead. The current version of the node software components. If they are\ncurrently at multiple versions because they're in the process of being\nupgraded, this reflects the minimum version of all nodes.", "type": "string" }, + "defaultMaxPodsConstraint": { + "$ref": "MaxPodsConstraint", + "description": "The default constraint on the maximum number of pods that can be run\nsimultaneously on a node in the node pool of this cluster. Only honored\nif cluster created with IP Alias support." + }, "description": { "description": "An optional description of this cluster.", "type": "string" @@ -2511,6 +2618,10 @@ "description": "Kubernetes alpha features are enabled on this cluster. This includes alpha\nAPI groups (e.g. v1alpha1) and features that may not be production ready in\nthe kubernetes version of the master and nodes.\nThe cluster has no SLA for uptime and master/node upgrades are disabled.\nAlpha enabled clusters are automatically deleted thirty days after\ncreation.", "type": "boolean" }, + "enableTpu": { + "description": "Enable the ability to use Cloud TPUs in this cluster.", + "type": "boolean" + }, "endpoint": { "description": "[Output only] The IP address of this cluster's master endpoint.\nThe endpoint can be accessed from the internet at\n`https://username:password@endpoint/`.\n\nSee the `masterAuth` property of this resource for username and\npassword information.", "type": "string" @@ -2659,6 +2770,10 @@ "description": "The name of the Google Compute Engine\n[subnetwork](/compute/docs/subnetworks) to which the\ncluster is connected.", "type": "string" }, + "tpuIpv4CidrBlock": { + "description": "[Output only] The IP address range of the Cloud TPUs in this cluster, in\n[CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)\nnotation (e.g. `1.2.3.4/29`).", + "type": "string" + }, "zone": { "description": "[Output only] The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use location instead.", "type": "string" @@ -2806,6 +2921,70 @@ "properties": {}, "type": "object" }, + "GetJSONWebKeysResponse": { + "description": "GetJSONWebKeysResponse is a valid JSON Web Key Set as specififed in rfc 7517", + "id": "GetJSONWebKeysResponse", + "properties": { + "keys": { + "description": "The public component of the keys used by the cluster to sign token\nrequests.", + "items": { + "$ref": "Jwk" + }, + "type": "array" + } + }, + "type": "object" + }, + "GetOpenIDConfigResponse": { + "description": "GetOpenIDConfigResponse is an OIDC discovery document for the cluster.\nSee the OpenID Connect Discovery 1.0 specification for details.", + "id": "GetOpenIDConfigResponse", + "properties": { + "claims_supported": { + "description": "NOLINT", + "items": { + "type": "string" + }, + "type": "array" + }, + "grant_types": { + "description": "NOLINT", + "items": { + "type": "string" + }, + "type": "array" + }, + "id_token_signing_alg_values_supported": { + "description": "NOLINT", + "items": { + "type": "string" + }, + "type": "array" + }, + "issuer": { + "description": "NOLINT", + "type": "string" + }, + "jwks_uri": { + "description": "NOLINT", + "type": "string" + }, + "response_types_supported": { + "description": "NOLINT", + "items": { + "type": "string" + }, + "type": "array" + }, + "subject_types_supported": { + "description": "NOLINT", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "HorizontalPodAutoscaling": { "description": "Configuration options for the horizontal pod autoscaling feature, which\nincreases or decreases the number of replica pods a replication controller\nhas based on the resource usage of the existing pods.", "id": "HorizontalPodAutoscaling", @@ -2872,6 +3051,10 @@ "description": "A custom subnetwork name to be used if `create_subnetwork` is true. If\nthis field is empty, then an automatic name will be chosen for the new\nsubnetwork.", "type": "string" }, + "tpuIpv4CidrBlock": { + "description": "The IP address range of the Cloud TPUs in this cluster. If unspecified, a\nrange will be automatically chosen with the default size.\n\nThis field is only applicable when `use_ip_aliases` is true.\n\nIf unspecified, the range will use the default size.\n\nSet to /netmask (e.g. `/14`) to have a range chosen with a specific\nnetmask.\n\nSet to a\n[CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)\nnotation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g.\n`10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range\nto use.", + "type": "string" + }, "useIpAliases": { "description": "Whether alias IPs will be used for pod IPs in the cluster.", "type": "boolean" @@ -2879,6 +3062,49 @@ }, "type": "object" }, + "Jwk": { + "description": "Jwk is a JSON Web Key as specified in RFC 7517", + "id": "Jwk", + "properties": { + "alg": { + "description": "NOLINT", + "type": "string" + }, + "crv": { + "description": "NOLINT", + "type": "string" + }, + "e": { + "description": "NOLINT", + "type": "string" + }, + "kid": { + "description": "NOLINT", + "type": "string" + }, + "kty": { + "description": "NOLINT", + "type": "string" + }, + "n": { + "description": "Fields for RSA keys.\nNOLINT", + "type": "string" + }, + "use": { + "description": "NOLINT", + "type": "string" + }, + "x": { + "description": "Fields for ECDSA keys.\nNOLINT", + "type": "string" + }, + "y": { + "description": "NOLINT", + "type": "string" + } + }, + "type": "object" + }, "KubernetesDashboard": { "description": "Configuration for the Kubernetes Dashboard.", "id": "KubernetesDashboard", @@ -2957,6 +3183,24 @@ }, "type": "object" }, + "ListUsableSubnetworksResponse": { + "description": "ListUsableSubnetworksResponse is the response of\nListUsableSubnetworksRequest.", + "id": "ListUsableSubnetworksResponse", + "properties": { + "nextPageToken": { + "description": "This token allows you to get the next page of results for list requests.\nIf the number of results is larger than `page_size`, use the\n`next_page_token` as a value for the query parameter `page_token` in the\nnext request. The value will become empty when there are no more pages.", + "type": "string" + }, + "subnetworks": { + "description": "A list of usable subnetworks in the specified network project.", + "items": { + "$ref": "UsableSubnetwork" + }, + "type": "array" + } + }, + "type": "object" + }, "MaintenancePolicy": { "description": "MaintenancePolicy defines the maintenance policy to be used for the cluster.", "id": "MaintenancePolicy", @@ -3028,6 +3272,18 @@ }, "type": "object" }, + "MaxPodsConstraint": { + "description": "Constraints applied to pods.", + "id": "MaxPodsConstraint", + "properties": { + "maxPodsPerNode": { + "description": "Constraint enforced on the max num of pods per node.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, "NetworkConfig": { "description": "NetworkConfig reports the relative names of network \u0026 subnetwork.", "id": "NetworkConfig", @@ -3121,7 +3377,7 @@ "additionalProperties": { "type": "string" }, - "description": "The metadata key/value pairs assigned to instances in the cluster.\n\nKeys must conform to the regexp [a-zA-Z0-9-_]+ and be less than 128 bytes\nin length. These are reflected as part of a URL in the metadata server.\nAdditionally, to avoid ambiguity, keys must not conflict with any other\nmetadata keys for the project or be one of the reserved keys:\n \"cluster-location\"\n \"cluster-name\"\n \"cluster-uid\"\n \"configure-sh\"\n \"enable-os-login\"\n \"gci-update-strategy\"\n \"gci-ensure-gke-docker\"\n \"instance-template\"\n \"kube-env\"\n \"startup-script\"\n \"user-data\"\n\nValues are free-form strings, and only have meaning as interpreted by\nthe image running in the instance. The only restriction placed on them is\nthat each value's size must be less than or equal to 32 KB.\n\nThe total size of all keys and values must be less than 512 KB.", + "description": "The metadata key/value pairs assigned to instances in the cluster.\n\nKeys must conform to the regexp [a-zA-Z0-9-_]+ and be less than 128 bytes\nin length. These are reflected as part of a URL in the metadata server.\nAdditionally, to avoid ambiguity, keys must not conflict with any other\nmetadata keys for the project or be one of the reserved keys:\n \"cluster-location\"\n \"cluster-name\"\n \"cluster-uid\"\n \"configure-sh\"\n \"containerd-configure-sh\"\n \"enable-os-login\"\n \"gci-update-strategy\"\n \"gci-ensure-gke-docker\"\n \"instance-template\"\n \"kube-env\"\n \"startup-script\"\n \"user-data\"\n\nValues are free-form strings, and only have meaning as interpreted by\nthe image running in the instance. The only restriction placed on them is\nthat each value's size must be less than or equal to 32 KB.\n\nThe total size of all keys and values must be less than 512 KB.", "type": "object" }, "minCpuPlatform": { @@ -3214,6 +3470,10 @@ "$ref": "NodeManagement", "description": "NodeManagement configuration for this NodePool." }, + "maxPodsConstraint": { + "$ref": "MaxPodsConstraint", + "description": "The constraint on the maximum number of pods that can be run\nsimultaneously on a node in the node pool." + }, "name": { "description": "The name of the node pool.", "type": "string" @@ -4021,6 +4281,69 @@ } }, "type": "object" + }, + "UsableSubnetwork": { + "description": "UsableSubnetwork resource returns the subnetwork name, its associated network\nand the primary CIDR range.", + "id": "UsableSubnetwork", + "properties": { + "ipCidrRange": { + "description": "The range of internal addresses that are owned by this subnetwork.", + "type": "string" + }, + "network": { + "description": "Network Name.\nExample: projects/my-project/global/networks/my-network", + "type": "string" + }, + "secondaryIpRanges": { + "description": "Secondary IP ranges.", + "items": { + "$ref": "UsableSubnetworkSecondaryRange" + }, + "type": "array" + }, + "statusMessage": { + "description": "A human readable status message representing the reasons for cases where\nthe caller cannot use the secondary ranges under the subnet. For example if\nthe secondary_ip_ranges is empty due to a permission issue, an insufficient\npermission message will be given by status_message.", + "type": "string" + }, + "subnetwork": { + "description": "Subnetwork Name.\nExample: projects/my-project/regions/us-central1/subnetworks/my-subnet", + "type": "string" + } + }, + "type": "object" + }, + "UsableSubnetworkSecondaryRange": { + "description": "Secondary IP range of a usable subnetwork.", + "id": "UsableSubnetworkSecondaryRange", + "properties": { + "ipCidrRange": { + "description": "The range of IP addresses belonging to this subnetwork secondary range.", + "type": "string" + }, + "rangeName": { + "description": "The name associated with this subnetwork secondary range, used when adding\nan alias IP range to a VM instance.", + "type": "string" + }, + "status": { + "description": "This field is to determine the status of the secondary range programmably.", + "enum": [ + "UNKNOWN", + "UNUSED", + "IN_USE_SERVICE", + "IN_USE_SHAREABLE_POD", + "IN_USE_MANAGED_POD" + ], + "enumDescriptions": [ + "UNKNOWN is the zero value of the Status enum. It's not a valid status.", + "UNUSED denotes that this range is unclaimed by any cluster.", + "IN_USE_SERVICE denotes that this range is claimed by a cluster for\nservices. It cannot be used for other clusters.", + "IN_USE_SHAREABLE_POD denotes this range was created by the network admin\nand is currently claimed by a cluster for pods. It can only be used by\nother clusters as a pod range.", + "IN_USE_MANAGED_POD denotes this range was created by GKE and is claimed\nfor pods. It cannot be used for other clusters." + ], + "type": "string" + } + }, + "type": "object" } }, "servicePath": "", diff --git a/vendor/google.golang.org/api/container/v1/container-gen.go b/vendor/google.golang.org/api/container/v1/container-gen.go index 33719b12..d232035d 100644 --- a/vendor/google.golang.org/api/container/v1/container-gen.go +++ b/vendor/google.golang.org/api/container/v1/container-gen.go @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. All rights reserved. +// Copyright 2019 Google LLC. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. @@ -6,13 +6,35 @@ // Package container provides access to the Kubernetes Engine API. // -// See https://cloud.google.com/container-engine/ +// For product documentation, see: https://cloud.google.com/container-engine/ +// +// Creating a client // // Usage example: // // import "google.golang.org/api/container/v1" // ... -// containerService, err := container.New(oauthHttpClient) +// ctx := context.Background() +// containerService, err := container.NewService(ctx) +// +// In this example, Google Application Default Credentials are used for authentication. +// +// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// +// Other authentication options +// +// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// +// containerService, err := container.NewService(ctx, option.WithAPIKey("AIza...")) +// +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// +// config := &oauth2.Config{...} +// // ... +// token, err := config.Exchange(ctx, ...) +// containerService, err := container.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) +// +// See https://godoc.org/google.golang.org/api/option/ for details on options. package container // import "google.golang.org/api/container/v1" import ( @@ -29,6 +51,8 @@ import ( gensupport "google.golang.org/api/gensupport" googleapi "google.golang.org/api/googleapi" + option "google.golang.org/api/option" + htransport "google.golang.org/api/transport/http" ) // Always reference these packages, just in case the auto-generated code @@ -56,6 +80,32 @@ const ( CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" ) +// NewService creates a new Service. +func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { + scopesOption := option.WithScopes( + "https://www.googleapis.com/auth/cloud-platform", + ) + // NOTE: prepend, so we don't override user-specified scopes. + opts = append([]option.ClientOption{scopesOption}, opts...) + client, endpoint, err := htransport.NewClient(ctx, opts...) + if err != nil { + return nil, err + } + s, err := New(client) + if err != nil { + return nil, err + } + if endpoint != "" { + s.BasePath = endpoint + } + return s, nil +} + +// New creates a new Service. It uses the provided http.Client for requests. +// +// Deprecated: please use NewService instead. +// To provide a custom HTTP client, use option.WithHTTPClient. +// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. func New(client *http.Client) (*Service, error) { if client == nil { return nil, errors.New("client is nil") @@ -82,6 +132,7 @@ func (s *Service) userAgent() string { func NewProjectsService(s *Service) *ProjectsService { rs := &ProjectsService{s: s} + rs.Aggregated = NewProjectsAggregatedService(s) rs.Locations = NewProjectsLocationsService(s) rs.Zones = NewProjectsZonesService(s) return rs @@ -90,11 +141,34 @@ func NewProjectsService(s *Service) *ProjectsService { type ProjectsService struct { s *Service + Aggregated *ProjectsAggregatedService + Locations *ProjectsLocationsService Zones *ProjectsZonesService } +func NewProjectsAggregatedService(s *Service) *ProjectsAggregatedService { + rs := &ProjectsAggregatedService{s: s} + rs.UsableSubnetworks = NewProjectsAggregatedUsableSubnetworksService(s) + return rs +} + +type ProjectsAggregatedService struct { + s *Service + + UsableSubnetworks *ProjectsAggregatedUsableSubnetworksService +} + +func NewProjectsAggregatedUsableSubnetworksService(s *Service) *ProjectsAggregatedUsableSubnetworksService { + rs := &ProjectsAggregatedUsableSubnetworksService{s: s} + return rs +} + +type ProjectsAggregatedUsableSubnetworksService struct { + s *Service +} + func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { rs := &ProjectsLocationsService{s: s} rs.Clusters = NewProjectsLocationsClustersService(s) @@ -113,6 +187,7 @@ type ProjectsLocationsService struct { func NewProjectsLocationsClustersService(s *Service) *ProjectsLocationsClustersService { rs := &ProjectsLocationsClustersService{s: s} rs.NodePools = NewProjectsLocationsClustersNodePoolsService(s) + rs.WellKnown = NewProjectsLocationsClustersWellKnownService(s) return rs } @@ -120,6 +195,8 @@ type ProjectsLocationsClustersService struct { s *Service NodePools *ProjectsLocationsClustersNodePoolsService + + WellKnown *ProjectsLocationsClustersWellKnownService } func NewProjectsLocationsClustersNodePoolsService(s *Service) *ProjectsLocationsClustersNodePoolsService { @@ -131,6 +208,15 @@ type ProjectsLocationsClustersNodePoolsService struct { s *Service } +func NewProjectsLocationsClustersWellKnownService(s *Service) *ProjectsLocationsClustersWellKnownService { + rs := &ProjectsLocationsClustersWellKnownService{s: s} + return rs +} + +type ProjectsLocationsClustersWellKnownService struct { + s *Service +} + func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService { rs := &ProjectsLocationsOperationsService{s: s} return rs @@ -461,8 +547,8 @@ type Cluster struct { // CurrentNodeVersion: [Output only] Deprecated, // use - // [NodePool.version](/kubernetes-engine/docs/reference/rest/v1/proje - // cts.zones.clusters.nodePool) + // [NodePools.version](/kubernetes-engine/docs/reference/rest/v1/proj + // ects.zones.clusters.nodePools) // instead. The current version of the node software components. If they // are // currently at multiple versions because they're in the process of @@ -470,6 +556,13 @@ type Cluster struct { // upgraded, this reflects the minimum version of all nodes. CurrentNodeVersion string `json:"currentNodeVersion,omitempty"` + // DefaultMaxPodsConstraint: The default constraint on the maximum + // number of pods that can be run + // simultaneously on a node in the node pool of this cluster. Only + // honored + // if cluster created with IP Alias support. + DefaultMaxPodsConstraint *MaxPodsConstraint `json:"defaultMaxPodsConstraint,omitempty"` + // Description: An optional description of this cluster. Description string `json:"description,omitempty"` @@ -485,6 +578,9 @@ type Cluster struct { // creation. EnableKubernetesAlpha bool `json:"enableKubernetesAlpha,omitempty"` + // EnableTpu: Enable the ability to use Cloud TPUs in this cluster. + EnableTpu bool `json:"enableTpu,omitempty"` + // Endpoint: [Output only] The IP address of this cluster's master // endpoint. // The endpoint can be accessed from the internet @@ -714,6 +810,14 @@ type Cluster struct { // cluster is connected. Subnetwork string `json:"subnetwork,omitempty"` + // TpuIpv4CidrBlock: [Output only] The IP address range of the Cloud + // TPUs in this cluster, + // in + // [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) + // + // notation (e.g. `1.2.3.4/29`). + TpuIpv4CidrBlock string `json:"tpuIpv4CidrBlock,omitempty"` + // Zone: [Output only] The name of the Google Compute // Engine // [zone](/compute/docs/zones#available) in which the @@ -1074,6 +1178,94 @@ type Empty struct { googleapi.ServerResponse `json:"-"` } +// GetJSONWebKeysResponse: GetJSONWebKeysResponse is a valid JSON Web +// Key Set as specififed in rfc 7517 +type GetJSONWebKeysResponse struct { + // Keys: The public component of the keys used by the cluster to sign + // token + // requests. + Keys []*Jwk `json:"keys,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Keys") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Keys") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GetJSONWebKeysResponse) MarshalJSON() ([]byte, error) { + type NoMethod GetJSONWebKeysResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GetOpenIDConfigResponse: GetOpenIDConfigResponse is an OIDC discovery +// document for the cluster. +// See the OpenID Connect Discovery 1.0 specification for details. +type GetOpenIDConfigResponse struct { + // ClaimsSupported: NOLINT + ClaimsSupported []string `json:"claims_supported,omitempty"` + + // GrantTypes: NOLINT + GrantTypes []string `json:"grant_types,omitempty"` + + // IdTokenSigningAlgValuesSupported: NOLINT + IdTokenSigningAlgValuesSupported []string `json:"id_token_signing_alg_values_supported,omitempty"` + + // Issuer: NOLINT + Issuer string `json:"issuer,omitempty"` + + // JwksUri: NOLINT + JwksUri string `json:"jwks_uri,omitempty"` + + // ResponseTypesSupported: NOLINT + ResponseTypesSupported []string `json:"response_types_supported,omitempty"` + + // SubjectTypesSupported: NOLINT + SubjectTypesSupported []string `json:"subject_types_supported,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "ClaimsSupported") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ClaimsSupported") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GetOpenIDConfigResponse) MarshalJSON() ([]byte, error) { + type NoMethod GetOpenIDConfigResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // HorizontalPodAutoscaling: Configuration options for the horizontal // pod autoscaling feature, which // increases or decreases the number of replica pods a replication @@ -1262,6 +1454,29 @@ type IPAllocationPolicy struct { // subnetwork. SubnetworkName string `json:"subnetworkName,omitempty"` + // TpuIpv4CidrBlock: The IP address range of the Cloud TPUs in this + // cluster. If unspecified, a + // range will be automatically chosen with the default size. + // + // This field is only applicable when `use_ip_aliases` is true. + // + // If unspecified, the range will use the default size. + // + // Set to /netmask (e.g. `/14`) to have a range chosen with a + // specific + // netmask. + // + // Set to + // a + // [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) + // + // notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks + // (e.g. + // `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific + // range + // to use. + TpuIpv4CidrBlock string `json:"tpuIpv4CidrBlock,omitempty"` + // UseIpAliases: Whether alias IPs will be used for pod IPs in the // cluster. UseIpAliases bool `json:"useIpAliases,omitempty"` @@ -1290,6 +1505,60 @@ func (s *IPAllocationPolicy) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// Jwk: Jwk is a JSON Web Key as specified in RFC 7517 +type Jwk struct { + // Alg: NOLINT + Alg string `json:"alg,omitempty"` + + // Crv: NOLINT + Crv string `json:"crv,omitempty"` + + // E: NOLINT + E string `json:"e,omitempty"` + + // Kid: NOLINT + Kid string `json:"kid,omitempty"` + + // Kty: NOLINT + Kty string `json:"kty,omitempty"` + + // N: Fields for RSA keys. + // NOLINT + N string `json:"n,omitempty"` + + // Use: NOLINT + Use string `json:"use,omitempty"` + + // X: Fields for ECDSA keys. + // NOLINT + X string `json:"x,omitempty"` + + // Y: NOLINT + Y string `json:"y,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Alg") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Alg") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Jwk) MarshalJSON() ([]byte, error) { + type NoMethod Jwk + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // KubernetesDashboard: Configuration for the Kubernetes Dashboard. type KubernetesDashboard struct { // Disabled: Whether the Kubernetes Dashboard is enabled for this @@ -1467,6 +1736,51 @@ func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ListUsableSubnetworksResponse: ListUsableSubnetworksResponse is the +// response of +// ListUsableSubnetworksRequest. +type ListUsableSubnetworksResponse struct { + // NextPageToken: This token allows you to get the next page of results + // for list requests. + // If the number of results is larger than `page_size`, use + // the + // `next_page_token` as a value for the query parameter `page_token` in + // the + // next request. The value will become empty when there are no more + // pages. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Subnetworks: A list of usable subnetworks in the specified network + // project. + Subnetworks []*UsableSubnetwork `json:"subnetworks,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListUsableSubnetworksResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListUsableSubnetworksResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // MaintenancePolicy: MaintenancePolicy defines the maintenance policy // to be used for the cluster. type MaintenancePolicy struct { @@ -1636,6 +1950,35 @@ func (s *MasterAuthorizedNetworksConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// MaxPodsConstraint: Constraints applied to pods. +type MaxPodsConstraint struct { + // MaxPodsPerNode: Constraint enforced on the max num of pods per node. + MaxPodsPerNode int64 `json:"maxPodsPerNode,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "MaxPodsPerNode") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "MaxPodsPerNode") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *MaxPodsConstraint) MarshalJSON() ([]byte, error) { + type NoMethod MaxPodsConstraint + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // NetworkConfig: NetworkConfig reports the relative names of network & // subnetwork. type NetworkConfig struct { @@ -1824,6 +2167,7 @@ type NodeConfig struct { // "cluster-name" // "cluster-uid" // "configure-sh" + // "containerd-configure-sh" // "enable-os-login" // "gci-update-strategy" // "gci-ensure-gke-docker" @@ -2020,6 +2364,11 @@ type NodePool struct { // Management: NodeManagement configuration for this NodePool. Management *NodeManagement `json:"management,omitempty"` + // MaxPodsConstraint: The constraint on the maximum number of pods that + // can be run + // simultaneously on a node in the node pool. + MaxPodsConstraint *MaxPodsConstraint `json:"maxPodsConstraint,omitempty"` + // Name: The name of the node pool. Name string `json:"name,omitempty"` @@ -3450,6 +3799,327 @@ func (s *UpdateNodePoolRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// UsableSubnetwork: UsableSubnetwork resource returns the subnetwork +// name, its associated network +// and the primary CIDR range. +type UsableSubnetwork struct { + // IpCidrRange: The range of internal addresses that are owned by this + // subnetwork. + IpCidrRange string `json:"ipCidrRange,omitempty"` + + // Network: Network Name. + // Example: projects/my-project/global/networks/my-network + Network string `json:"network,omitempty"` + + // SecondaryIpRanges: Secondary IP ranges. + SecondaryIpRanges []*UsableSubnetworkSecondaryRange `json:"secondaryIpRanges,omitempty"` + + // StatusMessage: A human readable status message representing the + // reasons for cases where + // the caller cannot use the secondary ranges under the subnet. For + // example if + // the secondary_ip_ranges is empty due to a permission issue, an + // insufficient + // permission message will be given by status_message. + StatusMessage string `json:"statusMessage,omitempty"` + + // Subnetwork: Subnetwork Name. + // Example: + // projects/my-project/regions/us-central1/subnetworks/my-subnet + Subnetwork string `json:"subnetwork,omitempty"` + + // ForceSendFields is a list of field names (e.g. "IpCidrRange") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "IpCidrRange") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *UsableSubnetwork) MarshalJSON() ([]byte, error) { + type NoMethod UsableSubnetwork + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// UsableSubnetworkSecondaryRange: Secondary IP range of a usable +// subnetwork. +type UsableSubnetworkSecondaryRange struct { + // IpCidrRange: The range of IP addresses belonging to this subnetwork + // secondary range. + IpCidrRange string `json:"ipCidrRange,omitempty"` + + // RangeName: The name associated with this subnetwork secondary range, + // used when adding + // an alias IP range to a VM instance. + RangeName string `json:"rangeName,omitempty"` + + // Status: This field is to determine the status of the secondary range + // programmably. + // + // Possible values: + // "UNKNOWN" - UNKNOWN is the zero value of the Status enum. It's not + // a valid status. + // "UNUSED" - UNUSED denotes that this range is unclaimed by any + // cluster. + // "IN_USE_SERVICE" - IN_USE_SERVICE denotes that this range is + // claimed by a cluster for + // services. It cannot be used for other clusters. + // "IN_USE_SHAREABLE_POD" - IN_USE_SHAREABLE_POD denotes this range + // was created by the network admin + // and is currently claimed by a cluster for pods. It can only be used + // by + // other clusters as a pod range. + // "IN_USE_MANAGED_POD" - IN_USE_MANAGED_POD denotes this range was + // created by GKE and is claimed + // for pods. It cannot be used for other clusters. + Status string `json:"status,omitempty"` + + // ForceSendFields is a list of field names (e.g. "IpCidrRange") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "IpCidrRange") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *UsableSubnetworkSecondaryRange) MarshalJSON() ([]byte, error) { + type NoMethod UsableSubnetworkSecondaryRange + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// method id "container.projects.aggregated.usableSubnetworks.list": + +type ProjectsAggregatedUsableSubnetworksListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists subnetworks that are usable for creating clusters in a +// project. +func (r *ProjectsAggregatedUsableSubnetworksService) List(parent string) *ProjectsAggregatedUsableSubnetworksListCall { + c := &ProjectsAggregatedUsableSubnetworksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Filtering currently only +// supports equality on the networkProjectId and must +// be in the form: "networkProjectId=[PROJECTID]", where +// `networkProjectId` +// is the project which owns the listed subnetworks. This defaults to +// the +// parent project ID. +func (c *ProjectsAggregatedUsableSubnetworksListCall) Filter(filter string) *ProjectsAggregatedUsableSubnetworksListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The max number of +// results per page that should be returned. If the number +// of available results is larger than `page_size`, a `next_page_token` +// is +// returned which can be used to get the next page of results in +// subsequent +// requests. Acceptable values are 0 to 500, inclusive. (Default: 500) +func (c *ProjectsAggregatedUsableSubnetworksListCall) PageSize(pageSize int64) *ProjectsAggregatedUsableSubnetworksListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page +// token to use. Set this to the nextPageToken returned by +// previous list requests to get the next page of results. +func (c *ProjectsAggregatedUsableSubnetworksListCall) PageToken(pageToken string) *ProjectsAggregatedUsableSubnetworksListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsAggregatedUsableSubnetworksListCall) Fields(s ...googleapi.Field) *ProjectsAggregatedUsableSubnetworksListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsAggregatedUsableSubnetworksListCall) IfNoneMatch(entityTag string) *ProjectsAggregatedUsableSubnetworksListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsAggregatedUsableSubnetworksListCall) Context(ctx context.Context) *ProjectsAggregatedUsableSubnetworksListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsAggregatedUsableSubnetworksListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsAggregatedUsableSubnetworksListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/aggregated/usableSubnetworks") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "container.projects.aggregated.usableSubnetworks.list" call. +// Exactly one of *ListUsableSubnetworksResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *ListUsableSubnetworksResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsAggregatedUsableSubnetworksListCall) Do(opts ...googleapi.CallOption) (*ListUsableSubnetworksResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &ListUsableSubnetworksResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists subnetworks that are usable for creating clusters in a project.", + // "flatPath": "v1/projects/{projectsId}/aggregated/usableSubnetworks", + // "httpMethod": "GET", + // "id": "container.projects.aggregated.usableSubnetworks.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "Filtering currently only supports equality on the networkProjectId and must\nbe in the form: \"networkProjectId=[PROJECTID]\", where `networkProjectId`\nis the project which owns the listed subnetworks. This defaults to the\nparent project ID.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "The max number of results per page that should be returned. If the number\nof available results is larger than `page_size`, a `next_page_token` is\nreturned which can be used to get the next page of results in subsequent\nrequests. Acceptable values are 0 to 500, inclusive. (Default: 500)", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Specifies a page token to use. Set this to the nextPageToken returned by\nprevious list requests to get the next page of results.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "The parent project where subnetworks are usable.\nSpecified in the format 'projects/*'.", + // "location": "path", + // "pattern": "^projects/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/aggregated/usableSubnetworks", + // "response": { + // "$ref": "ListUsableSubnetworksResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsAggregatedUsableSubnetworksListCall) Pages(ctx context.Context, f func(*ListUsableSubnetworksResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + // method id "container.projects.locations.getServerConfig": type ProjectsLocationsGetServerConfigCall struct { @@ -3461,8 +4131,8 @@ type ProjectsLocationsGetServerConfigCall struct { header_ http.Header } -// GetServerConfig: Returns configuration info about the Kubernetes -// Engine service. +// GetServerConfig: Returns configuration info about the Google +// Kubernetes Engine service. func (r *ProjectsLocationsService) GetServerConfig(name string) *ProjectsLocationsGetServerConfigCall { c := &ProjectsLocationsGetServerConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -3587,7 +4257,7 @@ func (c *ProjectsLocationsGetServerConfigCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Returns configuration info about the Kubernetes Engine service.", + // "description": "Returns configuration info about the Google Kubernetes Engine service.", // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serverConfig", // "httpMethod": "GET", // "id": "container.projects.locations.getServerConfig", @@ -3596,7 +4266,7 @@ func (c *ProjectsLocationsGetServerConfigCall) Do(opts ...googleapi.CallOption) // ], // "parameters": { // "name": { - // "description": "The name (project and location) of the server config to get\nSpecified in the format 'projects/*/locations/*'.", + // "description": "The name (project and location) of the server config to get,\nspecified in the format 'projects/*/locations/*'.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, @@ -3783,14 +4453,14 @@ type ProjectsLocationsClustersCreateCall struct { // network](/compute/docs/networks-and-firewalls#networks). // // One firewall is added for the cluster. After cluster creation, -// the cluster creates routes for each node to allow the containers +// the Kubelet creates routes for each node to allow the containers // on that node to communicate with all other instances in // the // cluster. // // Finally, an entry is added to the project's global metadata // indicating -// which CIDR range is being used by the cluster. +// which CIDR range the cluster is using. func (r *ProjectsLocationsClustersService) Create(parent string, createclusterrequest *CreateClusterRequest) *ProjectsLocationsClustersCreateCall { c := &ProjectsLocationsClustersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -3888,7 +4558,7 @@ func (c *ProjectsLocationsClustersCreateCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Creates a cluster, consisting of the specified number and type of Google\nCompute Engine instances.\n\nBy default, the cluster is created in the project's\n[default network](/compute/docs/networks-and-firewalls#networks).\n\nOne firewall is added for the cluster. After cluster creation,\nthe cluster creates routes for each node to allow the containers\non that node to communicate with all other instances in the\ncluster.\n\nFinally, an entry is added to the project's global metadata indicating\nwhich CIDR range is being used by the cluster.", + // "description": "Creates a cluster, consisting of the specified number and type of Google\nCompute Engine instances.\n\nBy default, the cluster is created in the project's\n[default network](/compute/docs/networks-and-firewalls#networks).\n\nOne firewall is added for the cluster. After cluster creation,\nthe Kubelet creates routes for each node to allow the containers\non that node to communicate with all other instances in the\ncluster.\n\nFinally, an entry is added to the project's global metadata indicating\nwhich CIDR range the cluster is using.", // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters", // "httpMethod": "POST", // "id": "container.projects.locations.clusters.create", @@ -3936,10 +4606,10 @@ type ProjectsLocationsClustersDeleteCall struct { // are also deleted. // // Other Google Compute Engine resources that might be in use by the -// cluster -// (e.g. load balancer resources) will not be deleted if they weren't +// cluster, +// such as load balancer resources, are not deleted if they weren't // present -// at the initial create time. +// when the cluster was initially created. func (r *ProjectsLocationsClustersService) Delete(name string) *ProjectsLocationsClustersDeleteCall { c := &ProjectsLocationsClustersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -4061,7 +4731,7 @@ func (c *ProjectsLocationsClustersDeleteCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Deletes the cluster, including the Kubernetes endpoint and all worker\nnodes.\n\nFirewalls and routes that were configured during cluster creation\nare also deleted.\n\nOther Google Compute Engine resources that might be in use by the cluster\n(e.g. load balancer resources) will not be deleted if they weren't present\nat the initial create time.", + // "description": "Deletes the cluster, including the Kubernetes endpoint and all worker\nnodes.\n\nFirewalls and routes that were configured during cluster creation\nare also deleted.\n\nOther Google Compute Engine resources that might be in use by the cluster,\nsuch as load balancer resources, are not deleted if they weren't present\nwhen the cluster was initially created.", // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}", // "httpMethod": "DELETE", // "id": "container.projects.locations.clusters.delete", @@ -4291,6 +4961,154 @@ func (c *ProjectsLocationsClustersGetCall) Do(opts ...googleapi.CallOption) (*Cl } +// method id "container.projects.locations.clusters.getJwks": + +type ProjectsLocationsClustersGetJwksCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetJwks: Gets the public component of the cluster signing keys +// in +// JSON Web Key format. +// This API is not yet intended for general use, and is not available +// for all +// clusters. +func (r *ProjectsLocationsClustersService) GetJwks(parent string) *ProjectsLocationsClustersGetJwksCall { + c := &ProjectsLocationsClustersGetJwksCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsClustersGetJwksCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersGetJwksCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsClustersGetJwksCall) IfNoneMatch(entityTag string) *ProjectsLocationsClustersGetJwksCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsClustersGetJwksCall) Context(ctx context.Context) *ProjectsLocationsClustersGetJwksCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsClustersGetJwksCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersGetJwksCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/jwks") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "container.projects.locations.clusters.getJwks" call. +// Exactly one of *GetJSONWebKeysResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GetJSONWebKeysResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsClustersGetJwksCall) Do(opts ...googleapi.CallOption) (*GetJSONWebKeysResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GetJSONWebKeysResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the public component of the cluster signing keys in\nJSON Web Key format.\nThis API is not yet intended for general use, and is not available for all\nclusters.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/jwks", + // "httpMethod": "GET", + // "id": "container.projects.locations.clusters.getJwks", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "The cluster (project, location, cluster id) to get keys for. Specified in\nthe format 'projects/*/locations/*/clusters/*'.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/jwks", + // "response": { + // "$ref": "GetJSONWebKeysResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "container.projects.locations.clusters.list": type ProjectsLocationsClustersListCall struct { @@ -5174,11 +5992,11 @@ type ProjectsLocationsClustersSetMasterAuthCall struct { header_ http.Header } -// SetMasterAuth: Used to set master auth materials. Currently supports -// :- -// Changing the admin password for a specific cluster. -// This can be either via password generation or explicitly set the -// password. +// SetMasterAuth: Sets master auth materials. Currently supports +// changing the admin password +// or a specific cluster, either via password generation or explicitly +// setting +// the password. func (r *ProjectsLocationsClustersService) SetMasterAuth(name string, setmasterauthrequest *SetMasterAuthRequest) *ProjectsLocationsClustersSetMasterAuthCall { c := &ProjectsLocationsClustersSetMasterAuthCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -5276,7 +6094,7 @@ func (c *ProjectsLocationsClustersSetMasterAuthCall) Do(opts ...googleapi.CallOp } return ret, nil // { - // "description": "Used to set master auth materials. Currently supports :-\nChanging the admin password for a specific cluster.\nThis can be either via password generation or explicitly set the password.", + // "description": "Sets master auth materials. Currently supports changing the admin password\nor a specific cluster, either via password generation or explicitly setting\nthe password.", // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:setMasterAuth", // "httpMethod": "POST", // "id": "container.projects.locations.clusters.setMasterAuth", @@ -5456,7 +6274,7 @@ type ProjectsLocationsClustersSetNetworkPolicyCall struct { header_ http.Header } -// SetNetworkPolicy: Enables/Disables Network Policy for a cluster. +// SetNetworkPolicy: Enables or disables Network Policy for a cluster. func (r *ProjectsLocationsClustersService) SetNetworkPolicy(name string, setnetworkpolicyrequest *SetNetworkPolicyRequest) *ProjectsLocationsClustersSetNetworkPolicyCall { c := &ProjectsLocationsClustersSetNetworkPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -5554,7 +6372,7 @@ func (c *ProjectsLocationsClustersSetNetworkPolicyCall) Do(opts ...googleapi.Cal } return ret, nil // { - // "description": "Enables/Disables Network Policy for a cluster.", + // "description": "Enables or disables Network Policy for a cluster.", // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:setNetworkPolicy", // "httpMethod": "POST", // "id": "container.projects.locations.clusters.setNetworkPolicy", @@ -5734,7 +6552,7 @@ type ProjectsLocationsClustersStartIpRotationCall struct { header_ http.Header } -// StartIpRotation: Start master IP rotation. +// StartIpRotation: Starts master IP rotation. func (r *ProjectsLocationsClustersService) StartIpRotation(name string, startiprotationrequest *StartIPRotationRequest) *ProjectsLocationsClustersStartIpRotationCall { c := &ProjectsLocationsClustersStartIpRotationCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -5832,7 +6650,7 @@ func (c *ProjectsLocationsClustersStartIpRotationCall) Do(opts ...googleapi.Call } return ret, nil // { - // "description": "Start master IP rotation.", + // "description": "Starts master IP rotation.", // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:startIpRotation", // "httpMethod": "POST", // "id": "container.projects.locations.clusters.startIpRotation", @@ -6477,7 +7295,7 @@ type ProjectsLocationsClustersNodePoolsGetCall struct { header_ http.Header } -// Get: Retrieves the node pool requested. +// Get: Retrieves the requested node pool. func (r *ProjectsLocationsClustersNodePoolsService) Get(name string) *ProjectsLocationsClustersNodePoolsGetCall { c := &ProjectsLocationsClustersNodePoolsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -6620,7 +7438,7 @@ func (c *ProjectsLocationsClustersNodePoolsGetCall) Do(opts ...googleapi.CallOpt } return ret, nil // { - // "description": "Retrieves the node pool requested.", + // "description": "Retrieves the requested node pool.", // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/nodePools/{nodePoolsId}", // "httpMethod": "GET", // "id": "container.projects.locations.clusters.nodePools.get", @@ -6866,9 +7684,9 @@ type ProjectsLocationsClustersNodePoolsRollbackCall struct { header_ http.Header } -// Rollback: Roll back the previously Aborted or Failed NodePool +// Rollback: Rolls back a previously Aborted or Failed NodePool // upgrade. -// This will be an no-op if the last upgrade successfully completed. +// This makes no changes if the last upgrade successfully completed. func (r *ProjectsLocationsClustersNodePoolsService) Rollback(name string, rollbacknodepoolupgraderequest *RollbackNodePoolUpgradeRequest) *ProjectsLocationsClustersNodePoolsRollbackCall { c := &ProjectsLocationsClustersNodePoolsRollbackCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -6966,7 +7784,7 @@ func (c *ProjectsLocationsClustersNodePoolsRollbackCall) Do(opts ...googleapi.Ca } return ret, nil // { - // "description": "Roll back the previously Aborted or Failed NodePool upgrade.\nThis will be an no-op if the last upgrade successfully completed.", + // "description": "Rolls back a previously Aborted or Failed NodePool upgrade.\nThis makes no changes if the last upgrade successfully completed.", // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/nodePools/{nodePoolsId}:rollback", // "httpMethod": "POST", // "id": "container.projects.locations.clusters.nodePools.rollback", @@ -7007,7 +7825,7 @@ type ProjectsLocationsClustersNodePoolsSetAutoscalingCall struct { header_ http.Header } -// SetAutoscaling: Sets the autoscaling settings for a specific node +// SetAutoscaling: Sets the autoscaling settings for the specified node // pool. func (r *ProjectsLocationsClustersNodePoolsService) SetAutoscaling(name string, setnodepoolautoscalingrequest *SetNodePoolAutoscalingRequest) *ProjectsLocationsClustersNodePoolsSetAutoscalingCall { c := &ProjectsLocationsClustersNodePoolsSetAutoscalingCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -7106,7 +7924,7 @@ func (c *ProjectsLocationsClustersNodePoolsSetAutoscalingCall) Do(opts ...google } return ret, nil // { - // "description": "Sets the autoscaling settings for a specific node pool.", + // "description": "Sets the autoscaling settings for the specified node pool.", // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/nodePools/{nodePoolsId}:setAutoscaling", // "httpMethod": "POST", // "id": "container.projects.locations.clusters.nodePools.setAutoscaling", @@ -7425,7 +8243,7 @@ type ProjectsLocationsClustersNodePoolsUpdateCall struct { header_ http.Header } -// Update: Updates the version and/or image type for a specific node +// Update: Updates the version and/or image type for the specified node // pool. func (r *ProjectsLocationsClustersNodePoolsService) Update(name string, updatenodepoolrequest *UpdateNodePoolRequest) *ProjectsLocationsClustersNodePoolsUpdateCall { c := &ProjectsLocationsClustersNodePoolsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -7524,7 +8342,7 @@ func (c *ProjectsLocationsClustersNodePoolsUpdateCall) Do(opts ...googleapi.Call } return ret, nil // { - // "description": "Updates the version and/or image type for a specific node pool.", + // "description": "Updates the version and/or image type for the specified node pool.", // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/nodePools/{nodePoolsId}", // "httpMethod": "PUT", // "id": "container.projects.locations.clusters.nodePools.update", @@ -7554,6 +8372,159 @@ func (c *ProjectsLocationsClustersNodePoolsUpdateCall) Do(opts ...googleapi.Call } +// method id "container.projects.locations.clusters.well-known.getOpenid-configuration": + +type ProjectsLocationsClustersWellKnownGetOpenidConfigurationCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetOpenidConfiguration: Gets the OIDC discovery document for the +// cluster. +// See the +// [OpenID Connect Discovery +// 1.0 +// specification](https://openid.net/specs/openid-connect-discovery-1 +// _0.html) +// for details. +// This API is not yet intended for general use, and is not available +// for all +// clusters. +func (r *ProjectsLocationsClustersWellKnownService) GetOpenidConfiguration(parent string) *ProjectsLocationsClustersWellKnownGetOpenidConfigurationCall { + c := &ProjectsLocationsClustersWellKnownGetOpenidConfigurationCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsClustersWellKnownGetOpenidConfigurationCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersWellKnownGetOpenidConfigurationCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsClustersWellKnownGetOpenidConfigurationCall) IfNoneMatch(entityTag string) *ProjectsLocationsClustersWellKnownGetOpenidConfigurationCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsClustersWellKnownGetOpenidConfigurationCall) Context(ctx context.Context) *ProjectsLocationsClustersWellKnownGetOpenidConfigurationCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsClustersWellKnownGetOpenidConfigurationCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersWellKnownGetOpenidConfigurationCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/.well-known/openid-configuration") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "container.projects.locations.clusters.well-known.getOpenid-configuration" call. +// Exactly one of *GetOpenIDConfigResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GetOpenIDConfigResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsClustersWellKnownGetOpenidConfigurationCall) Do(opts ...googleapi.CallOption) (*GetOpenIDConfigResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GetOpenIDConfigResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the OIDC discovery document for the cluster.\nSee the\n[OpenID Connect Discovery 1.0\nspecification](https://openid.net/specs/openid-connect-discovery-1_0.html)\nfor details.\nThis API is not yet intended for general use, and is not available for all\nclusters.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/.well-known/openid-configuration", + // "httpMethod": "GET", + // "id": "container.projects.locations.clusters.well-known.getOpenid-configuration", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "The cluster (project, location, cluster id) to get the discovery document\nfor. Specified in the format 'projects/*/locations/*/clusters/*'.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/.well-known/openid-configuration", + // "response": { + // "$ref": "GetOpenIDConfigResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "container.projects.locations.operations.cancel": type ProjectsLocationsOperationsCancelCall struct { @@ -8069,8 +9040,8 @@ type ProjectsZonesGetServerconfigCall struct { header_ http.Header } -// GetServerconfig: Returns configuration info about the Kubernetes -// Engine service. +// GetServerconfig: Returns configuration info about the Google +// Kubernetes Engine service. func (r *ProjectsZonesService) GetServerconfig(projectId string, zone string) *ProjectsZonesGetServerconfigCall { c := &ProjectsZonesGetServerconfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.projectId = projectId @@ -8079,8 +9050,8 @@ func (r *ProjectsZonesService) GetServerconfig(projectId string, zone string) *P } // Name sets the optional parameter "name": The name (project and -// location) of the server config to get -// Specified in the format 'projects/*/locations/*'. +// location) of the server config to get, +// specified in the format 'projects/*/locations/*'. func (c *ProjectsZonesGetServerconfigCall) Name(name string) *ProjectsZonesGetServerconfigCall { c.urlParams_.Set("name", name) return c @@ -8185,7 +9156,7 @@ func (c *ProjectsZonesGetServerconfigCall) Do(opts ...googleapi.CallOption) (*Se } return ret, nil // { - // "description": "Returns configuration info about the Kubernetes Engine service.", + // "description": "Returns configuration info about the Google Kubernetes Engine service.", // "flatPath": "v1/projects/{projectId}/zones/{zone}/serverconfig", // "httpMethod": "GET", // "id": "container.projects.zones.getServerconfig", @@ -8195,7 +9166,7 @@ func (c *ProjectsZonesGetServerconfigCall) Do(opts ...googleapi.CallOption) (*Se // ], // "parameters": { // "name": { - // "description": "The name (project and location) of the server config to get\nSpecified in the format 'projects/*/locations/*'.", + // "description": "The name (project and location) of the server config to get,\nspecified in the format 'projects/*/locations/*'.", // "location": "query", // "type": "string" // }, @@ -8560,14 +9531,14 @@ type ProjectsZonesClustersCreateCall struct { // network](/compute/docs/networks-and-firewalls#networks). // // One firewall is added for the cluster. After cluster creation, -// the cluster creates routes for each node to allow the containers +// the Kubelet creates routes for each node to allow the containers // on that node to communicate with all other instances in // the // cluster. // // Finally, an entry is added to the project's global metadata // indicating -// which CIDR range is being used by the cluster. +// which CIDR range the cluster is using. func (r *ProjectsZonesClustersService) Create(projectId string, zone string, createclusterrequest *CreateClusterRequest) *ProjectsZonesClustersCreateCall { c := &ProjectsZonesClustersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.projectId = projectId @@ -8667,7 +9638,7 @@ func (c *ProjectsZonesClustersCreateCall) Do(opts ...googleapi.CallOption) (*Ope } return ret, nil // { - // "description": "Creates a cluster, consisting of the specified number and type of Google\nCompute Engine instances.\n\nBy default, the cluster is created in the project's\n[default network](/compute/docs/networks-and-firewalls#networks).\n\nOne firewall is added for the cluster. After cluster creation,\nthe cluster creates routes for each node to allow the containers\non that node to communicate with all other instances in the\ncluster.\n\nFinally, an entry is added to the project's global metadata indicating\nwhich CIDR range is being used by the cluster.", + // "description": "Creates a cluster, consisting of the specified number and type of Google\nCompute Engine instances.\n\nBy default, the cluster is created in the project's\n[default network](/compute/docs/networks-and-firewalls#networks).\n\nOne firewall is added for the cluster. After cluster creation,\nthe Kubelet creates routes for each node to allow the containers\non that node to communicate with all other instances in the\ncluster.\n\nFinally, an entry is added to the project's global metadata indicating\nwhich CIDR range the cluster is using.", // "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters", // "httpMethod": "POST", // "id": "container.projects.zones.clusters.create", @@ -8723,10 +9694,10 @@ type ProjectsZonesClustersDeleteCall struct { // are also deleted. // // Other Google Compute Engine resources that might be in use by the -// cluster -// (e.g. load balancer resources) will not be deleted if they weren't +// cluster, +// such as load balancer resources, are not deleted if they weren't // present -// at the initial create time. +// when the cluster was initially created. func (r *ProjectsZonesClustersService) Delete(projectId string, zone string, clusterId string) *ProjectsZonesClustersDeleteCall { c := &ProjectsZonesClustersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.projectId = projectId @@ -8830,7 +9801,7 @@ func (c *ProjectsZonesClustersDeleteCall) Do(opts ...googleapi.CallOption) (*Ope } return ret, nil // { - // "description": "Deletes the cluster, including the Kubernetes endpoint and all worker\nnodes.\n\nFirewalls and routes that were configured during cluster creation\nare also deleted.\n\nOther Google Compute Engine resources that might be in use by the cluster\n(e.g. load balancer resources) will not be deleted if they weren't present\nat the initial create time.", + // "description": "Deletes the cluster, including the Kubernetes endpoint and all worker\nnodes.\n\nFirewalls and routes that were configured during cluster creation\nare also deleted.\n\nOther Google Compute Engine resources that might be in use by the cluster,\nsuch as load balancer resources, are not deleted if they weren't present\nwhen the cluster was initially created.", // "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}", // "httpMethod": "DELETE", // "id": "container.projects.zones.clusters.delete", @@ -10338,11 +11309,11 @@ type ProjectsZonesClustersSetMasterAuthCall struct { header_ http.Header } -// SetMasterAuth: Used to set master auth materials. Currently supports -// :- -// Changing the admin password for a specific cluster. -// This can be either via password generation or explicitly set the -// password. +// SetMasterAuth: Sets master auth materials. Currently supports +// changing the admin password +// or a specific cluster, either via password generation or explicitly +// setting +// the password. func (r *ProjectsZonesClustersService) SetMasterAuth(projectId string, zone string, clusterId string, setmasterauthrequest *SetMasterAuthRequest) *ProjectsZonesClustersSetMasterAuthCall { c := &ProjectsZonesClustersSetMasterAuthCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.projectId = projectId @@ -10444,7 +11415,7 @@ func (c *ProjectsZonesClustersSetMasterAuthCall) Do(opts ...googleapi.CallOption } return ret, nil // { - // "description": "Used to set master auth materials. Currently supports :-\nChanging the admin password for a specific cluster.\nThis can be either via password generation or explicitly set the password.", + // "description": "Sets master auth materials. Currently supports changing the admin password\nor a specific cluster, either via password generation or explicitly setting\nthe password.", // "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setMasterAuth", // "httpMethod": "POST", // "id": "container.projects.zones.clusters.setMasterAuth", @@ -10500,7 +11471,7 @@ type ProjectsZonesClustersSetNetworkPolicyCall struct { header_ http.Header } -// SetNetworkPolicy: Enables/Disables Network Policy for a cluster. +// SetNetworkPolicy: Enables or disables Network Policy for a cluster. func (r *ProjectsZonesClustersService) SetNetworkPolicy(projectId string, zone string, clusterId string, setnetworkpolicyrequest *SetNetworkPolicyRequest) *ProjectsZonesClustersSetNetworkPolicyCall { c := &ProjectsZonesClustersSetNetworkPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.projectId = projectId @@ -10602,7 +11573,7 @@ func (c *ProjectsZonesClustersSetNetworkPolicyCall) Do(opts ...googleapi.CallOpt } return ret, nil // { - // "description": "Enables/Disables Network Policy for a cluster.", + // "description": "Enables or disables Network Policy for a cluster.", // "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setNetworkPolicy", // "httpMethod": "POST", // "id": "container.projects.zones.clusters.setNetworkPolicy", @@ -10658,7 +11629,7 @@ type ProjectsZonesClustersStartIpRotationCall struct { header_ http.Header } -// StartIpRotation: Start master IP rotation. +// StartIpRotation: Starts master IP rotation. func (r *ProjectsZonesClustersService) StartIpRotation(projectId string, zone string, clusterId string, startiprotationrequest *StartIPRotationRequest) *ProjectsZonesClustersStartIpRotationCall { c := &ProjectsZonesClustersStartIpRotationCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.projectId = projectId @@ -10760,7 +11731,7 @@ func (c *ProjectsZonesClustersStartIpRotationCall) Do(opts ...googleapi.CallOpti } return ret, nil // { - // "description": "Start master IP rotation.", + // "description": "Starts master IP rotation.", // "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:startIpRotation", // "httpMethod": "POST", // "id": "container.projects.zones.clusters.startIpRotation", @@ -10975,7 +11946,8 @@ type ProjectsZonesClustersNodePoolsAutoscalingCall struct { header_ http.Header } -// Autoscaling: Sets the autoscaling settings for a specific node pool. +// Autoscaling: Sets the autoscaling settings for the specified node +// pool. func (r *ProjectsZonesClustersNodePoolsService) Autoscaling(projectId string, zone string, clusterId string, nodePoolId string, setnodepoolautoscalingrequest *SetNodePoolAutoscalingRequest) *ProjectsZonesClustersNodePoolsAutoscalingCall { c := &ProjectsZonesClustersNodePoolsAutoscalingCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.projectId = projectId @@ -11079,7 +12051,7 @@ func (c *ProjectsZonesClustersNodePoolsAutoscalingCall) Do(opts ...googleapi.Cal } return ret, nil // { - // "description": "Sets the autoscaling settings for a specific node pool.", + // "description": "Sets the autoscaling settings for the specified node pool.", // "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/autoscaling", // "httpMethod": "POST", // "id": "container.projects.zones.clusters.nodePools.autoscaling", @@ -11474,7 +12446,7 @@ type ProjectsZonesClustersNodePoolsGetCall struct { header_ http.Header } -// Get: Retrieves the node pool requested. +// Get: Retrieves the requested node pool. func (r *ProjectsZonesClustersNodePoolsService) Get(projectId string, zone string, clusterId string, nodePoolId string) *ProjectsZonesClustersNodePoolsGetCall { c := &ProjectsZonesClustersNodePoolsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.projectId = projectId @@ -11595,7 +12567,7 @@ func (c *ProjectsZonesClustersNodePoolsGetCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Retrieves the node pool requested.", + // "description": "Retrieves the requested node pool.", // "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}", // "httpMethod": "GET", // "id": "container.projects.zones.clusters.nodePools.get", @@ -11836,9 +12808,9 @@ type ProjectsZonesClustersNodePoolsRollbackCall struct { header_ http.Header } -// Rollback: Roll back the previously Aborted or Failed NodePool +// Rollback: Rolls back a previously Aborted or Failed NodePool // upgrade. -// This will be an no-op if the last upgrade successfully completed. +// This makes no changes if the last upgrade successfully completed. func (r *ProjectsZonesClustersNodePoolsService) Rollback(projectId string, zone string, clusterId string, nodePoolId string, rollbacknodepoolupgraderequest *RollbackNodePoolUpgradeRequest) *ProjectsZonesClustersNodePoolsRollbackCall { c := &ProjectsZonesClustersNodePoolsRollbackCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.projectId = projectId @@ -11942,7 +12914,7 @@ func (c *ProjectsZonesClustersNodePoolsRollbackCall) Do(opts ...googleapi.CallOp } return ret, nil // { - // "description": "Roll back the previously Aborted or Failed NodePool upgrade.\nThis will be an no-op if the last upgrade successfully completed.", + // "description": "Rolls back a previously Aborted or Failed NodePool upgrade.\nThis makes no changes if the last upgrade successfully completed.", // "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}:rollback", // "httpMethod": "POST", // "id": "container.projects.zones.clusters.nodePools.rollback", @@ -12342,7 +13314,7 @@ type ProjectsZonesClustersNodePoolsUpdateCall struct { header_ http.Header } -// Update: Updates the version and/or image type for a specific node +// Update: Updates the version and/or image type for the specified node // pool. func (r *ProjectsZonesClustersNodePoolsService) Update(projectId string, zone string, clusterId string, nodePoolId string, updatenodepoolrequest *UpdateNodePoolRequest) *ProjectsZonesClustersNodePoolsUpdateCall { c := &ProjectsZonesClustersNodePoolsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -12447,7 +13419,7 @@ func (c *ProjectsZonesClustersNodePoolsUpdateCall) Do(opts ...googleapi.CallOpti } return ret, nil // { - // "description": "Updates the version and/or image type for a specific node pool.", + // "description": "Updates the version and/or image type for the specified node pool.", // "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/update", // "httpMethod": "POST", // "id": "container.projects.zones.clusters.nodePools.update", diff --git a/vendor/google.golang.org/api/container/v1beta1/container-api.json b/vendor/google.golang.org/api/container/v1beta1/container-api.json index 94f13f9f..14962d5c 100644 --- a/vendor/google.golang.org/api/container/v1beta1/container-api.json +++ b/vendor/google.golang.org/api/container/v1beta1/container-api.json @@ -111,7 +111,7 @@ "usableSubnetworks": { "methods": { "list": { - "description": "Lists subnetworks that are usable for creating clusters in a project.", + "description": "Lists subnetworks that can be used for creating clusters in a project.", "flatPath": "v1beta1/projects/{projectsId}/aggregated/usableSubnetworks", "httpMethod": "GET", "id": "container.projects.aggregated.usableSubnetworks.list", @@ -158,7 +158,7 @@ "locations": { "methods": { "getServerConfig": { - "description": "Returns configuration info about the Kubernetes Engine service.", + "description": "Returns configuration info about the Google Kubernetes Engine service.", "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/serverConfig", "httpMethod": "GET", "id": "container.projects.locations.getServerConfig", @@ -167,7 +167,7 @@ ], "parameters": { "name": { - "description": "The name (project and location) of the server config to get\nSpecified in the format 'projects/*/locations/*'.", + "description": "The name (project and location) of the server config to get,\nspecified in the format 'projects/*/locations/*'.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+$", "required": true, @@ -193,7 +193,7 @@ ] }, "list": { - "description": "Used to fetch locations that offer GKE.", + "description": "Fetches locations that offer Google Kubernetes Engine.", "flatPath": "v1beta1/projects/{projectsId}/locations", "httpMethod": "GET", "id": "container.projects.locations.list", @@ -250,7 +250,7 @@ ] }, "create": { - "description": "Creates a cluster, consisting of the specified number and type of Google\nCompute Engine instances.\n\nBy default, the cluster is created in the project's\n[default network](/compute/docs/networks-and-firewalls#networks).\n\nOne firewall is added for the cluster. After cluster creation,\nthe cluster creates routes for each node to allow the containers\non that node to communicate with all other instances in the\ncluster.\n\nFinally, an entry is added to the project's global metadata indicating\nwhich CIDR range is being used by the cluster.", + "description": "Creates a cluster, consisting of the specified number and type of Google\nCompute Engine instances.\n\nBy default, the cluster is created in the project's\n[default network](/compute/docs/networks-and-firewalls#networks).\n\nOne firewall is added for the cluster. After cluster creation,\nthe Kubelet creates routes for each node to allow the containers\non that node to communicate with all other instances in the\ncluster.\n\nFinally, an entry is added to the project's global metadata indicating\nwhich CIDR range the cluster is using.", "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters", "httpMethod": "POST", "id": "container.projects.locations.clusters.create", @@ -278,7 +278,7 @@ ] }, "delete": { - "description": "Deletes the cluster, including the Kubernetes endpoint and all worker\nnodes.\n\nFirewalls and routes that were configured during cluster creation\nare also deleted.\n\nOther Google Compute Engine resources that might be in use by the cluster\n(e.g. load balancer resources) will not be deleted if they weren't present\nat the initial create time.", + "description": "Deletes the cluster, including the Kubernetes endpoint and all worker\nnodes.\n\nFirewalls and routes that were configured during cluster creation\nare also deleted.\n\nOther Google Compute Engine resources that might be in use by the cluster,\nsuch as load balancer resources, are not deleted if they weren't present\nwhen the cluster was initially created.", "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}", "httpMethod": "DELETE", "id": "container.projects.locations.clusters.delete", @@ -357,6 +357,31 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "getJwks": { + "description": "Gets the public component of the cluster signing keys in\nJSON Web Key format.\nThis API is not yet intended for general use, and is not available for all\nclusters.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/jwks", + "httpMethod": "GET", + "id": "container.projects.locations.clusters.getJwks", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "The cluster (project, location, cluster id) to get keys for. Specified in\nthe format 'projects/*/locations/*/clusters/*'.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+parent}/jwks", + "response": { + "$ref": "GetJSONWebKeysResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "list": { "description": "Lists all clusters owned by a project in either the specified zone or all\nzones.", "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters", @@ -533,7 +558,7 @@ ] }, "setMasterAuth": { - "description": "Used to set master auth materials. Currently supports :-\nChanging the admin password for a specific cluster.\nThis can be either via password generation or explicitly set.\nModify basic_auth.csv and reset the K8S API server.", + "description": "Sets master auth materials. Currently supports changing the admin password\nor a specific cluster, either via password generation or explicitly setting\nthe password.", "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:setMasterAuth", "httpMethod": "POST", "id": "container.projects.locations.clusters.setMasterAuth", @@ -589,7 +614,7 @@ ] }, "setNetworkPolicy": { - "description": "Enables/Disables Network Policy for a cluster.", + "description": "Enables or disables Network Policy for a cluster.", "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:setNetworkPolicy", "httpMethod": "POST", "id": "container.projects.locations.clusters.setNetworkPolicy", @@ -645,7 +670,7 @@ ] }, "startIpRotation": { - "description": "Start master IP rotation.", + "description": "Starts master IP rotation.", "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:startIpRotation", "httpMethod": "POST", "id": "container.projects.locations.clusters.startIpRotation", @@ -806,7 +831,7 @@ ] }, "get": { - "description": "Retrieves the node pool requested.", + "description": "Retrieves the requested node pool.", "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/nodePools/{nodePoolsId}", "httpMethod": "GET", "id": "container.projects.locations.clusters.nodePools.get", @@ -891,7 +916,7 @@ ] }, "rollback": { - "description": "Roll back the previously Aborted or Failed NodePool upgrade.\nThis will be an no-op if the last upgrade successfully completed.", + "description": "Rolls back a previously Aborted or Failed NodePool upgrade.\nThis makes no changes if the last upgrade successfully completed.", "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/nodePools/{nodePoolsId}:rollback", "httpMethod": "POST", "id": "container.projects.locations.clusters.nodePools.rollback", @@ -1031,6 +1056,35 @@ ] } } + }, + "well-known": { + "methods": { + "getOpenid-configuration": { + "description": "Gets the OIDC discovery document for the cluster.\nSee the\n[OpenID Connect Discovery 1.0\nspecification](https://openid.net/specs/openid-connect-discovery-1_0.html)\nfor details.\nThis API is not yet intended for general use, and is not available for all\nclusters.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/.well-known/openid-configuration", + "httpMethod": "GET", + "id": "container.projects.locations.clusters.well-known.getOpenid-configuration", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "The cluster (project, location, cluster id) to get the discovery document\nfor. Specified in the format 'projects/*/locations/*/clusters/*'.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+parent}/.well-known/openid-configuration", + "response": { + "$ref": "GetOpenIDConfigResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } } } }, @@ -1105,7 +1159,7 @@ ] }, "list": { - "description": "Lists all operations in a project in a specific zone or all zones.", + "description": "Lists all operations in a project in the specified zone or all zones.", "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/operations", "httpMethod": "GET", "id": "container.projects.locations.operations.list", @@ -1146,7 +1200,7 @@ "zones": { "methods": { "getServerconfig": { - "description": "Returns configuration info about the Kubernetes Engine service.", + "description": "Returns configuration info about the Google Kubernetes Engine service.", "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/serverconfig", "httpMethod": "GET", "id": "container.projects.zones.getServerconfig", @@ -1156,7 +1210,7 @@ ], "parameters": { "name": { - "description": "The name (project and location) of the server config to get\nSpecified in the format 'projects/*/locations/*'.", + "description": "The name (project and location) of the server config to get,\nspecified in the format 'projects/*/locations/*'.", "location": "query", "type": "string" }, @@ -1268,7 +1322,7 @@ ] }, "create": { - "description": "Creates a cluster, consisting of the specified number and type of Google\nCompute Engine instances.\n\nBy default, the cluster is created in the project's\n[default network](/compute/docs/networks-and-firewalls#networks).\n\nOne firewall is added for the cluster. After cluster creation,\nthe cluster creates routes for each node to allow the containers\non that node to communicate with all other instances in the\ncluster.\n\nFinally, an entry is added to the project's global metadata indicating\nwhich CIDR range is being used by the cluster.", + "description": "Creates a cluster, consisting of the specified number and type of Google\nCompute Engine instances.\n\nBy default, the cluster is created in the project's\n[default network](/compute/docs/networks-and-firewalls#networks).\n\nOne firewall is added for the cluster. After cluster creation,\nthe Kubelet creates routes for each node to allow the containers\non that node to communicate with all other instances in the\ncluster.\n\nFinally, an entry is added to the project's global metadata indicating\nwhich CIDR range the cluster is using.", "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters", "httpMethod": "POST", "id": "container.projects.zones.clusters.create", @@ -1302,7 +1356,7 @@ ] }, "delete": { - "description": "Deletes the cluster, including the Kubernetes endpoint and all worker\nnodes.\n\nFirewalls and routes that were configured during cluster creation\nare also deleted.\n\nOther Google Compute Engine resources that might be in use by the cluster\n(e.g. load balancer resources) will not be deleted if they weren't present\nat the initial create time.", + "description": "Deletes the cluster, including the Kubernetes endpoint and all worker\nnodes.\n\nFirewalls and routes that were configured during cluster creation\nare also deleted.\n\nOther Google Compute Engine resources that might be in use by the cluster,\nsuch as load balancer resources, are not deleted if they weren't present\nwhen the cluster was initially created.", "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}", "httpMethod": "DELETE", "id": "container.projects.zones.clusters.delete", @@ -1711,7 +1765,7 @@ ] }, "setMasterAuth": { - "description": "Used to set master auth materials. Currently supports :-\nChanging the admin password for a specific cluster.\nThis can be either via password generation or explicitly set.\nModify basic_auth.csv and reset the K8S API server.", + "description": "Sets master auth materials. Currently supports changing the admin password\nor a specific cluster, either via password generation or explicitly setting\nthe password.", "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setMasterAuth", "httpMethod": "POST", "id": "container.projects.zones.clusters.setMasterAuth", @@ -1752,7 +1806,7 @@ ] }, "setNetworkPolicy": { - "description": "Enables/Disables Network Policy for a cluster.", + "description": "Enables or disables Network Policy for a cluster.", "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setNetworkPolicy", "httpMethod": "POST", "id": "container.projects.zones.clusters.setNetworkPolicy", @@ -1793,7 +1847,7 @@ ] }, "startIpRotation": { - "description": "Start master IP rotation.", + "description": "Starts master IP rotation.", "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:startIpRotation", "httpMethod": "POST", "id": "container.projects.zones.clusters.startIpRotation", @@ -2018,7 +2072,7 @@ ] }, "get": { - "description": "Retrieves the node pool requested.", + "description": "Retrieves the requested node pool.", "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}", "httpMethod": "GET", "id": "container.projects.zones.clusters.nodePools.get", @@ -2111,7 +2165,7 @@ ] }, "rollback": { - "description": "Roll back the previously Aborted or Failed NodePool upgrade.\nThis will be an no-op if the last upgrade successfully completed.", + "description": "Rolls back a previously Aborted or Failed NodePool upgrade.\nThis makes no changes if the last upgrade successfully completed.", "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}:rollback", "httpMethod": "POST", "id": "container.projects.zones.clusters.nodePools.rollback", @@ -2393,7 +2447,7 @@ ] }, "list": { - "description": "Lists all operations in a project in a specific zone or all zones.", + "description": "Lists all operations in a project in the specified zone or all zones.", "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/operations", "httpMethod": "GET", "id": "container.projects.zones.operations.list", @@ -2435,7 +2489,7 @@ } } }, - "revision": "20181113", + "revision": "20190319", "rootUrl": "https://container.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -2485,6 +2539,21 @@ }, "type": "object" }, + "AuthenticatorGroupsConfig": { + "description": "Configuration for returning group information from authenticators.", + "id": "AuthenticatorGroupsConfig", + "properties": { + "enabled": { + "description": "Whether this cluster should return group membership lookups\nduring authentication using a group of security groups.", + "type": "boolean" + }, + "securityGroup": { + "description": "The name of the security group-of-groups to be used. Only relevant\nif enabled = true.", + "type": "string" + } + }, + "type": "object" + }, "AutoUpgradeOptions": { "description": "AutoUpgradeOptions defines the set of options for the user to control how\nthe Auto Upgrades will proceed.", "id": "AutoUpgradeOptions", @@ -2590,6 +2659,10 @@ "$ref": "AddonsConfig", "description": "Configurations for the various addons available to run in the cluster." }, + "authenticatorGroupsConfig": { + "$ref": "AuthenticatorGroupsConfig", + "description": "Configuration controlling RBAC group membership information." + }, "autoscaling": { "$ref": "ClusterAutoscaling", "description": "Cluster-level autoscaling configuration." @@ -2626,6 +2699,10 @@ "description": "[Output only] Deprecated, use\n[NodePool.version](/kubernetes-engine/docs/reference/rest/v1beta1/projects.zones.clusters.nodePool)\ninstead. The current version of the node software components.\nIf they are currently at multiple versions because they're in the process\nof being upgraded, this reflects the minimum version of all nodes.", "type": "string" }, + "databaseEncryption": { + "$ref": "DatabaseEncryption", + "description": "Configuration of etcd encryption." + }, "defaultMaxPodsConstraint": { "$ref": "MaxPodsConstraint", "description": "The default constraint on the maximum number of pods that can be run\nsimultaneously on a node in the node pool of this cluster. Only honored\nif cluster created with IP Alias support." @@ -2855,10 +2932,18 @@ "$ref": "ClusterAutoscaling", "description": "Cluster-level autoscaling configuration." }, + "desiredDatabaseEncryption": { + "$ref": "DatabaseEncryption", + "description": "Configuration of etcd encryption." + }, "desiredImageType": { "description": "The desired image type for the node pool.\nNOTE: Set the \"desired_node_pool\" field as well.", "type": "string" }, + "desiredIntraNodeVisibilityConfig": { + "$ref": "IntraNodeVisibilityConfig", + "description": "The desired config of Intra-node visibility." + }, "desiredLocations": { "description": "The desired list of Google Compute Engine\n[zones](/compute/docs/zones#available) in which the cluster's nodes\nshould be located. Changing the locations a cluster is in will result\nin nodes being either created or removed from the cluster, depending on\nwhether locations are being added or removed.\n\nThis list must always include the cluster's primary zone.", "items": { @@ -2997,12 +3082,101 @@ }, "type": "object" }, + "DatabaseEncryption": { + "description": "Configuration of etcd encryption.", + "id": "DatabaseEncryption", + "properties": { + "keyName": { + "description": "Name of CloudKMS key to use for the encryption of secrets in etcd.\nEx. projects/my-project/locations/global/keyRings/my-ring/cryptoKeys/my-key", + "type": "string" + }, + "state": { + "description": "Denotes the state of etcd encryption.", + "enum": [ + "UNKNOWN", + "ENCRYPTED", + "DECRYPTED" + ], + "enumDescriptions": [ + "Should never be set", + "Secrets in etcd are encrypted.", + "Secrets in etcd are stored in plain text (at etcd level) - this is\nunrelated to Google Compute Engine level full disk encryption." + ], + "type": "string" + } + }, + "type": "object" + }, "Empty": { "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", "id": "Empty", "properties": {}, "type": "object" }, + "GetJSONWebKeysResponse": { + "description": "GetJSONWebKeysResponse is a valid JSON Web Key Set as specififed in rfc 7517", + "id": "GetJSONWebKeysResponse", + "properties": { + "keys": { + "description": "The public component of the keys used by the cluster to sign token\nrequests.", + "items": { + "$ref": "Jwk" + }, + "type": "array" + } + }, + "type": "object" + }, + "GetOpenIDConfigResponse": { + "description": "GetOpenIDConfigResponse is an OIDC discovery document for the cluster.\nSee the OpenID Connect Discovery 1.0 specification for details.", + "id": "GetOpenIDConfigResponse", + "properties": { + "claims_supported": { + "description": "NOLINT", + "items": { + "type": "string" + }, + "type": "array" + }, + "grant_types": { + "description": "NOLINT", + "items": { + "type": "string" + }, + "type": "array" + }, + "id_token_signing_alg_values_supported": { + "description": "NOLINT", + "items": { + "type": "string" + }, + "type": "array" + }, + "issuer": { + "description": "NOLINT", + "type": "string" + }, + "jwks_uri": { + "description": "NOLINT", + "type": "string" + }, + "response_types_supported": { + "description": "NOLINT", + "items": { + "type": "string" + }, + "type": "array" + }, + "subject_types_supported": { + "description": "NOLINT", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "HorizontalPodAutoscaling": { "description": "Configuration options for the horizontal pod autoscaling feature, which\nincreases or decreases the number of replica pods a replication controller\nhas based on the resource usage of the existing pods.", "id": "HorizontalPodAutoscaling", @@ -3084,6 +3258,17 @@ }, "type": "object" }, + "IntraNodeVisibilityConfig": { + "description": "IntraNodeVisibilityConfig contains the desired config of the intra-node\nvisibility on this cluster.", + "id": "IntraNodeVisibilityConfig", + "properties": { + "enabled": { + "description": "Enables intra node visibility for this cluster.", + "type": "boolean" + } + }, + "type": "object" + }, "IstioConfig": { "description": "Configuration options for Istio addon.", "id": "IstioConfig", @@ -3107,6 +3292,49 @@ }, "type": "object" }, + "Jwk": { + "description": "Jwk is a JSON Web Key as specified in RFC 7517", + "id": "Jwk", + "properties": { + "alg": { + "description": "NOLINT", + "type": "string" + }, + "crv": { + "description": "NOLINT", + "type": "string" + }, + "e": { + "description": "NOLINT", + "type": "string" + }, + "kid": { + "description": "NOLINT", + "type": "string" + }, + "kty": { + "description": "NOLINT", + "type": "string" + }, + "n": { + "description": "Fields for RSA keys.\nNOLINT", + "type": "string" + }, + "use": { + "description": "NOLINT", + "type": "string" + }, + "x": { + "description": "Fields for ECDSA keys.\nNOLINT", + "type": "string" + }, + "y": { + "description": "NOLINT", + "type": "string" + } + }, + "type": "object" + }, "KubernetesDashboard": { "description": "Configuration for the Kubernetes Dashboard.", "id": "KubernetesDashboard", @@ -3362,6 +3590,10 @@ "description": "NetworkConfig reports the relative names of network \u0026 subnetwork.", "id": "NetworkConfig", "properties": { + "enableIntraNodeVisibility": { + "description": "Whether Intra-node visibility is enabled for this cluster.\nThis makes same node pod to pod traffic visible for VPC network.", + "type": "boolean" + }, "network": { "description": "Output only. The relative name of the Google Compute Engine\nnetwork(/compute/docs/networks-and-firewalls#networks) to which\nthe cluster is connected.\nExample: projects/my-project/global/networks/my-network", "type": "string" @@ -3451,7 +3683,7 @@ "additionalProperties": { "type": "string" }, - "description": "The metadata key/value pairs assigned to instances in the cluster.\n\nKeys must conform to the regexp [a-zA-Z0-9-_]+ and be less than 128 bytes\nin length. These are reflected as part of a URL in the metadata server.\nAdditionally, to avoid ambiguity, keys must not conflict with any other\nmetadata keys for the project or be one of the reserved keys:\n \"cluster-location\"\n \"cluster-name\"\n \"cluster-uid\"\n \"configure-sh\"\n \"enable-oslogin\"\n \"gci-ensure-gke-docker\"\n \"gci-update-strategy\"\n \"instance-template\"\n \"kube-env\"\n \"startup-script\"\n \"user-data\"\n\nValues are free-form strings, and only have meaning as interpreted by\nthe image running in the instance. The only restriction placed on them is\nthat each value's size must be less than or equal to 32 KB.\n\nThe total size of all keys and values must be less than 512 KB.", + "description": "The metadata key/value pairs assigned to instances in the cluster.\n\nKeys must conform to the regexp [a-zA-Z0-9-_]+ and be less than 128 bytes\nin length. These are reflected as part of a URL in the metadata server.\nAdditionally, to avoid ambiguity, keys must not conflict with any other\nmetadata keys for the project or be one of the reserved keys:\n \"cluster-location\"\n \"cluster-name\"\n \"cluster-uid\"\n \"configure-sh\"\n \"containerd-configure-sh\"\n \"enable-oslogin\"\n \"gci-ensure-gke-docker\"\n \"gci-update-strategy\"\n \"instance-template\"\n \"kube-env\"\n \"startup-script\"\n \"user-data\"\n\nValues are free-form strings, and only have meaning as interpreted by\nthe image running in the instance. The only restriction placed on them is\nthat each value's size must be less than or equal to 32 KB.\n\nThe total size of all keys and values must be less than 512 KB.", "type": "object" }, "minCpuPlatform": { @@ -4537,16 +4769,18 @@ "id": "WorkloadMetadataConfig", "properties": { "nodeMetadata": { - "description": "NodeMetadata is the configuration for how to expose the node metadata to\nthe workload running on the node.", + "description": "NodeMetadata is the configuration for how to expose metadata to the\nworkloads running on the node.", "enum": [ "UNSPECIFIED", "SECURE", - "EXPOSE" + "EXPOSE", + "GKE_METADATA_SERVER" ], "enumDescriptions": [ "Not set.", "Prevent workloads not in hostNetwork from accessing certain VM metadata,\nspecifically kube-env, which contains Kubelet credentials, and the\ninstance identity token.\n\nMetadata concealment is a temporary security solution available while the\nbootstrapping process for cluster nodes is being redesigned with\nsignificant security improvements. This feature is scheduled to be\ndeprecated in the future and later removed.", - "Expose all VM metadata to pods." + "Expose all VM metadata to pods.", + "Run the GKE Metadata Server on this node. The GKE Metadata Server exposes\na metadata API to workloads that is compatible with the V1 Compute\nMetadata APIs exposed by the Compute Engine and App Engine Metadata\nServers. This feature can only be enabled if Workload Identity is enabled\nat the cluster level." ], "type": "string" } diff --git a/vendor/google.golang.org/api/container/v1beta1/container-gen.go b/vendor/google.golang.org/api/container/v1beta1/container-gen.go index 44cc85a2..d931bb2e 100644 --- a/vendor/google.golang.org/api/container/v1beta1/container-gen.go +++ b/vendor/google.golang.org/api/container/v1beta1/container-gen.go @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. All rights reserved. +// Copyright 2019 Google LLC. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. @@ -6,13 +6,35 @@ // Package container provides access to the Kubernetes Engine API. // -// See https://cloud.google.com/container-engine/ +// For product documentation, see: https://cloud.google.com/container-engine/ +// +// Creating a client // // Usage example: // // import "google.golang.org/api/container/v1beta1" // ... -// containerService, err := container.New(oauthHttpClient) +// ctx := context.Background() +// containerService, err := container.NewService(ctx) +// +// In this example, Google Application Default Credentials are used for authentication. +// +// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// +// Other authentication options +// +// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// +// containerService, err := container.NewService(ctx, option.WithAPIKey("AIza...")) +// +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// +// config := &oauth2.Config{...} +// // ... +// token, err := config.Exchange(ctx, ...) +// containerService, err := container.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) +// +// See https://godoc.org/google.golang.org/api/option/ for details on options. package container // import "google.golang.org/api/container/v1beta1" import ( @@ -29,6 +51,8 @@ import ( gensupport "google.golang.org/api/gensupport" googleapi "google.golang.org/api/googleapi" + option "google.golang.org/api/option" + htransport "google.golang.org/api/transport/http" ) // Always reference these packages, just in case the auto-generated code @@ -56,6 +80,32 @@ const ( CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" ) +// NewService creates a new Service. +func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { + scopesOption := option.WithScopes( + "https://www.googleapis.com/auth/cloud-platform", + ) + // NOTE: prepend, so we don't override user-specified scopes. + opts = append([]option.ClientOption{scopesOption}, opts...) + client, endpoint, err := htransport.NewClient(ctx, opts...) + if err != nil { + return nil, err + } + s, err := New(client) + if err != nil { + return nil, err + } + if endpoint != "" { + s.BasePath = endpoint + } + return s, nil +} + +// New creates a new Service. It uses the provided http.Client for requests. +// +// Deprecated: please use NewService instead. +// To provide a custom HTTP client, use option.WithHTTPClient. +// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. func New(client *http.Client) (*Service, error) { if client == nil { return nil, errors.New("client is nil") @@ -137,6 +187,7 @@ type ProjectsLocationsService struct { func NewProjectsLocationsClustersService(s *Service) *ProjectsLocationsClustersService { rs := &ProjectsLocationsClustersService{s: s} rs.NodePools = NewProjectsLocationsClustersNodePoolsService(s) + rs.WellKnown = NewProjectsLocationsClustersWellKnownService(s) return rs } @@ -144,6 +195,8 @@ type ProjectsLocationsClustersService struct { s *Service NodePools *ProjectsLocationsClustersNodePoolsService + + WellKnown *ProjectsLocationsClustersWellKnownService } func NewProjectsLocationsClustersNodePoolsService(s *Service) *ProjectsLocationsClustersNodePoolsService { @@ -155,6 +208,15 @@ type ProjectsLocationsClustersNodePoolsService struct { s *Service } +func NewProjectsLocationsClustersWellKnownService(s *Service) *ProjectsLocationsClustersWellKnownService { + rs := &ProjectsLocationsClustersWellKnownService{s: s} + return rs +} + +type ProjectsLocationsClustersWellKnownService struct { + s *Service +} + func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService { rs := &ProjectsLocationsOperationsService{s: s} return rs @@ -308,6 +370,42 @@ func (s *AddonsConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// AuthenticatorGroupsConfig: Configuration for returning group +// information from authenticators. +type AuthenticatorGroupsConfig struct { + // Enabled: Whether this cluster should return group membership + // lookups + // during authentication using a group of security groups. + Enabled bool `json:"enabled,omitempty"` + + // SecurityGroup: The name of the security group-of-groups to be used. + // Only relevant + // if enabled = true. + SecurityGroup string `json:"securityGroup,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Enabled") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Enabled") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *AuthenticatorGroupsConfig) MarshalJSON() ([]byte, error) { + type NoMethod AuthenticatorGroupsConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // AutoUpgradeOptions: AutoUpgradeOptions defines the set of options for // the user to control how // the Auto Upgrades will proceed. @@ -555,6 +653,10 @@ type Cluster struct { // in the cluster. AddonsConfig *AddonsConfig `json:"addonsConfig,omitempty"` + // AuthenticatorGroupsConfig: Configuration controlling RBAC group + // membership information. + AuthenticatorGroupsConfig *AuthenticatorGroupsConfig `json:"authenticatorGroupsConfig,omitempty"` + // Autoscaling: Cluster-level autoscaling configuration. Autoscaling *ClusterAutoscaling `json:"autoscaling,omitempty"` @@ -597,6 +699,9 @@ type Cluster struct { // of being upgraded, this reflects the minimum version of all nodes. CurrentNodeVersion string `json:"currentNodeVersion,omitempty"` + // DatabaseEncryption: Configuration of etcd encryption. + DatabaseEncryption *DatabaseEncryption `json:"databaseEncryption,omitempty"` + // DefaultMaxPodsConstraint: The default constraint on the maximum // number of pods that can be run // simultaneously on a node in the node pool of this cluster. Only @@ -987,10 +1092,17 @@ type ClusterUpdate struct { // DesiredClusterAutoscaling: Cluster-level autoscaling configuration. DesiredClusterAutoscaling *ClusterAutoscaling `json:"desiredClusterAutoscaling,omitempty"` + // DesiredDatabaseEncryption: Configuration of etcd encryption. + DesiredDatabaseEncryption *DatabaseEncryption `json:"desiredDatabaseEncryption,omitempty"` + // DesiredImageType: The desired image type for the node pool. // NOTE: Set the "desired_node_pool" field as well. DesiredImageType string `json:"desiredImageType,omitempty"` + // DesiredIntraNodeVisibilityConfig: The desired config of Intra-node + // visibility. + DesiredIntraNodeVisibilityConfig *IntraNodeVisibilityConfig `json:"desiredIntraNodeVisibilityConfig,omitempty"` + // DesiredLocations: The desired list of Google Compute // Engine // [zones](/compute/docs/zones#available) in which the cluster's @@ -1307,6 +1419,48 @@ func (s *DailyMaintenanceWindow) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// DatabaseEncryption: Configuration of etcd encryption. +type DatabaseEncryption struct { + // KeyName: Name of CloudKMS key to use for the encryption of secrets in + // etcd. + // Ex. + // projects/my-project/locations/global/keyRings/my-ring/cryptoKeys/my-ke + // y + KeyName string `json:"keyName,omitempty"` + + // State: Denotes the state of etcd encryption. + // + // Possible values: + // "UNKNOWN" - Should never be set + // "ENCRYPTED" - Secrets in etcd are encrypted. + // "DECRYPTED" - Secrets in etcd are stored in plain text (at etcd + // level) - this is + // unrelated to Google Compute Engine level full disk encryption. + State string `json:"state,omitempty"` + + // ForceSendFields is a list of field names (e.g. "KeyName") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "KeyName") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *DatabaseEncryption) MarshalJSON() ([]byte, error) { + type NoMethod DatabaseEncryption + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Empty: A generic empty message that you can re-use to avoid defining // duplicated // empty messages in your APIs. A typical example is to use it as the @@ -1325,6 +1479,94 @@ type Empty struct { googleapi.ServerResponse `json:"-"` } +// GetJSONWebKeysResponse: GetJSONWebKeysResponse is a valid JSON Web +// Key Set as specififed in rfc 7517 +type GetJSONWebKeysResponse struct { + // Keys: The public component of the keys used by the cluster to sign + // token + // requests. + Keys []*Jwk `json:"keys,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Keys") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Keys") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GetJSONWebKeysResponse) MarshalJSON() ([]byte, error) { + type NoMethod GetJSONWebKeysResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GetOpenIDConfigResponse: GetOpenIDConfigResponse is an OIDC discovery +// document for the cluster. +// See the OpenID Connect Discovery 1.0 specification for details. +type GetOpenIDConfigResponse struct { + // ClaimsSupported: NOLINT + ClaimsSupported []string `json:"claims_supported,omitempty"` + + // GrantTypes: NOLINT + GrantTypes []string `json:"grant_types,omitempty"` + + // IdTokenSigningAlgValuesSupported: NOLINT + IdTokenSigningAlgValuesSupported []string `json:"id_token_signing_alg_values_supported,omitempty"` + + // Issuer: NOLINT + Issuer string `json:"issuer,omitempty"` + + // JwksUri: NOLINT + JwksUri string `json:"jwks_uri,omitempty"` + + // ResponseTypesSupported: NOLINT + ResponseTypesSupported []string `json:"response_types_supported,omitempty"` + + // SubjectTypesSupported: NOLINT + SubjectTypesSupported []string `json:"subject_types_supported,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "ClaimsSupported") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ClaimsSupported") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GetOpenIDConfigResponse) MarshalJSON() ([]byte, error) { + type NoMethod GetOpenIDConfigResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // HorizontalPodAutoscaling: Configuration options for the horizontal // pod autoscaling feature, which // increases or decreases the number of replica pods a replication @@ -1584,6 +1826,36 @@ func (s *IPAllocationPolicy) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// IntraNodeVisibilityConfig: IntraNodeVisibilityConfig contains the +// desired config of the intra-node +// visibility on this cluster. +type IntraNodeVisibilityConfig struct { + // Enabled: Enables intra node visibility for this cluster. + Enabled bool `json:"enabled,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Enabled") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Enabled") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *IntraNodeVisibilityConfig) MarshalJSON() ([]byte, error) { + type NoMethod IntraNodeVisibilityConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // IstioConfig: Configuration options for Istio addon. type IstioConfig struct { // Auth: The specified Istio auth mode, either none, or mutual TLS. @@ -1619,6 +1891,60 @@ func (s *IstioConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// Jwk: Jwk is a JSON Web Key as specified in RFC 7517 +type Jwk struct { + // Alg: NOLINT + Alg string `json:"alg,omitempty"` + + // Crv: NOLINT + Crv string `json:"crv,omitempty"` + + // E: NOLINT + E string `json:"e,omitempty"` + + // Kid: NOLINT + Kid string `json:"kid,omitempty"` + + // Kty: NOLINT + Kty string `json:"kty,omitempty"` + + // N: Fields for RSA keys. + // NOLINT + N string `json:"n,omitempty"` + + // Use: NOLINT + Use string `json:"use,omitempty"` + + // X: Fields for ECDSA keys. + // NOLINT + X string `json:"x,omitempty"` + + // Y: NOLINT + Y string `json:"y,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Alg") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Alg") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Jwk) MarshalJSON() ([]byte, error) { + type NoMethod Jwk + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // KubernetesDashboard: Configuration for the Kubernetes Dashboard. type KubernetesDashboard struct { // Disabled: Whether the Kubernetes Dashboard is enabled for this @@ -2183,6 +2509,11 @@ func (s *Metric) UnmarshalJSON(data []byte) error { // NetworkConfig: NetworkConfig reports the relative names of network & // subnetwork. type NetworkConfig struct { + // EnableIntraNodeVisibility: Whether Intra-node visibility is enabled + // for this cluster. + // This makes same node pod to pod traffic visible for VPC network. + EnableIntraNodeVisibility bool `json:"enableIntraNodeVisibility,omitempty"` + // Network: Output only. The relative name of the Google Compute // Engine // network(/compute/docs/networks-and-firewalls#networks) to which @@ -2198,20 +2529,22 @@ type NetworkConfig struct { // projects/my-project/regions/us-central1/subnetworks/my-subnet Subnetwork string `json:"subnetwork,omitempty"` - // ForceSendFields is a list of field names (e.g. "Network") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. + // "EnableIntraNodeVisibility") to unconditionally include in API + // requests. By default, fields with empty values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Network") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. + // "EnableIntraNodeVisibility") to include in API requests with the JSON + // null value. By default, fields with empty values are omitted from API + // requests. However, any field with an empty value appearing in + // NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. NullFields []string `json:"-"` } @@ -2368,6 +2701,7 @@ type NodeConfig struct { // "cluster-name" // "cluster-uid" // "configure-sh" + // "containerd-configure-sh" // "enable-oslogin" // "gci-ensure-gke-docker" // "gci-update-strategy" @@ -4299,9 +4633,9 @@ func (s *VerticalPodAutoscaling) MarshalJSON() ([]byte, error) { // configuration to expose to // workloads on the node pool. type WorkloadMetadataConfig struct { - // NodeMetadata: NodeMetadata is the configuration for how to expose the - // node metadata to - // the workload running on the node. + // NodeMetadata: NodeMetadata is the configuration for how to expose + // metadata to the + // workloads running on the node. // // Possible values: // "UNSPECIFIED" - Not set. @@ -4319,6 +4653,15 @@ type WorkloadMetadataConfig struct { // be // deprecated in the future and later removed. // "EXPOSE" - Expose all VM metadata to pods. + // "GKE_METADATA_SERVER" - Run the GKE Metadata Server on this node. + // The GKE Metadata Server exposes + // a metadata API to workloads that is compatible with the V1 + // Compute + // Metadata APIs exposed by the Compute Engine and App Engine + // Metadata + // Servers. This feature can only be enabled if Workload Identity is + // enabled + // at the cluster level. NodeMetadata string `json:"nodeMetadata,omitempty"` // ForceSendFields is a list of field names (e.g. "NodeMetadata") to @@ -4355,7 +4698,7 @@ type ProjectsAggregatedUsableSubnetworksListCall struct { header_ http.Header } -// List: Lists subnetworks that are usable for creating clusters in a +// List: Lists subnetworks that can be used for creating clusters in a // project. func (r *ProjectsAggregatedUsableSubnetworksService) List(parent string) *ProjectsAggregatedUsableSubnetworksListCall { c := &ProjectsAggregatedUsableSubnetworksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -4493,7 +4836,7 @@ func (c *ProjectsAggregatedUsableSubnetworksListCall) Do(opts ...googleapi.CallO } return ret, nil // { - // "description": "Lists subnetworks that are usable for creating clusters in a project.", + // "description": "Lists subnetworks that can be used for creating clusters in a project.", // "flatPath": "v1beta1/projects/{projectsId}/aggregated/usableSubnetworks", // "httpMethod": "GET", // "id": "container.projects.aggregated.usableSubnetworks.list", @@ -4568,8 +4911,8 @@ type ProjectsLocationsGetServerConfigCall struct { header_ http.Header } -// GetServerConfig: Returns configuration info about the Kubernetes -// Engine service. +// GetServerConfig: Returns configuration info about the Google +// Kubernetes Engine service. func (r *ProjectsLocationsService) GetServerConfig(name string) *ProjectsLocationsGetServerConfigCall { c := &ProjectsLocationsGetServerConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -4694,7 +5037,7 @@ func (c *ProjectsLocationsGetServerConfigCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Returns configuration info about the Kubernetes Engine service.", + // "description": "Returns configuration info about the Google Kubernetes Engine service.", // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/serverConfig", // "httpMethod": "GET", // "id": "container.projects.locations.getServerConfig", @@ -4703,7 +5046,7 @@ func (c *ProjectsLocationsGetServerConfigCall) Do(opts ...googleapi.CallOption) // ], // "parameters": { // "name": { - // "description": "The name (project and location) of the server config to get\nSpecified in the format 'projects/*/locations/*'.", + // "description": "The name (project and location) of the server config to get,\nspecified in the format 'projects/*/locations/*'.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, @@ -4742,7 +5085,7 @@ type ProjectsLocationsListCall struct { header_ http.Header } -// List: Used to fetch locations that offer GKE. +// List: Fetches locations that offer Google Kubernetes Engine. func (r *ProjectsLocationsService) List(parent string) *ProjectsLocationsListCall { c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -4847,7 +5190,7 @@ func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocat } return ret, nil // { - // "description": "Used to fetch locations that offer GKE.", + // "description": "Fetches locations that offer Google Kubernetes Engine.", // "flatPath": "v1beta1/projects/{projectsId}/locations", // "httpMethod": "GET", // "id": "container.projects.locations.list", @@ -5033,14 +5376,14 @@ type ProjectsLocationsClustersCreateCall struct { // network](/compute/docs/networks-and-firewalls#networks). // // One firewall is added for the cluster. After cluster creation, -// the cluster creates routes for each node to allow the containers +// the Kubelet creates routes for each node to allow the containers // on that node to communicate with all other instances in // the // cluster. // // Finally, an entry is added to the project's global metadata // indicating -// which CIDR range is being used by the cluster. +// which CIDR range the cluster is using. func (r *ProjectsLocationsClustersService) Create(parent string, createclusterrequest *CreateClusterRequest) *ProjectsLocationsClustersCreateCall { c := &ProjectsLocationsClustersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -5138,7 +5481,7 @@ func (c *ProjectsLocationsClustersCreateCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Creates a cluster, consisting of the specified number and type of Google\nCompute Engine instances.\n\nBy default, the cluster is created in the project's\n[default network](/compute/docs/networks-and-firewalls#networks).\n\nOne firewall is added for the cluster. After cluster creation,\nthe cluster creates routes for each node to allow the containers\non that node to communicate with all other instances in the\ncluster.\n\nFinally, an entry is added to the project's global metadata indicating\nwhich CIDR range is being used by the cluster.", + // "description": "Creates a cluster, consisting of the specified number and type of Google\nCompute Engine instances.\n\nBy default, the cluster is created in the project's\n[default network](/compute/docs/networks-and-firewalls#networks).\n\nOne firewall is added for the cluster. After cluster creation,\nthe Kubelet creates routes for each node to allow the containers\non that node to communicate with all other instances in the\ncluster.\n\nFinally, an entry is added to the project's global metadata indicating\nwhich CIDR range the cluster is using.", // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters", // "httpMethod": "POST", // "id": "container.projects.locations.clusters.create", @@ -5186,10 +5529,10 @@ type ProjectsLocationsClustersDeleteCall struct { // are also deleted. // // Other Google Compute Engine resources that might be in use by the -// cluster -// (e.g. load balancer resources) will not be deleted if they weren't +// cluster, +// such as load balancer resources, are not deleted if they weren't // present -// at the initial create time. +// when the cluster was initially created. func (r *ProjectsLocationsClustersService) Delete(name string) *ProjectsLocationsClustersDeleteCall { c := &ProjectsLocationsClustersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -5311,7 +5654,7 @@ func (c *ProjectsLocationsClustersDeleteCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Deletes the cluster, including the Kubernetes endpoint and all worker\nnodes.\n\nFirewalls and routes that were configured during cluster creation\nare also deleted.\n\nOther Google Compute Engine resources that might be in use by the cluster\n(e.g. load balancer resources) will not be deleted if they weren't present\nat the initial create time.", + // "description": "Deletes the cluster, including the Kubernetes endpoint and all worker\nnodes.\n\nFirewalls and routes that were configured during cluster creation\nare also deleted.\n\nOther Google Compute Engine resources that might be in use by the cluster,\nsuch as load balancer resources, are not deleted if they weren't present\nwhen the cluster was initially created.", // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}", // "httpMethod": "DELETE", // "id": "container.projects.locations.clusters.delete", @@ -5541,6 +5884,154 @@ func (c *ProjectsLocationsClustersGetCall) Do(opts ...googleapi.CallOption) (*Cl } +// method id "container.projects.locations.clusters.getJwks": + +type ProjectsLocationsClustersGetJwksCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetJwks: Gets the public component of the cluster signing keys +// in +// JSON Web Key format. +// This API is not yet intended for general use, and is not available +// for all +// clusters. +func (r *ProjectsLocationsClustersService) GetJwks(parent string) *ProjectsLocationsClustersGetJwksCall { + c := &ProjectsLocationsClustersGetJwksCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsClustersGetJwksCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersGetJwksCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsClustersGetJwksCall) IfNoneMatch(entityTag string) *ProjectsLocationsClustersGetJwksCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsClustersGetJwksCall) Context(ctx context.Context) *ProjectsLocationsClustersGetJwksCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsClustersGetJwksCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersGetJwksCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/jwks") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "container.projects.locations.clusters.getJwks" call. +// Exactly one of *GetJSONWebKeysResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GetJSONWebKeysResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsClustersGetJwksCall) Do(opts ...googleapi.CallOption) (*GetJSONWebKeysResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GetJSONWebKeysResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the public component of the cluster signing keys in\nJSON Web Key format.\nThis API is not yet intended for general use, and is not available for all\nclusters.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/jwks", + // "httpMethod": "GET", + // "id": "container.projects.locations.clusters.getJwks", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "The cluster (project, location, cluster id) to get keys for. Specified in\nthe format 'projects/*/locations/*/clusters/*'.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+parent}/jwks", + // "response": { + // "$ref": "GetJSONWebKeysResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "container.projects.locations.clusters.list": type ProjectsLocationsClustersListCall struct { @@ -6424,11 +6915,11 @@ type ProjectsLocationsClustersSetMasterAuthCall struct { header_ http.Header } -// SetMasterAuth: Used to set master auth materials. Currently supports -// :- -// Changing the admin password for a specific cluster. -// This can be either via password generation or explicitly set. -// Modify basic_auth.csv and reset the K8S API server. +// SetMasterAuth: Sets master auth materials. Currently supports +// changing the admin password +// or a specific cluster, either via password generation or explicitly +// setting +// the password. func (r *ProjectsLocationsClustersService) SetMasterAuth(name string, setmasterauthrequest *SetMasterAuthRequest) *ProjectsLocationsClustersSetMasterAuthCall { c := &ProjectsLocationsClustersSetMasterAuthCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -6526,7 +7017,7 @@ func (c *ProjectsLocationsClustersSetMasterAuthCall) Do(opts ...googleapi.CallOp } return ret, nil // { - // "description": "Used to set master auth materials. Currently supports :-\nChanging the admin password for a specific cluster.\nThis can be either via password generation or explicitly set.\nModify basic_auth.csv and reset the K8S API server.", + // "description": "Sets master auth materials. Currently supports changing the admin password\nor a specific cluster, either via password generation or explicitly setting\nthe password.", // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:setMasterAuth", // "httpMethod": "POST", // "id": "container.projects.locations.clusters.setMasterAuth", @@ -6706,7 +7197,7 @@ type ProjectsLocationsClustersSetNetworkPolicyCall struct { header_ http.Header } -// SetNetworkPolicy: Enables/Disables Network Policy for a cluster. +// SetNetworkPolicy: Enables or disables Network Policy for a cluster. func (r *ProjectsLocationsClustersService) SetNetworkPolicy(name string, setnetworkpolicyrequest *SetNetworkPolicyRequest) *ProjectsLocationsClustersSetNetworkPolicyCall { c := &ProjectsLocationsClustersSetNetworkPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -6804,7 +7295,7 @@ func (c *ProjectsLocationsClustersSetNetworkPolicyCall) Do(opts ...googleapi.Cal } return ret, nil // { - // "description": "Enables/Disables Network Policy for a cluster.", + // "description": "Enables or disables Network Policy for a cluster.", // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:setNetworkPolicy", // "httpMethod": "POST", // "id": "container.projects.locations.clusters.setNetworkPolicy", @@ -6984,7 +7475,7 @@ type ProjectsLocationsClustersStartIpRotationCall struct { header_ http.Header } -// StartIpRotation: Start master IP rotation. +// StartIpRotation: Starts master IP rotation. func (r *ProjectsLocationsClustersService) StartIpRotation(name string, startiprotationrequest *StartIPRotationRequest) *ProjectsLocationsClustersStartIpRotationCall { c := &ProjectsLocationsClustersStartIpRotationCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -7082,7 +7573,7 @@ func (c *ProjectsLocationsClustersStartIpRotationCall) Do(opts ...googleapi.Call } return ret, nil // { - // "description": "Start master IP rotation.", + // "description": "Starts master IP rotation.", // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:startIpRotation", // "httpMethod": "POST", // "id": "container.projects.locations.clusters.startIpRotation", @@ -7727,7 +8218,7 @@ type ProjectsLocationsClustersNodePoolsGetCall struct { header_ http.Header } -// Get: Retrieves the node pool requested. +// Get: Retrieves the requested node pool. func (r *ProjectsLocationsClustersNodePoolsService) Get(name string) *ProjectsLocationsClustersNodePoolsGetCall { c := &ProjectsLocationsClustersNodePoolsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -7870,7 +8361,7 @@ func (c *ProjectsLocationsClustersNodePoolsGetCall) Do(opts ...googleapi.CallOpt } return ret, nil // { - // "description": "Retrieves the node pool requested.", + // "description": "Retrieves the requested node pool.", // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/nodePools/{nodePoolsId}", // "httpMethod": "GET", // "id": "container.projects.locations.clusters.nodePools.get", @@ -8116,9 +8607,9 @@ type ProjectsLocationsClustersNodePoolsRollbackCall struct { header_ http.Header } -// Rollback: Roll back the previously Aborted or Failed NodePool +// Rollback: Rolls back a previously Aborted or Failed NodePool // upgrade. -// This will be an no-op if the last upgrade successfully completed. +// This makes no changes if the last upgrade successfully completed. func (r *ProjectsLocationsClustersNodePoolsService) Rollback(name string, rollbacknodepoolupgraderequest *RollbackNodePoolUpgradeRequest) *ProjectsLocationsClustersNodePoolsRollbackCall { c := &ProjectsLocationsClustersNodePoolsRollbackCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -8216,7 +8707,7 @@ func (c *ProjectsLocationsClustersNodePoolsRollbackCall) Do(opts ...googleapi.Ca } return ret, nil // { - // "description": "Roll back the previously Aborted or Failed NodePool upgrade.\nThis will be an no-op if the last upgrade successfully completed.", + // "description": "Rolls back a previously Aborted or Failed NodePool upgrade.\nThis makes no changes if the last upgrade successfully completed.", // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/nodePools/{nodePoolsId}:rollback", // "httpMethod": "POST", // "id": "container.projects.locations.clusters.nodePools.rollback", @@ -8804,6 +9295,159 @@ func (c *ProjectsLocationsClustersNodePoolsUpdateCall) Do(opts ...googleapi.Call } +// method id "container.projects.locations.clusters.well-known.getOpenid-configuration": + +type ProjectsLocationsClustersWellKnownGetOpenidConfigurationCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetOpenidConfiguration: Gets the OIDC discovery document for the +// cluster. +// See the +// [OpenID Connect Discovery +// 1.0 +// specification](https://openid.net/specs/openid-connect-discovery-1 +// _0.html) +// for details. +// This API is not yet intended for general use, and is not available +// for all +// clusters. +func (r *ProjectsLocationsClustersWellKnownService) GetOpenidConfiguration(parent string) *ProjectsLocationsClustersWellKnownGetOpenidConfigurationCall { + c := &ProjectsLocationsClustersWellKnownGetOpenidConfigurationCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsClustersWellKnownGetOpenidConfigurationCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersWellKnownGetOpenidConfigurationCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsClustersWellKnownGetOpenidConfigurationCall) IfNoneMatch(entityTag string) *ProjectsLocationsClustersWellKnownGetOpenidConfigurationCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsClustersWellKnownGetOpenidConfigurationCall) Context(ctx context.Context) *ProjectsLocationsClustersWellKnownGetOpenidConfigurationCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsClustersWellKnownGetOpenidConfigurationCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersWellKnownGetOpenidConfigurationCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/.well-known/openid-configuration") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "container.projects.locations.clusters.well-known.getOpenid-configuration" call. +// Exactly one of *GetOpenIDConfigResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GetOpenIDConfigResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsClustersWellKnownGetOpenidConfigurationCall) Do(opts ...googleapi.CallOption) (*GetOpenIDConfigResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GetOpenIDConfigResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the OIDC discovery document for the cluster.\nSee the\n[OpenID Connect Discovery 1.0\nspecification](https://openid.net/specs/openid-connect-discovery-1_0.html)\nfor details.\nThis API is not yet intended for general use, and is not available for all\nclusters.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/.well-known/openid-configuration", + // "httpMethod": "GET", + // "id": "container.projects.locations.clusters.well-known.getOpenid-configuration", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "The cluster (project, location, cluster id) to get the discovery document\nfor. Specified in the format 'projects/*/locations/*/clusters/*'.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+parent}/.well-known/openid-configuration", + // "response": { + // "$ref": "GetOpenIDConfigResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "container.projects.locations.operations.cancel": type ProjectsLocationsOperationsCancelCall struct { @@ -9142,7 +9786,7 @@ type ProjectsLocationsOperationsListCall struct { header_ http.Header } -// List: Lists all operations in a project in a specific zone or all +// List: Lists all operations in a project in the specified zone or all // zones. func (r *ProjectsLocationsOperationsService) List(parent string) *ProjectsLocationsOperationsListCall { c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -9270,7 +9914,7 @@ func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Lists all operations in a project in a specific zone or all zones.", + // "description": "Lists all operations in a project in the specified zone or all zones.", // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/operations", // "httpMethod": "GET", // "id": "container.projects.locations.operations.list", @@ -9319,8 +9963,8 @@ type ProjectsZonesGetServerconfigCall struct { header_ http.Header } -// GetServerconfig: Returns configuration info about the Kubernetes -// Engine service. +// GetServerconfig: Returns configuration info about the Google +// Kubernetes Engine service. func (r *ProjectsZonesService) GetServerconfig(projectId string, zone string) *ProjectsZonesGetServerconfigCall { c := &ProjectsZonesGetServerconfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.projectId = projectId @@ -9329,8 +9973,8 @@ func (r *ProjectsZonesService) GetServerconfig(projectId string, zone string) *P } // Name sets the optional parameter "name": The name (project and -// location) of the server config to get -// Specified in the format 'projects/*/locations/*'. +// location) of the server config to get, +// specified in the format 'projects/*/locations/*'. func (c *ProjectsZonesGetServerconfigCall) Name(name string) *ProjectsZonesGetServerconfigCall { c.urlParams_.Set("name", name) return c @@ -9435,7 +10079,7 @@ func (c *ProjectsZonesGetServerconfigCall) Do(opts ...googleapi.CallOption) (*Se } return ret, nil // { - // "description": "Returns configuration info about the Kubernetes Engine service.", + // "description": "Returns configuration info about the Google Kubernetes Engine service.", // "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/serverconfig", // "httpMethod": "GET", // "id": "container.projects.zones.getServerconfig", @@ -9445,7 +10089,7 @@ func (c *ProjectsZonesGetServerconfigCall) Do(opts ...googleapi.CallOption) (*Se // ], // "parameters": { // "name": { - // "description": "The name (project and location) of the server config to get\nSpecified in the format 'projects/*/locations/*'.", + // "description": "The name (project and location) of the server config to get,\nspecified in the format 'projects/*/locations/*'.", // "location": "query", // "type": "string" // }, @@ -9810,14 +10454,14 @@ type ProjectsZonesClustersCreateCall struct { // network](/compute/docs/networks-and-firewalls#networks). // // One firewall is added for the cluster. After cluster creation, -// the cluster creates routes for each node to allow the containers +// the Kubelet creates routes for each node to allow the containers // on that node to communicate with all other instances in // the // cluster. // // Finally, an entry is added to the project's global metadata // indicating -// which CIDR range is being used by the cluster. +// which CIDR range the cluster is using. func (r *ProjectsZonesClustersService) Create(projectId string, zone string, createclusterrequest *CreateClusterRequest) *ProjectsZonesClustersCreateCall { c := &ProjectsZonesClustersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.projectId = projectId @@ -9917,7 +10561,7 @@ func (c *ProjectsZonesClustersCreateCall) Do(opts ...googleapi.CallOption) (*Ope } return ret, nil // { - // "description": "Creates a cluster, consisting of the specified number and type of Google\nCompute Engine instances.\n\nBy default, the cluster is created in the project's\n[default network](/compute/docs/networks-and-firewalls#networks).\n\nOne firewall is added for the cluster. After cluster creation,\nthe cluster creates routes for each node to allow the containers\non that node to communicate with all other instances in the\ncluster.\n\nFinally, an entry is added to the project's global metadata indicating\nwhich CIDR range is being used by the cluster.", + // "description": "Creates a cluster, consisting of the specified number and type of Google\nCompute Engine instances.\n\nBy default, the cluster is created in the project's\n[default network](/compute/docs/networks-and-firewalls#networks).\n\nOne firewall is added for the cluster. After cluster creation,\nthe Kubelet creates routes for each node to allow the containers\non that node to communicate with all other instances in the\ncluster.\n\nFinally, an entry is added to the project's global metadata indicating\nwhich CIDR range the cluster is using.", // "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters", // "httpMethod": "POST", // "id": "container.projects.zones.clusters.create", @@ -9973,10 +10617,10 @@ type ProjectsZonesClustersDeleteCall struct { // are also deleted. // // Other Google Compute Engine resources that might be in use by the -// cluster -// (e.g. load balancer resources) will not be deleted if they weren't +// cluster, +// such as load balancer resources, are not deleted if they weren't // present -// at the initial create time. +// when the cluster was initially created. func (r *ProjectsZonesClustersService) Delete(projectId string, zone string, clusterId string) *ProjectsZonesClustersDeleteCall { c := &ProjectsZonesClustersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.projectId = projectId @@ -10080,7 +10724,7 @@ func (c *ProjectsZonesClustersDeleteCall) Do(opts ...googleapi.CallOption) (*Ope } return ret, nil // { - // "description": "Deletes the cluster, including the Kubernetes endpoint and all worker\nnodes.\n\nFirewalls and routes that were configured during cluster creation\nare also deleted.\n\nOther Google Compute Engine resources that might be in use by the cluster\n(e.g. load balancer resources) will not be deleted if they weren't present\nat the initial create time.", + // "description": "Deletes the cluster, including the Kubernetes endpoint and all worker\nnodes.\n\nFirewalls and routes that were configured during cluster creation\nare also deleted.\n\nOther Google Compute Engine resources that might be in use by the cluster,\nsuch as load balancer resources, are not deleted if they weren't present\nwhen the cluster was initially created.", // "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}", // "httpMethod": "DELETE", // "id": "container.projects.zones.clusters.delete", @@ -11588,11 +12232,11 @@ type ProjectsZonesClustersSetMasterAuthCall struct { header_ http.Header } -// SetMasterAuth: Used to set master auth materials. Currently supports -// :- -// Changing the admin password for a specific cluster. -// This can be either via password generation or explicitly set. -// Modify basic_auth.csv and reset the K8S API server. +// SetMasterAuth: Sets master auth materials. Currently supports +// changing the admin password +// or a specific cluster, either via password generation or explicitly +// setting +// the password. func (r *ProjectsZonesClustersService) SetMasterAuth(projectId string, zone string, clusterId string, setmasterauthrequest *SetMasterAuthRequest) *ProjectsZonesClustersSetMasterAuthCall { c := &ProjectsZonesClustersSetMasterAuthCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.projectId = projectId @@ -11694,7 +12338,7 @@ func (c *ProjectsZonesClustersSetMasterAuthCall) Do(opts ...googleapi.CallOption } return ret, nil // { - // "description": "Used to set master auth materials. Currently supports :-\nChanging the admin password for a specific cluster.\nThis can be either via password generation or explicitly set.\nModify basic_auth.csv and reset the K8S API server.", + // "description": "Sets master auth materials. Currently supports changing the admin password\nor a specific cluster, either via password generation or explicitly setting\nthe password.", // "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setMasterAuth", // "httpMethod": "POST", // "id": "container.projects.zones.clusters.setMasterAuth", @@ -11750,7 +12394,7 @@ type ProjectsZonesClustersSetNetworkPolicyCall struct { header_ http.Header } -// SetNetworkPolicy: Enables/Disables Network Policy for a cluster. +// SetNetworkPolicy: Enables or disables Network Policy for a cluster. func (r *ProjectsZonesClustersService) SetNetworkPolicy(projectId string, zone string, clusterId string, setnetworkpolicyrequest *SetNetworkPolicyRequest) *ProjectsZonesClustersSetNetworkPolicyCall { c := &ProjectsZonesClustersSetNetworkPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.projectId = projectId @@ -11852,7 +12496,7 @@ func (c *ProjectsZonesClustersSetNetworkPolicyCall) Do(opts ...googleapi.CallOpt } return ret, nil // { - // "description": "Enables/Disables Network Policy for a cluster.", + // "description": "Enables or disables Network Policy for a cluster.", // "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setNetworkPolicy", // "httpMethod": "POST", // "id": "container.projects.zones.clusters.setNetworkPolicy", @@ -11908,7 +12552,7 @@ type ProjectsZonesClustersStartIpRotationCall struct { header_ http.Header } -// StartIpRotation: Start master IP rotation. +// StartIpRotation: Starts master IP rotation. func (r *ProjectsZonesClustersService) StartIpRotation(projectId string, zone string, clusterId string, startiprotationrequest *StartIPRotationRequest) *ProjectsZonesClustersStartIpRotationCall { c := &ProjectsZonesClustersStartIpRotationCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.projectId = projectId @@ -12010,7 +12654,7 @@ func (c *ProjectsZonesClustersStartIpRotationCall) Do(opts ...googleapi.CallOpti } return ret, nil // { - // "description": "Start master IP rotation.", + // "description": "Starts master IP rotation.", // "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:startIpRotation", // "httpMethod": "POST", // "id": "container.projects.zones.clusters.startIpRotation", @@ -12724,7 +13368,7 @@ type ProjectsZonesClustersNodePoolsGetCall struct { header_ http.Header } -// Get: Retrieves the node pool requested. +// Get: Retrieves the requested node pool. func (r *ProjectsZonesClustersNodePoolsService) Get(projectId string, zone string, clusterId string, nodePoolId string) *ProjectsZonesClustersNodePoolsGetCall { c := &ProjectsZonesClustersNodePoolsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.projectId = projectId @@ -12845,7 +13489,7 @@ func (c *ProjectsZonesClustersNodePoolsGetCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Retrieves the node pool requested.", + // "description": "Retrieves the requested node pool.", // "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}", // "httpMethod": "GET", // "id": "container.projects.zones.clusters.nodePools.get", @@ -13086,9 +13730,9 @@ type ProjectsZonesClustersNodePoolsRollbackCall struct { header_ http.Header } -// Rollback: Roll back the previously Aborted or Failed NodePool +// Rollback: Rolls back a previously Aborted or Failed NodePool // upgrade. -// This will be an no-op if the last upgrade successfully completed. +// This makes no changes if the last upgrade successfully completed. func (r *ProjectsZonesClustersNodePoolsService) Rollback(projectId string, zone string, clusterId string, nodePoolId string, rollbacknodepoolupgraderequest *RollbackNodePoolUpgradeRequest) *ProjectsZonesClustersNodePoolsRollbackCall { c := &ProjectsZonesClustersNodePoolsRollbackCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.projectId = projectId @@ -13192,7 +13836,7 @@ func (c *ProjectsZonesClustersNodePoolsRollbackCall) Do(opts ...googleapi.CallOp } return ret, nil // { - // "description": "Roll back the previously Aborted or Failed NodePool upgrade.\nThis will be an no-op if the last upgrade successfully completed.", + // "description": "Rolls back a previously Aborted or Failed NodePool upgrade.\nThis makes no changes if the last upgrade successfully completed.", // "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}:rollback", // "httpMethod": "POST", // "id": "container.projects.zones.clusters.nodePools.rollback", @@ -14092,7 +14736,7 @@ type ProjectsZonesOperationsListCall struct { header_ http.Header } -// List: Lists all operations in a project in a specific zone or all +// List: Lists all operations in a project in the specified zone or all // zones. func (r *ProjectsZonesOperationsService) List(projectId string, zone string) *ProjectsZonesOperationsListCall { c := &ProjectsZonesOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -14209,7 +14853,7 @@ func (c *ProjectsZonesOperationsListCall) Do(opts ...googleapi.CallOption) (*Lis } return ret, nil // { - // "description": "Lists all operations in a project in a specific zone or all zones.", + // "description": "Lists all operations in a project in the specified zone or all zones.", // "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/operations", // "httpMethod": "GET", // "id": "container.projects.zones.operations.list", diff --git a/vendor/google.golang.org/api/dataflow/v1b3/dataflow-api.json b/vendor/google.golang.org/api/dataflow/v1b3/dataflow-api.json index 33d638aa..1a619515 100644 --- a/vendor/google.golang.org/api/dataflow/v1b3/dataflow-api.json +++ b/vendor/google.golang.org/api/dataflow/v1b3/dataflow-api.json @@ -168,7 +168,7 @@ "type": "string" }, "location": { - "description": "The location that contains this job.", + "description": "The [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that\ncontains this job.", "location": "query", "type": "string" }, @@ -213,7 +213,7 @@ ] }, "create": { - "description": "Creates a Cloud Dataflow job.", + "description": "Creates a Cloud Dataflow job.\n\nTo create a job, we recommend using `projects.locations.jobs.create` with a\n[regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using\n`projects.jobs.create` is not recommended, as your job will always start\nin `us-central1`.", "flatPath": "v1b3/projects/{projectId}/jobs", "httpMethod": "POST", "id": "dataflow.projects.jobs.create", @@ -222,7 +222,7 @@ ], "parameters": { "location": { - "description": "The location that contains this job.", + "description": "The [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that\ncontains this job.", "location": "query", "type": "string" }, @@ -264,7 +264,7 @@ ] }, "get": { - "description": "Gets the state of the specified Cloud Dataflow job.", + "description": "Gets the state of the specified Cloud Dataflow job.\n\nTo get the state of a job, we recommend using `projects.locations.jobs.get`\nwith a [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using\n`projects.jobs.get` is not recommended, as you can only get the state of\njobs that are running in `us-central1`.", "flatPath": "v1b3/projects/{projectId}/jobs/{jobId}", "httpMethod": "GET", "id": "dataflow.projects.jobs.get", @@ -280,7 +280,7 @@ "type": "string" }, "location": { - "description": "The location that contains this job.", + "description": "The [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that\ncontains this job.", "location": "query", "type": "string" }, @@ -314,7 +314,7 @@ ] }, "getMetrics": { - "description": "Request the job status.", + "description": "Request the job status.\n\nTo request the status of a job, we recommend using\n`projects.locations.jobs.getMetrics` with a [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using\n`projects.jobs.getMetrics` is not recommended, as you can only request the\nstatus of jobs that are running in `us-central1`.", "flatPath": "v1b3/projects/{projectId}/jobs/{jobId}/metrics", "httpMethod": "GET", "id": "dataflow.projects.jobs.getMetrics", @@ -330,7 +330,7 @@ "type": "string" }, "location": { - "description": "The location which contains the job specified by job_id.", + "description": "The [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that\ncontains the job specified by job_id.", "location": "query", "type": "string" }, @@ -359,7 +359,7 @@ ] }, "list": { - "description": "List the jobs of a project in a given region.", + "description": "List the jobs of a project.\n\nTo list the jobs of a project in a region, we recommend using\n`projects.locations.jobs.get` with a [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). To\nlist the all jobs across all regions, use `projects.jobs.aggregated`. Using\n`projects.jobs.list` is not recommended, as you can only get the list of\njobs that are running in `us-central1`.", "flatPath": "v1b3/projects/{projectId}/jobs", "httpMethod": "GET", "id": "dataflow.projects.jobs.list", @@ -379,7 +379,7 @@ "type": "string" }, "location": { - "description": "The location that contains this job.", + "description": "The [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that\ncontains this job.", "location": "query", "type": "string" }, @@ -461,7 +461,7 @@ ] }, "update": { - "description": "Updates the state of an existing Cloud Dataflow job.", + "description": "Updates the state of an existing Cloud Dataflow job.\n\nTo update the state of an existing job, we recommend using\n`projects.locations.jobs.update` with a [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using\n`projects.jobs.update` is not recommended, as you can only update the state\nof jobs that are running in `us-central1`.", "flatPath": "v1b3/projects/{projectId}/jobs/{jobId}", "httpMethod": "PUT", "id": "dataflow.projects.jobs.update", @@ -477,7 +477,7 @@ "type": "string" }, "location": { - "description": "The location that contains this job.", + "description": "The [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that\ncontains this job.", "location": "query", "type": "string" }, @@ -585,7 +585,7 @@ "messages": { "methods": { "list": { - "description": "Request the job status.", + "description": "Request the job status.\n\nTo request the status of a job, we recommend using\n`projects.locations.jobs.messages.list` with a [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using\n`projects.jobs.messages.list` is not recommended, as you can only request\nthe status of jobs that are running in `us-central1`.", "flatPath": "v1b3/projects/{projectId}/jobs/{jobId}/messages", "httpMethod": "GET", "id": "dataflow.projects.jobs.messages.list", @@ -607,7 +607,7 @@ "type": "string" }, "location": { - "description": "The location which contains the job specified by job_id.", + "description": "The [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that\ncontains the job specified by job_id.", "location": "query", "type": "string" }, @@ -754,7 +754,7 @@ ], "parameters": { "location": { - "description": "The location which contains the job", + "description": "The [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that\ncontains the job.", "location": "path", "required": true, "type": "string" @@ -785,7 +785,7 @@ "jobs": { "methods": { "create": { - "description": "Creates a Cloud Dataflow job.", + "description": "Creates a Cloud Dataflow job.\n\nTo create a job, we recommend using `projects.locations.jobs.create` with a\n[regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using\n`projects.jobs.create` is not recommended, as your job will always start\nin `us-central1`.", "flatPath": "v1b3/projects/{projectId}/locations/{location}/jobs", "httpMethod": "POST", "id": "dataflow.projects.locations.jobs.create", @@ -795,7 +795,7 @@ ], "parameters": { "location": { - "description": "The location that contains this job.", + "description": "The [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that\ncontains this job.", "location": "path", "required": true, "type": "string" @@ -838,7 +838,7 @@ ] }, "get": { - "description": "Gets the state of the specified Cloud Dataflow job.", + "description": "Gets the state of the specified Cloud Dataflow job.\n\nTo get the state of a job, we recommend using `projects.locations.jobs.get`\nwith a [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using\n`projects.jobs.get` is not recommended, as you can only get the state of\njobs that are running in `us-central1`.", "flatPath": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}", "httpMethod": "GET", "id": "dataflow.projects.locations.jobs.get", @@ -855,7 +855,7 @@ "type": "string" }, "location": { - "description": "The location that contains this job.", + "description": "The [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that\ncontains this job.", "location": "path", "required": true, "type": "string" @@ -890,7 +890,7 @@ ] }, "getMetrics": { - "description": "Request the job status.", + "description": "Request the job status.\n\nTo request the status of a job, we recommend using\n`projects.locations.jobs.getMetrics` with a [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using\n`projects.jobs.getMetrics` is not recommended, as you can only request the\nstatus of jobs that are running in `us-central1`.", "flatPath": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/metrics", "httpMethod": "GET", "id": "dataflow.projects.locations.jobs.getMetrics", @@ -907,7 +907,7 @@ "type": "string" }, "location": { - "description": "The location which contains the job specified by job_id.", + "description": "The [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that\ncontains the job specified by job_id.", "location": "path", "required": true, "type": "string" @@ -937,7 +937,7 @@ ] }, "list": { - "description": "List the jobs of a project in a given region.", + "description": "List the jobs of a project.\n\nTo list the jobs of a project in a region, we recommend using\n`projects.locations.jobs.get` with a [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). To\nlist the all jobs across all regions, use `projects.jobs.aggregated`. Using\n`projects.jobs.list` is not recommended, as you can only get the list of\njobs that are running in `us-central1`.", "flatPath": "v1b3/projects/{projectId}/locations/{location}/jobs", "httpMethod": "GET", "id": "dataflow.projects.locations.jobs.list", @@ -958,7 +958,7 @@ "type": "string" }, "location": { - "description": "The location that contains this job.", + "description": "The [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that\ncontains this job.", "location": "path", "required": true, "type": "string" @@ -1048,7 +1048,7 @@ ] }, "update": { - "description": "Updates the state of an existing Cloud Dataflow job.", + "description": "Updates the state of an existing Cloud Dataflow job.\n\nTo update the state of an existing job, we recommend using\n`projects.locations.jobs.update` with a [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using\n`projects.jobs.update` is not recommended, as you can only update the state\nof jobs that are running in `us-central1`.", "flatPath": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}", "httpMethod": "PUT", "id": "dataflow.projects.locations.jobs.update", @@ -1065,7 +1065,7 @@ "type": "string" }, "location": { - "description": "The location that contains this job.", + "description": "The [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that\ncontains this job.", "location": "path", "required": true, "type": "string" @@ -1113,7 +1113,7 @@ "type": "string" }, "location": { - "description": "The location which contains the job specified by job_id.", + "description": "The [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that\ncontains the job specified by job_id.", "location": "path", "required": true, "type": "string" @@ -1157,7 +1157,7 @@ "type": "string" }, "location": { - "description": "The location which contains the job specified by job_id.", + "description": "The [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that\ncontains the job specified by job_id.", "location": "path", "required": true, "type": "string" @@ -1188,7 +1188,7 @@ "messages": { "methods": { "list": { - "description": "Request the job status.", + "description": "Request the job status.\n\nTo request the status of a job, we recommend using\n`projects.locations.jobs.messages.list` with a [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using\n`projects.jobs.messages.list` is not recommended, as you can only request\nthe status of jobs that are running in `us-central1`.", "flatPath": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/messages", "httpMethod": "GET", "id": "dataflow.projects.locations.jobs.messages.list", @@ -1211,7 +1211,7 @@ "type": "string" }, "location": { - "description": "The location which contains the job specified by job_id.", + "description": "The [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that\ncontains the job specified by job_id.", "location": "path", "required": true, "type": "string" @@ -1286,7 +1286,7 @@ "type": "string" }, "location": { - "description": "The location which contains the WorkItem's job.", + "description": "The [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that\ncontains the WorkItem's job.", "location": "path", "required": true, "type": "string" @@ -1330,7 +1330,7 @@ "type": "string" }, "location": { - "description": "The location which contains the WorkItem's job.", + "description": "The [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that\ncontains the WorkItem's job.", "location": "path", "required": true, "type": "string" @@ -1373,7 +1373,7 @@ ], "parameters": { "location": { - "description": "The location to which to direct the request.", + "description": "The [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) to\nwhich to direct the request.", "location": "path", "required": true, "type": "string" @@ -1415,7 +1415,7 @@ "type": "string" }, "location": { - "description": "The location to which to direct the request.", + "description": "The [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) to\nwhich to direct the request.", "location": "path", "required": true, "type": "string" @@ -1472,7 +1472,7 @@ "type": "string" }, "location": { - "description": "The location to which to direct the request.", + "description": "The [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) to\nwhich to direct the request.", "location": "path", "required": true, "type": "string" @@ -1554,7 +1554,7 @@ "type": "string" }, "location": { - "description": "The location to which to direct the request.", + "description": "The [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) to\nwhich to direct the request.", "location": "query", "type": "string" }, @@ -1609,7 +1609,7 @@ "type": "string" }, "location": { - "description": "The location to which to direct the request.", + "description": "The [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) to\nwhich to direct the request.", "location": "query", "type": "string" }, @@ -1644,7 +1644,7 @@ } } }, - "revision": "20181212", + "revision": "20190322", "rootUrl": "https://dataflow.googleapis.com/", "schemas": { "ApproximateProgress": { @@ -2182,7 +2182,7 @@ "type": "string" }, "location": { - "description": "The location to which to direct the request.", + "description": "The [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) to\nwhich to direct the request.", "type": "string" }, "parameters": { @@ -2411,6 +2411,20 @@ }, "type": "array" }, + "flexResourceSchedulingGoal": { + "description": "Which Flexible Resource Scheduling mode to run in.", + "enum": [ + "FLEXRS_UNSPECIFIED", + "FLEXRS_SPEED_OPTIMIZED", + "FLEXRS_COST_OPTIMIZED" + ], + "enumDescriptions": [ + "Run in the default mode.", + "Optimize for lower execution time.", + "Optimize for lower cost." + ], + "type": "string" + }, "internalExperiments": { "additionalProperties": { "description": "Properties of the object. Contains field @type with type URL.", @@ -2431,6 +2445,10 @@ "description": "Identity to run virtual machines as. Defaults to the default account.", "type": "string" }, + "serviceKmsKeyName": { + "description": "If set, contains the Cloud KMS key identifier used to encrypt data\nat rest, AKA a Customer Managed Encryption Key (CMEK).\n\nFormat:\n projects/PROJECT_ID/locations/LOCATION/keyRings/KEY_RING/cryptoKeys/KEY", + "type": "string" + }, "tempStoragePrefix": { "description": "The prefix of the resources the system should use for temporary\nstorage. The system will append the suffix \"/temp-{JOBNAME} to\nthis resource prefix, where {JOBNAME} is the value of the\njob_name field. The resulting bucket and object prefix is used\nas the prefix of the resources used to store temporary data\nneeded during the job execution. NOTE: This will override the\nvalue in taskrunner_settings.\nThe supported resource type is:\n\nGoogle Cloud Storage:\n\n storage.googleapis.com/{bucket}/{object}\n bucket.storage.googleapis.com/{object}", "type": "string" @@ -2579,11 +2597,11 @@ "type": "object" }, "FailedLocation": { - "description": "Indicates which location failed to respond to a request for data.", + "description": "Indicates which [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) failed\nto respond to a request for data.", "id": "FailedLocation", "properties": { "name": { - "description": "The name of the failed location.", + "description": "The name of the [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that\nfailed to respond.", "type": "string" } }, @@ -2654,7 +2672,7 @@ "type": "string" }, "location": { - "description": "The location which contains the job specified by job_id.", + "description": "The [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that\ncontains the job specified by job_id.", "type": "string" }, "workerId": { @@ -2885,7 +2903,7 @@ "type": "object" }, "location": { - "description": "The location that contains this job.", + "description": "The [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that\ncontains this job.", "type": "string" }, "name": { @@ -3063,7 +3081,7 @@ "type": "object" }, "JobMetadata": { - "description": "Metadata available primarily for filtering jobs. Will be included in the\nListJob response and Job SUMMARY view+.", + "description": "Metadata available primarily for filtering jobs. Will be included in the\nListJob response and Job SUMMARY view.", "id": "JobMetadata", "properties": { "bigTableDetails": { @@ -3116,7 +3134,7 @@ "type": "object" }, "JobMetrics": { - "description": "JobMetrics contains a collection of metrics descibing the detailed progress\nof a Dataflow job. Metrics correspond to user-defined and system-defined\nmetrics in the job.\n\nThis resource captures only the most recent values of each metric;\ntime-series data can be queried for them (under the same metric names)\nfrom Cloud Monitoring.", + "description": "JobMetrics contains a collection of metrics describing the detailed progress\nof a Dataflow job. Metrics correspond to user-defined and system-defined\nmetrics in the job.\n\nThis resource captures only the most recent values of each metric;\ntime-series data can be queried for them (under the same metric names)\nfrom Cloud Monitoring.", "id": "JobMetrics", "properties": { "metricTime": { @@ -3223,7 +3241,7 @@ "type": "string" }, "location": { - "description": "The location which contains the WorkItem's job.", + "description": "The [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that\ncontains the WorkItem's job.", "type": "string" }, "requestedLeaseDuration": { @@ -3231,6 +3249,14 @@ "format": "google-duration", "type": "string" }, + "unifiedWorkerRequest": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Untranslated bag-of-bytes WorkRequest from UnifiedWorker.", + "type": "object" + }, "workItemTypes": { "description": "Filter for WorkItem type.", "items": { @@ -3256,6 +3282,14 @@ "description": "Response to a request to lease WorkItems.", "id": "LeaseWorkItemResponse", "properties": { + "unifiedWorkerResponse": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Untranslated bag-of-bytes WorkResponse for UnifiedWorker.", + "type": "object" + }, "workItems": { "description": "A list of the leased WorkItems.", "items": { @@ -3296,7 +3330,7 @@ "id": "ListJobsResponse", "properties": { "failedLocation": { - "description": "Zero or more messages describing locations that failed to respond.", + "description": "Zero or more messages describing the [regional endpoints]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that\nfailed to respond.", "items": { "$ref": "FailedLocation" }, @@ -3681,7 +3715,7 @@ "type": "object" }, "PipelineDescription": { - "description": "A descriptive representation of submitted pipeline as well as the executed\nform. This data is provided by the Dataflow service for ease of visualizing\nthe pipeline and interpretting Dataflow provided metrics.", + "description": "A descriptive representation of submitted pipeline as well as the executed\nform. This data is provided by the Dataflow service for ease of visualizing\nthe pipeline and interpreting Dataflow provided metrics.", "id": "PipelineDescription", "properties": { "displayData": { @@ -3812,9 +3846,17 @@ "type": "string" }, "location": { - "description": "The location which contains the WorkItem's job.", + "description": "The [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that\ncontains the WorkItem's job.", "type": "string" }, + "unifiedWorkerRequest": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Untranslated bag-of-bytes WorkProgressUpdateRequest from UnifiedWorker.", + "type": "object" + }, "workItemStatuses": { "description": "The order is unimportant, except that the order of the\nWorkItemServiceState messages in the ReportWorkItemStatusResponse\ncorresponds to the order of WorkItemStatus messages here.", "items": { @@ -3833,6 +3875,14 @@ "description": "Response from a request to report the status of WorkItems.", "id": "ReportWorkItemStatusResponse", "properties": { + "unifiedWorkerResponse": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Untranslated bag-of-bytes WorkProgressUpdateResponse for UnifiedWorker.", + "type": "object" + }, "workItemServiceStates": { "description": "A set of messages indicating the service-side state for each\nWorkItem whose status was reported, in the same order as the\nWorkItemStatus messages in the ReportWorkItemStatusRequest which\nresulting in this response.", "items": { @@ -3939,7 +3989,7 @@ "type": "object" }, "SdkVersion": { - "description": "The version of the SDK used to run the jobl", + "description": "The version of the SDK used to run the job.", "id": "SdkVersion", "properties": { "sdkSupportStatus": { @@ -3965,7 +4015,7 @@ "type": "string" }, "versionDisplayName": { - "description": "A readable string describing the version of the sdk.", + "description": "A readable string describing the version of the SDK.", "type": "string" } }, @@ -3984,7 +4034,7 @@ "type": "string" }, "location": { - "description": "The location which contains the job specified by job_id.", + "description": "The [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that\ncontains the job specified by job_id.", "type": "string" }, "workerId": { @@ -4005,7 +4055,7 @@ "id": "SendWorkerMessagesRequest", "properties": { "location": { - "description": "The location which contains the job", + "description": "The [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that\ncontains the job.", "type": "string" }, "workerMessages": { @@ -4521,7 +4571,7 @@ "type": "object" }, "Status": { - "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", + "description": "The `Status` type defines a logical error model that is suitable for\ndifferent programming environments, including REST APIs and RPC APIs. It is\nused by [gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error\nmessage, and error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", "id": "Status", "properties": { "code": { @@ -4630,6 +4680,13 @@ "systemName": { "description": "System defined name for this computation.", "type": "string" + }, + "transformUserNameToStateFamily": { + "additionalProperties": { + "type": "string" + }, + "description": "Map from user name of stateful transforms in this stage to their state\nfamily.", + "type": "object" } }, "type": "object" @@ -4691,6 +4748,11 @@ "description": "A task that carries configuration information for streaming computations.", "id": "StreamingConfigTask", "properties": { + "maxWorkItemCommitBytes": { + "description": "Maximum size for work item commit supported windmill storage layer.", + "format": "int64", + "type": "string" + }, "streamingComputationConfigs": { "description": "Set of computation configuration information.", "items": { @@ -4791,7 +4853,7 @@ "id": "StructuredMessage", "properties": { "messageKey": { - "description": "Idenfier for this message type. Used by external systems to\ninternationalize or personalize message.", + "description": "Identifier for this message type. Used by external systems to\ninternationalize or personalize message.", "type": "string" }, "messageText": { diff --git a/vendor/google.golang.org/api/dataflow/v1b3/dataflow-gen.go b/vendor/google.golang.org/api/dataflow/v1b3/dataflow-gen.go index a45ae2f2..01d8c59a 100644 --- a/vendor/google.golang.org/api/dataflow/v1b3/dataflow-gen.go +++ b/vendor/google.golang.org/api/dataflow/v1b3/dataflow-gen.go @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. All rights reserved. +// Copyright 2019 Google LLC. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. @@ -6,13 +6,39 @@ // Package dataflow provides access to the Dataflow API. // -// See https://cloud.google.com/dataflow +// For product documentation, see: https://cloud.google.com/dataflow +// +// Creating a client // // Usage example: // // import "google.golang.org/api/dataflow/v1b3" // ... -// dataflowService, err := dataflow.New(oauthHttpClient) +// ctx := context.Background() +// dataflowService, err := dataflow.NewService(ctx) +// +// In this example, Google Application Default Credentials are used for authentication. +// +// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// +// Other authentication options +// +// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// +// dataflowService, err := dataflow.NewService(ctx, option.WithScopes(dataflow.UserinfoEmailScope)) +// +// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// +// dataflowService, err := dataflow.NewService(ctx, option.WithAPIKey("AIza...")) +// +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// +// config := &oauth2.Config{...} +// // ... +// token, err := config.Exchange(ctx, ...) +// dataflowService, err := dataflow.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) +// +// See https://godoc.org/google.golang.org/api/option/ for details on options. package dataflow // import "google.golang.org/api/dataflow/v1b3" import ( @@ -29,6 +55,8 @@ import ( gensupport "google.golang.org/api/gensupport" googleapi "google.golang.org/api/googleapi" + option "google.golang.org/api/option" + htransport "google.golang.org/api/transport/http" ) // Always reference these packages, just in case the auto-generated code @@ -65,6 +93,35 @@ const ( UserinfoEmailScope = "https://www.googleapis.com/auth/userinfo.email" ) +// NewService creates a new Service. +func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { + scopesOption := option.WithScopes( + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly", + "https://www.googleapis.com/auth/userinfo.email", + ) + // NOTE: prepend, so we don't override user-specified scopes. + opts = append([]option.ClientOption{scopesOption}, opts...) + client, endpoint, err := htransport.NewClient(ctx, opts...) + if err != nil { + return nil, err + } + s, err := New(client) + if err != nil { + return nil, err + } + if endpoint != "" { + s.BasePath = endpoint + } + return s, nil +} + +// New creates a new Service. It uses the provided http.Client for requests. +// +// Deprecated: please use NewService instead. +// To provide a custom HTTP client, use option.WithHTTPClient. +// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. func New(client *http.Client) (*Service, error) { if client == nil { return nil, errors.New("client is nil") @@ -1125,7 +1182,11 @@ type CreateJobFromTemplateRequest struct { // JobName: Required. The job name to use for the created job. JobName string `json:"jobName,omitempty"` - // Location: The location to which to direct the request. + // Location: The [regional + // endpoint] + // (https://cloud.google.com/dataflow/docs/concepts/regional-en + // dpoints) to + // which to direct the request. Location string `json:"location,omitempty"` // Parameters: The runtime parameters to pass to the job. @@ -1572,6 +1633,15 @@ type Environment struct { // Experiments: The list of experiments to enable. Experiments []string `json:"experiments,omitempty"` + // FlexResourceSchedulingGoal: Which Flexible Resource Scheduling mode + // to run in. + // + // Possible values: + // "FLEXRS_UNSPECIFIED" - Run in the default mode. + // "FLEXRS_SPEED_OPTIMIZED" - Optimize for lower execution time. + // "FLEXRS_COST_OPTIMIZED" - Optimize for lower cost. + FlexResourceSchedulingGoal string `json:"flexResourceSchedulingGoal,omitempty"` + // InternalExperiments: Experimental settings. InternalExperiments googleapi.RawMessage `json:"internalExperiments,omitempty"` @@ -1588,6 +1658,16 @@ type Environment struct { // the default account. ServiceAccountEmail string `json:"serviceAccountEmail,omitempty"` + // ServiceKmsKeyName: If set, contains the Cloud KMS key identifier used + // to encrypt data + // at rest, AKA a Customer Managed Encryption Key (CMEK). + // + // Format: + // + // projects/PROJECT_ID/locations/LOCATION/keyRings/KEY_RING/cryptoKeys/KE + // Y + ServiceKmsKeyName string `json:"serviceKmsKeyName,omitempty"` + // TempStoragePrefix: The prefix of the resources the system should use // for temporary // storage. The system will append the suffix "/temp-{JOBNAME} to @@ -1817,10 +1897,17 @@ func (s *ExecutionStageSummary) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// FailedLocation: Indicates which location failed to respond to a -// request for data. +// FailedLocation: Indicates which [regional +// endpoint] +// (https://cloud.google.com/dataflow/docs/concepts/regional-en +// dpoints) failed +// to respond to a request for data. type FailedLocation struct { - // Name: The name of the failed location. + // Name: The name of the [regional + // endpoint] + // (https://cloud.google.com/dataflow/docs/concepts/regional-en + // dpoints) that + // failed to respond. Name string `json:"name,omitempty"` // ForceSendFields is a list of field names (e.g. "Name") to @@ -1986,7 +2073,11 @@ type GetDebugConfigRequest struct { // requested. ComponentId string `json:"componentId,omitempty"` - // Location: The location which contains the job specified by job_id. + // Location: The [regional + // endpoint] + // (https://cloud.google.com/dataflow/docs/concepts/regional-en + // dpoints) that + // contains the job specified by job_id. Location string `json:"location,omitempty"` // WorkerId: The worker id, i.e., VM hostname. @@ -2465,7 +2556,11 @@ type Job struct { // size. Labels map[string]string `json:"labels,omitempty"` - // Location: The location that contains this job. + // Location: The [regional + // endpoint] + // (https://cloud.google.com/dataflow/docs/concepts/regional-en + // dpoints) that + // contains this job. Location string `json:"location,omitempty"` // Name: The user-specified Cloud Dataflow job name. @@ -2820,7 +2915,7 @@ func (s *JobMessage) MarshalJSON() ([]byte, error) { // JobMetadata: Metadata available primarily for filtering jobs. Will be // included in the -// ListJob response and Job SUMMARY view+. +// ListJob response and Job SUMMARY view. type JobMetadata struct { // BigTableDetails: Identification of a BigTable source used in the // Dataflow job. @@ -2873,8 +2968,8 @@ func (s *JobMetadata) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// JobMetrics: JobMetrics contains a collection of metrics descibing the -// detailed progress +// JobMetrics: JobMetrics contains a collection of metrics describing +// the detailed progress // of a Dataflow job. Metrics correspond to user-defined and // system-defined // metrics in the job. @@ -3091,12 +3186,20 @@ type LeaseWorkItemRequest struct { // CurrentWorkerTime: The current timestamp at the worker. CurrentWorkerTime string `json:"currentWorkerTime,omitempty"` - // Location: The location which contains the WorkItem's job. + // Location: The [regional + // endpoint] + // (https://cloud.google.com/dataflow/docs/concepts/regional-en + // dpoints) that + // contains the WorkItem's job. Location string `json:"location,omitempty"` // RequestedLeaseDuration: The initial lease period. RequestedLeaseDuration string `json:"requestedLeaseDuration,omitempty"` + // UnifiedWorkerRequest: Untranslated bag-of-bytes WorkRequest from + // UnifiedWorker. + UnifiedWorkerRequest googleapi.RawMessage `json:"unifiedWorkerRequest,omitempty"` + // WorkItemTypes: Filter for WorkItem type. WorkItemTypes []string `json:"workItemTypes,omitempty"` @@ -3136,6 +3239,10 @@ func (s *LeaseWorkItemRequest) MarshalJSON() ([]byte, error) { // LeaseWorkItemResponse: Response to a request to lease WorkItems. type LeaseWorkItemResponse struct { + // UnifiedWorkerResponse: Untranslated bag-of-bytes WorkResponse for + // UnifiedWorker. + UnifiedWorkerResponse googleapi.RawMessage `json:"unifiedWorkerResponse,omitempty"` + // WorkItems: A list of the leased WorkItems. WorkItems []*WorkItem `json:"workItems,omitempty"` @@ -3143,20 +3250,22 @@ type LeaseWorkItemResponse struct { // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "WorkItems") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. + // "UnifiedWorkerResponse") to unconditionally include in API requests. + // By default, fields with empty values are omitted from API requests. + // However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "WorkItems") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "UnifiedWorkerResponse") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } @@ -3210,7 +3319,10 @@ func (s *ListJobMessagesResponse) MarshalJSON() ([]byte, error) { // This may be a partial // response, depending on the page size in the ListJobsRequest. type ListJobsResponse struct { - // FailedLocation: Zero or more messages describing locations that + // FailedLocation: Zero or more messages describing the [regional + // endpoints] + // (https://cloud.google.com/dataflow/docs/concepts/regional-e + // ndpoints) that // failed to respond. FailedLocation []*FailedLocation `json:"failedLocation,omitempty"` @@ -3867,7 +3979,7 @@ func (s *PartialGroupByKeyInstruction) MarshalJSON() ([]byte, error) { // pipeline as well as the executed // form. This data is provided by the Dataflow service for ease of // visualizing -// the pipeline and interpretting Dataflow provided metrics. +// the pipeline and interpreting Dataflow provided metrics. type PipelineDescription struct { // DisplayData: Pipeline level display data. DisplayData []*DisplayData `json:"displayData,omitempty"` @@ -4081,9 +4193,17 @@ type ReportWorkItemStatusRequest struct { // CurrentWorkerTime: The current timestamp at the worker. CurrentWorkerTime string `json:"currentWorkerTime,omitempty"` - // Location: The location which contains the WorkItem's job. + // Location: The [regional + // endpoint] + // (https://cloud.google.com/dataflow/docs/concepts/regional-en + // dpoints) that + // contains the WorkItem's job. Location string `json:"location,omitempty"` + // UnifiedWorkerRequest: Untranslated bag-of-bytes + // WorkProgressUpdateRequest from UnifiedWorker. + UnifiedWorkerRequest googleapi.RawMessage `json:"unifiedWorkerRequest,omitempty"` + // WorkItemStatuses: The order is unimportant, except that the order of // the // WorkItemServiceState messages in the @@ -4126,6 +4246,10 @@ func (s *ReportWorkItemStatusRequest) MarshalJSON() ([]byte, error) { // ReportWorkItemStatusResponse: Response from a request to report the // status of WorkItems. type ReportWorkItemStatusResponse struct { + // UnifiedWorkerResponse: Untranslated bag-of-bytes + // WorkProgressUpdateResponse for UnifiedWorker. + UnifiedWorkerResponse googleapi.RawMessage `json:"unifiedWorkerResponse,omitempty"` + // WorkItemServiceStates: A set of messages indicating the service-side // state for each // WorkItem whose status was reported, in the same order as @@ -4140,7 +4264,7 @@ type ReportWorkItemStatusResponse struct { googleapi.ServerResponse `json:"-"` // ForceSendFields is a list of field names (e.g. - // "WorkItemServiceStates") to unconditionally include in API requests. + // "UnifiedWorkerResponse") to unconditionally include in API requests. // By default, fields with empty values are omitted from API requests. // However, any non-pointer, non-interface field appearing in // ForceSendFields will be sent to the server regardless of whether the @@ -4148,7 +4272,7 @@ type ReportWorkItemStatusResponse struct { // Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "WorkItemServiceStates") to + // NullFields is a list of field names (e.g. "UnifiedWorkerResponse") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -4334,7 +4458,7 @@ func (s *RuntimeEnvironment) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// SdkVersion: The version of the SDK used to run the jobl +// SdkVersion: The version of the SDK used to run the job. type SdkVersion struct { // SdkSupportStatus: The support status for this SDK version. // @@ -4354,7 +4478,7 @@ type SdkVersion struct { Version string `json:"version,omitempty"` // VersionDisplayName: A readable string describing the version of the - // sdk. + // SDK. VersionDisplayName string `json:"versionDisplayName,omitempty"` // ForceSendFields is a list of field names (e.g. "SdkSupportStatus") to @@ -4390,7 +4514,11 @@ type SendDebugCaptureRequest struct { // Data: The encoded debug information. Data string `json:"data,omitempty"` - // Location: The location which contains the job specified by job_id. + // Location: The [regional + // endpoint] + // (https://cloud.google.com/dataflow/docs/concepts/regional-en + // dpoints) that + // contains the job specified by job_id. Location string `json:"location,omitempty"` // WorkerId: The worker id, i.e., VM hostname. @@ -4430,7 +4558,11 @@ type SendDebugCaptureResponse struct { // SendWorkerMessagesRequest: A request for sending worker messages to // the service. type SendWorkerMessagesRequest struct { - // Location: The location which contains the job + // Location: The [regional + // endpoint] + // (https://cloud.google.com/dataflow/docs/concepts/regional-en + // dpoints) that + // contains the job. Location string `json:"location,omitempty"` // WorkerMessages: The WorkerMessages to send. @@ -5385,20 +5517,20 @@ func (s *StateFamilyConfig) MarshalJSON() ([]byte, error) { } // Status: The `Status` type defines a logical error model that is -// suitable for different -// programming environments, including REST APIs and RPC APIs. It is -// used by -// [gRPC](https://github.com/grpc). The error model is designed to -// be: +// suitable for +// different programming environments, including REST APIs and RPC APIs. +// It is +// used by [gRPC](https://github.com/grpc). The error model is designed +// to be: // // - Simple to use and understand for most users // - Flexible enough to meet unexpected needs // // # Overview // -// The `Status` message contains three pieces of data: error code, error -// message, -// and error details. The error code should be an enum value +// The `Status` message contains three pieces of data: error code, +// error +// message, and error details. The error code should be an enum value // of // google.rpc.Code, but it may accept additional error codes if needed. // The @@ -5663,6 +5795,11 @@ type StreamingComputationConfig struct { // SystemName: System defined name for this computation. SystemName string `json:"systemName,omitempty"` + // TransformUserNameToStateFamily: Map from user name of stateful + // transforms in this stage to their state + // family. + TransformUserNameToStateFamily map[string]string `json:"transformUserNameToStateFamily,omitempty"` + // ForceSendFields is a list of field names (e.g. "ComputationId") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, @@ -5769,6 +5906,10 @@ func (s *StreamingComputationTask) MarshalJSON() ([]byte, error) { // StreamingConfigTask: A task that carries configuration information // for streaming computations. type StreamingConfigTask struct { + // MaxWorkItemCommitBytes: Maximum size for work item commit supported + // windmill storage layer. + MaxWorkItemCommitBytes int64 `json:"maxWorkItemCommitBytes,omitempty,string"` + // StreamingComputationConfigs: Set of computation configuration // information. StreamingComputationConfigs []*StreamingComputationConfig `json:"streamingComputationConfigs,omitempty"` @@ -5792,21 +5933,21 @@ type StreamingConfigTask struct { WindmillServicePort int64 `json:"windmillServicePort,omitempty,string"` // ForceSendFields is a list of field names (e.g. - // "StreamingComputationConfigs") to unconditionally include in API - // requests. By default, fields with empty values are omitted from API - // requests. However, any non-pointer, non-interface field appearing in + // "MaxWorkItemCommitBytes") to unconditionally include in API requests. + // By default, fields with empty values are omitted from API requests. + // However, any non-pointer, non-interface field appearing in // ForceSendFields will be sent to the server regardless of whether the // field is empty or not. This may be used to include empty fields in // Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. - // "StreamingComputationConfigs") to include in API requests with the - // JSON null value. By default, fields with empty values are omitted - // from API requests. However, any field with an empty value appearing - // in NullFields will be sent to the server as null. It is an error if a - // field in this list has a non-empty value. This may be used to include - // null fields in Patch requests. + // NullFields is a list of field names (e.g. "MaxWorkItemCommitBytes") + // to include in API requests with the JSON null value. By default, + // fields with empty values are omitted from API requests. However, any + // field with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } @@ -5962,8 +6103,8 @@ func (s *StringList) MarshalJSON() ([]byte, error) { // message for // programmatic consumption. type StructuredMessage struct { - // MessageKey: Idenfier for this message type. Used by external systems - // to + // MessageKey: Identifier for this message type. Used by external + // systems to // internationalize or personalize message. MessageKey string `json:"messageKey,omitempty"` @@ -7377,7 +7518,10 @@ func (c *ProjectsJobsAggregatedCall) Filter(filter string) *ProjectsJobsAggregat return c } -// Location sets the optional parameter "location": The location that +// Location sets the optional parameter "location": The [regional +// endpoint] +// (https://cloud.google.com/dataflow/docs/concepts/regional-en +// dpoints) that // contains this job. func (c *ProjectsJobsAggregatedCall) Location(location string) *ProjectsJobsAggregatedCall { c.urlParams_.Set("location", location) @@ -7533,7 +7677,7 @@ func (c *ProjectsJobsAggregatedCall) Do(opts ...googleapi.CallOption) (*ListJobs // "type": "string" // }, // "location": { - // "description": "The location that contains this job.", + // "description": "The [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that\ncontains this job.", // "location": "query", // "type": "string" // }, @@ -7613,6 +7757,16 @@ type ProjectsJobsCreateCall struct { } // Create: Creates a Cloud Dataflow job. +// +// To create a job, we recommend using `projects.locations.jobs.create` +// with a +// [regional +// endpoint] +// (https://cloud.google.com/dataflow/docs/concepts/regional-en +// dpoints). Using +// `projects.jobs.create` is not recommended, as your job will always +// start +// in `us-central1`. func (r *ProjectsJobsService) Create(projectId string, job *Job) *ProjectsJobsCreateCall { c := &ProjectsJobsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.projectId = projectId @@ -7620,7 +7774,10 @@ func (r *ProjectsJobsService) Create(projectId string, job *Job) *ProjectsJobsCr return c } -// Location sets the optional parameter "location": The location that +// Location sets the optional parameter "location": The [regional +// endpoint] +// (https://cloud.google.com/dataflow/docs/concepts/regional-en +// dpoints) that // contains this job. func (c *ProjectsJobsCreateCall) Location(location string) *ProjectsJobsCreateCall { c.urlParams_.Set("location", location) @@ -7737,7 +7894,7 @@ func (c *ProjectsJobsCreateCall) Do(opts ...googleapi.CallOption) (*Job, error) } return ret, nil // { - // "description": "Creates a Cloud Dataflow job.", + // "description": "Creates a Cloud Dataflow job.\n\nTo create a job, we recommend using `projects.locations.jobs.create` with a\n[regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using\n`projects.jobs.create` is not recommended, as your job will always start\nin `us-central1`.", // "flatPath": "v1b3/projects/{projectId}/jobs", // "httpMethod": "POST", // "id": "dataflow.projects.jobs.create", @@ -7746,7 +7903,7 @@ func (c *ProjectsJobsCreateCall) Do(opts ...googleapi.CallOption) (*Job, error) // ], // "parameters": { // "location": { - // "description": "The location that contains this job.", + // "description": "The [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that\ncontains this job.", // "location": "query", // "type": "string" // }, @@ -7803,6 +7960,16 @@ type ProjectsJobsGetCall struct { } // Get: Gets the state of the specified Cloud Dataflow job. +// +// To get the state of a job, we recommend using +// `projects.locations.jobs.get` +// with a [regional +// endpoint] +// (https://cloud.google.com/dataflow/docs/concepts/regional-en +// dpoints). Using +// `projects.jobs.get` is not recommended, as you can only get the state +// of +// jobs that are running in `us-central1`. func (r *ProjectsJobsService) Get(projectId string, jobId string) *ProjectsJobsGetCall { c := &ProjectsJobsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.projectId = projectId @@ -7810,7 +7977,10 @@ func (r *ProjectsJobsService) Get(projectId string, jobId string) *ProjectsJobsG return c } -// Location sets the optional parameter "location": The location that +// Location sets the optional parameter "location": The [regional +// endpoint] +// (https://cloud.google.com/dataflow/docs/concepts/regional-en +// dpoints) that // contains this job. func (c *ProjectsJobsGetCall) Location(location string) *ProjectsJobsGetCall { c.urlParams_.Set("location", location) @@ -7929,7 +8099,7 @@ func (c *ProjectsJobsGetCall) Do(opts ...googleapi.CallOption) (*Job, error) { } return ret, nil // { - // "description": "Gets the state of the specified Cloud Dataflow job.", + // "description": "Gets the state of the specified Cloud Dataflow job.\n\nTo get the state of a job, we recommend using `projects.locations.jobs.get`\nwith a [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using\n`projects.jobs.get` is not recommended, as you can only get the state of\njobs that are running in `us-central1`.", // "flatPath": "v1b3/projects/{projectId}/jobs/{jobId}", // "httpMethod": "GET", // "id": "dataflow.projects.jobs.get", @@ -7945,7 +8115,7 @@ func (c *ProjectsJobsGetCall) Do(opts ...googleapi.CallOption) (*Job, error) { // "type": "string" // }, // "location": { - // "description": "The location that contains this job.", + // "description": "The [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that\ncontains this job.", // "location": "query", // "type": "string" // }, @@ -7994,6 +8164,16 @@ type ProjectsJobsGetMetricsCall struct { } // GetMetrics: Request the job status. +// +// To request the status of a job, we recommend +// using +// `projects.locations.jobs.getMetrics` with a [regional +// endpoint] +// (https://cloud.google.com/dataflow/docs/concepts/regional-en +// dpoints). Using +// `projects.jobs.getMetrics` is not recommended, as you can only +// request the +// status of jobs that are running in `us-central1`. func (r *ProjectsJobsService) GetMetrics(projectId string, jobId string) *ProjectsJobsGetMetricsCall { c := &ProjectsJobsGetMetricsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.projectId = projectId @@ -8001,7 +8181,10 @@ func (r *ProjectsJobsService) GetMetrics(projectId string, jobId string) *Projec return c } -// Location sets the optional parameter "location": The location which +// Location sets the optional parameter "location": The [regional +// endpoint] +// (https://cloud.google.com/dataflow/docs/concepts/regional-en +// dpoints) that // contains the job specified by job_id. func (c *ProjectsJobsGetMetricsCall) Location(location string) *ProjectsJobsGetMetricsCall { c.urlParams_.Set("location", location) @@ -8115,7 +8298,7 @@ func (c *ProjectsJobsGetMetricsCall) Do(opts ...googleapi.CallOption) (*JobMetri } return ret, nil // { - // "description": "Request the job status.", + // "description": "Request the job status.\n\nTo request the status of a job, we recommend using\n`projects.locations.jobs.getMetrics` with a [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using\n`projects.jobs.getMetrics` is not recommended, as you can only request the\nstatus of jobs that are running in `us-central1`.", // "flatPath": "v1b3/projects/{projectId}/jobs/{jobId}/metrics", // "httpMethod": "GET", // "id": "dataflow.projects.jobs.getMetrics", @@ -8131,7 +8314,7 @@ func (c *ProjectsJobsGetMetricsCall) Do(opts ...googleapi.CallOption) (*JobMetri // "type": "string" // }, // "location": { - // "description": "The location which contains the job specified by job_id.", + // "description": "The [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that\ncontains the job specified by job_id.", // "location": "query", // "type": "string" // }, @@ -8173,7 +8356,19 @@ type ProjectsJobsListCall struct { header_ http.Header } -// List: List the jobs of a project in a given region. +// List: List the jobs of a project. +// +// To list the jobs of a project in a region, we recommend +// using +// `projects.locations.jobs.get` with a [regional +// endpoint] +// (https://cloud.google.com/dataflow/docs/concepts/regional-en +// dpoints). To +// list the all jobs across all regions, use `projects.jobs.aggregated`. +// Using +// `projects.jobs.list` is not recommended, as you can only get the list +// of +// jobs that are running in `us-central1`. func (r *ProjectsJobsService) List(projectId string) *ProjectsJobsListCall { c := &ProjectsJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.projectId = projectId @@ -8193,7 +8388,10 @@ func (c *ProjectsJobsListCall) Filter(filter string) *ProjectsJobsListCall { return c } -// Location sets the optional parameter "location": The location that +// Location sets the optional parameter "location": The [regional +// endpoint] +// (https://cloud.google.com/dataflow/docs/concepts/regional-en +// dpoints) that // contains this job. func (c *ProjectsJobsListCall) Location(location string) *ProjectsJobsListCall { c.urlParams_.Set("location", location) @@ -8329,7 +8527,7 @@ func (c *ProjectsJobsListCall) Do(opts ...googleapi.CallOption) (*ListJobsRespon } return ret, nil // { - // "description": "List the jobs of a project in a given region.", + // "description": "List the jobs of a project.\n\nTo list the jobs of a project in a region, we recommend using\n`projects.locations.jobs.get` with a [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). To\nlist the all jobs across all regions, use `projects.jobs.aggregated`. Using\n`projects.jobs.list` is not recommended, as you can only get the list of\njobs that are running in `us-central1`.", // "flatPath": "v1b3/projects/{projectId}/jobs", // "httpMethod": "GET", // "id": "dataflow.projects.jobs.list", @@ -8349,7 +8547,7 @@ func (c *ProjectsJobsListCall) Do(opts ...googleapi.CallOption) (*ListJobsRespon // "type": "string" // }, // "location": { - // "description": "The location that contains this job.", + // "description": "The [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that\ncontains this job.", // "location": "query", // "type": "string" // }, @@ -8581,6 +8779,16 @@ type ProjectsJobsUpdateCall struct { } // Update: Updates the state of an existing Cloud Dataflow job. +// +// To update the state of an existing job, we recommend +// using +// `projects.locations.jobs.update` with a [regional +// endpoint] +// (https://cloud.google.com/dataflow/docs/concepts/regional-en +// dpoints). Using +// `projects.jobs.update` is not recommended, as you can only update the +// state +// of jobs that are running in `us-central1`. func (r *ProjectsJobsService) Update(projectId string, jobId string, job *Job) *ProjectsJobsUpdateCall { c := &ProjectsJobsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.projectId = projectId @@ -8589,7 +8797,10 @@ func (r *ProjectsJobsService) Update(projectId string, jobId string, job *Job) * return c } -// Location sets the optional parameter "location": The location that +// Location sets the optional parameter "location": The [regional +// endpoint] +// (https://cloud.google.com/dataflow/docs/concepts/regional-en +// dpoints) that // contains this job. func (c *ProjectsJobsUpdateCall) Location(location string) *ProjectsJobsUpdateCall { c.urlParams_.Set("location", location) @@ -8687,7 +8898,7 @@ func (c *ProjectsJobsUpdateCall) Do(opts ...googleapi.CallOption) (*Job, error) } return ret, nil // { - // "description": "Updates the state of an existing Cloud Dataflow job.", + // "description": "Updates the state of an existing Cloud Dataflow job.\n\nTo update the state of an existing job, we recommend using\n`projects.locations.jobs.update` with a [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using\n`projects.jobs.update` is not recommended, as you can only update the state\nof jobs that are running in `us-central1`.", // "flatPath": "v1b3/projects/{projectId}/jobs/{jobId}", // "httpMethod": "PUT", // "id": "dataflow.projects.jobs.update", @@ -8703,7 +8914,7 @@ func (c *ProjectsJobsUpdateCall) Do(opts ...googleapi.CallOption) (*Job, error) // "type": "string" // }, // "location": { - // "description": "The location that contains this job.", + // "description": "The [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that\ncontains this job.", // "location": "query", // "type": "string" // }, @@ -9047,6 +9258,16 @@ type ProjectsJobsMessagesListCall struct { } // List: Request the job status. +// +// To request the status of a job, we recommend +// using +// `projects.locations.jobs.messages.list` with a [regional +// endpoint] +// (https://cloud.google.com/dataflow/docs/concepts/regional-en +// dpoints). Using +// `projects.jobs.messages.list` is not recommended, as you can only +// request +// the status of jobs that are running in `us-central1`. func (r *ProjectsJobsMessagesService) List(projectId string, jobId string) *ProjectsJobsMessagesListCall { c := &ProjectsJobsMessagesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.projectId = projectId @@ -9062,7 +9283,10 @@ func (c *ProjectsJobsMessagesListCall) EndTime(endTime string) *ProjectsJobsMess return c } -// Location sets the optional parameter "location": The location which +// Location sets the optional parameter "location": The [regional +// endpoint] +// (https://cloud.google.com/dataflow/docs/concepts/regional-en +// dpoints) that // contains the job specified by job_id. func (c *ProjectsJobsMessagesListCall) Location(location string) *ProjectsJobsMessagesListCall { c.urlParams_.Set("location", location) @@ -9210,7 +9434,7 @@ func (c *ProjectsJobsMessagesListCall) Do(opts ...googleapi.CallOption) (*ListJo } return ret, nil // { - // "description": "Request the job status.", + // "description": "Request the job status.\n\nTo request the status of a job, we recommend using\n`projects.locations.jobs.messages.list` with a [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using\n`projects.jobs.messages.list` is not recommended, as you can only request\nthe status of jobs that are running in `us-central1`.", // "flatPath": "v1b3/projects/{projectId}/jobs/{jobId}/messages", // "httpMethod": "GET", // "id": "dataflow.projects.jobs.messages.list", @@ -9232,7 +9456,7 @@ func (c *ProjectsJobsMessagesListCall) Do(opts ...googleapi.CallOption) (*ListJo // "type": "string" // }, // "location": { - // "description": "The location which contains the job specified by job_id.", + // "description": "The [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that\ncontains the job specified by job_id.", // "location": "query", // "type": "string" // }, @@ -9733,7 +9957,7 @@ func (c *ProjectsLocationsWorkerMessagesCall) Do(opts ...googleapi.CallOption) ( // ], // "parameters": { // "location": { - // "description": "The location which contains the job", + // "description": "The [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that\ncontains the job.", // "location": "path", // "required": true, // "type": "string" @@ -9775,6 +9999,16 @@ type ProjectsLocationsJobsCreateCall struct { } // Create: Creates a Cloud Dataflow job. +// +// To create a job, we recommend using `projects.locations.jobs.create` +// with a +// [regional +// endpoint] +// (https://cloud.google.com/dataflow/docs/concepts/regional-en +// dpoints). Using +// `projects.jobs.create` is not recommended, as your job will always +// start +// in `us-central1`. func (r *ProjectsLocationsJobsService) Create(projectId string, location string, job *Job) *ProjectsLocationsJobsCreateCall { c := &ProjectsLocationsJobsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.projectId = projectId @@ -9894,7 +10128,7 @@ func (c *ProjectsLocationsJobsCreateCall) Do(opts ...googleapi.CallOption) (*Job } return ret, nil // { - // "description": "Creates a Cloud Dataflow job.", + // "description": "Creates a Cloud Dataflow job.\n\nTo create a job, we recommend using `projects.locations.jobs.create` with a\n[regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using\n`projects.jobs.create` is not recommended, as your job will always start\nin `us-central1`.", // "flatPath": "v1b3/projects/{projectId}/locations/{location}/jobs", // "httpMethod": "POST", // "id": "dataflow.projects.locations.jobs.create", @@ -9904,7 +10138,7 @@ func (c *ProjectsLocationsJobsCreateCall) Do(opts ...googleapi.CallOption) (*Job // ], // "parameters": { // "location": { - // "description": "The location that contains this job.", + // "description": "The [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that\ncontains this job.", // "location": "path", // "required": true, // "type": "string" @@ -9963,6 +10197,16 @@ type ProjectsLocationsJobsGetCall struct { } // Get: Gets the state of the specified Cloud Dataflow job. +// +// To get the state of a job, we recommend using +// `projects.locations.jobs.get` +// with a [regional +// endpoint] +// (https://cloud.google.com/dataflow/docs/concepts/regional-en +// dpoints). Using +// `projects.jobs.get` is not recommended, as you can only get the state +// of +// jobs that are running in `us-central1`. func (r *ProjectsLocationsJobsService) Get(projectId string, location string, jobId string) *ProjectsLocationsJobsGetCall { c := &ProjectsLocationsJobsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.projectId = projectId @@ -10084,7 +10328,7 @@ func (c *ProjectsLocationsJobsGetCall) Do(opts ...googleapi.CallOption) (*Job, e } return ret, nil // { - // "description": "Gets the state of the specified Cloud Dataflow job.", + // "description": "Gets the state of the specified Cloud Dataflow job.\n\nTo get the state of a job, we recommend using `projects.locations.jobs.get`\nwith a [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using\n`projects.jobs.get` is not recommended, as you can only get the state of\njobs that are running in `us-central1`.", // "flatPath": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}", // "httpMethod": "GET", // "id": "dataflow.projects.locations.jobs.get", @@ -10101,7 +10345,7 @@ func (c *ProjectsLocationsJobsGetCall) Do(opts ...googleapi.CallOption) (*Job, e // "type": "string" // }, // "location": { - // "description": "The location that contains this job.", + // "description": "The [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that\ncontains this job.", // "location": "path", // "required": true, // "type": "string" @@ -10152,6 +10396,16 @@ type ProjectsLocationsJobsGetMetricsCall struct { } // GetMetrics: Request the job status. +// +// To request the status of a job, we recommend +// using +// `projects.locations.jobs.getMetrics` with a [regional +// endpoint] +// (https://cloud.google.com/dataflow/docs/concepts/regional-en +// dpoints). Using +// `projects.jobs.getMetrics` is not recommended, as you can only +// request the +// status of jobs that are running in `us-central1`. func (r *ProjectsLocationsJobsService) GetMetrics(projectId string, location string, jobId string) *ProjectsLocationsJobsGetMetricsCall { c := &ProjectsLocationsJobsGetMetricsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.projectId = projectId @@ -10268,7 +10522,7 @@ func (c *ProjectsLocationsJobsGetMetricsCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Request the job status.", + // "description": "Request the job status.\n\nTo request the status of a job, we recommend using\n`projects.locations.jobs.getMetrics` with a [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using\n`projects.jobs.getMetrics` is not recommended, as you can only request the\nstatus of jobs that are running in `us-central1`.", // "flatPath": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/metrics", // "httpMethod": "GET", // "id": "dataflow.projects.locations.jobs.getMetrics", @@ -10285,7 +10539,7 @@ func (c *ProjectsLocationsJobsGetMetricsCall) Do(opts ...googleapi.CallOption) ( // "type": "string" // }, // "location": { - // "description": "The location which contains the job specified by job_id.", + // "description": "The [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that\ncontains the job specified by job_id.", // "location": "path", // "required": true, // "type": "string" @@ -10329,7 +10583,19 @@ type ProjectsLocationsJobsListCall struct { header_ http.Header } -// List: List the jobs of a project in a given region. +// List: List the jobs of a project. +// +// To list the jobs of a project in a region, we recommend +// using +// `projects.locations.jobs.get` with a [regional +// endpoint] +// (https://cloud.google.com/dataflow/docs/concepts/regional-en +// dpoints). To +// list the all jobs across all regions, use `projects.jobs.aggregated`. +// Using +// `projects.jobs.list` is not recommended, as you can only get the list +// of +// jobs that are running in `us-central1`. func (r *ProjectsLocationsJobsService) List(projectId string, location string) *ProjectsLocationsJobsListCall { c := &ProjectsLocationsJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.projectId = projectId @@ -10480,7 +10746,7 @@ func (c *ProjectsLocationsJobsListCall) Do(opts ...googleapi.CallOption) (*ListJ } return ret, nil // { - // "description": "List the jobs of a project in a given region.", + // "description": "List the jobs of a project.\n\nTo list the jobs of a project in a region, we recommend using\n`projects.locations.jobs.get` with a [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). To\nlist the all jobs across all regions, use `projects.jobs.aggregated`. Using\n`projects.jobs.list` is not recommended, as you can only get the list of\njobs that are running in `us-central1`.", // "flatPath": "v1b3/projects/{projectId}/locations/{location}/jobs", // "httpMethod": "GET", // "id": "dataflow.projects.locations.jobs.list", @@ -10501,7 +10767,7 @@ func (c *ProjectsLocationsJobsListCall) Do(opts ...googleapi.CallOption) (*ListJ // "type": "string" // }, // "location": { - // "description": "The location that contains this job.", + // "description": "The [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that\ncontains this job.", // "location": "path", // "required": true, // "type": "string" @@ -10745,6 +11011,16 @@ type ProjectsLocationsJobsUpdateCall struct { } // Update: Updates the state of an existing Cloud Dataflow job. +// +// To update the state of an existing job, we recommend +// using +// `projects.locations.jobs.update` with a [regional +// endpoint] +// (https://cloud.google.com/dataflow/docs/concepts/regional-en +// dpoints). Using +// `projects.jobs.update` is not recommended, as you can only update the +// state +// of jobs that are running in `us-central1`. func (r *ProjectsLocationsJobsService) Update(projectId string, location string, jobId string, job *Job) *ProjectsLocationsJobsUpdateCall { c := &ProjectsLocationsJobsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.projectId = projectId @@ -10846,7 +11122,7 @@ func (c *ProjectsLocationsJobsUpdateCall) Do(opts ...googleapi.CallOption) (*Job } return ret, nil // { - // "description": "Updates the state of an existing Cloud Dataflow job.", + // "description": "Updates the state of an existing Cloud Dataflow job.\n\nTo update the state of an existing job, we recommend using\n`projects.locations.jobs.update` with a [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using\n`projects.jobs.update` is not recommended, as you can only update the state\nof jobs that are running in `us-central1`.", // "flatPath": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}", // "httpMethod": "PUT", // "id": "dataflow.projects.locations.jobs.update", @@ -10863,7 +11139,7 @@ func (c *ProjectsLocationsJobsUpdateCall) Do(opts ...googleapi.CallOption) (*Job // "type": "string" // }, // "location": { - // "description": "The location that contains this job.", + // "description": "The [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that\ncontains this job.", // "location": "path", // "required": true, // "type": "string" @@ -11025,7 +11301,7 @@ func (c *ProjectsLocationsJobsDebugGetConfigCall) Do(opts ...googleapi.CallOptio // "type": "string" // }, // "location": { - // "description": "The location which contains the job specified by job_id.", + // "description": "The [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that\ncontains the job specified by job_id.", // "location": "path", // "required": true, // "type": "string" @@ -11186,7 +11462,7 @@ func (c *ProjectsLocationsJobsDebugSendCaptureCall) Do(opts ...googleapi.CallOpt // "type": "string" // }, // "location": { - // "description": "The location which contains the job specified by job_id.", + // "description": "The [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that\ncontains the job specified by job_id.", // "location": "path", // "required": true, // "type": "string" @@ -11229,6 +11505,16 @@ type ProjectsLocationsJobsMessagesListCall struct { } // List: Request the job status. +// +// To request the status of a job, we recommend +// using +// `projects.locations.jobs.messages.list` with a [regional +// endpoint] +// (https://cloud.google.com/dataflow/docs/concepts/regional-en +// dpoints). Using +// `projects.jobs.messages.list` is not recommended, as you can only +// request +// the status of jobs that are running in `us-central1`. func (r *ProjectsLocationsJobsMessagesService) List(projectId string, location string, jobId string) *ProjectsLocationsJobsMessagesListCall { c := &ProjectsLocationsJobsMessagesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.projectId = projectId @@ -11387,7 +11673,7 @@ func (c *ProjectsLocationsJobsMessagesListCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Request the job status.", + // "description": "Request the job status.\n\nTo request the status of a job, we recommend using\n`projects.locations.jobs.messages.list` with a [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using\n`projects.jobs.messages.list` is not recommended, as you can only request\nthe status of jobs that are running in `us-central1`.", // "flatPath": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/messages", // "httpMethod": "GET", // "id": "dataflow.projects.locations.jobs.messages.list", @@ -11410,7 +11696,7 @@ func (c *ProjectsLocationsJobsMessagesListCall) Do(opts ...googleapi.CallOption) // "type": "string" // }, // "location": { - // "description": "The location which contains the job specified by job_id.", + // "description": "The [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that\ncontains the job specified by job_id.", // "location": "path", // "required": true, // "type": "string" @@ -11619,7 +11905,7 @@ func (c *ProjectsLocationsJobsWorkItemsLeaseCall) Do(opts ...googleapi.CallOptio // "type": "string" // }, // "location": { - // "description": "The location which contains the WorkItem's job.", + // "description": "The [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that\ncontains the WorkItem's job.", // "location": "path", // "required": true, // "type": "string" @@ -11781,7 +12067,7 @@ func (c *ProjectsLocationsJobsWorkItemsReportStatusCall) Do(opts ...googleapi.Ca // "type": "string" // }, // "location": { - // "description": "The location which contains the WorkItem's job.", + // "description": "The [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that\ncontains the WorkItem's job.", // "location": "path", // "required": true, // "type": "string" @@ -11932,7 +12218,7 @@ func (c *ProjectsLocationsTemplatesCreateCall) Do(opts ...googleapi.CallOption) // ], // "parameters": { // "location": { - // "description": "The location to which to direct the request.", + // "description": "The [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) to\nwhich to direct the request.", // "location": "path", // "required": true, // "type": "string" @@ -12114,7 +12400,7 @@ func (c *ProjectsLocationsTemplatesGetCall) Do(opts ...googleapi.CallOption) (*G // "type": "string" // }, // "location": { - // "description": "The location to which to direct the request.", + // "description": "The [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) to\nwhich to direct the request.", // "location": "path", // "required": true, // "type": "string" @@ -12320,7 +12606,7 @@ func (c *ProjectsLocationsTemplatesLaunchCall) Do(opts ...googleapi.CallOption) // "type": "string" // }, // "location": { - // "description": "The location to which to direct the request.", + // "description": "The [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) to\nwhich to direct the request.", // "location": "path", // "required": true, // "type": "string" @@ -12522,7 +12808,10 @@ func (c *ProjectsTemplatesGetCall) GcsPath(gcsPath string) *ProjectsTemplatesGet return c } -// Location sets the optional parameter "location": The location to +// Location sets the optional parameter "location": The [regional +// endpoint] +// (https://cloud.google.com/dataflow/docs/concepts/regional-en +// dpoints) to // which to direct the request. func (c *ProjectsTemplatesGetCall) Location(location string) *ProjectsTemplatesGetCall { c.urlParams_.Set("location", location) @@ -12651,7 +12940,7 @@ func (c *ProjectsTemplatesGetCall) Do(opts ...googleapi.CallOption) (*GetTemplat // "type": "string" // }, // "location": { - // "description": "The location to which to direct the request.", + // "description": "The [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) to\nwhich to direct the request.", // "location": "query", // "type": "string" // }, @@ -12730,7 +13019,10 @@ func (c *ProjectsTemplatesLaunchCall) GcsPath(gcsPath string) *ProjectsTemplates return c } -// Location sets the optional parameter "location": The location to +// Location sets the optional parameter "location": The [regional +// endpoint] +// (https://cloud.google.com/dataflow/docs/concepts/regional-en +// dpoints) to // which to direct the request. func (c *ProjectsTemplatesLaunchCall) Location(location string) *ProjectsTemplatesLaunchCall { c.urlParams_.Set("location", location) @@ -12859,7 +13151,7 @@ func (c *ProjectsTemplatesLaunchCall) Do(opts ...googleapi.CallOption) (*LaunchT // "type": "string" // }, // "location": { - // "description": "The location to which to direct the request.", + // "description": "The [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) to\nwhich to direct the request.", // "location": "query", // "type": "string" // }, diff --git a/vendor/google.golang.org/api/dataproc/v1/dataproc-api.json b/vendor/google.golang.org/api/dataproc/v1/dataproc-api.json index 52ad49f5..b0241691 100644 --- a/vendor/google.golang.org/api/dataproc/v1/dataproc-api.json +++ b/vendor/google.golang.org/api/dataproc/v1/dataproc-api.json @@ -1634,7 +1634,7 @@ } } }, - "revision": "20181207", + "revision": "20190301", "rootUrl": "https://dataproc.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -1662,7 +1662,7 @@ "description": "Unimplemented. The condition that is associated with this binding. NOTE: an unsatisfied condition will not allow user access via current binding. Different bindings, including their conditions, are examined independently." }, "members": { - "description": "Specifies the identities requesting access for a Cloud Platform resource. members can have the following values:\nallUsers: A special identifier that represents anyone who is on the internet; with or without a Google account.\nallAuthenticatedUsers: A special identifier that represents anyone who is authenticated with a Google account or a service account.\nuser:{emailid}: An email address that represents a specific Google account. For example, alice@gmail.com .\nserviceAccount:{emailid}: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com.\ngroup:{emailid}: An email address that represents a Google group. For example, admins@example.com.\ndomain:{domain}: A Google Apps domain name that represents all the users of that domain. For example, google.com or example.com.", + "description": "Specifies the identities requesting access for a Cloud Platform resource. members can have the following values:\nallUsers: A special identifier that represents anyone who is on the internet; with or without a Google account.\nallAuthenticatedUsers: A special identifier that represents anyone who is authenticated with a Google account or a service account.\nuser:{emailid}: An email address that represents a specific Google account. For example, alice@gmail.com .\nserviceAccount:{emailid}: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com.\ngroup:{emailid}: An email address that represents a Google group. For example, admins@example.com.\ndomain:{domain}: The G Suite domain (primary) that represents all the users of that domain. For example, google.com or example.com.", "items": { "type": "string" }, @@ -1731,7 +1731,7 @@ "id": "ClusterConfig", "properties": { "configBucket": { - "description": "Optional. A Cloud Storage staging bucket used for sharing generated SSH keys and config. If you do not specify a staging bucket, Cloud Dataproc will determine an appropriate Cloud Storage location (US, ASIA, or EU) for your cluster's staging bucket according to the Google Compute Engine zone where your cluster is deployed, and then it will create and manage this project-level, per-location bucket for you.", + "description": "Optional. A Google Cloud Storage bucket used to stage job dependencies, config files, and job driver console output. If you do not specify a staging bucket, Cloud Dataproc will determine a Cloud Storage location (US, ASIA, or EU) for your cluster's staging bucket according to the Google Compute Engine zone where your cluster is deployed, and then create and manage this project-level, per-location bucket (see Cloud Dataproc staging bucket).", "type": "string" }, "encryptionConfig": { @@ -1740,7 +1740,7 @@ }, "gceClusterConfig": { "$ref": "GceClusterConfig", - "description": "Required. The shared Compute Engine config settings for all instances in a cluster." + "description": "Optional. The shared Compute Engine config settings for all instances in a cluster." }, "initializationActions": { "description": "Optional. Commands to execute on each node after config is completed. By default, executables are run on master and all worker nodes. You can test a node's role metadata to run an executable on a master or worker node, as shown below using curl (you can also use wget):\nROLE=$(curl -H Metadata-Flavor:Google http://metadata/computeMetadata/v1/instance/attributes/dataproc-role)\nif [[ \"${ROLE}\" == 'Master' ]]; then\n ... master specific actions ...\nelse\n ... worker specific actions ...\nfi\n", @@ -2357,7 +2357,7 @@ "id": "JobReference", "properties": { "jobId": { - "description": "Optional. The job ID, which must be unique within the project. The job ID is generated by the server upon job submission or provided by the user as a means to perform retries without creating duplicate jobs. The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), or hyphens (-). The maximum length is 100 characters.", + "description": "Optional. The job ID, which must be unique within the project.The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), or hyphens (-). The maximum length is 100 characters.If not specified by the caller, the job ID will be provided by the server.", "type": "string" }, "projectId": { @@ -2864,11 +2864,32 @@ "description": "Optional. The version of software inside the cluster. It must be one of the supported Cloud Dataproc Versions, such as \"1.2\" (including a subminor version, such as \"1.2.29\"), or the \"preview\" version. If unspecified, it defaults to the latest version.", "type": "string" }, + "optionalComponents": { + "description": "The set of optional components to activate on the cluster.", + "enumDescriptions": [ + "Unspecified component.", + "The Anaconda python distribution.", + "The Hive Web HCatalog (the REST service for accessing HCatalog).", + "The Jupyter Notebook.", + "The Zeppelin notebook." + ], + "items": { + "enum": [ + "COMPONENT_UNSPECIFIED", + "ANACONDA", + "HIVE_WEBHCAT", + "JUPYTER", + "ZEPPELIN" + ], + "type": "string" + }, + "type": "array" + }, "properties": { "additionalProperties": { "type": "string" }, - "description": "Optional. The properties to set on daemon config files.Property keys are specified in prefix:property format, such as core:fs.defaultFS. The following are supported prefixes and their mappings:\ncapacity-scheduler: capacity-scheduler.xml\ncore: core-site.xml\ndistcp: distcp-default.xml\nhdfs: hdfs-site.xml\nhive: hive-site.xml\nmapred: mapred-site.xml\npig: pig.properties\nspark: spark-defaults.conf\nyarn: yarn-site.xmlFor more information, see Cluster properties.", + "description": "Optional. The properties to set on daemon config files.Property keys are specified in prefix:property format, for example core:hadoop.tmp.dir. The following are supported prefixes and their mappings:\ncapacity-scheduler: capacity-scheduler.xml\ncore: core-site.xml\ndistcp: distcp-default.xml\nhdfs: hdfs-site.xml\nhive: hive-site.xml\nmapred: mapred-site.xml\npig: pig.properties\nspark: spark-defaults.conf\nyarn: yarn-site.xmlFor more information, see Cluster properties.", "type": "object" } }, diff --git a/vendor/google.golang.org/api/dataproc/v1/dataproc-gen.go b/vendor/google.golang.org/api/dataproc/v1/dataproc-gen.go index 8898d06f..f1cafb08 100644 --- a/vendor/google.golang.org/api/dataproc/v1/dataproc-gen.go +++ b/vendor/google.golang.org/api/dataproc/v1/dataproc-gen.go @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. All rights reserved. +// Copyright 2019 Google LLC. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. @@ -8,13 +8,35 @@ // // This package is DEPRECATED. Use package cloud.google.com/go/dataproc/apiv1 instead. // -// See https://cloud.google.com/dataproc/ +// For product documentation, see: https://cloud.google.com/dataproc/ +// +// Creating a client // // Usage example: // // import "google.golang.org/api/dataproc/v1" // ... -// dataprocService, err := dataproc.New(oauthHttpClient) +// ctx := context.Background() +// dataprocService, err := dataproc.NewService(ctx) +// +// In this example, Google Application Default Credentials are used for authentication. +// +// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// +// Other authentication options +// +// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// +// dataprocService, err := dataproc.NewService(ctx, option.WithAPIKey("AIza...")) +// +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// +// config := &oauth2.Config{...} +// // ... +// token, err := config.Exchange(ctx, ...) +// dataprocService, err := dataproc.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) +// +// See https://godoc.org/google.golang.org/api/option/ for details on options. package dataproc // import "google.golang.org/api/dataproc/v1" import ( @@ -31,6 +53,8 @@ import ( gensupport "google.golang.org/api/gensupport" googleapi "google.golang.org/api/googleapi" + option "google.golang.org/api/option" + htransport "google.golang.org/api/transport/http" ) // Always reference these packages, just in case the auto-generated code @@ -58,6 +82,32 @@ const ( CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" ) +// NewService creates a new Service. +func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { + scopesOption := option.WithScopes( + "https://www.googleapis.com/auth/cloud-platform", + ) + // NOTE: prepend, so we don't override user-specified scopes. + opts = append([]option.ClientOption{scopesOption}, opts...) + client, endpoint, err := htransport.NewClient(ctx, opts...) + if err != nil { + return nil, err + } + s, err := New(client) + if err != nil { + return nil, err + } + if endpoint != "" { + s.BasePath = endpoint + } + return s, nil +} + +// New creates a new Service. It uses the provided http.Client for requests. +// +// Deprecated: please use NewService instead. +// To provide a custom HTTP client, use option.WithHTTPClient. +// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. func New(client *http.Client) (*Service, error) { if client == nil { return nil, errors.New("client is nil") @@ -242,8 +292,8 @@ type Binding struct { // my-other-app@appspot.gserviceaccount.com. // group:{emailid}: An email address that represents a Google group. // For example, admins@example.com. - // domain:{domain}: A Google Apps domain name that represents all the - // users of that domain. For example, google.com or example.com. + // domain:{domain}: The G Suite domain (primary) that represents all the + // users of that domain. For example, google.com or example.com. Members []string `json:"members,omitempty"` // Role: Role that is assigned to members. For example, roles/viewer, @@ -345,19 +395,19 @@ func (s *Cluster) MarshalJSON() ([]byte, error) { // ClusterConfig: The cluster config. type ClusterConfig struct { - // ConfigBucket: Optional. A Cloud Storage staging bucket used for - // sharing generated SSH keys and config. If you do not specify a - // staging bucket, Cloud Dataproc will determine an appropriate Cloud - // Storage location (US, ASIA, or EU) for your cluster's staging bucket - // according to the Google Compute Engine zone where your cluster is - // deployed, and then it will create and manage this project-level, - // per-location bucket for you. + // ConfigBucket: Optional. A Google Cloud Storage bucket used to stage + // job dependencies, config files, and job driver console output. If you + // do not specify a staging bucket, Cloud Dataproc will determine a + // Cloud Storage location (US, ASIA, or EU) for your cluster's staging + // bucket according to the Google Compute Engine zone where your cluster + // is deployed, and then create and manage this project-level, + // per-location bucket (see Cloud Dataproc staging bucket). ConfigBucket string `json:"configBucket,omitempty"` // EncryptionConfig: Optional. Encryption settings for the cluster. EncryptionConfig *EncryptionConfig `json:"encryptionConfig,omitempty"` - // GceClusterConfig: Required. The shared Compute Engine config settings + // GceClusterConfig: Optional. The shared Compute Engine config settings // for all instances in a cluster. GceClusterConfig *GceClusterConfig `json:"gceClusterConfig,omitempty"` @@ -1336,12 +1386,11 @@ func (s *JobPlacement) MarshalJSON() ([]byte, error) { // JobReference: Encapsulates the full scoping used to reference a job. type JobReference struct { - // JobId: Optional. The job ID, which must be unique within the project. - // The job ID is generated by the server upon job submission or provided - // by the user as a means to perform retries without creating duplicate - // jobs. The ID must contain only letters (a-z, A-Z), numbers (0-9), + // JobId: Optional. The job ID, which must be unique within the + // project.The ID must contain only letters (a-z, A-Z), numbers (0-9), // underscores (_), or hyphens (-). The maximum length is 100 - // characters. + // characters.If not specified by the caller, the job ID will be + // provided by the server. JobId string `json:"jobId,omitempty"` // ProjectId: Required. The ID of the Google Cloud Platform project that @@ -2246,10 +2295,22 @@ type SoftwareConfig struct { // "preview" version. If unspecified, it defaults to the latest version. ImageVersion string `json:"imageVersion,omitempty"` + // OptionalComponents: The set of optional components to activate on the + // cluster. + // + // Possible values: + // "COMPONENT_UNSPECIFIED" - Unspecified component. + // "ANACONDA" - The Anaconda python distribution. + // "HIVE_WEBHCAT" - The Hive Web HCatalog (the REST service for + // accessing HCatalog). + // "JUPYTER" - The Jupyter Notebook. + // "ZEPPELIN" - The Zeppelin notebook. + OptionalComponents []string `json:"optionalComponents,omitempty"` + // Properties: Optional. The properties to set on daemon config - // files.Property keys are specified in prefix:property format, such as - // core:fs.defaultFS. The following are supported prefixes and their - // mappings: + // files.Property keys are specified in prefix:property format, for + // example core:hadoop.tmp.dir. The following are supported prefixes and + // their mappings: // capacity-scheduler: capacity-scheduler.xml // core: core-site.xml // distcp: distcp-default.xml diff --git a/vendor/google.golang.org/api/dns/v1/dns-api.json b/vendor/google.golang.org/api/dns/v1/dns-api.json index ab721983..a663247b 100644 --- a/vendor/google.golang.org/api/dns/v1/dns-api.json +++ b/vendor/google.golang.org/api/dns/v1/dns-api.json @@ -23,7 +23,7 @@ "description": "Configures and serves authoritative DNS records.", "discoveryVersion": "v1", "documentationLink": "https://developers.google.com/cloud-dns", - "etag": "\"J3WqvAcMk4eQjJXvfSI4Yr8VouA/EQMOijfSxjBH7q8fB_7QzVLzbgs\"", + "etag": "\"VPK3KBfpaEgZ16pozGOoMYfKc0U/lpqiZRIZVeruudGbozkBqz2t94g\"", "icons": { "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" @@ -760,11 +760,11 @@ } } }, - "revision": "20180808", + "revision": "20190418", "rootUrl": "https://www.googleapis.com/", "schemas": { "Change": { - "description": "An atomic update to a collection of ResourceRecordSets.", + "description": "A Change represents a set of ResourceRecordSet additions and deletions applied atomically to a ManagedZone. ResourceRecordSets within a ManagedZone are modified by creating a new Change element in the Changes collection. In turn the Changes collection also records the past modifications to the ResourceRecordSets in a ManagedZone. The current state of the ManagedZone is the sum effect of applying all Change elements in the Changes collection in sequence.", "id": "Change", "properties": { "additions": { @@ -799,7 +799,7 @@ "type": "string" }, "status": { - "description": "Status of the operation (output only).", + "description": "Status of the operation (output only). A status of \"done\" means that the request to update the authoritative servers has been sent, but the servers might not be updated yet.", "enum": [ "done", "pending" @@ -970,7 +970,7 @@ "type": "integer" }, "keyType": { - "description": "One of \"KEY_SIGNING\" or \"ZONE_SIGNING\". Keys of type KEY_SIGNING have the Secure Entry Point flag set and, when active, will be used to sign only resource record sets of type DNSKEY. Otherwise, the Secure Entry Point flag will be cleared and this key will be used to sign only resource record sets of other types.", + "description": "Specifies whether this is a key signing key (KSK) or a zone signing key (ZSK). Key signing keys have the Secure Entry Point flag set and, when active, will only be used to sign resource record sets of type DNSKEY. Zone signing keys do not have the Secure Entry Point flag set and will be used to sign all other types of resource record sets.", "enum": [ "keySigning", "zoneSigning" @@ -1066,6 +1066,22 @@ "type": "string" }, "type": "array" + }, + "privateVisibilityConfig": { + "$ref": "ManagedZonePrivateVisibilityConfig", + "description": "For privately visible zones, the set of Virtual Private Cloud resources that the zone is visible from." + }, + "visibility": { + "description": "The zone's visibility: public zones are exposed to the Internet, while private zones are visible only to Virtual Private Cloud resources.", + "enum": [ + "private", + "public" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" } }, "type": "object" @@ -1139,6 +1155,39 @@ }, "type": "object" }, + "ManagedZonePrivateVisibilityConfig": { + "id": "ManagedZonePrivateVisibilityConfig", + "properties": { + "kind": { + "default": "dns#managedZonePrivateVisibilityConfig", + "description": "Identifies what kind of resource this is. Value: the fixed string \"dns#managedZonePrivateVisibilityConfig\".", + "type": "string" + }, + "networks": { + "description": "The list of VPC networks that can see this zone.", + "items": { + "$ref": "ManagedZonePrivateVisibilityConfigNetwork" + }, + "type": "array" + } + }, + "type": "object" + }, + "ManagedZonePrivateVisibilityConfigNetwork": { + "id": "ManagedZonePrivateVisibilityConfigNetwork", + "properties": { + "kind": { + "default": "dns#managedZonePrivateVisibilityConfigNetwork", + "description": "Identifies what kind of resource this is. Value: the fixed string \"dns#managedZonePrivateVisibilityConfigNetwork\".", + "type": "string" + }, + "networkUrl": { + "description": "The fully qualified URL of the VPC network to bind to. This should be formatted like https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}", + "type": "string" + } + }, + "type": "object" + }, "ManagedZonesListResponse": { "id": "ManagedZonesListResponse", "properties": { @@ -1186,7 +1235,7 @@ "type": "string" }, "status": { - "description": "Status of the operation. Can be one of the following: \"PENDING\" or \"DONE\" (output only).", + "description": "Status of the operation. Can be one of the following: \"PENDING\" or \"DONE\" (output only). A status of \"DONE\" means that the request to update the authoritative servers has been sent, but the servers might not be updated yet.", "enum": [ "done", "pending" @@ -1284,6 +1333,16 @@ "format": "int32", "type": "integer" }, + "managedZonesPerNetwork": { + "description": "Maximum allowed number of managed zones which can be attached to a network.", + "format": "int32", + "type": "integer" + }, + "networksPerManagedZone": { + "description": "Maximum allowed number of networks to which a privately scoped zone can be attached.", + "format": "int32", + "type": "integer" + }, "resourceRecordsPerRrset": { "description": "Maximum allowed number of ResourceRecords per ResourceRecordSet.", "format": "int32", @@ -1333,7 +1392,7 @@ "type": "string" }, "rrdatas": { - "description": "As defined in RFC 1035 (section 5) and RFC 1034 (section 3.6.1).", + "description": "As defined in RFC 1035 (section 5) and RFC 1034 (section 3.6.1) -- see examples.", "items": { "type": "string" }, @@ -1352,7 +1411,7 @@ "type": "integer" }, "type": { - "description": "The identifier of a supported record type, for example, A, AAAA, MX, TXT, and so on.", + "description": "The identifier of a supported record type. See the list of Supported DNS record types.", "type": "string" } }, diff --git a/vendor/google.golang.org/api/dns/v1/dns-gen.go b/vendor/google.golang.org/api/dns/v1/dns-gen.go index 9bee01d8..f900962e 100644 --- a/vendor/google.golang.org/api/dns/v1/dns-gen.go +++ b/vendor/google.golang.org/api/dns/v1/dns-gen.go @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. All rights reserved. +// Copyright 2019 Google LLC. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. @@ -6,13 +6,39 @@ // Package dns provides access to the Google Cloud DNS API. // -// See https://developers.google.com/cloud-dns +// For product documentation, see: https://developers.google.com/cloud-dns +// +// Creating a client // // Usage example: // // import "google.golang.org/api/dns/v1" // ... -// dnsService, err := dns.New(oauthHttpClient) +// ctx := context.Background() +// dnsService, err := dns.NewService(ctx) +// +// In this example, Google Application Default Credentials are used for authentication. +// +// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// +// Other authentication options +// +// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// +// dnsService, err := dns.NewService(ctx, option.WithScopes(dns.NdevClouddnsReadwriteScope)) +// +// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// +// dnsService, err := dns.NewService(ctx, option.WithAPIKey("AIza...")) +// +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// +// config := &oauth2.Config{...} +// // ... +// token, err := config.Exchange(ctx, ...) +// dnsService, err := dns.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) +// +// See https://godoc.org/google.golang.org/api/option/ for details on options. package dns // import "google.golang.org/api/dns/v1" import ( @@ -29,6 +55,8 @@ import ( gensupport "google.golang.org/api/gensupport" googleapi "google.golang.org/api/googleapi" + option "google.golang.org/api/option" + htransport "google.golang.org/api/transport/http" ) // Always reference these packages, just in case the auto-generated code @@ -65,6 +93,35 @@ const ( NdevClouddnsReadwriteScope = "https://www.googleapis.com/auth/ndev.clouddns.readwrite" ) +// NewService creates a new Service. +func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { + scopesOption := option.WithScopes( + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/ndev.clouddns.readonly", + "https://www.googleapis.com/auth/ndev.clouddns.readwrite", + ) + // NOTE: prepend, so we don't override user-specified scopes. + opts = append([]option.ClientOption{scopesOption}, opts...) + client, endpoint, err := htransport.NewClient(ctx, opts...) + if err != nil { + return nil, err + } + s, err := New(client) + if err != nil { + return nil, err + } + if endpoint != "" { + s.BasePath = endpoint + } + return s, nil +} + +// New creates a new Service. It uses the provided http.Client for requests. +// +// Deprecated: please use NewService instead. +// To provide a custom HTTP client, use option.WithHTTPClient. +// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. func New(client *http.Client) (*Service, error) { if client == nil { return nil, errors.New("client is nil") @@ -158,7 +215,13 @@ type ResourceRecordSetsService struct { s *Service } -// Change: An atomic update to a collection of ResourceRecordSets. +// Change: A Change represents a set of ResourceRecordSet additions and +// deletions applied atomically to a ManagedZone. ResourceRecordSets +// within a ManagedZone are modified by creating a new Change element in +// the Changes collection. In turn the Changes collection also records +// the past modifications to the ResourceRecordSets in a ManagedZone. +// The current state of the ManagedZone is the sum effect of applying +// all Change elements in the Changes collection in sequence. type Change struct { // Additions: Which ResourceRecordSets to add? Additions []*ResourceRecordSet `json:"additions,omitempty"` @@ -182,7 +245,9 @@ type Change struct { // (output only). This is in RFC3339 text format. StartTime string `json:"startTime,omitempty"` - // Status: Status of the operation (output only). + // Status: Status of the operation (output only). A status of "done" + // means that the request to update the authoritative servers has been + // sent, but the servers might not be updated yet. // // Possible values: // "done" @@ -416,11 +481,12 @@ type DnsKeySpec struct { // KeyLength: Length of the keys in bits. KeyLength int64 `json:"keyLength,omitempty"` - // KeyType: One of "KEY_SIGNING" or "ZONE_SIGNING". Keys of type - // KEY_SIGNING have the Secure Entry Point flag set and, when active, - // will be used to sign only resource record sets of type DNSKEY. - // Otherwise, the Secure Entry Point flag will be cleared and this key - // will be used to sign only resource record sets of other types. + // KeyType: Specifies whether this is a key signing key (KSK) or a zone + // signing key (ZSK). Key signing keys have the Secure Entry Point flag + // set and, when active, will only be used to sign resource record sets + // of type DNSKEY. Zone signing keys do not have the Secure Entry Point + // flag set and will be used to sign all other types of resource record + // sets. // // Possible values: // "keySigning" @@ -551,6 +617,19 @@ type ManagedZone struct { // servers; defined by the server (output only) NameServers []string `json:"nameServers,omitempty"` + // PrivateVisibilityConfig: For privately visible zones, the set of + // Virtual Private Cloud resources that the zone is visible from. + PrivateVisibilityConfig *ManagedZonePrivateVisibilityConfig `json:"privateVisibilityConfig,omitempty"` + + // Visibility: The zone's visibility: public zones are exposed to the + // Internet, while private zones are visible only to Virtual Private + // Cloud resources. + // + // Possible values: + // "private" + // "public" + Visibility string `json:"visibility,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -677,6 +756,70 @@ func (s *ManagedZoneOperationsListResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type ManagedZonePrivateVisibilityConfig struct { + // Kind: Identifies what kind of resource this is. Value: the fixed + // string "dns#managedZonePrivateVisibilityConfig". + Kind string `json:"kind,omitempty"` + + // Networks: The list of VPC networks that can see this zone. + Networks []*ManagedZonePrivateVisibilityConfigNetwork `json:"networks,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Kind") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Kind") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ManagedZonePrivateVisibilityConfig) MarshalJSON() ([]byte, error) { + type NoMethod ManagedZonePrivateVisibilityConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type ManagedZonePrivateVisibilityConfigNetwork struct { + // Kind: Identifies what kind of resource this is. Value: the fixed + // string "dns#managedZonePrivateVisibilityConfigNetwork". + Kind string `json:"kind,omitempty"` + + // NetworkUrl: The fully qualified URL of the VPC network to bind to. + // This should be formatted like + // https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network} + NetworkUrl string `json:"networkUrl,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Kind") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Kind") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ManagedZonePrivateVisibilityConfigNetwork) MarshalJSON() ([]byte, error) { + type NoMethod ManagedZonePrivateVisibilityConfigNetwork + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type ManagedZonesListResponse struct { Header *ResponseHeader `json:"header,omitempty"` @@ -752,7 +895,9 @@ type Operation struct { StartTime string `json:"startTime,omitempty"` // Status: Status of the operation. Can be one of the following: - // "PENDING" or "DONE" (output only). + // "PENDING" or "DONE" (output only). A status of "DONE" means that the + // request to update the authoritative servers has been sent, but the + // servers might not be updated yet. // // Possible values: // "done" @@ -917,6 +1062,14 @@ type Quota struct { // ManagedZones: Maximum allowed number of managed zones in the project. ManagedZones int64 `json:"managedZones,omitempty"` + // ManagedZonesPerNetwork: Maximum allowed number of managed zones which + // can be attached to a network. + ManagedZonesPerNetwork int64 `json:"managedZonesPerNetwork,omitempty"` + + // NetworksPerManagedZone: Maximum allowed number of networks to which a + // privately scoped zone can be attached. + NetworksPerManagedZone int64 `json:"networksPerManagedZone,omitempty"` + // ResourceRecordsPerRrset: Maximum allowed number of ResourceRecords // per ResourceRecordSet. ResourceRecordsPerRrset int64 `json:"resourceRecordsPerRrset,omitempty"` @@ -977,7 +1130,7 @@ type ResourceRecordSet struct { Name string `json:"name,omitempty"` // Rrdatas: As defined in RFC 1035 (section 5) and RFC 1034 (section - // 3.6.1). + // 3.6.1) -- see examples. Rrdatas []string `json:"rrdatas,omitempty"` // SignatureRrdatas: As defined in RFC 4034 (section 3.2). @@ -987,8 +1140,8 @@ type ResourceRecordSet struct { // resolvers. Ttl int64 `json:"ttl,omitempty"` - // Type: The identifier of a supported record type, for example, A, - // AAAA, MX, TXT, and so on. + // Type: The identifier of a supported record type. See the list of + // Supported DNS record types. Type string `json:"type,omitempty"` // ForceSendFields is a list of field names (e.g. "Kind") to diff --git a/vendor/google.golang.org/api/dns/v1beta2/dns-api.json b/vendor/google.golang.org/api/dns/v1beta2/dns-api.json index 0ba0e3df..d563104a 100644 --- a/vendor/google.golang.org/api/dns/v1beta2/dns-api.json +++ b/vendor/google.golang.org/api/dns/v1beta2/dns-api.json @@ -23,7 +23,7 @@ "description": "Configures and serves authoritative DNS records.", "discoveryVersion": "v1", "documentationLink": "https://developers.google.com/cloud-dns", - "etag": "\"J3WqvAcMk4eQjJXvfSI4Yr8VouA/tjeOYqIojF-Ch7P-2UE6XgpQAfQ\"", + "etag": "\"VPK3KBfpaEgZ16pozGOoMYfKc0U/5ETkYc51ldAG_lBus_hxlXlq9uQ\"", "icons": { "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" @@ -982,11 +982,11 @@ } } }, - "revision": "20181115", + "revision": "20190418", "rootUrl": "https://www.googleapis.com/", "schemas": { "Change": { - "description": "An atomic update to a collection of ResourceRecordSets.", + "description": "A Change represents a set of ResourceRecordSet additions and deletions applied atomically to a ManagedZone. ResourceRecordSets within a ManagedZone are modified by creating a new Change element in the Changes collection. In turn the Changes collection also records the past modifications to the ResourceRecordSets in a ManagedZone. The current state of the ManagedZone is the sum effect of applying all Change elements in the Changes collection in sequence.", "id": "Change", "properties": { "additions": { @@ -1021,7 +1021,7 @@ "type": "string" }, "status": { - "description": "Status of the operation (output only).", + "description": "Status of the operation (output only). A status of \"done\" means that the request to update the authoritative servers has been sent, but the servers might not be updated yet.", "enum": [ "done", "pending" @@ -1192,7 +1192,7 @@ "type": "integer" }, "keyType": { - "description": "One of \"KEY_SIGNING\" or \"ZONE_SIGNING\". Keys of type KEY_SIGNING have the Secure Entry Point flag set and, when active, will be used to sign only resource record sets of type DNSKEY. Otherwise, the Secure Entry Point flag will be cleared and this key will be used to sign only resource record sets of other types.", + "description": "Specifies whether this is a key signing key (KSK) or a zone signing key (ZSK). Key signing keys have the Secure Entry Point flag set and, when active, will only be used to sign resource record sets of type DNSKEY. Zone signing keys do not have the Secure Entry Point flag set and will be used to sign all other types of resource record sets.", "enum": [ "keySigning", "zoneSigning" @@ -1293,12 +1293,16 @@ }, "type": "array" }, + "peeringConfig": { + "$ref": "ManagedZonePeeringConfig", + "description": "The presence of this field indicates that DNS Peering is enabled for this zone. The value of this field contains the network to peer with." + }, "privateVisibilityConfig": { "$ref": "ManagedZonePrivateVisibilityConfig", - "description": "For privately visible zones, the set of GCP resources that the zone is visible from." + "description": "For privately visible zones, the set of Virtual Private Cloud resources that the zone is visible from." }, "visibility": { - "description": "The zone's visibility: public zones are exposed to the Internet, while private zones are visible only to GCP resources.", + "description": "The zone's visibility: public zones are exposed to the Internet, while private zones are visible only to Virtual Private Cloud resources.", "enum": [ "private", "public" @@ -1414,6 +1418,40 @@ }, "type": "object" }, + "ManagedZonePeeringConfig": { + "id": "ManagedZonePeeringConfig", + "properties": { + "kind": { + "default": "dns#managedZonePeeringConfig", + "description": "Identifies what kind of resource this is. Value: the fixed string \"dns#managedZonePeeringConfig\".", + "type": "string" + }, + "targetNetwork": { + "$ref": "ManagedZonePeeringConfigTargetNetwork", + "description": "The network with which to peer." + } + }, + "type": "object" + }, + "ManagedZonePeeringConfigTargetNetwork": { + "id": "ManagedZonePeeringConfigTargetNetwork", + "properties": { + "deactivateTime": { + "description": "If this zone has been deactivated due to a problem with the network it targeted, the time at which it was deactivated. The zone can be deactivated if, for instance, the network it targeted was deleted. If the targeted network is still present, this will be the empty string. This is in RFC3339 text format. Output only.", + "type": "string" + }, + "kind": { + "default": "dns#managedZonePeeringConfigTargetNetwork", + "description": "Identifies what kind of resource this is. Value: the fixed string \"dns#managedZonePeeringConfigTargetNetwork\".", + "type": "string" + }, + "networkUrl": { + "description": "The fully qualified URL of the VPC network to forward queries to. This should be formatted like https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}", + "type": "string" + } + }, + "type": "object" + }, "ManagedZonePrivateVisibilityConfig": { "id": "ManagedZonePrivateVisibilityConfig", "properties": { @@ -1423,7 +1461,7 @@ "type": "string" }, "networks": { - "description": "The list of GCE private network IDs that can see this zone.", + "description": "The list of VPC networks that can see this zone.", "items": { "$ref": "ManagedZonePrivateVisibilityConfigNetwork" }, @@ -1441,7 +1479,7 @@ "type": "string" }, "networkUrl": { - "description": "The fully qualified URL of the GCE private network to bind to. This should be formatted like https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}", + "description": "The fully qualified URL of the VPC network to bind to. This should be formatted like https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}", "type": "string" } }, @@ -1494,7 +1532,7 @@ "type": "string" }, "status": { - "description": "Status of the operation. Can be one of the following: \"PENDING\" or \"DONE\" (output only).", + "description": "Status of the operation. Can be one of the following: \"PENDING\" or \"DONE\" (output only). A status of \"DONE\" means that the request to update the authoritative servers has been sent, but the servers might not be updated yet.", "enum": [ "done", "pending" @@ -1598,7 +1636,7 @@ "type": "object" }, "Policy": { - "description": "A policy is a collection of rules applied to one or more networks that specify forwarding behavior for that network.", + "description": "A policy is a collection of DNS rules applied to one or more Virtual Private Cloud resources.", "id": "Policy", "properties": { "alternativeNameServerConfig": { @@ -1613,6 +1651,10 @@ "description": "Allows networks bound to this policy to receive DNS queries sent by VMs or applications over VPN connections. When enabled, a virtual IP address will be allocated from each of the sub-networks that are bound to this policy.", "type": "boolean" }, + "enableLogging": { + "description": "Controls whether logging is enabled for the networks bound to this policy. Defaults to no logging if not set.", + "type": "boolean" + }, "id": { "description": "Unique identifier for the resource; defined by the server (output only).", "format": "uint64", @@ -1679,7 +1721,7 @@ "type": "string" }, "networkUrl": { - "description": "The fully qualified URL of the GCE private network to bind to. This should be formatted like https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}", + "description": "The fully qualified URL of the VPC network to bind to. This should be formatted like https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}", "type": "string" } }, @@ -1808,7 +1850,7 @@ "type": "string" }, "rrdatas": { - "description": "As defined in RFC 1035 (section 5) and RFC 1034 (section 3.6.1).", + "description": "As defined in RFC 1035 (section 5) and RFC 1034 (section 3.6.1) -- see examples.", "items": { "type": "string" }, @@ -1827,7 +1869,7 @@ "type": "integer" }, "type": { - "description": "The identifier of a supported record type, for example, A, AAAA, MX, TXT, and so on.", + "description": "The identifier of a supported record type. See the list of Supported DNS record types.", "type": "string" } }, diff --git a/vendor/google.golang.org/api/dns/v1beta2/dns-gen.go b/vendor/google.golang.org/api/dns/v1beta2/dns-gen.go index 1f9a71a1..7ff0c44c 100644 --- a/vendor/google.golang.org/api/dns/v1beta2/dns-gen.go +++ b/vendor/google.golang.org/api/dns/v1beta2/dns-gen.go @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. All rights reserved. +// Copyright 2019 Google LLC. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. @@ -6,13 +6,39 @@ // Package dns provides access to the Google Cloud DNS API. // -// See https://developers.google.com/cloud-dns +// For product documentation, see: https://developers.google.com/cloud-dns +// +// Creating a client // // Usage example: // // import "google.golang.org/api/dns/v1beta2" // ... -// dnsService, err := dns.New(oauthHttpClient) +// ctx := context.Background() +// dnsService, err := dns.NewService(ctx) +// +// In this example, Google Application Default Credentials are used for authentication. +// +// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// +// Other authentication options +// +// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// +// dnsService, err := dns.NewService(ctx, option.WithScopes(dns.NdevClouddnsReadwriteScope)) +// +// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// +// dnsService, err := dns.NewService(ctx, option.WithAPIKey("AIza...")) +// +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// +// config := &oauth2.Config{...} +// // ... +// token, err := config.Exchange(ctx, ...) +// dnsService, err := dns.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) +// +// See https://godoc.org/google.golang.org/api/option/ for details on options. package dns // import "google.golang.org/api/dns/v1beta2" import ( @@ -29,6 +55,8 @@ import ( gensupport "google.golang.org/api/gensupport" googleapi "google.golang.org/api/googleapi" + option "google.golang.org/api/option" + htransport "google.golang.org/api/transport/http" ) // Always reference these packages, just in case the auto-generated code @@ -65,6 +93,35 @@ const ( NdevClouddnsReadwriteScope = "https://www.googleapis.com/auth/ndev.clouddns.readwrite" ) +// NewService creates a new Service. +func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { + scopesOption := option.WithScopes( + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/ndev.clouddns.readonly", + "https://www.googleapis.com/auth/ndev.clouddns.readwrite", + ) + // NOTE: prepend, so we don't override user-specified scopes. + opts = append([]option.ClientOption{scopesOption}, opts...) + client, endpoint, err := htransport.NewClient(ctx, opts...) + if err != nil { + return nil, err + } + s, err := New(client) + if err != nil { + return nil, err + } + if endpoint != "" { + s.BasePath = endpoint + } + return s, nil +} + +// New creates a new Service. It uses the provided http.Client for requests. +// +// Deprecated: please use NewService instead. +// To provide a custom HTTP client, use option.WithHTTPClient. +// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. func New(client *http.Client) (*Service, error) { if client == nil { return nil, errors.New("client is nil") @@ -170,7 +227,13 @@ type ResourceRecordSetsService struct { s *Service } -// Change: An atomic update to a collection of ResourceRecordSets. +// Change: A Change represents a set of ResourceRecordSet additions and +// deletions applied atomically to a ManagedZone. ResourceRecordSets +// within a ManagedZone are modified by creating a new Change element in +// the Changes collection. In turn the Changes collection also records +// the past modifications to the ResourceRecordSets in a ManagedZone. +// The current state of the ManagedZone is the sum effect of applying +// all Change elements in the Changes collection in sequence. type Change struct { // Additions: Which ResourceRecordSets to add? Additions []*ResourceRecordSet `json:"additions,omitempty"` @@ -194,7 +257,9 @@ type Change struct { // (output only). This is in RFC3339 text format. StartTime string `json:"startTime,omitempty"` - // Status: Status of the operation (output only). + // Status: Status of the operation (output only). A status of "done" + // means that the request to update the authoritative servers has been + // sent, but the servers might not be updated yet. // // Possible values: // "done" @@ -428,11 +493,12 @@ type DnsKeySpec struct { // KeyLength: Length of the keys in bits. KeyLength int64 `json:"keyLength,omitempty"` - // KeyType: One of "KEY_SIGNING" or "ZONE_SIGNING". Keys of type - // KEY_SIGNING have the Secure Entry Point flag set and, when active, - // will be used to sign only resource record sets of type DNSKEY. - // Otherwise, the Secure Entry Point flag will be cleared and this key - // will be used to sign only resource record sets of other types. + // KeyType: Specifies whether this is a key signing key (KSK) or a zone + // signing key (ZSK). Key signing keys have the Secure Entry Point flag + // set and, when active, will only be used to sign resource record sets + // of type DNSKEY. Zone signing keys do not have the Secure Entry Point + // flag set and will be used to sign all other types of resource record + // sets. // // Possible values: // "keySigning" @@ -568,12 +634,18 @@ type ManagedZone struct { // servers; defined by the server (output only) NameServers []string `json:"nameServers,omitempty"` - // PrivateVisibilityConfig: For privately visible zones, the set of GCP - // resources that the zone is visible from. + // PeeringConfig: The presence of this field indicates that DNS Peering + // is enabled for this zone. The value of this field contains the + // network to peer with. + PeeringConfig *ManagedZonePeeringConfig `json:"peeringConfig,omitempty"` + + // PrivateVisibilityConfig: For privately visible zones, the set of + // Virtual Private Cloud resources that the zone is visible from. PrivateVisibilityConfig *ManagedZonePrivateVisibilityConfig `json:"privateVisibilityConfig,omitempty"` // Visibility: The zone's visibility: public zones are exposed to the - // Internet, while private zones are visible only to GCP resources. + // Internet, while private zones are visible only to Virtual Private + // Cloud resources. // // Possible values: // "private" @@ -770,12 +842,84 @@ func (s *ManagedZoneOperationsListResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type ManagedZonePeeringConfig struct { + // Kind: Identifies what kind of resource this is. Value: the fixed + // string "dns#managedZonePeeringConfig". + Kind string `json:"kind,omitempty"` + + // TargetNetwork: The network with which to peer. + TargetNetwork *ManagedZonePeeringConfigTargetNetwork `json:"targetNetwork,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Kind") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Kind") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ManagedZonePeeringConfig) MarshalJSON() ([]byte, error) { + type NoMethod ManagedZonePeeringConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type ManagedZonePeeringConfigTargetNetwork struct { + // DeactivateTime: If this zone has been deactivated due to a problem + // with the network it targeted, the time at which it was deactivated. + // The zone can be deactivated if, for instance, the network it targeted + // was deleted. If the targeted network is still present, this will be + // the empty string. This is in RFC3339 text format. Output only. + DeactivateTime string `json:"deactivateTime,omitempty"` + + // Kind: Identifies what kind of resource this is. Value: the fixed + // string "dns#managedZonePeeringConfigTargetNetwork". + Kind string `json:"kind,omitempty"` + + // NetworkUrl: The fully qualified URL of the VPC network to forward + // queries to. This should be formatted like + // https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network} + NetworkUrl string `json:"networkUrl,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DeactivateTime") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DeactivateTime") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *ManagedZonePeeringConfigTargetNetwork) MarshalJSON() ([]byte, error) { + type NoMethod ManagedZonePeeringConfigTargetNetwork + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type ManagedZonePrivateVisibilityConfig struct { // Kind: Identifies what kind of resource this is. Value: the fixed // string "dns#managedZonePrivateVisibilityConfig". Kind string `json:"kind,omitempty"` - // Networks: The list of GCE private network IDs that can see this zone. + // Networks: The list of VPC networks that can see this zone. Networks []*ManagedZonePrivateVisibilityConfigNetwork `json:"networks,omitempty"` // ForceSendFields is a list of field names (e.g. "Kind") to @@ -806,8 +950,8 @@ type ManagedZonePrivateVisibilityConfigNetwork struct { // string "dns#managedZonePrivateVisibilityConfigNetwork". Kind string `json:"kind,omitempty"` - // NetworkUrl: The fully qualified URL of the GCE private network to - // bind to. This should be formatted like + // NetworkUrl: The fully qualified URL of the VPC network to bind to. + // This should be formatted like // https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network} NetworkUrl string `json:"networkUrl,omitempty"` @@ -909,7 +1053,9 @@ type Operation struct { StartTime string `json:"startTime,omitempty"` // Status: Status of the operation. Can be one of the following: - // "PENDING" or "DONE" (output only). + // "PENDING" or "DONE" (output only). A status of "DONE" means that the + // request to update the authoritative servers has been sent, but the + // servers might not be updated yet. // // Possible values: // "done" @@ -1129,8 +1275,8 @@ func (s *PoliciesUpdateResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Policy: A policy is a collection of rules applied to one or more -// networks that specify forwarding behavior for that network. +// Policy: A policy is a collection of DNS rules applied to one or more +// Virtual Private Cloud resources. type Policy struct { // AlternativeNameServerConfig: Sets an alternative name server for the // associated networks. When specified, all DNS queries are forwarded to @@ -1149,6 +1295,10 @@ type Policy struct { // sub-networks that are bound to this policy. EnableInboundForwarding bool `json:"enableInboundForwarding,omitempty"` + // EnableLogging: Controls whether logging is enabled for the networks + // bound to this policy. Defaults to no logging if not set. + EnableLogging bool `json:"enableLogging,omitempty"` + // Id: Unique identifier for the resource; defined by the server (output // only). Id uint64 `json:"id,omitempty,string"` @@ -1263,8 +1413,8 @@ type PolicyNetwork struct { // string "dns#policyNetwork". Kind string `json:"kind,omitempty"` - // NetworkUrl: The fully qualified URL of the GCE private network to - // bind to. This should be formatted like + // NetworkUrl: The fully qualified URL of the VPC network to bind to. + // This should be formatted like // https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network} NetworkUrl string `json:"networkUrl,omitempty"` @@ -1431,7 +1581,7 @@ type ResourceRecordSet struct { Name string `json:"name,omitempty"` // Rrdatas: As defined in RFC 1035 (section 5) and RFC 1034 (section - // 3.6.1). + // 3.6.1) -- see examples. Rrdatas []string `json:"rrdatas,omitempty"` // SignatureRrdatas: As defined in RFC 4034 (section 3.2). @@ -1441,8 +1591,8 @@ type ResourceRecordSet struct { // resolvers. Ttl int64 `json:"ttl,omitempty"` - // Type: The identifier of a supported record type, for example, A, - // AAAA, MX, TXT, and so on. + // Type: The identifier of a supported record type. See the list of + // Supported DNS record types. Type string `json:"type,omitempty"` // ForceSendFields is a list of field names (e.g. "Kind") to diff --git a/vendor/google.golang.org/api/file/v1beta1/file-api.json b/vendor/google.golang.org/api/file/v1beta1/file-api.json index 8b0fc417..4c8af225 100644 --- a/vendor/google.golang.org/api/file/v1beta1/file-api.json +++ b/vendor/google.golang.org/api/file/v1beta1/file-api.json @@ -471,7 +471,7 @@ } } }, - "revision": "20180925", + "revision": "20190416", "rootUrl": "https://file.googleapis.com/", "schemas": { "CancelOperationRequest": { @@ -502,6 +502,199 @@ }, "type": "object" }, + "GoogleCloudSaasacceleratorManagementProvidersV1Instance": { + "description": "Instance represents the interface for SLM services to actuate the state\nof control plane resources.\n\nExample Instance in JSON, where\n consumer-project=snapchat,\n producer-project=cloud-sql:\n\n```json\nInstance:\n{\n \"name\":\n \"projects/snapchat/locations/us-east1/instances/prod-instance\",\n \"create_time\": {\n \"seconds\": 1526406431,\n },\n \"labels\": {\n \"env\": \"prod\",\n \"foo\": \"bar\"\n },\n \"state\": READY,\n \"software_version\": \"cloud-sql-09-28-2018\",\n \"maintenance_policy_names\": {\n \"UpdatePolicy\":\n \"projects/snapchat/locations/us-east1/maintenancePolicies/prod-update-policy\",\n }\n \"rollout_metadata\": {\n \"projects/cloud-sql/locations/global/rolloutTypes/software_update\": {\n \"release\":\n \"projects/cloud-sql/locations/global/releases/cloud-sql-09-28-2018\",\n \"rollout\":\n \"projects/cloud-sql/locations/us-east1/rollouts/cloud-sql-09-28-2018-canary\",\n }\n \"projects/cloud-sql/locations/global/rolloutTypes/instance_restart\": {\n \"release\":\n \"projects/cloud-sql/locations/global/releases/cloud-sql-09-20-repair\",\n \"rollout\":\n \"projects/cloud-sql/locations/us-east1/rollouts/cloud-sql-09-20-repair-100-percent\",\n }\n }\n \"tenant_project_id\": \"cloud-sql-test-tenant\",\n \"producer_metadata\": {\n \"cloud-sql-tier\": \"basic\",\n \"cloud-sql-instance-size\": \"1G\",\n },\n \"provisioned_resources\": [\n {\n \"resource-type\": \"compute-instance\",\n \"resource-url\":\n \"https://www.googleapis.com/compute/v1/projects/cloud-sql/zones/us-east1-b/instances/vm-1\",\n }\n ],\n}\n```", + "id": "GoogleCloudSaasacceleratorManagementProvidersV1Instance", + "properties": { + "createTime": { + "description": "Output only. Timestamp when the resource was created.", + "format": "google-datetime", + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Resource labels to represent user provided metadata. Each label\nis a key-value pair, where both the key and the value are arbitrary strings\nprovided by the user.", + "type": "object" + }, + "maintenancePolicyNames": { + "additionalProperties": { + "type": "string" + }, + "description": "The MaintenancePolicies that have been attached to the instance.\nThe key must be of the type name of the oneof policy name defined in\nMaintenancePolicy, and the referenced policy must define the same policy\ntype. For complete details of MaintenancePolicy, please refer to\n//depot/google3/google/cloud/saasaccelerator/maintenancepolicy/api/v1/maintenance_policy_resources.proto", + "type": "object" + }, + "name": { + "description": "Unique name of the resource. It uses the form:\n `projects/{project_id}/locations/{location_id}/instances/{instance_id}`", + "type": "string" + }, + "producerMetadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Output only. Custom string attributes used primarily to expose\nproducer-specific information in monitoring dashboards.\nSee go/get-instance-metadata.", + "type": "object" + }, + "provisionedResources": { + "description": "Output only. The list of data plane resources provisioned for this\ninstance, e.g. compute VMs. See go/get-instance-metadata.", + "items": { + "$ref": "GoogleCloudSaasacceleratorManagementProvidersV1ProvisionedResource" + }, + "type": "array" + }, + "rolloutMetadata": { + "additionalProperties": { + "$ref": "GoogleCloudSaasacceleratorManagementProvidersV1RolloutMetadata" + }, + "description": "The map between RolloutType and the corresponding RolloutMetadata.\nThis is only mutated by rollout service. For actuation implementation,\nthis information is pass-through for Rollout management. Producer shall\nnot modify by itself.\nFor update of a single entry in this map, the update field mask shall\nfollow this sementics: go/advanced-field-masks", + "type": "object" + }, + "sloMetadata": { + "$ref": "GoogleCloudSaasacceleratorManagementProvidersV1SloMetadata", + "description": "Output only. SLO metadata for instance classification in the\nStandardized dataplane SLO platform.\nSee go/cloud-ssa-standard-slo for feature description." + }, + "softwareVersions": { + "additionalProperties": { + "type": "string" + }, + "description": "Software versions that are used to deploy this instance. This can be\nmutated by rollout services.", + "type": "object" + }, + "state": { + "description": "Output only. Current lifecycle state of the resource (e.g. if it's being\ncreated or ready to use).", + "enum": [ + "STATE_UNSPECIFIED", + "CREATING", + "READY", + "UPDATING", + "REPAIRING", + "DELETING" + ], + "enumDescriptions": [ + "Unspecified state.", + "Instance is being created.", + "Instance has been created and is ready to use.", + "Instance is being updated.", + "Instance is unheathy and under repair.", + "Instance is being deleted." + ], + "type": "string" + }, + "tenantProjectId": { + "description": "Output only. ID of the associated GCP tenant project.\nSee go/get-instance-metadata.", + "type": "string" + }, + "updateTime": { + "description": "Output only. Timestamp when the resource was last modified.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudSaasacceleratorManagementProvidersV1NotificationMetadata": { + "description": "NotificationMetadata is the notification state for an instance.", + "id": "GoogleCloudSaasacceleratorManagementProvidersV1NotificationMetadata", + "properties": { + "rescheduled": { + "description": "Whether the instance update has been rescheduled.", + "type": "boolean" + }, + "scheduledEndTime": { + "description": "The scheduled end time for the maintenance window during which update\ncan be performed on the instance.", + "format": "google-datetime", + "type": "string" + }, + "scheduledStartTime": { + "description": "The scheduled start time for the maintenance window during which\nupdate can be performed on the instance.", + "format": "google-datetime", + "type": "string" + }, + "targetRelease": { + "description": "The target release to be applied to the instance.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudSaasacceleratorManagementProvidersV1ProvisionedResource": { + "description": "Describes provisioned dataplane resources.", + "id": "GoogleCloudSaasacceleratorManagementProvidersV1ProvisionedResource", + "properties": { + "resourceType": { + "description": "Type of the resource. This can be either a GCP resource or a custom one\n(e.g. another cloud provider's VM). For GCP compute resources use singular\nform of the names listed in GCP compute API documentation\n(https://cloud.google.com/compute/docs/reference/rest/v1/), prefixed with\n'compute-', for example: 'compute-instance', 'compute-disk',\n'compute-autoscaler'.", + "type": "string" + }, + "resourceUrl": { + "description": "URL identifying the resource, e.g.\n\"https://www.googleapis.com/compute/v1/projects/...)\".", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudSaasacceleratorManagementProvidersV1RolloutMetadata": { + "description": "RolloutMetadata for an actuation instance. It maps to a single RolloutType.", + "id": "GoogleCloudSaasacceleratorManagementProvidersV1RolloutMetadata", + "properties": { + "notification": { + "$ref": "GoogleCloudSaasacceleratorManagementProvidersV1NotificationMetadata", + "description": "Instance level notification metadata." + }, + "releaseName": { + "description": "The last Release that has been applied to the instance.", + "type": "string" + }, + "rolloutName": { + "description": "The last rollout that has been applied to the instance.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudSaasacceleratorManagementProvidersV1SloExclusion": { + "description": "A temporal SLO exclusion specification.", + "id": "GoogleCloudSaasacceleratorManagementProvidersV1SloExclusion", + "properties": { + "exclusionDuration": { + "description": "Exclusion duration. No restrictions on the possible values.\n\nWhen an ongoing operation is taking longer than initially expected,\nan existing entry in the exclusion list can be updated by extending the\nduration. This is supported by the subsystem exporting eligibility data\nas long as such extension is committed at least 10 minutes before the\noriginal exclusion expiration - otherwise it is possible that there will\nbe \"gaps\" in the exclusion application in the exported timeseries.", + "format": "google-duration", + "type": "string" + }, + "exclusionStartTime": { + "description": "Start time of the exclusion. No alignment (e.g. to a full minute) needed.", + "format": "google-datetime", + "type": "string" + }, + "reason": { + "description": "Human-readable reason for the exclusion.\nThis should be a static string (e.g. \"Disruptive update in progress\")\nand should not contain dynamically generated data (e.g. instance name).\nCan be left empty.", + "type": "string" + }, + "sloName": { + "description": "Name of an SLI/SLO that this exclusion applies to. Can be left empty,\nsignaling that the instance should be excluded from all SLI/SLOs defined\nin the service SLO configuration.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudSaasacceleratorManagementProvidersV1SloMetadata": { + "description": "SloMetadata contains resources required for proper SLO classification of the\ninstance.", + "id": "GoogleCloudSaasacceleratorManagementProvidersV1SloMetadata", + "properties": { + "exclusions": { + "description": "List of SLO exclusion windows. When multiple entries in the list match\n(matching the exclusion time-window against current time point)\nthe exclusion reason used in the first matching entry will be published.\n\nIt is not needed to include expired exclusion in this list, as only the\ncurrently applicable exclusions are taken into account by the eligibility\nexporting subsystem (the historical state of exclusions will be reflected\nin the historically produced timeseries regardless of the current state).\n\nThis field can be used to mark the instance as temporary ineligible\nfor the purpose of SLO calculation. For permanent instance SLO exclusion,\na dedicated tier name can be used that does not have targets specified\nin the service SLO configuration.", + "items": { + "$ref": "GoogleCloudSaasacceleratorManagementProvidersV1SloExclusion" + }, + "type": "array" + }, + "tier": { + "description": "Name of the SLO tier the Instance belongs to. This name will be expected to\nmatch the tiers specified in the service SLO configuration.\n\nField is mandatory and must not be empty.", + "type": "string" + } + }, + "type": "object" + }, "Instance": { "description": "A Cloud Filestore instance.", "id": "Instance", @@ -790,7 +983,7 @@ "type": "object" }, "Status": { - "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", + "description": "The `Status` type defines a logical error model that is suitable for\ndifferent programming environments, including REST APIs and RPC APIs. It is\nused by [gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error\nmessage, and error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", "id": "Status", "properties": { "code": { diff --git a/vendor/google.golang.org/api/file/v1beta1/file-gen.go b/vendor/google.golang.org/api/file/v1beta1/file-gen.go index 11ca1bca..aa298aa2 100644 --- a/vendor/google.golang.org/api/file/v1beta1/file-gen.go +++ b/vendor/google.golang.org/api/file/v1beta1/file-gen.go @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. All rights reserved. +// Copyright 2019 Google LLC. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. @@ -6,13 +6,35 @@ // Package file provides access to the Cloud Filestore API. // -// See https://cloud.google.com/filestore/ +// For product documentation, see: https://cloud.google.com/filestore/ +// +// Creating a client // // Usage example: // // import "google.golang.org/api/file/v1beta1" // ... -// fileService, err := file.New(oauthHttpClient) +// ctx := context.Background() +// fileService, err := file.NewService(ctx) +// +// In this example, Google Application Default Credentials are used for authentication. +// +// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// +// Other authentication options +// +// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// +// fileService, err := file.NewService(ctx, option.WithAPIKey("AIza...")) +// +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// +// config := &oauth2.Config{...} +// // ... +// token, err := config.Exchange(ctx, ...) +// fileService, err := file.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) +// +// See https://godoc.org/google.golang.org/api/option/ for details on options. package file // import "google.golang.org/api/file/v1beta1" import ( @@ -29,6 +51,8 @@ import ( gensupport "google.golang.org/api/gensupport" googleapi "google.golang.org/api/googleapi" + option "google.golang.org/api/option" + htransport "google.golang.org/api/transport/http" ) // Always reference these packages, just in case the auto-generated code @@ -56,6 +80,32 @@ const ( CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" ) +// NewService creates a new Service. +func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { + scopesOption := option.WithScopes( + "https://www.googleapis.com/auth/cloud-platform", + ) + // NOTE: prepend, so we don't override user-specified scopes. + opts = append([]option.ClientOption{scopesOption}, opts...) + client, endpoint, err := htransport.NewClient(ctx, opts...) + if err != nil { + return nil, err + } + s, err := New(client) + if err != nil { + return nil, err + } + if endpoint != "" { + s.BasePath = endpoint + } + return s, nil +} + +// New creates a new Service. It uses the provided http.Client for requests. +// +// Deprecated: please use NewService instead. +// To provide a custom HTTP client, use option.WithHTTPClient. +// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. func New(client *http.Client) (*Service, error) { if client == nil { return nil, errors.New("client is nil") @@ -180,6 +230,426 @@ func (s *FileShareConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudSaasacceleratorManagementProvidersV1Instance: Instance +// represents the interface for SLM services to actuate the state +// of control plane resources. +// +// Example Instance in JSON, where +// consumer-project=snapchat, +// producer-project=cloud-sql: +// +// ```json +// Instance: +// { +// "name": +// "projects/snapchat/locations/us-east1/instances/prod-instance", +// "create_time": { +// "seconds": 1526406431, +// }, +// "labels": { +// "env": "prod", +// "foo": "bar" +// }, +// "state": READY, +// "software_version": "cloud-sql-09-28-2018", +// "maintenance_policy_names": { +// "UpdatePolicy": +// +// "projects/snapchat/locations/us-east1/maintenancePolicies/prod-update- +// policy", +// } +// "rollout_metadata": { +// +// "projects/cloud-sql/locations/global/rolloutTypes/software_update": +// { +// "release": +// +// "projects/cloud-sql/locations/global/releases/cloud-sql-09-28-2018", +// "rollout": +// +// "projects/cloud-sql/locations/us-east1/rollouts/cloud-sql-09-28-2018-c +// anary", +// } +// +// "projects/cloud-sql/locations/global/rolloutTypes/instance_restart": +// { +// "release": +// +// "projects/cloud-sql/locations/global/releases/cloud-sql-09-20-repair", +// +// "rollout": +// +// "projects/cloud-sql/locations/us-east1/rollouts/cloud-sql-09-20-repair +// -100-percent", +// } +// } +// "tenant_project_id": "cloud-sql-test-tenant", +// "producer_metadata": { +// "cloud-sql-tier": "basic", +// "cloud-sql-instance-size": "1G", +// }, +// "provisioned_resources": [ +// { +// "resource-type": "compute-instance", +// "resource-url": +// +// "https://www.googleapis.com/compute/v1/projects/cloud-sql/zones/us-eas +// t1-b/instances/vm-1", +// } +// ], +// } +// ``` +type GoogleCloudSaasacceleratorManagementProvidersV1Instance struct { + // CreateTime: Output only. Timestamp when the resource was created. + CreateTime string `json:"createTime,omitempty"` + + // Labels: Optional. Resource labels to represent user provided + // metadata. Each label + // is a key-value pair, where both the key and the value are arbitrary + // strings + // provided by the user. + Labels map[string]string `json:"labels,omitempty"` + + // MaintenancePolicyNames: The MaintenancePolicies that have been + // attached to the instance. + // The key must be of the type name of the oneof policy name defined + // in + // MaintenancePolicy, and the referenced policy must define the same + // policy + // type. For complete details of MaintenancePolicy, please refer + // to + // //depot/google3/google/cloud/saasaccelerator/maintenancepolicy/api/ + // v1/maintenance_policy_resources.proto + MaintenancePolicyNames map[string]string `json:"maintenancePolicyNames,omitempty"` + + // Name: Unique name of the resource. It uses the form: + // + // `projects/{project_id}/locations/{location_id}/instances/{instance_id} + // ` + Name string `json:"name,omitempty"` + + // ProducerMetadata: Output only. Custom string attributes used + // primarily to expose + // producer-specific information in monitoring dashboards. + // See go/get-instance-metadata. + ProducerMetadata map[string]string `json:"producerMetadata,omitempty"` + + // ProvisionedResources: Output only. The list of data plane resources + // provisioned for this + // instance, e.g. compute VMs. See go/get-instance-metadata. + ProvisionedResources []*GoogleCloudSaasacceleratorManagementProvidersV1ProvisionedResource `json:"provisionedResources,omitempty"` + + // RolloutMetadata: The map between RolloutType and the corresponding + // RolloutMetadata. + // This is only mutated by rollout service. For actuation + // implementation, + // this information is pass-through for Rollout management. Producer + // shall + // not modify by itself. + // For update of a single entry in this map, the update field mask + // shall + // follow this sementics: go/advanced-field-masks + RolloutMetadata map[string]GoogleCloudSaasacceleratorManagementProvidersV1RolloutMetadata `json:"rolloutMetadata,omitempty"` + + // SloMetadata: Output only. SLO metadata for instance classification in + // the + // Standardized dataplane SLO platform. + // See go/cloud-ssa-standard-slo for feature description. + SloMetadata *GoogleCloudSaasacceleratorManagementProvidersV1SloMetadata `json:"sloMetadata,omitempty"` + + // SoftwareVersions: Software versions that are used to deploy this + // instance. This can be + // mutated by rollout services. + SoftwareVersions map[string]string `json:"softwareVersions,omitempty"` + + // State: Output only. Current lifecycle state of the resource (e.g. if + // it's being + // created or ready to use). + // + // Possible values: + // "STATE_UNSPECIFIED" - Unspecified state. + // "CREATING" - Instance is being created. + // "READY" - Instance has been created and is ready to use. + // "UPDATING" - Instance is being updated. + // "REPAIRING" - Instance is unheathy and under repair. + // "DELETING" - Instance is being deleted. + State string `json:"state,omitempty"` + + // TenantProjectId: Output only. ID of the associated GCP tenant + // project. + // See go/get-instance-metadata. + TenantProjectId string `json:"tenantProjectId,omitempty"` + + // UpdateTime: Output only. Timestamp when the resource was last + // modified. + UpdateTime string `json:"updateTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreateTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudSaasacceleratorManagementProvidersV1Instance) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudSaasacceleratorManagementProvidersV1Instance + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudSaasacceleratorManagementProvidersV1NotificationMetadata: +// NotificationMetadata is the notification state for an instance. +type GoogleCloudSaasacceleratorManagementProvidersV1NotificationMetadata struct { + // Rescheduled: Whether the instance update has been rescheduled. + Rescheduled bool `json:"rescheduled,omitempty"` + + // ScheduledEndTime: The scheduled end time for the maintenance window + // during which update + // can be performed on the instance. + ScheduledEndTime string `json:"scheduledEndTime,omitempty"` + + // ScheduledStartTime: The scheduled start time for the maintenance + // window during which + // update can be performed on the instance. + ScheduledStartTime string `json:"scheduledStartTime,omitempty"` + + // TargetRelease: The target release to be applied to the instance. + TargetRelease string `json:"targetRelease,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Rescheduled") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Rescheduled") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudSaasacceleratorManagementProvidersV1NotificationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudSaasacceleratorManagementProvidersV1NotificationMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudSaasacceleratorManagementProvidersV1ProvisionedResource: +// Describes provisioned dataplane resources. +type GoogleCloudSaasacceleratorManagementProvidersV1ProvisionedResource struct { + // ResourceType: Type of the resource. This can be either a GCP resource + // or a custom one + // (e.g. another cloud provider's VM). For GCP compute resources use + // singular + // form of the names listed in GCP compute API + // documentation + // (https://cloud.google.com/compute/docs/reference/rest/v1 + // /), prefixed with + // 'compute-', for example: 'compute-instance', + // 'compute-disk', + // 'compute-autoscaler'. + ResourceType string `json:"resourceType,omitempty"` + + // ResourceUrl: URL identifying the resource, + // e.g. + // "https://www.googleapis.com/compute/v1/projects/...)". + ResourceUrl string `json:"resourceUrl,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ResourceType") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ResourceType") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudSaasacceleratorManagementProvidersV1ProvisionedResource) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudSaasacceleratorManagementProvidersV1ProvisionedResource + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudSaasacceleratorManagementProvidersV1RolloutMetadata: +// RolloutMetadata for an actuation instance. It maps to a single +// RolloutType. +type GoogleCloudSaasacceleratorManagementProvidersV1RolloutMetadata struct { + // Notification: Instance level notification metadata. + Notification *GoogleCloudSaasacceleratorManagementProvidersV1NotificationMetadata `json:"notification,omitempty"` + + // ReleaseName: The last Release that has been applied to the instance. + ReleaseName string `json:"releaseName,omitempty"` + + // RolloutName: The last rollout that has been applied to the instance. + RolloutName string `json:"rolloutName,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Notification") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Notification") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudSaasacceleratorManagementProvidersV1RolloutMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudSaasacceleratorManagementProvidersV1RolloutMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudSaasacceleratorManagementProvidersV1SloExclusion: A +// temporal SLO exclusion specification. +type GoogleCloudSaasacceleratorManagementProvidersV1SloExclusion struct { + // ExclusionDuration: Exclusion duration. No restrictions on the + // possible values. + // + // When an ongoing operation is taking longer than initially + // expected, + // an existing entry in the exclusion list can be updated by extending + // the + // duration. This is supported by the subsystem exporting eligibility + // data + // as long as such extension is committed at least 10 minutes before + // the + // original exclusion expiration - otherwise it is possible that there + // will + // be "gaps" in the exclusion application in the exported timeseries. + ExclusionDuration string `json:"exclusionDuration,omitempty"` + + // ExclusionStartTime: Start time of the exclusion. No alignment (e.g. + // to a full minute) needed. + ExclusionStartTime string `json:"exclusionStartTime,omitempty"` + + // Reason: Human-readable reason for the exclusion. + // This should be a static string (e.g. "Disruptive update in + // progress") + // and should not contain dynamically generated data (e.g. instance + // name). + // Can be left empty. + Reason string `json:"reason,omitempty"` + + // SloName: Name of an SLI/SLO that this exclusion applies to. Can be + // left empty, + // signaling that the instance should be excluded from all SLI/SLOs + // defined + // in the service SLO configuration. + SloName string `json:"sloName,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ExclusionDuration") + // to unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ExclusionDuration") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudSaasacceleratorManagementProvidersV1SloExclusion) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudSaasacceleratorManagementProvidersV1SloExclusion + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudSaasacceleratorManagementProvidersV1SloMetadata: +// SloMetadata contains resources required for proper SLO classification +// of the +// instance. +type GoogleCloudSaasacceleratorManagementProvidersV1SloMetadata struct { + // Exclusions: List of SLO exclusion windows. When multiple entries in + // the list match + // (matching the exclusion time-window against current time point) + // the exclusion reason used in the first matching entry will be + // published. + // + // It is not needed to include expired exclusion in this list, as only + // the + // currently applicable exclusions are taken into account by the + // eligibility + // exporting subsystem (the historical state of exclusions will be + // reflected + // in the historically produced timeseries regardless of the current + // state). + // + // This field can be used to mark the instance as temporary + // ineligible + // for the purpose of SLO calculation. For permanent instance SLO + // exclusion, + // a dedicated tier name can be used that does not have targets + // specified + // in the service SLO configuration. + Exclusions []*GoogleCloudSaasacceleratorManagementProvidersV1SloExclusion `json:"exclusions,omitempty"` + + // Tier: Name of the SLO tier the Instance belongs to. This name will be + // expected to + // match the tiers specified in the service SLO configuration. + // + // Field is mandatory and must not be empty. + Tier string `json:"tier,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Exclusions") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Exclusions") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudSaasacceleratorManagementProvidersV1SloMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudSaasacceleratorManagementProvidersV1SloMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Instance: A Cloud Filestore instance. type Instance struct { // CreateTime: Output only. @@ -638,20 +1108,20 @@ func (s *OperationMetadata) MarshalJSON() ([]byte, error) { } // Status: The `Status` type defines a logical error model that is -// suitable for different -// programming environments, including REST APIs and RPC APIs. It is -// used by -// [gRPC](https://github.com/grpc). The error model is designed to -// be: +// suitable for +// different programming environments, including REST APIs and RPC APIs. +// It is +// used by [gRPC](https://github.com/grpc). The error model is designed +// to be: // // - Simple to use and understand for most users // - Flexible enough to meet unexpected needs // // # Overview // -// The `Status` message contains three pieces of data: error code, error -// message, -// and error details. The error code should be an enum value +// The `Status` message contains three pieces of data: error code, +// error +// message, and error details. The error code should be an enum value // of // google.rpc.Code, but it may accept additional error codes if needed. // The diff --git a/vendor/google.golang.org/api/gensupport/media.go b/vendor/google.golang.org/api/gensupport/media.go index 4cef4adb..0ef96b3f 100644 --- a/vendor/google.golang.org/api/gensupport/media.go +++ b/vendor/google.golang.org/api/gensupport/media.go @@ -9,6 +9,7 @@ import ( "fmt" "io" "io/ioutil" + "mime" "mime/multipart" "net/http" "net/textproto" @@ -115,11 +116,15 @@ type multipartReader struct { pipeOpen bool } -func newMultipartReader(parts []typeReader) *multipartReader { +// boundary optionally specifies the MIME boundary +func newMultipartReader(parts []typeReader, boundary string) *multipartReader { mp := &multipartReader{pipeOpen: true} var pw *io.PipeWriter mp.pr, pw = io.Pipe() mpw := multipart.NewWriter(pw) + if boundary != "" { + mpw.SetBoundary(boundary) + } mp.ctype = "multipart/related; boundary=" + mpw.Boundary() go func() { for _, part := range parts { @@ -163,10 +168,15 @@ func (mp *multipartReader) Close() error { // // The caller must call Close on the returned ReadCloser if reads are abandoned before reaching EOF. func CombineBodyMedia(body io.Reader, bodyContentType string, media io.Reader, mediaContentType string) (io.ReadCloser, string) { + return combineBodyMedia(body, bodyContentType, media, mediaContentType, "") +} + +// combineBodyMedia is CombineBodyMedia but with an optional mimeBoundary field. +func combineBodyMedia(body io.Reader, bodyContentType string, media io.Reader, mediaContentType, mimeBoundary string) (io.ReadCloser, string) { mp := newMultipartReader([]typeReader{ {body, bodyContentType}, {media, mediaContentType}, - }) + }, mimeBoundary) return mp, mp.ctype } @@ -284,7 +294,11 @@ func (mi *MediaInfo) UploadRequest(reqHeaders http.Header, body io.Reader) (newB getBody = func() (io.ReadCloser, error) { rb := ioutil.NopCloser(fb()) rm := ioutil.NopCloser(fm()) - r, _ := CombineBodyMedia(rb, "application/json", rm, mi.mType) + var mimeBoundary string + if _, params, err := mime.ParseMediaType(ctype); err == nil { + mimeBoundary = params["boundary"] + } + r, _ := combineBodyMedia(rb, "application/json", rm, mi.mType, mimeBoundary) return r, nil } } @@ -336,7 +350,14 @@ func (mi *MediaInfo) ResumableUpload(locURI string) *ResumableUpload { } } -// SetGetBody sets the GetBody field of req to f. +// SetGetBody sets the GetBody field of req to f. This was once needed +// to gracefully support Go 1.7 and earlier which didn't have that +// field. +// +// Deprecated: the code generator no longer uses this as of +// 2019-02-19. Nothing else should be calling this anyway, but we +// won't delete this immediately; it will be deleted in as early as 6 +// months. func SetGetBody(req *http.Request, f func() (io.ReadCloser, error)) { req.GetBody = f } diff --git a/vendor/google.golang.org/api/googleapi/googleapi.go b/vendor/google.golang.org/api/googleapi/googleapi.go index 8cdb03bb..ab537676 100644 --- a/vendor/google.golang.org/api/googleapi/googleapi.go +++ b/vendor/google.golang.org/api/googleapi/googleapi.go @@ -189,32 +189,6 @@ func (wrap MarshalStyle) JSONReader(v interface{}) (io.Reader, error) { return buf, nil } -// endingWithErrorReader from r until it returns an error. If the -// final error from r is io.EOF and e is non-nil, e is used instead. -type endingWithErrorReader struct { - r io.Reader - e error -} - -func (er endingWithErrorReader) Read(p []byte) (n int, err error) { - n, err = er.r.Read(p) - if err == io.EOF && er.e != nil { - err = er.e - } - return -} - -// countingWriter counts the number of bytes it receives to write, but -// discards them. -type countingWriter struct { - n *int64 -} - -func (w countingWriter) Write(p []byte) (int, error) { - *w.n += int64(len(p)) - return len(p), nil -} - // ProgressUpdater is a function that is called upon every progress update of a resumable upload. // This is the only part of a resumable upload (from googleapi) that is usable by the developer. // The remaining usable pieces of resumable uploads is exposed in each auto-generated API. diff --git a/vendor/google.golang.org/api/iam/v1/iam-api.json b/vendor/google.golang.org/api/iam/v1/iam-api.json index 4536f018..ce6eb299 100644 --- a/vendor/google.golang.org/api/iam/v1/iam-api.json +++ b/vendor/google.golang.org/api/iam/v1/iam-api.json @@ -265,7 +265,7 @@ "type": "boolean" }, "view": { - "description": "Optional view for the returned Role objects.", + "description": "Optional view for the returned Role objects. When `FULL` is specified,\nthe `includedPermissions` field is returned, which includes a list of all\npermissions in the role. The default value is `BASIC`, which does not\nreturn the `includedPermissions` field.", "enum": [ "BASIC", "FULL" @@ -491,7 +491,7 @@ "type": "boolean" }, "view": { - "description": "Optional view for the returned Role objects.", + "description": "Optional view for the returned Role objects. When `FULL` is specified,\nthe `includedPermissions` field is returned, which includes a list of all\npermissions in the role. The default value is `BASIC`, which does not\nreturn the `includedPermissions` field.", "enum": [ "BASIC", "FULL" @@ -627,6 +627,62 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "disable": { + "description": "Disables a ServiceAccount.\nThe API is currently in alpha phase.", + "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}:disable", + "httpMethod": "POST", + "id": "iam.projects.serviceAccounts.disable", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The resource name of the service account in the following format:\n`projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`.\nUsing `-` as a wildcard for the `PROJECT_ID` will infer the project from\nthe account. The `ACCOUNT` value can be the `email` address or the\n`unique_id` of the service account.", + "location": "path", + "pattern": "^projects/[^/]+/serviceAccounts/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:disable", + "request": { + "$ref": "DisableServiceAccountRequest" + }, + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "enable": { + "description": "Enables a ServiceAccount.\n The API is currently in alpha phase.", + "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}:enable", + "httpMethod": "POST", + "id": "iam.projects.serviceAccounts.enable", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The resource name of the service account in the following format:\n`projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT_UNIQUE_ID}'.\nUsing `-` as a wildcard for the `PROJECT_ID` will infer the project from\nthe account.", + "location": "path", + "pattern": "^projects/[^/]+/serviceAccounts/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:enable", + "request": { + "$ref": "EnableServiceAccountRequest" + }, + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "get": { "description": "Gets a ServiceAccount.", "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}", @@ -653,7 +709,7 @@ ] }, "getIamPolicy": { - "description": "Returns the IAM access control policy for a\nServiceAccount.", + "description": "Returns the Cloud IAM access control policy for a\nServiceAccount.\n\nNote: Service accounts are both\n[resources and\nidentities](/iam/docs/service-accounts#service_account_permissions). This\nmethod treats the service account as a resource. It returns the Cloud IAM\npolicy that reflects what members have access to the service account.\n\nThis method does not return what resources the service account has access\nto. To see if a service account has access to a resource, call the\n`getIamPolicy` method on the target resource. For example, to view grants\nfor a project, call the\n[projects.getIamPolicy](/resource-manager/reference/rest/v1/projects/getIamPolicy)\nmethod.", "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}:getIamPolicy", "httpMethod": "POST", "id": "iam.projects.serviceAccounts.getIamPolicy", @@ -713,8 +769,36 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "patch": { + "description": "Patches a ServiceAccount.\n\nCurrently, only the following fields are updatable:\n`display_name` and `description`.\n\nOnly fields specified in the request are guaranteed to be returned in\nthe response. Other fields in the response may be empty.\n\nNote: The field mask is required.", + "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}", + "httpMethod": "PATCH", + "id": "iam.projects.serviceAccounts.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The resource name of the service account in the following format:\n`projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`.\n\nRequests using `-` as a wildcard for the `PROJECT_ID` will infer the\nproject from the `account` and the `ACCOUNT` value can be the `email`\naddress or the `unique_id` of the service account.\n\nIn responses the resource name will always be in the format\n`projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`.", + "location": "path", + "pattern": "^projects/[^/]+/serviceAccounts/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "PatchServiceAccountRequest" + }, + "response": { + "$ref": "ServiceAccount" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "setIamPolicy": { - "description": "Sets the IAM access control policy for a\nServiceAccount.", + "description": "Sets the Cloud IAM access control policy for a\nServiceAccount.\n\nNote: Service accounts are both\n[resources and\nidentities](/iam/docs/service-accounts#service_account_permissions). This\nmethod treats the service account as a resource. Use it to grant members\naccess to the service account, such as when they need to impersonate it.\n\nThis method does not grant the service account access to other resources,\nsuch as projects. To grant a service account access to resources, include\nthe service account in the Cloud IAM policy for the desired resource, then\ncall the appropriate `setIamPolicy` method on the target resource. For\nexample, to grant a service account access to a project, call the\n[projects.setIamPolicy](/resource-manager/reference/rest/v1/projects/setIamPolicy)\nmethod.", "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}:setIamPolicy", "httpMethod": "POST", "id": "iam.projects.serviceAccounts.setIamPolicy", @@ -742,7 +826,7 @@ ] }, "signBlob": { - "description": "Signs a blob using a service account's system-managed private key.", + "description": "**Note**: This method is in the process of being deprecated. Call the\n[`signBlob()`](/iam/credentials/reference/rest/v1/projects.serviceAccounts/signBlob)\nmethod of the Cloud IAM Service Account Credentials API instead.\n\nSigns a blob using a service account's system-managed private key.", "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}:signBlob", "httpMethod": "POST", "id": "iam.projects.serviceAccounts.signBlob", @@ -770,7 +854,7 @@ ] }, "signJwt": { - "description": "Signs a JWT using a service account's system-managed private key.\n\nIf no expiry time (`exp`) is provided in the `SignJwtRequest`, IAM sets an\nan expiry time of one hour by default. If you request an expiry time of\nmore than one hour, the request will fail.", + "description": "**Note**: This method is in the process of being deprecated. Call the\n[`signJwt()`](/iam/credentials/reference/rest/v1/projects.serviceAccounts/signJwt)\nmethod of the Cloud IAM Service Account Credentials API instead.\n\nSigns a JWT using a service account's system-managed private key.\n\nIf no expiry time (`exp`) is provided in the `SignJwtRequest`, IAM sets an\nan expiry time of one hour by default. If you request an expiry time of\nmore than one hour, the request will fail.", "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}:signJwt", "httpMethod": "POST", "id": "iam.projects.serviceAccounts.signJwt", @@ -825,8 +909,36 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "undelete": { + "description": "Restores a deleted ServiceAccount.\nThis is to be used as an action of last resort. A service account may\nnot always be restorable.", + "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}:undelete", + "httpMethod": "POST", + "id": "iam.projects.serviceAccounts.undelete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The resource name of the service account in the following format:\n`projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT_UNIQUE_ID}'.\nUsing `-` as a wildcard for the `PROJECT_ID` will infer the project from\nthe account.", + "location": "path", + "pattern": "^projects/[^/]+/serviceAccounts/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:undelete", + "request": { + "$ref": "UndeleteServiceAccountRequest" + }, + "response": { + "$ref": "UndeleteServiceAccountResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "update": { - "description": "Updates a ServiceAccount.\n\nCurrently, only the following fields are updatable:\n`display_name` .\nThe `etag` is mandatory.", + "description": "Note: This method is in the process of being deprecated. Use\nPatchServiceAccount instead.\n\nUpdates a ServiceAccount.\n\nCurrently, only the following fields are updatable:\n`display_name` .\nThe `etag` is mandatory.", "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}", "httpMethod": "PUT", "id": "iam.projects.serviceAccounts.update", @@ -1043,7 +1155,7 @@ "type": "boolean" }, "view": { - "description": "Optional view for the returned Role objects.", + "description": "Optional view for the returned Role objects. When `FULL` is specified,\nthe `includedPermissions` field is returned, which includes a list of all\npermissions in the role. The default value is `BASIC`, which does not\nreturn the `includedPermissions` field.", "enum": [ "BASIC", "FULL" @@ -1081,7 +1193,7 @@ } } }, - "revision": "20181005", + "revision": "20190318", "rootUrl": "https://iam.googleapis.com/", "schemas": { "AuditConfig": { @@ -1160,10 +1272,10 @@ "properties": { "condition": { "$ref": "Expr", - "description": "Unimplemented. The condition that is associated with this binding.\nNOTE: an unsatisfied condition will not allow user access via current\nbinding. Different bindings, including their conditions, are examined\nindependently." + "description": "The condition that is associated with this binding.\nNOTE: an unsatisfied condition will not allow user access via current\nbinding. Different bindings, including their conditions, are examined\nindependently." }, "members": { - "description": "Specifies the identities requesting access for a Cloud Platform resource.\n`members` can have the following values:\n\n* `allUsers`: A special identifier that represents anyone who is\n on the internet; with or without a Google account.\n\n* `allAuthenticatedUsers`: A special identifier that represents anyone\n who is authenticated with a Google account or a service account.\n\n* `user:{emailid}`: An email address that represents a specific Google\n account. For example, `alice@gmail.com` .\n\n\n* `serviceAccount:{emailid}`: An email address that represents a service\n account. For example, `my-other-app@appspot.gserviceaccount.com`.\n\n* `group:{emailid}`: An email address that represents a Google group.\n For example, `admins@example.com`.\n\n\n* `domain:{domain}`: A Google Apps domain name that represents all the\n users of that domain. For example, `google.com` or `example.com`.\n\n", + "description": "Specifies the identities requesting access for a Cloud Platform resource.\n`members` can have the following values:\n\n* `allUsers`: A special identifier that represents anyone who is\n on the internet; with or without a Google account.\n\n* `allAuthenticatedUsers`: A special identifier that represents anyone\n who is authenticated with a Google account or a service account.\n\n* `user:{emailid}`: An email address that represents a specific Google\n account. For example, `alice@gmail.com` .\n\n\n* `serviceAccount:{emailid}`: An email address that represents a service\n account. For example, `my-other-app@appspot.gserviceaccount.com`.\n\n* `group:{emailid}`: An email address that represents a Google group.\n For example, `admins@example.com`.\n\n\n* `domain:{domain}`: The G Suite domain (primary) that represents all the\n users of that domain. For example, `google.com` or `example.com`.\n\n", "items": { "type": "string" }, @@ -1269,17 +1381,29 @@ }, "serviceAccount": { "$ref": "ServiceAccount", - "description": "The ServiceAccount resource to create.\nCurrently, only the following values are user assignable:\n`display_name` ." + "description": "The ServiceAccount resource to\ncreate. Currently, only the following values are user assignable:\n`display_name` ." } }, "type": "object" }, + "DisableServiceAccountRequest": { + "description": "The service account disable request.", + "id": "DisableServiceAccountRequest", + "properties": {}, + "type": "object" + }, "Empty": { "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", "id": "Empty", "properties": {}, "type": "object" }, + "EnableServiceAccountRequest": { + "description": "The service account enable request.", + "id": "EnableServiceAccountRequest", + "properties": {}, + "type": "object" + }, "Expr": { "description": "Represents an expression text. Example:\n\n title: \"User account presence\"\n description: \"Determines whether the request has a user account\"\n expression: \"size(request.user) \u003e 0\"", "id": "Expr", @@ -1463,6 +1587,20 @@ }, "type": "object" }, + "PatchServiceAccountRequest": { + "description": "The patch service account request.", + "id": "PatchServiceAccountRequest", + "properties": { + "serviceAccount": { + "$ref": "ServiceAccount" + }, + "updateMask": { + "format": "google-fieldmask", + "type": "string" + } + }, + "type": "object" + }, "Permission": { "description": "A permission which can be included by a role.", "id": "Permission", @@ -1736,6 +1874,14 @@ "description": "A service account in the Identity and Access Management API.\n\nTo create a service account, specify the `project_id` and the `account_id`\nfor the account. The `account_id` is unique within the project, and is used\nto generate the service account email address and a stable\n`unique_id`.\n\nIf the account already exists, the account's resource name is returned\nin the format of projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}. The caller\ncan use the name in other methods to access the account.\n\nAll other methods can identify the service account using the format\n`projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`.\nUsing `-` as a wildcard for the `PROJECT_ID` will infer the project from\nthe account. The `ACCOUNT` value can be the `email` address or the\n`unique_id` of the service account.", "id": "ServiceAccount", "properties": { + "description": { + "description": "Optional. A user-specified opaque description of the service account.\nMust be less than or equal to 256 UTF-8 bytes.", + "type": "string" + }, + "disabled": { + "description": "@OutputOnly A bool indicate if the service account is disabled.\nThe field is currently in alpha phase.", + "type": "boolean" + }, "displayName": { "description": "Optional. A user-specified name for the service account.\nMust be less than or equal to 100 UTF-8 bytes.", "type": "string" @@ -1936,6 +2082,22 @@ } }, "type": "object" + }, + "UndeleteServiceAccountRequest": { + "description": "The service account undelete request.", + "id": "UndeleteServiceAccountRequest", + "properties": {}, + "type": "object" + }, + "UndeleteServiceAccountResponse": { + "id": "UndeleteServiceAccountResponse", + "properties": { + "restoredAccount": { + "$ref": "ServiceAccount", + "description": "Metadata for the restored service account." + } + }, + "type": "object" } }, "servicePath": "", diff --git a/vendor/google.golang.org/api/iam/v1/iam-gen.go b/vendor/google.golang.org/api/iam/v1/iam-gen.go index 8645f10a..23ba3969 100644 --- a/vendor/google.golang.org/api/iam/v1/iam-gen.go +++ b/vendor/google.golang.org/api/iam/v1/iam-gen.go @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. All rights reserved. +// Copyright 2019 Google LLC. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. @@ -6,13 +6,35 @@ // Package iam provides access to the Identity and Access Management (IAM) API. // -// See https://cloud.google.com/iam/ +// For product documentation, see: https://cloud.google.com/iam/ +// +// Creating a client // // Usage example: // // import "google.golang.org/api/iam/v1" // ... -// iamService, err := iam.New(oauthHttpClient) +// ctx := context.Background() +// iamService, err := iam.NewService(ctx) +// +// In this example, Google Application Default Credentials are used for authentication. +// +// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// +// Other authentication options +// +// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// +// iamService, err := iam.NewService(ctx, option.WithAPIKey("AIza...")) +// +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// +// config := &oauth2.Config{...} +// // ... +// token, err := config.Exchange(ctx, ...) +// iamService, err := iam.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) +// +// See https://godoc.org/google.golang.org/api/option/ for details on options. package iam // import "google.golang.org/api/iam/v1" import ( @@ -29,6 +51,8 @@ import ( gensupport "google.golang.org/api/gensupport" googleapi "google.golang.org/api/googleapi" + option "google.golang.org/api/option" + htransport "google.golang.org/api/transport/http" ) // Always reference these packages, just in case the auto-generated code @@ -56,6 +80,32 @@ const ( CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" ) +// NewService creates a new Service. +func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { + scopesOption := option.WithScopes( + "https://www.googleapis.com/auth/cloud-platform", + ) + // NOTE: prepend, so we don't override user-specified scopes. + opts = append([]option.ClientOption{scopesOption}, opts...) + client, endpoint, err := htransport.NewClient(ctx, opts...) + if err != nil { + return nil, err + } + s, err := New(client) + if err != nil { + return nil, err + } + if endpoint != "" { + s.BasePath = endpoint + } + return s, nil +} + +// New creates a new Service. It uses the provided http.Client for requests. +// +// Deprecated: please use NewService instead. +// To provide a custom HTTP client, use option.WithHTTPClient. +// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. func New(client *http.Client) (*Service, error) { if client == nil { return nil, errors.New("client is nil") @@ -402,8 +452,7 @@ func (s *AuditableService) MarshalJSON() ([]byte, error) { // Binding: Associates `members` with a `role`. type Binding struct { - // Condition: Unimplemented. The condition that is associated with this - // binding. + // Condition: The condition that is associated with this binding. // NOTE: an unsatisfied condition will not allow user access via // current // binding. Different bindings, including their conditions, are @@ -438,7 +487,7 @@ type Binding struct { // For example, `admins@example.com`. // // - // * `domain:{domain}`: A Google Apps domain name that represents all + // * `domain:{domain}`: The G Suite domain (primary) that represents all // the // users of that domain. For example, `google.com` or // `example.com`. @@ -620,8 +669,8 @@ type CreateServiceAccountRequest struct { // `[a-z]([-a-z0-9]*[a-z0-9])` to comply with RFC1035. AccountId string `json:"accountId,omitempty"` - // ServiceAccount: The ServiceAccount resource to create. - // Currently, only the following values are user + // ServiceAccount: The ServiceAccount resource to + // create. Currently, only the following values are user // assignable: // `display_name` . ServiceAccount *ServiceAccount `json:"serviceAccount,omitempty"` @@ -649,6 +698,10 @@ func (s *CreateServiceAccountRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// DisableServiceAccountRequest: The service account disable request. +type DisableServiceAccountRequest struct { +} + // Empty: A generic empty message that you can re-use to avoid defining // duplicated // empty messages in your APIs. A typical example is to use it as the @@ -667,6 +720,10 @@ type Empty struct { googleapi.ServerResponse `json:"-"` } +// EnableServiceAccountRequest: The service account enable request. +type EnableServiceAccountRequest struct { +} + // Expr: Represents an expression text. Example: // // title: "User account presence" @@ -1078,6 +1135,36 @@ func (s *ListServiceAccountsResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// PatchServiceAccountRequest: The patch service account request. +type PatchServiceAccountRequest struct { + ServiceAccount *ServiceAccount `json:"serviceAccount,omitempty"` + + UpdateMask string `json:"updateMask,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ServiceAccount") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ServiceAccount") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *PatchServiceAccountRequest) MarshalJSON() ([]byte, error) { + type NoMethod PatchServiceAccountRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Permission: A permission which can be included by a role. type Permission struct { // ApiDisabled: The service API associated with the permission is not @@ -1627,6 +1714,16 @@ func (s *Role) MarshalJSON() ([]byte, error) { // the // `unique_id` of the service account. type ServiceAccount struct { + // Description: Optional. A user-specified opaque description of the + // service account. + // Must be less than or equal to 256 UTF-8 bytes. + Description string `json:"description,omitempty"` + + // Disabled: @OutputOnly A bool indicate if the service account is + // disabled. + // The field is currently in alpha phase. + Disabled bool `json:"disabled,omitempty"` + // DisplayName: Optional. A user-specified name for the service // account. // Must be less than or equal to 100 UTF-8 bytes. @@ -1674,7 +1771,7 @@ type ServiceAccount struct { // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "DisplayName") to + // ForceSendFields is a list of field names (e.g. "Description") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the @@ -1682,7 +1779,7 @@ type ServiceAccount struct { // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DisplayName") to include + // NullFields is a list of field names (e.g. "Description") to include // in API requests with the JSON null value. By default, fields with // empty values are omitted from API requests. However, any field with // an empty value appearing in NullFields will be sent to the server as @@ -2075,6 +2172,42 @@ func (s *UndeleteRoleRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// UndeleteServiceAccountRequest: The service account undelete request. +type UndeleteServiceAccountRequest struct { +} + +type UndeleteServiceAccountResponse struct { + // RestoredAccount: Metadata for the restored service account. + RestoredAccount *ServiceAccount `json:"restoredAccount,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "RestoredAccount") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "RestoredAccount") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *UndeleteServiceAccountResponse) MarshalJSON() ([]byte, error) { + type NoMethod UndeleteServiceAccountResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // method id "iam.iamPolicies.lintPolicy": type IamPoliciesLintPolicyCall struct { @@ -2830,7 +2963,12 @@ func (c *OrganizationsRolesListCall) ShowDeleted(showDeleted bool) *Organization } // View sets the optional parameter "view": Optional view for the -// returned Role objects. +// returned Role objects. When `FULL` is specified, +// the `includedPermissions` field is returned, which includes a list of +// all +// permissions in the role. The default value is `BASIC`, which does +// not +// return the `includedPermissions` field. // // Possible values: // "BASIC" @@ -2970,7 +3108,7 @@ func (c *OrganizationsRolesListCall) Do(opts ...googleapi.CallOption) (*ListRole // "type": "boolean" // }, // "view": { - // "description": "Optional view for the returned Role objects.", + // "description": "Optional view for the returned Role objects. When `FULL` is specified,\nthe `includedPermissions` field is returned, which includes a list of all\npermissions in the role. The default value is `BASIC`, which does not\nreturn the `includedPermissions` field.", // "enum": [ // "BASIC", // "FULL" @@ -3925,7 +4063,12 @@ func (c *ProjectsRolesListCall) ShowDeleted(showDeleted bool) *ProjectsRolesList } // View sets the optional parameter "view": Optional view for the -// returned Role objects. +// returned Role objects. When `FULL` is specified, +// the `includedPermissions` field is returned, which includes a list of +// all +// permissions in the role. The default value is `BASIC`, which does +// not +// return the `includedPermissions` field. // // Possible values: // "BASIC" @@ -4065,7 +4208,7 @@ func (c *ProjectsRolesListCall) Do(opts ...googleapi.CallOption) (*ListRolesResp // "type": "boolean" // }, // "view": { - // "description": "Optional view for the returned Role objects.", + // "description": "Optional view for the returned Role objects. When `FULL` is specified,\nthe `includedPermissions` field is returned, which includes a list of all\npermissions in the role. The default value is `BASIC`, which does not\nreturn the `includedPermissions` field.", // "enum": [ // "BASIC", // "FULL" @@ -4666,6 +4809,286 @@ func (c *ProjectsServiceAccountsDeleteCall) Do(opts ...googleapi.CallOption) (*E } +// method id "iam.projects.serviceAccounts.disable": + +type ProjectsServiceAccountsDisableCall struct { + s *Service + name string + disableserviceaccountrequest *DisableServiceAccountRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Disable: Disables a ServiceAccount. +// The API is currently in alpha phase. +func (r *ProjectsServiceAccountsService) Disable(name string, disableserviceaccountrequest *DisableServiceAccountRequest) *ProjectsServiceAccountsDisableCall { + c := &ProjectsServiceAccountsDisableCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.disableserviceaccountrequest = disableserviceaccountrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsServiceAccountsDisableCall) Fields(s ...googleapi.Field) *ProjectsServiceAccountsDisableCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsServiceAccountsDisableCall) Context(ctx context.Context) *ProjectsServiceAccountsDisableCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsServiceAccountsDisableCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsServiceAccountsDisableCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.disableserviceaccountrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:disable") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "iam.projects.serviceAccounts.disable" call. +// Exactly one of *Empty or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Empty.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsServiceAccountsDisableCall) Do(opts ...googleapi.CallOption) (*Empty, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Empty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Disables a ServiceAccount.\nThe API is currently in alpha phase.", + // "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}:disable", + // "httpMethod": "POST", + // "id": "iam.projects.serviceAccounts.disable", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The resource name of the service account in the following format:\n`projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`.\nUsing `-` as a wildcard for the `PROJECT_ID` will infer the project from\nthe account. The `ACCOUNT` value can be the `email` address or the\n`unique_id` of the service account.", + // "location": "path", + // "pattern": "^projects/[^/]+/serviceAccounts/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}:disable", + // "request": { + // "$ref": "DisableServiceAccountRequest" + // }, + // "response": { + // "$ref": "Empty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "iam.projects.serviceAccounts.enable": + +type ProjectsServiceAccountsEnableCall struct { + s *Service + name string + enableserviceaccountrequest *EnableServiceAccountRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Enable: Enables a ServiceAccount. +// The API is currently in alpha phase. +func (r *ProjectsServiceAccountsService) Enable(name string, enableserviceaccountrequest *EnableServiceAccountRequest) *ProjectsServiceAccountsEnableCall { + c := &ProjectsServiceAccountsEnableCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.enableserviceaccountrequest = enableserviceaccountrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsServiceAccountsEnableCall) Fields(s ...googleapi.Field) *ProjectsServiceAccountsEnableCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsServiceAccountsEnableCall) Context(ctx context.Context) *ProjectsServiceAccountsEnableCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsServiceAccountsEnableCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsServiceAccountsEnableCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.enableserviceaccountrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:enable") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "iam.projects.serviceAccounts.enable" call. +// Exactly one of *Empty or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Empty.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsServiceAccountsEnableCall) Do(opts ...googleapi.CallOption) (*Empty, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Empty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Enables a ServiceAccount.\n The API is currently in alpha phase.", + // "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}:enable", + // "httpMethod": "POST", + // "id": "iam.projects.serviceAccounts.enable", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The resource name of the service account in the following format:\n`projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT_UNIQUE_ID}'.\nUsing `-` as a wildcard for the `PROJECT_ID` will infer the project from\nthe account.", + // "location": "path", + // "pattern": "^projects/[^/]+/serviceAccounts/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}:enable", + // "request": { + // "$ref": "EnableServiceAccountRequest" + // }, + // "response": { + // "$ref": "Empty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "iam.projects.serviceAccounts.get": type ProjectsServiceAccountsGetCall struct { @@ -4819,9 +5242,31 @@ type ProjectsServiceAccountsGetIamPolicyCall struct { header_ http.Header } -// GetIamPolicy: Returns the IAM access control policy for +// GetIamPolicy: Returns the Cloud IAM access control policy for // a // ServiceAccount. +// +// Note: Service accounts are both +// [resources +// and +// identities](/iam/docs/service-accounts#service_account_permissions +// ). This +// method treats the service account as a resource. It returns the Cloud +// IAM +// policy that reflects what members have access to the service +// account. +// +// This method does not return what resources the service account has +// access +// to. To see if a service account has access to a resource, call +// the +// `getIamPolicy` method on the target resource. For example, to view +// grants +// for a project, call +// the +// [projects.getIamPolicy](/resource-manager/reference/rest/v1/projec +// ts/getIamPolicy) +// method. func (r *ProjectsServiceAccountsService) GetIamPolicy(resource string) *ProjectsServiceAccountsGetIamPolicyCall { c := &ProjectsServiceAccountsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.resource = resource @@ -4913,7 +5358,7 @@ func (c *ProjectsServiceAccountsGetIamPolicyCall) Do(opts ...googleapi.CallOptio } return ret, nil // { - // "description": "Returns the IAM access control policy for a\nServiceAccount.", + // "description": "Returns the Cloud IAM access control policy for a\nServiceAccount.\n\nNote: Service accounts are both\n[resources and\nidentities](/iam/docs/service-accounts#service_account_permissions). This\nmethod treats the service account as a resource. It returns the Cloud IAM\npolicy that reflects what members have access to the service account.\n\nThis method does not return what resources the service account has access\nto. To see if a service account has access to a resource, call the\n`getIamPolicy` method on the target resource. For example, to view grants\nfor a project, call the\n[projects.getIamPolicy](/resource-manager/reference/rest/v1/projects/getIamPolicy)\nmethod.", // "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}:getIamPolicy", // "httpMethod": "POST", // "id": "iam.projects.serviceAccounts.getIamPolicy", @@ -5135,6 +5580,154 @@ func (c *ProjectsServiceAccountsListCall) Pages(ctx context.Context, f func(*Lis } } +// method id "iam.projects.serviceAccounts.patch": + +type ProjectsServiceAccountsPatchCall struct { + s *Service + name string + patchserviceaccountrequest *PatchServiceAccountRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Patches a ServiceAccount. +// +// Currently, only the following fields are updatable: +// `display_name` and `description`. +// +// Only fields specified in the request are guaranteed to be returned +// in +// the response. Other fields in the response may be empty. +// +// Note: The field mask is required. +func (r *ProjectsServiceAccountsService) Patch(name string, patchserviceaccountrequest *PatchServiceAccountRequest) *ProjectsServiceAccountsPatchCall { + c := &ProjectsServiceAccountsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.patchserviceaccountrequest = patchserviceaccountrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsServiceAccountsPatchCall) Fields(s ...googleapi.Field) *ProjectsServiceAccountsPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsServiceAccountsPatchCall) Context(ctx context.Context) *ProjectsServiceAccountsPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsServiceAccountsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsServiceAccountsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.patchserviceaccountrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "iam.projects.serviceAccounts.patch" call. +// Exactly one of *ServiceAccount or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *ServiceAccount.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsServiceAccountsPatchCall) Do(opts ...googleapi.CallOption) (*ServiceAccount, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &ServiceAccount{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Patches a ServiceAccount.\n\nCurrently, only the following fields are updatable:\n`display_name` and `description`.\n\nOnly fields specified in the request are guaranteed to be returned in\nthe response. Other fields in the response may be empty.\n\nNote: The field mask is required.", + // "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}", + // "httpMethod": "PATCH", + // "id": "iam.projects.serviceAccounts.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The resource name of the service account in the following format:\n`projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`.\n\nRequests using `-` as a wildcard for the `PROJECT_ID` will infer the\nproject from the `account` and the `ACCOUNT` value can be the `email`\naddress or the `unique_id` of the service account.\n\nIn responses the resource name will always be in the format\n`projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`.", + // "location": "path", + // "pattern": "^projects/[^/]+/serviceAccounts/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "request": { + // "$ref": "PatchServiceAccountRequest" + // }, + // "response": { + // "$ref": "ServiceAccount" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "iam.projects.serviceAccounts.setIamPolicy": type ProjectsServiceAccountsSetIamPolicyCall struct { @@ -5146,9 +5739,33 @@ type ProjectsServiceAccountsSetIamPolicyCall struct { header_ http.Header } -// SetIamPolicy: Sets the IAM access control policy for +// SetIamPolicy: Sets the Cloud IAM access control policy for // a // ServiceAccount. +// +// Note: Service accounts are both +// [resources +// and +// identities](/iam/docs/service-accounts#service_account_permissions +// ). This +// method treats the service account as a resource. Use it to grant +// members +// access to the service account, such as when they need to impersonate +// it. +// +// This method does not grant the service account access to other +// resources, +// such as projects. To grant a service account access to resources, +// include +// the service account in the Cloud IAM policy for the desired resource, +// then +// call the appropriate `setIamPolicy` method on the target resource. +// For +// example, to grant a service account access to a project, call +// the +// [projects.setIamPolicy](/resource-manager/reference/rest/v1/projec +// ts/setIamPolicy) +// method. func (r *ProjectsServiceAccountsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsServiceAccountsSetIamPolicyCall { c := &ProjectsServiceAccountsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.resource = resource @@ -5246,7 +5863,7 @@ func (c *ProjectsServiceAccountsSetIamPolicyCall) Do(opts ...googleapi.CallOptio } return ret, nil // { - // "description": "Sets the IAM access control policy for a\nServiceAccount.", + // "description": "Sets the Cloud IAM access control policy for a\nServiceAccount.\n\nNote: Service accounts are both\n[resources and\nidentities](/iam/docs/service-accounts#service_account_permissions). This\nmethod treats the service account as a resource. Use it to grant members\naccess to the service account, such as when they need to impersonate it.\n\nThis method does not grant the service account access to other resources,\nsuch as projects. To grant a service account access to resources, include\nthe service account in the Cloud IAM policy for the desired resource, then\ncall the appropriate `setIamPolicy` method on the target resource. For\nexample, to grant a service account access to a project, call the\n[projects.setIamPolicy](/resource-manager/reference/rest/v1/projects/setIamPolicy)\nmethod.", // "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}:setIamPolicy", // "httpMethod": "POST", // "id": "iam.projects.serviceAccounts.setIamPolicy", @@ -5287,8 +5904,15 @@ type ProjectsServiceAccountsSignBlobCall struct { header_ http.Header } -// SignBlob: Signs a blob using a service account's system-managed -// private key. +// SignBlob: **Note**: This method is in the process of being +// deprecated. Call +// the +// [`signBlob()`](/iam/credentials/reference/rest/v1/projects.service +// Accounts/signBlob) +// method of the Cloud IAM Service Account Credentials API +// instead. +// +// Signs a blob using a service account's system-managed private key. func (r *ProjectsServiceAccountsService) SignBlob(name string, signblobrequest *SignBlobRequest) *ProjectsServiceAccountsSignBlobCall { c := &ProjectsServiceAccountsSignBlobCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -5386,7 +6010,7 @@ func (c *ProjectsServiceAccountsSignBlobCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Signs a blob using a service account's system-managed private key.", + // "description": "**Note**: This method is in the process of being deprecated. Call the\n[`signBlob()`](/iam/credentials/reference/rest/v1/projects.serviceAccounts/signBlob)\nmethod of the Cloud IAM Service Account Credentials API instead.\n\nSigns a blob using a service account's system-managed private key.", // "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}:signBlob", // "httpMethod": "POST", // "id": "iam.projects.serviceAccounts.signBlob", @@ -5427,8 +6051,15 @@ type ProjectsServiceAccountsSignJwtCall struct { header_ http.Header } -// SignJwt: Signs a JWT using a service account's system-managed private -// key. +// SignJwt: **Note**: This method is in the process of being deprecated. +// Call +// the +// [`signJwt()`](/iam/credentials/reference/rest/v1/projects.serviceA +// ccounts/signJwt) +// method of the Cloud IAM Service Account Credentials API +// instead. +// +// Signs a JWT using a service account's system-managed private key. // // If no expiry time (`exp`) is provided in the `SignJwtRequest`, IAM // sets an @@ -5532,7 +6163,7 @@ func (c *ProjectsServiceAccountsSignJwtCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Signs a JWT using a service account's system-managed private key.\n\nIf no expiry time (`exp`) is provided in the `SignJwtRequest`, IAM sets an\nan expiry time of one hour by default. If you request an expiry time of\nmore than one hour, the request will fail.", + // "description": "**Note**: This method is in the process of being deprecated. Call the\n[`signJwt()`](/iam/credentials/reference/rest/v1/projects.serviceAccounts/signJwt)\nmethod of the Cloud IAM Service Account Credentials API instead.\n\nSigns a JWT using a service account's system-managed private key.\n\nIf no expiry time (`exp`) is provided in the `SignJwtRequest`, IAM sets an\nan expiry time of one hour by default. If you request an expiry time of\nmore than one hour, the request will fail.", // "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}:signJwt", // "httpMethod": "POST", // "id": "iam.projects.serviceAccounts.signJwt", @@ -5703,6 +6334,148 @@ func (c *ProjectsServiceAccountsTestIamPermissionsCall) Do(opts ...googleapi.Cal } +// method id "iam.projects.serviceAccounts.undelete": + +type ProjectsServiceAccountsUndeleteCall struct { + s *Service + name string + undeleteserviceaccountrequest *UndeleteServiceAccountRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Undelete: Restores a deleted ServiceAccount. +// This is to be used as an action of last resort. A service account +// may +// not always be restorable. +func (r *ProjectsServiceAccountsService) Undelete(name string, undeleteserviceaccountrequest *UndeleteServiceAccountRequest) *ProjectsServiceAccountsUndeleteCall { + c := &ProjectsServiceAccountsUndeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.undeleteserviceaccountrequest = undeleteserviceaccountrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsServiceAccountsUndeleteCall) Fields(s ...googleapi.Field) *ProjectsServiceAccountsUndeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsServiceAccountsUndeleteCall) Context(ctx context.Context) *ProjectsServiceAccountsUndeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsServiceAccountsUndeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsServiceAccountsUndeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.undeleteserviceaccountrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:undelete") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "iam.projects.serviceAccounts.undelete" call. +// Exactly one of *UndeleteServiceAccountResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *UndeleteServiceAccountResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsServiceAccountsUndeleteCall) Do(opts ...googleapi.CallOption) (*UndeleteServiceAccountResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &UndeleteServiceAccountResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Restores a deleted ServiceAccount.\nThis is to be used as an action of last resort. A service account may\nnot always be restorable.", + // "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}:undelete", + // "httpMethod": "POST", + // "id": "iam.projects.serviceAccounts.undelete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The resource name of the service account in the following format:\n`projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT_UNIQUE_ID}'.\nUsing `-` as a wildcard for the `PROJECT_ID` will infer the project from\nthe account.", + // "location": "path", + // "pattern": "^projects/[^/]+/serviceAccounts/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}:undelete", + // "request": { + // "$ref": "UndeleteServiceAccountRequest" + // }, + // "response": { + // "$ref": "UndeleteServiceAccountResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "iam.projects.serviceAccounts.update": type ProjectsServiceAccountsUpdateCall struct { @@ -5714,7 +6487,11 @@ type ProjectsServiceAccountsUpdateCall struct { header_ http.Header } -// Update: Updates a ServiceAccount. +// Update: Note: This method is in the process of being deprecated. +// Use +// PatchServiceAccount instead. +// +// Updates a ServiceAccount. // // Currently, only the following fields are updatable: // `display_name` . @@ -5816,7 +6593,7 @@ func (c *ProjectsServiceAccountsUpdateCall) Do(opts ...googleapi.CallOption) (*S } return ret, nil // { - // "description": "Updates a ServiceAccount.\n\nCurrently, only the following fields are updatable:\n`display_name` .\nThe `etag` is mandatory.", + // "description": "Note: This method is in the process of being deprecated. Use\nPatchServiceAccount instead.\n\nUpdates a ServiceAccount.\n\nCurrently, only the following fields are updatable:\n`display_name` .\nThe `etag` is mandatory.", // "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}", // "httpMethod": "PUT", // "id": "iam.projects.serviceAccounts.update", @@ -6642,7 +7419,12 @@ func (c *RolesListCall) ShowDeleted(showDeleted bool) *RolesListCall { } // View sets the optional parameter "view": Optional view for the -// returned Role objects. +// returned Role objects. When `FULL` is specified, +// the `includedPermissions` field is returned, which includes a list of +// all +// permissions in the role. The default value is `BASIC`, which does +// not +// return the `includedPermissions` field. // // Possible values: // "BASIC" @@ -6775,7 +7557,7 @@ func (c *RolesListCall) Do(opts ...googleapi.CallOption) (*ListRolesResponse, er // "type": "boolean" // }, // "view": { - // "description": "Optional view for the returned Role objects.", + // "description": "Optional view for the returned Role objects. When `FULL` is specified,\nthe `includedPermissions` field is returned, which includes a list of all\npermissions in the role. The default value is `BASIC`, which does not\nreturn the `includedPermissions` field.", // "enum": [ // "BASIC", // "FULL" diff --git a/vendor/google.golang.org/api/iamcredentials/v1/iamcredentials-api.json b/vendor/google.golang.org/api/iamcredentials/v1/iamcredentials-api.json index 45f9b1cf..34c5af87 100644 --- a/vendor/google.golang.org/api/iamcredentials/v1/iamcredentials-api.json +++ b/vendor/google.golang.org/api/iamcredentials/v1/iamcredentials-api.json @@ -118,7 +118,7 @@ ], "parameters": { "name": { - "description": "The resource name of the service account for which the credentials\nare requested, in the following format:\n`projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`.", + "description": "The resource name of the service account for which the credentials\nare requested, in the following format:\n`projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard\ncharacter is required; replacing it with a project ID is invalid.", "location": "path", "pattern": "^projects/[^/]+/serviceAccounts/[^/]+$", "required": true, @@ -146,7 +146,7 @@ ], "parameters": { "name": { - "description": "The resource name of the service account for which the credentials\nare requested, in the following format:\n`projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`.", + "description": "The resource name of the service account for which the credentials\nare requested, in the following format:\n`projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard\ncharacter is required; replacing it with a project ID is invalid.", "location": "path", "pattern": "^projects/[^/]+/serviceAccounts/[^/]+$", "required": true, @@ -174,7 +174,7 @@ ], "parameters": { "name": { - "description": "The resource name of the service account for which the credentials\nare requested, in the following format:\n`projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`.", + "description": "The resource name of the service account for which the credentials\nare requested, in the following format:\n`projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard\ncharacter is required; replacing it with a project ID is invalid.", "location": "path", "pattern": "^projects/[^/]+/serviceAccounts/[^/]+$", "required": true, @@ -199,7 +199,7 @@ ], "parameters": { "name": { - "description": "The resource name of the service account for which the credentials\nare requested, in the following format:\n`projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`.", + "description": "The resource name of the service account for which the credentials\nare requested, in the following format:\n`projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard\ncharacter is required; replacing it with a project ID is invalid.", "location": "path", "pattern": "^projects/[^/]+/serviceAccounts/[^/]+$", "required": true, @@ -227,7 +227,7 @@ ], "parameters": { "name": { - "description": "The resource name of the service account for which the credentials\nare requested, in the following format:\n`projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`.", + "description": "The resource name of the service account for which the credentials\nare requested, in the following format:\n`projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard\ncharacter is required; replacing it with a project ID is invalid.", "location": "path", "pattern": "^projects/[^/]+/serviceAccounts/[^/]+$", "required": true, @@ -250,14 +250,14 @@ } } }, - "revision": "20181013", + "revision": "20190222", "rootUrl": "https://iamcredentials.googleapis.com/", "schemas": { "GenerateAccessTokenRequest": { "id": "GenerateAccessTokenRequest", "properties": { "delegates": { - "description": "The sequence of service accounts in a delegation chain. Each service\naccount must be granted the `roles/iam.serviceAccountTokenCreator` role\non its next service account in the chain. The last service account in the\nchain must be granted the `roles/iam.serviceAccountTokenCreator` role\non the service account that is specified in the `name` field of the\nrequest.\n\nThe delegates must have the following format:\n`projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`", + "description": "The sequence of service accounts in a delegation chain. Each service\naccount must be granted the `roles/iam.serviceAccountTokenCreator` role\non its next service account in the chain. The last service account in the\nchain must be granted the `roles/iam.serviceAccountTokenCreator` role\non the service account that is specified in the `name` field of the\nrequest.\n\nThe delegates must have the following format:\n`projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard\ncharacter is required; replacing it with a project ID is invalid.", "items": { "type": "string" }, @@ -301,7 +301,7 @@ "type": "string" }, "delegates": { - "description": "The sequence of service accounts in a delegation chain. Each service\naccount must be granted the `roles/iam.serviceAccountTokenCreator` role\non its next service account in the chain. The last service account in the\nchain must be granted the `roles/iam.serviceAccountTokenCreator` role\non the service account that is specified in the `name` field of the\nrequest.\n\nThe delegates must have the following format:\n`projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`", + "description": "The sequence of service accounts in a delegation chain. Each service\naccount must be granted the `roles/iam.serviceAccountTokenCreator` role\non its next service account in the chain. The last service account in the\nchain must be granted the `roles/iam.serviceAccountTokenCreator` role\non the service account that is specified in the `name` field of the\nrequest.\n\nThe delegates must have the following format:\n`projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard\ncharacter is required; replacing it with a project ID is invalid.", "items": { "type": "string" }, @@ -328,7 +328,7 @@ "id": "GenerateIdentityBindingAccessTokenRequest", "properties": { "jwt": { - "description": "Required. Input token.\nMust be in JWT format according to\nRFC7523 (https://tools.ietf.org/html/rfc7523)\nand must have 'kid' field in the header.\nSupported signing algorithms: RS256 (RS512, ES256, ES512 coming soon).\nMandatory payload fields (along the lines of RFC 7523, section 3):\n- iss: issuer of the token. Must provide a discovery document at\n $iss/.well-known/openid-configuration . The document needs to be\n formatted according to section 4.2 of the OpenID Connect Discovery\n 1.0 specification.\n- iat: Issue time in seconds since epoch. Must be in the past.\n- exp: Expiration time in seconds since epoch. Must be less than 48 hours\n after iat. We recommend to create tokens that last shorter than 6\n hours to improve security unless business reasons mandate longer\n expiration times. Shorter token lifetimes are generally more secure\n since tokens that have been exfiltrated by attackers can be used for\n a shorter time. you can configure the maximum lifetime of the\n incoming token in the configuration of the mapper.\n The resulting Google token will expire within an hour or at \"exp\",\n whichever is earlier.\n- sub: JWT subject, identity asserted in the JWT.\n- aud: Configured in the mapper policy. By default the service account\n email.\n\nClaims from the incoming token can be transferred into the output token\naccoding to the mapper configuration. The outgoing claim size is limited.\nOutgoing claims size must be less than 4kB serialized as JSON without\nwhitespace.\n\nExample header:\n{\n \"alg\": \"RS256\",\n \"kid\": \"92a4265e14ab04d4d228a48d10d4ca31610936f8\"\n}\nExample payload:\n{\n \"iss\": \"https://accounts.google.com\",\n \"iat\": 1517963104,\n \"exp\": 1517966704,\n \"aud\": \"https://iamcredentials.googleapis.com/google.iam.credentials.v1.CloudGaia\",\n \"sub\": \"113475438248934895348\",\n \"my_claims\": {\n \"additional_claim\": \"value\"\n }\n}", + "description": "Required. Input token.\nMust be in JWT format according to\nRFC7523 (https://tools.ietf.org/html/rfc7523)\nand must have 'kid' field in the header.\nSupported signing algorithms: RS256 (RS512, ES256, ES512 coming soon).\nMandatory payload fields (along the lines of RFC 7523, section 3):\n- iss: issuer of the token. Must provide a discovery document at\n $iss/.well-known/openid-configuration . The document needs to be\n formatted according to section 4.2 of the OpenID Connect Discovery\n 1.0 specification.\n- iat: Issue time in seconds since epoch. Must be in the past.\n- exp: Expiration time in seconds since epoch. Must be less than 48 hours\n after iat. We recommend to create tokens that last shorter than 6\n hours to improve security unless business reasons mandate longer\n expiration times. Shorter token lifetimes are generally more secure\n since tokens that have been exfiltrated by attackers can be used for\n a shorter time. you can configure the maximum lifetime of the\n incoming token in the configuration of the mapper.\n The resulting Google token will expire within an hour or at \"exp\",\n whichever is earlier.\n- sub: JWT subject, identity asserted in the JWT.\n- aud: Configured in the mapper policy. By default the service account\n email.\n\nClaims from the incoming token can be transferred into the output token\naccoding to the mapper configuration. The outgoing claim size is limited.\nOutgoing claims size must be less than 4kB serialized as JSON without\nwhitespace.\n\nExample header:\n{\n \"alg\": \"RS256\",\n \"kid\": \"92a4265e14ab04d4d228a48d10d4ca31610936f8\"\n}\nExample payload:\n{\n \"iss\": \"https://accounts.google.com\",\n \"iat\": 1517963104,\n \"exp\": 1517966704,\n \"aud\":\n \"https://iamcredentials.googleapis.com/google.iam.credentials.v1.CloudGaia\",\n \"sub\": \"113475438248934895348\",\n \"my_claims\": {\n \"additional_claim\": \"value\"\n }\n}", "type": "string" }, "scope": { @@ -360,7 +360,7 @@ "id": "SignBlobRequest", "properties": { "delegates": { - "description": "The sequence of service accounts in a delegation chain. Each service\naccount must be granted the `roles/iam.serviceAccountTokenCreator` role\non its next service account in the chain. The last service account in the\nchain must be granted the `roles/iam.serviceAccountTokenCreator` role\non the service account that is specified in the `name` field of the\nrequest.\n\nThe delegates must have the following format:\n`projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`", + "description": "The sequence of service accounts in a delegation chain. Each service\naccount must be granted the `roles/iam.serviceAccountTokenCreator` role\non its next service account in the chain. The last service account in the\nchain must be granted the `roles/iam.serviceAccountTokenCreator` role\non the service account that is specified in the `name` field of the\nrequest.\n\nThe delegates must have the following format:\n`projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard\ncharacter is required; replacing it with a project ID is invalid.", "items": { "type": "string" }, @@ -393,7 +393,7 @@ "id": "SignJwtRequest", "properties": { "delegates": { - "description": "The sequence of service accounts in a delegation chain. Each service\naccount must be granted the `roles/iam.serviceAccountTokenCreator` role\non its next service account in the chain. The last service account in the\nchain must be granted the `roles/iam.serviceAccountTokenCreator` role\non the service account that is specified in the `name` field of the\nrequest.\n\nThe delegates must have the following format:\n`projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`", + "description": "The sequence of service accounts in a delegation chain. Each service\naccount must be granted the `roles/iam.serviceAccountTokenCreator` role\non its next service account in the chain. The last service account in the\nchain must be granted the `roles/iam.serviceAccountTokenCreator` role\non the service account that is specified in the `name` field of the\nrequest.\n\nThe delegates must have the following format:\n`projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard\ncharacter is required; replacing it with a project ID is invalid.", "items": { "type": "string" }, diff --git a/vendor/google.golang.org/api/iamcredentials/v1/iamcredentials-gen.go b/vendor/google.golang.org/api/iamcredentials/v1/iamcredentials-gen.go index 6a173644..3c3e0c86 100644 --- a/vendor/google.golang.org/api/iamcredentials/v1/iamcredentials-gen.go +++ b/vendor/google.golang.org/api/iamcredentials/v1/iamcredentials-gen.go @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. All rights reserved. +// Copyright 2019 Google LLC. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. @@ -6,13 +6,35 @@ // Package iamcredentials provides access to the IAM Service Account Credentials API. // -// See https://cloud.google.com/iam/docs/creating-short-lived-service-account-credentials +// For product documentation, see: https://cloud.google.com/iam/docs/creating-short-lived-service-account-credentials +// +// Creating a client // // Usage example: // // import "google.golang.org/api/iamcredentials/v1" // ... -// iamcredentialsService, err := iamcredentials.New(oauthHttpClient) +// ctx := context.Background() +// iamcredentialsService, err := iamcredentials.NewService(ctx) +// +// In this example, Google Application Default Credentials are used for authentication. +// +// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// +// Other authentication options +// +// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// +// iamcredentialsService, err := iamcredentials.NewService(ctx, option.WithAPIKey("AIza...")) +// +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// +// config := &oauth2.Config{...} +// // ... +// token, err := config.Exchange(ctx, ...) +// iamcredentialsService, err := iamcredentials.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) +// +// See https://godoc.org/google.golang.org/api/option/ for details on options. package iamcredentials // import "google.golang.org/api/iamcredentials/v1" import ( @@ -29,6 +51,8 @@ import ( gensupport "google.golang.org/api/gensupport" googleapi "google.golang.org/api/googleapi" + option "google.golang.org/api/option" + htransport "google.golang.org/api/transport/http" ) // Always reference these packages, just in case the auto-generated code @@ -56,6 +80,32 @@ const ( CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" ) +// NewService creates a new Service. +func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { + scopesOption := option.WithScopes( + "https://www.googleapis.com/auth/cloud-platform", + ) + // NOTE: prepend, so we don't override user-specified scopes. + opts = append([]option.ClientOption{scopesOption}, opts...) + client, endpoint, err := htransport.NewClient(ctx, opts...) + if err != nil { + return nil, err + } + s, err := New(client) + if err != nil { + return nil, err + } + if endpoint != "" { + s.BasePath = endpoint + } + return s, nil +} + +// New creates a new Service. It uses the provided http.Client for requests. +// +// Deprecated: please use NewService instead. +// To provide a custom HTTP client, use option.WithHTTPClient. +// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. func New(client *http.Client) (*Service, error) { if client == nil { return nil, errors.New("client is nil") @@ -116,7 +166,9 @@ type GenerateAccessTokenRequest struct { // // The delegates must have the following // format: - // `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}` + // `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` + // wildcard + // character is required; replacing it with a project ID is invalid. Delegates []string `json:"delegates,omitempty"` // Lifetime: The desired lifetime duration of the access token in @@ -214,7 +266,9 @@ type GenerateIdTokenRequest struct { // // The delegates must have the following // format: - // `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}` + // `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` + // wildcard + // character is required; replacing it with a project ID is invalid. Delegates []string `json:"delegates,omitempty"` // IncludeEmail: Include the service account email in the token. If set @@ -330,6 +384,7 @@ type GenerateIdentityBindingAccessTokenRequest struct { // "iat": 1517963104, // "exp": 1517966704, // "aud": + // // "https://iamcredentials.googleapis.com/google.iam.credentials.v1.Cloud // Gaia", // "sub": "113475438248934895348", @@ -420,7 +475,9 @@ type SignBlobRequest struct { // // The delegates must have the following // format: - // `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}` + // `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` + // wildcard + // character is required; replacing it with a project ID is invalid. Delegates []string `json:"delegates,omitempty"` // Payload: The bytes to sign. @@ -498,7 +555,9 @@ type SignJwtRequest struct { // // The delegates must have the following // format: - // `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}` + // `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` + // wildcard + // character is required; replacing it with a project ID is invalid. Delegates []string `json:"delegates,omitempty"` // Payload: The JWT payload to sign: a JSON object that contains a JWT @@ -681,7 +740,7 @@ func (c *ProjectsServiceAccountsGenerateAccessTokenCall) Do(opts ...googleapi.Ca // ], // "parameters": { // "name": { - // "description": "The resource name of the service account for which the credentials\nare requested, in the following format:\n`projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`.", + // "description": "The resource name of the service account for which the credentials\nare requested, in the following format:\n`projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard\ncharacter is required; replacing it with a project ID is invalid.", // "location": "path", // "pattern": "^projects/[^/]+/serviceAccounts/[^/]+$", // "required": true, @@ -821,7 +880,7 @@ func (c *ProjectsServiceAccountsGenerateIdTokenCall) Do(opts ...googleapi.CallOp // ], // "parameters": { // "name": { - // "description": "The resource name of the service account for which the credentials\nare requested, in the following format:\n`projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`.", + // "description": "The resource name of the service account for which the credentials\nare requested, in the following format:\n`projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard\ncharacter is required; replacing it with a project ID is invalid.", // "location": "path", // "pattern": "^projects/[^/]+/serviceAccounts/[^/]+$", // "required": true, @@ -962,7 +1021,7 @@ func (c *ProjectsServiceAccountsGenerateIdentityBindingAccessTokenCall) Do(opts // ], // "parameters": { // "name": { - // "description": "The resource name of the service account for which the credentials\nare requested, in the following format:\n`projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`.", + // "description": "The resource name of the service account for which the credentials\nare requested, in the following format:\n`projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard\ncharacter is required; replacing it with a project ID is invalid.", // "location": "path", // "pattern": "^projects/[^/]+/serviceAccounts/[^/]+$", // "required": true, @@ -1099,7 +1158,7 @@ func (c *ProjectsServiceAccountsSignBlobCall) Do(opts ...googleapi.CallOption) ( // ], // "parameters": { // "name": { - // "description": "The resource name of the service account for which the credentials\nare requested, in the following format:\n`projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`.", + // "description": "The resource name of the service account for which the credentials\nare requested, in the following format:\n`projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard\ncharacter is required; replacing it with a project ID is invalid.", // "location": "path", // "pattern": "^projects/[^/]+/serviceAccounts/[^/]+$", // "required": true, @@ -1239,7 +1298,7 @@ func (c *ProjectsServiceAccountsSignJwtCall) Do(opts ...googleapi.CallOption) (* // ], // "parameters": { // "name": { - // "description": "The resource name of the service account for which the credentials\nare requested, in the following format:\n`projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`.", + // "description": "The resource name of the service account for which the credentials\nare requested, in the following format:\n`projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard\ncharacter is required; replacing it with a project ID is invalid.", // "location": "path", // "pattern": "^projects/[^/]+/serviceAccounts/[^/]+$", // "required": true, diff --git a/vendor/google.golang.org/api/internal/creds.go b/vendor/google.golang.org/api/internal/creds.go index e5b849bf..69b8659f 100644 --- a/vendor/google.golang.org/api/internal/creds.go +++ b/vendor/google.golang.org/api/internal/creds.go @@ -16,30 +16,87 @@ package internal import ( "context" + "encoding/json" "fmt" "io/ioutil" + "golang.org/x/oauth2" + "golang.org/x/oauth2/google" ) // Creds returns credential information obtained from DialSettings, or if none, then // it returns default credential information. -func Creds(ctx context.Context, ds *DialSettings) (*google.DefaultCredentials, error) { +func Creds(ctx context.Context, ds *DialSettings) (*google.Credentials, error) { if ds.Credentials != nil { return ds.Credentials, nil } if ds.CredentialsJSON != nil { - return google.CredentialsFromJSON(ctx, ds.CredentialsJSON, ds.Scopes...) + return credentialsFromJSON(ctx, ds.CredentialsJSON, ds.Endpoint, ds.Scopes, ds.Audiences) } if ds.CredentialsFile != "" { data, err := ioutil.ReadFile(ds.CredentialsFile) if err != nil { return nil, fmt.Errorf("cannot read credentials file: %v", err) } - return google.CredentialsFromJSON(ctx, data, ds.Scopes...) + return credentialsFromJSON(ctx, data, ds.Endpoint, ds.Scopes, ds.Audiences) } if ds.TokenSource != nil { - return &google.DefaultCredentials{TokenSource: ds.TokenSource}, nil + return &google.Credentials{TokenSource: ds.TokenSource}, nil } - return google.FindDefaultCredentials(ctx, ds.Scopes...) + cred, err := google.FindDefaultCredentials(ctx, ds.Scopes...) + if err != nil { + return nil, err + } + if len(cred.JSON) > 0 { + return credentialsFromJSON(ctx, cred.JSON, ds.Endpoint, ds.Scopes, ds.Audiences) + } + // For GAE and GCE, the JSON is empty so return the default credentials directly. + return cred, nil +} + +// JSON key file type. +const ( + serviceAccountKey = "service_account" +) + +// credentialsFromJSON returns a google.Credentials based on the input. +// +// - If the JSON is a service account and no scopes provided, returns self-signed JWT auth flow +// - Otherwise, returns OAuth 2.0 flow. +func credentialsFromJSON(ctx context.Context, data []byte, endpoint string, scopes []string, audiences []string) (*google.Credentials, error) { + cred, err := google.CredentialsFromJSON(ctx, data, scopes...) + if err != nil { + return nil, err + } + if len(data) > 0 && len(scopes) == 0 { + var f struct { + Type string `json:"type"` + // The rest JSON fields are omitted because they are not used. + } + if err := json.Unmarshal(cred.JSON, &f); err != nil { + return nil, err + } + if f.Type == serviceAccountKey { + ts, err := selfSignedJWTTokenSource(data, endpoint, audiences) + if err != nil { + return nil, err + } + cred.TokenSource = ts + } + } + return cred, err +} + +func selfSignedJWTTokenSource(data []byte, endpoint string, audiences []string) (oauth2.TokenSource, error) { + // Use the API endpoint as the default audience + audience := endpoint + if len(audiences) > 0 { + // TODO(shinfan): Update golang oauth to support multiple audiences. + if len(audiences) > 1 { + return nil, fmt.Errorf("multiple audiences support is not implemented") + } + audience = audiences[0] + } + return google.JWTAccessTokenSourceFromJSON(data, audience) } diff --git a/vendor/google.golang.org/api/internal/pool.go b/vendor/google.golang.org/api/internal/pool.go index ba406247..a4426dcb 100644 --- a/vendor/google.golang.org/api/internal/pool.go +++ b/vendor/google.golang.org/api/internal/pool.go @@ -38,7 +38,7 @@ func NewPoolResolver(size int, o *DialSettings) *PoolResolver { // provided to NewPoolResolver. func (r *PoolResolver) Resolve(target string) (naming.Watcher, error) { if r.dialOpt.Endpoint == "" { - return nil, errors.New("No endpoint configured") + return nil, errors.New("no endpoint configured") } addrs := make([]*naming.Update, 0, r.poolSize) for i := 0; i < r.poolSize; i++ { diff --git a/vendor/google.golang.org/api/internal/service-account.json b/vendor/google.golang.org/api/internal/service-account.json index 2cb54c29..6b36a929 100644 --- a/vendor/google.golang.org/api/internal/service-account.json +++ b/vendor/google.golang.org/api/internal/service-account.json @@ -2,7 +2,7 @@ "type": "service_account", "project_id": "project_id", "private_key_id": "private_key_id", - "private_key": "private_key", + "private_key": "-----BEGIN PRIVATE KEY-----\nMIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCzd9ZdbPLAR4/g\nj+Rodu15kEasMpxf/Mz+gKRb2fmgR2Y18Y/iRBYZ4SkmF2pBSfzvwE/aTCzSPBGl\njHhPzohXnSN029eWoItmxVONlqCbR29pD07aLzv08LGeIGdHIEdhVjhvRwTkYZIF\ndXmlHNDRUU/EbJN9D+3ahw22BNnC4PaDgfIWTs3xIlTCSf2rL39I4DSNLTS/LzxK\n/XrQfBMtfwMWwyQaemXbc7gRgzOy8L56wa1W1zyXx99th97j1bLnoAXBGplhB4Co\n25ohyDAuhxRm+XGMEaO0Mzo7u97kvhj48a569RH1QRhOf7EBf60jO4h5eOmfi5P5\nPV3l7041AgMBAAECggEAEZ0RTNoEeRqM5F067YW+iM/AH+ZXspP9Cn1VpC4gcbqQ\nLXsnw+0qvh97CmIB66Z3TJBzRdl0DK4YjUbcB/kdKHwjnrR01DOtesijCqJd4N+B\n762w73jzSXbV9872U+S3HLZ5k3JE6KUqz55X8fyCAgkY6w4862lEzs2yasrPFHEV\nRoQp3PM0Miif8R3hGDhOWcHxcobullthG6JHAQFfc1ctwEjZI4TK0iWqlzfWGyKN\nT9UgvjUDud5cGvS9el0AiLN6keAf77tcPn1zetUVhxN1KN4bVAm1Q+6O8esl63Rj\n7JXpHzxaRnit9S6/aH/twHsGGtLg5Puw6jey6xs4AQKBgQD2JNy1wzewCRkD+jug\n8CHbJ+LIJVRNIaWa/RK1QD8/UjmFPkIzRQSF3AKC5mRAWSa2FL3yVK3N/DD7hazW\n85XSBB7IDcnoJnA9SkUeWwqQGkDx3EntlU3gX8Kn/+ofF8O9jLXxAa901MAVXVuf\n5YDzrl4PNE3bFnPCdiNmSdRfhQKBgQC6p4DsCpwqbeTu9f5ak9VW/fQP47Fgt+Mf\nwGjBnKP5PbbNJpHCfamF7jqSRH83Xy0KNssH7jD/NZ2oT594sMmiQPUC5ni9VYY6\nsuYB0JbD5Mq+EjKIVhYtxaQJ76LzHreEI+G4z6k3H7/hRpr3/C48n9G/uVkT9DbJ\noplxxEx68QKBgQCdJ23vcwO0Firtmi/GEmtbVHz70rGfSXNFoHz4UlvPXv0wsE5u\nE4vOt2i3EMhDOWh46odYGG6bzH+tp2xyFTW70Dui+QLHgPs6dpfoyLHWzZxXj5F3\n6lK9hgZvYvqk/XRRKmzjwnK2wjsdqOyeC1covlR5mqh20D/6kZkKbur0TQKBgAwy\nCZBimRWEnKKoW/gbFKNccGfhXqONID/g2Hdd/rC4QYth68AjacIgcJ9B7nX1uAGk\n1tsryvPB0w0+NpMyKdp6GAgaeuUUA3MuYSzZLiCagEyu77JMvaI7+Z3UlHcCGMd/\neK4Uk1/QqT7U2Cc/yN2ZK6E1QQa2vCWshA4U31JhAoGAbtbSSSsul1c+PsJ13Cfk\n6qVnqYzPqt23QTyOZmGAvUHH/M4xRiQpOE0cDF4t/r5PwenAQPQzTvMmWRzj6uAY\n3eaU0eAK7ZfoweCoOIAPnpFbbRLrXfoY46H7MYh7euWGXOKEpxz5yzuEkd9ByNUE\n86vSEidqbMIiXVgEgnu/k08=\n-----END PRIVATE KEY-----\n", "client_email": "xyz@developer.gserviceaccount.com", "client_id": "123", "auth_uri": "https://accounts.google.com/o/oauth2/auth", diff --git a/vendor/google.golang.org/api/internal/settings.go b/vendor/google.golang.org/api/internal/settings.go index afabdc42..062301c6 100644 --- a/vendor/google.golang.org/api/internal/settings.go +++ b/vendor/google.golang.org/api/internal/settings.go @@ -30,15 +30,21 @@ type DialSettings struct { Endpoint string Scopes []string TokenSource oauth2.TokenSource - Credentials *google.DefaultCredentials + Credentials *google.Credentials CredentialsFile string // if set, Token Source is ignored. CredentialsJSON []byte UserAgent string APIKey string + Audiences []string HTTPClient *http.Client GRPCDialOpts []grpc.DialOption GRPCConn *grpc.ClientConn NoAuth bool + + // Google API system parameters. For more information please read: + // https://cloud.google.com/apis/docs/system-parameters + QuotaProject string + RequestReason string } // Validate reports an error if ds is invalid. @@ -66,6 +72,9 @@ func (ds *DialSettings) Validate() error { if ds.TokenSource != nil { nCreds++ } + if len(ds.Scopes) > 0 && len(ds.Audiences) > 0 { + return errors.New("WithScopes is incompatible with WithAudience") + } // Accept only one form of credentials, except we allow TokenSource and CredentialsFile for backwards compatibility. if nCreds > 1 && !(nCreds == 2 && ds.TokenSource != nil && ds.CredentialsFile != "") { return errors.New("multiple credential options provided") @@ -76,6 +85,12 @@ func (ds *DialSettings) Validate() error { if ds.HTTPClient != nil && ds.GRPCDialOpts != nil { return errors.New("WithHTTPClient is incompatible with gRPC dial options") } + if ds.HTTPClient != nil && ds.QuotaProject != "" { + return errors.New("WithHTTPClient is incompatible with QuotaProject") + } + if ds.HTTPClient != nil && ds.RequestReason != "" { + return errors.New("WithHTTPClient is incompatible with RequestReason") + } return nil } diff --git a/vendor/google.golang.org/api/logging/v2/logging-api.json b/vendor/google.golang.org/api/logging/v2/logging-api.json index 20b51d4d..3a068e40 100644 --- a/vendor/google.golang.org/api/logging/v2/logging-api.json +++ b/vendor/google.golang.org/api/logging/v2/logging-api.json @@ -478,7 +478,7 @@ ] }, "patch": { - "description": "Updates a sink. This method replaces the following fields in the existing sink with values from the new sink: destination, and filter. The updated sink might also have a new writer_identity; see the unique_writer_identity field.", + "description": "Updates a sink. This method replaces the following fields in the existing sink with values from the new sink: destination, and filter.The updated sink might also have a new writer_identity; see the unique_writer_identity field.", "flatPath": "v2/billingAccounts/{billingAccountsId}/sinks/{sinksId}", "httpMethod": "PATCH", "id": "logging.billingAccounts.sinks.patch", @@ -518,7 +518,7 @@ ] }, "update": { - "description": "Updates a sink. This method replaces the following fields in the existing sink with values from the new sink: destination, and filter. The updated sink might also have a new writer_identity; see the unique_writer_identity field.", + "description": "Updates a sink. This method replaces the following fields in the existing sink with values from the new sink: destination, and filter.The updated sink might also have a new writer_identity; see the unique_writer_identity field.", "flatPath": "v2/billingAccounts/{billingAccountsId}/sinks/{sinksId}", "httpMethod": "PUT", "id": "logging.billingAccounts.sinks.update", @@ -1129,7 +1129,7 @@ ] }, "patch": { - "description": "Updates a sink. This method replaces the following fields in the existing sink with values from the new sink: destination, and filter. The updated sink might also have a new writer_identity; see the unique_writer_identity field.", + "description": "Updates a sink. This method replaces the following fields in the existing sink with values from the new sink: destination, and filter.The updated sink might also have a new writer_identity; see the unique_writer_identity field.", "flatPath": "v2/folders/{foldersId}/sinks/{sinksId}", "httpMethod": "PATCH", "id": "logging.folders.sinks.patch", @@ -1169,7 +1169,7 @@ ] }, "update": { - "description": "Updates a sink. This method replaces the following fields in the existing sink with values from the new sink: destination, and filter. The updated sink might also have a new writer_identity; see the unique_writer_identity field.", + "description": "Updates a sink. This method replaces the following fields in the existing sink with values from the new sink: destination, and filter.The updated sink might also have a new writer_identity; see the unique_writer_identity field.", "flatPath": "v2/folders/{foldersId}/sinks/{sinksId}", "httpMethod": "PUT", "id": "logging.folders.sinks.update", @@ -1677,7 +1677,7 @@ ] }, "patch": { - "description": "Updates a sink. This method replaces the following fields in the existing sink with values from the new sink: destination, and filter. The updated sink might also have a new writer_identity; see the unique_writer_identity field.", + "description": "Updates a sink. This method replaces the following fields in the existing sink with values from the new sink: destination, and filter.The updated sink might also have a new writer_identity; see the unique_writer_identity field.", "flatPath": "v2/organizations/{organizationsId}/sinks/{sinksId}", "httpMethod": "PATCH", "id": "logging.organizations.sinks.patch", @@ -1717,7 +1717,7 @@ ] }, "update": { - "description": "Updates a sink. This method replaces the following fields in the existing sink with values from the new sink: destination, and filter. The updated sink might also have a new writer_identity; see the unique_writer_identity field.", + "description": "Updates a sink. This method replaces the following fields in the existing sink with values from the new sink: destination, and filter.The updated sink might also have a new writer_identity; see the unique_writer_identity field.", "flatPath": "v2/organizations/{organizationsId}/sinks/{sinksId}", "httpMethod": "PUT", "id": "logging.organizations.sinks.update", @@ -2280,7 +2280,7 @@ ] }, "patch": { - "description": "Updates a sink. This method replaces the following fields in the existing sink with values from the new sink: destination, and filter. The updated sink might also have a new writer_identity; see the unique_writer_identity field.", + "description": "Updates a sink. This method replaces the following fields in the existing sink with values from the new sink: destination, and filter.The updated sink might also have a new writer_identity; see the unique_writer_identity field.", "flatPath": "v2/projects/{projectsId}/sinks/{sinksId}", "httpMethod": "PATCH", "id": "logging.projects.sinks.patch", @@ -2320,7 +2320,7 @@ ] }, "update": { - "description": "Updates a sink. This method replaces the following fields in the existing sink with values from the new sink: destination, and filter. The updated sink might also have a new writer_identity; see the unique_writer_identity field.", + "description": "Updates a sink. This method replaces the following fields in the existing sink with values from the new sink: destination, and filter.The updated sink might also have a new writer_identity; see the unique_writer_identity field.", "flatPath": "v2/projects/{projectsId}/sinks/{sinksId}", "httpMethod": "PUT", "id": "logging.projects.sinks.update", @@ -2493,7 +2493,7 @@ ] }, "update": { - "description": "Updates a sink. This method replaces the following fields in the existing sink with values from the new sink: destination, and filter. The updated sink might also have a new writer_identity; see the unique_writer_identity field.", + "description": "Updates a sink. This method replaces the following fields in the existing sink with values from the new sink: destination, and filter.The updated sink might also have a new writer_identity; see the unique_writer_identity field.", "flatPath": "v2/{v2Id}/{v2Id1}/sinks/{sinksId}", "httpMethod": "PUT", "id": "logging.sinks.update", @@ -2535,7 +2535,7 @@ } } }, - "revision": "20181215", + "revision": "20190316", "rootUrl": "https://logging.googleapis.com/", "schemas": { "BucketOptions": { @@ -2666,7 +2666,7 @@ "type": "integer" }, "userAgent": { - "description": "The user agent sent by the client. Example: \"Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q312461; .NET CLR 1.0.3705)\".", + "description": "The user agent sent by the client. Example: \"Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q312461; .NET\nCLR 1.0.3705)\".", "type": "string" } }, @@ -2763,7 +2763,7 @@ "type": "string" }, "projectIds": { - "description": "Deprecated. Use resource_names instead. One or more project identifiers or project numbers from which to retrieve log entries. Example: \"my-project-1A\". If present, these project identifiers are converted to resource name format and added to the list of resources in resource_names.", + "description": "Deprecated. Use resource_names instead. One or more project identifiers or project numbers from which to retrieve log entries. Example: \"my-project-1A\".", "items": { "type": "string" }, @@ -2897,12 +2897,12 @@ "type": "object" }, "logName": { - "description": "Required. The resource name of the log to which this log entry belongs:\n\"projects/[PROJECT_ID]/logs/[LOG_ID]\"\n\"organizations/[ORGANIZATION_ID]/logs/[LOG_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]\"\n\"folders/[FOLDER_ID]/logs/[LOG_ID]\"\nA project number may optionally be used in place of PROJECT_ID. The project number is translated to its corresponding PROJECT_ID internally and the log_name field will contain PROJECT_ID in queries and exports.[LOG_ID] must be URL-encoded within log_name. Example: \"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity\". [LOG_ID] must be less than 512 characters long and can only include the following characters: upper and lower case alphanumeric characters, forward-slash, underscore, hyphen, and period.For backward compatibility, if log_name begins with a forward-slash, such as /projects/..., then the log entry is ingested as usual but the forward-slash is removed. Listing the log entry will not show the leading slash and filtering for a log name with a leading slash will never return any results.", + "description": "Required. The resource name of the log to which this log entry belongs:\n\"projects/[PROJECT_ID]/logs/[LOG_ID]\"\n\"organizations/[ORGANIZATION_ID]/logs/[LOG_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]\"\n\"folders/[FOLDER_ID]/logs/[LOG_ID]\"\nA project number may optionally be used in place of PROJECT_ID. The project number is translated to its corresponding PROJECT_ID internally and the log_name field will contain PROJECT_ID in queries and exports.[LOG_ID] must be URL-encoded within log_name. Example: \"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity\". [LOG_ID] must be less than 512 characters long and can only include the following characters: upper and lower case alphanumeric characters, forward-slash, underscore, hyphen, and period.For backward compatibility, if log_name begins with a forward-slash, such as /projects/..., then the log entry is ingested as usual but the forward-slash is removed. Listing the log entry will not show the leading slash and filtering for a log name with a leading slash will never return any results.", "type": "string" }, "metadata": { "$ref": "MonitoredResourceMetadata", - "description": "Output only. Additional metadata about the monitored resource. Only k8s_container, k8s_pod, and k8s_node MonitoredResources have this field populated." + "description": "Deprecated. Output only. Additional metadata about the monitored resource.Only k8s_container, k8s_pod, and k8s_node MonitoredResources have this field populated for GKE versions older than 1.12.6. For GKE versions 1.12.6 and above, the metadata field has been deprecated. The Kubernetes pod labels that used to be in metadata.userLabels will now be present in the labels field with a key prefix of k8s-pod/. The Stackdriver system labels that were present in the metadata.systemLabels field will no longer be available in the LogEntry." }, "operation": { "$ref": "LogEntryOperation", @@ -2923,7 +2923,7 @@ }, "resource": { "$ref": "MonitoredResource", - "description": "Required. The primary monitored resource associated with this log entry. Example: a log entry that reports a database error would be associated with the monitored resource designating the particular database that reported the error." + "description": "Required. The primary monitored resource associated with this log entry.Example: a log entry that reports a database error would be associated with the monitored resource designating the particular database that reported the error." }, "severity": { "description": "Optional. The severity of the log entry. The default value is LogSeverity.DEFAULT.", @@ -2956,7 +2956,7 @@ "description": "Optional. Source code location information associated with the log entry, if any." }, "spanId": { - "description": "Optional. The span ID within the trace associated with the log entry. For Trace spans, this is the same format that the Trace API v2 uses: a 16-character hexadecimal encoding of an 8-byte array, such as \u003ccode\u003e\"000000000000004a\"\u003c/code\u003e.", + "description": "Optional. The span ID within the trace associated with the log entry.For Trace spans, this is the same format that the Trace API v2 uses: a 16-character hexadecimal encoding of an 8-byte array, such as \u003ccode\u003e\"000000000000004a\"\u003c/code\u003e.", "type": "string" }, "textPayload": { @@ -2973,7 +2973,7 @@ "type": "string" }, "traceSampled": { - "description": "Optional. The sampling decision of the trace associated with the log entry. True means that the trace resource name in the trace field was sampled for storage in a trace backend. False means that the trace was not sampled for storage when this log entry was written, or the sampling decision was unknown at the time. A non-sampled trace value is still useful as a request correlation identifier. The default is False.", + "description": "Optional. The sampling decision of the trace associated with the log entry.True means that the trace resource name in the trace field was sampled for storage in a trace backend. False means that the trace was not sampled for storage when this log entry was written, or the sampling decision was unknown at the time. A non-sampled trace value is still useful as a request correlation identifier. The default is False.", "type": "boolean" } }, @@ -3026,12 +3026,17 @@ "description": "Specifies a set of log entries that are not to be stored in Logging. If your project receives a large volume of logs, you might be able to use exclusions to reduce your chargeable logs. Exclusions are processed after log sinks, so you can export log entries before they are excluded. Audit log entries and log entries from Amazon Web Services are never excluded.", "id": "LogExclusion", "properties": { + "createTime": { + "description": "Output only. The creation timestamp of the exclusion.This field may not be present for older exclusions.", + "format": "google-datetime", + "type": "string" + }, "description": { "description": "Optional. A description of this exclusion.", "type": "string" }, "disabled": { - "description": "Optional. If set to True, then this exclusion is disabled and it does not exclude any log entries. You can use exclusions.patch to change the value of this field.", + "description": "Optional. If set to True, then this exclusion is disabled and it does not exclude any log entries. You can update an exclusion to change the value of this field.", "type": "boolean" }, "filter": { @@ -3041,6 +3046,11 @@ "name": { "description": "Required. A client-assigned identifier, such as \"load-balancer-exclusion\". Identifiers are limited to 100 characters and can include only letters, digits, underscores, hyphens, and periods.", "type": "string" + }, + "updateTime": { + "description": "Output only. The last update timestamp of the exclusion.This field may not be present for older exclusions.", + "format": "google-datetime", + "type": "string" } }, "type": "object" @@ -3099,6 +3109,11 @@ "$ref": "BucketOptions", "description": "Optional. The bucket_options are required when the logs-based metric is using a DISTRIBUTION value type and it describes the bucket boundaries used to create a histogram of the extracted values." }, + "createTime": { + "description": "Output only. The creation timestamp of the metric.This field may not be present for older metrics.", + "format": "google-datetime", + "type": "string" + }, "description": { "description": "Optional. A description of this metric, which is used in documentation. The maximum length of the description is 8000 characters.", "type": "string" @@ -3122,6 +3137,11 @@ "description": "Required. The client-assigned metric identifier. Examples: \"error_count\", \"nginx/requests\".Metric identifiers are limited to 100 characters and can include only the following characters: A-Z, a-z, 0-9, and the special characters _-.,+!*',()%/. The forward-slash character (/) denotes a hierarchy of name pieces, and it cannot be the first character of the name.The metric identifier in this field must not be URL-encoded (https://en.wikipedia.org/wiki/Percent-encoding). However, when the metric identifier appears as the [METRIC_ID] part of a metric_name API parameter, then the metric identifier must be URL-encoded. Example: \"projects/my-project/metrics/nginx%2Frequests\".", "type": "string" }, + "updateTime": { + "description": "Output only. The last update timestamp of the metric.This field may not be present for older metrics.", + "format": "google-datetime", + "type": "string" + }, "valueExtractor": { "description": "Optional. A value_extractor is required when using a distribution logs-based metric to extract the values to record from a log entry. Two functions are supported for value extraction: EXTRACT(field) or REGEXP_EXTRACT(field, regex). The argument are: 1. field: The name of the log entry field from which the value is to be extracted. 2. regex: A regular expression using the Google RE2 syntax (https://github.com/google/re2/wiki/Syntax) with a single capture group to extract data from the specified log entry field. The value of the field is converted to a string before applying the regex. It is an error to specify a regex that does not include exactly one capture group.The result of the extraction must be convertible to a double type, as the distribution always records double values. If either the extraction or the conversion to double fails, then those values are not recorded in the distribution.Example: REGEXP_EXTRACT(jsonPayload.request, \".*quantity=(\\d+).*\")", "type": "string" @@ -3145,8 +3165,13 @@ "description": "Describes a sink used to export log entries to one of the following destinations in any project: a Cloud Storage bucket, a BigQuery dataset, or a Cloud Pub/Sub topic. A logs filter controls which log entries are exported. The sink must be created within a project, organization, billing account, or folder.", "id": "LogSink", "properties": { + "createTime": { + "description": "Output only. The creation timestamp of the sink.This field may not be present for older sinks.", + "format": "google-datetime", + "type": "string" + }, "destination": { - "description": "Required. The export destination:\n\"storage.googleapis.com/[GCS_BUCKET]\"\n\"bigquery.googleapis.com/projects/[PROJECT_ID]/datasets/[DATASET]\"\n\"pubsub.googleapis.com/projects/[PROJECT_ID]/topics/[TOPIC_ID]\"\nThe sink's writer_identity, set when the sink is created, must have permission to write to the destination or else the log entries are not exported. For more information, see Exporting Logs With Sinks.", + "description": "Required. The export destination:\n\"storage.googleapis.com/[GCS_BUCKET]\"\n\"bigquery.googleapis.com/projects/[PROJECT_ID]/datasets/[DATASET]\"\n\"pubsub.googleapis.com/projects/[PROJECT_ID]/topics/[TOPIC_ID]\"\nThe sink's writer_identity, set when the sink is created, must have permission to write to the destination or else the log entries are not exported. For more information, see Exporting Logs with Sinks.", "type": "string" }, "filter": { @@ -3175,8 +3200,13 @@ ], "type": "string" }, + "updateTime": { + "description": "Output only. The last update timestamp of the sink.This field may not be present for older sinks.", + "format": "google-datetime", + "type": "string" + }, "writerIdentity": { - "description": "Output only. An IAM identity\u0026mdash;a service account or group\u0026mdash;under which Logging writes the exported log entries to the sink's destination. This field is set by sinks.create and sinks.update, based on the setting of unique_writer_identity in those methods.Until you grant this identity write-access to the destination, log entry exports from this sink will fail. For more information, see Granting access for a resource. Consult the destination service's documentation to determine the appropriate IAM roles to assign to the identity.", + "description": "Output only. An IAM identity\u0026mdash;a service account or group\u0026mdash;under which Logging writes the exported log entries to the sink's destination. This field is set by sinks.create and sinks.update based on the value of unique_writer_identity in those methods.Until you grant this identity write-access to the destination, log entry exports from this sink will fail. For more information, see Granting Access for a Resource. Consult the destination service's documentation to determine the appropriate IAM roles to assign to the identity.", "type": "string" } }, diff --git a/vendor/google.golang.org/api/logging/v2/logging-gen.go b/vendor/google.golang.org/api/logging/v2/logging-gen.go index 9eab8ea5..990b3302 100644 --- a/vendor/google.golang.org/api/logging/v2/logging-gen.go +++ b/vendor/google.golang.org/api/logging/v2/logging-gen.go @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. All rights reserved. +// Copyright 2019 Google LLC. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. @@ -8,13 +8,39 @@ // // This package is DEPRECATED. Use package cloud.google.com/go/logging instead. // -// See https://cloud.google.com/logging/docs/ +// For product documentation, see: https://cloud.google.com/logging/docs/ +// +// Creating a client // // Usage example: // // import "google.golang.org/api/logging/v2" // ... -// loggingService, err := logging.New(oauthHttpClient) +// ctx := context.Background() +// loggingService, err := logging.NewService(ctx) +// +// In this example, Google Application Default Credentials are used for authentication. +// +// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// +// Other authentication options +// +// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// +// loggingService, err := logging.NewService(ctx, option.WithScopes(logging.LoggingWriteScope)) +// +// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// +// loggingService, err := logging.NewService(ctx, option.WithAPIKey("AIza...")) +// +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// +// config := &oauth2.Config{...} +// // ... +// token, err := config.Exchange(ctx, ...) +// loggingService, err := logging.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) +// +// See https://godoc.org/google.golang.org/api/option/ for details on options. package logging // import "google.golang.org/api/logging/v2" import ( @@ -31,6 +57,8 @@ import ( gensupport "google.golang.org/api/gensupport" googleapi "google.golang.org/api/googleapi" + option "google.golang.org/api/option" + htransport "google.golang.org/api/transport/http" ) // Always reference these packages, just in case the auto-generated code @@ -70,6 +98,36 @@ const ( LoggingWriteScope = "https://www.googleapis.com/auth/logging.write" ) +// NewService creates a new Service. +func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { + scopesOption := option.WithScopes( + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/logging.admin", + "https://www.googleapis.com/auth/logging.read", + "https://www.googleapis.com/auth/logging.write", + ) + // NOTE: prepend, so we don't override user-specified scopes. + opts = append([]option.ClientOption{scopesOption}, opts...) + client, endpoint, err := htransport.NewClient(ctx, opts...) + if err != nil { + return nil, err + } + s, err := New(client) + if err != nil { + return nil, err + } + if endpoint != "" { + s.BasePath = endpoint + } + return s, nil +} + +// New creates a new Service. It uses the provided http.Client for requests. +// +// Deprecated: please use NewService instead. +// To provide a custom HTTP client, use option.WithHTTPClient. +// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. func New(client *http.Client) (*Service, error) { if client == nil { return nil, errors.New("client is nil") @@ -573,7 +631,8 @@ type HttpRequest struct { Status int64 `json:"status,omitempty"` // UserAgent: The user agent sent by the client. Example: "Mozilla/4.0 - // (compatible; MSIE 6.0; Windows 98; Q312461; .NET CLR 1.0.3705)". + // (compatible; MSIE 6.0; Windows 98; Q312461; .NET + // CLR 1.0.3705)". UserAgent string `json:"userAgent,omitempty"` // ForceSendFields is a list of field names (e.g. "CacheFillBytes") to @@ -767,9 +826,7 @@ type ListLogEntriesRequest struct { // ProjectIds: Deprecated. Use resource_names instead. One or more // project identifiers or project numbers from which to retrieve log - // entries. Example: "my-project-1A". If present, these project - // identifiers are converted to resource name format and added to the - // list of resources in resource_names. + // entries. Example: "my-project-1A". ProjectIds []string `json:"projectIds,omitempty"` // ResourceNames: Required. Names of one or more parent resources from @@ -1040,7 +1097,7 @@ type LogEntry struct { // "folders/[FOLDER_ID]/logs/[LOG_ID]" // A project number may optionally be used in place of PROJECT_ID. The // project number is translated to its corresponding PROJECT_ID - // internally and the log_name field will contain PROJECT_ID in queries + // internally and the log_name field will contain PROJECT_ID in queries // and exports.[LOG_ID] must be URL-encoded within log_name. Example: // "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Fa // ctivity". [LOG_ID] must be less than 512 characters long and can only @@ -1053,9 +1110,15 @@ type LogEntry struct { // never return any results. LogName string `json:"logName,omitempty"` - // Metadata: Output only. Additional metadata about the monitored - // resource. Only k8s_container, k8s_pod, and k8s_node - // MonitoredResources have this field populated. + // Metadata: Deprecated. Output only. Additional metadata about the + // monitored resource.Only k8s_container, k8s_pod, and k8s_node + // MonitoredResources have this field populated for GKE versions older + // than 1.12.6. For GKE versions 1.12.6 and above, the metadata field + // has been deprecated. The Kubernetes pod labels that used to be in + // metadata.userLabels will now be present in the labels field with a + // key prefix of k8s-pod/. The Stackdriver system labels that were + // present in the metadata.systemLabels field will no longer be + // available in the LogEntry. Metadata *MonitoredResourceMetadata `json:"metadata,omitempty"` // Operation: Optional. Information about an operation associated with @@ -1072,7 +1135,7 @@ type LogEntry struct { ReceiveTimestamp string `json:"receiveTimestamp,omitempty"` // Resource: Required. The primary monitored resource associated with - // this log entry. Example: a log entry that reports a database error + // this log entry.Example: a log entry that reports a database error // would be associated with the monitored resource designating the // particular database that reported the error. Resource *MonitoredResource `json:"resource,omitempty"` @@ -1100,9 +1163,9 @@ type LogEntry struct { SourceLocation *LogEntrySourceLocation `json:"sourceLocation,omitempty"` // SpanId: Optional. The span ID within the trace associated with the - // log entry. For Trace spans, this is the same format that the Trace - // API v2 uses: a 16-character hexadecimal encoding of an 8-byte array, - // such as "000000000000004a". + // log entry.For Trace spans, this is the same format that the Trace API + // v2 uses: a 16-character hexadecimal encoding of an 8-byte array, such + // as "000000000000004a". SpanId string `json:"spanId,omitempty"` // TextPayload: The log entry payload, represented as a Unicode string @@ -1129,7 +1192,7 @@ type LogEntry struct { Trace string `json:"trace,omitempty"` // TraceSampled: Optional. The sampling decision of the trace associated - // with the log entry. True means that the trace resource name in the + // with the log entry.True means that the trace resource name in the // trace field was sampled for storage in a trace backend. False means // that the trace was not sampled for storage when this log entry was // written, or the sampling decision was unknown at the time. A @@ -1252,11 +1315,15 @@ func (s *LogEntrySourceLocation) MarshalJSON() ([]byte, error) { // entries before they are excluded. Audit log entries and log entries // from Amazon Web Services are never excluded. type LogExclusion struct { + // CreateTime: Output only. The creation timestamp of the exclusion.This + // field may not be present for older exclusions. + CreateTime string `json:"createTime,omitempty"` + // Description: Optional. A description of this exclusion. Description string `json:"description,omitempty"` // Disabled: Optional. If set to True, then this exclusion is disabled - // and it does not exclude any log entries. You can use exclusions.patch + // and it does not exclude any log entries. You can update an exclusion // to change the value of this field. Disabled bool `json:"disabled,omitempty"` @@ -1274,11 +1341,15 @@ type LogExclusion struct { // periods. Name string `json:"name,omitempty"` + // UpdateTime: Output only. The last update timestamp of the + // exclusion.This field may not be present for older exclusions. + UpdateTime string `json:"updateTime,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Description") to + // ForceSendFields is a list of field names (e.g. "CreateTime") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the @@ -1286,10 +1357,10 @@ type LogExclusion struct { // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Description") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "CreateTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` @@ -1366,6 +1437,10 @@ type LogMetric struct { // values. BucketOptions *BucketOptions `json:"bucketOptions,omitempty"` + // CreateTime: Output only. The creation timestamp of the metric.This + // field may not be present for older metrics. + CreateTime string `json:"createTime,omitempty"` + // Description: Optional. A description of this metric, which is used in // documentation. The maximum length of the description is 8000 // characters. @@ -1422,6 +1497,10 @@ type LogMetric struct { // Example: "projects/my-project/metrics/nginx%2Frequests". Name string `json:"name,omitempty"` + // UpdateTime: Output only. The last update timestamp of the metric.This + // field may not be present for older metrics. + UpdateTime string `json:"updateTime,omitempty"` + // ValueExtractor: Optional. A value_extractor is required when using a // distribution logs-based metric to extract the values to record from a // log entry. Two functions are supported for value extraction: @@ -1481,6 +1560,10 @@ func (s *LogMetric) MarshalJSON() ([]byte, error) { // which log entries are exported. The sink must be created within a // project, organization, billing account, or folder. type LogSink struct { + // CreateTime: Output only. The creation timestamp of the sink.This + // field may not be present for older sinks. + CreateTime string `json:"createTime,omitempty"` + // Destination: Required. The export // destination: // "storage.googleapis.com/[GCS_BUCKET]" @@ -1490,7 +1573,7 @@ type LogSink struct { // /projects/[PROJECT_ID]/topics/[TOPIC_ID]" // The sink's writer_identity, set when the sink is created, must have // permission to write to the destination or else the log entries are - // not exported. For more information, see Exporting Logs With Sinks. + // not exported. For more information, see Exporting Logs with Sinks. Destination string `json:"destination,omitempty"` // Filter: Optional. An advanced logs filter. The only exported log @@ -1537,13 +1620,17 @@ type LogSink struct { // "V1" - LogEntry version 1 format. OutputVersionFormat string `json:"outputVersionFormat,omitempty"` + // UpdateTime: Output only. The last update timestamp of the sink.This + // field may not be present for older sinks. + UpdateTime string `json:"updateTime,omitempty"` + // WriterIdentity: Output only. An IAM identity—a service account // or group—under which Logging writes the exported log entries to // the sink's destination. This field is set by sinks.create and - // sinks.update, based on the setting of unique_writer_identity in those + // sinks.update based on the value of unique_writer_identity in those // methods.Until you grant this identity write-access to the // destination, log entry exports from this sink will fail. For more - // information, see Granting access for a resource. Consult the + // information, see Granting Access for a Resource. Consult the // destination service's documentation to determine the appropriate IAM // roles to assign to the identity. WriterIdentity string `json:"writerIdentity,omitempty"` @@ -1552,7 +1639,7 @@ type LogSink struct { // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Destination") to + // ForceSendFields is a list of field names (e.g. "CreateTime") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the @@ -1560,10 +1647,10 @@ type LogSink struct { // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Destination") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "CreateTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` @@ -4043,7 +4130,7 @@ type BillingAccountsSinksPatchCall struct { // Patch: Updates a sink. This method replaces the following fields in // the existing sink with values from the new sink: destination, and -// filter. The updated sink might also have a new writer_identity; see +// filter.The updated sink might also have a new writer_identity; see // the unique_writer_identity field. func (r *BillingAccountsSinksService) Patch(sinkNameid string, logsink *LogSink) *BillingAccountsSinksPatchCall { c := &BillingAccountsSinksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -4173,7 +4260,7 @@ func (c *BillingAccountsSinksPatchCall) Do(opts ...googleapi.CallOption) (*LogSi } return ret, nil // { - // "description": "Updates a sink. This method replaces the following fields in the existing sink with values from the new sink: destination, and filter. The updated sink might also have a new writer_identity; see the unique_writer_identity field.", + // "description": "Updates a sink. This method replaces the following fields in the existing sink with values from the new sink: destination, and filter.The updated sink might also have a new writer_identity; see the unique_writer_identity field.", // "flatPath": "v2/billingAccounts/{billingAccountsId}/sinks/{sinksId}", // "httpMethod": "PATCH", // "id": "logging.billingAccounts.sinks.patch", @@ -4228,7 +4315,7 @@ type BillingAccountsSinksUpdateCall struct { // Update: Updates a sink. This method replaces the following fields in // the existing sink with values from the new sink: destination, and -// filter. The updated sink might also have a new writer_identity; see +// filter.The updated sink might also have a new writer_identity; see // the unique_writer_identity field. func (r *BillingAccountsSinksService) Update(sinkNameid string, logsink *LogSink) *BillingAccountsSinksUpdateCall { c := &BillingAccountsSinksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -4358,7 +4445,7 @@ func (c *BillingAccountsSinksUpdateCall) Do(opts ...googleapi.CallOption) (*LogS } return ret, nil // { - // "description": "Updates a sink. This method replaces the following fields in the existing sink with values from the new sink: destination, and filter. The updated sink might also have a new writer_identity; see the unique_writer_identity field.", + // "description": "Updates a sink. This method replaces the following fields in the existing sink with values from the new sink: destination, and filter.The updated sink might also have a new writer_identity; see the unique_writer_identity field.", // "flatPath": "v2/billingAccounts/{billingAccountsId}/sinks/{sinksId}", // "httpMethod": "PUT", // "id": "logging.billingAccounts.sinks.update", @@ -7209,7 +7296,7 @@ type FoldersSinksPatchCall struct { // Patch: Updates a sink. This method replaces the following fields in // the existing sink with values from the new sink: destination, and -// filter. The updated sink might also have a new writer_identity; see +// filter.The updated sink might also have a new writer_identity; see // the unique_writer_identity field. func (r *FoldersSinksService) Patch(sinkNameid string, logsink *LogSink) *FoldersSinksPatchCall { c := &FoldersSinksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -7339,7 +7426,7 @@ func (c *FoldersSinksPatchCall) Do(opts ...googleapi.CallOption) (*LogSink, erro } return ret, nil // { - // "description": "Updates a sink. This method replaces the following fields in the existing sink with values from the new sink: destination, and filter. The updated sink might also have a new writer_identity; see the unique_writer_identity field.", + // "description": "Updates a sink. This method replaces the following fields in the existing sink with values from the new sink: destination, and filter.The updated sink might also have a new writer_identity; see the unique_writer_identity field.", // "flatPath": "v2/folders/{foldersId}/sinks/{sinksId}", // "httpMethod": "PATCH", // "id": "logging.folders.sinks.patch", @@ -7394,7 +7481,7 @@ type FoldersSinksUpdateCall struct { // Update: Updates a sink. This method replaces the following fields in // the existing sink with values from the new sink: destination, and -// filter. The updated sink might also have a new writer_identity; see +// filter.The updated sink might also have a new writer_identity; see // the unique_writer_identity field. func (r *FoldersSinksService) Update(sinkNameid string, logsink *LogSink) *FoldersSinksUpdateCall { c := &FoldersSinksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -7524,7 +7611,7 @@ func (c *FoldersSinksUpdateCall) Do(opts ...googleapi.CallOption) (*LogSink, err } return ret, nil // { - // "description": "Updates a sink. This method replaces the following fields in the existing sink with values from the new sink: destination, and filter. The updated sink might also have a new writer_identity; see the unique_writer_identity field.", + // "description": "Updates a sink. This method replaces the following fields in the existing sink with values from the new sink: destination, and filter.The updated sink might also have a new writer_identity; see the unique_writer_identity field.", // "flatPath": "v2/folders/{foldersId}/sinks/{sinksId}", // "httpMethod": "PUT", // "id": "logging.folders.sinks.update", @@ -9837,7 +9924,7 @@ type OrganizationsSinksPatchCall struct { // Patch: Updates a sink. This method replaces the following fields in // the existing sink with values from the new sink: destination, and -// filter. The updated sink might also have a new writer_identity; see +// filter.The updated sink might also have a new writer_identity; see // the unique_writer_identity field. func (r *OrganizationsSinksService) Patch(sinkNameid string, logsink *LogSink) *OrganizationsSinksPatchCall { c := &OrganizationsSinksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -9967,7 +10054,7 @@ func (c *OrganizationsSinksPatchCall) Do(opts ...googleapi.CallOption) (*LogSink } return ret, nil // { - // "description": "Updates a sink. This method replaces the following fields in the existing sink with values from the new sink: destination, and filter. The updated sink might also have a new writer_identity; see the unique_writer_identity field.", + // "description": "Updates a sink. This method replaces the following fields in the existing sink with values from the new sink: destination, and filter.The updated sink might also have a new writer_identity; see the unique_writer_identity field.", // "flatPath": "v2/organizations/{organizationsId}/sinks/{sinksId}", // "httpMethod": "PATCH", // "id": "logging.organizations.sinks.patch", @@ -10022,7 +10109,7 @@ type OrganizationsSinksUpdateCall struct { // Update: Updates a sink. This method replaces the following fields in // the existing sink with values from the new sink: destination, and -// filter. The updated sink might also have a new writer_identity; see +// filter.The updated sink might also have a new writer_identity; see // the unique_writer_identity field. func (r *OrganizationsSinksService) Update(sinkNameid string, logsink *LogSink) *OrganizationsSinksUpdateCall { c := &OrganizationsSinksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -10152,7 +10239,7 @@ func (c *OrganizationsSinksUpdateCall) Do(opts ...googleapi.CallOption) (*LogSin } return ret, nil // { - // "description": "Updates a sink. This method replaces the following fields in the existing sink with values from the new sink: destination, and filter. The updated sink might also have a new writer_identity; see the unique_writer_identity field.", + // "description": "Updates a sink. This method replaces the following fields in the existing sink with values from the new sink: destination, and filter.The updated sink might also have a new writer_identity; see the unique_writer_identity field.", // "flatPath": "v2/organizations/{organizationsId}/sinks/{sinksId}", // "httpMethod": "PUT", // "id": "logging.organizations.sinks.update", @@ -12705,7 +12792,7 @@ type ProjectsSinksPatchCall struct { // Patch: Updates a sink. This method replaces the following fields in // the existing sink with values from the new sink: destination, and -// filter. The updated sink might also have a new writer_identity; see +// filter.The updated sink might also have a new writer_identity; see // the unique_writer_identity field. func (r *ProjectsSinksService) Patch(sinkNameid string, logsink *LogSink) *ProjectsSinksPatchCall { c := &ProjectsSinksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -12835,7 +12922,7 @@ func (c *ProjectsSinksPatchCall) Do(opts ...googleapi.CallOption) (*LogSink, err } return ret, nil // { - // "description": "Updates a sink. This method replaces the following fields in the existing sink with values from the new sink: destination, and filter. The updated sink might also have a new writer_identity; see the unique_writer_identity field.", + // "description": "Updates a sink. This method replaces the following fields in the existing sink with values from the new sink: destination, and filter.The updated sink might also have a new writer_identity; see the unique_writer_identity field.", // "flatPath": "v2/projects/{projectsId}/sinks/{sinksId}", // "httpMethod": "PATCH", // "id": "logging.projects.sinks.patch", @@ -12890,7 +12977,7 @@ type ProjectsSinksUpdateCall struct { // Update: Updates a sink. This method replaces the following fields in // the existing sink with values from the new sink: destination, and -// filter. The updated sink might also have a new writer_identity; see +// filter.The updated sink might also have a new writer_identity; see // the unique_writer_identity field. func (r *ProjectsSinksService) Update(sinkNameid string, logsink *LogSink) *ProjectsSinksUpdateCall { c := &ProjectsSinksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -13020,7 +13107,7 @@ func (c *ProjectsSinksUpdateCall) Do(opts ...googleapi.CallOption) (*LogSink, er } return ret, nil // { - // "description": "Updates a sink. This method replaces the following fields in the existing sink with values from the new sink: destination, and filter. The updated sink might also have a new writer_identity; see the unique_writer_identity field.", + // "description": "Updates a sink. This method replaces the following fields in the existing sink with values from the new sink: destination, and filter.The updated sink might also have a new writer_identity; see the unique_writer_identity field.", // "flatPath": "v2/projects/{projectsId}/sinks/{sinksId}", // "httpMethod": "PUT", // "id": "logging.projects.sinks.update", @@ -13714,7 +13801,7 @@ type SinksUpdateCall struct { // Update: Updates a sink. This method replaces the following fields in // the existing sink with values from the new sink: destination, and -// filter. The updated sink might also have a new writer_identity; see +// filter.The updated sink might also have a new writer_identity; see // the unique_writer_identity field. func (r *SinksService) Update(sinkNameid string, logsink *LogSink) *SinksUpdateCall { c := &SinksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -13844,7 +13931,7 @@ func (c *SinksUpdateCall) Do(opts ...googleapi.CallOption) (*LogSink, error) { } return ret, nil // { - // "description": "Updates a sink. This method replaces the following fields in the existing sink with values from the new sink: destination, and filter. The updated sink might also have a new writer_identity; see the unique_writer_identity field.", + // "description": "Updates a sink. This method replaces the following fields in the existing sink with values from the new sink: destination, and filter.The updated sink might also have a new writer_identity; see the unique_writer_identity field.", // "flatPath": "v2/{v2Id}/{v2Id1}/sinks/{sinksId}", // "httpMethod": "PUT", // "id": "logging.sinks.update", diff --git a/vendor/google.golang.org/api/option/option.go b/vendor/google.golang.org/api/option/option.go index e7ecfe3c..0a1c2dba 100644 --- a/vendor/google.golang.org/api/option/option.go +++ b/vendor/google.golang.org/api/option/option.go @@ -177,6 +177,19 @@ type withAPIKey string func (w withAPIKey) Apply(o *internal.DialSettings) { o.APIKey = string(w) } +// WithAudiences returns a ClientOption that specifies an audience to be used +// as the audience field ("aud") for the JWT token authentication. +func WithAudiences(audience ...string) ClientOption { + return withAudiences(audience) +} + +type withAudiences []string + +func (w withAudiences) Apply(o *internal.DialSettings) { + o.Audiences = make([]string, len(w)) + copy(o.Audiences, w) +} + // WithoutAuthentication returns a ClientOption that specifies that no // authentication should be used. It is suitable only for testing and for // accessing public resources, like public Google Cloud Storage buckets. @@ -189,3 +202,34 @@ func WithoutAuthentication() ClientOption { type withoutAuthentication struct{} func (w withoutAuthentication) Apply(o *internal.DialSettings) { o.NoAuth = true } + +// WithQuotaProject returns a ClientOption that specifies the project used +// for quota and billing purposes. +// +// For more information please read: +// https://cloud.google.com/apis/docs/system-parameters +func WithQuotaProject(quotaProject string) ClientOption { + return withQuotaProject(quotaProject) +} + +type withQuotaProject string + +func (w withQuotaProject) Apply(o *internal.DialSettings) { + o.QuotaProject = string(w) +} + +// WithRequestReason returns a ClientOption that specifies a reason for +// making the request, which is intended to be recorded in audit logging. +// An example reason would be a support-case ticket number. +// +// For more information please read: +// https://cloud.google.com/apis/docs/system-parameters +func WithRequestReason(requestReason string) ClientOption { + return withRequestReason(requestReason) +} + +type withRequestReason string + +func (w withRequestReason) Apply(o *internal.DialSettings) { + o.RequestReason = string(w) +} diff --git a/vendor/google.golang.org/api/pubsub/v1/pubsub-api.json b/vendor/google.golang.org/api/pubsub/v1/pubsub-api.json index 5e2bb2a9..6e458e1f 100644 --- a/vendor/google.golang.org/api/pubsub/v1/pubsub-api.json +++ b/vendor/google.golang.org/api/pubsub/v1/pubsub-api.json @@ -111,7 +111,7 @@ "snapshots": { "methods": { "create": { - "description": "Creates a snapshot from the requested subscription. Snapshots are used in\n\u003ca href=\"https://cloud.google.com/pubsub/docs/replay-overview\"\u003eSeek\u003c/a\u003e\noperations, which allow\nyou to manage message acknowledgments in bulk. That is, you can set the\nacknowledgment state of messages in an existing subscription to the state\ncaptured by a snapshot.\n\u003cbr\u003e\u003cbr\u003e\n\u003cb\u003eBETA:\u003c/b\u003e This feature is part of a beta release. This API might be\nchanged in backward-incompatible ways and is not recommended for production\nuse. It is not subject to any SLA or deprecation policy.\u003cbr\u003e\u003cbr\u003e\nIf the snapshot already exists, returns `ALREADY_EXISTS`.\nIf the requested subscription doesn't exist, returns `NOT_FOUND`.\nIf the backlog in the subscription is too old -- and the resulting snapshot\nwould expire in less than 1 hour -- then `FAILED_PRECONDITION` is returned.\nSee also the `Snapshot.expire_time` field. If the name is not provided in\nthe request, the server will assign a random\nname for this snapshot on the same project as the subscription, conforming\nto the\n[resource name format](https://cloud.google.com/pubsub/docs/overview#names).\nThe generated name is populated in the returned Snapshot object. Note that\nfor REST API requests, you must specify a name in the request.", + "description": "Creates a snapshot from the requested subscription. Snapshots are used in\n\u003ca href=\"https://cloud.google.com/pubsub/docs/replay-overview\"\u003eSeek\u003c/a\u003e\noperations, which allow\nyou to manage message acknowledgments in bulk. That is, you can set the\nacknowledgment state of messages in an existing subscription to the state\ncaptured by a snapshot.\n\u003cbr\u003e\u003cbr\u003eIf the snapshot already exists, returns `ALREADY_EXISTS`.\nIf the requested subscription doesn't exist, returns `NOT_FOUND`.\nIf the backlog in the subscription is too old -- and the resulting snapshot\nwould expire in less than 1 hour -- then `FAILED_PRECONDITION` is returned.\nSee also the `Snapshot.expire_time` field. If the name is not provided in\nthe request, the server will assign a random\nname for this snapshot on the same project as the subscription, conforming\nto the\n[resource name\nformat](https://cloud.google.com/pubsub/docs/admin#resource_names). The\ngenerated name is populated in the returned Snapshot object. Note that for\nREST API requests, you must specify a name in the request.", "flatPath": "v1/projects/{projectsId}/snapshots/{snapshotsId}", "httpMethod": "PUT", "id": "pubsub.projects.snapshots.create", @@ -140,7 +140,7 @@ ] }, "delete": { - "description": "Removes an existing snapshot. Snapshots are used in\n\u003ca href=\"https://cloud.google.com/pubsub/docs/replay-overview\"\u003eSeek\u003c/a\u003e\noperations, which allow\nyou to manage message acknowledgments in bulk. That is, you can set the\nacknowledgment state of messages in an existing subscription to the state\ncaptured by a snapshot.\u003cbr\u003e\u003cbr\u003e\n\u003cb\u003eBETA:\u003c/b\u003e This feature is part of a beta release. This API might be\nchanged in backward-incompatible ways and is not recommended for production\nuse. It is not subject to any SLA or deprecation policy.\nWhen the snapshot is deleted, all messages retained in the snapshot\nare immediately dropped. After a snapshot is deleted, a new one may be\ncreated with the same name, but the new one has no association with the old\nsnapshot or its subscription, unless the same subscription is specified.", + "description": "Removes an existing snapshot. Snapshots are used in\n\u003ca href=\"https://cloud.google.com/pubsub/docs/replay-overview\"\u003eSeek\u003c/a\u003e\noperations, which allow\nyou to manage message acknowledgments in bulk. That is, you can set the\nacknowledgment state of messages in an existing subscription to the state\ncaptured by a snapshot.\u003cbr\u003e\u003cbr\u003e\nWhen the snapshot is deleted, all messages retained in the snapshot\nare immediately dropped. After a snapshot is deleted, a new one may be\ncreated with the same name, but the new one has no association with the old\nsnapshot or its subscription, unless the same subscription is specified.", "flatPath": "v1/projects/{projectsId}/snapshots/{snapshotsId}", "httpMethod": "DELETE", "id": "pubsub.projects.snapshots.delete", @@ -166,7 +166,7 @@ ] }, "get": { - "description": "Gets the configuration details of a snapshot. Snapshots are used in\n\u003ca href=\"https://cloud.google.com/pubsub/docs/replay-overview\"\u003eSeek\u003c/a\u003e\noperations, which allow you to manage message acknowledgments in bulk. That\nis, you can set the acknowledgment state of messages in an existing\nsubscription to the state captured by a snapshot.\u003cbr\u003e\u003cbr\u003e\n\u003cb\u003eBETA:\u003c/b\u003e This feature is part of a beta release. This API might be\nchanged in backward-incompatible ways and is not recommended for production\nuse. It is not subject to any SLA or deprecation policy.", + "description": "Gets the configuration details of a snapshot. Snapshots are used in\n\u003ca href=\"https://cloud.google.com/pubsub/docs/replay-overview\"\u003eSeek\u003c/a\u003e\noperations, which allow you to manage message acknowledgments in bulk. That\nis, you can set the acknowledgment state of messages in an existing\nsubscription to the state captured by a snapshot.", "flatPath": "v1/projects/{projectsId}/snapshots/{snapshotsId}", "httpMethod": "GET", "id": "pubsub.projects.snapshots.get", @@ -218,7 +218,7 @@ ] }, "list": { - "description": "Lists the existing snapshots. Snapshots are used in\n\u003ca href=\"https://cloud.google.com/pubsub/docs/replay-overview\"\u003eSeek\u003c/a\u003e\noperations, which allow\nyou to manage message acknowledgments in bulk. That is, you can set the\nacknowledgment state of messages in an existing subscription to the state\ncaptured by a snapshot.\u003cbr\u003e\u003cbr\u003e\n\u003cb\u003eBETA:\u003c/b\u003e This feature is part of a beta release. This API might be\nchanged in backward-incompatible ways and is not recommended for production\nuse. It is not subject to any SLA or deprecation policy.", + "description": "Lists the existing snapshots. Snapshots are used in\n\u003ca href=\"https://cloud.google.com/pubsub/docs/replay-overview\"\u003eSeek\u003c/a\u003e\noperations, which allow\nyou to manage message acknowledgments in bulk. That is, you can set the\nacknowledgment state of messages in an existing subscription to the state\ncaptured by a snapshot.", "flatPath": "v1/projects/{projectsId}/snapshots", "httpMethod": "GET", "id": "pubsub.projects.snapshots.list", @@ -255,7 +255,7 @@ ] }, "patch": { - "description": "Updates an existing snapshot. Snapshots are used in\n\u003ca href=\"https://cloud.google.com/pubsub/docs/replay-overview\"\u003eSeek\u003c/a\u003e\noperations, which allow\nyou to manage message acknowledgments in bulk. That is, you can set the\nacknowledgment state of messages in an existing subscription to the state\ncaptured by a snapshot.\u003cbr\u003e\u003cbr\u003e\n\u003cb\u003eBETA:\u003c/b\u003e This feature is part of a beta release. This API might be\nchanged in backward-incompatible ways and is not recommended for production\nuse. It is not subject to any SLA or deprecation policy.\nNote that certain properties of a snapshot are not modifiable.", + "description": "Updates an existing snapshot. Snapshots are used in\n\u003ca href=\"https://cloud.google.com/pubsub/docs/replay-overview\"\u003eSeek\u003c/a\u003e\noperations, which allow\nyou to manage message acknowledgments in bulk. That is, you can set the\nacknowledgment state of messages in an existing subscription to the state\ncaptured by a snapshot.", "flatPath": "v1/projects/{projectsId}/snapshots/{snapshotsId}", "httpMethod": "PATCH", "id": "pubsub.projects.snapshots.patch", @@ -375,7 +375,7 @@ ] }, "create": { - "description": "Creates a subscription to a given topic. See the\n\u003ca href=\"https://cloud.google.com/pubsub/docs/admin#resource_names\"\u003e\nresource name rules\u003c/a\u003e.\nIf the subscription already exists, returns `ALREADY_EXISTS`.\nIf the corresponding topic doesn't exist, returns `NOT_FOUND`.\n\nIf the name is not provided in the request, the server will assign a random\nname for this subscription on the same project as the topic, conforming\nto the\n[resource name format](https://cloud.google.com/pubsub/docs/overview#names).\nThe generated name is populated in the returned Subscription object.\nNote that for REST API requests, you must specify a name in the request.", + "description": "Creates a subscription to a given topic. See the\n\u003ca href=\"https://cloud.google.com/pubsub/docs/admin#resource_names\"\u003e\nresource name rules\u003c/a\u003e.\nIf the subscription already exists, returns `ALREADY_EXISTS`.\nIf the corresponding topic doesn't exist, returns `NOT_FOUND`.\n\nIf the name is not provided in the request, the server will assign a random\nname for this subscription on the same project as the topic, conforming\nto the\n[resource name\nformat](https://cloud.google.com/pubsub/docs/admin#resource_names). The\ngenerated name is populated in the returned Subscription object. Note that\nfor REST API requests, you must specify a name in the request.", "flatPath": "v1/projects/{projectsId}/subscriptions/{subscriptionsId}", "httpMethod": "PUT", "id": "pubsub.projects.subscriptions.create", @@ -635,7 +635,7 @@ ] }, "seek": { - "description": "Seeks an existing subscription to a point in time or to a given snapshot,\nwhichever is provided in the request. Snapshots are used in\n\u003ca href=\"https://cloud.google.com/pubsub/docs/replay-overview\"\u003eSeek\u003c/a\u003e\noperations, which allow\nyou to manage message acknowledgments in bulk. That is, you can set the\nacknowledgment state of messages in an existing subscription to the state\ncaptured by a snapshot. Note that both the subscription and the snapshot\nmust be on the same topic.\u003cbr\u003e\u003cbr\u003e\n\u003cb\u003eBETA:\u003c/b\u003e This feature is part of a beta release. This API might be\nchanged in backward-incompatible ways and is not recommended for production\nuse. It is not subject to any SLA or deprecation policy.", + "description": "Seeks an existing subscription to a point in time or to a given snapshot,\nwhichever is provided in the request. Snapshots are used in\n\u003ca href=\"https://cloud.google.com/pubsub/docs/replay-overview\"\u003eSeek\u003c/a\u003e\noperations, which allow\nyou to manage message acknowledgments in bulk. That is, you can set the\nacknowledgment state of messages in an existing subscription to the state\ncaptured by a snapshot. Note that both the subscription and the snapshot\nmust be on the same topic.", "flatPath": "v1/projects/{projectsId}/subscriptions/{subscriptionsId}:seek", "httpMethod": "POST", "id": "pubsub.projects.subscriptions.seek", @@ -990,7 +990,7 @@ "snapshots": { "methods": { "list": { - "description": "Lists the names of the snapshots on this topic. Snapshots are used in\n\u003ca href=\"https://cloud.google.com/pubsub/docs/replay-overview\"\u003eSeek\u003c/a\u003e\noperations, which allow\nyou to manage message acknowledgments in bulk. That is, you can set the\nacknowledgment state of messages in an existing subscription to the state\ncaptured by a snapshot.\u003cbr\u003e\u003cbr\u003e\n\u003cb\u003eBETA:\u003c/b\u003e This feature is part of a beta release. This API might be\nchanged in backward-incompatible ways and is not recommended for production\nuse. It is not subject to any SLA or deprecation policy.", + "description": "Lists the names of the snapshots on this topic. Snapshots are used in\n\u003ca href=\"https://cloud.google.com/pubsub/docs/replay-overview\"\u003eSeek\u003c/a\u003e\noperations, which allow\nyou to manage message acknowledgments in bulk. That is, you can set the\nacknowledgment state of messages in an existing subscription to the state\ncaptured by a snapshot.", "flatPath": "v1/projects/{projectsId}/topics/{topicsId}/snapshots", "httpMethod": "GET", "id": "pubsub.projects.topics.snapshots.list", @@ -1074,7 +1074,7 @@ } } }, - "revision": "20181219", + "revision": "20190412", "rootUrl": "https://pubsub.googleapis.com/", "schemas": { "AcknowledgeRequest": { @@ -1097,10 +1097,10 @@ "properties": { "condition": { "$ref": "Expr", - "description": "Unimplemented. The condition that is associated with this binding.\nNOTE: an unsatisfied condition will not allow user access via current\nbinding. Different bindings, including their conditions, are examined\nindependently." + "description": "The condition that is associated with this binding.\nNOTE: An unsatisfied condition will not allow user access via current\nbinding. Different bindings, including their conditions, are examined\nindependently." }, "members": { - "description": "Specifies the identities requesting access for a Cloud Platform resource.\n`members` can have the following values:\n\n* `allUsers`: A special identifier that represents anyone who is\n on the internet; with or without a Google account.\n\n* `allAuthenticatedUsers`: A special identifier that represents anyone\n who is authenticated with a Google account or a service account.\n\n* `user:{emailid}`: An email address that represents a specific Google\n account. For example, `alice@gmail.com` .\n\n\n* `serviceAccount:{emailid}`: An email address that represents a service\n account. For example, `my-other-app@appspot.gserviceaccount.com`.\n\n* `group:{emailid}`: An email address that represents a Google group.\n For example, `admins@example.com`.\n\n\n* `domain:{domain}`: A Google Apps domain name that represents all the\n users of that domain. For example, `google.com` or `example.com`.\n\n", + "description": "Specifies the identities requesting access for a Cloud Platform resource.\n`members` can have the following values:\n\n* `allUsers`: A special identifier that represents anyone who is\n on the internet; with or without a Google account.\n\n* `allAuthenticatedUsers`: A special identifier that represents anyone\n who is authenticated with a Google account or a service account.\n\n* `user:{emailid}`: An email address that represents a specific Google\n account. For example, `alice@gmail.com` .\n\n\n* `serviceAccount:{emailid}`: An email address that represents a service\n account. For example, `my-other-app@appspot.gserviceaccount.com`.\n\n* `group:{emailid}`: An email address that represents a Google group.\n For example, `admins@example.com`.\n\n\n* `domain:{domain}`: The G Suite domain (primary) that represents all the\n users of that domain. For example, `google.com` or `example.com`.\n\n", "items": { "type": "string" }, @@ -1114,7 +1114,7 @@ "type": "object" }, "CreateSnapshotRequest": { - "description": "Request for the `CreateSnapshot` method.\u003cbr\u003e\u003cbr\u003e\n\u003cb\u003eBETA:\u003c/b\u003e This feature is part of a beta release. This API might be changed in\nbackward-incompatible ways and is not recommended for production use.\nIt is not subject to any SLA or deprecation policy.", + "description": "Request for the `CreateSnapshot` method.", "id": "CreateSnapshotRequest", "properties": { "labels": { @@ -1173,7 +1173,7 @@ "type": "object" }, "ListSnapshotsResponse": { - "description": "Response for the `ListSnapshots` method.\u003cbr\u003e\u003cbr\u003e\n\u003cb\u003eBETA:\u003c/b\u003e This feature is part of a beta release. This API might be\nchanged in backward-incompatible ways and is not recommended for production\nuse. It is not subject to any SLA or deprecation policy.", + "description": "Response for the `ListSnapshots` method.", "id": "ListSnapshotsResponse", "properties": { "nextPageToken": { @@ -1209,7 +1209,7 @@ "type": "object" }, "ListTopicSnapshotsResponse": { - "description": "Response for the `ListTopicSnapshots` method.\u003cbr\u003e\u003cbr\u003e\n\u003cb\u003eBETA:\u003c/b\u003e This feature is part of a beta release. This API might be\nchanged in backward-incompatible ways and is not recommended for production\nuse. It is not subject to any SLA or deprecation policy.", + "description": "Response for the `ListTopicSnapshots` method.", "id": "ListTopicSnapshotsResponse", "properties": { "nextPageToken": { @@ -1292,6 +1292,21 @@ }, "type": "object" }, + "OidcToken": { + "description": "Contains information needed for generating an\n[OpenID Connect\ntoken](https://developers.google.com/identity/protocols/OpenIDConnect).", + "id": "OidcToken", + "properties": { + "audience": { + "description": "Audience to be used when generating OIDC token. The audience claim\nidentifies the recipients that the JWT is intended for. The audience\nvalue is a single case-sensitive string. Having multiple values (array)\nfor the audience field is not supported. More info about the OIDC JWT\ntoken audience here: https://tools.ietf.org/html/rfc7519#section-4.1.3\nNote: if not specified, the Push endpoint URL will be used.", + "type": "string" + }, + "serviceAccountEmail": { + "description": "[Service account\nemail](https://cloud.google.com/iam/docs/service-accounts)\nto be used for generating the OIDC token. The caller (for\nCreateSubscription, UpdateSubscription, and ModifyPushConfig RPCs) must\nhave the iam.serviceAccounts.actAs permission for the service account.", + "type": "string" + } + }, + "type": "object" + }, "Policy": { "description": "Defines an Identity and Access Management (IAM) policy. It is used to\nspecify access control policies for Cloud Platform resources.\n\n\nA `Policy` consists of a list of `bindings`. A `binding` binds a list of\n`members` to a `role`, where the members can be user accounts, Google groups,\nGoogle domains, and service accounts. A `role` is a named list of permissions\ndefined by IAM.\n\n**JSON Example**\n\n {\n \"bindings\": [\n {\n \"role\": \"roles/owner\",\n \"members\": [\n \"user:mike@example.com\",\n \"group:admins@example.com\",\n \"domain:google.com\",\n \"serviceAccount:my-other-app@appspot.gserviceaccount.com\"\n ]\n },\n {\n \"role\": \"roles/viewer\",\n \"members\": [\"user:sean@example.com\"]\n }\n ]\n }\n\n**YAML Example**\n\n bindings:\n - members:\n - user:mike@example.com\n - group:admins@example.com\n - domain:google.com\n - serviceAccount:my-other-app@appspot.gserviceaccount.com\n role: roles/owner\n - members:\n - user:sean@example.com\n role: roles/viewer\n\n\nFor a description of IAM and its features, see the\n[IAM developer's guide](https://cloud.google.com/iam/docs).", "id": "Policy", @@ -1413,6 +1428,10 @@ "description": "Endpoint configuration attributes.\n\nEvery endpoint has a set of API supported attributes that can be used to\ncontrol different aspects of the message delivery.\n\nThe currently supported attribute is `x-goog-version`, which you can\nuse to change the format of the pushed message. This attribute\nindicates the version of the data expected by the endpoint. This\ncontrols the shape of the pushed message (i.e., its fields and metadata).\nThe endpoint version is based on the version of the Pub/Sub API.\n\nIf not present during the `CreateSubscription` call, it will default to\nthe version of the API used to make such call. If not present during a\n`ModifyPushConfig` call, its value will not be changed. `GetSubscription`\ncalls will always return a valid version, even if the subscription was\ncreated without this attribute.\n\nThe possible values for this attribute are:\n\n* `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API.\n* `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API.", "type": "object" }, + "oidcToken": { + "$ref": "OidcToken", + "description": "If specified, Pub/Sub will generate and attach an OIDC JWT token as an\n`Authorization` header in the HTTP request for every pushed message." + }, "pushEndpoint": { "description": "A URL locating the endpoint to which messages should be pushed.\nFor example, a Webhook endpoint might use \"https://example.com/push\".", "type": "string" @@ -1436,7 +1455,7 @@ "type": "object" }, "SeekRequest": { - "description": "Request for the `Seek` method. \u003cbr\u003e\u003cbr\u003e\n\u003cb\u003eBETA:\u003c/b\u003e This feature is part of a beta release. This API might be\nchanged in backward-incompatible ways and is not recommended for production\nuse. It is not subject to any SLA or deprecation policy.", + "description": "Request for the `Seek` method.", "id": "SeekRequest", "properties": { "snapshot": { @@ -1469,7 +1488,7 @@ "type": "object" }, "Snapshot": { - "description": "A snapshot resource. Snapshots are used in\n\u003ca href=\"https://cloud.google.com/pubsub/docs/replay-overview\"\u003eSeek\u003c/a\u003e\noperations, which allow\nyou to manage message acknowledgments in bulk. That is, you can set the\nacknowledgment state of messages in an existing subscription to the state\ncaptured by a snapshot.\u003cbr\u003e\u003cbr\u003e\n\u003cb\u003eBETA:\u003c/b\u003e This feature is part of a beta release. This API might be\nchanged in backward-incompatible ways and is not recommended for production\nuse. It is not subject to any SLA or deprecation policy.", + "description": "A snapshot resource. Snapshots are used in\n\u003ca href=\"https://cloud.google.com/pubsub/docs/replay-overview\"\u003eSeek\u003c/a\u003e\noperations, which allow\nyou to manage message acknowledgments in bulk. That is, you can set the\nacknowledgment state of messages in an existing subscription to the state\ncaptured by a snapshot.", "id": "Snapshot", "properties": { "expireTime": { @@ -1516,7 +1535,7 @@ "type": "object" }, "messageRetentionDuration": { - "description": "How long to retain unacknowledged messages in the subscription's backlog,\nfrom the moment a message is published.\nIf `retain_acked_messages` is true, then this also configures the retention\nof acknowledged messages, and thus configures how far back in time a `Seek`\ncan be done. Defaults to 7 days. Cannot be more than 7 days or less than 10\nminutes.\u003cbr\u003e\u003cbr\u003e\n\u003cb\u003eBETA:\u003c/b\u003e This feature is part of a beta release. This API might be\nchanged in backward-incompatible ways and is not recommended for production\nuse. It is not subject to any SLA or deprecation policy.", + "description": "How long to retain unacknowledged messages in the subscription's backlog,\nfrom the moment a message is published.\nIf `retain_acked_messages` is true, then this also configures the retention\nof acknowledged messages, and thus configures how far back in time a `Seek`\ncan be done. Defaults to 7 days. Cannot be more than 7 days or less than 10\nminutes.", "format": "google-duration", "type": "string" }, @@ -1529,7 +1548,7 @@ "description": "If push delivery is used with this subscription, this field is\nused to configure it. An empty `pushConfig` signifies that the subscriber\nwill pull and ack messages using API methods." }, "retainAckedMessages": { - "description": "Indicates whether to retain acknowledged messages. If true, then\nmessages are not expunged from the subscription's backlog, even if they are\nacknowledged, until they fall out of the `message_retention_duration`\nwindow. This must be true if you would like to\n\u003ca href=\"https://cloud.google.com/pubsub/docs/replay-overview#seek_to_a_time\"\u003e\nSeek to a timestamp\u003c/a\u003e.\n\u003cbr\u003e\u003cbr\u003e\n\u003cb\u003eBETA:\u003c/b\u003e This feature is part of a beta release. This API might be\nchanged in backward-incompatible ways and is not recommended for production\nuse. It is not subject to any SLA or deprecation policy.", + "description": "Indicates whether to retain acknowledged messages. If true, then\nmessages are not expunged from the subscription's backlog, even if they are\nacknowledged, until they fall out of the `message_retention_duration`\nwindow. This must be true if you would like to\n\u003ca\nhref=\"https://cloud.google.com/pubsub/docs/replay-overview#seek_to_a_time\"\u003e\nSeek to a timestamp\u003c/a\u003e.", "type": "boolean" }, "topic": { @@ -1586,7 +1605,7 @@ "type": "object" }, "UpdateSnapshotRequest": { - "description": "Request for the UpdateSnapshot method.\u003cbr\u003e\u003cbr\u003e\n\u003cb\u003eBETA:\u003c/b\u003e This feature is part of a beta release. This API might be\nchanged in backward-incompatible ways and is not recommended for production\nuse. It is not subject to any SLA or deprecation policy.", + "description": "Request for the UpdateSnapshot method.", "id": "UpdateSnapshotRequest", "properties": { "snapshot": { diff --git a/vendor/google.golang.org/api/pubsub/v1/pubsub-gen.go b/vendor/google.golang.org/api/pubsub/v1/pubsub-gen.go index 17c89207..898268e2 100644 --- a/vendor/google.golang.org/api/pubsub/v1/pubsub-gen.go +++ b/vendor/google.golang.org/api/pubsub/v1/pubsub-gen.go @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. All rights reserved. +// Copyright 2019 Google LLC. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. @@ -8,13 +8,39 @@ // // This package is DEPRECATED. Use package cloud.google.com/go/pubsub instead. // -// See https://cloud.google.com/pubsub/docs +// For product documentation, see: https://cloud.google.com/pubsub/docs +// +// Creating a client // // Usage example: // // import "google.golang.org/api/pubsub/v1" // ... -// pubsubService, err := pubsub.New(oauthHttpClient) +// ctx := context.Background() +// pubsubService, err := pubsub.NewService(ctx) +// +// In this example, Google Application Default Credentials are used for authentication. +// +// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// +// Other authentication options +// +// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// +// pubsubService, err := pubsub.NewService(ctx, option.WithScopes(pubsub.PubsubScope)) +// +// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// +// pubsubService, err := pubsub.NewService(ctx, option.WithAPIKey("AIza...")) +// +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// +// config := &oauth2.Config{...} +// // ... +// token, err := config.Exchange(ctx, ...) +// pubsubService, err := pubsub.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) +// +// See https://godoc.org/google.golang.org/api/option/ for details on options. package pubsub // import "google.golang.org/api/pubsub/v1" import ( @@ -31,6 +57,8 @@ import ( gensupport "google.golang.org/api/gensupport" googleapi "google.golang.org/api/googleapi" + option "google.golang.org/api/option" + htransport "google.golang.org/api/transport/http" ) // Always reference these packages, just in case the auto-generated code @@ -61,6 +89,33 @@ const ( PubsubScope = "https://www.googleapis.com/auth/pubsub" ) +// NewService creates a new Service. +func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { + scopesOption := option.WithScopes( + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/pubsub", + ) + // NOTE: prepend, so we don't override user-specified scopes. + opts = append([]option.ClientOption{scopesOption}, opts...) + client, endpoint, err := htransport.NewClient(ctx, opts...) + if err != nil { + return nil, err + } + s, err := New(client) + if err != nil { + return nil, err + } + if endpoint != "" { + s.BasePath = endpoint + } + return s, nil +} + +// New creates a new Service. It uses the provided http.Client for requests. +// +// Deprecated: please use NewService instead. +// To provide a custom HTTP client, use option.WithHTTPClient. +// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. func New(client *http.Client) (*Service, error) { if client == nil { return nil, errors.New("client is nil") @@ -186,9 +241,8 @@ func (s *AcknowledgeRequest) MarshalJSON() ([]byte, error) { // Binding: Associates `members` with a `role`. type Binding struct { - // Condition: Unimplemented. The condition that is associated with this - // binding. - // NOTE: an unsatisfied condition will not allow user access via + // Condition: The condition that is associated with this binding. + // NOTE: An unsatisfied condition will not allow user access via // current // binding. Different bindings, including their conditions, are // examined @@ -222,7 +276,7 @@ type Binding struct { // For example, `admins@example.com`. // // - // * `domain:{domain}`: A Google Apps domain name that represents all + // * `domain:{domain}`: The G Suite domain (primary) that represents all // the // users of that domain. For example, `google.com` or // `example.com`. @@ -257,13 +311,7 @@ func (s *Binding) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// CreateSnapshotRequest: Request for the `CreateSnapshot` -// method.

-// BETA: This feature is part of a beta release. This API might -// be changed in -// backward-incompatible ways and is not recommended for production -// use. -// It is not subject to any SLA or deprecation policy. +// CreateSnapshotRequest: Request for the `CreateSnapshot` method. type CreateSnapshotRequest struct { // Labels: See // Creating and @@ -419,13 +467,7 @@ func (s *Expr) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ListSnapshotsResponse: Response for the `ListSnapshots` -// method.

-// BETA: This feature is part of a beta release. This API might -// be -// changed in backward-incompatible ways and is not recommended for -// production -// use. It is not subject to any SLA or deprecation policy. +// ListSnapshotsResponse: Response for the `ListSnapshots` method. type ListSnapshotsResponse struct { // NextPageToken: If not empty, indicates that there may be more // snapshot that match the @@ -503,12 +545,7 @@ func (s *ListSubscriptionsResponse) MarshalJSON() ([]byte, error) { } // ListTopicSnapshotsResponse: Response for the `ListTopicSnapshots` -// method.

-// BETA: This feature is part of a beta release. This API might -// be -// changed in backward-incompatible ways and is not recommended for -// production -// use. It is not subject to any SLA or deprecation policy. +// method. type ListTopicSnapshotsResponse struct { // NextPageToken: If not empty, indicates that there may be more // snapshots that match @@ -701,6 +738,59 @@ func (s *ModifyPushConfigRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// OidcToken: Contains information needed for generating an +// [OpenID +// Connect +// token](https://developers.google.com/identity/protocols/OpenID +// Connect). +type OidcToken struct { + // Audience: Audience to be used when generating OIDC token. The + // audience claim + // identifies the recipients that the JWT is intended for. The + // audience + // value is a single case-sensitive string. Having multiple values + // (array) + // for the audience field is not supported. More info about the OIDC + // JWT + // token audience here: + // https://tools.ietf.org/html/rfc7519#section-4.1.3 + // Note: if not specified, the Push endpoint URL will be used. + Audience string `json:"audience,omitempty"` + + // ServiceAccountEmail: [Service + // account + // email](https://cloud.google.com/iam/docs/service-accounts) + // to be used for generating the OIDC token. The caller + // (for + // CreateSubscription, UpdateSubscription, and ModifyPushConfig RPCs) + // must + // have the iam.serviceAccounts.actAs permission for the service + // account. + ServiceAccountEmail string `json:"serviceAccountEmail,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Audience") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Audience") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *OidcToken) MarshalJSON() ([]byte, error) { + type NoMethod OidcToken + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Policy: Defines an Identity and Access Management (IAM) policy. It is // used to // specify access control policies for Cloud Platform resources. @@ -1047,6 +1137,11 @@ type PushConfig struct { // API. Attributes map[string]string `json:"attributes,omitempty"` + // OidcToken: If specified, Pub/Sub will generate and attach an OIDC JWT + // token as an + // `Authorization` header in the HTTP request for every pushed message. + OidcToken *OidcToken `json:"oidcToken,omitempty"` + // PushEndpoint: A URL locating the endpoint to which messages should be // pushed. // For example, a Webhook endpoint might use "https://example.com/push". @@ -1106,12 +1201,7 @@ func (s *ReceivedMessage) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// SeekRequest: Request for the `Seek` method.

-// BETA: This feature is part of a beta release. This API might -// be -// changed in backward-incompatible ways and is not recommended for -// production -// use. It is not subject to any SLA or deprecation policy. +// SeekRequest: Request for the `Seek` method. type SeekRequest struct { // Snapshot: The snapshot to seek to. The snapshot's topic must be the // same as that of @@ -1213,12 +1303,7 @@ func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) { // the // acknowledgment state of messages in an existing subscription to the // state -// captured by a snapshot.

-// BETA: This feature is part of a beta release. This API might -// be -// changed in backward-incompatible ways and is not recommended for -// production -// use. It is not subject to any SLA or deprecation policy. +// captured by a snapshot. type Snapshot struct { // ExpireTime: The snapshot is guaranteed to exist up until this time. // A newly-created snapshot expires no later than 7 days from the time @@ -1345,12 +1430,7 @@ type Subscription struct { // `Seek` // can be done. Defaults to 7 days. Cannot be more than 7 days or less // than 10 - // minutes.

- // BETA: This feature is part of a beta release. This API might - // be - // changed in backward-incompatible ways and is not recommended for - // production - // use. It is not subject to any SLA or deprecation policy. + // minutes. MessageRetentionDuration string `json:"messageRetentionDuration,omitempty"` // Name: The name of the subscription. It must have the @@ -1379,17 +1459,12 @@ type Subscription struct { // they are // acknowledged, until they fall out of the // `message_retention_duration` - // window. This must be true if you would like to + // window. This must be true if you would like + // to //
+ // href="https://cloud.google.com/pubsub/docs/replay-overview#seek_ + // to_a_time"> // Seek to a timestamp. - //

- // BETA: This feature is part of a beta release. This API might - // be - // changed in backward-incompatible ways and is not recommended for - // production - // use. It is not subject to any SLA or deprecation policy. RetainAckedMessages bool `json:"retainAckedMessages,omitempty"` // Topic: The name of the topic from which this subscription is @@ -1545,13 +1620,7 @@ func (s *Topic) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// UpdateSnapshotRequest: Request for the UpdateSnapshot -// method.

-// BETA: This feature is part of a beta release. This API might -// be -// changed in backward-incompatible ways and is not recommended for -// production -// use. It is not subject to any SLA or deprecation policy. +// UpdateSnapshotRequest: Request for the UpdateSnapshot method. type UpdateSnapshotRequest struct { // Snapshot: The updated snapshot object. Snapshot *Snapshot `json:"snapshot,omitempty"` @@ -1679,13 +1748,7 @@ type ProjectsSnapshotsCreateCall struct { // acknowledgment state of messages in an existing subscription to the // state // captured by a snapshot. -//

-// BETA: This feature is part of a beta release. This API might -// be -// changed in backward-incompatible ways and is not recommended for -// production -// use. It is not subject to any SLA or deprecation policy.

-// If the snapshot already exists, returns `ALREADY_EXISTS`. +//

If the snapshot already exists, returns `ALREADY_EXISTS`. // If the requested subscription doesn't exist, returns `NOT_FOUND`. // If the backlog in the subscription is too old -- and the resulting // snapshot @@ -1697,11 +1760,13 @@ type ProjectsSnapshotsCreateCall struct { // name for this snapshot on the same project as the subscription, // conforming // to the -// [resource name -// format](https://cloud.google.com/pubsub/docs/overview#names). -// The generated name is populated in the returned Snapshot object. Note -// that -// for REST API requests, you must specify a name in the request. +// [resource +// name +// format](https://cloud.google.com/pubsub/docs/admin#resource_names +// ). The +// generated name is populated in the returned Snapshot object. Note +// that for +// REST API requests, you must specify a name in the request. func (r *ProjectsSnapshotsService) Create(name string, createsnapshotrequest *CreateSnapshotRequest) *ProjectsSnapshotsCreateCall { c := &ProjectsSnapshotsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -1799,7 +1864,7 @@ func (c *ProjectsSnapshotsCreateCall) Do(opts ...googleapi.CallOption) (*Snapsho } return ret, nil // { - // "description": "Creates a snapshot from the requested subscription. Snapshots are used in\n\u003ca href=\"https://cloud.google.com/pubsub/docs/replay-overview\"\u003eSeek\u003c/a\u003e\noperations, which allow\nyou to manage message acknowledgments in bulk. That is, you can set the\nacknowledgment state of messages in an existing subscription to the state\ncaptured by a snapshot.\n\u003cbr\u003e\u003cbr\u003e\n\u003cb\u003eBETA:\u003c/b\u003e This feature is part of a beta release. This API might be\nchanged in backward-incompatible ways and is not recommended for production\nuse. It is not subject to any SLA or deprecation policy.\u003cbr\u003e\u003cbr\u003e\nIf the snapshot already exists, returns `ALREADY_EXISTS`.\nIf the requested subscription doesn't exist, returns `NOT_FOUND`.\nIf the backlog in the subscription is too old -- and the resulting snapshot\nwould expire in less than 1 hour -- then `FAILED_PRECONDITION` is returned.\nSee also the `Snapshot.expire_time` field. If the name is not provided in\nthe request, the server will assign a random\nname for this snapshot on the same project as the subscription, conforming\nto the\n[resource name format](https://cloud.google.com/pubsub/docs/overview#names).\nThe generated name is populated in the returned Snapshot object. Note that\nfor REST API requests, you must specify a name in the request.", + // "description": "Creates a snapshot from the requested subscription. Snapshots are used in\n\u003ca href=\"https://cloud.google.com/pubsub/docs/replay-overview\"\u003eSeek\u003c/a\u003e\noperations, which allow\nyou to manage message acknowledgments in bulk. That is, you can set the\nacknowledgment state of messages in an existing subscription to the state\ncaptured by a snapshot.\n\u003cbr\u003e\u003cbr\u003eIf the snapshot already exists, returns `ALREADY_EXISTS`.\nIf the requested subscription doesn't exist, returns `NOT_FOUND`.\nIf the backlog in the subscription is too old -- and the resulting snapshot\nwould expire in less than 1 hour -- then `FAILED_PRECONDITION` is returned.\nSee also the `Snapshot.expire_time` field. If the name is not provided in\nthe request, the server will assign a random\nname for this snapshot on the same project as the subscription, conforming\nto the\n[resource name\nformat](https://cloud.google.com/pubsub/docs/admin#resource_names). The\ngenerated name is populated in the returned Snapshot object. Note that for\nREST API requests, you must specify a name in the request.", // "flatPath": "v1/projects/{projectsId}/snapshots/{snapshotsId}", // "httpMethod": "PUT", // "id": "pubsub.projects.snapshots.create", @@ -1850,11 +1915,6 @@ type ProjectsSnapshotsDeleteCall struct { // acknowledgment state of messages in an existing subscription to the // state // captured by a snapshot.

-// BETA: This feature is part of a beta release. This API might -// be -// changed in backward-incompatible ways and is not recommended for -// production -// use. It is not subject to any SLA or deprecation policy. // When the snapshot is deleted, all messages retained in the // snapshot // are immediately dropped. After a snapshot is deleted, a new one may @@ -1954,7 +2014,7 @@ func (c *ProjectsSnapshotsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, } return ret, nil // { - // "description": "Removes an existing snapshot. Snapshots are used in\n\u003ca href=\"https://cloud.google.com/pubsub/docs/replay-overview\"\u003eSeek\u003c/a\u003e\noperations, which allow\nyou to manage message acknowledgments in bulk. That is, you can set the\nacknowledgment state of messages in an existing subscription to the state\ncaptured by a snapshot.\u003cbr\u003e\u003cbr\u003e\n\u003cb\u003eBETA:\u003c/b\u003e This feature is part of a beta release. This API might be\nchanged in backward-incompatible ways and is not recommended for production\nuse. It is not subject to any SLA or deprecation policy.\nWhen the snapshot is deleted, all messages retained in the snapshot\nare immediately dropped. After a snapshot is deleted, a new one may be\ncreated with the same name, but the new one has no association with the old\nsnapshot or its subscription, unless the same subscription is specified.", + // "description": "Removes an existing snapshot. Snapshots are used in\n\u003ca href=\"https://cloud.google.com/pubsub/docs/replay-overview\"\u003eSeek\u003c/a\u003e\noperations, which allow\nyou to manage message acknowledgments in bulk. That is, you can set the\nacknowledgment state of messages in an existing subscription to the state\ncaptured by a snapshot.\u003cbr\u003e\u003cbr\u003e\nWhen the snapshot is deleted, all messages retained in the snapshot\nare immediately dropped. After a snapshot is deleted, a new one may be\ncreated with the same name, but the new one has no association with the old\nsnapshot or its subscription, unless the same subscription is specified.", // "flatPath": "v1/projects/{projectsId}/snapshots/{snapshotsId}", // "httpMethod": "DELETE", // "id": "pubsub.projects.snapshots.delete", @@ -2002,13 +2062,7 @@ type ProjectsSnapshotsGetCall struct { // That // is, you can set the acknowledgment state of messages in an // existing -// subscription to the state captured by a -// snapshot.

-// BETA: This feature is part of a beta release. This API might -// be -// changed in backward-incompatible ways and is not recommended for -// production -// use. It is not subject to any SLA or deprecation policy. +// subscription to the state captured by a snapshot. func (r *ProjectsSnapshotsService) Get(snapshot string) *ProjectsSnapshotsGetCall { c := &ProjectsSnapshotsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.snapshot = snapshot @@ -2113,7 +2167,7 @@ func (c *ProjectsSnapshotsGetCall) Do(opts ...googleapi.CallOption) (*Snapshot, } return ret, nil // { - // "description": "Gets the configuration details of a snapshot. Snapshots are used in\n\u003ca href=\"https://cloud.google.com/pubsub/docs/replay-overview\"\u003eSeek\u003c/a\u003e\noperations, which allow you to manage message acknowledgments in bulk. That\nis, you can set the acknowledgment state of messages in an existing\nsubscription to the state captured by a snapshot.\u003cbr\u003e\u003cbr\u003e\n\u003cb\u003eBETA:\u003c/b\u003e This feature is part of a beta release. This API might be\nchanged in backward-incompatible ways and is not recommended for production\nuse. It is not subject to any SLA or deprecation policy.", + // "description": "Gets the configuration details of a snapshot. Snapshots are used in\n\u003ca href=\"https://cloud.google.com/pubsub/docs/replay-overview\"\u003eSeek\u003c/a\u003e\noperations, which allow you to manage message acknowledgments in bulk. That\nis, you can set the acknowledgment state of messages in an existing\nsubscription to the state captured by a snapshot.", // "flatPath": "v1/projects/{projectsId}/snapshots/{snapshotsId}", // "httpMethod": "GET", // "id": "pubsub.projects.snapshots.get", @@ -2308,12 +2362,7 @@ type ProjectsSnapshotsListCall struct { // the // acknowledgment state of messages in an existing subscription to the // state -// captured by a snapshot.

-// BETA: This feature is part of a beta release. This API might -// be -// changed in backward-incompatible ways and is not recommended for -// production -// use. It is not subject to any SLA or deprecation policy. +// captured by a snapshot. func (r *ProjectsSnapshotsService) List(project string) *ProjectsSnapshotsListCall { c := &ProjectsSnapshotsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -2435,7 +2484,7 @@ func (c *ProjectsSnapshotsListCall) Do(opts ...googleapi.CallOption) (*ListSnaps } return ret, nil // { - // "description": "Lists the existing snapshots. Snapshots are used in\n\u003ca href=\"https://cloud.google.com/pubsub/docs/replay-overview\"\u003eSeek\u003c/a\u003e\noperations, which allow\nyou to manage message acknowledgments in bulk. That is, you can set the\nacknowledgment state of messages in an existing subscription to the state\ncaptured by a snapshot.\u003cbr\u003e\u003cbr\u003e\n\u003cb\u003eBETA:\u003c/b\u003e This feature is part of a beta release. This API might be\nchanged in backward-incompatible ways and is not recommended for production\nuse. It is not subject to any SLA or deprecation policy.", + // "description": "Lists the existing snapshots. Snapshots are used in\n\u003ca href=\"https://cloud.google.com/pubsub/docs/replay-overview\"\u003eSeek\u003c/a\u003e\noperations, which allow\nyou to manage message acknowledgments in bulk. That is, you can set the\nacknowledgment state of messages in an existing subscription to the state\ncaptured by a snapshot.", // "flatPath": "v1/projects/{projectsId}/snapshots", // "httpMethod": "GET", // "id": "pubsub.projects.snapshots.list", @@ -2515,13 +2564,7 @@ type ProjectsSnapshotsPatchCall struct { // the // acknowledgment state of messages in an existing subscription to the // state -// captured by a snapshot.

-// BETA: This feature is part of a beta release. This API might -// be -// changed in backward-incompatible ways and is not recommended for -// production -// use. It is not subject to any SLA or deprecation policy. -// Note that certain properties of a snapshot are not modifiable. +// captured by a snapshot. func (r *ProjectsSnapshotsService) Patch(name string, updatesnapshotrequest *UpdateSnapshotRequest) *ProjectsSnapshotsPatchCall { c := &ProjectsSnapshotsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -2619,7 +2662,7 @@ func (c *ProjectsSnapshotsPatchCall) Do(opts ...googleapi.CallOption) (*Snapshot } return ret, nil // { - // "description": "Updates an existing snapshot. Snapshots are used in\n\u003ca href=\"https://cloud.google.com/pubsub/docs/replay-overview\"\u003eSeek\u003c/a\u003e\noperations, which allow\nyou to manage message acknowledgments in bulk. That is, you can set the\nacknowledgment state of messages in an existing subscription to the state\ncaptured by a snapshot.\u003cbr\u003e\u003cbr\u003e\n\u003cb\u003eBETA:\u003c/b\u003e This feature is part of a beta release. This API might be\nchanged in backward-incompatible ways and is not recommended for production\nuse. It is not subject to any SLA or deprecation policy.\nNote that certain properties of a snapshot are not modifiable.", + // "description": "Updates an existing snapshot. Snapshots are used in\n\u003ca href=\"https://cloud.google.com/pubsub/docs/replay-overview\"\u003eSeek\u003c/a\u003e\noperations, which allow\nyou to manage message acknowledgments in bulk. That is, you can set the\nacknowledgment state of messages in an existing subscription to the state\ncaptured by a snapshot.", // "flatPath": "v1/projects/{projectsId}/snapshots/{snapshotsId}", // "httpMethod": "PATCH", // "id": "pubsub.projects.snapshots.patch", @@ -3116,12 +3159,13 @@ type ProjectsSubscriptionsCreateCall struct { // name for this subscription on the same project as the topic, // conforming // to the -// [resource name -// format](https://cloud.google.com/pubsub/docs/overview#names). -// The generated name is populated in the returned Subscription -// object. -// Note that for REST API requests, you must specify a name in the -// request. +// [resource +// name +// format](https://cloud.google.com/pubsub/docs/admin#resource_names +// ). The +// generated name is populated in the returned Subscription object. Note +// that +// for REST API requests, you must specify a name in the request. func (r *ProjectsSubscriptionsService) Create(name string, subscription *Subscription) *ProjectsSubscriptionsCreateCall { c := &ProjectsSubscriptionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -3219,7 +3263,7 @@ func (c *ProjectsSubscriptionsCreateCall) Do(opts ...googleapi.CallOption) (*Sub } return ret, nil // { - // "description": "Creates a subscription to a given topic. See the\n\u003ca href=\"https://cloud.google.com/pubsub/docs/admin#resource_names\"\u003e\nresource name rules\u003c/a\u003e.\nIf the subscription already exists, returns `ALREADY_EXISTS`.\nIf the corresponding topic doesn't exist, returns `NOT_FOUND`.\n\nIf the name is not provided in the request, the server will assign a random\nname for this subscription on the same project as the topic, conforming\nto the\n[resource name format](https://cloud.google.com/pubsub/docs/overview#names).\nThe generated name is populated in the returned Subscription object.\nNote that for REST API requests, you must specify a name in the request.", + // "description": "Creates a subscription to a given topic. See the\n\u003ca href=\"https://cloud.google.com/pubsub/docs/admin#resource_names\"\u003e\nresource name rules\u003c/a\u003e.\nIf the subscription already exists, returns `ALREADY_EXISTS`.\nIf the corresponding topic doesn't exist, returns `NOT_FOUND`.\n\nIf the name is not provided in the request, the server will assign a random\nname for this subscription on the same project as the topic, conforming\nto the\n[resource name\nformat](https://cloud.google.com/pubsub/docs/admin#resource_names). The\ngenerated name is populated in the returned Subscription object. Note that\nfor REST API requests, you must specify a name in the request.", // "flatPath": "v1/projects/{projectsId}/subscriptions/{subscriptionsId}", // "httpMethod": "PUT", // "id": "pubsub.projects.subscriptions.create", @@ -4480,12 +4524,7 @@ type ProjectsSubscriptionsSeekCall struct { // state // captured by a snapshot. Note that both the subscription and the // snapshot -// must be on the same topic.

-// BETA: This feature is part of a beta release. This API might -// be -// changed in backward-incompatible ways and is not recommended for -// production -// use. It is not subject to any SLA or deprecation policy. +// must be on the same topic. func (r *ProjectsSubscriptionsService) Seek(subscription string, seekrequest *SeekRequest) *ProjectsSubscriptionsSeekCall { c := &ProjectsSubscriptionsSeekCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.subscription = subscription @@ -4583,7 +4622,7 @@ func (c *ProjectsSubscriptionsSeekCall) Do(opts ...googleapi.CallOption) (*SeekR } return ret, nil // { - // "description": "Seeks an existing subscription to a point in time or to a given snapshot,\nwhichever is provided in the request. Snapshots are used in\n\u003ca href=\"https://cloud.google.com/pubsub/docs/replay-overview\"\u003eSeek\u003c/a\u003e\noperations, which allow\nyou to manage message acknowledgments in bulk. That is, you can set the\nacknowledgment state of messages in an existing subscription to the state\ncaptured by a snapshot. Note that both the subscription and the snapshot\nmust be on the same topic.\u003cbr\u003e\u003cbr\u003e\n\u003cb\u003eBETA:\u003c/b\u003e This feature is part of a beta release. This API might be\nchanged in backward-incompatible ways and is not recommended for production\nuse. It is not subject to any SLA or deprecation policy.", + // "description": "Seeks an existing subscription to a point in time or to a given snapshot,\nwhichever is provided in the request. Snapshots are used in\n\u003ca href=\"https://cloud.google.com/pubsub/docs/replay-overview\"\u003eSeek\u003c/a\u003e\noperations, which allow\nyou to manage message acknowledgments in bulk. That is, you can set the\nacknowledgment state of messages in an existing subscription to the state\ncaptured by a snapshot. Note that both the subscription and the snapshot\nmust be on the same topic.", // "flatPath": "v1/projects/{projectsId}/subscriptions/{subscriptionsId}:seek", // "httpMethod": "POST", // "id": "pubsub.projects.subscriptions.seek", @@ -6269,12 +6308,7 @@ type ProjectsTopicsSnapshotsListCall struct { // the // acknowledgment state of messages in an existing subscription to the // state -// captured by a snapshot.

-// BETA: This feature is part of a beta release. This API might -// be -// changed in backward-incompatible ways and is not recommended for -// production -// use. It is not subject to any SLA or deprecation policy. +// captured by a snapshot. func (r *ProjectsTopicsSnapshotsService) List(topic string) *ProjectsTopicsSnapshotsListCall { c := &ProjectsTopicsSnapshotsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.topic = topic @@ -6396,7 +6430,7 @@ func (c *ProjectsTopicsSnapshotsListCall) Do(opts ...googleapi.CallOption) (*Lis } return ret, nil // { - // "description": "Lists the names of the snapshots on this topic. Snapshots are used in\n\u003ca href=\"https://cloud.google.com/pubsub/docs/replay-overview\"\u003eSeek\u003c/a\u003e\noperations, which allow\nyou to manage message acknowledgments in bulk. That is, you can set the\nacknowledgment state of messages in an existing subscription to the state\ncaptured by a snapshot.\u003cbr\u003e\u003cbr\u003e\n\u003cb\u003eBETA:\u003c/b\u003e This feature is part of a beta release. This API might be\nchanged in backward-incompatible ways and is not recommended for production\nuse. It is not subject to any SLA or deprecation policy.", + // "description": "Lists the names of the snapshots on this topic. Snapshots are used in\n\u003ca href=\"https://cloud.google.com/pubsub/docs/replay-overview\"\u003eSeek\u003c/a\u003e\noperations, which allow\nyou to manage message acknowledgments in bulk. That is, you can set the\nacknowledgment state of messages in an existing subscription to the state\ncaptured by a snapshot.", // "flatPath": "v1/projects/{projectsId}/topics/{topicsId}/snapshots", // "httpMethod": "GET", // "id": "pubsub.projects.topics.snapshots.list", diff --git a/vendor/google.golang.org/api/runtimeconfig/v1beta1/runtimeconfig-api.json b/vendor/google.golang.org/api/runtimeconfig/v1beta1/runtimeconfig-api.json index 716359c8..333b4877 100644 --- a/vendor/google.golang.org/api/runtimeconfig/v1beta1/runtimeconfig-api.json +++ b/vendor/google.golang.org/api/runtimeconfig/v1beta1/runtimeconfig-api.json @@ -798,7 +798,7 @@ } } }, - "revision": "20181210", + "revision": "20190415", "rootUrl": "https://runtimeconfig.googleapis.com/", "schemas": { "Binding": { @@ -807,10 +807,10 @@ "properties": { "condition": { "$ref": "Expr", - "description": "Unimplemented. The condition that is associated with this binding.\nNOTE: an unsatisfied condition will not allow user access via current\nbinding. Different bindings, including their conditions, are examined\nindependently." + "description": "The condition that is associated with this binding.\nNOTE: An unsatisfied condition will not allow user access via current\nbinding. Different bindings, including their conditions, are examined\nindependently." }, "members": { - "description": "Specifies the identities requesting access for a Cloud Platform resource.\n`members` can have the following values:\n\n* `allUsers`: A special identifier that represents anyone who is\n on the internet; with or without a Google account.\n\n* `allAuthenticatedUsers`: A special identifier that represents anyone\n who is authenticated with a Google account or a service account.\n\n* `user:{emailid}`: An email address that represents a specific Google\n account. For example, `alice@gmail.com` .\n\n\n* `serviceAccount:{emailid}`: An email address that represents a service\n account. For example, `my-other-app@appspot.gserviceaccount.com`.\n\n* `group:{emailid}`: An email address that represents a Google group.\n For example, `admins@example.com`.\n\n\n* `domain:{domain}`: A Google Apps domain name that represents all the\n users of that domain. For example, `google.com` or `example.com`.\n\n", + "description": "Specifies the identities requesting access for a Cloud Platform resource.\n`members` can have the following values:\n\n* `allUsers`: A special identifier that represents anyone who is\n on the internet; with or without a Google account.\n\n* `allAuthenticatedUsers`: A special identifier that represents anyone\n who is authenticated with a Google account or a service account.\n\n* `user:{emailid}`: An email address that represents a specific Google\n account. For example, `alice@gmail.com` .\n\n\n* `serviceAccount:{emailid}`: An email address that represents a service\n account. For example, `my-other-app@appspot.gserviceaccount.com`.\n\n* `group:{emailid}`: An email address that represents a Google group.\n For example, `admins@example.com`.\n\n\n* `domain:{domain}`: The G Suite domain (primary) that represents all the\n users of that domain. For example, `google.com` or `example.com`.\n\n", "items": { "type": "string" }, @@ -1019,7 +1019,7 @@ "type": "object" }, "Status": { - "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", + "description": "The `Status` type defines a logical error model that is suitable for\ndifferent programming environments, including REST APIs and RPC APIs. It is\nused by [gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error\nmessage, and error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", "id": "Status", "properties": { "code": { @@ -1082,7 +1082,7 @@ "type": "string" }, "state": { - "description": "Output only. The current state of the variable. The variable state indicates\nthe outcome of the `variables().watch` call and is visible through the\n`get` and `list` calls.", + "description": "Output only. The current state of the variable. The variable state\nindicates the outcome of the `variables().watch` call and is visible\nthrough the `get` and `list` calls.", "enum": [ "VARIABLE_STATE_UNSPECIFIED", "UPDATED", @@ -1113,7 +1113,7 @@ "type": "object" }, "Waiter": { - "description": "A Waiter resource waits for some end condition within a RuntimeConfig resource\nto be met before it returns. For example, assume you have a distributed\nsystem where each node writes to a Variable resource indicating the node's\nreadiness as part of the startup process.\n\nYou then configure a Waiter resource with the success condition set to wait\nuntil some number of nodes have checked in. Afterwards, your application\nruns some arbitrary code after the condition has been met and the waiter\nreturns successfully.\n\nOnce created, a Waiter resource is immutable.\n\nTo learn more about using waiters, read the\n[Creating a Waiter](/deployment-manager/runtime-configurator/creating-a-waiter)\ndocumentation.", + "description": "A Waiter resource waits for some end condition within a RuntimeConfig\nresource to be met before it returns. For example, assume you have a\ndistributed system where each node writes to a Variable resource indicating\nthe node's readiness as part of the startup process.\n\nYou then configure a Waiter resource with the success condition set to wait\nuntil some number of nodes have checked in. Afterwards, your application\nruns some arbitrary code after the condition has been met and the waiter\nreturns successfully.\n\nOnce created, a Waiter resource is immutable.\n\nTo learn more about using waiters, read the\n[Creating a\nWaiter](/deployment-manager/runtime-configurator/creating-a-waiter)\ndocumentation.", "id": "Waiter", "properties": { "createTime": { @@ -1139,7 +1139,7 @@ }, "success": { "$ref": "EndCondition", - "description": "[Required] The success condition. If this condition is met, `done` will be\nset to `true` and the `error` value will remain unset. The failure condition\ntakes precedence over the success condition. If both conditions are met, a\nfailure will be indicated." + "description": "[Required] The success condition. If this condition is met, `done` will be\nset to `true` and the `error` value will remain unset. The failure\ncondition takes precedence over the success condition. If both conditions\nare met, a failure will be indicated." }, "timeout": { "description": "[Required] Specifies the timeout of the waiter in seconds, beginning from\nthe instant that `waiters().create` method is called. If this time elapses\nbefore the success or failure conditions are met, the waiter fails and sets\nthe `error` code to `DEADLINE_EXCEEDED`.", diff --git a/vendor/google.golang.org/api/runtimeconfig/v1beta1/runtimeconfig-gen.go b/vendor/google.golang.org/api/runtimeconfig/v1beta1/runtimeconfig-gen.go index b156073b..22bba3e8 100644 --- a/vendor/google.golang.org/api/runtimeconfig/v1beta1/runtimeconfig-gen.go +++ b/vendor/google.golang.org/api/runtimeconfig/v1beta1/runtimeconfig-gen.go @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. All rights reserved. +// Copyright 2019 Google LLC. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. @@ -6,13 +6,39 @@ // Package runtimeconfig provides access to the Cloud Runtime Configuration API. // -// See https://cloud.google.com/deployment-manager/runtime-configurator/ +// For product documentation, see: https://cloud.google.com/deployment-manager/runtime-configurator/ +// +// Creating a client // // Usage example: // // import "google.golang.org/api/runtimeconfig/v1beta1" // ... -// runtimeconfigService, err := runtimeconfig.New(oauthHttpClient) +// ctx := context.Background() +// runtimeconfigService, err := runtimeconfig.NewService(ctx) +// +// In this example, Google Application Default Credentials are used for authentication. +// +// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// +// Other authentication options +// +// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// +// runtimeconfigService, err := runtimeconfig.NewService(ctx, option.WithScopes(runtimeconfig.CloudruntimeconfigScope)) +// +// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// +// runtimeconfigService, err := runtimeconfig.NewService(ctx, option.WithAPIKey("AIza...")) +// +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// +// config := &oauth2.Config{...} +// // ... +// token, err := config.Exchange(ctx, ...) +// runtimeconfigService, err := runtimeconfig.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) +// +// See https://godoc.org/google.golang.org/api/option/ for details on options. package runtimeconfig // import "google.golang.org/api/runtimeconfig/v1beta1" import ( @@ -29,6 +55,8 @@ import ( gensupport "google.golang.org/api/gensupport" googleapi "google.golang.org/api/googleapi" + option "google.golang.org/api/option" + htransport "google.golang.org/api/transport/http" ) // Always reference these packages, just in case the auto-generated code @@ -59,6 +87,33 @@ const ( CloudruntimeconfigScope = "https://www.googleapis.com/auth/cloudruntimeconfig" ) +// NewService creates a new Service. +func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { + scopesOption := option.WithScopes( + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudruntimeconfig", + ) + // NOTE: prepend, so we don't override user-specified scopes. + opts = append([]option.ClientOption{scopesOption}, opts...) + client, endpoint, err := htransport.NewClient(ctx, opts...) + if err != nil { + return nil, err + } + s, err := New(client) + if err != nil { + return nil, err + } + if endpoint != "" { + s.BasePath = endpoint + } + return s, nil +} + +// New creates a new Service. It uses the provided http.Client for requests. +// +// Deprecated: please use NewService instead. +// To provide a custom HTTP client, use option.WithHTTPClient. +// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. func New(client *http.Client) (*Service, error) { if client == nil { return nil, errors.New("client is nil") @@ -142,9 +197,8 @@ type ProjectsConfigsWaitersService struct { // Binding: Associates `members` with a `role`. type Binding struct { - // Condition: Unimplemented. The condition that is associated with this - // binding. - // NOTE: an unsatisfied condition will not allow user access via + // Condition: The condition that is associated with this binding. + // NOTE: An unsatisfied condition will not allow user access via // current // binding. Different bindings, including their conditions, are // examined @@ -178,7 +232,7 @@ type Binding struct { // For example, `admins@example.com`. // // - // * `domain:{domain}`: A Google Apps domain name that represents all + // * `domain:{domain}`: The G Suite domain (primary) that represents all // the // users of that domain. For example, `google.com` or // `example.com`. @@ -775,20 +829,20 @@ func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) { } // Status: The `Status` type defines a logical error model that is -// suitable for different -// programming environments, including REST APIs and RPC APIs. It is -// used by -// [gRPC](https://github.com/grpc). The error model is designed to -// be: +// suitable for +// different programming environments, including REST APIs and RPC APIs. +// It is +// used by [gRPC](https://github.com/grpc). The error model is designed +// to be: // // - Simple to use and understand for most users // - Flexible enough to meet unexpected needs // // # Overview // -// The `Status` message contains three pieces of data: error code, error -// message, -// and error details. The error code should be an enum value +// The `Status` message contains three pieces of data: error code, +// error +// message, and error details. The error code should be an enum value // of // google.rpc.Code, but it may accept additional error codes if needed. // The @@ -1004,10 +1058,10 @@ type Variable struct { Name string `json:"name,omitempty"` // State: Output only. The current state of the variable. The variable - // state indicates - // the outcome of the `variables().watch` call and is visible through - // the - // `get` and `list` calls. + // state + // indicates the outcome of the `variables().watch` call and is + // visible + // through the `get` and `list` calls. // // Possible values: // "VARIABLE_STATE_UNSPECIFIED" - Default variable state. @@ -1067,12 +1121,12 @@ func (s *Variable) MarshalJSON() ([]byte, error) { } // Waiter: A Waiter resource waits for some end condition within a -// RuntimeConfig resource -// to be met before it returns. For example, assume you have a -// distributed -// system where each node writes to a Variable resource indicating the -// node's -// readiness as part of the startup process. +// RuntimeConfig +// resource to be met before it returns. For example, assume you have +// a +// distributed system where each node writes to a Variable resource +// indicating +// the node's readiness as part of the startup process. // // You then configure a Waiter resource with the success condition set // to wait @@ -1085,10 +1139,11 @@ func (s *Variable) MarshalJSON() ([]byte, error) { // Once created, a Waiter resource is immutable. // // To learn more about using waiters, read the -// [Creating a +// [Creating +// a // Waiter](/deployment-manager/runtime-configurator/creating-a-waiter) -// do -// cumentation. +// +// documentation. type Waiter struct { // CreateTime: Output only. The instant at which this Waiter resource // was created. Adding @@ -1142,11 +1197,11 @@ type Waiter struct { // Success: [Required] The success condition. If this condition is met, // `done` will be - // set to `true` and the `error` value will remain unset. The failure - // condition - // takes precedence over the success condition. If both conditions are - // met, a - // failure will be indicated. + // set to `true` and the `error` value will remain unset. The + // failure + // condition takes precedence over the success condition. If both + // conditions + // are met, a failure will be indicated. Success *EndCondition `json:"success,omitempty"` // Timeout: [Required] Specifies the timeout of the waiter in seconds, diff --git a/vendor/google.golang.org/api/servicemanagement/v1/servicemanagement-api.json b/vendor/google.golang.org/api/servicemanagement/v1/servicemanagement-api.json index 4c50b522..8c0eba66 100644 --- a/vendor/google.golang.org/api/servicemanagement/v1/servicemanagement-api.json +++ b/vendor/google.golang.org/api/servicemanagement/v1/servicemanagement-api.json @@ -414,7 +414,7 @@ "type": "string" }, "pageSize": { - "description": "Requested size of the next page of data.", + "description": "The max number of items to include in the response list. Page size is 50\nif not specified. Maximum value is 100.", "format": "int32", "location": "query", "type": "integer" @@ -611,7 +611,7 @@ ], "parameters": { "pageSize": { - "description": "The max number of items to include in the response list.", + "description": "The max number of items to include in the response list. Page size is 50\nif not specified. Maximum value is 100.", "format": "int32", "location": "query", "type": "integer" @@ -843,7 +843,7 @@ "type": "string" }, "pageSize": { - "description": "The max number of items to include in the response list.", + "description": "The max number of items to include in the response list. Page size is 50\nif not specified. Maximum value is 100.", "format": "int32", "location": "query", "type": "integer" @@ -876,7 +876,7 @@ } } }, - "revision": "20181210", + "revision": "20190412", "rootUrl": "https://servicemanagement.googleapis.com/", "schemas": { "Advice": { @@ -991,7 +991,7 @@ "type": "object" }, "AuthProvider": { - "description": "Configuration for an anthentication provider, including support for\n[JSON Web Token (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32).", + "description": "Configuration for an authentication provider, including support for\n[JSON Web Token\n(JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32).", "id": "AuthProvider", "properties": { "audiences": { @@ -1011,14 +1011,14 @@ "type": "string" }, "jwksUri": { - "description": "URL of the provider's public key set to validate signature of the JWT. See\n[OpenID Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata).\nOptional if the key set document:\n - can be retrieved from\n [OpenID Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html\n of the issuer.\n - can be inferred from the email domain of the issuer (e.g. a Google service account).\n\nExample: https://www.googleapis.com/oauth2/v1/certs", + "description": "URL of the provider's public key set to validate signature of the JWT. See\n[OpenID\nDiscovery](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata).\nOptional if the key set document:\n - can be retrieved from\n [OpenID\n Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html of\n the issuer.\n - can be inferred from the email domain of the issuer (e.g. a Google\n service account).\n\nExample: https://www.googleapis.com/oauth2/v1/certs", "type": "string" } }, "type": "object" }, "AuthRequirement": { - "description": "User-defined authentication requirements, including support for\n[JSON Web Token (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32).", + "description": "User-defined authentication requirements, including support for\n[JSON Web Token\n(JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32).", "id": "AuthRequirement", "properties": { "audiences": { @@ -1117,6 +1117,10 @@ "format": "double", "type": "number" }, + "jwtAudience": { + "description": "The JWT audience is used when generating a JWT id token for the backend.", + "type": "string" + }, "minDeadline": { "description": "Minimum deadline in seconds needed for this method. Calls having deadline\nvalue lower than this will be rejected.", "format": "double", @@ -1127,6 +1131,19 @@ "format": "double", "type": "number" }, + "pathTranslation": { + "enum": [ + "PATH_TRANSLATION_UNSPECIFIED", + "CONSTANT_ADDRESS", + "APPEND_PATH_TO_ADDRESS" + ], + "enumDescriptions": [ + "", + "Use the backend address as-is, with no modification to the path. If the\nURL pattern contains variables, the variable names and values will be\nappended to the query string. If a query string parameter and a URL\npattern variable have the same name, this may result in duplicate keys in\nthe query string.\n\n# Examples\n\nGiven the following operation config:\n\n Method path: /api/company/{cid}/user/{uid}\n Backend address: https://example.cloudfunctions.net/getUser\n\nRequests to the following request paths will call the backend at the\ntranslated path:\n\n Request path: /api/company/widgetworks/user/johndoe\n Translated:\n https://example.cloudfunctions.net/getUser?cid=widgetworks\u0026uid=johndoe\n\n Request path: /api/company/widgetworks/user/johndoe?timezone=EST\n Translated:\n https://example.cloudfunctions.net/getUser?timezone=EST\u0026cid=widgetworks\u0026uid=johndoe", + "The request path will be appended to the backend address.\n\n# Examples\n\nGiven the following operation config:\n\n Method path: /api/company/{cid}/user/{uid}\n Backend address: https://example.appspot.com\n\nRequests to the following request paths will call the backend at the\ntranslated path:\n\n Request path: /api/company/widgetworks/user/johndoe\n Translated:\n https://example.appspot.com/api/company/widgetworks/user/johndoe\n\n Request path: /api/company/widgetworks/user/johndoe?timezone=EST\n Translated:\n https://example.appspot.com/api/company/widgetworks/user/johndoe?timezone=EST" + ], + "type": "string" + }, "selector": { "description": "Selects the methods to which this rule applies.\n\nRefer to selector for syntax details.", "type": "string" @@ -1172,10 +1189,10 @@ "properties": { "condition": { "$ref": "Expr", - "description": "Unimplemented. The condition that is associated with this binding.\nNOTE: an unsatisfied condition will not allow user access via current\nbinding. Different bindings, including their conditions, are examined\nindependently." + "description": "The condition that is associated with this binding.\nNOTE: An unsatisfied condition will not allow user access via current\nbinding. Different bindings, including their conditions, are examined\nindependently." }, "members": { - "description": "Specifies the identities requesting access for a Cloud Platform resource.\n`members` can have the following values:\n\n* `allUsers`: A special identifier that represents anyone who is\n on the internet; with or without a Google account.\n\n* `allAuthenticatedUsers`: A special identifier that represents anyone\n who is authenticated with a Google account or a service account.\n\n* `user:{emailid}`: An email address that represents a specific Google\n account. For example, `alice@gmail.com` .\n\n\n* `serviceAccount:{emailid}`: An email address that represents a service\n account. For example, `my-other-app@appspot.gserviceaccount.com`.\n\n* `group:{emailid}`: An email address that represents a Google group.\n For example, `admins@example.com`.\n\n\n* `domain:{domain}`: A Google Apps domain name that represents all the\n users of that domain. For example, `google.com` or `example.com`.\n\n", + "description": "Specifies the identities requesting access for a Cloud Platform resource.\n`members` can have the following values:\n\n* `allUsers`: A special identifier that represents anyone who is\n on the internet; with or without a Google account.\n\n* `allAuthenticatedUsers`: A special identifier that represents anyone\n who is authenticated with a Google account or a service account.\n\n* `user:{emailid}`: An email address that represents a specific Google\n account. For example, `alice@gmail.com` .\n\n\n* `serviceAccount:{emailid}`: An email address that represents a service\n account. For example, `my-other-app@appspot.gserviceaccount.com`.\n\n* `group:{emailid}`: An email address that represents a Google group.\n For example, `admins@example.com`.\n\n\n* `domain:{domain}`: The G Suite domain (primary) that represents all the\n users of that domain. For example, `google.com` or `example.com`.\n\n", "items": { "type": "string" }, @@ -1230,7 +1247,7 @@ "type": "string" }, "element": { - "description": "Object hierarchy path to the change, with levels separated by a '.'\ncharacter. For repeated fields, an applicable unique identifier field is\nused for the index (usually selector, name, or id). For maps, the term\n'key' is used. If the field has no unique identifier, the numeric index\nis used.\nExamples:\n- visibility.rules[selector==\"google.LibraryService.CreateBook\"].restriction\n- quota.metric_rules[selector==\"google\"].metric_costs[key==\"reads\"].value\n- logging.producer_destinations[0]", + "description": "Object hierarchy path to the change, with levels separated by a '.'\ncharacter. For repeated fields, an applicable unique identifier field is\nused for the index (usually selector, name, or id). For maps, the term\n'key' is used. If the field has no unique identifier, the numeric index\nis used.\nExamples:\n- visibility.rules[selector==\"google.LibraryService.ListBooks\"].restriction\n- quota.metric_rules[selector==\"google\"].metric_costs[key==\"reads\"].value\n- logging.producer_destinations[0]", "type": "string" }, "newValue": { @@ -1506,7 +1523,7 @@ "id": "DocumentationRule", "properties": { "deprecationDescription": { - "description": "Deprecation description of the selected element(s). It can be provided if an\nelement is marked as `deprecated`.", + "description": "Deprecation description of the selected element(s). It can be provided if\nan element is marked as `deprecated`.", "type": "string" }, "description": { @@ -1514,7 +1531,7 @@ "type": "string" }, "selector": { - "description": "The selector is a comma-separated list of patterns. Each pattern is a\nqualified name of the element which may end in \"*\", indicating a wildcard.\nWildcards are only allowed at the end and for a whole component of the\nqualified name, i.e. \"foo.*\" is ok, but not \"foo.b*\" or \"foo.*.bar\". To\nspecify a default for all applicable elements, the whole pattern \"*\"\nis used.", + "description": "The selector is a comma-separated list of patterns. Each pattern is a\nqualified name of the element which may end in \"*\", indicating a wildcard.\nWildcards are only allowed at the end and for a whole component of the\nqualified name, i.e. \"foo.*\" is ok, but not \"foo.b*\" or \"foo.*.bar\". A\nwildcard will match one or more components. To specify a default for all\napplicable elements, the whole pattern \"*\" is used.", "type": "string" } }, @@ -1558,7 +1575,7 @@ "type": "string" }, "target": { - "description": "The specification of an Internet routable address of API frontend that will\nhandle requests to this [API Endpoint](https://cloud.google.com/apis/design/glossary).\nIt should be either a valid IPv4 address or a fully-qualified domain name.\nFor example, \"8.8.8.8\" or \"myservice.appspot.com\".", + "description": "The specification of an Internet routable address of API frontend that will\nhandle requests to this [API\nEndpoint](https://cloud.google.com/apis/design/glossary). It should be\neither a valid IPv4 address or a fully-qualified domain name. For example,\n\"8.8.8.8\" or \"myservice.appspot.com\".", "type": "string" } }, @@ -1831,7 +1848,7 @@ "id": "Http", "properties": { "fullyDecodeReservedExpansion": { - "description": "When set to true, URL path parmeters will be fully URI-decoded except in\ncases of single segment matches in reserved expansion, where \"%2F\" will be\nleft encoded.\n\nThe default behavior is to not decode RFC 6570 reserved characters in multi\nsegment matches.", + "description": "When set to true, URL path parameters will be fully URI-decoded except in\ncases of single segment matches in reserved expansion, where \"%2F\" will be\nleft encoded.\n\nThe default behavior is to not decode RFC 6570 reserved characters in multi\nsegment matches.", "type": "boolean" }, "rules": { @@ -1845,7 +1862,7 @@ "type": "object" }, "HttpRule": { - "description": "# gRPC Transcoding\n\ngRPC Transcoding is a feature for mapping between a gRPC method and one or\nmore HTTP REST endpoints. It allows developers to build a single API service\nthat supports both gRPC APIs and REST APIs. Many systems, including [Google\nAPIs](https://github.com/googleapis/googleapis),\n[Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC\nGateway](https://github.com/grpc-ecosystem/grpc-gateway),\nand [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature\nand use it for large scale production services.\n\n`HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies\nhow different portions of the gRPC request message are mapped to the URL\npath, URL query parameters, and HTTP request body. It also controls how the\ngRPC response message is mapped to the HTTP response body. `HttpRule` is\ntypically specified as an `google.api.http` annotation on the gRPC method.\n\nEach mapping specifies a URL path template and an HTTP method. The path\ntemplate may refer to one or more fields in the gRPC request message, as long\nas each field is a non-repeated field with a primitive (non-message) type.\nThe path template controls how fields of the request message are mapped to\nthe URL path.\n\nExample:\n\n service Messaging {\n rpc GetMessage(GetMessageRequest) returns (Message) {\n option (google.api.http) = {\n get: \"/v1/{name=messages/*}\"\n };\n }\n }\n message GetMessageRequest {\n string name = 1; // Mapped to URL path.\n }\n message Message {\n string text = 1; // The resource content.\n }\n\nThis enables an HTTP REST to gRPC mapping as below:\n\nHTTP | gRPC\n-----|-----\n`GET /v1/messages/123456` | `GetMessage(name: \"messages/123456\")`\n\nAny fields in the request message which are not bound by the path template\nautomatically become HTTP query parameters if there is no HTTP request body.\nFor example:\n\n service Messaging {\n rpc GetMessage(GetMessageRequest) returns (Message) {\n option (google.api.http) = {\n get:\"/v1/messages/{message_id}\"\n };\n }\n }\n message GetMessageRequest {\n message SubMessage {\n string subfield = 1;\n }\n string message_id = 1; // Mapped to URL path.\n int64 revision = 2; // Mapped to URL query parameter `revision`.\n SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`.\n }\n\nThis enables a HTTP JSON to RPC mapping as below:\n\nHTTP | gRPC\n-----|-----\n`GET /v1/messages/123456?revision=2\u0026sub.subfield=foo` | `GetMessage(message_id: \"123456\" revision: 2 sub: SubMessage(subfield: \"foo\"))`\n\nNote that fields which are mapped to URL query parameters must have a\nprimitive type or a repeated primitive type or a non-repeated message type.\nIn the case of a repeated type, the parameter can be repeated in the URL\nas `...?param=A\u0026param=B`. In the case of a message type, each field of the\nmessage is mapped to a separate parameter, such as\n`...?foo.a=A\u0026foo.b=B\u0026foo.c=C`.\n\nFor HTTP methods that allow a request body, the `body` field\nspecifies the mapping. Consider a REST update method on the\nmessage resource collection:\n\n service Messaging {\n rpc UpdateMessage(UpdateMessageRequest) returns (Message) {\n option (google.api.http) = {\n patch: \"/v1/messages/{message_id}\"\n body: \"message\"\n };\n }\n }\n message UpdateMessageRequest {\n string message_id = 1; // mapped to the URL\n Message message = 2; // mapped to the body\n }\n\nThe following HTTP JSON to RPC mapping is enabled, where the\nrepresentation of the JSON in the request body is determined by\nprotos JSON encoding:\n\nHTTP | gRPC\n-----|-----\n`PATCH /v1/messages/123456 { \"text\": \"Hi!\" }` | `UpdateMessage(message_id: \"123456\" message { text: \"Hi!\" })`\n\nThe special name `*` can be used in the body mapping to define that\nevery field not bound by the path template should be mapped to the\nrequest body. This enables the following alternative definition of\nthe update method:\n\n service Messaging {\n rpc UpdateMessage(Message) returns (Message) {\n option (google.api.http) = {\n patch: \"/v1/messages/{message_id}\"\n body: \"*\"\n };\n }\n }\n message Message {\n string message_id = 1;\n string text = 2;\n }\n\n\nThe following HTTP JSON to RPC mapping is enabled:\n\nHTTP | gRPC\n-----|-----\n`PATCH /v1/messages/123456 { \"text\": \"Hi!\" }` | `UpdateMessage(message_id: \"123456\" text: \"Hi!\")`\n\nNote that when using `*` in the body mapping, it is not possible to\nhave HTTP parameters, as all fields not bound by the path end in\nthe body. This makes this option more rarely used in practice when\ndefining REST APIs. The common usage of `*` is in custom methods\nwhich don't use the URL at all for transferring data.\n\nIt is possible to define multiple HTTP methods for one RPC by using\nthe `additional_bindings` option. Example:\n\n service Messaging {\n rpc GetMessage(GetMessageRequest) returns (Message) {\n option (google.api.http) = {\n get: \"/v1/messages/{message_id}\"\n additional_bindings {\n get: \"/v1/users/{user_id}/messages/{message_id}\"\n }\n };\n }\n }\n message GetMessageRequest {\n string message_id = 1;\n string user_id = 2;\n }\n\nThis enables the following two alternative HTTP JSON to RPC mappings:\n\nHTTP | gRPC\n-----|-----\n`GET /v1/messages/123456` | `GetMessage(message_id: \"123456\")`\n`GET /v1/users/me/messages/123456` | `GetMessage(user_id: \"me\" message_id: \"123456\")`\n\n## Rules for HTTP mapping\n\n1. Leaf request fields (recursive expansion nested messages in the request\n message) are classified into three categories:\n - Fields referred by the path template. They are passed via the URL path.\n - Fields referred by the HttpRule.body. They are passed via the HTTP\n request body.\n - All other fields are passed via the URL query parameters, and the\n parameter name is the field path in the request message. A repeated\n field can be represented as multiple query parameters under the same\n name.\n 2. If HttpRule.body is \"*\", there is no URL query parameter, all fields\n are passed via URL path and HTTP request body.\n 3. If HttpRule.body is omitted, there is no HTTP request body, all\n fields are passed via URL path and URL query parameters.\n\n### Path template syntax\n\n Template = \"/\" Segments [ Verb ] ;\n Segments = Segment { \"/\" Segment } ;\n Segment = \"*\" | \"**\" | LITERAL | Variable ;\n Variable = \"{\" FieldPath [ \"=\" Segments ] \"}\" ;\n FieldPath = IDENT { \".\" IDENT } ;\n Verb = \":\" LITERAL ;\n\nThe syntax `*` matches a single URL path segment. The syntax `**` matches\nzero or more URL path segments, which must be the last part of the URL path\nexcept the `Verb`.\n\nThe syntax `Variable` matches part of the URL path as specified by its\ntemplate. A variable template must not contain other variables. If a variable\nmatches a single path segment, its template may be omitted, e.g. `{var}`\nis equivalent to `{var=*}`.\n\nThe syntax `LITERAL` matches literal text in the URL path. If the `LITERAL`\ncontains any reserved character, such characters should be percent-encoded\nbefore the matching.\n\nIf a variable contains exactly one path segment, such as `\"{var}\"` or\n`\"{var=*}\"`, when such a variable is expanded into a URL path on the client\nside, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The\nserver side does the reverse decoding. Such variables show up in the\n[Discovery Document](https://developers.google.com/discovery/v1/reference/apis)\nas `{var}`.\n\nIf a variable contains multiple path segments, such as `\"{var=foo/*}\"`\nor `\"{var=**}\"`, when such a variable is expanded into a URL path on the\nclient side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded.\nThe server side does the reverse decoding, except \"%2F\" and \"%2f\" are left\nunchanged. Such variables show up in the\n[Discovery Document](https://developers.google.com/discovery/v1/reference/apis)\nas `{+var}`.\n\n## Using gRPC API Service Configuration\n\ngRPC API Service Configuration (service config) is a configuration language\nfor configuring a gRPC service to become a user-facing product. The\nservice config is simply the YAML representation of the `google.api.Service`\nproto message.\n\nAs an alternative to annotating your proto file, you can configure gRPC\ntranscoding in your service config YAML files. You do this by specifying a\n`HttpRule` that maps the gRPC method to a REST endpoint, achieving the same\neffect as the proto annotation. This can be particularly useful if you\nhave a proto that is reused in multiple services. Note that any transcoding\nspecified in the service config will override any matching transcoding\nconfiguration in the proto.\n\nExample:\n\n http:\n rules:\n # Selects a gRPC method and applies HttpRule to it.\n - selector: example.v1.Messaging.GetMessage\n get: /v1/messages/{message_id}/{sub.subfield}\n\n## Special notes\n\nWhen gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the\nproto to JSON conversion must follow the [proto3\nspecification](https://developers.google.com/protocol-buffers/docs/proto3#json).\n\nWhile the single segment variable follows the semantics of\n[RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String\nExpansion, the multi segment variable **does not** follow RFC 6570 Section\n3.2.3 Reserved Expansion. The reason is that the Reserved Expansion\ndoes not expand special characters like `?` and `#`, which would lead\nto invalid URLs. As the result, gRPC Transcoding uses a custom encoding\nfor multi segment variables.\n\nThe path variables **must not** refer to any repeated or mapped field,\nbecause client libraries are not capable of handling such variable expansion.\n\nThe path variables **must not** capture the leading \"/\" character. The reason\nis that the most common use case \"{var}\" does not capture the leading \"/\"\ncharacter. For consistency, all path variables must share the same behavior.\n\nRepeated message fields must not be mapped to URL query parameters, because\nno client library can support such complicated mapping.\n\nIf an API needs to use a JSON array for request or response body, it can map\nthe request or response body to a repeated field. However, some gRPC\nTranscoding implementations may not support this feature.", + "description": "# gRPC Transcoding\n\ngRPC Transcoding is a feature for mapping between a gRPC method and one or\nmore HTTP REST endpoints. It allows developers to build a single API service\nthat supports both gRPC APIs and REST APIs. Many systems, including [Google\nAPIs](https://github.com/googleapis/googleapis),\n[Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC\nGateway](https://github.com/grpc-ecosystem/grpc-gateway),\nand [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature\nand use it for large scale production services.\n\n`HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies\nhow different portions of the gRPC request message are mapped to the URL\npath, URL query parameters, and HTTP request body. It also controls how the\ngRPC response message is mapped to the HTTP response body. `HttpRule` is\ntypically specified as an `google.api.http` annotation on the gRPC method.\n\nEach mapping specifies a URL path template and an HTTP method. The path\ntemplate may refer to one or more fields in the gRPC request message, as long\nas each field is a non-repeated field with a primitive (non-message) type.\nThe path template controls how fields of the request message are mapped to\nthe URL path.\n\nExample:\n\n service Messaging {\n rpc GetMessage(GetMessageRequest) returns (Message) {\n option (google.api.http) = {\n get: \"/v1/{name=messages/*}\"\n };\n }\n }\n message GetMessageRequest {\n string name = 1; // Mapped to URL path.\n }\n message Message {\n string text = 1; // The resource content.\n }\n\nThis enables an HTTP REST to gRPC mapping as below:\n\nHTTP | gRPC\n-----|-----\n`GET /v1/messages/123456` | `GetMessage(name: \"messages/123456\")`\n\nAny fields in the request message which are not bound by the path template\nautomatically become HTTP query parameters if there is no HTTP request body.\nFor example:\n\n service Messaging {\n rpc GetMessage(GetMessageRequest) returns (Message) {\n option (google.api.http) = {\n get:\"/v1/messages/{message_id}\"\n };\n }\n }\n message GetMessageRequest {\n message SubMessage {\n string subfield = 1;\n }\n string message_id = 1; // Mapped to URL path.\n int64 revision = 2; // Mapped to URL query parameter `revision`.\n SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`.\n }\n\nThis enables a HTTP JSON to RPC mapping as below:\n\nHTTP | gRPC\n-----|-----\n`GET /v1/messages/123456?revision=2\u0026sub.subfield=foo` |\n`GetMessage(message_id: \"123456\" revision: 2 sub: SubMessage(subfield:\n\"foo\"))`\n\nNote that fields which are mapped to URL query parameters must have a\nprimitive type or a repeated primitive type or a non-repeated message type.\nIn the case of a repeated type, the parameter can be repeated in the URL\nas `...?param=A\u0026param=B`. In the case of a message type, each field of the\nmessage is mapped to a separate parameter, such as\n`...?foo.a=A\u0026foo.b=B\u0026foo.c=C`.\n\nFor HTTP methods that allow a request body, the `body` field\nspecifies the mapping. Consider a REST update method on the\nmessage resource collection:\n\n service Messaging {\n rpc UpdateMessage(UpdateMessageRequest) returns (Message) {\n option (google.api.http) = {\n patch: \"/v1/messages/{message_id}\"\n body: \"message\"\n };\n }\n }\n message UpdateMessageRequest {\n string message_id = 1; // mapped to the URL\n Message message = 2; // mapped to the body\n }\n\nThe following HTTP JSON to RPC mapping is enabled, where the\nrepresentation of the JSON in the request body is determined by\nprotos JSON encoding:\n\nHTTP | gRPC\n-----|-----\n`PATCH /v1/messages/123456 { \"text\": \"Hi!\" }` | `UpdateMessage(message_id:\n\"123456\" message { text: \"Hi!\" })`\n\nThe special name `*` can be used in the body mapping to define that\nevery field not bound by the path template should be mapped to the\nrequest body. This enables the following alternative definition of\nthe update method:\n\n service Messaging {\n rpc UpdateMessage(Message) returns (Message) {\n option (google.api.http) = {\n patch: \"/v1/messages/{message_id}\"\n body: \"*\"\n };\n }\n }\n message Message {\n string message_id = 1;\n string text = 2;\n }\n\n\nThe following HTTP JSON to RPC mapping is enabled:\n\nHTTP | gRPC\n-----|-----\n`PATCH /v1/messages/123456 { \"text\": \"Hi!\" }` | `UpdateMessage(message_id:\n\"123456\" text: \"Hi!\")`\n\nNote that when using `*` in the body mapping, it is not possible to\nhave HTTP parameters, as all fields not bound by the path end in\nthe body. This makes this option more rarely used in practice when\ndefining REST APIs. The common usage of `*` is in custom methods\nwhich don't use the URL at all for transferring data.\n\nIt is possible to define multiple HTTP methods for one RPC by using\nthe `additional_bindings` option. Example:\n\n service Messaging {\n rpc GetMessage(GetMessageRequest) returns (Message) {\n option (google.api.http) = {\n get: \"/v1/messages/{message_id}\"\n additional_bindings {\n get: \"/v1/users/{user_id}/messages/{message_id}\"\n }\n };\n }\n }\n message GetMessageRequest {\n string message_id = 1;\n string user_id = 2;\n }\n\nThis enables the following two alternative HTTP JSON to RPC mappings:\n\nHTTP | gRPC\n-----|-----\n`GET /v1/messages/123456` | `GetMessage(message_id: \"123456\")`\n`GET /v1/users/me/messages/123456` | `GetMessage(user_id: \"me\" message_id:\n\"123456\")`\n\n## Rules for HTTP mapping\n\n1. Leaf request fields (recursive expansion nested messages in the request\n message) are classified into three categories:\n - Fields referred by the path template. They are passed via the URL path.\n - Fields referred by the HttpRule.body. They are passed via the HTTP\n request body.\n - All other fields are passed via the URL query parameters, and the\n parameter name is the field path in the request message. A repeated\n field can be represented as multiple query parameters under the same\n name.\n 2. If HttpRule.body is \"*\", there is no URL query parameter, all fields\n are passed via URL path and HTTP request body.\n 3. If HttpRule.body is omitted, there is no HTTP request body, all\n fields are passed via URL path and URL query parameters.\n\n### Path template syntax\n\n Template = \"/\" Segments [ Verb ] ;\n Segments = Segment { \"/\" Segment } ;\n Segment = \"*\" | \"**\" | LITERAL | Variable ;\n Variable = \"{\" FieldPath [ \"=\" Segments ] \"}\" ;\n FieldPath = IDENT { \".\" IDENT } ;\n Verb = \":\" LITERAL ;\n\nThe syntax `*` matches a single URL path segment. The syntax `**` matches\nzero or more URL path segments, which must be the last part of the URL path\nexcept the `Verb`.\n\nThe syntax `Variable` matches part of the URL path as specified by its\ntemplate. A variable template must not contain other variables. If a variable\nmatches a single path segment, its template may be omitted, e.g. `{var}`\nis equivalent to `{var=*}`.\n\nThe syntax `LITERAL` matches literal text in the URL path. If the `LITERAL`\ncontains any reserved character, such characters should be percent-encoded\nbefore the matching.\n\nIf a variable contains exactly one path segment, such as `\"{var}\"` or\n`\"{var=*}\"`, when such a variable is expanded into a URL path on the client\nside, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The\nserver side does the reverse decoding. Such variables show up in the\n[Discovery\nDocument](https://developers.google.com/discovery/v1/reference/apis) as\n`{var}`.\n\nIf a variable contains multiple path segments, such as `\"{var=foo/*}\"`\nor `\"{var=**}\"`, when such a variable is expanded into a URL path on the\nclient side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded.\nThe server side does the reverse decoding, except \"%2F\" and \"%2f\" are left\nunchanged. Such variables show up in the\n[Discovery\nDocument](https://developers.google.com/discovery/v1/reference/apis) as\n`{+var}`.\n\n## Using gRPC API Service Configuration\n\ngRPC API Service Configuration (service config) is a configuration language\nfor configuring a gRPC service to become a user-facing product. The\nservice config is simply the YAML representation of the `google.api.Service`\nproto message.\n\nAs an alternative to annotating your proto file, you can configure gRPC\ntranscoding in your service config YAML files. You do this by specifying a\n`HttpRule` that maps the gRPC method to a REST endpoint, achieving the same\neffect as the proto annotation. This can be particularly useful if you\nhave a proto that is reused in multiple services. Note that any transcoding\nspecified in the service config will override any matching transcoding\nconfiguration in the proto.\n\nExample:\n\n http:\n rules:\n # Selects a gRPC method and applies HttpRule to it.\n - selector: example.v1.Messaging.GetMessage\n get: /v1/messages/{message_id}/{sub.subfield}\n\n## Special notes\n\nWhen gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the\nproto to JSON conversion must follow the [proto3\nspecification](https://developers.google.com/protocol-buffers/docs/proto3#json).\n\nWhile the single segment variable follows the semantics of\n[RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String\nExpansion, the multi segment variable **does not** follow RFC 6570 Section\n3.2.3 Reserved Expansion. The reason is that the Reserved Expansion\ndoes not expand special characters like `?` and `#`, which would lead\nto invalid URLs. As the result, gRPC Transcoding uses a custom encoding\nfor multi segment variables.\n\nThe path variables **must not** refer to any repeated or mapped field,\nbecause client libraries are not capable of handling such variable expansion.\n\nThe path variables **must not** capture the leading \"/\" character. The reason\nis that the most common use case \"{var}\" does not capture the leading \"/\"\ncharacter. For consistency, all path variables must share the same behavior.\n\nRepeated message fields must not be mapped to URL query parameters, because\nno client library can support such complicated mapping.\n\nIf an API needs to use a JSON array for request or response body, it can map\nthe request or response body to a repeated field. However, some gRPC\nTranscoding implementations may not support this feature.", "id": "HttpRule", "properties": { "additionalBindings": { @@ -2303,14 +2320,14 @@ "id": "Monitoring", "properties": { "consumerDestinations": { - "description": "Monitoring configurations for sending metrics to the consumer project.\nThere can be multiple consumer destinations, each one must have a\ndifferent monitored resource type. A metric can be used in at most\none consumer destination.", + "description": "Monitoring configurations for sending metrics to the consumer project.\nThere can be multiple consumer destinations. A monitored resouce type may\nappear in multiple monitoring destinations if different aggregations are\nneeded for different sets of metrics associated with that monitored\nresource type. A monitored resource and metric pair may only be used once\nin the Monitoring configuration.", "items": { "$ref": "MonitoringDestination" }, "type": "array" }, "producerDestinations": { - "description": "Monitoring configurations for sending metrics to the producer project.\nThere can be multiple producer destinations, each one must have a\ndifferent monitored resource type. A metric can be used in at most\none producer destination.", + "description": "Monitoring configurations for sending metrics to the producer project.\nThere can be multiple producer destinations. A monitored resouce type may\nappear in multiple monitoring destinations if different aggregations are\nneeded for different sets of metrics associated with that monitored\nresource type. A monitored resource and metric pair may only be used once\nin the Monitoring configuration.", "items": { "$ref": "MonitoringDestination" }, @@ -2324,7 +2341,7 @@ "id": "MonitoringDestination", "properties": { "metrics": { - "description": "Names of the metrics to report to this monitoring destination.\nEach name must be defined in Service.metrics section.", + "description": "Types of the metrics to report to this monitoring destination.\nEach type must be defined in Service.metrics section.", "items": { "type": "string" }, @@ -2438,7 +2455,7 @@ "id": "Page", "properties": { "content": { - "description": "The Markdown content of the page. You can use \u003ccode\u003e\u0026#40;== include {path} ==\u0026#41;\u003c/code\u003e\nto include content from a Markdown file.", + "description": "The Markdown content of the page. You can use \u003ccode\u003e\u0026#40;== include {path}\n==\u0026#41;\u003c/code\u003e to include content from a Markdown file.", "type": "string" }, "name": { @@ -2487,7 +2504,7 @@ "type": "object" }, "Quota": { - "description": "Quota configuration helps to achieve fairness and budgeting in service\nusage.\n\nThe quota configuration works this way:\n- The service configuration defines a set of metrics.\n- For API calls, the quota.metric_rules maps methods to metrics with\n corresponding costs.\n- The quota.limits defines limits on the metrics, which will be used for\n quota checks at runtime.\n\nAn example quota configuration in yaml format:\n\n quota:\n limits:\n\n - name: apiWriteQpsPerProject\n metric: library.googleapis.com/write_calls\n unit: \"1/min/{project}\" # rate limit for consumer projects\n values:\n STANDARD: 10000\n\n\n # The metric rules bind all methods to the read_calls metric,\n # except for the UpdateBook and DeleteBook methods. These two methods\n # are mapped to the write_calls metric, with the UpdateBook method\n # consuming at twice rate as the DeleteBook method.\n metric_rules:\n - selector: \"*\"\n metric_costs:\n library.googleapis.com/read_calls: 1\n - selector: google.example.library.v1.LibraryService.UpdateBook\n metric_costs:\n library.googleapis.com/write_calls: 2\n - selector: google.example.library.v1.LibraryService.DeleteBook\n metric_costs:\n library.googleapis.com/write_calls: 1\n\n Corresponding Metric definition:\n\n metrics:\n - name: library.googleapis.com/read_calls\n display_name: Read requests\n metric_kind: DELTA\n value_type: INT64\n\n - name: library.googleapis.com/write_calls\n display_name: Write requests\n metric_kind: DELTA\n value_type: INT64", + "description": "Quota configuration helps to achieve fairness and budgeting in service\nusage.\n\nThe metric based quota configuration works this way:\n- The service configuration defines a set of metrics.\n- For API calls, the quota.metric_rules maps methods to metrics with\n corresponding costs.\n- The quota.limits defines limits on the metrics, which will be used for\n quota checks at runtime.\n\nAn example quota configuration in yaml format:\n\n quota:\n limits:\n\n - name: apiWriteQpsPerProject\n metric: library.googleapis.com/write_calls\n unit: \"1/min/{project}\" # rate limit for consumer projects\n values:\n STANDARD: 10000\n\n\n # The metric rules bind all methods to the read_calls metric,\n # except for the UpdateBook and DeleteBook methods. These two methods\n # are mapped to the write_calls metric, with the UpdateBook method\n # consuming at twice rate as the DeleteBook method.\n metric_rules:\n - selector: \"*\"\n metric_costs:\n library.googleapis.com/read_calls: 1\n - selector: google.example.library.v1.LibraryService.UpdateBook\n metric_costs:\n library.googleapis.com/write_calls: 2\n - selector: google.example.library.v1.LibraryService.DeleteBook\n metric_costs:\n library.googleapis.com/write_calls: 1\n\n Corresponding Metric definition:\n\n metrics:\n - name: library.googleapis.com/read_calls\n display_name: Read requests\n metric_kind: DELTA\n value_type: INT64\n\n - name: library.googleapis.com/write_calls\n display_name: Write requests\n metric_kind: DELTA\n value_type: INT64\n\n", "id": "Quota", "properties": { "limits": { @@ -2715,7 +2732,7 @@ "description": "Monitoring configuration." }, "name": { - "description": "The DNS address at which this service is available,\ne.g. `calendar.googleapis.com`.", + "description": "The service name, which is a DNS-like logical identifier for the\nservice, such as `calendar.googleapis.com`. The service name\ntypically goes through DNS verification to make sure the owner\nof the service also owns the DNS name.", "type": "string" }, "producerProjectId": { @@ -2805,7 +2822,7 @@ "type": "object" }, "Status": { - "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", + "description": "The `Status` type defines a logical error model that is suitable for\ndifferent programming environments, including REST APIs and RPC APIs. It is\nused by [gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error\nmessage, and error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", "id": "Status", "properties": { "code": { diff --git a/vendor/google.golang.org/api/servicemanagement/v1/servicemanagement-gen.go b/vendor/google.golang.org/api/servicemanagement/v1/servicemanagement-gen.go index 297c857e..8cdf1ba8 100644 --- a/vendor/google.golang.org/api/servicemanagement/v1/servicemanagement-gen.go +++ b/vendor/google.golang.org/api/servicemanagement/v1/servicemanagement-gen.go @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. All rights reserved. +// Copyright 2019 Google LLC. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. @@ -6,13 +6,39 @@ // Package servicemanagement provides access to the Service Management API. // -// See https://cloud.google.com/service-management/ +// For product documentation, see: https://cloud.google.com/service-management/ +// +// Creating a client // // Usage example: // // import "google.golang.org/api/servicemanagement/v1" // ... -// servicemanagementService, err := servicemanagement.New(oauthHttpClient) +// ctx := context.Background() +// servicemanagementService, err := servicemanagement.NewService(ctx) +// +// In this example, Google Application Default Credentials are used for authentication. +// +// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// +// Other authentication options +// +// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// +// servicemanagementService, err := servicemanagement.NewService(ctx, option.WithScopes(servicemanagement.ServiceManagementReadonlyScope)) +// +// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// +// servicemanagementService, err := servicemanagement.NewService(ctx, option.WithAPIKey("AIza...")) +// +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// +// config := &oauth2.Config{...} +// // ... +// token, err := config.Exchange(ctx, ...) +// servicemanagementService, err := servicemanagement.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) +// +// See https://godoc.org/google.golang.org/api/option/ for details on options. package servicemanagement // import "google.golang.org/api/servicemanagement/v1" import ( @@ -29,6 +55,8 @@ import ( gensupport "google.golang.org/api/gensupport" googleapi "google.golang.org/api/googleapi" + option "google.golang.org/api/option" + htransport "google.golang.org/api/transport/http" ) // Always reference these packages, just in case the auto-generated code @@ -65,6 +93,35 @@ const ( ServiceManagementReadonlyScope = "https://www.googleapis.com/auth/service.management.readonly" ) +// NewService creates a new APIService. +func NewService(ctx context.Context, opts ...option.ClientOption) (*APIService, error) { + scopesOption := option.WithScopes( + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/service.management", + "https://www.googleapis.com/auth/service.management.readonly", + ) + // NOTE: prepend, so we don't override user-specified scopes. + opts = append([]option.ClientOption{scopesOption}, opts...) + client, endpoint, err := htransport.NewClient(ctx, opts...) + if err != nil { + return nil, err + } + s, err := New(client) + if err != nil { + return nil, err + } + if endpoint != "" { + s.BasePath = endpoint + } + return s, nil +} + +// New creates a new APIService. It uses the provided http.Client for requests. +// +// Deprecated: please use NewService instead. +// To provide a custom HTTP client, use option.WithHTTPClient. +// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. func New(client *http.Client) (*APIService, error) { if client == nil { return nil, errors.New("client is nil") @@ -430,11 +487,12 @@ func (s *AuditLogConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// AuthProvider: Configuration for an anthentication provider, including +// AuthProvider: Configuration for an authentication provider, including // support for -// [JSON Web Token -// (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32) -// . +// [JSON Web +// Token +// (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-tok +// en-32). type AuthProvider struct { // Audiences: The list of // JWT @@ -481,18 +539,21 @@ type AuthProvider struct { Issuer string `json:"issuer,omitempty"` // JwksUri: URL of the provider's public key set to validate signature - // of the JWT. See + // of the JWT. + // See // [OpenID - // Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html# - // ProviderMetadata). + // Discovery](https://openid.net/specs/openid-connect-discove + // ry-1_0.html#ProviderMetadata). // Optional if the key set document: // - can be retrieved from // [OpenID - // Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html // - // of the issuer. - // - can be inferred from the email domain of the issuer (e.g. a Google - // service account). + // Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html + // of + // the issuer. + // - can be inferred from the email domain of the issuer (e.g. a + // Google + // service account). // // Example: https://www.googleapis.com/oauth2/v1/certs JwksUri string `json:"jwksUri,omitempty"` @@ -522,9 +583,10 @@ func (s *AuthProvider) MarshalJSON() ([]byte, error) { // AuthRequirement: User-defined authentication requirements, including // support for -// [JSON Web Token -// (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32) -// . +// [JSON Web +// Token +// (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-tok +// en-32). type AuthRequirement struct { // Audiences: NOTE: This will be deprecated soon, once // AuthProvider.audiences is @@ -770,6 +832,10 @@ type BackendRule struct { // seconds. Deadline float64 `json:"deadline,omitempty"` + // JwtAudience: The JWT audience is used when generating a JWT id token + // for the backend. + JwtAudience string `json:"jwtAudience,omitempty"` + // MinDeadline: Minimum deadline in seconds needed for this method. // Calls having deadline // value lower than this will be rejected. @@ -780,6 +846,64 @@ type BackendRule struct { // operation. The default is no deadline. OperationDeadline float64 `json:"operationDeadline,omitempty"` + // Possible values: + // "PATH_TRANSLATION_UNSPECIFIED" + // "CONSTANT_ADDRESS" - Use the backend address as-is, with no + // modification to the path. If the + // URL pattern contains variables, the variable names and values will + // be + // appended to the query string. If a query string parameter and a + // URL + // pattern variable have the same name, this may result in duplicate + // keys in + // the query string. + // + // # Examples + // + // Given the following operation config: + // + // Method path: /api/company/{cid}/user/{uid} + // Backend address: + // https://example.cloudfunctions.net/getUser + // + // Requests to the following request paths will call the backend at + // the + // translated path: + // + // Request path: /api/company/widgetworks/user/johndoe + // Translated: + // + // https://example.cloudfunctions.net/getUser?cid=widgetworks&uid=johndoe + // + // Request path: /api/company/widgetworks/user/johndoe?timezone=EST + // Translated: + // + // https://example.cloudfunctions.net/getUser?timezone=EST&cid=widgetworks&uid=johndoe + // "APPEND_PATH_TO_ADDRESS" - The request path will be appended to the + // backend address. + // + // # Examples + // + // Given the following operation config: + // + // Method path: /api/company/{cid}/user/{uid} + // Backend address: https://example.appspot.com + // + // Requests to the following request paths will call the backend at + // the + // translated path: + // + // Request path: /api/company/widgetworks/user/johndoe + // Translated: + // + // https://example.appspot.com/api/company/widgetworks/user/johndoe + // + // Request path: /api/company/widgetworks/user/johndoe?timezone=EST + // Translated: + // + // https://example.appspot.com/api/company/widgetworks/user/johndoe?timezone=EST + PathTranslation string `json:"pathTranslation,omitempty"` + // Selector: Selects the methods to which this rule applies. // // Refer to selector for syntax details. @@ -923,9 +1047,8 @@ func (s *BillingDestination) MarshalJSON() ([]byte, error) { // Binding: Associates `members` with a `role`. type Binding struct { - // Condition: Unimplemented. The condition that is associated with this - // binding. - // NOTE: an unsatisfied condition will not allow user access via + // Condition: The condition that is associated with this binding. + // NOTE: An unsatisfied condition will not allow user access via // current // binding. Different bindings, including their conditions, are // examined @@ -959,7 +1082,7 @@ type Binding struct { // For example, `admins@example.com`. // // - // * `domain:{domain}`: A Google Apps domain name that represents all + // * `domain:{domain}`: The G Suite domain (primary) that represents all // the // users of that domain. For example, `google.com` or // `example.com`. @@ -1076,8 +1199,8 @@ type ConfigChange struct { // is used. // Examples: // - - // visibility.rules[selector=="google.LibraryService.CreateBook"].restric - // tion + // visibility.rules[selector=="google.LibraryService.ListBooks"].restrict + // ion // - // quota.metric_rules[selector=="google"].metric_costs[key=="reads"].valu // e @@ -1737,8 +1860,8 @@ func (s *Documentation) MarshalJSON() ([]byte, error) { // individual API elements. type DocumentationRule struct { // DeprecationDescription: Deprecation description of the selected - // element(s). It can be provided if an - // element is marked as `deprecated`. + // element(s). It can be provided if + // an element is marked as `deprecated`. DeprecationDescription string `json:"deprecationDescription,omitempty"` // Description: Description of the selected API(s). @@ -1751,10 +1874,10 @@ type DocumentationRule struct { // Wildcards are only allowed at the end and for a whole component of // the // qualified name, i.e. "foo.*" is ok, but not "foo.b*" or "foo.*.bar". - // To - // specify a default for all applicable elements, the whole pattern - // "*" - // is used. + // A + // wildcard will match one or more components. To specify a default for + // all + // applicable elements, the whole pattern "*" is used. Selector string `json:"selector,omitempty"` // ForceSendFields is a list of field names (e.g. @@ -1873,11 +1996,13 @@ type Endpoint struct { // Target: The specification of an Internet routable address of API // frontend that will - // handle requests to this [API - // Endpoint](https://cloud.google.com/apis/design/glossary). - // It should be either a valid IPv4 address or a fully-qualified domain - // name. - // For example, "8.8.8.8" or "myservice.appspot.com". + // handle requests to this + // [API + // Endpoint](https://cloud.google.com/apis/design/glossary). It should + // be + // either a valid IPv4 address or a fully-qualified domain name. For + // example, + // "8.8.8.8" or "myservice.appspot.com". Target string `json:"target,omitempty"` // ForceSendFields is a list of field names (e.g. "Aliases") to @@ -2256,7 +2381,7 @@ type GetIamPolicyRequest struct { // HttpRule, each specifying the mapping of an RPC method // to one or more HTTP REST API methods. type Http struct { - // FullyDecodeReservedExpansion: When set to true, URL path parmeters + // FullyDecodeReservedExpansion: When set to true, URL path parameters // will be fully URI-decoded except in // cases of single segment matches in reserved expansion, where "%2F" // will be @@ -2387,9 +2512,11 @@ func (s *Http) MarshalJSON() ([]byte, error) { // // HTTP | gRPC // -----|----- -// `GET /v1/messages/123456?revision=2&sub.subfield=foo` | +// `GET /v1/messages/123456?revision=2&sub.subfield=foo` +// | // `GetMessage(message_id: "123456" revision: 2 sub: -// SubMessage(subfield: "foo"))` +// SubMessage(subfield: +// "foo"))` // // Note that fields which are mapped to URL query parameters must have // a @@ -2430,7 +2557,8 @@ func (s *Http) MarshalJSON() ([]byte, error) { // HTTP | gRPC // -----|----- // `PATCH /v1/messages/123456 { "text": "Hi!" }` | -// `UpdateMessage(message_id: "123456" message { text: "Hi!" })` +// `UpdateMessage(message_id: +// "123456" message { text: "Hi!" })` // // The special name `*` can be used in the body mapping to define // that @@ -2459,7 +2587,8 @@ func (s *Http) MarshalJSON() ([]byte, error) { // HTTP | gRPC // -----|----- // `PATCH /v1/messages/123456 { "text": "Hi!" }` | -// `UpdateMessage(message_id: "123456" text: "Hi!")` +// `UpdateMessage(message_id: +// "123456" text: "Hi!")` // // Note that when using `*` in the body mapping, it is not possible // to @@ -2496,7 +2625,8 @@ func (s *Http) MarshalJSON() ([]byte, error) { // -----|----- // `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` // `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" -// message_id: "123456")` +// message_id: +// "123456")` // // ## Rules for HTTP mapping // @@ -2559,9 +2689,9 @@ func (s *Http) MarshalJSON() ([]byte, error) { // server side does the reverse decoding. Such variables show up in // the // [Discovery -// Document](https://developers.google.com/discovery/v1/reference/apis) -// a -// s `{var}`. +// Document](https://developers.google.com/discovery/v1/re +// ference/apis) as +// `{var}`. // // If a variable contains multiple path segments, such as // "{var=foo/*}" @@ -2571,11 +2701,12 @@ func (s *Http) MarshalJSON() ([]byte, error) { // percent-encoded. // The server side does the reverse decoding, except "%2F" and "%2f" are // left -// unchanged. Such variables show up in the +// unchanged. Such variables show up in +// the // [Discovery -// Document](https://developers.google.com/discovery/v1/reference/apis) -// a -// s `{+var}`. +// Document](https://developers.google.com/discovery/v1/re +// ference/apis) as +// `{+var}`. // // ## Using gRPC API Service Configuration // @@ -3740,20 +3871,28 @@ func (s *MonitoredResourceDescriptor) MarshalJSON() ([]byte, error) { type Monitoring struct { // ConsumerDestinations: Monitoring configurations for sending metrics // to the consumer project. - // There can be multiple consumer destinations, each one must have - // a - // different monitored resource type. A metric can be used in at - // most - // one consumer destination. + // There can be multiple consumer destinations. A monitored resouce type + // may + // appear in multiple monitoring destinations if different aggregations + // are + // needed for different sets of metrics associated with that + // monitored + // resource type. A monitored resource and metric pair may only be used + // once + // in the Monitoring configuration. ConsumerDestinations []*MonitoringDestination `json:"consumerDestinations,omitempty"` // ProducerDestinations: Monitoring configurations for sending metrics // to the producer project. - // There can be multiple producer destinations, each one must have - // a - // different monitored resource type. A metric can be used in at - // most - // one producer destination. + // There can be multiple producer destinations. A monitored resouce type + // may + // appear in multiple monitoring destinations if different aggregations + // are + // needed for different sets of metrics associated with that + // monitored + // resource type. A monitored resource and metric pair may only be used + // once + // in the Monitoring configuration. ProducerDestinations []*MonitoringDestination `json:"producerDestinations,omitempty"` // ForceSendFields is a list of field names (e.g. @@ -3785,9 +3924,9 @@ func (s *Monitoring) MarshalJSON() ([]byte, error) { // destination (the producer project // or the consumer project). type MonitoringDestination struct { - // Metrics: Names of the metrics to report to this monitoring + // Metrics: Types of the metrics to report to this monitoring // destination. - // Each name must be defined in Service.metrics section. + // Each type must be defined in Service.metrics section. Metrics []string `json:"metrics,omitempty"` // MonitoredResource: The monitored resource type. The type must be @@ -4050,8 +4189,8 @@ func (s *Option) MarshalJSON() ([]byte, error) { // nested documentation set structure. type Page struct { // Content: The Markdown content of the page. You can use (== - // include {path} ==) - // to include content from a Markdown file. + // include {path} + // ==) to include content from a Markdown file. Content string `json:"content,omitempty"` // Name: The name of the page. It will be used as an identity of the @@ -4217,7 +4356,7 @@ func (s *Policy) MarshalJSON() ([]byte, error) { // service // usage. // -// The quota configuration works this way: +// The metric based quota configuration works this way: // - The service configuration defines a set of metrics. // - For API calls, the quota.metric_rules maps methods to metrics with // corresponding costs. @@ -4266,6 +4405,8 @@ func (s *Policy) MarshalJSON() ([]byte, error) { // display_name: Write requests // metric_kind: DELTA // value_type: INT64 +// +// type Quota struct { // Limits: List of `QuotaLimit` definitions for the service. Limits []*QuotaLimit `json:"limits,omitempty"` @@ -4646,8 +4787,12 @@ type Service struct { // Monitoring: Monitoring configuration. Monitoring *Monitoring `json:"monitoring,omitempty"` - // Name: The DNS address at which this service is available, - // e.g. `calendar.googleapis.com`. + // Name: The service name, which is a DNS-like logical identifier for + // the + // service, such as `calendar.googleapis.com`. The service + // name + // typically goes through DNS verification to make sure the owner + // of the service also owns the DNS name. Name string `json:"name,omitempty"` // ProducerProjectId: The Google project that owns this service. @@ -4824,20 +4969,20 @@ func (s *SourceInfo) MarshalJSON() ([]byte, error) { } // Status: The `Status` type defines a logical error model that is -// suitable for different -// programming environments, including REST APIs and RPC APIs. It is -// used by -// [gRPC](https://github.com/grpc). The error model is designed to -// be: +// suitable for +// different programming environments, including REST APIs and RPC APIs. +// It is +// used by [gRPC](https://github.com/grpc). The error model is designed +// to be: // // - Simple to use and understand for most users // - Flexible enough to meet unexpected needs // // # Overview // -// The `Status` message contains three pieces of data: error code, error -// message, -// and error details. The error code should be an enum value +// The `Status` message contains three pieces of data: error code, +// error +// message, and error details. The error code should be an enum value // of // google.rpc.Code, but it may accept additional error codes if needed. // The @@ -7132,8 +7277,9 @@ func (c *ServicesListCall) ConsumerId(consumerId string) *ServicesListCall { return c } -// PageSize sets the optional parameter "pageSize": Requested size of -// the next page of data. +// PageSize sets the optional parameter "pageSize": The max number of +// items to include in the response list. Page size is 50 +// if not specified. Maximum value is 100. func (c *ServicesListCall) PageSize(pageSize int64) *ServicesListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c @@ -7261,7 +7407,7 @@ func (c *ServicesListCall) Do(opts ...googleapi.CallOption) (*ListServicesRespon // "type": "string" // }, // "pageSize": { - // "description": "Requested size of the next page of data.", + // "description": "The max number of items to include in the response list. Page size is 50\nif not specified. Maximum value is 100.", // "format": "int32", // "location": "query", // "type": "integer" @@ -8091,7 +8237,8 @@ func (r *ServicesConfigsService) List(serviceName string) *ServicesConfigsListCa } // PageSize sets the optional parameter "pageSize": The max number of -// items to include in the response list. +// items to include in the response list. Page size is 50 +// if not specified. Maximum value is 100. func (c *ServicesConfigsListCall) PageSize(pageSize int64) *ServicesConfigsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c @@ -8211,7 +8358,7 @@ func (c *ServicesConfigsListCall) Do(opts ...googleapi.CallOption) (*ListService // ], // "parameters": { // "pageSize": { - // "description": "The max number of items to include in the response list.", + // "description": "The max number of items to include in the response list. Page size is 50\nif not specified. Maximum value is 100.", // "format": "int32", // "location": "query", // "type": "integer" @@ -9210,7 +9357,8 @@ func (c *ServicesRolloutsListCall) Filter(filter string) *ServicesRolloutsListCa } // PageSize sets the optional parameter "pageSize": The max number of -// items to include in the response list. +// items to include in the response list. Page size is 50 +// if not specified. Maximum value is 100. func (c *ServicesRolloutsListCall) PageSize(pageSize int64) *ServicesRolloutsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c @@ -9335,7 +9483,7 @@ func (c *ServicesRolloutsListCall) Do(opts ...googleapi.CallOption) (*ListServic // "type": "string" // }, // "pageSize": { - // "description": "The max number of items to include in the response list.", + // "description": "The max number of items to include in the response list. Page size is 50\nif not specified. Maximum value is 100.", // "format": "int32", // "location": "query", // "type": "integer" diff --git a/vendor/google.golang.org/api/serviceusage/v1/serviceusage-api.json b/vendor/google.golang.org/api/serviceusage/v1/serviceusage-api.json index d675519b..59023a4d 100644 --- a/vendor/google.golang.org/api/serviceusage/v1/serviceusage-api.json +++ b/vendor/google.golang.org/api/serviceusage/v1/serviceusage-api.json @@ -236,7 +236,7 @@ "services": { "methods": { "batchEnable": { - "description": "Enable multiple services on a project. The operation is atomic: if enabling\nany service fails, then the entire batch fails, and no state changes occur.\n\nOperation\u003cresponse: BatchEnableServicesResponse\u003e", + "description": "Enable multiple services on a project. The operation is atomic: if enabling\nany service fails, then the entire batch fails, and no state changes occur.", "flatPath": "v1/{v1Id}/{v1Id1}/services:batchEnable", "httpMethod": "POST", "id": "serviceusage.services.batchEnable", @@ -265,7 +265,7 @@ ] }, "disable": { - "description": "Disable a service so that it can no longer be used with a project.\nThis prevents unintended usage that may cause unexpected billing\ncharges or security leaks.\n\nIt is not valid to call the disable method on a service that is not\ncurrently enabled. Callers will receive a `FAILED_PRECONDITION` status if\nthe target service is not currently enabled.\n\nOperation\u003cresponse: DisableServiceResponse\u003e", + "description": "Disable a service so that it can no longer be used with a project.\nThis prevents unintended usage that may cause unexpected billing\ncharges or security leaks.\n\nIt is not valid to call the disable method on a service that is not\ncurrently enabled. Callers will receive a `FAILED_PRECONDITION` status if\nthe target service is not currently enabled.", "flatPath": "v1/{v1Id}/{v1Id1}/services/{servicesId}:disable", "httpMethod": "POST", "id": "serviceusage.services.disable", @@ -294,7 +294,7 @@ ] }, "enable": { - "description": "Enable a service so that it can be used with a project.\n\nOperation\u003cresponse: EnableServiceResponse\u003e", + "description": "Enable a service so that it can be used with a project.", "flatPath": "v1/{v1Id}/{v1Id1}/services/{servicesId}:enable", "httpMethod": "POST", "id": "serviceusage.services.enable", @@ -393,7 +393,7 @@ } } }, - "revision": "20181217", + "revision": "20190415", "rootUrl": "https://serviceusage.googleapis.com/", "schemas": { "Api": { @@ -449,7 +449,7 @@ "type": "object" }, "AuthProvider": { - "description": "Configuration for an anthentication provider, including support for\n[JSON Web Token (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32).", + "description": "Configuration for an authentication provider, including support for\n[JSON Web Token\n(JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32).", "id": "AuthProvider", "properties": { "audiences": { @@ -469,14 +469,14 @@ "type": "string" }, "jwksUri": { - "description": "URL of the provider's public key set to validate signature of the JWT. See\n[OpenID Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata).\nOptional if the key set document:\n - can be retrieved from\n [OpenID Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html\n of the issuer.\n - can be inferred from the email domain of the issuer (e.g. a Google service account).\n\nExample: https://www.googleapis.com/oauth2/v1/certs", + "description": "URL of the provider's public key set to validate signature of the JWT. See\n[OpenID\nDiscovery](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata).\nOptional if the key set document:\n - can be retrieved from\n [OpenID\n Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html of\n the issuer.\n - can be inferred from the email domain of the issuer (e.g. a Google\n service account).\n\nExample: https://www.googleapis.com/oauth2/v1/certs", "type": "string" } }, "type": "object" }, "AuthRequirement": { - "description": "User-defined authentication requirements, including support for\n[JSON Web Token (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32).", + "description": "User-defined authentication requirements, including support for\n[JSON Web Token\n(JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32).", "id": "AuthRequirement", "properties": { "audiences": { @@ -575,6 +575,10 @@ "format": "double", "type": "number" }, + "jwtAudience": { + "description": "The JWT audience is used when generating a JWT id token for the backend.", + "type": "string" + }, "minDeadline": { "description": "Minimum deadline in seconds needed for this method. Calls having deadline\nvalue lower than this will be rejected.", "format": "double", @@ -585,6 +589,19 @@ "format": "double", "type": "number" }, + "pathTranslation": { + "enum": [ + "PATH_TRANSLATION_UNSPECIFIED", + "CONSTANT_ADDRESS", + "APPEND_PATH_TO_ADDRESS" + ], + "enumDescriptions": [ + "", + "Use the backend address as-is, with no modification to the path. If the\nURL pattern contains variables, the variable names and values will be\nappended to the query string. If a query string parameter and a URL\npattern variable have the same name, this may result in duplicate keys in\nthe query string.\n\n# Examples\n\nGiven the following operation config:\n\n Method path: /api/company/{cid}/user/{uid}\n Backend address: https://example.cloudfunctions.net/getUser\n\nRequests to the following request paths will call the backend at the\ntranslated path:\n\n Request path: /api/company/widgetworks/user/johndoe\n Translated:\n https://example.cloudfunctions.net/getUser?cid=widgetworks\u0026uid=johndoe\n\n Request path: /api/company/widgetworks/user/johndoe?timezone=EST\n Translated:\n https://example.cloudfunctions.net/getUser?timezone=EST\u0026cid=widgetworks\u0026uid=johndoe", + "The request path will be appended to the backend address.\n\n# Examples\n\nGiven the following operation config:\n\n Method path: /api/company/{cid}/user/{uid}\n Backend address: https://example.appspot.com\n\nRequests to the following request paths will call the backend at the\ntranslated path:\n\n Request path: /api/company/widgetworks/user/johndoe\n Translated:\n https://example.appspot.com/api/company/widgetworks/user/johndoe\n\n Request path: /api/company/widgetworks/user/johndoe?timezone=EST\n Translated:\n https://example.appspot.com/api/company/widgetworks/user/johndoe?timezone=EST" + ], + "type": "string" + }, "selector": { "description": "Selects the methods to which this rule applies.\n\nRefer to selector for syntax details.", "type": "string" @@ -592,6 +609,34 @@ }, "type": "object" }, + "BatchCreateAdminOverridesResponse": { + "description": "Response message for BatchCreateAdminOverrides", + "id": "BatchCreateAdminOverridesResponse", + "properties": { + "overrides": { + "description": "The overrides that were created.", + "items": { + "$ref": "QuotaOverride" + }, + "type": "array" + } + }, + "type": "object" + }, + "BatchCreateConsumerOverridesResponse": { + "description": "Response message for BatchCreateConsumerOverrides", + "id": "BatchCreateConsumerOverridesResponse", + "properties": { + "overrides": { + "description": "The overrides that were created.", + "items": { + "$ref": "QuotaOverride" + }, + "type": "array" + } + }, + "type": "object" + }, "BatchEnableServicesRequest": { "description": "Request message for the `BatchEnableServices` method.", "id": "BatchEnableServicesRequest", @@ -840,7 +885,7 @@ "id": "DocumentationRule", "properties": { "deprecationDescription": { - "description": "Deprecation description of the selected element(s). It can be provided if an\nelement is marked as `deprecated`.", + "description": "Deprecation description of the selected element(s). It can be provided if\nan element is marked as `deprecated`.", "type": "string" }, "description": { @@ -848,7 +893,7 @@ "type": "string" }, "selector": { - "description": "The selector is a comma-separated list of patterns. Each pattern is a\nqualified name of the element which may end in \"*\", indicating a wildcard.\nWildcards are only allowed at the end and for a whole component of the\nqualified name, i.e. \"foo.*\" is ok, but not \"foo.b*\" or \"foo.*.bar\". To\nspecify a default for all applicable elements, the whole pattern \"*\"\nis used.", + "description": "The selector is a comma-separated list of patterns. Each pattern is a\nqualified name of the element which may end in \"*\", indicating a wildcard.\nWildcards are only allowed at the end and for a whole component of the\nqualified name, i.e. \"foo.*\" is ok, but not \"foo.b*\" or \"foo.*.bar\". A\nwildcard will match one or more components. To specify a default for all\napplicable elements, the whole pattern \"*\" is used.", "type": "string" } }, @@ -919,7 +964,7 @@ "type": "string" }, "target": { - "description": "The specification of an Internet routable address of API frontend that will\nhandle requests to this [API Endpoint](https://cloud.google.com/apis/design/glossary).\nIt should be either a valid IPv4 address or a fully-qualified domain name.\nFor example, \"8.8.8.8\" or \"myservice.appspot.com\".", + "description": "The specification of an Internet routable address of API frontend that will\nhandle requests to this [API\nEndpoint](https://cloud.google.com/apis/design/glossary). It should be\neither a valid IPv4 address or a fully-qualified domain name. For example,\n\"8.8.8.8\" or \"myservice.appspot.com\".", "type": "string" } }, @@ -1206,7 +1251,7 @@ "description": "Monitoring configuration." }, "name": { - "description": "The DNS address at which this service is available,\ne.g. `calendar.googleapis.com`.", + "description": "The service name, which is a DNS-like logical identifier for the\nservice, such as `calendar.googleapis.com`. The service name\ntypically goes through DNS verification to make sure the owner\nof the service also owns the DNS name.", "type": "string" }, "producerProjectId": { @@ -1347,7 +1392,7 @@ "id": "Http", "properties": { "fullyDecodeReservedExpansion": { - "description": "When set to true, URL path parmeters will be fully URI-decoded except in\ncases of single segment matches in reserved expansion, where \"%2F\" will be\nleft encoded.\n\nThe default behavior is to not decode RFC 6570 reserved characters in multi\nsegment matches.", + "description": "When set to true, URL path parameters will be fully URI-decoded except in\ncases of single segment matches in reserved expansion, where \"%2F\" will be\nleft encoded.\n\nThe default behavior is to not decode RFC 6570 reserved characters in multi\nsegment matches.", "type": "boolean" }, "rules": { @@ -1361,7 +1406,7 @@ "type": "object" }, "HttpRule": { - "description": "# gRPC Transcoding\n\ngRPC Transcoding is a feature for mapping between a gRPC method and one or\nmore HTTP REST endpoints. It allows developers to build a single API service\nthat supports both gRPC APIs and REST APIs. Many systems, including [Google\nAPIs](https://github.com/googleapis/googleapis),\n[Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC\nGateway](https://github.com/grpc-ecosystem/grpc-gateway),\nand [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature\nand use it for large scale production services.\n\n`HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies\nhow different portions of the gRPC request message are mapped to the URL\npath, URL query parameters, and HTTP request body. It also controls how the\ngRPC response message is mapped to the HTTP response body. `HttpRule` is\ntypically specified as an `google.api.http` annotation on the gRPC method.\n\nEach mapping specifies a URL path template and an HTTP method. The path\ntemplate may refer to one or more fields in the gRPC request message, as long\nas each field is a non-repeated field with a primitive (non-message) type.\nThe path template controls how fields of the request message are mapped to\nthe URL path.\n\nExample:\n\n service Messaging {\n rpc GetMessage(GetMessageRequest) returns (Message) {\n option (google.api.http) = {\n get: \"/v1/{name=messages/*}\"\n };\n }\n }\n message GetMessageRequest {\n string name = 1; // Mapped to URL path.\n }\n message Message {\n string text = 1; // The resource content.\n }\n\nThis enables an HTTP REST to gRPC mapping as below:\n\nHTTP | gRPC\n-----|-----\n`GET /v1/messages/123456` | `GetMessage(name: \"messages/123456\")`\n\nAny fields in the request message which are not bound by the path template\nautomatically become HTTP query parameters if there is no HTTP request body.\nFor example:\n\n service Messaging {\n rpc GetMessage(GetMessageRequest) returns (Message) {\n option (google.api.http) = {\n get:\"/v1/messages/{message_id}\"\n };\n }\n }\n message GetMessageRequest {\n message SubMessage {\n string subfield = 1;\n }\n string message_id = 1; // Mapped to URL path.\n int64 revision = 2; // Mapped to URL query parameter `revision`.\n SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`.\n }\n\nThis enables a HTTP JSON to RPC mapping as below:\n\nHTTP | gRPC\n-----|-----\n`GET /v1/messages/123456?revision=2\u0026sub.subfield=foo` | `GetMessage(message_id: \"123456\" revision: 2 sub: SubMessage(subfield: \"foo\"))`\n\nNote that fields which are mapped to URL query parameters must have a\nprimitive type or a repeated primitive type or a non-repeated message type.\nIn the case of a repeated type, the parameter can be repeated in the URL\nas `...?param=A\u0026param=B`. In the case of a message type, each field of the\nmessage is mapped to a separate parameter, such as\n`...?foo.a=A\u0026foo.b=B\u0026foo.c=C`.\n\nFor HTTP methods that allow a request body, the `body` field\nspecifies the mapping. Consider a REST update method on the\nmessage resource collection:\n\n service Messaging {\n rpc UpdateMessage(UpdateMessageRequest) returns (Message) {\n option (google.api.http) = {\n patch: \"/v1/messages/{message_id}\"\n body: \"message\"\n };\n }\n }\n message UpdateMessageRequest {\n string message_id = 1; // mapped to the URL\n Message message = 2; // mapped to the body\n }\n\nThe following HTTP JSON to RPC mapping is enabled, where the\nrepresentation of the JSON in the request body is determined by\nprotos JSON encoding:\n\nHTTP | gRPC\n-----|-----\n`PATCH /v1/messages/123456 { \"text\": \"Hi!\" }` | `UpdateMessage(message_id: \"123456\" message { text: \"Hi!\" })`\n\nThe special name `*` can be used in the body mapping to define that\nevery field not bound by the path template should be mapped to the\nrequest body. This enables the following alternative definition of\nthe update method:\n\n service Messaging {\n rpc UpdateMessage(Message) returns (Message) {\n option (google.api.http) = {\n patch: \"/v1/messages/{message_id}\"\n body: \"*\"\n };\n }\n }\n message Message {\n string message_id = 1;\n string text = 2;\n }\n\n\nThe following HTTP JSON to RPC mapping is enabled:\n\nHTTP | gRPC\n-----|-----\n`PATCH /v1/messages/123456 { \"text\": \"Hi!\" }` | `UpdateMessage(message_id: \"123456\" text: \"Hi!\")`\n\nNote that when using `*` in the body mapping, it is not possible to\nhave HTTP parameters, as all fields not bound by the path end in\nthe body. This makes this option more rarely used in practice when\ndefining REST APIs. The common usage of `*` is in custom methods\nwhich don't use the URL at all for transferring data.\n\nIt is possible to define multiple HTTP methods for one RPC by using\nthe `additional_bindings` option. Example:\n\n service Messaging {\n rpc GetMessage(GetMessageRequest) returns (Message) {\n option (google.api.http) = {\n get: \"/v1/messages/{message_id}\"\n additional_bindings {\n get: \"/v1/users/{user_id}/messages/{message_id}\"\n }\n };\n }\n }\n message GetMessageRequest {\n string message_id = 1;\n string user_id = 2;\n }\n\nThis enables the following two alternative HTTP JSON to RPC mappings:\n\nHTTP | gRPC\n-----|-----\n`GET /v1/messages/123456` | `GetMessage(message_id: \"123456\")`\n`GET /v1/users/me/messages/123456` | `GetMessage(user_id: \"me\" message_id: \"123456\")`\n\n## Rules for HTTP mapping\n\n1. Leaf request fields (recursive expansion nested messages in the request\n message) are classified into three categories:\n - Fields referred by the path template. They are passed via the URL path.\n - Fields referred by the HttpRule.body. They are passed via the HTTP\n request body.\n - All other fields are passed via the URL query parameters, and the\n parameter name is the field path in the request message. A repeated\n field can be represented as multiple query parameters under the same\n name.\n 2. If HttpRule.body is \"*\", there is no URL query parameter, all fields\n are passed via URL path and HTTP request body.\n 3. If HttpRule.body is omitted, there is no HTTP request body, all\n fields are passed via URL path and URL query parameters.\n\n### Path template syntax\n\n Template = \"/\" Segments [ Verb ] ;\n Segments = Segment { \"/\" Segment } ;\n Segment = \"*\" | \"**\" | LITERAL | Variable ;\n Variable = \"{\" FieldPath [ \"=\" Segments ] \"}\" ;\n FieldPath = IDENT { \".\" IDENT } ;\n Verb = \":\" LITERAL ;\n\nThe syntax `*` matches a single URL path segment. The syntax `**` matches\nzero or more URL path segments, which must be the last part of the URL path\nexcept the `Verb`.\n\nThe syntax `Variable` matches part of the URL path as specified by its\ntemplate. A variable template must not contain other variables. If a variable\nmatches a single path segment, its template may be omitted, e.g. `{var}`\nis equivalent to `{var=*}`.\n\nThe syntax `LITERAL` matches literal text in the URL path. If the `LITERAL`\ncontains any reserved character, such characters should be percent-encoded\nbefore the matching.\n\nIf a variable contains exactly one path segment, such as `\"{var}\"` or\n`\"{var=*}\"`, when such a variable is expanded into a URL path on the client\nside, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The\nserver side does the reverse decoding. Such variables show up in the\n[Discovery Document](https://developers.google.com/discovery/v1/reference/apis)\nas `{var}`.\n\nIf a variable contains multiple path segments, such as `\"{var=foo/*}\"`\nor `\"{var=**}\"`, when such a variable is expanded into a URL path on the\nclient side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded.\nThe server side does the reverse decoding, except \"%2F\" and \"%2f\" are left\nunchanged. Such variables show up in the\n[Discovery Document](https://developers.google.com/discovery/v1/reference/apis)\nas `{+var}`.\n\n## Using gRPC API Service Configuration\n\ngRPC API Service Configuration (service config) is a configuration language\nfor configuring a gRPC service to become a user-facing product. The\nservice config is simply the YAML representation of the `google.api.Service`\nproto message.\n\nAs an alternative to annotating your proto file, you can configure gRPC\ntranscoding in your service config YAML files. You do this by specifying a\n`HttpRule` that maps the gRPC method to a REST endpoint, achieving the same\neffect as the proto annotation. This can be particularly useful if you\nhave a proto that is reused in multiple services. Note that any transcoding\nspecified in the service config will override any matching transcoding\nconfiguration in the proto.\n\nExample:\n\n http:\n rules:\n # Selects a gRPC method and applies HttpRule to it.\n - selector: example.v1.Messaging.GetMessage\n get: /v1/messages/{message_id}/{sub.subfield}\n\n## Special notes\n\nWhen gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the\nproto to JSON conversion must follow the [proto3\nspecification](https://developers.google.com/protocol-buffers/docs/proto3#json).\n\nWhile the single segment variable follows the semantics of\n[RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String\nExpansion, the multi segment variable **does not** follow RFC 6570 Section\n3.2.3 Reserved Expansion. The reason is that the Reserved Expansion\ndoes not expand special characters like `?` and `#`, which would lead\nto invalid URLs. As the result, gRPC Transcoding uses a custom encoding\nfor multi segment variables.\n\nThe path variables **must not** refer to any repeated or mapped field,\nbecause client libraries are not capable of handling such variable expansion.\n\nThe path variables **must not** capture the leading \"/\" character. The reason\nis that the most common use case \"{var}\" does not capture the leading \"/\"\ncharacter. For consistency, all path variables must share the same behavior.\n\nRepeated message fields must not be mapped to URL query parameters, because\nno client library can support such complicated mapping.\n\nIf an API needs to use a JSON array for request or response body, it can map\nthe request or response body to a repeated field. However, some gRPC\nTranscoding implementations may not support this feature.", + "description": "# gRPC Transcoding\n\ngRPC Transcoding is a feature for mapping between a gRPC method and one or\nmore HTTP REST endpoints. It allows developers to build a single API service\nthat supports both gRPC APIs and REST APIs. Many systems, including [Google\nAPIs](https://github.com/googleapis/googleapis),\n[Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC\nGateway](https://github.com/grpc-ecosystem/grpc-gateway),\nand [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature\nand use it for large scale production services.\n\n`HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies\nhow different portions of the gRPC request message are mapped to the URL\npath, URL query parameters, and HTTP request body. It also controls how the\ngRPC response message is mapped to the HTTP response body. `HttpRule` is\ntypically specified as an `google.api.http` annotation on the gRPC method.\n\nEach mapping specifies a URL path template and an HTTP method. The path\ntemplate may refer to one or more fields in the gRPC request message, as long\nas each field is a non-repeated field with a primitive (non-message) type.\nThe path template controls how fields of the request message are mapped to\nthe URL path.\n\nExample:\n\n service Messaging {\n rpc GetMessage(GetMessageRequest) returns (Message) {\n option (google.api.http) = {\n get: \"/v1/{name=messages/*}\"\n };\n }\n }\n message GetMessageRequest {\n string name = 1; // Mapped to URL path.\n }\n message Message {\n string text = 1; // The resource content.\n }\n\nThis enables an HTTP REST to gRPC mapping as below:\n\nHTTP | gRPC\n-----|-----\n`GET /v1/messages/123456` | `GetMessage(name: \"messages/123456\")`\n\nAny fields in the request message which are not bound by the path template\nautomatically become HTTP query parameters if there is no HTTP request body.\nFor example:\n\n service Messaging {\n rpc GetMessage(GetMessageRequest) returns (Message) {\n option (google.api.http) = {\n get:\"/v1/messages/{message_id}\"\n };\n }\n }\n message GetMessageRequest {\n message SubMessage {\n string subfield = 1;\n }\n string message_id = 1; // Mapped to URL path.\n int64 revision = 2; // Mapped to URL query parameter `revision`.\n SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`.\n }\n\nThis enables a HTTP JSON to RPC mapping as below:\n\nHTTP | gRPC\n-----|-----\n`GET /v1/messages/123456?revision=2\u0026sub.subfield=foo` |\n`GetMessage(message_id: \"123456\" revision: 2 sub: SubMessage(subfield:\n\"foo\"))`\n\nNote that fields which are mapped to URL query parameters must have a\nprimitive type or a repeated primitive type or a non-repeated message type.\nIn the case of a repeated type, the parameter can be repeated in the URL\nas `...?param=A\u0026param=B`. In the case of a message type, each field of the\nmessage is mapped to a separate parameter, such as\n`...?foo.a=A\u0026foo.b=B\u0026foo.c=C`.\n\nFor HTTP methods that allow a request body, the `body` field\nspecifies the mapping. Consider a REST update method on the\nmessage resource collection:\n\n service Messaging {\n rpc UpdateMessage(UpdateMessageRequest) returns (Message) {\n option (google.api.http) = {\n patch: \"/v1/messages/{message_id}\"\n body: \"message\"\n };\n }\n }\n message UpdateMessageRequest {\n string message_id = 1; // mapped to the URL\n Message message = 2; // mapped to the body\n }\n\nThe following HTTP JSON to RPC mapping is enabled, where the\nrepresentation of the JSON in the request body is determined by\nprotos JSON encoding:\n\nHTTP | gRPC\n-----|-----\n`PATCH /v1/messages/123456 { \"text\": \"Hi!\" }` | `UpdateMessage(message_id:\n\"123456\" message { text: \"Hi!\" })`\n\nThe special name `*` can be used in the body mapping to define that\nevery field not bound by the path template should be mapped to the\nrequest body. This enables the following alternative definition of\nthe update method:\n\n service Messaging {\n rpc UpdateMessage(Message) returns (Message) {\n option (google.api.http) = {\n patch: \"/v1/messages/{message_id}\"\n body: \"*\"\n };\n }\n }\n message Message {\n string message_id = 1;\n string text = 2;\n }\n\n\nThe following HTTP JSON to RPC mapping is enabled:\n\nHTTP | gRPC\n-----|-----\n`PATCH /v1/messages/123456 { \"text\": \"Hi!\" }` | `UpdateMessage(message_id:\n\"123456\" text: \"Hi!\")`\n\nNote that when using `*` in the body mapping, it is not possible to\nhave HTTP parameters, as all fields not bound by the path end in\nthe body. This makes this option more rarely used in practice when\ndefining REST APIs. The common usage of `*` is in custom methods\nwhich don't use the URL at all for transferring data.\n\nIt is possible to define multiple HTTP methods for one RPC by using\nthe `additional_bindings` option. Example:\n\n service Messaging {\n rpc GetMessage(GetMessageRequest) returns (Message) {\n option (google.api.http) = {\n get: \"/v1/messages/{message_id}\"\n additional_bindings {\n get: \"/v1/users/{user_id}/messages/{message_id}\"\n }\n };\n }\n }\n message GetMessageRequest {\n string message_id = 1;\n string user_id = 2;\n }\n\nThis enables the following two alternative HTTP JSON to RPC mappings:\n\nHTTP | gRPC\n-----|-----\n`GET /v1/messages/123456` | `GetMessage(message_id: \"123456\")`\n`GET /v1/users/me/messages/123456` | `GetMessage(user_id: \"me\" message_id:\n\"123456\")`\n\n## Rules for HTTP mapping\n\n1. Leaf request fields (recursive expansion nested messages in the request\n message) are classified into three categories:\n - Fields referred by the path template. They are passed via the URL path.\n - Fields referred by the HttpRule.body. They are passed via the HTTP\n request body.\n - All other fields are passed via the URL query parameters, and the\n parameter name is the field path in the request message. A repeated\n field can be represented as multiple query parameters under the same\n name.\n 2. If HttpRule.body is \"*\", there is no URL query parameter, all fields\n are passed via URL path and HTTP request body.\n 3. If HttpRule.body is omitted, there is no HTTP request body, all\n fields are passed via URL path and URL query parameters.\n\n### Path template syntax\n\n Template = \"/\" Segments [ Verb ] ;\n Segments = Segment { \"/\" Segment } ;\n Segment = \"*\" | \"**\" | LITERAL | Variable ;\n Variable = \"{\" FieldPath [ \"=\" Segments ] \"}\" ;\n FieldPath = IDENT { \".\" IDENT } ;\n Verb = \":\" LITERAL ;\n\nThe syntax `*` matches a single URL path segment. The syntax `**` matches\nzero or more URL path segments, which must be the last part of the URL path\nexcept the `Verb`.\n\nThe syntax `Variable` matches part of the URL path as specified by its\ntemplate. A variable template must not contain other variables. If a variable\nmatches a single path segment, its template may be omitted, e.g. `{var}`\nis equivalent to `{var=*}`.\n\nThe syntax `LITERAL` matches literal text in the URL path. If the `LITERAL`\ncontains any reserved character, such characters should be percent-encoded\nbefore the matching.\n\nIf a variable contains exactly one path segment, such as `\"{var}\"` or\n`\"{var=*}\"`, when such a variable is expanded into a URL path on the client\nside, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The\nserver side does the reverse decoding. Such variables show up in the\n[Discovery\nDocument](https://developers.google.com/discovery/v1/reference/apis) as\n`{var}`.\n\nIf a variable contains multiple path segments, such as `\"{var=foo/*}\"`\nor `\"{var=**}\"`, when such a variable is expanded into a URL path on the\nclient side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded.\nThe server side does the reverse decoding, except \"%2F\" and \"%2f\" are left\nunchanged. Such variables show up in the\n[Discovery\nDocument](https://developers.google.com/discovery/v1/reference/apis) as\n`{+var}`.\n\n## Using gRPC API Service Configuration\n\ngRPC API Service Configuration (service config) is a configuration language\nfor configuring a gRPC service to become a user-facing product. The\nservice config is simply the YAML representation of the `google.api.Service`\nproto message.\n\nAs an alternative to annotating your proto file, you can configure gRPC\ntranscoding in your service config YAML files. You do this by specifying a\n`HttpRule` that maps the gRPC method to a REST endpoint, achieving the same\neffect as the proto annotation. This can be particularly useful if you\nhave a proto that is reused in multiple services. Note that any transcoding\nspecified in the service config will override any matching transcoding\nconfiguration in the proto.\n\nExample:\n\n http:\n rules:\n # Selects a gRPC method and applies HttpRule to it.\n - selector: example.v1.Messaging.GetMessage\n get: /v1/messages/{message_id}/{sub.subfield}\n\n## Special notes\n\nWhen gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the\nproto to JSON conversion must follow the [proto3\nspecification](https://developers.google.com/protocol-buffers/docs/proto3#json).\n\nWhile the single segment variable follows the semantics of\n[RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String\nExpansion, the multi segment variable **does not** follow RFC 6570 Section\n3.2.3 Reserved Expansion. The reason is that the Reserved Expansion\ndoes not expand special characters like `?` and `#`, which would lead\nto invalid URLs. As the result, gRPC Transcoding uses a custom encoding\nfor multi segment variables.\n\nThe path variables **must not** refer to any repeated or mapped field,\nbecause client libraries are not capable of handling such variable expansion.\n\nThe path variables **must not** capture the leading \"/\" character. The reason\nis that the most common use case \"{var}\" does not capture the leading \"/\"\ncharacter. For consistency, all path variables must share the same behavior.\n\nRepeated message fields must not be mapped to URL query parameters, because\nno client library can support such complicated mapping.\n\nIf an API needs to use a JSON array for request or response body, it can map\nthe request or response body to a repeated field. However, some gRPC\nTranscoding implementations may not support this feature.", "id": "HttpRule", "properties": { "additionalBindings": { @@ -1886,7 +1931,7 @@ "id": "Page", "properties": { "content": { - "description": "The Markdown content of the page. You can use \u003ccode\u003e\u0026#40;== include {path} ==\u0026#41;\u003c/code\u003e\nto include content from a Markdown file.", + "description": "The Markdown content of the page. You can use \u003ccode\u003e\u0026#40;== include {path}\n==\u0026#41;\u003c/code\u003e to include content from a Markdown file.", "type": "string" }, "name": { @@ -1904,7 +1949,7 @@ "type": "object" }, "Quota": { - "description": "Quota configuration helps to achieve fairness and budgeting in service\nusage.\n\nThe quota configuration works this way:\n- The service configuration defines a set of metrics.\n- For API calls, the quota.metric_rules maps methods to metrics with\n corresponding costs.\n- The quota.limits defines limits on the metrics, which will be used for\n quota checks at runtime.\n\nAn example quota configuration in yaml format:\n\n quota:\n limits:\n\n - name: apiWriteQpsPerProject\n metric: library.googleapis.com/write_calls\n unit: \"1/min/{project}\" # rate limit for consumer projects\n values:\n STANDARD: 10000\n\n\n # The metric rules bind all methods to the read_calls metric,\n # except for the UpdateBook and DeleteBook methods. These two methods\n # are mapped to the write_calls metric, with the UpdateBook method\n # consuming at twice rate as the DeleteBook method.\n metric_rules:\n - selector: \"*\"\n metric_costs:\n library.googleapis.com/read_calls: 1\n - selector: google.example.library.v1.LibraryService.UpdateBook\n metric_costs:\n library.googleapis.com/write_calls: 2\n - selector: google.example.library.v1.LibraryService.DeleteBook\n metric_costs:\n library.googleapis.com/write_calls: 1\n\n Corresponding Metric definition:\n\n metrics:\n - name: library.googleapis.com/read_calls\n display_name: Read requests\n metric_kind: DELTA\n value_type: INT64\n\n - name: library.googleapis.com/write_calls\n display_name: Write requests\n metric_kind: DELTA\n value_type: INT64", + "description": "Quota configuration helps to achieve fairness and budgeting in service\nusage.\n\nThe metric based quota configuration works this way:\n- The service configuration defines a set of metrics.\n- For API calls, the quota.metric_rules maps methods to metrics with\n corresponding costs.\n- The quota.limits defines limits on the metrics, which will be used for\n quota checks at runtime.\n\nAn example quota configuration in yaml format:\n\n quota:\n limits:\n\n - name: apiWriteQpsPerProject\n metric: library.googleapis.com/write_calls\n unit: \"1/min/{project}\" # rate limit for consumer projects\n values:\n STANDARD: 10000\n\n\n # The metric rules bind all methods to the read_calls metric,\n # except for the UpdateBook and DeleteBook methods. These two methods\n # are mapped to the write_calls metric, with the UpdateBook method\n # consuming at twice rate as the DeleteBook method.\n metric_rules:\n - selector: \"*\"\n metric_costs:\n library.googleapis.com/read_calls: 1\n - selector: google.example.library.v1.LibraryService.UpdateBook\n metric_costs:\n library.googleapis.com/write_calls: 2\n - selector: google.example.library.v1.LibraryService.DeleteBook\n metric_costs:\n library.googleapis.com/write_calls: 1\n\n Corresponding Metric definition:\n\n metrics:\n - name: library.googleapis.com/read_calls\n display_name: Read requests\n metric_kind: DELTA\n value_type: INT64\n\n - name: library.googleapis.com/write_calls\n display_name: Write requests\n metric_kind: DELTA\n value_type: INT64\n\n", "id": "Quota", "properties": { "limits": { @@ -1978,6 +2023,29 @@ }, "type": "object" }, + "QuotaOverride": { + "description": "A quota override", + "id": "QuotaOverride", + "properties": { + "dimensions": { + "additionalProperties": { + "type": "string" + }, + "description": "If this map is nonempty, then this override applies only to specific values\nfor dimensions defined in the limit unit.\n\nFor example, an override on a limit with the unit 1/{project}/{region}\ncould contain an entry with the key \"region\" and the value \"us-east-1\";\nthe override is only applied to quota consumed in that region.\n\nThis map has the following restrictions:\n- Keys that are not defined in the limit's unit are not valid keys.\n Any string appearing in {brackets} in the unit (besides {project} or\n {user}) is a defined key.\n- \"project\" is not a valid key; the project is already specified in\n the parent resource name.\n- \"user\" is not a valid key; the API does not support quota overrides\n that apply only to a specific user.\n- If \"region\" appears as a key, its value must be a valid Cloud region.\n- If \"zone\" appears as a key, its value must be a valid Cloud zone.\n- If any valid key other than \"region\" or \"zone\" appears in the map, then\n all valid keys other than \"region\" or \"zone\" must also appear in the map.", + "type": "object" + }, + "name": { + "description": "The resource name of the override.\nThis name is generated by the server when the override is created.\n\nExample names would be:\n`projects/123/services/compute.googleapis.com/consumerQuotaMetrics/compute.googleapis.com%2Fcpus/limits/%2Fproject%2Fregion/adminOverrides/4a3f2c1d`\n`projects/123/services/compute.googleapis.com/consumerQuotaMetrics/compute.googleapis.com%2Fcpus/limits/%2Fproject%2Fregion/consumerOverrides/4a3f2c1d`\n\nThe resource name is intended to be opaque and should not be parsed for\nits component strings, since its representation could change in the future.", + "type": "string" + }, + "overrideValue": { + "description": "The overriding quota limit value.\nCan be any nonnegative integer, or -1 (unlimited quota).", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, "SourceContext": { "description": "`SourceContext` represents information about the source of a\nprotobuf element, like the file in which it is defined.", "id": "SourceContext", @@ -2008,7 +2076,7 @@ "type": "object" }, "Status": { - "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", + "description": "The `Status` type defines a logical error model that is suitable for\ndifferent programming environments, including REST APIs and RPC APIs. It is\nused by [gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error\nmessage, and error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", "id": "Status", "properties": { "code": { diff --git a/vendor/google.golang.org/api/serviceusage/v1/serviceusage-gen.go b/vendor/google.golang.org/api/serviceusage/v1/serviceusage-gen.go index ef110e80..f192bcc4 100644 --- a/vendor/google.golang.org/api/serviceusage/v1/serviceusage-gen.go +++ b/vendor/google.golang.org/api/serviceusage/v1/serviceusage-gen.go @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. All rights reserved. +// Copyright 2019 Google LLC. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. @@ -6,13 +6,39 @@ // Package serviceusage provides access to the Service Usage API. // -// See https://cloud.google.com/service-usage/ +// For product documentation, see: https://cloud.google.com/service-usage/ +// +// Creating a client // // Usage example: // // import "google.golang.org/api/serviceusage/v1" // ... -// serviceusageService, err := serviceusage.New(oauthHttpClient) +// ctx := context.Background() +// serviceusageService, err := serviceusage.NewService(ctx) +// +// In this example, Google Application Default Credentials are used for authentication. +// +// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// +// Other authentication options +// +// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// +// serviceusageService, err := serviceusage.NewService(ctx, option.WithScopes(serviceusage.ServiceManagementScope)) +// +// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// +// serviceusageService, err := serviceusage.NewService(ctx, option.WithAPIKey("AIza...")) +// +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// +// config := &oauth2.Config{...} +// // ... +// token, err := config.Exchange(ctx, ...) +// serviceusageService, err := serviceusage.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) +// +// See https://godoc.org/google.golang.org/api/option/ for details on options. package serviceusage // import "google.golang.org/api/serviceusage/v1" import ( @@ -29,6 +55,8 @@ import ( gensupport "google.golang.org/api/gensupport" googleapi "google.golang.org/api/googleapi" + option "google.golang.org/api/option" + htransport "google.golang.org/api/transport/http" ) // Always reference these packages, just in case the auto-generated code @@ -62,6 +90,34 @@ const ( ServiceManagementScope = "https://www.googleapis.com/auth/service.management" ) +// NewService creates a new Service. +func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { + scopesOption := option.WithScopes( + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/service.management", + ) + // NOTE: prepend, so we don't override user-specified scopes. + opts = append([]option.ClientOption{scopesOption}, opts...) + client, endpoint, err := htransport.NewClient(ctx, opts...) + if err != nil { + return nil, err + } + s, err := New(client) + if err != nil { + return nil, err + } + if endpoint != "" { + s.BasePath = endpoint + } + return s, nil +} + +// New creates a new Service. It uses the provided http.Client for requests. +// +// Deprecated: please use NewService instead. +// To provide a custom HTTP client, use option.WithHTTPClient. +// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. func New(client *http.Client) (*Service, error) { if client == nil { return nil, errors.New("client is nil") @@ -205,11 +261,12 @@ func (s *Api) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// AuthProvider: Configuration for an anthentication provider, including +// AuthProvider: Configuration for an authentication provider, including // support for -// [JSON Web Token -// (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32) -// . +// [JSON Web +// Token +// (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-tok +// en-32). type AuthProvider struct { // Audiences: The list of // JWT @@ -256,18 +313,21 @@ type AuthProvider struct { Issuer string `json:"issuer,omitempty"` // JwksUri: URL of the provider's public key set to validate signature - // of the JWT. See + // of the JWT. + // See // [OpenID - // Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html# - // ProviderMetadata). + // Discovery](https://openid.net/specs/openid-connect-discove + // ry-1_0.html#ProviderMetadata). // Optional if the key set document: // - can be retrieved from // [OpenID - // Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html // - // of the issuer. - // - can be inferred from the email domain of the issuer (e.g. a Google - // service account). + // Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html + // of + // the issuer. + // - can be inferred from the email domain of the issuer (e.g. a + // Google + // service account). // // Example: https://www.googleapis.com/oauth2/v1/certs JwksUri string `json:"jwksUri,omitempty"` @@ -297,9 +357,10 @@ func (s *AuthProvider) MarshalJSON() ([]byte, error) { // AuthRequirement: User-defined authentication requirements, including // support for -// [JSON Web Token -// (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32) -// . +// [JSON Web +// Token +// (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-tok +// en-32). type AuthRequirement struct { // Audiences: NOTE: This will be deprecated soon, once // AuthProvider.audiences is @@ -545,6 +606,10 @@ type BackendRule struct { // seconds. Deadline float64 `json:"deadline,omitempty"` + // JwtAudience: The JWT audience is used when generating a JWT id token + // for the backend. + JwtAudience string `json:"jwtAudience,omitempty"` + // MinDeadline: Minimum deadline in seconds needed for this method. // Calls having deadline // value lower than this will be rejected. @@ -555,6 +620,64 @@ type BackendRule struct { // operation. The default is no deadline. OperationDeadline float64 `json:"operationDeadline,omitempty"` + // Possible values: + // "PATH_TRANSLATION_UNSPECIFIED" + // "CONSTANT_ADDRESS" - Use the backend address as-is, with no + // modification to the path. If the + // URL pattern contains variables, the variable names and values will + // be + // appended to the query string. If a query string parameter and a + // URL + // pattern variable have the same name, this may result in duplicate + // keys in + // the query string. + // + // # Examples + // + // Given the following operation config: + // + // Method path: /api/company/{cid}/user/{uid} + // Backend address: + // https://example.cloudfunctions.net/getUser + // + // Requests to the following request paths will call the backend at + // the + // translated path: + // + // Request path: /api/company/widgetworks/user/johndoe + // Translated: + // + // https://example.cloudfunctions.net/getUser?cid=widgetworks&uid=johndoe + // + // Request path: /api/company/widgetworks/user/johndoe?timezone=EST + // Translated: + // + // https://example.cloudfunctions.net/getUser?timezone=EST&cid=widgetworks&uid=johndoe + // "APPEND_PATH_TO_ADDRESS" - The request path will be appended to the + // backend address. + // + // # Examples + // + // Given the following operation config: + // + // Method path: /api/company/{cid}/user/{uid} + // Backend address: https://example.appspot.com + // + // Requests to the following request paths will call the backend at + // the + // translated path: + // + // Request path: /api/company/widgetworks/user/johndoe + // Translated: + // + // https://example.appspot.com/api/company/widgetworks/user/johndoe + // + // Request path: /api/company/widgetworks/user/johndoe?timezone=EST + // Translated: + // + // https://example.appspot.com/api/company/widgetworks/user/johndoe?timezone=EST + PathTranslation string `json:"pathTranslation,omitempty"` + // Selector: Selects the methods to which this rule applies. // // Refer to selector for syntax details. @@ -601,6 +724,64 @@ func (s *BackendRule) UnmarshalJSON(data []byte) error { return nil } +// BatchCreateAdminOverridesResponse: Response message for +// BatchCreateAdminOverrides +type BatchCreateAdminOverridesResponse struct { + // Overrides: The overrides that were created. + Overrides []*QuotaOverride `json:"overrides,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Overrides") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Overrides") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *BatchCreateAdminOverridesResponse) MarshalJSON() ([]byte, error) { + type NoMethod BatchCreateAdminOverridesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// BatchCreateConsumerOverridesResponse: Response message for +// BatchCreateConsumerOverrides +type BatchCreateConsumerOverridesResponse struct { + // Overrides: The overrides that were created. + Overrides []*QuotaOverride `json:"overrides,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Overrides") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Overrides") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *BatchCreateConsumerOverridesResponse) MarshalJSON() ([]byte, error) { + type NoMethod BatchCreateConsumerOverridesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // BatchEnableServicesRequest: Request message for the // `BatchEnableServices` method. type BatchEnableServicesRequest struct { @@ -1263,8 +1444,8 @@ func (s *Documentation) MarshalJSON() ([]byte, error) { // individual API elements. type DocumentationRule struct { // DeprecationDescription: Deprecation description of the selected - // element(s). It can be provided if an - // element is marked as `deprecated`. + // element(s). It can be provided if + // an element is marked as `deprecated`. DeprecationDescription string `json:"deprecationDescription,omitempty"` // Description: Description of the selected API(s). @@ -1277,10 +1458,10 @@ type DocumentationRule struct { // Wildcards are only allowed at the end and for a whole component of // the // qualified name, i.e. "foo.*" is ok, but not "foo.b*" or "foo.*.bar". - // To - // specify a default for all applicable elements, the whole pattern - // "*" - // is used. + // A + // wildcard will match one or more components. To specify a default for + // all + // applicable elements, the whole pattern "*" is used. Selector string `json:"selector,omitempty"` // ForceSendFields is a list of field names (e.g. @@ -1446,11 +1627,13 @@ type Endpoint struct { // Target: The specification of an Internet routable address of API // frontend that will - // handle requests to this [API - // Endpoint](https://cloud.google.com/apis/design/glossary). - // It should be either a valid IPv4 address or a fully-qualified domain - // name. - // For example, "8.8.8.8" or "myservice.appspot.com". + // handle requests to this + // [API + // Endpoint](https://cloud.google.com/apis/design/glossary). It should + // be + // either a valid IPv4 address or a fully-qualified domain name. For + // example, + // "8.8.8.8" or "myservice.appspot.com". Target string `json:"target,omitempty"` // ForceSendFields is a list of field names (e.g. "Aliases") to @@ -1792,8 +1975,12 @@ type GoogleApiService struct { // Monitoring: Monitoring configuration. Monitoring *Monitoring `json:"monitoring,omitempty"` - // Name: The DNS address at which this service is available, - // e.g. `calendar.googleapis.com`. + // Name: The service name, which is a DNS-like logical identifier for + // the + // service, such as `calendar.googleapis.com`. The service + // name + // typically goes through DNS verification to make sure the owner + // of the service also owns the DNS name. Name string `json:"name,omitempty"` // ProducerProjectId: The Google project that owns this service. @@ -2024,7 +2211,7 @@ func (s *GoogleApiServiceusageV1ServiceConfig) MarshalJSON() ([]byte, error) { // HttpRule, each specifying the mapping of an RPC method // to one or more HTTP REST API methods. type Http struct { - // FullyDecodeReservedExpansion: When set to true, URL path parmeters + // FullyDecodeReservedExpansion: When set to true, URL path parameters // will be fully URI-decoded except in // cases of single segment matches in reserved expansion, where "%2F" // will be @@ -2155,9 +2342,11 @@ func (s *Http) MarshalJSON() ([]byte, error) { // // HTTP | gRPC // -----|----- -// `GET /v1/messages/123456?revision=2&sub.subfield=foo` | +// `GET /v1/messages/123456?revision=2&sub.subfield=foo` +// | // `GetMessage(message_id: "123456" revision: 2 sub: -// SubMessage(subfield: "foo"))` +// SubMessage(subfield: +// "foo"))` // // Note that fields which are mapped to URL query parameters must have // a @@ -2198,7 +2387,8 @@ func (s *Http) MarshalJSON() ([]byte, error) { // HTTP | gRPC // -----|----- // `PATCH /v1/messages/123456 { "text": "Hi!" }` | -// `UpdateMessage(message_id: "123456" message { text: "Hi!" })` +// `UpdateMessage(message_id: +// "123456" message { text: "Hi!" })` // // The special name `*` can be used in the body mapping to define // that @@ -2227,7 +2417,8 @@ func (s *Http) MarshalJSON() ([]byte, error) { // HTTP | gRPC // -----|----- // `PATCH /v1/messages/123456 { "text": "Hi!" }` | -// `UpdateMessage(message_id: "123456" text: "Hi!")` +// `UpdateMessage(message_id: +// "123456" text: "Hi!")` // // Note that when using `*` in the body mapping, it is not possible // to @@ -2264,7 +2455,8 @@ func (s *Http) MarshalJSON() ([]byte, error) { // -----|----- // `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` // `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" -// message_id: "123456")` +// message_id: +// "123456")` // // ## Rules for HTTP mapping // @@ -2327,9 +2519,9 @@ func (s *Http) MarshalJSON() ([]byte, error) { // server side does the reverse decoding. Such variables show up in // the // [Discovery -// Document](https://developers.google.com/discovery/v1/reference/apis) -// a -// s `{var}`. +// Document](https://developers.google.com/discovery/v1/re +// ference/apis) as +// `{var}`. // // If a variable contains multiple path segments, such as // "{var=foo/*}" @@ -2339,11 +2531,12 @@ func (s *Http) MarshalJSON() ([]byte, error) { // percent-encoded. // The server side does the reverse decoding, except "%2F" and "%2f" are // left -// unchanged. Such variables show up in the +// unchanged. Such variables show up in +// the // [Discovery -// Document](https://developers.google.com/discovery/v1/reference/apis) -// a -// s `{+var}`. +// Document](https://developers.google.com/discovery/v1/re +// ference/apis) as +// `{+var}`. // // ## Using gRPC API Service Configuration // @@ -3702,8 +3895,8 @@ func (s *Option) MarshalJSON() ([]byte, error) { // nested documentation set structure. type Page struct { // Content: The Markdown content of the page. You can use (== - // include {path} ==) - // to include content from a Markdown file. + // include {path} + // ==) to include content from a Markdown file. Content string `json:"content,omitempty"` // Name: The name of the page. It will be used as an identity of the @@ -3760,7 +3953,7 @@ func (s *Page) MarshalJSON() ([]byte, error) { // service // usage. // -// The quota configuration works this way: +// The metric based quota configuration works this way: // - The service configuration defines a set of metrics. // - For API calls, the quota.metric_rules maps methods to metrics with // corresponding costs. @@ -3809,6 +4002,8 @@ func (s *Page) MarshalJSON() ([]byte, error) { // display_name: Write requests // metric_kind: DELTA // value_type: INT64 +// +// type Quota struct { // Limits: List of `QuotaLimit` definitions for the service. Limits []*QuotaLimit `json:"limits,omitempty"` @@ -3982,6 +4177,83 @@ func (s *QuotaLimit) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// QuotaOverride: A quota override +type QuotaOverride struct { + // Dimensions: If this map is nonempty, then this override applies only + // to specific values + // for dimensions defined in the limit unit. + // + // For example, an override on a limit with the unit + // 1/{project}/{region} + // could contain an entry with the key "region" and the value + // "us-east-1"; + // the override is only applied to quota consumed in that region. + // + // This map has the following restrictions: + // - Keys that are not defined in the limit's unit are not valid keys. + // Any string appearing in {brackets} in the unit (besides {project} + // or + // {user}) is a defined key. + // - "project" is not a valid key; the project is already specified in + // the parent resource name. + // - "user" is not a valid key; the API does not support quota + // overrides + // that apply only to a specific user. + // - If "region" appears as a key, its value must be a valid Cloud + // region. + // - If "zone" appears as a key, its value must be a valid Cloud zone. + // - If any valid key other than "region" or "zone" appears in the map, + // then + // all valid keys other than "region" or "zone" must also appear in + // the map. + Dimensions map[string]string `json:"dimensions,omitempty"` + + // Name: The resource name of the override. + // This name is generated by the server when the override is + // created. + // + // Example names would + // be: + // `projects/123/services/compute.googleapis.com/consumerQuotaMetrics + // /compute.googleapis.com%2Fcpus/limits/%2Fproject%2Fregion/adminOverrid + // es/4a3f2c1d` + // `projects/123/services/compute.googleapis.com/consumerQuo + // taMetrics/compute.googleapis.com%2Fcpus/limits/%2Fproject%2Fregion/con + // sumerOverrides/4a3f2c1d` + // + // The resource name is intended to be opaque and should not be parsed + // for + // its component strings, since its representation could change in the + // future. + Name string `json:"name,omitempty"` + + // OverrideValue: The overriding quota limit value. + // Can be any nonnegative integer, or -1 (unlimited quota). + OverrideValue int64 `json:"overrideValue,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "Dimensions") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Dimensions") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *QuotaOverride) MarshalJSON() ([]byte, error) { + type NoMethod QuotaOverride + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // SourceContext: `SourceContext` represents information about the // source of a // protobuf element, like the file in which it is defined. @@ -4044,20 +4316,20 @@ func (s *SourceInfo) MarshalJSON() ([]byte, error) { } // Status: The `Status` type defines a logical error model that is -// suitable for different -// programming environments, including REST APIs and RPC APIs. It is -// used by -// [gRPC](https://github.com/grpc). The error model is designed to -// be: +// suitable for +// different programming environments, including REST APIs and RPC APIs. +// It is +// used by [gRPC](https://github.com/grpc). The error model is designed +// to be: // // - Simple to use and understand for most users // - Flexible enough to meet unexpected needs // // # Overview // -// The `Status` message contains three pieces of data: error code, error -// message, -// and error details. The error code should be an enum value +// The `Status` message contains three pieces of data: error code, +// error +// message, and error details. The error code should be an enum value // of // google.rpc.Code, but it may accept additional error codes if needed. // The @@ -5170,8 +5442,6 @@ type ServicesBatchEnableCall struct { // atomic: if enabling // any service fails, then the entire batch fails, and no state changes // occur. -// -// Operation func (r *ServicesService) BatchEnable(parent string, batchenableservicesrequest *BatchEnableServicesRequest) *ServicesBatchEnableCall { c := &ServicesBatchEnableCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -5269,7 +5539,7 @@ func (c *ServicesBatchEnableCall) Do(opts ...googleapi.CallOption) (*Operation, } return ret, nil // { - // "description": "Enable multiple services on a project. The operation is atomic: if enabling\nany service fails, then the entire batch fails, and no state changes occur.\n\nOperation\u003cresponse: BatchEnableServicesResponse\u003e", + // "description": "Enable multiple services on a project. The operation is atomic: if enabling\nany service fails, then the entire batch fails, and no state changes occur.", // "flatPath": "v1/{v1Id}/{v1Id1}/services:batchEnable", // "httpMethod": "POST", // "id": "serviceusage.services.batchEnable", @@ -5322,8 +5592,6 @@ type ServicesDisableCall struct { // currently enabled. Callers will receive a `FAILED_PRECONDITION` // status if // the target service is not currently enabled. -// -// Operation func (r *ServicesService) Disable(name string, disableservicerequest *DisableServiceRequest) *ServicesDisableCall { c := &ServicesDisableCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -5421,7 +5689,7 @@ func (c *ServicesDisableCall) Do(opts ...googleapi.CallOption) (*Operation, erro } return ret, nil // { - // "description": "Disable a service so that it can no longer be used with a project.\nThis prevents unintended usage that may cause unexpected billing\ncharges or security leaks.\n\nIt is not valid to call the disable method on a service that is not\ncurrently enabled. Callers will receive a `FAILED_PRECONDITION` status if\nthe target service is not currently enabled.\n\nOperation\u003cresponse: DisableServiceResponse\u003e", + // "description": "Disable a service so that it can no longer be used with a project.\nThis prevents unintended usage that may cause unexpected billing\ncharges or security leaks.\n\nIt is not valid to call the disable method on a service that is not\ncurrently enabled. Callers will receive a `FAILED_PRECONDITION` status if\nthe target service is not currently enabled.", // "flatPath": "v1/{v1Id}/{v1Id1}/services/{servicesId}:disable", // "httpMethod": "POST", // "id": "serviceusage.services.disable", @@ -5463,10 +5731,7 @@ type ServicesEnableCall struct { header_ http.Header } -// Enable: Enable a service so that it can be used with a -// project. -// -// Operation +// Enable: Enable a service so that it can be used with a project. func (r *ServicesService) Enable(name string, enableservicerequest *EnableServiceRequest) *ServicesEnableCall { c := &ServicesEnableCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -5564,7 +5829,7 @@ func (c *ServicesEnableCall) Do(opts ...googleapi.CallOption) (*Operation, error } return ret, nil // { - // "description": "Enable a service so that it can be used with a project.\n\nOperation\u003cresponse: EnableServiceResponse\u003e", + // "description": "Enable a service so that it can be used with a project.", // "flatPath": "v1/{v1Id}/{v1Id1}/services/{servicesId}:enable", // "httpMethod": "POST", // "id": "serviceusage.services.enable", diff --git a/vendor/google.golang.org/api/sourcerepo/v1/sourcerepo-api.json b/vendor/google.golang.org/api/sourcerepo/v1/sourcerepo-api.json index c4878bb3..f04254c0 100644 --- a/vendor/google.golang.org/api/sourcerepo/v1/sourcerepo-api.json +++ b/vendor/google.golang.org/api/sourcerepo/v1/sourcerepo-api.json @@ -415,7 +415,7 @@ } } }, - "revision": "20181106", + "revision": "20190221", "rootUrl": "https://sourcerepo.googleapis.com/", "schemas": { "AuditConfig": { @@ -475,7 +475,7 @@ "description": "Unimplemented. The condition that is associated with this binding.\nNOTE: an unsatisfied condition will not allow user access via current\nbinding. Different bindings, including their conditions, are examined\nindependently." }, "members": { - "description": "Specifies the identities requesting access for a Cloud Platform resource.\n`members` can have the following values:\n\n* `allUsers`: A special identifier that represents anyone who is\n on the internet; with or without a Google account.\n\n* `allAuthenticatedUsers`: A special identifier that represents anyone\n who is authenticated with a Google account or a service account.\n\n* `user:{emailid}`: An email address that represents a specific Google\n account. For example, `alice@gmail.com` .\n\n\n* `serviceAccount:{emailid}`: An email address that represents a service\n account. For example, `my-other-app@appspot.gserviceaccount.com`.\n\n* `group:{emailid}`: An email address that represents a Google group.\n For example, `admins@example.com`.\n\n\n* `domain:{domain}`: A Google Apps domain name that represents all the\n users of that domain. For example, `google.com` or `example.com`.\n\n", + "description": "Specifies the identities requesting access for a Cloud Platform resource.\n`members` can have the following values:\n\n* `allUsers`: A special identifier that represents anyone who is\n on the internet; with or without a Google account.\n\n* `allAuthenticatedUsers`: A special identifier that represents anyone\n who is authenticated with a Google account or a service account.\n\n* `user:{emailid}`: An email address that represents a specific Google\n account. For example, `alice@gmail.com` .\n\n\n* `serviceAccount:{emailid}`: An email address that represents a service\n account. For example, `my-other-app@appspot.gserviceaccount.com`.\n\n* `group:{emailid}`: An email address that represents a Google group.\n For example, `admins@example.com`.\n\n\n* `domain:{domain}`: The G Suite domain (primary) that represents all the\n users of that domain. For example, `google.com` or `example.com`.\n\n", "items": { "type": "string" }, diff --git a/vendor/google.golang.org/api/sourcerepo/v1/sourcerepo-gen.go b/vendor/google.golang.org/api/sourcerepo/v1/sourcerepo-gen.go index 256ad9cb..f6cb25e5 100644 --- a/vendor/google.golang.org/api/sourcerepo/v1/sourcerepo-gen.go +++ b/vendor/google.golang.org/api/sourcerepo/v1/sourcerepo-gen.go @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. All rights reserved. +// Copyright 2019 Google LLC. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. @@ -6,13 +6,39 @@ // Package sourcerepo provides access to the Cloud Source Repositories API. // -// See https://cloud.google.com/source-repositories/docs/apis +// For product documentation, see: https://cloud.google.com/source-repositories/docs/apis +// +// Creating a client // // Usage example: // // import "google.golang.org/api/sourcerepo/v1" // ... -// sourcerepoService, err := sourcerepo.New(oauthHttpClient) +// ctx := context.Background() +// sourcerepoService, err := sourcerepo.NewService(ctx) +// +// In this example, Google Application Default Credentials are used for authentication. +// +// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// +// Other authentication options +// +// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// +// sourcerepoService, err := sourcerepo.NewService(ctx, option.WithScopes(sourcerepo.SourceReadWriteScope)) +// +// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// +// sourcerepoService, err := sourcerepo.NewService(ctx, option.WithAPIKey("AIza...")) +// +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// +// config := &oauth2.Config{...} +// // ... +// token, err := config.Exchange(ctx, ...) +// sourcerepoService, err := sourcerepo.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) +// +// See https://godoc.org/google.golang.org/api/option/ for details on options. package sourcerepo // import "google.golang.org/api/sourcerepo/v1" import ( @@ -29,6 +55,8 @@ import ( gensupport "google.golang.org/api/gensupport" googleapi "google.golang.org/api/googleapi" + option "google.golang.org/api/option" + htransport "google.golang.org/api/transport/http" ) // Always reference these packages, just in case the auto-generated code @@ -65,6 +93,35 @@ const ( SourceReadWriteScope = "https://www.googleapis.com/auth/source.read_write" ) +// NewService creates a new Service. +func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { + scopesOption := option.WithScopes( + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/source.full_control", + "https://www.googleapis.com/auth/source.read_only", + "https://www.googleapis.com/auth/source.read_write", + ) + // NOTE: prepend, so we don't override user-specified scopes. + opts = append([]option.ClientOption{scopesOption}, opts...) + client, endpoint, err := htransport.NewClient(ctx, opts...) + if err != nil { + return nil, err + } + s, err := New(client) + if err != nil { + return nil, err + } + if endpoint != "" { + s.BasePath = endpoint + } + return s, nil +} + +// New creates a new Service. It uses the provided http.Client for requests. +// +// Deprecated: please use NewService instead. +// To provide a custom HTTP client, use option.WithHTTPClient. +// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. func New(client *http.Client) (*Service, error) { if client == nil { return nil, errors.New("client is nil") @@ -302,7 +359,7 @@ type Binding struct { // For example, `admins@example.com`. // // - // * `domain:{domain}`: A Google Apps domain name that represents all + // * `domain:{domain}`: The G Suite domain (primary) that represents all // the // users of that domain. For example, `google.com` or // `example.com`. diff --git a/vendor/google.golang.org/api/spanner/v1/spanner-api.json b/vendor/google.golang.org/api/spanner/v1/spanner-api.json index f7a91b5a..094dd4a7 100644 --- a/vendor/google.golang.org/api/spanner/v1/spanner-api.json +++ b/vendor/google.golang.org/api/spanner/v1/spanner-api.json @@ -343,7 +343,7 @@ ], "parameters": { "name": { - "description": "Required. A unique identifier for the instance, which cannot be changed\nafter the instance is created. Values are of the form\n`projects/\u003cproject\u003e/instances/a-z*[a-z0-9]`. The final\nsegment of the name must be between 6 and 30 characters in length.", + "description": "Required. A unique identifier for the instance, which cannot be changed\nafter the instance is created. Values are of the form\n`projects/\u003cproject\u003e/instances/a-z*[a-z0-9]`. The final\nsegment of the name must be between 2 and 64 characters in length.", "location": "path", "pattern": "^projects/[^/]+/instances/[^/]+$", "required": true, @@ -900,7 +900,7 @@ ] }, "delete": { - "description": "Ends a session, releasing server resources associated with it.", + "description": "Ends a session, releasing server resources associated with it. This will\nasynchronously trigger cancellation of any operations that are running with\nthis session.", "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/sessions/{sessionsId}", "httpMethod": "DELETE", "id": "spanner.projects.instances.databases.sessions.delete", @@ -925,6 +925,35 @@ "https://www.googleapis.com/auth/spanner.data" ] }, + "executeBatchDml": { + "description": "Executes a batch of SQL DML statements. This method allows many statements\nto be run with lower latency than submitting them sequentially with\nExecuteSql.\n\nStatements are executed in order, sequentially.\nExecuteBatchDmlResponse will contain a\nResultSet for each DML statement that has successfully executed. If a\nstatement fails, its error status will be returned as part of the\nExecuteBatchDmlResponse. Execution will\nstop at the first failed statement; the remaining statements will not run.\n\nExecuteBatchDml is expected to return an OK status with a response even if\nthere was an error while processing one of the DML statements. Clients must\ninspect response.status to determine if there were any errors while\nprocessing the request.\n\nSee more details in\nExecuteBatchDmlRequest and\nExecuteBatchDmlResponse.", + "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/sessions/{sessionsId}:executeBatchDml", + "httpMethod": "POST", + "id": "spanner.projects.instances.databases.sessions.executeBatchDml", + "parameterOrder": [ + "session" + ], + "parameters": { + "session": { + "description": "Required. The session in which the DML statements should be performed.", + "location": "path", + "pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+/sessions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+session}:executeBatchDml", + "request": { + "$ref": "ExecuteBatchDmlRequest" + }, + "response": { + "$ref": "ExecuteBatchDmlResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/spanner.data" + ] + }, "executeSql": { "description": "Executes an SQL statement, returning all results in a single reply. This\nmethod cannot be used to return a result set larger than 10 MiB;\nif the query yields more data than that, the query fails with\na `FAILED_PRECONDITION` error.\n\nOperations inside read-write transactions might return `ABORTED`. If\nthis occurs, the application should restart the transaction from\nthe beginning. See Transaction for more details.\n\nLarger result sets can be fetched in streaming fashion by calling\nExecuteStreamingSql instead.", "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/sessions/{sessionsId}:executeSql", @@ -1329,7 +1358,7 @@ } } }, - "revision": "20180920", + "revision": "20190403", "rootUrl": "https://spanner.googleapis.com/", "schemas": { "BeginTransactionRequest": { @@ -1352,7 +1381,7 @@ "description": "Unimplemented. The condition that is associated with this binding.\nNOTE: an unsatisfied condition will not allow user access via current\nbinding. Different bindings, including their conditions, are examined\nindependently." }, "members": { - "description": "Specifies the identities requesting access for a Cloud Platform resource.\n`members` can have the following values:\n\n* `allUsers`: A special identifier that represents anyone who is\n on the internet; with or without a Google account.\n\n* `allAuthenticatedUsers`: A special identifier that represents anyone\n who is authenticated with a Google account or a service account.\n\n* `user:{emailid}`: An email address that represents a specific Google\n account. For example, `alice@gmail.com` .\n\n\n* `serviceAccount:{emailid}`: An email address that represents a service\n account. For example, `my-other-app@appspot.gserviceaccount.com`.\n\n* `group:{emailid}`: An email address that represents a Google group.\n For example, `admins@example.com`.\n\n\n* `domain:{domain}`: A Google Apps domain name that represents all the\n users of that domain. For example, `google.com` or `example.com`.\n\n", + "description": "Specifies the identities requesting access for a Cloud Platform resource.\n`members` can have the following values:\n\n* `allUsers`: A special identifier that represents anyone who is\n on the internet; with or without a Google account.\n\n* `allAuthenticatedUsers`: A special identifier that represents anyone\n who is authenticated with a Google account or a service account.\n\n* `user:{emailid}`: An email address that represents a specific Google\n account. For example, `alice@gmail.com` .\n\n\n* `serviceAccount:{emailid}`: An email address that represents a service\n account. For example, `my-other-app@appspot.gserviceaccount.com`.\n\n* `group:{emailid}`: An email address that represents a Google group.\n For example, `admins@example.com`.\n\n\n* `domain:{domain}`: The G Suite domain (primary) that represents all the\n users of that domain. For example, `google.com` or `example.com`.\n\n", "items": { "type": "string" }, @@ -1484,7 +1513,7 @@ "description": "Required. The instance to create. The name may be omitted, but if\nspecified must be `\u003cparent\u003e/instances/\u003cinstance_id\u003e`." }, "instanceId": { - "description": "Required. The ID of the instance to create. Valid identifiers are of the\nform `a-z*[a-z0-9]` and must be between 6 and 30 characters in\nlength.", + "description": "Required. The ID of the instance to create. Valid identifiers are of the\nform `a-z*[a-z0-9]` and must be between 2 and 64 characters in\nlength.", "type": "string" } }, @@ -1547,6 +1576,47 @@ "properties": {}, "type": "object" }, + "ExecuteBatchDmlRequest": { + "description": "The request for ExecuteBatchDml", + "id": "ExecuteBatchDmlRequest", + "properties": { + "seqno": { + "description": "A per-transaction sequence number used to identify this request. This is\nused in the same space as the seqno in\nExecuteSqlRequest. See more details\nin ExecuteSqlRequest.", + "format": "int64", + "type": "string" + }, + "statements": { + "description": "The list of statements to execute in this batch. Statements are executed\nserially, such that the effects of statement i are visible to statement\ni+1. Each statement must be a DML statement. Execution will stop at the\nfirst failed statement; the remaining statements will not run.\n\nREQUIRES: statements_size() \u003e 0.", + "items": { + "$ref": "Statement" + }, + "type": "array" + }, + "transaction": { + "$ref": "TransactionSelector", + "description": "The transaction to use. A ReadWrite transaction is required. Single-use\ntransactions are not supported (to avoid replay). The caller must either\nsupply an existing transaction ID or begin a new transaction." + } + }, + "type": "object" + }, + "ExecuteBatchDmlResponse": { + "description": "The response for ExecuteBatchDml. Contains a list\nof ResultSet, one for each DML statement that has successfully executed.\nIf a statement fails, the error is returned as part of the response payload.\nClients can determine whether all DML statements have run successfully, or if\na statement failed, using one of the following approaches:\n\n 1. Check if 'status' field is OkStatus.\n 2. Check if result_sets_size() equals the number of statements in\n ExecuteBatchDmlRequest.\n\nExample 1: A request with 5 DML statements, all executed successfully.\nResult: A response with 5 ResultSets, one for each statement in the same\norder, and an OK status.\n\nExample 2: A request with 5 DML statements. The 3rd statement has a syntax\nerror.\nResult: A response with 2 ResultSets, for the first 2 statements that\nrun successfully, and a syntax error (INVALID_ARGUMENT) status. From\nresult_set_size() client can determine that the 3rd statement has failed.", + "id": "ExecuteBatchDmlResponse", + "properties": { + "resultSets": { + "description": "ResultSets, one for each statement in the request that ran successfully, in\nthe same order as the statements in the request. Each ResultSet will\nnot contain any rows. The ResultSetStats in each ResultSet will\ncontain the number of rows modified by the statement.\n\nOnly the first ResultSet in the response contains a valid\nResultSetMetadata.", + "items": { + "$ref": "ResultSet" + }, + "type": "array" + }, + "status": { + "$ref": "Status", + "description": "If all DML statements are executed successfully, status will be OK.\nOtherwise, the error status of the first failed statement." + } + }, + "type": "object" + }, "ExecuteSqlRequest": { "description": "The request for ExecuteSql and\nExecuteStreamingSql.", "id": "ExecuteSqlRequest", @@ -1684,7 +1754,7 @@ "type": "object" }, "name": { - "description": "Required. A unique identifier for the instance, which cannot be changed\nafter the instance is created. Values are of the form\n`projects/\u003cproject\u003e/instances/a-z*[a-z0-9]`. The final\nsegment of the name must be between 6 and 30 characters in length.", + "description": "Required. A unique identifier for the instance, which cannot be changed\nafter the instance is created. Values are of the form\n`projects/\u003cproject\u003e/instances/a-z*[a-z0-9]`. The final\nsegment of the name must be between 2 and 64 characters in length.", "type": "string" }, "nodeCount": { @@ -1725,7 +1795,7 @@ "type": "object" }, "KeyRange": { - "description": "KeyRange represents a range of rows in a table or index.\n\nA range has a start key and an end key. These keys can be open or\nclosed, indicating if the range includes rows with that key.\n\nKeys are represented by lists, where the ith value in the list\ncorresponds to the ith component of the table or index primary key.\nIndividual values are encoded as described here.\n\nFor example, consider the following table definition:\n\n CREATE TABLE UserEvents (\n UserName STRING(MAX),\n EventDate STRING(10)\n ) PRIMARY KEY(UserName, EventDate);\n\nThe following keys name rows in this table:\n\n \"Bob\", \"2014-09-23\"\n\nSince the `UserEvents` table's `PRIMARY KEY` clause names two\ncolumns, each `UserEvents` key has two elements; the first is the\n`UserName`, and the second is the `EventDate`.\n\nKey ranges with multiple components are interpreted\nlexicographically by component using the table or index key's declared\nsort order. For example, the following range returns all events for\nuser `\"Bob\"` that occurred in the year 2015:\n\n \"start_closed\": [\"Bob\", \"2015-01-01\"]\n \"end_closed\": [\"Bob\", \"2015-12-31\"]\n\nStart and end keys can omit trailing key components. This affects the\ninclusion and exclusion of rows that exactly match the provided key\ncomponents: if the key is closed, then rows that exactly match the\nprovided components are included; if the key is open, then rows\nthat exactly match are not included.\n\nFor example, the following range includes all events for `\"Bob\"` that\noccurred during and after the year 2000:\n\n \"start_closed\": [\"Bob\", \"2000-01-01\"]\n \"end_closed\": [\"Bob\"]\n\nThe next example retrieves all events for `\"Bob\"`:\n\n \"start_closed\": [\"Bob\"]\n \"end_closed\": [\"Bob\"]\n\nTo retrieve events before the year 2000:\n\n \"start_closed\": [\"Bob\"]\n \"end_open\": [\"Bob\", \"2000-01-01\"]\n\nThe following range includes all rows in the table:\n\n \"start_closed\": []\n \"end_closed\": []\n\nThis range returns all users whose `UserName` begins with any\ncharacter from A to C:\n\n \"start_closed\": [\"A\"]\n \"end_open\": [\"D\"]\n\nThis range returns all users whose `UserName` begins with B:\n\n \"start_closed\": [\"B\"]\n \"end_open\": [\"C\"]\n\nKey ranges honor column sort order. For example, suppose a table is\ndefined as follows:\n\n CREATE TABLE DescendingSortedTable {\n Key INT64,\n ...\n ) PRIMARY KEY(Key DESC);\n\nThe following range retrieves all rows with key values between 1\nand 100 inclusive:\n\n \"start_closed\": [\"100\"]\n \"end_closed\": [\"1\"]\n\nNote that 100 is passed as the start, and 1 is passed as the end,\nbecause `Key` is a descending column in the schema.", + "description": "KeyRange represents a range of rows in a table or index.\n\nA range has a start key and an end key. These keys can be open or\nclosed, indicating if the range includes rows with that key.\n\nKeys are represented by lists, where the ith value in the list\ncorresponds to the ith component of the table or index primary key.\nIndividual values are encoded as described\nhere.\n\nFor example, consider the following table definition:\n\n CREATE TABLE UserEvents (\n UserName STRING(MAX),\n EventDate STRING(10)\n ) PRIMARY KEY(UserName, EventDate);\n\nThe following keys name rows in this table:\n\n \"Bob\", \"2014-09-23\"\n\nSince the `UserEvents` table's `PRIMARY KEY` clause names two\ncolumns, each `UserEvents` key has two elements; the first is the\n`UserName`, and the second is the `EventDate`.\n\nKey ranges with multiple components are interpreted\nlexicographically by component using the table or index key's declared\nsort order. For example, the following range returns all events for\nuser `\"Bob\"` that occurred in the year 2015:\n\n \"start_closed\": [\"Bob\", \"2015-01-01\"]\n \"end_closed\": [\"Bob\", \"2015-12-31\"]\n\nStart and end keys can omit trailing key components. This affects the\ninclusion and exclusion of rows that exactly match the provided key\ncomponents: if the key is closed, then rows that exactly match the\nprovided components are included; if the key is open, then rows\nthat exactly match are not included.\n\nFor example, the following range includes all events for `\"Bob\"` that\noccurred during and after the year 2000:\n\n \"start_closed\": [\"Bob\", \"2000-01-01\"]\n \"end_closed\": [\"Bob\"]\n\nThe next example retrieves all events for `\"Bob\"`:\n\n \"start_closed\": [\"Bob\"]\n \"end_closed\": [\"Bob\"]\n\nTo retrieve events before the year 2000:\n\n \"start_closed\": [\"Bob\"]\n \"end_open\": [\"Bob\", \"2000-01-01\"]\n\nThe following range includes all rows in the table:\n\n \"start_closed\": []\n \"end_closed\": []\n\nThis range returns all users whose `UserName` begins with any\ncharacter from A to C:\n\n \"start_closed\": [\"A\"]\n \"end_open\": [\"D\"]\n\nThis range returns all users whose `UserName` begins with B:\n\n \"start_closed\": [\"B\"]\n \"end_open\": [\"C\"]\n\nKey ranges honor column sort order. For example, suppose a table is\ndefined as follows:\n\n CREATE TABLE DescendingSortedTable {\n Key INT64,\n ...\n ) PRIMARY KEY(Key DESC);\n\nThe following range retrieves all rows with key values between 1\nand 100 inclusive:\n\n \"start_closed\": [\"100\"]\n \"end_closed\": [\"1\"]\n\nNote that 100 is passed as the start, and 1 is passed as the end,\nbecause `Key` is a descending column in the schema.", "id": "KeyRange", "properties": { "endClosed": { @@ -2411,8 +2481,34 @@ }, "type": "object" }, + "Statement": { + "description": "A single DML statement.", + "id": "Statement", + "properties": { + "paramTypes": { + "additionalProperties": { + "$ref": "Type" + }, + "description": "It is not always possible for Cloud Spanner to infer the right SQL type\nfrom a JSON value. For example, values of type `BYTES` and values\nof type `STRING` both appear in params as JSON strings.\n\nIn these cases, `param_types` can be used to specify the exact\nSQL type for some or all of the SQL statement parameters. See the\ndefinition of Type for more information\nabout SQL types.", + "type": "object" + }, + "params": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "The DML string can contain parameter placeholders. A parameter\nplaceholder consists of `'@'` followed by the parameter\nname. Parameter names consist of any combination of letters,\nnumbers, and underscores.\n\nParameters can appear anywhere that a literal value is expected. The\nsame parameter name can be used more than once, for example:\n `\"WHERE id \u003e @msg_id AND id \u003c @msg_id + 100\"`\n\nIt is an error to execute an SQL statement with unbound parameters.\n\nParameter values are specified using `params`, which is a JSON\nobject whose keys are parameter names, and whose values are the\ncorresponding parameter values.", + "type": "object" + }, + "sql": { + "description": "Required. The DML string.", + "type": "string" + } + }, + "type": "object" + }, "Status": { - "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", + "description": "The `Status` type defines a logical error model that is suitable for\ndifferent programming environments, including REST APIs and RPC APIs. It is\nused by [gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error\nmessage, and error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", "id": "Status", "properties": { "code": { @@ -2567,7 +2663,7 @@ "Encoded as `string` in RFC 3339 date format.", "Encoded as `string`.", "Encoded as a base64-encoded `string`, as described in RFC 4648,\nsection 4.", - "Encoded as `list`, where the list elements are represented\naccording to array_element_type.", + "Encoded as `list`, where the list elements are represented\naccording to\narray_element_type.", "Encoded as `list`, where list element `i` is represented according\nto [struct_type.fields[i]][google.spanner.v1.StructType.fields]." ], "type": "string" diff --git a/vendor/google.golang.org/api/spanner/v1/spanner-gen.go b/vendor/google.golang.org/api/spanner/v1/spanner-gen.go index 0c2fd4dc..6622d4eb 100644 --- a/vendor/google.golang.org/api/spanner/v1/spanner-gen.go +++ b/vendor/google.golang.org/api/spanner/v1/spanner-gen.go @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. All rights reserved. +// Copyright 2019 Google LLC. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. @@ -8,13 +8,39 @@ // // This package is DEPRECATED. Use package cloud.google.com/go/spanner instead. // -// See https://cloud.google.com/spanner/ +// For product documentation, see: https://cloud.google.com/spanner/ +// +// Creating a client // // Usage example: // // import "google.golang.org/api/spanner/v1" // ... -// spannerService, err := spanner.New(oauthHttpClient) +// ctx := context.Background() +// spannerService, err := spanner.NewService(ctx) +// +// In this example, Google Application Default Credentials are used for authentication. +// +// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// +// Other authentication options +// +// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// +// spannerService, err := spanner.NewService(ctx, option.WithScopes(spanner.SpannerDataScope)) +// +// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// +// spannerService, err := spanner.NewService(ctx, option.WithAPIKey("AIza...")) +// +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// +// config := &oauth2.Config{...} +// // ... +// token, err := config.Exchange(ctx, ...) +// spannerService, err := spanner.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) +// +// See https://godoc.org/google.golang.org/api/option/ for details on options. package spanner // import "google.golang.org/api/spanner/v1" import ( @@ -31,6 +57,8 @@ import ( gensupport "google.golang.org/api/gensupport" googleapi "google.golang.org/api/googleapi" + option "google.golang.org/api/option" + htransport "google.golang.org/api/transport/http" ) // Always reference these packages, just in case the auto-generated code @@ -64,6 +92,34 @@ const ( SpannerDataScope = "https://www.googleapis.com/auth/spanner.data" ) +// NewService creates a new Service. +func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { + scopesOption := option.WithScopes( + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/spanner.admin", + "https://www.googleapis.com/auth/spanner.data", + ) + // NOTE: prepend, so we don't override user-specified scopes. + opts = append([]option.ClientOption{scopesOption}, opts...) + client, endpoint, err := htransport.NewClient(ctx, opts...) + if err != nil { + return nil, err + } + s, err := New(client) + if err != nil { + return nil, err + } + if endpoint != "" { + s.BasePath = endpoint + } + return s, nil +} + +// New creates a new Service. It uses the provided http.Client for requests. +// +// Deprecated: please use NewService instead. +// To provide a custom HTTP client, use option.WithHTTPClient. +// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. func New(client *http.Client) (*Service, error) { if client == nil { return nil, errors.New("client is nil") @@ -235,7 +291,7 @@ type Binding struct { // For example, `admins@example.com`. // // - // * `domain:{domain}`: A Google Apps domain name that represents all + // * `domain:{domain}`: The G Suite domain (primary) that represents all // the // users of that domain. For example, `google.com` or // `example.com`. @@ -535,7 +591,7 @@ type CreateInstanceRequest struct { // InstanceId: Required. The ID of the instance to create. Valid // identifiers are of the - // form `a-z*[a-z0-9]` and must be between 6 and 30 characters + // form `a-z*[a-z0-9]` and must be between 2 and 64 characters // in // length. InstanceId string `json:"instanceId,omitempty"` @@ -692,6 +748,132 @@ type Empty struct { googleapi.ServerResponse `json:"-"` } +// ExecuteBatchDmlRequest: The request for ExecuteBatchDml +type ExecuteBatchDmlRequest struct { + // Seqno: A per-transaction sequence number used to identify this + // request. This is + // used in the same space as the seqno in + // ExecuteSqlRequest. See more details + // in ExecuteSqlRequest. + Seqno int64 `json:"seqno,omitempty,string"` + + // Statements: The list of statements to execute in this batch. + // Statements are executed + // serially, such that the effects of statement i are visible to + // statement + // i+1. Each statement must be a DML statement. Execution will stop at + // the + // first failed statement; the remaining statements will not + // run. + // + // REQUIRES: statements_size() > 0. + Statements []*Statement `json:"statements,omitempty"` + + // Transaction: The transaction to use. A ReadWrite transaction is + // required. Single-use + // transactions are not supported (to avoid replay). The caller must + // either + // supply an existing transaction ID or begin a new transaction. + Transaction *TransactionSelector `json:"transaction,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Seqno") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Seqno") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ExecuteBatchDmlRequest) MarshalJSON() ([]byte, error) { + type NoMethod ExecuteBatchDmlRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ExecuteBatchDmlResponse: The response for ExecuteBatchDml. Contains a +// list +// of ResultSet, one for each DML statement that has successfully +// executed. +// If a statement fails, the error is returned as part of the response +// payload. +// Clients can determine whether all DML statements have run +// successfully, or if +// a statement failed, using one of the following approaches: +// +// 1. Check if 'status' field is OkStatus. +// 2. Check if result_sets_size() equals the number of statements in +// ExecuteBatchDmlRequest. +// +// Example 1: A request with 5 DML statements, all executed +// successfully. +// Result: A response with 5 ResultSets, one for each statement in the +// same +// order, and an OK status. +// +// Example 2: A request with 5 DML statements. The 3rd statement has a +// syntax +// error. +// Result: A response with 2 ResultSets, for the first 2 statements +// that +// run successfully, and a syntax error (INVALID_ARGUMENT) status. +// From +// result_set_size() client can determine that the 3rd statement has +// failed. +type ExecuteBatchDmlResponse struct { + // ResultSets: ResultSets, one for each statement in the request that + // ran successfully, in + // the same order as the statements in the request. Each ResultSet + // will + // not contain any rows. The ResultSetStats in each ResultSet + // will + // contain the number of rows modified by the statement. + // + // Only the first ResultSet in the response contains a + // valid + // ResultSetMetadata. + ResultSets []*ResultSet `json:"resultSets,omitempty"` + + // Status: If all DML statements are executed successfully, status will + // be OK. + // Otherwise, the error status of the first failed statement. + Status *Status `json:"status,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "ResultSets") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ResultSets") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ExecuteBatchDmlResponse) MarshalJSON() ([]byte, error) { + type NoMethod ExecuteBatchDmlResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ExecuteSqlRequest: The request for ExecuteSql // and // ExecuteStreamingSql. @@ -1017,7 +1199,7 @@ type Instance struct { // after the instance is created. Values are of the // form // `projects//instances/a-z*[a-z0-9]`. The final - // segment of the name must be between 6 and 30 characters in length. + // segment of the name must be between 2 and 64 characters in length. Name string `json:"name,omitempty"` // NodeCount: Required. The number of nodes allocated to this instance. @@ -1125,7 +1307,8 @@ func (s *InstanceConfig) MarshalJSON() ([]byte, error) { // list // corresponds to the ith component of the table or index primary // key. -// Individual values are encoded as described here. +// Individual values are encoded as described +// here. // // For example, consider the following table definition: // @@ -2789,21 +2972,81 @@ func (s *ShortRepresentation) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// Statement: A single DML statement. +type Statement struct { + // ParamTypes: It is not always possible for Cloud Spanner to infer the + // right SQL type + // from a JSON value. For example, values of type `BYTES` and values + // of type `STRING` both appear in params as JSON strings. + // + // In these cases, `param_types` can be used to specify the exact + // SQL type for some or all of the SQL statement parameters. See + // the + // definition of Type for more information + // about SQL types. + ParamTypes map[string]Type `json:"paramTypes,omitempty"` + + // Params: The DML string can contain parameter placeholders. A + // parameter + // placeholder consists of `'@'` followed by the parameter + // name. Parameter names consist of any combination of letters, + // numbers, and underscores. + // + // Parameters can appear anywhere that a literal value is expected. + // The + // same parameter name can be used more than once, for example: + // "WHERE id > @msg_id AND id < @msg_id + 100" + // + // It is an error to execute an SQL statement with unbound + // parameters. + // + // Parameter values are specified using `params`, which is a JSON + // object whose keys are parameter names, and whose values are + // the + // corresponding parameter values. + Params googleapi.RawMessage `json:"params,omitempty"` + + // Sql: Required. The DML string. + Sql string `json:"sql,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ParamTypes") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ParamTypes") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Statement) MarshalJSON() ([]byte, error) { + type NoMethod Statement + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Status: The `Status` type defines a logical error model that is -// suitable for different -// programming environments, including REST APIs and RPC APIs. It is -// used by -// [gRPC](https://github.com/grpc). The error model is designed to -// be: +// suitable for +// different programming environments, including REST APIs and RPC APIs. +// It is +// used by [gRPC](https://github.com/grpc). The error model is designed +// to be: // // - Simple to use and understand for most users // - Flexible enough to meet unexpected needs // // # Overview // -// The `Status` message contains three pieces of data: error code, error -// message, -// and error details. The error code should be an enum value +// The `Status` message contains three pieces of data: error code, +// error +// message, and error details. The error code should be an enum value // of // google.rpc.Code, but it may accept additional error codes if needed. // The @@ -3577,7 +3820,8 @@ type Type struct { // section 4. // "ARRAY" - Encoded as `list`, where the list elements are // represented - // according to array_element_type. + // according to + // array_element_type. // "STRUCT" - Encoded as `list`, where list element `i` is represented // according // to [struct_type.fields[i]][google.spanner.v1.StructType.fields]. @@ -5207,7 +5451,7 @@ func (c *ProjectsInstancesPatchCall) Do(opts ...googleapi.CallOption) (*Operatio // ], // "parameters": { // "name": { - // "description": "Required. A unique identifier for the instance, which cannot be changed\nafter the instance is created. Values are of the form\n`projects/\u003cproject\u003e/instances/a-z*[a-z0-9]`. The final\nsegment of the name must be between 6 and 30 characters in length.", + // "description": "Required. A unique identifier for the instance, which cannot be changed\nafter the instance is created. Values are of the form\n`projects/\u003cproject\u003e/instances/a-z*[a-z0-9]`. The final\nsegment of the name must be between 2 and 64 characters in length.", // "location": "path", // "pattern": "^projects/[^/]+/instances/[^/]+$", // "required": true, @@ -8000,7 +8244,10 @@ type ProjectsInstancesDatabasesSessionsDeleteCall struct { } // Delete: Ends a session, releasing server resources associated with -// it. +// it. This will +// asynchronously trigger cancellation of any operations that are +// running with +// this session. func (r *ProjectsInstancesDatabasesSessionsService) Delete(name string) *ProjectsInstancesDatabasesSessionsDeleteCall { c := &ProjectsInstancesDatabasesSessionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -8092,7 +8339,7 @@ func (c *ProjectsInstancesDatabasesSessionsDeleteCall) Do(opts ...googleapi.Call } return ret, nil // { - // "description": "Ends a session, releasing server resources associated with it.", + // "description": "Ends a session, releasing server resources associated with it. This will\nasynchronously trigger cancellation of any operations that are running with\nthis session.", // "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/sessions/{sessionsId}", // "httpMethod": "DELETE", // "id": "spanner.projects.instances.databases.sessions.delete", @@ -8120,6 +8367,173 @@ func (c *ProjectsInstancesDatabasesSessionsDeleteCall) Do(opts ...googleapi.Call } +// method id "spanner.projects.instances.databases.sessions.executeBatchDml": + +type ProjectsInstancesDatabasesSessionsExecuteBatchDmlCall struct { + s *Service + session string + executebatchdmlrequest *ExecuteBatchDmlRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// ExecuteBatchDml: Executes a batch of SQL DML statements. This method +// allows many statements +// to be run with lower latency than submitting them sequentially +// with +// ExecuteSql. +// +// Statements are executed in order, +// sequentially. +// ExecuteBatchDmlResponse will contain a +// ResultSet for each DML statement that has successfully executed. If +// a +// statement fails, its error status will be returned as part of +// the +// ExecuteBatchDmlResponse. Execution will +// stop at the first failed statement; the remaining statements will not +// run. +// +// ExecuteBatchDml is expected to return an OK status with a response +// even if +// there was an error while processing one of the DML statements. +// Clients must +// inspect response.status to determine if there were any errors +// while +// processing the request. +// +// See more details in +// ExecuteBatchDmlRequest and +// ExecuteBatchDmlResponse. +func (r *ProjectsInstancesDatabasesSessionsService) ExecuteBatchDml(session string, executebatchdmlrequest *ExecuteBatchDmlRequest) *ProjectsInstancesDatabasesSessionsExecuteBatchDmlCall { + c := &ProjectsInstancesDatabasesSessionsExecuteBatchDmlCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.session = session + c.executebatchdmlrequest = executebatchdmlrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsInstancesDatabasesSessionsExecuteBatchDmlCall) Fields(s ...googleapi.Field) *ProjectsInstancesDatabasesSessionsExecuteBatchDmlCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsInstancesDatabasesSessionsExecuteBatchDmlCall) Context(ctx context.Context) *ProjectsInstancesDatabasesSessionsExecuteBatchDmlCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsInstancesDatabasesSessionsExecuteBatchDmlCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsInstancesDatabasesSessionsExecuteBatchDmlCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.executebatchdmlrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+session}:executeBatchDml") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "session": c.session, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "spanner.projects.instances.databases.sessions.executeBatchDml" call. +// Exactly one of *ExecuteBatchDmlResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ExecuteBatchDmlResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsInstancesDatabasesSessionsExecuteBatchDmlCall) Do(opts ...googleapi.CallOption) (*ExecuteBatchDmlResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &ExecuteBatchDmlResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Executes a batch of SQL DML statements. This method allows many statements\nto be run with lower latency than submitting them sequentially with\nExecuteSql.\n\nStatements are executed in order, sequentially.\nExecuteBatchDmlResponse will contain a\nResultSet for each DML statement that has successfully executed. If a\nstatement fails, its error status will be returned as part of the\nExecuteBatchDmlResponse. Execution will\nstop at the first failed statement; the remaining statements will not run.\n\nExecuteBatchDml is expected to return an OK status with a response even if\nthere was an error while processing one of the DML statements. Clients must\ninspect response.status to determine if there were any errors while\nprocessing the request.\n\nSee more details in\nExecuteBatchDmlRequest and\nExecuteBatchDmlResponse.", + // "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/sessions/{sessionsId}:executeBatchDml", + // "httpMethod": "POST", + // "id": "spanner.projects.instances.databases.sessions.executeBatchDml", + // "parameterOrder": [ + // "session" + // ], + // "parameters": { + // "session": { + // "description": "Required. The session in which the DML statements should be performed.", + // "location": "path", + // "pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+/sessions/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+session}:executeBatchDml", + // "request": { + // "$ref": "ExecuteBatchDmlRequest" + // }, + // "response": { + // "$ref": "ExecuteBatchDmlResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/spanner.data" + // ] + // } + +} + // method id "spanner.projects.instances.databases.sessions.executeSql": type ProjectsInstancesDatabasesSessionsExecuteSqlCall struct { diff --git a/vendor/google.golang.org/api/sqladmin/v1beta4/sqladmin-api.json b/vendor/google.golang.org/api/sqladmin/v1beta4/sqladmin-api.json index 3128d518..a85be5fc 100644 --- a/vendor/google.golang.org/api/sqladmin/v1beta4/sqladmin-api.json +++ b/vendor/google.golang.org/api/sqladmin/v1beta4/sqladmin-api.json @@ -18,7 +18,7 @@ "description": "Creates and manages Cloud SQL instances, which provide fully managed MySQL or PostgreSQL databases.", "discoveryVersion": "v1", "documentationLink": "https://cloud.google.com/sql/docs/reference/latest", - "etag": "\"J3WqvAcMk4eQjJXvfSI4Yr8VouA/82ylYoGkWdOR9dmpZge6l1weils\"", + "etag": "\"VPK3KBfpaEgZ16pozGOoMYfKc0U/QtjhOzVspxdYDcV-neBlaStEry0\"", "icons": { "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" @@ -1617,7 +1617,7 @@ } } }, - "revision": "20181031", + "revision": "20190415", "rootUrl": "https://www.googleapis.com/", "schemas": { "AclEntry": { @@ -1906,9 +1906,17 @@ "type": "string" }, "databaseVersion": { - "description": "The database engine type and version. The databaseVersion field can not be changed after instance creation. MySQL Second Generation instances: MYSQL_5_7 (default) or MYSQL_5_6. PostgreSQL instances: POSTGRES_9_6 MySQL First Generation instances: MYSQL_5_6 (default) or MYSQL_5_5", + "description": "The database engine type and version. The databaseVersion field can not be changed after instance creation. MySQL Second Generation instances: MYSQL_5_7 (default) or MYSQL_5_6. PostgreSQL instances: POSTGRES_9_6 (default) or POSTGRES_11 Beta. MySQL First Generation instances: MYSQL_5_6 (default) or MYSQL_5_5", "type": "string" }, + "diskEncryptionConfiguration": { + "$ref": "DiskEncryptionConfiguration", + "description": "Disk encryption configuration specific to an instance. Applies only to Second Generation instances." + }, + "diskEncryptionStatus": { + "$ref": "DiskEncryptionStatus", + "description": "Disk encryption status specific to an instance. Applies only to Second Generation instances." + }, "etag": { "description": "This field is deprecated and will be removed from a future version of the API. Use the settings.settingsVersion field instead.", "type": "string" @@ -1992,6 +2000,10 @@ }, "type": "array" }, + "rootPassword": { + "description": "Initial root password. Use only on creation.", + "type": "string" + }, "selfLink": { "description": "The URI of this resource.", "type": "string" @@ -2119,12 +2131,44 @@ }, "type": "object" }, + "DiskEncryptionConfiguration": { + "description": "Disk encryption configuration.", + "id": "DiskEncryptionConfiguration", + "properties": { + "kind": { + "default": "sql#diskEncryptionConfiguration", + "description": "This is always sql#diskEncryptionConfiguration.", + "type": "string" + }, + "kmsKeyName": { + "description": "KMS key resource name", + "type": "string" + } + }, + "type": "object" + }, + "DiskEncryptionStatus": { + "description": "Disk encryption status.", + "id": "DiskEncryptionStatus", + "properties": { + "kind": { + "default": "sql#diskEncryptionStatus", + "description": "This is always sql#diskEncryptionStatus.", + "type": "string" + }, + "kmsKeyVersionName": { + "description": "KMS key version used to encrypt the Cloud SQL instance disk", + "type": "string" + } + }, + "type": "object" + }, "ExportContext": { "description": "Database instance export context.", "id": "ExportContext", "properties": { "csvExportOptions": { - "description": "Options for exporting data as CSV.\nExporting in CSV format using the Cloud SQL Admin API is not supported for PostgreSQL instances.", + "description": "Options for exporting data as CSV.", "properties": { "selectQuery": { "description": "The select query used to extract the data.", @@ -2134,14 +2178,14 @@ "type": "object" }, "databases": { - "description": "Databases to be exported.\nMySQL instances: If fileType is SQL and no database is specified, all databases are exported, except for the mysql system database. If fileType is CSV, you can specify one database, either by using this property or by using the csvExportOptions.selectQuery property, which takes precedence over this property.\nPostgreSQL instances: If fileType is SQL, you must specify one database to be exported. A fileType of CSV is not supported for PostgreSQL instances.", + "description": "Databases to be exported.\nMySQL instances: If fileType is SQL and no database is specified, all databases are exported, except for the mysql system database. If fileType is CSV, you can specify one database, either by using this property or by using the csvExportOptions.selectQuery property, which takes precedence over this property.\nPostgreSQL instances: Specify exactly one database to be exported. If fileType is CSV, this database must match the database used in the csvExportOptions.selectQuery property.", "items": { "type": "string" }, "type": "array" }, "fileType": { - "description": "The file type for the specified uri.\nSQL: The file contains SQL statements.\nCSV: The file contains CSV data.\nCSV is not supported for PostgreSQL instances.", + "description": "The file type for the specified uri.\nSQL: The file contains SQL statements.\nCSV: The file contains CSV data.", "type": "string" }, "kind": { @@ -2219,6 +2263,10 @@ }, "type": "array" }, + "inBeta": { + "description": "True if the flag is only released in Beta.", + "type": "boolean" + }, "kind": { "default": "sql#flag", "description": "This is always sql#flag.", @@ -2273,7 +2321,7 @@ "id": "ImportContext", "properties": { "csvImportOptions": { - "description": "Options for importing data as CSV.\nImporting CSV data using the Cloud SQL Admin API is not supported for PostgreSQL instances.", + "description": "Options for importing data as CSV.", "properties": { "columns": { "description": "The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.", @@ -2294,11 +2342,11 @@ "type": "string" }, "fileType": { - "description": "The file type for the specified uri.\nSQL: The file contains SQL statements.\nCSV: The file contains CSV data.\nImporting CSV data using the Cloud SQL Admin API is not supported for PostgreSQL instances.", + "description": "The file type for the specified uri.\nSQL: The file contains SQL statements.\nCSV: The file contains CSV data.", "type": "string" }, "importUser": { - "description": "The PostgreSQL user for this import operation. Defaults to cloudsqlsuperuser. PostgreSQL instances only.", + "description": "The PostgreSQL user for this import operation. PostgreSQL instances only.", "type": "string" }, "kind": { diff --git a/vendor/google.golang.org/api/sqladmin/v1beta4/sqladmin-gen.go b/vendor/google.golang.org/api/sqladmin/v1beta4/sqladmin-gen.go index 5c2901f3..4afb284f 100644 --- a/vendor/google.golang.org/api/sqladmin/v1beta4/sqladmin-gen.go +++ b/vendor/google.golang.org/api/sqladmin/v1beta4/sqladmin-gen.go @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. All rights reserved. +// Copyright 2019 Google LLC. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. @@ -6,13 +6,39 @@ // Package sqladmin provides access to the Cloud SQL Admin API. // -// See https://cloud.google.com/sql/docs/reference/latest +// For product documentation, see: https://cloud.google.com/sql/docs/reference/latest +// +// Creating a client // // Usage example: // // import "google.golang.org/api/sqladmin/v1beta4" // ... -// sqladminService, err := sqladmin.New(oauthHttpClient) +// ctx := context.Background() +// sqladminService, err := sqladmin.NewService(ctx) +// +// In this example, Google Application Default Credentials are used for authentication. +// +// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// +// Other authentication options +// +// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// +// sqladminService, err := sqladmin.NewService(ctx, option.WithScopes(sqladmin.SqlserviceAdminScope)) +// +// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// +// sqladminService, err := sqladmin.NewService(ctx, option.WithAPIKey("AIza...")) +// +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// +// config := &oauth2.Config{...} +// // ... +// token, err := config.Exchange(ctx, ...) +// sqladminService, err := sqladmin.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) +// +// See https://godoc.org/google.golang.org/api/option/ for details on options. package sqladmin // import "google.golang.org/api/sqladmin/v1beta4" import ( @@ -29,6 +55,8 @@ import ( gensupport "google.golang.org/api/gensupport" googleapi "google.golang.org/api/googleapi" + option "google.golang.org/api/option" + htransport "google.golang.org/api/transport/http" ) // Always reference these packages, just in case the auto-generated code @@ -59,6 +87,33 @@ const ( SqlserviceAdminScope = "https://www.googleapis.com/auth/sqlservice.admin" ) +// NewService creates a new Service. +func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { + scopesOption := option.WithScopes( + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/sqlservice.admin", + ) + // NOTE: prepend, so we don't override user-specified scopes. + opts = append([]option.ClientOption{scopesOption}, opts...) + client, endpoint, err := htransport.NewClient(ctx, opts...) + if err != nil { + return nil, err + } + s, err := New(client) + if err != nil { + return nil, err + } + if endpoint != "" { + s.BasePath = endpoint + } + return s, nil +} + +// New creates a new Service. It uses the provided http.Client for requests. +// +// Deprecated: please use NewService instead. +// To provide a custom HTTP client, use option.WithHTTPClient. +// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. func New(client *http.Client) (*Service, error) { if client == nil { return nil, errors.New("client is nil") @@ -598,10 +653,18 @@ type DatabaseInstance struct { // DatabaseVersion: The database engine type and version. The // databaseVersion field can not be changed after instance creation. // MySQL Second Generation instances: MYSQL_5_7 (default) or MYSQL_5_6. - // PostgreSQL instances: POSTGRES_9_6 MySQL First Generation instances: - // MYSQL_5_6 (default) or MYSQL_5_5 + // PostgreSQL instances: POSTGRES_9_6 (default) or POSTGRES_11 Beta. + // MySQL First Generation instances: MYSQL_5_6 (default) or MYSQL_5_5 DatabaseVersion string `json:"databaseVersion,omitempty"` + // DiskEncryptionConfiguration: Disk encryption configuration specific + // to an instance. Applies only to Second Generation instances. + DiskEncryptionConfiguration *DiskEncryptionConfiguration `json:"diskEncryptionConfiguration,omitempty"` + + // DiskEncryptionStatus: Disk encryption status specific to an instance. + // Applies only to Second Generation instances. + DiskEncryptionStatus *DiskEncryptionStatus `json:"diskEncryptionStatus,omitempty"` + // Etag: This field is deprecated and will be removed from a future // version of the API. Use the settings.settingsVersion field instead. Etag string `json:"etag,omitempty"` @@ -669,6 +732,9 @@ type DatabaseInstance struct { // ReplicaNames: The replicas of the instance. ReplicaNames []string `json:"replicaNames,omitempty"` + // RootPassword: Initial root password. Use only on creation. + RootPassword string `json:"rootPassword,omitempty"` + // SelfLink: The URI of this resource. SelfLink string `json:"selfLink,omitempty"` @@ -931,11 +997,72 @@ func (s *DemoteMasterMySqlReplicaConfiguration) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// DiskEncryptionConfiguration: Disk encryption configuration. +type DiskEncryptionConfiguration struct { + // Kind: This is always sql#diskEncryptionConfiguration. + Kind string `json:"kind,omitempty"` + + // KmsKeyName: KMS key resource name + KmsKeyName string `json:"kmsKeyName,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Kind") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Kind") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *DiskEncryptionConfiguration) MarshalJSON() ([]byte, error) { + type NoMethod DiskEncryptionConfiguration + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// DiskEncryptionStatus: Disk encryption status. +type DiskEncryptionStatus struct { + // Kind: This is always sql#diskEncryptionStatus. + Kind string `json:"kind,omitempty"` + + // KmsKeyVersionName: KMS key version used to encrypt the Cloud SQL + // instance disk + KmsKeyVersionName string `json:"kmsKeyVersionName,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Kind") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Kind") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *DiskEncryptionStatus) MarshalJSON() ([]byte, error) { + type NoMethod DiskEncryptionStatus + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ExportContext: Database instance export context. type ExportContext struct { // CsvExportOptions: Options for exporting data as CSV. - // Exporting in CSV format using the Cloud SQL Admin API is not - // supported for PostgreSQL instances. CsvExportOptions *ExportContextCsvExportOptions `json:"csvExportOptions,omitempty"` // Databases: Databases to be exported. @@ -944,15 +1071,14 @@ type ExportContext struct { // fileType is CSV, you can specify one database, either by using this // property or by using the csvExportOptions.selectQuery property, which // takes precedence over this property. - // PostgreSQL instances: If fileType is SQL, you must specify one - // database to be exported. A fileType of CSV is not supported for - // PostgreSQL instances. + // PostgreSQL instances: Specify exactly one database to be exported. If + // fileType is CSV, this database must match the database used in the + // csvExportOptions.selectQuery property. Databases []string `json:"databases,omitempty"` // FileType: The file type for the specified uri. // SQL: The file contains SQL statements. // CSV: The file contains CSV data. - // CSV is not supported for PostgreSQL instances. FileType string `json:"fileType,omitempty"` // Kind: This is always sql#exportContext. @@ -992,10 +1118,7 @@ func (s *ExportContext) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ExportContextCsvExportOptions: Options for exporting data as -// CSV. -// Exporting in CSV format using the Cloud SQL Admin API is not -// supported for PostgreSQL instances. +// ExportContextCsvExportOptions: Options for exporting data as CSV. type ExportContextCsvExportOptions struct { // SelectQuery: The select query used to extract the data. SelectQuery string `json:"selectQuery,omitempty"` @@ -1138,6 +1261,9 @@ type Flag struct { // Second Generation instances. AppliesTo []string `json:"appliesTo,omitempty"` + // InBeta: True if the flag is only released in Beta. + InBeta bool `json:"inBeta,omitempty"` + // Kind: This is always sql#flag. Kind string `json:"kind,omitempty"` @@ -1222,8 +1348,6 @@ func (s *FlagsListResponse) MarshalJSON() ([]byte, error) { // ImportContext: Database instance import context. type ImportContext struct { // CsvImportOptions: Options for importing data as CSV. - // Importing CSV data using the Cloud SQL Admin API is not supported for - // PostgreSQL instances. CsvImportOptions *ImportContextCsvImportOptions `json:"csvImportOptions,omitempty"` // Database: The target database for the import. If fileType is SQL, @@ -1235,12 +1359,10 @@ type ImportContext struct { // FileType: The file type for the specified uri. // SQL: The file contains SQL statements. // CSV: The file contains CSV data. - // Importing CSV data using the Cloud SQL Admin API is not supported for - // PostgreSQL instances. FileType string `json:"fileType,omitempty"` - // ImportUser: The PostgreSQL user for this import operation. Defaults - // to cloudsqlsuperuser. PostgreSQL instances only. + // ImportUser: The PostgreSQL user for this import operation. PostgreSQL + // instances only. ImportUser string `json:"importUser,omitempty"` // Kind: This is always sql#importContext. @@ -1276,10 +1398,7 @@ func (s *ImportContext) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ImportContextCsvImportOptions: Options for importing data as -// CSV. -// Importing CSV data using the Cloud SQL Admin API is not supported for -// PostgreSQL instances. +// ImportContextCsvImportOptions: Options for importing data as CSV. type ImportContextCsvImportOptions struct { // Columns: The columns to which CSV data is imported. If not specified, // all columns of the database table are loaded with CSV data. diff --git a/vendor/google.golang.org/api/storage/v1/storage-api.json b/vendor/google.golang.org/api/storage/v1/storage-api.json index 49d0a518..e771f9b1 100644 --- a/vendor/google.golang.org/api/storage/v1/storage-api.json +++ b/vendor/google.golang.org/api/storage/v1/storage-api.json @@ -26,7 +26,7 @@ "description": "Stores and retrieves potentially large, immutable data objects.", "discoveryVersion": "v1", "documentationLink": "https://developers.google.com/storage/docs/json_api/", - "etag": "\"J3WqvAcMk4eQjJXvfSI4Yr8VouA/KPalWULMnQfaqumeaBhBrVfHFNM\"", + "etag": "\"VPK3KBfpaEgZ16pozGOoMYfKc0U/0oTiRxFg5a8IRGYou40wPCps2h4\"", "icons": { "x16": "https://www.google.com/images/icons/product/cloud_storage-16.png", "x32": "https://www.google.com/images/icons/product/cloud_storage-32.png" @@ -2727,6 +2727,185 @@ }, "projects": { "resources": { + "hmacKeys": { + "methods": { + "create": { + "description": "Creates a new HMAC key for the specified service account.", + "httpMethod": "POST", + "id": "storage.projects.hmacKeys.create", + "parameterOrder": [ + "projectId", + "serviceAccountEmail" + ], + "parameters": { + "projectId": { + "description": "Project ID owning the service account.", + "location": "path", + "required": true, + "type": "string" + }, + "serviceAccountEmail": { + "description": "Email address of the service account.", + "location": "query", + "required": true, + "type": "string" + } + }, + "path": "projects/{projectId}/hmacKeys", + "response": { + "$ref": "HmacKey" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/devstorage.full_control" + ] + }, + "delete": { + "description": "Deletes an HMAC key.", + "httpMethod": "DELETE", + "id": "storage.projects.hmacKeys.delete", + "parameterOrder": [ + "projectId", + "accessId" + ], + "parameters": { + "accessId": { + "description": "Name of the HMAC key to be deleted.", + "location": "path", + "required": true, + "type": "string" + }, + "projectId": { + "description": "Project ID owning the requested key", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "projects/{projectId}/hmacKeys/{accessId}", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/devstorage.full_control", + "https://www.googleapis.com/auth/devstorage.read_write" + ] + }, + "get": { + "description": "Retrieves an HMAC key's metadata", + "httpMethod": "GET", + "id": "storage.projects.hmacKeys.get", + "parameterOrder": [ + "projectId", + "accessId" + ], + "parameters": { + "accessId": { + "description": "Name of the HMAC key.", + "location": "path", + "required": true, + "type": "string" + }, + "projectId": { + "description": "Project ID owning the service account of the requested key.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "projects/{projectId}/hmacKeys/{accessId}", + "response": { + "$ref": "HmacKeyMetadata" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/devstorage.read_only" + ] + }, + "list": { + "description": "Retrieves a list of HMAC keys matching the criteria.", + "httpMethod": "GET", + "id": "storage.projects.hmacKeys.list", + "parameterOrder": [ + "projectId" + ], + "parameters": { + "maxResults": { + "default": "1000", + "description": "Maximum number of items plus prefixes to return in a single page of responses. Because duplicate prefixes are omitted, fewer total results may be returned than requested. The service uses this parameter or 1,000 items, whichever is smaller.", + "format": "uint32", + "location": "query", + "minimum": "0", + "type": "integer" + }, + "pageToken": { + "description": "A previously-returned page token representing part of the larger set of results to view.", + "location": "query", + "type": "string" + }, + "projectId": { + "description": "Name of the project in which to look for HMAC keys.", + "location": "path", + "required": true, + "type": "string" + }, + "serviceAccountEmail": { + "description": "If present, only keys for the given service account are returned.", + "location": "query", + "type": "string" + }, + "showDeletedKeys": { + "description": "Whether or not to show keys in the DELETED state.", + "location": "query", + "type": "boolean" + } + }, + "path": "projects/{projectId}/hmacKeys", + "response": { + "$ref": "HmacKeysMetadata" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/devstorage.full_control", + "https://www.googleapis.com/auth/devstorage.read_only" + ] + }, + "update": { + "description": "Updates the state of an HMAC key. See the HMAC Key resource descriptor for valid states.", + "httpMethod": "PUT", + "id": "storage.projects.hmacKeys.update", + "parameterOrder": [ + "projectId", + "accessId" + ], + "parameters": { + "accessId": { + "description": "Name of the HMAC key being updated.", + "location": "path", + "required": true, + "type": "string" + }, + "projectId": { + "description": "Project ID owning the service account of the updated key.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "projects/{projectId}/hmacKeys/{accessId}", + "request": { + "$ref": "HmacKeyMetadata" + }, + "response": { + "$ref": "HmacKeyMetadata" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/devstorage.full_control" + ] + } + } + }, "serviceAccount": { "methods": { "get": { @@ -2766,7 +2945,7 @@ } } }, - "revision": "20181109", + "revision": "20190326", "rootUrl": "https://www.googleapis.com/", "schemas": { "Bucket": { @@ -2859,6 +3038,7 @@ "description": "The bucket's IAM configuration.", "properties": { "bucketPolicyOnly": { + "description": "The bucket's Bucket Policy Only configuration.", "properties": { "enabled": { "description": "If set, access checks only use bucket-level IAM policies or above.", @@ -3295,6 +3475,125 @@ }, "type": "object" }, + "Expr": { + "description": "Represents an expression text. Example: title: \"User account presence\" description: \"Determines whether the request has a user account\" expression: \"size(request.user) \u003e 0\"", + "id": "Expr", + "properties": { + "description": { + "description": "An optional description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.", + "type": "string" + }, + "expression": { + "description": "Textual representation of an expression in Common Expression Language syntax. The application context of the containing message determines which well-known feature set of CEL is supported.", + "type": "string" + }, + "kind": { + "default": "storage#expr", + "description": "The kind of item this is. For storage, this is always storage#expr. This field is ignored on input.", + "type": "string" + }, + "location": { + "description": "An optional string indicating the location of the expression for error reporting, e.g. a file name and a position in the file.", + "type": "string" + }, + "title": { + "description": "An optional title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.", + "type": "string" + } + }, + "type": "object" + }, + "HmacKey": { + "description": "JSON template to produce a JSON-style HMAC Key resource for Create responses.", + "id": "HmacKey", + "properties": { + "kind": { + "default": "storage#hmacKey", + "description": "The kind of item this is. For HMAC keys, this is always storage#hmacKey.", + "type": "string" + }, + "metadata": { + "description": "Key metadata.", + "type": "any" + }, + "secret": { + "description": "HMAC secret key material.", + "type": "string" + } + }, + "type": "object" + }, + "HmacKeyMetadata": { + "description": "JSON template to produce a JSON-style HMAC Key metadata resource.", + "id": "HmacKeyMetadata", + "properties": { + "accessId": { + "description": "The ID of the HMAC Key.", + "type": "string" + }, + "etag": { + "description": "HTTP 1.1 Entity tag for the access-control entry.", + "type": "string" + }, + "id": { + "description": "The ID of the HMAC key, including the Project ID and the Access ID.", + "type": "string" + }, + "kind": { + "default": "storage#hmacKeyMetadata", + "description": "The kind of item this is. For HMAC Key metadata, this is always storage#hmacKeyMetadata.", + "type": "string" + }, + "projectId": { + "description": "Project ID owning the service account to which the key authenticates.", + "type": "string" + }, + "selfLink": { + "description": "The link to this resource.", + "type": "string" + }, + "serviceAccountEmail": { + "description": "The email address of the key's associated service account.", + "type": "string" + }, + "state": { + "description": "The state of the key. Can be one of ACTIVE, INACTIVE, or DELETED.", + "type": "string" + }, + "timeCreated": { + "description": "The creation time of the HMAC key in RFC 3339 format.", + "type": "string" + }, + "updated": { + "description": "The last modification time of the HMAC key metadata in RFC 3339 format.", + "type": "string" + } + }, + "type": "object" + }, + "HmacKeysMetadata": { + "description": "A list of hmacKeys.", + "id": "HmacKeysMetadata", + "properties": { + "items": { + "description": "The list of items.", + "items": { + "$ref": "HmacKeyMetadata" + }, + "type": "array" + }, + "kind": { + "default": "storage#hmacKeysMetadata", + "description": "The kind of item this is. For lists of hmacKeys, this is always storage#hmacKeysMetadata.", + "type": "string" + }, + "nextPageToken": { + "description": "The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results.", + "type": "string" + } + }, + "type": "object" + }, "Notification": { "description": "A subscription to receive Google PubSub notifications.", "id": "Notification", @@ -3695,7 +3994,8 @@ "items": { "properties": { "condition": { - "type": "any" + "$ref": "Expr", + "description": "The condition that is associated with this binding. NOTE: an unsatisfied condition will not allow user access via current binding. Different bindings, including their conditions, are examined independently." }, "members": { "annotations": { diff --git a/vendor/google.golang.org/api/storage/v1/storage-gen.go b/vendor/google.golang.org/api/storage/v1/storage-gen.go index 606686f8..a29fdc1e 100644 --- a/vendor/google.golang.org/api/storage/v1/storage-gen.go +++ b/vendor/google.golang.org/api/storage/v1/storage-gen.go @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. All rights reserved. +// Copyright 2019 Google LLC. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. @@ -8,13 +8,39 @@ // // This package is DEPRECATED. Use package cloud.google.com/go/storage instead. // -// See https://developers.google.com/storage/docs/json_api/ +// For product documentation, see: https://developers.google.com/storage/docs/json_api/ +// +// Creating a client // // Usage example: // // import "google.golang.org/api/storage/v1" // ... -// storageService, err := storage.New(oauthHttpClient) +// ctx := context.Background() +// storageService, err := storage.NewService(ctx) +// +// In this example, Google Application Default Credentials are used for authentication. +// +// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// +// Other authentication options +// +// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// +// storageService, err := storage.NewService(ctx, option.WithScopes(storage.DevstorageReadWriteScope)) +// +// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// +// storageService, err := storage.NewService(ctx, option.WithAPIKey("AIza...")) +// +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// +// config := &oauth2.Config{...} +// // ... +// token, err := config.Exchange(ctx, ...) +// storageService, err := storage.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) +// +// See https://godoc.org/google.golang.org/api/option/ for details on options. package storage // import "google.golang.org/api/storage/v1" import ( @@ -31,6 +57,8 @@ import ( gensupport "google.golang.org/api/gensupport" googleapi "google.golang.org/api/googleapi" + option "google.golang.org/api/option" + htransport "google.golang.org/api/transport/http" ) // Always reference these packages, just in case the auto-generated code @@ -70,6 +98,36 @@ const ( DevstorageReadWriteScope = "https://www.googleapis.com/auth/devstorage.read_write" ) +// NewService creates a new Service. +func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { + scopesOption := option.WithScopes( + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/devstorage.full_control", + "https://www.googleapis.com/auth/devstorage.read_only", + "https://www.googleapis.com/auth/devstorage.read_write", + ) + // NOTE: prepend, so we don't override user-specified scopes. + opts = append([]option.ClientOption{scopesOption}, opts...) + client, endpoint, err := htransport.NewClient(ctx, opts...) + if err != nil { + return nil, err + } + s, err := New(client) + if err != nil { + return nil, err + } + if endpoint != "" { + s.BasePath = endpoint + } + return s, nil +} + +// New creates a new Service. It uses the provided http.Client for requests. +// +// Deprecated: please use NewService instead. +// To provide a custom HTTP client, use option.WithHTTPClient. +// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. func New(client *http.Client) (*Service, error) { if client == nil { return nil, errors.New("client is nil") @@ -180,6 +238,7 @@ type ObjectsService struct { func NewProjectsService(s *Service) *ProjectsService { rs := &ProjectsService{s: s} + rs.HmacKeys = NewProjectsHmacKeysService(s) rs.ServiceAccount = NewProjectsServiceAccountService(s) return rs } @@ -187,9 +246,20 @@ func NewProjectsService(s *Service) *ProjectsService { type ProjectsService struct { s *Service + HmacKeys *ProjectsHmacKeysService + ServiceAccount *ProjectsServiceAccountService } +func NewProjectsHmacKeysService(s *Service) *ProjectsHmacKeysService { + rs := &ProjectsHmacKeysService{s: s} + return rs +} + +type ProjectsHmacKeysService struct { + s *Service +} + func NewProjectsServiceAccountService(s *Service) *ProjectsServiceAccountService { rs := &ProjectsServiceAccountService{s: s} return rs @@ -449,6 +519,7 @@ func (s *BucketEncryption) MarshalJSON() ([]byte, error) { // BucketIamConfiguration: The bucket's IAM configuration. type BucketIamConfiguration struct { + // BucketPolicyOnly: The bucket's Bucket Policy Only configuration. BucketPolicyOnly *BucketIamConfigurationBucketPolicyOnly `json:"bucketPolicyOnly,omitempty"` // ForceSendFields is a list of field names (e.g. "BucketPolicyOnly") to @@ -475,6 +546,8 @@ func (s *BucketIamConfiguration) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// BucketIamConfigurationBucketPolicyOnly: The bucket's Bucket Policy +// Only configuration. type BucketIamConfigurationBucketPolicyOnly struct { // Enabled: If set, access checks only use bucket-level IAM policies or // above. @@ -1201,6 +1274,204 @@ func (s *ComposeRequestSourceObjectsObjectPreconditions) MarshalJSON() ([]byte, return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// Expr: Represents an expression text. Example: title: "User account +// presence" description: "Determines whether the request has a user +// account" expression: "size(request.user) > 0" +type Expr struct { + // Description: An optional description of the expression. This is a + // longer text which describes the expression, e.g. when hovered over it + // in a UI. + Description string `json:"description,omitempty"` + + // Expression: Textual representation of an expression in Common + // Expression Language syntax. The application context of the containing + // message determines which well-known feature set of CEL is supported. + Expression string `json:"expression,omitempty"` + + // Kind: The kind of item this is. For storage, this is always + // storage#expr. This field is ignored on input. + Kind string `json:"kind,omitempty"` + + // Location: An optional string indicating the location of the + // expression for error reporting, e.g. a file name and a position in + // the file. + Location string `json:"location,omitempty"` + + // Title: An optional title for the expression, i.e. a short string + // describing its purpose. This can be used e.g. in UIs which allow to + // enter the expression. + Title string `json:"title,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Description") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Description") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Expr) MarshalJSON() ([]byte, error) { + type NoMethod Expr + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// HmacKey: JSON template to produce a JSON-style HMAC Key resource for +// Create responses. +type HmacKey struct { + // Kind: The kind of item this is. For HMAC keys, this is always + // storage#hmacKey. + Kind string `json:"kind,omitempty"` + + // Metadata: Key metadata. + Metadata interface{} `json:"metadata,omitempty"` + + // Secret: HMAC secret key material. + Secret string `json:"secret,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Kind") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Kind") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *HmacKey) MarshalJSON() ([]byte, error) { + type NoMethod HmacKey + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// HmacKeyMetadata: JSON template to produce a JSON-style HMAC Key +// metadata resource. +type HmacKeyMetadata struct { + // AccessId: The ID of the HMAC Key. + AccessId string `json:"accessId,omitempty"` + + // Etag: HTTP 1.1 Entity tag for the access-control entry. + Etag string `json:"etag,omitempty"` + + // Id: The ID of the HMAC key, including the Project ID and the Access + // ID. + Id string `json:"id,omitempty"` + + // Kind: The kind of item this is. For HMAC Key metadata, this is always + // storage#hmacKeyMetadata. + Kind string `json:"kind,omitempty"` + + // ProjectId: Project ID owning the service account to which the key + // authenticates. + ProjectId string `json:"projectId,omitempty"` + + // SelfLink: The link to this resource. + SelfLink string `json:"selfLink,omitempty"` + + // ServiceAccountEmail: The email address of the key's associated + // service account. + ServiceAccountEmail string `json:"serviceAccountEmail,omitempty"` + + // State: The state of the key. Can be one of ACTIVE, INACTIVE, or + // DELETED. + State string `json:"state,omitempty"` + + // TimeCreated: The creation time of the HMAC key in RFC 3339 format. + TimeCreated string `json:"timeCreated,omitempty"` + + // Updated: The last modification time of the HMAC key metadata in RFC + // 3339 format. + Updated string `json:"updated,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "AccessId") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AccessId") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *HmacKeyMetadata) MarshalJSON() ([]byte, error) { + type NoMethod HmacKeyMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// HmacKeysMetadata: A list of hmacKeys. +type HmacKeysMetadata struct { + // Items: The list of items. + Items []*HmacKeyMetadata `json:"items,omitempty"` + + // Kind: The kind of item this is. For lists of hmacKeys, this is always + // storage#hmacKeysMetadata. + Kind string `json:"kind,omitempty"` + + // NextPageToken: The continuation token, used to page through large + // result sets. Provide this value in a subsequent request to return the + // next page of results. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Items") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Items") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *HmacKeysMetadata) MarshalJSON() ([]byte, error) { + type NoMethod HmacKeysMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Notification: A subscription to receive Google PubSub notifications. type Notification struct { // CustomAttributes: An optional list of additional attributes to attach @@ -1784,7 +2055,11 @@ func (s *Policy) MarshalJSON() ([]byte, error) { } type PolicyBindings struct { - Condition interface{} `json:"condition,omitempty"` + // Condition: The condition that is associated with this binding. NOTE: + // an unsatisfied condition will not allow user access via current + // binding. Different bindings, including their conditions, are examined + // independently. + Condition *Expr `json:"condition,omitempty"` // Members: A collection of identifiers for members who may assume the // provided role. Recognized identifiers are as follows: @@ -9174,7 +9449,7 @@ func (c *ObjectsInsertCall) doRequest(alt string) (*http.Response, error) { return nil, err } req.Header = reqHeaders - gensupport.SetGetBody(req, getBody) + req.GetBody = getBody googleapi.Expand(req.URL, map[string]string{ "bucket": c.bucket, }) @@ -11313,6 +11588,776 @@ func (c *ObjectsWatchAllCall) Do(opts ...googleapi.CallOption) (*Channel, error) } +// method id "storage.projects.hmacKeys.create": + +type ProjectsHmacKeysCreateCall struct { + s *Service + projectId string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new HMAC key for the specified service account. +func (r *ProjectsHmacKeysService) Create(projectId string, serviceAccountEmail string) *ProjectsHmacKeysCreateCall { + c := &ProjectsHmacKeysCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.projectId = projectId + c.urlParams_.Set("serviceAccountEmail", serviceAccountEmail) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsHmacKeysCreateCall) Fields(s ...googleapi.Field) *ProjectsHmacKeysCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsHmacKeysCreateCall) Context(ctx context.Context) *ProjectsHmacKeysCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsHmacKeysCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsHmacKeysCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{projectId}/hmacKeys") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "projectId": c.projectId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "storage.projects.hmacKeys.create" call. +// Exactly one of *HmacKey or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *HmacKey.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsHmacKeysCreateCall) Do(opts ...googleapi.CallOption) (*HmacKey, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &HmacKey{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a new HMAC key for the specified service account.", + // "httpMethod": "POST", + // "id": "storage.projects.hmacKeys.create", + // "parameterOrder": [ + // "projectId", + // "serviceAccountEmail" + // ], + // "parameters": { + // "projectId": { + // "description": "Project ID owning the service account.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "serviceAccountEmail": { + // "description": "Email address of the service account.", + // "location": "query", + // "required": true, + // "type": "string" + // } + // }, + // "path": "projects/{projectId}/hmacKeys", + // "response": { + // "$ref": "HmacKey" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/devstorage.full_control" + // ] + // } + +} + +// method id "storage.projects.hmacKeys.delete": + +type ProjectsHmacKeysDeleteCall struct { + s *Service + projectId string + accessId string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes an HMAC key. +func (r *ProjectsHmacKeysService) Delete(projectId string, accessId string) *ProjectsHmacKeysDeleteCall { + c := &ProjectsHmacKeysDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.projectId = projectId + c.accessId = accessId + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsHmacKeysDeleteCall) Fields(s ...googleapi.Field) *ProjectsHmacKeysDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsHmacKeysDeleteCall) Context(ctx context.Context) *ProjectsHmacKeysDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsHmacKeysDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsHmacKeysDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{projectId}/hmacKeys/{accessId}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "projectId": c.projectId, + "accessId": c.accessId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "storage.projects.hmacKeys.delete" call. +func (c *ProjectsHmacKeysDeleteCall) Do(opts ...googleapi.CallOption) error { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if err != nil { + return err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return err + } + return nil + // { + // "description": "Deletes an HMAC key.", + // "httpMethod": "DELETE", + // "id": "storage.projects.hmacKeys.delete", + // "parameterOrder": [ + // "projectId", + // "accessId" + // ], + // "parameters": { + // "accessId": { + // "description": "Name of the HMAC key to be deleted.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "projectId": { + // "description": "Project ID owning the requested key", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "projects/{projectId}/hmacKeys/{accessId}", + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/devstorage.full_control", + // "https://www.googleapis.com/auth/devstorage.read_write" + // ] + // } + +} + +// method id "storage.projects.hmacKeys.get": + +type ProjectsHmacKeysGetCall struct { + s *Service + projectId string + accessId string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Retrieves an HMAC key's metadata +func (r *ProjectsHmacKeysService) Get(projectId string, accessId string) *ProjectsHmacKeysGetCall { + c := &ProjectsHmacKeysGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.projectId = projectId + c.accessId = accessId + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsHmacKeysGetCall) Fields(s ...googleapi.Field) *ProjectsHmacKeysGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsHmacKeysGetCall) IfNoneMatch(entityTag string) *ProjectsHmacKeysGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsHmacKeysGetCall) Context(ctx context.Context) *ProjectsHmacKeysGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsHmacKeysGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsHmacKeysGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{projectId}/hmacKeys/{accessId}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "projectId": c.projectId, + "accessId": c.accessId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "storage.projects.hmacKeys.get" call. +// Exactly one of *HmacKeyMetadata or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *HmacKeyMetadata.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsHmacKeysGetCall) Do(opts ...googleapi.CallOption) (*HmacKeyMetadata, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &HmacKeyMetadata{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves an HMAC key's metadata", + // "httpMethod": "GET", + // "id": "storage.projects.hmacKeys.get", + // "parameterOrder": [ + // "projectId", + // "accessId" + // ], + // "parameters": { + // "accessId": { + // "description": "Name of the HMAC key.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "projectId": { + // "description": "Project ID owning the service account of the requested key.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "projects/{projectId}/hmacKeys/{accessId}", + // "response": { + // "$ref": "HmacKeyMetadata" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloud-platform.read-only", + // "https://www.googleapis.com/auth/devstorage.read_only" + // ] + // } + +} + +// method id "storage.projects.hmacKeys.list": + +type ProjectsHmacKeysListCall struct { + s *Service + projectId string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Retrieves a list of HMAC keys matching the criteria. +func (r *ProjectsHmacKeysService) List(projectId string) *ProjectsHmacKeysListCall { + c := &ProjectsHmacKeysListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.projectId = projectId + return c +} + +// MaxResults sets the optional parameter "maxResults": Maximum number +// of items plus prefixes to return in a single page of responses. +// Because duplicate prefixes are omitted, fewer total results may be +// returned than requested. The service uses this parameter or 1,000 +// items, whichever is smaller. +func (c *ProjectsHmacKeysListCall) MaxResults(maxResults int64) *ProjectsHmacKeysListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// PageToken sets the optional parameter "pageToken": A +// previously-returned page token representing part of the larger set of +// results to view. +func (c *ProjectsHmacKeysListCall) PageToken(pageToken string) *ProjectsHmacKeysListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ServiceAccountEmail sets the optional parameter +// "serviceAccountEmail": If present, only keys for the given service +// account are returned. +func (c *ProjectsHmacKeysListCall) ServiceAccountEmail(serviceAccountEmail string) *ProjectsHmacKeysListCall { + c.urlParams_.Set("serviceAccountEmail", serviceAccountEmail) + return c +} + +// ShowDeletedKeys sets the optional parameter "showDeletedKeys": +// Whether or not to show keys in the DELETED state. +func (c *ProjectsHmacKeysListCall) ShowDeletedKeys(showDeletedKeys bool) *ProjectsHmacKeysListCall { + c.urlParams_.Set("showDeletedKeys", fmt.Sprint(showDeletedKeys)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsHmacKeysListCall) Fields(s ...googleapi.Field) *ProjectsHmacKeysListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsHmacKeysListCall) IfNoneMatch(entityTag string) *ProjectsHmacKeysListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsHmacKeysListCall) Context(ctx context.Context) *ProjectsHmacKeysListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsHmacKeysListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsHmacKeysListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{projectId}/hmacKeys") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "projectId": c.projectId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "storage.projects.hmacKeys.list" call. +// Exactly one of *HmacKeysMetadata or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *HmacKeysMetadata.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsHmacKeysListCall) Do(opts ...googleapi.CallOption) (*HmacKeysMetadata, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &HmacKeysMetadata{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves a list of HMAC keys matching the criteria.", + // "httpMethod": "GET", + // "id": "storage.projects.hmacKeys.list", + // "parameterOrder": [ + // "projectId" + // ], + // "parameters": { + // "maxResults": { + // "default": "1000", + // "description": "Maximum number of items plus prefixes to return in a single page of responses. Because duplicate prefixes are omitted, fewer total results may be returned than requested. The service uses this parameter or 1,000 items, whichever is smaller.", + // "format": "uint32", + // "location": "query", + // "minimum": "0", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A previously-returned page token representing part of the larger set of results to view.", + // "location": "query", + // "type": "string" + // }, + // "projectId": { + // "description": "Name of the project in which to look for HMAC keys.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "serviceAccountEmail": { + // "description": "If present, only keys for the given service account are returned.", + // "location": "query", + // "type": "string" + // }, + // "showDeletedKeys": { + // "description": "Whether or not to show keys in the DELETED state.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "projects/{projectId}/hmacKeys", + // "response": { + // "$ref": "HmacKeysMetadata" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloud-platform.read-only", + // "https://www.googleapis.com/auth/devstorage.full_control", + // "https://www.googleapis.com/auth/devstorage.read_only" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsHmacKeysListCall) Pages(ctx context.Context, f func(*HmacKeysMetadata) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "storage.projects.hmacKeys.update": + +type ProjectsHmacKeysUpdateCall struct { + s *Service + projectId string + accessId string + hmackeymetadata *HmacKeyMetadata + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Update: Updates the state of an HMAC key. See the HMAC Key resource +// descriptor for valid states. +func (r *ProjectsHmacKeysService) Update(projectId string, accessId string, hmackeymetadata *HmacKeyMetadata) *ProjectsHmacKeysUpdateCall { + c := &ProjectsHmacKeysUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.projectId = projectId + c.accessId = accessId + c.hmackeymetadata = hmackeymetadata + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsHmacKeysUpdateCall) Fields(s ...googleapi.Field) *ProjectsHmacKeysUpdateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsHmacKeysUpdateCall) Context(ctx context.Context) *ProjectsHmacKeysUpdateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsHmacKeysUpdateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsHmacKeysUpdateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.hmackeymetadata) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{projectId}/hmacKeys/{accessId}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PUT", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "projectId": c.projectId, + "accessId": c.accessId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "storage.projects.hmacKeys.update" call. +// Exactly one of *HmacKeyMetadata or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *HmacKeyMetadata.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsHmacKeysUpdateCall) Do(opts ...googleapi.CallOption) (*HmacKeyMetadata, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &HmacKeyMetadata{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates the state of an HMAC key. See the HMAC Key resource descriptor for valid states.", + // "httpMethod": "PUT", + // "id": "storage.projects.hmacKeys.update", + // "parameterOrder": [ + // "projectId", + // "accessId" + // ], + // "parameters": { + // "accessId": { + // "description": "Name of the HMAC key being updated.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "projectId": { + // "description": "Project ID owning the service account of the updated key.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "projects/{projectId}/hmacKeys/{accessId}", + // "request": { + // "$ref": "HmacKeyMetadata" + // }, + // "response": { + // "$ref": "HmacKeyMetadata" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/devstorage.full_control" + // ] + // } + +} + // method id "storage.projects.serviceAccount.get": type ProjectsServiceAccountGetCall struct { diff --git a/vendor/google.golang.org/api/storagetransfer/v1/storagetransfer-api.json b/vendor/google.golang.org/api/storagetransfer/v1/storagetransfer-api.json index 3ecaffed..8e6165e4 100644 --- a/vendor/google.golang.org/api/storagetransfer/v1/storagetransfer-api.json +++ b/vendor/google.golang.org/api/storagetransfer/v1/storagetransfer-api.json @@ -13,7 +13,8 @@ "batchPath": "batch", "description": "Transfers data from external data sources to a Google Cloud Storage bucket or between Google Cloud Storage buckets.", "discoveryVersion": "v1", - "documentationLink": "https://cloud.google.com/storage/transfer", + "documentationLink": "https://cloud.google.com/storage-transfer/docs", + "fullyEncodeReservedExpansion": true, "icons": { "x16": "http://www.google.com/images/icons/product/search-16.gif", "x32": "http://www.google.com/images/icons/product/search-32.gif" @@ -188,7 +189,7 @@ "parameterOrder": [], "parameters": { "filter": { - "description": "A list of query parameters specified as JSON text in the form of\n{\"project_id\":\"my_project_id\",\n\"job_names\":[\"jobid1\",\"jobid2\",...],\n\"job_statuses\":[\"status1\",\"status2\",...]}.\nSince `job_names` and `job_statuses` support multiple values, their values\nmust be specified with array notation. `project_id` is required. `job_names`\nand `job_statuses` are optional. The valid values for `job_statuses` are\ncase-insensitive: `ENABLED`, `DISABLED`, and `DELETED`.", + "description": "A list of query parameters specified as JSON text in the form of\n{\"project_id\":\"my_project_id\",\n\"job_names\":[\"jobid1\",\"jobid2\",...],\n\"job_statuses\":[\"status1\",\"status2\",...]}.\nSince `job_names` and `job_statuses` support multiple values, their values\nmust be specified with array notation. `project_id` is required.\n`job_names` and `job_statuses` are optional. The valid values for\n`job_statuses` are case-insensitive: `ENABLED`, `DISABLED`, and `DELETED`.", "location": "query", "type": "string" }, @@ -419,11 +420,11 @@ } } }, - "revision": "20180919", + "revision": "20190419", "rootUrl": "https://storagetransfer.googleapis.com/", "schemas": { "AwsAccessKey": { - "description": "AWS access key (see\n[AWS Security Credentials](http://docs.aws.amazon.com/general/latest/gr/aws-security-credentials.html)).", + "description": "AWS access key (see\n[AWS Security\nCredentials](http://docs.aws.amazon.com/general/latest/gr/aws-security-credentials.html)).", "id": "AwsAccessKey", "properties": { "accessKeyId": { @@ -446,7 +447,7 @@ "description": "AWS access key used to sign the API requests to the AWS S3 bucket.\nPermissions on the bucket must be granted to the access ID of the\nAWS access key.\nRequired." }, "bucketName": { - "description": "S3 Bucket name (see\n[Creating a bucket](http://docs.aws.amazon.com/AmazonS3/latest/dev/create-bucket-get-location-example.html)).\nRequired.", + "description": "S3 Bucket name (see\n[Creating a\nbucket](http://docs.aws.amazon.com/AmazonS3/latest/dev/create-bucket-get-location-example.html)).\nRequired.", "type": "string" } }, @@ -539,7 +540,7 @@ "The operation was attempted past the valid range. E.g., seeking or\nreading past end-of-file.\n\nUnlike `INVALID_ARGUMENT`, this error indicates a problem that may\nbe fixed if the system state changes. For example, a 32-bit file\nsystem will generate `INVALID_ARGUMENT` if asked to read at an\noffset that is not in the range [0,2^32-1], but it will generate\n`OUT_OF_RANGE` if asked to read from an offset past the current\nfile size.\n\nThere is a fair bit of overlap between `FAILED_PRECONDITION` and\n`OUT_OF_RANGE`. We recommend using `OUT_OF_RANGE` (the more specific\nerror) when it applies so that callers who are iterating through\na space can easily look for an `OUT_OF_RANGE` error to detect when\nthey are done.\n\nHTTP Mapping: 400 Bad Request", "The operation is not implemented or is not supported/enabled in this\nservice.\n\nHTTP Mapping: 501 Not Implemented", "Internal errors. This means that some invariants expected by the\nunderlying system have been broken. This error code is reserved\nfor serious errors.\n\nHTTP Mapping: 500 Internal Server Error", - "The service is currently unavailable. This is most likely a\ntransient condition, which can be corrected by retrying with\na backoff.\n\nSee the guidelines above for deciding between `FAILED_PRECONDITION`,\n`ABORTED`, and `UNAVAILABLE`.\n\nHTTP Mapping: 503 Service Unavailable", + "The service is currently unavailable. This is most likely a\ntransient condition, which can be corrected by retrying with\na backoff. Note that it is not always safe to retry\nnon-idempotent operations.\n\nSee the guidelines above for deciding between `FAILED_PRECONDITION`,\n`ABORTED`, and `UNAVAILABLE`.\n\nHTTP Mapping: 503 Service Unavailable", "Unrecoverable data loss or corruption.\n\nHTTP Mapping: 500 Internal Server Error" ], "type": "string" @@ -550,7 +551,7 @@ "type": "string" }, "errorLogEntries": { - "description": "Error samples.", + "description": "Error samples.\n\nNo more than 100 error log entries may be recorded for a given\nerror code for a single task.", "items": { "$ref": "ErrorLogEntry" }, @@ -629,7 +630,7 @@ "type": "object" }, "ObjectConditions": { - "description": "Conditions that determine which objects will be transferred.", + "description": "Conditions that determine which objects will be transferred. Applies only\nto S3 and GCS objects.", "id": "ObjectConditions", "properties": { "excludePrefixes": { @@ -640,19 +641,19 @@ "type": "array" }, "includePrefixes": { - "description": "If `includePrefixes` is specified, objects that satisfy the object\nconditions must have names that start with one of the `includePrefixes`\nand that do not start with any of the `excludePrefixes`. If `includePrefixes`\nis not specified, all objects except those that have names starting with\none of the `excludePrefixes` must satisfy the object conditions.\n\nRequirements:\n\n * Each include-prefix and exclude-prefix can contain any sequence of\n Unicode characters, of max length 1024 bytes when UTF8-encoded, and\n must not contain Carriage Return or Line Feed characters. Wildcard\n matching and regular expression matching are not supported.\n\n * Each include-prefix and exclude-prefix must omit the leading slash.\n For example, to include the `requests.gz` object in a transfer from\n `s3://my-aws-bucket/logs/y=2015/requests.gz`, specify the include\n prefix as `logs/y=2015/requests.gz`.\n\n * None of the include-prefix or the exclude-prefix values can be empty,\n if specified.\n\n * Each include-prefix must include a distinct portion of the object\n namespace, i.e., no include-prefix may be a prefix of another\n include-prefix.\n\n * Each exclude-prefix must exclude a distinct portion of the object\n namespace, i.e., no exclude-prefix may be a prefix of another\n exclude-prefix.\n\n * If `includePrefixes` is specified, then each exclude-prefix must start\n with the value of a path explicitly included by `includePrefixes`.\n\nThe max size of `includePrefixes` is 1000.", + "description": "If `includePrefixes` is specified, objects that satisfy the object\nconditions must have names that start with one of the `includePrefixes`\nand that do not start with any of the `excludePrefixes`. If\n`includePrefixes` is not specified, all objects except those that have\nnames starting with one of the `excludePrefixes` must satisfy the object\nconditions.\n\nRequirements:\n\n * Each include-prefix and exclude-prefix can contain any sequence of\n Unicode characters, of max length 1024 bytes when UTF8-encoded, and\n must not contain Carriage Return or Line Feed characters. Wildcard\n matching and regular expression matching are not supported.\n\n * Each include-prefix and exclude-prefix must omit the leading slash.\n For example, to include the `requests.gz` object in a transfer from\n `s3://my-aws-bucket/logs/y=2015/requests.gz`, specify the include\n prefix as `logs/y=2015/requests.gz`.\n\n * None of the include-prefix or the exclude-prefix values can be empty,\n if specified.\n\n * Each include-prefix must include a distinct portion of the object\n namespace, i.e., no include-prefix may be a prefix of another\n include-prefix.\n\n * Each exclude-prefix must exclude a distinct portion of the object\n namespace, i.e., no exclude-prefix may be a prefix of another\n exclude-prefix.\n\n * If `includePrefixes` is specified, then each exclude-prefix must start\n with the value of a path explicitly included by `includePrefixes`.\n\nThe max size of `includePrefixes` is 1000.", "items": { "type": "string" }, "type": "array" }, "maxTimeElapsedSinceLastModification": { - "description": "`maxTimeElapsedSinceLastModification` is the complement to\n`minTimeElapsedSinceLastModification`.", + "description": "If specified, only objects with a `lastModificationTime` on or after\n`NOW` - `maxTimeElapsedSinceLastModification` and objects that don't have\na `lastModificationTime` are transferred.\n\nNote that `NOW` refers to the creation time of the transfer job, and\n`lastModificationTime` refers to the time of the last change to the\nobject's content or metadata. Specifically, this would be the `updated`\nproperty of GCS objects and the `LastModified` field of S3 objects.", "format": "google-duration", "type": "string" }, "minTimeElapsedSinceLastModification": { - "description": "If unspecified, `minTimeElapsedSinceLastModification` takes a zero value\nand `maxTimeElapsedSinceLastModification` takes the maximum possible\nvalue of Duration. Objects that satisfy the object conditions\nmust either have a `lastModificationTime` greater or equal to\n`NOW` - `maxTimeElapsedSinceLastModification` and less than\n`NOW` - `minTimeElapsedSinceLastModification`, or not have a\n`lastModificationTime`.", + "description": "If specified, only objects with a `lastModificationTime` before\n`NOW` - `minTimeElapsedSinceLastModification` and objects that don't have a\n`lastModificationTime` are transferred.\n\nNote that `NOW` refers to the creation time of the transfer job, and\n`lastModificationTime` refers to the time of the last change to the\nobject's content or metadata. Specifically, this would be the `updated`\nproperty of GCS objects and the `LastModified` field of S3 objects.", "format": "google-duration", "type": "string" } @@ -726,7 +727,7 @@ "type": "object" }, "Status": { - "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", + "description": "The `Status` type defines a logical error model that is suitable for\ndifferent programming environments, including REST APIs and RPC APIs. It is\nused by [gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error\nmessage, and error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", "id": "Status", "properties": { "code": { @@ -894,7 +895,7 @@ "type": "string" }, "projectId": { - "description": "The ID of the Google Cloud Platform Console project that owns the job.", + "description": "The ID of the Google Cloud Platform Project that owns the job.", "type": "string" }, "schedule": { @@ -949,7 +950,7 @@ "type": "string" }, "projectId": { - "description": "The ID of the Google Cloud Platform Console project that owns the operation.\nRequired.", + "description": "The ID of the Google Cloud Platform Project that owns the operation.\nRequired.", "type": "string" }, "startTime": { diff --git a/vendor/google.golang.org/api/storagetransfer/v1/storagetransfer-gen.go b/vendor/google.golang.org/api/storagetransfer/v1/storagetransfer-gen.go index 8352af6c..b548d6d2 100644 --- a/vendor/google.golang.org/api/storagetransfer/v1/storagetransfer-gen.go +++ b/vendor/google.golang.org/api/storagetransfer/v1/storagetransfer-gen.go @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. All rights reserved. +// Copyright 2019 Google LLC. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. @@ -6,13 +6,35 @@ // Package storagetransfer provides access to the Storage Transfer API. // -// See https://cloud.google.com/storage/transfer +// For product documentation, see: https://cloud.google.com/storage-transfer/docs +// +// Creating a client // // Usage example: // // import "google.golang.org/api/storagetransfer/v1" // ... -// storagetransferService, err := storagetransfer.New(oauthHttpClient) +// ctx := context.Background() +// storagetransferService, err := storagetransfer.NewService(ctx) +// +// In this example, Google Application Default Credentials are used for authentication. +// +// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// +// Other authentication options +// +// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// +// storagetransferService, err := storagetransfer.NewService(ctx, option.WithAPIKey("AIza...")) +// +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// +// config := &oauth2.Config{...} +// // ... +// token, err := config.Exchange(ctx, ...) +// storagetransferService, err := storagetransfer.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) +// +// See https://godoc.org/google.golang.org/api/option/ for details on options. package storagetransfer // import "google.golang.org/api/storagetransfer/v1" import ( @@ -29,6 +51,8 @@ import ( gensupport "google.golang.org/api/gensupport" googleapi "google.golang.org/api/googleapi" + option "google.golang.org/api/option" + htransport "google.golang.org/api/transport/http" ) // Always reference these packages, just in case the auto-generated code @@ -56,6 +80,32 @@ const ( CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" ) +// NewService creates a new Service. +func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { + scopesOption := option.WithScopes( + "https://www.googleapis.com/auth/cloud-platform", + ) + // NOTE: prepend, so we don't override user-specified scopes. + opts = append([]option.ClientOption{scopesOption}, opts...) + client, endpoint, err := htransport.NewClient(ctx, opts...) + if err != nil { + return nil, err + } + s, err := New(client) + if err != nil { + return nil, err + } + if endpoint != "" { + s.BasePath = endpoint + } + return s, nil +} + +// New creates a new Service. It uses the provided http.Client for requests. +// +// Deprecated: please use NewService instead. +// To provide a custom HTTP client, use option.WithHTTPClient. +// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. func New(client *http.Client) (*Service, error) { if client == nil { return nil, errors.New("client is nil") @@ -114,9 +164,10 @@ type TransferOperationsService struct { } // AwsAccessKey: AWS access key (see -// [AWS Security -// Credentials](http://docs.aws.amazon.com/general/latest/gr/aws-security -// -credentials.html)). +// [AWS +// Security +// Credentials](http://docs.aws.amazon.com/general/latest/gr/aws +// -security-credentials.html)). type AwsAccessKey struct { // AccessKeyId: AWS access key ID. // Required. @@ -163,9 +214,10 @@ type AwsS3Data struct { AwsAccessKey *AwsAccessKey `json:"awsAccessKey,omitempty"` // BucketName: S3 Bucket name (see - // [Creating a - // bucket](http://docs.aws.amazon.com/AmazonS3/latest/dev/create-bucket-g - // et-location-example.html)). + // [Creating + // a + // bucket](http://docs.aws.amazon.com/AmazonS3/latest/dev/create-bucket + // -get-location-example.html)). // Required. BucketName string `json:"bucketName,omitempty"` @@ -449,7 +501,8 @@ type ErrorSummary struct { // "UNAVAILABLE" - The service is currently unavailable. This is most // likely a // transient condition, which can be corrected by retrying with - // a backoff. + // a backoff. Note that it is not always safe to retry + // non-idempotent operations. // // See the guidelines above for deciding between // `FAILED_PRECONDITION`, @@ -466,6 +519,9 @@ type ErrorSummary struct { ErrorCount int64 `json:"errorCount,omitempty,string"` // ErrorLogEntries: Error samples. + // + // No more than 100 error log entries may be recorded for a given + // error code for a single task. ErrorLogEntries []*ErrorLogEntry `json:"errorLogEntries,omitempty"` // ForceSendFields is a list of field names (e.g. "ErrorCode") to @@ -728,7 +784,8 @@ func (s *ListTransferJobsResponse) MarshalJSON() ([]byte, error) { } // ObjectConditions: Conditions that determine which objects will be -// transferred. +// transferred. Applies only +// to S3 and GCS objects. type ObjectConditions struct { // ExcludePrefixes: `excludePrefixes` must follow the requirements // described for @@ -741,11 +798,12 @@ type ObjectConditions struct { // satisfy the object // conditions must have names that start with one of the // `includePrefixes` - // and that do not start with any of the `excludePrefixes`. If - // `includePrefixes` - // is not specified, all objects except those that have names starting - // with - // one of the `excludePrefixes` must satisfy the object + // and that do not start with any of the `excludePrefixes`. + // If + // `includePrefixes` is not specified, all objects except those that + // have + // names starting with one of the `excludePrefixes` must satisfy the + // object // conditions. // // Requirements: @@ -788,22 +846,34 @@ type ObjectConditions struct { // The max size of `includePrefixes` is 1000. IncludePrefixes []string `json:"includePrefixes,omitempty"` - // MaxTimeElapsedSinceLastModification: - // `maxTimeElapsedSinceLastModification` is the complement - // to - // `minTimeElapsedSinceLastModification`. + // MaxTimeElapsedSinceLastModification: If specified, only objects with + // a `lastModificationTime` on or after + // `NOW` - `maxTimeElapsedSinceLastModification` and objects that don't + // have + // a `lastModificationTime` are transferred. + // + // Note that `NOW` refers to the creation time of the transfer job, + // and + // `lastModificationTime` refers to the time of the last change to + // the + // object's content or metadata. Specifically, this would be the + // `updated` + // property of GCS objects and the `LastModified` field of S3 objects. MaxTimeElapsedSinceLastModification string `json:"maxTimeElapsedSinceLastModification,omitempty"` - // MinTimeElapsedSinceLastModification: If unspecified, - // `minTimeElapsedSinceLastModification` takes a zero value - // and `maxTimeElapsedSinceLastModification` takes the maximum - // possible - // value of Duration. Objects that satisfy the object conditions - // must either have a `lastModificationTime` greater or equal to - // `NOW` - `maxTimeElapsedSinceLastModification` and less than - // `NOW` - `minTimeElapsedSinceLastModification`, or not have - // a - // `lastModificationTime`. + // MinTimeElapsedSinceLastModification: If specified, only objects with + // a `lastModificationTime` before + // `NOW` - `minTimeElapsedSinceLastModification` and objects that don't + // have a + // `lastModificationTime` are transferred. + // + // Note that `NOW` refers to the creation time of the transfer job, + // and + // `lastModificationTime` refers to the time of the last change to + // the + // object's content or metadata. Specifically, this would be the + // `updated` + // property of GCS objects and the `LastModified` field of S3 objects. MinTimeElapsedSinceLastModification string `json:"minTimeElapsedSinceLastModification,omitempty"` // ForceSendFields is a list of field names (e.g. "ExcludePrefixes") to @@ -965,20 +1035,20 @@ func (s *Schedule) MarshalJSON() ([]byte, error) { } // Status: The `Status` type defines a logical error model that is -// suitable for different -// programming environments, including REST APIs and RPC APIs. It is -// used by -// [gRPC](https://github.com/grpc). The error model is designed to -// be: +// suitable for +// different programming environments, including REST APIs and RPC APIs. +// It is +// used by [gRPC](https://github.com/grpc). The error model is designed +// to be: // // - Simple to use and understand for most users // - Flexible enough to meet unexpected needs // // # Overview // -// The `Status` message contains three pieces of data: error code, error -// message, -// and error details. The error code should be an enum value +// The `Status` message contains three pieces of data: error code, +// error +// message, and error details. The error code should be an enum value // of // google.rpc.Code, but it may accept additional error codes if needed. // The @@ -1253,8 +1323,8 @@ type TransferJob struct { // error. Name string `json:"name,omitempty"` - // ProjectId: The ID of the Google Cloud Platform Console project that - // owns the job. + // ProjectId: The ID of the Google Cloud Platform Project that owns the + // job. ProjectId string `json:"projectId,omitempty"` // Schedule: Schedule specification. @@ -1329,8 +1399,8 @@ type TransferOperation struct { // Name: A globally unique ID assigned by the system. Name string `json:"name,omitempty"` - // ProjectId: The ID of the Google Cloud Platform Console project that - // owns the operation. + // ProjectId: The ID of the Google Cloud Platform Project that owns the + // operation. // Required. ProjectId string `json:"projectId,omitempty"` @@ -1990,11 +2060,12 @@ func (r *TransferJobsService) List() *TransferJobsListCall { // "job_statuses":["status1","status2",...]}. // Since `job_names` and `job_statuses` support multiple values, their // values -// must be specified with array notation. `project_id` is required. -// `job_names` -// and `job_statuses` are optional. The valid values for `job_statuses` -// are -// case-insensitive: `ENABLED`, `DISABLED`, and `DELETED`. +// must be specified with array notation. `project_id` is +// required. +// `job_names` and `job_statuses` are optional. The valid values +// for +// `job_statuses` are case-insensitive: `ENABLED`, `DISABLED`, and +// `DELETED`. func (c *TransferJobsListCall) Filter(filter string) *TransferJobsListCall { c.urlParams_.Set("filter", filter) return c @@ -2116,7 +2187,7 @@ func (c *TransferJobsListCall) Do(opts ...googleapi.CallOption) (*ListTransferJo // "parameterOrder": [], // "parameters": { // "filter": { - // "description": "A list of query parameters specified as JSON text in the form of\n{\"project_id\":\"my_project_id\",\n\"job_names\":[\"jobid1\",\"jobid2\",...],\n\"job_statuses\":[\"status1\",\"status2\",...]}.\nSince `job_names` and `job_statuses` support multiple values, their values\nmust be specified with array notation. `project_id` is required. `job_names`\nand `job_statuses` are optional. The valid values for `job_statuses` are\ncase-insensitive: `ENABLED`, `DISABLED`, and `DELETED`.", + // "description": "A list of query parameters specified as JSON text in the form of\n{\"project_id\":\"my_project_id\",\n\"job_names\":[\"jobid1\",\"jobid2\",...],\n\"job_statuses\":[\"status1\",\"status2\",...]}.\nSince `job_names` and `job_statuses` support multiple values, their values\nmust be specified with array notation. `project_id` is required.\n`job_names` and `job_statuses` are optional. The valid values for\n`job_statuses` are case-insensitive: `ENABLED`, `DISABLED`, and `DELETED`.", // "location": "query", // "type": "string" // }, diff --git a/vendor/google.golang.org/api/transport/dial.go b/vendor/google.golang.org/api/transport/dial.go index cf1ffca7..1fb7cf90 100644 --- a/vendor/google.golang.org/api/transport/dial.go +++ b/vendor/google.golang.org/api/transport/dial.go @@ -12,9 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -// Package transport supports network connections to HTTP and GRPC servers. -// This package is not intended for use by end developers. Use the -// google.golang.org/api/option package to configure API clients. package transport import ( diff --git a/vendor/google.golang.org/api/transport/doc.go b/vendor/google.golang.org/api/transport/doc.go new file mode 100644 index 00000000..4915036c --- /dev/null +++ b/vendor/google.golang.org/api/transport/doc.go @@ -0,0 +1,21 @@ +// Copyright 2019 Google LLC +// +// 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 transport provides utility methods for creating authenticated +// transports to Google's HTTP and gRPC APIs. It is intended to be used in +// conjunction with google.golang.org/api/option. +// +// This package is not intended for use by end developers. Use the +// google.golang.org/api/option package to configure API clients. +package transport diff --git a/vendor/google.golang.org/api/transport/grpc/dial.go b/vendor/google.golang.org/api/transport/grpc/dial.go index 62360f6c..4f6b94de 100644 --- a/vendor/google.golang.org/api/transport/grpc/dial.go +++ b/vendor/google.golang.org/api/transport/grpc/dial.go @@ -74,7 +74,11 @@ func dial(ctx context.Context, insecure bool, opts []option.ClientOption) (*grpc return nil, err } grpcOpts = []grpc.DialOption{ - grpc.WithPerRPCCredentials(oauth.TokenSource{creds.TokenSource}), + grpc.WithPerRPCCredentials(grpcTokenSource{ + TokenSource: oauth.TokenSource{creds.TokenSource}, + quotaProject: o.QuotaProject, + requestReason: o.RequestReason, + }), grpc.WithTransportCredentials(credentials.NewClientTLSFromCert(nil, "")), } } @@ -96,3 +100,30 @@ func dial(ctx context.Context, insecure bool, opts []option.ClientOption) (*grpc func addOCStatsHandler(opts []grpc.DialOption) []grpc.DialOption { return append(opts, grpc.WithStatsHandler(&ocgrpc.ClientHandler{})) } + +// grpcTokenSource supplies PerRPCCredentials from an oauth.TokenSource. +type grpcTokenSource struct { + oauth.TokenSource + + // Additional metadata attached as headers. + quotaProject string + requestReason string +} + +// GetRequestMetadata gets the request metadata as a map from a grpcTokenSource. +func (ts grpcTokenSource) GetRequestMetadata(ctx context.Context, uri ...string) ( + map[string]string, error) { + metadata, err := ts.TokenSource.GetRequestMetadata(ctx, uri...) + if err != nil { + return nil, err + } + + // Attach system parameters into the metadata + if ts.quotaProject != "" { + metadata["X-goog-user-project"] = ts.quotaProject + } + if ts.requestReason != "" { + metadata["X-goog-request-reason"] = ts.requestReason + } + return metadata, nil +} diff --git a/vendor/google.golang.org/api/transport/http/dial.go b/vendor/google.golang.org/api/transport/http/dial.go index a25da674..c0d8bf20 100644 --- a/vendor/google.golang.org/api/transport/http/dial.go +++ b/vendor/google.golang.org/api/transport/http/dial.go @@ -64,9 +64,11 @@ func NewTransport(ctx context.Context, base http.RoundTripper, opts ...option.Cl func newTransport(ctx context.Context, base http.RoundTripper, settings *internal.DialSettings) (http.RoundTripper, error) { trans := base - trans = userAgentTransport{ - base: trans, - userAgent: settings.UserAgent, + trans = parameterTransport{ + base: trans, + userAgent: settings.UserAgent, + quotaProject: settings.QuotaProject, + requestReason: settings.RequestReason, } trans = addOCTransport(trans) switch { @@ -104,12 +106,15 @@ func newSettings(opts []option.ClientOption) (*internal.DialSettings, error) { return &o, nil } -type userAgentTransport struct { - userAgent string - base http.RoundTripper +type parameterTransport struct { + userAgent string + quotaProject string + requestReason string + + base http.RoundTripper } -func (t userAgentTransport) RoundTrip(req *http.Request) (*http.Response, error) { +func (t parameterTransport) RoundTrip(req *http.Request) (*http.Response, error) { rt := t.base if rt == nil { return nil, errors.New("transport: no Transport specified") @@ -123,7 +128,16 @@ func (t userAgentTransport) RoundTrip(req *http.Request) (*http.Response, error) newReq.Header[k] = vv } // TODO(cbro): append to existing User-Agent header? - newReq.Header["User-Agent"] = []string{t.userAgent} + newReq.Header.Set("User-Agent", t.userAgent) + + // Attach system parameters into the header + if t.quotaProject != "" { + newReq.Header.Set("X-Goog-User-Project", t.quotaProject) + } + if t.requestReason != "" { + newReq.Header.Set("X-Goog-Request-Reason", t.requestReason) + } + return rt.RoundTrip(&newReq) } diff --git a/vendor/google.golang.org/genproto/googleapis/api/annotations/http.pb.go b/vendor/google.golang.org/genproto/googleapis/api/annotations/http.pb.go index 1a8a27b6..b4487662 100644 --- a/vendor/google.golang.org/genproto/googleapis/api/annotations/http.pb.go +++ b/vendor/google.golang.org/genproto/googleapis/api/annotations/http.pb.go @@ -42,7 +42,7 @@ func (m *Http) Reset() { *m = Http{} } func (m *Http) String() string { return proto.CompactTextString(m) } func (*Http) ProtoMessage() {} func (*Http) Descriptor() ([]byte, []int) { - return fileDescriptor_http_e457621dddd7365b, []int{0} + return fileDescriptor_http_6617e93ffeeff0ad, []int{0} } func (m *Http) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Http.Unmarshal(m, b) @@ -76,94 +76,94 @@ func (m *Http) GetFullyDecodeReservedExpansion() bool { return false } -// `HttpRule` defines the mapping of an RPC method to one or more HTTP -// REST API methods. The mapping specifies how different portions of the RPC -// request message are mapped to URL path, URL query parameters, and -// HTTP request body. The mapping is typically specified as an -// `google.api.http` annotation on the RPC method, -// see "google/api/annotations.proto" for details. +// # gRPC Transcoding // -// The mapping consists of a field specifying the path template and -// method kind. The path template can refer to fields in the request -// message, as in the example below which describes a REST GET -// operation on a resource collection of messages: +// gRPC Transcoding is a feature for mapping between a gRPC method and one or +// more HTTP REST endpoints. It allows developers to build a single API service +// that supports both gRPC APIs and REST APIs. Many systems, including [Google +// APIs](https://github.com/googleapis/googleapis), +// [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC +// Gateway](https://github.com/grpc-ecosystem/grpc-gateway), +// and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature +// and use it for large scale production services. // +// `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies +// how different portions of the gRPC request message are mapped to the URL +// path, URL query parameters, and HTTP request body. It also controls how the +// gRPC response message is mapped to the HTTP response body. `HttpRule` is +// typically specified as an `google.api.http` annotation on the gRPC method. +// +// Each mapping specifies a URL path template and an HTTP method. The path +// template may refer to one or more fields in the gRPC request message, as long +// as each field is a non-repeated field with a primitive (non-message) type. +// The path template controls how fields of the request message are mapped to +// the URL path. +// +// Example: // // service Messaging { // rpc GetMessage(GetMessageRequest) returns (Message) { -// option (google.api.http).get = "/v1/messages/{message_id}/{sub.subfield}"; +// option (google.api.http) = { +// get: "/v1/{name=messages/*}" +// }; // } // } // message GetMessageRequest { -// message SubMessage { -// string subfield = 1; -// } -// string message_id = 1; // mapped to the URL -// SubMessage sub = 2; // `sub.subfield` is url-mapped +// string name = 1; // Mapped to URL path. // } // message Message { -// string text = 1; // content of the resource +// string text = 1; // The resource content. // } // -// The same http annotation can alternatively be expressed inside the -// `GRPC API Configuration` YAML file. +// This enables an HTTP REST to gRPC mapping as below: // -// http: -// rules: -// - selector: .Messaging.GetMessage -// get: /v1/messages/{message_id}/{sub.subfield} -// -// This definition enables an automatic, bidrectional mapping of HTTP -// JSON to RPC. Example: -// -// HTTP | RPC +// HTTP | gRPC // -----|----- -// `GET /v1/messages/123456/foo` | `GetMessage(message_id: "123456" sub: SubMessage(subfield: "foo"))` -// -// In general, not only fields but also field paths can be referenced -// from a path pattern. Fields mapped to the path pattern cannot be -// repeated and must have a primitive (non-message) type. -// -// Any fields in the request message which are not bound by the path -// pattern automatically become (optional) HTTP query -// parameters. Assume the following definition of the request message: +// `GET /v1/messages/123456` | `GetMessage(name: "messages/123456")` // +// Any fields in the request message which are not bound by the path template +// automatically become HTTP query parameters if there is no HTTP request body. +// For example: // // service Messaging { // rpc GetMessage(GetMessageRequest) returns (Message) { -// option (google.api.http).get = "/v1/messages/{message_id}"; +// option (google.api.http) = { +// get:"/v1/messages/{message_id}" +// }; // } // } // message GetMessageRequest { // message SubMessage { // string subfield = 1; // } -// string message_id = 1; // mapped to the URL -// int64 revision = 2; // becomes a parameter -// SubMessage sub = 3; // `sub.subfield` becomes a parameter +// string message_id = 1; // Mapped to URL path. +// int64 revision = 2; // Mapped to URL query parameter `revision`. +// SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`. // } // -// // This enables a HTTP JSON to RPC mapping as below: // -// HTTP | RPC +// HTTP | gRPC // -----|----- -// `GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: "foo"))` +// `GET /v1/messages/123456?revision=2&sub.subfield=foo` | +// `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: +// "foo"))` // -// Note that fields which are mapped to HTTP parameters must have a -// primitive type or a repeated primitive type. Message types are not -// allowed. In the case of a repeated type, the parameter can be -// repeated in the URL, as in `...?param=A¶m=B`. +// Note that fields which are mapped to URL query parameters must have a +// primitive type or a repeated primitive type or a non-repeated message type. +// In the case of a repeated type, the parameter can be repeated in the URL +// as `...?param=A¶m=B`. In the case of a message type, each field of the +// message is mapped to a separate parameter, such as +// `...?foo.a=A&foo.b=B&foo.c=C`. // -// For HTTP method kinds which allow a request body, the `body` field +// For HTTP methods that allow a request body, the `body` field // specifies the mapping. Consider a REST update method on the // message resource collection: // -// // service Messaging { // rpc UpdateMessage(UpdateMessageRequest) returns (Message) { // option (google.api.http) = { -// put: "/v1/messages/{message_id}" +// patch: "/v1/messages/{message_id}" // body: "message" // }; // } @@ -173,14 +173,14 @@ func (m *Http) GetFullyDecodeReservedExpansion() bool { // Message message = 2; // mapped to the body // } // -// // The following HTTP JSON to RPC mapping is enabled, where the // representation of the JSON in the request body is determined by // protos JSON encoding: // -// HTTP | RPC +// HTTP | gRPC // -----|----- -// `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" message { text: "Hi!" })` +// `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: +// "123456" message { text: "Hi!" })` // // The special name `*` can be used in the body mapping to define that // every field not bound by the path template should be mapped to the @@ -190,7 +190,7 @@ func (m *Http) GetFullyDecodeReservedExpansion() bool { // service Messaging { // rpc UpdateMessage(Message) returns (Message) { // option (google.api.http) = { -// put: "/v1/messages/{message_id}" +// patch: "/v1/messages/{message_id}" // body: "*" // }; // } @@ -203,13 +203,14 @@ func (m *Http) GetFullyDecodeReservedExpansion() bool { // // The following HTTP JSON to RPC mapping is enabled: // -// HTTP | RPC +// HTTP | gRPC // -----|----- -// `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" text: "Hi!")` +// `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: +// "123456" text: "Hi!")` // // Note that when using `*` in the body mapping, it is not possible to // have HTTP parameters, as all fields not bound by the path end in -// the body. This makes this option more rarely used in practice of +// the body. This makes this option more rarely used in practice when // defining REST APIs. The common usage of `*` is in custom methods // which don't use the URL at all for transferring data. // @@ -231,32 +232,34 @@ func (m *Http) GetFullyDecodeReservedExpansion() bool { // string user_id = 2; // } // +// This enables the following two alternative HTTP JSON to RPC mappings: // -// This enables the following two alternative HTTP JSON to RPC -// mappings: -// -// HTTP | RPC +// HTTP | gRPC // -----|----- // `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` -// `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: "123456")` +// `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: +// "123456")` // -// # Rules for HTTP mapping +// ## Rules for HTTP mapping // -// The rules for mapping HTTP path, query parameters, and body fields -// to the request message are as follows: +// 1. Leaf request fields (recursive expansion nested messages in the request +// message) are classified into three categories: +// - Fields referred by the path template. They are passed via the URL path. +// - Fields referred by the [HttpRule.body][google.api.HttpRule.body]. They +// are passed via the HTTP +// request body. +// - All other fields are passed via the URL query parameters, and the +// parameter name is the field path in the request message. A repeated +// field can be represented as multiple query parameters under the same +// name. +// 2. If [HttpRule.body][google.api.HttpRule.body] is "*", there is no URL +// query parameter, all fields +// are passed via URL path and HTTP request body. +// 3. If [HttpRule.body][google.api.HttpRule.body] is omitted, there is no HTTP +// request body, all +// fields are passed via URL path and URL query parameters. // -// 1. The `body` field specifies either `*` or a field path, or is -// omitted. If omitted, it indicates there is no HTTP request body. -// 2. Leaf fields (recursive expansion of nested messages in the -// request) can be classified into three types: -// (a) Matched in the URL template. -// (b) Covered by body (if body is `*`, everything except (a) fields; -// else everything under the body field) -// (c) All other fields. -// 3. URL query parameters found in the HTTP request are mapped to (c) fields. -// 4. Any body sent with an HTTP request can contain only (b) fields. -// -// The syntax of the path template is as follows: +// ### Path template syntax // // Template = "/" Segments [ Verb ] ; // Segments = Segment { "/" Segment } ; @@ -265,38 +268,91 @@ func (m *Http) GetFullyDecodeReservedExpansion() bool { // FieldPath = IDENT { "." IDENT } ; // Verb = ":" LITERAL ; // -// The syntax `*` matches a single path segment. The syntax `**` matches zero -// or more path segments, which must be the last part of the path except the -// `Verb`. The syntax `LITERAL` matches literal text in the path. +// The syntax `*` matches a single URL path segment. The syntax `**` matches +// zero or more URL path segments, which must be the last part of the URL path +// except the `Verb`. // // The syntax `Variable` matches part of the URL path as specified by its // template. A variable template must not contain other variables. If a variable // matches a single path segment, its template may be omitted, e.g. `{var}` // is equivalent to `{var=*}`. // +// The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL` +// contains any reserved character, such characters should be percent-encoded +// before the matching. +// // If a variable contains exactly one path segment, such as `"{var}"` or -// `"{var=*}"`, when such a variable is expanded into a URL path, all characters -// except `[-_.~0-9a-zA-Z]` are percent-encoded. Such variables show up in the -// Discovery Document as `{var}`. +// `"{var=*}"`, when such a variable is expanded into a URL path on the client +// side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The +// server side does the reverse decoding. Such variables show up in the +// [Discovery +// Document](https://developers.google.com/discovery/v1/reference/apis) as +// `{var}`. // -// If a variable contains one or more path segments, such as `"{var=foo/*}"` -// or `"{var=**}"`, when such a variable is expanded into a URL path, all -// characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. Such variables -// show up in the Discovery Document as `{+var}`. +// If a variable contains multiple path segments, such as `"{var=foo/*}"` +// or `"{var=**}"`, when such a variable is expanded into a URL path on the +// client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. +// The server side does the reverse decoding, except "%2F" and "%2f" are left +// unchanged. Such variables show up in the +// [Discovery +// Document](https://developers.google.com/discovery/v1/reference/apis) as +// `{+var}`. // -// NOTE: While the single segment variable matches the semantics of -// [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 -// Simple String Expansion, the multi segment variable **does not** match -// RFC 6570 Reserved Expansion. The reason is that the Reserved Expansion +// ## Using gRPC API Service Configuration +// +// gRPC API Service Configuration (service config) is a configuration language +// for configuring a gRPC service to become a user-facing product. The +// service config is simply the YAML representation of the `google.api.Service` +// proto message. +// +// As an alternative to annotating your proto file, you can configure gRPC +// transcoding in your service config YAML files. You do this by specifying a +// `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same +// effect as the proto annotation. This can be particularly useful if you +// have a proto that is reused in multiple services. Note that any transcoding +// specified in the service config will override any matching transcoding +// configuration in the proto. +// +// Example: +// +// http: +// rules: +// # Selects a gRPC method and applies HttpRule to it. +// - selector: example.v1.Messaging.GetMessage +// get: /v1/messages/{message_id}/{sub.subfield} +// +// ## Special notes +// +// When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the +// proto to JSON conversion must follow the [proto3 +// specification](https://developers.google.com/protocol-buffers/docs/proto3#json). +// +// While the single segment variable follows the semantics of +// [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String +// Expansion, the multi segment variable **does not** follow RFC 6570 Section +// 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion // does not expand special characters like `?` and `#`, which would lead -// to invalid URLs. +// to invalid URLs. As the result, gRPC Transcoding uses a custom encoding +// for multi segment variables. // -// NOTE: the field paths in variables and in the `body` must not refer to -// repeated fields or map fields. +// The path variables **must not** refer to any repeated or mapped field, +// because client libraries are not capable of handling such variable expansion. +// +// The path variables **must not** capture the leading "/" character. The reason +// is that the most common use case "{var}" does not capture the leading "/" +// character. For consistency, all path variables must share the same behavior. +// +// Repeated message fields must not be mapped to URL query parameters, because +// no client library can support such complicated mapping. +// +// If an API needs to use a JSON array for request or response body, it can map +// the request or response body to a repeated field. However, some gRPC +// Transcoding implementations may not support this feature. type HttpRule struct { - // Selects methods to which this rule applies. + // Selects a method to which this rule applies. // - // Refer to [selector][google.api.DocumentationRule.selector] for syntax details. + // Refer to [selector][google.api.DocumentationRule.selector] for syntax + // details. Selector string `protobuf:"bytes,1,opt,name=selector,proto3" json:"selector,omitempty"` // Determines the URL pattern is matched by this rules. This pattern can be // used with any of the {get|put|post|delete|patch} methods. A custom method @@ -310,14 +366,19 @@ type HttpRule struct { // *HttpRule_Patch // *HttpRule_Custom Pattern isHttpRule_Pattern `protobuf_oneof:"pattern"` - // The name of the request field whose value is mapped to the HTTP body, or - // `*` for mapping all fields not captured by the path pattern to the HTTP - // body. NOTE: the referred field must not be a repeated field and must be - // present at the top-level of request message type. + // The name of the request field whose value is mapped to the HTTP request + // body, or `*` for mapping all request fields not captured by the path + // pattern to the HTTP body, or omitted for not having any HTTP request body. + // + // NOTE: the referred field must be present at the top-level of the request + // message type. Body string `protobuf:"bytes,7,opt,name=body,proto3" json:"body,omitempty"` // Optional. The name of the response field whose value is mapped to the HTTP - // body of response. Other response fields are ignored. When - // not set, the response message will be used as HTTP body of response. + // response body. When omitted, the entire response message will be used + // as the HTTP response body. + // + // NOTE: The referred field must be present at the top-level of the response + // message type. ResponseBody string `protobuf:"bytes,12,opt,name=response_body,json=responseBody,proto3" json:"response_body,omitempty"` // Additional HTTP bindings for the selector. Nested bindings must // not contain an `additional_bindings` field themselves (that is, @@ -332,7 +393,7 @@ func (m *HttpRule) Reset() { *m = HttpRule{} } func (m *HttpRule) String() string { return proto.CompactTextString(m) } func (*HttpRule) ProtoMessage() {} func (*HttpRule) Descriptor() ([]byte, []int) { - return fileDescriptor_http_e457621dddd7365b, []int{1} + return fileDescriptor_http_6617e93ffeeff0ad, []int{1} } func (m *HttpRule) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_HttpRule.Unmarshal(m, b) @@ -614,7 +675,7 @@ func (m *CustomHttpPattern) Reset() { *m = CustomHttpPattern{} } func (m *CustomHttpPattern) String() string { return proto.CompactTextString(m) } func (*CustomHttpPattern) ProtoMessage() {} func (*CustomHttpPattern) Descriptor() ([]byte, []int) { - return fileDescriptor_http_e457621dddd7365b, []int{2} + return fileDescriptor_http_6617e93ffeeff0ad, []int{2} } func (m *CustomHttpPattern) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CustomHttpPattern.Unmarshal(m, b) @@ -654,9 +715,9 @@ func init() { proto.RegisterType((*CustomHttpPattern)(nil), "google.api.CustomHttpPattern") } -func init() { proto.RegisterFile("google/api/http.proto", fileDescriptor_http_e457621dddd7365b) } +func init() { proto.RegisterFile("google/api/http.proto", fileDescriptor_http_6617e93ffeeff0ad) } -var fileDescriptor_http_e457621dddd7365b = []byte{ +var fileDescriptor_http_6617e93ffeeff0ad = []byte{ // 419 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x92, 0xc1, 0x8e, 0xd3, 0x30, 0x10, 0x86, 0x49, 0x9b, 0x76, 0xdb, 0xe9, 0x82, 0x84, 0x59, 0x90, 0x85, 0x40, 0x54, 0xe5, 0x52, diff --git a/vendor/google.golang.org/genproto/googleapis/bigtable/admin/v2/bigtable_instance_admin.pb.go b/vendor/google.golang.org/genproto/googleapis/bigtable/admin/v2/bigtable_instance_admin.pb.go index 64820387..7a00be59 100644 --- a/vendor/google.golang.org/genproto/googleapis/bigtable/admin/v2/bigtable_instance_admin.pb.go +++ b/vendor/google.golang.org/genproto/googleapis/bigtable/admin/v2/bigtable_instance_admin.pb.go @@ -56,7 +56,7 @@ func (m *CreateInstanceRequest) Reset() { *m = CreateInstanceRequest{} } func (m *CreateInstanceRequest) String() string { return proto.CompactTextString(m) } func (*CreateInstanceRequest) ProtoMessage() {} func (*CreateInstanceRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_bigtable_instance_admin_b28bb2dbfcfb0e62, []int{0} + return fileDescriptor_bigtable_instance_admin_8d2ac73e5c48a41f, []int{0} } func (m *CreateInstanceRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CreateInstanceRequest.Unmarshal(m, b) @@ -118,7 +118,7 @@ func (m *GetInstanceRequest) Reset() { *m = GetInstanceRequest{} } func (m *GetInstanceRequest) String() string { return proto.CompactTextString(m) } func (*GetInstanceRequest) ProtoMessage() {} func (*GetInstanceRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_bigtable_instance_admin_b28bb2dbfcfb0e62, []int{1} + return fileDescriptor_bigtable_instance_admin_8d2ac73e5c48a41f, []int{1} } func (m *GetInstanceRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetInstanceRequest.Unmarshal(m, b) @@ -161,7 +161,7 @@ func (m *ListInstancesRequest) Reset() { *m = ListInstancesRequest{} } func (m *ListInstancesRequest) String() string { return proto.CompactTextString(m) } func (*ListInstancesRequest) ProtoMessage() {} func (*ListInstancesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_bigtable_instance_admin_b28bb2dbfcfb0e62, []int{2} + return fileDescriptor_bigtable_instance_admin_8d2ac73e5c48a41f, []int{2} } func (m *ListInstancesRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ListInstancesRequest.Unmarshal(m, b) @@ -217,7 +217,7 @@ func (m *ListInstancesResponse) Reset() { *m = ListInstancesResponse{} } func (m *ListInstancesResponse) String() string { return proto.CompactTextString(m) } func (*ListInstancesResponse) ProtoMessage() {} func (*ListInstancesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_bigtable_instance_admin_b28bb2dbfcfb0e62, []int{3} + return fileDescriptor_bigtable_instance_admin_8d2ac73e5c48a41f, []int{3} } func (m *ListInstancesResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ListInstancesResponse.Unmarshal(m, b) @@ -274,7 +274,7 @@ func (m *PartialUpdateInstanceRequest) Reset() { *m = PartialUpdateInsta func (m *PartialUpdateInstanceRequest) String() string { return proto.CompactTextString(m) } func (*PartialUpdateInstanceRequest) ProtoMessage() {} func (*PartialUpdateInstanceRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_bigtable_instance_admin_b28bb2dbfcfb0e62, []int{4} + return fileDescriptor_bigtable_instance_admin_8d2ac73e5c48a41f, []int{4} } func (m *PartialUpdateInstanceRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PartialUpdateInstanceRequest.Unmarshal(m, b) @@ -322,7 +322,7 @@ func (m *DeleteInstanceRequest) Reset() { *m = DeleteInstanceRequest{} } func (m *DeleteInstanceRequest) String() string { return proto.CompactTextString(m) } func (*DeleteInstanceRequest) ProtoMessage() {} func (*DeleteInstanceRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_bigtable_instance_admin_b28bb2dbfcfb0e62, []int{5} + return fileDescriptor_bigtable_instance_admin_8d2ac73e5c48a41f, []int{5} } func (m *DeleteInstanceRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_DeleteInstanceRequest.Unmarshal(m, b) @@ -371,7 +371,7 @@ func (m *CreateClusterRequest) Reset() { *m = CreateClusterRequest{} } func (m *CreateClusterRequest) String() string { return proto.CompactTextString(m) } func (*CreateClusterRequest) ProtoMessage() {} func (*CreateClusterRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_bigtable_instance_admin_b28bb2dbfcfb0e62, []int{6} + return fileDescriptor_bigtable_instance_admin_8d2ac73e5c48a41f, []int{6} } func (m *CreateClusterRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CreateClusterRequest.Unmarshal(m, b) @@ -426,7 +426,7 @@ func (m *GetClusterRequest) Reset() { *m = GetClusterRequest{} } func (m *GetClusterRequest) String() string { return proto.CompactTextString(m) } func (*GetClusterRequest) ProtoMessage() {} func (*GetClusterRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_bigtable_instance_admin_b28bb2dbfcfb0e62, []int{7} + return fileDescriptor_bigtable_instance_admin_8d2ac73e5c48a41f, []int{7} } func (m *GetClusterRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetClusterRequest.Unmarshal(m, b) @@ -471,7 +471,7 @@ func (m *ListClustersRequest) Reset() { *m = ListClustersRequest{} } func (m *ListClustersRequest) String() string { return proto.CompactTextString(m) } func (*ListClustersRequest) ProtoMessage() {} func (*ListClustersRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_bigtable_instance_admin_b28bb2dbfcfb0e62, []int{8} + return fileDescriptor_bigtable_instance_admin_8d2ac73e5c48a41f, []int{8} } func (m *ListClustersRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ListClustersRequest.Unmarshal(m, b) @@ -526,7 +526,7 @@ func (m *ListClustersResponse) Reset() { *m = ListClustersResponse{} } func (m *ListClustersResponse) String() string { return proto.CompactTextString(m) } func (*ListClustersResponse) ProtoMessage() {} func (*ListClustersResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_bigtable_instance_admin_b28bb2dbfcfb0e62, []int{9} + return fileDescriptor_bigtable_instance_admin_8d2ac73e5c48a41f, []int{9} } func (m *ListClustersResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ListClustersResponse.Unmarshal(m, b) @@ -581,7 +581,7 @@ func (m *DeleteClusterRequest) Reset() { *m = DeleteClusterRequest{} } func (m *DeleteClusterRequest) String() string { return proto.CompactTextString(m) } func (*DeleteClusterRequest) ProtoMessage() {} func (*DeleteClusterRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_bigtable_instance_admin_b28bb2dbfcfb0e62, []int{10} + return fileDescriptor_bigtable_instance_admin_8d2ac73e5c48a41f, []int{10} } func (m *DeleteClusterRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_DeleteClusterRequest.Unmarshal(m, b) @@ -625,7 +625,7 @@ func (m *CreateInstanceMetadata) Reset() { *m = CreateInstanceMetadata{} func (m *CreateInstanceMetadata) String() string { return proto.CompactTextString(m) } func (*CreateInstanceMetadata) ProtoMessage() {} func (*CreateInstanceMetadata) Descriptor() ([]byte, []int) { - return fileDescriptor_bigtable_instance_admin_b28bb2dbfcfb0e62, []int{11} + return fileDescriptor_bigtable_instance_admin_8d2ac73e5c48a41f, []int{11} } func (m *CreateInstanceMetadata) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CreateInstanceMetadata.Unmarshal(m, b) @@ -683,7 +683,7 @@ func (m *UpdateInstanceMetadata) Reset() { *m = UpdateInstanceMetadata{} func (m *UpdateInstanceMetadata) String() string { return proto.CompactTextString(m) } func (*UpdateInstanceMetadata) ProtoMessage() {} func (*UpdateInstanceMetadata) Descriptor() ([]byte, []int) { - return fileDescriptor_bigtable_instance_admin_b28bb2dbfcfb0e62, []int{12} + return fileDescriptor_bigtable_instance_admin_8d2ac73e5c48a41f, []int{12} } func (m *UpdateInstanceMetadata) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UpdateInstanceMetadata.Unmarshal(m, b) @@ -741,7 +741,7 @@ func (m *CreateClusterMetadata) Reset() { *m = CreateClusterMetadata{} } func (m *CreateClusterMetadata) String() string { return proto.CompactTextString(m) } func (*CreateClusterMetadata) ProtoMessage() {} func (*CreateClusterMetadata) Descriptor() ([]byte, []int) { - return fileDescriptor_bigtable_instance_admin_b28bb2dbfcfb0e62, []int{13} + return fileDescriptor_bigtable_instance_admin_8d2ac73e5c48a41f, []int{13} } func (m *CreateClusterMetadata) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CreateClusterMetadata.Unmarshal(m, b) @@ -799,7 +799,7 @@ func (m *UpdateClusterMetadata) Reset() { *m = UpdateClusterMetadata{} } func (m *UpdateClusterMetadata) String() string { return proto.CompactTextString(m) } func (*UpdateClusterMetadata) ProtoMessage() {} func (*UpdateClusterMetadata) Descriptor() ([]byte, []int) { - return fileDescriptor_bigtable_instance_admin_b28bb2dbfcfb0e62, []int{14} + return fileDescriptor_bigtable_instance_admin_8d2ac73e5c48a41f, []int{14} } func (m *UpdateClusterMetadata) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UpdateClusterMetadata.Unmarshal(m, b) @@ -864,7 +864,7 @@ func (m *CreateAppProfileRequest) Reset() { *m = CreateAppProfileRequest func (m *CreateAppProfileRequest) String() string { return proto.CompactTextString(m) } func (*CreateAppProfileRequest) ProtoMessage() {} func (*CreateAppProfileRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_bigtable_instance_admin_b28bb2dbfcfb0e62, []int{15} + return fileDescriptor_bigtable_instance_admin_8d2ac73e5c48a41f, []int{15} } func (m *CreateAppProfileRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CreateAppProfileRequest.Unmarshal(m, b) @@ -926,7 +926,7 @@ func (m *GetAppProfileRequest) Reset() { *m = GetAppProfileRequest{} } func (m *GetAppProfileRequest) String() string { return proto.CompactTextString(m) } func (*GetAppProfileRequest) ProtoMessage() {} func (*GetAppProfileRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_bigtable_instance_admin_b28bb2dbfcfb0e62, []int{16} + return fileDescriptor_bigtable_instance_admin_8d2ac73e5c48a41f, []int{16} } func (m *GetAppProfileRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetAppProfileRequest.Unmarshal(m, b) @@ -975,7 +975,7 @@ func (m *ListAppProfilesRequest) Reset() { *m = ListAppProfilesRequest{} func (m *ListAppProfilesRequest) String() string { return proto.CompactTextString(m) } func (*ListAppProfilesRequest) ProtoMessage() {} func (*ListAppProfilesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_bigtable_instance_admin_b28bb2dbfcfb0e62, []int{17} + return fileDescriptor_bigtable_instance_admin_8d2ac73e5c48a41f, []int{17} } func (m *ListAppProfilesRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ListAppProfilesRequest.Unmarshal(m, b) @@ -1038,7 +1038,7 @@ func (m *ListAppProfilesResponse) Reset() { *m = ListAppProfilesResponse func (m *ListAppProfilesResponse) String() string { return proto.CompactTextString(m) } func (*ListAppProfilesResponse) ProtoMessage() {} func (*ListAppProfilesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_bigtable_instance_admin_b28bb2dbfcfb0e62, []int{18} + return fileDescriptor_bigtable_instance_admin_8d2ac73e5c48a41f, []int{18} } func (m *ListAppProfilesResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ListAppProfilesResponse.Unmarshal(m, b) @@ -1097,7 +1097,7 @@ func (m *UpdateAppProfileRequest) Reset() { *m = UpdateAppProfileRequest func (m *UpdateAppProfileRequest) String() string { return proto.CompactTextString(m) } func (*UpdateAppProfileRequest) ProtoMessage() {} func (*UpdateAppProfileRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_bigtable_instance_admin_b28bb2dbfcfb0e62, []int{19} + return fileDescriptor_bigtable_instance_admin_8d2ac73e5c48a41f, []int{19} } func (m *UpdateAppProfileRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UpdateAppProfileRequest.Unmarshal(m, b) @@ -1154,7 +1154,7 @@ func (m *DeleteAppProfileRequest) Reset() { *m = DeleteAppProfileRequest func (m *DeleteAppProfileRequest) String() string { return proto.CompactTextString(m) } func (*DeleteAppProfileRequest) ProtoMessage() {} func (*DeleteAppProfileRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_bigtable_instance_admin_b28bb2dbfcfb0e62, []int{20} + return fileDescriptor_bigtable_instance_admin_8d2ac73e5c48a41f, []int{20} } func (m *DeleteAppProfileRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_DeleteAppProfileRequest.Unmarshal(m, b) @@ -1199,7 +1199,7 @@ func (m *UpdateAppProfileMetadata) Reset() { *m = UpdateAppProfileMetada func (m *UpdateAppProfileMetadata) String() string { return proto.CompactTextString(m) } func (*UpdateAppProfileMetadata) ProtoMessage() {} func (*UpdateAppProfileMetadata) Descriptor() ([]byte, []int) { - return fileDescriptor_bigtable_instance_admin_b28bb2dbfcfb0e62, []int{21} + return fileDescriptor_bigtable_instance_admin_8d2ac73e5c48a41f, []int{21} } func (m *UpdateAppProfileMetadata) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UpdateAppProfileMetadata.Unmarshal(m, b) @@ -1954,10 +1954,10 @@ var _BigtableInstanceAdmin_serviceDesc = grpc.ServiceDesc{ } func init() { - proto.RegisterFile("google/bigtable/admin/v2/bigtable_instance_admin.proto", fileDescriptor_bigtable_instance_admin_b28bb2dbfcfb0e62) + proto.RegisterFile("google/bigtable/admin/v2/bigtable_instance_admin.proto", fileDescriptor_bigtable_instance_admin_8d2ac73e5c48a41f) } -var fileDescriptor_bigtable_instance_admin_b28bb2dbfcfb0e62 = []byte{ +var fileDescriptor_bigtable_instance_admin_8d2ac73e5c48a41f = []byte{ // 1592 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x59, 0xcd, 0x6f, 0xdc, 0x44, 0x14, 0xd7, 0xec, 0xb6, 0x25, 0x79, 0x9b, 0x2f, 0x86, 0x26, 0x59, 0xb9, 0x5f, 0xa9, 0x5b, 0xb5, diff --git a/vendor/google.golang.org/genproto/googleapis/bigtable/admin/v2/bigtable_table_admin.pb.go b/vendor/google.golang.org/genproto/googleapis/bigtable/admin/v2/bigtable_table_admin.pb.go index 72505624..bec51df0 100644 --- a/vendor/google.golang.org/genproto/googleapis/bigtable/admin/v2/bigtable_table_admin.pb.go +++ b/vendor/google.golang.org/genproto/googleapis/bigtable/admin/v2/bigtable_table_admin.pb.go @@ -65,7 +65,7 @@ func (m *CreateTableRequest) Reset() { *m = CreateTableRequest{} } func (m *CreateTableRequest) String() string { return proto.CompactTextString(m) } func (*CreateTableRequest) ProtoMessage() {} func (*CreateTableRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_bigtable_table_admin_5099d9e5d77fdde2, []int{0} + return fileDescriptor_bigtable_table_admin_66c21ad243a58d94, []int{0} } func (m *CreateTableRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CreateTableRequest.Unmarshal(m, b) @@ -126,7 +126,7 @@ func (m *CreateTableRequest_Split) Reset() { *m = CreateTableRequest_Spl func (m *CreateTableRequest_Split) String() string { return proto.CompactTextString(m) } func (*CreateTableRequest_Split) ProtoMessage() {} func (*CreateTableRequest_Split) Descriptor() ([]byte, []int) { - return fileDescriptor_bigtable_table_admin_5099d9e5d77fdde2, []int{0, 0} + return fileDescriptor_bigtable_table_admin_66c21ad243a58d94, []int{0, 0} } func (m *CreateTableRequest_Split) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CreateTableRequest_Split.Unmarshal(m, b) @@ -181,7 +181,7 @@ func (m *CreateTableFromSnapshotRequest) Reset() { *m = CreateTableFromS func (m *CreateTableFromSnapshotRequest) String() string { return proto.CompactTextString(m) } func (*CreateTableFromSnapshotRequest) ProtoMessage() {} func (*CreateTableFromSnapshotRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_bigtable_table_admin_5099d9e5d77fdde2, []int{1} + return fileDescriptor_bigtable_table_admin_66c21ad243a58d94, []int{1} } func (m *CreateTableFromSnapshotRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CreateTableFromSnapshotRequest.Unmarshal(m, b) @@ -244,7 +244,7 @@ func (m *DropRowRangeRequest) Reset() { *m = DropRowRangeRequest{} } func (m *DropRowRangeRequest) String() string { return proto.CompactTextString(m) } func (*DropRowRangeRequest) ProtoMessage() {} func (*DropRowRangeRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_bigtable_table_admin_5099d9e5d77fdde2, []int{2} + return fileDescriptor_bigtable_table_admin_66c21ad243a58d94, []int{2} } func (m *DropRowRangeRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_DropRowRangeRequest.Unmarshal(m, b) @@ -400,7 +400,7 @@ func (m *ListTablesRequest) Reset() { *m = ListTablesRequest{} } func (m *ListTablesRequest) String() string { return proto.CompactTextString(m) } func (*ListTablesRequest) ProtoMessage() {} func (*ListTablesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_bigtable_table_admin_5099d9e5d77fdde2, []int{3} + return fileDescriptor_bigtable_table_admin_66c21ad243a58d94, []int{3} } func (m *ListTablesRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ListTablesRequest.Unmarshal(m, b) @@ -466,7 +466,7 @@ func (m *ListTablesResponse) Reset() { *m = ListTablesResponse{} } func (m *ListTablesResponse) String() string { return proto.CompactTextString(m) } func (*ListTablesResponse) ProtoMessage() {} func (*ListTablesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_bigtable_table_admin_5099d9e5d77fdde2, []int{4} + return fileDescriptor_bigtable_table_admin_66c21ad243a58d94, []int{4} } func (m *ListTablesResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ListTablesResponse.Unmarshal(m, b) @@ -519,7 +519,7 @@ func (m *GetTableRequest) Reset() { *m = GetTableRequest{} } func (m *GetTableRequest) String() string { return proto.CompactTextString(m) } func (*GetTableRequest) ProtoMessage() {} func (*GetTableRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_bigtable_table_admin_5099d9e5d77fdde2, []int{5} + return fileDescriptor_bigtable_table_admin_66c21ad243a58d94, []int{5} } func (m *GetTableRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetTableRequest.Unmarshal(m, b) @@ -569,7 +569,7 @@ func (m *DeleteTableRequest) Reset() { *m = DeleteTableRequest{} } func (m *DeleteTableRequest) String() string { return proto.CompactTextString(m) } func (*DeleteTableRequest) ProtoMessage() {} func (*DeleteTableRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_bigtable_table_admin_5099d9e5d77fdde2, []int{6} + return fileDescriptor_bigtable_table_admin_66c21ad243a58d94, []int{6} } func (m *DeleteTableRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_DeleteTableRequest.Unmarshal(m, b) @@ -617,7 +617,7 @@ func (m *ModifyColumnFamiliesRequest) Reset() { *m = ModifyColumnFamilie func (m *ModifyColumnFamiliesRequest) String() string { return proto.CompactTextString(m) } func (*ModifyColumnFamiliesRequest) ProtoMessage() {} func (*ModifyColumnFamiliesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_bigtable_table_admin_5099d9e5d77fdde2, []int{7} + return fileDescriptor_bigtable_table_admin_66c21ad243a58d94, []int{7} } func (m *ModifyColumnFamiliesRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ModifyColumnFamiliesRequest.Unmarshal(m, b) @@ -673,7 +673,7 @@ func (m *ModifyColumnFamiliesRequest_Modification) Reset() { func (m *ModifyColumnFamiliesRequest_Modification) String() string { return proto.CompactTextString(m) } func (*ModifyColumnFamiliesRequest_Modification) ProtoMessage() {} func (*ModifyColumnFamiliesRequest_Modification) Descriptor() ([]byte, []int) { - return fileDescriptor_bigtable_table_admin_5099d9e5d77fdde2, []int{7, 0} + return fileDescriptor_bigtable_table_admin_66c21ad243a58d94, []int{7, 0} } func (m *ModifyColumnFamiliesRequest_Modification) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ModifyColumnFamiliesRequest_Modification.Unmarshal(m, b) @@ -861,7 +861,7 @@ func (m *GenerateConsistencyTokenRequest) Reset() { *m = GenerateConsist func (m *GenerateConsistencyTokenRequest) String() string { return proto.CompactTextString(m) } func (*GenerateConsistencyTokenRequest) ProtoMessage() {} func (*GenerateConsistencyTokenRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_bigtable_table_admin_5099d9e5d77fdde2, []int{8} + return fileDescriptor_bigtable_table_admin_66c21ad243a58d94, []int{8} } func (m *GenerateConsistencyTokenRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GenerateConsistencyTokenRequest.Unmarshal(m, b) @@ -902,7 +902,7 @@ func (m *GenerateConsistencyTokenResponse) Reset() { *m = GenerateConsis func (m *GenerateConsistencyTokenResponse) String() string { return proto.CompactTextString(m) } func (*GenerateConsistencyTokenResponse) ProtoMessage() {} func (*GenerateConsistencyTokenResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_bigtable_table_admin_5099d9e5d77fdde2, []int{9} + return fileDescriptor_bigtable_table_admin_66c21ad243a58d94, []int{9} } func (m *GenerateConsistencyTokenResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GenerateConsistencyTokenResponse.Unmarshal(m, b) @@ -947,7 +947,7 @@ func (m *CheckConsistencyRequest) Reset() { *m = CheckConsistencyRequest func (m *CheckConsistencyRequest) String() string { return proto.CompactTextString(m) } func (*CheckConsistencyRequest) ProtoMessage() {} func (*CheckConsistencyRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_bigtable_table_admin_5099d9e5d77fdde2, []int{10} + return fileDescriptor_bigtable_table_admin_66c21ad243a58d94, []int{10} } func (m *CheckConsistencyRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CheckConsistencyRequest.Unmarshal(m, b) @@ -996,7 +996,7 @@ func (m *CheckConsistencyResponse) Reset() { *m = CheckConsistencyRespon func (m *CheckConsistencyResponse) String() string { return proto.CompactTextString(m) } func (*CheckConsistencyResponse) ProtoMessage() {} func (*CheckConsistencyResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_bigtable_table_admin_5099d9e5d77fdde2, []int{11} + return fileDescriptor_bigtable_table_admin_66c21ad243a58d94, []int{11} } func (m *CheckConsistencyResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CheckConsistencyResponse.Unmarshal(m, b) @@ -1060,7 +1060,7 @@ func (m *SnapshotTableRequest) Reset() { *m = SnapshotTableRequest{} } func (m *SnapshotTableRequest) String() string { return proto.CompactTextString(m) } func (*SnapshotTableRequest) ProtoMessage() {} func (*SnapshotTableRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_bigtable_table_admin_5099d9e5d77fdde2, []int{12} + return fileDescriptor_bigtable_table_admin_66c21ad243a58d94, []int{12} } func (m *SnapshotTableRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SnapshotTableRequest.Unmarshal(m, b) @@ -1136,7 +1136,7 @@ func (m *GetSnapshotRequest) Reset() { *m = GetSnapshotRequest{} } func (m *GetSnapshotRequest) String() string { return proto.CompactTextString(m) } func (*GetSnapshotRequest) ProtoMessage() {} func (*GetSnapshotRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_bigtable_table_admin_5099d9e5d77fdde2, []int{13} + return fileDescriptor_bigtable_table_admin_66c21ad243a58d94, []int{13} } func (m *GetSnapshotRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetSnapshotRequest.Unmarshal(m, b) @@ -1191,7 +1191,7 @@ func (m *ListSnapshotsRequest) Reset() { *m = ListSnapshotsRequest{} } func (m *ListSnapshotsRequest) String() string { return proto.CompactTextString(m) } func (*ListSnapshotsRequest) ProtoMessage() {} func (*ListSnapshotsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_bigtable_table_admin_5099d9e5d77fdde2, []int{14} + return fileDescriptor_bigtable_table_admin_66c21ad243a58d94, []int{14} } func (m *ListSnapshotsRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ListSnapshotsRequest.Unmarshal(m, b) @@ -1255,7 +1255,7 @@ func (m *ListSnapshotsResponse) Reset() { *m = ListSnapshotsResponse{} } func (m *ListSnapshotsResponse) String() string { return proto.CompactTextString(m) } func (*ListSnapshotsResponse) ProtoMessage() {} func (*ListSnapshotsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_bigtable_table_admin_5099d9e5d77fdde2, []int{15} + return fileDescriptor_bigtable_table_admin_66c21ad243a58d94, []int{15} } func (m *ListSnapshotsResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ListSnapshotsResponse.Unmarshal(m, b) @@ -1310,7 +1310,7 @@ func (m *DeleteSnapshotRequest) Reset() { *m = DeleteSnapshotRequest{} } func (m *DeleteSnapshotRequest) String() string { return proto.CompactTextString(m) } func (*DeleteSnapshotRequest) ProtoMessage() {} func (*DeleteSnapshotRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_bigtable_table_admin_5099d9e5d77fdde2, []int{16} + return fileDescriptor_bigtable_table_admin_66c21ad243a58d94, []int{16} } func (m *DeleteSnapshotRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_DeleteSnapshotRequest.Unmarshal(m, b) @@ -1359,7 +1359,7 @@ func (m *SnapshotTableMetadata) Reset() { *m = SnapshotTableMetadata{} } func (m *SnapshotTableMetadata) String() string { return proto.CompactTextString(m) } func (*SnapshotTableMetadata) ProtoMessage() {} func (*SnapshotTableMetadata) Descriptor() ([]byte, []int) { - return fileDescriptor_bigtable_table_admin_5099d9e5d77fdde2, []int{17} + return fileDescriptor_bigtable_table_admin_66c21ad243a58d94, []int{17} } func (m *SnapshotTableMetadata) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SnapshotTableMetadata.Unmarshal(m, b) @@ -1423,7 +1423,7 @@ func (m *CreateTableFromSnapshotMetadata) Reset() { *m = CreateTableFrom func (m *CreateTableFromSnapshotMetadata) String() string { return proto.CompactTextString(m) } func (*CreateTableFromSnapshotMetadata) ProtoMessage() {} func (*CreateTableFromSnapshotMetadata) Descriptor() ([]byte, []int) { - return fileDescriptor_bigtable_table_admin_5099d9e5d77fdde2, []int{18} + return fileDescriptor_bigtable_table_admin_66c21ad243a58d94, []int{18} } func (m *CreateTableFromSnapshotMetadata) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CreateTableFromSnapshotMetadata.Unmarshal(m, b) @@ -2071,10 +2071,10 @@ var _BigtableTableAdmin_serviceDesc = grpc.ServiceDesc{ } func init() { - proto.RegisterFile("google/bigtable/admin/v2/bigtable_table_admin.proto", fileDescriptor_bigtable_table_admin_5099d9e5d77fdde2) + proto.RegisterFile("google/bigtable/admin/v2/bigtable_table_admin.proto", fileDescriptor_bigtable_table_admin_66c21ad243a58d94) } -var fileDescriptor_bigtable_table_admin_5099d9e5d77fdde2 = []byte{ +var fileDescriptor_bigtable_table_admin_66c21ad243a58d94 = []byte{ // 1520 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0xcb, 0x6f, 0xdc, 0x54, 0x17, 0xaf, 0x27, 0x8f, 0x26, 0x67, 0xf2, 0xea, 0xfd, 0xd2, 0x76, 0x3a, 0x6d, 0x93, 0xc8, 0x5f, diff --git a/vendor/google.golang.org/genproto/googleapis/bigtable/admin/v2/common.pb.go b/vendor/google.golang.org/genproto/googleapis/bigtable/admin/v2/common.pb.go index 0a8f6a3d..bb7e08ca 100644 --- a/vendor/google.golang.org/genproto/googleapis/bigtable/admin/v2/common.pb.go +++ b/vendor/google.golang.org/genproto/googleapis/bigtable/admin/v2/common.pb.go @@ -47,7 +47,7 @@ func (x StorageType) String() string { return proto.EnumName(StorageType_name, int32(x)) } func (StorageType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_common_3f175ab0025db664, []int{0} + return fileDescriptor_common_aea695cda7095808, []int{0} } func init() { @@ -55,10 +55,10 @@ func init() { } func init() { - proto.RegisterFile("google/bigtable/admin/v2/common.proto", fileDescriptor_common_3f175ab0025db664) + proto.RegisterFile("google/bigtable/admin/v2/common.proto", fileDescriptor_common_aea695cda7095808) } -var fileDescriptor_common_3f175ab0025db664 = []byte{ +var fileDescriptor_common_aea695cda7095808 = []byte{ // 270 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0xd0, 0xcf, 0x4b, 0xc3, 0x30, 0x14, 0x07, 0x70, 0x3b, 0x41, 0x21, 0xbb, 0x94, 0x9e, 0xc6, 0x28, 0x7a, 0xf2, 0xe2, 0x21, 0x81, diff --git a/vendor/google.golang.org/genproto/googleapis/bigtable/admin/v2/instance.pb.go b/vendor/google.golang.org/genproto/googleapis/bigtable/admin/v2/instance.pb.go index 72359c5e..ec877745 100644 --- a/vendor/google.golang.org/genproto/googleapis/bigtable/admin/v2/instance.pb.go +++ b/vendor/google.golang.org/genproto/googleapis/bigtable/admin/v2/instance.pb.go @@ -48,7 +48,7 @@ func (x Instance_State) String() string { return proto.EnumName(Instance_State_name, int32(x)) } func (Instance_State) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_instance_f4854c7156f8ce96, []int{0, 0} + return fileDescriptor_instance_373bfb3aaf0aa661, []int{0, 0} } // The type of the instance. @@ -87,7 +87,7 @@ func (x Instance_Type) String() string { return proto.EnumName(Instance_Type_name, int32(x)) } func (Instance_Type) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_instance_f4854c7156f8ce96, []int{0, 1} + return fileDescriptor_instance_373bfb3aaf0aa661, []int{0, 1} } // Possible states of a cluster. @@ -132,7 +132,7 @@ func (x Cluster_State) String() string { return proto.EnumName(Cluster_State_name, int32(x)) } func (Cluster_State) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_instance_f4854c7156f8ce96, []int{1, 0} + return fileDescriptor_instance_373bfb3aaf0aa661, []int{1, 0} } // A collection of Bigtable [Tables][google.bigtable.admin.v2.Table] and @@ -174,7 +174,7 @@ func (m *Instance) Reset() { *m = Instance{} } func (m *Instance) String() string { return proto.CompactTextString(m) } func (*Instance) ProtoMessage() {} func (*Instance) Descriptor() ([]byte, []int) { - return fileDescriptor_instance_f4854c7156f8ce96, []int{0} + return fileDescriptor_instance_373bfb3aaf0aa661, []int{0} } func (m *Instance) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Instance.Unmarshal(m, b) @@ -262,7 +262,7 @@ func (m *Cluster) Reset() { *m = Cluster{} } func (m *Cluster) String() string { return proto.CompactTextString(m) } func (*Cluster) ProtoMessage() {} func (*Cluster) Descriptor() ([]byte, []int) { - return fileDescriptor_instance_f4854c7156f8ce96, []int{1} + return fileDescriptor_instance_373bfb3aaf0aa661, []int{1} } func (m *Cluster) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Cluster.Unmarshal(m, b) @@ -351,7 +351,7 @@ func (m *AppProfile) Reset() { *m = AppProfile{} } func (m *AppProfile) String() string { return proto.CompactTextString(m) } func (*AppProfile) ProtoMessage() {} func (*AppProfile) Descriptor() ([]byte, []int) { - return fileDescriptor_instance_f4854c7156f8ce96, []int{2} + return fileDescriptor_instance_373bfb3aaf0aa661, []int{2} } func (m *AppProfile) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_AppProfile.Unmarshal(m, b) @@ -517,7 +517,7 @@ func (m *AppProfile_MultiClusterRoutingUseAny) Reset() { *m = AppProfile func (m *AppProfile_MultiClusterRoutingUseAny) String() string { return proto.CompactTextString(m) } func (*AppProfile_MultiClusterRoutingUseAny) ProtoMessage() {} func (*AppProfile_MultiClusterRoutingUseAny) Descriptor() ([]byte, []int) { - return fileDescriptor_instance_f4854c7156f8ce96, []int{2, 0} + return fileDescriptor_instance_373bfb3aaf0aa661, []int{2, 0} } func (m *AppProfile_MultiClusterRoutingUseAny) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_AppProfile_MultiClusterRoutingUseAny.Unmarshal(m, b) @@ -556,7 +556,7 @@ func (m *AppProfile_SingleClusterRouting) Reset() { *m = AppProfile_Sing func (m *AppProfile_SingleClusterRouting) String() string { return proto.CompactTextString(m) } func (*AppProfile_SingleClusterRouting) ProtoMessage() {} func (*AppProfile_SingleClusterRouting) Descriptor() ([]byte, []int) { - return fileDescriptor_instance_f4854c7156f8ce96, []int{2, 1} + return fileDescriptor_instance_373bfb3aaf0aa661, []int{2, 1} } func (m *AppProfile_SingleClusterRouting) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_AppProfile_SingleClusterRouting.Unmarshal(m, b) @@ -603,10 +603,10 @@ func init() { } func init() { - proto.RegisterFile("google/bigtable/admin/v2/instance.proto", fileDescriptor_instance_f4854c7156f8ce96) + proto.RegisterFile("google/bigtable/admin/v2/instance.proto", fileDescriptor_instance_373bfb3aaf0aa661) } -var fileDescriptor_instance_f4854c7156f8ce96 = []byte{ +var fileDescriptor_instance_373bfb3aaf0aa661 = []byte{ // 765 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x54, 0xdd, 0x8e, 0xdb, 0x44, 0x14, 0x8e, 0xf3, 0xb3, 0x64, 0x4f, 0xca, 0xd6, 0x1a, 0x22, 0x94, 0x86, 0x16, 0x42, 0xa4, 0xaa, diff --git a/vendor/google.golang.org/genproto/googleapis/bigtable/admin/v2/table.pb.go b/vendor/google.golang.org/genproto/googleapis/bigtable/admin/v2/table.pb.go index c45171e0..11396f8c 100644 --- a/vendor/google.golang.org/genproto/googleapis/bigtable/admin/v2/table.pb.go +++ b/vendor/google.golang.org/genproto/googleapis/bigtable/admin/v2/table.pb.go @@ -46,7 +46,7 @@ func (x Table_TimestampGranularity) String() string { return proto.EnumName(Table_TimestampGranularity_name, int32(x)) } func (Table_TimestampGranularity) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_table_ed23c9c8618cc2b8, []int{0, 0} + return fileDescriptor_table_d23eabdaefbca794, []int{0, 0} } // Defines a view over a table's fields. @@ -85,7 +85,7 @@ func (x Table_View) String() string { return proto.EnumName(Table_View_name, int32(x)) } func (Table_View) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_table_ed23c9c8618cc2b8, []int{0, 1} + return fileDescriptor_table_d23eabdaefbca794, []int{0, 1} } // Table replication states. @@ -129,7 +129,7 @@ func (x Table_ClusterState_ReplicationState) String() string { return proto.EnumName(Table_ClusterState_ReplicationState_name, int32(x)) } func (Table_ClusterState_ReplicationState) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_table_ed23c9c8618cc2b8, []int{0, 0, 0} + return fileDescriptor_table_d23eabdaefbca794, []int{0, 0, 0} } // Possible states of a snapshot. @@ -161,7 +161,7 @@ func (x Snapshot_State) String() string { return proto.EnumName(Snapshot_State_name, int32(x)) } func (Snapshot_State) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_table_ed23c9c8618cc2b8, []int{3, 0} + return fileDescriptor_table_d23eabdaefbca794, []int{3, 0} } // A collection of user data indexed by row, column, and timestamp. @@ -198,7 +198,7 @@ func (m *Table) Reset() { *m = Table{} } func (m *Table) String() string { return proto.CompactTextString(m) } func (*Table) ProtoMessage() {} func (*Table) Descriptor() ([]byte, []int) { - return fileDescriptor_table_ed23c9c8618cc2b8, []int{0} + return fileDescriptor_table_d23eabdaefbca794, []int{0} } func (m *Table) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Table.Unmarshal(m, b) @@ -260,7 +260,7 @@ func (m *Table_ClusterState) Reset() { *m = Table_ClusterState{} } func (m *Table_ClusterState) String() string { return proto.CompactTextString(m) } func (*Table_ClusterState) ProtoMessage() {} func (*Table_ClusterState) Descriptor() ([]byte, []int) { - return fileDescriptor_table_ed23c9c8618cc2b8, []int{0, 0} + return fileDescriptor_table_d23eabdaefbca794, []int{0, 0} } func (m *Table_ClusterState) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Table_ClusterState.Unmarshal(m, b) @@ -305,7 +305,7 @@ func (m *ColumnFamily) Reset() { *m = ColumnFamily{} } func (m *ColumnFamily) String() string { return proto.CompactTextString(m) } func (*ColumnFamily) ProtoMessage() {} func (*ColumnFamily) Descriptor() ([]byte, []int) { - return fileDescriptor_table_ed23c9c8618cc2b8, []int{1} + return fileDescriptor_table_d23eabdaefbca794, []int{1} } func (m *ColumnFamily) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ColumnFamily.Unmarshal(m, b) @@ -351,7 +351,7 @@ func (m *GcRule) Reset() { *m = GcRule{} } func (m *GcRule) String() string { return proto.CompactTextString(m) } func (*GcRule) ProtoMessage() {} func (*GcRule) Descriptor() ([]byte, []int) { - return fileDescriptor_table_ed23c9c8618cc2b8, []int{2} + return fileDescriptor_table_d23eabdaefbca794, []int{2} } func (m *GcRule) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GcRule.Unmarshal(m, b) @@ -554,7 +554,7 @@ func (m *GcRule_Intersection) Reset() { *m = GcRule_Intersection{} } func (m *GcRule_Intersection) String() string { return proto.CompactTextString(m) } func (*GcRule_Intersection) ProtoMessage() {} func (*GcRule_Intersection) Descriptor() ([]byte, []int) { - return fileDescriptor_table_ed23c9c8618cc2b8, []int{2, 0} + return fileDescriptor_table_d23eabdaefbca794, []int{2, 0} } func (m *GcRule_Intersection) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GcRule_Intersection.Unmarshal(m, b) @@ -594,7 +594,7 @@ func (m *GcRule_Union) Reset() { *m = GcRule_Union{} } func (m *GcRule_Union) String() string { return proto.CompactTextString(m) } func (*GcRule_Union) ProtoMessage() {} func (*GcRule_Union) Descriptor() ([]byte, []int) { - return fileDescriptor_table_ed23c9c8618cc2b8, []int{2, 1} + return fileDescriptor_table_d23eabdaefbca794, []int{2, 1} } func (m *GcRule_Union) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GcRule_Union.Unmarshal(m, b) @@ -665,7 +665,7 @@ func (m *Snapshot) Reset() { *m = Snapshot{} } func (m *Snapshot) String() string { return proto.CompactTextString(m) } func (*Snapshot) ProtoMessage() {} func (*Snapshot) Descriptor() ([]byte, []int) { - return fileDescriptor_table_ed23c9c8618cc2b8, []int{3} + return fileDescriptor_table_d23eabdaefbca794, []int{3} } func (m *Snapshot) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Snapshot.Unmarshal(m, b) @@ -751,10 +751,10 @@ func init() { } func init() { - proto.RegisterFile("google/bigtable/admin/v2/table.proto", fileDescriptor_table_ed23c9c8618cc2b8) + proto.RegisterFile("google/bigtable/admin/v2/table.proto", fileDescriptor_table_d23eabdaefbca794) } -var fileDescriptor_table_ed23c9c8618cc2b8 = []byte{ +var fileDescriptor_table_d23eabdaefbca794 = []byte{ // 965 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0xff, 0x6e, 0xdb, 0x54, 0x18, 0xad, 0xe3, 0x38, 0x6d, 0xbf, 0xa4, 0xad, 0xb9, 0x1d, 0x22, 0x8b, 0xa6, 0x2d, 0x44, 0x30, diff --git a/vendor/google.golang.org/genproto/googleapis/bigtable/v2/bigtable.pb.go b/vendor/google.golang.org/genproto/googleapis/bigtable/v2/bigtable.pb.go index 5b2387ca..dc51899e 100644 --- a/vendor/google.golang.org/genproto/googleapis/bigtable/v2/bigtable.pb.go +++ b/vendor/google.golang.org/genproto/googleapis/bigtable/v2/bigtable.pb.go @@ -52,7 +52,7 @@ func (m *ReadRowsRequest) Reset() { *m = ReadRowsRequest{} } func (m *ReadRowsRequest) String() string { return proto.CompactTextString(m) } func (*ReadRowsRequest) ProtoMessage() {} func (*ReadRowsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_bigtable_3e4f9d0dda27200f, []int{0} + return fileDescriptor_bigtable_63a4918e49d59690, []int{0} } func (m *ReadRowsRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ReadRowsRequest.Unmarshal(m, b) @@ -127,7 +127,7 @@ func (m *ReadRowsResponse) Reset() { *m = ReadRowsResponse{} } func (m *ReadRowsResponse) String() string { return proto.CompactTextString(m) } func (*ReadRowsResponse) ProtoMessage() {} func (*ReadRowsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_bigtable_3e4f9d0dda27200f, []int{1} + return fileDescriptor_bigtable_63a4918e49d59690, []int{1} } func (m *ReadRowsResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ReadRowsResponse.Unmarshal(m, b) @@ -219,7 +219,7 @@ func (m *ReadRowsResponse_CellChunk) Reset() { *m = ReadRowsResponse_Cel func (m *ReadRowsResponse_CellChunk) String() string { return proto.CompactTextString(m) } func (*ReadRowsResponse_CellChunk) ProtoMessage() {} func (*ReadRowsResponse_CellChunk) Descriptor() ([]byte, []int) { - return fileDescriptor_bigtable_3e4f9d0dda27200f, []int{1, 0} + return fileDescriptor_bigtable_63a4918e49d59690, []int{1, 0} } func (m *ReadRowsResponse_CellChunk) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ReadRowsResponse_CellChunk.Unmarshal(m, b) @@ -415,7 +415,7 @@ func (m *SampleRowKeysRequest) Reset() { *m = SampleRowKeysRequest{} } func (m *SampleRowKeysRequest) String() string { return proto.CompactTextString(m) } func (*SampleRowKeysRequest) ProtoMessage() {} func (*SampleRowKeysRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_bigtable_3e4f9d0dda27200f, []int{2} + return fileDescriptor_bigtable_63a4918e49d59690, []int{2} } func (m *SampleRowKeysRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SampleRowKeysRequest.Unmarshal(m, b) @@ -473,7 +473,7 @@ func (m *SampleRowKeysResponse) Reset() { *m = SampleRowKeysResponse{} } func (m *SampleRowKeysResponse) String() string { return proto.CompactTextString(m) } func (*SampleRowKeysResponse) ProtoMessage() {} func (*SampleRowKeysResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_bigtable_3e4f9d0dda27200f, []int{3} + return fileDescriptor_bigtable_63a4918e49d59690, []int{3} } func (m *SampleRowKeysResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SampleRowKeysResponse.Unmarshal(m, b) @@ -531,7 +531,7 @@ func (m *MutateRowRequest) Reset() { *m = MutateRowRequest{} } func (m *MutateRowRequest) String() string { return proto.CompactTextString(m) } func (*MutateRowRequest) ProtoMessage() {} func (*MutateRowRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_bigtable_3e4f9d0dda27200f, []int{4} + return fileDescriptor_bigtable_63a4918e49d59690, []int{4} } func (m *MutateRowRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MutateRowRequest.Unmarshal(m, b) @@ -590,7 +590,7 @@ func (m *MutateRowResponse) Reset() { *m = MutateRowResponse{} } func (m *MutateRowResponse) String() string { return proto.CompactTextString(m) } func (*MutateRowResponse) ProtoMessage() {} func (*MutateRowResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_bigtable_3e4f9d0dda27200f, []int{5} + return fileDescriptor_bigtable_63a4918e49d59690, []int{5} } func (m *MutateRowResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MutateRowResponse.Unmarshal(m, b) @@ -632,7 +632,7 @@ func (m *MutateRowsRequest) Reset() { *m = MutateRowsRequest{} } func (m *MutateRowsRequest) String() string { return proto.CompactTextString(m) } func (*MutateRowsRequest) ProtoMessage() {} func (*MutateRowsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_bigtable_3e4f9d0dda27200f, []int{6} + return fileDescriptor_bigtable_63a4918e49d59690, []int{6} } func (m *MutateRowsRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MutateRowsRequest.Unmarshal(m, b) @@ -690,7 +690,7 @@ func (m *MutateRowsRequest_Entry) Reset() { *m = MutateRowsRequest_Entry func (m *MutateRowsRequest_Entry) String() string { return proto.CompactTextString(m) } func (*MutateRowsRequest_Entry) ProtoMessage() {} func (*MutateRowsRequest_Entry) Descriptor() ([]byte, []int) { - return fileDescriptor_bigtable_3e4f9d0dda27200f, []int{6, 0} + return fileDescriptor_bigtable_63a4918e49d59690, []int{6, 0} } func (m *MutateRowsRequest_Entry) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MutateRowsRequest_Entry.Unmarshal(m, b) @@ -737,7 +737,7 @@ func (m *MutateRowsResponse) Reset() { *m = MutateRowsResponse{} } func (m *MutateRowsResponse) String() string { return proto.CompactTextString(m) } func (*MutateRowsResponse) ProtoMessage() {} func (*MutateRowsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_bigtable_3e4f9d0dda27200f, []int{7} + return fileDescriptor_bigtable_63a4918e49d59690, []int{7} } func (m *MutateRowsResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MutateRowsResponse.Unmarshal(m, b) @@ -782,7 +782,7 @@ func (m *MutateRowsResponse_Entry) Reset() { *m = MutateRowsResponse_Ent func (m *MutateRowsResponse_Entry) String() string { return proto.CompactTextString(m) } func (*MutateRowsResponse_Entry) ProtoMessage() {} func (*MutateRowsResponse_Entry) Descriptor() ([]byte, []int) { - return fileDescriptor_bigtable_3e4f9d0dda27200f, []int{7, 0} + return fileDescriptor_bigtable_63a4918e49d59690, []int{7, 0} } func (m *MutateRowsResponse_Entry) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MutateRowsResponse_Entry.Unmarshal(m, b) @@ -854,7 +854,7 @@ func (m *CheckAndMutateRowRequest) Reset() { *m = CheckAndMutateRowReque func (m *CheckAndMutateRowRequest) String() string { return proto.CompactTextString(m) } func (*CheckAndMutateRowRequest) ProtoMessage() {} func (*CheckAndMutateRowRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_bigtable_3e4f9d0dda27200f, []int{8} + return fileDescriptor_bigtable_63a4918e49d59690, []int{8} } func (m *CheckAndMutateRowRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CheckAndMutateRowRequest.Unmarshal(m, b) @@ -930,7 +930,7 @@ func (m *CheckAndMutateRowResponse) Reset() { *m = CheckAndMutateRowResp func (m *CheckAndMutateRowResponse) String() string { return proto.CompactTextString(m) } func (*CheckAndMutateRowResponse) ProtoMessage() {} func (*CheckAndMutateRowResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_bigtable_3e4f9d0dda27200f, []int{9} + return fileDescriptor_bigtable_63a4918e49d59690, []int{9} } func (m *CheckAndMutateRowResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CheckAndMutateRowResponse.Unmarshal(m, b) @@ -982,7 +982,7 @@ func (m *ReadModifyWriteRowRequest) Reset() { *m = ReadModifyWriteRowReq func (m *ReadModifyWriteRowRequest) String() string { return proto.CompactTextString(m) } func (*ReadModifyWriteRowRequest) ProtoMessage() {} func (*ReadModifyWriteRowRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_bigtable_3e4f9d0dda27200f, []int{10} + return fileDescriptor_bigtable_63a4918e49d59690, []int{10} } func (m *ReadModifyWriteRowRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ReadModifyWriteRowRequest.Unmarshal(m, b) @@ -1043,7 +1043,7 @@ func (m *ReadModifyWriteRowResponse) Reset() { *m = ReadModifyWriteRowRe func (m *ReadModifyWriteRowResponse) String() string { return proto.CompactTextString(m) } func (*ReadModifyWriteRowResponse) ProtoMessage() {} func (*ReadModifyWriteRowResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_bigtable_3e4f9d0dda27200f, []int{11} + return fileDescriptor_bigtable_63a4918e49d59690, []int{11} } func (m *ReadModifyWriteRowResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ReadModifyWriteRowResponse.Unmarshal(m, b) @@ -1448,10 +1448,10 @@ var _Bigtable_serviceDesc = grpc.ServiceDesc{ } func init() { - proto.RegisterFile("google/bigtable/v2/bigtable.proto", fileDescriptor_bigtable_3e4f9d0dda27200f) + proto.RegisterFile("google/bigtable/v2/bigtable.proto", fileDescriptor_bigtable_63a4918e49d59690) } -var fileDescriptor_bigtable_3e4f9d0dda27200f = []byte{ +var fileDescriptor_bigtable_63a4918e49d59690 = []byte{ // 1210 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x57, 0x41, 0x6f, 0x1b, 0x45, 0x14, 0x66, 0xec, 0xd8, 0xf1, 0xbe, 0xa4, 0x4d, 0x32, 0x84, 0x76, 0x6b, 0x5a, 0x70, 0x97, 0x16, diff --git a/vendor/google.golang.org/genproto/googleapis/bigtable/v2/data.pb.go b/vendor/google.golang.org/genproto/googleapis/bigtable/v2/data.pb.go index 71b56ba3..8e79a8a0 100644 --- a/vendor/google.golang.org/genproto/googleapis/bigtable/v2/data.pb.go +++ b/vendor/google.golang.org/genproto/googleapis/bigtable/v2/data.pb.go @@ -37,7 +37,7 @@ func (m *Row) Reset() { *m = Row{} } func (m *Row) String() string { return proto.CompactTextString(m) } func (*Row) ProtoMessage() {} func (*Row) Descriptor() ([]byte, []int) { - return fileDescriptor_data_4a4437069b4d43ba, []int{0} + return fileDescriptor_data_0d8ae2ec5d230b04, []int{0} } func (m *Row) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Row.Unmarshal(m, b) @@ -92,7 +92,7 @@ func (m *Family) Reset() { *m = Family{} } func (m *Family) String() string { return proto.CompactTextString(m) } func (*Family) ProtoMessage() {} func (*Family) Descriptor() ([]byte, []int) { - return fileDescriptor_data_4a4437069b4d43ba, []int{1} + return fileDescriptor_data_0d8ae2ec5d230b04, []int{1} } func (m *Family) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Family.Unmarshal(m, b) @@ -146,7 +146,7 @@ func (m *Column) Reset() { *m = Column{} } func (m *Column) String() string { return proto.CompactTextString(m) } func (*Column) ProtoMessage() {} func (*Column) Descriptor() ([]byte, []int) { - return fileDescriptor_data_4a4437069b4d43ba, []int{2} + return fileDescriptor_data_0d8ae2ec5d230b04, []int{2} } func (m *Column) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Column.Unmarshal(m, b) @@ -204,7 +204,7 @@ func (m *Cell) Reset() { *m = Cell{} } func (m *Cell) String() string { return proto.CompactTextString(m) } func (*Cell) ProtoMessage() {} func (*Cell) Descriptor() ([]byte, []int) { - return fileDescriptor_data_4a4437069b4d43ba, []int{3} + return fileDescriptor_data_0d8ae2ec5d230b04, []int{3} } func (m *Cell) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Cell.Unmarshal(m, b) @@ -270,7 +270,7 @@ func (m *RowRange) Reset() { *m = RowRange{} } func (m *RowRange) String() string { return proto.CompactTextString(m) } func (*RowRange) ProtoMessage() {} func (*RowRange) Descriptor() ([]byte, []int) { - return fileDescriptor_data_4a4437069b4d43ba, []int{4} + return fileDescriptor_data_0d8ae2ec5d230b04, []int{4} } func (m *RowRange) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_RowRange.Unmarshal(m, b) @@ -487,7 +487,7 @@ func (m *RowSet) Reset() { *m = RowSet{} } func (m *RowSet) String() string { return proto.CompactTextString(m) } func (*RowSet) ProtoMessage() {} func (*RowSet) Descriptor() ([]byte, []int) { - return fileDescriptor_data_4a4437069b4d43ba, []int{5} + return fileDescriptor_data_0d8ae2ec5d230b04, []int{5} } func (m *RowSet) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_RowSet.Unmarshal(m, b) @@ -551,7 +551,7 @@ func (m *ColumnRange) Reset() { *m = ColumnRange{} } func (m *ColumnRange) String() string { return proto.CompactTextString(m) } func (*ColumnRange) ProtoMessage() {} func (*ColumnRange) Descriptor() ([]byte, []int) { - return fileDescriptor_data_4a4437069b4d43ba, []int{6} + return fileDescriptor_data_0d8ae2ec5d230b04, []int{6} } func (m *ColumnRange) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ColumnRange.Unmarshal(m, b) @@ -775,7 +775,7 @@ func (m *TimestampRange) Reset() { *m = TimestampRange{} } func (m *TimestampRange) String() string { return proto.CompactTextString(m) } func (*TimestampRange) ProtoMessage() {} func (*TimestampRange) Descriptor() ([]byte, []int) { - return fileDescriptor_data_4a4437069b4d43ba, []int{7} + return fileDescriptor_data_0d8ae2ec5d230b04, []int{7} } func (m *TimestampRange) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_TimestampRange.Unmarshal(m, b) @@ -834,7 +834,7 @@ func (m *ValueRange) Reset() { *m = ValueRange{} } func (m *ValueRange) String() string { return proto.CompactTextString(m) } func (*ValueRange) ProtoMessage() {} func (*ValueRange) Descriptor() ([]byte, []int) { - return fileDescriptor_data_4a4437069b4d43ba, []int{8} + return fileDescriptor_data_0d8ae2ec5d230b04, []int{8} } func (m *ValueRange) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ValueRange.Unmarshal(m, b) @@ -1103,7 +1103,7 @@ func (m *RowFilter) Reset() { *m = RowFilter{} } func (m *RowFilter) String() string { return proto.CompactTextString(m) } func (*RowFilter) ProtoMessage() {} func (*RowFilter) Descriptor() ([]byte, []int) { - return fileDescriptor_data_4a4437069b4d43ba, []int{9} + return fileDescriptor_data_0d8ae2ec5d230b04, []int{9} } func (m *RowFilter) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_RowFilter.Unmarshal(m, b) @@ -1749,7 +1749,7 @@ func (m *RowFilter_Chain) Reset() { *m = RowFilter_Chain{} } func (m *RowFilter_Chain) String() string { return proto.CompactTextString(m) } func (*RowFilter_Chain) ProtoMessage() {} func (*RowFilter_Chain) Descriptor() ([]byte, []int) { - return fileDescriptor_data_4a4437069b4d43ba, []int{9, 0} + return fileDescriptor_data_0d8ae2ec5d230b04, []int{9, 0} } func (m *RowFilter_Chain) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_RowFilter_Chain.Unmarshal(m, b) @@ -1814,7 +1814,7 @@ func (m *RowFilter_Interleave) Reset() { *m = RowFilter_Interleave{} } func (m *RowFilter_Interleave) String() string { return proto.CompactTextString(m) } func (*RowFilter_Interleave) ProtoMessage() {} func (*RowFilter_Interleave) Descriptor() ([]byte, []int) { - return fileDescriptor_data_4a4437069b4d43ba, []int{9, 1} + return fileDescriptor_data_0d8ae2ec5d230b04, []int{9, 1} } func (m *RowFilter_Interleave) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_RowFilter_Interleave.Unmarshal(m, b) @@ -1868,7 +1868,7 @@ func (m *RowFilter_Condition) Reset() { *m = RowFilter_Condition{} } func (m *RowFilter_Condition) String() string { return proto.CompactTextString(m) } func (*RowFilter_Condition) ProtoMessage() {} func (*RowFilter_Condition) Descriptor() ([]byte, []int) { - return fileDescriptor_data_4a4437069b4d43ba, []int{9, 2} + return fileDescriptor_data_0d8ae2ec5d230b04, []int{9, 2} } func (m *RowFilter_Condition) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_RowFilter_Condition.Unmarshal(m, b) @@ -1928,7 +1928,7 @@ func (m *Mutation) Reset() { *m = Mutation{} } func (m *Mutation) String() string { return proto.CompactTextString(m) } func (*Mutation) ProtoMessage() {} func (*Mutation) Descriptor() ([]byte, []int) { - return fileDescriptor_data_4a4437069b4d43ba, []int{10} + return fileDescriptor_data_0d8ae2ec5d230b04, []int{10} } func (m *Mutation) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Mutation.Unmarshal(m, b) @@ -2148,7 +2148,7 @@ func (m *Mutation_SetCell) Reset() { *m = Mutation_SetCell{} } func (m *Mutation_SetCell) String() string { return proto.CompactTextString(m) } func (*Mutation_SetCell) ProtoMessage() {} func (*Mutation_SetCell) Descriptor() ([]byte, []int) { - return fileDescriptor_data_4a4437069b4d43ba, []int{10, 0} + return fileDescriptor_data_0d8ae2ec5d230b04, []int{10, 0} } func (m *Mutation_SetCell) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Mutation_SetCell.Unmarshal(m, b) @@ -2216,7 +2216,7 @@ func (m *Mutation_DeleteFromColumn) Reset() { *m = Mutation_DeleteFromCo func (m *Mutation_DeleteFromColumn) String() string { return proto.CompactTextString(m) } func (*Mutation_DeleteFromColumn) ProtoMessage() {} func (*Mutation_DeleteFromColumn) Descriptor() ([]byte, []int) { - return fileDescriptor_data_4a4437069b4d43ba, []int{10, 1} + return fileDescriptor_data_0d8ae2ec5d230b04, []int{10, 1} } func (m *Mutation_DeleteFromColumn) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Mutation_DeleteFromColumn.Unmarshal(m, b) @@ -2271,7 +2271,7 @@ func (m *Mutation_DeleteFromFamily) Reset() { *m = Mutation_DeleteFromFa func (m *Mutation_DeleteFromFamily) String() string { return proto.CompactTextString(m) } func (*Mutation_DeleteFromFamily) ProtoMessage() {} func (*Mutation_DeleteFromFamily) Descriptor() ([]byte, []int) { - return fileDescriptor_data_4a4437069b4d43ba, []int{10, 2} + return fileDescriptor_data_0d8ae2ec5d230b04, []int{10, 2} } func (m *Mutation_DeleteFromFamily) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Mutation_DeleteFromFamily.Unmarshal(m, b) @@ -2309,7 +2309,7 @@ func (m *Mutation_DeleteFromRow) Reset() { *m = Mutation_DeleteFromRow{} func (m *Mutation_DeleteFromRow) String() string { return proto.CompactTextString(m) } func (*Mutation_DeleteFromRow) ProtoMessage() {} func (*Mutation_DeleteFromRow) Descriptor() ([]byte, []int) { - return fileDescriptor_data_4a4437069b4d43ba, []int{10, 3} + return fileDescriptor_data_0d8ae2ec5d230b04, []int{10, 3} } func (m *Mutation_DeleteFromRow) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Mutation_DeleteFromRow.Unmarshal(m, b) @@ -2355,7 +2355,7 @@ func (m *ReadModifyWriteRule) Reset() { *m = ReadModifyWriteRule{} } func (m *ReadModifyWriteRule) String() string { return proto.CompactTextString(m) } func (*ReadModifyWriteRule) ProtoMessage() {} func (*ReadModifyWriteRule) Descriptor() ([]byte, []int) { - return fileDescriptor_data_4a4437069b4d43ba, []int{11} + return fileDescriptor_data_0d8ae2ec5d230b04, []int{11} } func (m *ReadModifyWriteRule) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ReadModifyWriteRule.Unmarshal(m, b) @@ -2513,9 +2513,9 @@ func init() { proto.RegisterType((*ReadModifyWriteRule)(nil), "google.bigtable.v2.ReadModifyWriteRule") } -func init() { proto.RegisterFile("google/bigtable/v2/data.proto", fileDescriptor_data_4a4437069b4d43ba) } +func init() { proto.RegisterFile("google/bigtable/v2/data.proto", fileDescriptor_data_0d8ae2ec5d230b04) } -var fileDescriptor_data_4a4437069b4d43ba = []byte{ +var fileDescriptor_data_0d8ae2ec5d230b04 = []byte{ // 1444 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x57, 0xdb, 0x72, 0x1b, 0x45, 0x13, 0xd6, 0x5a, 0xb6, 0x2c, 0xf5, 0xca, 0x96, 0x32, 0x71, 0x1c, 0x45, 0x7f, 0xfc, 0xc7, 0xa5, diff --git a/vendor/google.golang.org/genproto/googleapis/iam/v1/iam_policy.pb.go b/vendor/google.golang.org/genproto/googleapis/iam/v1/iam_policy.pb.go index dfc87966..c2f676ec 100644 --- a/vendor/google.golang.org/genproto/googleapis/iam/v1/iam_policy.pb.go +++ b/vendor/google.golang.org/genproto/googleapis/iam/v1/iam_policy.pb.go @@ -44,7 +44,7 @@ func (m *SetIamPolicyRequest) Reset() { *m = SetIamPolicyRequest{} } func (m *SetIamPolicyRequest) String() string { return proto.CompactTextString(m) } func (*SetIamPolicyRequest) ProtoMessage() {} func (*SetIamPolicyRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_iam_policy_58547b5cf2e9d67a, []int{0} + return fileDescriptor_iam_policy_364532d533b79e88, []int{0} } func (m *SetIamPolicyRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SetIamPolicyRequest.Unmarshal(m, b) @@ -93,7 +93,7 @@ func (m *GetIamPolicyRequest) Reset() { *m = GetIamPolicyRequest{} } func (m *GetIamPolicyRequest) String() string { return proto.CompactTextString(m) } func (*GetIamPolicyRequest) ProtoMessage() {} func (*GetIamPolicyRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_iam_policy_58547b5cf2e9d67a, []int{1} + return fileDescriptor_iam_policy_364532d533b79e88, []int{1} } func (m *GetIamPolicyRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetIamPolicyRequest.Unmarshal(m, b) @@ -140,7 +140,7 @@ func (m *TestIamPermissionsRequest) Reset() { *m = TestIamPermissionsReq func (m *TestIamPermissionsRequest) String() string { return proto.CompactTextString(m) } func (*TestIamPermissionsRequest) ProtoMessage() {} func (*TestIamPermissionsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_iam_policy_58547b5cf2e9d67a, []int{2} + return fileDescriptor_iam_policy_364532d533b79e88, []int{2} } func (m *TestIamPermissionsRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_TestIamPermissionsRequest.Unmarshal(m, b) @@ -188,7 +188,7 @@ func (m *TestIamPermissionsResponse) Reset() { *m = TestIamPermissionsRe func (m *TestIamPermissionsResponse) String() string { return proto.CompactTextString(m) } func (*TestIamPermissionsResponse) ProtoMessage() {} func (*TestIamPermissionsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_iam_policy_58547b5cf2e9d67a, []int{3} + return fileDescriptor_iam_policy_364532d533b79e88, []int{3} } func (m *TestIamPermissionsResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_TestIamPermissionsResponse.Unmarshal(m, b) @@ -377,10 +377,10 @@ var _IAMPolicy_serviceDesc = grpc.ServiceDesc{ } func init() { - proto.RegisterFile("google/iam/v1/iam_policy.proto", fileDescriptor_iam_policy_58547b5cf2e9d67a) + proto.RegisterFile("google/iam/v1/iam_policy.proto", fileDescriptor_iam_policy_364532d533b79e88) } -var fileDescriptor_iam_policy_58547b5cf2e9d67a = []byte{ +var fileDescriptor_iam_policy_364532d533b79e88 = []byte{ // 411 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4b, 0xcf, 0xcf, 0x4f, 0xcf, 0x49, 0xd5, 0xcf, 0x4c, 0xcc, 0xd5, 0x2f, 0x33, 0x04, 0x51, 0xf1, 0x05, 0xf9, 0x39, 0x99, diff --git a/vendor/google.golang.org/genproto/googleapis/iam/v1/policy.pb.go b/vendor/google.golang.org/genproto/googleapis/iam/v1/policy.pb.go index 99dd75f2..6fad84d9 100644 --- a/vendor/google.golang.org/genproto/googleapis/iam/v1/policy.pb.go +++ b/vendor/google.golang.org/genproto/googleapis/iam/v1/policy.pb.go @@ -46,7 +46,7 @@ func (x BindingDelta_Action) String() string { return proto.EnumName(BindingDelta_Action_name, int32(x)) } func (BindingDelta_Action) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_policy_6ba2a3dcbcdd909c, []int{3, 0} + return fileDescriptor_policy_76d1e02555c18b4a, []int{3, 0} } // Defines an Identity and Access Management (IAM) policy. It is used to @@ -107,7 +107,7 @@ func (m *Policy) Reset() { *m = Policy{} } func (m *Policy) String() string { return proto.CompactTextString(m) } func (*Policy) ProtoMessage() {} func (*Policy) Descriptor() ([]byte, []int) { - return fileDescriptor_policy_6ba2a3dcbcdd909c, []int{0} + return fileDescriptor_policy_76d1e02555c18b4a, []int{0} } func (m *Policy) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Policy.Unmarshal(m, b) @@ -187,7 +187,7 @@ func (m *Binding) Reset() { *m = Binding{} } func (m *Binding) String() string { return proto.CompactTextString(m) } func (*Binding) ProtoMessage() {} func (*Binding) Descriptor() ([]byte, []int) { - return fileDescriptor_policy_6ba2a3dcbcdd909c, []int{1} + return fileDescriptor_policy_76d1e02555c18b4a, []int{1} } func (m *Binding) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Binding.Unmarshal(m, b) @@ -234,7 +234,7 @@ func (m *PolicyDelta) Reset() { *m = PolicyDelta{} } func (m *PolicyDelta) String() string { return proto.CompactTextString(m) } func (*PolicyDelta) ProtoMessage() {} func (*PolicyDelta) Descriptor() ([]byte, []int) { - return fileDescriptor_policy_6ba2a3dcbcdd909c, []int{2} + return fileDescriptor_policy_76d1e02555c18b4a, []int{2} } func (m *PolicyDelta) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PolicyDelta.Unmarshal(m, b) @@ -284,7 +284,7 @@ func (m *BindingDelta) Reset() { *m = BindingDelta{} } func (m *BindingDelta) String() string { return proto.CompactTextString(m) } func (*BindingDelta) ProtoMessage() {} func (*BindingDelta) Descriptor() ([]byte, []int) { - return fileDescriptor_policy_6ba2a3dcbcdd909c, []int{3} + return fileDescriptor_policy_76d1e02555c18b4a, []int{3} } func (m *BindingDelta) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_BindingDelta.Unmarshal(m, b) @@ -333,9 +333,9 @@ func init() { proto.RegisterEnum("google.iam.v1.BindingDelta_Action", BindingDelta_Action_name, BindingDelta_Action_value) } -func init() { proto.RegisterFile("google/iam/v1/policy.proto", fileDescriptor_policy_6ba2a3dcbcdd909c) } +func init() { proto.RegisterFile("google/iam/v1/policy.proto", fileDescriptor_policy_76d1e02555c18b4a) } -var fileDescriptor_policy_6ba2a3dcbcdd909c = []byte{ +var fileDescriptor_policy_76d1e02555c18b4a = []byte{ // 403 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x52, 0x4d, 0xab, 0x13, 0x31, 0x14, 0x35, 0xed, 0x73, 0x6a, 0xef, 0xfb, 0xa0, 0x46, 0x28, 0xc3, 0xd3, 0x45, 0x99, 0x55, 0x57, diff --git a/vendor/google.golang.org/genproto/googleapis/longrunning/operations.pb.go b/vendor/google.golang.org/genproto/googleapis/longrunning/operations.pb.go index 06eed24b..94cdbb6e 100644 --- a/vendor/google.golang.org/genproto/googleapis/longrunning/operations.pb.go +++ b/vendor/google.golang.org/genproto/googleapis/longrunning/operations.pb.go @@ -60,7 +60,7 @@ func (m *Operation) Reset() { *m = Operation{} } func (m *Operation) String() string { return proto.CompactTextString(m) } func (*Operation) ProtoMessage() {} func (*Operation) Descriptor() ([]byte, []int) { - return fileDescriptor_operations_6e3ea16d34200c2d, []int{0} + return fileDescriptor_operations_e03d010aa0ab3f7f, []int{0} } func (m *Operation) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Operation.Unmarshal(m, b) @@ -212,7 +212,8 @@ func _Operation_OneofSizer(msg proto.Message) (n int) { return n } -// The request message for [Operations.GetOperation][google.longrunning.Operations.GetOperation]. +// The request message for +// [Operations.GetOperation][google.longrunning.Operations.GetOperation]. type GetOperationRequest struct { // The name of the operation resource. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` @@ -225,7 +226,7 @@ func (m *GetOperationRequest) Reset() { *m = GetOperationRequest{} } func (m *GetOperationRequest) String() string { return proto.CompactTextString(m) } func (*GetOperationRequest) ProtoMessage() {} func (*GetOperationRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_operations_6e3ea16d34200c2d, []int{1} + return fileDescriptor_operations_e03d010aa0ab3f7f, []int{1} } func (m *GetOperationRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetOperationRequest.Unmarshal(m, b) @@ -252,7 +253,8 @@ func (m *GetOperationRequest) GetName() string { return "" } -// The request message for [Operations.ListOperations][google.longrunning.Operations.ListOperations]. +// The request message for +// [Operations.ListOperations][google.longrunning.Operations.ListOperations]. type ListOperationsRequest struct { // The name of the operation collection. Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"` @@ -271,7 +273,7 @@ func (m *ListOperationsRequest) Reset() { *m = ListOperationsRequest{} } func (m *ListOperationsRequest) String() string { return proto.CompactTextString(m) } func (*ListOperationsRequest) ProtoMessage() {} func (*ListOperationsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_operations_6e3ea16d34200c2d, []int{2} + return fileDescriptor_operations_e03d010aa0ab3f7f, []int{2} } func (m *ListOperationsRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ListOperationsRequest.Unmarshal(m, b) @@ -319,7 +321,8 @@ func (m *ListOperationsRequest) GetPageToken() string { return "" } -// The response message for [Operations.ListOperations][google.longrunning.Operations.ListOperations]. +// The response message for +// [Operations.ListOperations][google.longrunning.Operations.ListOperations]. type ListOperationsResponse struct { // A list of operations that matches the specified filter in the request. Operations []*Operation `protobuf:"bytes,1,rep,name=operations,proto3" json:"operations,omitempty"` @@ -334,7 +337,7 @@ func (m *ListOperationsResponse) Reset() { *m = ListOperationsResponse{} func (m *ListOperationsResponse) String() string { return proto.CompactTextString(m) } func (*ListOperationsResponse) ProtoMessage() {} func (*ListOperationsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_operations_6e3ea16d34200c2d, []int{3} + return fileDescriptor_operations_e03d010aa0ab3f7f, []int{3} } func (m *ListOperationsResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ListOperationsResponse.Unmarshal(m, b) @@ -368,7 +371,8 @@ func (m *ListOperationsResponse) GetNextPageToken() string { return "" } -// The request message for [Operations.CancelOperation][google.longrunning.Operations.CancelOperation]. +// The request message for +// [Operations.CancelOperation][google.longrunning.Operations.CancelOperation]. type CancelOperationRequest struct { // The name of the operation resource to be cancelled. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` @@ -381,7 +385,7 @@ func (m *CancelOperationRequest) Reset() { *m = CancelOperationRequest{} func (m *CancelOperationRequest) String() string { return proto.CompactTextString(m) } func (*CancelOperationRequest) ProtoMessage() {} func (*CancelOperationRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_operations_6e3ea16d34200c2d, []int{4} + return fileDescriptor_operations_e03d010aa0ab3f7f, []int{4} } func (m *CancelOperationRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CancelOperationRequest.Unmarshal(m, b) @@ -408,7 +412,8 @@ func (m *CancelOperationRequest) GetName() string { return "" } -// The request message for [Operations.DeleteOperation][google.longrunning.Operations.DeleteOperation]. +// The request message for +// [Operations.DeleteOperation][google.longrunning.Operations.DeleteOperation]. type DeleteOperationRequest struct { // The name of the operation resource to be deleted. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` @@ -421,7 +426,7 @@ func (m *DeleteOperationRequest) Reset() { *m = DeleteOperationRequest{} func (m *DeleteOperationRequest) String() string { return proto.CompactTextString(m) } func (*DeleteOperationRequest) ProtoMessage() {} func (*DeleteOperationRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_operations_6e3ea16d34200c2d, []int{5} + return fileDescriptor_operations_e03d010aa0ab3f7f, []int{5} } func (m *DeleteOperationRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_DeleteOperationRequest.Unmarshal(m, b) @@ -492,8 +497,9 @@ type OperationsClient interface { // other methods to check whether the cancellation succeeded or whether the // operation completed despite cancellation. On successful cancellation, // the operation is not deleted; instead, it becomes an operation with - // an [Operation.error][google.longrunning.Operation.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, - // corresponding to `Code.CANCELLED`. + // an [Operation.error][google.longrunning.Operation.error] value with a + // [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + // `Code.CANCELLED`. CancelOperation(ctx context.Context, in *CancelOperationRequest, opts ...grpc.CallOption) (*empty.Empty, error) } @@ -566,8 +572,9 @@ type OperationsServer interface { // other methods to check whether the cancellation succeeded or whether the // operation completed despite cancellation. On successful cancellation, // the operation is not deleted; instead, it becomes an operation with - // an [Operation.error][google.longrunning.Operation.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, - // corresponding to `Code.CANCELLED`. + // an [Operation.error][google.longrunning.Operation.error] value with a + // [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + // `Code.CANCELLED`. CancelOperation(context.Context, *CancelOperationRequest) (*empty.Empty, error) } @@ -673,10 +680,10 @@ var _Operations_serviceDesc = grpc.ServiceDesc{ } func init() { - proto.RegisterFile("google/longrunning/operations.proto", fileDescriptor_operations_6e3ea16d34200c2d) + proto.RegisterFile("google/longrunning/operations.proto", fileDescriptor_operations_e03d010aa0ab3f7f) } -var fileDescriptor_operations_6e3ea16d34200c2d = []byte{ +var fileDescriptor_operations_e03d010aa0ab3f7f = []byte{ // 597 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x54, 0xc1, 0x6e, 0xd3, 0x4c, 0x10, 0xae, 0xd3, 0xb4, 0x4a, 0xa6, 0xff, 0x4f, 0xa4, 0x85, 0xba, 0xc6, 0x25, 0x22, 0x32, 0x08, diff --git a/vendor/google.golang.org/genproto/googleapis/rpc/status/status.pb.go b/vendor/google.golang.org/genproto/googleapis/rpc/status/status.pb.go index 7bfe37a3..57ae35f6 100644 --- a/vendor/google.golang.org/genproto/googleapis/rpc/status/status.pb.go +++ b/vendor/google.golang.org/genproto/googleapis/rpc/status/status.pb.go @@ -19,24 +19,25 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package -// The `Status` type defines a logical error model that is suitable for different -// programming environments, including REST APIs and RPC APIs. It is used by -// [gRPC](https://github.com/grpc). The error model is designed to be: +// The `Status` type defines a logical error model that is suitable for +// different programming environments, including REST APIs and RPC APIs. It is +// used by [gRPC](https://github.com/grpc). The error model is designed to be: // // - Simple to use and understand for most users // - Flexible enough to meet unexpected needs // // # Overview // -// The `Status` message contains three pieces of data: error code, error message, -// and error details. The error code should be an enum value of -// [google.rpc.Code][google.rpc.Code], but it may accept additional error codes if needed. The -// error message should be a developer-facing English message that helps -// developers *understand* and *resolve* the error. If a localized user-facing -// error message is needed, put the localized message in the error details or -// localize it in the client. The optional error details may contain arbitrary -// information about the error. There is a predefined set of error detail types -// in the package `google.rpc` that can be used for common error conditions. +// The `Status` message contains three pieces of data: error code, error +// message, and error details. The error code should be an enum value of +// [google.rpc.Code][google.rpc.Code], but it may accept additional error codes +// if needed. The error message should be a developer-facing English message +// that helps developers *understand* and *resolve* the error. If a localized +// user-facing error message is needed, put the localized message in the error +// details or localize it in the client. The optional error details may contain +// arbitrary information about the error. There is a predefined set of error +// detail types in the package `google.rpc` that can be used for common error +// conditions. // // # Language mapping // @@ -72,11 +73,13 @@ const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package // - Logging. If some API errors are stored in logs, the message `Status` could // be used directly after any stripping needed for security/privacy reasons. type Status struct { - // The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. + // The status code, which should be an enum value of + // [google.rpc.Code][google.rpc.Code]. Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` // A developer-facing error message, which should be in English. Any // user-facing error message should be localized and sent in the - // [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client. + // [google.rpc.Status.details][google.rpc.Status.details] field, or localized + // by the client. Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` // A list of messages that carry the error details. There is a common set of // message types for APIs to use. @@ -90,7 +93,7 @@ func (m *Status) Reset() { *m = Status{} } func (m *Status) String() string { return proto.CompactTextString(m) } func (*Status) ProtoMessage() {} func (*Status) Descriptor() ([]byte, []int) { - return fileDescriptor_status_c6e4de62dcdf2edf, []int{0} + return fileDescriptor_status_ced6ddf76350620b, []int{0} } func (m *Status) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Status.Unmarshal(m, b) @@ -135,9 +138,9 @@ func init() { proto.RegisterType((*Status)(nil), "google.rpc.Status") } -func init() { proto.RegisterFile("google/rpc/status.proto", fileDescriptor_status_c6e4de62dcdf2edf) } +func init() { proto.RegisterFile("google/rpc/status.proto", fileDescriptor_status_ced6ddf76350620b) } -var fileDescriptor_status_c6e4de62dcdf2edf = []byte{ +var fileDescriptor_status_ced6ddf76350620b = []byte{ // 209 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x4f, 0xcf, 0xcf, 0x4f, 0xcf, 0x49, 0xd5, 0x2f, 0x2a, 0x48, 0xd6, 0x2f, 0x2e, 0x49, 0x2c, 0x29, 0x2d, 0xd6, 0x2b, 0x28, diff --git a/vendor/google.golang.org/grpc/.travis.yml b/vendor/google.golang.org/grpc/.travis.yml index f443eec9..8f36b81a 100644 --- a/vendor/google.golang.org/grpc/.travis.yml +++ b/vendor/google.golang.org/grpc/.travis.yml @@ -2,6 +2,8 @@ language: go matrix: include: + - go: 1.12beta2 + env: GO111MODULE=on - go: 1.11.x env: VET=1 GO111MODULE=on - go: 1.11.x diff --git a/vendor/google.golang.org/grpc/CONTRIBUTING.md b/vendor/google.golang.org/grpc/CONTRIBUTING.md index 0863eb26..ca34e8aa 100644 --- a/vendor/google.golang.org/grpc/CONTRIBUTING.md +++ b/vendor/google.golang.org/grpc/CONTRIBUTING.md @@ -31,6 +31,7 @@ How to get your contributions merged smoothly and quickly. - `make vet` to catch vet errors - `make test` to run the tests - `make testrace` to run tests in race mode + - optional `make testappengine` to run tests with appengine - Exceptions to the rules can be made if there's a compelling reason for doing so. diff --git a/vendor/google.golang.org/grpc/Makefile b/vendor/google.golang.org/grpc/Makefile index 41a754f9..db982aab 100644 --- a/vendor/google.golang.org/grpc/Makefile +++ b/vendor/google.golang.org/grpc/Makefile @@ -1,4 +1,4 @@ -all: vet test testrace testappengine +all: vet test testrace build: deps go build google.golang.org/grpc/... diff --git a/vendor/google.golang.org/grpc/README.md b/vendor/google.golang.org/grpc/README.md index e3fb3c75..f5eec671 100644 --- a/vendor/google.golang.org/grpc/README.md +++ b/vendor/google.golang.org/grpc/README.md @@ -20,7 +20,7 @@ gRPC-Go requires Go 1.9 or later. Constraints ----------- -The grpc package should only depend on standard Go packages and a small number of exceptions. If your contribution introduces new dependencies which are NOT in the [list](http://godoc.org/google.golang.org/grpc?imports), you need a discussion with gRPC-Go authors and consultants. +The grpc package should only depend on standard Go packages and a small number of exceptions. If your contribution introduces new dependencies which are NOT in the [list](https://godoc.org/google.golang.org/grpc?imports), you need a discussion with gRPC-Go authors and consultants. Documentation ------------- diff --git a/vendor/google.golang.org/grpc/backoff.go b/vendor/google.golang.org/grpc/backoff.go index fa31565f..97c6e256 100644 --- a/vendor/google.golang.org/grpc/backoff.go +++ b/vendor/google.golang.org/grpc/backoff.go @@ -17,7 +17,7 @@ */ // See internal/backoff package for the backoff implementation. This file is -// kept for the exported types and API backward compatility. +// kept for the exported types and API backward compatibility. package grpc diff --git a/vendor/google.golang.org/grpc/balancer/balancer.go b/vendor/google.golang.org/grpc/balancer/balancer.go index 317c2e72..67518de9 100644 --- a/vendor/google.golang.org/grpc/balancer/balancer.go +++ b/vendor/google.golang.org/grpc/balancer/balancer.go @@ -61,7 +61,7 @@ func init() { } // Get returns the resolver builder registered with the given name. -// Note that the compare is done in a case-insenstive fashion. +// Note that the compare is done in a case-insensitive fashion. // If no builder is register with the name, nil will be returned. func Get(name string) Builder { if b, ok := m[strings.ToLower(name)]; ok { @@ -127,7 +127,7 @@ type ClientConn interface { // The SubConn will be shutdown. RemoveSubConn(SubConn) - // UpdateBalancerState is called by balancer to nofity gRPC that some internal + // UpdateBalancerState is called by balancer to notify gRPC that some internal // state in balancer has changed. // // gRPC will update the connectivity state of the ClientConn, and will call pick @@ -227,9 +227,10 @@ type Picker interface { // - Else (error is other non-nil error): // - The RPC will fail with unavailable error. // - // The returned done() function will be called once the rpc has finished, with the - // final status of that RPC. - // done may be nil if balancer doesn't care about the RPC status. + // The returned done() function will be called once the rpc has finished, + // with the final status of that RPC. If the SubConn returned is not a + // valid SubConn type, done may not be called. done may be nil if balancer + // doesn't care about the RPC status. Pick(ctx context.Context, opts PickOptions) (conn SubConn, done func(DoneInfo), err error) } diff --git a/vendor/google.golang.org/grpc/balancer/roundrobin/roundrobin.go b/vendor/google.golang.org/grpc/balancer/roundrobin/roundrobin.go index 57aea9fb..29f7a4dd 100644 --- a/vendor/google.golang.org/grpc/balancer/roundrobin/roundrobin.go +++ b/vendor/google.golang.org/grpc/balancer/roundrobin/roundrobin.go @@ -28,6 +28,7 @@ import ( "google.golang.org/grpc/balancer" "google.golang.org/grpc/balancer/base" "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/internal/grpcrand" "google.golang.org/grpc/resolver" ) @@ -47,12 +48,19 @@ type rrPickerBuilder struct{} func (*rrPickerBuilder) Build(readySCs map[resolver.Address]balancer.SubConn) balancer.Picker { grpclog.Infof("roundrobinPicker: newPicker called with readySCs: %v", readySCs) + if len(readySCs) == 0 { + return base.NewErrPicker(balancer.ErrNoSubConnAvailable) + } var scs []balancer.SubConn for _, sc := range readySCs { scs = append(scs, sc) } return &rrPicker{ subConns: scs, + // Start at a random index, as the same RR balancer rebuilds a new + // picker when SubConn states change, and we don't want to apply excess + // load to the first server in the list. + next: grpcrand.Intn(len(scs)), } } @@ -67,10 +75,6 @@ type rrPicker struct { } func (p *rrPicker) Pick(ctx context.Context, opts balancer.PickOptions) (balancer.SubConn, func(balancer.DoneInfo), error) { - if len(p.subConns) <= 0 { - return nil, nil, balancer.ErrNoSubConnAvailable - } - p.mu.Lock() sc := p.subConns[p.next] p.next = (p.next + 1) % len(p.subConns) diff --git a/vendor/google.golang.org/grpc/balancer_v1_wrapper.go b/vendor/google.golang.org/grpc/balancer_v1_wrapper.go index 42b60fea..29bda635 100644 --- a/vendor/google.golang.org/grpc/balancer_v1_wrapper.go +++ b/vendor/google.golang.org/grpc/balancer_v1_wrapper.go @@ -281,9 +281,8 @@ func (bw *balancerWrapper) Close() { } // The picker is the balancerWrapper itself. -// Pick should never return ErrNoSubConnAvailable. // It either blocks or returns error, consistent with v1 balancer Get(). -func (bw *balancerWrapper) Pick(ctx context.Context, opts balancer.PickOptions) (balancer.SubConn, func(balancer.DoneInfo), error) { +func (bw *balancerWrapper) Pick(ctx context.Context, opts balancer.PickOptions) (sc balancer.SubConn, done func(balancer.DoneInfo), err error) { failfast := true // Default failfast is true. if ss, ok := rpcInfoFromContext(ctx); ok { failfast = ss.failfast @@ -292,35 +291,51 @@ func (bw *balancerWrapper) Pick(ctx context.Context, opts balancer.PickOptions) if err != nil { return nil, nil, err } - var done func(balancer.DoneInfo) if p != nil { - done = func(i balancer.DoneInfo) { p() } + done = func(balancer.DoneInfo) { p() } + defer func() { + if err != nil { + p() + } + }() } - var sc balancer.SubConn + bw.mu.Lock() defer bw.mu.Unlock() if bw.pickfirst { // Get the first sc in conns. - for _, sc = range bw.conns { - break - } - } else { - var ok bool - sc, ok = bw.conns[resolver.Address{ - Addr: a.Addr, - Type: resolver.Backend, - ServerName: "", - Metadata: a.Metadata, - }] - if !ok && failfast { - return nil, nil, balancer.ErrTransientFailure - } - if s, ok := bw.connSt[sc]; failfast && (!ok || s.s != connectivity.Ready) { - // If the returned sc is not ready and RPC is failfast, - // return error, and this RPC will fail. - return nil, nil, balancer.ErrTransientFailure + for _, sc := range bw.conns { + return sc, done, nil } + return nil, nil, balancer.ErrNoSubConnAvailable + } + sc, ok1 := bw.conns[resolver.Address{ + Addr: a.Addr, + Type: resolver.Backend, + ServerName: "", + Metadata: a.Metadata, + }] + s, ok2 := bw.connSt[sc] + if !ok1 || !ok2 { + // This can only happen due to a race where Get() returned an address + // that was subsequently removed by Notify. In this case we should + // retry always. + return nil, nil, balancer.ErrNoSubConnAvailable + } + switch s.s { + case connectivity.Ready, connectivity.Idle: + return sc, done, nil + case connectivity.Shutdown, connectivity.TransientFailure: + // If the returned sc has been shut down or is in transient failure, + // return error, and this RPC will fail or wait for another picker (if + // non-failfast). + return nil, nil, balancer.ErrTransientFailure + default: + // For other states (connecting or unknown), the v1 balancer would + // traditionally wait until ready and then issue the RPC. Returning + // ErrNoSubConnAvailable will be a slight improvement in that it will + // allow the balancer to choose another address in case others are + // connected. + return nil, nil, balancer.ErrNoSubConnAvailable } - - return sc, done, nil } diff --git a/vendor/google.golang.org/grpc/call.go b/vendor/google.golang.org/grpc/call.go index 100f05dc..9e20e4d3 100644 --- a/vendor/google.golang.org/grpc/call.go +++ b/vendor/google.golang.org/grpc/call.go @@ -40,7 +40,7 @@ func (cc *ClientConn) Invoke(ctx context.Context, method string, args, reply int func combine(o1 []CallOption, o2 []CallOption) []CallOption { // we don't use append because o1 could have extra capacity whose // elements would be overwritten, which could cause inadvertent - // sharing (and race connditions) between concurrent calls + // sharing (and race conditions) between concurrent calls if len(o1) == 0 { return o2 } else if len(o2) == 0 { diff --git a/vendor/google.golang.org/grpc/clientconn.go b/vendor/google.golang.org/grpc/clientconn.go index 56d0bf71..edbed876 100644 --- a/vendor/google.golang.org/grpc/clientconn.go +++ b/vendor/google.golang.org/grpc/clientconn.go @@ -86,7 +86,7 @@ var ( // with other individual Transport Credentials. errTransportCredsAndBundle = errors.New("grpc: credentials.Bundle may not be used with individual TransportCredentials") // errTransportCredentialsMissing indicates that users want to transmit security - // information (e.g., oauth2 token) which requires secure connection on an insecure + // information (e.g., OAuth2 token) which requires secure connection on an insecure // connection. errTransportCredentialsMissing = errors.New("grpc: the credentials require transport level security (use grpc.WithTransportCredentials() to set)") // errCredentialsConflict indicates that grpc.WithTransportCredentials() @@ -237,9 +237,9 @@ func DialContext(ctx context.Context, target string, opts ...DialOption) (conn * grpclog.Infof("parsed scheme: %q", cc.parsedTarget.Scheme) cc.dopts.resolverBuilder = resolver.Get(cc.parsedTarget.Scheme) if cc.dopts.resolverBuilder == nil { - // If resolver builder is still nil, the parse target's scheme is + // If resolver builder is still nil, the parsed target's scheme is // not registered. Fallback to default resolver and set Endpoint to - // the original unparsed target. + // the original target. grpclog.Infof("scheme %q not registered, fallback to default scheme", cc.parsedTarget.Scheme) cc.parsedTarget = resolver.Target{ Scheme: resolver.GetDefaultScheme(), @@ -436,7 +436,7 @@ func (cc *ClientConn) scWatcher() { } cc.mu.Lock() // TODO: load balance policy runtime change is ignored. - // We may revist this decision in the future. + // We may revisit this decision in the future. cc.sc = sc cc.scRaw = "" cc.mu.Unlock() @@ -926,9 +926,8 @@ type addrConn struct { backoffIdx int // Needs to be stateful for resetConnectBackoff. resetBackoff chan struct{} - channelzID int64 // channelz unique identification number. - czData *channelzData - healthCheckEnabled bool + channelzID int64 // channelz unique identification number. + czData *channelzData } // Note: this requires a lock on ac.mu. @@ -938,7 +937,6 @@ func (ac *addrConn) updateConnectivityState(s connectivity.State) { } updateMsg := fmt.Sprintf("Subchannel Connectivity change to %v", s) - grpclog.Infof(updateMsg) ac.state = s if channelz.IsOn() { channelz.AddTraceEvent(ac.channelzID, &channelz.TraceEventDesc{ @@ -973,6 +971,14 @@ func (ac *addrConn) resetTransport() { } addrs := ac.addrs backoffFor := ac.dopts.bs.Backoff(ac.backoffIdx) + + // This will be the duration that dial gets to finish. + dialDuration := getMinConnectTimeout() + if dialDuration < backoffFor { + // Give dial more time as we keep failing to connect. + dialDuration = backoffFor + } + connectDeadline := time.Now().Add(dialDuration) ac.mu.Unlock() addrLoop: @@ -985,17 +991,7 @@ func (ac *addrConn) resetTransport() { } ac.updateConnectivityState(connectivity.Connecting) ac.transport = nil - ac.mu.Unlock() - // This will be the duration that dial gets to finish. - dialDuration := getMinConnectTimeout() - if dialDuration < backoffFor { - // Give dial more time as we keep failing to connect. - dialDuration = backoffFor - } - connectDeadline := time.Now().Add(dialDuration) - - ac.mu.Lock() ac.cc.mu.RLock() ac.dopts.copts.KeepaliveParams = ac.cc.mkp ac.cc.mu.RUnlock() @@ -1158,7 +1154,7 @@ func (ac *addrConn) createTransport(addr resolver.Address, copts transport.Conne Authority: ac.cc.authority, } - prefaceTimer := time.NewTimer(connectDeadline.Sub(time.Now())) + prefaceTimer := time.NewTimer(time.Until(connectDeadline)) onGoAway := func(r transport.GoAwayReason) { ac.mu.Lock() diff --git a/vendor/google.golang.org/grpc/connectivity/connectivity.go b/vendor/google.golang.org/grpc/connectivity/connectivity.go index b1d7dbc5..34ec36fb 100644 --- a/vendor/google.golang.org/grpc/connectivity/connectivity.go +++ b/vendor/google.golang.org/grpc/connectivity/connectivity.go @@ -52,7 +52,7 @@ func (s State) String() string { const ( // Idle indicates the ClientConn is idle. Idle State = iota - // Connecting indicates the ClienConn is connecting. + // Connecting indicates the ClientConn is connecting. Connecting // Ready indicates the ClientConn is ready for work. Ready diff --git a/vendor/google.golang.org/grpc/credentials/tls13.go b/vendor/google.golang.org/grpc/credentials/tls13.go new file mode 100644 index 00000000..ccbf35b3 --- /dev/null +++ b/vendor/google.golang.org/grpc/credentials/tls13.go @@ -0,0 +1,30 @@ +// +build go1.12 + +/* + * + * Copyright 2019 gRPC 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 credentials + +import "crypto/tls" + +// This init function adds cipher suite constants only defined in Go 1.12. +func init() { + cipherSuiteLookup[tls.TLS_AES_128_GCM_SHA256] = "TLS_AES_128_GCM_SHA256" + cipherSuiteLookup[tls.TLS_AES_256_GCM_SHA384] = "TLS_AES_256_GCM_SHA384" + cipherSuiteLookup[tls.TLS_CHACHA20_POLY1305_SHA256] = "TLS_CHACHA20_POLY1305_SHA256" +} diff --git a/vendor/google.golang.org/grpc/dialoptions.go b/vendor/google.golang.org/grpc/dialoptions.go index f2864624..537b2586 100644 --- a/vendor/google.golang.org/grpc/dialoptions.go +++ b/vendor/google.golang.org/grpc/dialoptions.go @@ -26,6 +26,7 @@ import ( "google.golang.org/grpc/balancer" "google.golang.org/grpc/credentials" + "google.golang.org/grpc/grpclog" "google.golang.org/grpc/internal" "google.golang.org/grpc/internal/backoff" "google.golang.org/grpc/internal/envconfig" @@ -164,7 +165,7 @@ func WithDefaultCallOptions(cos ...CallOption) DialOption { // WithCodec returns a DialOption which sets a codec for message marshaling and // unmarshaling. // -// Deprecated: use WithDefaultCallOptions(CallCustomCodec(c)) instead. +// Deprecated: use WithDefaultCallOptions(ForceCodec(_)) instead. func WithCodec(c Codec) DialOption { return WithDefaultCallOptions(CallCustomCodec(c)) } @@ -328,14 +329,17 @@ func WithTimeout(d time.Duration) DialOption { }) } -func withContextDialer(f func(context.Context, string) (net.Conn, error)) DialOption { +// WithContextDialer returns a DialOption that sets a dialer to create +// connections. If FailOnNonTempDialError() is set to true, and an error is +// returned by f, gRPC checks the error's Temporary() method to decide if it +// should try to reconnect to the network address. +func WithContextDialer(f func(context.Context, string) (net.Conn, error)) DialOption { return newFuncDialOption(func(o *dialOptions) { o.copts.Dialer = f }) } func init() { - internal.WithContextDialer = withContextDialer internal.WithResolverBuilder = withResolverBuilder internal.WithHealthCheckFunc = withHealthCheckFunc } @@ -344,11 +348,13 @@ func init() { // network addresses. If FailOnNonTempDialError() is set to true, and an error // is returned by f, gRPC checks the error's Temporary() method to decide if it // should try to reconnect to the network address. +// +// Deprecated: use WithContextDialer instead func WithDialer(f func(string, time.Duration) (net.Conn, error)) DialOption { - return withContextDialer( + return WithContextDialer( func(ctx context.Context, addr string) (net.Conn, error) { if deadline, ok := ctx.Deadline(); ok { - return f(addr, deadline.Sub(time.Now())) + return f(addr, time.Until(deadline)) } return f(addr, 0) }) @@ -388,6 +394,10 @@ func WithUserAgent(s string) DialOption { // WithKeepaliveParams returns a DialOption that specifies keepalive parameters // for the client transport. func WithKeepaliveParams(kp keepalive.ClientParameters) DialOption { + if kp.Time < internal.KeepaliveMinPingTime { + grpclog.Warningf("Adjusting keepalive ping interval to minimum period of %v", internal.KeepaliveMinPingTime) + kp.Time = internal.KeepaliveMinPingTime + } return newFuncDialOption(func(o *dialOptions) { o.copts.KeepaliveParams = kp }) diff --git a/vendor/google.golang.org/grpc/go.mod b/vendor/google.golang.org/grpc/go.mod index f296dcf4..04188077 100644 --- a/vendor/google.golang.org/grpc/go.mod +++ b/vendor/google.golang.org/grpc/go.mod @@ -2,19 +2,19 @@ module google.golang.org/grpc require ( cloud.google.com/go v0.26.0 // indirect + github.com/BurntSushi/toml v0.3.1 // indirect github.com/client9/misspell v0.3.4 github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b github.com/golang/mock v1.1.1 github.com/golang/protobuf v1.2.0 - github.com/kisielk/gotool v1.0.0 // indirect golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3 golang.org/x/net v0.0.0-20180826012351-8a410e7b638d golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f // indirect golang.org/x/sys v0.0.0-20180830151530-49385e6e1522 golang.org/x/text v0.3.0 // indirect - golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52 + golang.org/x/tools v0.0.0-20190114222345-bf090417da8b google.golang.org/appengine v1.1.0 // indirect google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8 - honnef.co/go/tools v0.0.0-20180728063816-88497007e858 + honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099 ) diff --git a/vendor/google.golang.org/grpc/go.sum b/vendor/google.golang.org/grpc/go.sum index bfb6bb7c..a79939d9 100644 --- a/vendor/google.golang.org/grpc/go.sum +++ b/vendor/google.golang.org/grpc/go.sum @@ -1,5 +1,7 @@ cloud.google.com/go v0.26.0 h1:e0WKqKTd5BnrG8aKH3J3h+QvEIQtSUcf2n5UZ5ZgLtQ= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/client9/misspell v0.3.4 h1:ta993UF76GwbvJcIo3Y68y/M3WxlpEHPWIGDkJYwzJI= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= @@ -8,8 +10,6 @@ github.com/golang/mock v1.1.1 h1:G5FRp8JnTd7RQH5kemVNlMeyXQAztQ3mOWV95KxsXH8= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/kisielk/gotool v1.0.0 h1:AV2c/EiW3KqPNT9ZKl07ehoAGi4C5/01Cfbblndcapg= -github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3 h1:x/bBzNauLQAlE3fLku/xy92Y8QwKX5HZymrMz2IiKFc= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d h1:g9qWBGx4puODJTMVyoPrpoxPFgVGd+z1DZwjfRu4d0I= @@ -22,11 +22,11 @@ golang.org/x/sys v0.0.0-20180830151530-49385e6e1522 h1:Ve1ORMCxvRmSXBwJK+t3Oy+V2 golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52 h1:JG/0uqcGdTNgq7FdU+61l5Pdmb8putNZlXb65bJBROs= -golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b h1:qMK98NmNCRVDIYFycQ5yVRkvgDUFfdP8Ip4KqmDEB7g= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= google.golang.org/appengine v1.1.0 h1:igQkv0AAhEIvTEpD5LIpAfav2eeVO9HBTjvKHVJPRSs= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8 h1:Nw54tB0rB7hY/N0NQvRW8DG4Yk3Q6T9cu9RcFQDu1tc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -honnef.co/go/tools v0.0.0-20180728063816-88497007e858 h1:wN+eVZ7U+gqdqkec6C6VXR1OFf9a5Ul9ETzeYsYv20g= -honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099 h1:XJP7lxbSxWLOMNdBE4B/STaqVy6L73o0knwj2vIlxnw= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/vendor/google.golang.org/grpc/internal/binarylog/env_config.go b/vendor/google.golang.org/grpc/internal/binarylog/env_config.go index eb188eae..4cc2525d 100644 --- a/vendor/google.golang.org/grpc/internal/binarylog/env_config.go +++ b/vendor/google.golang.org/grpc/internal/binarylog/env_config.go @@ -180,7 +180,7 @@ func parseHeaderMessageLengthConfig(c string) (hdrLenStr, msgLenStr uint64, err if s := match[1]; s != "" { msgLenStr, err = strconv.ParseUint(s, 10, 64) if err != nil { - return 0, 0, fmt.Errorf("Failed to convert %q to uint", s) + return 0, 0, fmt.Errorf("failed to convert %q to uint", s) } return 0, msgLenStr, nil } @@ -195,13 +195,13 @@ func parseHeaderMessageLengthConfig(c string) (hdrLenStr, msgLenStr uint64, err if s := match[1]; s != "" { hdrLenStr, err = strconv.ParseUint(s, 10, 64) if err != nil { - return 0, 0, fmt.Errorf("Failed to convert %q to uint", s) + return 0, 0, fmt.Errorf("failed to convert %q to uint", s) } } if s := match[2]; s != "" { msgLenStr, err = strconv.ParseUint(s, 10, 64) if err != nil { - return 0, 0, fmt.Errorf("Failed to convert %q to uint", s) + return 0, 0, fmt.Errorf("failed to convert %q to uint", s) } } return hdrLenStr, msgLenStr, nil diff --git a/vendor/google.golang.org/grpc/internal/binarylog/method_logger.go b/vendor/google.golang.org/grpc/internal/binarylog/method_logger.go index b06cdd4d..160f6e86 100644 --- a/vendor/google.golang.org/grpc/internal/binarylog/method_logger.go +++ b/vendor/google.golang.org/grpc/internal/binarylog/method_logger.go @@ -377,10 +377,7 @@ func metadataKeyOmit(key string) bool { case "grpc-trace-bin": // grpc-trace-bin is special because it's visiable to users. return false } - if strings.HasPrefix(key, "grpc-") { - return true - } - return false + return strings.HasPrefix(key, "grpc-") } func mdToMetadataProto(md metadata.MD) *pb.Metadata { diff --git a/vendor/google.golang.org/grpc/internal/envconfig/envconfig.go b/vendor/google.golang.org/grpc/internal/envconfig/envconfig.go index d2193b3a..62ed0f2f 100644 --- a/vendor/google.golang.org/grpc/internal/envconfig/envconfig.go +++ b/vendor/google.golang.org/grpc/internal/envconfig/envconfig.go @@ -59,6 +59,7 @@ var ( func init() { switch strings.ToLower(os.Getenv(requireHandshakeStr)) { case "on": + fallthrough default: RequireHandshake = RequireHandshakeOn case "off": diff --git a/vendor/google.golang.org/grpc/internal/internal.go b/vendor/google.golang.org/grpc/internal/internal.go index eaa54d4f..c1d2c690 100644 --- a/vendor/google.golang.org/grpc/internal/internal.go +++ b/vendor/google.golang.org/grpc/internal/internal.go @@ -20,11 +20,12 @@ // symbols to avoid circular dependencies. package internal -import "context" +import ( + "context" + "time" +) var ( - // WithContextDialer is exported by dialoptions.go - WithContextDialer interface{} // func(context.Context, string) (net.Conn, error) grpc.DialOption // WithResolverBuilder is exported by dialoptions.go WithResolverBuilder interface{} // func (resolver.Builder) grpc.DialOption // WithHealthCheckFunc is not exported by dialoptions.go @@ -33,6 +34,9 @@ var ( HealthCheckFunc HealthChecker // BalancerUnregister is exported by package balancer to unregister a balancer. BalancerUnregister func(name string) + // KeepaliveMinPingTime is the minimum ping interval. This must be 10s by + // default, but tests may wish to set it lower for convenience. + KeepaliveMinPingTime = 10 * time.Second ) // HealthChecker defines the signature of the client-side LB channel health checking function. diff --git a/vendor/google.golang.org/grpc/internal/transport/http2_client.go b/vendor/google.golang.org/grpc/internal/transport/http2_client.go index babcaee5..ff8f4db0 100644 --- a/vendor/google.golang.org/grpc/internal/transport/http2_client.go +++ b/vendor/google.golang.org/grpc/internal/transport/http2_client.go @@ -322,7 +322,9 @@ func newHTTP2Client(connectCtx, ctx context.Context, addr TargetInfo, opts Conne } } - t.framer.writer.Flush() + if err := t.framer.writer.Flush(); err != nil { + return nil, err + } go func() { t.loopy = newLoopyWriter(clientSide, t.framer, t.controlBuf, t.bdpEst) err := t.loopy.run() @@ -417,7 +419,7 @@ func (t *http2Client) createHeaderFields(ctx context.Context, callHdr *CallHdr) if dl, ok := ctx.Deadline(); ok { // Send out timeout regardless its value. The server can detect timeout context by itself. // TODO(mmukhi): Perhaps this field should be updated when actually writing out to the wire. - timeout := dl.Sub(time.Now()) + timeout := time.Until(dl) headerFields = append(headerFields, hpack.HeaderField{Name: "grpc-timeout", Value: encodeTimeout(timeout)}) } for k, v := range authData { diff --git a/vendor/google.golang.org/grpc/internal/transport/http2_server.go b/vendor/google.golang.org/grpc/internal/transport/http2_server.go index df274039..d038b2df 100644 --- a/vendor/google.golang.org/grpc/internal/transport/http2_server.go +++ b/vendor/google.golang.org/grpc/internal/transport/http2_server.go @@ -1004,45 +1004,74 @@ func (t *http2Server) Close() error { return err } +// deleteStream deletes the stream s from transport's active streams. +func (t *http2Server) deleteStream(s *Stream, eosReceived bool) { + t.mu.Lock() + if _, ok := t.activeStreams[s.id]; !ok { + t.mu.Unlock() + return + } + + delete(t.activeStreams, s.id) + if len(t.activeStreams) == 0 { + t.idle = time.Now() + } + t.mu.Unlock() + + if channelz.IsOn() { + if eosReceived { + atomic.AddInt64(&t.czData.streamsSucceeded, 1) + } else { + atomic.AddInt64(&t.czData.streamsFailed, 1) + } + } +} + // closeStream clears the footprint of a stream when the stream is not needed // any more. func (t *http2Server) closeStream(s *Stream, rst bool, rstCode http2.ErrCode, hdr *headerFrame, eosReceived bool) { - if s.swapState(streamDone) == streamDone { - // If the stream was already done, return. - return - } + // Mark the stream as done + oldState := s.swapState(streamDone) + // In case stream sending and receiving are invoked in separate // goroutines (e.g., bi-directional streaming), cancel needs to be // called to interrupt the potential blocking on other goroutines. s.cancel() + + // Deletes the stream from active streams + t.deleteStream(s, eosReceived) + cleanup := &cleanupStream{ streamID: s.id, rst: rst, rstCode: rstCode, - onWrite: func() { - t.mu.Lock() - if t.activeStreams != nil { - delete(t.activeStreams, s.id) - if len(t.activeStreams) == 0 { - t.idle = time.Now() - } - } - t.mu.Unlock() - if channelz.IsOn() { - if eosReceived { - atomic.AddInt64(&t.czData.streamsSucceeded, 1) - } else { - atomic.AddInt64(&t.czData.streamsFailed, 1) - } - } - }, + onWrite: func() {}, } - if hdr != nil { - hdr.cleanup = cleanup - t.controlBuf.put(hdr) - } else { + + // No trailer. Puts cleanupFrame into transport's control buffer. + if hdr == nil { t.controlBuf.put(cleanup) + return } + + // We do the check here, because of the following scenario: + // 1. closeStream is called first with a trailer. A trailer item with a piggybacked cleanup item + // is put to control buffer. + // 2. Loopy writer is waiting on a stream quota. It will never get it because client errored at + // some point. So loopy can't act on trailer + // 3. Client sends a RST_STREAM due to the error. Then closeStream is called without a trailer as + // the result of the received RST_STREAM. + // If we do this check at the beginning of the closeStream, then we won't put a cleanup item in + // response to received RST_STREAM into the control buffer and outStream in loopy writer will + // never get cleaned up. + + // If the stream is already done, don't send the trailer. + if oldState == streamDone { + return + } + + hdr.cleanup = cleanup + t.controlBuf.put(hdr) } func (t *http2Server) RemoteAddr() net.Addr { @@ -1155,7 +1184,7 @@ func (t *http2Server) IncrMsgRecv() { } func (t *http2Server) getOutFlowWindow() int64 { - resp := make(chan uint32) + resp := make(chan uint32, 1) timer := time.NewTimer(time.Second) defer timer.Stop() t.controlBuf.put(&outFlowControlSizeRequest{resp}) diff --git a/vendor/google.golang.org/grpc/keepalive/keepalive.go b/vendor/google.golang.org/grpc/keepalive/keepalive.go index 899e72d7..34d31b5e 100644 --- a/vendor/google.golang.org/grpc/keepalive/keepalive.go +++ b/vendor/google.golang.org/grpc/keepalive/keepalive.go @@ -33,6 +33,7 @@ import ( type ClientParameters struct { // After a duration of this time if the client doesn't see any activity it // pings the server to see if the transport is still alive. + // If set below 10s, a minimum value of 10s will be used instead. Time time.Duration // The current default value is infinity. // After having pinged for keepalive check, the client waits for a duration // of Timeout and if no activity is seen even after that the connection is @@ -62,6 +63,7 @@ type ServerParameters struct { MaxConnectionAgeGrace time.Duration // The current default value is infinity. // After a duration of this time if the server doesn't see any activity it // pings the client to see if the transport is still alive. + // If set below 1s, a minimum value of 1s will be used instead. Time time.Duration // The current default value is 2 hours. // After having pinged for keepalive check, the server waits for a duration // of Timeout and if no activity is seen even after that the connection is diff --git a/vendor/google.golang.org/grpc/naming/dns_resolver.go b/vendor/google.golang.org/grpc/naming/dns_resolver.go index fd8cd3b5..c9f79dc5 100644 --- a/vendor/google.golang.org/grpc/naming/dns_resolver.go +++ b/vendor/google.golang.org/grpc/naming/dns_resolver.go @@ -76,8 +76,8 @@ func formatIP(addr string) (addrIP string, ok bool) { // parseTarget takes the user input target string, returns formatted host and port info. // If target doesn't specify a port, set the port to be the defaultPort. -// If target is in IPv6 format and host-name is enclosed in sqarue brackets, brackets -// are strippd when setting the host. +// If target is in IPv6 format and host-name is enclosed in square brackets, brackets +// are stripped when setting the host. // examples: // target: "www.google.com" returns host: "www.google.com", port: "443" // target: "ipv4-host:80" returns host: "ipv4-host", port: "80" @@ -221,7 +221,7 @@ func (w *dnsWatcher) lookupSRV() map[string]*Update { for _, s := range srvs { lbAddrs, err := lookupHost(w.ctx, s.Target) if err != nil { - grpclog.Warningf("grpc: failed load banlacer address dns lookup due to %v.\n", err) + grpclog.Warningf("grpc: failed load balancer address dns lookup due to %v.\n", err) continue } for _, a := range lbAddrs { diff --git a/vendor/google.golang.org/grpc/naming/naming.go b/vendor/google.golang.org/grpc/naming/naming.go index 8cc39e93..c99fdbef 100644 --- a/vendor/google.golang.org/grpc/naming/naming.go +++ b/vendor/google.golang.org/grpc/naming/naming.go @@ -17,7 +17,7 @@ */ // Package naming defines the naming API and related data structures for gRPC. -// The interface is EXPERIMENTAL and may be suject to change. +// The interface is EXPERIMENTAL and may be subject to change. // // Deprecated: please use package resolver. package naming diff --git a/vendor/google.golang.org/grpc/picker_wrapper.go b/vendor/google.golang.org/grpc/picker_wrapper.go index 14f915d6..a2575c96 100644 --- a/vendor/google.golang.org/grpc/picker_wrapper.go +++ b/vendor/google.golang.org/grpc/picker_wrapper.go @@ -101,10 +101,7 @@ func doneChannelzWrapper(acw *acBalancerWrapper, done func(balancer.DoneInfo)) f // - the subConn returned by the current picker is not READY // When one of these situations happens, pick blocks until the picker gets updated. func (bp *pickerWrapper) pick(ctx context.Context, failfast bool, opts balancer.PickOptions) (transport.ClientTransport, func(balancer.DoneInfo), error) { - var ( - p balancer.Picker - ch chan struct{} - ) + var ch chan struct{} for { bp.mu.Lock() @@ -130,7 +127,7 @@ func (bp *pickerWrapper) pick(ctx context.Context, failfast bool, opts balancer. } ch = bp.blockingCh - p = bp.picker + p := bp.picker bp.mu.Unlock() subConn, done, err := p.Pick(ctx, opts) @@ -144,15 +141,22 @@ func (bp *pickerWrapper) pick(ctx context.Context, failfast bool, opts balancer. continue } return nil, nil, status.Errorf(codes.Unavailable, "%v, latest connection error: %v", err, bp.connectionError()) + case context.DeadlineExceeded: + return nil, nil, status.Error(codes.DeadlineExceeded, err.Error()) + case context.Canceled: + return nil, nil, status.Error(codes.Canceled, err.Error()) default: + if _, ok := status.FromError(err); ok { + return nil, nil, err + } // err is some other error. - return nil, nil, toRPCErr(err) + return nil, nil, status.Error(codes.Unknown, err.Error()) } } acw, ok := subConn.(*acBalancerWrapper) if !ok { - grpclog.Infof("subconn returned from pick is not *acBalancerWrapper") + grpclog.Error("subconn returned from pick is not *acBalancerWrapper") continue } if t, ok := acw.getAddrConn().getReadyTransport(); ok { diff --git a/vendor/google.golang.org/grpc/resolver/dns/dns_resolver.go b/vendor/google.golang.org/grpc/resolver/dns/dns_resolver.go index f33189fe..2d8da331 100644 --- a/vendor/google.golang.org/grpc/resolver/dns/dns_resolver.go +++ b/vendor/google.golang.org/grpc/resolver/dns/dns_resolver.go @@ -346,8 +346,8 @@ func formatIP(addr string) (addrIP string, ok bool) { // parseTarget takes the user input target string and default port, returns formatted host and port info. // If target doesn't specify a port, set the port to be the defaultPort. -// If target is in IPv6 format and host-name is enclosed in sqarue brackets, brackets -// are strippd when setting the host. +// If target is in IPv6 format and host-name is enclosed in square brackets, brackets +// are stripped when setting the host. // examples: // target: "www.google.com" defaultPort: "443" returns host: "www.google.com", port: "443" // target: "ipv4-host:80" defaultPort: "443" returns host: "ipv4-host", port: "80" diff --git a/vendor/google.golang.org/grpc/rpc_util.go b/vendor/google.golang.org/grpc/rpc_util.go index 8d0d3dc8..2a595622 100644 --- a/vendor/google.golang.org/grpc/rpc_util.go +++ b/vendor/google.golang.org/grpc/rpc_util.go @@ -370,13 +370,13 @@ func (o CompressorCallOption) after(c *callInfo) {} // https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md#requests for // more details. // -// If CallCustomCodec is not also used, the content-subtype will be used to -// look up the Codec to use in the registry controlled by RegisterCodec. See -// the documentation on RegisterCodec for details on registration. The lookup -// of content-subtype is case-insensitive. If no such Codec is found, the call +// If ForceCodec is not also used, the content-subtype will be used to look up +// the Codec to use in the registry controlled by RegisterCodec. See the +// documentation on RegisterCodec for details on registration. The lookup of +// content-subtype is case-insensitive. If no such Codec is found, the call // will result in an error with code codes.Internal. // -// If CallCustomCodec is also used, that Codec will be used for all request and +// If ForceCodec is also used, that Codec will be used for all request and // response messages, with the content-subtype set to the given contentSubtype // here for requests. func CallContentSubtype(contentSubtype string) CallOption { @@ -396,7 +396,7 @@ func (o ContentSubtypeCallOption) before(c *callInfo) error { } func (o ContentSubtypeCallOption) after(c *callInfo) {} -// CallCustomCodec returns a CallOption that will set the given Codec to be +// ForceCodec returns a CallOption that will set the given Codec to be // used for all request and response messages for a call. The result of calling // String() will be used as the content-subtype in a case-insensitive manner. // @@ -408,12 +408,37 @@ func (o ContentSubtypeCallOption) after(c *callInfo) {} // // This function is provided for advanced users; prefer to use only // CallContentSubtype to select a registered codec instead. +// +// This is an EXPERIMENTAL API. +func ForceCodec(codec encoding.Codec) CallOption { + return ForceCodecCallOption{Codec: codec} +} + +// ForceCodecCallOption is a CallOption that indicates the codec used for +// marshaling messages. +// +// This is an EXPERIMENTAL API. +type ForceCodecCallOption struct { + Codec encoding.Codec +} + +func (o ForceCodecCallOption) before(c *callInfo) error { + c.codec = o.Codec + return nil +} +func (o ForceCodecCallOption) after(c *callInfo) {} + +// CallCustomCodec behaves like ForceCodec, but accepts a grpc.Codec instead of +// an encoding.Codec. +// +// Deprecated: use ForceCodec instead. func CallCustomCodec(codec Codec) CallOption { return CustomCodecCallOption{Codec: codec} } // CustomCodecCallOption is a CallOption that indicates the codec used for // marshaling messages. +// // This is an EXPERIMENTAL API. type CustomCodecCallOption struct { Codec Codec @@ -636,7 +661,9 @@ func recvAndDecompress(p *parser, s *transport.Stream, dc Decompressor, maxRecei if err != nil { return nil, status.Errorf(codes.Internal, "grpc: failed to decompress the received message %v", err) } - d, err = ioutil.ReadAll(dcReader) + // Read from LimitReader with limit max+1. So if the underlying + // reader is over limit, the result will be bigger than max. + d, err = ioutil.ReadAll(io.LimitReader(dcReader, int64(maxReceiveMessageSize)+1)) if err != nil { return nil, status.Errorf(codes.Internal, "grpc: failed to decompress the received message %v", err) } diff --git a/vendor/google.golang.org/grpc/server.go b/vendor/google.golang.org/grpc/server.go index d705d7a8..33272a47 100644 --- a/vendor/google.golang.org/grpc/server.go +++ b/vendor/google.golang.org/grpc/server.go @@ -182,6 +182,11 @@ func InitialConnWindowSize(s int32) ServerOption { // KeepaliveParams returns a ServerOption that sets keepalive and max-age parameters for the server. func KeepaliveParams(kp keepalive.ServerParameters) ServerOption { + if kp.Time > 0 && kp.Time < time.Second { + grpclog.Warning("Adjusting keepalive ping interval to minimum period of 1s") + kp.Time = time.Second + } + return func(o *options) { o.keepaliveParams = kp } @@ -244,7 +249,7 @@ func MaxRecvMsgSize(m int) ServerOption { } // MaxSendMsgSize returns a ServerOption to set the max message size in bytes the server can send. -// If this is not set, gRPC uses the default 4MB. +// If this is not set, gRPC uses the default `math.MaxInt32`. func MaxSendMsgSize(m int) ServerOption { return func(o *options) { o.maxSendMessageSize = m @@ -748,7 +753,7 @@ func (s *Server) traceInfo(st transport.ServerTransport, stream *transport.Strea trInfo.firstLine.remoteAddr = st.RemoteAddr() if dl, ok := stream.Context().Deadline(); ok { - trInfo.firstLine.deadline = dl.Sub(time.Now()) + trInfo.firstLine.deadline = time.Until(dl) } return trInfo } @@ -874,7 +879,7 @@ func (s *Server) processUnaryRPC(t transport.ServerTransport, stream *transport. PeerAddr: nil, } if deadline, ok := ctx.Deadline(); ok { - logEntry.Timeout = deadline.Sub(time.Now()) + logEntry.Timeout = time.Until(deadline) if logEntry.Timeout < 0 { logEntry.Timeout = 0 } @@ -1106,7 +1111,7 @@ func (s *Server) processStreamingRPC(t transport.ServerTransport, stream *transp PeerAddr: nil, } if deadline, ok := ctx.Deadline(); ok { - logEntry.Timeout = deadline.Sub(time.Now()) + logEntry.Timeout = time.Until(deadline) if logEntry.Timeout < 0 { logEntry.Timeout = 0 } diff --git a/vendor/google.golang.org/grpc/stream.go b/vendor/google.golang.org/grpc/stream.go index d06279a2..ccf996b4 100644 --- a/vendor/google.golang.org/grpc/stream.go +++ b/vendor/google.golang.org/grpc/stream.go @@ -235,7 +235,7 @@ func newClientStream(ctx context.Context, desc *StreamDesc, cc *ClientConn, meth trInfo.tr = trace.New("grpc.Sent."+methodFamily(method), method) trInfo.firstLine.client = true if deadline, ok := ctx.Deadline(); ok { - trInfo.firstLine.deadline = deadline.Sub(time.Now()) + trInfo.firstLine.deadline = time.Until(deadline) } trInfo.tr.LazyLog(&trInfo.firstLine, false) ctx = trace.NewContext(ctx, trInfo.tr) @@ -297,7 +297,7 @@ func newClientStream(ctx context.Context, desc *StreamDesc, cc *ClientConn, meth Authority: cs.cc.authority, } if deadline, ok := ctx.Deadline(); ok { - logEntry.Timeout = deadline.Sub(time.Now()) + logEntry.Timeout = time.Until(deadline) if logEntry.Timeout < 0 { logEntry.Timeout = 0 } @@ -1086,7 +1086,6 @@ type addrConnStream struct { dc Decompressor decomp encoding.Compressor p *parser - done func(balancer.DoneInfo) mu sync.Mutex finished bool } diff --git a/vendor/google.golang.org/grpc/test/bufconn/bufconn.go b/vendor/google.golang.org/grpc/test/bufconn/bufconn.go index bdb5d812..60ae770f 100644 --- a/vendor/google.golang.org/grpc/test/bufconn/bufconn.go +++ b/vendor/google.golang.org/grpc/test/bufconn/bufconn.go @@ -37,7 +37,7 @@ type Listener struct { done chan struct{} } -var errClosed = fmt.Errorf("Closed") +var errClosed = fmt.Errorf("closed") // Listen returns a Listener that can only be contacted by its own Dialers and // creates buffered connections between the two. diff --git a/vendor/google.golang.org/grpc/version.go b/vendor/google.golang.org/grpc/version.go index 45eace59..c30e84c0 100644 --- a/vendor/google.golang.org/grpc/version.go +++ b/vendor/google.golang.org/grpc/version.go @@ -19,4 +19,4 @@ package grpc // Version is the current grpc version. -const Version = "1.18.0" +const Version = "1.19.0" diff --git a/vendor/google.golang.org/grpc/vet.sh b/vendor/google.golang.org/grpc/vet.sh index 94a50640..7209aa5b 100644 --- a/vendor/google.golang.org/grpc/vet.sh +++ b/vendor/google.golang.org/grpc/vet.sh @@ -13,26 +13,19 @@ die() { exit 1 } -# Check to make sure it's safe to modify the user's git repo. -if git status --porcelain | read; then - die "Uncommitted or untracked files found; commit changes first" -fi - -if [[ -d "${GOPATH}/src" ]]; then - die "\${GOPATH}/src (${GOPATH}/src) exists; this script will delete it." -fi - -# Undo any edits made by this script. -cleanup() { - rm -rf "${GOPATH}/src" - git reset --hard HEAD -} -trap cleanup EXIT - fail_on_output() { tee /dev/stderr | (! read) } +# Check to make sure it's safe to modify the user's git repo. +git status --porcelain | fail_on_output + +# Undo any edits made by this script. +cleanup() { + git reset --hard HEAD +} +trap cleanup EXIT + PATH="${GOPATH}/bin:${GOROOT}/bin:${PATH}" if [[ "$1" = "-install" ]]; then @@ -112,30 +105,19 @@ if go help mod >& /dev/null; then fi # - Collection of static analysis checks -### HACK HACK HACK: Remove once staticcheck works with modules. -# Make a symlink in ${GOPATH}/src to its ${GOPATH}/pkg/mod equivalent for every package we use. -for x in $(find "${GOPATH}/pkg/mod" -name '*@*' | grep -v \/mod\/cache\/); do - pkg="$(echo ${x#"${GOPATH}/pkg/mod/"} | cut -f1 -d@)"; - # If multiple versions exist, just use the existing one. - if [[ -L "${GOPATH}/src/${pkg}" ]]; then continue; fi - mkdir -p "$(dirname "${GOPATH}/src/${pkg}")"; - ln -s $x "${GOPATH}/src/${pkg}"; -done -### END HACK HACK HACK - # TODO(menghanl): fix errors in transport_test. -staticcheck -go 1.9 -ignore ' -balancer.go:SA1019 -balancer_test.go:SA1019 -clientconn_test.go:SA1019 -balancer/roundrobin/roundrobin_test.go:SA1019 -benchmark/benchmain/main.go:SA1019 -internal/transport/handler_server.go:SA1019 -internal/transport/handler_server_test.go:SA1019 -internal/transport/transport_test.go:SA2002 -stats/stats_test.go:SA1019 -test/channelz_test.go:SA1019 -test/end2end_test.go:SA1019 -test/healthcheck_test.go:SA1019 +staticcheck -go 1.9 -checks 'inherit,-ST1015' -ignore ' +google.golang.org/grpc/balancer.go:SA1019 +google.golang.org/grpc/balancer_test.go:SA1019 +google.golang.org/grpc/clientconn_test.go:SA1019 +google.golang.org/grpc/balancer/roundrobin/roundrobin_test.go:SA1019 +google.golang.org/grpc/benchmark/benchmain/main.go:SA1019 +google.golang.org/grpc/benchmark/worker/benchmark_client.go:SA1019 +google.golang.org/grpc/internal/transport/handler_server.go:SA1019 +google.golang.org/grpc/internal/transport/handler_server_test.go:SA1019 +google.golang.org/grpc/stats/stats_test.go:SA1019 +google.golang.org/grpc/test/channelz_test.go:SA1019 +google.golang.org/grpc/test/end2end_test.go:SA1019 +google.golang.org/grpc/test/healthcheck_test.go:SA1019 ' ./... misspell -error . diff --git a/vendor/modules.txt b/vendor/modules.txt index 5051222d..9ff6c09a 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -104,6 +104,8 @@ github.com/hashicorp/go-safetemp github.com/hashicorp/go-uuid # github.com/hashicorp/go-version v1.1.0 github.com/hashicorp/go-version +# github.com/hashicorp/golang-lru v0.5.0 +github.com/hashicorp/golang-lru/simplelru # github.com/hashicorp/hcl v1.0.0 github.com/hashicorp/hcl github.com/hashicorp/hcl/hcl/ast @@ -265,22 +267,24 @@ github.com/zclconf/go-cty/cty/gocty github.com/zclconf/go-cty/cty/set github.com/zclconf/go-cty/cty/function github.com/zclconf/go-cty/cty/function/stdlib -# go.opencensus.io v0.18.0 +# go.opencensus.io v0.21.0 go.opencensus.io/trace -go.opencensus.io/exemplar go.opencensus.io/internal go.opencensus.io/trace/internal go.opencensus.io/trace/tracestate go.opencensus.io/plugin/ocgrpc +go.opencensus.io/plugin/ochttp go.opencensus.io +go.opencensus.io/metric/metricdata go.opencensus.io/stats go.opencensus.io/stats/view go.opencensus.io/tag go.opencensus.io/trace/propagation -go.opencensus.io/plugin/ochttp +go.opencensus.io/plugin/ochttp/propagation/b3 +go.opencensus.io/resource go.opencensus.io/stats/internal go.opencensus.io/internal/tagencoding -go.opencensus.io/plugin/ochttp/propagation/b3 +go.opencensus.io/metric/metricproducer # golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2 golang.org/x/crypto/openpgp golang.org/x/crypto/bcrypt @@ -307,7 +311,7 @@ golang.org/x/net/http2 golang.org/x/net/http2/hpack golang.org/x/net/idna golang.org/x/net/http/httpguts -# golang.org/x/oauth2 v0.0.0-20190220154721-9b3c75971fc9 +# golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421 golang.org/x/oauth2 golang.org/x/oauth2/google golang.org/x/oauth2/jwt @@ -321,7 +325,7 @@ golang.org/x/text/unicode/norm golang.org/x/text/transform golang.org/x/text/secure/bidirule golang.org/x/text/unicode/bidi -# google.golang.org/api v0.1.0 +# google.golang.org/api v0.4.0 google.golang.org/api/appengine/v1 google.golang.org/api/bigquery/v2 google.golang.org/api/cloudbilling/v1 @@ -358,10 +362,10 @@ google.golang.org/api/storagetransfer/v1 google.golang.org/api/iterator google.golang.org/api/transport/grpc google.golang.org/api/gensupport +google.golang.org/api/transport/http google.golang.org/api/googleapi/internal/uritemplates google.golang.org/api/internal google.golang.org/api/transport -google.golang.org/api/transport/http google.golang.org/api/googleapi/transport google.golang.org/api/transport/http/internal/propagation # google.golang.org/appengine v1.4.0 @@ -378,7 +382,7 @@ google.golang.org/appengine/internal/base google.golang.org/appengine/internal/datastore google.golang.org/appengine/internal/log google.golang.org/appengine/internal/remote_api -# google.golang.org/genproto v0.0.0-20190201180003-4b09977fb922 +# google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19 google.golang.org/genproto/googleapis/bigtable/admin/v2 google.golang.org/genproto/googleapis/bigtable/v2 google.golang.org/genproto/protobuf/field_mask @@ -386,7 +390,7 @@ google.golang.org/genproto/googleapis/iam/v1 google.golang.org/genproto/googleapis/longrunning google.golang.org/genproto/googleapis/api/annotations google.golang.org/genproto/googleapis/rpc/status -# google.golang.org/grpc v1.18.0 +# google.golang.org/grpc v1.19.0 google.golang.org/grpc google.golang.org/grpc/codes google.golang.org/grpc/metadata