Bumps the gcp client libraries to v0.22.0.

This commit is contained in:
eric-hole 2020-04-23 15:14:52 -07:00
parent 841bb0eb93
commit 53b4183e9c
36 changed files with 44312 additions and 15849 deletions

2
go.mod
View File

@ -103,7 +103,7 @@ require (
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45
golang.org/x/sys v0.0.0-20191128015809-6d18c012aee9 golang.org/x/sys v0.0.0-20191128015809-6d18c012aee9
golang.org/x/tools v0.0.0-20191203134012-c197fd4bf371 golang.org/x/tools v0.0.0-20191203134012-c197fd4bf371
google.golang.org/api v0.17.0 google.golang.org/api v0.22.0
gopkg.in/gcfg.v1 v1.2.3 gopkg.in/gcfg.v1 v1.2.3
gopkg.in/inf.v0 v0.9.1 gopkg.in/inf.v0 v0.9.1
gopkg.in/yaml.v2 v2.2.8 gopkg.in/yaml.v2 v2.2.8

4
go.sum
View File

@ -967,8 +967,8 @@ gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6d
google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE=
google.golang.org/api v0.6.1-0.20190607001116-5213b8090861 h1:ppLucX0K/60T3t6LPZQzTOkt5PytkEbQLIaSteq+TpE= google.golang.org/api v0.6.1-0.20190607001116-5213b8090861 h1:ppLucX0K/60T3t6LPZQzTOkt5PytkEbQLIaSteq+TpE=
google.golang.org/api v0.6.1-0.20190607001116-5213b8090861/go.mod h1:btoxGiFvQNVUZQ8W08zLtrVS08CNpINPEfxXxgJL1Q4= google.golang.org/api v0.6.1-0.20190607001116-5213b8090861/go.mod h1:btoxGiFvQNVUZQ8W08zLtrVS08CNpINPEfxXxgJL1Q4=
google.golang.org/api v0.17.0 h1:0q95w+VuFtv4PAx4PZVQdBMmYbaCHbnfKaEiDIcVyag= google.golang.org/api v0.22.0 h1:J1Pl9P2lnmYFSJvgs70DKELqHNh8CNWXPbud4njEE2s=
google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= 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/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
google.golang.org/appengine v1.5.0 h1:KxkO13IPW4Lslp2bz+KHP2E3gtFlrIGNThxkZQ3g+4c= google.golang.org/appengine v1.5.0 h1:KxkO13IPW4Lslp2bz+KHP2E3gtFlrIGNThxkZQ3g+4c=

View File

@ -10,6 +10,7 @@ go_library(
"//vendor/google.golang.org/api/googleapi:go_default_library", "//vendor/google.golang.org/api/googleapi:go_default_library",
"//vendor/google.golang.org/api/internal/gensupport:go_default_library", "//vendor/google.golang.org/api/internal/gensupport:go_default_library",
"//vendor/google.golang.org/api/option:go_default_library", "//vendor/google.golang.org/api/option:go_default_library",
"//vendor/google.golang.org/api/option/internaloption:go_default_library",
"//vendor/google.golang.org/api/transport/http:go_default_library", "//vendor/google.golang.org/api/transport/http:go_default_library",
], ],
) )

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -10,6 +10,7 @@ go_library(
"//vendor/google.golang.org/api/googleapi:go_default_library", "//vendor/google.golang.org/api/googleapi:go_default_library",
"//vendor/google.golang.org/api/internal/gensupport:go_default_library", "//vendor/google.golang.org/api/internal/gensupport:go_default_library",
"//vendor/google.golang.org/api/option:go_default_library", "//vendor/google.golang.org/api/option:go_default_library",
"//vendor/google.golang.org/api/option/internaloption:go_default_library",
"//vendor/google.golang.org/api/transport/http:go_default_library", "//vendor/google.golang.org/api/transport/http:go_default_library",
], ],
) )

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -10,6 +10,7 @@ go_library(
"//vendor/google.golang.org/api/googleapi:go_default_library", "//vendor/google.golang.org/api/googleapi:go_default_library",
"//vendor/google.golang.org/api/internal/gensupport:go_default_library", "//vendor/google.golang.org/api/internal/gensupport:go_default_library",
"//vendor/google.golang.org/api/option:go_default_library", "//vendor/google.golang.org/api/option:go_default_library",
"//vendor/google.golang.org/api/option/internaloption:go_default_library",
"//vendor/google.golang.org/api/transport/http:go_default_library", "//vendor/google.golang.org/api/transport/http:go_default_library",
], ],
) )

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -10,6 +10,7 @@ go_library(
"//vendor/google.golang.org/api/googleapi:go_default_library", "//vendor/google.golang.org/api/googleapi:go_default_library",
"//vendor/google.golang.org/api/internal/gensupport:go_default_library", "//vendor/google.golang.org/api/internal/gensupport:go_default_library",
"//vendor/google.golang.org/api/option:go_default_library", "//vendor/google.golang.org/api/option:go_default_library",
"//vendor/google.golang.org/api/option/internaloption:go_default_library",
"//vendor/google.golang.org/api/transport/http:go_default_library", "//vendor/google.golang.org/api/transport/http:go_default_library",
], ],
) )

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -10,6 +10,7 @@ go_library(
"//vendor/google.golang.org/api/googleapi:go_default_library", "//vendor/google.golang.org/api/googleapi:go_default_library",
"//vendor/google.golang.org/api/internal/gensupport:go_default_library", "//vendor/google.golang.org/api/internal/gensupport:go_default_library",
"//vendor/google.golang.org/api/option:go_default_library", "//vendor/google.golang.org/api/option:go_default_library",
"//vendor/google.golang.org/api/option/internaloption:go_default_library",
"//vendor/google.golang.org/api/transport/http:go_default_library", "//vendor/google.golang.org/api/transport/http:go_default_library",
], ],
) )

View File

