diff --git a/go.mod b/go.mod index 78a008912..3cefeca95 100644 --- a/go.mod +++ b/go.mod @@ -40,7 +40,7 @@ require ( github.com/sergi/go-diff v1.1.0 // indirect github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a // indirect github.com/softlayer/softlayer-go v0.0.0-20170804160555-5e1c8cccc730 - github.com/stretchr/testify v1.6.0 + github.com/stretchr/testify v1.6.1 github.com/tdewolff/minify v2.3.6+incompatible github.com/tdewolff/parse v2.3.4+incompatible // indirect github.com/tdewolff/test v1.0.6 // indirect @@ -49,14 +49,14 @@ require ( github.com/vultr/govultr v0.2.0 golang.org/x/crypto v0.0.0-20200320181102-891825fb96df // indirect golang.org/x/mod v0.3.0 // indirect - golang.org/x/net v0.0.0-20200528225125-3c3fba18258b + golang.org/x/net v0.0.0-20200602114024-627f9648deb9 golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d - golang.org/x/tools v0.0.0-20200522201501-cb1345f3a375 // indirect - google.golang.org/api v0.25.0 + golang.org/x/tools v0.0.0-20200609164405-eb789aa7ce50 // indirect + google.golang.org/api v0.26.0 google.golang.org/appengine v1.6.6 // indirect gopkg.in/ini.v1 v1.42.0 // indirect gopkg.in/ns1/ns1-go.v2 v2.0.0-20170502175150-c563826f4cbe gopkg.in/sourcemap.v1 v1.0.5 // indirect gopkg.in/yaml.v2 v2.3.0 - gopkg.in/yaml.v3 v3.0.0-20200506231410-2ff61e1afc86 // indirect + gopkg.in/yaml.v3 v3.0.0-20200605160147-a5ece683394c // indirect ) diff --git a/go.sum b/go.sum index 9aef648be..634980c2f 100644 --- a/go.sum +++ b/go.sum @@ -288,8 +288,8 @@ github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJy github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/stretchr/testify v1.6.0 h1:jlIyCplCJFULU/01vCkhKuTyc3OorI3bJFuw6obfgho= -github.com/stretchr/testify v1.6.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/tdewolff/minify v2.3.6+incompatible h1:2hw5/9ZvxhWLvBUnHE06gElGYz+Jv9R4Eys0XUzItYo= github.com/tdewolff/minify v2.3.6+incompatible/go.mod h1:9Ov578KJUmAWpS6NeZwRZyT56Uf6o3Mcz9CEsg8USYs= github.com/tdewolff/parse v2.3.4+incompatible h1:x05/cnGwIMf4ceLuDMBOdQ1qGniMoxpP46ghf0Qzh38= @@ -374,8 +374,8 @@ golang.org/x/net v0.0.0-20200226121028-0de0cce0169b h1:0mm1VjtFUOIlE1SbDlwjYaDxZ golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e h1:3G+cUijn7XD+S4eJFddp53Pv7+slrESplyjG25HgL+k= golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200528225125-3c3fba18258b h1:IYiJPiJfzktmDAO1HQiwjMjwjlYKHAL7KzeD544RJPs= -golang.org/x/net v0.0.0-20200528225125-3c3fba18258b/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200602114024-627f9648deb9 h1:pNX+40auqi2JqRfOP1akLGtYcn15TUbkhwuCO3foqqM= +golang.org/x/net v0.0.0-20200602114024-627f9648deb9/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 h1:SVwTIAaPC2U/AvvLNZ2a7OVsmBpC8L5BlwK1whH3hm0= @@ -462,8 +462,8 @@ golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapK golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200522201501-cb1345f3a375 h1:SjQ2+AKWgZLc1xej6WSzL+Dfs5Uyd5xcZH1mGC411IA= -golang.org/x/tools v0.0.0-20200522201501-cb1345f3a375/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200609164405-eb789aa7ce50 h1:59syOWj4+Fl+op4LL8fX1kO7HmbdEWfxlw4tcGvH+y0= +golang.org/x/tools v0.0.0-20200609164405-eb789aa7ce50/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898 h1:/atklqdjdhuosWIl6AIbOeHJjicWYPqR9bpxqxYG2pA= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -480,8 +480,8 @@ google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsb google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.25.0 h1:LodzhlzZEUfhXzNUMIfVlf9Gr6Ua5MMtoFWh7+f47qA= -google.golang.org/api v0.25.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.26.0 h1:VJZ8h6E8ip82FRpQl848c5vAadxlTXrUh8RzQzSRm08= +google.golang.org/api v0.26.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= 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.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -557,8 +557,8 @@ gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20200506231410-2ff61e1afc86 h1:OfFoIUYv/me30yv7XlMy4F9RJw8DEm8WQ6QG1Ph4bH0= -gopkg.in/yaml.v3 v3.0.0-20200506231410-2ff61e1afc86/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20200605160147-a5ece683394c h1:grhR+C34yXImVGp7EzNk+DTIk+323eIUWOmEevy6bDo= +gopkg.in/yaml.v3 v3.0.0-20200605160147-a5ece683394c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/providers/capabilities.go b/providers/capabilities.go index 86cf7cf36..f831a72f8 100644 --- a/providers/capabilities.go +++ b/providers/capabilities.go @@ -18,7 +18,7 @@ const ( // CanUseCAA indicates the provider can handle CAA records CanUseCAA - // CanUseDs indicates that the provider can handle DS record types + // CanUseDS indicates that the provider can handle DS record types CanUseDS // CanUsePTR indicates the provider can handle PTR records diff --git a/providers/gcloud/gcloudProvider.go b/providers/gcloud/gcloudProvider.go index a70c87f57..5a12a0ebe 100644 --- a/providers/gcloud/gcloudProvider.go +++ b/providers/gcloud/gcloudProvider.go @@ -16,6 +16,7 @@ import ( var features = providers.DocumentationNotes{ providers.CanGetZones: providers.Can(), + providers.CanUseDS: providers.Can(), providers.CanUseCAA: providers.Can(), providers.CanUsePTR: providers.Can(), providers.CanUseSRV: providers.Can(), diff --git a/vendor/github.com/stretchr/testify/assert/assertion_format.go b/vendor/github.com/stretchr/testify/assert/assertion_format.go index b4c46042b..49370eb16 100644 --- a/vendor/github.com/stretchr/testify/assert/assertion_format.go +++ b/vendor/github.com/stretchr/testify/assert/assertion_format.go @@ -6,7 +6,6 @@ package assert import ( - io "io" http "net/http" url "net/url" time "time" @@ -202,11 +201,11 @@ func GreaterOrEqualf(t TestingT, e1 interface{}, e2 interface{}, msg string, arg // assert.HTTPBodyContainsf(t, myHandler, "GET", "www.google.com", nil, "I'm Feeling Lucky", "error message %s", "formatted") // // Returns whether the assertion was successful (true) or not (false). -func HTTPBodyContainsf(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, body io.Reader, str interface{}, msg string, args ...interface{}) bool { +func HTTPBodyContainsf(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } - return HTTPBodyContains(t, handler, method, url, values, body, str, append([]interface{}{msg}, args...)...) + return HTTPBodyContains(t, handler, method, url, values, str, append([]interface{}{msg}, args...)...) } // HTTPBodyNotContainsf asserts that a specified handler returns a @@ -215,11 +214,11 @@ func HTTPBodyContainsf(t TestingT, handler http.HandlerFunc, method string, url // assert.HTTPBodyNotContainsf(t, myHandler, "GET", "www.google.com", nil, "I'm Feeling Lucky", "error message %s", "formatted") // // Returns whether the assertion was successful (true) or not (false). -func HTTPBodyNotContainsf(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, body io.Reader, str interface{}, msg string, args ...interface{}) bool { +func HTTPBodyNotContainsf(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } - return HTTPBodyNotContains(t, handler, method, url, values, body, str, append([]interface{}{msg}, args...)...) + return HTTPBodyNotContains(t, handler, method, url, values, str, append([]interface{}{msg}, args...)...) } // HTTPErrorf asserts that a specified handler returns an error status code. diff --git a/vendor/github.com/stretchr/testify/assert/assertion_forward.go b/vendor/github.com/stretchr/testify/assert/assertion_forward.go index 9bea8d189..9db889427 100644 --- a/vendor/github.com/stretchr/testify/assert/assertion_forward.go +++ b/vendor/github.com/stretchr/testify/assert/assertion_forward.go @@ -6,7 +6,6 @@ package assert import ( - io "io" http "net/http" url "net/url" time "time" @@ -386,11 +385,11 @@ func (a *Assertions) Greaterf(e1 interface{}, e2 interface{}, msg string, args . // a.HTTPBodyContains(myHandler, "GET", "www.google.com", nil, "I'm Feeling Lucky") // // Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) HTTPBodyContains(handler http.HandlerFunc, method string, url string, values url.Values, body io.Reader, str interface{}, msgAndArgs ...interface{}) bool { +func (a *Assertions) HTTPBodyContains(handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } - return HTTPBodyContains(a.t, handler, method, url, values, body, str, msgAndArgs...) + return HTTPBodyContains(a.t, handler, method, url, values, str, msgAndArgs...) } // HTTPBodyContainsf asserts that a specified handler returns a @@ -399,11 +398,11 @@ func (a *Assertions) HTTPBodyContains(handler http.HandlerFunc, method string, u // a.HTTPBodyContainsf(myHandler, "GET", "www.google.com", nil, "I'm Feeling Lucky", "error message %s", "formatted") // // Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) HTTPBodyContainsf(handler http.HandlerFunc, method string, url string, values url.Values, body io.Reader, str interface{}, msg string, args ...interface{}) bool { +func (a *Assertions) HTTPBodyContainsf(handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } - return HTTPBodyContainsf(a.t, handler, method, url, values, body, str, msg, args...) + return HTTPBodyContainsf(a.t, handler, method, url, values, str, msg, args...) } // HTTPBodyNotContains asserts that a specified handler returns a @@ -412,11 +411,11 @@ func (a *Assertions) HTTPBodyContainsf(handler http.HandlerFunc, method string, // a.HTTPBodyNotContains(myHandler, "GET", "www.google.com", nil, "I'm Feeling Lucky") // // Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) HTTPBodyNotContains(handler http.HandlerFunc, method string, url string, values url.Values, body io.Reader, str interface{}, msgAndArgs ...interface{}) bool { +func (a *Assertions) HTTPBodyNotContains(handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } - return HTTPBodyNotContains(a.t, handler, method, url, values, body, str, msgAndArgs...) + return HTTPBodyNotContains(a.t, handler, method, url, values, str, msgAndArgs...) } // HTTPBodyNotContainsf asserts that a specified handler returns a @@ -425,11 +424,11 @@ func (a *Assertions) HTTPBodyNotContains(handler http.HandlerFunc, method string // a.HTTPBodyNotContainsf(myHandler, "GET", "www.google.com", nil, "I'm Feeling Lucky", "error message %s", "formatted") // // Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) HTTPBodyNotContainsf(handler http.HandlerFunc, method string, url string, values url.Values, body io.Reader, str interface{}, msg string, args ...interface{}) bool { +func (a *Assertions) HTTPBodyNotContainsf(handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } - return HTTPBodyNotContainsf(a.t, handler, method, url, values, body, str, msg, args...) + return HTTPBodyNotContainsf(a.t, handler, method, url, values, str, msg, args...) } // HTTPError asserts that a specified handler returns an error status code. diff --git a/vendor/github.com/stretchr/testify/assert/http_assertions.go b/vendor/github.com/stretchr/testify/assert/http_assertions.go index 30ef7cc06..4ed341dd2 100644 --- a/vendor/github.com/stretchr/testify/assert/http_assertions.go +++ b/vendor/github.com/stretchr/testify/assert/http_assertions.go @@ -2,7 +2,6 @@ package assert import ( "fmt" - "io" "net/http" "net/http/httptest" "net/url" @@ -112,13 +111,9 @@ func HTTPStatusCode(t TestingT, handler http.HandlerFunc, method, url string, va // HTTPBody is a helper that returns HTTP body of the response. It returns // empty string if building a new request fails. -func HTTPBody(handler http.HandlerFunc, method, url string, values url.Values, body io.Reader) string { +func HTTPBody(handler http.HandlerFunc, method, url string, values url.Values) string { w := httptest.NewRecorder() - - if values != nil { - url = url + "?" + values.Encode() - } - req, err := http.NewRequest(method, url, body) + req, err := http.NewRequest(method, url+"?"+values.Encode(), nil) if err != nil { return "" } @@ -132,13 +127,13 @@ func HTTPBody(handler http.HandlerFunc, method, url string, values url.Values, b // assert.HTTPBodyContains(t, myHandler, "GET", "www.google.com", nil, "I'm Feeling Lucky") // // Returns whether the assertion was successful (true) or not (false). -func HTTPBodyContains(t TestingT, handler http.HandlerFunc, method, url string, values url.Values, body io.Reader, str interface{}, msgAndArgs ...interface{}) bool { +func HTTPBodyContains(t TestingT, handler http.HandlerFunc, method, url string, values url.Values, str interface{}, msgAndArgs ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } - httpBody := HTTPBody(handler, method, url, values, body) + body := HTTPBody(handler, method, url, values) - contains := strings.Contains(httpBody, fmt.Sprint(str)) + contains := strings.Contains(body, fmt.Sprint(str)) if !contains { Fail(t, fmt.Sprintf("Expected response body for \"%s\" to contain \"%s\" but found \"%s\"", url+"?"+values.Encode(), str, body)) } @@ -152,13 +147,13 @@ func HTTPBodyContains(t TestingT, handler http.HandlerFunc, method, url string, // assert.HTTPBodyNotContains(t, myHandler, "GET", "www.google.com", nil, "I'm Feeling Lucky") // // Returns whether the assertion was successful (true) or not (false). -func HTTPBodyNotContains(t TestingT, handler http.HandlerFunc, method, url string, values url.Values, body io.Reader, str interface{}, msgAndArgs ...interface{}) bool { +func HTTPBodyNotContains(t TestingT, handler http.HandlerFunc, method, url string, values url.Values, str interface{}, msgAndArgs ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } - httpBody := HTTPBody(handler, method, url, values, body) + body := HTTPBody(handler, method, url, values) - contains := strings.Contains(httpBody, fmt.Sprint(str)) + contains := strings.Contains(body, fmt.Sprint(str)) if contains { Fail(t, fmt.Sprintf("Expected response body for \"%s\" to NOT contain \"%s\" but found \"%s\"", url+"?"+values.Encode(), str, body)) } diff --git a/vendor/golang.org/x/tools/internal/gocommand/vendor.go b/vendor/golang.org/x/tools/internal/gocommand/vendor.go new file mode 100644 index 000000000..1cd8d8473 --- /dev/null +++ b/vendor/golang.org/x/tools/internal/gocommand/vendor.go @@ -0,0 +1,102 @@ +// Copyright 2020 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package gocommand + +import ( + "bytes" + "context" + "fmt" + "os" + "path/filepath" + "regexp" + "strings" + + "golang.org/x/mod/semver" +) + +// ModuleJSON holds information about a module. +type ModuleJSON struct { + Path string // module path + Replace *ModuleJSON // replaced by this module + Main bool // is this the main module? + Indirect bool // is this module only an indirect dependency of main module? + Dir string // directory holding files for this module, if any + GoMod string // path to go.mod file for this module, if any + GoVersion string // go version used in module +} + +var modFlagRegexp = regexp.MustCompile(`-mod[ =](\w+)`) + +// VendorEnabled reports whether vendoring is enabled. It takes a *Runner to execute Go commands +// with the supplied context.Context and Invocation. The Invocation can contain pre-defined fields, +// of which only Verb and Args are modified to run the appropriate Go command. +// Inspired by setDefaultBuildMod in modload/init.go +func VendorEnabled(ctx context.Context, inv Invocation, r *Runner) (*ModuleJSON, bool, error) { + mainMod, go114, err := getMainModuleAnd114(ctx, inv, r) + if err != nil { + return nil, false, err + } + + // We check the GOFLAGS to see if there is anything overridden or not. + inv.Verb = "env" + inv.Args = []string{"GOFLAGS"} + stdout, err := r.Run(ctx, inv) + if err != nil { + return nil, false, err + } + goflags := string(bytes.TrimSpace(stdout.Bytes())) + matches := modFlagRegexp.FindStringSubmatch(goflags) + var modFlag string + if len(matches) != 0 { + modFlag = matches[1] + } + if modFlag != "" { + // Don't override an explicit '-mod=' argument. + return mainMod, modFlag == "vendor", nil + } + if mainMod == nil || !go114 { + return mainMod, false, nil + } + // Check 1.14's automatic vendor mode. + if fi, err := os.Stat(filepath.Join(mainMod.Dir, "vendor")); err == nil && fi.IsDir() { + if mainMod.GoVersion != "" && semver.Compare("v"+mainMod.GoVersion, "v1.14") >= 0 { + // The Go version is at least 1.14, and a vendor directory exists. + // Set -mod=vendor by default. + return mainMod, true, nil + } + } + return mainMod, false, nil +} + +// getMainModuleAnd114 gets the main module's information and whether the +// go command in use is 1.14+. This is the information needed to figure out +// if vendoring should be enabled. +func getMainModuleAnd114(ctx context.Context, inv Invocation, r *Runner) (*ModuleJSON, bool, error) { + const format = `{{.Path}} +{{.Dir}} +{{.GoMod}} +{{.GoVersion}} +{{range context.ReleaseTags}}{{if eq . "go1.14"}}{{.}}{{end}}{{end}} +` + inv.Verb = "list" + inv.Args = []string{"-m", "-f", format} + stdout, err := r.Run(ctx, inv) + if err != nil { + return nil, false, err + } + + lines := strings.Split(stdout.String(), "\n") + if len(lines) < 5 { + return nil, false, fmt.Errorf("unexpected stdout: %q", stdout.String()) + } + mod := &ModuleJSON{ + Path: lines[0], + Dir: lines[1], + GoMod: lines[2], + GoVersion: lines[3], + Main: true, + } + return mod, lines[4] == "go1.14", nil +} diff --git a/vendor/golang.org/x/tools/internal/imports/mod.go b/vendor/golang.org/x/tools/internal/imports/mod.go index 69e3eecc4..4e816e8bc 100644 --- a/vendor/golang.org/x/tools/internal/imports/mod.go +++ b/vendor/golang.org/x/tools/internal/imports/mod.go @@ -15,7 +15,7 @@ import ( "strings" "golang.org/x/mod/module" - "golang.org/x/mod/semver" + "golang.org/x/tools/internal/gocommand" "golang.org/x/tools/internal/gopathwalk" ) @@ -24,31 +24,21 @@ import ( type ModuleResolver struct { env *ProcessEnv moduleCacheDir string - dummyVendorMod *ModuleJSON // If vendoring is enabled, the pseudo-module that represents the /vendor directory. + dummyVendorMod *gocommand.ModuleJSON // If vendoring is enabled, the pseudo-module that represents the /vendor directory. roots []gopathwalk.Root scanSema chan struct{} // scanSema prevents concurrent scans and guards scannedRoots. scannedRoots map[gopathwalk.Root]bool initialized bool - main *ModuleJSON - modsByModPath []*ModuleJSON // All modules, ordered by # of path components in module Path... - modsByDir []*ModuleJSON // ...or Dir. + main *gocommand.ModuleJSON + modsByModPath []*gocommand.ModuleJSON // All modules, ordered by # of path components in module Path... + modsByDir []*gocommand.ModuleJSON // ...or Dir. // moduleCacheCache stores information about the module cache. moduleCacheCache *dirInfoCache otherCache *dirInfoCache } -type ModuleJSON struct { - Path string // module path - Replace *ModuleJSON // replaced by this module - Main bool // is this the main module? - Indirect bool // is this module only an indirect dependency of main module? - Dir string // directory holding files for this module, if any - GoMod string // path to go.mod file for this module, if any - GoVersion string // go version used in module -} - func newModuleResolver(e *ProcessEnv) *ModuleResolver { r := &ModuleResolver{ env: e, @@ -62,7 +52,14 @@ func (r *ModuleResolver) init() error { if r.initialized { return nil } - mainMod, vendorEnabled, err := vendorEnabled(r.env) + + inv := gocommand.Invocation{ + BuildFlags: r.env.BuildFlags, + Env: r.env.env(), + Logf: r.env.Logf, + WorkingDir: r.env.WorkingDir, + } + mainMod, vendorEnabled, err := gocommand.VendorEnabled(context.TODO(), inv, r.env.GocmdRunner) if err != nil { return err } @@ -71,12 +68,12 @@ func (r *ModuleResolver) init() error { // Vendor mode is on, so all the non-Main modules are irrelevant, // and we need to search /vendor for everything. r.main = mainMod - r.dummyVendorMod = &ModuleJSON{ + r.dummyVendorMod = &gocommand.ModuleJSON{ Path: "", Dir: filepath.Join(mainMod.Dir, "vendor"), } - r.modsByModPath = []*ModuleJSON{mainMod, r.dummyVendorMod} - r.modsByDir = []*ModuleJSON{mainMod, r.dummyVendorMod} + r.modsByModPath = []*gocommand.ModuleJSON{mainMod, r.dummyVendorMod} + r.modsByDir = []*gocommand.ModuleJSON{mainMod, r.dummyVendorMod} } else { // Vendor mode is off, so run go list -m ... to find everything. r.initAllMods() @@ -106,7 +103,7 @@ func (r *ModuleResolver) init() error { if vendorEnabled { r.roots = append(r.roots, gopathwalk.Root{r.dummyVendorMod.Dir, gopathwalk.RootOther}) } else { - addDep := func(mod *ModuleJSON) { + addDep := func(mod *gocommand.ModuleJSON) { if mod.Replace == nil { // This is redundant with the cache, but we'll skip it cheaply enough. r.roots = append(r.roots, gopathwalk.Root{mod.Dir, gopathwalk.RootModuleCache}) @@ -151,7 +148,7 @@ func (r *ModuleResolver) initAllMods() error { return err } for dec := json.NewDecoder(stdout); dec.More(); { - mod := &ModuleJSON{} + mod := &gocommand.ModuleJSON{} if err := dec.Decode(mod); err != nil { return err } @@ -197,7 +194,7 @@ func (r *ModuleResolver) ClearForNewMod() { // findPackage returns the module and directory that contains the package at // the given import path, or returns nil, "" if no module is in scope. -func (r *ModuleResolver) findPackage(importPath string) (*ModuleJSON, string) { +func (r *ModuleResolver) findPackage(importPath string) (*gocommand.ModuleJSON, string) { // This can't find packages in the stdlib, but that's harmless for all // the existing code paths. for _, m := range r.modsByModPath { @@ -283,7 +280,7 @@ func (r *ModuleResolver) cacheExports(ctx context.Context, env *ProcessEnv, info // findModuleByDir returns the module that contains dir, or nil if no such // module is in scope. -func (r *ModuleResolver) findModuleByDir(dir string) *ModuleJSON { +func (r *ModuleResolver) findModuleByDir(dir string) *gocommand.ModuleJSON { // This is quite tricky and may not be correct. dir could be: // - a package in the main module. // - a replace target underneath the main module's directory. @@ -310,7 +307,7 @@ func (r *ModuleResolver) findModuleByDir(dir string) *ModuleJSON { // dirIsNestedModule reports if dir is contained in a nested module underneath // mod, not actually in mod. -func (r *ModuleResolver) dirIsNestedModule(dir string, mod *ModuleJSON) bool { +func (r *ModuleResolver) dirIsNestedModule(dir string, mod *gocommand.ModuleJSON) bool { if !strings.HasPrefix(dir, mod.Dir) { return false } @@ -490,7 +487,7 @@ func (r *ModuleResolver) scoreImportPath(ctx context.Context, path string) int { return modRelevance(mod) } -func modRelevance(mod *ModuleJSON) int { +func modRelevance(mod *gocommand.ModuleJSON) int { switch { case mod == nil: // out of scope return MaxRelevance - 4 @@ -656,63 +653,3 @@ func modulePath(mod []byte) string { } return "" // missing module path } - -var modFlagRegexp = regexp.MustCompile(`-mod[ =](\w+)`) - -// vendorEnabled indicates if vendoring is enabled. -// Inspired by setDefaultBuildMod in modload/init.go -func vendorEnabled(env *ProcessEnv) (*ModuleJSON, bool, error) { - mainMod, go114, err := getMainModuleAnd114(env) - if err != nil { - return nil, false, err - } - matches := modFlagRegexp.FindStringSubmatch(env.GOFLAGS) - var modFlag string - if len(matches) != 0 { - modFlag = matches[1] - } - if modFlag != "" { - // Don't override an explicit '-mod=' argument. - return mainMod, modFlag == "vendor", nil - } - if mainMod == nil || !go114 { - return mainMod, false, nil - } - // Check 1.14's automatic vendor mode. - if fi, err := os.Stat(filepath.Join(mainMod.Dir, "vendor")); err == nil && fi.IsDir() { - if mainMod.GoVersion != "" && semver.Compare("v"+mainMod.GoVersion, "v1.14") >= 0 { - // The Go version is at least 1.14, and a vendor directory exists. - // Set -mod=vendor by default. - return mainMod, true, nil - } - } - return mainMod, false, nil -} - -// getMainModuleAnd114 gets the main module's information and whether the -// go command in use is 1.14+. This is the information needed to figure out -// if vendoring should be enabled. -func getMainModuleAnd114(env *ProcessEnv) (*ModuleJSON, bool, error) { - const format = `{{.Path}} -{{.Dir}} -{{.GoMod}} -{{.GoVersion}} -{{range context.ReleaseTags}}{{if eq . "go1.14"}}{{.}}{{end}}{{end}} -` - stdout, err := env.invokeGo(context.TODO(), "list", "-m", "-f", format) - if err != nil { - return nil, false, nil - } - lines := strings.Split(stdout.String(), "\n") - if len(lines) < 5 { - return nil, false, fmt.Errorf("unexpected stdout: %q", stdout) - } - mod := &ModuleJSON{ - Path: lines[0], - Dir: lines[1], - GoMod: lines[2], - GoVersion: lines[3], - Main: true, - } - return mod, lines[4] == "go1.14", nil -} diff --git a/vendor/google.golang.org/api/dns/v1/dns-api.json b/vendor/google.golang.org/api/dns/v1/dns-api.json index 6beb70dd2..e795cd75a 100644 --- a/vendor/google.golang.org/api/dns/v1/dns-api.json +++ b/vendor/google.golang.org/api/dns/v1/dns-api.json @@ -23,7 +23,7 @@ "description": "Configures and serves authoritative DNS records.", "discoveryVersion": "v1", "documentationLink": "https://developers.google.com/cloud-dns", - "etag": "\"LYADMvHWYH2ul9D6m9UT9gT77YM/C0vgwgSkNuwxiJI-C0iMb3JKMEQ\"", + "etag": "\"u9GIe6H63LSGq-9_t39K2Zx_EAc/ArOFmsgnjC3TFDSpz-XNYBMw5mo\"", "icons": { "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" @@ -83,7 +83,7 @@ "changes": { "methods": { "create": { - "description": "Atomically update the ResourceRecordSet collection.", + "description": "", "httpMethod": "POST", "id": "dns.changes.create", "parameterOrder": [ @@ -92,18 +92,15 @@ ], "parameters": { "clientOperationId": { - "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", "location": "query", "type": "string" }, "managedZone": { - "description": "Identifies the managed zone addressed by this request. Can be the managed zone name or id.", "location": "path", "required": true, "type": "string" }, "project": { - "description": "Identifies the project addressed by this request.", "location": "path", "required": true, "type": "string" @@ -122,7 +119,7 @@ ] }, "get": { - "description": "Fetch the representation of an existing Change.", + "description": "", "httpMethod": "GET", "id": "dns.changes.get", "parameterOrder": [ @@ -132,24 +129,20 @@ ], "parameters": { "changeId": { - "description": "The identifier of the requested change, from a previous ResourceRecordSetsChangeResponse.", "location": "path", "required": true, "type": "string" }, "clientOperationId": { - "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", "location": "query", "type": "string" }, "managedZone": { - "description": "Identifies the managed zone addressed by this request. Can be the managed zone name or id.", "location": "path", "required": true, "type": "string" }, "project": { - "description": "Identifies the project addressed by this request.", "location": "path", "required": true, "type": "string" @@ -167,7 +160,7 @@ ] }, "list": { - "description": "Enumerate Changes to a ResourceRecordSet collection.", + "description": "", "httpMethod": "GET", "id": "dns.changes.list", "parameterOrder": [ @@ -176,31 +169,26 @@ ], "parameters": { "managedZone": { - "description": "Identifies the managed zone addressed by this request. Can be the managed zone name or id.", "location": "path", "required": true, "type": "string" }, "maxResults": { - "description": "Optional. Maximum number of results to be returned. If unspecified, the server will decide how many results to return.", "format": "int32", "location": "query", "type": "integer" }, "pageToken": { - "description": "Optional. A tag returned by a previous list request that was truncated. Use this parameter to continue a previous list request.", "location": "query", "type": "string" }, "project": { - "description": "Identifies the project addressed by this request.", "location": "path", "required": true, "type": "string" }, "sortBy": { "default": "changeSequence", - "description": "Sorting criterion. The only supported value is change sequence.", "enum": [ "changeSequence" ], @@ -211,7 +199,6 @@ "type": "string" }, "sortOrder": { - "description": "Sorting order direction: 'ascending' or 'descending'.", "location": "query", "type": "string" } @@ -232,7 +219,7 @@ "dnsKeys": { "methods": { "get": { - "description": "Fetch the representation of an existing DnsKey.", + "description": "", "httpMethod": "GET", "id": "dns.dnsKeys.get", "parameterOrder": [ @@ -242,29 +229,24 @@ ], "parameters": { "clientOperationId": { - "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", "location": "query", "type": "string" }, "digestType": { - "description": "An optional comma-separated list of digest types to compute and display for key signing keys. If omitted, the recommended digest type will be computed and displayed.", "location": "query", "type": "string" }, "dnsKeyId": { - "description": "The identifier of the requested DnsKey.", "location": "path", "required": true, "type": "string" }, "managedZone": { - "description": "Identifies the managed zone addressed by this request. Can be the managed zone name or id.", "location": "path", "required": true, "type": "string" }, "project": { - "description": "Identifies the project addressed by this request.", "location": "path", "required": true, "type": "string" @@ -282,7 +264,7 @@ ] }, "list": { - "description": "Enumerate DnsKeys to a ResourceRecordSet collection.", + "description": "", "httpMethod": "GET", "id": "dns.dnsKeys.list", "parameterOrder": [ @@ -291,29 +273,24 @@ ], "parameters": { "digestType": { - "description": "An optional comma-separated list of digest types to compute and display for key signing keys. If omitted, the recommended digest type will be computed and displayed.", "location": "query", "type": "string" }, "managedZone": { - "description": "Identifies the managed zone addressed by this request. Can be the managed zone name or id.", "location": "path", "required": true, "type": "string" }, "maxResults": { - "description": "Optional. Maximum number of results to be returned. If unspecified, the server will decide how many results to return.", "format": "int32", "location": "query", "type": "integer" }, "pageToken": { - "description": "Optional. A tag returned by a previous list request that was truncated. Use this parameter to continue a previous list request.", "location": "query", "type": "string" }, "project": { - "description": "Identifies the project addressed by this request.", "location": "path", "required": true, "type": "string" @@ -335,7 +312,7 @@ "managedZoneOperations": { "methods": { "get": { - "description": "Fetch the representation of an existing Operation.", + "description": "", "httpMethod": "GET", "id": "dns.managedZoneOperations.get", "parameterOrder": [ @@ -345,24 +322,20 @@ ], "parameters": { "clientOperationId": { - "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", "location": "query", "type": "string" }, "managedZone": { - "description": "Identifies the managed zone addressed by this request.", "location": "path", "required": true, "type": "string" }, "operation": { - "description": "Identifies the operation addressed by this request.", "location": "path", "required": true, "type": "string" }, "project": { - "description": "Identifies the project addressed by this request.", "location": "path", "required": true, "type": "string" @@ -380,7 +353,7 @@ ] }, "list": { - "description": "Enumerate Operations for the given ManagedZone.", + "description": "", "httpMethod": "GET", "id": "dns.managedZoneOperations.list", "parameterOrder": [ @@ -389,31 +362,26 @@ ], "parameters": { "managedZone": { - "description": "Identifies the managed zone addressed by this request.", "location": "path", "required": true, "type": "string" }, "maxResults": { - "description": "Optional. Maximum number of results to be returned. If unspecified, the server will decide how many results to return.", "format": "int32", "location": "query", "type": "integer" }, "pageToken": { - "description": "Optional. A tag returned by a previous list request that was truncated. Use this parameter to continue a previous list request.", "location": "query", "type": "string" }, "project": { - "description": "Identifies the project addressed by this request.", "location": "path", "required": true, "type": "string" }, "sortBy": { "default": "startTime", - "description": "Sorting criterion. The only supported values are START_TIME and ID.", "enum": [ "id", "startTime" @@ -442,7 +410,7 @@ "managedZones": { "methods": { "create": { - "description": "Create a new ManagedZone.", + "description": "", "httpMethod": "POST", "id": "dns.managedZones.create", "parameterOrder": [ @@ -450,12 +418,10 @@ ], "parameters": { "clientOperationId": { - "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", "location": "query", "type": "string" }, "project": { - "description": "Identifies the project addressed by this request.", "location": "path", "required": true, "type": "string" @@ -474,7 +440,7 @@ ] }, "delete": { - "description": "Delete a previously created ManagedZone.", + "description": "", "httpMethod": "DELETE", "id": "dns.managedZones.delete", "parameterOrder": [ @@ -483,18 +449,15 @@ ], "parameters": { "clientOperationId": { - "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", "location": "query", "type": "string" }, "managedZone": { - "description": "Identifies the managed zone addressed by this request. Can be the managed zone name or id.", "location": "path", "required": true, "type": "string" }, "project": { - "description": "Identifies the project addressed by this request.", "location": "path", "required": true, "type": "string" @@ -507,7 +470,7 @@ ] }, "get": { - "description": "Fetch the representation of an existing ManagedZone.", + "description": "", "httpMethod": "GET", "id": "dns.managedZones.get", "parameterOrder": [ @@ -516,18 +479,15 @@ ], "parameters": { "clientOperationId": { - "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", "location": "query", "type": "string" }, "managedZone": { - "description": "Identifies the managed zone addressed by this request. Can be the managed zone name or id.", "location": "path", "required": true, "type": "string" }, "project": { - "description": "Identifies the project addressed by this request.", "location": "path", "required": true, "type": "string" @@ -545,7 +505,7 @@ ] }, "list": { - "description": "Enumerate ManagedZones that have been created but not yet deleted.", + "description": "", "httpMethod": "GET", "id": "dns.managedZones.list", "parameterOrder": [ @@ -553,23 +513,19 @@ ], "parameters": { "dnsName": { - "description": "Restricts the list to return only zones with this domain name.", "location": "query", "type": "string" }, "maxResults": { - "description": "Optional. Maximum number of results to be returned. If unspecified, the server will decide how many results to return.", "format": "int32", "location": "query", "type": "integer" }, "pageToken": { - "description": "Optional. A tag returned by a previous list request that was truncated. Use this parameter to continue a previous list request.", "location": "query", "type": "string" }, "project": { - "description": "Identifies the project addressed by this request.", "location": "path", "required": true, "type": "string" @@ -587,7 +543,7 @@ ] }, "patch": { - "description": "Apply a partial update to an existing ManagedZone.", + "description": "", "httpMethod": "PATCH", "id": "dns.managedZones.patch", "parameterOrder": [ @@ -596,18 +552,15 @@ ], "parameters": { "clientOperationId": { - "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", "location": "query", "type": "string" }, "managedZone": { - "description": "Identifies the managed zone addressed by this request. Can be the managed zone name or id.", "location": "path", "required": true, "type": "string" }, "project": { - "description": "Identifies the project addressed by this request.", "location": "path", "required": true, "type": "string" @@ -626,7 +579,7 @@ ] }, "update": { - "description": "Update an existing ManagedZone.", + "description": "", "httpMethod": "PUT", "id": "dns.managedZones.update", "parameterOrder": [ @@ -635,18 +588,15 @@ ], "parameters": { "clientOperationId": { - "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", "location": "query", "type": "string" }, "managedZone": { - "description": "Identifies the managed zone addressed by this request. Can be the managed zone name or id.", "location": "path", "required": true, "type": "string" }, "project": { - "description": "Identifies the project addressed by this request.", "location": "path", "required": true, "type": "string" @@ -669,7 +619,7 @@ "policies": { "methods": { "create": { - "description": "Create a new Policy", + "description": "", "httpMethod": "POST", "id": "dns.policies.create", "parameterOrder": [ @@ -677,12 +627,10 @@ ], "parameters": { "clientOperationId": { - "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", "location": "query", "type": "string" }, "project": { - "description": "Identifies the project addressed by this request.", "location": "path", "required": true, "type": "string" @@ -701,7 +649,7 @@ ] }, "delete": { - "description": "Delete a previously created Policy. Will fail if the policy is still being referenced by a network.", + "description": "", "httpMethod": "DELETE", "id": "dns.policies.delete", "parameterOrder": [ @@ -710,18 +658,15 @@ ], "parameters": { "clientOperationId": { - "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", "location": "query", "type": "string" }, "policy": { - "description": "User given friendly name of the policy addressed by this request.", "location": "path", "required": true, "type": "string" }, "project": { - "description": "Identifies the project addressed by this request.", "location": "path", "required": true, "type": "string" @@ -734,7 +679,7 @@ ] }, "get": { - "description": "Fetch the representation of an existing Policy.", + "description": "", "httpMethod": "GET", "id": "dns.policies.get", "parameterOrder": [ @@ -743,18 +688,15 @@ ], "parameters": { "clientOperationId": { - "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", "location": "query", "type": "string" }, "policy": { - "description": "User given friendly name of the policy addressed by this request.", "location": "path", "required": true, "type": "string" }, "project": { - "description": "Identifies the project addressed by this request.", "location": "path", "required": true, "type": "string" @@ -772,7 +714,7 @@ ] }, "list": { - "description": "Enumerate all Policies associated with a project.", + "description": "", "httpMethod": "GET", "id": "dns.policies.list", "parameterOrder": [ @@ -780,18 +722,15 @@ ], "parameters": { "maxResults": { - "description": "Optional. Maximum number of results to be returned. If unspecified, the server will decide how many results to return.", "format": "int32", "location": "query", "type": "integer" }, "pageToken": { - "description": "Optional. A tag returned by a previous list request that was truncated. Use this parameter to continue a previous list request.", "location": "query", "type": "string" }, "project": { - "description": "Identifies the project addressed by this request.", "location": "path", "required": true, "type": "string" @@ -809,7 +748,7 @@ ] }, "patch": { - "description": "Apply a partial update to an existing Policy.", + "description": "", "httpMethod": "PATCH", "id": "dns.policies.patch", "parameterOrder": [ @@ -818,18 +757,15 @@ ], "parameters": { "clientOperationId": { - "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", "location": "query", "type": "string" }, "policy": { - "description": "User given friendly name of the policy addressed by this request.", "location": "path", "required": true, "type": "string" }, "project": { - "description": "Identifies the project addressed by this request.", "location": "path", "required": true, "type": "string" @@ -848,7 +784,7 @@ ] }, "update": { - "description": "Update an existing Policy.", + "description": "", "httpMethod": "PUT", "id": "dns.policies.update", "parameterOrder": [ @@ -857,18 +793,15 @@ ], "parameters": { "clientOperationId": { - "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", "location": "query", "type": "string" }, "policy": { - "description": "User given friendly name of the policy addressed by this request.", "location": "path", "required": true, "type": "string" }, "project": { - "description": "Identifies the project addressed by this request.", "location": "path", "required": true, "type": "string" @@ -891,7 +824,7 @@ "projects": { "methods": { "get": { - "description": "Fetch the representation of an existing Project.", + "description": "", "httpMethod": "GET", "id": "dns.projects.get", "parameterOrder": [ @@ -899,12 +832,10 @@ ], "parameters": { "clientOperationId": { - "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", "location": "query", "type": "string" }, "project": { - "description": "Identifies the project addressed by this request.", "location": "path", "required": true, "type": "string" @@ -926,7 +857,7 @@ "resourceRecordSets": { "methods": { "list": { - "description": "Enumerate ResourceRecordSets that have been created but not yet deleted.", + "description": "", "httpMethod": "GET", "id": "dns.resourceRecordSets.list", "parameterOrder": [ @@ -935,35 +866,29 @@ ], "parameters": { "managedZone": { - "description": "Identifies the managed zone addressed by this request. Can be the managed zone name or id.", "location": "path", "required": true, "type": "string" }, "maxResults": { - "description": "Optional. Maximum number of results to be returned. If unspecified, the server will decide how many results to return.", "format": "int32", "location": "query", "type": "integer" }, "name": { - "description": "Restricts the list to return only records with this fully qualified domain name.", "location": "query", "type": "string" }, "pageToken": { - "description": "Optional. A tag returned by a previous list request that was truncated. Use this parameter to continue a previous list request.", "location": "query", "type": "string" }, "project": { - "description": "Identifies the project addressed by this request.", "location": "path", "required": true, "type": "string" }, "type": { - "description": "Restricts the list to return only records of this type. If present, the \"name\" parameter must also be present.", "location": "query", "type": "string" } @@ -982,33 +907,28 @@ } } }, - "revision": "20191205", + "revision": "20200515", "rootUrl": "https://dns.googleapis.com/", "schemas": { "Change": { - "description": "A Change represents a set of ResourceRecordSet additions and deletions applied atomically to a ManagedZone. ResourceRecordSets within a ManagedZone are modified by creating a new Change element in the Changes collection. In turn the Changes collection also records the past modifications to the ResourceRecordSets in a ManagedZone. The current state of the ManagedZone is the sum effect of applying all Change elements in the Changes collection in sequence.", "id": "Change", "properties": { "additions": { - "description": "Which ResourceRecordSets to add?", "items": { "$ref": "ResourceRecordSet" }, "type": "array" }, "deletions": { - "description": "Which ResourceRecordSets to remove? Must match existing data exactly.", "items": { "$ref": "ResourceRecordSet" }, "type": "array" }, "id": { - "description": "Unique identifier for the resource; defined by the server (output only).", "type": "string" }, "isServing": { - "description": "If the DNS queries for the zone will be served.", "type": "boolean" }, "kind": { @@ -1017,11 +937,9 @@ "type": "string" }, "startTime": { - "description": "The time that this operation was started by the server (output only). This is in RFC3339 text format.", "type": "string" }, "status": { - "description": "Status of the operation (output only). A status of \"done\" means that the request to update the authoritative servers has been sent, but the servers might not be updated yet.", "enum": [ "done", "pending" @@ -1036,11 +954,9 @@ "type": "object" }, "ChangesListResponse": { - "description": "The response to a request to enumerate Changes to a ResourceRecordSets collection.", "id": "ChangesListResponse", "properties": { "changes": { - "description": "The requested changes.", "items": { "$ref": "Change" }, @@ -1055,18 +971,15 @@ "type": "string" }, "nextPageToken": { - "description": "The presence of this field indicates that there exist more results following your last page of results in pagination order. To fetch them, make another list request using this value as your pagination token.\n\nIn this way you can retrieve the complete contents of even very large collections one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of all elements returned will be an inconsistent view of the collection. There is no way to retrieve a \"snapshot\" of collections larger than the maximum page size.", "type": "string" } }, "type": "object" }, "DnsKey": { - "description": "A DNSSEC key pair.", "id": "DnsKey", "properties": { "algorithm": { - "description": "String mnemonic specifying the DNSSEC algorithm of this key. Immutable after creation time.", "enum": [ "ecdsap256sha256", "ecdsap384sha384", @@ -1084,35 +997,28 @@ "type": "string" }, "creationTime": { - "description": "The time that this resource was created in the control plane. This is in RFC3339 text format. Output only.", "type": "string" }, "description": { - "description": "A mutable string of at most 1024 characters associated with this resource for the user's convenience. Has no effect on the resource's function.", "type": "string" }, "digests": { - "description": "Cryptographic hashes of the DNSKEY resource record associated with this DnsKey. These digests are needed to construct a DS record that points at this DNS key. Output only.", "items": { "$ref": "DnsKeyDigest" }, "type": "array" }, "id": { - "description": "Unique identifier for the resource; defined by the server (output only).", "type": "string" }, "isActive": { - "description": "Active keys will be used to sign subsequent changes to the ManagedZone. Inactive keys will still be present as DNSKEY Resource Records for the use of resolvers validating existing signatures.", "type": "boolean" }, "keyLength": { - "description": "Length of the key in bits. Specified at creation time then immutable.", "format": "uint32", "type": "integer" }, "keyTag": { - "description": "The key tag is a non-cryptographic hash of the a DNSKEY resource record associated with this DnsKey. The key tag can be used to identify a DNSKEY more quickly (but it is not a unique identifier). In particular, the key tag is used in a parent zone's DS record to point at the DNSKEY in this child ManagedZone. The key tag is a number in the range [0, 65535] and the algorithm to calculate it is specified in RFC4034 Appendix B. Output only.", "format": "int32", "type": "integer" }, @@ -1122,11 +1028,9 @@ "type": "string" }, "publicKey": { - "description": "Base64 encoded public half of this key. Output only.", "type": "string" }, "type": { - "description": "One of \"KEY_SIGNING\" or \"ZONE_SIGNING\". Keys of type KEY_SIGNING have the Secure Entry Point flag set and, when active, will be used to sign only resource record sets of type DNSKEY. Otherwise, the Secure Entry Point flag will be cleared and this key will be used to sign only resource record sets of other types. Immutable after creation time.", "enum": [ "keySigning", "zoneSigning" @@ -1144,11 +1048,9 @@ "id": "DnsKeyDigest", "properties": { "digest": { - "description": "The base-16 encoded bytes of this digest. Suitable for use in a DS resource record.", "type": "string" }, "type": { - "description": "Specifies the algorithm used to calculate this digest.", "enum": [ "sha1", "sha256", @@ -1165,11 +1067,9 @@ "type": "object" }, "DnsKeySpec": { - "description": "Parameters for DnsKey key generation. Used for generating initial keys for a new ManagedZone and as default when adding a new DnsKey.", "id": "DnsKeySpec", "properties": { "algorithm": { - "description": "String mnemonic specifying the DNSSEC algorithm of this key.", "enum": [ "ecdsap256sha256", "ecdsap384sha384", @@ -1187,12 +1087,10 @@ "type": "string" }, "keyLength": { - "description": "Length of the keys in bits.", "format": "uint32", "type": "integer" }, "keyType": { - "description": "Specifies whether this is a key signing key (KSK) or a zone signing key (ZSK). Key signing keys have the Secure Entry Point flag set and, when active, will only be used to sign resource record sets of type DNSKEY. Zone signing keys do not have the Secure Entry Point flag set and will be used to sign all other types of resource record sets.", "enum": [ "keySigning", "zoneSigning" @@ -1212,11 +1110,9 @@ "type": "object" }, "DnsKeysListResponse": { - "description": "The response to a request to enumerate DnsKeys in a ManagedZone.", "id": "DnsKeysListResponse", "properties": { "dnsKeys": { - "description": "The requested resources.", "items": { "$ref": "DnsKey" }, @@ -1231,38 +1127,30 @@ "type": "string" }, "nextPageToken": { - "description": "The presence of this field indicates that there exist more results following your last page of results in pagination order. To fetch them, make another list request using this value as your pagination token.\n\nIn this way you can retrieve the complete contents of even very large collections one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of all elements returned will be an inconsistent view of the collection. There is no way to retrieve a \"snapshot\" of collections larger than the maximum page size.", "type": "string" } }, "type": "object" }, "ManagedZone": { - "description": "A zone is a subtree of the DNS namespace under one administrative responsibility. A ManagedZone is a resource that represents a DNS zone hosted by the Cloud DNS service.", "id": "ManagedZone", "properties": { "creationTime": { - "description": "The time that this resource was created on the server. This is in RFC3339 text format. Output only.", "type": "string" }, "description": { - "description": "A mutable string of at most 1024 characters associated with this resource for the user's convenience. Has no effect on the managed zone's function.", "type": "string" }, "dnsName": { - "description": "The DNS name of this managed zone, for instance \"example.com.\".", "type": "string" }, "dnssecConfig": { - "$ref": "ManagedZoneDnsSecConfig", - "description": "DNSSEC configuration." + "$ref": "ManagedZoneDnsSecConfig" }, "forwardingConfig": { - "$ref": "ManagedZoneForwardingConfig", - "description": "The presence for this field indicates that outbound forwarding is enabled for this zone. The value of this field contains the set of destinations to forward to." + "$ref": "ManagedZoneForwardingConfig" }, "id": { - "description": "Unique identifier for the resource; defined by the server (output only)", "format": "uint64", "type": "string" }, @@ -1275,34 +1163,30 @@ "additionalProperties": { "type": "string" }, - "description": "User labels.", "type": "object" }, "name": { - "description": "User assigned name for this resource. Must be unique within the project. The name must be 1-63 characters long, must begin with a letter, end with a letter or digit, and only contain lowercase letters, digits or dashes.", "type": "string" }, "nameServerSet": { - "description": "Optionally specifies the NameServerSet for this ManagedZone. A NameServerSet is a set of DNS name servers that all host the same ManagedZones. Most users will leave this field unset.", "type": "string" }, "nameServers": { - "description": "Delegate your managed_zone to these virtual name servers; defined by the server (output only)", "items": { "type": "string" }, "type": "array" }, "peeringConfig": { - "$ref": "ManagedZonePeeringConfig", - "description": "The presence of this field indicates that DNS Peering is enabled for this zone. The value of this field contains the network to peer with." + "$ref": "ManagedZonePeeringConfig" }, "privateVisibilityConfig": { - "$ref": "ManagedZonePrivateVisibilityConfig", - "description": "For privately visible zones, the set of Virtual Private Cloud resources that the zone is visible from." + "$ref": "ManagedZonePrivateVisibilityConfig" + }, + "reverseLookupConfig": { + "$ref": "ManagedZoneReverseLookupConfig" }, "visibility": { - "description": "The zone's visibility: public zones are exposed to the Internet, while private zones are visible only to Virtual Private Cloud resources.", "enum": [ "private", "public" @@ -1320,7 +1204,6 @@ "id": "ManagedZoneDnsSecConfig", "properties": { "defaultKeySpecs": { - "description": "Specifies parameters for generating initial DnsKeys for this ManagedZone. Can only be changed while the state is OFF.", "items": { "$ref": "DnsKeySpec" }, @@ -1332,7 +1215,6 @@ "type": "string" }, "nonExistence": { - "description": "Specifies the mechanism for authenticated denial-of-existence responses. Can only be changed while the state is OFF.", "enum": [ "nsec", "nsec3" @@ -1344,7 +1226,6 @@ "type": "string" }, "state": { - "description": "Specifies whether DNSSEC is enabled, and what mode it is in.", "enum": [ "off", "on", @@ -1369,7 +1250,6 @@ "type": "string" }, "targetNameServers": { - "description": "List of target name servers to forward to. Cloud DNS will select the best available name server if more than one target is given.", "items": { "$ref": "ManagedZoneForwardingConfigNameServerTarget" }, @@ -1381,8 +1261,18 @@ "ManagedZoneForwardingConfigNameServerTarget": { "id": "ManagedZoneForwardingConfigNameServerTarget", "properties": { + "forwardingPath": { + "enum": [ + "default", + "private" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + }, "ipv4Address": { - "description": "IPv4 address of a target name server.", "type": "string" }, "kind": { @@ -1405,11 +1295,9 @@ "type": "string" }, "nextPageToken": { - "description": "The presence of this field indicates that there exist more results following your last page of results in pagination order. To fetch them, make another list request using this value as your page token.\n\nIn this way you can retrieve the complete contents of even very large collections one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of all elements returned will be an inconsistent view of the collection. There is no way to retrieve a consistent snapshot of a collection larger than the maximum page size.", "type": "string" }, "operations": { - "description": "The operation resources.", "items": { "$ref": "Operation" }, @@ -1427,8 +1315,7 @@ "type": "string" }, "targetNetwork": { - "$ref": "ManagedZonePeeringConfigTargetNetwork", - "description": "The network with which to peer." + "$ref": "ManagedZonePeeringConfigTargetNetwork" } }, "type": "object" @@ -1437,7 +1324,6 @@ "id": "ManagedZonePeeringConfigTargetNetwork", "properties": { "deactivateTime": { - "description": "The time at which the zone was deactivated, in RFC 3339 date-time format. An empty string indicates that the peering connection is active. The producer network can deactivate a zone. The zone is automatically deactivated if the producer network that the zone targeted is deleted. Output only.", "type": "string" }, "kind": { @@ -1446,7 +1332,6 @@ "type": "string" }, "networkUrl": { - "description": "The fully qualified URL of the VPC network to forward queries to. This should be formatted like https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}", "type": "string" } }, @@ -1461,7 +1346,6 @@ "type": "string" }, "networks": { - "description": "The list of VPC networks that can see this zone.", "items": { "$ref": "ManagedZonePrivateVisibilityConfigNetwork" }, @@ -1479,7 +1363,17 @@ "type": "string" }, "networkUrl": { - "description": "The fully qualified URL of the VPC network to bind to. This should be formatted like https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}", + "type": "string" + } + }, + "type": "object" + }, + "ManagedZoneReverseLookupConfig": { + "id": "ManagedZoneReverseLookupConfig", + "properties": { + "kind": { + "default": "dns#managedZoneReverseLookupConfig", + "description": "Identifies what kind of resource this is. Value: the fixed string \"dns#managedZoneReverseLookupConfig\".", "type": "string" } }, @@ -1497,29 +1391,24 @@ "type": "string" }, "managedZones": { - "description": "The managed zone resources.", "items": { "$ref": "ManagedZone" }, "type": "array" }, "nextPageToken": { - "description": "The presence of this field indicates that there exist more results following your last page of results in pagination order. To fetch them, make another list request using this value as your page token.\n\nIn this way you can retrieve the complete contents of even very large collections one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of all elements returned will be an inconsistent view of the collection. There is no way to retrieve a consistent snapshot of a collection larger than the maximum page size.", "type": "string" } }, "type": "object" }, "Operation": { - "description": "An operation represents a successful mutation performed on a Cloud DNS resource. Operations provide: - An audit log of server resource mutations. - A way to recover/retry API calls in the case where the response is never received by the caller. Use the caller specified client_operation_id.", "id": "Operation", "properties": { "dnsKeyContext": { - "$ref": "OperationDnsKeyContext", - "description": "Only populated if the operation targeted a DnsKey (output only)." + "$ref": "OperationDnsKeyContext" }, "id": { - "description": "Unique identifier for the resource. This is the client_operation_id if the client specified it when the mutation was initiated, otherwise, it is generated by the server. The name must be 1-63 characters long and match the regular expression [-a-z0-9]? (output only)", "type": "string" }, "kind": { @@ -1528,11 +1417,9 @@ "type": "string" }, "startTime": { - "description": "The time that this operation was started by the server. This is in RFC3339 text format (output only).", "type": "string" }, "status": { - "description": "Status of the operation. Can be one of the following: \"PENDING\" or \"DONE\" (output only). A status of \"DONE\" means that the request to update the authoritative servers has been sent, but the servers might not be updated yet.", "enum": [ "done", "pending" @@ -1544,16 +1431,13 @@ "type": "string" }, "type": { - "description": "Type of the operation. Operations include insert, update, and delete (output only).", "type": "string" }, "user": { - "description": "User who requested the operation, for example: user@example.com. cloud-dns-system for operations automatically done by the system. (output only)", "type": "string" }, "zoneContext": { - "$ref": "OperationManagedZoneContext", - "description": "Only populated if the operation targeted a ManagedZone (output only)." + "$ref": "OperationManagedZoneContext" } }, "type": "object" @@ -1562,12 +1446,10 @@ "id": "OperationDnsKeyContext", "properties": { "newValue": { - "$ref": "DnsKey", - "description": "The post-operation DnsKey resource." + "$ref": "DnsKey" }, "oldValue": { - "$ref": "DnsKey", - "description": "The pre-operation DnsKey resource." + "$ref": "DnsKey" } }, "type": "object" @@ -1576,12 +1458,10 @@ "id": "OperationManagedZoneContext", "properties": { "newValue": { - "$ref": "ManagedZone", - "description": "The post-operation ManagedZone resource." + "$ref": "ManagedZone" }, "oldValue": { - "$ref": "ManagedZone", - "description": "The pre-operation ManagedZone resource." + "$ref": "ManagedZone" } }, "type": "object" @@ -1598,11 +1478,9 @@ "type": "string" }, "nextPageToken": { - "description": "The presence of this field indicates that there exist more results following your last page of results in pagination order. To fetch them, make another list request using this value as your page token.\n\nIn this way you can retrieve the complete contents of even very large collections one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of all elements returned will be an inconsistent view of the collection. There is no way to retrieve a consistent snapshot of a collection larger than the maximum page size.", "type": "string" }, "policies": { - "description": "The policy resources.", "items": { "$ref": "Policy" }, @@ -1636,27 +1514,21 @@ "type": "object" }, "Policy": { - "description": "A policy is a collection of DNS rules applied to one or more Virtual Private Cloud resources.", "id": "Policy", "properties": { "alternativeNameServerConfig": { - "$ref": "PolicyAlternativeNameServerConfig", - "description": "Sets an alternative name server for the associated networks. When specified, all DNS queries are forwarded to a name server that you choose. Names such as .internal are not available when an alternative name server is specified." + "$ref": "PolicyAlternativeNameServerConfig" }, "description": { - "description": "A mutable string of at most 1024 characters associated with this resource for the user's convenience. Has no effect on the policy's function.", "type": "string" }, "enableInboundForwarding": { - "description": "Allows networks bound to this policy to receive DNS queries sent by VMs or applications over VPN connections. When enabled, a virtual IP address will be allocated from each of the sub-networks that are bound to this policy.", "type": "boolean" }, "enableLogging": { - "description": "Controls whether logging is enabled for the networks bound to this policy. Defaults to no logging if not set.", "type": "boolean" }, "id": { - "description": "Unique identifier for the resource; defined by the server (output only).", "format": "uint64", "type": "string" }, @@ -1666,11 +1538,9 @@ "type": "string" }, "name": { - "description": "User assigned name for this policy.", "type": "string" }, "networks": { - "description": "List of network names specifying networks to which this policy is applied.", "items": { "$ref": "PolicyNetwork" }, @@ -1688,7 +1558,6 @@ "type": "string" }, "targetNameServers": { - "description": "Sets an alternative name server for the associated networks. When specified, all DNS queries are forwarded to a name server that you choose. Names such as .internal are not available when an alternative name server is specified.", "items": { "$ref": "PolicyAlternativeNameServerConfigTargetNameServer" }, @@ -1700,8 +1569,18 @@ "PolicyAlternativeNameServerConfigTargetNameServer": { "id": "PolicyAlternativeNameServerConfigTargetNameServer", "properties": { + "forwardingPath": { + "enum": [ + "default", + "private" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + }, "ipv4Address": { - "description": "IPv4 address to forward to.", "type": "string" }, "kind": { @@ -1721,18 +1600,15 @@ "type": "string" }, "networkUrl": { - "description": "The fully qualified URL of the VPC network to bind to. This should be formatted like https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}", "type": "string" } }, "type": "object" }, "Project": { - "description": "A project resource. The project is a top level container for resources including Cloud DNS ManagedZones. Projects can be created only in the APIs console.", "id": "Project", "properties": { "id": { - "description": "User assigned unique identifier for the resource (output only).", "type": "string" }, "kind": { @@ -1741,23 +1617,19 @@ "type": "string" }, "number": { - "description": "Unique numeric identifier for the resource; defined by the server (output only).", "format": "uint64", "type": "string" }, "quota": { - "$ref": "Quota", - "description": "Quotas assigned to this project (output only)." + "$ref": "Quota" } }, "type": "object" }, "Quota": { - "description": "Limits associated with a Project.", "id": "Quota", "properties": { "dnsKeysPerManagedZone": { - "description": "Maximum allowed number of DnsKeys per ManagedZone.", "format": "int32", "type": "integer" }, @@ -1767,67 +1639,54 @@ "type": "string" }, "managedZones": { - "description": "Maximum allowed number of managed zones in the project.", "format": "int32", "type": "integer" }, "managedZonesPerNetwork": { - "description": "Maximum allowed number of managed zones which can be attached to a network.", "format": "int32", "type": "integer" }, "networksPerManagedZone": { - "description": "Maximum allowed number of networks to which a privately scoped zone can be attached.", "format": "int32", "type": "integer" }, "networksPerPolicy": { - "description": "Maximum allowed number of networks per policy.", "format": "int32", "type": "integer" }, "policies": { - "description": "Maximum allowed number of policies per project.", "format": "int32", "type": "integer" }, "resourceRecordsPerRrset": { - "description": "Maximum allowed number of ResourceRecords per ResourceRecordSet.", "format": "int32", "type": "integer" }, "rrsetAdditionsPerChange": { - "description": "Maximum allowed number of ResourceRecordSets to add per ChangesCreateRequest.", "format": "int32", "type": "integer" }, "rrsetDeletionsPerChange": { - "description": "Maximum allowed number of ResourceRecordSets to delete per ChangesCreateRequest.", "format": "int32", "type": "integer" }, "rrsetsPerManagedZone": { - "description": "Maximum allowed number of ResourceRecordSets per zone in the project.", "format": "int32", "type": "integer" }, "targetNameServersPerManagedZone": { - "description": "Maximum allowed number of target name servers per managed forwarding zone.", "format": "int32", "type": "integer" }, "targetNameServersPerPolicy": { - "description": "Maximum allowed number of alternative target name servers per policy.", "format": "int32", "type": "integer" }, "totalRrdataSizePerChange": { - "description": "Maximum allowed size for total rrdata in one ChangesCreateRequest in bytes.", "format": "int32", "type": "integer" }, "whitelistedKeySpecs": { - "description": "DNSSEC algorithm and key length types that can be used for DnsKeys.", "items": { "$ref": "DnsKeySpec" }, @@ -1837,7 +1696,6 @@ "type": "object" }, "ResourceRecordSet": { - "description": "A unit of data that will be returned by the DNS servers.", "id": "ResourceRecordSet", "properties": { "kind": { @@ -1846,30 +1704,25 @@ "type": "string" }, "name": { - "description": "For example, www.example.com.", "type": "string" }, "rrdatas": { - "description": "As defined in RFC 1035 (section 5) and RFC 1034 (section 3.6.1) -- see examples.", "items": { "type": "string" }, "type": "array" }, "signatureRrdatas": { - "description": "As defined in RFC 4034 (section 3.2).", "items": { "type": "string" }, "type": "array" }, "ttl": { - "description": "Number of seconds that this ResourceRecordSet can be cached by resolvers.", "format": "int32", "type": "integer" }, "type": { - "description": "The identifier of a supported record type. See the list of Supported DNS record types.", "type": "string" } }, @@ -1887,11 +1740,9 @@ "type": "string" }, "nextPageToken": { - "description": "The presence of this field indicates that there exist more results following your last page of results in pagination order. To fetch them, make another list request using this value as your pagination token.\n\nIn this way you can retrieve the complete contents of even very large collections one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of all elements returned will be an inconsistent view of the collection. There is no way to retrieve a consistent snapshot of a collection larger than the maximum page size.", "type": "string" }, "rrsets": { - "description": "The resource record set resources.", "items": { "$ref": "ResourceRecordSet" }, @@ -1901,11 +1752,9 @@ "type": "object" }, "ResponseHeader": { - "description": "Elements common to every response.", "id": "ResponseHeader", "properties": { "operationId": { - "description": "For mutating operation requests that completed successfully. This is the client_operation_id if the client specified it, otherwise it is generated by the server (output only).", "type": "string" } }, diff --git a/vendor/google.golang.org/api/dns/v1/dns-gen.go b/vendor/google.golang.org/api/dns/v1/dns-gen.go index 7fe82e2ff..30762afbd 100644 --- a/vendor/google.golang.org/api/dns/v1/dns-gen.go +++ b/vendor/google.golang.org/api/dns/v1/dns-gen.go @@ -230,40 +230,21 @@ type ResourceRecordSetsService struct { s *Service } -// Change: A Change represents a set of ResourceRecordSet additions and -// deletions applied atomically to a ManagedZone. ResourceRecordSets -// within a ManagedZone are modified by creating a new Change element in -// the Changes collection. In turn the Changes collection also records -// the past modifications to the ResourceRecordSets in a ManagedZone. -// The current state of the ManagedZone is the sum effect of applying -// all Change elements in the Changes collection in sequence. type Change struct { - // Additions: Which ResourceRecordSets to add? Additions []*ResourceRecordSet `json:"additions,omitempty"` - // Deletions: Which ResourceRecordSets to remove? Must match existing - // data exactly. Deletions []*ResourceRecordSet `json:"deletions,omitempty"` - // Id: Unique identifier for the resource; defined by the server (output - // only). Id string `json:"id,omitempty"` - // IsServing: If the DNS queries for the zone will be served. IsServing bool `json:"isServing,omitempty"` // Kind: Identifies what kind of resource this is. Value: the fixed // string "dns#change". Kind string `json:"kind,omitempty"` - // StartTime: The time that this operation was started by the server - // (output only). This is in RFC3339 text format. StartTime string `json:"startTime,omitempty"` - // Status: Status of the operation (output only). A status of "done" - // means that the request to update the authoritative servers has been - // sent, but the servers might not be updated yet. - // // Possible values: // "done" // "pending" @@ -296,10 +277,7 @@ func (s *Change) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ChangesListResponse: The response to a request to enumerate Changes -// to a ResourceRecordSets collection. type ChangesListResponse struct { - // Changes: The requested changes. Changes []*Change `json:"changes,omitempty"` Header *ResponseHeader `json:"header,omitempty"` @@ -307,17 +285,6 @@ type ChangesListResponse struct { // Kind: Type of resource. Kind string `json:"kind,omitempty"` - // NextPageToken: The presence of this field indicates that there exist - // more results following your last page of results in pagination order. - // To fetch them, make another list request using this value as your - // pagination token. - // - // In this way you can retrieve the complete contents of even very large - // collections one page at a time. However, if the contents of the - // collection change between the first and last paginated list request, - // the set of all elements returned will be an inconsistent view of the - // collection. There is no way to retrieve a "snapshot" of collections - // larger than the maximum page size. NextPageToken string `json:"nextPageToken,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -347,11 +314,7 @@ func (s *ChangesListResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// DnsKey: A DNSSEC key pair. type DnsKey struct { - // Algorithm: String mnemonic specifying the DNSSEC algorithm of this - // key. Immutable after creation time. - // // Possible values: // "ecdsap256sha256" // "ecdsap384sha384" @@ -360,56 +323,26 @@ type DnsKey struct { // "rsasha512" Algorithm string `json:"algorithm,omitempty"` - // CreationTime: The time that this resource was created in the control - // plane. This is in RFC3339 text format. Output only. CreationTime string `json:"creationTime,omitempty"` - // Description: A mutable string of at most 1024 characters associated - // with this resource for the user's convenience. Has no effect on the - // resource's function. Description string `json:"description,omitempty"` - // Digests: Cryptographic hashes of the DNSKEY resource record - // associated with this DnsKey. These digests are needed to construct a - // DS record that points at this DNS key. Output only. Digests []*DnsKeyDigest `json:"digests,omitempty"` - // Id: Unique identifier for the resource; defined by the server (output - // only). Id string `json:"id,omitempty"` - // IsActive: Active keys will be used to sign subsequent changes to the - // ManagedZone. Inactive keys will still be present as DNSKEY Resource - // Records for the use of resolvers validating existing signatures. IsActive bool `json:"isActive,omitempty"` - // KeyLength: Length of the key in bits. Specified at creation time then - // immutable. KeyLength int64 `json:"keyLength,omitempty"` - // KeyTag: The key tag is a non-cryptographic hash of the a DNSKEY - // resource record associated with this DnsKey. The key tag can be used - // to identify a DNSKEY more quickly (but it is not a unique - // identifier). In particular, the key tag is used in a parent zone's DS - // record to point at the DNSKEY in this child ManagedZone. The key tag - // is a number in the range [0, 65535] and the algorithm to calculate it - // is specified in RFC4034 Appendix B. Output only. KeyTag int64 `json:"keyTag,omitempty"` // Kind: Identifies what kind of resource this is. Value: the fixed // string "dns#dnsKey". Kind string `json:"kind,omitempty"` - // PublicKey: Base64 encoded public half of this key. Output only. PublicKey string `json:"publicKey,omitempty"` - // Type: One of "KEY_SIGNING" or "ZONE_SIGNING". Keys of type - // KEY_SIGNING have the Secure Entry Point flag set and, when active, - // will be used to sign only resource record sets of type DNSKEY. - // Otherwise, the Secure Entry Point flag will be cleared and this key - // will be used to sign only resource record sets of other types. - // Immutable after creation time. - // // Possible values: // "keySigning" // "zoneSigning" @@ -443,12 +376,8 @@ func (s *DnsKey) MarshalJSON() ([]byte, error) { } type DnsKeyDigest struct { - // Digest: The base-16 encoded bytes of this digest. Suitable for use in - // a DS resource record. Digest string `json:"digest,omitempty"` - // Type: Specifies the algorithm used to calculate this digest. - // // Possible values: // "sha1" // "sha256" @@ -478,13 +407,7 @@ func (s *DnsKeyDigest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// DnsKeySpec: Parameters for DnsKey key generation. Used for generating -// initial keys for a new ManagedZone and as default when adding a new -// DnsKey. type DnsKeySpec struct { - // Algorithm: String mnemonic specifying the DNSSEC algorithm of this - // key. - // // Possible values: // "ecdsap256sha256" // "ecdsap384sha384" @@ -493,16 +416,8 @@ type DnsKeySpec struct { // "rsasha512" Algorithm string `json:"algorithm,omitempty"` - // KeyLength: Length of the keys in bits. KeyLength int64 `json:"keyLength,omitempty"` - // KeyType: Specifies whether this is a key signing key (KSK) or a zone - // signing key (ZSK). Key signing keys have the Secure Entry Point flag - // set and, when active, will only be used to sign resource record sets - // of type DNSKEY. Zone signing keys do not have the Secure Entry Point - // flag set and will be used to sign all other types of resource record - // sets. - // // Possible values: // "keySigning" // "zoneSigning" @@ -535,10 +450,7 @@ func (s *DnsKeySpec) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// DnsKeysListResponse: The response to a request to enumerate DnsKeys -// in a ManagedZone. type DnsKeysListResponse struct { - // DnsKeys: The requested resources. DnsKeys []*DnsKey `json:"dnsKeys,omitempty"` Header *ResponseHeader `json:"header,omitempty"` @@ -546,17 +458,6 @@ type DnsKeysListResponse struct { // Kind: Type of resource. Kind string `json:"kind,omitempty"` - // NextPageToken: The presence of this field indicates that there exist - // more results following your last page of results in pagination order. - // To fetch them, make another list request using this value as your - // pagination token. - // - // In this way you can retrieve the complete contents of even very large - // collections one page at a time. However, if the contents of the - // collection change between the first and last paginated list request, - // the set of all elements returned will be an inconsistent view of the - // collection. There is no way to retrieve a "snapshot" of collections - // larger than the maximum page size. NextPageToken string `json:"nextPageToken,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -586,70 +487,37 @@ func (s *DnsKeysListResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ManagedZone: A zone is a subtree of the DNS namespace under one -// administrative responsibility. A ManagedZone is a resource that -// represents a DNS zone hosted by the Cloud DNS service. type ManagedZone struct { - // CreationTime: The time that this resource was created on the server. - // This is in RFC3339 text format. Output only. CreationTime string `json:"creationTime,omitempty"` - // Description: A mutable string of at most 1024 characters associated - // with this resource for the user's convenience. Has no effect on the - // managed zone's function. Description string `json:"description,omitempty"` - // DnsName: The DNS name of this managed zone, for instance - // "example.com.". DnsName string `json:"dnsName,omitempty"` - // DnssecConfig: DNSSEC configuration. DnssecConfig *ManagedZoneDnsSecConfig `json:"dnssecConfig,omitempty"` - // ForwardingConfig: The presence for this field indicates that outbound - // forwarding is enabled for this zone. The value of this field contains - // the set of destinations to forward to. ForwardingConfig *ManagedZoneForwardingConfig `json:"forwardingConfig,omitempty"` - // Id: Unique identifier for the resource; defined by the server (output - // only) Id uint64 `json:"id,omitempty,string"` // Kind: Identifies what kind of resource this is. Value: the fixed // string "dns#managedZone". Kind string `json:"kind,omitempty"` - // Labels: User labels. Labels map[string]string `json:"labels,omitempty"` - // Name: User assigned name for this resource. Must be unique within the - // project. The name must be 1-63 characters long, must begin with a - // letter, end with a letter or digit, and only contain lowercase - // letters, digits or dashes. Name string `json:"name,omitempty"` - // NameServerSet: Optionally specifies the NameServerSet for this - // ManagedZone. A NameServerSet is a set of DNS name servers that all - // host the same ManagedZones. Most users will leave this field unset. NameServerSet string `json:"nameServerSet,omitempty"` - // NameServers: Delegate your managed_zone to these virtual name - // servers; defined by the server (output only) NameServers []string `json:"nameServers,omitempty"` - // PeeringConfig: The presence of this field indicates that DNS Peering - // is enabled for this zone. The value of this field contains the - // network to peer with. PeeringConfig *ManagedZonePeeringConfig `json:"peeringConfig,omitempty"` - // PrivateVisibilityConfig: For privately visible zones, the set of - // Virtual Private Cloud resources that the zone is visible from. PrivateVisibilityConfig *ManagedZonePrivateVisibilityConfig `json:"privateVisibilityConfig,omitempty"` - // Visibility: The zone's visibility: public zones are exposed to the - // Internet, while private zones are visible only to Virtual Private - // Cloud resources. - // + ReverseLookupConfig *ManagedZoneReverseLookupConfig `json:"reverseLookupConfig,omitempty"` + // Possible values: // "private" // "public" @@ -683,25 +551,17 @@ func (s *ManagedZone) MarshalJSON() ([]byte, error) { } type ManagedZoneDnsSecConfig struct { - // DefaultKeySpecs: Specifies parameters for generating initial DnsKeys - // for this ManagedZone. Can only be changed while the state is OFF. DefaultKeySpecs []*DnsKeySpec `json:"defaultKeySpecs,omitempty"` // Kind: Identifies what kind of resource this is. Value: the fixed // string "dns#managedZoneDnsSecConfig". Kind string `json:"kind,omitempty"` - // NonExistence: Specifies the mechanism for authenticated - // denial-of-existence responses. Can only be changed while the state is - // OFF. - // // Possible values: // "nsec" // "nsec3" NonExistence string `json:"nonExistence,omitempty"` - // State: Specifies whether DNSSEC is enabled, and what mode it is in. - // // Possible values: // "off" // "on" @@ -737,9 +597,6 @@ type ManagedZoneForwardingConfig struct { // string "dns#managedZoneForwardingConfig". Kind string `json:"kind,omitempty"` - // TargetNameServers: List of target name servers to forward to. Cloud - // DNS will select the best available name server if more than one - // target is given. TargetNameServers []*ManagedZoneForwardingConfigNameServerTarget `json:"targetNameServers,omitempty"` // ForceSendFields is a list of field names (e.g. "Kind") to @@ -766,14 +623,18 @@ func (s *ManagedZoneForwardingConfig) MarshalJSON() ([]byte, error) { } type ManagedZoneForwardingConfigNameServerTarget struct { - // Ipv4Address: IPv4 address of a target name server. + // Possible values: + // "default" + // "private" + ForwardingPath string `json:"forwardingPath,omitempty"` + Ipv4Address string `json:"ipv4Address,omitempty"` // Kind: Identifies what kind of resource this is. Value: the fixed // string "dns#managedZoneForwardingConfigNameServerTarget". Kind string `json:"kind,omitempty"` - // ForceSendFields is a list of field names (e.g. "Ipv4Address") to + // ForceSendFields is a list of field names (e.g. "ForwardingPath") 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 @@ -781,12 +642,13 @@ type ManagedZoneForwardingConfigNameServerTarget struct { // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Ipv4Address") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "ForwardingPath") 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:"-"` } @@ -802,20 +664,8 @@ type ManagedZoneOperationsListResponse struct { // Kind: Type of resource. Kind string `json:"kind,omitempty"` - // NextPageToken: The presence of this field indicates that there exist - // more results following your last page of results in pagination order. - // To fetch them, make another list request using this value as your - // page token. - // - // In this way you can retrieve the complete contents of even very large - // collections one page at a time. However, if the contents of the - // collection change between the first and last paginated list request, - // the set of all elements returned will be an inconsistent view of the - // collection. There is no way to retrieve a consistent snapshot of a - // collection larger than the maximum page size. NextPageToken string `json:"nextPageToken,omitempty"` - // Operations: The operation resources. Operations []*Operation `json:"operations,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -850,7 +700,6 @@ type ManagedZonePeeringConfig struct { // string "dns#managedZonePeeringConfig". Kind string `json:"kind,omitempty"` - // TargetNetwork: The network with which to peer. TargetNetwork *ManagedZonePeeringConfigTargetNetwork `json:"targetNetwork,omitempty"` // ForceSendFields is a list of field names (e.g. "Kind") to @@ -877,20 +726,12 @@ func (s *ManagedZonePeeringConfig) MarshalJSON() ([]byte, error) { } type ManagedZonePeeringConfigTargetNetwork struct { - // DeactivateTime: The time at which the zone was deactivated, in RFC - // 3339 date-time format. An empty string indicates that the peering - // connection is active. The producer network can deactivate a zone. The - // zone is automatically deactivated if the producer network that the - // zone targeted is deleted. Output only. DeactivateTime string `json:"deactivateTime,omitempty"` // Kind: Identifies what kind of resource this is. Value: the fixed // string "dns#managedZonePeeringConfigTargetNetwork". Kind string `json:"kind,omitempty"` - // NetworkUrl: The fully qualified URL of the VPC network to forward - // queries to. This should be formatted like - // https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network} NetworkUrl string `json:"networkUrl,omitempty"` // ForceSendFields is a list of field names (e.g. "DeactivateTime") to @@ -922,7 +763,6 @@ type ManagedZonePrivateVisibilityConfig struct { // string "dns#managedZonePrivateVisibilityConfig". Kind string `json:"kind,omitempty"` - // Networks: The list of VPC networks that can see this zone. Networks []*ManagedZonePrivateVisibilityConfigNetwork `json:"networks,omitempty"` // ForceSendFields is a list of field names (e.g. "Kind") to @@ -953,9 +793,6 @@ type ManagedZonePrivateVisibilityConfigNetwork struct { // string "dns#managedZonePrivateVisibilityConfigNetwork". Kind string `json:"kind,omitempty"` - // NetworkUrl: The fully qualified URL of the VPC network to bind to. - // This should be formatted like - // https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network} NetworkUrl string `json:"networkUrl,omitempty"` // ForceSendFields is a list of field names (e.g. "Kind") to @@ -981,26 +818,42 @@ func (s *ManagedZonePrivateVisibilityConfigNetwork) MarshalJSON() ([]byte, error return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type ManagedZoneReverseLookupConfig struct { + // Kind: Identifies what kind of resource this is. Value: the fixed + // string "dns#managedZoneReverseLookupConfig". + Kind string `json:"kind,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Kind") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Kind") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ManagedZoneReverseLookupConfig) MarshalJSON() ([]byte, error) { + type NoMethod ManagedZoneReverseLookupConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type ManagedZonesListResponse struct { Header *ResponseHeader `json:"header,omitempty"` // Kind: Type of resource. Kind string `json:"kind,omitempty"` - // ManagedZones: The managed zone resources. ManagedZones []*ManagedZone `json:"managedZones,omitempty"` - // NextPageToken: The presence of this field indicates that there exist - // more results following your last page of results in pagination order. - // To fetch them, make another list request using this value as your - // page token. - // - // In this way you can retrieve the complete contents of even very large - // collections one page at a time. However, if the contents of the - // collection change between the first and last paginated list request, - // the set of all elements returned will be an inconsistent view of the - // collection. There is no way to retrieve a consistent snapshot of a - // collection larger than the maximum page size. NextPageToken string `json:"nextPageToken,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -1030,52 +883,26 @@ func (s *ManagedZonesListResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Operation: An operation represents a successful mutation performed on -// a Cloud DNS resource. Operations provide: - An audit log of server -// resource mutations. - A way to recover/retry API calls in the case -// where the response is never received by the caller. Use the caller -// specified client_operation_id. type Operation struct { - // DnsKeyContext: Only populated if the operation targeted a DnsKey - // (output only). DnsKeyContext *OperationDnsKeyContext `json:"dnsKeyContext,omitempty"` - // Id: Unique identifier for the resource. This is the - // client_operation_id if the client specified it when the mutation was - // initiated, otherwise, it is generated by the server. The name must be - // 1-63 characters long and match the regular expression [-a-z0-9]? - // (output only) Id string `json:"id,omitempty"` // Kind: Identifies what kind of resource this is. Value: the fixed // string "dns#operation". Kind string `json:"kind,omitempty"` - // StartTime: The time that this operation was started by the server. - // This is in RFC3339 text format (output only). StartTime string `json:"startTime,omitempty"` - // Status: Status of the operation. Can be one of the following: - // "PENDING" or "DONE" (output only). A status of "DONE" means that the - // request to update the authoritative servers has been sent, but the - // servers might not be updated yet. - // // Possible values: // "done" // "pending" Status string `json:"status,omitempty"` - // Type: Type of the operation. Operations include insert, update, and - // delete (output only). Type string `json:"type,omitempty"` - // User: User who requested the operation, for example: - // user@example.com. cloud-dns-system for operations automatically done - // by the system. (output only) User string `json:"user,omitempty"` - // ZoneContext: Only populated if the operation targeted a ManagedZone - // (output only). ZoneContext *OperationManagedZoneContext `json:"zoneContext,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -1106,10 +933,8 @@ func (s *Operation) MarshalJSON() ([]byte, error) { } type OperationDnsKeyContext struct { - // NewValue: The post-operation DnsKey resource. NewValue *DnsKey `json:"newValue,omitempty"` - // OldValue: The pre-operation DnsKey resource. OldValue *DnsKey `json:"oldValue,omitempty"` // ForceSendFields is a list of field names (e.g. "NewValue") to @@ -1136,10 +961,8 @@ func (s *OperationDnsKeyContext) MarshalJSON() ([]byte, error) { } type OperationManagedZoneContext struct { - // NewValue: The post-operation ManagedZone resource. NewValue *ManagedZone `json:"newValue,omitempty"` - // OldValue: The pre-operation ManagedZone resource. OldValue *ManagedZone `json:"oldValue,omitempty"` // ForceSendFields is a list of field names (e.g. "NewValue") to @@ -1171,20 +994,8 @@ type PoliciesListResponse struct { // Kind: Type of resource. Kind string `json:"kind,omitempty"` - // NextPageToken: The presence of this field indicates that there exist - // more results following your last page of results in pagination order. - // To fetch them, make another list request using this value as your - // page token. - // - // In this way you can retrieve the complete contents of even very large - // collections one page at a time. However, if the contents of the - // collection change between the first and last paginated list request, - // the set of all elements returned will be an inconsistent view of the - // collection. There is no way to retrieve a consistent snapshot of a - // collection larger than the maximum page size. NextPageToken string `json:"nextPageToken,omitempty"` - // Policies: The policy resources. Policies []*Policy `json:"policies,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -1278,43 +1089,23 @@ func (s *PoliciesUpdateResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Policy: A policy is a collection of DNS rules applied to one or more -// Virtual Private Cloud resources. type Policy struct { - // AlternativeNameServerConfig: Sets an alternative name server for the - // associated networks. When specified, all DNS queries are forwarded to - // a name server that you choose. Names such as .internal are not - // available when an alternative name server is specified. AlternativeNameServerConfig *PolicyAlternativeNameServerConfig `json:"alternativeNameServerConfig,omitempty"` - // Description: A mutable string of at most 1024 characters associated - // with this resource for the user's convenience. Has no effect on the - // policy's function. Description string `json:"description,omitempty"` - // EnableInboundForwarding: Allows networks bound to this policy to - // receive DNS queries sent by VMs or applications over VPN connections. - // When enabled, a virtual IP address will be allocated from each of the - // sub-networks that are bound to this policy. EnableInboundForwarding bool `json:"enableInboundForwarding,omitempty"` - // EnableLogging: Controls whether logging is enabled for the networks - // bound to this policy. Defaults to no logging if not set. EnableLogging bool `json:"enableLogging,omitempty"` - // Id: Unique identifier for the resource; defined by the server (output - // only). Id uint64 `json:"id,omitempty,string"` // Kind: Identifies what kind of resource this is. Value: the fixed // string "dns#policy". Kind string `json:"kind,omitempty"` - // Name: User assigned name for this policy. Name string `json:"name,omitempty"` - // Networks: List of network names specifying networks to which this - // policy is applied. Networks []*PolicyNetwork `json:"networks,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -1351,10 +1142,6 @@ type PolicyAlternativeNameServerConfig struct { // string "dns#policyAlternativeNameServerConfig". Kind string `json:"kind,omitempty"` - // TargetNameServers: Sets an alternative name server for the associated - // networks. When specified, all DNS queries are forwarded to a name - // server that you choose. Names such as .internal are not available - // when an alternative name server is specified. TargetNameServers []*PolicyAlternativeNameServerConfigTargetNameServer `json:"targetNameServers,omitempty"` // ForceSendFields is a list of field names (e.g. "Kind") to @@ -1381,14 +1168,18 @@ func (s *PolicyAlternativeNameServerConfig) MarshalJSON() ([]byte, error) { } type PolicyAlternativeNameServerConfigTargetNameServer struct { - // Ipv4Address: IPv4 address to forward to. + // Possible values: + // "default" + // "private" + ForwardingPath string `json:"forwardingPath,omitempty"` + Ipv4Address string `json:"ipv4Address,omitempty"` // Kind: Identifies what kind of resource this is. Value: the fixed // string "dns#policyAlternativeNameServerConfigTargetNameServer". Kind string `json:"kind,omitempty"` - // ForceSendFields is a list of field names (e.g. "Ipv4Address") to + // ForceSendFields is a list of field names (e.g. "ForwardingPath") 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 @@ -1396,12 +1187,13 @@ type PolicyAlternativeNameServerConfigTargetNameServer struct { // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Ipv4Address") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "ForwardingPath") 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:"-"` } @@ -1416,9 +1208,6 @@ type PolicyNetwork struct { // string "dns#policyNetwork". Kind string `json:"kind,omitempty"` - // NetworkUrl: The fully qualified URL of the VPC network to bind to. - // This should be formatted like - // https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network} NetworkUrl string `json:"networkUrl,omitempty"` // ForceSendFields is a list of field names (e.g. "Kind") to @@ -1444,22 +1233,15 @@ func (s *PolicyNetwork) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Project: A project resource. The project is a top level container for -// resources including Cloud DNS ManagedZones. Projects can be created -// only in the APIs console. type Project struct { - // Id: User assigned unique identifier for the resource (output only). Id string `json:"id,omitempty"` // Kind: Identifies what kind of resource this is. Value: the fixed // string "dns#project". Kind string `json:"kind,omitempty"` - // Number: Unique numeric identifier for the resource; defined by the - // server (output only). Number uint64 `json:"number,omitempty,string"` - // Quota: Quotas assigned to this project (output only). Quota *Quota `json:"quota,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -1489,63 +1271,37 @@ func (s *Project) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Quota: Limits associated with a Project. type Quota struct { - // DnsKeysPerManagedZone: Maximum allowed number of DnsKeys per - // ManagedZone. DnsKeysPerManagedZone int64 `json:"dnsKeysPerManagedZone,omitempty"` // Kind: Identifies what kind of resource this is. Value: the fixed // string "dns#quota". Kind string `json:"kind,omitempty"` - // ManagedZones: Maximum allowed number of managed zones in the project. ManagedZones int64 `json:"managedZones,omitempty"` - // ManagedZonesPerNetwork: Maximum allowed number of managed zones which - // can be attached to a network. ManagedZonesPerNetwork int64 `json:"managedZonesPerNetwork,omitempty"` - // NetworksPerManagedZone: Maximum allowed number of networks to which a - // privately scoped zone can be attached. NetworksPerManagedZone int64 `json:"networksPerManagedZone,omitempty"` - // NetworksPerPolicy: Maximum allowed number of networks per policy. NetworksPerPolicy int64 `json:"networksPerPolicy,omitempty"` - // Policies: Maximum allowed number of policies per project. Policies int64 `json:"policies,omitempty"` - // ResourceRecordsPerRrset: Maximum allowed number of ResourceRecords - // per ResourceRecordSet. ResourceRecordsPerRrset int64 `json:"resourceRecordsPerRrset,omitempty"` - // RrsetAdditionsPerChange: Maximum allowed number of ResourceRecordSets - // to add per ChangesCreateRequest. RrsetAdditionsPerChange int64 `json:"rrsetAdditionsPerChange,omitempty"` - // RrsetDeletionsPerChange: Maximum allowed number of ResourceRecordSets - // to delete per ChangesCreateRequest. RrsetDeletionsPerChange int64 `json:"rrsetDeletionsPerChange,omitempty"` - // RrsetsPerManagedZone: Maximum allowed number of ResourceRecordSets - // per zone in the project. RrsetsPerManagedZone int64 `json:"rrsetsPerManagedZone,omitempty"` - // TargetNameServersPerManagedZone: Maximum allowed number of target - // name servers per managed forwarding zone. TargetNameServersPerManagedZone int64 `json:"targetNameServersPerManagedZone,omitempty"` - // TargetNameServersPerPolicy: Maximum allowed number of alternative - // target name servers per policy. TargetNameServersPerPolicy int64 `json:"targetNameServersPerPolicy,omitempty"` - // TotalRrdataSizePerChange: Maximum allowed size for total rrdata in - // one ChangesCreateRequest in bytes. TotalRrdataSizePerChange int64 `json:"totalRrdataSizePerChange,omitempty"` - // WhitelistedKeySpecs: DNSSEC algorithm and key length types that can - // be used for DnsKeys. WhitelistedKeySpecs []*DnsKeySpec `json:"whitelistedKeySpecs,omitempty"` // ForceSendFields is a list of field names (e.g. @@ -1573,29 +1329,19 @@ func (s *Quota) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ResourceRecordSet: A unit of data that will be returned by the DNS -// servers. type ResourceRecordSet struct { // Kind: Identifies what kind of resource this is. Value: the fixed // string "dns#resourceRecordSet". Kind string `json:"kind,omitempty"` - // Name: For example, www.example.com. Name string `json:"name,omitempty"` - // Rrdatas: As defined in RFC 1035 (section 5) and RFC 1034 (section - // 3.6.1) -- see examples. Rrdatas []string `json:"rrdatas,omitempty"` - // SignatureRrdatas: As defined in RFC 4034 (section 3.2). SignatureRrdatas []string `json:"signatureRrdatas,omitempty"` - // Ttl: Number of seconds that this ResourceRecordSet can be cached by - // resolvers. Ttl int64 `json:"ttl,omitempty"` - // Type: The identifier of a supported record type. See the list of - // Supported DNS record types. Type string `json:"type,omitempty"` // ForceSendFields is a list of field names (e.g. "Kind") to @@ -1627,20 +1373,8 @@ type ResourceRecordSetsListResponse struct { // Kind: Type of resource. Kind string `json:"kind,omitempty"` - // NextPageToken: The presence of this field indicates that there exist - // more results following your last page of results in pagination order. - // To fetch them, make another list request using this value as your - // pagination token. - // - // In this way you can retrieve the complete contents of even very large - // collections one page at a time. However, if the contents of the - // collection change between the first and last paginated list request, - // the set of all elements returned will be an inconsistent view of the - // collection. There is no way to retrieve a consistent snapshot of a - // collection larger than the maximum page size. NextPageToken string `json:"nextPageToken,omitempty"` - // Rrsets: The resource record set resources. Rrsets []*ResourceRecordSet `json:"rrsets,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -1670,11 +1404,7 @@ func (s *ResourceRecordSetsListResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ResponseHeader: Elements common to every response. type ResponseHeader struct { - // OperationId: For mutating operation requests that completed - // successfully. This is the client_operation_id if the client specified - // it, otherwise it is generated by the server (output only). OperationId string `json:"operationId,omitempty"` // ForceSendFields is a list of field names (e.g. "OperationId") to @@ -1712,7 +1442,7 @@ type ChangesCreateCall struct { header_ http.Header } -// Create: Atomically update the ResourceRecordSet collection. +// Create: func (r *ChangesService) Create(project string, managedZone string, change *Change) *ChangesCreateCall { c := &ChangesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -1722,9 +1452,6 @@ func (r *ChangesService) Create(project string, managedZone string, change *Chan } // ClientOperationId sets the optional parameter "clientOperationId": -// For mutating operation requests only. An optional identifier -// specified by the client. Must be unique for operation resources in -// the Operations collection. func (c *ChangesCreateCall) ClientOperationId(clientOperationId string) *ChangesCreateCall { c.urlParams_.Set("clientOperationId", clientOperationId) return c @@ -1757,7 +1484,7 @@ func (c *ChangesCreateCall) Header() http.Header { func (c *ChangesCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200514") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200518") for k, v := range c.header_ { reqHeaders[k] = v } @@ -1822,7 +1549,7 @@ func (c *ChangesCreateCall) Do(opts ...googleapi.CallOption) (*Change, error) { } return ret, nil // { - // "description": "Atomically update the ResourceRecordSet collection.", + // "description": "", // "httpMethod": "POST", // "id": "dns.changes.create", // "parameterOrder": [ @@ -1831,18 +1558,15 @@ func (c *ChangesCreateCall) Do(opts ...googleapi.CallOption) (*Change, error) { // ], // "parameters": { // "clientOperationId": { - // "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", // "location": "query", // "type": "string" // }, // "managedZone": { - // "description": "Identifies the managed zone addressed by this request. Can be the managed zone name or id.", // "location": "path", // "required": true, // "type": "string" // }, // "project": { - // "description": "Identifies the project addressed by this request.", // "location": "path", // "required": true, // "type": "string" @@ -1876,7 +1600,7 @@ type ChangesGetCall struct { header_ http.Header } -// Get: Fetch the representation of an existing Change. +// Get: func (r *ChangesService) Get(project string, managedZone string, changeId string) *ChangesGetCall { c := &ChangesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -1886,9 +1610,6 @@ func (r *ChangesService) Get(project string, managedZone string, changeId string } // ClientOperationId sets the optional parameter "clientOperationId": -// For mutating operation requests only. An optional identifier -// specified by the client. Must be unique for operation resources in -// the Operations collection. func (c *ChangesGetCall) ClientOperationId(clientOperationId string) *ChangesGetCall { c.urlParams_.Set("clientOperationId", clientOperationId) return c @@ -1931,7 +1652,7 @@ func (c *ChangesGetCall) Header() http.Header { func (c *ChangesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200514") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200518") for k, v := range c.header_ { reqHeaders[k] = v } @@ -1995,7 +1716,7 @@ func (c *ChangesGetCall) Do(opts ...googleapi.CallOption) (*Change, error) { } return ret, nil // { - // "description": "Fetch the representation of an existing Change.", + // "description": "", // "httpMethod": "GET", // "id": "dns.changes.get", // "parameterOrder": [ @@ -2005,24 +1726,20 @@ func (c *ChangesGetCall) Do(opts ...googleapi.CallOption) (*Change, error) { // ], // "parameters": { // "changeId": { - // "description": "The identifier of the requested change, from a previous ResourceRecordSetsChangeResponse.", // "location": "path", // "required": true, // "type": "string" // }, // "clientOperationId": { - // "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", // "location": "query", // "type": "string" // }, // "managedZone": { - // "description": "Identifies the managed zone addressed by this request. Can be the managed zone name or id.", // "location": "path", // "required": true, // "type": "string" // }, // "project": { - // "description": "Identifies the project addressed by this request.", // "location": "path", // "required": true, // "type": "string" @@ -2054,7 +1771,7 @@ type ChangesListCall struct { header_ http.Header } -// List: Enumerate Changes to a ResourceRecordSet collection. +// List: func (r *ChangesService) List(project string, managedZone string) *ChangesListCall { c := &ChangesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -2062,24 +1779,19 @@ func (r *ChangesService) List(project string, managedZone string) *ChangesListCa return c } -// MaxResults sets the optional parameter "maxResults": Maximum number -// of results to be returned. If unspecified, the server will decide how -// many results to return. +// MaxResults sets the optional parameter "maxResults": func (c *ChangesListCall) MaxResults(maxResults int64) *ChangesListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c } -// PageToken sets the optional parameter "pageToken": A tag returned by -// a previous list request that was truncated. Use this parameter to -// continue a previous list request. +// PageToken sets the optional parameter "pageToken": func (c *ChangesListCall) PageToken(pageToken string) *ChangesListCall { c.urlParams_.Set("pageToken", pageToken) return c } -// SortBy sets the optional parameter "sortBy": Sorting criterion. The -// only supported value is change sequence. +// SortBy sets the optional parameter "sortBy": // // Possible values: // "changeSequence" (default) @@ -2088,8 +1800,7 @@ func (c *ChangesListCall) SortBy(sortBy string) *ChangesListCall { return c } -// SortOrder sets the optional parameter "sortOrder": Sorting order -// direction: 'ascending' or 'descending'. +// SortOrder sets the optional parameter "sortOrder": func (c *ChangesListCall) SortOrder(sortOrder string) *ChangesListCall { c.urlParams_.Set("sortOrder", sortOrder) return c @@ -2132,7 +1843,7 @@ func (c *ChangesListCall) Header() http.Header { func (c *ChangesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200514") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200518") for k, v := range c.header_ { reqHeaders[k] = v } @@ -2195,7 +1906,7 @@ func (c *ChangesListCall) Do(opts ...googleapi.CallOption) (*ChangesListResponse } return ret, nil // { - // "description": "Enumerate Changes to a ResourceRecordSet collection.", + // "description": "", // "httpMethod": "GET", // "id": "dns.changes.list", // "parameterOrder": [ @@ -2204,31 +1915,26 @@ func (c *ChangesListCall) Do(opts ...googleapi.CallOption) (*ChangesListResponse // ], // "parameters": { // "managedZone": { - // "description": "Identifies the managed zone addressed by this request. Can be the managed zone name or id.", // "location": "path", // "required": true, // "type": "string" // }, // "maxResults": { - // "description": "Optional. Maximum number of results to be returned. If unspecified, the server will decide how many results to return.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "Optional. A tag returned by a previous list request that was truncated. Use this parameter to continue a previous list request.", // "location": "query", // "type": "string" // }, // "project": { - // "description": "Identifies the project addressed by this request.", // "location": "path", // "required": true, // "type": "string" // }, // "sortBy": { // "default": "changeSequence", - // "description": "Sorting criterion. The only supported value is change sequence.", // "enum": [ // "changeSequence" // ], @@ -2239,7 +1945,6 @@ func (c *ChangesListCall) Do(opts ...googleapi.CallOption) (*ChangesListResponse // "type": "string" // }, // "sortOrder": { - // "description": "Sorting order direction: 'ascending' or 'descending'.", // "location": "query", // "type": "string" // } @@ -2292,7 +1997,7 @@ type DnsKeysGetCall struct { header_ http.Header } -// Get: Fetch the representation of an existing DnsKey. +// Get: func (r *DnsKeysService) Get(project string, managedZone string, dnsKeyId string) *DnsKeysGetCall { c := &DnsKeysGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -2302,18 +2007,12 @@ func (r *DnsKeysService) Get(project string, managedZone string, dnsKeyId string } // ClientOperationId sets the optional parameter "clientOperationId": -// For mutating operation requests only. An optional identifier -// specified by the client. Must be unique for operation resources in -// the Operations collection. func (c *DnsKeysGetCall) ClientOperationId(clientOperationId string) *DnsKeysGetCall { c.urlParams_.Set("clientOperationId", clientOperationId) return c } -// DigestType sets the optional parameter "digestType": An optional -// comma-separated list of digest types to compute and display for key -// signing keys. If omitted, the recommended digest type will be -// computed and displayed. +// DigestType sets the optional parameter "digestType": func (c *DnsKeysGetCall) DigestType(digestType string) *DnsKeysGetCall { c.urlParams_.Set("digestType", digestType) return c @@ -2356,7 +2055,7 @@ func (c *DnsKeysGetCall) Header() http.Header { func (c *DnsKeysGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200514") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200518") for k, v := range c.header_ { reqHeaders[k] = v } @@ -2420,7 +2119,7 @@ func (c *DnsKeysGetCall) Do(opts ...googleapi.CallOption) (*DnsKey, error) { } return ret, nil // { - // "description": "Fetch the representation of an existing DnsKey.", + // "description": "", // "httpMethod": "GET", // "id": "dns.dnsKeys.get", // "parameterOrder": [ @@ -2430,29 +2129,24 @@ func (c *DnsKeysGetCall) Do(opts ...googleapi.CallOption) (*DnsKey, error) { // ], // "parameters": { // "clientOperationId": { - // "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", // "location": "query", // "type": "string" // }, // "digestType": { - // "description": "An optional comma-separated list of digest types to compute and display for key signing keys. If omitted, the recommended digest type will be computed and displayed.", // "location": "query", // "type": "string" // }, // "dnsKeyId": { - // "description": "The identifier of the requested DnsKey.", // "location": "path", // "required": true, // "type": "string" // }, // "managedZone": { - // "description": "Identifies the managed zone addressed by this request. Can be the managed zone name or id.", // "location": "path", // "required": true, // "type": "string" // }, // "project": { - // "description": "Identifies the project addressed by this request.", // "location": "path", // "required": true, // "type": "string" @@ -2484,7 +2178,7 @@ type DnsKeysListCall struct { header_ http.Header } -// List: Enumerate DnsKeys to a ResourceRecordSet collection. +// List: func (r *DnsKeysService) List(project string, managedZone string) *DnsKeysListCall { c := &DnsKeysListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -2492,26 +2186,19 @@ func (r *DnsKeysService) List(project string, managedZone string) *DnsKeysListCa return c } -// DigestType sets the optional parameter "digestType": An optional -// comma-separated list of digest types to compute and display for key -// signing keys. If omitted, the recommended digest type will be -// computed and displayed. +// DigestType sets the optional parameter "digestType": func (c *DnsKeysListCall) DigestType(digestType string) *DnsKeysListCall { c.urlParams_.Set("digestType", digestType) return c } -// MaxResults sets the optional parameter "maxResults": Maximum number -// of results to be returned. If unspecified, the server will decide how -// many results to return. +// MaxResults sets the optional parameter "maxResults": func (c *DnsKeysListCall) MaxResults(maxResults int64) *DnsKeysListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c } -// PageToken sets the optional parameter "pageToken": A tag returned by -// a previous list request that was truncated. Use this parameter to -// continue a previous list request. +// PageToken sets the optional parameter "pageToken": func (c *DnsKeysListCall) PageToken(pageToken string) *DnsKeysListCall { c.urlParams_.Set("pageToken", pageToken) return c @@ -2554,7 +2241,7 @@ func (c *DnsKeysListCall) Header() http.Header { func (c *DnsKeysListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200514") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200518") for k, v := range c.header_ { reqHeaders[k] = v } @@ -2617,7 +2304,7 @@ func (c *DnsKeysListCall) Do(opts ...googleapi.CallOption) (*DnsKeysListResponse } return ret, nil // { - // "description": "Enumerate DnsKeys to a ResourceRecordSet collection.", + // "description": "", // "httpMethod": "GET", // "id": "dns.dnsKeys.list", // "parameterOrder": [ @@ -2626,29 +2313,24 @@ func (c *DnsKeysListCall) Do(opts ...googleapi.CallOption) (*DnsKeysListResponse // ], // "parameters": { // "digestType": { - // "description": "An optional comma-separated list of digest types to compute and display for key signing keys. If omitted, the recommended digest type will be computed and displayed.", // "location": "query", // "type": "string" // }, // "managedZone": { - // "description": "Identifies the managed zone addressed by this request. Can be the managed zone name or id.", // "location": "path", // "required": true, // "type": "string" // }, // "maxResults": { - // "description": "Optional. Maximum number of results to be returned. If unspecified, the server will decide how many results to return.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "Optional. A tag returned by a previous list request that was truncated. Use this parameter to continue a previous list request.", // "location": "query", // "type": "string" // }, // "project": { - // "description": "Identifies the project addressed by this request.", // "location": "path", // "required": true, // "type": "string" @@ -2702,7 +2384,7 @@ type ManagedZoneOperationsGetCall struct { header_ http.Header } -// Get: Fetch the representation of an existing Operation. +// Get: func (r *ManagedZoneOperationsService) Get(project string, managedZone string, operation string) *ManagedZoneOperationsGetCall { c := &ManagedZoneOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -2712,9 +2394,6 @@ func (r *ManagedZoneOperationsService) Get(project string, managedZone string, o } // ClientOperationId sets the optional parameter "clientOperationId": -// For mutating operation requests only. An optional identifier -// specified by the client. Must be unique for operation resources in -// the Operations collection. func (c *ManagedZoneOperationsGetCall) ClientOperationId(clientOperationId string) *ManagedZoneOperationsGetCall { c.urlParams_.Set("clientOperationId", clientOperationId) return c @@ -2757,7 +2436,7 @@ func (c *ManagedZoneOperationsGetCall) Header() http.Header { func (c *ManagedZoneOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200514") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200518") for k, v := range c.header_ { reqHeaders[k] = v } @@ -2821,7 +2500,7 @@ func (c *ManagedZoneOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operat } return ret, nil // { - // "description": "Fetch the representation of an existing Operation.", + // "description": "", // "httpMethod": "GET", // "id": "dns.managedZoneOperations.get", // "parameterOrder": [ @@ -2831,24 +2510,20 @@ func (c *ManagedZoneOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operat // ], // "parameters": { // "clientOperationId": { - // "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", // "location": "query", // "type": "string" // }, // "managedZone": { - // "description": "Identifies the managed zone addressed by this request.", // "location": "path", // "required": true, // "type": "string" // }, // "operation": { - // "description": "Identifies the operation addressed by this request.", // "location": "path", // "required": true, // "type": "string" // }, // "project": { - // "description": "Identifies the project addressed by this request.", // "location": "path", // "required": true, // "type": "string" @@ -2880,7 +2555,7 @@ type ManagedZoneOperationsListCall struct { header_ http.Header } -// List: Enumerate Operations for the given ManagedZone. +// List: func (r *ManagedZoneOperationsService) List(project string, managedZone string) *ManagedZoneOperationsListCall { c := &ManagedZoneOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -2888,24 +2563,19 @@ func (r *ManagedZoneOperationsService) List(project string, managedZone string) return c } -// MaxResults sets the optional parameter "maxResults": Maximum number -// of results to be returned. If unspecified, the server will decide how -// many results to return. +// MaxResults sets the optional parameter "maxResults": func (c *ManagedZoneOperationsListCall) MaxResults(maxResults int64) *ManagedZoneOperationsListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c } -// PageToken sets the optional parameter "pageToken": A tag returned by -// a previous list request that was truncated. Use this parameter to -// continue a previous list request. +// PageToken sets the optional parameter "pageToken": func (c *ManagedZoneOperationsListCall) PageToken(pageToken string) *ManagedZoneOperationsListCall { c.urlParams_.Set("pageToken", pageToken) return c } -// SortBy sets the optional parameter "sortBy": Sorting criterion. The -// only supported values are START_TIME and ID. +// SortBy sets the optional parameter "sortBy": // // Possible values: // "id" @@ -2952,7 +2622,7 @@ func (c *ManagedZoneOperationsListCall) Header() http.Header { func (c *ManagedZoneOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200514") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200518") for k, v := range c.header_ { reqHeaders[k] = v } @@ -3016,7 +2686,7 @@ func (c *ManagedZoneOperationsListCall) Do(opts ...googleapi.CallOption) (*Manag } return ret, nil // { - // "description": "Enumerate Operations for the given ManagedZone.", + // "description": "", // "httpMethod": "GET", // "id": "dns.managedZoneOperations.list", // "parameterOrder": [ @@ -3025,31 +2695,26 @@ func (c *ManagedZoneOperationsListCall) Do(opts ...googleapi.CallOption) (*Manag // ], // "parameters": { // "managedZone": { - // "description": "Identifies the managed zone addressed by this request.", // "location": "path", // "required": true, // "type": "string" // }, // "maxResults": { - // "description": "Optional. Maximum number of results to be returned. If unspecified, the server will decide how many results to return.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "Optional. A tag returned by a previous list request that was truncated. Use this parameter to continue a previous list request.", // "location": "query", // "type": "string" // }, // "project": { - // "description": "Identifies the project addressed by this request.", // "location": "path", // "required": true, // "type": "string" // }, // "sortBy": { // "default": "startTime", - // "description": "Sorting criterion. The only supported values are START_TIME and ID.", // "enum": [ // "id", // "startTime" @@ -3108,7 +2773,7 @@ type ManagedZonesCreateCall struct { header_ http.Header } -// Create: Create a new ManagedZone. +// Create: func (r *ManagedZonesService) Create(project string, managedzone *ManagedZone) *ManagedZonesCreateCall { c := &ManagedZonesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -3117,9 +2782,6 @@ func (r *ManagedZonesService) Create(project string, managedzone *ManagedZone) * } // ClientOperationId sets the optional parameter "clientOperationId": -// For mutating operation requests only. An optional identifier -// specified by the client. Must be unique for operation resources in -// the Operations collection. func (c *ManagedZonesCreateCall) ClientOperationId(clientOperationId string) *ManagedZonesCreateCall { c.urlParams_.Set("clientOperationId", clientOperationId) return c @@ -3152,7 +2814,7 @@ func (c *ManagedZonesCreateCall) Header() http.Header { func (c *ManagedZonesCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200514") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200518") for k, v := range c.header_ { reqHeaders[k] = v } @@ -3216,7 +2878,7 @@ func (c *ManagedZonesCreateCall) Do(opts ...googleapi.CallOption) (*ManagedZone, } return ret, nil // { - // "description": "Create a new ManagedZone.", + // "description": "", // "httpMethod": "POST", // "id": "dns.managedZones.create", // "parameterOrder": [ @@ -3224,12 +2886,10 @@ func (c *ManagedZonesCreateCall) Do(opts ...googleapi.CallOption) (*ManagedZone, // ], // "parameters": { // "clientOperationId": { - // "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", // "location": "query", // "type": "string" // }, // "project": { - // "description": "Identifies the project addressed by this request.", // "location": "path", // "required": true, // "type": "string" @@ -3261,7 +2921,7 @@ type ManagedZonesDeleteCall struct { header_ http.Header } -// Delete: Delete a previously created ManagedZone. +// Delete: func (r *ManagedZonesService) Delete(project string, managedZone string) *ManagedZonesDeleteCall { c := &ManagedZonesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -3270,9 +2930,6 @@ func (r *ManagedZonesService) Delete(project string, managedZone string) *Manage } // ClientOperationId sets the optional parameter "clientOperationId": -// For mutating operation requests only. An optional identifier -// specified by the client. Must be unique for operation resources in -// the Operations collection. func (c *ManagedZonesDeleteCall) ClientOperationId(clientOperationId string) *ManagedZonesDeleteCall { c.urlParams_.Set("clientOperationId", clientOperationId) return c @@ -3305,7 +2962,7 @@ func (c *ManagedZonesDeleteCall) Header() http.Header { func (c *ManagedZonesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200514") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200518") for k, v := range c.header_ { reqHeaders[k] = v } @@ -3340,7 +2997,7 @@ func (c *ManagedZonesDeleteCall) Do(opts ...googleapi.CallOption) error { } return nil // { - // "description": "Delete a previously created ManagedZone.", + // "description": "", // "httpMethod": "DELETE", // "id": "dns.managedZones.delete", // "parameterOrder": [ @@ -3349,18 +3006,15 @@ func (c *ManagedZonesDeleteCall) Do(opts ...googleapi.CallOption) error { // ], // "parameters": { // "clientOperationId": { - // "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", // "location": "query", // "type": "string" // }, // "managedZone": { - // "description": "Identifies the managed zone addressed by this request. Can be the managed zone name or id.", // "location": "path", // "required": true, // "type": "string" // }, // "project": { - // "description": "Identifies the project addressed by this request.", // "location": "path", // "required": true, // "type": "string" @@ -3387,7 +3041,7 @@ type ManagedZonesGetCall struct { header_ http.Header } -// Get: Fetch the representation of an existing ManagedZone. +// Get: func (r *ManagedZonesService) Get(project string, managedZone string) *ManagedZonesGetCall { c := &ManagedZonesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -3396,9 +3050,6 @@ func (r *ManagedZonesService) Get(project string, managedZone string) *ManagedZo } // ClientOperationId sets the optional parameter "clientOperationId": -// For mutating operation requests only. An optional identifier -// specified by the client. Must be unique for operation resources in -// the Operations collection. func (c *ManagedZonesGetCall) ClientOperationId(clientOperationId string) *ManagedZonesGetCall { c.urlParams_.Set("clientOperationId", clientOperationId) return c @@ -3441,7 +3092,7 @@ func (c *ManagedZonesGetCall) Header() http.Header { func (c *ManagedZonesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200514") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200518") for k, v := range c.header_ { reqHeaders[k] = v } @@ -3504,7 +3155,7 @@ func (c *ManagedZonesGetCall) Do(opts ...googleapi.CallOption) (*ManagedZone, er } return ret, nil // { - // "description": "Fetch the representation of an existing ManagedZone.", + // "description": "", // "httpMethod": "GET", // "id": "dns.managedZones.get", // "parameterOrder": [ @@ -3513,18 +3164,15 @@ func (c *ManagedZonesGetCall) Do(opts ...googleapi.CallOption) (*ManagedZone, er // ], // "parameters": { // "clientOperationId": { - // "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", // "location": "query", // "type": "string" // }, // "managedZone": { - // "description": "Identifies the managed zone addressed by this request. Can be the managed zone name or id.", // "location": "path", // "required": true, // "type": "string" // }, // "project": { - // "description": "Identifies the project addressed by this request.", // "location": "path", // "required": true, // "type": "string" @@ -3555,32 +3203,26 @@ type ManagedZonesListCall struct { header_ http.Header } -// List: Enumerate ManagedZones that have been created but not yet -// deleted. +// List: func (r *ManagedZonesService) List(project string) *ManagedZonesListCall { c := &ManagedZonesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project return c } -// DnsName sets the optional parameter "dnsName": Restricts the list to -// return only zones with this domain name. +// DnsName sets the optional parameter "dnsName": func (c *ManagedZonesListCall) DnsName(dnsName string) *ManagedZonesListCall { c.urlParams_.Set("dnsName", dnsName) return c } -// MaxResults sets the optional parameter "maxResults": Maximum number -// of results to be returned. If unspecified, the server will decide how -// many results to return. +// MaxResults sets the optional parameter "maxResults": func (c *ManagedZonesListCall) MaxResults(maxResults int64) *ManagedZonesListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c } -// PageToken sets the optional parameter "pageToken": A tag returned by -// a previous list request that was truncated. Use this parameter to -// continue a previous list request. +// PageToken sets the optional parameter "pageToken": func (c *ManagedZonesListCall) PageToken(pageToken string) *ManagedZonesListCall { c.urlParams_.Set("pageToken", pageToken) return c @@ -3623,7 +3265,7 @@ func (c *ManagedZonesListCall) Header() http.Header { func (c *ManagedZonesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200514") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200518") for k, v := range c.header_ { reqHeaders[k] = v } @@ -3685,7 +3327,7 @@ func (c *ManagedZonesListCall) Do(opts ...googleapi.CallOption) (*ManagedZonesLi } return ret, nil // { - // "description": "Enumerate ManagedZones that have been created but not yet deleted.", + // "description": "", // "httpMethod": "GET", // "id": "dns.managedZones.list", // "parameterOrder": [ @@ -3693,23 +3335,19 @@ func (c *ManagedZonesListCall) Do(opts ...googleapi.CallOption) (*ManagedZonesLi // ], // "parameters": { // "dnsName": { - // "description": "Restricts the list to return only zones with this domain name.", // "location": "query", // "type": "string" // }, // "maxResults": { - // "description": "Optional. Maximum number of results to be returned. If unspecified, the server will decide how many results to return.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "Optional. A tag returned by a previous list request that was truncated. Use this parameter to continue a previous list request.", // "location": "query", // "type": "string" // }, // "project": { - // "description": "Identifies the project addressed by this request.", // "location": "path", // "required": true, // "type": "string" @@ -3762,7 +3400,7 @@ type ManagedZonesPatchCall struct { header_ http.Header } -// Patch: Apply a partial update to an existing ManagedZone. +// Patch: func (r *ManagedZonesService) Patch(project string, managedZone string, managedzone *ManagedZone) *ManagedZonesPatchCall { c := &ManagedZonesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -3772,9 +3410,6 @@ func (r *ManagedZonesService) Patch(project string, managedZone string, managedz } // ClientOperationId sets the optional parameter "clientOperationId": -// For mutating operation requests only. An optional identifier -// specified by the client. Must be unique for operation resources in -// the Operations collection. func (c *ManagedZonesPatchCall) ClientOperationId(clientOperationId string) *ManagedZonesPatchCall { c.urlParams_.Set("clientOperationId", clientOperationId) return c @@ -3807,7 +3442,7 @@ func (c *ManagedZonesPatchCall) Header() http.Header { func (c *ManagedZonesPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200514") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200518") for k, v := range c.header_ { reqHeaders[k] = v } @@ -3872,7 +3507,7 @@ func (c *ManagedZonesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, er } return ret, nil // { - // "description": "Apply a partial update to an existing ManagedZone.", + // "description": "", // "httpMethod": "PATCH", // "id": "dns.managedZones.patch", // "parameterOrder": [ @@ -3881,18 +3516,15 @@ func (c *ManagedZonesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, er // ], // "parameters": { // "clientOperationId": { - // "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", // "location": "query", // "type": "string" // }, // "managedZone": { - // "description": "Identifies the managed zone addressed by this request. Can be the managed zone name or id.", // "location": "path", // "required": true, // "type": "string" // }, // "project": { - // "description": "Identifies the project addressed by this request.", // "location": "path", // "required": true, // "type": "string" @@ -3925,7 +3557,7 @@ type ManagedZonesUpdateCall struct { header_ http.Header } -// Update: Update an existing ManagedZone. +// Update: func (r *ManagedZonesService) Update(project string, managedZone string, managedzone *ManagedZone) *ManagedZonesUpdateCall { c := &ManagedZonesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -3935,9 +3567,6 @@ func (r *ManagedZonesService) Update(project string, managedZone string, managed } // ClientOperationId sets the optional parameter "clientOperationId": -// For mutating operation requests only. An optional identifier -// specified by the client. Must be unique for operation resources in -// the Operations collection. func (c *ManagedZonesUpdateCall) ClientOperationId(clientOperationId string) *ManagedZonesUpdateCall { c.urlParams_.Set("clientOperationId", clientOperationId) return c @@ -3970,7 +3599,7 @@ func (c *ManagedZonesUpdateCall) Header() http.Header { func (c *ManagedZonesUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200514") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200518") for k, v := range c.header_ { reqHeaders[k] = v } @@ -4035,7 +3664,7 @@ func (c *ManagedZonesUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, e } return ret, nil // { - // "description": "Update an existing ManagedZone.", + // "description": "", // "httpMethod": "PUT", // "id": "dns.managedZones.update", // "parameterOrder": [ @@ -4044,18 +3673,15 @@ func (c *ManagedZonesUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, e // ], // "parameters": { // "clientOperationId": { - // "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", // "location": "query", // "type": "string" // }, // "managedZone": { - // "description": "Identifies the managed zone addressed by this request. Can be the managed zone name or id.", // "location": "path", // "required": true, // "type": "string" // }, // "project": { - // "description": "Identifies the project addressed by this request.", // "location": "path", // "required": true, // "type": "string" @@ -4087,7 +3713,7 @@ type PoliciesCreateCall struct { header_ http.Header } -// Create: Create a new Policy +// Create: func (r *PoliciesService) Create(project string, policy *Policy) *PoliciesCreateCall { c := &PoliciesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -4096,9 +3722,6 @@ func (r *PoliciesService) Create(project string, policy *Policy) *PoliciesCreate } // ClientOperationId sets the optional parameter "clientOperationId": -// For mutating operation requests only. An optional identifier -// specified by the client. Must be unique for operation resources in -// the Operations collection. func (c *PoliciesCreateCall) ClientOperationId(clientOperationId string) *PoliciesCreateCall { c.urlParams_.Set("clientOperationId", clientOperationId) return c @@ -4131,7 +3754,7 @@ func (c *PoliciesCreateCall) Header() http.Header { func (c *PoliciesCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200514") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200518") for k, v := range c.header_ { reqHeaders[k] = v } @@ -4195,7 +3818,7 @@ func (c *PoliciesCreateCall) Do(opts ...googleapi.CallOption) (*Policy, error) { } return ret, nil // { - // "description": "Create a new Policy", + // "description": "", // "httpMethod": "POST", // "id": "dns.policies.create", // "parameterOrder": [ @@ -4203,12 +3826,10 @@ func (c *PoliciesCreateCall) Do(opts ...googleapi.CallOption) (*Policy, error) { // ], // "parameters": { // "clientOperationId": { - // "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", // "location": "query", // "type": "string" // }, // "project": { - // "description": "Identifies the project addressed by this request.", // "location": "path", // "required": true, // "type": "string" @@ -4240,8 +3861,7 @@ type PoliciesDeleteCall struct { header_ http.Header } -// Delete: Delete a previously created Policy. Will fail if the policy -// is still being referenced by a network. +// Delete: func (r *PoliciesService) Delete(project string, policy string) *PoliciesDeleteCall { c := &PoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -4250,9 +3870,6 @@ func (r *PoliciesService) Delete(project string, policy string) *PoliciesDeleteC } // ClientOperationId sets the optional parameter "clientOperationId": -// For mutating operation requests only. An optional identifier -// specified by the client. Must be unique for operation resources in -// the Operations collection. func (c *PoliciesDeleteCall) ClientOperationId(clientOperationId string) *PoliciesDeleteCall { c.urlParams_.Set("clientOperationId", clientOperationId) return c @@ -4285,7 +3902,7 @@ func (c *PoliciesDeleteCall) Header() http.Header { func (c *PoliciesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200514") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200518") for k, v := range c.header_ { reqHeaders[k] = v } @@ -4320,7 +3937,7 @@ func (c *PoliciesDeleteCall) Do(opts ...googleapi.CallOption) error { } return nil // { - // "description": "Delete a previously created Policy. Will fail if the policy is still being referenced by a network.", + // "description": "", // "httpMethod": "DELETE", // "id": "dns.policies.delete", // "parameterOrder": [ @@ -4329,18 +3946,15 @@ func (c *PoliciesDeleteCall) Do(opts ...googleapi.CallOption) error { // ], // "parameters": { // "clientOperationId": { - // "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", // "location": "query", // "type": "string" // }, // "policy": { - // "description": "User given friendly name of the policy addressed by this request.", // "location": "path", // "required": true, // "type": "string" // }, // "project": { - // "description": "Identifies the project addressed by this request.", // "location": "path", // "required": true, // "type": "string" @@ -4367,7 +3981,7 @@ type PoliciesGetCall struct { header_ http.Header } -// Get: Fetch the representation of an existing Policy. +// Get: func (r *PoliciesService) Get(project string, policy string) *PoliciesGetCall { c := &PoliciesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -4376,9 +3990,6 @@ func (r *PoliciesService) Get(project string, policy string) *PoliciesGetCall { } // ClientOperationId sets the optional parameter "clientOperationId": -// For mutating operation requests only. An optional identifier -// specified by the client. Must be unique for operation resources in -// the Operations collection. func (c *PoliciesGetCall) ClientOperationId(clientOperationId string) *PoliciesGetCall { c.urlParams_.Set("clientOperationId", clientOperationId) return c @@ -4421,7 +4032,7 @@ func (c *PoliciesGetCall) Header() http.Header { func (c *PoliciesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200514") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200518") for k, v := range c.header_ { reqHeaders[k] = v } @@ -4484,7 +4095,7 @@ func (c *PoliciesGetCall) Do(opts ...googleapi.CallOption) (*Policy, error) { } return ret, nil // { - // "description": "Fetch the representation of an existing Policy.", + // "description": "", // "httpMethod": "GET", // "id": "dns.policies.get", // "parameterOrder": [ @@ -4493,18 +4104,15 @@ func (c *PoliciesGetCall) Do(opts ...googleapi.CallOption) (*Policy, error) { // ], // "parameters": { // "clientOperationId": { - // "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", // "location": "query", // "type": "string" // }, // "policy": { - // "description": "User given friendly name of the policy addressed by this request.", // "location": "path", // "required": true, // "type": "string" // }, // "project": { - // "description": "Identifies the project addressed by this request.", // "location": "path", // "required": true, // "type": "string" @@ -4535,24 +4143,20 @@ type PoliciesListCall struct { header_ http.Header } -// List: Enumerate all Policies associated with a project. +// List: func (r *PoliciesService) List(project string) *PoliciesListCall { c := &PoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project return c } -// MaxResults sets the optional parameter "maxResults": Maximum number -// of results to be returned. If unspecified, the server will decide how -// many results to return. +// MaxResults sets the optional parameter "maxResults": func (c *PoliciesListCall) MaxResults(maxResults int64) *PoliciesListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c } -// PageToken sets the optional parameter "pageToken": A tag returned by -// a previous list request that was truncated. Use this parameter to -// continue a previous list request. +// PageToken sets the optional parameter "pageToken": func (c *PoliciesListCall) PageToken(pageToken string) *PoliciesListCall { c.urlParams_.Set("pageToken", pageToken) return c @@ -4595,7 +4199,7 @@ func (c *PoliciesListCall) Header() http.Header { func (c *PoliciesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200514") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200518") for k, v := range c.header_ { reqHeaders[k] = v } @@ -4657,7 +4261,7 @@ func (c *PoliciesListCall) Do(opts ...googleapi.CallOption) (*PoliciesListRespon } return ret, nil // { - // "description": "Enumerate all Policies associated with a project.", + // "description": "", // "httpMethod": "GET", // "id": "dns.policies.list", // "parameterOrder": [ @@ -4665,18 +4269,15 @@ func (c *PoliciesListCall) Do(opts ...googleapi.CallOption) (*PoliciesListRespon // ], // "parameters": { // "maxResults": { - // "description": "Optional. Maximum number of results to be returned. If unspecified, the server will decide how many results to return.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "Optional. A tag returned by a previous list request that was truncated. Use this parameter to continue a previous list request.", // "location": "query", // "type": "string" // }, // "project": { - // "description": "Identifies the project addressed by this request.", // "location": "path", // "required": true, // "type": "string" @@ -4729,7 +4330,7 @@ type PoliciesPatchCall struct { header_ http.Header } -// Patch: Apply a partial update to an existing Policy. +// Patch: func (r *PoliciesService) Patch(project string, policy string, policy2 *Policy) *PoliciesPatchCall { c := &PoliciesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -4739,9 +4340,6 @@ func (r *PoliciesService) Patch(project string, policy string, policy2 *Policy) } // ClientOperationId sets the optional parameter "clientOperationId": -// For mutating operation requests only. An optional identifier -// specified by the client. Must be unique for operation resources in -// the Operations collection. func (c *PoliciesPatchCall) ClientOperationId(clientOperationId string) *PoliciesPatchCall { c.urlParams_.Set("clientOperationId", clientOperationId) return c @@ -4774,7 +4372,7 @@ func (c *PoliciesPatchCall) Header() http.Header { func (c *PoliciesPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200514") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200518") for k, v := range c.header_ { reqHeaders[k] = v } @@ -4839,7 +4437,7 @@ func (c *PoliciesPatchCall) Do(opts ...googleapi.CallOption) (*PoliciesPatchResp } return ret, nil // { - // "description": "Apply a partial update to an existing Policy.", + // "description": "", // "httpMethod": "PATCH", // "id": "dns.policies.patch", // "parameterOrder": [ @@ -4848,18 +4446,15 @@ func (c *PoliciesPatchCall) Do(opts ...googleapi.CallOption) (*PoliciesPatchResp // ], // "parameters": { // "clientOperationId": { - // "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", // "location": "query", // "type": "string" // }, // "policy": { - // "description": "User given friendly name of the policy addressed by this request.", // "location": "path", // "required": true, // "type": "string" // }, // "project": { - // "description": "Identifies the project addressed by this request.", // "location": "path", // "required": true, // "type": "string" @@ -4892,7 +4487,7 @@ type PoliciesUpdateCall struct { header_ http.Header } -// Update: Update an existing Policy. +// Update: func (r *PoliciesService) Update(project string, policy string, policy2 *Policy) *PoliciesUpdateCall { c := &PoliciesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -4902,9 +4497,6 @@ func (r *PoliciesService) Update(project string, policy string, policy2 *Policy) } // ClientOperationId sets the optional parameter "clientOperationId": -// For mutating operation requests only. An optional identifier -// specified by the client. Must be unique for operation resources in -// the Operations collection. func (c *PoliciesUpdateCall) ClientOperationId(clientOperationId string) *PoliciesUpdateCall { c.urlParams_.Set("clientOperationId", clientOperationId) return c @@ -4937,7 +4529,7 @@ func (c *PoliciesUpdateCall) Header() http.Header { func (c *PoliciesUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200514") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200518") for k, v := range c.header_ { reqHeaders[k] = v } @@ -5002,7 +4594,7 @@ func (c *PoliciesUpdateCall) Do(opts ...googleapi.CallOption) (*PoliciesUpdateRe } return ret, nil // { - // "description": "Update an existing Policy.", + // "description": "", // "httpMethod": "PUT", // "id": "dns.policies.update", // "parameterOrder": [ @@ -5011,18 +4603,15 @@ func (c *PoliciesUpdateCall) Do(opts ...googleapi.CallOption) (*PoliciesUpdateRe // ], // "parameters": { // "clientOperationId": { - // "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", // "location": "query", // "type": "string" // }, // "policy": { - // "description": "User given friendly name of the policy addressed by this request.", // "location": "path", // "required": true, // "type": "string" // }, // "project": { - // "description": "Identifies the project addressed by this request.", // "location": "path", // "required": true, // "type": "string" @@ -5054,7 +4643,7 @@ type ProjectsGetCall struct { header_ http.Header } -// Get: Fetch the representation of an existing Project. +// Get: func (r *ProjectsService) Get(project string) *ProjectsGetCall { c := &ProjectsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -5062,9 +4651,6 @@ func (r *ProjectsService) Get(project string) *ProjectsGetCall { } // ClientOperationId sets the optional parameter "clientOperationId": -// For mutating operation requests only. An optional identifier -// specified by the client. Must be unique for operation resources in -// the Operations collection. func (c *ProjectsGetCall) ClientOperationId(clientOperationId string) *ProjectsGetCall { c.urlParams_.Set("clientOperationId", clientOperationId) return c @@ -5107,7 +4693,7 @@ func (c *ProjectsGetCall) Header() http.Header { func (c *ProjectsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200514") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200518") for k, v := range c.header_ { reqHeaders[k] = v } @@ -5169,7 +4755,7 @@ func (c *ProjectsGetCall) Do(opts ...googleapi.CallOption) (*Project, error) { } return ret, nil // { - // "description": "Fetch the representation of an existing Project.", + // "description": "", // "httpMethod": "GET", // "id": "dns.projects.get", // "parameterOrder": [ @@ -5177,12 +4763,10 @@ func (c *ProjectsGetCall) Do(opts ...googleapi.CallOption) (*Project, error) { // ], // "parameters": { // "clientOperationId": { - // "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", // "location": "query", // "type": "string" // }, // "project": { - // "description": "Identifies the project addressed by this request.", // "location": "path", // "required": true, // "type": "string" @@ -5214,8 +4798,7 @@ type ResourceRecordSetsListCall struct { header_ http.Header } -// List: Enumerate ResourceRecordSets that have been created but not yet -// deleted. +// List: func (r *ResourceRecordSetsService) List(project string, managedZone string) *ResourceRecordSetsListCall { c := &ResourceRecordSetsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -5223,32 +4806,25 @@ func (r *ResourceRecordSetsService) List(project string, managedZone string) *Re return c } -// MaxResults sets the optional parameter "maxResults": Maximum number -// of results to be returned. If unspecified, the server will decide how -// many results to return. +// MaxResults sets the optional parameter "maxResults": func (c *ResourceRecordSetsListCall) MaxResults(maxResults int64) *ResourceRecordSetsListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c } -// Name sets the optional parameter "name": Restricts the list to return -// only records with this fully qualified domain name. +// Name sets the optional parameter "name": func (c *ResourceRecordSetsListCall) Name(name string) *ResourceRecordSetsListCall { c.urlParams_.Set("name", name) return c } -// PageToken sets the optional parameter "pageToken": A tag returned by -// a previous list request that was truncated. Use this parameter to -// continue a previous list request. +// PageToken sets the optional parameter "pageToken": func (c *ResourceRecordSetsListCall) PageToken(pageToken string) *ResourceRecordSetsListCall { c.urlParams_.Set("pageToken", pageToken) return c } -// Type sets the optional parameter "type": Restricts the list to return -// only records of this type. If present, the "name" parameter must also -// be present. +// Type sets the optional parameter "type": func (c *ResourceRecordSetsListCall) Type(type_ string) *ResourceRecordSetsListCall { c.urlParams_.Set("type", type_) return c @@ -5291,7 +4867,7 @@ func (c *ResourceRecordSetsListCall) Header() http.Header { func (c *ResourceRecordSetsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200514") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200518") for k, v := range c.header_ { reqHeaders[k] = v } @@ -5354,7 +4930,7 @@ func (c *ResourceRecordSetsListCall) Do(opts ...googleapi.CallOption) (*Resource } return ret, nil // { - // "description": "Enumerate ResourceRecordSets that have been created but not yet deleted.", + // "description": "", // "httpMethod": "GET", // "id": "dns.resourceRecordSets.list", // "parameterOrder": [ @@ -5363,35 +4939,29 @@ func (c *ResourceRecordSetsListCall) Do(opts ...googleapi.CallOption) (*Resource // ], // "parameters": { // "managedZone": { - // "description": "Identifies the managed zone addressed by this request. Can be the managed zone name or id.", // "location": "path", // "required": true, // "type": "string" // }, // "maxResults": { - // "description": "Optional. Maximum number of results to be returned. If unspecified, the server will decide how many results to return.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "name": { - // "description": "Restricts the list to return only records with this fully qualified domain name.", // "location": "query", // "type": "string" // }, // "pageToken": { - // "description": "Optional. A tag returned by a previous list request that was truncated. Use this parameter to continue a previous list request.", // "location": "query", // "type": "string" // }, // "project": { - // "description": "Identifies the project addressed by this request.", // "location": "path", // "required": true, // "type": "string" // }, // "type": { - // "description": "Restricts the list to return only records of this type. If present, the \"name\" parameter must also be present.", // "location": "query", // "type": "string" // } diff --git a/vendor/google.golang.org/api/transport/http/default_transport_go113.go b/vendor/google.golang.org/api/transport/http/default_transport_go113.go new file mode 100644 index 000000000..924f2704d --- /dev/null +++ b/vendor/google.golang.org/api/transport/http/default_transport_go113.go @@ -0,0 +1,20 @@ +// Copyright 2020 Google LLC. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build go1.13 + +package http + +import "net/http" + +// clonedTransport returns the given RoundTripper as a cloned *http.Transport. +// It returns nil if the RoundTripper can't be cloned or coerced to +// *http.Transport. +func clonedTransport(rt http.RoundTripper) *http.Transport { + t, ok := rt.(*http.Transport) + if !ok { + return nil + } + return t.Clone() +} diff --git a/vendor/google.golang.org/api/transport/http/default_transport_not_go113.go b/vendor/google.golang.org/api/transport/http/default_transport_not_go113.go new file mode 100644 index 000000000..3cb16c6cb --- /dev/null +++ b/vendor/google.golang.org/api/transport/http/default_transport_not_go113.go @@ -0,0 +1,15 @@ +// Copyright 2020 Google LLC. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !go1.13 + +package http + +import "net/http" + +// clonedTransport returns the given RoundTripper as a cloned *http.Transport. +// For versions of Go <1.13, this is not supported, so return nil. +func clonedTransport(rt http.RoundTripper) *http.Transport { + return nil +} diff --git a/vendor/google.golang.org/api/transport/http/dial.go b/vendor/google.golang.org/api/transport/http/dial.go index c8d79b876..96cf2e168 100644 --- a/vendor/google.golang.org/api/transport/http/dial.go +++ b/vendor/google.golang.org/api/transport/http/dial.go @@ -11,10 +11,13 @@ import ( "context" "crypto/tls" "errors" + "net" "net/http" "net/url" "os" "strings" + "sync" + "time" "go.opencensus.io/plugin/ochttp" "golang.org/x/oauth2" @@ -162,23 +165,57 @@ var appengineUrlfetchHook func(context.Context) http.RoundTripper // defaultBaseTransport returns the base HTTP transport. // On App Engine, this is urlfetch.Transport. -// If TLSCertificate is available, return a custom Transport with TLSClientConfig. -// Otherwise, return http.DefaultTransport. +// Otherwise, use a default transport, taking most defaults from +// http.DefaultTransport. +// If TLSCertificate is available, set TLSClientConfig as well. func defaultBaseTransport(ctx context.Context, clientCertSource cert.Source) http.RoundTripper { if appengineUrlfetchHook != nil { return appengineUrlfetchHook(ctx) } + // Copy http.DefaultTransport except for MaxIdleConnsPerHost setting, + // which is increased due to reported performance issues under load in the GCS + // client. Transport.Clone is only available in Go 1.13 and up. + trans := clonedTransport(http.DefaultTransport) + if trans == nil { + trans = fallbackBaseTransport() + } + trans.MaxIdleConnsPerHost = 100 + if clientCertSource != nil { - // TODO (cbro): copy default transport settings from http.DefaultTransport - return &http.Transport{ - TLSClientConfig: &tls.Config{ - GetClientCertificate: clientCertSource, - }, + trans.TLSClientConfig = &tls.Config{ + GetClientCertificate: clientCertSource, } } - return http.DefaultTransport + return trans +} + +var fallback struct { + *http.Transport + sync.Once +} + +// fallbackBaseTransport is used in 2 && emitter.states[len(emitter.states)-1] == yaml_EMIT_BLOCK_SEQUENCE_ITEM_STATE { - emitter.indent -= 2 + // [Go] This was changed so that indentations are more regular. + if emitter.states[len(emitter.states)-1] == yaml_EMIT_BLOCK_SEQUENCE_ITEM_STATE { + // The first indent inside a sequence will just skip the "- " indicator. + emitter.indent += 2 + } else { + // Everything else aligns to the chosen indentation. + emitter.indent = emitter.best_indent*((emitter.indent+emitter.best_indent)/emitter.best_indent) } } return true @@ -725,16 +728,9 @@ func yaml_emitter_emit_flow_mapping_value(emitter *yaml_emitter_t, event *yaml_e // Expect a block item node. func yaml_emitter_emit_block_sequence_item(emitter *yaml_emitter_t, event *yaml_event_t, first bool) bool { if first { - // [Go] The original logic here would not indent the sequence when - // inside a mapping. In Go we always indent it. - indentless := false - original := emitter.indent - if !yaml_emitter_increase_indent(emitter, false, indentless) { + if !yaml_emitter_increase_indent(emitter, false, false) { return false } - if emitter.indent > original+2 { - emitter.indent -= 2 - } } if event.typ == yaml_SEQUENCE_END_EVENT { emitter.indent = emitter.indents[len(emitter.indents)-1] @@ -785,6 +781,13 @@ func yaml_emitter_emit_block_mapping_key(emitter *yaml_emitter_t, event *yaml_ev if !yaml_emitter_write_indent(emitter) { return false } + if len(emitter.line_comment) > 0 { + // [Go] A line comment was provided for the key. That's unusual as the + // scanner associates line comments with the value. Either way, + // save the line comment and render it appropriately later. + emitter.key_line_comment = emitter.line_comment + emitter.line_comment = nil + } if yaml_emitter_check_simple_key(emitter) { emitter.states = append(emitter.states, yaml_EMIT_BLOCK_MAPPING_SIMPLE_VALUE_STATE) return yaml_emitter_emit_node(emitter, event, false, false, true, true) @@ -810,6 +813,29 @@ func yaml_emitter_emit_block_mapping_value(emitter *yaml_emitter_t, event *yaml_ return false } } + if len(emitter.key_line_comment) > 0 { + // [Go] A line comment was previously provided for the key. Handle it before + // the value so the inline comments are placed correctly. + if yaml_emitter_silent_nil_event(emitter, event) && len(emitter.line_comment) == 0 { + // Nothing other than the line comment will be written on the line. + emitter.line_comment = emitter.key_line_comment + emitter.key_line_comment = nil + } else { + // An actual value is coming, so emit the comment line. + emitter.line_comment, emitter.key_line_comment = emitter.key_line_comment, emitter.line_comment + if !yaml_emitter_process_line_comment(emitter) { + return false + } + emitter.line_comment, emitter.key_line_comment = emitter.key_line_comment, emitter.line_comment + // Indent in unless it's a block that will reindent anyway. + if event.sequence_style() == yaml_FLOW_SEQUENCE_STYLE || (event.typ != yaml_MAPPING_START_EVENT && event.typ != yaml_SEQUENCE_START_EVENT) { + emitter.indent = emitter.best_indent*((emitter.indent+emitter.best_indent)/emitter.best_indent) + if !yaml_emitter_write_indent(emitter) { + return false + } + } + } + } emitter.states = append(emitter.states, yaml_EMIT_BLOCK_MAPPING_KEY_STATE) if !yaml_emitter_emit_node(emitter, event, false, false, true, false) { return false @@ -823,6 +849,10 @@ func yaml_emitter_emit_block_mapping_value(emitter *yaml_emitter_t, event *yaml_ return true } +func yaml_emitter_silent_nil_event(emitter *yaml_emitter_t, event *yaml_event_t) bool { + return event.typ == yaml_SCALAR_EVENT && event.implicit && !emitter.canonical && len(emitter.scalar_data.value) == 0 +} + // Expect a node. func yaml_emitter_emit_node(emitter *yaml_emitter_t, event *yaml_event_t, root bool, sequence bool, mapping bool, simple_key bool) bool { diff --git a/vendor/gopkg.in/yaml.v3/encode.go b/vendor/gopkg.in/yaml.v3/encode.go index e998db941..45e8d1e1b 100644 --- a/vendor/gopkg.in/yaml.v3/encode.go +++ b/vendor/gopkg.in/yaml.v3/encode.go @@ -425,18 +425,23 @@ func (e *encoder) nodev(in reflect.Value) { } func (e *encoder) node(node *Node, tail string) { + // Zero nodes behave as nil. + if node.Kind == 0 && node.IsZero() { + e.nilv() + return + } + // If the tag was not explicitly requested, and dropping it won't change the // implicit tag of the value, don't include it in the presentation. var tag = node.Tag var stag = shortTag(tag) - var rtag string var forceQuoting bool if tag != "" && node.Style&TaggedStyle == 0 { if node.Kind == ScalarNode { if stag == strTag && node.Style&(SingleQuotedStyle|DoubleQuotedStyle|LiteralStyle|FoldedStyle) != 0 { tag = "" } else { - rtag, _ = resolve("", node.Value) + rtag, _ := resolve("", node.Value) if rtag == stag { tag = "" } else if stag == strTag { @@ -445,6 +450,7 @@ func (e *encoder) node(node *Node, tail string) { } } } else { + var rtag string switch node.Kind { case MappingNode: rtag = mapTag @@ -474,7 +480,7 @@ func (e *encoder) node(node *Node, tail string) { if node.Style&FlowStyle != 0 { style = yaml_FLOW_SEQUENCE_STYLE } - e.must(yaml_sequence_start_event_initialize(&e.event, []byte(node.Anchor), []byte(tag), tag == "", style)) + e.must(yaml_sequence_start_event_initialize(&e.event, []byte(node.Anchor), []byte(longTag(tag)), tag == "", style)) e.event.head_comment = []byte(node.HeadComment) e.emit() for _, node := range node.Content { @@ -490,7 +496,7 @@ func (e *encoder) node(node *Node, tail string) { if node.Style&FlowStyle != 0 { style = yaml_FLOW_MAPPING_STYLE } - yaml_mapping_start_event_initialize(&e.event, []byte(node.Anchor), []byte(tag), tag == "", style) + yaml_mapping_start_event_initialize(&e.event, []byte(node.Anchor), []byte(longTag(tag)), tag == "", style) e.event.tail_comment = []byte(tail) e.event.head_comment = []byte(node.HeadComment) e.emit() @@ -531,11 +537,11 @@ func (e *encoder) node(node *Node, tail string) { case ScalarNode: value := node.Value if !utf8.ValidString(value) { - if tag == binaryTag { + if stag == binaryTag { failf("explicitly tagged !!binary data must be base64-encoded") } - if tag != "" { - failf("cannot marshal invalid UTF-8 data as %s", shortTag(tag)) + if stag != "" { + failf("cannot marshal invalid UTF-8 data as %s", stag) } // It can't be encoded directly as YAML so use a binary tag // and encode it as base64. @@ -560,5 +566,7 @@ func (e *encoder) node(node *Node, tail string) { } e.emitScalar(value, node.Anchor, tag, style, []byte(node.HeadComment), []byte(node.LineComment), []byte(node.FootComment), []byte(tail)) + default: + failf("cannot encode node with unknown kind %d", node.Kind) } } diff --git a/vendor/gopkg.in/yaml.v3/parserc.go b/vendor/gopkg.in/yaml.v3/parserc.go index aea9050b8..726b3abea 100644 --- a/vendor/gopkg.in/yaml.v3/parserc.go +++ b/vendor/gopkg.in/yaml.v3/parserc.go @@ -648,6 +648,10 @@ func yaml_parser_parse_node(parser *yaml_parser_t, event *yaml_event_t, block, i implicit: implicit, style: yaml_style_t(yaml_BLOCK_MAPPING_STYLE), } + if parser.stem_comment != nil { + event.head_comment = parser.stem_comment + parser.stem_comment = nil + } return true } if len(anchor) > 0 || len(tag) > 0 { @@ -700,9 +704,10 @@ func yaml_parser_parse_block_sequence_entry(parser *yaml_parser_t, event *yaml_e if token == nil { return false } - if prior_head > 0 && token.typ == yaml_BLOCK_SEQUENCE_START_TOKEN { - // [Go] It's a sequence under a sequence entry, so the former head comment - // is for the list itself, not the first list item under it. + if prior_head > 0 && (token.typ == yaml_BLOCK_SEQUENCE_START_TOKEN || token.typ == yaml_BLOCK_MAPPING_START_TOKEN) { + // [Go] It's a sequence or map under a sequence entry, so the former + // head comment is for the underlying sequence or map itself, + // not its first item as the normal logic handles it. parser.stem_comment = parser.head_comment[:prior_head] if len(parser.head_comment) == prior_head { parser.head_comment = nil @@ -711,7 +716,6 @@ func yaml_parser_parse_block_sequence_entry(parser *yaml_parser_t, event *yaml_e // further bytes to the prefix in the stem_comment slice above. parser.head_comment = append([]byte(nil), parser.head_comment[prior_head+1:]...) } - } if token.typ != yaml_BLOCK_ENTRY_TOKEN && token.typ != yaml_BLOCK_END_TOKEN { parser.states = append(parser.states, yaml_PARSE_BLOCK_SEQUENCE_ENTRY_STATE) diff --git a/vendor/gopkg.in/yaml.v3/scannerc.go b/vendor/gopkg.in/yaml.v3/scannerc.go index 579ceb1bd..d9a539c39 100644 --- a/vendor/gopkg.in/yaml.v3/scannerc.go +++ b/vendor/gopkg.in/yaml.v3/scannerc.go @@ -749,6 +749,11 @@ func yaml_parser_fetch_next_token(parser *yaml_parser_t) (ok bool) { if !ok { return } + if len(parser.tokens) > 0 && parser.tokens[len(parser.tokens)-1].typ == yaml_BLOCK_ENTRY_TOKEN { + // Sequence indicators alone have no line comments. It becomes + // a head comment for whatever follows. + return + } if !yaml_parser_scan_line_comment(parser, comment_mark) { ok = false return @@ -2856,13 +2861,12 @@ func yaml_parser_scan_line_comment(parser *yaml_parser_t, token_mark yaml_mark_t return false } skip_line(parser) - } else { - if parser.mark.index >= seen { - if len(text) == 0 { - start_mark = parser.mark - } - text = append(text, parser.buffer[parser.buffer_pos]) + } else if parser.mark.index >= seen { + if len(text) == 0 { + start_mark = parser.mark } + text = read(parser, text) + } else { skip(parser) } } diff --git a/vendor/gopkg.in/yaml.v3/yaml.go b/vendor/gopkg.in/yaml.v3/yaml.go index b5d35a50d..6ec434623 100644 --- a/vendor/gopkg.in/yaml.v3/yaml.go +++ b/vendor/gopkg.in/yaml.v3/yaml.go @@ -89,7 +89,7 @@ func Unmarshal(in []byte, out interface{}) (err error) { return unmarshal(in, out, false) } -// A Decorder reads and decodes YAML values from an input stream. +// A Decoder reads and decodes YAML values from an input stream. type Decoder struct { parser *parser knownFields bool @@ -194,7 +194,7 @@ func unmarshal(in []byte, out interface{}, strict bool) (err error) { // Zero valued structs will be omitted if all their public // fields are zero, unless they implement an IsZero // method (see the IsZeroer interface type), in which -// case the field will be included if that method returns true. +// case the field will be excluded if IsZero returns true. // // flow Marshal using a flow style (useful for structs, // sequences and maps). @@ -252,6 +252,24 @@ func (e *Encoder) Encode(v interface{}) (err error) { return nil } +// Encode encodes value v and stores its representation in n. +// +// See the documentation for Marshal for details about the +// conversion of Go values into YAML. +func (n *Node) Encode(v interface{}) (err error) { + defer handleErr(&err) + e := newEncoder() + defer e.destroy() + e.marshalDoc("", reflect.ValueOf(v)) + e.finish() + p := newParser(e.out) + p.textless = true + defer p.destroy() + doc := p.parse() + *n = *doc.Content[0] + return nil +} + // SetIndent changes the used indentation used when encoding. func (e *Encoder) SetIndent(spaces int) { if spaces < 0 { @@ -391,6 +409,13 @@ type Node struct { Column int } +// IsZero returns whether the node has all of its fields unset. +func (n *Node) IsZero() bool { + return n.Kind == 0 && n.Style == 0 && n.Tag == "" && n.Value == "" && n.Anchor == "" && n.Alias == nil && n.Content == nil && + n.HeadComment == "" && n.LineComment == "" && n.FootComment == "" && n.Line == 0 && n.Column == 0 +} + + // LongTag returns the long form of the tag that indicates the data type for // the node. If the Tag field isn't explicitly defined, one will be computed // based on the node properties. diff --git a/vendor/gopkg.in/yaml.v3/yamlh.go b/vendor/gopkg.in/yaml.v3/yamlh.go index 2719cfbb0..7c6d00770 100644 --- a/vendor/gopkg.in/yaml.v3/yamlh.go +++ b/vendor/gopkg.in/yaml.v3/yamlh.go @@ -787,6 +787,8 @@ type yaml_emitter_t struct { foot_comment []byte tail_comment []byte + key_line_comment []byte + // Dumper stuff opened bool // If the stream was already opened? diff --git a/vendor/modules.txt b/vendor/modules.txt index 77c0f610d..928e468a5 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -239,6 +239,8 @@ github.com/pierrec/lz4/internal/xxh32 github.com/pkg/errors # github.com/pmezard/go-difflib v1.0.0 github.com/pmezard/go-difflib/difflib +# github.com/psampaz/go-mod-outdated v0.6.0 +## explicit # github.com/renier/xmlrpc v0.0.0-20170708154548-ce4a1a486c03 ## explicit github.com/renier/xmlrpc @@ -271,7 +273,9 @@ github.com/softlayer/softlayer-go/filter github.com/softlayer/softlayer-go/services github.com/softlayer/softlayer-go/session github.com/softlayer/softlayer-go/sl -# github.com/stretchr/testify v1.6.0 +# github.com/stretchr/objx v0.2.0 +## explicit +# github.com/stretchr/testify v1.6.1 ## explicit github.com/stretchr/testify/assert # github.com/tdewolff/minify v2.3.6+incompatible @@ -327,7 +331,7 @@ golang.org/x/crypto/pkcs12/internal/rc2 ## explicit golang.org/x/mod/module golang.org/x/mod/semver -# golang.org/x/net v0.0.0-20200528225125-3c3fba18258b +# golang.org/x/net v0.0.0-20200602114024-627f9648deb9 ## explicit golang.org/x/net/bpf golang.org/x/net/context @@ -367,7 +371,7 @@ golang.org/x/text/unicode/bidi golang.org/x/text/unicode/norm # golang.org/x/time v0.0.0-20191024005414-555d28b269f0 golang.org/x/time/rate -# golang.org/x/tools v0.0.0-20200522201501-cb1345f3a375 +# golang.org/x/tools v0.0.0-20200609164405-eb789aa7ce50 ## explicit golang.org/x/tools/go/ast/astutil golang.org/x/tools/imports @@ -382,7 +386,7 @@ golang.org/x/tools/internal/imports # golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 golang.org/x/xerrors golang.org/x/xerrors/internal -# google.golang.org/api v0.25.0 +# google.golang.org/api v0.26.0 ## explicit google.golang.org/api/dns/v1 google.golang.org/api/googleapi @@ -502,6 +506,8 @@ gopkg.in/square/go-jose.v2/jwt # gopkg.in/yaml.v2 v2.3.0 ## explicit gopkg.in/yaml.v2 -# gopkg.in/yaml.v3 v3.0.0-20200506231410-2ff61e1afc86 +# gopkg.in/yaml.v3 v3.0.0-20200605160147-a5ece683394c ## explicit gopkg.in/yaml.v3 +# honnef.co/go/tools v0.0.1-2020.1.4 +## explicit