...

Source file src/google.golang.org/api/dns/v2beta1/dns-gen.go

Documentation: google.golang.org/api/dns/v2beta1

     1  // Copyright 2020 Google LLC.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  // Code generated file. DO NOT EDIT.
     6  
     7  // Package dns provides access to the Cloud DNS API.
     8  //
     9  // For product documentation, see: http://developers.google.com/cloud-dns
    10  //
    11  // # Creating a client
    12  //
    13  // Usage example:
    14  //
    15  //	import "google.golang.org/api/dns/v2beta1"
    16  //	...
    17  //	ctx := context.Background()
    18  //	dnsService, err := dns.NewService(ctx)
    19  //
    20  // In this example, Google Application Default Credentials are used for authentication.
    21  //
    22  // For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
    23  //
    24  // # Other authentication options
    25  //
    26  // By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes:
    27  //
    28  //	dnsService, err := dns.NewService(ctx, option.WithScopes(dns.NdevClouddnsReadwriteScope))
    29  //
    30  // To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:
    31  //
    32  //	dnsService, err := dns.NewService(ctx, option.WithAPIKey("AIza..."))
    33  //
    34  // To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource:
    35  //
    36  //	config := &oauth2.Config{...}
    37  //	// ...
    38  //	token, err := config.Exchange(ctx, ...)
    39  //	dnsService, err := dns.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
    40  //
    41  // See https://godoc.org/google.golang.org/api/option/ for details on options.
    42  package dns // import "google.golang.org/api/dns/v2beta1"
    43  
    44  import (
    45  	"bytes"
    46  	"context"
    47  	"encoding/json"
    48  	"errors"
    49  	"fmt"
    50  	"io"
    51  	"net/http"
    52  	"net/url"
    53  	"strconv"
    54  	"strings"
    55  
    56  	googleapi "google.golang.org/api/googleapi"
    57  	gensupport "google.golang.org/api/internal/gensupport"
    58  	option "google.golang.org/api/option"
    59  	internaloption "google.golang.org/api/option/internaloption"
    60  	htransport "google.golang.org/api/transport/http"
    61  )
    62  
    63  // Always reference these packages, just in case the auto-generated code
    64  // below doesn't.
    65  var _ = bytes.NewBuffer
    66  var _ = strconv.Itoa
    67  var _ = fmt.Sprintf
    68  var _ = json.NewDecoder
    69  var _ = io.Copy
    70  var _ = url.Parse
    71  var _ = gensupport.MarshalJSON
    72  var _ = googleapi.Version
    73  var _ = errors.New
    74  var _ = strings.Replace
    75  var _ = context.Canceled
    76  var _ = internaloption.WithDefaultEndpoint
    77  
    78  const apiId = "dns:v2beta1"
    79  const apiName = "dns"
    80  const apiVersion = "v2beta1"
    81  const basePath = "https://dns.googleapis.com/"
    82  const mtlsBasePath = "https://dns.mtls.googleapis.com/"
    83  
    84  // OAuth2 scopes used by this API.
    85  const (
    86  	// View and manage your data across Google Cloud Platform services
    87  	CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
    88  
    89  	// View your data across Google Cloud Platform services
    90  	CloudPlatformReadOnlyScope = "https://www.googleapis.com/auth/cloud-platform.read-only"
    91  
    92  	// View your DNS records hosted by Google Cloud DNS
    93  	NdevClouddnsReadonlyScope = "https://www.googleapis.com/auth/ndev.clouddns.readonly"
    94  
    95  	// View and manage your DNS records hosted by Google Cloud DNS
    96  	NdevClouddnsReadwriteScope = "https://www.googleapis.com/auth/ndev.clouddns.readwrite"
    97  )
    98  
    99  // NewService creates a new Service.
   100  func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
   101  	scopesOption := option.WithScopes(
   102  		"https://www.googleapis.com/auth/cloud-platform",
   103  		"https://www.googleapis.com/auth/cloud-platform.read-only",
   104  		"https://www.googleapis.com/auth/ndev.clouddns.readonly",
   105  		"https://www.googleapis.com/auth/ndev.clouddns.readwrite",
   106  	)
   107  	// NOTE: prepend, so we don't override user-specified scopes.
   108  	opts = append([]option.ClientOption{scopesOption}, opts...)
   109  	opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
   110  	opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
   111  	client, endpoint, err := htransport.NewClient(ctx, opts...)
   112  	if err != nil {
   113  		return nil, err
   114  	}
   115  	s, err := New(client)
   116  	if err != nil {
   117  		return nil, err
   118  	}
   119  	if endpoint != "" {
   120  		s.BasePath = endpoint
   121  	}
   122  	return s, nil
   123  }
   124  
   125  // New creates a new Service. It uses the provided http.Client for requests.
   126  //
   127  // Deprecated: please use NewService instead.
   128  // To provide a custom HTTP client, use option.WithHTTPClient.
   129  // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
   130  func New(client *http.Client) (*Service, error) {
   131  	if client == nil {
   132  		return nil, errors.New("client is nil")
   133  	}
   134  	s := &Service{client: client, BasePath: basePath}
   135  	s.Changes = NewChangesService(s)
   136  	s.DnsKeys = NewDnsKeysService(s)
   137  	s.ManagedZoneOperations = NewManagedZoneOperationsService(s)
   138  	s.ManagedZones = NewManagedZonesService(s)
   139  	s.Policies = NewPoliciesService(s)
   140  	s.Projects = NewProjectsService(s)
   141  	s.ResourceRecordSets = NewResourceRecordSetsService(s)
   142  	return s, nil
   143  }
   144  
   145  type Service struct {
   146  	client    *http.Client
   147  	BasePath  string // API endpoint base URL
   148  	UserAgent string // optional additional User-Agent fragment
   149  
   150  	Changes *ChangesService
   151  
   152  	DnsKeys *DnsKeysService
   153  
   154  	ManagedZoneOperations *ManagedZoneOperationsService
   155  
   156  	ManagedZones *ManagedZonesService
   157  
   158  	Policies *PoliciesService
   159  
   160  	Projects *ProjectsService
   161  
   162  	ResourceRecordSets *ResourceRecordSetsService
   163  }
   164  
   165  func (s *Service) userAgent() string {
   166  	if s.UserAgent == "" {
   167  		return googleapi.UserAgent
   168  	}
   169  	return googleapi.UserAgent + " " + s.UserAgent
   170  }
   171  
   172  func NewChangesService(s *Service) *ChangesService {
   173  	rs := &ChangesService{s: s}
   174  	return rs
   175  }
   176  
   177  type ChangesService struct {
   178  	s *Service
   179  }
   180  
   181  func NewDnsKeysService(s *Service) *DnsKeysService {
   182  	rs := &DnsKeysService{s: s}
   183  	return rs
   184  }
   185  
   186  type DnsKeysService struct {
   187  	s *Service
   188  }
   189  
   190  func NewManagedZoneOperationsService(s *Service) *ManagedZoneOperationsService {
   191  	rs := &ManagedZoneOperationsService{s: s}
   192  	return rs
   193  }
   194  
   195  type ManagedZoneOperationsService struct {
   196  	s *Service
   197  }
   198  
   199  func NewManagedZonesService(s *Service) *ManagedZonesService {
   200  	rs := &ManagedZonesService{s: s}
   201  	return rs
   202  }
   203  
   204  type ManagedZonesService struct {
   205  	s *Service
   206  }
   207  
   208  func NewPoliciesService(s *Service) *PoliciesService {
   209  	rs := &PoliciesService{s: s}
   210  	return rs
   211  }
   212  
   213  type PoliciesService struct {
   214  	s *Service
   215  }
   216  
   217  func NewProjectsService(s *Service) *ProjectsService {
   218  	rs := &ProjectsService{s: s}
   219  	return rs
   220  }
   221  
   222  type ProjectsService struct {
   223  	s *Service
   224  }
   225  
   226  func NewResourceRecordSetsService(s *Service) *ResourceRecordSetsService {
   227  	rs := &ResourceRecordSetsService{s: s}
   228  	return rs
   229  }
   230  
   231  type ResourceRecordSetsService struct {
   232  	s *Service
   233  }
   234  
   235  // Change: A Change represents a set of ResourceRecordSet additions and
   236  // deletions applied atomically to a ManagedZone. ResourceRecordSets
   237  // within a ManagedZone are modified by creating a new Change element in
   238  // the Changes collection. In turn the Changes collection also records
   239  // the past modifications to the ResourceRecordSets in a ManagedZone.
   240  // The current state of the ManagedZone is the sum effect of applying
   241  // all Change elements in the Changes collection in sequence.
   242  type Change struct {
   243  	// Additions: Which ResourceRecordSets to add?
   244  	Additions []*ResourceRecordSet `json:"additions,omitempty"`
   245  
   246  	// Deletions: Which ResourceRecordSets to remove? Must match existing
   247  	// data exactly.
   248  	Deletions []*ResourceRecordSet `json:"deletions,omitempty"`
   249  
   250  	// Id: Unique identifier for the resource; defined by the server (output
   251  	// only).
   252  	Id string `json:"id,omitempty"`
   253  
   254  	// IsServing: If the DNS queries for the zone will be served.
   255  	IsServing bool `json:"isServing,omitempty"`
   256  
   257  	Kind string `json:"kind,omitempty"`
   258  
   259  	// StartTime: The time that this operation was started by the server
   260  	// (output only). This is in RFC3339 text format.
   261  	StartTime string `json:"startTime,omitempty"`
   262  
   263  	// Status: Status of the operation (output only). A status of "done"
   264  	// means that the request to update the authoritative servers has been
   265  	// sent but the servers might not be updated yet.
   266  	//
   267  	// Possible values:
   268  	//   "PENDING"
   269  	//   "DONE"
   270  	Status string `json:"status,omitempty"`
   271  
   272  	// ServerResponse contains the HTTP response code and headers from the
   273  	// server.
   274  	googleapi.ServerResponse `json:"-"`
   275  
   276  	// ForceSendFields is a list of field names (e.g. "Additions") to
   277  	// unconditionally include in API requests. By default, fields with
   278  	// empty values are omitted from API requests. However, any non-pointer,
   279  	// non-interface field appearing in ForceSendFields will be sent to the
   280  	// server regardless of whether the field is empty or not. This may be
   281  	// used to include empty fields in Patch requests.
   282  	ForceSendFields []string `json:"-"`
   283  
   284  	// NullFields is a list of field names (e.g. "Additions") to include in
   285  	// API requests with the JSON null value. By default, fields with empty
   286  	// values are omitted from API requests. However, any field with an
   287  	// empty value appearing in NullFields will be sent to the server as
   288  	// null. It is an error if a field in this list has a non-empty value.
   289  	// This may be used to include null fields in Patch requests.
   290  	NullFields []string `json:"-"`
   291  }
   292  
   293  func (s *Change) MarshalJSON() ([]byte, error) {
   294  	type NoMethod Change
   295  	raw := NoMethod(*s)
   296  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   297  }
   298  
   299  // ChangesListResponse: The response to a request to enumerate Changes
   300  // to a ResourceRecordSets collection.
   301  type ChangesListResponse struct {
   302  	// Changes: The requested changes.
   303  	Changes []*Change `json:"changes,omitempty"`
   304  
   305  	Header *ResponseHeader `json:"header,omitempty"`
   306  
   307  	// Kind: Type of resource.
   308  	Kind string `json:"kind,omitempty"`
   309  
   310  	// NextPageToken: The presence of this field indicates that there exist
   311  	// more results following your last page of results in pagination order.
   312  	// To fetch them, make another list request using this value as your
   313  	// pagination token. In this way you can retrieve the complete contents
   314  	// of even very large collections one page at a time. However, if the
   315  	// contents of the collection change between the first and last
   316  	// paginated list request, the set of all elements returned will be an
   317  	// inconsistent view of the collection. There is no way to retrieve a
   318  	// "snapshot" of collections larger than the maximum page size.
   319  	NextPageToken string `json:"nextPageToken,omitempty"`
   320  
   321  	// ServerResponse contains the HTTP response code and headers from the
   322  	// server.
   323  	googleapi.ServerResponse `json:"-"`
   324  
   325  	// ForceSendFields is a list of field names (e.g. "Changes") to
   326  	// unconditionally include in API requests. By default, fields with
   327  	// empty values are omitted from API requests. However, any non-pointer,
   328  	// non-interface field appearing in ForceSendFields will be sent to the
   329  	// server regardless of whether the field is empty or not. This may be
   330  	// used to include empty fields in Patch requests.
   331  	ForceSendFields []string `json:"-"`
   332  
   333  	// NullFields is a list of field names (e.g. "Changes") to include in
   334  	// API requests with the JSON null value. By default, fields with empty
   335  	// values are omitted from API requests. However, any field with an
   336  	// empty value appearing in NullFields will be sent to the server as
   337  	// null. It is an error if a field in this list has a non-empty value.
   338  	// This may be used to include null fields in Patch requests.
   339  	NullFields []string `json:"-"`
   340  }
   341  
   342  func (s *ChangesListResponse) MarshalJSON() ([]byte, error) {
   343  	type NoMethod ChangesListResponse
   344  	raw := NoMethod(*s)
   345  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   346  }
   347  
   348  // DnsKey: A DNSSEC key pair.
   349  type DnsKey struct {
   350  	// Algorithm: String mnemonic specifying the DNSSEC algorithm of this
   351  	// key. Immutable after creation time.
   352  	//
   353  	// Possible values:
   354  	//   "RSASHA1"
   355  	//   "RSASHA256"
   356  	//   "RSASHA512"
   357  	//   "ECDSAP256SHA256"
   358  	//   "ECDSAP384SHA384"
   359  	Algorithm string `json:"algorithm,omitempty"`
   360  
   361  	// CreationTime: The time that this resource was created in the control
   362  	// plane. This is in RFC3339 text format. Output only.
   363  	CreationTime string `json:"creationTime,omitempty"`
   364  
   365  	// Description: A mutable string of at most 1024 characters associated
   366  	// with this resource for the user's convenience. Has no effect on the
   367  	// resource's function.
   368  	Description string `json:"description,omitempty"`
   369  
   370  	// Digests: Cryptographic hashes of the DNSKEY resource record
   371  	// associated with this DnsKey. These digests are needed to construct a
   372  	// DS record that points at this DNS key. Output only.
   373  	Digests []*DnsKeyDigest `json:"digests,omitempty"`
   374  
   375  	// Id: Unique identifier for the resource; defined by the server (output
   376  	// only).
   377  	Id string `json:"id,omitempty"`
   378  
   379  	// IsActive: Active keys will be used to sign subsequent changes to the
   380  	// ManagedZone. Inactive keys will still be present as DNSKEY Resource
   381  	// Records for the use of resolvers validating existing signatures.
   382  	IsActive bool `json:"isActive,omitempty"`
   383  
   384  	// KeyLength: Length of the key in bits. Specified at creation time then
   385  	// immutable.
   386  	KeyLength int64 `json:"keyLength,omitempty"`
   387  
   388  	// KeyTag: The key tag is a non-cryptographic hash of the a DNSKEY
   389  	// resource record associated with this DnsKey. The key tag can be used
   390  	// to identify a DNSKEY more quickly (but it is not a unique
   391  	// identifier). In particular, the key tag is used in a parent zone's DS
   392  	// record to point at the DNSKEY in this child ManagedZone. The key tag
   393  	// is a number in the range [0, 65535] and the algorithm to calculate it
   394  	// is specified in RFC4034 Appendix B. Output only.
   395  	KeyTag int64 `json:"keyTag,omitempty"`
   396  
   397  	Kind string `json:"kind,omitempty"`
   398  
   399  	// PublicKey: Base64 encoded public half of this key. Output only.
   400  	PublicKey string `json:"publicKey,omitempty"`
   401  
   402  	// Type: One of "KEY_SIGNING" or "ZONE_SIGNING". Keys of type
   403  	// KEY_SIGNING have the Secure Entry Point flag set and, when active,
   404  	// will be used to sign only resource record sets of type DNSKEY.
   405  	// Otherwise, the Secure Entry Point flag will be cleared and this key
   406  	// will be used to sign only resource record sets of other types.
   407  	// Immutable after creation time.
   408  	//
   409  	// Possible values:
   410  	//   "KEY_SIGNING"
   411  	//   "ZONE_SIGNING"
   412  	Type string `json:"type,omitempty"`
   413  
   414  	// ServerResponse contains the HTTP response code and headers from the
   415  	// server.
   416  	googleapi.ServerResponse `json:"-"`
   417  
   418  	// ForceSendFields is a list of field names (e.g. "Algorithm") to
   419  	// unconditionally include in API requests. By default, fields with
   420  	// empty values are omitted from API requests. However, any non-pointer,
   421  	// non-interface field appearing in ForceSendFields will be sent to the
   422  	// server regardless of whether the field is empty or not. This may be
   423  	// used to include empty fields in Patch requests.
   424  	ForceSendFields []string `json:"-"`
   425  
   426  	// NullFields is a list of field names (e.g. "Algorithm") to include in
   427  	// API requests with the JSON null value. By default, fields with empty
   428  	// values are omitted from API requests. However, any field with an
   429  	// empty value appearing in NullFields will be sent to the server as
   430  	// null. It is an error if a field in this list has a non-empty value.
   431  	// This may be used to include null fields in Patch requests.
   432  	NullFields []string `json:"-"`
   433  }
   434  
   435  func (s *DnsKey) MarshalJSON() ([]byte, error) {
   436  	type NoMethod DnsKey
   437  	raw := NoMethod(*s)
   438  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   439  }
   440  
   441  type DnsKeyDigest struct {
   442  	// Digest: The base-16 encoded bytes of this digest. Suitable for use in
   443  	// a DS resource record.
   444  	Digest string `json:"digest,omitempty"`
   445  
   446  	// Type: Specifies the algorithm used to calculate this digest.
   447  	//
   448  	// Possible values:
   449  	//   "SHA1"
   450  	//   "SHA256"
   451  	//   "SHA384"
   452  	Type string `json:"type,omitempty"`
   453  
   454  	// ForceSendFields is a list of field names (e.g. "Digest") to
   455  	// unconditionally include in API requests. By default, fields with
   456  	// empty values are omitted from API requests. However, any non-pointer,
   457  	// non-interface field appearing in ForceSendFields will be sent to the
   458  	// server regardless of whether the field is empty or not. This may be
   459  	// used to include empty fields in Patch requests.
   460  	ForceSendFields []string `json:"-"`
   461  
   462  	// NullFields is a list of field names (e.g. "Digest") to include in API
   463  	// requests with the JSON null value. By default, fields with empty
   464  	// values are omitted from API requests. However, any field with an
   465  	// empty value appearing in NullFields will be sent to the server as
   466  	// null. It is an error if a field in this list has a non-empty value.
   467  	// This may be used to include null fields in Patch requests.
   468  	NullFields []string `json:"-"`
   469  }
   470  
   471  func (s *DnsKeyDigest) MarshalJSON() ([]byte, error) {
   472  	type NoMethod DnsKeyDigest
   473  	raw := NoMethod(*s)
   474  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   475  }
   476  
   477  // DnsKeySpec: Parameters for DnsKey key generation. Used for generating
   478  // initial keys for a new ManagedZone and as default when adding a new
   479  // DnsKey.
   480  type DnsKeySpec struct {
   481  	// Algorithm: String mnemonic specifying the DNSSEC algorithm of this
   482  	// key.
   483  	//
   484  	// Possible values:
   485  	//   "RSASHA1"
   486  	//   "RSASHA256"
   487  	//   "RSASHA512"
   488  	//   "ECDSAP256SHA256"
   489  	//   "ECDSAP384SHA384"
   490  	Algorithm string `json:"algorithm,omitempty"`
   491  
   492  	// KeyLength: Length of the keys in bits.
   493  	KeyLength int64 `json:"keyLength,omitempty"`
   494  
   495  	// KeyType: Specifies whether this is a key signing key (KSK) or a zone
   496  	// signing key (ZSK). Key signing keys have the Secure Entry Point flag
   497  	// set and, when active, will only be used to sign resource record sets
   498  	// of type DNSKEY. Zone signing keys do not have the Secure Entry Point
   499  	// flag set and will be used to sign all other types of resource record
   500  	// sets.
   501  	//
   502  	// Possible values:
   503  	//   "KEY_SIGNING"
   504  	//   "ZONE_SIGNING"
   505  	KeyType string `json:"keyType,omitempty"`
   506  
   507  	Kind string `json:"kind,omitempty"`
   508  
   509  	// ForceSendFields is a list of field names (e.g. "Algorithm") to
   510  	// unconditionally include in API requests. By default, fields with
   511  	// empty values are omitted from API requests. However, any non-pointer,
   512  	// non-interface field appearing in ForceSendFields will be sent to the
   513  	// server regardless of whether the field is empty or not. This may be
   514  	// used to include empty fields in Patch requests.
   515  	ForceSendFields []string `json:"-"`
   516  
   517  	// NullFields is a list of field names (e.g. "Algorithm") to include in
   518  	// API requests with the JSON null value. By default, fields with empty
   519  	// values are omitted from API requests. However, any field with an
   520  	// empty value appearing in NullFields will be sent to the server as
   521  	// null. It is an error if a field in this list has a non-empty value.
   522  	// This may be used to include null fields in Patch requests.
   523  	NullFields []string `json:"-"`
   524  }
   525  
   526  func (s *DnsKeySpec) MarshalJSON() ([]byte, error) {
   527  	type NoMethod DnsKeySpec
   528  	raw := NoMethod(*s)
   529  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   530  }
   531  
   532  // DnsKeysListResponse: The response to a request to enumerate DnsKeys
   533  // in a ManagedZone.
   534  type DnsKeysListResponse struct {
   535  	// DnsKeys: The requested resources.
   536  	DnsKeys []*DnsKey `json:"dnsKeys,omitempty"`
   537  
   538  	Header *ResponseHeader `json:"header,omitempty"`
   539  
   540  	// Kind: Type of resource.
   541  	Kind string `json:"kind,omitempty"`
   542  
   543  	// NextPageToken: The presence of this field indicates that there exist
   544  	// more results following your last page of results in pagination order.
   545  	// To fetch them, make another list request using this value as your
   546  	// pagination token. In this way you can retrieve the complete contents
   547  	// of even very large collections one page at a time. However, if the
   548  	// contents of the collection change between the first and last
   549  	// paginated list request, the set of all elements returned will be an
   550  	// inconsistent view of the collection. There is no way to retrieve a
   551  	// "snapshot" of collections larger than the maximum page size.
   552  	NextPageToken string `json:"nextPageToken,omitempty"`
   553  
   554  	// ServerResponse contains the HTTP response code and headers from the
   555  	// server.
   556  	googleapi.ServerResponse `json:"-"`
   557  
   558  	// ForceSendFields is a list of field names (e.g. "DnsKeys") to
   559  	// unconditionally include in API requests. By default, fields with
   560  	// empty values are omitted from API requests. However, any non-pointer,
   561  	// non-interface field appearing in ForceSendFields will be sent to the
   562  	// server regardless of whether the field is empty or not. This may be
   563  	// used to include empty fields in Patch requests.
   564  	ForceSendFields []string `json:"-"`
   565  
   566  	// NullFields is a list of field names (e.g. "DnsKeys") to include in
   567  	// API requests with the JSON null value. By default, fields with empty
   568  	// values are omitted from API requests. However, any field with an
   569  	// empty value appearing in NullFields will be sent to the server as
   570  	// null. It is an error if a field in this list has a non-empty value.
   571  	// This may be used to include null fields in Patch requests.
   572  	NullFields []string `json:"-"`
   573  }
   574  
   575  func (s *DnsKeysListResponse) MarshalJSON() ([]byte, error) {
   576  	type NoMethod DnsKeysListResponse
   577  	raw := NoMethod(*s)
   578  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   579  }
   580  
   581  // ManagedZone: A zone is a subtree of the DNS namespace under one
   582  // administrative responsibility. A ManagedZone is a resource that
   583  // represents a DNS zone hosted by the Cloud DNS service.
   584  type ManagedZone struct {
   585  	// CreationTime: The time that this resource was created on the server.
   586  	// This is in RFC3339 text format. Output only.
   587  	CreationTime string `json:"creationTime,omitempty"`
   588  
   589  	// Description: A mutable string of at most 1024 characters associated
   590  	// with this resource for the user's convenience. Has no effect on the
   591  	// managed zone's function.
   592  	Description string `json:"description,omitempty"`
   593  
   594  	// DnsName: The DNS name of this managed zone, for instance
   595  	// "example.com.".
   596  	DnsName string `json:"dnsName,omitempty"`
   597  
   598  	// DnssecConfig: DNSSEC configuration.
   599  	DnssecConfig *ManagedZoneDnsSecConfig `json:"dnssecConfig,omitempty"`
   600  
   601  	// ForwardingConfig: The presence for this field indicates that outbound
   602  	// forwarding is enabled for this zone. The value of this field contains
   603  	// the set of destinations to forward to.
   604  	ForwardingConfig *ManagedZoneForwardingConfig `json:"forwardingConfig,omitempty"`
   605  
   606  	// Id: Unique identifier for the resource; defined by the server (output
   607  	// only)
   608  	Id uint64 `json:"id,omitempty,string"`
   609  
   610  	Kind string `json:"kind,omitempty"`
   611  
   612  	// Labels: User labels.
   613  	Labels map[string]string `json:"labels,omitempty"`
   614  
   615  	// Name: User assigned name for this resource. Must be unique within the
   616  	// project. The name must be 1-63 characters long, must begin with a
   617  	// letter, end with a letter or digit, and only contain lowercase
   618  	// letters, digits or dashes.
   619  	Name string `json:"name,omitempty"`
   620  
   621  	// NameServerSet: Optionally specifies the NameServerSet for this
   622  	// ManagedZone. A NameServerSet is a set of DNS name servers that all
   623  	// host the same ManagedZones. Most users will leave this field unset.
   624  	NameServerSet string `json:"nameServerSet,omitempty"`
   625  
   626  	// NameServers: Delegate your managed_zone to these virtual name
   627  	// servers; defined by the server (output only)
   628  	NameServers []string `json:"nameServers,omitempty"`
   629  
   630  	// PeeringConfig: The presence of this field indicates that DNS Peering
   631  	// is enabled for this zone. The value of this field contains the
   632  	// network to peer with.
   633  	PeeringConfig *ManagedZonePeeringConfig `json:"peeringConfig,omitempty"`
   634  
   635  	// PrivateVisibilityConfig: For privately visible zones, the set of
   636  	// Virtual Private Cloud resources that the zone is visible from.
   637  	PrivateVisibilityConfig *ManagedZonePrivateVisibilityConfig `json:"privateVisibilityConfig,omitempty"`
   638  
   639  	// ReverseLookupConfig: The presence of this field indicates that this
   640  	// is a managed reverse lookup zone and Cloud DNS will resolve reverse
   641  	// lookup queries using automatically configured records for VPC
   642  	// resources. This only applies to networks listed under
   643  	// private_visibility_config.
   644  	ReverseLookupConfig *ManagedZoneReverseLookupConfig `json:"reverseLookupConfig,omitempty"`
   645  
   646  	// Visibility: The zone's visibility: public zones are exposed to the
   647  	// Internet, while private zones are visible only to Virtual Private
   648  	// Cloud resources.
   649  	//
   650  	// Possible values:
   651  	//   "PUBLIC"
   652  	//   "PRIVATE"
   653  	Visibility string `json:"visibility,omitempty"`
   654  
   655  	// ServerResponse contains the HTTP response code and headers from the
   656  	// server.
   657  	googleapi.ServerResponse `json:"-"`
   658  
   659  	// ForceSendFields is a list of field names (e.g. "CreationTime") to
   660  	// unconditionally include in API requests. By default, fields with
   661  	// empty values are omitted from API requests. However, any non-pointer,
   662  	// non-interface field appearing in ForceSendFields will be sent to the
   663  	// server regardless of whether the field is empty or not. This may be
   664  	// used to include empty fields in Patch requests.
   665  	ForceSendFields []string `json:"-"`
   666  
   667  	// NullFields is a list of field names (e.g. "CreationTime") to include
   668  	// in API requests with the JSON null value. By default, fields with
   669  	// empty values are omitted from API requests. However, any field with
   670  	// an empty value appearing in NullFields will be sent to the server as
   671  	// null. It is an error if a field in this list has a non-empty value.
   672  	// This may be used to include null fields in Patch requests.
   673  	NullFields []string `json:"-"`
   674  }
   675  
   676  func (s *ManagedZone) MarshalJSON() ([]byte, error) {
   677  	type NoMethod ManagedZone
   678  	raw := NoMethod(*s)
   679  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   680  }
   681  
   682  type ManagedZoneDnsSecConfig struct {
   683  	// DefaultKeySpecs: Specifies parameters for generating initial DnsKeys
   684  	// for this ManagedZone. Can only be changed while the state is OFF.
   685  	DefaultKeySpecs []*DnsKeySpec `json:"defaultKeySpecs,omitempty"`
   686  
   687  	Kind string `json:"kind,omitempty"`
   688  
   689  	// NonExistence: Specifies the mechanism for authenticated
   690  	// denial-of-existence responses. Can only be changed while the state is
   691  	// OFF.
   692  	//
   693  	// Possible values:
   694  	//   "NSEC"
   695  	//   "NSEC3"
   696  	NonExistence string `json:"nonExistence,omitempty"`
   697  
   698  	// State: Specifies whether DNSSEC is enabled, and what mode it is in.
   699  	//
   700  	// Possible values:
   701  	//   "OFF" - DNSSEC is disabled; the zone is not signed.
   702  	//   "ON" - DNSSEC is enabled; the zone is signed and fully managed.
   703  	//   "TRANSFER" - DNSSEC is enabled, but in a "transfer" mode.
   704  	State string `json:"state,omitempty"`
   705  
   706  	// ForceSendFields is a list of field names (e.g. "DefaultKeySpecs") to
   707  	// unconditionally include in API requests. By default, fields with
   708  	// empty values are omitted from API requests. However, any non-pointer,
   709  	// non-interface field appearing in ForceSendFields will be sent to the
   710  	// server regardless of whether the field is empty or not. This may be
   711  	// used to include empty fields in Patch requests.
   712  	ForceSendFields []string `json:"-"`
   713  
   714  	// NullFields is a list of field names (e.g. "DefaultKeySpecs") to
   715  	// include in API requests with the JSON null value. By default, fields
   716  	// with empty values are omitted from API requests. However, any field
   717  	// with an empty value appearing in NullFields will be sent to the
   718  	// server as null. It is an error if a field in this list has a
   719  	// non-empty value. This may be used to include null fields in Patch
   720  	// requests.
   721  	NullFields []string `json:"-"`
   722  }
   723  
   724  func (s *ManagedZoneDnsSecConfig) MarshalJSON() ([]byte, error) {
   725  	type NoMethod ManagedZoneDnsSecConfig
   726  	raw := NoMethod(*s)
   727  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   728  }
   729  
   730  type ManagedZoneForwardingConfig struct {
   731  	Kind string `json:"kind,omitempty"`
   732  
   733  	// TargetNameServers: List of target name servers to forward to. Cloud
   734  	// DNS will select the best available name server if more than one
   735  	// target is given.
   736  	TargetNameServers []*ManagedZoneForwardingConfigNameServerTarget `json:"targetNameServers,omitempty"`
   737  
   738  	// ForceSendFields is a list of field names (e.g. "Kind") to
   739  	// unconditionally include in API requests. By default, fields with
   740  	// empty values are omitted from API requests. However, any non-pointer,
   741  	// non-interface field appearing in ForceSendFields will be sent to the
   742  	// server regardless of whether the field is empty or not. This may be
   743  	// used to include empty fields in Patch requests.
   744  	ForceSendFields []string `json:"-"`
   745  
   746  	// NullFields is a list of field names (e.g. "Kind") to include in API
   747  	// requests with the JSON null value. By default, fields with empty
   748  	// values are omitted from API requests. However, any field with an
   749  	// empty value appearing in NullFields will be sent to the server as
   750  	// null. It is an error if a field in this list has a non-empty value.
   751  	// This may be used to include null fields in Patch requests.
   752  	NullFields []string `json:"-"`
   753  }
   754  
   755  func (s *ManagedZoneForwardingConfig) MarshalJSON() ([]byte, error) {
   756  	type NoMethod ManagedZoneForwardingConfig
   757  	raw := NoMethod(*s)
   758  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   759  }
   760  
   761  type ManagedZoneForwardingConfigNameServerTarget struct {
   762  	// ForwardingPath: Forwarding path for this NameServerTarget. If unset
   763  	// or set to DEFAULT, Cloud DNS will make forwarding decision based on
   764  	// address ranges, i.e. RFC1918 addresses go to the VPC, non-RFC1918
   765  	// addresses go to the Internet. When set to PRIVATE, Cloud DNS will
   766  	// always send queries through VPC for this target.
   767  	//
   768  	// Possible values:
   769  	//   "DEFAULT" - Cloud DNS will make forwarding decision based on
   770  	// address ranges, i.e. RFC1918 addresses forward to the target through
   771  	// the VPC and non-RFC1918 addresses will forward to the target through
   772  	// the Internet
   773  	//   "PRIVATE" - Cloud DNS will always forward to this target through
   774  	// the VPC.
   775  	ForwardingPath string `json:"forwardingPath,omitempty"`
   776  
   777  	// Ipv4Address: IPv4 address of a target name server.
   778  	Ipv4Address string `json:"ipv4Address,omitempty"`
   779  
   780  	Kind string `json:"kind,omitempty"`
   781  
   782  	// ForceSendFields is a list of field names (e.g. "ForwardingPath") to
   783  	// unconditionally include in API requests. By default, fields with
   784  	// empty values are omitted from API requests. However, any non-pointer,
   785  	// non-interface field appearing in ForceSendFields will be sent to the
   786  	// server regardless of whether the field is empty or not. This may be
   787  	// used to include empty fields in Patch requests.
   788  	ForceSendFields []string `json:"-"`
   789  
   790  	// NullFields is a list of field names (e.g. "ForwardingPath") to
   791  	// include in API requests with the JSON null value. By default, fields
   792  	// with empty values are omitted from API requests. However, any field
   793  	// with an empty value appearing in NullFields will be sent to the
   794  	// server as null. It is an error if a field in this list has a
   795  	// non-empty value. This may be used to include null fields in Patch
   796  	// requests.
   797  	NullFields []string `json:"-"`
   798  }
   799  
   800  func (s *ManagedZoneForwardingConfigNameServerTarget) MarshalJSON() ([]byte, error) {
   801  	type NoMethod ManagedZoneForwardingConfigNameServerTarget
   802  	raw := NoMethod(*s)
   803  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   804  }
   805  
   806  type ManagedZoneOperationsListResponse struct {
   807  	Header *ResponseHeader `json:"header,omitempty"`
   808  
   809  	Kind string `json:"kind,omitempty"`
   810  
   811  	// NextPageToken: The presence of this field indicates that there exist
   812  	// more results following your last page of results in pagination order.
   813  	// To fetch them, make another list request using this value as your
   814  	// page token. In this way you can retrieve the complete contents of
   815  	// even very large collections one page at a time. However, if the
   816  	// contents of the collection change between the first and last
   817  	// paginated list request, the set of all elements returned will be an
   818  	// inconsistent view of the collection. There is no way to retrieve a
   819  	// consistent snapshot of a collection larger than the maximum page
   820  	// size.
   821  	NextPageToken string `json:"nextPageToken,omitempty"`
   822  
   823  	// Operations: The operation resources.
   824  	Operations []*Operation `json:"operations,omitempty"`
   825  
   826  	// ServerResponse contains the HTTP response code and headers from the
   827  	// server.
   828  	googleapi.ServerResponse `json:"-"`
   829  
   830  	// ForceSendFields is a list of field names (e.g. "Header") to
   831  	// unconditionally include in API requests. By default, fields with
   832  	// empty values are omitted from API requests. However, any non-pointer,
   833  	// non-interface field appearing in ForceSendFields will be sent to the
   834  	// server regardless of whether the field is empty or not. This may be
   835  	// used to include empty fields in Patch requests.
   836  	ForceSendFields []string `json:"-"`
   837  
   838  	// NullFields is a list of field names (e.g. "Header") to include in API
   839  	// requests with the JSON null value. By default, fields with empty
   840  	// values are omitted from API requests. However, any field with an
   841  	// empty value appearing in NullFields will be sent to the server as
   842  	// null. It is an error if a field in this list has a non-empty value.
   843  	// This may be used to include null fields in Patch requests.
   844  	NullFields []string `json:"-"`
   845  }
   846  
   847  func (s *ManagedZoneOperationsListResponse) MarshalJSON() ([]byte, error) {
   848  	type NoMethod ManagedZoneOperationsListResponse
   849  	raw := NoMethod(*s)
   850  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   851  }
   852  
   853  type ManagedZonePeeringConfig struct {
   854  	Kind string `json:"kind,omitempty"`
   855  
   856  	// TargetNetwork: The network with which to peer.
   857  	TargetNetwork *ManagedZonePeeringConfigTargetNetwork `json:"targetNetwork,omitempty"`
   858  
   859  	// ForceSendFields is a list of field names (e.g. "Kind") to
   860  	// unconditionally include in API requests. By default, fields with
   861  	// empty values are omitted from API requests. However, any non-pointer,
   862  	// non-interface field appearing in ForceSendFields will be sent to the
   863  	// server regardless of whether the field is empty or not. This may be
   864  	// used to include empty fields in Patch requests.
   865  	ForceSendFields []string `json:"-"`
   866  
   867  	// NullFields is a list of field names (e.g. "Kind") to include in API
   868  	// requests with the JSON null value. By default, fields with empty
   869  	// values are omitted from API requests. However, any field with an
   870  	// empty value appearing in NullFields will be sent to the server as
   871  	// null. It is an error if a field in this list has a non-empty value.
   872  	// This may be used to include null fields in Patch requests.
   873  	NullFields []string `json:"-"`
   874  }
   875  
   876  func (s *ManagedZonePeeringConfig) MarshalJSON() ([]byte, error) {
   877  	type NoMethod ManagedZonePeeringConfig
   878  	raw := NoMethod(*s)
   879  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   880  }
   881  
   882  type ManagedZonePeeringConfigTargetNetwork struct {
   883  	// DeactivateTime: The time at which the zone was deactivated, in RFC
   884  	// 3339 date-time format. An empty string indicates that the peering
   885  	// connection is active. The producer network can deactivate a zone. The
   886  	// zone is automatically deactivated if the producer network that the
   887  	// zone targeted is deleted. Output only.
   888  	DeactivateTime string `json:"deactivateTime,omitempty"`
   889  
   890  	Kind string `json:"kind,omitempty"`
   891  
   892  	// NetworkUrl: The fully qualified URL of the VPC network to forward
   893  	// queries to. This should be formatted like
   894  	// https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}
   895  	NetworkUrl string `json:"networkUrl,omitempty"`
   896  
   897  	// ForceSendFields is a list of field names (e.g. "DeactivateTime") to
   898  	// unconditionally include in API requests. By default, fields with
   899  	// empty values are omitted from API requests. However, any non-pointer,
   900  	// non-interface field appearing in ForceSendFields will be sent to the
   901  	// server regardless of whether the field is empty or not. This may be
   902  	// used to include empty fields in Patch requests.
   903  	ForceSendFields []string `json:"-"`
   904  
   905  	// NullFields is a list of field names (e.g. "DeactivateTime") to
   906  	// include in API requests with the JSON null value. By default, fields
   907  	// with empty values are omitted from API requests. However, any field
   908  	// with an empty value appearing in NullFields will be sent to the
   909  	// server as null. It is an error if a field in this list has a
   910  	// non-empty value. This may be used to include null fields in Patch
   911  	// requests.
   912  	NullFields []string `json:"-"`
   913  }
   914  
   915  func (s *ManagedZonePeeringConfigTargetNetwork) MarshalJSON() ([]byte, error) {
   916  	type NoMethod ManagedZonePeeringConfigTargetNetwork
   917  	raw := NoMethod(*s)
   918  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   919  }
   920  
   921  type ManagedZonePrivateVisibilityConfig struct {
   922  	Kind string `json:"kind,omitempty"`
   923  
   924  	// Networks: The list of VPC networks that can see this zone.
   925  	Networks []*ManagedZonePrivateVisibilityConfigNetwork `json:"networks,omitempty"`
   926  
   927  	// ForceSendFields is a list of field names (e.g. "Kind") to
   928  	// unconditionally include in API requests. By default, fields with
   929  	// empty values are omitted from API requests. However, any non-pointer,
   930  	// non-interface field appearing in ForceSendFields will be sent to the
   931  	// server regardless of whether the field is empty or not. This may be
   932  	// used to include empty fields in Patch requests.
   933  	ForceSendFields []string `json:"-"`
   934  
   935  	// NullFields is a list of field names (e.g. "Kind") to include in API
   936  	// requests with the JSON null value. By default, fields with empty
   937  	// values are omitted from API requests. However, any field with an
   938  	// empty value appearing in NullFields will be sent to the server as
   939  	// null. It is an error if a field in this list has a non-empty value.
   940  	// This may be used to include null fields in Patch requests.
   941  	NullFields []string `json:"-"`
   942  }
   943  
   944  func (s *ManagedZonePrivateVisibilityConfig) MarshalJSON() ([]byte, error) {
   945  	type NoMethod ManagedZonePrivateVisibilityConfig
   946  	raw := NoMethod(*s)
   947  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   948  }
   949  
   950  type ManagedZonePrivateVisibilityConfigNetwork struct {
   951  	Kind string `json:"kind,omitempty"`
   952  
   953  	// NetworkUrl: The fully qualified URL of the VPC network to bind to.
   954  	// This should be formatted like
   955  	// https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}
   956  	NetworkUrl string `json:"networkUrl,omitempty"`
   957  
   958  	// ForceSendFields is a list of field names (e.g. "Kind") to
   959  	// unconditionally include in API requests. By default, fields with
   960  	// empty values are omitted from API requests. However, any non-pointer,
   961  	// non-interface field appearing in ForceSendFields will be sent to the
   962  	// server regardless of whether the field is empty or not. This may be
   963  	// used to include empty fields in Patch requests.
   964  	ForceSendFields []string `json:"-"`
   965  
   966  	// NullFields is a list of field names (e.g. "Kind") to include in API
   967  	// requests with the JSON null value. By default, fields with empty
   968  	// values are omitted from API requests. However, any field with an
   969  	// empty value appearing in NullFields will be sent to the server as
   970  	// null. It is an error if a field in this list has a non-empty value.
   971  	// This may be used to include null fields in Patch requests.
   972  	NullFields []string `json:"-"`
   973  }
   974  
   975  func (s *ManagedZonePrivateVisibilityConfigNetwork) MarshalJSON() ([]byte, error) {
   976  	type NoMethod ManagedZonePrivateVisibilityConfigNetwork
   977  	raw := NoMethod(*s)
   978  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   979  }
   980  
   981  type ManagedZoneReverseLookupConfig struct {
   982  	Kind string `json:"kind,omitempty"`
   983  
   984  	// ForceSendFields is a list of field names (e.g. "Kind") to
   985  	// unconditionally include in API requests. By default, fields with
   986  	// empty values are omitted from API requests. However, any non-pointer,
   987  	// non-interface field appearing in ForceSendFields will be sent to the
   988  	// server regardless of whether the field is empty or not. This may be
   989  	// used to include empty fields in Patch requests.
   990  	ForceSendFields []string `json:"-"`
   991  
   992  	// NullFields is a list of field names (e.g. "Kind") to include in API
   993  	// requests with the JSON null value. By default, fields with empty
   994  	// values are omitted from API requests. However, any field with an
   995  	// empty value appearing in NullFields will be sent to the server as
   996  	// null. It is an error if a field in this list has a non-empty value.
   997  	// This may be used to include null fields in Patch requests.
   998  	NullFields []string `json:"-"`
   999  }
  1000  
  1001  func (s *ManagedZoneReverseLookupConfig) MarshalJSON() ([]byte, error) {
  1002  	type NoMethod ManagedZoneReverseLookupConfig
  1003  	raw := NoMethod(*s)
  1004  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1005  }
  1006  
  1007  type ManagedZonesListResponse struct {
  1008  	Header *ResponseHeader `json:"header,omitempty"`
  1009  
  1010  	// Kind: Type of resource.
  1011  	Kind string `json:"kind,omitempty"`
  1012  
  1013  	// ManagedZones: The managed zone resources.
  1014  	ManagedZones []*ManagedZone `json:"managedZones,omitempty"`
  1015  
  1016  	// NextPageToken: The presence of this field indicates that there exist
  1017  	// more results following your last page of results in pagination order.
  1018  	// To fetch them, make another list request using this value as your
  1019  	// page token. In this way you can retrieve the complete contents of
  1020  	// even very large collections one page at a time. However, if the
  1021  	// contents of the collection change between the first and last
  1022  	// paginated list request, the set of all elements returned will be an
  1023  	// inconsistent view of the collection. There is no way to retrieve a
  1024  	// consistent snapshot of a collection larger than the maximum page
  1025  	// size.
  1026  	NextPageToken string `json:"nextPageToken,omitempty"`
  1027  
  1028  	// ServerResponse contains the HTTP response code and headers from the
  1029  	// server.
  1030  	googleapi.ServerResponse `json:"-"`
  1031  
  1032  	// ForceSendFields is a list of field names (e.g. "Header") to
  1033  	// unconditionally include in API requests. By default, fields with
  1034  	// empty values are omitted from API requests. However, any non-pointer,
  1035  	// non-interface field appearing in ForceSendFields will be sent to the
  1036  	// server regardless of whether the field is empty or not. This may be
  1037  	// used to include empty fields in Patch requests.
  1038  	ForceSendFields []string `json:"-"`
  1039  
  1040  	// NullFields is a list of field names (e.g. "Header") to include in API
  1041  	// requests with the JSON null value. By default, fields with empty
  1042  	// values are omitted from API requests. However, any field with an
  1043  	// empty value appearing in NullFields will be sent to the server as
  1044  	// null. It is an error if a field in this list has a non-empty value.
  1045  	// This may be used to include null fields in Patch requests.
  1046  	NullFields []string `json:"-"`
  1047  }
  1048  
  1049  func (s *ManagedZonesListResponse) MarshalJSON() ([]byte, error) {
  1050  	type NoMethod ManagedZonesListResponse
  1051  	raw := NoMethod(*s)
  1052  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1053  }
  1054  
  1055  // Operation: An operation represents a successful mutation performed on
  1056  // a Cloud DNS resource. Operations provide: - An audit log of server
  1057  // resource mutations. - A way to recover/retry API calls in the case
  1058  // where the response is never received by the caller. Use the caller
  1059  // specified client_operation_id.
  1060  type Operation struct {
  1061  	// DnsKeyContext: Only populated if the operation targeted a DnsKey
  1062  	// (output only).
  1063  	DnsKeyContext *OperationDnsKeyContext `json:"dnsKeyContext,omitempty"`
  1064  
  1065  	// Id: Unique identifier for the resource. This is the
  1066  	// client_operation_id if the client specified it when the mutation was
  1067  	// initiated, otherwise, it is generated by the server. The name must be
  1068  	// 1-63 characters long and match the regular expression [-a-z0-9]?
  1069  	// (output only)
  1070  	Id string `json:"id,omitempty"`
  1071  
  1072  	Kind string `json:"kind,omitempty"`
  1073  
  1074  	// StartTime: The time that this operation was started by the server.
  1075  	// This is in RFC3339 text format (output only).
  1076  	StartTime string `json:"startTime,omitempty"`
  1077  
  1078  	// Status: Status of the operation. Can be one of the following:
  1079  	// "PENDING" or "DONE" (output only). A status of "DONE" means that the
  1080  	// request to update the authoritative servers has been sent, but the
  1081  	// servers might not be updated yet.
  1082  	//
  1083  	// Possible values:
  1084  	//   "PENDING"
  1085  	//   "DONE"
  1086  	Status string `json:"status,omitempty"`
  1087  
  1088  	// Type: Type of the operation. Operations include insert, update, and
  1089  	// delete (output only).
  1090  	Type string `json:"type,omitempty"`
  1091  
  1092  	// User: User who requested the operation, for example:
  1093  	// user@example.com. cloud-dns-system for operations automatically done
  1094  	// by the system. (output only)
  1095  	User string `json:"user,omitempty"`
  1096  
  1097  	// ZoneContext: Only populated if the operation targeted a ManagedZone
  1098  	// (output only).
  1099  	ZoneContext *OperationManagedZoneContext `json:"zoneContext,omitempty"`
  1100  
  1101  	// ServerResponse contains the HTTP response code and headers from the
  1102  	// server.
  1103  	googleapi.ServerResponse `json:"-"`
  1104  
  1105  	// ForceSendFields is a list of field names (e.g. "DnsKeyContext") to
  1106  	// unconditionally include in API requests. By default, fields with
  1107  	// empty values are omitted from API requests. However, any non-pointer,
  1108  	// non-interface field appearing in ForceSendFields will be sent to the
  1109  	// server regardless of whether the field is empty or not. This may be
  1110  	// used to include empty fields in Patch requests.
  1111  	ForceSendFields []string `json:"-"`
  1112  
  1113  	// NullFields is a list of field names (e.g. "DnsKeyContext") to include
  1114  	// in API requests with the JSON null value. By default, fields with
  1115  	// empty values are omitted from API requests. However, any field with
  1116  	// an empty value appearing in NullFields will be sent to the server as
  1117  	// null. It is an error if a field in this list has a non-empty value.
  1118  	// This may be used to include null fields in Patch requests.
  1119  	NullFields []string `json:"-"`
  1120  }
  1121  
  1122  func (s *Operation) MarshalJSON() ([]byte, error) {
  1123  	type NoMethod Operation
  1124  	raw := NoMethod(*s)
  1125  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1126  }
  1127  
  1128  type OperationDnsKeyContext struct {
  1129  	// NewValue: The post-operation DnsKey resource.
  1130  	NewValue *DnsKey `json:"newValue,omitempty"`
  1131  
  1132  	// OldValue: The pre-operation DnsKey resource.
  1133  	OldValue *DnsKey `json:"oldValue,omitempty"`
  1134  
  1135  	// ForceSendFields is a list of field names (e.g. "NewValue") to
  1136  	// unconditionally include in API requests. By default, fields with
  1137  	// empty values are omitted from API requests. However, any non-pointer,
  1138  	// non-interface field appearing in ForceSendFields will be sent to the
  1139  	// server regardless of whether the field is empty or not. This may be
  1140  	// used to include empty fields in Patch requests.
  1141  	ForceSendFields []string `json:"-"`
  1142  
  1143  	// NullFields is a list of field names (e.g. "NewValue") to include in
  1144  	// API requests with the JSON null value. By default, fields with empty
  1145  	// values are omitted from API requests. However, any field with an
  1146  	// empty value appearing in NullFields will be sent to the server as
  1147  	// null. It is an error if a field in this list has a non-empty value.
  1148  	// This may be used to include null fields in Patch requests.
  1149  	NullFields []string `json:"-"`
  1150  }
  1151  
  1152  func (s *OperationDnsKeyContext) MarshalJSON() ([]byte, error) {
  1153  	type NoMethod OperationDnsKeyContext
  1154  	raw := NoMethod(*s)
  1155  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1156  }
  1157  
  1158  type OperationManagedZoneContext struct {
  1159  	// NewValue: The post-operation ManagedZone resource.
  1160  	NewValue *ManagedZone `json:"newValue,omitempty"`
  1161  
  1162  	// OldValue: The pre-operation ManagedZone resource.
  1163  	OldValue *ManagedZone `json:"oldValue,omitempty"`
  1164  
  1165  	// ForceSendFields is a list of field names (e.g. "NewValue") to
  1166  	// unconditionally include in API requests. By default, fields with
  1167  	// empty values are omitted from API requests. However, any non-pointer,
  1168  	// non-interface field appearing in ForceSendFields will be sent to the
  1169  	// server regardless of whether the field is empty or not. This may be
  1170  	// used to include empty fields in Patch requests.
  1171  	ForceSendFields []string `json:"-"`
  1172  
  1173  	// NullFields is a list of field names (e.g. "NewValue") to include in
  1174  	// API requests with the JSON null value. By default, fields with empty
  1175  	// values are omitted from API requests. However, any field with an
  1176  	// empty value appearing in NullFields will be sent to the server as
  1177  	// null. It is an error if a field in this list has a non-empty value.
  1178  	// This may be used to include null fields in Patch requests.
  1179  	NullFields []string `json:"-"`
  1180  }
  1181  
  1182  func (s *OperationManagedZoneContext) MarshalJSON() ([]byte, error) {
  1183  	type NoMethod OperationManagedZoneContext
  1184  	raw := NoMethod(*s)
  1185  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1186  }
  1187  
  1188  type PoliciesListResponse struct {
  1189  	Header *ResponseHeader `json:"header,omitempty"`
  1190  
  1191  	// Kind: Type of resource.
  1192  	Kind string `json:"kind,omitempty"`
  1193  
  1194  	// NextPageToken: The presence of this field indicates that there exist
  1195  	// more results following your last page of results in pagination order.
  1196  	// To fetch them, make another list request using this value as your
  1197  	// page token. In this way you can retrieve the complete contents of
  1198  	// even very large collections one page at a time. However, if the
  1199  	// contents of the collection change between the first and last
  1200  	// paginated list request, the set of all elements returned will be an
  1201  	// inconsistent view of the collection. There is no way to retrieve a
  1202  	// consistent snapshot of a collection larger than the maximum page
  1203  	// size.
  1204  	NextPageToken string `json:"nextPageToken,omitempty"`
  1205  
  1206  	// Policies: The policy resources.
  1207  	Policies []*Policy `json:"policies,omitempty"`
  1208  
  1209  	// ServerResponse contains the HTTP response code and headers from the
  1210  	// server.
  1211  	googleapi.ServerResponse `json:"-"`
  1212  
  1213  	// ForceSendFields is a list of field names (e.g. "Header") to
  1214  	// unconditionally include in API requests. By default, fields with
  1215  	// empty values are omitted from API requests. However, any non-pointer,
  1216  	// non-interface field appearing in ForceSendFields will be sent to the
  1217  	// server regardless of whether the field is empty or not. This may be
  1218  	// used to include empty fields in Patch requests.
  1219  	ForceSendFields []string `json:"-"`
  1220  
  1221  	// NullFields is a list of field names (e.g. "Header") to include in API
  1222  	// requests with the JSON null value. By default, fields with empty
  1223  	// values are omitted from API requests. However, any field with an
  1224  	// empty value appearing in NullFields will be sent to the server as
  1225  	// null. It is an error if a field in this list has a non-empty value.
  1226  	// This may be used to include null fields in Patch requests.
  1227  	NullFields []string `json:"-"`
  1228  }
  1229  
  1230  func (s *PoliciesListResponse) MarshalJSON() ([]byte, error) {
  1231  	type NoMethod PoliciesListResponse
  1232  	raw := NoMethod(*s)
  1233  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1234  }
  1235  
  1236  type PoliciesPatchResponse struct {
  1237  	Header *ResponseHeader `json:"header,omitempty"`
  1238  
  1239  	Policy *Policy `json:"policy,omitempty"`
  1240  
  1241  	// ServerResponse contains the HTTP response code and headers from the
  1242  	// server.
  1243  	googleapi.ServerResponse `json:"-"`
  1244  
  1245  	// ForceSendFields is a list of field names (e.g. "Header") to
  1246  	// unconditionally include in API requests. By default, fields with
  1247  	// empty values are omitted from API requests. However, any non-pointer,
  1248  	// non-interface field appearing in ForceSendFields will be sent to the
  1249  	// server regardless of whether the field is empty or not. This may be
  1250  	// used to include empty fields in Patch requests.
  1251  	ForceSendFields []string `json:"-"`
  1252  
  1253  	// NullFields is a list of field names (e.g. "Header") to include in API
  1254  	// requests with the JSON null value. By default, fields with empty
  1255  	// values are omitted from API requests. However, any field with an
  1256  	// empty value appearing in NullFields will be sent to the server as
  1257  	// null. It is an error if a field in this list has a non-empty value.
  1258  	// This may be used to include null fields in Patch requests.
  1259  	NullFields []string `json:"-"`
  1260  }
  1261  
  1262  func (s *PoliciesPatchResponse) MarshalJSON() ([]byte, error) {
  1263  	type NoMethod PoliciesPatchResponse
  1264  	raw := NoMethod(*s)
  1265  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1266  }
  1267  
  1268  type PoliciesUpdateResponse struct {
  1269  	Header *ResponseHeader `json:"header,omitempty"`
  1270  
  1271  	Policy *Policy `json:"policy,omitempty"`
  1272  
  1273  	// ServerResponse contains the HTTP response code and headers from the
  1274  	// server.
  1275  	googleapi.ServerResponse `json:"-"`
  1276  
  1277  	// ForceSendFields is a list of field names (e.g. "Header") to
  1278  	// unconditionally include in API requests. By default, fields with
  1279  	// empty values are omitted from API requests. However, any non-pointer,
  1280  	// non-interface field appearing in ForceSendFields will be sent to the
  1281  	// server regardless of whether the field is empty or not. This may be
  1282  	// used to include empty fields in Patch requests.
  1283  	ForceSendFields []string `json:"-"`
  1284  
  1285  	// NullFields is a list of field names (e.g. "Header") to include in API
  1286  	// requests with the JSON null value. By default, fields with empty
  1287  	// values are omitted from API requests. However, any field with an
  1288  	// empty value appearing in NullFields will be sent to the server as
  1289  	// null. It is an error if a field in this list has a non-empty value.
  1290  	// This may be used to include null fields in Patch requests.
  1291  	NullFields []string `json:"-"`
  1292  }
  1293  
  1294  func (s *PoliciesUpdateResponse) MarshalJSON() ([]byte, error) {
  1295  	type NoMethod PoliciesUpdateResponse
  1296  	raw := NoMethod(*s)
  1297  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1298  }
  1299  
  1300  // Policy: A policy is a collection of DNS rules applied to one or more
  1301  // Virtual Private Cloud resources.
  1302  type Policy struct {
  1303  	// AlternativeNameServerConfig: Sets an alternative name server for the
  1304  	// associated networks. When specified, all DNS queries are forwarded to
  1305  	// a name server that you choose. Names such as .internal are not
  1306  	// available when an alternative name server is specified.
  1307  	AlternativeNameServerConfig *PolicyAlternativeNameServerConfig `json:"alternativeNameServerConfig,omitempty"`
  1308  
  1309  	// Description: A mutable string of at most 1024 characters associated
  1310  	// with this resource for the user's convenience. Has no effect on the
  1311  	// policy's function.
  1312  	Description string `json:"description,omitempty"`
  1313  
  1314  	// EnableInboundForwarding: Allows networks bound to this policy to
  1315  	// receive DNS queries sent by VMs or applications over VPN connections.
  1316  	// When enabled, a virtual IP address will be allocated from each of the
  1317  	// sub-networks that are bound to this policy.
  1318  	EnableInboundForwarding bool `json:"enableInboundForwarding,omitempty"`
  1319  
  1320  	// EnableLogging: Controls whether logging is enabled for the networks
  1321  	// bound to this policy. Defaults to no logging if not set.
  1322  	EnableLogging bool `json:"enableLogging,omitempty"`
  1323  
  1324  	// Id: Unique identifier for the resource; defined by the server (output
  1325  	// only).
  1326  	Id uint64 `json:"id,omitempty,string"`
  1327  
  1328  	Kind string `json:"kind,omitempty"`
  1329  
  1330  	// Name: User assigned name for this policy.
  1331  	Name string `json:"name,omitempty"`
  1332  
  1333  	// Networks: List of network names specifying networks to which this
  1334  	// policy is applied.
  1335  	Networks []*PolicyNetwork `json:"networks,omitempty"`
  1336  
  1337  	// ServerResponse contains the HTTP response code and headers from the
  1338  	// server.
  1339  	googleapi.ServerResponse `json:"-"`
  1340  
  1341  	// ForceSendFields is a list of field names (e.g.
  1342  	// "AlternativeNameServerConfig") to unconditionally include in API
  1343  	// requests. By default, fields with empty values are omitted from API
  1344  	// requests. However, any non-pointer, non-interface field appearing in
  1345  	// ForceSendFields will be sent to the server regardless of whether the
  1346  	// field is empty or not. This may be used to include empty fields in
  1347  	// Patch requests.
  1348  	ForceSendFields []string `json:"-"`
  1349  
  1350  	// NullFields is a list of field names (e.g.
  1351  	// "AlternativeNameServerConfig") to include in API requests with the
  1352  	// JSON null value. By default, fields with empty values are omitted
  1353  	// from API requests. However, any field with an empty value appearing
  1354  	// in NullFields will be sent to the server as null. It is an error if a
  1355  	// field in this list has a non-empty value. This may be used to include
  1356  	// null fields in Patch requests.
  1357  	NullFields []string `json:"-"`
  1358  }
  1359  
  1360  func (s *Policy) MarshalJSON() ([]byte, error) {
  1361  	type NoMethod Policy
  1362  	raw := NoMethod(*s)
  1363  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1364  }
  1365  
  1366  type PolicyAlternativeNameServerConfig struct {
  1367  	Kind string `json:"kind,omitempty"`
  1368  
  1369  	// TargetNameServers: Sets an alternative name server for the associated
  1370  	// networks. When specified, all DNS queries are forwarded to a name
  1371  	// server that you choose. Names such as .internal are not available
  1372  	// when an alternative name server is specified.
  1373  	TargetNameServers []*PolicyAlternativeNameServerConfigTargetNameServer `json:"targetNameServers,omitempty"`
  1374  
  1375  	// ForceSendFields is a list of field names (e.g. "Kind") to
  1376  	// unconditionally include in API requests. By default, fields with
  1377  	// empty values are omitted from API requests. However, any non-pointer,
  1378  	// non-interface field appearing in ForceSendFields will be sent to the
  1379  	// server regardless of whether the field is empty or not. This may be
  1380  	// used to include empty fields in Patch requests.
  1381  	ForceSendFields []string `json:"-"`
  1382  
  1383  	// NullFields is a list of field names (e.g. "Kind") to include in API
  1384  	// requests with the JSON null value. By default, fields with empty
  1385  	// values are omitted from API requests. However, any field with an
  1386  	// empty value appearing in NullFields will be sent to the server as
  1387  	// null. It is an error if a field in this list has a non-empty value.
  1388  	// This may be used to include null fields in Patch requests.
  1389  	NullFields []string `json:"-"`
  1390  }
  1391  
  1392  func (s *PolicyAlternativeNameServerConfig) MarshalJSON() ([]byte, error) {
  1393  	type NoMethod PolicyAlternativeNameServerConfig
  1394  	raw := NoMethod(*s)
  1395  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1396  }
  1397  
  1398  type PolicyAlternativeNameServerConfigTargetNameServer struct {
  1399  	// ForwardingPath: Forwarding path for this TargetNameServer. If unset
  1400  	// or set to DEFAULT, Cloud DNS will make forwarding decision based on
  1401  	// address ranges, i.e. RFC1918 addresses go to the VPC, non-RFC1918
  1402  	// addresses go to the Internet. When set to PRIVATE, Cloud DNS will
  1403  	// always send queries through VPC for this target.
  1404  	//
  1405  	// Possible values:
  1406  	//   "DEFAULT" - Cloud DNS will make forwarding decision based on
  1407  	// address ranges, i.e. RFC1918 addresses forward to the target through
  1408  	// the VPC and non-RFC1918 addresses will forward to the target through
  1409  	// the Internet
  1410  	//   "PRIVATE" - Cloud DNS will always forward to this target through
  1411  	// the VPC.
  1412  	ForwardingPath string `json:"forwardingPath,omitempty"`
  1413  
  1414  	// Ipv4Address: IPv4 address to forward to.
  1415  	Ipv4Address string `json:"ipv4Address,omitempty"`
  1416  
  1417  	Kind string `json:"kind,omitempty"`
  1418  
  1419  	// ForceSendFields is a list of field names (e.g. "ForwardingPath") to
  1420  	// unconditionally include in API requests. By default, fields with
  1421  	// empty values are omitted from API requests. However, any non-pointer,
  1422  	// non-interface field appearing in ForceSendFields will be sent to the
  1423  	// server regardless of whether the field is empty or not. This may be
  1424  	// used to include empty fields in Patch requests.
  1425  	ForceSendFields []string `json:"-"`
  1426  
  1427  	// NullFields is a list of field names (e.g. "ForwardingPath") to
  1428  	// include in API requests with the JSON null value. By default, fields
  1429  	// with empty values are omitted from API requests. However, any field
  1430  	// with an empty value appearing in NullFields will be sent to the
  1431  	// server as null. It is an error if a field in this list has a
  1432  	// non-empty value. This may be used to include null fields in Patch
  1433  	// requests.
  1434  	NullFields []string `json:"-"`
  1435  }
  1436  
  1437  func (s *PolicyAlternativeNameServerConfigTargetNameServer) MarshalJSON() ([]byte, error) {
  1438  	type NoMethod PolicyAlternativeNameServerConfigTargetNameServer
  1439  	raw := NoMethod(*s)
  1440  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1441  }
  1442  
  1443  type PolicyNetwork struct {
  1444  	Kind string `json:"kind,omitempty"`
  1445  
  1446  	// NetworkUrl: The fully qualified URL of the VPC network to bind to.
  1447  	// This should be formatted like
  1448  	// https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}
  1449  	NetworkUrl string `json:"networkUrl,omitempty"`
  1450  
  1451  	// ForceSendFields is a list of field names (e.g. "Kind") to
  1452  	// unconditionally include in API requests. By default, fields with
  1453  	// empty values are omitted from API requests. However, any non-pointer,
  1454  	// non-interface field appearing in ForceSendFields will be sent to the
  1455  	// server regardless of whether the field is empty or not. This may be
  1456  	// used to include empty fields in Patch requests.
  1457  	ForceSendFields []string `json:"-"`
  1458  
  1459  	// NullFields is a list of field names (e.g. "Kind") to include in API
  1460  	// requests with the JSON null value. By default, fields with empty
  1461  	// values are omitted from API requests. However, any field with an
  1462  	// empty value appearing in NullFields will be sent to the server as
  1463  	// null. It is an error if a field in this list has a non-empty value.
  1464  	// This may be used to include null fields in Patch requests.
  1465  	NullFields []string `json:"-"`
  1466  }
  1467  
  1468  func (s *PolicyNetwork) MarshalJSON() ([]byte, error) {
  1469  	type NoMethod PolicyNetwork
  1470  	raw := NoMethod(*s)
  1471  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1472  }
  1473  
  1474  // Project: A project resource. The project is a top level container for
  1475  // resources including Cloud DNS ManagedZones. Projects can be created
  1476  // only in the APIs console.
  1477  type Project struct {
  1478  	// Id: User assigned unique identifier for the resource (output only).
  1479  	Id string `json:"id,omitempty"`
  1480  
  1481  	Kind string `json:"kind,omitempty"`
  1482  
  1483  	// Number: Unique numeric identifier for the resource; defined by the
  1484  	// server (output only).
  1485  	Number uint64 `json:"number,omitempty,string"`
  1486  
  1487  	// Quota: Quotas assigned to this project (output only).
  1488  	Quota *Quota `json:"quota,omitempty"`
  1489  
  1490  	// ServerResponse contains the HTTP response code and headers from the
  1491  	// server.
  1492  	googleapi.ServerResponse `json:"-"`
  1493  
  1494  	// ForceSendFields is a list of field names (e.g. "Id") to
  1495  	// unconditionally include in API requests. By default, fields with
  1496  	// empty values are omitted from API requests. However, any non-pointer,
  1497  	// non-interface field appearing in ForceSendFields will be sent to the
  1498  	// server regardless of whether the field is empty or not. This may be
  1499  	// used to include empty fields in Patch requests.
  1500  	ForceSendFields []string `json:"-"`
  1501  
  1502  	// NullFields is a list of field names (e.g. "Id") to include in API
  1503  	// requests with the JSON null value. By default, fields with empty
  1504  	// values are omitted from API requests. However, any field with an
  1505  	// empty value appearing in NullFields will be sent to the server as
  1506  	// null. It is an error if a field in this list has a non-empty value.
  1507  	// This may be used to include null fields in Patch requests.
  1508  	NullFields []string `json:"-"`
  1509  }
  1510  
  1511  func (s *Project) MarshalJSON() ([]byte, error) {
  1512  	type NoMethod Project
  1513  	raw := NoMethod(*s)
  1514  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1515  }
  1516  
  1517  // Quota: Limits associated with a Project.
  1518  type Quota struct {
  1519  	// DnsKeysPerManagedZone: Maximum allowed number of DnsKeys per
  1520  	// ManagedZone.
  1521  	DnsKeysPerManagedZone int64 `json:"dnsKeysPerManagedZone,omitempty"`
  1522  
  1523  	Kind string `json:"kind,omitempty"`
  1524  
  1525  	// ManagedZones: Maximum allowed number of managed zones in the project.
  1526  	ManagedZones int64 `json:"managedZones,omitempty"`
  1527  
  1528  	// ManagedZonesPerNetwork: Maximum allowed number of managed zones which
  1529  	// can be attached to a network.
  1530  	ManagedZonesPerNetwork int64 `json:"managedZonesPerNetwork,omitempty"`
  1531  
  1532  	// NetworksPerManagedZone: Maximum allowed number of networks to which a
  1533  	// privately scoped zone can be attached.
  1534  	NetworksPerManagedZone int64 `json:"networksPerManagedZone,omitempty"`
  1535  
  1536  	// NetworksPerPolicy: Maximum allowed number of networks per policy.
  1537  	NetworksPerPolicy int64 `json:"networksPerPolicy,omitempty"`
  1538  
  1539  	// Policies: Maximum allowed number of policies per project.
  1540  	Policies int64 `json:"policies,omitempty"`
  1541  
  1542  	// ResourceRecordsPerRrset: Maximum allowed number of ResourceRecords
  1543  	// per ResourceRecordSet.
  1544  	ResourceRecordsPerRrset int64 `json:"resourceRecordsPerRrset,omitempty"`
  1545  
  1546  	// RrsetAdditionsPerChange: Maximum allowed number of ResourceRecordSets
  1547  	// to add per ChangesCreateRequest.
  1548  	RrsetAdditionsPerChange int64 `json:"rrsetAdditionsPerChange,omitempty"`
  1549  
  1550  	// RrsetDeletionsPerChange: Maximum allowed number of ResourceRecordSets
  1551  	// to delete per ChangesCreateRequest.
  1552  	RrsetDeletionsPerChange int64 `json:"rrsetDeletionsPerChange,omitempty"`
  1553  
  1554  	// RrsetsPerManagedZone: Maximum allowed number of ResourceRecordSets
  1555  	// per zone in the project.
  1556  	RrsetsPerManagedZone int64 `json:"rrsetsPerManagedZone,omitempty"`
  1557  
  1558  	// TargetNameServersPerManagedZone: Maximum allowed number of target
  1559  	// name servers per managed forwarding zone.
  1560  	TargetNameServersPerManagedZone int64 `json:"targetNameServersPerManagedZone,omitempty"`
  1561  
  1562  	// TargetNameServersPerPolicy: Maximum allowed number of alternative
  1563  	// target name servers per policy.
  1564  	TargetNameServersPerPolicy int64 `json:"targetNameServersPerPolicy,omitempty"`
  1565  
  1566  	// TotalRrdataSizePerChange: Maximum allowed size for total rrdata in
  1567  	// one ChangesCreateRequest in bytes.
  1568  	TotalRrdataSizePerChange int64 `json:"totalRrdataSizePerChange,omitempty"`
  1569  
  1570  	// WhitelistedKeySpecs: DNSSEC algorithm and key length types that can
  1571  	// be used for DnsKeys.
  1572  	WhitelistedKeySpecs []*DnsKeySpec `json:"whitelistedKeySpecs,omitempty"`
  1573  
  1574  	// ForceSendFields is a list of field names (e.g.
  1575  	// "DnsKeysPerManagedZone") to unconditionally include in API requests.
  1576  	// By default, fields with empty values are omitted from API requests.
  1577  	// However, any non-pointer, non-interface field appearing in
  1578  	// ForceSendFields will be sent to the server regardless of whether the
  1579  	// field is empty or not. This may be used to include empty fields in
  1580  	// Patch requests.
  1581  	ForceSendFields []string `json:"-"`
  1582  
  1583  	// NullFields is a list of field names (e.g. "DnsKeysPerManagedZone") to
  1584  	// include in API requests with the JSON null value. By default, fields
  1585  	// with empty values are omitted from API requests. However, any field
  1586  	// with an empty value appearing in NullFields will be sent to the
  1587  	// server as null. It is an error if a field in this list has a
  1588  	// non-empty value. This may be used to include null fields in Patch
  1589  	// requests.
  1590  	NullFields []string `json:"-"`
  1591  }
  1592  
  1593  func (s *Quota) MarshalJSON() ([]byte, error) {
  1594  	type NoMethod Quota
  1595  	raw := NoMethod(*s)
  1596  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1597  }
  1598  
  1599  // ResourceRecordSet: A unit of data that will be returned by the DNS
  1600  // servers.
  1601  type ResourceRecordSet struct {
  1602  	Kind string `json:"kind,omitempty"`
  1603  
  1604  	// Name: For example, www.example.com.
  1605  	Name string `json:"name,omitempty"`
  1606  
  1607  	// Rrdatas: As defined in RFC 1035 (section 5) and RFC 1034 (section
  1608  	// 3.6.1) -- see examples.
  1609  	Rrdatas []string `json:"rrdatas,omitempty"`
  1610  
  1611  	// SignatureRrdatas: As defined in RFC 4034 (section 3.2).
  1612  	SignatureRrdatas []string `json:"signatureRrdatas,omitempty"`
  1613  
  1614  	// Ttl: Number of seconds that this ResourceRecordSet can be cached by
  1615  	// resolvers.
  1616  	Ttl int64 `json:"ttl,omitempty"`
  1617  
  1618  	// Type: The identifier of a supported record type. See the list of
  1619  	// Supported DNS record types.
  1620  	Type string `json:"type,omitempty"`
  1621  
  1622  	// ForceSendFields is a list of field names (e.g. "Kind") to
  1623  	// unconditionally include in API requests. By default, fields with
  1624  	// empty values are omitted from API requests. However, any non-pointer,
  1625  	// non-interface field appearing in ForceSendFields will be sent to the
  1626  	// server regardless of whether the field is empty or not. This may be
  1627  	// used to include empty fields in Patch requests.
  1628  	ForceSendFields []string `json:"-"`
  1629  
  1630  	// NullFields is a list of field names (e.g. "Kind") to include in API
  1631  	// requests with the JSON null value. By default, fields with empty
  1632  	// values are omitted from API requests. However, any field with an
  1633  	// empty value appearing in NullFields will be sent to the server as
  1634  	// null. It is an error if a field in this list has a non-empty value.
  1635  	// This may be used to include null fields in Patch requests.
  1636  	NullFields []string `json:"-"`
  1637  }
  1638  
  1639  func (s *ResourceRecordSet) MarshalJSON() ([]byte, error) {
  1640  	type NoMethod ResourceRecordSet
  1641  	raw := NoMethod(*s)
  1642  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1643  }
  1644  
  1645  type ResourceRecordSetsListResponse struct {
  1646  	Header *ResponseHeader `json:"header,omitempty"`
  1647  
  1648  	// Kind: Type of resource.
  1649  	Kind string `json:"kind,omitempty"`
  1650  
  1651  	// NextPageToken: The presence of this field indicates that there exist
  1652  	// more results following your last page of results in pagination order.
  1653  	// To fetch them, make another list request using this value as your
  1654  	// pagination token. In this way you can retrieve the complete contents
  1655  	// of even very large collections one page at a time. However, if the
  1656  	// contents of the collection change between the first and last
  1657  	// paginated list request, the set of all elements returned will be an
  1658  	// inconsistent view of the collection. There is no way to retrieve a
  1659  	// consistent snapshot of a collection larger than the maximum page
  1660  	// size.
  1661  	NextPageToken string `json:"nextPageToken,omitempty"`
  1662  
  1663  	// Rrsets: The resource record set resources.
  1664  	Rrsets []*ResourceRecordSet `json:"rrsets,omitempty"`
  1665  
  1666  	// ServerResponse contains the HTTP response code and headers from the
  1667  	// server.
  1668  	googleapi.ServerResponse `json:"-"`
  1669  
  1670  	// ForceSendFields is a list of field names (e.g. "Header") to
  1671  	// unconditionally include in API requests. By default, fields with
  1672  	// empty values are omitted from API requests. However, any non-pointer,
  1673  	// non-interface field appearing in ForceSendFields will be sent to the
  1674  	// server regardless of whether the field is empty or not. This may be
  1675  	// used to include empty fields in Patch requests.
  1676  	ForceSendFields []string `json:"-"`
  1677  
  1678  	// NullFields is a list of field names (e.g. "Header") to include in API
  1679  	// requests with the JSON null value. By default, fields with empty
  1680  	// values are omitted from API requests. However, any field with an
  1681  	// empty value appearing in NullFields will be sent to the server as
  1682  	// null. It is an error if a field in this list has a non-empty value.
  1683  	// This may be used to include null fields in Patch requests.
  1684  	NullFields []string `json:"-"`
  1685  }
  1686  
  1687  func (s *ResourceRecordSetsListResponse) MarshalJSON() ([]byte, error) {
  1688  	type NoMethod ResourceRecordSetsListResponse
  1689  	raw := NoMethod(*s)
  1690  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1691  }
  1692  
  1693  // ResponseHeader: Elements common to every response.
  1694  type ResponseHeader struct {
  1695  	// OperationId: For mutating operation requests that completed
  1696  	// successfully. This is the client_operation_id if the client specified
  1697  	// it, otherwise it is generated by the server (output only).
  1698  	OperationId string `json:"operationId,omitempty"`
  1699  
  1700  	// ForceSendFields is a list of field names (e.g. "OperationId") to
  1701  	// unconditionally include in API requests. By default, fields with
  1702  	// empty values are omitted from API requests. However, any non-pointer,
  1703  	// non-interface field appearing in ForceSendFields will be sent to the
  1704  	// server regardless of whether the field is empty or not. This may be
  1705  	// used to include empty fields in Patch requests.
  1706  	ForceSendFields []string `json:"-"`
  1707  
  1708  	// NullFields is a list of field names (e.g. "OperationId") to include
  1709  	// in API requests with the JSON null value. By default, fields with
  1710  	// empty values are omitted from API requests. However, any field with
  1711  	// an empty value appearing in NullFields will be sent to the server as
  1712  	// null. It is an error if a field in this list has a non-empty value.
  1713  	// This may be used to include null fields in Patch requests.
  1714  	NullFields []string `json:"-"`
  1715  }
  1716  
  1717  func (s *ResponseHeader) MarshalJSON() ([]byte, error) {
  1718  	type NoMethod ResponseHeader
  1719  	raw := NoMethod(*s)
  1720  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1721  }
  1722  
  1723  // method id "dns.changes.create":
  1724  
  1725  type ChangesCreateCall struct {
  1726  	s           *Service
  1727  	project     string
  1728  	managedZone string
  1729  	change      *Change
  1730  	urlParams_  gensupport.URLParams
  1731  	ctx_        context.Context
  1732  	header_     http.Header
  1733  }
  1734  
  1735  // Create: Atomically update the ResourceRecordSet collection.
  1736  func (r *ChangesService) Create(project string, managedZone string, change *Change) *ChangesCreateCall {
  1737  	c := &ChangesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1738  	c.project = project
  1739  	c.managedZone = managedZone
  1740  	c.change = change
  1741  	return c
  1742  }
  1743  
  1744  // ClientOperationId sets the optional parameter "clientOperationId":
  1745  // For mutating operation requests only. An optional identifier
  1746  // specified by the client. Must be unique for operation resources in
  1747  // the Operations collection.
  1748  func (c *ChangesCreateCall) ClientOperationId(clientOperationId string) *ChangesCreateCall {
  1749  	c.urlParams_.Set("clientOperationId", clientOperationId)
  1750  	return c
  1751  }
  1752  
  1753  // Fields allows partial responses to be retrieved. See
  1754  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  1755  // for more information.
  1756  func (c *ChangesCreateCall) Fields(s ...googleapi.Field) *ChangesCreateCall {
  1757  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1758  	return c
  1759  }
  1760  
  1761  // Context sets the context to be used in this call's Do method. Any
  1762  // pending HTTP request will be aborted if the provided context is
  1763  // canceled.
  1764  func (c *ChangesCreateCall) Context(ctx context.Context) *ChangesCreateCall {
  1765  	c.ctx_ = ctx
  1766  	return c
  1767  }
  1768  
  1769  // Header returns an http.Header that can be modified by the caller to
  1770  // add HTTP headers to the request.
  1771  func (c *ChangesCreateCall) Header() http.Header {
  1772  	if c.header_ == nil {
  1773  		c.header_ = make(http.Header)
  1774  	}
  1775  	return c.header_
  1776  }
  1777  
  1778  func (c *ChangesCreateCall) doRequest(alt string) (*http.Response, error) {
  1779  	reqHeaders := make(http.Header)
  1780  	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200811")
  1781  	for k, v := range c.header_ {
  1782  		reqHeaders[k] = v
  1783  	}
  1784  	reqHeaders.Set("User-Agent", c.s.userAgent())
  1785  	var body io.Reader = nil
  1786  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.change)
  1787  	if err != nil {
  1788  		return nil, err
  1789  	}
  1790  	reqHeaders.Set("Content-Type", "application/json")
  1791  	c.urlParams_.Set("alt", alt)
  1792  	c.urlParams_.Set("prettyPrint", "false")
  1793  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v2beta1/projects/{project}/managedZones/{managedZone}/changes")
  1794  	urls += "?" + c.urlParams_.Encode()
  1795  	req, err := http.NewRequest("POST", urls, body)
  1796  	if err != nil {
  1797  		return nil, err
  1798  	}
  1799  	req.Header = reqHeaders
  1800  	googleapi.Expand(req.URL, map[string]string{
  1801  		"project":     c.project,
  1802  		"managedZone": c.managedZone,
  1803  	})
  1804  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1805  }
  1806  
  1807  // Do executes the "dns.changes.create" call.
  1808  // Exactly one of *Change or error will be non-nil. Any non-2xx status
  1809  // code is an error. Response headers are in either
  1810  // *Change.ServerResponse.Header or (if a response was returned at all)
  1811  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  1812  // check whether the returned error was because http.StatusNotModified
  1813  // was returned.
  1814  func (c *ChangesCreateCall) Do(opts ...googleapi.CallOption) (*Change, error) {
  1815  	gensupport.SetOptions(c.urlParams_, opts...)
  1816  	res, err := c.doRequest("json")
  1817  	if res != nil && res.StatusCode == http.StatusNotModified {
  1818  		if res.Body != nil {
  1819  			res.Body.Close()
  1820  		}
  1821  		return nil, &googleapi.Error{
  1822  			Code:   res.StatusCode,
  1823  			Header: res.Header,
  1824  		}
  1825  	}
  1826  	if err != nil {
  1827  		return nil, err
  1828  	}
  1829  	defer googleapi.CloseBody(res)
  1830  	if err := googleapi.CheckResponse(res); err != nil {
  1831  		return nil, err
  1832  	}
  1833  	ret := &Change{
  1834  		ServerResponse: googleapi.ServerResponse{
  1835  			Header:         res.Header,
  1836  			HTTPStatusCode: res.StatusCode,
  1837  		},
  1838  	}
  1839  	target := &ret
  1840  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1841  		return nil, err
  1842  	}
  1843  	return ret, nil
  1844  	// {
  1845  	//   "description": "Atomically update the ResourceRecordSet collection.",
  1846  	//   "flatPath": "dns/v2beta1/projects/{project}/managedZones/{managedZone}/changes",
  1847  	//   "httpMethod": "POST",
  1848  	//   "id": "dns.changes.create",
  1849  	//   "parameterOrder": [
  1850  	//     "project",
  1851  	//     "managedZone"
  1852  	//   ],
  1853  	//   "parameters": {
  1854  	//     "clientOperationId": {
  1855  	//       "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.",
  1856  	//       "location": "query",
  1857  	//       "type": "string"
  1858  	//     },
  1859  	//     "managedZone": {
  1860  	//       "description": "Identifies the managed zone addressed by this request. Can be the managed zone name or id.",
  1861  	//       "location": "path",
  1862  	//       "required": true,
  1863  	//       "type": "string"
  1864  	//     },
  1865  	//     "project": {
  1866  	//       "description": "Identifies the project addressed by this request.",
  1867  	//       "location": "path",
  1868  	//       "required": true,
  1869  	//       "type": "string"
  1870  	//     }
  1871  	//   },
  1872  	//   "path": "dns/v2beta1/projects/{project}/managedZones/{managedZone}/changes",
  1873  	//   "request": {
  1874  	//     "$ref": "Change"
  1875  	//   },
  1876  	//   "response": {
  1877  	//     "$ref": "Change"
  1878  	//   },
  1879  	//   "scopes": [
  1880  	//     "https://www.googleapis.com/auth/cloud-platform",
  1881  	//     "https://www.googleapis.com/auth/ndev.clouddns.readwrite"
  1882  	//   ]
  1883  	// }
  1884  
  1885  }
  1886  
  1887  // method id "dns.changes.get":
  1888  
  1889  type ChangesGetCall struct {
  1890  	s            *Service
  1891  	project      string
  1892  	managedZone  string
  1893  	changeId     string
  1894  	urlParams_   gensupport.URLParams
  1895  	ifNoneMatch_ string
  1896  	ctx_         context.Context
  1897  	header_      http.Header
  1898  }
  1899  
  1900  // Get: Fetch the representation of an existing Change.
  1901  func (r *ChangesService) Get(project string, managedZone string, changeId string) *ChangesGetCall {
  1902  	c := &ChangesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1903  	c.project = project
  1904  	c.managedZone = managedZone
  1905  	c.changeId = changeId
  1906  	return c
  1907  }
  1908  
  1909  // ClientOperationId sets the optional parameter "clientOperationId":
  1910  // For mutating operation requests only. An optional identifier
  1911  // specified by the client. Must be unique for operation resources in
  1912  // the Operations collection.
  1913  func (c *ChangesGetCall) ClientOperationId(clientOperationId string) *ChangesGetCall {
  1914  	c.urlParams_.Set("clientOperationId", clientOperationId)
  1915  	return c
  1916  }
  1917  
  1918  // Fields allows partial responses to be retrieved. See
  1919  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  1920  // for more information.
  1921  func (c *ChangesGetCall) Fields(s ...googleapi.Field) *ChangesGetCall {
  1922  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1923  	return c
  1924  }
  1925  
  1926  // IfNoneMatch sets the optional parameter which makes the operation
  1927  // fail if the object's ETag matches the given value. This is useful for
  1928  // getting updates only after the object has changed since the last
  1929  // request. Use googleapi.IsNotModified to check whether the response
  1930  // error from Do is the result of In-None-Match.
  1931  func (c *ChangesGetCall) IfNoneMatch(entityTag string) *ChangesGetCall {
  1932  	c.ifNoneMatch_ = entityTag
  1933  	return c
  1934  }
  1935  
  1936  // Context sets the context to be used in this call's Do method. Any
  1937  // pending HTTP request will be aborted if the provided context is
  1938  // canceled.
  1939  func (c *ChangesGetCall) Context(ctx context.Context) *ChangesGetCall {
  1940  	c.ctx_ = ctx
  1941  	return c
  1942  }
  1943  
  1944  // Header returns an http.Header that can be modified by the caller to
  1945  // add HTTP headers to the request.
  1946  func (c *ChangesGetCall) Header() http.Header {
  1947  	if c.header_ == nil {
  1948  		c.header_ = make(http.Header)
  1949  	}
  1950  	return c.header_
  1951  }
  1952  
  1953  func (c *ChangesGetCall) doRequest(alt string) (*http.Response, error) {
  1954  	reqHeaders := make(http.Header)
  1955  	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200811")
  1956  	for k, v := range c.header_ {
  1957  		reqHeaders[k] = v
  1958  	}
  1959  	reqHeaders.Set("User-Agent", c.s.userAgent())
  1960  	if c.ifNoneMatch_ != "" {
  1961  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  1962  	}
  1963  	var body io.Reader = nil
  1964  	c.urlParams_.Set("alt", alt)
  1965  	c.urlParams_.Set("prettyPrint", "false")
  1966  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v2beta1/projects/{project}/managedZones/{managedZone}/changes/{changeId}")
  1967  	urls += "?" + c.urlParams_.Encode()
  1968  	req, err := http.NewRequest("GET", urls, body)
  1969  	if err != nil {
  1970  		return nil, err
  1971  	}
  1972  	req.Header = reqHeaders
  1973  	googleapi.Expand(req.URL, map[string]string{
  1974  		"project":     c.project,
  1975  		"managedZone": c.managedZone,
  1976  		"changeId":    c.changeId,
  1977  	})
  1978  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1979  }
  1980  
  1981  // Do executes the "dns.changes.get" call.
  1982  // Exactly one of *Change or error will be non-nil. Any non-2xx status
  1983  // code is an error. Response headers are in either
  1984  // *Change.ServerResponse.Header or (if a response was returned at all)
  1985  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  1986  // check whether the returned error was because http.StatusNotModified
  1987  // was returned.
  1988  func (c *ChangesGetCall) Do(opts ...googleapi.CallOption) (*Change, error) {
  1989  	gensupport.SetOptions(c.urlParams_, opts...)
  1990  	res, err := c.doRequest("json")
  1991  	if res != nil && res.StatusCode == http.StatusNotModified {
  1992  		if res.Body != nil {
  1993  			res.Body.Close()
  1994  		}
  1995  		return nil, &googleapi.Error{
  1996  			Code:   res.StatusCode,
  1997  			Header: res.Header,
  1998  		}
  1999  	}
  2000  	if err != nil {
  2001  		return nil, err
  2002  	}
  2003  	defer googleapi.CloseBody(res)
  2004  	if err := googleapi.CheckResponse(res); err != nil {
  2005  		return nil, err
  2006  	}
  2007  	ret := &Change{
  2008  		ServerResponse: googleapi.ServerResponse{
  2009  			Header:         res.Header,
  2010  			HTTPStatusCode: res.StatusCode,
  2011  		},
  2012  	}
  2013  	target := &ret
  2014  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2015  		return nil, err
  2016  	}
  2017  	return ret, nil
  2018  	// {
  2019  	//   "description": "Fetch the representation of an existing Change.",
  2020  	//   "flatPath": "dns/v2beta1/projects/{project}/managedZones/{managedZone}/changes/{changeId}",
  2021  	//   "httpMethod": "GET",
  2022  	//   "id": "dns.changes.get",
  2023  	//   "parameterOrder": [
  2024  	//     "project",
  2025  	//     "managedZone",
  2026  	//     "changeId"
  2027  	//   ],
  2028  	//   "parameters": {
  2029  	//     "changeId": {
  2030  	//       "description": "The identifier of the requested change, from a previous ResourceRecordSetsChangeResponse.",
  2031  	//       "location": "path",
  2032  	//       "required": true,
  2033  	//       "type": "string"
  2034  	//     },
  2035  	//     "clientOperationId": {
  2036  	//       "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.",
  2037  	//       "location": "query",
  2038  	//       "type": "string"
  2039  	//     },
  2040  	//     "managedZone": {
  2041  	//       "description": "Identifies the managed zone addressed by this request. Can be the managed zone name or id.",
  2042  	//       "location": "path",
  2043  	//       "required": true,
  2044  	//       "type": "string"
  2045  	//     },
  2046  	//     "project": {
  2047  	//       "description": "Identifies the project addressed by this request.",
  2048  	//       "location": "path",
  2049  	//       "required": true,
  2050  	//       "type": "string"
  2051  	//     }
  2052  	//   },
  2053  	//   "path": "dns/v2beta1/projects/{project}/managedZones/{managedZone}/changes/{changeId}",
  2054  	//   "response": {
  2055  	//     "$ref": "Change"
  2056  	//   },
  2057  	//   "scopes": [
  2058  	//     "https://www.googleapis.com/auth/cloud-platform",
  2059  	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
  2060  	//     "https://www.googleapis.com/auth/ndev.clouddns.readonly",
  2061  	//     "https://www.googleapis.com/auth/ndev.clouddns.readwrite"
  2062  	//   ]
  2063  	// }
  2064  
  2065  }
  2066  
  2067  // method id "dns.changes.list":
  2068  
  2069  type ChangesListCall struct {
  2070  	s            *Service
  2071  	project      string
  2072  	managedZone  string
  2073  	urlParams_   gensupport.URLParams
  2074  	ifNoneMatch_ string
  2075  	ctx_         context.Context
  2076  	header_      http.Header
  2077  }
  2078  
  2079  // List: Enumerate Changes to a ResourceRecordSet collection.
  2080  func (r *ChangesService) List(project string, managedZone string) *ChangesListCall {
  2081  	c := &ChangesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2082  	c.project = project
  2083  	c.managedZone = managedZone
  2084  	return c
  2085  }
  2086  
  2087  // MaxResults sets the optional parameter "maxResults": Maximum number
  2088  // of results to be returned. If unspecified, the server will decide how
  2089  // many results to return.
  2090  func (c *ChangesListCall) MaxResults(maxResults int64) *ChangesListCall {
  2091  	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  2092  	return c
  2093  }
  2094  
  2095  // PageToken sets the optional parameter "pageToken": A tag returned by
  2096  // a previous list request that was truncated. Use this parameter to
  2097  // continue a previous list request.
  2098  func (c *ChangesListCall) PageToken(pageToken string) *ChangesListCall {
  2099  	c.urlParams_.Set("pageToken", pageToken)
  2100  	return c
  2101  }
  2102  
  2103  // SortBy sets the optional parameter "sortBy": Sorting criterion. The
  2104  // only supported value is change sequence.
  2105  //
  2106  // Possible values:
  2107  //
  2108  //	"CHANGE_SEQUENCE" (default)
  2109  func (c *ChangesListCall) SortBy(sortBy string) *ChangesListCall {
  2110  	c.urlParams_.Set("sortBy", sortBy)
  2111  	return c
  2112  }
  2113  
  2114  // SortOrder sets the optional parameter "sortOrder": Sorting order
  2115  // direction: 'ascending' or 'descending'.
  2116  func (c *ChangesListCall) SortOrder(sortOrder string) *ChangesListCall {
  2117  	c.urlParams_.Set("sortOrder", sortOrder)
  2118  	return c
  2119  }
  2120  
  2121  // Fields allows partial responses to be retrieved. See
  2122  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2123  // for more information.
  2124  func (c *ChangesListCall) Fields(s ...googleapi.Field) *ChangesListCall {
  2125  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2126  	return c
  2127  }
  2128  
  2129  // IfNoneMatch sets the optional parameter which makes the operation
  2130  // fail if the object's ETag matches the given value. This is useful for
  2131  // getting updates only after the object has changed since the last
  2132  // request. Use googleapi.IsNotModified to check whether the response
  2133  // error from Do is the result of In-None-Match.
  2134  func (c *ChangesListCall) IfNoneMatch(entityTag string) *ChangesListCall {
  2135  	c.ifNoneMatch_ = entityTag
  2136  	return c
  2137  }
  2138  
  2139  // Context sets the context to be used in this call's Do method. Any
  2140  // pending HTTP request will be aborted if the provided context is
  2141  // canceled.
  2142  func (c *ChangesListCall) Context(ctx context.Context) *ChangesListCall {
  2143  	c.ctx_ = ctx
  2144  	return c
  2145  }
  2146  
  2147  // Header returns an http.Header that can be modified by the caller to
  2148  // add HTTP headers to the request.
  2149  func (c *ChangesListCall) Header() http.Header {
  2150  	if c.header_ == nil {
  2151  		c.header_ = make(http.Header)
  2152  	}
  2153  	return c.header_
  2154  }
  2155  
  2156  func (c *ChangesListCall) doRequest(alt string) (*http.Response, error) {
  2157  	reqHeaders := make(http.Header)
  2158  	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200811")
  2159  	for k, v := range c.header_ {
  2160  		reqHeaders[k] = v
  2161  	}
  2162  	reqHeaders.Set("User-Agent", c.s.userAgent())
  2163  	if c.ifNoneMatch_ != "" {
  2164  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2165  	}
  2166  	var body io.Reader = nil
  2167  	c.urlParams_.Set("alt", alt)
  2168  	c.urlParams_.Set("prettyPrint", "false")
  2169  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v2beta1/projects/{project}/managedZones/{managedZone}/changes")
  2170  	urls += "?" + c.urlParams_.Encode()
  2171  	req, err := http.NewRequest("GET", urls, body)
  2172  	if err != nil {
  2173  		return nil, err
  2174  	}
  2175  	req.Header = reqHeaders
  2176  	googleapi.Expand(req.URL, map[string]string{
  2177  		"project":     c.project,
  2178  		"managedZone": c.managedZone,
  2179  	})
  2180  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2181  }
  2182  
  2183  // Do executes the "dns.changes.list" call.
  2184  // Exactly one of *ChangesListResponse or error will be non-nil. Any
  2185  // non-2xx status code is an error. Response headers are in either
  2186  // *ChangesListResponse.ServerResponse.Header or (if a response was
  2187  // returned at all) in error.(*googleapi.Error).Header. Use
  2188  // googleapi.IsNotModified to check whether the returned error was
  2189  // because http.StatusNotModified was returned.
  2190  func (c *ChangesListCall) Do(opts ...googleapi.CallOption) (*ChangesListResponse, error) {
  2191  	gensupport.SetOptions(c.urlParams_, opts...)
  2192  	res, err := c.doRequest("json")
  2193  	if res != nil && res.StatusCode == http.StatusNotModified {
  2194  		if res.Body != nil {
  2195  			res.Body.Close()
  2196  		}
  2197  		return nil, &googleapi.Error{
  2198  			Code:   res.StatusCode,
  2199  			Header: res.Header,
  2200  		}
  2201  	}
  2202  	if err != nil {
  2203  		return nil, err
  2204  	}
  2205  	defer googleapi.CloseBody(res)
  2206  	if err := googleapi.CheckResponse(res); err != nil {
  2207  		return nil, err
  2208  	}
  2209  	ret := &ChangesListResponse{
  2210  		ServerResponse: googleapi.ServerResponse{
  2211  			Header:         res.Header,
  2212  			HTTPStatusCode: res.StatusCode,
  2213  		},
  2214  	}
  2215  	target := &ret
  2216  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2217  		return nil, err
  2218  	}
  2219  	return ret, nil
  2220  	// {
  2221  	//   "description": "Enumerate Changes to a ResourceRecordSet collection.",
  2222  	//   "flatPath": "dns/v2beta1/projects/{project}/managedZones/{managedZone}/changes",
  2223  	//   "httpMethod": "GET",
  2224  	//   "id": "dns.changes.list",
  2225  	//   "parameterOrder": [
  2226  	//     "project",
  2227  	//     "managedZone"
  2228  	//   ],
  2229  	//   "parameters": {
  2230  	//     "managedZone": {
  2231  	//       "description": "Identifies the managed zone addressed by this request. Can be the managed zone name or id.",
  2232  	//       "location": "path",
  2233  	//       "required": true,
  2234  	//       "type": "string"
  2235  	//     },
  2236  	//     "maxResults": {
  2237  	//       "description": "Optional. Maximum number of results to be returned. If unspecified, the server will decide how many results to return.",
  2238  	//       "format": "int32",
  2239  	//       "location": "query",
  2240  	//       "type": "integer"
  2241  	//     },
  2242  	//     "pageToken": {
  2243  	//       "description": "Optional. A tag returned by a previous list request that was truncated. Use this parameter to continue a previous list request.",
  2244  	//       "location": "query",
  2245  	//       "type": "string"
  2246  	//     },
  2247  	//     "project": {
  2248  	//       "description": "Identifies the project addressed by this request.",
  2249  	//       "location": "path",
  2250  	//       "required": true,
  2251  	//       "type": "string"
  2252  	//     },
  2253  	//     "sortBy": {
  2254  	//       "default": "CHANGE_SEQUENCE",
  2255  	//       "description": "Sorting criterion. The only supported value is change sequence.",
  2256  	//       "enum": [
  2257  	//         "CHANGE_SEQUENCE"
  2258  	//       ],
  2259  	//       "enumDescriptions": [
  2260  	//         ""
  2261  	//       ],
  2262  	//       "location": "query",
  2263  	//       "type": "string"
  2264  	//     },
  2265  	//     "sortOrder": {
  2266  	//       "description": "Sorting order direction: 'ascending' or 'descending'.",
  2267  	//       "location": "query",
  2268  	//       "type": "string"
  2269  	//     }
  2270  	//   },
  2271  	//   "path": "dns/v2beta1/projects/{project}/managedZones/{managedZone}/changes",
  2272  	//   "response": {
  2273  	//     "$ref": "ChangesListResponse"
  2274  	//   },
  2275  	//   "scopes": [
  2276  	//     "https://www.googleapis.com/auth/cloud-platform",
  2277  	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
  2278  	//     "https://www.googleapis.com/auth/ndev.clouddns.readonly",
  2279  	//     "https://www.googleapis.com/auth/ndev.clouddns.readwrite"
  2280  	//   ]
  2281  	// }
  2282  
  2283  }
  2284  
  2285  // Pages invokes f for each page of results.
  2286  // A non-nil error returned from f will halt the iteration.
  2287  // The provided context supersedes any context provided to the Context method.
  2288  func (c *ChangesListCall) Pages(ctx context.Context, f func(*ChangesListResponse) error) error {
  2289  	c.ctx_ = ctx
  2290  	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  2291  	for {
  2292  		x, err := c.Do()
  2293  		if err != nil {
  2294  			return err
  2295  		}
  2296  		if err := f(x); err != nil {
  2297  			return err
  2298  		}
  2299  		if x.NextPageToken == "" {
  2300  			return nil
  2301  		}
  2302  		c.PageToken(x.NextPageToken)
  2303  	}
  2304  }
  2305  
  2306  // method id "dns.dnsKeys.get":
  2307  
  2308  type DnsKeysGetCall struct {
  2309  	s            *Service
  2310  	project      string
  2311  	managedZone  string
  2312  	dnsKeyId     string
  2313  	urlParams_   gensupport.URLParams
  2314  	ifNoneMatch_ string
  2315  	ctx_         context.Context
  2316  	header_      http.Header
  2317  }
  2318  
  2319  // Get: Fetch the representation of an existing DnsKey.
  2320  func (r *DnsKeysService) Get(project string, managedZone string, dnsKeyId string) *DnsKeysGetCall {
  2321  	c := &DnsKeysGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2322  	c.project = project
  2323  	c.managedZone = managedZone
  2324  	c.dnsKeyId = dnsKeyId
  2325  	return c
  2326  }
  2327  
  2328  // ClientOperationId sets the optional parameter "clientOperationId":
  2329  // For mutating operation requests only. An optional identifier
  2330  // specified by the client. Must be unique for operation resources in
  2331  // the Operations collection.
  2332  func (c *DnsKeysGetCall) ClientOperationId(clientOperationId string) *DnsKeysGetCall {
  2333  	c.urlParams_.Set("clientOperationId", clientOperationId)
  2334  	return c
  2335  }
  2336  
  2337  // DigestType sets the optional parameter "digestType": An optional
  2338  // comma-separated list of digest types to compute and display for key
  2339  // signing keys. If omitted, the recommended digest type will be
  2340  // computed and displayed.
  2341  func (c *DnsKeysGetCall) DigestType(digestType string) *DnsKeysGetCall {
  2342  	c.urlParams_.Set("digestType", digestType)
  2343  	return c
  2344  }
  2345  
  2346  // Fields allows partial responses to be retrieved. See
  2347  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2348  // for more information.
  2349  func (c *DnsKeysGetCall) Fields(s ...googleapi.Field) *DnsKeysGetCall {
  2350  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2351  	return c
  2352  }
  2353  
  2354  // IfNoneMatch sets the optional parameter which makes the operation
  2355  // fail if the object's ETag matches the given value. This is useful for
  2356  // getting updates only after the object has changed since the last
  2357  // request. Use googleapi.IsNotModified to check whether the response
  2358  // error from Do is the result of In-None-Match.
  2359  func (c *DnsKeysGetCall) IfNoneMatch(entityTag string) *DnsKeysGetCall {
  2360  	c.ifNoneMatch_ = entityTag
  2361  	return c
  2362  }
  2363  
  2364  // Context sets the context to be used in this call's Do method. Any
  2365  // pending HTTP request will be aborted if the provided context is
  2366  // canceled.
  2367  func (c *DnsKeysGetCall) Context(ctx context.Context) *DnsKeysGetCall {
  2368  	c.ctx_ = ctx
  2369  	return c
  2370  }
  2371  
  2372  // Header returns an http.Header that can be modified by the caller to
  2373  // add HTTP headers to the request.
  2374  func (c *DnsKeysGetCall) Header() http.Header {
  2375  	if c.header_ == nil {
  2376  		c.header_ = make(http.Header)
  2377  	}
  2378  	return c.header_
  2379  }
  2380  
  2381  func (c *DnsKeysGetCall) doRequest(alt string) (*http.Response, error) {
  2382  	reqHeaders := make(http.Header)
  2383  	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200811")
  2384  	for k, v := range c.header_ {
  2385  		reqHeaders[k] = v
  2386  	}
  2387  	reqHeaders.Set("User-Agent", c.s.userAgent())
  2388  	if c.ifNoneMatch_ != "" {
  2389  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2390  	}
  2391  	var body io.Reader = nil
  2392  	c.urlParams_.Set("alt", alt)
  2393  	c.urlParams_.Set("prettyPrint", "false")
  2394  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v2beta1/projects/{project}/managedZones/{managedZone}/dnsKeys/{dnsKeyId}")
  2395  	urls += "?" + c.urlParams_.Encode()
  2396  	req, err := http.NewRequest("GET", urls, body)
  2397  	if err != nil {
  2398  		return nil, err
  2399  	}
  2400  	req.Header = reqHeaders
  2401  	googleapi.Expand(req.URL, map[string]string{
  2402  		"project":     c.project,
  2403  		"managedZone": c.managedZone,
  2404  		"dnsKeyId":    c.dnsKeyId,
  2405  	})
  2406  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2407  }
  2408  
  2409  // Do executes the "dns.dnsKeys.get" call.
  2410  // Exactly one of *DnsKey or error will be non-nil. Any non-2xx status
  2411  // code is an error. Response headers are in either
  2412  // *DnsKey.ServerResponse.Header or (if a response was returned at all)
  2413  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  2414  // check whether the returned error was because http.StatusNotModified
  2415  // was returned.
  2416  func (c *DnsKeysGetCall) Do(opts ...googleapi.CallOption) (*DnsKey, error) {
  2417  	gensupport.SetOptions(c.urlParams_, opts...)
  2418  	res, err := c.doRequest("json")
  2419  	if res != nil && res.StatusCode == http.StatusNotModified {
  2420  		if res.Body != nil {
  2421  			res.Body.Close()
  2422  		}
  2423  		return nil, &googleapi.Error{
  2424  			Code:   res.StatusCode,
  2425  			Header: res.Header,
  2426  		}
  2427  	}
  2428  	if err != nil {
  2429  		return nil, err
  2430  	}
  2431  	defer googleapi.CloseBody(res)
  2432  	if err := googleapi.CheckResponse(res); err != nil {
  2433  		return nil, err
  2434  	}
  2435  	ret := &DnsKey{
  2436  		ServerResponse: googleapi.ServerResponse{
  2437  			Header:         res.Header,
  2438  			HTTPStatusCode: res.StatusCode,
  2439  		},
  2440  	}
  2441  	target := &ret
  2442  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2443  		return nil, err
  2444  	}
  2445  	return ret, nil
  2446  	// {
  2447  	//   "description": "Fetch the representation of an existing DnsKey.",
  2448  	//   "flatPath": "dns/v2beta1/projects/{project}/managedZones/{managedZone}/dnsKeys/{dnsKeyId}",
  2449  	//   "httpMethod": "GET",
  2450  	//   "id": "dns.dnsKeys.get",
  2451  	//   "parameterOrder": [
  2452  	//     "project",
  2453  	//     "managedZone",
  2454  	//     "dnsKeyId"
  2455  	//   ],
  2456  	//   "parameters": {
  2457  	//     "clientOperationId": {
  2458  	//       "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.",
  2459  	//       "location": "query",
  2460  	//       "type": "string"
  2461  	//     },
  2462  	//     "digestType": {
  2463  	//       "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.",
  2464  	//       "location": "query",
  2465  	//       "type": "string"
  2466  	//     },
  2467  	//     "dnsKeyId": {
  2468  	//       "description": "The identifier of the requested DnsKey.",
  2469  	//       "location": "path",
  2470  	//       "required": true,
  2471  	//       "type": "string"
  2472  	//     },
  2473  	//     "managedZone": {
  2474  	//       "description": "Identifies the managed zone addressed by this request. Can be the managed zone name or id.",
  2475  	//       "location": "path",
  2476  	//       "required": true,
  2477  	//       "type": "string"
  2478  	//     },
  2479  	//     "project": {
  2480  	//       "description": "Identifies the project addressed by this request.",
  2481  	//       "location": "path",
  2482  	//       "required": true,
  2483  	//       "type": "string"
  2484  	//     }
  2485  	//   },
  2486  	//   "path": "dns/v2beta1/projects/{project}/managedZones/{managedZone}/dnsKeys/{dnsKeyId}",
  2487  	//   "response": {
  2488  	//     "$ref": "DnsKey"
  2489  	//   },
  2490  	//   "scopes": [
  2491  	//     "https://www.googleapis.com/auth/cloud-platform",
  2492  	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
  2493  	//     "https://www.googleapis.com/auth/ndev.clouddns.readonly",
  2494  	//     "https://www.googleapis.com/auth/ndev.clouddns.readwrite"
  2495  	//   ]
  2496  	// }
  2497  
  2498  }
  2499  
  2500  // method id "dns.dnsKeys.list":
  2501  
  2502  type DnsKeysListCall struct {
  2503  	s            *Service
  2504  	project      string
  2505  	managedZone  string
  2506  	urlParams_   gensupport.URLParams
  2507  	ifNoneMatch_ string
  2508  	ctx_         context.Context
  2509  	header_      http.Header
  2510  }
  2511  
  2512  // List: Enumerate DnsKeys to a ResourceRecordSet collection.
  2513  func (r *DnsKeysService) List(project string, managedZone string) *DnsKeysListCall {
  2514  	c := &DnsKeysListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2515  	c.project = project
  2516  	c.managedZone = managedZone
  2517  	return c
  2518  }
  2519  
  2520  // DigestType sets the optional parameter "digestType": An optional
  2521  // comma-separated list of digest types to compute and display for key
  2522  // signing keys. If omitted, the recommended digest type will be
  2523  // computed and displayed.
  2524  func (c *DnsKeysListCall) DigestType(digestType string) *DnsKeysListCall {
  2525  	c.urlParams_.Set("digestType", digestType)
  2526  	return c
  2527  }
  2528  
  2529  // MaxResults sets the optional parameter "maxResults": Maximum number
  2530  // of results to be returned. If unspecified, the server will decide how
  2531  // many results to return.
  2532  func (c *DnsKeysListCall) MaxResults(maxResults int64) *DnsKeysListCall {
  2533  	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  2534  	return c
  2535  }
  2536  
  2537  // PageToken sets the optional parameter "pageToken": A tag returned by
  2538  // a previous list request that was truncated. Use this parameter to
  2539  // continue a previous list request.
  2540  func (c *DnsKeysListCall) PageToken(pageToken string) *DnsKeysListCall {
  2541  	c.urlParams_.Set("pageToken", pageToken)
  2542  	return c
  2543  }
  2544  
  2545  // Fields allows partial responses to be retrieved. See
  2546  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2547  // for more information.
  2548  func (c *DnsKeysListCall) Fields(s ...googleapi.Field) *DnsKeysListCall {
  2549  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2550  	return c
  2551  }
  2552  
  2553  // IfNoneMatch sets the optional parameter which makes the operation
  2554  // fail if the object's ETag matches the given value. This is useful for
  2555  // getting updates only after the object has changed since the last
  2556  // request. Use googleapi.IsNotModified to check whether the response
  2557  // error from Do is the result of In-None-Match.
  2558  func (c *DnsKeysListCall) IfNoneMatch(entityTag string) *DnsKeysListCall {
  2559  	c.ifNoneMatch_ = entityTag
  2560  	return c
  2561  }
  2562  
  2563  // Context sets the context to be used in this call's Do method. Any
  2564  // pending HTTP request will be aborted if the provided context is
  2565  // canceled.
  2566  func (c *DnsKeysListCall) Context(ctx context.Context) *DnsKeysListCall {
  2567  	c.ctx_ = ctx
  2568  	return c
  2569  }
  2570  
  2571  // Header returns an http.Header that can be modified by the caller to
  2572  // add HTTP headers to the request.
  2573  func (c *DnsKeysListCall) Header() http.Header {
  2574  	if c.header_ == nil {
  2575  		c.header_ = make(http.Header)
  2576  	}
  2577  	return c.header_
  2578  }
  2579  
  2580  func (c *DnsKeysListCall) doRequest(alt string) (*http.Response, error) {
  2581  	reqHeaders := make(http.Header)
  2582  	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200811")
  2583  	for k, v := range c.header_ {
  2584  		reqHeaders[k] = v
  2585  	}
  2586  	reqHeaders.Set("User-Agent", c.s.userAgent())
  2587  	if c.ifNoneMatch_ != "" {
  2588  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2589  	}
  2590  	var body io.Reader = nil
  2591  	c.urlParams_.Set("alt", alt)
  2592  	c.urlParams_.Set("prettyPrint", "false")
  2593  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v2beta1/projects/{project}/managedZones/{managedZone}/dnsKeys")
  2594  	urls += "?" + c.urlParams_.Encode()
  2595  	req, err := http.NewRequest("GET", urls, body)
  2596  	if err != nil {
  2597  		return nil, err
  2598  	}
  2599  	req.Header = reqHeaders
  2600  	googleapi.Expand(req.URL, map[string]string{
  2601  		"project":     c.project,
  2602  		"managedZone": c.managedZone,
  2603  	})
  2604  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2605  }
  2606  
  2607  // Do executes the "dns.dnsKeys.list" call.
  2608  // Exactly one of *DnsKeysListResponse or error will be non-nil. Any
  2609  // non-2xx status code is an error. Response headers are in either
  2610  // *DnsKeysListResponse.ServerResponse.Header or (if a response was
  2611  // returned at all) in error.(*googleapi.Error).Header. Use
  2612  // googleapi.IsNotModified to check whether the returned error was
  2613  // because http.StatusNotModified was returned.
  2614  func (c *DnsKeysListCall) Do(opts ...googleapi.CallOption) (*DnsKeysListResponse, error) {
  2615  	gensupport.SetOptions(c.urlParams_, opts...)
  2616  	res, err := c.doRequest("json")
  2617  	if res != nil && res.StatusCode == http.StatusNotModified {
  2618  		if res.Body != nil {
  2619  			res.Body.Close()
  2620  		}
  2621  		return nil, &googleapi.Error{
  2622  			Code:   res.StatusCode,
  2623  			Header: res.Header,
  2624  		}
  2625  	}
  2626  	if err != nil {
  2627  		return nil, err
  2628  	}
  2629  	defer googleapi.CloseBody(res)
  2630  	if err := googleapi.CheckResponse(res); err != nil {
  2631  		return nil, err
  2632  	}
  2633  	ret := &DnsKeysListResponse{
  2634  		ServerResponse: googleapi.ServerResponse{
  2635  			Header:         res.Header,
  2636  			HTTPStatusCode: res.StatusCode,
  2637  		},
  2638  	}
  2639  	target := &ret
  2640  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2641  		return nil, err
  2642  	}
  2643  	return ret, nil
  2644  	// {
  2645  	//   "description": "Enumerate DnsKeys to a ResourceRecordSet collection.",
  2646  	//   "flatPath": "dns/v2beta1/projects/{project}/managedZones/{managedZone}/dnsKeys",
  2647  	//   "httpMethod": "GET",
  2648  	//   "id": "dns.dnsKeys.list",
  2649  	//   "parameterOrder": [
  2650  	//     "project",
  2651  	//     "managedZone"
  2652  	//   ],
  2653  	//   "parameters": {
  2654  	//     "digestType": {
  2655  	//       "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.",
  2656  	//       "location": "query",
  2657  	//       "type": "string"
  2658  	//     },
  2659  	//     "managedZone": {
  2660  	//       "description": "Identifies the managed zone addressed by this request. Can be the managed zone name or id.",
  2661  	//       "location": "path",
  2662  	//       "required": true,
  2663  	//       "type": "string"
  2664  	//     },
  2665  	//     "maxResults": {
  2666  	//       "description": "Optional. Maximum number of results to be returned. If unspecified, the server will decide how many results to return.",
  2667  	//       "format": "int32",
  2668  	//       "location": "query",
  2669  	//       "type": "integer"
  2670  	//     },
  2671  	//     "pageToken": {
  2672  	//       "description": "Optional. A tag returned by a previous list request that was truncated. Use this parameter to continue a previous list request.",
  2673  	//       "location": "query",
  2674  	//       "type": "string"
  2675  	//     },
  2676  	//     "project": {
  2677  	//       "description": "Identifies the project addressed by this request.",
  2678  	//       "location": "path",
  2679  	//       "required": true,
  2680  	//       "type": "string"
  2681  	//     }
  2682  	//   },
  2683  	//   "path": "dns/v2beta1/projects/{project}/managedZones/{managedZone}/dnsKeys",
  2684  	//   "response": {
  2685  	//     "$ref": "DnsKeysListResponse"
  2686  	//   },
  2687  	//   "scopes": [
  2688  	//     "https://www.googleapis.com/auth/cloud-platform",
  2689  	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
  2690  	//     "https://www.googleapis.com/auth/ndev.clouddns.readonly",
  2691  	//     "https://www.googleapis.com/auth/ndev.clouddns.readwrite"
  2692  	//   ]
  2693  	// }
  2694  
  2695  }
  2696  
  2697  // Pages invokes f for each page of results.
  2698  // A non-nil error returned from f will halt the iteration.
  2699  // The provided context supersedes any context provided to the Context method.
  2700  func (c *DnsKeysListCall) Pages(ctx context.Context, f func(*DnsKeysListResponse) error) error {
  2701  	c.ctx_ = ctx
  2702  	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  2703  	for {
  2704  		x, err := c.Do()
  2705  		if err != nil {
  2706  			return err
  2707  		}
  2708  		if err := f(x); err != nil {
  2709  			return err
  2710  		}
  2711  		if x.NextPageToken == "" {
  2712  			return nil
  2713  		}
  2714  		c.PageToken(x.NextPageToken)
  2715  	}
  2716  }
  2717  
  2718  // method id "dns.managedZoneOperations.get":
  2719  
  2720  type ManagedZoneOperationsGetCall struct {
  2721  	s            *Service
  2722  	project      string
  2723  	managedZone  string
  2724  	operation    string
  2725  	urlParams_   gensupport.URLParams
  2726  	ifNoneMatch_ string
  2727  	ctx_         context.Context
  2728  	header_      http.Header
  2729  }
  2730  
  2731  // Get: Fetch the representation of an existing Operation.
  2732  func (r *ManagedZoneOperationsService) Get(project string, managedZone string, operation string) *ManagedZoneOperationsGetCall {
  2733  	c := &ManagedZoneOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2734  	c.project = project
  2735  	c.managedZone = managedZone
  2736  	c.operation = operation
  2737  	return c
  2738  }
  2739  
  2740  // ClientOperationId sets the optional parameter "clientOperationId":
  2741  // For mutating operation requests only. An optional identifier
  2742  // specified by the client. Must be unique for operation resources in
  2743  // the Operations collection.
  2744  func (c *ManagedZoneOperationsGetCall) ClientOperationId(clientOperationId string) *ManagedZoneOperationsGetCall {
  2745  	c.urlParams_.Set("clientOperationId", clientOperationId)
  2746  	return c
  2747  }
  2748  
  2749  // Fields allows partial responses to be retrieved. See
  2750  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2751  // for more information.
  2752  func (c *ManagedZoneOperationsGetCall) Fields(s ...googleapi.Field) *ManagedZoneOperationsGetCall {
  2753  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2754  	return c
  2755  }
  2756  
  2757  // IfNoneMatch sets the optional parameter which makes the operation
  2758  // fail if the object's ETag matches the given value. This is useful for
  2759  // getting updates only after the object has changed since the last
  2760  // request. Use googleapi.IsNotModified to check whether the response
  2761  // error from Do is the result of In-None-Match.
  2762  func (c *ManagedZoneOperationsGetCall) IfNoneMatch(entityTag string) *ManagedZoneOperationsGetCall {
  2763  	c.ifNoneMatch_ = entityTag
  2764  	return c
  2765  }
  2766  
  2767  // Context sets the context to be used in this call's Do method. Any
  2768  // pending HTTP request will be aborted if the provided context is
  2769  // canceled.
  2770  func (c *ManagedZoneOperationsGetCall) Context(ctx context.Context) *ManagedZoneOperationsGetCall {
  2771  	c.ctx_ = ctx
  2772  	return c
  2773  }
  2774  
  2775  // Header returns an http.Header that can be modified by the caller to
  2776  // add HTTP headers to the request.
  2777  func (c *ManagedZoneOperationsGetCall) Header() http.Header {
  2778  	if c.header_ == nil {
  2779  		c.header_ = make(http.Header)
  2780  	}
  2781  	return c.header_
  2782  }
  2783  
  2784  func (c *ManagedZoneOperationsGetCall) doRequest(alt string) (*http.Response, error) {
  2785  	reqHeaders := make(http.Header)
  2786  	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200811")
  2787  	for k, v := range c.header_ {
  2788  		reqHeaders[k] = v
  2789  	}
  2790  	reqHeaders.Set("User-Agent", c.s.userAgent())
  2791  	if c.ifNoneMatch_ != "" {
  2792  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2793  	}
  2794  	var body io.Reader = nil
  2795  	c.urlParams_.Set("alt", alt)
  2796  	c.urlParams_.Set("prettyPrint", "false")
  2797  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v2beta1/projects/{project}/managedZones/{managedZone}/operations/{operation}")
  2798  	urls += "?" + c.urlParams_.Encode()
  2799  	req, err := http.NewRequest("GET", urls, body)
  2800  	if err != nil {
  2801  		return nil, err
  2802  	}
  2803  	req.Header = reqHeaders
  2804  	googleapi.Expand(req.URL, map[string]string{
  2805  		"project":     c.project,
  2806  		"managedZone": c.managedZone,
  2807  		"operation":   c.operation,
  2808  	})
  2809  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2810  }
  2811  
  2812  // Do executes the "dns.managedZoneOperations.get" call.
  2813  // Exactly one of *Operation or error will be non-nil. Any non-2xx
  2814  // status code is an error. Response headers are in either
  2815  // *Operation.ServerResponse.Header or (if a response was returned at
  2816  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  2817  // to check whether the returned error was because
  2818  // http.StatusNotModified was returned.
  2819  func (c *ManagedZoneOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  2820  	gensupport.SetOptions(c.urlParams_, opts...)
  2821  	res, err := c.doRequest("json")
  2822  	if res != nil && res.StatusCode == http.StatusNotModified {
  2823  		if res.Body != nil {
  2824  			res.Body.Close()
  2825  		}
  2826  		return nil, &googleapi.Error{
  2827  			Code:   res.StatusCode,
  2828  			Header: res.Header,
  2829  		}
  2830  	}
  2831  	if err != nil {
  2832  		return nil, err
  2833  	}
  2834  	defer googleapi.CloseBody(res)
  2835  	if err := googleapi.CheckResponse(res); err != nil {
  2836  		return nil, err
  2837  	}
  2838  	ret := &Operation{
  2839  		ServerResponse: googleapi.ServerResponse{
  2840  			Header:         res.Header,
  2841  			HTTPStatusCode: res.StatusCode,
  2842  		},
  2843  	}
  2844  	target := &ret
  2845  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2846  		return nil, err
  2847  	}
  2848  	return ret, nil
  2849  	// {
  2850  	//   "description": "Fetch the representation of an existing Operation.",
  2851  	//   "flatPath": "dns/v2beta1/projects/{project}/managedZones/{managedZone}/operations/{operation}",
  2852  	//   "httpMethod": "GET",
  2853  	//   "id": "dns.managedZoneOperations.get",
  2854  	//   "parameterOrder": [
  2855  	//     "project",
  2856  	//     "managedZone",
  2857  	//     "operation"
  2858  	//   ],
  2859  	//   "parameters": {
  2860  	//     "clientOperationId": {
  2861  	//       "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.",
  2862  	//       "location": "query",
  2863  	//       "type": "string"
  2864  	//     },
  2865  	//     "managedZone": {
  2866  	//       "description": "Identifies the managed zone addressed by this request.",
  2867  	//       "location": "path",
  2868  	//       "required": true,
  2869  	//       "type": "string"
  2870  	//     },
  2871  	//     "operation": {
  2872  	//       "description": "Identifies the operation addressed by this request.",
  2873  	//       "location": "path",
  2874  	//       "required": true,
  2875  	//       "type": "string"
  2876  	//     },
  2877  	//     "project": {
  2878  	//       "description": "Identifies the project addressed by this request.",
  2879  	//       "location": "path",
  2880  	//       "required": true,
  2881  	//       "type": "string"
  2882  	//     }
  2883  	//   },
  2884  	//   "path": "dns/v2beta1/projects/{project}/managedZones/{managedZone}/operations/{operation}",
  2885  	//   "response": {
  2886  	//     "$ref": "Operation"
  2887  	//   },
  2888  	//   "scopes": [
  2889  	//     "https://www.googleapis.com/auth/cloud-platform",
  2890  	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
  2891  	//     "https://www.googleapis.com/auth/ndev.clouddns.readonly",
  2892  	//     "https://www.googleapis.com/auth/ndev.clouddns.readwrite"
  2893  	//   ]
  2894  	// }
  2895  
  2896  }
  2897  
  2898  // method id "dns.managedZoneOperations.list":
  2899  
  2900  type ManagedZoneOperationsListCall struct {
  2901  	s            *Service
  2902  	project      string
  2903  	managedZone  string
  2904  	urlParams_   gensupport.URLParams
  2905  	ifNoneMatch_ string
  2906  	ctx_         context.Context
  2907  	header_      http.Header
  2908  }
  2909  
  2910  // List: Enumerate Operations for the given ManagedZone.
  2911  func (r *ManagedZoneOperationsService) List(project string, managedZone string) *ManagedZoneOperationsListCall {
  2912  	c := &ManagedZoneOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2913  	c.project = project
  2914  	c.managedZone = managedZone
  2915  	return c
  2916  }
  2917  
  2918  // MaxResults sets the optional parameter "maxResults": Maximum number
  2919  // of results to be returned. If unspecified, the server will decide how
  2920  // many results to return.
  2921  func (c *ManagedZoneOperationsListCall) MaxResults(maxResults int64) *ManagedZoneOperationsListCall {
  2922  	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  2923  	return c
  2924  }
  2925  
  2926  // PageToken sets the optional parameter "pageToken": A tag returned by
  2927  // a previous list request that was truncated. Use this parameter to
  2928  // continue a previous list request.
  2929  func (c *ManagedZoneOperationsListCall) PageToken(pageToken string) *ManagedZoneOperationsListCall {
  2930  	c.urlParams_.Set("pageToken", pageToken)
  2931  	return c
  2932  }
  2933  
  2934  // SortBy sets the optional parameter "sortBy": Sorting criterion. The
  2935  // only supported values are START_TIME and ID.
  2936  //
  2937  // Possible values:
  2938  //
  2939  //	"START_TIME" (default)
  2940  //	"ID"
  2941  func (c *ManagedZoneOperationsListCall) SortBy(sortBy string) *ManagedZoneOperationsListCall {
  2942  	c.urlParams_.Set("sortBy", sortBy)
  2943  	return c
  2944  }
  2945  
  2946  // Fields allows partial responses to be retrieved. See
  2947  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2948  // for more information.
  2949  func (c *ManagedZoneOperationsListCall) Fields(s ...googleapi.Field) *ManagedZoneOperationsListCall {
  2950  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2951  	return c
  2952  }
  2953  
  2954  // IfNoneMatch sets the optional parameter which makes the operation
  2955  // fail if the object's ETag matches the given value. This is useful for
  2956  // getting updates only after the object has changed since the last
  2957  // request. Use googleapi.IsNotModified to check whether the response
  2958  // error from Do is the result of In-None-Match.
  2959  func (c *ManagedZoneOperationsListCall) IfNoneMatch(entityTag string) *ManagedZoneOperationsListCall {
  2960  	c.ifNoneMatch_ = entityTag
  2961  	return c
  2962  }
  2963  
  2964  // Context sets the context to be used in this call's Do method. Any
  2965  // pending HTTP request will be aborted if the provided context is
  2966  // canceled.
  2967  func (c *ManagedZoneOperationsListCall) Context(ctx context.Context) *ManagedZoneOperationsListCall {
  2968  	c.ctx_ = ctx
  2969  	return c
  2970  }
  2971  
  2972  // Header returns an http.Header that can be modified by the caller to
  2973  // add HTTP headers to the request.
  2974  func (c *ManagedZoneOperationsListCall) Header() http.Header {
  2975  	if c.header_ == nil {
  2976  		c.header_ = make(http.Header)
  2977  	}
  2978  	return c.header_
  2979  }
  2980  
  2981  func (c *ManagedZoneOperationsListCall) doRequest(alt string) (*http.Response, error) {
  2982  	reqHeaders := make(http.Header)
  2983  	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200811")
  2984  	for k, v := range c.header_ {
  2985  		reqHeaders[k] = v
  2986  	}
  2987  	reqHeaders.Set("User-Agent", c.s.userAgent())
  2988  	if c.ifNoneMatch_ != "" {
  2989  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2990  	}
  2991  	var body io.Reader = nil
  2992  	c.urlParams_.Set("alt", alt)
  2993  	c.urlParams_.Set("prettyPrint", "false")
  2994  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v2beta1/projects/{project}/managedZones/{managedZone}/operations")
  2995  	urls += "?" + c.urlParams_.Encode()
  2996  	req, err := http.NewRequest("GET", urls, body)
  2997  	if err != nil {
  2998  		return nil, err
  2999  	}
  3000  	req.Header = reqHeaders
  3001  	googleapi.Expand(req.URL, map[string]string{
  3002  		"project":     c.project,
  3003  		"managedZone": c.managedZone,
  3004  	})
  3005  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3006  }
  3007  
  3008  // Do executes the "dns.managedZoneOperations.list" call.
  3009  // Exactly one of *ManagedZoneOperationsListResponse or error will be
  3010  // non-nil. Any non-2xx status code is an error. Response headers are in
  3011  // either *ManagedZoneOperationsListResponse.ServerResponse.Header or
  3012  // (if a response was returned at all) in
  3013  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3014  // whether the returned error was because http.StatusNotModified was
  3015  // returned.
  3016  func (c *ManagedZoneOperationsListCall) Do(opts ...googleapi.CallOption) (*ManagedZoneOperationsListResponse, error) {
  3017  	gensupport.SetOptions(c.urlParams_, opts...)
  3018  	res, err := c.doRequest("json")
  3019  	if res != nil && res.StatusCode == http.StatusNotModified {
  3020  		if res.Body != nil {
  3021  			res.Body.Close()
  3022  		}
  3023  		return nil, &googleapi.Error{
  3024  			Code:   res.StatusCode,
  3025  			Header: res.Header,
  3026  		}
  3027  	}
  3028  	if err != nil {
  3029  		return nil, err
  3030  	}
  3031  	defer googleapi.CloseBody(res)
  3032  	if err := googleapi.CheckResponse(res); err != nil {
  3033  		return nil, err
  3034  	}
  3035  	ret := &ManagedZoneOperationsListResponse{
  3036  		ServerResponse: googleapi.ServerResponse{
  3037  			Header:         res.Header,
  3038  			HTTPStatusCode: res.StatusCode,
  3039  		},
  3040  	}
  3041  	target := &ret
  3042  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3043  		return nil, err
  3044  	}
  3045  	return ret, nil
  3046  	// {
  3047  	//   "description": "Enumerate Operations for the given ManagedZone.",
  3048  	//   "flatPath": "dns/v2beta1/projects/{project}/managedZones/{managedZone}/operations",
  3049  	//   "httpMethod": "GET",
  3050  	//   "id": "dns.managedZoneOperations.list",
  3051  	//   "parameterOrder": [
  3052  	//     "project",
  3053  	//     "managedZone"
  3054  	//   ],
  3055  	//   "parameters": {
  3056  	//     "managedZone": {
  3057  	//       "description": "Identifies the managed zone addressed by this request.",
  3058  	//       "location": "path",
  3059  	//       "required": true,
  3060  	//       "type": "string"
  3061  	//     },
  3062  	//     "maxResults": {
  3063  	//       "description": "Optional. Maximum number of results to be returned. If unspecified, the server will decide how many results to return.",
  3064  	//       "format": "int32",
  3065  	//       "location": "query",
  3066  	//       "type": "integer"
  3067  	//     },
  3068  	//     "pageToken": {
  3069  	//       "description": "Optional. A tag returned by a previous list request that was truncated. Use this parameter to continue a previous list request.",
  3070  	//       "location": "query",
  3071  	//       "type": "string"
  3072  	//     },
  3073  	//     "project": {
  3074  	//       "description": "Identifies the project addressed by this request.",
  3075  	//       "location": "path",
  3076  	//       "required": true,
  3077  	//       "type": "string"
  3078  	//     },
  3079  	//     "sortBy": {
  3080  	//       "default": "START_TIME",
  3081  	//       "description": "Sorting criterion. The only supported values are START_TIME and ID.",
  3082  	//       "enum": [
  3083  	//         "START_TIME",
  3084  	//         "ID"
  3085  	//       ],
  3086  	//       "enumDescriptions": [
  3087  	//         "",
  3088  	//         ""
  3089  	//       ],
  3090  	//       "location": "query",
  3091  	//       "type": "string"
  3092  	//     }
  3093  	//   },
  3094  	//   "path": "dns/v2beta1/projects/{project}/managedZones/{managedZone}/operations",
  3095  	//   "response": {
  3096  	//     "$ref": "ManagedZoneOperationsListResponse"
  3097  	//   },
  3098  	//   "scopes": [
  3099  	//     "https://www.googleapis.com/auth/cloud-platform",
  3100  	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
  3101  	//     "https://www.googleapis.com/auth/ndev.clouddns.readonly",
  3102  	//     "https://www.googleapis.com/auth/ndev.clouddns.readwrite"
  3103  	//   ]
  3104  	// }
  3105  
  3106  }
  3107  
  3108  // Pages invokes f for each page of results.
  3109  // A non-nil error returned from f will halt the iteration.
  3110  // The provided context supersedes any context provided to the Context method.
  3111  func (c *ManagedZoneOperationsListCall) Pages(ctx context.Context, f func(*ManagedZoneOperationsListResponse) error) error {
  3112  	c.ctx_ = ctx
  3113  	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  3114  	for {
  3115  		x, err := c.Do()
  3116  		if err != nil {
  3117  			return err
  3118  		}
  3119  		if err := f(x); err != nil {
  3120  			return err
  3121  		}
  3122  		if x.NextPageToken == "" {
  3123  			return nil
  3124  		}
  3125  		c.PageToken(x.NextPageToken)
  3126  	}
  3127  }
  3128  
  3129  // method id "dns.managedZones.create":
  3130  
  3131  type ManagedZonesCreateCall struct {
  3132  	s           *Service
  3133  	project     string
  3134  	managedzone *ManagedZone
  3135  	urlParams_  gensupport.URLParams
  3136  	ctx_        context.Context
  3137  	header_     http.Header
  3138  }
  3139  
  3140  // Create: Create a new ManagedZone.
  3141  func (r *ManagedZonesService) Create(project string, managedzone *ManagedZone) *ManagedZonesCreateCall {
  3142  	c := &ManagedZonesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3143  	c.project = project
  3144  	c.managedzone = managedzone
  3145  	return c
  3146  }
  3147  
  3148  // ClientOperationId sets the optional parameter "clientOperationId":
  3149  // For mutating operation requests only. An optional identifier
  3150  // specified by the client. Must be unique for operation resources in
  3151  // the Operations collection.
  3152  func (c *ManagedZonesCreateCall) ClientOperationId(clientOperationId string) *ManagedZonesCreateCall {
  3153  	c.urlParams_.Set("clientOperationId", clientOperationId)
  3154  	return c
  3155  }
  3156  
  3157  // Fields allows partial responses to be retrieved. See
  3158  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3159  // for more information.
  3160  func (c *ManagedZonesCreateCall) Fields(s ...googleapi.Field) *ManagedZonesCreateCall {
  3161  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3162  	return c
  3163  }
  3164  
  3165  // Context sets the context to be used in this call's Do method. Any
  3166  // pending HTTP request will be aborted if the provided context is
  3167  // canceled.
  3168  func (c *ManagedZonesCreateCall) Context(ctx context.Context) *ManagedZonesCreateCall {
  3169  	c.ctx_ = ctx
  3170  	return c
  3171  }
  3172  
  3173  // Header returns an http.Header that can be modified by the caller to
  3174  // add HTTP headers to the request.
  3175  func (c *ManagedZonesCreateCall) Header() http.Header {
  3176  	if c.header_ == nil {
  3177  		c.header_ = make(http.Header)
  3178  	}
  3179  	return c.header_
  3180  }
  3181  
  3182  func (c *ManagedZonesCreateCall) doRequest(alt string) (*http.Response, error) {
  3183  	reqHeaders := make(http.Header)
  3184  	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200811")
  3185  	for k, v := range c.header_ {
  3186  		reqHeaders[k] = v
  3187  	}
  3188  	reqHeaders.Set("User-Agent", c.s.userAgent())
  3189  	var body io.Reader = nil
  3190  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.managedzone)
  3191  	if err != nil {
  3192  		return nil, err
  3193  	}
  3194  	reqHeaders.Set("Content-Type", "application/json")
  3195  	c.urlParams_.Set("alt", alt)
  3196  	c.urlParams_.Set("prettyPrint", "false")
  3197  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v2beta1/projects/{project}/managedZones")
  3198  	urls += "?" + c.urlParams_.Encode()
  3199  	req, err := http.NewRequest("POST", urls, body)
  3200  	if err != nil {
  3201  		return nil, err
  3202  	}
  3203  	req.Header = reqHeaders
  3204  	googleapi.Expand(req.URL, map[string]string{
  3205  		"project": c.project,
  3206  	})
  3207  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3208  }
  3209  
  3210  // Do executes the "dns.managedZones.create" call.
  3211  // Exactly one of *ManagedZone or error will be non-nil. Any non-2xx
  3212  // status code is an error. Response headers are in either
  3213  // *ManagedZone.ServerResponse.Header or (if a response was returned at
  3214  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  3215  // to check whether the returned error was because
  3216  // http.StatusNotModified was returned.
  3217  func (c *ManagedZonesCreateCall) Do(opts ...googleapi.CallOption) (*ManagedZone, error) {
  3218  	gensupport.SetOptions(c.urlParams_, opts...)
  3219  	res, err := c.doRequest("json")
  3220  	if res != nil && res.StatusCode == http.StatusNotModified {
  3221  		if res.Body != nil {
  3222  			res.Body.Close()
  3223  		}
  3224  		return nil, &googleapi.Error{
  3225  			Code:   res.StatusCode,
  3226  			Header: res.Header,
  3227  		}
  3228  	}
  3229  	if err != nil {
  3230  		return nil, err
  3231  	}
  3232  	defer googleapi.CloseBody(res)
  3233  	if err := googleapi.CheckResponse(res); err != nil {
  3234  		return nil, err
  3235  	}
  3236  	ret := &ManagedZone{
  3237  		ServerResponse: googleapi.ServerResponse{
  3238  			Header:         res.Header,
  3239  			HTTPStatusCode: res.StatusCode,
  3240  		},
  3241  	}
  3242  	target := &ret
  3243  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3244  		return nil, err
  3245  	}
  3246  	return ret, nil
  3247  	// {
  3248  	//   "description": "Create a new ManagedZone.",
  3249  	//   "flatPath": "dns/v2beta1/projects/{project}/managedZones",
  3250  	//   "httpMethod": "POST",
  3251  	//   "id": "dns.managedZones.create",
  3252  	//   "parameterOrder": [
  3253  	//     "project"
  3254  	//   ],
  3255  	//   "parameters": {
  3256  	//     "clientOperationId": {
  3257  	//       "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.",
  3258  	//       "location": "query",
  3259  	//       "type": "string"
  3260  	//     },
  3261  	//     "project": {
  3262  	//       "description": "Identifies the project addressed by this request.",
  3263  	//       "location": "path",
  3264  	//       "required": true,
  3265  	//       "type": "string"
  3266  	//     }
  3267  	//   },
  3268  	//   "path": "dns/v2beta1/projects/{project}/managedZones",
  3269  	//   "request": {
  3270  	//     "$ref": "ManagedZone"
  3271  	//   },
  3272  	//   "response": {
  3273  	//     "$ref": "ManagedZone"
  3274  	//   },
  3275  	//   "scopes": [
  3276  	//     "https://www.googleapis.com/auth/cloud-platform",
  3277  	//     "https://www.googleapis.com/auth/ndev.clouddns.readwrite"
  3278  	//   ]
  3279  	// }
  3280  
  3281  }
  3282  
  3283  // method id "dns.managedZones.delete":
  3284  
  3285  type ManagedZonesDeleteCall struct {
  3286  	s           *Service
  3287  	project     string
  3288  	managedZone string
  3289  	urlParams_  gensupport.URLParams
  3290  	ctx_        context.Context
  3291  	header_     http.Header
  3292  }
  3293  
  3294  // Delete: Delete a previously created ManagedZone.
  3295  func (r *ManagedZonesService) Delete(project string, managedZone string) *ManagedZonesDeleteCall {
  3296  	c := &ManagedZonesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3297  	c.project = project
  3298  	c.managedZone = managedZone
  3299  	return c
  3300  }
  3301  
  3302  // ClientOperationId sets the optional parameter "clientOperationId":
  3303  // For mutating operation requests only. An optional identifier
  3304  // specified by the client. Must be unique for operation resources in
  3305  // the Operations collection.
  3306  func (c *ManagedZonesDeleteCall) ClientOperationId(clientOperationId string) *ManagedZonesDeleteCall {
  3307  	c.urlParams_.Set("clientOperationId", clientOperationId)
  3308  	return c
  3309  }
  3310  
  3311  // Fields allows partial responses to be retrieved. See
  3312  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3313  // for more information.
  3314  func (c *ManagedZonesDeleteCall) Fields(s ...googleapi.Field) *ManagedZonesDeleteCall {
  3315  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3316  	return c
  3317  }
  3318  
  3319  // Context sets the context to be used in this call's Do method. Any
  3320  // pending HTTP request will be aborted if the provided context is
  3321  // canceled.
  3322  func (c *ManagedZonesDeleteCall) Context(ctx context.Context) *ManagedZonesDeleteCall {
  3323  	c.ctx_ = ctx
  3324  	return c
  3325  }
  3326  
  3327  // Header returns an http.Header that can be modified by the caller to
  3328  // add HTTP headers to the request.
  3329  func (c *ManagedZonesDeleteCall) Header() http.Header {
  3330  	if c.header_ == nil {
  3331  		c.header_ = make(http.Header)
  3332  	}
  3333  	return c.header_
  3334  }
  3335  
  3336  func (c *ManagedZonesDeleteCall) doRequest(alt string) (*http.Response, error) {
  3337  	reqHeaders := make(http.Header)
  3338  	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200811")
  3339  	for k, v := range c.header_ {
  3340  		reqHeaders[k] = v
  3341  	}
  3342  	reqHeaders.Set("User-Agent", c.s.userAgent())
  3343  	var body io.Reader = nil
  3344  	c.urlParams_.Set("alt", alt)
  3345  	c.urlParams_.Set("prettyPrint", "false")
  3346  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v2beta1/projects/{project}/managedZones/{managedZone}")
  3347  	urls += "?" + c.urlParams_.Encode()
  3348  	req, err := http.NewRequest("DELETE", urls, body)
  3349  	if err != nil {
  3350  		return nil, err
  3351  	}
  3352  	req.Header = reqHeaders
  3353  	googleapi.Expand(req.URL, map[string]string{
  3354  		"project":     c.project,
  3355  		"managedZone": c.managedZone,
  3356  	})
  3357  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3358  }
  3359  
  3360  // Do executes the "dns.managedZones.delete" call.
  3361  func (c *ManagedZonesDeleteCall) Do(opts ...googleapi.CallOption) error {
  3362  	gensupport.SetOptions(c.urlParams_, opts...)
  3363  	res, err := c.doRequest("json")
  3364  	if err != nil {
  3365  		return err
  3366  	}
  3367  	defer googleapi.CloseBody(res)
  3368  	if err := googleapi.CheckResponse(res); err != nil {
  3369  		return err
  3370  	}
  3371  	return nil
  3372  	// {
  3373  	//   "description": "Delete a previously created ManagedZone.",
  3374  	//   "flatPath": "dns/v2beta1/projects/{project}/managedZones/{managedZone}",
  3375  	//   "httpMethod": "DELETE",
  3376  	//   "id": "dns.managedZones.delete",
  3377  	//   "parameterOrder": [
  3378  	//     "project",
  3379  	//     "managedZone"
  3380  	//   ],
  3381  	//   "parameters": {
  3382  	//     "clientOperationId": {
  3383  	//       "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.",
  3384  	//       "location": "query",
  3385  	//       "type": "string"
  3386  	//     },
  3387  	//     "managedZone": {
  3388  	//       "description": "Identifies the managed zone addressed by this request. Can be the managed zone name or id.",
  3389  	//       "location": "path",
  3390  	//       "required": true,
  3391  	//       "type": "string"
  3392  	//     },
  3393  	//     "project": {
  3394  	//       "description": "Identifies the project addressed by this request.",
  3395  	//       "location": "path",
  3396  	//       "required": true,
  3397  	//       "type": "string"
  3398  	//     }
  3399  	//   },
  3400  	//   "path": "dns/v2beta1/projects/{project}/managedZones/{managedZone}",
  3401  	//   "scopes": [
  3402  	//     "https://www.googleapis.com/auth/cloud-platform",
  3403  	//     "https://www.googleapis.com/auth/ndev.clouddns.readwrite"
  3404  	//   ]
  3405  	// }
  3406  
  3407  }
  3408  
  3409  // method id "dns.managedZones.get":
  3410  
  3411  type ManagedZonesGetCall struct {
  3412  	s            *Service
  3413  	project      string
  3414  	managedZone  string
  3415  	urlParams_   gensupport.URLParams
  3416  	ifNoneMatch_ string
  3417  	ctx_         context.Context
  3418  	header_      http.Header
  3419  }
  3420  
  3421  // Get: Fetch the representation of an existing ManagedZone.
  3422  func (r *ManagedZonesService) Get(project string, managedZone string) *ManagedZonesGetCall {
  3423  	c := &ManagedZonesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3424  	c.project = project
  3425  	c.managedZone = managedZone
  3426  	return c
  3427  }
  3428  
  3429  // ClientOperationId sets the optional parameter "clientOperationId":
  3430  // For mutating operation requests only. An optional identifier
  3431  // specified by the client. Must be unique for operation resources in
  3432  // the Operations collection.
  3433  func (c *ManagedZonesGetCall) ClientOperationId(clientOperationId string) *ManagedZonesGetCall {
  3434  	c.urlParams_.Set("clientOperationId", clientOperationId)
  3435  	return c
  3436  }
  3437  
  3438  // Fields allows partial responses to be retrieved. See
  3439  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3440  // for more information.
  3441  func (c *ManagedZonesGetCall) Fields(s ...googleapi.Field) *ManagedZonesGetCall {
  3442  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3443  	return c
  3444  }
  3445  
  3446  // IfNoneMatch sets the optional parameter which makes the operation
  3447  // fail if the object's ETag matches the given value. This is useful for
  3448  // getting updates only after the object has changed since the last
  3449  // request. Use googleapi.IsNotModified to check whether the response
  3450  // error from Do is the result of In-None-Match.
  3451  func (c *ManagedZonesGetCall) IfNoneMatch(entityTag string) *ManagedZonesGetCall {
  3452  	c.ifNoneMatch_ = entityTag
  3453  	return c
  3454  }
  3455  
  3456  // Context sets the context to be used in this call's Do method. Any
  3457  // pending HTTP request will be aborted if the provided context is
  3458  // canceled.
  3459  func (c *ManagedZonesGetCall) Context(ctx context.Context) *ManagedZonesGetCall {
  3460  	c.ctx_ = ctx
  3461  	return c
  3462  }
  3463  
  3464  // Header returns an http.Header that can be modified by the caller to
  3465  // add HTTP headers to the request.
  3466  func (c *ManagedZonesGetCall) Header() http.Header {
  3467  	if c.header_ == nil {
  3468  		c.header_ = make(http.Header)
  3469  	}
  3470  	return c.header_
  3471  }
  3472  
  3473  func (c *ManagedZonesGetCall) doRequest(alt string) (*http.Response, error) {
  3474  	reqHeaders := make(http.Header)
  3475  	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200811")
  3476  	for k, v := range c.header_ {
  3477  		reqHeaders[k] = v
  3478  	}
  3479  	reqHeaders.Set("User-Agent", c.s.userAgent())
  3480  	if c.ifNoneMatch_ != "" {
  3481  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3482  	}
  3483  	var body io.Reader = nil
  3484  	c.urlParams_.Set("alt", alt)
  3485  	c.urlParams_.Set("prettyPrint", "false")
  3486  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v2beta1/projects/{project}/managedZones/{managedZone}")
  3487  	urls += "?" + c.urlParams_.Encode()
  3488  	req, err := http.NewRequest("GET", urls, body)
  3489  	if err != nil {
  3490  		return nil, err
  3491  	}
  3492  	req.Header = reqHeaders
  3493  	googleapi.Expand(req.URL, map[string]string{
  3494  		"project":     c.project,
  3495  		"managedZone": c.managedZone,
  3496  	})
  3497  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3498  }
  3499  
  3500  // Do executes the "dns.managedZones.get" call.
  3501  // Exactly one of *ManagedZone or error will be non-nil. Any non-2xx
  3502  // status code is an error. Response headers are in either
  3503  // *ManagedZone.ServerResponse.Header or (if a response was returned at
  3504  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  3505  // to check whether the returned error was because
  3506  // http.StatusNotModified was returned.
  3507  func (c *ManagedZonesGetCall) Do(opts ...googleapi.CallOption) (*ManagedZone, error) {
  3508  	gensupport.SetOptions(c.urlParams_, opts...)
  3509  	res, err := c.doRequest("json")
  3510  	if res != nil && res.StatusCode == http.StatusNotModified {
  3511  		if res.Body != nil {
  3512  			res.Body.Close()
  3513  		}
  3514  		return nil, &googleapi.Error{
  3515  			Code:   res.StatusCode,
  3516  			Header: res.Header,
  3517  		}
  3518  	}
  3519  	if err != nil {
  3520  		return nil, err
  3521  	}
  3522  	defer googleapi.CloseBody(res)
  3523  	if err := googleapi.CheckResponse(res); err != nil {
  3524  		return nil, err
  3525  	}
  3526  	ret := &ManagedZone{
  3527  		ServerResponse: googleapi.ServerResponse{
  3528  			Header:         res.Header,
  3529  			HTTPStatusCode: res.StatusCode,
  3530  		},
  3531  	}
  3532  	target := &ret
  3533  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3534  		return nil, err
  3535  	}
  3536  	return ret, nil
  3537  	// {
  3538  	//   "description": "Fetch the representation of an existing ManagedZone.",
  3539  	//   "flatPath": "dns/v2beta1/projects/{project}/managedZones/{managedZone}",
  3540  	//   "httpMethod": "GET",
  3541  	//   "id": "dns.managedZones.get",
  3542  	//   "parameterOrder": [
  3543  	//     "project",
  3544  	//     "managedZone"
  3545  	//   ],
  3546  	//   "parameters": {
  3547  	//     "clientOperationId": {
  3548  	//       "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.",
  3549  	//       "location": "query",
  3550  	//       "type": "string"
  3551  	//     },
  3552  	//     "managedZone": {
  3553  	//       "description": "Identifies the managed zone addressed by this request. Can be the managed zone name or id.",
  3554  	//       "location": "path",
  3555  	//       "required": true,
  3556  	//       "type": "string"
  3557  	//     },
  3558  	//     "project": {
  3559  	//       "description": "Identifies the project addressed by this request.",
  3560  	//       "location": "path",
  3561  	//       "required": true,
  3562  	//       "type": "string"
  3563  	//     }
  3564  	//   },
  3565  	//   "path": "dns/v2beta1/projects/{project}/managedZones/{managedZone}",
  3566  	//   "response": {
  3567  	//     "$ref": "ManagedZone"
  3568  	//   },
  3569  	//   "scopes": [
  3570  	//     "https://www.googleapis.com/auth/cloud-platform",
  3571  	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
  3572  	//     "https://www.googleapis.com/auth/ndev.clouddns.readonly",
  3573  	//     "https://www.googleapis.com/auth/ndev.clouddns.readwrite"
  3574  	//   ]
  3575  	// }
  3576  
  3577  }
  3578  
  3579  // method id "dns.managedZones.list":
  3580  
  3581  type ManagedZonesListCall struct {
  3582  	s            *Service
  3583  	project      string
  3584  	urlParams_   gensupport.URLParams
  3585  	ifNoneMatch_ string
  3586  	ctx_         context.Context
  3587  	header_      http.Header
  3588  }
  3589  
  3590  // List: Enumerate ManagedZones that have been created but not yet
  3591  // deleted.
  3592  func (r *ManagedZonesService) List(project string) *ManagedZonesListCall {
  3593  	c := &ManagedZonesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3594  	c.project = project
  3595  	return c
  3596  }
  3597  
  3598  // DnsName sets the optional parameter "dnsName": Restricts the list to
  3599  // return only zones with this domain name.
  3600  func (c *ManagedZonesListCall) DnsName(dnsName string) *ManagedZonesListCall {
  3601  	c.urlParams_.Set("dnsName", dnsName)
  3602  	return c
  3603  }
  3604  
  3605  // MaxResults sets the optional parameter "maxResults": Maximum number
  3606  // of results to be returned. If unspecified, the server will decide how
  3607  // many results to return.
  3608  func (c *ManagedZonesListCall) MaxResults(maxResults int64) *ManagedZonesListCall {
  3609  	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  3610  	return c
  3611  }
  3612  
  3613  // PageToken sets the optional parameter "pageToken": A tag returned by
  3614  // a previous list request that was truncated. Use this parameter to
  3615  // continue a previous list request.
  3616  func (c *ManagedZonesListCall) PageToken(pageToken string) *ManagedZonesListCall {
  3617  	c.urlParams_.Set("pageToken", pageToken)
  3618  	return c
  3619  }
  3620  
  3621  // Fields allows partial responses to be retrieved. See
  3622  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3623  // for more information.
  3624  func (c *ManagedZonesListCall) Fields(s ...googleapi.Field) *ManagedZonesListCall {
  3625  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3626  	return c
  3627  }
  3628  
  3629  // IfNoneMatch sets the optional parameter which makes the operation
  3630  // fail if the object's ETag matches the given value. This is useful for
  3631  // getting updates only after the object has changed since the last
  3632  // request. Use googleapi.IsNotModified to check whether the response
  3633  // error from Do is the result of In-None-Match.
  3634  func (c *ManagedZonesListCall) IfNoneMatch(entityTag string) *ManagedZonesListCall {
  3635  	c.ifNoneMatch_ = entityTag
  3636  	return c
  3637  }
  3638  
  3639  // Context sets the context to be used in this call's Do method. Any
  3640  // pending HTTP request will be aborted if the provided context is
  3641  // canceled.
  3642  func (c *ManagedZonesListCall) Context(ctx context.Context) *ManagedZonesListCall {
  3643  	c.ctx_ = ctx
  3644  	return c
  3645  }
  3646  
  3647  // Header returns an http.Header that can be modified by the caller to
  3648  // add HTTP headers to the request.
  3649  func (c *ManagedZonesListCall) Header() http.Header {
  3650  	if c.header_ == nil {
  3651  		c.header_ = make(http.Header)
  3652  	}
  3653  	return c.header_
  3654  }
  3655  
  3656  func (c *ManagedZonesListCall) doRequest(alt string) (*http.Response, error) {
  3657  	reqHeaders := make(http.Header)
  3658  	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200811")
  3659  	for k, v := range c.header_ {
  3660  		reqHeaders[k] = v
  3661  	}
  3662  	reqHeaders.Set("User-Agent", c.s.userAgent())
  3663  	if c.ifNoneMatch_ != "" {
  3664  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3665  	}
  3666  	var body io.Reader = nil
  3667  	c.urlParams_.Set("alt", alt)
  3668  	c.urlParams_.Set("prettyPrint", "false")
  3669  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v2beta1/projects/{project}/managedZones")
  3670  	urls += "?" + c.urlParams_.Encode()
  3671  	req, err := http.NewRequest("GET", urls, body)
  3672  	if err != nil {
  3673  		return nil, err
  3674  	}
  3675  	req.Header = reqHeaders
  3676  	googleapi.Expand(req.URL, map[string]string{
  3677  		"project": c.project,
  3678  	})
  3679  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3680  }
  3681  
  3682  // Do executes the "dns.managedZones.list" call.
  3683  // Exactly one of *ManagedZonesListResponse or error will be non-nil.
  3684  // Any non-2xx status code is an error. Response headers are in either
  3685  // *ManagedZonesListResponse.ServerResponse.Header or (if a response was
  3686  // returned at all) in error.(*googleapi.Error).Header. Use
  3687  // googleapi.IsNotModified to check whether the returned error was
  3688  // because http.StatusNotModified was returned.
  3689  func (c *ManagedZonesListCall) Do(opts ...googleapi.CallOption) (*ManagedZonesListResponse, error) {
  3690  	gensupport.SetOptions(c.urlParams_, opts...)
  3691  	res, err := c.doRequest("json")
  3692  	if res != nil && res.StatusCode == http.StatusNotModified {
  3693  		if res.Body != nil {
  3694  			res.Body.Close()
  3695  		}
  3696  		return nil, &googleapi.Error{
  3697  			Code:   res.StatusCode,
  3698  			Header: res.Header,
  3699  		}
  3700  	}
  3701  	if err != nil {
  3702  		return nil, err
  3703  	}
  3704  	defer googleapi.CloseBody(res)
  3705  	if err := googleapi.CheckResponse(res); err != nil {
  3706  		return nil, err
  3707  	}
  3708  	ret := &ManagedZonesListResponse{
  3709  		ServerResponse: googleapi.ServerResponse{
  3710  			Header:         res.Header,
  3711  			HTTPStatusCode: res.StatusCode,
  3712  		},
  3713  	}
  3714  	target := &ret
  3715  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3716  		return nil, err
  3717  	}
  3718  	return ret, nil
  3719  	// {
  3720  	//   "description": "Enumerate ManagedZones that have been created but not yet deleted.",
  3721  	//   "flatPath": "dns/v2beta1/projects/{project}/managedZones",
  3722  	//   "httpMethod": "GET",
  3723  	//   "id": "dns.managedZones.list",
  3724  	//   "parameterOrder": [
  3725  	//     "project"
  3726  	//   ],
  3727  	//   "parameters": {
  3728  	//     "dnsName": {
  3729  	//       "description": "Restricts the list to return only zones with this domain name.",
  3730  	//       "location": "query",
  3731  	//       "type": "string"
  3732  	//     },
  3733  	//     "maxResults": {
  3734  	//       "description": "Optional. Maximum number of results to be returned. If unspecified, the server will decide how many results to return.",
  3735  	//       "format": "int32",
  3736  	//       "location": "query",
  3737  	//       "type": "integer"
  3738  	//     },
  3739  	//     "pageToken": {
  3740  	//       "description": "Optional. A tag returned by a previous list request that was truncated. Use this parameter to continue a previous list request.",
  3741  	//       "location": "query",
  3742  	//       "type": "string"
  3743  	//     },
  3744  	//     "project": {
  3745  	//       "description": "Identifies the project addressed by this request.",
  3746  	//       "location": "path",
  3747  	//       "required": true,
  3748  	//       "type": "string"
  3749  	//     }
  3750  	//   },
  3751  	//   "path": "dns/v2beta1/projects/{project}/managedZones",
  3752  	//   "response": {
  3753  	//     "$ref": "ManagedZonesListResponse"
  3754  	//   },
  3755  	//   "scopes": [
  3756  	//     "https://www.googleapis.com/auth/cloud-platform",
  3757  	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
  3758  	//     "https://www.googleapis.com/auth/ndev.clouddns.readonly",
  3759  	//     "https://www.googleapis.com/auth/ndev.clouddns.readwrite"
  3760  	//   ]
  3761  	// }
  3762  
  3763  }
  3764  
  3765  // Pages invokes f for each page of results.
  3766  // A non-nil error returned from f will halt the iteration.
  3767  // The provided context supersedes any context provided to the Context method.
  3768  func (c *ManagedZonesListCall) Pages(ctx context.Context, f func(*ManagedZonesListResponse) error) error {
  3769  	c.ctx_ = ctx
  3770  	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  3771  	for {
  3772  		x, err := c.Do()
  3773  		if err != nil {
  3774  			return err
  3775  		}
  3776  		if err := f(x); err != nil {
  3777  			return err
  3778  		}
  3779  		if x.NextPageToken == "" {
  3780  			return nil
  3781  		}
  3782  		c.PageToken(x.NextPageToken)
  3783  	}
  3784  }
  3785  
  3786  // method id "dns.managedZones.patch":
  3787  
  3788  type ManagedZonesPatchCall struct {
  3789  	s           *Service
  3790  	project     string
  3791  	managedZone string
  3792  	managedzone *ManagedZone
  3793  	urlParams_  gensupport.URLParams
  3794  	ctx_        context.Context
  3795  	header_     http.Header
  3796  }
  3797  
  3798  // Patch: Apply a partial update to an existing ManagedZone.
  3799  func (r *ManagedZonesService) Patch(project string, managedZone string, managedzone *ManagedZone) *ManagedZonesPatchCall {
  3800  	c := &ManagedZonesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3801  	c.project = project
  3802  	c.managedZone = managedZone
  3803  	c.managedzone = managedzone
  3804  	return c
  3805  }
  3806  
  3807  // ClientOperationId sets the optional parameter "clientOperationId":
  3808  // For mutating operation requests only. An optional identifier
  3809  // specified by the client. Must be unique for operation resources in
  3810  // the Operations collection.
  3811  func (c *ManagedZonesPatchCall) ClientOperationId(clientOperationId string) *ManagedZonesPatchCall {
  3812  	c.urlParams_.Set("clientOperationId", clientOperationId)
  3813  	return c
  3814  }
  3815  
  3816  // Fields allows partial responses to be retrieved. See
  3817  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3818  // for more information.
  3819  func (c *ManagedZonesPatchCall) Fields(s ...googleapi.Field) *ManagedZonesPatchCall {
  3820  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3821  	return c
  3822  }
  3823  
  3824  // Context sets the context to be used in this call's Do method. Any
  3825  // pending HTTP request will be aborted if the provided context is
  3826  // canceled.
  3827  func (c *ManagedZonesPatchCall) Context(ctx context.Context) *ManagedZonesPatchCall {
  3828  	c.ctx_ = ctx
  3829  	return c
  3830  }
  3831  
  3832  // Header returns an http.Header that can be modified by the caller to
  3833  // add HTTP headers to the request.
  3834  func (c *ManagedZonesPatchCall) Header() http.Header {
  3835  	if c.header_ == nil {
  3836  		c.header_ = make(http.Header)
  3837  	}
  3838  	return c.header_
  3839  }
  3840  
  3841  func (c *ManagedZonesPatchCall) doRequest(alt string) (*http.Response, error) {
  3842  	reqHeaders := make(http.Header)
  3843  	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200811")
  3844  	for k, v := range c.header_ {
  3845  		reqHeaders[k] = v
  3846  	}
  3847  	reqHeaders.Set("User-Agent", c.s.userAgent())
  3848  	var body io.Reader = nil
  3849  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.managedzone)
  3850  	if err != nil {
  3851  		return nil, err
  3852  	}
  3853  	reqHeaders.Set("Content-Type", "application/json")
  3854  	c.urlParams_.Set("alt", alt)
  3855  	c.urlParams_.Set("prettyPrint", "false")
  3856  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v2beta1/projects/{project}/managedZones/{managedZone}")
  3857  	urls += "?" + c.urlParams_.Encode()
  3858  	req, err := http.NewRequest("PATCH", urls, body)
  3859  	if err != nil {
  3860  		return nil, err
  3861  	}
  3862  	req.Header = reqHeaders
  3863  	googleapi.Expand(req.URL, map[string]string{
  3864  		"project":     c.project,
  3865  		"managedZone": c.managedZone,
  3866  	})
  3867  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3868  }
  3869  
  3870  // Do executes the "dns.managedZones.patch" call.
  3871  // Exactly one of *Operation or error will be non-nil. Any non-2xx
  3872  // status code is an error. Response headers are in either
  3873  // *Operation.ServerResponse.Header or (if a response was returned at
  3874  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  3875  // to check whether the returned error was because
  3876  // http.StatusNotModified was returned.
  3877  func (c *ManagedZonesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  3878  	gensupport.SetOptions(c.urlParams_, opts...)
  3879  	res, err := c.doRequest("json")
  3880  	if res != nil && res.StatusCode == http.StatusNotModified {
  3881  		if res.Body != nil {
  3882  			res.Body.Close()
  3883  		}
  3884  		return nil, &googleapi.Error{
  3885  			Code:   res.StatusCode,
  3886  			Header: res.Header,
  3887  		}
  3888  	}
  3889  	if err != nil {
  3890  		return nil, err
  3891  	}
  3892  	defer googleapi.CloseBody(res)
  3893  	if err := googleapi.CheckResponse(res); err != nil {
  3894  		return nil, err
  3895  	}
  3896  	ret := &Operation{
  3897  		ServerResponse: googleapi.ServerResponse{
  3898  			Header:         res.Header,
  3899  			HTTPStatusCode: res.StatusCode,
  3900  		},
  3901  	}
  3902  	target := &ret
  3903  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3904  		return nil, err
  3905  	}
  3906  	return ret, nil
  3907  	// {
  3908  	//   "description": "Apply a partial update to an existing ManagedZone.",
  3909  	//   "flatPath": "dns/v2beta1/projects/{project}/managedZones/{managedZone}",
  3910  	//   "httpMethod": "PATCH",
  3911  	//   "id": "dns.managedZones.patch",
  3912  	//   "parameterOrder": [
  3913  	//     "project",
  3914  	//     "managedZone"
  3915  	//   ],
  3916  	//   "parameters": {
  3917  	//     "clientOperationId": {
  3918  	//       "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.",
  3919  	//       "location": "query",
  3920  	//       "type": "string"
  3921  	//     },
  3922  	//     "managedZone": {
  3923  	//       "description": "Identifies the managed zone addressed by this request. Can be the managed zone name or id.",
  3924  	//       "location": "path",
  3925  	//       "required": true,
  3926  	//       "type": "string"
  3927  	//     },
  3928  	//     "project": {
  3929  	//       "description": "Identifies the project addressed by this request.",
  3930  	//       "location": "path",
  3931  	//       "required": true,
  3932  	//       "type": "string"
  3933  	//     }
  3934  	//   },
  3935  	//   "path": "dns/v2beta1/projects/{project}/managedZones/{managedZone}",
  3936  	//   "request": {
  3937  	//     "$ref": "ManagedZone"
  3938  	//   },
  3939  	//   "response": {
  3940  	//     "$ref": "Operation"
  3941  	//   },
  3942  	//   "scopes": [
  3943  	//     "https://www.googleapis.com/auth/cloud-platform",
  3944  	//     "https://www.googleapis.com/auth/ndev.clouddns.readwrite"
  3945  	//   ]
  3946  	// }
  3947  
  3948  }
  3949  
  3950  // method id "dns.managedZones.update":
  3951  
  3952  type ManagedZonesUpdateCall struct {
  3953  	s           *Service
  3954  	project     string
  3955  	managedZone string
  3956  	managedzone *ManagedZone
  3957  	urlParams_  gensupport.URLParams
  3958  	ctx_        context.Context
  3959  	header_     http.Header
  3960  }
  3961  
  3962  // Update: Update an existing ManagedZone.
  3963  func (r *ManagedZonesService) Update(project string, managedZone string, managedzone *ManagedZone) *ManagedZonesUpdateCall {
  3964  	c := &ManagedZonesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3965  	c.project = project
  3966  	c.managedZone = managedZone
  3967  	c.managedzone = managedzone
  3968  	return c
  3969  }
  3970  
  3971  // ClientOperationId sets the optional parameter "clientOperationId":
  3972  // For mutating operation requests only. An optional identifier
  3973  // specified by the client. Must be unique for operation resources in
  3974  // the Operations collection.
  3975  func (c *ManagedZonesUpdateCall) ClientOperationId(clientOperationId string) *ManagedZonesUpdateCall {
  3976  	c.urlParams_.Set("clientOperationId", clientOperationId)
  3977  	return c
  3978  }
  3979  
  3980  // Fields allows partial responses to be retrieved. See
  3981  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3982  // for more information.
  3983  func (c *ManagedZonesUpdateCall) Fields(s ...googleapi.Field) *ManagedZonesUpdateCall {
  3984  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3985  	return c
  3986  }
  3987  
  3988  // Context sets the context to be used in this call's Do method. Any
  3989  // pending HTTP request will be aborted if the provided context is
  3990  // canceled.
  3991  func (c *ManagedZonesUpdateCall) Context(ctx context.Context) *ManagedZonesUpdateCall {
  3992  	c.ctx_ = ctx
  3993  	return c
  3994  }
  3995  
  3996  // Header returns an http.Header that can be modified by the caller to
  3997  // add HTTP headers to the request.
  3998  func (c *ManagedZonesUpdateCall) Header() http.Header {
  3999  	if c.header_ == nil {
  4000  		c.header_ = make(http.Header)
  4001  	}
  4002  	return c.header_
  4003  }
  4004  
  4005  func (c *ManagedZonesUpdateCall) doRequest(alt string) (*http.Response, error) {
  4006  	reqHeaders := make(http.Header)
  4007  	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200811")
  4008  	for k, v := range c.header_ {
  4009  		reqHeaders[k] = v
  4010  	}
  4011  	reqHeaders.Set("User-Agent", c.s.userAgent())
  4012  	var body io.Reader = nil
  4013  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.managedzone)
  4014  	if err != nil {
  4015  		return nil, err
  4016  	}
  4017  	reqHeaders.Set("Content-Type", "application/json")
  4018  	c.urlParams_.Set("alt", alt)
  4019  	c.urlParams_.Set("prettyPrint", "false")
  4020  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v2beta1/projects/{project}/managedZones/{managedZone}")
  4021  	urls += "?" + c.urlParams_.Encode()
  4022  	req, err := http.NewRequest("PUT", urls, body)
  4023  	if err != nil {
  4024  		return nil, err
  4025  	}
  4026  	req.Header = reqHeaders
  4027  	googleapi.Expand(req.URL, map[string]string{
  4028  		"project":     c.project,
  4029  		"managedZone": c.managedZone,
  4030  	})
  4031  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4032  }
  4033  
  4034  // Do executes the "dns.managedZones.update" call.
  4035  // Exactly one of *Operation or error will be non-nil. Any non-2xx
  4036  // status code is an error. Response headers are in either
  4037  // *Operation.ServerResponse.Header or (if a response was returned at
  4038  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  4039  // to check whether the returned error was because
  4040  // http.StatusNotModified was returned.
  4041  func (c *ManagedZonesUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  4042  	gensupport.SetOptions(c.urlParams_, opts...)
  4043  	res, err := c.doRequest("json")
  4044  	if res != nil && res.StatusCode == http.StatusNotModified {
  4045  		if res.Body != nil {
  4046  			res.Body.Close()
  4047  		}
  4048  		return nil, &googleapi.Error{
  4049  			Code:   res.StatusCode,
  4050  			Header: res.Header,
  4051  		}
  4052  	}
  4053  	if err != nil {
  4054  		return nil, err
  4055  	}
  4056  	defer googleapi.CloseBody(res)
  4057  	if err := googleapi.CheckResponse(res); err != nil {
  4058  		return nil, err
  4059  	}
  4060  	ret := &Operation{
  4061  		ServerResponse: googleapi.ServerResponse{
  4062  			Header:         res.Header,
  4063  			HTTPStatusCode: res.StatusCode,
  4064  		},
  4065  	}
  4066  	target := &ret
  4067  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4068  		return nil, err
  4069  	}
  4070  	return ret, nil
  4071  	// {
  4072  	//   "description": "Update an existing ManagedZone.",
  4073  	//   "flatPath": "dns/v2beta1/projects/{project}/managedZones/{managedZone}",
  4074  	//   "httpMethod": "PUT",
  4075  	//   "id": "dns.managedZones.update",
  4076  	//   "parameterOrder": [
  4077  	//     "project",
  4078  	//     "managedZone"
  4079  	//   ],
  4080  	//   "parameters": {
  4081  	//     "clientOperationId": {
  4082  	//       "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.",
  4083  	//       "location": "query",
  4084  	//       "type": "string"
  4085  	//     },
  4086  	//     "managedZone": {
  4087  	//       "description": "Identifies the managed zone addressed by this request. Can be the managed zone name or id.",
  4088  	//       "location": "path",
  4089  	//       "required": true,
  4090  	//       "type": "string"
  4091  	//     },
  4092  	//     "project": {
  4093  	//       "description": "Identifies the project addressed by this request.",
  4094  	//       "location": "path",
  4095  	//       "required": true,
  4096  	//       "type": "string"
  4097  	//     }
  4098  	//   },
  4099  	//   "path": "dns/v2beta1/projects/{project}/managedZones/{managedZone}",
  4100  	//   "request": {
  4101  	//     "$ref": "ManagedZone"
  4102  	//   },
  4103  	//   "response": {
  4104  	//     "$ref": "Operation"
  4105  	//   },
  4106  	//   "scopes": [
  4107  	//     "https://www.googleapis.com/auth/cloud-platform",
  4108  	//     "https://www.googleapis.com/auth/ndev.clouddns.readwrite"
  4109  	//   ]
  4110  	// }
  4111  
  4112  }
  4113  
  4114  // method id "dns.policies.create":
  4115  
  4116  type PoliciesCreateCall struct {
  4117  	s          *Service
  4118  	project    string
  4119  	policy     *Policy
  4120  	urlParams_ gensupport.URLParams
  4121  	ctx_       context.Context
  4122  	header_    http.Header
  4123  }
  4124  
  4125  // Create: Create a new Policy
  4126  func (r *PoliciesService) Create(project string, policy *Policy) *PoliciesCreateCall {
  4127  	c := &PoliciesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4128  	c.project = project
  4129  	c.policy = policy
  4130  	return c
  4131  }
  4132  
  4133  // ClientOperationId sets the optional parameter "clientOperationId":
  4134  // For mutating operation requests only. An optional identifier
  4135  // specified by the client. Must be unique for operation resources in
  4136  // the Operations collection.
  4137  func (c *PoliciesCreateCall) ClientOperationId(clientOperationId string) *PoliciesCreateCall {
  4138  	c.urlParams_.Set("clientOperationId", clientOperationId)
  4139  	return c
  4140  }
  4141  
  4142  // Fields allows partial responses to be retrieved. See
  4143  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4144  // for more information.
  4145  func (c *PoliciesCreateCall) Fields(s ...googleapi.Field) *PoliciesCreateCall {
  4146  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4147  	return c
  4148  }
  4149  
  4150  // Context sets the context to be used in this call's Do method. Any
  4151  // pending HTTP request will be aborted if the provided context is
  4152  // canceled.
  4153  func (c *PoliciesCreateCall) Context(ctx context.Context) *PoliciesCreateCall {
  4154  	c.ctx_ = ctx
  4155  	return c
  4156  }
  4157  
  4158  // Header returns an http.Header that can be modified by the caller to
  4159  // add HTTP headers to the request.
  4160  func (c *PoliciesCreateCall) Header() http.Header {
  4161  	if c.header_ == nil {
  4162  		c.header_ = make(http.Header)
  4163  	}
  4164  	return c.header_
  4165  }
  4166  
  4167  func (c *PoliciesCreateCall) doRequest(alt string) (*http.Response, error) {
  4168  	reqHeaders := make(http.Header)
  4169  	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200811")
  4170  	for k, v := range c.header_ {
  4171  		reqHeaders[k] = v
  4172  	}
  4173  	reqHeaders.Set("User-Agent", c.s.userAgent())
  4174  	var body io.Reader = nil
  4175  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.policy)
  4176  	if err != nil {
  4177  		return nil, err
  4178  	}
  4179  	reqHeaders.Set("Content-Type", "application/json")
  4180  	c.urlParams_.Set("alt", alt)
  4181  	c.urlParams_.Set("prettyPrint", "false")
  4182  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v2beta1/projects/{project}/policies")
  4183  	urls += "?" + c.urlParams_.Encode()
  4184  	req, err := http.NewRequest("POST", urls, body)
  4185  	if err != nil {
  4186  		return nil, err
  4187  	}
  4188  	req.Header = reqHeaders
  4189  	googleapi.Expand(req.URL, map[string]string{
  4190  		"project": c.project,
  4191  	})
  4192  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4193  }
  4194  
  4195  // Do executes the "dns.policies.create" call.
  4196  // Exactly one of *Policy or error will be non-nil. Any non-2xx status
  4197  // code is an error. Response headers are in either
  4198  // *Policy.ServerResponse.Header or (if a response was returned at all)
  4199  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  4200  // check whether the returned error was because http.StatusNotModified
  4201  // was returned.
  4202  func (c *PoliciesCreateCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  4203  	gensupport.SetOptions(c.urlParams_, opts...)
  4204  	res, err := c.doRequest("json")
  4205  	if res != nil && res.StatusCode == http.StatusNotModified {
  4206  		if res.Body != nil {
  4207  			res.Body.Close()
  4208  		}
  4209  		return nil, &googleapi.Error{
  4210  			Code:   res.StatusCode,
  4211  			Header: res.Header,
  4212  		}
  4213  	}
  4214  	if err != nil {
  4215  		return nil, err
  4216  	}
  4217  	defer googleapi.CloseBody(res)
  4218  	if err := googleapi.CheckResponse(res); err != nil {
  4219  		return nil, err
  4220  	}
  4221  	ret := &Policy{
  4222  		ServerResponse: googleapi.ServerResponse{
  4223  			Header:         res.Header,
  4224  			HTTPStatusCode: res.StatusCode,
  4225  		},
  4226  	}
  4227  	target := &ret
  4228  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4229  		return nil, err
  4230  	}
  4231  	return ret, nil
  4232  	// {
  4233  	//   "description": "Create a new Policy",
  4234  	//   "flatPath": "dns/v2beta1/projects/{project}/policies",
  4235  	//   "httpMethod": "POST",
  4236  	//   "id": "dns.policies.create",
  4237  	//   "parameterOrder": [
  4238  	//     "project"
  4239  	//   ],
  4240  	//   "parameters": {
  4241  	//     "clientOperationId": {
  4242  	//       "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.",
  4243  	//       "location": "query",
  4244  	//       "type": "string"
  4245  	//     },
  4246  	//     "project": {
  4247  	//       "description": "Identifies the project addressed by this request.",
  4248  	//       "location": "path",
  4249  	//       "required": true,
  4250  	//       "type": "string"
  4251  	//     }
  4252  	//   },
  4253  	//   "path": "dns/v2beta1/projects/{project}/policies",
  4254  	//   "request": {
  4255  	//     "$ref": "Policy"
  4256  	//   },
  4257  	//   "response": {
  4258  	//     "$ref": "Policy"
  4259  	//   }
  4260  	// }
  4261  
  4262  }
  4263  
  4264  // method id "dns.policies.delete":
  4265  
  4266  type PoliciesDeleteCall struct {
  4267  	s          *Service
  4268  	project    string
  4269  	policy     string
  4270  	urlParams_ gensupport.URLParams
  4271  	ctx_       context.Context
  4272  	header_    http.Header
  4273  }
  4274  
  4275  // Delete: Delete a previously created Policy. Will fail if the policy
  4276  // is still being referenced by a network.
  4277  func (r *PoliciesService) Delete(project string, policy string) *PoliciesDeleteCall {
  4278  	c := &PoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4279  	c.project = project
  4280  	c.policy = policy
  4281  	return c
  4282  }
  4283  
  4284  // ClientOperationId sets the optional parameter "clientOperationId":
  4285  // For mutating operation requests only. An optional identifier
  4286  // specified by the client. Must be unique for operation resources in
  4287  // the Operations collection.
  4288  func (c *PoliciesDeleteCall) ClientOperationId(clientOperationId string) *PoliciesDeleteCall {
  4289  	c.urlParams_.Set("clientOperationId", clientOperationId)
  4290  	return c
  4291  }
  4292  
  4293  // Fields allows partial responses to be retrieved. See
  4294  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4295  // for more information.
  4296  func (c *PoliciesDeleteCall) Fields(s ...googleapi.Field) *PoliciesDeleteCall {
  4297  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4298  	return c
  4299  }
  4300  
  4301  // Context sets the context to be used in this call's Do method. Any
  4302  // pending HTTP request will be aborted if the provided context is
  4303  // canceled.
  4304  func (c *PoliciesDeleteCall) Context(ctx context.Context) *PoliciesDeleteCall {
  4305  	c.ctx_ = ctx
  4306  	return c
  4307  }
  4308  
  4309  // Header returns an http.Header that can be modified by the caller to
  4310  // add HTTP headers to the request.
  4311  func (c *PoliciesDeleteCall) Header() http.Header {
  4312  	if c.header_ == nil {
  4313  		c.header_ = make(http.Header)
  4314  	}
  4315  	return c.header_
  4316  }
  4317  
  4318  func (c *PoliciesDeleteCall) doRequest(alt string) (*http.Response, error) {
  4319  	reqHeaders := make(http.Header)
  4320  	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200811")
  4321  	for k, v := range c.header_ {
  4322  		reqHeaders[k] = v
  4323  	}
  4324  	reqHeaders.Set("User-Agent", c.s.userAgent())
  4325  	var body io.Reader = nil
  4326  	c.urlParams_.Set("alt", alt)
  4327  	c.urlParams_.Set("prettyPrint", "false")
  4328  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v2beta1/projects/{project}/policies/{policy}")
  4329  	urls += "?" + c.urlParams_.Encode()
  4330  	req, err := http.NewRequest("DELETE", urls, body)
  4331  	if err != nil {
  4332  		return nil, err
  4333  	}
  4334  	req.Header = reqHeaders
  4335  	googleapi.Expand(req.URL, map[string]string{
  4336  		"project": c.project,
  4337  		"policy":  c.policy,
  4338  	})
  4339  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4340  }
  4341  
  4342  // Do executes the "dns.policies.delete" call.
  4343  func (c *PoliciesDeleteCall) Do(opts ...googleapi.CallOption) error {
  4344  	gensupport.SetOptions(c.urlParams_, opts...)
  4345  	res, err := c.doRequest("json")
  4346  	if err != nil {
  4347  		return err
  4348  	}
  4349  	defer googleapi.CloseBody(res)
  4350  	if err := googleapi.CheckResponse(res); err != nil {
  4351  		return err
  4352  	}
  4353  	return nil
  4354  	// {
  4355  	//   "description": "Delete a previously created Policy. Will fail if the policy is still being referenced by a network.",
  4356  	//   "flatPath": "dns/v2beta1/projects/{project}/policies/{policy}",
  4357  	//   "httpMethod": "DELETE",
  4358  	//   "id": "dns.policies.delete",
  4359  	//   "parameterOrder": [
  4360  	//     "project",
  4361  	//     "policy"
  4362  	//   ],
  4363  	//   "parameters": {
  4364  	//     "clientOperationId": {
  4365  	//       "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.",
  4366  	//       "location": "query",
  4367  	//       "type": "string"
  4368  	//     },
  4369  	//     "policy": {
  4370  	//       "description": "User given friendly name of the policy addressed by this request.",
  4371  	//       "location": "path",
  4372  	//       "required": true,
  4373  	//       "type": "string"
  4374  	//     },
  4375  	//     "project": {
  4376  	//       "description": "Identifies the project addressed by this request.",
  4377  	//       "location": "path",
  4378  	//       "required": true,
  4379  	//       "type": "string"
  4380  	//     }
  4381  	//   },
  4382  	//   "path": "dns/v2beta1/projects/{project}/policies/{policy}"
  4383  	// }
  4384  
  4385  }
  4386  
  4387  // method id "dns.policies.get":
  4388  
  4389  type PoliciesGetCall struct {
  4390  	s            *Service
  4391  	project      string
  4392  	policy       string
  4393  	urlParams_   gensupport.URLParams
  4394  	ifNoneMatch_ string
  4395  	ctx_         context.Context
  4396  	header_      http.Header
  4397  }
  4398  
  4399  // Get: Fetch the representation of an existing Policy.
  4400  func (r *PoliciesService) Get(project string, policy string) *PoliciesGetCall {
  4401  	c := &PoliciesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4402  	c.project = project
  4403  	c.policy = policy
  4404  	return c
  4405  }
  4406  
  4407  // ClientOperationId sets the optional parameter "clientOperationId":
  4408  // For mutating operation requests only. An optional identifier
  4409  // specified by the client. Must be unique for operation resources in
  4410  // the Operations collection.
  4411  func (c *PoliciesGetCall) ClientOperationId(clientOperationId string) *PoliciesGetCall {
  4412  	c.urlParams_.Set("clientOperationId", clientOperationId)
  4413  	return c
  4414  }
  4415  
  4416  // Fields allows partial responses to be retrieved. See
  4417  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4418  // for more information.
  4419  func (c *PoliciesGetCall) Fields(s ...googleapi.Field) *PoliciesGetCall {
  4420  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4421  	return c
  4422  }
  4423  
  4424  // IfNoneMatch sets the optional parameter which makes the operation
  4425  // fail if the object's ETag matches the given value. This is useful for
  4426  // getting updates only after the object has changed since the last
  4427  // request. Use googleapi.IsNotModified to check whether the response
  4428  // error from Do is the result of In-None-Match.
  4429  func (c *PoliciesGetCall) IfNoneMatch(entityTag string) *PoliciesGetCall {
  4430  	c.ifNoneMatch_ = entityTag
  4431  	return c
  4432  }
  4433  
  4434  // Context sets the context to be used in this call's Do method. Any
  4435  // pending HTTP request will be aborted if the provided context is
  4436  // canceled.
  4437  func (c *PoliciesGetCall) Context(ctx context.Context) *PoliciesGetCall {
  4438  	c.ctx_ = ctx
  4439  	return c
  4440  }
  4441  
  4442  // Header returns an http.Header that can be modified by the caller to
  4443  // add HTTP headers to the request.
  4444  func (c *PoliciesGetCall) Header() http.Header {
  4445  	if c.header_ == nil {
  4446  		c.header_ = make(http.Header)
  4447  	}
  4448  	return c.header_
  4449  }
  4450  
  4451  func (c *PoliciesGetCall) doRequest(alt string) (*http.Response, error) {
  4452  	reqHeaders := make(http.Header)
  4453  	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200811")
  4454  	for k, v := range c.header_ {
  4455  		reqHeaders[k] = v
  4456  	}
  4457  	reqHeaders.Set("User-Agent", c.s.userAgent())
  4458  	if c.ifNoneMatch_ != "" {
  4459  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4460  	}
  4461  	var body io.Reader = nil
  4462  	c.urlParams_.Set("alt", alt)
  4463  	c.urlParams_.Set("prettyPrint", "false")
  4464  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v2beta1/projects/{project}/policies/{policy}")
  4465  	urls += "?" + c.urlParams_.Encode()
  4466  	req, err := http.NewRequest("GET", urls, body)
  4467  	if err != nil {
  4468  		return nil, err
  4469  	}
  4470  	req.Header = reqHeaders
  4471  	googleapi.Expand(req.URL, map[string]string{
  4472  		"project": c.project,
  4473  		"policy":  c.policy,
  4474  	})
  4475  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4476  }
  4477  
  4478  // Do executes the "dns.policies.get" call.
  4479  // Exactly one of *Policy or error will be non-nil. Any non-2xx status
  4480  // code is an error. Response headers are in either
  4481  // *Policy.ServerResponse.Header or (if a response was returned at all)
  4482  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  4483  // check whether the returned error was because http.StatusNotModified
  4484  // was returned.
  4485  func (c *PoliciesGetCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  4486  	gensupport.SetOptions(c.urlParams_, opts...)
  4487  	res, err := c.doRequest("json")
  4488  	if res != nil && res.StatusCode == http.StatusNotModified {
  4489  		if res.Body != nil {
  4490  			res.Body.Close()
  4491  		}
  4492  		return nil, &googleapi.Error{
  4493  			Code:   res.StatusCode,
  4494  			Header: res.Header,
  4495  		}
  4496  	}
  4497  	if err != nil {
  4498  		return nil, err
  4499  	}
  4500  	defer googleapi.CloseBody(res)
  4501  	if err := googleapi.CheckResponse(res); err != nil {
  4502  		return nil, err
  4503  	}
  4504  	ret := &Policy{
  4505  		ServerResponse: googleapi.ServerResponse{
  4506  			Header:         res.Header,
  4507  			HTTPStatusCode: res.StatusCode,
  4508  		},
  4509  	}
  4510  	target := &ret
  4511  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4512  		return nil, err
  4513  	}
  4514  	return ret, nil
  4515  	// {
  4516  	//   "description": "Fetch the representation of an existing Policy.",
  4517  	//   "flatPath": "dns/v2beta1/projects/{project}/policies/{policy}",
  4518  	//   "httpMethod": "GET",
  4519  	//   "id": "dns.policies.get",
  4520  	//   "parameterOrder": [
  4521  	//     "project",
  4522  	//     "policy"
  4523  	//   ],
  4524  	//   "parameters": {
  4525  	//     "clientOperationId": {
  4526  	//       "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.",
  4527  	//       "location": "query",
  4528  	//       "type": "string"
  4529  	//     },
  4530  	//     "policy": {
  4531  	//       "description": "User given friendly name of the policy addressed by this request.",
  4532  	//       "location": "path",
  4533  	//       "required": true,
  4534  	//       "type": "string"
  4535  	//     },
  4536  	//     "project": {
  4537  	//       "description": "Identifies the project addressed by this request.",
  4538  	//       "location": "path",
  4539  	//       "required": true,
  4540  	//       "type": "string"
  4541  	//     }
  4542  	//   },
  4543  	//   "path": "dns/v2beta1/projects/{project}/policies/{policy}",
  4544  	//   "response": {
  4545  	//     "$ref": "Policy"
  4546  	//   }
  4547  	// }
  4548  
  4549  }
  4550  
  4551  // method id "dns.policies.list":
  4552  
  4553  type PoliciesListCall struct {
  4554  	s            *Service
  4555  	project      string
  4556  	urlParams_   gensupport.URLParams
  4557  	ifNoneMatch_ string
  4558  	ctx_         context.Context
  4559  	header_      http.Header
  4560  }
  4561  
  4562  // List: Enumerate all Policies associated with a project.
  4563  func (r *PoliciesService) List(project string) *PoliciesListCall {
  4564  	c := &PoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4565  	c.project = project
  4566  	return c
  4567  }
  4568  
  4569  // MaxResults sets the optional parameter "maxResults": Maximum number
  4570  // of results to be returned. If unspecified, the server will decide how
  4571  // many results to return.
  4572  func (c *PoliciesListCall) MaxResults(maxResults int64) *PoliciesListCall {
  4573  	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  4574  	return c
  4575  }
  4576  
  4577  // PageToken sets the optional parameter "pageToken": A tag returned by
  4578  // a previous list request that was truncated. Use this parameter to
  4579  // continue a previous list request.
  4580  func (c *PoliciesListCall) PageToken(pageToken string) *PoliciesListCall {
  4581  	c.urlParams_.Set("pageToken", pageToken)
  4582  	return c
  4583  }
  4584  
  4585  // Fields allows partial responses to be retrieved. See
  4586  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4587  // for more information.
  4588  func (c *PoliciesListCall) Fields(s ...googleapi.Field) *PoliciesListCall {
  4589  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4590  	return c
  4591  }
  4592  
  4593  // IfNoneMatch sets the optional parameter which makes the operation
  4594  // fail if the object's ETag matches the given value. This is useful for
  4595  // getting updates only after the object has changed since the last
  4596  // request. Use googleapi.IsNotModified to check whether the response
  4597  // error from Do is the result of In-None-Match.
  4598  func (c *PoliciesListCall) IfNoneMatch(entityTag string) *PoliciesListCall {
  4599  	c.ifNoneMatch_ = entityTag
  4600  	return c
  4601  }
  4602  
  4603  // Context sets the context to be used in this call's Do method. Any
  4604  // pending HTTP request will be aborted if the provided context is
  4605  // canceled.
  4606  func (c *PoliciesListCall) Context(ctx context.Context) *PoliciesListCall {
  4607  	c.ctx_ = ctx
  4608  	return c
  4609  }
  4610  
  4611  // Header returns an http.Header that can be modified by the caller to
  4612  // add HTTP headers to the request.
  4613  func (c *PoliciesListCall) Header() http.Header {
  4614  	if c.header_ == nil {
  4615  		c.header_ = make(http.Header)
  4616  	}
  4617  	return c.header_
  4618  }
  4619  
  4620  func (c *PoliciesListCall) doRequest(alt string) (*http.Response, error) {
  4621  	reqHeaders := make(http.Header)
  4622  	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200811")
  4623  	for k, v := range c.header_ {
  4624  		reqHeaders[k] = v
  4625  	}
  4626  	reqHeaders.Set("User-Agent", c.s.userAgent())
  4627  	if c.ifNoneMatch_ != "" {
  4628  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4629  	}
  4630  	var body io.Reader = nil
  4631  	c.urlParams_.Set("alt", alt)
  4632  	c.urlParams_.Set("prettyPrint", "false")
  4633  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v2beta1/projects/{project}/policies")
  4634  	urls += "?" + c.urlParams_.Encode()
  4635  	req, err := http.NewRequest("GET", urls, body)
  4636  	if err != nil {
  4637  		return nil, err
  4638  	}
  4639  	req.Header = reqHeaders
  4640  	googleapi.Expand(req.URL, map[string]string{
  4641  		"project": c.project,
  4642  	})
  4643  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4644  }
  4645  
  4646  // Do executes the "dns.policies.list" call.
  4647  // Exactly one of *PoliciesListResponse or error will be non-nil. Any
  4648  // non-2xx status code is an error. Response headers are in either
  4649  // *PoliciesListResponse.ServerResponse.Header or (if a response was
  4650  // returned at all) in error.(*googleapi.Error).Header. Use
  4651  // googleapi.IsNotModified to check whether the returned error was
  4652  // because http.StatusNotModified was returned.
  4653  func (c *PoliciesListCall) Do(opts ...googleapi.CallOption) (*PoliciesListResponse, error) {
  4654  	gensupport.SetOptions(c.urlParams_, opts...)
  4655  	res, err := c.doRequest("json")
  4656  	if res != nil && res.StatusCode == http.StatusNotModified {
  4657  		if res.Body != nil {
  4658  			res.Body.Close()
  4659  		}
  4660  		return nil, &googleapi.Error{
  4661  			Code:   res.StatusCode,
  4662  			Header: res.Header,
  4663  		}
  4664  	}
  4665  	if err != nil {
  4666  		return nil, err
  4667  	}
  4668  	defer googleapi.CloseBody(res)
  4669  	if err := googleapi.CheckResponse(res); err != nil {
  4670  		return nil, err
  4671  	}
  4672  	ret := &PoliciesListResponse{
  4673  		ServerResponse: googleapi.ServerResponse{
  4674  			Header:         res.Header,
  4675  			HTTPStatusCode: res.StatusCode,
  4676  		},
  4677  	}
  4678  	target := &ret
  4679  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4680  		return nil, err
  4681  	}
  4682  	return ret, nil
  4683  	// {
  4684  	//   "description": "Enumerate all Policies associated with a project.",
  4685  	//   "flatPath": "dns/v2beta1/projects/{project}/policies",
  4686  	//   "httpMethod": "GET",
  4687  	//   "id": "dns.policies.list",
  4688  	//   "parameterOrder": [
  4689  	//     "project"
  4690  	//   ],
  4691  	//   "parameters": {
  4692  	//     "maxResults": {
  4693  	//       "description": "Optional. Maximum number of results to be returned. If unspecified, the server will decide how many results to return.",
  4694  	//       "format": "int32",
  4695  	//       "location": "query",
  4696  	//       "type": "integer"
  4697  	//     },
  4698  	//     "pageToken": {
  4699  	//       "description": "Optional. A tag returned by a previous list request that was truncated. Use this parameter to continue a previous list request.",
  4700  	//       "location": "query",
  4701  	//       "type": "string"
  4702  	//     },
  4703  	//     "project": {
  4704  	//       "description": "Identifies the project addressed by this request.",
  4705  	//       "location": "path",
  4706  	//       "required": true,
  4707  	//       "type": "string"
  4708  	//     }
  4709  	//   },
  4710  	//   "path": "dns/v2beta1/projects/{project}/policies",
  4711  	//   "response": {
  4712  	//     "$ref": "PoliciesListResponse"
  4713  	//   }
  4714  	// }
  4715  
  4716  }
  4717  
  4718  // Pages invokes f for each page of results.
  4719  // A non-nil error returned from f will halt the iteration.
  4720  // The provided context supersedes any context provided to the Context method.
  4721  func (c *PoliciesListCall) Pages(ctx context.Context, f func(*PoliciesListResponse) error) error {
  4722  	c.ctx_ = ctx
  4723  	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  4724  	for {
  4725  		x, err := c.Do()
  4726  		if err != nil {
  4727  			return err
  4728  		}
  4729  		if err := f(x); err != nil {
  4730  			return err
  4731  		}
  4732  		if x.NextPageToken == "" {
  4733  			return nil
  4734  		}
  4735  		c.PageToken(x.NextPageToken)
  4736  	}
  4737  }
  4738  
  4739  // method id "dns.policies.patch":
  4740  
  4741  type PoliciesPatchCall struct {
  4742  	s          *Service
  4743  	project    string
  4744  	policy     string
  4745  	policy2    *Policy
  4746  	urlParams_ gensupport.URLParams
  4747  	ctx_       context.Context
  4748  	header_    http.Header
  4749  }
  4750  
  4751  // Patch: Apply a partial update to an existing Policy.
  4752  func (r *PoliciesService) Patch(project string, policy string, policy2 *Policy) *PoliciesPatchCall {
  4753  	c := &PoliciesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4754  	c.project = project
  4755  	c.policy = policy
  4756  	c.policy2 = policy2
  4757  	return c
  4758  }
  4759  
  4760  // ClientOperationId sets the optional parameter "clientOperationId":
  4761  // For mutating operation requests only. An optional identifier
  4762  // specified by the client. Must be unique for operation resources in
  4763  // the Operations collection.
  4764  func (c *PoliciesPatchCall) ClientOperationId(clientOperationId string) *PoliciesPatchCall {
  4765  	c.urlParams_.Set("clientOperationId", clientOperationId)
  4766  	return c
  4767  }
  4768  
  4769  // Fields allows partial responses to be retrieved. See
  4770  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4771  // for more information.
  4772  func (c *PoliciesPatchCall) Fields(s ...googleapi.Field) *PoliciesPatchCall {
  4773  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4774  	return c
  4775  }
  4776  
  4777  // Context sets the context to be used in this call's Do method. Any
  4778  // pending HTTP request will be aborted if the provided context is
  4779  // canceled.
  4780  func (c *PoliciesPatchCall) Context(ctx context.Context) *PoliciesPatchCall {
  4781  	c.ctx_ = ctx
  4782  	return c
  4783  }
  4784  
  4785  // Header returns an http.Header that can be modified by the caller to
  4786  // add HTTP headers to the request.
  4787  func (c *PoliciesPatchCall) Header() http.Header {
  4788  	if c.header_ == nil {
  4789  		c.header_ = make(http.Header)
  4790  	}
  4791  	return c.header_
  4792  }
  4793  
  4794  func (c *PoliciesPatchCall) doRequest(alt string) (*http.Response, error) {
  4795  	reqHeaders := make(http.Header)
  4796  	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200811")
  4797  	for k, v := range c.header_ {
  4798  		reqHeaders[k] = v
  4799  	}
  4800  	reqHeaders.Set("User-Agent", c.s.userAgent())
  4801  	var body io.Reader = nil
  4802  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.policy2)
  4803  	if err != nil {
  4804  		return nil, err
  4805  	}
  4806  	reqHeaders.Set("Content-Type", "application/json")
  4807  	c.urlParams_.Set("alt", alt)
  4808  	c.urlParams_.Set("prettyPrint", "false")
  4809  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v2beta1/projects/{project}/policies/{policy}")
  4810  	urls += "?" + c.urlParams_.Encode()
  4811  	req, err := http.NewRequest("PATCH", urls, body)
  4812  	if err != nil {
  4813  		return nil, err
  4814  	}
  4815  	req.Header = reqHeaders
  4816  	googleapi.Expand(req.URL, map[string]string{
  4817  		"project": c.project,
  4818  		"policy":  c.policy,
  4819  	})
  4820  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4821  }
  4822  
  4823  // Do executes the "dns.policies.patch" call.
  4824  // Exactly one of *PoliciesPatchResponse or error will be non-nil. Any
  4825  // non-2xx status code is an error. Response headers are in either
  4826  // *PoliciesPatchResponse.ServerResponse.Header or (if a response was
  4827  // returned at all) in error.(*googleapi.Error).Header. Use
  4828  // googleapi.IsNotModified to check whether the returned error was
  4829  // because http.StatusNotModified was returned.
  4830  func (c *PoliciesPatchCall) Do(opts ...googleapi.CallOption) (*PoliciesPatchResponse, error) {
  4831  	gensupport.SetOptions(c.urlParams_, opts...)
  4832  	res, err := c.doRequest("json")
  4833  	if res != nil && res.StatusCode == http.StatusNotModified {
  4834  		if res.Body != nil {
  4835  			res.Body.Close()
  4836  		}
  4837  		return nil, &googleapi.Error{
  4838  			Code:   res.StatusCode,
  4839  			Header: res.Header,
  4840  		}
  4841  	}
  4842  	if err != nil {
  4843  		return nil, err
  4844  	}
  4845  	defer googleapi.CloseBody(res)
  4846  	if err := googleapi.CheckResponse(res); err != nil {
  4847  		return nil, err
  4848  	}
  4849  	ret := &PoliciesPatchResponse{
  4850  		ServerResponse: googleapi.ServerResponse{
  4851  			Header:         res.Header,
  4852  			HTTPStatusCode: res.StatusCode,
  4853  		},
  4854  	}
  4855  	target := &ret
  4856  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4857  		return nil, err
  4858  	}
  4859  	return ret, nil
  4860  	// {
  4861  	//   "description": "Apply a partial update to an existing Policy.",
  4862  	//   "flatPath": "dns/v2beta1/projects/{project}/policies/{policy}",
  4863  	//   "httpMethod": "PATCH",
  4864  	//   "id": "dns.policies.patch",
  4865  	//   "parameterOrder": [
  4866  	//     "project",
  4867  	//     "policy"
  4868  	//   ],
  4869  	//   "parameters": {
  4870  	//     "clientOperationId": {
  4871  	//       "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.",
  4872  	//       "location": "query",
  4873  	//       "type": "string"
  4874  	//     },
  4875  	//     "policy": {
  4876  	//       "description": "User given friendly name of the policy addressed by this request.",
  4877  	//       "location": "path",
  4878  	//       "required": true,
  4879  	//       "type": "string"
  4880  	//     },
  4881  	//     "project": {
  4882  	//       "description": "Identifies the project addressed by this request.",
  4883  	//       "location": "path",
  4884  	//       "required": true,
  4885  	//       "type": "string"
  4886  	//     }
  4887  	//   },
  4888  	//   "path": "dns/v2beta1/projects/{project}/policies/{policy}",
  4889  	//   "request": {
  4890  	//     "$ref": "Policy"
  4891  	//   },
  4892  	//   "response": {
  4893  	//     "$ref": "PoliciesPatchResponse"
  4894  	//   }
  4895  	// }
  4896  
  4897  }
  4898  
  4899  // method id "dns.policies.update":
  4900  
  4901  type PoliciesUpdateCall struct {
  4902  	s          *Service
  4903  	project    string
  4904  	policy     string
  4905  	policy2    *Policy
  4906  	urlParams_ gensupport.URLParams
  4907  	ctx_       context.Context
  4908  	header_    http.Header
  4909  }
  4910  
  4911  // Update: Update an existing Policy.
  4912  func (r *PoliciesService) Update(project string, policy string, policy2 *Policy) *PoliciesUpdateCall {
  4913  	c := &PoliciesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4914  	c.project = project
  4915  	c.policy = policy
  4916  	c.policy2 = policy2
  4917  	return c
  4918  }
  4919  
  4920  // ClientOperationId sets the optional parameter "clientOperationId":
  4921  // For mutating operation requests only. An optional identifier
  4922  // specified by the client. Must be unique for operation resources in
  4923  // the Operations collection.
  4924  func (c *PoliciesUpdateCall) ClientOperationId(clientOperationId string) *PoliciesUpdateCall {
  4925  	c.urlParams_.Set("clientOperationId", clientOperationId)
  4926  	return c
  4927  }
  4928  
  4929  // Fields allows partial responses to be retrieved. See
  4930  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4931  // for more information.
  4932  func (c *PoliciesUpdateCall) Fields(s ...googleapi.Field) *PoliciesUpdateCall {
  4933  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4934  	return c
  4935  }
  4936  
  4937  // Context sets the context to be used in this call's Do method. Any
  4938  // pending HTTP request will be aborted if the provided context is
  4939  // canceled.
  4940  func (c *PoliciesUpdateCall) Context(ctx context.Context) *PoliciesUpdateCall {
  4941  	c.ctx_ = ctx
  4942  	return c
  4943  }
  4944  
  4945  // Header returns an http.Header that can be modified by the caller to
  4946  // add HTTP headers to the request.
  4947  func (c *PoliciesUpdateCall) Header() http.Header {
  4948  	if c.header_ == nil {
  4949  		c.header_ = make(http.Header)
  4950  	}
  4951  	return c.header_
  4952  }
  4953  
  4954  func (c *PoliciesUpdateCall) doRequest(alt string) (*http.Response, error) {
  4955  	reqHeaders := make(http.Header)
  4956  	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200811")
  4957  	for k, v := range c.header_ {
  4958  		reqHeaders[k] = v
  4959  	}
  4960  	reqHeaders.Set("User-Agent", c.s.userAgent())
  4961  	var body io.Reader = nil
  4962  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.policy2)
  4963  	if err != nil {
  4964  		return nil, err
  4965  	}
  4966  	reqHeaders.Set("Content-Type", "application/json")
  4967  	c.urlParams_.Set("alt", alt)
  4968  	c.urlParams_.Set("prettyPrint", "false")
  4969  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v2beta1/projects/{project}/policies/{policy}")
  4970  	urls += "?" + c.urlParams_.Encode()
  4971  	req, err := http.NewRequest("PUT", urls, body)
  4972  	if err != nil {
  4973  		return nil, err
  4974  	}
  4975  	req.Header = reqHeaders
  4976  	googleapi.Expand(req.URL, map[string]string{
  4977  		"project": c.project,
  4978  		"policy":  c.policy,
  4979  	})
  4980  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4981  }
  4982  
  4983  // Do executes the "dns.policies.update" call.
  4984  // Exactly one of *PoliciesUpdateResponse or error will be non-nil. Any
  4985  // non-2xx status code is an error. Response headers are in either
  4986  // *PoliciesUpdateResponse.ServerResponse.Header or (if a response was
  4987  // returned at all) in error.(*googleapi.Error).Header. Use
  4988  // googleapi.IsNotModified to check whether the returned error was
  4989  // because http.StatusNotModified was returned.
  4990  func (c *PoliciesUpdateCall) Do(opts ...googleapi.CallOption) (*PoliciesUpdateResponse, error) {
  4991  	gensupport.SetOptions(c.urlParams_, opts...)
  4992  	res, err := c.doRequest("json")
  4993  	if res != nil && res.StatusCode == http.StatusNotModified {
  4994  		if res.Body != nil {
  4995  			res.Body.Close()
  4996  		}
  4997  		return nil, &googleapi.Error{
  4998  			Code:   res.StatusCode,
  4999  			Header: res.Header,
  5000  		}
  5001  	}
  5002  	if err != nil {
  5003  		return nil, err
  5004  	}
  5005  	defer googleapi.CloseBody(res)
  5006  	if err := googleapi.CheckResponse(res); err != nil {
  5007  		return nil, err
  5008  	}
  5009  	ret := &PoliciesUpdateResponse{
  5010  		ServerResponse: googleapi.ServerResponse{
  5011  			Header:         res.Header,
  5012  			HTTPStatusCode: res.StatusCode,
  5013  		},
  5014  	}
  5015  	target := &ret
  5016  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5017  		return nil, err
  5018  	}
  5019  	return ret, nil
  5020  	// {
  5021  	//   "description": "Update an existing Policy.",
  5022  	//   "flatPath": "dns/v2beta1/projects/{project}/policies/{policy}",
  5023  	//   "httpMethod": "PUT",
  5024  	//   "id": "dns.policies.update",
  5025  	//   "parameterOrder": [
  5026  	//     "project",
  5027  	//     "policy"
  5028  	//   ],
  5029  	//   "parameters": {
  5030  	//     "clientOperationId": {
  5031  	//       "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.",
  5032  	//       "location": "query",
  5033  	//       "type": "string"
  5034  	//     },
  5035  	//     "policy": {
  5036  	//       "description": "User given friendly name of the policy addressed by this request.",
  5037  	//       "location": "path",
  5038  	//       "required": true,
  5039  	//       "type": "string"
  5040  	//     },
  5041  	//     "project": {
  5042  	//       "description": "Identifies the project addressed by this request.",
  5043  	//       "location": "path",
  5044  	//       "required": true,
  5045  	//       "type": "string"
  5046  	//     }
  5047  	//   },
  5048  	//   "path": "dns/v2beta1/projects/{project}/policies/{policy}",
  5049  	//   "request": {
  5050  	//     "$ref": "Policy"
  5051  	//   },
  5052  	//   "response": {
  5053  	//     "$ref": "PoliciesUpdateResponse"
  5054  	//   }
  5055  	// }
  5056  
  5057  }
  5058  
  5059  // method id "dns.projects.get":
  5060  
  5061  type ProjectsGetCall struct {
  5062  	s            *Service
  5063  	project      string
  5064  	urlParams_   gensupport.URLParams
  5065  	ifNoneMatch_ string
  5066  	ctx_         context.Context
  5067  	header_      http.Header
  5068  }
  5069  
  5070  // Get: Fetch the representation of an existing Project.
  5071  func (r *ProjectsService) Get(project string) *ProjectsGetCall {
  5072  	c := &ProjectsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5073  	c.project = project
  5074  	return c
  5075  }
  5076  
  5077  // ClientOperationId sets the optional parameter "clientOperationId":
  5078  // For mutating operation requests only. An optional identifier
  5079  // specified by the client. Must be unique for operation resources in
  5080  // the Operations collection.
  5081  func (c *ProjectsGetCall) ClientOperationId(clientOperationId string) *ProjectsGetCall {
  5082  	c.urlParams_.Set("clientOperationId", clientOperationId)
  5083  	return c
  5084  }
  5085  
  5086  // Fields allows partial responses to be retrieved. See
  5087  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5088  // for more information.
  5089  func (c *ProjectsGetCall) Fields(s ...googleapi.Field) *ProjectsGetCall {
  5090  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5091  	return c
  5092  }
  5093  
  5094  // IfNoneMatch sets the optional parameter which makes the operation
  5095  // fail if the object's ETag matches the given value. This is useful for
  5096  // getting updates only after the object has changed since the last
  5097  // request. Use googleapi.IsNotModified to check whether the response
  5098  // error from Do is the result of In-None-Match.
  5099  func (c *ProjectsGetCall) IfNoneMatch(entityTag string) *ProjectsGetCall {
  5100  	c.ifNoneMatch_ = entityTag
  5101  	return c
  5102  }
  5103  
  5104  // Context sets the context to be used in this call's Do method. Any
  5105  // pending HTTP request will be aborted if the provided context is
  5106  // canceled.
  5107  func (c *ProjectsGetCall) Context(ctx context.Context) *ProjectsGetCall {
  5108  	c.ctx_ = ctx
  5109  	return c
  5110  }
  5111  
  5112  // Header returns an http.Header that can be modified by the caller to
  5113  // add HTTP headers to the request.
  5114  func (c *ProjectsGetCall) Header() http.Header {
  5115  	if c.header_ == nil {
  5116  		c.header_ = make(http.Header)
  5117  	}
  5118  	return c.header_
  5119  }
  5120  
  5121  func (c *ProjectsGetCall) doRequest(alt string) (*http.Response, error) {
  5122  	reqHeaders := make(http.Header)
  5123  	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200811")
  5124  	for k, v := range c.header_ {
  5125  		reqHeaders[k] = v
  5126  	}
  5127  	reqHeaders.Set("User-Agent", c.s.userAgent())
  5128  	if c.ifNoneMatch_ != "" {
  5129  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5130  	}
  5131  	var body io.Reader = nil
  5132  	c.urlParams_.Set("alt", alt)
  5133  	c.urlParams_.Set("prettyPrint", "false")
  5134  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v2beta1/projects/{project}")
  5135  	urls += "?" + c.urlParams_.Encode()
  5136  	req, err := http.NewRequest("GET", urls, body)
  5137  	if err != nil {
  5138  		return nil, err
  5139  	}
  5140  	req.Header = reqHeaders
  5141  	googleapi.Expand(req.URL, map[string]string{
  5142  		"project": c.project,
  5143  	})
  5144  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5145  }
  5146  
  5147  // Do executes the "dns.projects.get" call.
  5148  // Exactly one of *Project or error will be non-nil. Any non-2xx status
  5149  // code is an error. Response headers are in either
  5150  // *Project.ServerResponse.Header or (if a response was returned at all)
  5151  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  5152  // check whether the returned error was because http.StatusNotModified
  5153  // was returned.
  5154  func (c *ProjectsGetCall) Do(opts ...googleapi.CallOption) (*Project, error) {
  5155  	gensupport.SetOptions(c.urlParams_, opts...)
  5156  	res, err := c.doRequest("json")
  5157  	if res != nil && res.StatusCode == http.StatusNotModified {
  5158  		if res.Body != nil {
  5159  			res.Body.Close()
  5160  		}
  5161  		return nil, &googleapi.Error{
  5162  			Code:   res.StatusCode,
  5163  			Header: res.Header,
  5164  		}
  5165  	}
  5166  	if err != nil {
  5167  		return nil, err
  5168  	}
  5169  	defer googleapi.CloseBody(res)
  5170  	if err := googleapi.CheckResponse(res); err != nil {
  5171  		return nil, err
  5172  	}
  5173  	ret := &Project{
  5174  		ServerResponse: googleapi.ServerResponse{
  5175  			Header:         res.Header,
  5176  			HTTPStatusCode: res.StatusCode,
  5177  		},
  5178  	}
  5179  	target := &ret
  5180  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5181  		return nil, err
  5182  	}
  5183  	return ret, nil
  5184  	// {
  5185  	//   "description": "Fetch the representation of an existing Project.",
  5186  	//   "flatPath": "dns/v2beta1/projects/{project}",
  5187  	//   "httpMethod": "GET",
  5188  	//   "id": "dns.projects.get",
  5189  	//   "parameterOrder": [
  5190  	//     "project"
  5191  	//   ],
  5192  	//   "parameters": {
  5193  	//     "clientOperationId": {
  5194  	//       "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.",
  5195  	//       "location": "query",
  5196  	//       "type": "string"
  5197  	//     },
  5198  	//     "project": {
  5199  	//       "description": "Identifies the project addressed by this request.",
  5200  	//       "location": "path",
  5201  	//       "required": true,
  5202  	//       "type": "string"
  5203  	//     }
  5204  	//   },
  5205  	//   "path": "dns/v2beta1/projects/{project}",
  5206  	//   "response": {
  5207  	//     "$ref": "Project"
  5208  	//   },
  5209  	//   "scopes": [
  5210  	//     "https://www.googleapis.com/auth/cloud-platform",
  5211  	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
  5212  	//     "https://www.googleapis.com/auth/ndev.clouddns.readonly",
  5213  	//     "https://www.googleapis.com/auth/ndev.clouddns.readwrite"
  5214  	//   ]
  5215  	// }
  5216  
  5217  }
  5218  
  5219  // method id "dns.resourceRecordSets.list":
  5220  
  5221  type ResourceRecordSetsListCall struct {
  5222  	s            *Service
  5223  	project      string
  5224  	managedZone  string
  5225  	urlParams_   gensupport.URLParams
  5226  	ifNoneMatch_ string
  5227  	ctx_         context.Context
  5228  	header_      http.Header
  5229  }
  5230  
  5231  // List: Enumerate ResourceRecordSets that have been created but not yet
  5232  // deleted.
  5233  func (r *ResourceRecordSetsService) List(project string, managedZone string) *ResourceRecordSetsListCall {
  5234  	c := &ResourceRecordSetsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5235  	c.project = project
  5236  	c.managedZone = managedZone
  5237  	return c
  5238  }
  5239  
  5240  // MaxResults sets the optional parameter "maxResults": Maximum number
  5241  // of results to be returned. If unspecified, the server will decide how
  5242  // many results to return.
  5243  func (c *ResourceRecordSetsListCall) MaxResults(maxResults int64) *ResourceRecordSetsListCall {
  5244  	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  5245  	return c
  5246  }
  5247  
  5248  // Name sets the optional parameter "name": Restricts the list to return
  5249  // only records with this fully qualified domain name.
  5250  func (c *ResourceRecordSetsListCall) Name(name string) *ResourceRecordSetsListCall {
  5251  	c.urlParams_.Set("name", name)
  5252  	return c
  5253  }
  5254  
  5255  // PageToken sets the optional parameter "pageToken": A tag returned by
  5256  // a previous list request that was truncated. Use this parameter to
  5257  // continue a previous list request.
  5258  func (c *ResourceRecordSetsListCall) PageToken(pageToken string) *ResourceRecordSetsListCall {
  5259  	c.urlParams_.Set("pageToken", pageToken)
  5260  	return c
  5261  }
  5262  
  5263  // Type sets the optional parameter "type": Restricts the list to return
  5264  // only records of this type. If present, the "name" parameter must also
  5265  // be present.
  5266  func (c *ResourceRecordSetsListCall) Type(type_ string) *ResourceRecordSetsListCall {
  5267  	c.urlParams_.Set("type", type_)
  5268  	return c
  5269  }
  5270  
  5271  // Fields allows partial responses to be retrieved. See
  5272  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5273  // for more information.
  5274  func (c *ResourceRecordSetsListCall) Fields(s ...googleapi.Field) *ResourceRecordSetsListCall {
  5275  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5276  	return c
  5277  }
  5278  
  5279  // IfNoneMatch sets the optional parameter which makes the operation
  5280  // fail if the object's ETag matches the given value. This is useful for
  5281  // getting updates only after the object has changed since the last
  5282  // request. Use googleapi.IsNotModified to check whether the response
  5283  // error from Do is the result of In-None-Match.
  5284  func (c *ResourceRecordSetsListCall) IfNoneMatch(entityTag string) *ResourceRecordSetsListCall {
  5285  	c.ifNoneMatch_ = entityTag
  5286  	return c
  5287  }
  5288  
  5289  // Context sets the context to be used in this call's Do method. Any
  5290  // pending HTTP request will be aborted if the provided context is
  5291  // canceled.
  5292  func (c *ResourceRecordSetsListCall) Context(ctx context.Context) *ResourceRecordSetsListCall {
  5293  	c.ctx_ = ctx
  5294  	return c
  5295  }
  5296  
  5297  // Header returns an http.Header that can be modified by the caller to
  5298  // add HTTP headers to the request.
  5299  func (c *ResourceRecordSetsListCall) Header() http.Header {
  5300  	if c.header_ == nil {
  5301  		c.header_ = make(http.Header)
  5302  	}
  5303  	return c.header_
  5304  }
  5305  
  5306  func (c *ResourceRecordSetsListCall) doRequest(alt string) (*http.Response, error) {
  5307  	reqHeaders := make(http.Header)
  5308  	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200811")
  5309  	for k, v := range c.header_ {
  5310  		reqHeaders[k] = v
  5311  	}
  5312  	reqHeaders.Set("User-Agent", c.s.userAgent())
  5313  	if c.ifNoneMatch_ != "" {
  5314  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5315  	}
  5316  	var body io.Reader = nil
  5317  	c.urlParams_.Set("alt", alt)
  5318  	c.urlParams_.Set("prettyPrint", "false")
  5319  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v2beta1/projects/{project}/managedZones/{managedZone}/rrsets")
  5320  	urls += "?" + c.urlParams_.Encode()
  5321  	req, err := http.NewRequest("GET", urls, body)
  5322  	if err != nil {
  5323  		return nil, err
  5324  	}
  5325  	req.Header = reqHeaders
  5326  	googleapi.Expand(req.URL, map[string]string{
  5327  		"project":     c.project,
  5328  		"managedZone": c.managedZone,
  5329  	})
  5330  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5331  }
  5332  
  5333  // Do executes the "dns.resourceRecordSets.list" call.
  5334  // Exactly one of *ResourceRecordSetsListResponse or error will be
  5335  // non-nil. Any non-2xx status code is an error. Response headers are in
  5336  // either *ResourceRecordSetsListResponse.ServerResponse.Header or (if a
  5337  // response was returned at all) in error.(*googleapi.Error).Header. Use
  5338  // googleapi.IsNotModified to check whether the returned error was
  5339  // because http.StatusNotModified was returned.
  5340  func (c *ResourceRecordSetsListCall) Do(opts ...googleapi.CallOption) (*ResourceRecordSetsListResponse, error) {
  5341  	gensupport.SetOptions(c.urlParams_, opts...)
  5342  	res, err := c.doRequest("json")
  5343  	if res != nil && res.StatusCode == http.StatusNotModified {
  5344  		if res.Body != nil {
  5345  			res.Body.Close()
  5346  		}
  5347  		return nil, &googleapi.Error{
  5348  			Code:   res.StatusCode,
  5349  			Header: res.Header,
  5350  		}
  5351  	}
  5352  	if err != nil {
  5353  		return nil, err
  5354  	}
  5355  	defer googleapi.CloseBody(res)
  5356  	if err := googleapi.CheckResponse(res); err != nil {
  5357  		return nil, err
  5358  	}
  5359  	ret := &ResourceRecordSetsListResponse{
  5360  		ServerResponse: googleapi.ServerResponse{
  5361  			Header:         res.Header,
  5362  			HTTPStatusCode: res.StatusCode,
  5363  		},
  5364  	}
  5365  	target := &ret
  5366  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5367  		return nil, err
  5368  	}
  5369  	return ret, nil
  5370  	// {
  5371  	//   "description": "Enumerate ResourceRecordSets that have been created but not yet deleted.",
  5372  	//   "flatPath": "dns/v2beta1/projects/{project}/managedZones/{managedZone}/rrsets",
  5373  	//   "httpMethod": "GET",
  5374  	//   "id": "dns.resourceRecordSets.list",
  5375  	//   "parameterOrder": [
  5376  	//     "project",
  5377  	//     "managedZone"
  5378  	//   ],
  5379  	//   "parameters": {
  5380  	//     "managedZone": {
  5381  	//       "description": "Identifies the managed zone addressed by this request. Can be the managed zone name or id.",
  5382  	//       "location": "path",
  5383  	//       "required": true,
  5384  	//       "type": "string"
  5385  	//     },
  5386  	//     "maxResults": {
  5387  	//       "description": "Optional. Maximum number of results to be returned. If unspecified, the server will decide how many results to return.",
  5388  	//       "format": "int32",
  5389  	//       "location": "query",
  5390  	//       "type": "integer"
  5391  	//     },
  5392  	//     "name": {
  5393  	//       "description": "Restricts the list to return only records with this fully qualified domain name.",
  5394  	//       "location": "query",
  5395  	//       "type": "string"
  5396  	//     },
  5397  	//     "pageToken": {
  5398  	//       "description": "Optional. A tag returned by a previous list request that was truncated. Use this parameter to continue a previous list request.",
  5399  	//       "location": "query",
  5400  	//       "type": "string"
  5401  	//     },
  5402  	//     "project": {
  5403  	//       "description": "Identifies the project addressed by this request.",
  5404  	//       "location": "path",
  5405  	//       "required": true,
  5406  	//       "type": "string"
  5407  	//     },
  5408  	//     "type": {
  5409  	//       "description": "Restricts the list to return only records of this type. If present, the \"name\" parameter must also be present.",
  5410  	//       "location": "query",
  5411  	//       "type": "string"
  5412  	//     }
  5413  	//   },
  5414  	//   "path": "dns/v2beta1/projects/{project}/managedZones/{managedZone}/rrsets",
  5415  	//   "response": {
  5416  	//     "$ref": "ResourceRecordSetsListResponse"
  5417  	//   },
  5418  	//   "scopes": [
  5419  	//     "https://www.googleapis.com/auth/cloud-platform",
  5420  	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
  5421  	//     "https://www.googleapis.com/auth/ndev.clouddns.readonly",
  5422  	//     "https://www.googleapis.com/auth/ndev.clouddns.readwrite"
  5423  	//   ]
  5424  	// }
  5425  
  5426  }
  5427  
  5428  // Pages invokes f for each page of results.
  5429  // A non-nil error returned from f will halt the iteration.
  5430  // The provided context supersedes any context provided to the Context method.
  5431  func (c *ResourceRecordSetsListCall) Pages(ctx context.Context, f func(*ResourceRecordSetsListResponse) error) error {
  5432  	c.ctx_ = ctx
  5433  	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  5434  	for {
  5435  		x, err := c.Do()
  5436  		if err != nil {
  5437  			return err
  5438  		}
  5439  		if err := f(x); err != nil {
  5440  			return err
  5441  		}
  5442  		if x.NextPageToken == "" {
  5443  			return nil
  5444  		}
  5445  		c.PageToken(x.NextPageToken)
  5446  	}
  5447  }
  5448  

View as plain text