@ -56,6 +56,7 @@ import (
googleapi "google.golang.org/api/googleapi" googleapi "google.golang.org/api/googleapi"
gensupport "google.golang.org/api/internal/gensupport" gensupport "google.golang.org/api/internal/gensupport"
option "google.golang.org/api/option" option "google.golang.org/api/option"
internaloption "google.golang.org/api/option/internaloption"
htransport "google.golang.org/api/transport/http" htransport "google.golang.org/api/transport/http"
) )
@ -72,6 +73,7 @@ var _ = googleapi.Version
var _ = errors.New var _ = errors.New
var _ = strings.Replace var _ = strings.Replace
var _ = context.Canceled var _ = context.Canceled
var _ = internaloption.WithDefaultEndpoint
const apiId = "dns:v1" const apiId = "dns:v1"
const apiName = "dns" const apiName = "dns"
@ -103,6 +105,7 @@ func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, err
) )
// NOTE: prepend, so we don't override user-specified scopes. // NOTE: prepend, so we don't override user-specified scopes.
opts = append([]option.ClientOption{scopesOption}, opts...) opts = append([]option.ClientOption{scopesOption}, opts...)
opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
client, endpoint, err := htransport.NewClient(ctx, opts...) client, endpoint, err := htransport.NewClient(ctx, opts...)
if err != nil { if err != nil {
return nil, err return nil, err
@ -1754,7 +1757,7 @@ func (c *ChangesCreateCall) Header() http.Header {
func (c *ChangesCreateCall) doRequest(alt string) (*http.Response, error) { func (c *ChangesCreateCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -1928,7 +1931,7 @@ func (c *ChangesGetCall) Header() http.Header {
func (c *ChangesGetCall) doRequest(alt string) (*http.Response, error) { func (c *ChangesGetCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -2129,7 +2132,7 @@ func (c *ChangesListCall) Header() http.Header {
func (c *ChangesListCall) doRequest(alt string) (*http.Response, error) { func (c *ChangesListCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -2353,7 +2356,7 @@ func (c *DnsKeysGetCall) Header() http.Header {
func (c *DnsKeysGetCall) doRequest(alt string) (*http.Response, error) { func (c *DnsKeysGetCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -2551,7 +2554,7 @@ func (c *DnsKeysListCall) Header() http.Header {
func (c *DnsKeysListCall) doRequest(alt string) (*http.Response, error) { func (c *DnsKeysListCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -2754,7 +2757,7 @@ func (c *ManagedZoneOperationsGetCall) Header() http.Header {
func (c *ManagedZoneOperationsGetCall) doRequest(alt string) (*http.Response, error) { func (c *ManagedZoneOperationsGetCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -2949,7 +2952,7 @@ func (c *ManagedZoneOperationsListCall) Header() http.Header {
func (c *ManagedZoneOperationsListCall) doRequest(alt string) (*http.Response, error) { func (c *ManagedZoneOperationsListCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -3149,7 +3152,7 @@ func (c *ManagedZonesCreateCall) Header() http.Header {
func (c *ManagedZonesCreateCall) doRequest(alt string) (*http.Response, error) { func (c *ManagedZonesCreateCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -3302,7 +3305,7 @@ func (c *ManagedZonesDeleteCall) Header() http.Header {
func (c *ManagedZonesDeleteCall) doRequest(alt string) (*http.Response, error) { func (c *ManagedZonesDeleteCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -3438,7 +3441,7 @@ func (c *ManagedZonesGetCall) Header() http.Header {
func (c *ManagedZonesGetCall) doRequest(alt string) (*http.Response, error) { func (c *ManagedZonesGetCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -3620,7 +3623,7 @@ func (c *ManagedZonesListCall) Header() http.Header {
func (c *ManagedZonesListCall) doRequest(alt string) (*http.Response, error) { func (c *ManagedZonesListCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -3804,7 +3807,7 @@ func (c *ManagedZonesPatchCall) Header() http.Header {
func (c *ManagedZonesPatchCall) doRequest(alt string) (*http.Response, error) { func (c *ManagedZonesPatchCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -3967,7 +3970,7 @@ func (c *ManagedZonesUpdateCall) Header() http.Header {
func (c *ManagedZonesUpdateCall) doRequest(alt string) (*http.Response, error) { func (c *ManagedZonesUpdateCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -4128,7 +4131,7 @@ func (c *PoliciesCreateCall) Header() http.Header {
func (c *PoliciesCreateCall) doRequest(alt string) (*http.Response, error) { func (c *PoliciesCreateCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -4282,7 +4285,7 @@ func (c *PoliciesDeleteCall) Header() http.Header {
func (c *PoliciesDeleteCall) doRequest(alt string) (*http.Response, error) { func (c *PoliciesDeleteCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -4418,7 +4421,7 @@ func (c *PoliciesGetCall) Header() http.Header {
func (c *PoliciesGetCall) doRequest(alt string) (*http.Response, error) { func (c *PoliciesGetCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -4592,7 +4595,7 @@ func (c *PoliciesListCall) Header() http.Header {
func (c *PoliciesListCall) doRequest(alt string) (*http.Response, error) { func (c *PoliciesListCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -4771,7 +4774,7 @@ func (c *PoliciesPatchCall) Header() http.Header {
func (c *PoliciesPatchCall) doRequest(alt string) (*http.Response, error) { func (c *PoliciesPatchCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -4934,7 +4937,7 @@ func (c *PoliciesUpdateCall) Header() http.Header {
func (c *PoliciesUpdateCall) doRequest(alt string) (*http.Response, error) { func (c *PoliciesUpdateCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -5104,7 +5107,7 @@ func (c *ProjectsGetCall) Header() http.Header {
func (c *ProjectsGetCall) doRequest(alt string) (*http.Response, error) { func (c *ProjectsGetCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -5288,7 +5291,7 @@ func (c *ResourceRecordSetsListCall) Header() http.Header {
func (c *ResourceRecordSetsListCall) doRequest(alt string) (*http.Response, error) { func (c *ResourceRecordSetsListCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }

View File

@ -10,6 +10,7 @@ go_library(
"//vendor/google.golang.org/api/googleapi:go_default_library", "//vendor/google.golang.org/api/googleapi:go_default_library",
"//vendor/google.golang.org/api/internal/gensupport:go_default_library", "//vendor/google.golang.org/api/internal/gensupport:go_default_library",
"//vendor/google.golang.org/api/option:go_default_library", "//vendor/google.golang.org/api/option:go_default_library",
"//vendor/google.golang.org/api/option/internaloption:go_default_library",
"//vendor/google.golang.org/api/transport/http:go_default_library", "//vendor/google.golang.org/api/transport/http:go_default_library",
], ],
) )

View File

@ -22,6 +22,7 @@
}, },
"id": "iam:v1", "id": "iam:v1",
"kind": "discovery#restDescription", "kind": "discovery#restDescription",
"mtlsRootUrl": "https://iam.mtls.googleapis.com/",
"name": "iam", "name": "iam",
"ownerDomain": "google.com", "ownerDomain": "google.com",
"ownerName": "Google", "ownerName": "Google",
@ -1227,7 +1228,7 @@
} }
} }
}, },
"revision": "20191213", "revision": "20200221",
"rootUrl": "https://iam.googleapis.com/", "rootUrl": "https://iam.googleapis.com/",
"schemas": { "schemas": {
"AdminAuditData": { "AdminAuditData": {
@ -1450,23 +1451,23 @@
"type": "object" "type": "object"
}, },
"Expr": { "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\"", "description": "Represents a textual expression in the Common Expression Language (CEL)\nsyntax. CEL is a C-like expression language. The syntax and semantics of CEL\nare documented at https://github.com/google/cel-spec.\n\nExample (Comparison):\n\n title: \"Summary size limit\"\n description: \"Determines if a summary is less than 100 chars\"\n expression: \"document.summary.size() \u003c 100\"\n\nExample (Equality):\n\n title: \"Requestor is owner\"\n description: \"Determines if requestor is the document owner\"\n expression: \"document.owner == request.auth.claims.email\"\n\nExample (Logic):\n\n title: \"Public documents\"\n description: \"Determine whether the document should be publicly visible\"\n expression: \"document.type != 'private' \u0026\u0026 document.type != 'internal'\"\n\nExample (Data Manipulation):\n\n title: \"Notification string\"\n description: \"Create a notification string with a timestamp.\"\n expression: \"'New message received at ' + string(document.create_time)\"\n\nThe exact variables and functions that may be referenced within an expression\nare determined by the service that evaluates it. See the service\ndocumentation for additional information.",
"id": "Expr", "id": "Expr",
"properties": { "properties": {
"description": { "description": {
"description": "An optional description of the expression. This is a longer text which\ndescribes the expression, e.g. when hovered over it in a UI.", "description": "Optional. Description of the expression. This is a longer text which\ndescribes the expression, e.g. when hovered over it in a UI.",
"type": "string" "type": "string"
}, },
"expression": { "expression": {
"description": "Textual representation of an expression in\nCommon Expression Language syntax.\n\nThe application context of the containing message determines which\nwell-known feature set of CEL is supported.", "description": "Textual representation of an expression in Common Expression Language\nsyntax.",
"type": "string" "type": "string"
}, },
"location": { "location": {
"description": "An optional string indicating the location of the expression for error\nreporting, e.g. a file name and a position in the file.", "description": "Optional. String indicating the location of the expression for error\nreporting, e.g. a file name and a position in the file.",
"type": "string" "type": "string"
}, },
"title": { "title": {
"description": "An optional title for the expression, i.e. a short string describing\nits purpose. This can be used e.g. in UIs which allow to enter the\nexpression.", "description": "Optional. Title for the expression, i.e. a short string describing\nits purpose. This can be used e.g. in UIs which allow to enter the\nexpression.",
"type": "string" "type": "string"
} }
}, },

View File

@ -52,6 +52,7 @@ import (
googleapi "google.golang.org/api/googleapi" googleapi "google.golang.org/api/googleapi"
gensupport "google.golang.org/api/internal/gensupport" gensupport "google.golang.org/api/internal/gensupport"
option "google.golang.org/api/option" option "google.golang.org/api/option"
internaloption "google.golang.org/api/option/internaloption"
htransport "google.golang.org/api/transport/http" htransport "google.golang.org/api/transport/http"
) )
@ -68,6 +69,7 @@ var _ = googleapi.Version
var _ = errors.New var _ = errors.New
var _ = strings.Replace var _ = strings.Replace
var _ = context.Canceled var _ = context.Canceled
var _ = internaloption.WithDefaultEndpoint
const apiId = "iam:v1" const apiId = "iam:v1"
const apiName = "iam" const apiName = "iam"
@ -87,6 +89,7 @@ func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, err
) )
// NOTE: prepend, so we don't override user-specified scopes. // NOTE: prepend, so we don't override user-specified scopes.
opts = append([]option.ClientOption{scopesOption}, opts...) opts = append([]option.ClientOption{scopesOption}, opts...)
opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
client, endpoint, err := htransport.NewClient(ctx, opts...) client, endpoint, err := htransport.NewClient(ctx, opts...)
if err != nil { if err != nil {
return nil, err return nil, err
@ -788,31 +791,62 @@ type Empty struct {
type EnableServiceAccountRequest struct { type EnableServiceAccountRequest struct {
} }
// Expr: Represents an expression text. Example: // Expr: Represents a textual expression in the Common Expression
// Language (CEL)
// syntax. CEL is a C-like expression language. The syntax and semantics
// of CEL
// are documented at https://github.com/google/cel-spec.
// //
// title: "User account presence" // Example (Comparison):
// description: "Determines whether the request has a user account" //
// expression: "size(request.user) > 0" // title: "Summary size limit"
// description: "Determines if a summary is less than 100 chars"
// expression: "document.summary.size() < 100"
//
// Example (Equality):
//
// title: "Requestor is owner"
// description: "Determines if requestor is the document owner"
// expression: "document.owner ==
// request.auth.claims.email"
//
// Example (Logic):
//
// title: "Public documents"
// description: "Determine whether the document should be publicly
// visible"
// expression: "document.type != 'private' && document.type !=
// 'internal'"
//
// Example (Data Manipulation):
//
// title: "Notification string"
// description: "Create a notification string with a timestamp."
// expression: "'New message received at ' +
// string(document.create_time)"
//
// The exact variables and functions that may be referenced within an
// expression
// are determined by the service that evaluates it. See the
// service
// documentation for additional information.
type Expr struct { type Expr struct {
// Description: An optional description of the expression. This is a // Description: Optional. Description of the expression. This is a
// longer text which // longer text which
// describes the expression, e.g. when hovered over it in a UI. // describes the expression, e.g. when hovered over it in a UI.
Description string `json:"description,omitempty"` Description string `json:"description,omitempty"`
// Expression: Textual representation of an expression in // Expression: Textual representation of an expression in Common
// Common Expression Language syntax. // 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"` Expression string `json:"expression,omitempty"`
// Location: An optional string indicating the location of the // Location: Optional. String indicating the location of the expression
// expression for error // for error
// reporting, e.g. a file name and a position in the file. // reporting, e.g. a file name and a position in the file.
Location string `json:"location,omitempty"` Location string `json:"location,omitempty"`
// Title: An optional title for the expression, i.e. a short string // Title: Optional. Title for the expression, i.e. a short string
// describing // describing
// its purpose. This can be used e.g. in UIs which allow to enter // its purpose. This can be used e.g. in UIs which allow to enter
// the // the
@ -2420,7 +2454,7 @@ func (c *IamPoliciesLintPolicyCall) Header() http.Header {
func (c *IamPoliciesLintPolicyCall) doRequest(alt string) (*http.Response, error) { func (c *IamPoliciesLintPolicyCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -2547,7 +2581,7 @@ func (c *IamPoliciesQueryAuditableServicesCall) Header() http.Header {
func (c *IamPoliciesQueryAuditableServicesCall) doRequest(alt string) (*http.Response, error) { func (c *IamPoliciesQueryAuditableServicesCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -2674,7 +2708,7 @@ func (c *OrganizationsRolesCreateCall) Header() http.Header {
func (c *OrganizationsRolesCreateCall) doRequest(alt string) (*http.Response, error) { func (c *OrganizationsRolesCreateCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -2830,7 +2864,7 @@ func (c *OrganizationsRolesDeleteCall) Header() http.Header {
func (c *OrganizationsRolesDeleteCall) doRequest(alt string) (*http.Response, error) { func (c *OrganizationsRolesDeleteCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -2977,7 +3011,7 @@ func (c *OrganizationsRolesGetCall) Header() http.Header {
func (c *OrganizationsRolesGetCall) doRequest(alt string) (*http.Response, error) { func (c *OrganizationsRolesGetCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -3158,7 +3192,7 @@ func (c *OrganizationsRolesListCall) Header() http.Header {
func (c *OrganizationsRolesListCall) doRequest(alt string) (*http.Response, error) { func (c *OrganizationsRolesListCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -3346,7 +3380,7 @@ func (c *OrganizationsRolesPatchCall) Header() http.Header {
func (c *OrganizationsRolesPatchCall) doRequest(alt string) (*http.Response, error) { func (c *OrganizationsRolesPatchCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -3492,7 +3526,7 @@ func (c *OrganizationsRolesUndeleteCall) Header() http.Header {
func (c *OrganizationsRolesUndeleteCall) doRequest(alt string) (*http.Response, error) { func (c *OrganizationsRolesUndeleteCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -3633,7 +3667,7 @@ func (c *PermissionsQueryTestablePermissionsCall) Header() http.Header {
func (c *PermissionsQueryTestablePermissionsCall) doRequest(alt string) (*http.Response, error) { func (c *PermissionsQueryTestablePermissionsCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -3781,7 +3815,7 @@ func (c *ProjectsRolesCreateCall) Header() http.Header {
func (c *ProjectsRolesCreateCall) doRequest(alt string) (*http.Response, error) { func (c *ProjectsRolesCreateCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -3937,7 +3971,7 @@ func (c *ProjectsRolesDeleteCall) Header() http.Header {
func (c *ProjectsRolesDeleteCall) doRequest(alt string) (*http.Response, error) { func (c *ProjectsRolesDeleteCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -4084,7 +4118,7 @@ func (c *ProjectsRolesGetCall) Header() http.Header {
func (c *ProjectsRolesGetCall) doRequest(alt string) (*http.Response, error) { func (c *ProjectsRolesGetCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -4265,7 +4299,7 @@ func (c *ProjectsRolesListCall) Header() http.Header {
func (c *ProjectsRolesListCall) doRequest(alt string) (*http.Response, error) { func (c *ProjectsRolesListCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -4453,7 +4487,7 @@ func (c *ProjectsRolesPatchCall) Header() http.Header {
func (c *ProjectsRolesPatchCall) doRequest(alt string) (*http.Response, error) { func (c *ProjectsRolesPatchCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -4599,7 +4633,7 @@ func (c *ProjectsRolesUndeleteCall) Header() http.Header {
func (c *ProjectsRolesUndeleteCall) doRequest(alt string) (*http.Response, error) { func (c *ProjectsRolesUndeleteCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -4740,7 +4774,7 @@ func (c *ProjectsServiceAccountsCreateCall) Header() http.Header {
func (c *ProjectsServiceAccountsCreateCall) doRequest(alt string) (*http.Response, error) { func (c *ProjectsServiceAccountsCreateCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -4878,7 +4912,7 @@ func (c *ProjectsServiceAccountsDeleteCall) Header() http.Header {
func (c *ProjectsServiceAccountsDeleteCall) doRequest(alt string) (*http.Response, error) { func (c *ProjectsServiceAccountsDeleteCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -5036,7 +5070,7 @@ func (c *ProjectsServiceAccountsDisableCall) Header() http.Header {
func (c *ProjectsServiceAccountsDisableCall) doRequest(alt string) (*http.Response, error) { func (c *ProjectsServiceAccountsDisableCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -5190,7 +5224,7 @@ func (c *ProjectsServiceAccountsEnableCall) Header() http.Header {
func (c *ProjectsServiceAccountsEnableCall) doRequest(alt string) (*http.Response, error) { func (c *ProjectsServiceAccountsEnableCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -5339,7 +5373,7 @@ func (c *ProjectsServiceAccountsGetCall) Header() http.Header {
func (c *ProjectsServiceAccountsGetCall) doRequest(alt string) (*http.Response, error) { func (c *ProjectsServiceAccountsGetCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -5514,7 +5548,7 @@ func (c *ProjectsServiceAccountsGetIamPolicyCall) Header() http.Header {
func (c *ProjectsServiceAccountsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { func (c *ProjectsServiceAccountsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -5681,7 +5715,7 @@ func (c *ProjectsServiceAccountsListCall) Header() http.Header {
func (c *ProjectsServiceAccountsListCall) doRequest(alt string) (*http.Response, error) { func (c *ProjectsServiceAccountsListCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -5857,7 +5891,7 @@ func (c *ProjectsServiceAccountsPatchCall) Header() http.Header {
func (c *ProjectsServiceAccountsPatchCall) doRequest(alt string) (*http.Response, error) { func (c *ProjectsServiceAccountsPatchCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -6023,7 +6057,7 @@ func (c *ProjectsServiceAccountsSetIamPolicyCall) Header() http.Header {
func (c *ProjectsServiceAccountsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { func (c *ProjectsServiceAccountsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -6171,7 +6205,7 @@ func (c *ProjectsServiceAccountsSignBlobCall) Header() http.Header {
func (c *ProjectsServiceAccountsSignBlobCall) doRequest(alt string) (*http.Response, error) { func (c *ProjectsServiceAccountsSignBlobCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -6325,7 +6359,7 @@ func (c *ProjectsServiceAccountsSignJwtCall) Header() http.Header {
func (c *ProjectsServiceAccountsSignJwtCall) doRequest(alt string) (*http.Response, error) { func (c *ProjectsServiceAccountsSignJwtCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -6467,7 +6501,7 @@ func (c *ProjectsServiceAccountsTestIamPermissionsCall) Header() http.Header {
func (c *ProjectsServiceAccountsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { func (c *ProjectsServiceAccountsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -6610,7 +6644,7 @@ func (c *ProjectsServiceAccountsUndeleteCall) Header() http.Header {
func (c *ProjectsServiceAccountsUndeleteCall) doRequest(alt string) (*http.Response, error) { func (c *ProjectsServiceAccountsUndeleteCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -6757,7 +6791,7 @@ func (c *ProjectsServiceAccountsUpdateCall) Header() http.Header {
func (c *ProjectsServiceAccountsUpdateCall) doRequest(alt string) (*http.Response, error) { func (c *ProjectsServiceAccountsUpdateCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -6898,7 +6932,7 @@ func (c *ProjectsServiceAccountsKeysCreateCall) Header() http.Header {
func (c *ProjectsServiceAccountsKeysCreateCall) doRequest(alt string) (*http.Response, error) { func (c *ProjectsServiceAccountsKeysCreateCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -7036,7 +7070,7 @@ func (c *ProjectsServiceAccountsKeysDeleteCall) Header() http.Header {
func (c *ProjectsServiceAccountsKeysDeleteCall) doRequest(alt string) (*http.Response, error) { func (c *ProjectsServiceAccountsKeysDeleteCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -7191,7 +7225,7 @@ func (c *ProjectsServiceAccountsKeysGetCall) Header() http.Header {
func (c *ProjectsServiceAccountsKeysGetCall) doRequest(alt string) (*http.Response, error) { func (c *ProjectsServiceAccountsKeysGetCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -7359,7 +7393,7 @@ func (c *ProjectsServiceAccountsKeysListCall) Header() http.Header {
func (c *ProjectsServiceAccountsKeysListCall) doRequest(alt string) (*http.Response, error) { func (c *ProjectsServiceAccountsKeysListCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -7508,7 +7542,7 @@ func (c *ProjectsServiceAccountsKeysUploadCall) Header() http.Header {
func (c *ProjectsServiceAccountsKeysUploadCall) doRequest(alt string) (*http.Response, error) { func (c *ProjectsServiceAccountsKeysUploadCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -7657,7 +7691,7 @@ func (c *RolesGetCall) Header() http.Header {
func (c *RolesGetCall) doRequest(alt string) (*http.Response, error) { func (c *RolesGetCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -7883,7 +7917,7 @@ func (c *RolesListCall) Header() http.Header {
func (c *RolesListCall) doRequest(alt string) (*http.Response, error) { func (c *RolesListCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -8059,7 +8093,7 @@ func (c *RolesQueryGrantableRolesCall) Header() http.Header {
func (c *RolesQueryGrantableRolesCall) doRequest(alt string) (*http.Response, error) { func (c *RolesQueryGrantableRolesCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }

View File

@ -5,7 +5,6 @@ go_library(
srcs = [ srcs = [
"conn_pool.go", "conn_pool.go",
"creds.go", "creds.go",
"pool.go",
"settings.go", "settings.go",
], ],
importmap = "k8s.io/kops/vendor/google.golang.org/api/internal", importmap = "k8s.io/kops/vendor/google.golang.org/api/internal",
@ -15,6 +14,5 @@ go_library(
"//vendor/golang.org/x/oauth2:go_default_library", "//vendor/golang.org/x/oauth2:go_default_library",
"//vendor/golang.org/x/oauth2/google:go_default_library", "//vendor/golang.org/x/oauth2/google:go_default_library",
"//vendor/google.golang.org/grpc:go_default_library", "//vendor/google.golang.org/grpc:go_default_library",
"//vendor/google.golang.org/grpc/naming:go_default_library",
], ],
) )

View File

@ -11,6 +11,7 @@ go_library(
"params.go", "params.go",
"resumable.go", "resumable.go",
"send.go", "send.go",
"version.go",
], ],
importmap = "k8s.io/kops/vendor/google.golang.org/api/internal/gensupport", importmap = "k8s.io/kops/vendor/google.golang.org/api/internal/gensupport",
importpath = "google.golang.org/api/internal/gensupport", importpath = "google.golang.org/api/internal/gensupport",

View File

@ -1,53 +0,0 @@
// Copyright 2016 Google LLC.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package internal
import (
"errors"
"google.golang.org/grpc/naming"
)
// TODO: move to transport/grpc package
// PoolResolver provides a fixed list of addresses to load balance between
// and does not provide further updates.
type PoolResolver struct {
poolSize int
dialOpt *DialSettings
ch chan []*naming.Update
}
// NewPoolResolver returns a PoolResolver
// This is an EXPERIMENTAL API and may be changed or removed in the future.
func NewPoolResolver(size int, o *DialSettings) *PoolResolver {
return &PoolResolver{poolSize: size, dialOpt: o}
}
// Resolve returns a Watcher for the endpoint defined by the DialSettings
// provided to NewPoolResolver.
func (r *PoolResolver) Resolve(target string) (naming.Watcher, error) {
if r.dialOpt.Endpoint == "" {
return nil, errors.New("no endpoint configured")
}
addrs := make([]*naming.Update, 0, r.poolSize)
for i := 0; i < r.poolSize; i++ {
addrs = append(addrs, &naming.Update{Op: naming.Add, Addr: r.dialOpt.Endpoint, Metadata: i})
}
r.ch = make(chan []*naming.Update, 1)
r.ch <- addrs
return r, nil
}
// Next returns a static list of updates on the first call,
// and blocks indefinitely until Close is called on subsequent calls.
func (r *PoolResolver) Next() ([]*naming.Update, error) {
return <-r.ch, nil
}
// Close releases resources associated with the pool and causes Next to unblock.
func (r *PoolResolver) Close() {
close(r.ch)
}

View File

@ -6,6 +6,7 @@
package internal package internal
import ( import (
"crypto/tls"
"errors" "errors"
"net/http" "net/http"
@ -18,6 +19,7 @@ import (
// Google API service. // Google API service.
type DialSettings struct { type DialSettings struct {
Endpoint string Endpoint string
DefaultEndpoint string
Scopes []string Scopes []string
TokenSource oauth2.TokenSource TokenSource oauth2.TokenSource
Credentials *google.Credentials Credentials *google.Credentials
@ -33,6 +35,7 @@ type DialSettings struct {
GRPCConnPoolSize int GRPCConnPoolSize int
NoAuth bool NoAuth bool
TelemetryDisabled bool TelemetryDisabled bool
ClientCertSource func(*tls.CertificateRequestInfo) (*tls.Certificate, error)
// Google API system parameters. For more information please read: // Google API system parameters. For more information please read:
// https://cloud.google.com/apis/docs/system-parameters // https://cloud.google.com/apis/docs/system-parameters
@ -90,6 +93,12 @@ func (ds *DialSettings) Validate() error {
if ds.HTTPClient != nil && ds.RequestReason != "" { if ds.HTTPClient != nil && ds.RequestReason != "" {
return errors.New("WithHTTPClient is incompatible with RequestReason") return errors.New("WithHTTPClient is incompatible with RequestReason")
} }
if ds.HTTPClient != nil && ds.ClientCertSource != nil {
return errors.New("WithHTTPClient is incompatible with WithClientCertSource")
}
if ds.ClientCertSource != nil && (ds.GRPCConn != nil || ds.GRPCConnPool != nil || ds.GRPCConnPoolSize != 0 || ds.GRPCDialOpts != nil) {
return errors.New("WithClientCertSource is currently only supported for HTTP. gRPC settings are incompatible")
}
return nil return nil
} }

View File

@ -10,6 +10,7 @@ go_library(
"//vendor/google.golang.org/api/googleapi:go_default_library", "//vendor/google.golang.org/api/googleapi:go_default_library",
"//vendor/google.golang.org/api/internal/gensupport:go_default_library", "//vendor/google.golang.org/api/internal/gensupport:go_default_library",
"//vendor/google.golang.org/api/option:go_default_library", "//vendor/google.golang.org/api/option:go_default_library",
"//vendor/google.golang.org/api/option/internaloption:go_default_library",
"//vendor/google.golang.org/api/transport/http:go_default_library", "//vendor/google.golang.org/api/transport/http:go_default_library",
], ],
) )

View File

@ -2,14 +2,14 @@
"auth": { "auth": {
"oauth2": { "oauth2": {
"scopes": { "scopes": {
"https://www.googleapis.com/auth/plus.me": {
"description": "Associate you with your personal info on Google"
},
"https://www.googleapis.com/auth/userinfo.email": { "https://www.googleapis.com/auth/userinfo.email": {
"description": "View your email address" "description": "View your email address"
}, },
"https://www.googleapis.com/auth/userinfo.profile": { "https://www.googleapis.com/auth/userinfo.profile": {
"description": "See your personal info, including any personal info you've made publicly available" "description": "See your personal info, including any personal info you've made publicly available"
},
"openid": {
"description": "Associate you with your personal info on Google"
} }
} }
} }
@ -19,8 +19,8 @@
"batchPath": "batch/oauth2/v2", "batchPath": "batch/oauth2/v2",
"description": "Obtains end-user authorization grants for use with other Google APIs.", "description": "Obtains end-user authorization grants for use with other Google APIs.",
"discoveryVersion": "v1", "discoveryVersion": "v1",
"documentationLink": "https://developers.google.com/accounts/docs/OAuth2", "documentationLink": "https://developers.google.com/identity/protocols/oauth2/",
"etag": "\"VPK3KBfpaEgZ16pozGOoMYfKc0U/W-JRJm0Bex0eEJ4XYBVnRKTeRQ8\"", "etag": "\"u9GIe6H63LSGq-9_t39K2Zx_EAc/VCyF6WfWVwIuhIs_gw3LA4B3w1E\"",
"icons": { "icons": {
"x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png",
"x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png"
@ -28,14 +28,6 @@
"id": "oauth2:v2", "id": "oauth2:v2",
"kind": "discovery#restDescription", "kind": "discovery#restDescription",
"methods": { "methods": {
"getCertForOpenIdConnect": {
"httpMethod": "GET",
"id": "oauth2.getCertForOpenIdConnect",
"path": "oauth2/v2/certs",
"response": {
"$ref": "Jwk"
}
},
"tokeninfo": { "tokeninfo": {
"httpMethod": "POST", "httpMethod": "POST",
"id": "oauth2.tokeninfo", "id": "oauth2.tokeninfo",
@ -47,10 +39,6 @@
"id_token": { "id_token": {
"location": "query", "location": "query",
"type": "string" "type": "string"
},
"token_handle": {
"location": "query",
"type": "string"
} }
}, },
"path": "oauth2/v2/tokeninfo", "path": "oauth2/v2/tokeninfo",
@ -116,10 +104,10 @@
"id": "oauth2.userinfo.get", "id": "oauth2.userinfo.get",
"path": "oauth2/v2/userinfo", "path": "oauth2/v2/userinfo",
"response": { "response": {
"$ref": "Userinfoplus" "$ref": "Userinfo"
}, },
"scopes": [ "scopes": [
"https://www.googleapis.com/auth/plus.me", "openid",
"https://www.googleapis.com/auth/userinfo.email", "https://www.googleapis.com/auth/userinfo.email",
"https://www.googleapis.com/auth/userinfo.profile" "https://www.googleapis.com/auth/userinfo.profile"
] ]
@ -135,10 +123,10 @@
"id": "oauth2.userinfo.v2.me.get", "id": "oauth2.userinfo.v2.me.get",
"path": "userinfo/v2/me", "path": "userinfo/v2/me",
"response": { "response": {
"$ref": "Userinfoplus" "$ref": "Userinfo"
}, },
"scopes": [ "scopes": [
"https://www.googleapis.com/auth/plus.me", "openid",
"https://www.googleapis.com/auth/userinfo.email", "https://www.googleapis.com/auth/userinfo.email",
"https://www.googleapis.com/auth/userinfo.profile" "https://www.googleapis.com/auth/userinfo.profile"
] ]
@ -150,51 +138,12 @@
} }
} }
}, },
"revision": "20190313", "revision": "20200213",
"rootUrl": "https://www.googleapis.com/", "rootUrl": "https://www.googleapis.com/",
"schemas": { "schemas": {
"Jwk": {
"id": "Jwk",
"properties": {
"keys": {
"items": {
"properties": {
"alg": {
"default": "RS256",
"type": "string"
},
"e": {
"type": "string"
},
"kid": {
"type": "string"
},
"kty": {
"default": "RSA",
"type": "string"
},
"n": {
"type": "string"
},
"use": {
"default": "sig",
"type": "string"
}
},
"type": "object"
},
"type": "array"
}
},
"type": "object"
},
"Tokeninfo": { "Tokeninfo": {
"id": "Tokeninfo", "id": "Tokeninfo",
"properties": { "properties": {
"access_type": {
"description": "The access type granted with this token. It can be offline or online.",
"type": "string"
},
"audience": { "audience": {
"description": "Who is the intended audience for this token. In general the same as issued_to.", "description": "Who is the intended audience for this token. In general the same as issued_to.",
"type": "string" "type": "string"
@ -216,10 +165,6 @@
"description": "The space separated list of scopes granted to this token.", "description": "The space separated list of scopes granted to this token.",
"type": "string" "type": "string"
}, },
"token_handle": {
"description": "The token handle associated with this token.",
"type": "string"
},
"user_id": { "user_id": {
"description": "The obfuscated user id.", "description": "The obfuscated user id.",
"type": "string" "type": "string"
@ -231,8 +176,8 @@
}, },
"type": "object" "type": "object"
}, },
"Userinfoplus": { "Userinfo": {
"id": "Userinfoplus", "id": "Userinfo",
"properties": { "properties": {
"email": { "email": {
"description": "The user's email address.", "description": "The user's email address.",

View File

@ -6,7 +6,7 @@
// Package oauth2 provides access to the Google OAuth2 API. // Package oauth2 provides access to the Google OAuth2 API.
// //
// For product documentation, see: https://developers.google.com/accounts/docs/OAuth2 // For product documentation, see: https://developers.google.com/identity/protocols/oauth2/
// //
// Creating a client // Creating a client
// //
@ -25,7 +25,7 @@
// //
// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: // By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes:
// //
// oauth2Service, err := oauth2.NewService(ctx, option.WithScopes(oauth2.UserinfoProfileScope)) // oauth2Service, err := oauth2.NewService(ctx, option.WithScopes(oauth2.OpenIDScope))
// //
// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: // To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:
// //
@ -56,6 +56,7 @@ import (
googleapi "google.golang.org/api/googleapi" googleapi "google.golang.org/api/googleapi"
gensupport "google.golang.org/api/internal/gensupport" gensupport "google.golang.org/api/internal/gensupport"
option "google.golang.org/api/option" option "google.golang.org/api/option"
internaloption "google.golang.org/api/option/internaloption"
htransport "google.golang.org/api/transport/http" htransport "google.golang.org/api/transport/http"
) )
@ -72,6 +73,7 @@ var _ = googleapi.Version
var _ = errors.New var _ = errors.New
var _ = strings.Replace var _ = strings.Replace
var _ = context.Canceled var _ = context.Canceled
var _ = internaloption.WithDefaultEndpoint
const apiId = "oauth2:v2" const apiId = "oauth2:v2"
const apiName = "oauth2" const apiName = "oauth2"
@ -80,26 +82,27 @@ const basePath = "https://www.googleapis.com/"
// OAuth2 scopes used by this API. // OAuth2 scopes used by this API.
const ( const (
// Associate you with your personal info on Google
PlusMeScope = "https://www.googleapis.com/auth/plus.me"
// View your email address // View your email address
UserinfoEmailScope = "https://www.googleapis.com/auth/userinfo.email" UserinfoEmailScope = "https://www.googleapis.com/auth/userinfo.email"
// See your personal info, including any personal info you've made // See your personal info, including any personal info you've made
// publicly available // publicly available
UserinfoProfileScope = "https://www.googleapis.com/auth/userinfo.profile" UserinfoProfileScope = "https://www.googleapis.com/auth/userinfo.profile"
// Associate you with your personal info on Google
OpenIDScope = "openid"
) )
// NewService creates a new Service. // NewService creates a new Service.
func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
scopesOption := option.WithScopes( scopesOption := option.WithScopes(
"https://www.googleapis.com/auth/plus.me",
"https://www.googleapis.com/auth/userinfo.email", "https://www.googleapis.com/auth/userinfo.email",
"https://www.googleapis.com/auth/userinfo.profile", "https://www.googleapis.com/auth/userinfo.profile",
"openid",
) )
// NOTE: prepend, so we don't override user-specified scopes. // NOTE: prepend, so we don't override user-specified scopes.
opts = append([]option.ClientOption{scopesOption}, opts...) opts = append([]option.ClientOption{scopesOption}, opts...)
opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
client, endpoint, err := htransport.NewClient(ctx, opts...) client, endpoint, err := htransport.NewClient(ctx, opts...)
if err != nil { if err != nil {
return nil, err return nil, err
@ -176,77 +179,7 @@ type UserinfoV2MeService struct {
s *Service s *Service
} }
type Jwk struct {
Keys []*JwkKeys `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 *Jwk) MarshalJSON() ([]byte, error) {
type NoMethod Jwk
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
type JwkKeys struct {
Alg string `json:"alg,omitempty"`
E string `json:"e,omitempty"`
Kid string `json:"kid,omitempty"`
Kty string `json:"kty,omitempty"`
N string `json:"n,omitempty"`
Use string `json:"use,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 *JwkKeys) MarshalJSON() ([]byte, error) {
type NoMethod JwkKeys
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
type Tokeninfo struct { type Tokeninfo struct {
// AccessType: The access type granted with this token. It can be
// offline or online.
AccessType string `json:"access_type,omitempty"`
// Audience: Who is the intended audience for this token. In general the // Audience: Who is the intended audience for this token. In general the
// same as issued_to. // same as issued_to.
Audience string `json:"audience,omitempty"` Audience string `json:"audience,omitempty"`
@ -266,9 +199,6 @@ type Tokeninfo struct {
// Scope: The space separated list of scopes granted to this token. // Scope: The space separated list of scopes granted to this token.
Scope string `json:"scope,omitempty"` Scope string `json:"scope,omitempty"`
// TokenHandle: The token handle associated with this token.
TokenHandle string `json:"token_handle,omitempty"`
// UserId: The obfuscated user id. // UserId: The obfuscated user id.
UserId string `json:"user_id,omitempty"` UserId string `json:"user_id,omitempty"`
@ -280,7 +210,7 @@ type Tokeninfo struct {
// server. // server.
googleapi.ServerResponse `json:"-"` googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "AccessType") to // ForceSendFields is a list of field names (e.g. "Audience") to
// unconditionally include in API requests. By default, fields with // unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer, // empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the // non-interface field appearing in ForceSendFields will be sent to the
@ -288,7 +218,7 @@ type Tokeninfo struct {
// used to include empty fields in Patch requests. // used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"` ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "AccessType") to include in // 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 // API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an // values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as // empty value appearing in NullFields will be sent to the server as
@ -303,7 +233,7 @@ func (s *Tokeninfo) MarshalJSON() ([]byte, error) {
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
type Userinfoplus struct { type Userinfo struct {
// Email: The user's email address. // Email: The user's email address.
Email string `json:"email,omitempty"` Email string `json:"email,omitempty"`
@ -363,134 +293,12 @@ type Userinfoplus struct {
NullFields []string `json:"-"` NullFields []string `json:"-"`
} }
func (s *Userinfoplus) MarshalJSON() ([]byte, error) { func (s *Userinfo) MarshalJSON() ([]byte, error) {
type NoMethod Userinfoplus type NoMethod Userinfo
raw := NoMethod(*s) raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
// method id "oauth2.getCertForOpenIdConnect":
type GetCertForOpenIdConnectCall struct {
s *Service
urlParams_ gensupport.URLParams
ifNoneMatch_ string
ctx_ context.Context
header_ http.Header
}
// GetCertForOpenIdConnect:
func (s *Service) GetCertForOpenIdConnect() *GetCertForOpenIdConnectCall {
c := &GetCertForOpenIdConnectCall{s: s, urlParams_: make(gensupport.URLParams)}
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 *GetCertForOpenIdConnectCall) Fields(s ...googleapi.Field) *GetCertForOpenIdConnectCall {
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 *GetCertForOpenIdConnectCall) IfNoneMatch(entityTag string) *GetCertForOpenIdConnectCall {
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 *GetCertForOpenIdConnectCall) Context(ctx context.Context) *GetCertForOpenIdConnectCall {
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 *GetCertForOpenIdConnectCall) Header() http.Header {
if c.header_ == nil {
c.header_ = make(http.Header)
}
return c.header_
}
func (c *GetCertForOpenIdConnectCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205")
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, "oauth2/v2/certs")
urls += "?" + c.urlParams_.Encode()
req, err := http.NewRequest("GET", urls, body)
if err != nil {
return nil, err
}
req.Header = reqHeaders
return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "oauth2.getCertForOpenIdConnect" call.
// Exactly one of *Jwk or error will be non-nil. Any non-2xx status code
// is an error. Response headers are in either
// *Jwk.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 *GetCertForOpenIdConnectCall) Do(opts ...googleapi.CallOption) (*Jwk, 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 := &Jwk{
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
// {
// "httpMethod": "GET",
// "id": "oauth2.getCertForOpenIdConnect",
// "path": "oauth2/v2/certs",
// "response": {
// "$ref": "Jwk"
// }
// }
}
// method id "oauth2.tokeninfo": // method id "oauth2.tokeninfo":
type TokeninfoCall struct { type TokeninfoCall struct {
@ -518,12 +326,6 @@ func (c *TokeninfoCall) IdToken(idToken string) *TokeninfoCall {
return c return c
} }
// TokenHandle sets the optional parameter "token_handle":
func (c *TokeninfoCall) TokenHandle(tokenHandle string) *TokeninfoCall {
c.urlParams_.Set("token_handle", tokenHandle)
return c
}
// Fields allows partial responses to be retrieved. See // Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
// for more information. // for more information.
@ -551,7 +353,7 @@ func (c *TokeninfoCall) Header() http.Header {
func (c *TokeninfoCall) doRequest(alt string) (*http.Response, error) { func (c *TokeninfoCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -617,10 +419,6 @@ func (c *TokeninfoCall) Do(opts ...googleapi.CallOption) (*Tokeninfo, error) {
// "id_token": { // "id_token": {
// "location": "query", // "location": "query",
// "type": "string" // "type": "string"
// },
// "token_handle": {
// "location": "query",
// "type": "string"
// } // }
// }, // },
// "path": "oauth2/v2/tokeninfo", // "path": "oauth2/v2/tokeninfo",
@ -684,7 +482,7 @@ func (c *UserinfoGetCall) Header() http.Header {
func (c *UserinfoGetCall) doRequest(alt string) (*http.Response, error) { func (c *UserinfoGetCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -706,13 +504,13 @@ func (c *UserinfoGetCall) doRequest(alt string) (*http.Response, error) {
} }
// Do executes the "oauth2.userinfo.get" call. // Do executes the "oauth2.userinfo.get" call.
// Exactly one of *Userinfoplus or error will be non-nil. Any non-2xx // Exactly one of *Userinfo or error will be non-nil. Any non-2xx status
// status code is an error. Response headers are in either // code is an error. Response headers are in either
// *Userinfoplus.ServerResponse.Header or (if a response was returned at // *Userinfo.ServerResponse.Header or (if a response was returned at
// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
// to check whether the returned error was because // to check whether the returned error was because
// http.StatusNotModified was returned. // http.StatusNotModified was returned.
func (c *UserinfoGetCall) Do(opts ...googleapi.CallOption) (*Userinfoplus, error) { func (c *UserinfoGetCall) Do(opts ...googleapi.CallOption) (*Userinfo, error) {
gensupport.SetOptions(c.urlParams_, opts...) gensupport.SetOptions(c.urlParams_, opts...)
res, err := c.doRequest("json") res, err := c.doRequest("json")
if res != nil && res.StatusCode == http.StatusNotModified { if res != nil && res.StatusCode == http.StatusNotModified {
@ -731,7 +529,7 @@ func (c *UserinfoGetCall) Do(opts ...googleapi.CallOption) (*Userinfoplus, error
if err := googleapi.CheckResponse(res); err != nil { if err := googleapi.CheckResponse(res); err != nil {
return nil, err return nil, err
} }
ret := &Userinfoplus{ ret := &Userinfo{
ServerResponse: googleapi.ServerResponse{ ServerResponse: googleapi.ServerResponse{
Header: res.Header, Header: res.Header,
HTTPStatusCode: res.StatusCode, HTTPStatusCode: res.StatusCode,
@ -747,10 +545,10 @@ func (c *UserinfoGetCall) Do(opts ...googleapi.CallOption) (*Userinfoplus, error
// "id": "oauth2.userinfo.get", // "id": "oauth2.userinfo.get",
// "path": "oauth2/v2/userinfo", // "path": "oauth2/v2/userinfo",
// "response": { // "response": {
// "$ref": "Userinfoplus" // "$ref": "Userinfo"
// }, // },
// "scopes": [ // "scopes": [
// "https://www.googleapis.com/auth/plus.me", // "openid",
// "https://www.googleapis.com/auth/userinfo.email", // "https://www.googleapis.com/auth/userinfo.email",
// "https://www.googleapis.com/auth/userinfo.profile" // "https://www.googleapis.com/auth/userinfo.profile"
// ] // ]
@ -811,7 +609,7 @@ func (c *UserinfoV2MeGetCall) Header() http.Header {
func (c *UserinfoV2MeGetCall) doRequest(alt string) (*http.Response, error) { func (c *UserinfoV2MeGetCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -833,13 +631,13 @@ func (c *UserinfoV2MeGetCall) doRequest(alt string) (*http.Response, error) {
} }
// Do executes the "oauth2.userinfo.v2.me.get" call. // Do executes the "oauth2.userinfo.v2.me.get" call.
// Exactly one of *Userinfoplus or error will be non-nil. Any non-2xx // Exactly one of *Userinfo or error will be non-nil. Any non-2xx status
// status code is an error. Response headers are in either // code is an error. Response headers are in either
// *Userinfoplus.ServerResponse.Header or (if a response was returned at // *Userinfo.ServerResponse.Header or (if a response was returned at
// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
// to check whether the returned error was because // to check whether the returned error was because
// http.StatusNotModified was returned. // http.StatusNotModified was returned.
func (c *UserinfoV2MeGetCall) Do(opts ...googleapi.CallOption) (*Userinfoplus, error) { func (c *UserinfoV2MeGetCall) Do(opts ...googleapi.CallOption) (*Userinfo, error) {
gensupport.SetOptions(c.urlParams_, opts...) gensupport.SetOptions(c.urlParams_, opts...)
res, err := c.doRequest("json") res, err := c.doRequest("json")
if res != nil && res.StatusCode == http.StatusNotModified { if res != nil && res.StatusCode == http.StatusNotModified {
@ -858,7 +656,7 @@ func (c *UserinfoV2MeGetCall) Do(opts ...googleapi.CallOption) (*Userinfoplus, e
if err := googleapi.CheckResponse(res); err != nil { if err := googleapi.CheckResponse(res); err != nil {
return nil, err return nil, err
} }
ret := &Userinfoplus{ ret := &Userinfo{
ServerResponse: googleapi.ServerResponse{ ServerResponse: googleapi.ServerResponse{
Header: res.Header, Header: res.Header,
HTTPStatusCode: res.StatusCode, HTTPStatusCode: res.StatusCode,
@ -874,10 +672,10 @@ func (c *UserinfoV2MeGetCall) Do(opts ...googleapi.CallOption) (*Userinfoplus, e
// "id": "oauth2.userinfo.v2.me.get", // "id": "oauth2.userinfo.v2.me.get",
// "path": "userinfo/v2/me", // "path": "userinfo/v2/me",
// "response": { // "response": {
// "$ref": "Userinfoplus" // "$ref": "Userinfo"
// }, // },
// "scopes": [ // "scopes": [
// "https://www.googleapis.com/auth/plus.me", // "openid",
// "https://www.googleapis.com/auth/userinfo.email", // "https://www.googleapis.com/auth/userinfo.email",
// "https://www.googleapis.com/auth/userinfo.profile" // "https://www.googleapis.com/auth/userinfo.profile"
// ] // ]

View File

@ -6,6 +6,7 @@
package option package option
import ( import (
"crypto/tls"
"net/http" "net/http"
"golang.org/x/oauth2" "golang.org/x/oauth2"
@ -142,6 +143,7 @@ func (w withGRPCDialOption) Apply(o *internal.DialSettings) {
// WithGRPCConnectionPool returns a ClientOption that creates a pool of gRPC // WithGRPCConnectionPool returns a ClientOption that creates a pool of gRPC
// connections that requests will be balanced between. // connections that requests will be balanced between.
//
// This is an EXPERIMENTAL API and may be changed or removed in the future. // This is an EXPERIMENTAL API and may be changed or removed in the future.
func WithGRPCConnectionPool(size int) ClientOption { func WithGRPCConnectionPool(size int) ClientOption {
return withGRPCConnectionPool(size) return withGRPCConnectionPool(size)
@ -227,11 +229,43 @@ func (w withRequestReason) Apply(o *internal.DialSettings) {
// settings on gRPC and HTTP clients. // settings on gRPC and HTTP clients.
// An example reason would be to bind custom telemetry that overrides the defaults. // An example reason would be to bind custom telemetry that overrides the defaults.
func WithTelemetryDisabled() ClientOption { func WithTelemetryDisabled() ClientOption {
return withTelemetryDisabledOption{} return withTelemetryDisabled{}
} }
type withTelemetryDisabledOption struct{} type withTelemetryDisabled struct{}
func (w withTelemetryDisabledOption) Apply(o *internal.DialSettings) { func (w withTelemetryDisabled) Apply(o *internal.DialSettings) {
o.TelemetryDisabled = true o.TelemetryDisabled = true
} }
// ClientCertSource is a function that returns a TLS client certificate to be used
// when opening TLS connections.
//
// It follows the same semantics as crypto/tls.Config.GetClientCertificate.
//
// This is an EXPERIMENTAL API and may be changed or removed in the future.
type ClientCertSource = func(*tls.CertificateRequestInfo) (*tls.Certificate, error)
// WithClientCertSource returns a ClientOption that specifies a
// callback function for obtaining a TLS client certificate.
//
// This option is used for supporting mTLS authentication, where the
// server validates the client certifcate when establishing a connection.
//
// The callback function will be invoked whenever the server requests a
// certificate from the client. Implementations of the callback function
// should try to ensure that a valid certificate can be repeatedly returned
// on demand for the entire life cycle of the transport client. If a nil
// Certificate is returned (i.e. no Certificate can be obtained), an error
// should be returned.
//
// This is an EXPERIMENTAL API and may be changed or removed in the future.
func WithClientCertSource(s ClientCertSource) ClientOption {
return withClientCertSource{s}
}
type withClientCertSource struct{ s ClientCertSource }
func (w withClientCertSource) Apply(o *internal.DialSettings) {
o.ClientCertSource = w.s
}

View File

@ -10,6 +10,7 @@ go_library(
"//vendor/google.golang.org/api/googleapi:go_default_library", "//vendor/google.golang.org/api/googleapi:go_default_library",
"//vendor/google.golang.org/api/internal/gensupport:go_default_library", "//vendor/google.golang.org/api/internal/gensupport:go_default_library",
"//vendor/google.golang.org/api/option:go_default_library", "//vendor/google.golang.org/api/option:go_default_library",
"//vendor/google.golang.org/api/option/internaloption:go_default_library",
"//vendor/google.golang.org/api/transport/http:go_default_library", "//vendor/google.golang.org/api/transport/http:go_default_library",
], ],
) )

View File

@ -26,7 +26,7 @@
"description": "Stores and retrieves potentially large, immutable data objects.", "description": "Stores and retrieves potentially large, immutable data objects.",
"discoveryVersion": "v1", "discoveryVersion": "v1",
"documentationLink": "https://developers.google.com/storage/docs/json_api/", "documentationLink": "https://developers.google.com/storage/docs/json_api/",
"etag": "\"u9GIe6H63LSGq-9_t39K2Zx_EAc/1nXB4dbk0lw3Xe_A6xBKVeN3Y7U\"", "etag": "\"u9GIe6H63LSGq-9_t39K2Zx_EAc/Hs4LXeoJXbMtbcM0DbLgg3CHzL4\"",
"icons": { "icons": {
"x16": "https://www.google.com/images/icons/product/cloud_storage-16.png", "x16": "https://www.google.com/images/icons/product/cloud_storage-16.png",
"x32": "https://www.google.com/images/icons/product/cloud_storage-32.png" "x32": "https://www.google.com/images/icons/product/cloud_storage-32.png"
@ -1826,6 +1826,11 @@
"required": true, "required": true,
"type": "string" "type": "string"
}, },
"destinationKmsKeyName": {
"description": "Resource name of the Cloud KMS key, of the form projects/my-project/locations/global/keyRings/my-kr/cryptoKeys/my-key, that will be used to encrypt the object. Overrides the object metadata's kms_key_name value, if any.",
"location": "query",
"type": "string"
},
"destinationObject": { "destinationObject": {
"description": "Name of the new object. Required when the object metadata is not otherwise provided. Overrides the object metadata's name value, if any.", "description": "Name of the new object. Required when the object metadata is not otherwise provided. Overrides the object metadata's name value, if any.",
"location": "path", "location": "path",
@ -2310,6 +2315,11 @@
"location": "query", "location": "query",
"type": "string" "type": "string"
}, },
"endOffset": {
"description": "Filter results to objects whose names are lexicographically before endOffset. If startOffset is also set, the objects listed will have names between startOffset (inclusive) and endOffset (exclusive).",
"location": "query",
"type": "string"
},
"includeTrailingDelimiter": { "includeTrailingDelimiter": {
"description": "If true, objects that end in exactly one instance of delimiter will have their metadata included in items in addition to prefixes.", "description": "If true, objects that end in exactly one instance of delimiter will have their metadata included in items in addition to prefixes.",
"location": "query", "location": "query",
@ -2351,6 +2361,11 @@
"location": "query", "location": "query",
"type": "string" "type": "string"
}, },
"startOffset": {
"description": "Filter results to objects whose names are lexicographically equal to or after startOffset. If endOffset is also set, the objects listed will have names between startOffset (inclusive) and endOffset (exclusive).",
"location": "query",
"type": "string"
},
"userProject": { "userProject": {
"description": "The project to be billed for this request. Required for Requester Pays buckets.", "description": "The project to be billed for this request. Required for Requester Pays buckets.",
"location": "query", "location": "query",
@ -2882,6 +2897,11 @@
"location": "query", "location": "query",
"type": "string" "type": "string"
}, },
"endOffset": {
"description": "Filter results to objects whose names are lexicographically before endOffset. If startOffset is also set, the objects listed will have names between startOffset (inclusive) and endOffset (exclusive).",
"location": "query",
"type": "string"
},
"includeTrailingDelimiter": { "includeTrailingDelimiter": {
"description": "If true, objects that end in exactly one instance of delimiter will have their metadata included in items in addition to prefixes.", "description": "If true, objects that end in exactly one instance of delimiter will have their metadata included in items in addition to prefixes.",
"location": "query", "location": "query",
@ -2923,6 +2943,11 @@
"location": "query", "location": "query",
"type": "string" "type": "string"
}, },
"startOffset": {
"description": "Filter results to objects whose names are lexicographically equal to or after startOffset. If endOffset is also set, the objects listed will have names between startOffset (inclusive) and endOffset (exclusive).",
"location": "query",
"type": "string"
},
"userProject": { "userProject": {
"description": "The project to be billed for this request. Required for Requester Pays buckets.", "description": "The project to be billed for this request. Required for Requester Pays buckets.",
"location": "query", "location": "query",
@ -3204,7 +3229,7 @@
} }
} }
}, },
"revision": "20191127", "revision": "20200326",
"rootUrl": "https://storage.googleapis.com/", "rootUrl": "https://storage.googleapis.com/",
"schemas": { "schemas": {
"Bucket": { "Bucket": {
@ -3527,6 +3552,17 @@
} }
}, },
"type": "object" "type": "object"
},
"zoneAffinity": {
"description": "The zone or zones from which the bucket is intended to use zonal quota. Requests for data from outside the specified affinities are still allowed but won't be able to use zonal quota. The zone or zones need to be within the bucket location otherwise the requests will fail with a 400 Bad Request response.",
"items": {
"type": "string"
},
"type": "array"
},
"zoneSeparation": {
"description": "If set, objects placed in this bucket are required to be separated by disaster domain.",
"type": "boolean"
} }
}, },
"type": "object" "type": "object"

View File

@ -58,6 +58,7 @@ import (
googleapi "google.golang.org/api/googleapi" googleapi "google.golang.org/api/googleapi"
gensupport "google.golang.org/api/internal/gensupport" gensupport "google.golang.org/api/internal/gensupport"
option "google.golang.org/api/option" option "google.golang.org/api/option"
internaloption "google.golang.org/api/option/internaloption"
htransport "google.golang.org/api/transport/http" htransport "google.golang.org/api/transport/http"
) )
@ -74,6 +75,7 @@ var _ = googleapi.Version
var _ = errors.New var _ = errors.New
var _ = strings.Replace var _ = strings.Replace
var _ = context.Canceled var _ = context.Canceled
var _ = internaloption.WithDefaultEndpoint
const apiId = "storage:v1" const apiId = "storage:v1"
const apiName = "storage" const apiName = "storage"
@ -109,6 +111,7 @@ func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, err
) )
// NOTE: prepend, so we don't override user-specified scopes. // NOTE: prepend, so we don't override user-specified scopes.
opts = append([]option.ClientOption{scopesOption}, opts...) opts = append([]option.ClientOption{scopesOption}, opts...)
opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
client, endpoint, err := htransport.NewClient(ctx, opts...) client, endpoint, err := htransport.NewClient(ctx, opts...)
if err != nil { if err != nil {
return nil, err return nil, err
@ -390,6 +393,17 @@ type Bucket struct {
// Static Website Examples for more information. // Static Website Examples for more information.
Website *BucketWebsite `json:"website,omitempty"` Website *BucketWebsite `json:"website,omitempty"`
// ZoneAffinity: The zone or zones from which the bucket is intended to
// use zonal quota. Requests for data from outside the specified
// affinities are still allowed but won't be able to use zonal quota.
// The zone or zones need to be within the bucket location otherwise the
// requests will fail with a 400 Bad Request response.
ZoneAffinity []string `json:"zoneAffinity,omitempty"`
// ZoneSeparation: If set, objects placed in this bucket are required to
// be separated by disaster domain.
ZoneSeparation bool `json:"zoneSeparation,omitempty"`
// ServerResponse contains the HTTP response code and headers from the // ServerResponse contains the HTTP response code and headers from the
// server. // server.
googleapi.ServerResponse `json:"-"` googleapi.ServerResponse `json:"-"`
@ -2401,7 +2415,7 @@ func (c *BucketAccessControlsDeleteCall) Header() http.Header {
func (c *BucketAccessControlsDeleteCall) doRequest(alt string) (*http.Response, error) { func (c *BucketAccessControlsDeleteCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -2549,7 +2563,7 @@ func (c *BucketAccessControlsGetCall) Header() http.Header {
func (c *BucketAccessControlsGetCall) doRequest(alt string) (*http.Response, error) { func (c *BucketAccessControlsGetCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -2716,7 +2730,7 @@ func (c *BucketAccessControlsInsertCall) Header() http.Header {
func (c *BucketAccessControlsInsertCall) doRequest(alt string) (*http.Response, error) { func (c *BucketAccessControlsInsertCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -2889,7 +2903,7 @@ func (c *BucketAccessControlsListCall) Header() http.Header {
func (c *BucketAccessControlsListCall) doRequest(alt string) (*http.Response, error) { func (c *BucketAccessControlsListCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -3050,7 +3064,7 @@ func (c *BucketAccessControlsPatchCall) Header() http.Header {
func (c *BucketAccessControlsPatchCall) doRequest(alt string) (*http.Response, error) { func (c *BucketAccessControlsPatchCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -3224,7 +3238,7 @@ func (c *BucketAccessControlsUpdateCall) Header() http.Header {
func (c *BucketAccessControlsUpdateCall) doRequest(alt string) (*http.Response, error) { func (c *BucketAccessControlsUpdateCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -3410,7 +3424,7 @@ func (c *BucketsDeleteCall) Header() http.Header {
func (c *BucketsDeleteCall) doRequest(alt string) (*http.Response, error) { func (c *BucketsDeleteCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -3589,7 +3603,7 @@ func (c *BucketsGetCall) Header() http.Header {
func (c *BucketsGetCall) doRequest(alt string) (*http.Response, error) { func (c *BucketsGetCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -3795,7 +3809,7 @@ func (c *BucketsGetIamPolicyCall) Header() http.Header {
func (c *BucketsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { func (c *BucketsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -4012,7 +4026,7 @@ func (c *BucketsInsertCall) Header() http.Header {
func (c *BucketsInsertCall) doRequest(alt string) (*http.Response, error) { func (c *BucketsInsertCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -4269,7 +4283,7 @@ func (c *BucketsListCall) Header() http.Header {
func (c *BucketsListCall) doRequest(alt string) (*http.Response, error) { func (c *BucketsListCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -4479,7 +4493,7 @@ func (c *BucketsLockRetentionPolicyCall) Header() http.Header {
func (c *BucketsLockRetentionPolicyCall) doRequest(alt string) (*http.Response, error) { func (c *BucketsLockRetentionPolicyCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -4714,7 +4728,7 @@ func (c *BucketsPatchCall) Header() http.Header {
func (c *BucketsPatchCall) doRequest(alt string) (*http.Response, error) { func (c *BucketsPatchCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -4943,7 +4957,7 @@ func (c *BucketsSetIamPolicyCall) Header() http.Header {
func (c *BucketsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { func (c *BucketsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -5118,7 +5132,7 @@ func (c *BucketsTestIamPermissionsCall) Header() http.Header {
func (c *BucketsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { func (c *BucketsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -5358,7 +5372,7 @@ func (c *BucketsUpdateCall) Header() http.Header {
func (c *BucketsUpdateCall) doRequest(alt string) (*http.Response, error) { func (c *BucketsUpdateCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -5570,7 +5584,7 @@ func (c *ChannelsStopCall) Header() http.Header {
func (c *ChannelsStopCall) doRequest(alt string) (*http.Response, error) { func (c *ChannelsStopCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -5687,7 +5701,7 @@ func (c *DefaultObjectAccessControlsDeleteCall) Header() http.Header {
func (c *DefaultObjectAccessControlsDeleteCall) doRequest(alt string) (*http.Response, error) { func (c *DefaultObjectAccessControlsDeleteCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -5835,7 +5849,7 @@ func (c *DefaultObjectAccessControlsGetCall) Header() http.Header {
func (c *DefaultObjectAccessControlsGetCall) doRequest(alt string) (*http.Response, error) { func (c *DefaultObjectAccessControlsGetCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -6003,7 +6017,7 @@ func (c *DefaultObjectAccessControlsInsertCall) Header() http.Header {
func (c *DefaultObjectAccessControlsInsertCall) doRequest(alt string) (*http.Response, error) { func (c *DefaultObjectAccessControlsInsertCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -6193,7 +6207,7 @@ func (c *DefaultObjectAccessControlsListCall) Header() http.Header {
func (c *DefaultObjectAccessControlsListCall) doRequest(alt string) (*http.Response, error) { func (c *DefaultObjectAccessControlsListCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -6366,7 +6380,7 @@ func (c *DefaultObjectAccessControlsPatchCall) Header() http.Header {
func (c *DefaultObjectAccessControlsPatchCall) doRequest(alt string) (*http.Response, error) { func (c *DefaultObjectAccessControlsPatchCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -6540,7 +6554,7 @@ func (c *DefaultObjectAccessControlsUpdateCall) Header() http.Header {
func (c *DefaultObjectAccessControlsUpdateCall) doRequest(alt string) (*http.Response, error) { func (c *DefaultObjectAccessControlsUpdateCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -6712,7 +6726,7 @@ func (c *NotificationsDeleteCall) Header() http.Header {
func (c *NotificationsDeleteCall) doRequest(alt string) (*http.Response, error) { func (c *NotificationsDeleteCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -6860,7 +6874,7 @@ func (c *NotificationsGetCall) Header() http.Header {
func (c *NotificationsGetCall) doRequest(alt string) (*http.Response, error) { func (c *NotificationsGetCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -7030,7 +7044,7 @@ func (c *NotificationsInsertCall) Header() http.Header {
func (c *NotificationsInsertCall) doRequest(alt string) (*http.Response, error) { func (c *NotificationsInsertCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -7205,7 +7219,7 @@ func (c *NotificationsListCall) Header() http.Header {
func (c *NotificationsListCall) doRequest(alt string) (*http.Response, error) { func (c *NotificationsListCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -7378,7 +7392,7 @@ func (c *ObjectAccessControlsDeleteCall) Header() http.Header {
func (c *ObjectAccessControlsDeleteCall) doRequest(alt string) (*http.Response, error) { func (c *ObjectAccessControlsDeleteCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -7550,7 +7564,7 @@ func (c *ObjectAccessControlsGetCall) Header() http.Header {
func (c *ObjectAccessControlsGetCall) doRequest(alt string) (*http.Response, error) { func (c *ObjectAccessControlsGetCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -7741,7 +7755,7 @@ func (c *ObjectAccessControlsInsertCall) Header() http.Header {
func (c *ObjectAccessControlsInsertCall) doRequest(alt string) (*http.Response, error) { func (c *ObjectAccessControlsInsertCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -7938,7 +7952,7 @@ func (c *ObjectAccessControlsListCall) Header() http.Header {
func (c *ObjectAccessControlsListCall) doRequest(alt string) (*http.Response, error) { func (c *ObjectAccessControlsListCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -8123,7 +8137,7 @@ func (c *ObjectAccessControlsPatchCall) Header() http.Header {
func (c *ObjectAccessControlsPatchCall) doRequest(alt string) (*http.Response, error) { func (c *ObjectAccessControlsPatchCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -8321,7 +8335,7 @@ func (c *ObjectAccessControlsUpdateCall) Header() http.Header {
func (c *ObjectAccessControlsUpdateCall) doRequest(alt string) (*http.Response, error) { func (c *ObjectAccessControlsUpdateCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -8558,7 +8572,7 @@ func (c *ObjectsComposeCall) Header() http.Header {
func (c *ObjectsComposeCall) doRequest(alt string) (*http.Response, error) { func (c *ObjectsComposeCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -8734,6 +8748,17 @@ func (r *ObjectsService) Copy(sourceBucket string, sourceObject string, destinat
return c return c
} }
// DestinationKmsKeyName sets the optional parameter
// "destinationKmsKeyName": Resource name of the Cloud KMS key, of the
// form
// projects/my-project/locations/global/keyRings/my-kr/cryptoKeys/my-key,
// that will be used to encrypt the object. Overrides the object
// metadata's kms_key_name value, if any.
func (c *ObjectsCopyCall) DestinationKmsKeyName(destinationKmsKeyName string) *ObjectsCopyCall {
c.urlParams_.Set("destinationKmsKeyName", destinationKmsKeyName)
return c
}
// DestinationPredefinedAcl sets the optional parameter // DestinationPredefinedAcl sets the optional parameter
// "destinationPredefinedAcl": Apply a predefined set of access controls // "destinationPredefinedAcl": Apply a predefined set of access controls
// to the destination object. // to the destination object.
@ -8890,7 +8915,7 @@ func (c *ObjectsCopyCall) Header() http.Header {
func (c *ObjectsCopyCall) doRequest(alt string) (*http.Response, error) { func (c *ObjectsCopyCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -8973,6 +8998,11 @@ func (c *ObjectsCopyCall) Do(opts ...googleapi.CallOption) (*Object, error) {
// "required": true, // "required": true,
// "type": "string" // "type": "string"
// }, // },
// "destinationKmsKeyName": {
// "description": "Resource name of the Cloud KMS key, of the form projects/my-project/locations/global/keyRings/my-kr/cryptoKeys/my-key, that will be used to encrypt the object. Overrides the object metadata's kms_key_name value, if any.",
// "location": "query",
// "type": "string"
// },
// "destinationObject": { // "destinationObject": {
// "description": "Name of the new object. Required when the object metadata is not otherwise provided. Overrides the object metadata's name value, if any.", // "description": "Name of the new object. Required when the object metadata is not otherwise provided. Overrides the object metadata's name value, if any.",
// "location": "path", // "location": "path",
@ -9213,7 +9243,7 @@ func (c *ObjectsDeleteCall) Header() http.Header {
func (c *ObjectsDeleteCall) doRequest(alt string) (*http.Response, error) { func (c *ObjectsDeleteCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -9446,7 +9476,7 @@ func (c *ObjectsGetCall) Header() http.Header {
func (c *ObjectsGetCall) doRequest(alt string) (*http.Response, error) { func (c *ObjectsGetCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -9696,7 +9726,7 @@ func (c *ObjectsGetIamPolicyCall) Header() http.Header {
func (c *ObjectsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { func (c *ObjectsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -10013,7 +10043,7 @@ func (c *ObjectsInsertCall) Header() http.Header {
func (c *ObjectsInsertCall) doRequest(alt string) (*http.Response, error) { func (c *ObjectsInsertCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -10263,6 +10293,15 @@ func (c *ObjectsListCall) Delimiter(delimiter string) *ObjectsListCall {
return c return c
} }
// EndOffset sets the optional parameter "endOffset": Filter results to
// objects whose names are lexicographically before endOffset. If
// startOffset is also set, the objects listed will have names between
// startOffset (inclusive) and endOffset (exclusive).
func (c *ObjectsListCall) EndOffset(endOffset string) *ObjectsListCall {
c.urlParams_.Set("endOffset", endOffset)
return c
}
// IncludeTrailingDelimiter sets the optional parameter // IncludeTrailingDelimiter sets the optional parameter
// "includeTrailingDelimiter": If true, objects that end in exactly one // "includeTrailingDelimiter": If true, objects that end in exactly one
// instance of delimiter will have their metadata included in items in // instance of delimiter will have their metadata included in items in
@ -10316,6 +10355,15 @@ func (c *ObjectsListCall) ProvisionalUserProject(provisionalUserProject string)
return c return c
} }
// StartOffset sets the optional parameter "startOffset": Filter results
// to objects whose names are lexicographically equal to or after
// startOffset. If endOffset is also set, the objects listed will have
// names between startOffset (inclusive) and endOffset (exclusive).
func (c *ObjectsListCall) StartOffset(startOffset string) *ObjectsListCall {
c.urlParams_.Set("startOffset", startOffset)
return c
}
// UserProject sets the optional parameter "userProject": The project to // UserProject sets the optional parameter "userProject": The project to
// be billed for this request. Required for Requester Pays buckets. // be billed for this request. Required for Requester Pays buckets.
func (c *ObjectsListCall) UserProject(userProject string) *ObjectsListCall { func (c *ObjectsListCall) UserProject(userProject string) *ObjectsListCall {
@ -10368,7 +10416,7 @@ func (c *ObjectsListCall) Header() http.Header {
func (c *ObjectsListCall) doRequest(alt string) (*http.Response, error) { func (c *ObjectsListCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -10448,6 +10496,11 @@ func (c *ObjectsListCall) Do(opts ...googleapi.CallOption) (*Objects, error) {
// "location": "query", // "location": "query",
// "type": "string" // "type": "string"
// }, // },
// "endOffset": {
// "description": "Filter results to objects whose names are lexicographically before endOffset. If startOffset is also set, the objects listed will have names between startOffset (inclusive) and endOffset (exclusive).",
// "location": "query",
// "type": "string"
// },
// "includeTrailingDelimiter": { // "includeTrailingDelimiter": {
// "description": "If true, objects that end in exactly one instance of delimiter will have their metadata included in items in addition to prefixes.", // "description": "If true, objects that end in exactly one instance of delimiter will have their metadata included in items in addition to prefixes.",
// "location": "query", // "location": "query",
@ -10489,6 +10542,11 @@ func (c *ObjectsListCall) Do(opts ...googleapi.CallOption) (*Objects, error) {
// "location": "query", // "location": "query",
// "type": "string" // "type": "string"
// }, // },
// "startOffset": {
// "description": "Filter results to objects whose names are lexicographically equal to or after startOffset. If endOffset is also set, the objects listed will have names between startOffset (inclusive) and endOffset (exclusive).",
// "location": "query",
// "type": "string"
// },
// "userProject": { // "userProject": {
// "description": "The project to be billed for this request. Required for Requester Pays buckets.", // "description": "The project to be billed for this request. Required for Requester Pays buckets.",
// "location": "query", // "location": "query",
@ -10675,7 +10733,7 @@ func (c *ObjectsPatchCall) Header() http.Header {
func (c *ObjectsPatchCall) doRequest(alt string) (*http.Response, error) { func (c *ObjectsPatchCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -11067,7 +11125,7 @@ func (c *ObjectsRewriteCall) Header() http.Header {
func (c *ObjectsRewriteCall) doRequest(alt string) (*http.Response, error) { func (c *ObjectsRewriteCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -11370,7 +11428,7 @@ func (c *ObjectsSetIamPolicyCall) Header() http.Header {
func (c *ObjectsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { func (c *ObjectsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -11570,7 +11628,7 @@ func (c *ObjectsTestIamPermissionsCall) Header() http.Header {
func (c *ObjectsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { func (c *ObjectsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -11831,7 +11889,7 @@ func (c *ObjectsUpdateCall) Header() http.Header {
func (c *ObjectsUpdateCall) doRequest(alt string) (*http.Response, error) { func (c *ObjectsUpdateCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -12036,6 +12094,15 @@ func (c *ObjectsWatchAllCall) Delimiter(delimiter string) *ObjectsWatchAllCall {
return c return c
} }
// EndOffset sets the optional parameter "endOffset": Filter results to
// objects whose names are lexicographically before endOffset. If
// startOffset is also set, the objects listed will have names between
// startOffset (inclusive) and endOffset (exclusive).
func (c *ObjectsWatchAllCall) EndOffset(endOffset string) *ObjectsWatchAllCall {
c.urlParams_.Set("endOffset", endOffset)
return c
}
// IncludeTrailingDelimiter sets the optional parameter // IncludeTrailingDelimiter sets the optional parameter
// "includeTrailingDelimiter": If true, objects that end in exactly one // "includeTrailingDelimiter": If true, objects that end in exactly one
// instance of delimiter will have their metadata included in items in // instance of delimiter will have their metadata included in items in
@ -12089,6 +12156,15 @@ func (c *ObjectsWatchAllCall) ProvisionalUserProject(provisionalUserProject stri
return c return c
} }
// StartOffset sets the optional parameter "startOffset": Filter results
// to objects whose names are lexicographically equal to or after
// startOffset. If endOffset is also set, the objects listed will have
// names between startOffset (inclusive) and endOffset (exclusive).
func (c *ObjectsWatchAllCall) StartOffset(startOffset string) *ObjectsWatchAllCall {
c.urlParams_.Set("startOffset", startOffset)
return c
}
// UserProject sets the optional parameter "userProject": The project to // UserProject sets the optional parameter "userProject": The project to
// be billed for this request. Required for Requester Pays buckets. // be billed for this request. Required for Requester Pays buckets.
func (c *ObjectsWatchAllCall) UserProject(userProject string) *ObjectsWatchAllCall { func (c *ObjectsWatchAllCall) UserProject(userProject string) *ObjectsWatchAllCall {
@ -12131,7 +12207,7 @@ func (c *ObjectsWatchAllCall) Header() http.Header {
func (c *ObjectsWatchAllCall) doRequest(alt string) (*http.Response, error) { func (c *ObjectsWatchAllCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -12213,6 +12289,11 @@ func (c *ObjectsWatchAllCall) Do(opts ...googleapi.CallOption) (*Channel, error)
// "location": "query", // "location": "query",
// "type": "string" // "type": "string"
// }, // },
// "endOffset": {
// "description": "Filter results to objects whose names are lexicographically before endOffset. If startOffset is also set, the objects listed will have names between startOffset (inclusive) and endOffset (exclusive).",
// "location": "query",
// "type": "string"
// },
// "includeTrailingDelimiter": { // "includeTrailingDelimiter": {
// "description": "If true, objects that end in exactly one instance of delimiter will have their metadata included in items in addition to prefixes.", // "description": "If true, objects that end in exactly one instance of delimiter will have their metadata included in items in addition to prefixes.",
// "location": "query", // "location": "query",
@ -12254,6 +12335,11 @@ func (c *ObjectsWatchAllCall) Do(opts ...googleapi.CallOption) (*Channel, error)
// "location": "query", // "location": "query",
// "type": "string" // "type": "string"
// }, // },
// "startOffset": {
// "description": "Filter results to objects whose names are lexicographically equal to or after startOffset. If endOffset is also set, the objects listed will have names between startOffset (inclusive) and endOffset (exclusive).",
// "location": "query",
// "type": "string"
// },
// "userProject": { // "userProject": {
// "description": "The project to be billed for this request. Required for Requester Pays buckets.", // "description": "The project to be billed for this request. Required for Requester Pays buckets.",
// "location": "query", // "location": "query",
@ -12337,7 +12423,7 @@ func (c *ProjectsHmacKeysCreateCall) Header() http.Header {
func (c *ProjectsHmacKeysCreateCall) doRequest(alt string) (*http.Response, error) { func (c *ProjectsHmacKeysCreateCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -12487,7 +12573,7 @@ func (c *ProjectsHmacKeysDeleteCall) Header() http.Header {
func (c *ProjectsHmacKeysDeleteCall) doRequest(alt string) (*http.Response, error) { func (c *ProjectsHmacKeysDeleteCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -12622,7 +12708,7 @@ func (c *ProjectsHmacKeysGetCall) Header() http.Header {
func (c *ProjectsHmacKeysGetCall) doRequest(alt string) (*http.Response, error) { func (c *ProjectsHmacKeysGetCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -12822,7 +12908,7 @@ func (c *ProjectsHmacKeysListCall) Header() http.Header {
func (c *ProjectsHmacKeysListCall) doRequest(alt string) (*http.Response, error) { func (c *ProjectsHmacKeysListCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -13017,7 +13103,7 @@ func (c *ProjectsHmacKeysUpdateCall) Header() http.Header {
func (c *ProjectsHmacKeysUpdateCall) doRequest(alt string) (*http.Response, error) { func (c *ProjectsHmacKeysUpdateCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -13194,7 +13280,7 @@ func (c *ProjectsServiceAccountGetCall) Header() http.Header {
func (c *ProjectsServiceAccountGetCall) doRequest(alt string) (*http.Response, error) { func (c *ProjectsServiceAccountGetCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }

View File

@ -10,6 +10,7 @@ go_library(
"//vendor/google.golang.org/api/googleapi:go_default_library", "//vendor/google.golang.org/api/googleapi:go_default_library",
"//vendor/google.golang.org/api/internal/gensupport:go_default_library", "//vendor/google.golang.org/api/internal/gensupport:go_default_library",
"//vendor/google.golang.org/api/option:go_default_library", "//vendor/google.golang.org/api/option:go_default_library",
"//vendor/google.golang.org/api/option/internaloption:go_default_library",
"//vendor/google.golang.org/api/transport/http:go_default_library", "//vendor/google.golang.org/api/transport/http:go_default_library",
], ],
) )

View File

@ -22,6 +22,7 @@
}, },
"id": "tpu:v1", "id": "tpu:v1",
"kind": "discovery#restDescription", "kind": "discovery#restDescription",
"mtlsRootUrl": "https://tpu.mtls.googleapis.com/",
"name": "tpu", "name": "tpu",
"ownerDomain": "google.com", "ownerDomain": "google.com",
"ownerName": "Google", "ownerName": "Google",
@ -658,7 +659,7 @@
} }
} }
}, },
"revision": "20200116", "revision": "20200309",
"rootUrl": "https://tpu.googleapis.com/", "rootUrl": "https://tpu.googleapis.com/",
"schemas": { "schemas": {
"AcceleratorType": { "AcceleratorType": {

View File

@ -52,6 +52,7 @@ import (
googleapi "google.golang.org/api/googleapi" googleapi "google.golang.org/api/googleapi"
gensupport "google.golang.org/api/internal/gensupport" gensupport "google.golang.org/api/internal/gensupport"
option "google.golang.org/api/option" option "google.golang.org/api/option"
internaloption "google.golang.org/api/option/internaloption"
htransport "google.golang.org/api/transport/http" htransport "google.golang.org/api/transport/http"
) )
@ -68,6 +69,7 @@ var _ = googleapi.Version
var _ = errors.New var _ = errors.New
var _ = strings.Replace var _ = strings.Replace
var _ = context.Canceled var _ = context.Canceled
var _ = internaloption.WithDefaultEndpoint
const apiId = "tpu:v1" const apiId = "tpu:v1"
const apiName = "tpu" const apiName = "tpu"
@ -87,6 +89,7 @@ func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, err
) )
// NOTE: prepend, so we don't override user-specified scopes. // NOTE: prepend, so we don't override user-specified scopes.
opts = append([]option.ClientOption{scopesOption}, opts...) opts = append([]option.ClientOption{scopesOption}, opts...)
opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
client, endpoint, err := htransport.NewClient(ctx, opts...) client, endpoint, err := htransport.NewClient(ctx, opts...)
if err != nil { if err != nil {
return nil, err return nil, err
@ -1018,7 +1021,7 @@ func (c *ProjectsLocationsGetCall) Header() http.Header {
func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) { func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -1184,7 +1187,7 @@ func (c *ProjectsLocationsListCall) Header() http.Header {
func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) { func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -1365,7 +1368,7 @@ func (c *ProjectsLocationsAcceleratorTypesGetCall) Header() http.Header {
func (c *ProjectsLocationsAcceleratorTypesGetCall) doRequest(alt string) (*http.Response, error) { func (c *ProjectsLocationsAcceleratorTypesGetCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -1535,7 +1538,7 @@ func (c *ProjectsLocationsAcceleratorTypesListCall) Header() http.Header {
func (c *ProjectsLocationsAcceleratorTypesListCall) doRequest(alt string) (*http.Response, error) { func (c *ProjectsLocationsAcceleratorTypesListCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -1719,7 +1722,7 @@ func (c *ProjectsLocationsNodesCreateCall) Header() http.Header {
func (c *ProjectsLocationsNodesCreateCall) doRequest(alt string) (*http.Response, error) { func (c *ProjectsLocationsNodesCreateCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -1862,7 +1865,7 @@ func (c *ProjectsLocationsNodesDeleteCall) Header() http.Header {
func (c *ProjectsLocationsNodesDeleteCall) doRequest(alt string) (*http.Response, error) { func (c *ProjectsLocationsNodesDeleteCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -2003,7 +2006,7 @@ func (c *ProjectsLocationsNodesGetCall) Header() http.Header {
func (c *ProjectsLocationsNodesGetCall) doRequest(alt string) (*http.Response, error) { func (c *ProjectsLocationsNodesGetCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -2161,7 +2164,7 @@ func (c *ProjectsLocationsNodesListCall) Header() http.Header {
func (c *ProjectsLocationsNodesListCall) doRequest(alt string) (*http.Response, error) { func (c *ProjectsLocationsNodesListCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -2328,7 +2331,7 @@ func (c *ProjectsLocationsNodesReimageCall) Header() http.Header {
func (c *ProjectsLocationsNodesReimageCall) doRequest(alt string) (*http.Response, error) { func (c *ProjectsLocationsNodesReimageCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -2468,7 +2471,7 @@ func (c *ProjectsLocationsNodesStartCall) Header() http.Header {
func (c *ProjectsLocationsNodesStartCall) doRequest(alt string) (*http.Response, error) { func (c *ProjectsLocationsNodesStartCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -2608,7 +2611,7 @@ func (c *ProjectsLocationsNodesStopCall) Header() http.Header {
func (c *ProjectsLocationsNodesStopCall) doRequest(alt string) (*http.Response, error) { func (c *ProjectsLocationsNodesStopCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -2763,7 +2766,7 @@ func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header {
func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -2899,7 +2902,7 @@ func (c *ProjectsLocationsOperationsDeleteCall) Header() http.Header {
func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -3044,7 +3047,7 @@ func (c *ProjectsLocationsOperationsGetCall) Header() http.Header {
func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) { func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -3225,7 +3228,7 @@ func (c *ProjectsLocationsOperationsListCall) Header() http.Header {
func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) { func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -3406,7 +3409,7 @@ func (c *ProjectsLocationsTensorflowVersionsGetCall) Header() http.Header {
func (c *ProjectsLocationsTensorflowVersionsGetCall) doRequest(alt string) (*http.Response, error) { func (c *ProjectsLocationsTensorflowVersionsGetCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }
@ -3576,7 +3579,7 @@ func (c *ProjectsLocationsTensorflowVersionsListCall) Header() http.Header {
func (c *ProjectsLocationsTensorflowVersionsListCall) doRequest(alt string) (*http.Response, error) { func (c *ProjectsLocationsTensorflowVersionsListCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200205") reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200410")
for k, v := range c.header_ { for k, v := range c.header_ {
reqHeaders[k] = v reqHeaders[k] = v
} }

View File

@ -12,6 +12,7 @@ go_library(
"//vendor/google.golang.org/api/googleapi/transport:go_default_library", "//vendor/google.golang.org/api/googleapi/transport:go_default_library",
"//vendor/google.golang.org/api/internal:go_default_library", "//vendor/google.golang.org/api/internal:go_default_library",
"//vendor/google.golang.org/api/option:go_default_library", "//vendor/google.golang.org/api/option:go_default_library",
"//vendor/google.golang.org/api/transport/cert:go_default_library",
"//vendor/google.golang.org/api/transport/http/internal/propagation:go_default_library", "//vendor/google.golang.org/api/transport/http/internal/propagation:go_default_library",
], ],
) )

View File

@ -9,14 +9,18 @@ package http
import ( import (
"context" "context"
"crypto/tls"
"errors" "errors"
"net/http" "net/http"
"net/url"
"strings"
"go.opencensus.io/plugin/ochttp" "go.opencensus.io/plugin/ochttp"
"golang.org/x/oauth2" "golang.org/x/oauth2"
"google.golang.org/api/googleapi/transport" "google.golang.org/api/googleapi/transport"
"google.golang.org/api/internal" "google.golang.org/api/internal"
"google.golang.org/api/option" "google.golang.org/api/option"
"google.golang.org/api/transport/cert"
"google.golang.org/api/transport/http/internal/propagation" "google.golang.org/api/transport/http/internal/propagation"
) )
@ -28,15 +32,23 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*http.Client,
if err != nil { if err != nil {
return nil, "", err return nil, "", err
} }
// TODO(cbro): consider injecting the User-Agent even if an explicit HTTP client is provided? clientCertSource, err := getClientCertificateSource(settings)
if settings.HTTPClient != nil {
return settings.HTTPClient, settings.Endpoint, nil
}
trans, err := newTransport(ctx, defaultBaseTransport(ctx), settings)
if err != nil { if err != nil {
return nil, "", err return nil, "", err
} }
return &http.Client{Transport: trans}, settings.Endpoint, nil endpoint, err := getEndpoint(settings, clientCertSource)
if err != nil {
return nil, "", err
}
// TODO(cbro): consider injecting the User-Agent even if an explicit HTTP client is provided?
if settings.HTTPClient != nil {
return settings.HTTPClient, endpoint, nil
}
trans, err := newTransport(ctx, defaultBaseTransport(ctx, clientCertSource), settings)
if err != nil {
return nil, "", err
}
return &http.Client{Transport: trans}, endpoint, nil
} }
// NewTransport creates an http.RoundTripper for use communicating with a Google // NewTransport creates an http.RoundTripper for use communicating with a Google
@ -137,11 +149,23 @@ func (t *parameterTransport) RoundTrip(req *http.Request) (*http.Response, error
var appengineUrlfetchHook func(context.Context) http.RoundTripper var appengineUrlfetchHook func(context.Context) http.RoundTripper
// defaultBaseTransport returns the base HTTP transport. // defaultBaseTransport returns the base HTTP transport.
// On App Engine, this is urlfetch.Transport, otherwise it's http.DefaultTransport. // On App Engine, this is urlfetch.Transport.
func defaultBaseTransport(ctx context.Context) http.RoundTripper { // If TLSCertificate is available, return a custom Transport with TLSClientConfig.
// Otherwise, return http.DefaultTransport.
func defaultBaseTransport(ctx context.Context, clientCertSource cert.Source) http.RoundTripper {
if appengineUrlfetchHook != nil { if appengineUrlfetchHook != nil {
return appengineUrlfetchHook(ctx) return appengineUrlfetchHook(ctx)
} }
if clientCertSource != nil {
// TODO (cbro): copy default transport settings from http.DefaultTransport
return &http.Transport{
TLSClientConfig: &tls.Config{
GetClientCertificate: clientCertSource,
},
}
}
return http.DefaultTransport return http.DefaultTransport
} }
@ -154,3 +178,102 @@ func addOCTransport(trans http.RoundTripper, settings *internal.DialSettings) ht
Propagation: &propagation.HTTPFormat{}, Propagation: &propagation.HTTPFormat{},
} }
} }
// getClientCertificateSource returns a default client certificate source, if
// not provided by the user.
//
// A nil default source can be returned if the source does not exist. Any exceptions
// encountered while initializing the default source will be reported as client
// error (ex. corrupt metadata file).
//
// The overall logic is as follows:
// 1. If both endpoint override and client certificate are specified, use them as is.
// 2. If user does not specify client certificate, we will attempt to use default
// client certificate.
// 3. If user does not specify endpoint override, we will use defaultMtlsEndpoint if
// client certificate is available and defaultEndpoint otherwise.
//
// Implications of the above logic:
// 1. If the user specifies a non-mTLS endpoint override but client certificate is
// available, we will pass along the cert anyway and let the server decide what to do.
// 2. If the user specifies an mTLS endpoint override but client certificate is not
// available, we will not fail-fast, but let backend throw error when connecting.
//
// We would like to avoid introducing client-side logic that parses whether the
// endpoint override is an mTLS url, since the url pattern may change at anytime.
func getClientCertificateSource(settings *internal.DialSettings) (cert.Source, error) {
return settings.ClientCertSource, nil
// TODO(andyzhao): Currently, many services including compute, storage, and bigquery
// do not have working mTLS endpoints, so we will disable the ADC for DCA logic
// until we can confirm that all services have working mTLS endpoints.
/*
if settings.HTTPClient != nil {
return nil, nil // HTTPClient is incompatible with ClientCertificateSource
} else if settings.ClientCertSource != nil {
return settings.ClientCertSource, nil
} else {
return cert.DefaultSoure()
}
*/
}
// getEndpoint returns the endpoint for the service, taking into account the
// user-provided endpoint override "settings.Endpoint"
//
// If no endpoint override is specified, we will return the default endpoint (or
// the default mTLS endpoint if a client certificate is available).
//
// If the endpoint override is an address (host:port) rather than full base
// URL (ex. https://...), then the user-provided address will be merged into
// the default endpoint. For example, WithEndpoint("myhost:8000") and
// WithDefaultEndpoint("https://foo.com/bar/baz") will return "https://myhost:8080/bar/baz"
func getEndpoint(settings *internal.DialSettings, clientCertSource cert.Source) (string, error) {
if settings.Endpoint == "" {
if clientCertSource != nil {
return generateDefaultMtlsEndpoint(settings.DefaultEndpoint), nil
}
return settings.DefaultEndpoint, nil
}
if strings.Contains(settings.Endpoint, "://") {
// User passed in a full URL path, use it verbatim.
return settings.Endpoint, nil
}
if settings.DefaultEndpoint == "" {
return "", errors.New("WithEndpoint requires a full URL path")
}
// Assume user-provided endpoint is host[:port], merge it with the default endpoint.
return mergeEndpoints(settings.DefaultEndpoint, settings.Endpoint)
}
func mergeEndpoints(base, newHost string) (string, error) {
u, err := url.Parse(base)
if err != nil {
return "", err
}
u.Host = newHost
return u.String(), nil
}
// generateDefaultMtlsEndpoint attempts to derive the mTLS version of the
// defaultEndpoint via regex, and returns defaultEndpoint if unsuccessful.
//
// We need to applying the following 2 transformations:
// 1. pubsub.googleapis.com to pubsub.mtls.googleapis.com
// 2. pubsub.sandbox.googleapis.com to pubsub.mtls.sandbox.googleapis.com
//
// TODO(andyzhao): In the future, the mTLS endpoint will be read from the Discovery Document
// and passed in as defaultMtlsEndpoint instead of generated from defaultEndpoint,
// and this function will be removed.
func generateDefaultMtlsEndpoint(defaultEndpoint string) string {
var domains = []string{
".sandbox.googleapis.com", // must come first because .googleapis.com is a substring
".googleapis.com",
}
for _, domain := range domains {
if strings.Contains(defaultEndpoint, domain) {
return strings.Replace(defaultEndpoint, domain, ".mtls"+domain, -1)
}
}
return defaultEndpoint
}

4
vendor/modules.txt vendored
View File

@ -584,7 +584,7 @@ golang.org/x/tools/internal/semver
golang.org/x/tools/internal/span golang.org/x/tools/internal/span
# gomodules.xyz/jsonpatch/v2 v2.0.1 # gomodules.xyz/jsonpatch/v2 v2.0.1
gomodules.xyz/jsonpatch/v2 gomodules.xyz/jsonpatch/v2
# google.golang.org/api v0.17.0 # google.golang.org/api v0.22.0
google.golang.org/api/compute/v0.alpha google.golang.org/api/compute/v0.alpha
google.golang.org/api/compute/v0.beta google.golang.org/api/compute/v0.beta
google.golang.org/api/compute/v1 google.golang.org/api/compute/v1
@ -598,8 +598,10 @@ google.golang.org/api/internal/gensupport
google.golang.org/api/internal/third_party/uritemplates google.golang.org/api/internal/third_party/uritemplates
google.golang.org/api/oauth2/v2 google.golang.org/api/oauth2/v2
google.golang.org/api/option google.golang.org/api/option
google.golang.org/api/option/internaloption
google.golang.org/api/storage/v1 google.golang.org/api/storage/v1
google.golang.org/api/tpu/v1 google.golang.org/api/tpu/v1
google.golang.org/api/transport/cert
google.golang.org/api/transport/http google.golang.org/api/transport/http
google.golang.org/api/transport/http/internal/propagation google.golang.org/api/transport/http/internal/propagation
# google.golang.org/appengine v1.6.2 # google.golang.org/appengine v1.6.2