...

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

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

     1  // Copyright 2022 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: https://cloud.google.com/dns/docs
    10  //
    11  // # Creating a client
    12  //
    13  // Usage example:
    14  //
    15  //	import "google.golang.org/api/dns/v2"
    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/v2"
    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  	internal "google.golang.org/api/internal"
    58  	gensupport "google.golang.org/api/internal/gensupport"
    59  	option "google.golang.org/api/option"
    60  	internaloption "google.golang.org/api/option/internaloption"
    61  	htransport "google.golang.org/api/transport/http"
    62  )
    63  
    64  // Always reference these packages, just in case the auto-generated code
    65  // below doesn't.
    66  var _ = bytes.NewBuffer
    67  var _ = strconv.Itoa
    68  var _ = fmt.Sprintf
    69  var _ = json.NewDecoder
    70  var _ = io.Copy
    71  var _ = url.Parse
    72  var _ = gensupport.MarshalJSON
    73  var _ = googleapi.Version
    74  var _ = errors.New
    75  var _ = strings.Replace
    76  var _ = context.Canceled
    77  var _ = internaloption.WithDefaultEndpoint
    78  
    79  const apiId = "dns:v2"
    80  const apiName = "dns"
    81  const apiVersion = "v2"
    82  const basePath = "https://dns.googleapis.com/"
    83  const mtlsBasePath = "https://dns.mtls.googleapis.com/"
    84  
    85  // OAuth2 scopes used by this API.
    86  const (
    87  	// See, edit, configure, and delete your Google Cloud data and see the
    88  	// email address for your Google Account.
    89  	CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
    90  
    91  	// View your data across Google Cloud services and see the email address
    92  	// of your Google Account
    93  	CloudPlatformReadOnlyScope = "https://www.googleapis.com/auth/cloud-platform.read-only"
    94  
    95  	// View your DNS records hosted by Google Cloud DNS
    96  	NdevClouddnsReadonlyScope = "https://www.googleapis.com/auth/ndev.clouddns.readonly"
    97  
    98  	// View and manage your DNS records hosted by Google Cloud DNS
    99  	NdevClouddnsReadwriteScope = "https://www.googleapis.com/auth/ndev.clouddns.readwrite"
   100  )
   101  
   102  // NewService creates a new Service.
   103  func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
   104  	scopesOption := internaloption.WithDefaultScopes(
   105  		"https://www.googleapis.com/auth/cloud-platform",
   106  		"https://www.googleapis.com/auth/cloud-platform.read-only",
   107  		"https://www.googleapis.com/auth/ndev.clouddns.readonly",
   108  		"https://www.googleapis.com/auth/ndev.clouddns.readwrite",
   109  	)
   110  	// NOTE: prepend, so we don't override user-specified scopes.
   111  	opts = append([]option.ClientOption{scopesOption}, opts...)
   112  	opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
   113  	opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
   114  	client, endpoint, err := htransport.NewClient(ctx, opts...)
   115  	if err != nil {
   116  		return nil, err
   117  	}
   118  	s, err := New(client)
   119  	if err != nil {
   120  		return nil, err
   121  	}
   122  	if endpoint != "" {
   123  		s.BasePath = endpoint
   124  	}
   125  	return s, nil
   126  }
   127  
   128  // New creates a new Service. It uses the provided http.Client for requests.
   129  //
   130  // Deprecated: please use NewService instead.
   131  // To provide a custom HTTP client, use option.WithHTTPClient.
   132  // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
   133  func New(client *http.Client) (*Service, error) {
   134  	if client == nil {
   135  		return nil, errors.New("client is nil")
   136  	}
   137  	s := &Service{client: client, BasePath: basePath}
   138  	s.Changes = NewChangesService(s)
   139  	s.DnsKeys = NewDnsKeysService(s)
   140  	s.ManagedZoneOperations = NewManagedZoneOperationsService(s)
   141  	s.ManagedZones = NewManagedZonesService(s)
   142  	s.Policies = NewPoliciesService(s)
   143  	s.Projects = NewProjectsService(s)
   144  	s.ResourceRecordSets = NewResourceRecordSetsService(s)
   145  	s.ResponsePolicies = NewResponsePoliciesService(s)
   146  	s.ResponsePolicyRules = NewResponsePolicyRulesService(s)
   147  	return s, nil
   148  }
   149  
   150  type Service struct {
   151  	client    *http.Client
   152  	BasePath  string // API endpoint base URL
   153  	UserAgent string // optional additional User-Agent fragment
   154  
   155  	Changes *ChangesService
   156  
   157  	DnsKeys *DnsKeysService
   158  
   159  	ManagedZoneOperations *ManagedZoneOperationsService
   160  
   161  	ManagedZones *ManagedZonesService
   162  
   163  	Policies *PoliciesService
   164  
   165  	Projects *ProjectsService
   166  
   167  	ResourceRecordSets *ResourceRecordSetsService
   168  
   169  	ResponsePolicies *ResponsePoliciesService
   170  
   171  	ResponsePolicyRules *ResponsePolicyRulesService
   172  }
   173  
   174  func (s *Service) userAgent() string {
   175  	if s.UserAgent == "" {
   176  		return googleapi.UserAgent
   177  	}
   178  	return googleapi.UserAgent + " " + s.UserAgent
   179  }
   180  
   181  func NewChangesService(s *Service) *ChangesService {
   182  	rs := &ChangesService{s: s}
   183  	return rs
   184  }
   185  
   186  type ChangesService struct {
   187  	s *Service
   188  }
   189  
   190  func NewDnsKeysService(s *Service) *DnsKeysService {
   191  	rs := &DnsKeysService{s: s}
   192  	return rs
   193  }
   194  
   195  type DnsKeysService struct {
   196  	s *Service
   197  }
   198  
   199  func NewManagedZoneOperationsService(s *Service) *ManagedZoneOperationsService {
   200  	rs := &ManagedZoneOperationsService{s: s}
   201  	return rs
   202  }
   203  
   204  type ManagedZoneOperationsService struct {
   205  	s *Service
   206  }
   207  
   208  func NewManagedZonesService(s *Service) *ManagedZonesService {
   209  	rs := &ManagedZonesService{s: s}
   210  	return rs
   211  }
   212  
   213  type ManagedZonesService struct {
   214  	s *Service
   215  }
   216  
   217  func NewPoliciesService(s *Service) *PoliciesService {
   218  	rs := &PoliciesService{s: s}
   219  	return rs
   220  }
   221  
   222  type PoliciesService struct {
   223  	s *Service
   224  }
   225  
   226  func NewProjectsService(s *Service) *ProjectsService {
   227  	rs := &ProjectsService{s: s}
   228  	return rs
   229  }
   230  
   231  type ProjectsService struct {
   232  	s *Service
   233  }
   234  
   235  func NewResourceRecordSetsService(s *Service) *ResourceRecordSetsService {
   236  	rs := &ResourceRecordSetsService{s: s}
   237  	return rs
   238  }
   239  
   240  type ResourceRecordSetsService struct {
   241  	s *Service
   242  }
   243  
   244  func NewResponsePoliciesService(s *Service) *ResponsePoliciesService {
   245  	rs := &ResponsePoliciesService{s: s}
   246  	return rs
   247  }
   248  
   249  type ResponsePoliciesService struct {
   250  	s *Service
   251  }
   252  
   253  func NewResponsePolicyRulesService(s *Service) *ResponsePolicyRulesService {
   254  	rs := &ResponsePolicyRulesService{s: s}
   255  	return rs
   256  }
   257  
   258  type ResponsePolicyRulesService struct {
   259  	s *Service
   260  }
   261  
   262  // Change: A Change represents a set of ResourceRecordSet additions and
   263  // deletions applied atomically to a ManagedZone. ResourceRecordSets
   264  // within a ManagedZone are modified by creating a new Change element in
   265  // the Changes collection. In turn the Changes collection also records
   266  // the past modifications to the ResourceRecordSets in a ManagedZone.
   267  // The current state of the ManagedZone is the sum effect of applying
   268  // all Change elements in the Changes collection in sequence.
   269  type Change struct {
   270  	// Additions: Which ResourceRecordSets to add?
   271  	Additions []*ResourceRecordSet `json:"additions,omitempty"`
   272  
   273  	// Deletions: Which ResourceRecordSets to remove? Must match existing
   274  	// data exactly.
   275  	Deletions []*ResourceRecordSet `json:"deletions,omitempty"`
   276  
   277  	// Id: Unique identifier for the resource; defined by the server (output
   278  	// only).
   279  	Id string `json:"id,omitempty"`
   280  
   281  	// IsServing: If the DNS queries for the zone will be served.
   282  	IsServing bool `json:"isServing,omitempty"`
   283  
   284  	Kind string `json:"kind,omitempty"`
   285  
   286  	// StartTime: The time that this operation was started by the server
   287  	// (output only). This is in RFC3339 text format.
   288  	StartTime string `json:"startTime,omitempty"`
   289  
   290  	// Status: Status of the operation (output only). A status of "done"
   291  	// means that the request to update the authoritative servers has been
   292  	// sent, but the servers might not be updated yet.
   293  	//
   294  	// Possible values:
   295  	//   "PENDING"
   296  	//   "DONE"
   297  	Status string `json:"status,omitempty"`
   298  
   299  	// ServerResponse contains the HTTP response code and headers from the
   300  	// server.
   301  	googleapi.ServerResponse `json:"-"`
   302  
   303  	// ForceSendFields is a list of field names (e.g. "Additions") to
   304  	// unconditionally include in API requests. By default, fields with
   305  	// empty or default values are omitted from API requests. However, any
   306  	// non-pointer, non-interface field appearing in ForceSendFields will be
   307  	// sent to the server regardless of whether the field is empty or not.
   308  	// This may be used to include empty fields in Patch requests.
   309  	ForceSendFields []string `json:"-"`
   310  
   311  	// NullFields is a list of field names (e.g. "Additions") to include in
   312  	// API requests with the JSON null value. By default, fields with empty
   313  	// values are omitted from API requests. However, any field with an
   314  	// empty value appearing in NullFields will be sent to the server as
   315  	// null. It is an error if a field in this list has a non-empty value.
   316  	// This may be used to include null fields in Patch requests.
   317  	NullFields []string `json:"-"`
   318  }
   319  
   320  func (s *Change) MarshalJSON() ([]byte, error) {
   321  	type NoMethod Change
   322  	raw := NoMethod(*s)
   323  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   324  }
   325  
   326  // ChangesListResponse: The response to a request to enumerate Changes
   327  // to a ResourceRecordSets collection.
   328  type ChangesListResponse struct {
   329  	// Changes: The requested changes.
   330  	Changes []*Change `json:"changes,omitempty"`
   331  
   332  	Header *ResponseHeader `json:"header,omitempty"`
   333  
   334  	// Kind: Type of resource.
   335  	Kind string `json:"kind,omitempty"`
   336  
   337  	// NextPageToken: The presence of this field indicates that there exist
   338  	// more results following your last page of results in pagination order.
   339  	// To fetch them, make another list request using this value as your
   340  	// pagination token. This lets you retrieve the complete contents of
   341  	// even very large collections one page at a time. However, if the
   342  	// contents of the collection change between the first and last
   343  	// paginated list request, the set of all elements returned are an
   344  	// inconsistent view of the collection. You cannot retrieve a "snapshot"
   345  	// of collections larger than the maximum page size.
   346  	NextPageToken string `json:"nextPageToken,omitempty"`
   347  
   348  	// ServerResponse contains the HTTP response code and headers from the
   349  	// server.
   350  	googleapi.ServerResponse `json:"-"`
   351  
   352  	// ForceSendFields is a list of field names (e.g. "Changes") to
   353  	// unconditionally include in API requests. By default, fields with
   354  	// empty or default values are omitted from API requests. However, any
   355  	// non-pointer, non-interface field appearing in ForceSendFields will be
   356  	// sent to the server regardless of whether the field is empty or not.
   357  	// This may be used to include empty fields in Patch requests.
   358  	ForceSendFields []string `json:"-"`
   359  
   360  	// NullFields is a list of field names (e.g. "Changes") to include in
   361  	// API requests with the JSON null value. By default, fields with empty
   362  	// values are omitted from API requests. However, any field with an
   363  	// empty value appearing in NullFields will be sent to the server as
   364  	// null. It is an error if a field in this list has a non-empty value.
   365  	// This may be used to include null fields in Patch requests.
   366  	NullFields []string `json:"-"`
   367  }
   368  
   369  func (s *ChangesListResponse) MarshalJSON() ([]byte, error) {
   370  	type NoMethod ChangesListResponse
   371  	raw := NoMethod(*s)
   372  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   373  }
   374  
   375  // DnsKey: A DNSSEC key pair.
   376  type DnsKey struct {
   377  	// Algorithm: String mnemonic specifying the DNSSEC algorithm of this
   378  	// key. Immutable after creation time.
   379  	//
   380  	// Possible values:
   381  	//   "RSASHA1"
   382  	//   "RSASHA256"
   383  	//   "RSASHA512"
   384  	//   "ECDSAP256SHA256"
   385  	//   "ECDSAP384SHA384"
   386  	Algorithm string `json:"algorithm,omitempty"`
   387  
   388  	// CreationTime: The time that this resource was created in the control
   389  	// plane. This is in RFC3339 text format. Output only.
   390  	CreationTime string `json:"creationTime,omitempty"`
   391  
   392  	// Description: A mutable string of at most 1024 characters associated
   393  	// with this resource for the user's convenience. Has no effect on the
   394  	// resource's function.
   395  	Description string `json:"description,omitempty"`
   396  
   397  	// Digests: Cryptographic hashes of the DNSKEY resource record
   398  	// associated with this DnsKey. These digests are needed to construct a
   399  	// DS record that points at this DNS key. Output only.
   400  	Digests []*DnsKeyDigest `json:"digests,omitempty"`
   401  
   402  	// Id: Unique identifier for the resource; defined by the server (output
   403  	// only).
   404  	Id string `json:"id,omitempty"`
   405  
   406  	// IsActive: Active keys are used to sign subsequent changes to the
   407  	// ManagedZone. Inactive keys are still present as DNSKEY Resource
   408  	// Records for the use of resolvers validating existing signatures.
   409  	IsActive bool `json:"isActive,omitempty"`
   410  
   411  	// KeyLength: Length of the key in bits. Specified at creation time, and
   412  	// then immutable.
   413  	KeyLength int64 `json:"keyLength,omitempty"`
   414  
   415  	// KeyTag: The key tag is a non-cryptographic hash of the a DNSKEY
   416  	// resource record associated with this DnsKey. The key tag can be used
   417  	// to identify a DNSKEY more quickly (but it is not a unique
   418  	// identifier). In particular, the key tag is used in a parent zone's DS
   419  	// record to point at the DNSKEY in this child ManagedZone. The key tag
   420  	// is a number in the range [0, 65535] and the algorithm to calculate it
   421  	// is specified in RFC4034 Appendix B. Output only.
   422  	KeyTag int64 `json:"keyTag,omitempty"`
   423  
   424  	Kind string `json:"kind,omitempty"`
   425  
   426  	// PublicKey: Base64 encoded public half of this key. Output only.
   427  	PublicKey string `json:"publicKey,omitempty"`
   428  
   429  	// Type: One of "KEY_SIGNING" or "ZONE_SIGNING". Keys of type
   430  	// KEY_SIGNING have the Secure Entry Point flag set and, when active,
   431  	// are used to sign only resource record sets of type DNSKEY. Otherwise,
   432  	// the Secure Entry Point flag is cleared, and this key is used to sign
   433  	// only resource record sets of other types. Immutable after creation
   434  	// time.
   435  	//
   436  	// Possible values:
   437  	//   "KEY_SIGNING"
   438  	//   "ZONE_SIGNING"
   439  	Type string `json:"type,omitempty"`
   440  
   441  	// ServerResponse contains the HTTP response code and headers from the
   442  	// server.
   443  	googleapi.ServerResponse `json:"-"`
   444  
   445  	// ForceSendFields is a list of field names (e.g. "Algorithm") to
   446  	// unconditionally include in API requests. By default, fields with
   447  	// empty or default values are omitted from API requests. However, any
   448  	// non-pointer, non-interface field appearing in ForceSendFields will be
   449  	// sent to the server regardless of whether the field is empty or not.
   450  	// This may be used to include empty fields in Patch requests.
   451  	ForceSendFields []string `json:"-"`
   452  
   453  	// NullFields is a list of field names (e.g. "Algorithm") to include in
   454  	// API requests with the JSON null value. By default, fields with empty
   455  	// values are omitted from API requests. However, any field with an
   456  	// empty value appearing in NullFields will be sent to the server as
   457  	// null. It is an error if a field in this list has a non-empty value.
   458  	// This may be used to include null fields in Patch requests.
   459  	NullFields []string `json:"-"`
   460  }
   461  
   462  func (s *DnsKey) MarshalJSON() ([]byte, error) {
   463  	type NoMethod DnsKey
   464  	raw := NoMethod(*s)
   465  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   466  }
   467  
   468  type DnsKeyDigest struct {
   469  	// Digest: The base-16 encoded bytes of this digest. Suitable for use in
   470  	// a DS resource record.
   471  	Digest string `json:"digest,omitempty"`
   472  
   473  	// Type: Specifies the algorithm used to calculate this digest.
   474  	//
   475  	// Possible values:
   476  	//   "SHA1"
   477  	//   "SHA256"
   478  	//   "SHA384"
   479  	Type string `json:"type,omitempty"`
   480  
   481  	// ForceSendFields is a list of field names (e.g. "Digest") to
   482  	// unconditionally include in API requests. By default, fields with
   483  	// empty or default values are omitted from API requests. However, any
   484  	// non-pointer, non-interface field appearing in ForceSendFields will be
   485  	// sent to the server regardless of whether the field is empty or not.
   486  	// This may be used to include empty fields in Patch requests.
   487  	ForceSendFields []string `json:"-"`
   488  
   489  	// NullFields is a list of field names (e.g. "Digest") to include in API
   490  	// requests with the JSON null value. By default, fields with empty
   491  	// values are omitted from API requests. However, any field with an
   492  	// empty value appearing in NullFields will be sent to the server as
   493  	// null. It is an error if a field in this list has a non-empty value.
   494  	// This may be used to include null fields in Patch requests.
   495  	NullFields []string `json:"-"`
   496  }
   497  
   498  func (s *DnsKeyDigest) MarshalJSON() ([]byte, error) {
   499  	type NoMethod DnsKeyDigest
   500  	raw := NoMethod(*s)
   501  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   502  }
   503  
   504  // DnsKeySpec: Parameters for DnsKey key generation. Used for generating
   505  // initial keys for a new ManagedZone and as default when adding a new
   506  // DnsKey.
   507  type DnsKeySpec struct {
   508  	// Algorithm: String mnemonic specifying the DNSSEC algorithm of this
   509  	// key.
   510  	//
   511  	// Possible values:
   512  	//   "RSASHA1"
   513  	//   "RSASHA256"
   514  	//   "RSASHA512"
   515  	//   "ECDSAP256SHA256"
   516  	//   "ECDSAP384SHA384"
   517  	Algorithm string `json:"algorithm,omitempty"`
   518  
   519  	// KeyLength: Length of the keys in bits.
   520  	KeyLength int64 `json:"keyLength,omitempty"`
   521  
   522  	// KeyType: Specifies whether this is a key signing key (KSK) or a zone
   523  	// signing key (ZSK). Key signing keys have the Secure Entry Point flag
   524  	// set and, when active, are only used to sign resource record sets of
   525  	// type DNSKEY. Zone signing keys do not have the Secure Entry Point
   526  	// flag set and are used to sign all other types of resource record
   527  	// sets.
   528  	//
   529  	// Possible values:
   530  	//   "KEY_SIGNING"
   531  	//   "ZONE_SIGNING"
   532  	KeyType string `json:"keyType,omitempty"`
   533  
   534  	Kind string `json:"kind,omitempty"`
   535  
   536  	// ForceSendFields is a list of field names (e.g. "Algorithm") to
   537  	// unconditionally include in API requests. By default, fields with
   538  	// empty or default values are omitted from API requests. However, any
   539  	// non-pointer, non-interface field appearing in ForceSendFields will be
   540  	// sent to the server regardless of whether the field is empty or not.
   541  	// This may be used to include empty fields in Patch requests.
   542  	ForceSendFields []string `json:"-"`
   543  
   544  	// NullFields is a list of field names (e.g. "Algorithm") to include in
   545  	// API requests with the JSON null value. By default, fields with empty
   546  	// values are omitted from API requests. However, any field with an
   547  	// empty value appearing in NullFields will be sent to the server as
   548  	// null. It is an error if a field in this list has a non-empty value.
   549  	// This may be used to include null fields in Patch requests.
   550  	NullFields []string `json:"-"`
   551  }
   552  
   553  func (s *DnsKeySpec) MarshalJSON() ([]byte, error) {
   554  	type NoMethod DnsKeySpec
   555  	raw := NoMethod(*s)
   556  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   557  }
   558  
   559  // DnsKeysListResponse: The response to a request to enumerate DnsKeys
   560  // in a ManagedZone.
   561  type DnsKeysListResponse struct {
   562  	// DnsKeys: The requested resources.
   563  	DnsKeys []*DnsKey `json:"dnsKeys,omitempty"`
   564  
   565  	Header *ResponseHeader `json:"header,omitempty"`
   566  
   567  	// Kind: Type of resource.
   568  	Kind string `json:"kind,omitempty"`
   569  
   570  	// NextPageToken: The presence of this field indicates that there exist
   571  	// more results following your last page of results in pagination order.
   572  	// To fetch them, make another list request using this value as your
   573  	// pagination token. In this way you can retrieve the complete contents
   574  	// of even very large collections one page at a time. However, if the
   575  	// contents of the collection change between the first and last
   576  	// paginated list request, the set of all elements returned are an
   577  	// inconsistent view of the collection. There is no way to retrieve a
   578  	// "snapshot" of collections larger than the maximum page size.
   579  	NextPageToken string `json:"nextPageToken,omitempty"`
   580  
   581  	// ServerResponse contains the HTTP response code and headers from the
   582  	// server.
   583  	googleapi.ServerResponse `json:"-"`
   584  
   585  	// ForceSendFields is a list of field names (e.g. "DnsKeys") to
   586  	// unconditionally include in API requests. By default, fields with
   587  	// empty or default values are omitted from API requests. However, any
   588  	// non-pointer, non-interface field appearing in ForceSendFields will be
   589  	// sent to the server regardless of whether the field is empty or not.
   590  	// This may be used to include empty fields in Patch requests.
   591  	ForceSendFields []string `json:"-"`
   592  
   593  	// NullFields is a list of field names (e.g. "DnsKeys") to include in
   594  	// API requests with the JSON null value. By default, fields with empty
   595  	// values are omitted from API requests. However, any field with an
   596  	// empty value appearing in NullFields will be sent to the server as
   597  	// null. It is an error if a field in this list has a non-empty value.
   598  	// This may be used to include null fields in Patch requests.
   599  	NullFields []string `json:"-"`
   600  }
   601  
   602  func (s *DnsKeysListResponse) MarshalJSON() ([]byte, error) {
   603  	type NoMethod DnsKeysListResponse
   604  	raw := NoMethod(*s)
   605  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   606  }
   607  
   608  // ManagedZone: A zone is a subtree of the DNS namespace under one
   609  // administrative responsibility. A ManagedZone is a resource that
   610  // represents a DNS zone hosted by the Cloud DNS service.
   611  type ManagedZone struct {
   612  	CloudLoggingConfig *ManagedZoneCloudLoggingConfig `json:"cloudLoggingConfig,omitempty"`
   613  
   614  	// CreationTime: The time that this resource was created on the server.
   615  	// This is in RFC3339 text format. Output only.
   616  	CreationTime string `json:"creationTime,omitempty"`
   617  
   618  	// Description: A mutable string of at most 1024 characters associated
   619  	// with this resource for the user's convenience. Has no effect on the
   620  	// managed zone's function.
   621  	Description string `json:"description,omitempty"`
   622  
   623  	// DnsName: The DNS name of this managed zone, for instance
   624  	// "example.com.".
   625  	DnsName string `json:"dnsName,omitempty"`
   626  
   627  	// DnssecConfig: DNSSEC configuration.
   628  	DnssecConfig *ManagedZoneDnsSecConfig `json:"dnssecConfig,omitempty"`
   629  
   630  	// ForwardingConfig: The presence for this field indicates that outbound
   631  	// forwarding is enabled for this zone. The value of this field contains
   632  	// the set of destinations to forward to.
   633  	ForwardingConfig *ManagedZoneForwardingConfig `json:"forwardingConfig,omitempty"`
   634  
   635  	// Id: Unique identifier for the resource; defined by the server (output
   636  	// only)
   637  	Id uint64 `json:"id,omitempty,string"`
   638  
   639  	Kind string `json:"kind,omitempty"`
   640  
   641  	// Labels: User labels.
   642  	Labels map[string]string `json:"labels,omitempty"`
   643  
   644  	// Name: User assigned name for this resource. Must be unique within the
   645  	// project. The name must be 1-63 characters long, must begin with a
   646  	// letter, end with a letter or digit, and only contain lowercase
   647  	// letters, digits or dashes.
   648  	Name string `json:"name,omitempty"`
   649  
   650  	// NameServerSet: Optionally specifies the NameServerSet for this
   651  	// ManagedZone. A NameServerSet is a set of DNS name servers that all
   652  	// host the same ManagedZones. Most users leave this field unset. If you
   653  	// need to use this field, contact your account team.
   654  	NameServerSet string `json:"nameServerSet,omitempty"`
   655  
   656  	// NameServers: Delegate your managed_zone to these virtual name
   657  	// servers; defined by the server (output only)
   658  	NameServers []string `json:"nameServers,omitempty"`
   659  
   660  	// PeeringConfig: The presence of this field indicates that DNS Peering
   661  	// is enabled for this zone. The value of this field contains the
   662  	// network to peer with.
   663  	PeeringConfig *ManagedZonePeeringConfig `json:"peeringConfig,omitempty"`
   664  
   665  	// PrivateVisibilityConfig: For privately visible zones, the set of
   666  	// Virtual Private Cloud resources that the zone is visible from.
   667  	PrivateVisibilityConfig *ManagedZonePrivateVisibilityConfig `json:"privateVisibilityConfig,omitempty"`
   668  
   669  	// ReverseLookupConfig: The presence of this field indicates that this
   670  	// is a managed reverse lookup zone and Cloud DNS resolves reverse
   671  	// lookup queries using automatically configured records for VPC
   672  	// resources. This only applies to networks listed under
   673  	// private_visibility_config.
   674  	ReverseLookupConfig *ManagedZoneReverseLookupConfig `json:"reverseLookupConfig,omitempty"`
   675  
   676  	// ServiceDirectoryConfig: This field links to the associated service
   677  	// directory namespace. Do not set this field for public zones or
   678  	// forwarding zones.
   679  	ServiceDirectoryConfig *ManagedZoneServiceDirectoryConfig `json:"serviceDirectoryConfig,omitempty"`
   680  
   681  	// Visibility: The zone's visibility: public zones are exposed to the
   682  	// Internet, while private zones are visible only to Virtual Private
   683  	// Cloud resources.
   684  	//
   685  	// Possible values:
   686  	//   "PUBLIC"
   687  	//   "PRIVATE"
   688  	Visibility string `json:"visibility,omitempty"`
   689  
   690  	// ServerResponse contains the HTTP response code and headers from the
   691  	// server.
   692  	googleapi.ServerResponse `json:"-"`
   693  
   694  	// ForceSendFields is a list of field names (e.g. "CloudLoggingConfig")
   695  	// to unconditionally include in API requests. By default, fields with
   696  	// empty or default values are omitted from API requests. However, any
   697  	// non-pointer, non-interface field appearing in ForceSendFields will be
   698  	// sent to the server regardless of whether the field is empty or not.
   699  	// This may be used to include empty fields in Patch requests.
   700  	ForceSendFields []string `json:"-"`
   701  
   702  	// NullFields is a list of field names (e.g. "CloudLoggingConfig") to
   703  	// include in API requests with the JSON null value. By default, fields
   704  	// with empty values are omitted from API requests. However, any field
   705  	// with an empty value appearing in NullFields will be sent to the
   706  	// server as null. It is an error if a field in this list has a
   707  	// non-empty value. This may be used to include null fields in Patch
   708  	// requests.
   709  	NullFields []string `json:"-"`
   710  }
   711  
   712  func (s *ManagedZone) MarshalJSON() ([]byte, error) {
   713  	type NoMethod ManagedZone
   714  	raw := NoMethod(*s)
   715  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   716  }
   717  
   718  // ManagedZoneCloudLoggingConfig: Cloud Logging configurations for
   719  // publicly visible zones.
   720  type ManagedZoneCloudLoggingConfig struct {
   721  	// EnableLogging: If set, enable query logging for this ManagedZone.
   722  	// False by default, making logging opt-in.
   723  	EnableLogging bool `json:"enableLogging,omitempty"`
   724  
   725  	Kind string `json:"kind,omitempty"`
   726  
   727  	// ForceSendFields is a list of field names (e.g. "EnableLogging") to
   728  	// unconditionally include in API requests. By default, fields with
   729  	// empty or default values are omitted from API requests. However, any
   730  	// non-pointer, non-interface field appearing in ForceSendFields will be
   731  	// sent to the server regardless of whether the field is empty or not.
   732  	// This may be used to include empty fields in Patch requests.
   733  	ForceSendFields []string `json:"-"`
   734  
   735  	// NullFields is a list of field names (e.g. "EnableLogging") to include
   736  	// in API requests with the JSON null value. By default, fields with
   737  	// empty values are omitted from API requests. However, any field with
   738  	// an empty value appearing in NullFields will be sent to the server as
   739  	// null. It is an error if a field in this list has a non-empty value.
   740  	// This may be used to include null fields in Patch requests.
   741  	NullFields []string `json:"-"`
   742  }
   743  
   744  func (s *ManagedZoneCloudLoggingConfig) MarshalJSON() ([]byte, error) {
   745  	type NoMethod ManagedZoneCloudLoggingConfig
   746  	raw := NoMethod(*s)
   747  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   748  }
   749  
   750  type ManagedZoneDnsSecConfig struct {
   751  	// DefaultKeySpecs: Specifies parameters for generating initial DnsKeys
   752  	// for this ManagedZone. Can only be changed while the state is OFF.
   753  	DefaultKeySpecs []*DnsKeySpec `json:"defaultKeySpecs,omitempty"`
   754  
   755  	Kind string `json:"kind,omitempty"`
   756  
   757  	// NonExistence: Specifies the mechanism for authenticated
   758  	// denial-of-existence responses. Can only be changed while the state is
   759  	// OFF.
   760  	//
   761  	// Possible values:
   762  	//   "NSEC"
   763  	//   "NSEC3"
   764  	NonExistence string `json:"nonExistence,omitempty"`
   765  
   766  	// State: Specifies whether DNSSEC is enabled, and what mode it is in.
   767  	//
   768  	// Possible values:
   769  	//   "OFF" - DNSSEC is disabled; the zone is not signed.
   770  	//   "ON" - DNSSEC is enabled; the zone is signed and fully managed.
   771  	//   "TRANSFER" - DNSSEC is enabled, but in a "transfer" mode.
   772  	State string `json:"state,omitempty"`
   773  
   774  	// ForceSendFields is a list of field names (e.g. "DefaultKeySpecs") to
   775  	// unconditionally include in API requests. By default, fields with
   776  	// empty or default values are omitted from API requests. However, any
   777  	// non-pointer, non-interface field appearing in ForceSendFields will be
   778  	// sent to the server regardless of whether the field is empty or not.
   779  	// This may be used to include empty fields in Patch requests.
   780  	ForceSendFields []string `json:"-"`
   781  
   782  	// NullFields is a list of field names (e.g. "DefaultKeySpecs") to
   783  	// include in API requests with the JSON null value. By default, fields
   784  	// with empty values are omitted from API requests. However, any field
   785  	// with an empty value appearing in NullFields will be sent to the
   786  	// server as null. It is an error if a field in this list has a
   787  	// non-empty value. This may be used to include null fields in Patch
   788  	// requests.
   789  	NullFields []string `json:"-"`
   790  }
   791  
   792  func (s *ManagedZoneDnsSecConfig) MarshalJSON() ([]byte, error) {
   793  	type NoMethod ManagedZoneDnsSecConfig
   794  	raw := NoMethod(*s)
   795  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   796  }
   797  
   798  type ManagedZoneForwardingConfig struct {
   799  	Kind string `json:"kind,omitempty"`
   800  
   801  	// TargetNameServers: List of target name servers to forward to. Cloud
   802  	// DNS selects the best available name server if more than one target is
   803  	// given.
   804  	TargetNameServers []*ManagedZoneForwardingConfigNameServerTarget `json:"targetNameServers,omitempty"`
   805  
   806  	// ForceSendFields is a list of field names (e.g. "Kind") to
   807  	// unconditionally include in API requests. By default, fields with
   808  	// empty or default values are omitted from API requests. However, any
   809  	// non-pointer, non-interface field appearing in ForceSendFields will be
   810  	// sent to the server regardless of whether the field is empty or not.
   811  	// This may be used to include empty fields in Patch requests.
   812  	ForceSendFields []string `json:"-"`
   813  
   814  	// NullFields is a list of field names (e.g. "Kind") to include in API
   815  	// requests with the JSON null value. By default, fields with empty
   816  	// values are omitted from API requests. However, any field with an
   817  	// empty value appearing in NullFields will be sent to the server as
   818  	// null. It is an error if a field in this list has a non-empty value.
   819  	// This may be used to include null fields in Patch requests.
   820  	NullFields []string `json:"-"`
   821  }
   822  
   823  func (s *ManagedZoneForwardingConfig) MarshalJSON() ([]byte, error) {
   824  	type NoMethod ManagedZoneForwardingConfig
   825  	raw := NoMethod(*s)
   826  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   827  }
   828  
   829  type ManagedZoneForwardingConfigNameServerTarget struct {
   830  	// ForwardingPath: Forwarding path for this NameServerTarget. If unset
   831  	// or set to DEFAULT, Cloud DNS makes forwarding decisions based on IP
   832  	// address ranges; that is, RFC1918 addresses go to the VPC network,
   833  	// non-RFC1918 addresses go to the internet. When set to PRIVATE, Cloud
   834  	// DNS always sends queries through the VPC network for this target.
   835  	//
   836  	// Possible values:
   837  	//   "DEFAULT" - Cloud DNS makes forwarding decisions based on address
   838  	// ranges; that is, RFC1918 addresses forward to the target through the
   839  	// VPC and non-RFC1918 addresses forward to the target through the
   840  	// internet
   841  	//   "PRIVATE" - Cloud DNS always forwards to this target through the
   842  	// VPC.
   843  	ForwardingPath string `json:"forwardingPath,omitempty"`
   844  
   845  	// Ipv4Address: IPv4 address of a target name server.
   846  	Ipv4Address string `json:"ipv4Address,omitempty"`
   847  
   848  	Kind string `json:"kind,omitempty"`
   849  
   850  	// ForceSendFields is a list of field names (e.g. "ForwardingPath") to
   851  	// unconditionally include in API requests. By default, fields with
   852  	// empty or default values are omitted from API requests. However, any
   853  	// non-pointer, non-interface field appearing in ForceSendFields will be
   854  	// sent to the server regardless of whether the field is empty or not.
   855  	// This may be used to include empty fields in Patch requests.
   856  	ForceSendFields []string `json:"-"`
   857  
   858  	// NullFields is a list of field names (e.g. "ForwardingPath") to
   859  	// include in API requests with the JSON null value. By default, fields
   860  	// with empty values are omitted from API requests. However, any field
   861  	// with an empty value appearing in NullFields will be sent to the
   862  	// server as null. It is an error if a field in this list has a
   863  	// non-empty value. This may be used to include null fields in Patch
   864  	// requests.
   865  	NullFields []string `json:"-"`
   866  }
   867  
   868  func (s *ManagedZoneForwardingConfigNameServerTarget) MarshalJSON() ([]byte, error) {
   869  	type NoMethod ManagedZoneForwardingConfigNameServerTarget
   870  	raw := NoMethod(*s)
   871  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   872  }
   873  
   874  type ManagedZoneOperationsListResponse struct {
   875  	Header *ResponseHeader `json:"header,omitempty"`
   876  
   877  	Kind string `json:"kind,omitempty"`
   878  
   879  	// NextPageToken: The presence of this field indicates that there exist
   880  	// more results following your last page of results in pagination order.
   881  	// To fetch them, make another list request using this value as your
   882  	// page token. This lets you retrieve the complete contents of even very
   883  	// large collections one page at a time. However, if the contents of the
   884  	// collection change between the first and last paginated list request,
   885  	// the set of all elements returned are an inconsistent view of the
   886  	// collection. You cannot retrieve a consistent snapshot of a collection
   887  	// larger than the maximum page size.
   888  	NextPageToken string `json:"nextPageToken,omitempty"`
   889  
   890  	// Operations: The operation resources.
   891  	Operations []*Operation `json:"operations,omitempty"`
   892  
   893  	// ServerResponse contains the HTTP response code and headers from the
   894  	// server.
   895  	googleapi.ServerResponse `json:"-"`
   896  
   897  	// ForceSendFields is a list of field names (e.g. "Header") to
   898  	// unconditionally include in API requests. By default, fields with
   899  	// empty or default values are omitted from API requests. However, any
   900  	// non-pointer, non-interface field appearing in ForceSendFields will be
   901  	// sent to the server regardless of whether the field is empty or not.
   902  	// This may be used to include empty fields in Patch requests.
   903  	ForceSendFields []string `json:"-"`
   904  
   905  	// NullFields is a list of field names (e.g. "Header") to include in API
   906  	// requests with the JSON null value. By default, fields with empty
   907  	// values are omitted from API requests. However, any field with an
   908  	// empty value appearing in NullFields will be sent to the server as
   909  	// null. It is an error if a field in this list has a non-empty value.
   910  	// This may be used to include null fields in Patch requests.
   911  	NullFields []string `json:"-"`
   912  }
   913  
   914  func (s *ManagedZoneOperationsListResponse) MarshalJSON() ([]byte, error) {
   915  	type NoMethod ManagedZoneOperationsListResponse
   916  	raw := NoMethod(*s)
   917  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   918  }
   919  
   920  type ManagedZonePeeringConfig struct {
   921  	Kind string `json:"kind,omitempty"`
   922  
   923  	// TargetNetwork: The network with which to peer.
   924  	TargetNetwork *ManagedZonePeeringConfigTargetNetwork `json:"targetNetwork,omitempty"`
   925  
   926  	// ForceSendFields is a list of field names (e.g. "Kind") to
   927  	// unconditionally include in API requests. By default, fields with
   928  	// empty or default values are omitted from API requests. However, any
   929  	// non-pointer, non-interface field appearing in ForceSendFields will be
   930  	// sent to the server regardless of whether the field is empty or not.
   931  	// This may be used to include empty fields in Patch requests.
   932  	ForceSendFields []string `json:"-"`
   933  
   934  	// NullFields is a list of field names (e.g. "Kind") to include in API
   935  	// requests with the JSON null value. By default, fields with empty
   936  	// values are omitted from API requests. However, any field with an
   937  	// empty value appearing in NullFields will be sent to the server as
   938  	// null. It is an error if a field in this list has a non-empty value.
   939  	// This may be used to include null fields in Patch requests.
   940  	NullFields []string `json:"-"`
   941  }
   942  
   943  func (s *ManagedZonePeeringConfig) MarshalJSON() ([]byte, error) {
   944  	type NoMethod ManagedZonePeeringConfig
   945  	raw := NoMethod(*s)
   946  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   947  }
   948  
   949  type ManagedZonePeeringConfigTargetNetwork struct {
   950  	// DeactivateTime: The time at which the zone was deactivated, in RFC
   951  	// 3339 date-time format. An empty string indicates that the peering
   952  	// connection is active. The producer network can deactivate a zone. The
   953  	// zone is automatically deactivated if the producer network that the
   954  	// zone targeted is deleted. Output only.
   955  	DeactivateTime string `json:"deactivateTime,omitempty"`
   956  
   957  	Kind string `json:"kind,omitempty"`
   958  
   959  	// NetworkUrl: The fully qualified URL of the VPC network to forward
   960  	// queries to. This should be formatted like
   961  	// https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}
   962  	NetworkUrl string `json:"networkUrl,omitempty"`
   963  
   964  	// ForceSendFields is a list of field names (e.g. "DeactivateTime") to
   965  	// unconditionally include in API requests. By default, fields with
   966  	// empty or default values are omitted from API requests. However, any
   967  	// non-pointer, non-interface field appearing in ForceSendFields will be
   968  	// sent to the server regardless of whether the field is empty or not.
   969  	// This may be used to include empty fields in Patch requests.
   970  	ForceSendFields []string `json:"-"`
   971  
   972  	// NullFields is a list of field names (e.g. "DeactivateTime") to
   973  	// include in API requests with the JSON null value. By default, fields
   974  	// with empty values are omitted from API requests. However, any field
   975  	// with an empty value appearing in NullFields will be sent to the
   976  	// server as null. It is an error if a field in this list has a
   977  	// non-empty value. This may be used to include null fields in Patch
   978  	// requests.
   979  	NullFields []string `json:"-"`
   980  }
   981  
   982  func (s *ManagedZonePeeringConfigTargetNetwork) MarshalJSON() ([]byte, error) {
   983  	type NoMethod ManagedZonePeeringConfigTargetNetwork
   984  	raw := NoMethod(*s)
   985  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   986  }
   987  
   988  type ManagedZonePrivateVisibilityConfig struct {
   989  	// GkeClusters: The list of Google Kubernetes Engine clusters that can
   990  	// see this zone.
   991  	GkeClusters []*ManagedZonePrivateVisibilityConfigGKECluster `json:"gkeClusters,omitempty"`
   992  
   993  	Kind string `json:"kind,omitempty"`
   994  
   995  	// Networks: The list of VPC networks that can see this zone.
   996  	Networks []*ManagedZonePrivateVisibilityConfigNetwork `json:"networks,omitempty"`
   997  
   998  	// ForceSendFields is a list of field names (e.g. "GkeClusters") to
   999  	// unconditionally include in API requests. By default, fields with
  1000  	// empty or default values are omitted from API requests. However, any
  1001  	// non-pointer, non-interface field appearing in ForceSendFields will be
  1002  	// sent to the server regardless of whether the field is empty or not.
  1003  	// This may be used to include empty fields in Patch requests.
  1004  	ForceSendFields []string `json:"-"`
  1005  
  1006  	// NullFields is a list of field names (e.g. "GkeClusters") to include
  1007  	// in API requests with the JSON null value. By default, fields with
  1008  	// empty values are omitted from API requests. However, any field with
  1009  	// an empty value appearing in NullFields will be sent to the server as
  1010  	// null. It is an error if a field in this list has a non-empty value.
  1011  	// This may be used to include null fields in Patch requests.
  1012  	NullFields []string `json:"-"`
  1013  }
  1014  
  1015  func (s *ManagedZonePrivateVisibilityConfig) MarshalJSON() ([]byte, error) {
  1016  	type NoMethod ManagedZonePrivateVisibilityConfig
  1017  	raw := NoMethod(*s)
  1018  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1019  }
  1020  
  1021  type ManagedZonePrivateVisibilityConfigGKECluster struct {
  1022  	// GkeClusterName: The resource name of the cluster to bind this
  1023  	// ManagedZone to. This should be specified in the format like:
  1024  	// projects/*/locations/*/clusters/*. This is referenced from GKE
  1025  	// projects.locations.clusters.get API:
  1026  	// https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters/get
  1027  	GkeClusterName string `json:"gkeClusterName,omitempty"`
  1028  
  1029  	Kind string `json:"kind,omitempty"`
  1030  
  1031  	// ForceSendFields is a list of field names (e.g. "GkeClusterName") to
  1032  	// unconditionally include in API requests. By default, fields with
  1033  	// empty or default values are omitted from API requests. However, any
  1034  	// non-pointer, non-interface field appearing in ForceSendFields will be
  1035  	// sent to the server regardless of whether the field is empty or not.
  1036  	// This may be used to include empty fields in Patch requests.
  1037  	ForceSendFields []string `json:"-"`
  1038  
  1039  	// NullFields is a list of field names (e.g. "GkeClusterName") to
  1040  	// include in API requests with the JSON null value. By default, fields
  1041  	// with empty values are omitted from API requests. However, any field
  1042  	// with an empty value appearing in NullFields will be sent to the
  1043  	// server as null. It is an error if a field in this list has a
  1044  	// non-empty value. This may be used to include null fields in Patch
  1045  	// requests.
  1046  	NullFields []string `json:"-"`
  1047  }
  1048  
  1049  func (s *ManagedZonePrivateVisibilityConfigGKECluster) MarshalJSON() ([]byte, error) {
  1050  	type NoMethod ManagedZonePrivateVisibilityConfigGKECluster
  1051  	raw := NoMethod(*s)
  1052  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1053  }
  1054  
  1055  type ManagedZonePrivateVisibilityConfigNetwork struct {
  1056  	Kind string `json:"kind,omitempty"`
  1057  
  1058  	// NetworkUrl: The fully qualified URL of the VPC network to bind to.
  1059  	// Format this URL like
  1060  	// https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}
  1061  	NetworkUrl string `json:"networkUrl,omitempty"`
  1062  
  1063  	// ForceSendFields is a list of field names (e.g. "Kind") to
  1064  	// unconditionally include in API requests. By default, fields with
  1065  	// empty or default values are omitted from API requests. However, any
  1066  	// non-pointer, non-interface field appearing in ForceSendFields will be
  1067  	// sent to the server regardless of whether the field is empty or not.
  1068  	// This may be used to include empty fields in Patch requests.
  1069  	ForceSendFields []string `json:"-"`
  1070  
  1071  	// NullFields is a list of field names (e.g. "Kind") to include in API
  1072  	// requests with the JSON null value. By default, fields with empty
  1073  	// values are omitted from API requests. However, any field with an
  1074  	// empty value appearing in NullFields will be sent to the server as
  1075  	// null. It is an error if a field in this list has a non-empty value.
  1076  	// This may be used to include null fields in Patch requests.
  1077  	NullFields []string `json:"-"`
  1078  }
  1079  
  1080  func (s *ManagedZonePrivateVisibilityConfigNetwork) MarshalJSON() ([]byte, error) {
  1081  	type NoMethod ManagedZonePrivateVisibilityConfigNetwork
  1082  	raw := NoMethod(*s)
  1083  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1084  }
  1085  
  1086  type ManagedZoneReverseLookupConfig struct {
  1087  	Kind string `json:"kind,omitempty"`
  1088  
  1089  	// ForceSendFields is a list of field names (e.g. "Kind") to
  1090  	// unconditionally include in API requests. By default, fields with
  1091  	// empty or default values are omitted from API requests. However, any
  1092  	// non-pointer, non-interface field appearing in ForceSendFields will be
  1093  	// sent to the server regardless of whether the field is empty or not.
  1094  	// This may be used to include empty fields in Patch requests.
  1095  	ForceSendFields []string `json:"-"`
  1096  
  1097  	// NullFields is a list of field names (e.g. "Kind") to include in API
  1098  	// requests with the JSON null value. By default, fields with empty
  1099  	// values are omitted from API requests. However, any field with an
  1100  	// empty value appearing in NullFields will be sent to the server as
  1101  	// null. It is an error if a field in this list has a non-empty value.
  1102  	// This may be used to include null fields in Patch requests.
  1103  	NullFields []string `json:"-"`
  1104  }
  1105  
  1106  func (s *ManagedZoneReverseLookupConfig) MarshalJSON() ([]byte, error) {
  1107  	type NoMethod ManagedZoneReverseLookupConfig
  1108  	raw := NoMethod(*s)
  1109  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1110  }
  1111  
  1112  // ManagedZoneServiceDirectoryConfig: Contains information about Service
  1113  // Directory-backed zones.
  1114  type ManagedZoneServiceDirectoryConfig struct {
  1115  	Kind string `json:"kind,omitempty"`
  1116  
  1117  	// Namespace: Contains information about the namespace associated with
  1118  	// the zone.
  1119  	Namespace *ManagedZoneServiceDirectoryConfigNamespace `json:"namespace,omitempty"`
  1120  
  1121  	// ForceSendFields is a list of field names (e.g. "Kind") to
  1122  	// unconditionally include in API requests. By default, fields with
  1123  	// empty or default values are omitted from API requests. However, any
  1124  	// non-pointer, non-interface field appearing in ForceSendFields will be
  1125  	// sent to the server regardless of whether the field is empty or not.
  1126  	// This may be used to include empty fields in Patch requests.
  1127  	ForceSendFields []string `json:"-"`
  1128  
  1129  	// NullFields is a list of field names (e.g. "Kind") to include in API
  1130  	// requests with the JSON null value. By default, fields with empty
  1131  	// values are omitted from API requests. However, any field with an
  1132  	// empty value appearing in NullFields will be sent to the server as
  1133  	// null. It is an error if a field in this list has a non-empty value.
  1134  	// This may be used to include null fields in Patch requests.
  1135  	NullFields []string `json:"-"`
  1136  }
  1137  
  1138  func (s *ManagedZoneServiceDirectoryConfig) MarshalJSON() ([]byte, error) {
  1139  	type NoMethod ManagedZoneServiceDirectoryConfig
  1140  	raw := NoMethod(*s)
  1141  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1142  }
  1143  
  1144  type ManagedZoneServiceDirectoryConfigNamespace struct {
  1145  	// DeletionTime: The time that the namespace backing this zone was
  1146  	// deleted; an empty string if it still exists. This is in RFC3339 text
  1147  	// format. Output only.
  1148  	DeletionTime string `json:"deletionTime,omitempty"`
  1149  
  1150  	Kind string `json:"kind,omitempty"`
  1151  
  1152  	// NamespaceUrl: The fully qualified URL of the namespace associated
  1153  	// with the zone. Format must be
  1154  	// https://servicedirectory.googleapis.com/v1/projects/{project}/locations/{location}/namespaces/{namespace}
  1155  	NamespaceUrl string `json:"namespaceUrl,omitempty"`
  1156  
  1157  	// ForceSendFields is a list of field names (e.g. "DeletionTime") to
  1158  	// unconditionally include in API requests. By default, fields with
  1159  	// empty or default values are omitted from API requests. However, any
  1160  	// non-pointer, non-interface field appearing in ForceSendFields will be
  1161  	// sent to the server regardless of whether the field is empty or not.
  1162  	// This may be used to include empty fields in Patch requests.
  1163  	ForceSendFields []string `json:"-"`
  1164  
  1165  	// NullFields is a list of field names (e.g. "DeletionTime") to include
  1166  	// in API requests with the JSON null value. By default, fields with
  1167  	// empty values are omitted from API requests. However, any field with
  1168  	// an empty value appearing in NullFields will be sent to the server as
  1169  	// null. It is an error if a field in this list has a non-empty value.
  1170  	// This may be used to include null fields in Patch requests.
  1171  	NullFields []string `json:"-"`
  1172  }
  1173  
  1174  func (s *ManagedZoneServiceDirectoryConfigNamespace) MarshalJSON() ([]byte, error) {
  1175  	type NoMethod ManagedZoneServiceDirectoryConfigNamespace
  1176  	raw := NoMethod(*s)
  1177  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1178  }
  1179  
  1180  type ManagedZonesListResponse struct {
  1181  	Header *ResponseHeader `json:"header,omitempty"`
  1182  
  1183  	// Kind: Type of resource.
  1184  	Kind string `json:"kind,omitempty"`
  1185  
  1186  	// ManagedZones: The managed zone resources.
  1187  	ManagedZones []*ManagedZone `json:"managedZones,omitempty"`
  1188  
  1189  	// NextPageToken: The presence of this field indicates that there exist
  1190  	// more results following your last page of results in pagination order.
  1191  	// To fetch them, make another list request using this value as your
  1192  	// page token. This lets you the complete contents of even very large
  1193  	// collections one page at a time. However, if the contents of the
  1194  	// collection change between the first and last paginated list request,
  1195  	// the set of all elements returned are an inconsistent view of the
  1196  	// collection. You cannot retrieve a consistent snapshot of a collection
  1197  	// larger than the maximum page size.
  1198  	NextPageToken string `json:"nextPageToken,omitempty"`
  1199  
  1200  	// ServerResponse contains the HTTP response code and headers from the
  1201  	// server.
  1202  	googleapi.ServerResponse `json:"-"`
  1203  
  1204  	// ForceSendFields is a list of field names (e.g. "Header") to
  1205  	// unconditionally include in API requests. By default, fields with
  1206  	// empty or default values are omitted from API requests. However, any
  1207  	// non-pointer, non-interface field appearing in ForceSendFields will be
  1208  	// sent to the server regardless of whether the field is empty or not.
  1209  	// This may be used to include empty fields in Patch requests.
  1210  	ForceSendFields []string `json:"-"`
  1211  
  1212  	// NullFields is a list of field names (e.g. "Header") to include in API
  1213  	// requests with the JSON null value. By default, fields with empty
  1214  	// values are omitted from API requests. However, any field with an
  1215  	// empty value appearing in NullFields will be sent to the server as
  1216  	// null. It is an error if a field in this list has a non-empty value.
  1217  	// This may be used to include null fields in Patch requests.
  1218  	NullFields []string `json:"-"`
  1219  }
  1220  
  1221  func (s *ManagedZonesListResponse) MarshalJSON() ([]byte, error) {
  1222  	type NoMethod ManagedZonesListResponse
  1223  	raw := NoMethod(*s)
  1224  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1225  }
  1226  
  1227  // Operation: An operation represents a successful mutation performed on
  1228  // a Cloud DNS resource. Operations provide: - An audit log of server
  1229  // resource mutations. - A way to recover/retry API calls in the case
  1230  // where the response is never received by the caller. Use the caller
  1231  // specified client_operation_id.
  1232  type Operation struct {
  1233  	// DnsKeyContext: Only populated if the operation targeted a DnsKey
  1234  	// (output only).
  1235  	DnsKeyContext *OperationDnsKeyContext `json:"dnsKeyContext,omitempty"`
  1236  
  1237  	// Id: Unique identifier for the resource. This is the
  1238  	// client_operation_id if the client specified it when the mutation was
  1239  	// initiated, otherwise, it is generated by the server. The name must be
  1240  	// 1-63 characters long and match the regular expression [-a-z0-9]?
  1241  	// (output only)
  1242  	Id string `json:"id,omitempty"`
  1243  
  1244  	Kind string `json:"kind,omitempty"`
  1245  
  1246  	// StartTime: The time that this operation was started by the server.
  1247  	// This is in RFC3339 text format (output only).
  1248  	StartTime string `json:"startTime,omitempty"`
  1249  
  1250  	// Status: Status of the operation. Can be one of the following:
  1251  	// "PENDING" or "DONE" (output only). A status of "DONE" means that the
  1252  	// request to update the authoritative servers has been sent, but the
  1253  	// servers might not be updated yet.
  1254  	//
  1255  	// Possible values:
  1256  	//   "PENDING"
  1257  	//   "DONE"
  1258  	Status string `json:"status,omitempty"`
  1259  
  1260  	// Type: Type of the operation. Operations include insert, update, and
  1261  	// delete (output only).
  1262  	Type string `json:"type,omitempty"`
  1263  
  1264  	// User: User who requested the operation, for example:
  1265  	// user@example.com. cloud-dns-system for operations automatically done
  1266  	// by the system. (output only)
  1267  	User string `json:"user,omitempty"`
  1268  
  1269  	// ZoneContext: Only populated if the operation targeted a ManagedZone
  1270  	// (output only).
  1271  	ZoneContext *OperationManagedZoneContext `json:"zoneContext,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. "DnsKeyContext") to
  1278  	// unconditionally include in API requests. By default, fields with
  1279  	// empty or default values are omitted from API requests. However, any
  1280  	// non-pointer, non-interface field appearing in ForceSendFields will be
  1281  	// sent to the server regardless of whether the field is empty or not.
  1282  	// This may be used to include empty fields in Patch requests.
  1283  	ForceSendFields []string `json:"-"`
  1284  
  1285  	// NullFields is a list of field names (e.g. "DnsKeyContext") to include
  1286  	// in API requests with the JSON null value. By default, fields with
  1287  	// empty values are omitted from API requests. However, any field with
  1288  	// an 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 *Operation) MarshalJSON() ([]byte, error) {
  1295  	type NoMethod Operation
  1296  	raw := NoMethod(*s)
  1297  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1298  }
  1299  
  1300  type OperationDnsKeyContext struct {
  1301  	// NewValue: The post-operation DnsKey resource.
  1302  	NewValue *DnsKey `json:"newValue,omitempty"`
  1303  
  1304  	// OldValue: The pre-operation DnsKey resource.
  1305  	OldValue *DnsKey `json:"oldValue,omitempty"`
  1306  
  1307  	// ForceSendFields is a list of field names (e.g. "NewValue") to
  1308  	// unconditionally include in API requests. By default, fields with
  1309  	// empty or default values are omitted from API requests. However, any
  1310  	// non-pointer, non-interface field appearing in ForceSendFields will be
  1311  	// sent to the server regardless of whether the field is empty or not.
  1312  	// This may be used to include empty fields in Patch requests.
  1313  	ForceSendFields []string `json:"-"`
  1314  
  1315  	// NullFields is a list of field names (e.g. "NewValue") to include in
  1316  	// API requests with the JSON null value. By default, fields with empty
  1317  	// values are omitted from API requests. However, any field with an
  1318  	// empty value appearing in NullFields will be sent to the server as
  1319  	// null. It is an error if a field in this list has a non-empty value.
  1320  	// This may be used to include null fields in Patch requests.
  1321  	NullFields []string `json:"-"`
  1322  }
  1323  
  1324  func (s *OperationDnsKeyContext) MarshalJSON() ([]byte, error) {
  1325  	type NoMethod OperationDnsKeyContext
  1326  	raw := NoMethod(*s)
  1327  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1328  }
  1329  
  1330  type OperationManagedZoneContext struct {
  1331  	// NewValue: The post-operation ManagedZone resource.
  1332  	NewValue *ManagedZone `json:"newValue,omitempty"`
  1333  
  1334  	// OldValue: The pre-operation ManagedZone resource.
  1335  	OldValue *ManagedZone `json:"oldValue,omitempty"`
  1336  
  1337  	// ForceSendFields is a list of field names (e.g. "NewValue") to
  1338  	// unconditionally include in API requests. By default, fields with
  1339  	// empty or default values are omitted from API requests. However, any
  1340  	// non-pointer, non-interface field appearing in ForceSendFields will be
  1341  	// sent to the server regardless of whether the field is empty or not.
  1342  	// This may be used to include empty fields in Patch requests.
  1343  	ForceSendFields []string `json:"-"`
  1344  
  1345  	// NullFields is a list of field names (e.g. "NewValue") to include in
  1346  	// API requests with the JSON null value. By default, fields with empty
  1347  	// values are omitted from API requests. However, any field with an
  1348  	// empty value appearing in NullFields will be sent to the server as
  1349  	// null. It is an error if a field in this list has a non-empty value.
  1350  	// This may be used to include null fields in Patch requests.
  1351  	NullFields []string `json:"-"`
  1352  }
  1353  
  1354  func (s *OperationManagedZoneContext) MarshalJSON() ([]byte, error) {
  1355  	type NoMethod OperationManagedZoneContext
  1356  	raw := NoMethod(*s)
  1357  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1358  }
  1359  
  1360  type PoliciesListResponse struct {
  1361  	Header *ResponseHeader `json:"header,omitempty"`
  1362  
  1363  	// Kind: Type of resource.
  1364  	Kind string `json:"kind,omitempty"`
  1365  
  1366  	// NextPageToken: The presence of this field indicates that there exist
  1367  	// more results following your last page of results in pagination order.
  1368  	// To fetch them, make another list request using this value as your
  1369  	// page token. This lets you the complete contents of even very large
  1370  	// collections one page at a time. However, if the contents of the
  1371  	// collection change between the first and last paginated list request,
  1372  	// the set of all elements returned are an inconsistent view of the
  1373  	// collection. You cannot retrieve a consistent snapshot of a collection
  1374  	// larger than the maximum page size.
  1375  	NextPageToken string `json:"nextPageToken,omitempty"`
  1376  
  1377  	// Policies: The policy resources.
  1378  	Policies []*Policy `json:"policies,omitempty"`
  1379  
  1380  	// ServerResponse contains the HTTP response code and headers from the
  1381  	// server.
  1382  	googleapi.ServerResponse `json:"-"`
  1383  
  1384  	// ForceSendFields is a list of field names (e.g. "Header") to
  1385  	// unconditionally include in API requests. By default, fields with
  1386  	// empty or default values are omitted from API requests. However, any
  1387  	// non-pointer, non-interface field appearing in ForceSendFields will be
  1388  	// sent to the server regardless of whether the field is empty or not.
  1389  	// This may be used to include empty fields in Patch requests.
  1390  	ForceSendFields []string `json:"-"`
  1391  
  1392  	// NullFields is a list of field names (e.g. "Header") to include in API
  1393  	// requests with the JSON null value. By default, fields with empty
  1394  	// values are omitted from API requests. However, any field with an
  1395  	// empty value appearing in NullFields will be sent to the server as
  1396  	// null. It is an error if a field in this list has a non-empty value.
  1397  	// This may be used to include null fields in Patch requests.
  1398  	NullFields []string `json:"-"`
  1399  }
  1400  
  1401  func (s *PoliciesListResponse) MarshalJSON() ([]byte, error) {
  1402  	type NoMethod PoliciesListResponse
  1403  	raw := NoMethod(*s)
  1404  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1405  }
  1406  
  1407  type PoliciesPatchResponse struct {
  1408  	Header *ResponseHeader `json:"header,omitempty"`
  1409  
  1410  	Policy *Policy `json:"policy,omitempty"`
  1411  
  1412  	// ServerResponse contains the HTTP response code and headers from the
  1413  	// server.
  1414  	googleapi.ServerResponse `json:"-"`
  1415  
  1416  	// ForceSendFields is a list of field names (e.g. "Header") to
  1417  	// unconditionally include in API requests. By default, fields with
  1418  	// empty or default values are omitted from API requests. However, any
  1419  	// non-pointer, non-interface field appearing in ForceSendFields will be
  1420  	// sent to the server regardless of whether the field is empty or not.
  1421  	// This may be used to include empty fields in Patch requests.
  1422  	ForceSendFields []string `json:"-"`
  1423  
  1424  	// NullFields is a list of field names (e.g. "Header") to include in API
  1425  	// requests with the JSON null value. By default, fields with empty
  1426  	// values are omitted from API requests. However, any field with an
  1427  	// empty value appearing in NullFields will be sent to the server as
  1428  	// null. It is an error if a field in this list has a non-empty value.
  1429  	// This may be used to include null fields in Patch requests.
  1430  	NullFields []string `json:"-"`
  1431  }
  1432  
  1433  func (s *PoliciesPatchResponse) MarshalJSON() ([]byte, error) {
  1434  	type NoMethod PoliciesPatchResponse
  1435  	raw := NoMethod(*s)
  1436  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1437  }
  1438  
  1439  type PoliciesUpdateResponse struct {
  1440  	Header *ResponseHeader `json:"header,omitempty"`
  1441  
  1442  	Policy *Policy `json:"policy,omitempty"`
  1443  
  1444  	// ServerResponse contains the HTTP response code and headers from the
  1445  	// server.
  1446  	googleapi.ServerResponse `json:"-"`
  1447  
  1448  	// ForceSendFields is a list of field names (e.g. "Header") to
  1449  	// unconditionally include in API requests. By default, fields with
  1450  	// empty or default values are omitted from API requests. However, any
  1451  	// non-pointer, non-interface field appearing in ForceSendFields will be
  1452  	// sent to the server regardless of whether the field is empty or not.
  1453  	// This may be used to include empty fields in Patch requests.
  1454  	ForceSendFields []string `json:"-"`
  1455  
  1456  	// NullFields is a list of field names (e.g. "Header") to include in API
  1457  	// requests with the JSON null value. By default, fields with empty
  1458  	// values are omitted from API requests. However, any field with an
  1459  	// empty value appearing in NullFields will be sent to the server as
  1460  	// null. It is an error if a field in this list has a non-empty value.
  1461  	// This may be used to include null fields in Patch requests.
  1462  	NullFields []string `json:"-"`
  1463  }
  1464  
  1465  func (s *PoliciesUpdateResponse) MarshalJSON() ([]byte, error) {
  1466  	type NoMethod PoliciesUpdateResponse
  1467  	raw := NoMethod(*s)
  1468  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1469  }
  1470  
  1471  // Policy: A policy is a collection of DNS rules applied to one or more
  1472  // Virtual Private Cloud resources.
  1473  type Policy struct {
  1474  	// AlternativeNameServerConfig: Sets an alternative name server for the
  1475  	// associated networks. When specified, all DNS queries are forwarded to
  1476  	// a name server that you choose. Names such as .internal are not
  1477  	// available when an alternative name server is specified.
  1478  	AlternativeNameServerConfig *PolicyAlternativeNameServerConfig `json:"alternativeNameServerConfig,omitempty"`
  1479  
  1480  	// Description: A mutable string of at most 1024 characters associated
  1481  	// with this resource for the user's convenience. Has no effect on the
  1482  	// policy's function.
  1483  	Description string `json:"description,omitempty"`
  1484  
  1485  	// EnableInboundForwarding: Allows networks bound to this policy to
  1486  	// receive DNS queries sent by VMs or applications over VPN connections.
  1487  	// When enabled, a virtual IP address is allocated from each of the
  1488  	// subnetworks that are bound to this policy.
  1489  	EnableInboundForwarding bool `json:"enableInboundForwarding,omitempty"`
  1490  
  1491  	// EnableLogging: Controls whether logging is enabled for the networks
  1492  	// bound to this policy. Defaults to no logging if not set.
  1493  	EnableLogging bool `json:"enableLogging,omitempty"`
  1494  
  1495  	// Id: Unique identifier for the resource; defined by the server (output
  1496  	// only).
  1497  	Id uint64 `json:"id,omitempty,string"`
  1498  
  1499  	Kind string `json:"kind,omitempty"`
  1500  
  1501  	// Name: User-assigned name for this policy.
  1502  	Name string `json:"name,omitempty"`
  1503  
  1504  	// Networks: List of network names specifying networks to which this
  1505  	// policy is applied.
  1506  	Networks []*PolicyNetwork `json:"networks,omitempty"`
  1507  
  1508  	// ServerResponse contains the HTTP response code and headers from the
  1509  	// server.
  1510  	googleapi.ServerResponse `json:"-"`
  1511  
  1512  	// ForceSendFields is a list of field names (e.g.
  1513  	// "AlternativeNameServerConfig") to unconditionally include in API
  1514  	// requests. By default, fields with empty or default values are omitted
  1515  	// from API requests. However, any non-pointer, non-interface field
  1516  	// appearing in ForceSendFields will be sent to the server regardless of
  1517  	// whether the field is empty or not. This may be used to include empty
  1518  	// fields in Patch requests.
  1519  	ForceSendFields []string `json:"-"`
  1520  
  1521  	// NullFields is a list of field names (e.g.
  1522  	// "AlternativeNameServerConfig") to include in API requests with the
  1523  	// JSON null value. By default, fields with empty values are omitted
  1524  	// from API requests. However, any field with an empty value appearing
  1525  	// in NullFields will be sent to the server as null. It is an error if a
  1526  	// field in this list has a non-empty value. This may be used to include
  1527  	// null fields in Patch requests.
  1528  	NullFields []string `json:"-"`
  1529  }
  1530  
  1531  func (s *Policy) MarshalJSON() ([]byte, error) {
  1532  	type NoMethod Policy
  1533  	raw := NoMethod(*s)
  1534  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1535  }
  1536  
  1537  type PolicyAlternativeNameServerConfig struct {
  1538  	Kind string `json:"kind,omitempty"`
  1539  
  1540  	// TargetNameServers: Sets an alternative name server for the associated
  1541  	// networks. When specified, all DNS queries are forwarded to a name
  1542  	// server that you choose. Names such as .internal are not available
  1543  	// when an alternative name server is specified.
  1544  	TargetNameServers []*PolicyAlternativeNameServerConfigTargetNameServer `json:"targetNameServers,omitempty"`
  1545  
  1546  	// ForceSendFields is a list of field names (e.g. "Kind") to
  1547  	// unconditionally include in API requests. By default, fields with
  1548  	// empty or default values are omitted from API requests. However, any
  1549  	// non-pointer, non-interface field appearing in ForceSendFields will be
  1550  	// sent to the server regardless of whether the field is empty or not.
  1551  	// This may be used to include empty fields in Patch requests.
  1552  	ForceSendFields []string `json:"-"`
  1553  
  1554  	// NullFields is a list of field names (e.g. "Kind") to include in API
  1555  	// requests with the JSON null value. By default, fields with empty
  1556  	// values are omitted from API requests. However, any field with an
  1557  	// empty value appearing in NullFields will be sent to the server as
  1558  	// null. It is an error if a field in this list has a non-empty value.
  1559  	// This may be used to include null fields in Patch requests.
  1560  	NullFields []string `json:"-"`
  1561  }
  1562  
  1563  func (s *PolicyAlternativeNameServerConfig) MarshalJSON() ([]byte, error) {
  1564  	type NoMethod PolicyAlternativeNameServerConfig
  1565  	raw := NoMethod(*s)
  1566  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1567  }
  1568  
  1569  type PolicyAlternativeNameServerConfigTargetNameServer struct {
  1570  	// ForwardingPath: Forwarding path for this TargetNameServer. If unset
  1571  	// or set to DEFAULT, Cloud DNS makes forwarding decisions based on
  1572  	// address ranges; that is, RFC1918 addresses go to the VPC network,
  1573  	// non-RFC1918 addresses go to the internet. When set to PRIVATE, Cloud
  1574  	// DNS always sends queries through the VPC network for this target.
  1575  	//
  1576  	// Possible values:
  1577  	//   "DEFAULT" - Cloud DNS makes forwarding decision based on IP address
  1578  	// ranges; that is, RFC1918 addresses forward to the target through the
  1579  	// VPC and non-RFC1918 addresses forward to the target through the
  1580  	// internet
  1581  	//   "PRIVATE" - Cloud DNS always forwards to this target through the
  1582  	// VPC.
  1583  	ForwardingPath string `json:"forwardingPath,omitempty"`
  1584  
  1585  	// Ipv4Address: IPv4 address to forward to.
  1586  	Ipv4Address string `json:"ipv4Address,omitempty"`
  1587  
  1588  	Kind string `json:"kind,omitempty"`
  1589  
  1590  	// ForceSendFields is a list of field names (e.g. "ForwardingPath") to
  1591  	// unconditionally include in API requests. By default, fields with
  1592  	// empty or default values are omitted from API requests. However, any
  1593  	// non-pointer, non-interface field appearing in ForceSendFields will be
  1594  	// sent to the server regardless of whether the field is empty or not.
  1595  	// This may be used to include empty fields in Patch requests.
  1596  	ForceSendFields []string `json:"-"`
  1597  
  1598  	// NullFields is a list of field names (e.g. "ForwardingPath") to
  1599  	// include in API requests with the JSON null value. By default, fields
  1600  	// with empty values are omitted from API requests. However, any field
  1601  	// with an empty value appearing in NullFields will be sent to the
  1602  	// server as null. It is an error if a field in this list has a
  1603  	// non-empty value. This may be used to include null fields in Patch
  1604  	// requests.
  1605  	NullFields []string `json:"-"`
  1606  }
  1607  
  1608  func (s *PolicyAlternativeNameServerConfigTargetNameServer) MarshalJSON() ([]byte, error) {
  1609  	type NoMethod PolicyAlternativeNameServerConfigTargetNameServer
  1610  	raw := NoMethod(*s)
  1611  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1612  }
  1613  
  1614  type PolicyNetwork struct {
  1615  	Kind string `json:"kind,omitempty"`
  1616  
  1617  	// NetworkUrl: The fully qualified URL of the VPC network to bind to.
  1618  	// This should be formatted like
  1619  	// https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}
  1620  	NetworkUrl string `json:"networkUrl,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 or default values are omitted from API requests. However, any
  1625  	// non-pointer, non-interface field appearing in ForceSendFields will be
  1626  	// sent to the server regardless of whether the field is empty or not.
  1627  	// This may be 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 *PolicyNetwork) MarshalJSON() ([]byte, error) {
  1640  	type NoMethod PolicyNetwork
  1641  	raw := NoMethod(*s)
  1642  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1643  }
  1644  
  1645  // Project: A project resource. The project is a top level container for
  1646  // resources including Cloud DNS ManagedZones. Projects can be created
  1647  // only in the APIs console. Next tag: 7.
  1648  type Project struct {
  1649  	// Id: User assigned unique identifier for the resource (output only).
  1650  	Id string `json:"id,omitempty"`
  1651  
  1652  	Kind string `json:"kind,omitempty"`
  1653  
  1654  	// Number: Unique numeric identifier for the resource; defined by the
  1655  	// server (output only).
  1656  	Number uint64 `json:"number,omitempty,string"`
  1657  
  1658  	// Quota: Quotas assigned to this project (output only).
  1659  	Quota *Quota `json:"quota,omitempty"`
  1660  
  1661  	// ServerResponse contains the HTTP response code and headers from the
  1662  	// server.
  1663  	googleapi.ServerResponse `json:"-"`
  1664  
  1665  	// ForceSendFields is a list of field names (e.g. "Id") to
  1666  	// unconditionally include in API requests. By default, fields with
  1667  	// empty or default values are omitted from API requests. However, any
  1668  	// non-pointer, non-interface field appearing in ForceSendFields will be
  1669  	// sent to the server regardless of whether the field is empty or not.
  1670  	// This may be used to include empty fields in Patch requests.
  1671  	ForceSendFields []string `json:"-"`
  1672  
  1673  	// NullFields is a list of field names (e.g. "Id") to include in API
  1674  	// requests with the JSON null value. By default, fields with empty
  1675  	// values are omitted from API requests. However, any field with an
  1676  	// empty value appearing in NullFields will be sent to the server as
  1677  	// null. It is an error if a field in this list has a non-empty value.
  1678  	// This may be used to include null fields in Patch requests.
  1679  	NullFields []string `json:"-"`
  1680  }
  1681  
  1682  func (s *Project) MarshalJSON() ([]byte, error) {
  1683  	type NoMethod Project
  1684  	raw := NoMethod(*s)
  1685  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1686  }
  1687  
  1688  // Quota: Limits associated with a Project.
  1689  type Quota struct {
  1690  	// DnsKeysPerManagedZone: Maximum allowed number of DnsKeys per
  1691  	// ManagedZone.
  1692  	DnsKeysPerManagedZone int64 `json:"dnsKeysPerManagedZone,omitempty"`
  1693  
  1694  	// ItemsPerRoutingPolicy: Maximum allowed number of items per routing
  1695  	// policy.
  1696  	ItemsPerRoutingPolicy int64 `json:"itemsPerRoutingPolicy,omitempty"`
  1697  
  1698  	Kind string `json:"kind,omitempty"`
  1699  
  1700  	// ManagedZones: Maximum allowed number of managed zones in the project.
  1701  	ManagedZones int64 `json:"managedZones,omitempty"`
  1702  
  1703  	// ManagedZonesPerNetwork: Maximum allowed number of managed zones which
  1704  	// can be attached to a network.
  1705  	ManagedZonesPerNetwork int64 `json:"managedZonesPerNetwork,omitempty"`
  1706  
  1707  	// NetworksPerManagedZone: Maximum allowed number of networks to which a
  1708  	// privately scoped zone can be attached.
  1709  	NetworksPerManagedZone int64 `json:"networksPerManagedZone,omitempty"`
  1710  
  1711  	// NetworksPerPolicy: Maximum allowed number of networks per policy.
  1712  	NetworksPerPolicy int64 `json:"networksPerPolicy,omitempty"`
  1713  
  1714  	// PeeringZonesPerTargetNetwork: Maximum allowed number of consumer
  1715  	// peering zones per target network owned by this producer project
  1716  	PeeringZonesPerTargetNetwork int64 `json:"peeringZonesPerTargetNetwork,omitempty"`
  1717  
  1718  	// Policies: Maximum allowed number of policies per project.
  1719  	Policies int64 `json:"policies,omitempty"`
  1720  
  1721  	// ResourceRecordsPerRrset: Maximum allowed number of ResourceRecords
  1722  	// per ResourceRecordSet.
  1723  	ResourceRecordsPerRrset int64 `json:"resourceRecordsPerRrset,omitempty"`
  1724  
  1725  	// RrsetAdditionsPerChange: Maximum allowed number of ResourceRecordSets
  1726  	// to add per ChangesCreateRequest.
  1727  	RrsetAdditionsPerChange int64 `json:"rrsetAdditionsPerChange,omitempty"`
  1728  
  1729  	// RrsetDeletionsPerChange: Maximum allowed number of ResourceRecordSets
  1730  	// to delete per ChangesCreateRequest.
  1731  	RrsetDeletionsPerChange int64 `json:"rrsetDeletionsPerChange,omitempty"`
  1732  
  1733  	// RrsetsPerManagedZone: Maximum allowed number of ResourceRecordSets
  1734  	// per zone in the project.
  1735  	RrsetsPerManagedZone int64 `json:"rrsetsPerManagedZone,omitempty"`
  1736  
  1737  	// TargetNameServersPerManagedZone: Maximum allowed number of target
  1738  	// name servers per managed forwarding zone.
  1739  	TargetNameServersPerManagedZone int64 `json:"targetNameServersPerManagedZone,omitempty"`
  1740  
  1741  	// TargetNameServersPerPolicy: Maximum allowed number of alternative
  1742  	// target name servers per policy.
  1743  	TargetNameServersPerPolicy int64 `json:"targetNameServersPerPolicy,omitempty"`
  1744  
  1745  	// TotalRrdataSizePerChange: Maximum allowed size for total rrdata in
  1746  	// one ChangesCreateRequest in bytes.
  1747  	TotalRrdataSizePerChange int64 `json:"totalRrdataSizePerChange,omitempty"`
  1748  
  1749  	// WhitelistedKeySpecs: DNSSEC algorithm and key length types that can
  1750  	// be used for DnsKeys.
  1751  	WhitelistedKeySpecs []*DnsKeySpec `json:"whitelistedKeySpecs,omitempty"`
  1752  
  1753  	// ForceSendFields is a list of field names (e.g.
  1754  	// "DnsKeysPerManagedZone") to unconditionally include in API requests.
  1755  	// By default, fields with empty or default values are omitted from API
  1756  	// requests. However, any non-pointer, non-interface field appearing in
  1757  	// ForceSendFields will be sent to the server regardless of whether the
  1758  	// field is empty or not. This may be used to include empty fields in
  1759  	// Patch requests.
  1760  	ForceSendFields []string `json:"-"`
  1761  
  1762  	// NullFields is a list of field names (e.g. "DnsKeysPerManagedZone") to
  1763  	// include in API requests with the JSON null value. By default, fields
  1764  	// with empty values are omitted from API requests. However, any field
  1765  	// with an empty value appearing in NullFields will be sent to the
  1766  	// server as null. It is an error if a field in this list has a
  1767  	// non-empty value. This may be used to include null fields in Patch
  1768  	// requests.
  1769  	NullFields []string `json:"-"`
  1770  }
  1771  
  1772  func (s *Quota) MarshalJSON() ([]byte, error) {
  1773  	type NoMethod Quota
  1774  	raw := NoMethod(*s)
  1775  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1776  }
  1777  
  1778  // RRSetRoutingPolicy: A RRSetRoutingPolicy represents ResourceRecordSet
  1779  // data that is returned dynamically with the response varying based on
  1780  // configured properties such as geolocation or by weighted random
  1781  // selection.
  1782  type RRSetRoutingPolicy struct {
  1783  	Geo *RRSetRoutingPolicyGeoPolicy `json:"geo,omitempty"`
  1784  
  1785  	Kind string `json:"kind,omitempty"`
  1786  
  1787  	Wrr *RRSetRoutingPolicyWrrPolicy `json:"wrr,omitempty"`
  1788  
  1789  	// ForceSendFields is a list of field names (e.g. "Geo") to
  1790  	// unconditionally include in API requests. By default, fields with
  1791  	// empty or default values are omitted from API requests. However, any
  1792  	// non-pointer, non-interface field appearing in ForceSendFields will be
  1793  	// sent to the server regardless of whether the field is empty or not.
  1794  	// This may be used to include empty fields in Patch requests.
  1795  	ForceSendFields []string `json:"-"`
  1796  
  1797  	// NullFields is a list of field names (e.g. "Geo") to include in API
  1798  	// requests with the JSON null value. By default, fields with empty
  1799  	// values are omitted from API requests. However, any field with an
  1800  	// empty value appearing in NullFields will be sent to the server as
  1801  	// null. It is an error if a field in this list has a non-empty value.
  1802  	// This may be used to include null fields in Patch requests.
  1803  	NullFields []string `json:"-"`
  1804  }
  1805  
  1806  func (s *RRSetRoutingPolicy) MarshalJSON() ([]byte, error) {
  1807  	type NoMethod RRSetRoutingPolicy
  1808  	raw := NoMethod(*s)
  1809  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1810  }
  1811  
  1812  // RRSetRoutingPolicyGeoPolicy: Configures a RRSetRoutingPolicy that
  1813  // routes based on the geo location of the querying user.
  1814  type RRSetRoutingPolicyGeoPolicy struct {
  1815  	// Items: The primary geo routing configuration. If there are multiple
  1816  	// items with the same location, an error is returned instead.
  1817  	Items []*RRSetRoutingPolicyGeoPolicyGeoPolicyItem `json:"items,omitempty"`
  1818  
  1819  	Kind string `json:"kind,omitempty"`
  1820  
  1821  	// ForceSendFields is a list of field names (e.g. "Items") to
  1822  	// unconditionally include in API requests. By default, fields with
  1823  	// empty or default values are omitted from API requests. However, any
  1824  	// non-pointer, non-interface field appearing in ForceSendFields will be
  1825  	// sent to the server regardless of whether the field is empty or not.
  1826  	// This may be used to include empty fields in Patch requests.
  1827  	ForceSendFields []string `json:"-"`
  1828  
  1829  	// NullFields is a list of field names (e.g. "Items") to include in API
  1830  	// requests with the JSON null value. By default, fields with empty
  1831  	// values are omitted from API requests. However, any field with an
  1832  	// empty value appearing in NullFields will be sent to the server as
  1833  	// null. It is an error if a field in this list has a non-empty value.
  1834  	// This may be used to include null fields in Patch requests.
  1835  	NullFields []string `json:"-"`
  1836  }
  1837  
  1838  func (s *RRSetRoutingPolicyGeoPolicy) MarshalJSON() ([]byte, error) {
  1839  	type NoMethod RRSetRoutingPolicyGeoPolicy
  1840  	raw := NoMethod(*s)
  1841  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1842  }
  1843  
  1844  // RRSetRoutingPolicyGeoPolicyGeoPolicyItem: ResourceRecordSet data for
  1845  // one geo location.
  1846  type RRSetRoutingPolicyGeoPolicyGeoPolicyItem struct {
  1847  	Kind string `json:"kind,omitempty"`
  1848  
  1849  	// Location: The geo-location granularity is a GCP region. This location
  1850  	// string should correspond to a GCP region. e.g. "us-east1",
  1851  	// "southamerica-east1", "asia-east1", etc.
  1852  	Location string `json:"location,omitempty"`
  1853  
  1854  	Rrdatas []string `json:"rrdatas,omitempty"`
  1855  
  1856  	// SignatureRrdatas: DNSSEC generated signatures for all the rrdata
  1857  	// within this item. Note that if health checked targets are provided
  1858  	// for DNSSEC enabled zones, there's a restriction of 1 ip per item. .
  1859  	SignatureRrdatas []string `json:"signatureRrdatas,omitempty"`
  1860  
  1861  	// ForceSendFields is a list of field names (e.g. "Kind") to
  1862  	// unconditionally include in API requests. By default, fields with
  1863  	// empty or default values are omitted from API requests. However, any
  1864  	// non-pointer, non-interface field appearing in ForceSendFields will be
  1865  	// sent to the server regardless of whether the field is empty or not.
  1866  	// This may be used to include empty fields in Patch requests.
  1867  	ForceSendFields []string `json:"-"`
  1868  
  1869  	// NullFields is a list of field names (e.g. "Kind") to include in API
  1870  	// requests with the JSON null value. By default, fields with empty
  1871  	// values are omitted from API requests. However, any field with an
  1872  	// empty value appearing in NullFields will be sent to the server as
  1873  	// null. It is an error if a field in this list has a non-empty value.
  1874  	// This may be used to include null fields in Patch requests.
  1875  	NullFields []string `json:"-"`
  1876  }
  1877  
  1878  func (s *RRSetRoutingPolicyGeoPolicyGeoPolicyItem) MarshalJSON() ([]byte, error) {
  1879  	type NoMethod RRSetRoutingPolicyGeoPolicyGeoPolicyItem
  1880  	raw := NoMethod(*s)
  1881  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1882  }
  1883  
  1884  // RRSetRoutingPolicyWrrPolicy: Configures a RRSetRoutingPolicy that
  1885  // routes in a weighted round robin fashion.
  1886  type RRSetRoutingPolicyWrrPolicy struct {
  1887  	Items []*RRSetRoutingPolicyWrrPolicyWrrPolicyItem `json:"items,omitempty"`
  1888  
  1889  	Kind string `json:"kind,omitempty"`
  1890  
  1891  	// ForceSendFields is a list of field names (e.g. "Items") to
  1892  	// unconditionally include in API requests. By default, fields with
  1893  	// empty or default values are omitted from API requests. However, any
  1894  	// non-pointer, non-interface field appearing in ForceSendFields will be
  1895  	// sent to the server regardless of whether the field is empty or not.
  1896  	// This may be used to include empty fields in Patch requests.
  1897  	ForceSendFields []string `json:"-"`
  1898  
  1899  	// NullFields is a list of field names (e.g. "Items") to include in API
  1900  	// requests with the JSON null value. By default, fields with empty
  1901  	// values are omitted from API requests. However, any field with an
  1902  	// empty value appearing in NullFields will be sent to the server as
  1903  	// null. It is an error if a field in this list has a non-empty value.
  1904  	// This may be used to include null fields in Patch requests.
  1905  	NullFields []string `json:"-"`
  1906  }
  1907  
  1908  func (s *RRSetRoutingPolicyWrrPolicy) MarshalJSON() ([]byte, error) {
  1909  	type NoMethod RRSetRoutingPolicyWrrPolicy
  1910  	raw := NoMethod(*s)
  1911  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1912  }
  1913  
  1914  // RRSetRoutingPolicyWrrPolicyWrrPolicyItem: A routing block which
  1915  // contains the routing information for one WRR item.
  1916  type RRSetRoutingPolicyWrrPolicyWrrPolicyItem struct {
  1917  	Kind string `json:"kind,omitempty"`
  1918  
  1919  	Rrdatas []string `json:"rrdatas,omitempty"`
  1920  
  1921  	// SignatureRrdatas: DNSSEC generated signatures for all the rrdata
  1922  	// within this item. Note that if health checked targets are provided
  1923  	// for DNSSEC enabled zones, there's a restriction of 1 ip per item. .
  1924  	SignatureRrdatas []string `json:"signatureRrdatas,omitempty"`
  1925  
  1926  	// Weight: The weight corresponding to this subset of rrdata. When
  1927  	// multiple WeightedRoundRobinPolicyItems are configured, the
  1928  	// probability of returning an rrset is proportional to its weight
  1929  	// relative to the sum of weights configured for all items. This weight
  1930  	// should be non-negative.
  1931  	Weight float64 `json:"weight,omitempty"`
  1932  
  1933  	// ForceSendFields is a list of field names (e.g. "Kind") to
  1934  	// unconditionally include in API requests. By default, fields with
  1935  	// empty or default values are omitted from API requests. However, any
  1936  	// non-pointer, non-interface field appearing in ForceSendFields will be
  1937  	// sent to the server regardless of whether the field is empty or not.
  1938  	// This may be used to include empty fields in Patch requests.
  1939  	ForceSendFields []string `json:"-"`
  1940  
  1941  	// NullFields is a list of field names (e.g. "Kind") to include in API
  1942  	// requests with the JSON null value. By default, fields with empty
  1943  	// values are omitted from API requests. However, any field with an
  1944  	// empty value appearing in NullFields will be sent to the server as
  1945  	// null. It is an error if a field in this list has a non-empty value.
  1946  	// This may be used to include null fields in Patch requests.
  1947  	NullFields []string `json:"-"`
  1948  }
  1949  
  1950  func (s *RRSetRoutingPolicyWrrPolicyWrrPolicyItem) MarshalJSON() ([]byte, error) {
  1951  	type NoMethod RRSetRoutingPolicyWrrPolicyWrrPolicyItem
  1952  	raw := NoMethod(*s)
  1953  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1954  }
  1955  
  1956  func (s *RRSetRoutingPolicyWrrPolicyWrrPolicyItem) UnmarshalJSON(data []byte) error {
  1957  	type NoMethod RRSetRoutingPolicyWrrPolicyWrrPolicyItem
  1958  	var s1 struct {
  1959  		Weight gensupport.JSONFloat64 `json:"weight"`
  1960  		*NoMethod
  1961  	}
  1962  	s1.NoMethod = (*NoMethod)(s)
  1963  	if err := json.Unmarshal(data, &s1); err != nil {
  1964  		return err
  1965  	}
  1966  	s.Weight = float64(s1.Weight)
  1967  	return nil
  1968  }
  1969  
  1970  // ResourceRecordSet: A unit of data that is returned by the DNS
  1971  // servers.
  1972  type ResourceRecordSet struct {
  1973  	Kind string `json:"kind,omitempty"`
  1974  
  1975  	// Name: For example, www.example.com.
  1976  	Name string `json:"name,omitempty"`
  1977  
  1978  	// RoutingPolicy: Configures dynamic query responses based on geo
  1979  	// location of querying user or a weighted round robin based routing
  1980  	// policy. A ResourceRecordSet should only have either rrdata (static)
  1981  	// or routing_policy (dynamic). An error is returned otherwise.
  1982  	RoutingPolicy *RRSetRoutingPolicy `json:"routingPolicy,omitempty"`
  1983  
  1984  	// Rrdatas: As defined in RFC 1035 (section 5) and RFC 1034 (section
  1985  	// 3.6.1) -- see examples.
  1986  	Rrdatas []string `json:"rrdatas,omitempty"`
  1987  
  1988  	// SignatureRrdatas: As defined in RFC 4034 (section 3.2).
  1989  	SignatureRrdatas []string `json:"signatureRrdatas,omitempty"`
  1990  
  1991  	// Ttl: Number of seconds that this ResourceRecordSet can be cached by
  1992  	// resolvers.
  1993  	Ttl int64 `json:"ttl,omitempty"`
  1994  
  1995  	// Type: The identifier of a supported record type. See the list of
  1996  	// Supported DNS record types.
  1997  	Type string `json:"type,omitempty"`
  1998  
  1999  	// ServerResponse contains the HTTP response code and headers from the
  2000  	// server.
  2001  	googleapi.ServerResponse `json:"-"`
  2002  
  2003  	// ForceSendFields is a list of field names (e.g. "Kind") to
  2004  	// unconditionally include in API requests. By default, fields with
  2005  	// empty or default values are omitted from API requests. However, any
  2006  	// non-pointer, non-interface field appearing in ForceSendFields will be
  2007  	// sent to the server regardless of whether the field is empty or not.
  2008  	// This may be used to include empty fields in Patch requests.
  2009  	ForceSendFields []string `json:"-"`
  2010  
  2011  	// NullFields is a list of field names (e.g. "Kind") to include in API
  2012  	// requests with the JSON null value. By default, fields with empty
  2013  	// values are omitted from API requests. However, any field with an
  2014  	// empty value appearing in NullFields will be sent to the server as
  2015  	// null. It is an error if a field in this list has a non-empty value.
  2016  	// This may be used to include null fields in Patch requests.
  2017  	NullFields []string `json:"-"`
  2018  }
  2019  
  2020  func (s *ResourceRecordSet) MarshalJSON() ([]byte, error) {
  2021  	type NoMethod ResourceRecordSet
  2022  	raw := NoMethod(*s)
  2023  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2024  }
  2025  
  2026  type ResourceRecordSetsListResponse struct {
  2027  	Header *ResponseHeader `json:"header,omitempty"`
  2028  
  2029  	// Kind: Type of resource.
  2030  	Kind string `json:"kind,omitempty"`
  2031  
  2032  	// NextPageToken: The presence of this field indicates that there exist
  2033  	// more results following your last page of results in pagination order.
  2034  	// To fetch them, make another list request using this value as your
  2035  	// pagination token. This lets you retrieve complete contents of even
  2036  	// larger collections, one page at a time. However, if the contents of
  2037  	// the collection change between the first and last paginated list
  2038  	// request, the set of elements returned are an inconsistent view of the
  2039  	// collection. You cannot retrieve a consistent snapshot of a collection
  2040  	// larger than the maximum page size.
  2041  	NextPageToken string `json:"nextPageToken,omitempty"`
  2042  
  2043  	// Rrsets: The resource record set resources.
  2044  	Rrsets []*ResourceRecordSet `json:"rrsets,omitempty"`
  2045  
  2046  	// ServerResponse contains the HTTP response code and headers from the
  2047  	// server.
  2048  	googleapi.ServerResponse `json:"-"`
  2049  
  2050  	// ForceSendFields is a list of field names (e.g. "Header") to
  2051  	// unconditionally include in API requests. By default, fields with
  2052  	// empty or default values are omitted from API requests. However, any
  2053  	// non-pointer, non-interface field appearing in ForceSendFields will be
  2054  	// sent to the server regardless of whether the field is empty or not.
  2055  	// This may be used to include empty fields in Patch requests.
  2056  	ForceSendFields []string `json:"-"`
  2057  
  2058  	// NullFields is a list of field names (e.g. "Header") to include in API
  2059  	// requests with the JSON null value. By default, fields with empty
  2060  	// values are omitted from API requests. However, any field with an
  2061  	// empty value appearing in NullFields will be sent to the server as
  2062  	// null. It is an error if a field in this list has a non-empty value.
  2063  	// This may be used to include null fields in Patch requests.
  2064  	NullFields []string `json:"-"`
  2065  }
  2066  
  2067  func (s *ResourceRecordSetsListResponse) MarshalJSON() ([]byte, error) {
  2068  	type NoMethod ResourceRecordSetsListResponse
  2069  	raw := NoMethod(*s)
  2070  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2071  }
  2072  
  2073  // ResponseHeader: Elements common to every response.
  2074  type ResponseHeader struct {
  2075  	// OperationId: For mutating operation requests that completed
  2076  	// successfully. This is the client_operation_id if the client specified
  2077  	// it, otherwise it is generated by the server (output only).
  2078  	OperationId string `json:"operationId,omitempty"`
  2079  
  2080  	// ForceSendFields is a list of field names (e.g. "OperationId") to
  2081  	// unconditionally include in API requests. By default, fields with
  2082  	// empty or default values are omitted from API requests. However, any
  2083  	// non-pointer, non-interface field appearing in ForceSendFields will be
  2084  	// sent to the server regardless of whether the field is empty or not.
  2085  	// This may be used to include empty fields in Patch requests.
  2086  	ForceSendFields []string `json:"-"`
  2087  
  2088  	// NullFields is a list of field names (e.g. "OperationId") to include
  2089  	// in API requests with the JSON null value. By default, fields with
  2090  	// empty values are omitted from API requests. However, any field with
  2091  	// an empty value appearing in NullFields will be sent to the server as
  2092  	// null. It is an error if a field in this list has a non-empty value.
  2093  	// This may be used to include null fields in Patch requests.
  2094  	NullFields []string `json:"-"`
  2095  }
  2096  
  2097  func (s *ResponseHeader) MarshalJSON() ([]byte, error) {
  2098  	type NoMethod ResponseHeader
  2099  	raw := NoMethod(*s)
  2100  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2101  }
  2102  
  2103  type ResponsePoliciesListResponse struct {
  2104  	Header *ResponseHeader `json:"header,omitempty"`
  2105  
  2106  	// NextPageToken: The presence of this field indicates that there exist
  2107  	// more results following your last page of results in pagination order.
  2108  	// To fetch them, make another list request using this value as your
  2109  	// page token. This lets you the complete contents of even very large
  2110  	// collections one page at a time. However, if the contents of the
  2111  	// collection change between the first and last paginated list request,
  2112  	// the set of all elements returned are an inconsistent view of the
  2113  	// collection. You cannot retrieve a consistent snapshot of a collection
  2114  	// larger than the maximum page size.
  2115  	NextPageToken string `json:"nextPageToken,omitempty"`
  2116  
  2117  	// ResponsePolicies: The Response Policy resources.
  2118  	ResponsePolicies []*ResponsePolicy `json:"responsePolicies,omitempty"`
  2119  
  2120  	// ServerResponse contains the HTTP response code and headers from the
  2121  	// server.
  2122  	googleapi.ServerResponse `json:"-"`
  2123  
  2124  	// ForceSendFields is a list of field names (e.g. "Header") to
  2125  	// unconditionally include in API requests. By default, fields with
  2126  	// empty or default values are omitted from API requests. However, any
  2127  	// non-pointer, non-interface field appearing in ForceSendFields will be
  2128  	// sent to the server regardless of whether the field is empty or not.
  2129  	// This may be used to include empty fields in Patch requests.
  2130  	ForceSendFields []string `json:"-"`
  2131  
  2132  	// NullFields is a list of field names (e.g. "Header") to include in API
  2133  	// requests with the JSON null value. By default, fields with empty
  2134  	// values are omitted from API requests. However, any field with an
  2135  	// empty value appearing in NullFields will be sent to the server as
  2136  	// null. It is an error if a field in this list has a non-empty value.
  2137  	// This may be used to include null fields in Patch requests.
  2138  	NullFields []string `json:"-"`
  2139  }
  2140  
  2141  func (s *ResponsePoliciesListResponse) MarshalJSON() ([]byte, error) {
  2142  	type NoMethod ResponsePoliciesListResponse
  2143  	raw := NoMethod(*s)
  2144  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2145  }
  2146  
  2147  type ResponsePoliciesPatchResponse struct {
  2148  	Header *ResponseHeader `json:"header,omitempty"`
  2149  
  2150  	ResponsePolicy *ResponsePolicy `json:"responsePolicy,omitempty"`
  2151  
  2152  	// ServerResponse contains the HTTP response code and headers from the
  2153  	// server.
  2154  	googleapi.ServerResponse `json:"-"`
  2155  
  2156  	// ForceSendFields is a list of field names (e.g. "Header") to
  2157  	// unconditionally include in API requests. By default, fields with
  2158  	// empty or default values are omitted from API requests. However, any
  2159  	// non-pointer, non-interface field appearing in ForceSendFields will be
  2160  	// sent to the server regardless of whether the field is empty or not.
  2161  	// This may be used to include empty fields in Patch requests.
  2162  	ForceSendFields []string `json:"-"`
  2163  
  2164  	// NullFields is a list of field names (e.g. "Header") to include in API
  2165  	// requests with the JSON null value. By default, fields with empty
  2166  	// values are omitted from API requests. However, any field with an
  2167  	// empty value appearing in NullFields will be sent to the server as
  2168  	// null. It is an error if a field in this list has a non-empty value.
  2169  	// This may be used to include null fields in Patch requests.
  2170  	NullFields []string `json:"-"`
  2171  }
  2172  
  2173  func (s *ResponsePoliciesPatchResponse) MarshalJSON() ([]byte, error) {
  2174  	type NoMethod ResponsePoliciesPatchResponse
  2175  	raw := NoMethod(*s)
  2176  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2177  }
  2178  
  2179  type ResponsePoliciesUpdateResponse struct {
  2180  	Header *ResponseHeader `json:"header,omitempty"`
  2181  
  2182  	ResponsePolicy *ResponsePolicy `json:"responsePolicy,omitempty"`
  2183  
  2184  	// ServerResponse contains the HTTP response code and headers from the
  2185  	// server.
  2186  	googleapi.ServerResponse `json:"-"`
  2187  
  2188  	// ForceSendFields is a list of field names (e.g. "Header") to
  2189  	// unconditionally include in API requests. By default, fields with
  2190  	// empty or default values are omitted from API requests. However, any
  2191  	// non-pointer, non-interface field appearing in ForceSendFields will be
  2192  	// sent to the server regardless of whether the field is empty or not.
  2193  	// This may be used to include empty fields in Patch requests.
  2194  	ForceSendFields []string `json:"-"`
  2195  
  2196  	// NullFields is a list of field names (e.g. "Header") to include in API
  2197  	// requests with the JSON null value. By default, fields with empty
  2198  	// values are omitted from API requests. However, any field with an
  2199  	// empty value appearing in NullFields will be sent to the server as
  2200  	// null. It is an error if a field in this list has a non-empty value.
  2201  	// This may be used to include null fields in Patch requests.
  2202  	NullFields []string `json:"-"`
  2203  }
  2204  
  2205  func (s *ResponsePoliciesUpdateResponse) MarshalJSON() ([]byte, error) {
  2206  	type NoMethod ResponsePoliciesUpdateResponse
  2207  	raw := NoMethod(*s)
  2208  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2209  }
  2210  
  2211  // ResponsePolicy: A Response Policy is a collection of selectors that
  2212  // apply to queries made against one or more Virtual Private Cloud
  2213  // networks.
  2214  type ResponsePolicy struct {
  2215  	// Description: User-provided description for this Response Policy.
  2216  	Description string `json:"description,omitempty"`
  2217  
  2218  	// GkeClusters: The list of Google Kubernetes Engine clusters to which
  2219  	// this response policy is applied.
  2220  	GkeClusters []*ResponsePolicyGKECluster `json:"gkeClusters,omitempty"`
  2221  
  2222  	// Id: Unique identifier for the resource; defined by the server (output
  2223  	// only).
  2224  	Id int64 `json:"id,omitempty,string"`
  2225  
  2226  	Kind string `json:"kind,omitempty"`
  2227  
  2228  	// Networks: List of network names specifying networks to which this
  2229  	// policy is applied.
  2230  	Networks []*ResponsePolicyNetwork `json:"networks,omitempty"`
  2231  
  2232  	// ResponsePolicyName: User assigned name for this Response Policy.
  2233  	ResponsePolicyName string `json:"responsePolicyName,omitempty"`
  2234  
  2235  	// ServerResponse contains the HTTP response code and headers from the
  2236  	// server.
  2237  	googleapi.ServerResponse `json:"-"`
  2238  
  2239  	// ForceSendFields is a list of field names (e.g. "Description") to
  2240  	// unconditionally include in API requests. By default, fields with
  2241  	// empty or default values are omitted from API requests. However, any
  2242  	// non-pointer, non-interface field appearing in ForceSendFields will be
  2243  	// sent to the server regardless of whether the field is empty or not.
  2244  	// This may be used to include empty fields in Patch requests.
  2245  	ForceSendFields []string `json:"-"`
  2246  
  2247  	// NullFields is a list of field names (e.g. "Description") to include
  2248  	// in API requests with the JSON null value. By default, fields with
  2249  	// empty values are omitted from API requests. However, any field with
  2250  	// an empty value appearing in NullFields will be sent to the server as
  2251  	// null. It is an error if a field in this list has a non-empty value.
  2252  	// This may be used to include null fields in Patch requests.
  2253  	NullFields []string `json:"-"`
  2254  }
  2255  
  2256  func (s *ResponsePolicy) MarshalJSON() ([]byte, error) {
  2257  	type NoMethod ResponsePolicy
  2258  	raw := NoMethod(*s)
  2259  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2260  }
  2261  
  2262  type ResponsePolicyGKECluster struct {
  2263  	// GkeClusterName: The resource name of the cluster to bind this
  2264  	// response policy to. This should be specified in the format like:
  2265  	// projects/*/locations/*/clusters/*. This is referenced from GKE
  2266  	// projects.locations.clusters.get API:
  2267  	// https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters/get
  2268  	GkeClusterName string `json:"gkeClusterName,omitempty"`
  2269  
  2270  	Kind string `json:"kind,omitempty"`
  2271  
  2272  	// ForceSendFields is a list of field names (e.g. "GkeClusterName") to
  2273  	// unconditionally include in API requests. By default, fields with
  2274  	// empty or default values are omitted from API requests. However, any
  2275  	// non-pointer, non-interface field appearing in ForceSendFields will be
  2276  	// sent to the server regardless of whether the field is empty or not.
  2277  	// This may be used to include empty fields in Patch requests.
  2278  	ForceSendFields []string `json:"-"`
  2279  
  2280  	// NullFields is a list of field names (e.g. "GkeClusterName") to
  2281  	// include in API requests with the JSON null value. By default, fields
  2282  	// with empty values are omitted from API requests. However, any field
  2283  	// with an empty value appearing in NullFields will be sent to the
  2284  	// server as null. It is an error if a field in this list has a
  2285  	// non-empty value. This may be used to include null fields in Patch
  2286  	// requests.
  2287  	NullFields []string `json:"-"`
  2288  }
  2289  
  2290  func (s *ResponsePolicyGKECluster) MarshalJSON() ([]byte, error) {
  2291  	type NoMethod ResponsePolicyGKECluster
  2292  	raw := NoMethod(*s)
  2293  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2294  }
  2295  
  2296  type ResponsePolicyNetwork struct {
  2297  	Kind string `json:"kind,omitempty"`
  2298  
  2299  	// NetworkUrl: The fully qualified URL of the VPC network to bind to.
  2300  	// This should be formatted like
  2301  	// https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}
  2302  	NetworkUrl string `json:"networkUrl,omitempty"`
  2303  
  2304  	// ForceSendFields is a list of field names (e.g. "Kind") to
  2305  	// unconditionally include in API requests. By default, fields with
  2306  	// empty or default values are omitted from API requests. However, any
  2307  	// non-pointer, non-interface field appearing in ForceSendFields will be
  2308  	// sent to the server regardless of whether the field is empty or not.
  2309  	// This may be used to include empty fields in Patch requests.
  2310  	ForceSendFields []string `json:"-"`
  2311  
  2312  	// NullFields is a list of field names (e.g. "Kind") to include in API
  2313  	// requests with the JSON null value. By default, fields with empty
  2314  	// values are omitted from API requests. However, any field with an
  2315  	// empty value appearing in NullFields will be sent to the server as
  2316  	// null. It is an error if a field in this list has a non-empty value.
  2317  	// This may be used to include null fields in Patch requests.
  2318  	NullFields []string `json:"-"`
  2319  }
  2320  
  2321  func (s *ResponsePolicyNetwork) MarshalJSON() ([]byte, error) {
  2322  	type NoMethod ResponsePolicyNetwork
  2323  	raw := NoMethod(*s)
  2324  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2325  }
  2326  
  2327  // ResponsePolicyRule: A Response Policy Rule is a selector that applies
  2328  // its behavior to queries that match the selector. Selectors are DNS
  2329  // names, which may be wildcards or exact matches. Each DNS query
  2330  // subject to a Response Policy matches at most one ResponsePolicyRule,
  2331  // as identified by the dns_name field with the longest matching suffix.
  2332  type ResponsePolicyRule struct {
  2333  	// Behavior: Answer this query with a behavior rather than DNS data.
  2334  	//
  2335  	// Possible values:
  2336  	//   "BEHAVIOR_UNSPECIFIED"
  2337  	//   "BYPASS_RESPONSE_POLICY" - Skip a less-specific ResponsePolicyRule
  2338  	// and continue normal query logic. This can be used in conjunction with
  2339  	// a wildcard to exempt a subset of the wildcard ResponsePolicyRule from
  2340  	// the ResponsePolicy behavior and e.g., query the public internet
  2341  	// instead. For instance, if these rules exist: *.example.com -> 1.2.3.4
  2342  	// foo.example.com -> PASSTHRU Then a query for 'foo.example.com' skips
  2343  	// the wildcard.
  2344  	Behavior string `json:"behavior,omitempty"`
  2345  
  2346  	// DnsName: The DNS name (wildcard or exact) to apply this rule to. Must
  2347  	// be unique within the Response Policy Rule.
  2348  	DnsName string `json:"dnsName,omitempty"`
  2349  
  2350  	Kind string `json:"kind,omitempty"`
  2351  
  2352  	// LocalData: Answer this query directly with DNS data. These
  2353  	// ResourceRecordSets override any other DNS behavior for the matched
  2354  	// name; in particular they override private zones, the public internet,
  2355  	// and GCP internal DNS. No SOA nor NS types are allowed.
  2356  	LocalData *ResponsePolicyRuleLocalData `json:"localData,omitempty"`
  2357  
  2358  	// RuleName: An identifier for this rule. Must be unique with the
  2359  	// ResponsePolicy.
  2360  	RuleName string `json:"ruleName,omitempty"`
  2361  
  2362  	// ServerResponse contains the HTTP response code and headers from the
  2363  	// server.
  2364  	googleapi.ServerResponse `json:"-"`
  2365  
  2366  	// ForceSendFields is a list of field names (e.g. "Behavior") to
  2367  	// unconditionally include in API requests. By default, fields with
  2368  	// empty or default values are omitted from API requests. However, any
  2369  	// non-pointer, non-interface field appearing in ForceSendFields will be
  2370  	// sent to the server regardless of whether the field is empty or not.
  2371  	// This may be used to include empty fields in Patch requests.
  2372  	ForceSendFields []string `json:"-"`
  2373  
  2374  	// NullFields is a list of field names (e.g. "Behavior") to include in
  2375  	// API requests with the JSON null value. By default, fields with empty
  2376  	// values are omitted from API requests. However, any field with an
  2377  	// empty value appearing in NullFields will be sent to the server as
  2378  	// null. It is an error if a field in this list has a non-empty value.
  2379  	// This may be used to include null fields in Patch requests.
  2380  	NullFields []string `json:"-"`
  2381  }
  2382  
  2383  func (s *ResponsePolicyRule) MarshalJSON() ([]byte, error) {
  2384  	type NoMethod ResponsePolicyRule
  2385  	raw := NoMethod(*s)
  2386  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2387  }
  2388  
  2389  type ResponsePolicyRuleLocalData struct {
  2390  	// LocalDatas: All resource record sets for this selector, one per
  2391  	// resource record type. The name must match the dns_name.
  2392  	LocalDatas []*ResourceRecordSet `json:"localDatas,omitempty"`
  2393  
  2394  	// ForceSendFields is a list of field names (e.g. "LocalDatas") to
  2395  	// unconditionally include in API requests. By default, fields with
  2396  	// empty or default values are omitted from API requests. However, any
  2397  	// non-pointer, non-interface field appearing in ForceSendFields will be
  2398  	// sent to the server regardless of whether the field is empty or not.
  2399  	// This may be used to include empty fields in Patch requests.
  2400  	ForceSendFields []string `json:"-"`
  2401  
  2402  	// NullFields is a list of field names (e.g. "LocalDatas") to include in
  2403  	// API requests with the JSON null value. By default, fields with empty
  2404  	// values are omitted from API requests. However, any field with an
  2405  	// empty value appearing in NullFields will be sent to the server as
  2406  	// null. It is an error if a field in this list has a non-empty value.
  2407  	// This may be used to include null fields in Patch requests.
  2408  	NullFields []string `json:"-"`
  2409  }
  2410  
  2411  func (s *ResponsePolicyRuleLocalData) MarshalJSON() ([]byte, error) {
  2412  	type NoMethod ResponsePolicyRuleLocalData
  2413  	raw := NoMethod(*s)
  2414  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2415  }
  2416  
  2417  type ResponsePolicyRulesListResponse struct {
  2418  	Header *ResponseHeader `json:"header,omitempty"`
  2419  
  2420  	// NextPageToken: The presence of this field indicates that there exist
  2421  	// more results following your last page of results in pagination order.
  2422  	// To fetch them, make another list request using this value as your
  2423  	// page token. This lets you the complete contents of even very large
  2424  	// collections one page at a time. However, if the contents of the
  2425  	// collection change between the first and last paginated list request,
  2426  	// the set of all elements returned are an inconsistent view of the
  2427  	// collection. You cannot retrieve a consistent snapshot of a collection
  2428  	// larger than the maximum page size.
  2429  	NextPageToken string `json:"nextPageToken,omitempty"`
  2430  
  2431  	// ResponsePolicyRules: The Response Policy Rule resources.
  2432  	ResponsePolicyRules []*ResponsePolicyRule `json:"responsePolicyRules,omitempty"`
  2433  
  2434  	// ServerResponse contains the HTTP response code and headers from the
  2435  	// server.
  2436  	googleapi.ServerResponse `json:"-"`
  2437  
  2438  	// ForceSendFields is a list of field names (e.g. "Header") to
  2439  	// unconditionally include in API requests. By default, fields with
  2440  	// empty or default values are omitted from API requests. However, any
  2441  	// non-pointer, non-interface field appearing in ForceSendFields will be
  2442  	// sent to the server regardless of whether the field is empty or not.
  2443  	// This may be used to include empty fields in Patch requests.
  2444  	ForceSendFields []string `json:"-"`
  2445  
  2446  	// NullFields is a list of field names (e.g. "Header") to include in API
  2447  	// requests with the JSON null value. By default, fields with empty
  2448  	// values are omitted from API requests. However, any field with an
  2449  	// empty value appearing in NullFields will be sent to the server as
  2450  	// null. It is an error if a field in this list has a non-empty value.
  2451  	// This may be used to include null fields in Patch requests.
  2452  	NullFields []string `json:"-"`
  2453  }
  2454  
  2455  func (s *ResponsePolicyRulesListResponse) MarshalJSON() ([]byte, error) {
  2456  	type NoMethod ResponsePolicyRulesListResponse
  2457  	raw := NoMethod(*s)
  2458  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2459  }
  2460  
  2461  type ResponsePolicyRulesPatchResponse struct {
  2462  	Header *ResponseHeader `json:"header,omitempty"`
  2463  
  2464  	ResponsePolicyRule *ResponsePolicyRule `json:"responsePolicyRule,omitempty"`
  2465  
  2466  	// ServerResponse contains the HTTP response code and headers from the
  2467  	// server.
  2468  	googleapi.ServerResponse `json:"-"`
  2469  
  2470  	// ForceSendFields is a list of field names (e.g. "Header") to
  2471  	// unconditionally include in API requests. By default, fields with
  2472  	// empty or default values are omitted from API requests. However, any
  2473  	// non-pointer, non-interface field appearing in ForceSendFields will be
  2474  	// sent to the server regardless of whether the field is empty or not.
  2475  	// This may be used to include empty fields in Patch requests.
  2476  	ForceSendFields []string `json:"-"`
  2477  
  2478  	// NullFields is a list of field names (e.g. "Header") to include in API
  2479  	// requests with the JSON null value. By default, fields with empty
  2480  	// values are omitted from API requests. However, any field with an
  2481  	// empty value appearing in NullFields will be sent to the server as
  2482  	// null. It is an error if a field in this list has a non-empty value.
  2483  	// This may be used to include null fields in Patch requests.
  2484  	NullFields []string `json:"-"`
  2485  }
  2486  
  2487  func (s *ResponsePolicyRulesPatchResponse) MarshalJSON() ([]byte, error) {
  2488  	type NoMethod ResponsePolicyRulesPatchResponse
  2489  	raw := NoMethod(*s)
  2490  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2491  }
  2492  
  2493  type ResponsePolicyRulesUpdateResponse struct {
  2494  	Header *ResponseHeader `json:"header,omitempty"`
  2495  
  2496  	ResponsePolicyRule *ResponsePolicyRule `json:"responsePolicyRule,omitempty"`
  2497  
  2498  	// ServerResponse contains the HTTP response code and headers from the
  2499  	// server.
  2500  	googleapi.ServerResponse `json:"-"`
  2501  
  2502  	// ForceSendFields is a list of field names (e.g. "Header") to
  2503  	// unconditionally include in API requests. By default, fields with
  2504  	// empty or default values are omitted from API requests. However, any
  2505  	// non-pointer, non-interface field appearing in ForceSendFields will be
  2506  	// sent to the server regardless of whether the field is empty or not.
  2507  	// This may be used to include empty fields in Patch requests.
  2508  	ForceSendFields []string `json:"-"`
  2509  
  2510  	// NullFields is a list of field names (e.g. "Header") to include in API
  2511  	// requests with the JSON null value. By default, fields with empty
  2512  	// values are omitted from API requests. However, any field with an
  2513  	// empty value appearing in NullFields will be sent to the server as
  2514  	// null. It is an error if a field in this list has a non-empty value.
  2515  	// This may be used to include null fields in Patch requests.
  2516  	NullFields []string `json:"-"`
  2517  }
  2518  
  2519  func (s *ResponsePolicyRulesUpdateResponse) MarshalJSON() ([]byte, error) {
  2520  	type NoMethod ResponsePolicyRulesUpdateResponse
  2521  	raw := NoMethod(*s)
  2522  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2523  }
  2524  
  2525  // method id "dns.changes.create":
  2526  
  2527  type ChangesCreateCall struct {
  2528  	s           *Service
  2529  	project     string
  2530  	location    string
  2531  	managedZone string
  2532  	change      *Change
  2533  	urlParams_  gensupport.URLParams
  2534  	ctx_        context.Context
  2535  	header_     http.Header
  2536  }
  2537  
  2538  // Create: Atomically updates the ResourceRecordSet collection.
  2539  //
  2540  //   - location: .
  2541  //   - managedZone: Identifies the managed zone addressed by this request.
  2542  //     Can be the managed zone name or ID.
  2543  //   - project: Identifies the project addressed by this request.
  2544  func (r *ChangesService) Create(project string, location string, managedZone string, change *Change) *ChangesCreateCall {
  2545  	c := &ChangesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2546  	c.project = project
  2547  	c.location = location
  2548  	c.managedZone = managedZone
  2549  	c.change = change
  2550  	return c
  2551  }
  2552  
  2553  // ClientOperationId sets the optional parameter "clientOperationId":
  2554  // For mutating operation requests only. An optional identifier
  2555  // specified by the client. Must be unique for operation resources in
  2556  // the Operations collection.
  2557  func (c *ChangesCreateCall) ClientOperationId(clientOperationId string) *ChangesCreateCall {
  2558  	c.urlParams_.Set("clientOperationId", clientOperationId)
  2559  	return c
  2560  }
  2561  
  2562  // Fields allows partial responses to be retrieved. See
  2563  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2564  // for more information.
  2565  func (c *ChangesCreateCall) Fields(s ...googleapi.Field) *ChangesCreateCall {
  2566  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2567  	return c
  2568  }
  2569  
  2570  // Context sets the context to be used in this call's Do method. Any
  2571  // pending HTTP request will be aborted if the provided context is
  2572  // canceled.
  2573  func (c *ChangesCreateCall) Context(ctx context.Context) *ChangesCreateCall {
  2574  	c.ctx_ = ctx
  2575  	return c
  2576  }
  2577  
  2578  // Header returns an http.Header that can be modified by the caller to
  2579  // add HTTP headers to the request.
  2580  func (c *ChangesCreateCall) Header() http.Header {
  2581  	if c.header_ == nil {
  2582  		c.header_ = make(http.Header)
  2583  	}
  2584  	return c.header_
  2585  }
  2586  
  2587  func (c *ChangesCreateCall) doRequest(alt string) (*http.Response, error) {
  2588  	reqHeaders := make(http.Header)
  2589  	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
  2590  	for k, v := range c.header_ {
  2591  		reqHeaders[k] = v
  2592  	}
  2593  	reqHeaders.Set("User-Agent", c.s.userAgent())
  2594  	var body io.Reader = nil
  2595  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.change)
  2596  	if err != nil {
  2597  		return nil, err
  2598  	}
  2599  	reqHeaders.Set("Content-Type", "application/json")
  2600  	c.urlParams_.Set("alt", alt)
  2601  	c.urlParams_.Set("prettyPrint", "false")
  2602  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/changes")
  2603  	urls += "?" + c.urlParams_.Encode()
  2604  	req, err := http.NewRequest("POST", urls, body)
  2605  	if err != nil {
  2606  		return nil, err
  2607  	}
  2608  	req.Header = reqHeaders
  2609  	googleapi.Expand(req.URL, map[string]string{
  2610  		"project":     c.project,
  2611  		"location":    c.location,
  2612  		"managedZone": c.managedZone,
  2613  	})
  2614  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2615  }
  2616  
  2617  // Do executes the "dns.changes.create" call.
  2618  // Exactly one of *Change or error will be non-nil. Any non-2xx status
  2619  // code is an error. Response headers are in either
  2620  // *Change.ServerResponse.Header or (if a response was returned at all)
  2621  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  2622  // check whether the returned error was because http.StatusNotModified
  2623  // was returned.
  2624  func (c *ChangesCreateCall) Do(opts ...googleapi.CallOption) (*Change, error) {
  2625  	gensupport.SetOptions(c.urlParams_, opts...)
  2626  	res, err := c.doRequest("json")
  2627  	if res != nil && res.StatusCode == http.StatusNotModified {
  2628  		if res.Body != nil {
  2629  			res.Body.Close()
  2630  		}
  2631  		return nil, &googleapi.Error{
  2632  			Code:   res.StatusCode,
  2633  			Header: res.Header,
  2634  		}
  2635  	}
  2636  	if err != nil {
  2637  		return nil, err
  2638  	}
  2639  	defer googleapi.CloseBody(res)
  2640  	if err := googleapi.CheckResponse(res); err != nil {
  2641  		return nil, err
  2642  	}
  2643  	ret := &Change{
  2644  		ServerResponse: googleapi.ServerResponse{
  2645  			Header:         res.Header,
  2646  			HTTPStatusCode: res.StatusCode,
  2647  		},
  2648  	}
  2649  	target := &ret
  2650  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2651  		return nil, err
  2652  	}
  2653  	return ret, nil
  2654  	// {
  2655  	//   "description": "Atomically updates the ResourceRecordSet collection.",
  2656  	//   "flatPath": "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/changes",
  2657  	//   "httpMethod": "POST",
  2658  	//   "id": "dns.changes.create",
  2659  	//   "parameterOrder": [
  2660  	//     "project",
  2661  	//     "location",
  2662  	//     "managedZone"
  2663  	//   ],
  2664  	//   "parameters": {
  2665  	//     "clientOperationId": {
  2666  	//       "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.",
  2667  	//       "location": "query",
  2668  	//       "type": "string"
  2669  	//     },
  2670  	//     "location": {
  2671  	//       "default": "global",
  2672  	//       "location": "path",
  2673  	//       "required": true,
  2674  	//       "type": "string"
  2675  	//     },
  2676  	//     "managedZone": {
  2677  	//       "description": "Identifies the managed zone addressed by this request. Can be the managed zone name or ID.",
  2678  	//       "location": "path",
  2679  	//       "required": true,
  2680  	//       "type": "string"
  2681  	//     },
  2682  	//     "project": {
  2683  	//       "description": "Identifies the project addressed by this request.",
  2684  	//       "location": "path",
  2685  	//       "required": true,
  2686  	//       "type": "string"
  2687  	//     }
  2688  	//   },
  2689  	//   "path": "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/changes",
  2690  	//   "request": {
  2691  	//     "$ref": "Change"
  2692  	//   },
  2693  	//   "response": {
  2694  	//     "$ref": "Change"
  2695  	//   },
  2696  	//   "scopes": [
  2697  	//     "https://www.googleapis.com/auth/cloud-platform",
  2698  	//     "https://www.googleapis.com/auth/ndev.clouddns.readwrite"
  2699  	//   ]
  2700  	// }
  2701  
  2702  }
  2703  
  2704  // method id "dns.changes.get":
  2705  
  2706  type ChangesGetCall struct {
  2707  	s            *Service
  2708  	project      string
  2709  	location     string
  2710  	managedZone  string
  2711  	changeId     string
  2712  	urlParams_   gensupport.URLParams
  2713  	ifNoneMatch_ string
  2714  	ctx_         context.Context
  2715  	header_      http.Header
  2716  }
  2717  
  2718  // Get: Fetches the representation of an existing Change.
  2719  //
  2720  //   - changeId: The identifier of the requested change, from a previous
  2721  //     ResourceRecordSetsChangeResponse.
  2722  //   - location: .
  2723  //   - managedZone: Identifies the managed zone addressed by this request.
  2724  //     Can be the managed zone name or ID.
  2725  //   - project: Identifies the project addressed by this request.
  2726  func (r *ChangesService) Get(project string, location string, managedZone string, changeId string) *ChangesGetCall {
  2727  	c := &ChangesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2728  	c.project = project
  2729  	c.location = location
  2730  	c.managedZone = managedZone
  2731  	c.changeId = changeId
  2732  	return c
  2733  }
  2734  
  2735  // ClientOperationId sets the optional parameter "clientOperationId":
  2736  // For mutating operation requests only. An optional identifier
  2737  // specified by the client. Must be unique for operation resources in
  2738  // the Operations collection.
  2739  func (c *ChangesGetCall) ClientOperationId(clientOperationId string) *ChangesGetCall {
  2740  	c.urlParams_.Set("clientOperationId", clientOperationId)
  2741  	return c
  2742  }
  2743  
  2744  // Fields allows partial responses to be retrieved. See
  2745  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2746  // for more information.
  2747  func (c *ChangesGetCall) Fields(s ...googleapi.Field) *ChangesGetCall {
  2748  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2749  	return c
  2750  }
  2751  
  2752  // IfNoneMatch sets the optional parameter which makes the operation
  2753  // fail if the object's ETag matches the given value. This is useful for
  2754  // getting updates only after the object has changed since the last
  2755  // request. Use googleapi.IsNotModified to check whether the response
  2756  // error from Do is the result of In-None-Match.
  2757  func (c *ChangesGetCall) IfNoneMatch(entityTag string) *ChangesGetCall {
  2758  	c.ifNoneMatch_ = entityTag
  2759  	return c
  2760  }
  2761  
  2762  // Context sets the context to be used in this call's Do method. Any
  2763  // pending HTTP request will be aborted if the provided context is
  2764  // canceled.
  2765  func (c *ChangesGetCall) Context(ctx context.Context) *ChangesGetCall {
  2766  	c.ctx_ = ctx
  2767  	return c
  2768  }
  2769  
  2770  // Header returns an http.Header that can be modified by the caller to
  2771  // add HTTP headers to the request.
  2772  func (c *ChangesGetCall) Header() http.Header {
  2773  	if c.header_ == nil {
  2774  		c.header_ = make(http.Header)
  2775  	}
  2776  	return c.header_
  2777  }
  2778  
  2779  func (c *ChangesGetCall) doRequest(alt string) (*http.Response, error) {
  2780  	reqHeaders := make(http.Header)
  2781  	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
  2782  	for k, v := range c.header_ {
  2783  		reqHeaders[k] = v
  2784  	}
  2785  	reqHeaders.Set("User-Agent", c.s.userAgent())
  2786  	if c.ifNoneMatch_ != "" {
  2787  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2788  	}
  2789  	var body io.Reader = nil
  2790  	c.urlParams_.Set("alt", alt)
  2791  	c.urlParams_.Set("prettyPrint", "false")
  2792  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/changes/{changeId}")
  2793  	urls += "?" + c.urlParams_.Encode()
  2794  	req, err := http.NewRequest("GET", urls, body)
  2795  	if err != nil {
  2796  		return nil, err
  2797  	}
  2798  	req.Header = reqHeaders
  2799  	googleapi.Expand(req.URL, map[string]string{
  2800  		"project":     c.project,
  2801  		"location":    c.location,
  2802  		"managedZone": c.managedZone,
  2803  		"changeId":    c.changeId,
  2804  	})
  2805  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2806  }
  2807  
  2808  // Do executes the "dns.changes.get" call.
  2809  // Exactly one of *Change or error will be non-nil. Any non-2xx status
  2810  // code is an error. Response headers are in either
  2811  // *Change.ServerResponse.Header or (if a response was returned at all)
  2812  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  2813  // check whether the returned error was because http.StatusNotModified
  2814  // was returned.
  2815  func (c *ChangesGetCall) Do(opts ...googleapi.CallOption) (*Change, error) {
  2816  	gensupport.SetOptions(c.urlParams_, opts...)
  2817  	res, err := c.doRequest("json")
  2818  	if res != nil && res.StatusCode == http.StatusNotModified {
  2819  		if res.Body != nil {
  2820  			res.Body.Close()
  2821  		}
  2822  		return nil, &googleapi.Error{
  2823  			Code:   res.StatusCode,
  2824  			Header: res.Header,
  2825  		}
  2826  	}
  2827  	if err != nil {
  2828  		return nil, err
  2829  	}
  2830  	defer googleapi.CloseBody(res)
  2831  	if err := googleapi.CheckResponse(res); err != nil {
  2832  		return nil, err
  2833  	}
  2834  	ret := &Change{
  2835  		ServerResponse: googleapi.ServerResponse{
  2836  			Header:         res.Header,
  2837  			HTTPStatusCode: res.StatusCode,
  2838  		},
  2839  	}
  2840  	target := &ret
  2841  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2842  		return nil, err
  2843  	}
  2844  	return ret, nil
  2845  	// {
  2846  	//   "description": "Fetches the representation of an existing Change.",
  2847  	//   "flatPath": "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/changes/{changeId}",
  2848  	//   "httpMethod": "GET",
  2849  	//   "id": "dns.changes.get",
  2850  	//   "parameterOrder": [
  2851  	//     "project",
  2852  	//     "location",
  2853  	//     "managedZone",
  2854  	//     "changeId"
  2855  	//   ],
  2856  	//   "parameters": {
  2857  	//     "changeId": {
  2858  	//       "description": "The identifier of the requested change, from a previous ResourceRecordSetsChangeResponse.",
  2859  	//       "location": "path",
  2860  	//       "required": true,
  2861  	//       "type": "string"
  2862  	//     },
  2863  	//     "clientOperationId": {
  2864  	//       "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.",
  2865  	//       "location": "query",
  2866  	//       "type": "string"
  2867  	//     },
  2868  	//     "location": {
  2869  	//       "default": "global",
  2870  	//       "location": "path",
  2871  	//       "required": true,
  2872  	//       "type": "string"
  2873  	//     },
  2874  	//     "managedZone": {
  2875  	//       "description": "Identifies the managed zone addressed by this request. Can be the managed zone name or ID.",
  2876  	//       "location": "path",
  2877  	//       "required": true,
  2878  	//       "type": "string"
  2879  	//     },
  2880  	//     "project": {
  2881  	//       "description": "Identifies the project addressed by this request.",
  2882  	//       "location": "path",
  2883  	//       "required": true,
  2884  	//       "type": "string"
  2885  	//     }
  2886  	//   },
  2887  	//   "path": "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/changes/{changeId}",
  2888  	//   "response": {
  2889  	//     "$ref": "Change"
  2890  	//   },
  2891  	//   "scopes": [
  2892  	//     "https://www.googleapis.com/auth/cloud-platform",
  2893  	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
  2894  	//     "https://www.googleapis.com/auth/ndev.clouddns.readonly",
  2895  	//     "https://www.googleapis.com/auth/ndev.clouddns.readwrite"
  2896  	//   ]
  2897  	// }
  2898  
  2899  }
  2900  
  2901  // method id "dns.changes.list":
  2902  
  2903  type ChangesListCall struct {
  2904  	s            *Service
  2905  	project      string
  2906  	location     string
  2907  	managedZone  string
  2908  	urlParams_   gensupport.URLParams
  2909  	ifNoneMatch_ string
  2910  	ctx_         context.Context
  2911  	header_      http.Header
  2912  }
  2913  
  2914  // List: Enumerates Changes to a ResourceRecordSet collection.
  2915  //
  2916  //   - location: .
  2917  //   - managedZone: Identifies the managed zone addressed by this request.
  2918  //     Can be the managed zone name or ID.
  2919  //   - project: Identifies the project addressed by this request.
  2920  func (r *ChangesService) List(project string, location string, managedZone string) *ChangesListCall {
  2921  	c := &ChangesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2922  	c.project = project
  2923  	c.location = location
  2924  	c.managedZone = managedZone
  2925  	return c
  2926  }
  2927  
  2928  // MaxResults sets the optional parameter "maxResults": Maximum number
  2929  // of results to be returned. If unspecified, the server decides how
  2930  // many results to return.
  2931  func (c *ChangesListCall) MaxResults(maxResults int64) *ChangesListCall {
  2932  	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  2933  	return c
  2934  }
  2935  
  2936  // PageToken sets the optional parameter "pageToken": A tag returned by
  2937  // a previous list request that was truncated. Use this parameter to
  2938  // continue a previous list request.
  2939  func (c *ChangesListCall) PageToken(pageToken string) *ChangesListCall {
  2940  	c.urlParams_.Set("pageToken", pageToken)
  2941  	return c
  2942  }
  2943  
  2944  // SortBy sets the optional parameter "sortBy": Sorting criterion. The
  2945  // only supported value is change sequence.
  2946  //
  2947  // Possible values:
  2948  //
  2949  //	"CHANGE_SEQUENCE" (default)
  2950  func (c *ChangesListCall) SortBy(sortBy string) *ChangesListCall {
  2951  	c.urlParams_.Set("sortBy", sortBy)
  2952  	return c
  2953  }
  2954  
  2955  // SortOrder sets the optional parameter "sortOrder": Sorting order
  2956  // direction: 'ascending' or 'descending'.
  2957  func (c *ChangesListCall) SortOrder(sortOrder string) *ChangesListCall {
  2958  	c.urlParams_.Set("sortOrder", sortOrder)
  2959  	return c
  2960  }
  2961  
  2962  // Fields allows partial responses to be retrieved. See
  2963  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2964  // for more information.
  2965  func (c *ChangesListCall) Fields(s ...googleapi.Field) *ChangesListCall {
  2966  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2967  	return c
  2968  }
  2969  
  2970  // IfNoneMatch sets the optional parameter which makes the operation
  2971  // fail if the object's ETag matches the given value. This is useful for
  2972  // getting updates only after the object has changed since the last
  2973  // request. Use googleapi.IsNotModified to check whether the response
  2974  // error from Do is the result of In-None-Match.
  2975  func (c *ChangesListCall) IfNoneMatch(entityTag string) *ChangesListCall {
  2976  	c.ifNoneMatch_ = entityTag
  2977  	return c
  2978  }
  2979  
  2980  // Context sets the context to be used in this call's Do method. Any
  2981  // pending HTTP request will be aborted if the provided context is
  2982  // canceled.
  2983  func (c *ChangesListCall) Context(ctx context.Context) *ChangesListCall {
  2984  	c.ctx_ = ctx
  2985  	return c
  2986  }
  2987  
  2988  // Header returns an http.Header that can be modified by the caller to
  2989  // add HTTP headers to the request.
  2990  func (c *ChangesListCall) Header() http.Header {
  2991  	if c.header_ == nil {
  2992  		c.header_ = make(http.Header)
  2993  	}
  2994  	return c.header_
  2995  }
  2996  
  2997  func (c *ChangesListCall) doRequest(alt string) (*http.Response, error) {
  2998  	reqHeaders := make(http.Header)
  2999  	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
  3000  	for k, v := range c.header_ {
  3001  		reqHeaders[k] = v
  3002  	}
  3003  	reqHeaders.Set("User-Agent", c.s.userAgent())
  3004  	if c.ifNoneMatch_ != "" {
  3005  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3006  	}
  3007  	var body io.Reader = nil
  3008  	c.urlParams_.Set("alt", alt)
  3009  	c.urlParams_.Set("prettyPrint", "false")
  3010  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/changes")
  3011  	urls += "?" + c.urlParams_.Encode()
  3012  	req, err := http.NewRequest("GET", urls, body)
  3013  	if err != nil {
  3014  		return nil, err
  3015  	}
  3016  	req.Header = reqHeaders
  3017  	googleapi.Expand(req.URL, map[string]string{
  3018  		"project":     c.project,
  3019  		"location":    c.location,
  3020  		"managedZone": c.managedZone,
  3021  	})
  3022  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3023  }
  3024  
  3025  // Do executes the "dns.changes.list" call.
  3026  // Exactly one of *ChangesListResponse or error will be non-nil. Any
  3027  // non-2xx status code is an error. Response headers are in either
  3028  // *ChangesListResponse.ServerResponse.Header or (if a response was
  3029  // returned at all) in error.(*googleapi.Error).Header. Use
  3030  // googleapi.IsNotModified to check whether the returned error was
  3031  // because http.StatusNotModified was returned.
  3032  func (c *ChangesListCall) Do(opts ...googleapi.CallOption) (*ChangesListResponse, error) {
  3033  	gensupport.SetOptions(c.urlParams_, opts...)
  3034  	res, err := c.doRequest("json")
  3035  	if res != nil && res.StatusCode == http.StatusNotModified {
  3036  		if res.Body != nil {
  3037  			res.Body.Close()
  3038  		}
  3039  		return nil, &googleapi.Error{
  3040  			Code:   res.StatusCode,
  3041  			Header: res.Header,
  3042  		}
  3043  	}
  3044  	if err != nil {
  3045  		return nil, err
  3046  	}
  3047  	defer googleapi.CloseBody(res)
  3048  	if err := googleapi.CheckResponse(res); err != nil {
  3049  		return nil, err
  3050  	}
  3051  	ret := &ChangesListResponse{
  3052  		ServerResponse: googleapi.ServerResponse{
  3053  			Header:         res.Header,
  3054  			HTTPStatusCode: res.StatusCode,
  3055  		},
  3056  	}
  3057  	target := &ret
  3058  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3059  		return nil, err
  3060  	}
  3061  	return ret, nil
  3062  	// {
  3063  	//   "description": "Enumerates Changes to a ResourceRecordSet collection.",
  3064  	//   "flatPath": "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/changes",
  3065  	//   "httpMethod": "GET",
  3066  	//   "id": "dns.changes.list",
  3067  	//   "parameterOrder": [
  3068  	//     "project",
  3069  	//     "location",
  3070  	//     "managedZone"
  3071  	//   ],
  3072  	//   "parameters": {
  3073  	//     "location": {
  3074  	//       "default": "global",
  3075  	//       "location": "path",
  3076  	//       "required": true,
  3077  	//       "type": "string"
  3078  	//     },
  3079  	//     "managedZone": {
  3080  	//       "description": "Identifies the managed zone addressed by this request. Can be the managed zone name or ID.",
  3081  	//       "location": "path",
  3082  	//       "required": true,
  3083  	//       "type": "string"
  3084  	//     },
  3085  	//     "maxResults": {
  3086  	//       "description": "Optional. Maximum number of results to be returned. If unspecified, the server decides how many results to return.",
  3087  	//       "format": "int32",
  3088  	//       "location": "query",
  3089  	//       "type": "integer"
  3090  	//     },
  3091  	//     "pageToken": {
  3092  	//       "description": "Optional. A tag returned by a previous list request that was truncated. Use this parameter to continue a previous list request.",
  3093  	//       "location": "query",
  3094  	//       "type": "string"
  3095  	//     },
  3096  	//     "project": {
  3097  	//       "description": "Identifies the project addressed by this request.",
  3098  	//       "location": "path",
  3099  	//       "required": true,
  3100  	//       "type": "string"
  3101  	//     },
  3102  	//     "sortBy": {
  3103  	//       "default": "CHANGE_SEQUENCE",
  3104  	//       "description": "Sorting criterion. The only supported value is change sequence.",
  3105  	//       "enum": [
  3106  	//         "CHANGE_SEQUENCE"
  3107  	//       ],
  3108  	//       "enumDescriptions": [
  3109  	//         ""
  3110  	//       ],
  3111  	//       "location": "query",
  3112  	//       "type": "string"
  3113  	//     },
  3114  	//     "sortOrder": {
  3115  	//       "description": "Sorting order direction: 'ascending' or 'descending'.",
  3116  	//       "location": "query",
  3117  	//       "type": "string"
  3118  	//     }
  3119  	//   },
  3120  	//   "path": "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/changes",
  3121  	//   "response": {
  3122  	//     "$ref": "ChangesListResponse"
  3123  	//   },
  3124  	//   "scopes": [
  3125  	//     "https://www.googleapis.com/auth/cloud-platform",
  3126  	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
  3127  	//     "https://www.googleapis.com/auth/ndev.clouddns.readonly",
  3128  	//     "https://www.googleapis.com/auth/ndev.clouddns.readwrite"
  3129  	//   ]
  3130  	// }
  3131  
  3132  }
  3133  
  3134  // Pages invokes f for each page of results.
  3135  // A non-nil error returned from f will halt the iteration.
  3136  // The provided context supersedes any context provided to the Context method.
  3137  func (c *ChangesListCall) Pages(ctx context.Context, f func(*ChangesListResponse) error) error {
  3138  	c.ctx_ = ctx
  3139  	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  3140  	for {
  3141  		x, err := c.Do()
  3142  		if err != nil {
  3143  			return err
  3144  		}
  3145  		if err := f(x); err != nil {
  3146  			return err
  3147  		}
  3148  		if x.NextPageToken == "" {
  3149  			return nil
  3150  		}
  3151  		c.PageToken(x.NextPageToken)
  3152  	}
  3153  }
  3154  
  3155  // method id "dns.dnsKeys.get":
  3156  
  3157  type DnsKeysGetCall struct {
  3158  	s            *Service
  3159  	project      string
  3160  	location     string
  3161  	managedZone  string
  3162  	dnsKeyId     string
  3163  	urlParams_   gensupport.URLParams
  3164  	ifNoneMatch_ string
  3165  	ctx_         context.Context
  3166  	header_      http.Header
  3167  }
  3168  
  3169  // Get: Fetches the representation of an existing DnsKey.
  3170  //
  3171  //   - dnsKeyId: The identifier of the requested DnsKey.
  3172  //   - location: Specifies the location of the resource. This information
  3173  //     will be used for routing and will be part of the resource name.
  3174  //   - managedZone: Identifies the managed zone addressed by this request.
  3175  //     Can be the managed zone name or ID.
  3176  //   - project: Identifies the project addressed by this request.
  3177  func (r *DnsKeysService) Get(project string, location string, managedZone string, dnsKeyId string) *DnsKeysGetCall {
  3178  	c := &DnsKeysGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3179  	c.project = project
  3180  	c.location = location
  3181  	c.managedZone = managedZone
  3182  	c.dnsKeyId = dnsKeyId
  3183  	return c
  3184  }
  3185  
  3186  // ClientOperationId sets the optional parameter "clientOperationId":
  3187  // For mutating operation requests only. An optional identifier
  3188  // specified by the client. Must be unique for operation resources in
  3189  // the Operations collection.
  3190  func (c *DnsKeysGetCall) ClientOperationId(clientOperationId string) *DnsKeysGetCall {
  3191  	c.urlParams_.Set("clientOperationId", clientOperationId)
  3192  	return c
  3193  }
  3194  
  3195  // DigestType sets the optional parameter "digestType": An optional
  3196  // comma-separated list of digest types to compute and display for key
  3197  // signing keys. If omitted, the recommended digest type is computed and
  3198  // displayed.
  3199  func (c *DnsKeysGetCall) DigestType(digestType string) *DnsKeysGetCall {
  3200  	c.urlParams_.Set("digestType", digestType)
  3201  	return c
  3202  }
  3203  
  3204  // Fields allows partial responses to be retrieved. See
  3205  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3206  // for more information.
  3207  func (c *DnsKeysGetCall) Fields(s ...googleapi.Field) *DnsKeysGetCall {
  3208  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3209  	return c
  3210  }
  3211  
  3212  // IfNoneMatch sets the optional parameter which makes the operation
  3213  // fail if the object's ETag matches the given value. This is useful for
  3214  // getting updates only after the object has changed since the last
  3215  // request. Use googleapi.IsNotModified to check whether the response
  3216  // error from Do is the result of In-None-Match.
  3217  func (c *DnsKeysGetCall) IfNoneMatch(entityTag string) *DnsKeysGetCall {
  3218  	c.ifNoneMatch_ = entityTag
  3219  	return c
  3220  }
  3221  
  3222  // Context sets the context to be used in this call's Do method. Any
  3223  // pending HTTP request will be aborted if the provided context is
  3224  // canceled.
  3225  func (c *DnsKeysGetCall) Context(ctx context.Context) *DnsKeysGetCall {
  3226  	c.ctx_ = ctx
  3227  	return c
  3228  }
  3229  
  3230  // Header returns an http.Header that can be modified by the caller to
  3231  // add HTTP headers to the request.
  3232  func (c *DnsKeysGetCall) Header() http.Header {
  3233  	if c.header_ == nil {
  3234  		c.header_ = make(http.Header)
  3235  	}
  3236  	return c.header_
  3237  }
  3238  
  3239  func (c *DnsKeysGetCall) doRequest(alt string) (*http.Response, error) {
  3240  	reqHeaders := make(http.Header)
  3241  	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
  3242  	for k, v := range c.header_ {
  3243  		reqHeaders[k] = v
  3244  	}
  3245  	reqHeaders.Set("User-Agent", c.s.userAgent())
  3246  	if c.ifNoneMatch_ != "" {
  3247  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3248  	}
  3249  	var body io.Reader = nil
  3250  	c.urlParams_.Set("alt", alt)
  3251  	c.urlParams_.Set("prettyPrint", "false")
  3252  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/dnsKeys/{dnsKeyId}")
  3253  	urls += "?" + c.urlParams_.Encode()
  3254  	req, err := http.NewRequest("GET", urls, body)
  3255  	if err != nil {
  3256  		return nil, err
  3257  	}
  3258  	req.Header = reqHeaders
  3259  	googleapi.Expand(req.URL, map[string]string{
  3260  		"project":     c.project,
  3261  		"location":    c.location,
  3262  		"managedZone": c.managedZone,
  3263  		"dnsKeyId":    c.dnsKeyId,
  3264  	})
  3265  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3266  }
  3267  
  3268  // Do executes the "dns.dnsKeys.get" call.
  3269  // Exactly one of *DnsKey or error will be non-nil. Any non-2xx status
  3270  // code is an error. Response headers are in either
  3271  // *DnsKey.ServerResponse.Header or (if a response was returned at all)
  3272  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  3273  // check whether the returned error was because http.StatusNotModified
  3274  // was returned.
  3275  func (c *DnsKeysGetCall) Do(opts ...googleapi.CallOption) (*DnsKey, error) {
  3276  	gensupport.SetOptions(c.urlParams_, opts...)
  3277  	res, err := c.doRequest("json")
  3278  	if res != nil && res.StatusCode == http.StatusNotModified {
  3279  		if res.Body != nil {
  3280  			res.Body.Close()
  3281  		}
  3282  		return nil, &googleapi.Error{
  3283  			Code:   res.StatusCode,
  3284  			Header: res.Header,
  3285  		}
  3286  	}
  3287  	if err != nil {
  3288  		return nil, err
  3289  	}
  3290  	defer googleapi.CloseBody(res)
  3291  	if err := googleapi.CheckResponse(res); err != nil {
  3292  		return nil, err
  3293  	}
  3294  	ret := &DnsKey{
  3295  		ServerResponse: googleapi.ServerResponse{
  3296  			Header:         res.Header,
  3297  			HTTPStatusCode: res.StatusCode,
  3298  		},
  3299  	}
  3300  	target := &ret
  3301  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3302  		return nil, err
  3303  	}
  3304  	return ret, nil
  3305  	// {
  3306  	//   "description": "Fetches the representation of an existing DnsKey.",
  3307  	//   "flatPath": "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/dnsKeys/{dnsKeyId}",
  3308  	//   "httpMethod": "GET",
  3309  	//   "id": "dns.dnsKeys.get",
  3310  	//   "parameterOrder": [
  3311  	//     "project",
  3312  	//     "location",
  3313  	//     "managedZone",
  3314  	//     "dnsKeyId"
  3315  	//   ],
  3316  	//   "parameters": {
  3317  	//     "clientOperationId": {
  3318  	//       "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.",
  3319  	//       "location": "query",
  3320  	//       "type": "string"
  3321  	//     },
  3322  	//     "digestType": {
  3323  	//       "description": "An optional comma-separated list of digest types to compute and display for key signing keys. If omitted, the recommended digest type is computed and displayed.",
  3324  	//       "location": "query",
  3325  	//       "type": "string"
  3326  	//     },
  3327  	//     "dnsKeyId": {
  3328  	//       "description": "The identifier of the requested DnsKey.",
  3329  	//       "location": "path",
  3330  	//       "required": true,
  3331  	//       "type": "string"
  3332  	//     },
  3333  	//     "location": {
  3334  	//       "default": "global",
  3335  	//       "description": "Specifies the location of the resource. This information will be used for routing and will be part of the resource name.",
  3336  	//       "location": "path",
  3337  	//       "required": true,
  3338  	//       "type": "string"
  3339  	//     },
  3340  	//     "managedZone": {
  3341  	//       "description": "Identifies the managed zone addressed by this request. Can be the managed zone name or ID.",
  3342  	//       "location": "path",
  3343  	//       "required": true,
  3344  	//       "type": "string"
  3345  	//     },
  3346  	//     "project": {
  3347  	//       "description": "Identifies the project addressed by this request.",
  3348  	//       "location": "path",
  3349  	//       "required": true,
  3350  	//       "type": "string"
  3351  	//     }
  3352  	//   },
  3353  	//   "path": "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/dnsKeys/{dnsKeyId}",
  3354  	//   "response": {
  3355  	//     "$ref": "DnsKey"
  3356  	//   },
  3357  	//   "scopes": [
  3358  	//     "https://www.googleapis.com/auth/cloud-platform",
  3359  	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
  3360  	//     "https://www.googleapis.com/auth/ndev.clouddns.readonly",
  3361  	//     "https://www.googleapis.com/auth/ndev.clouddns.readwrite"
  3362  	//   ]
  3363  	// }
  3364  
  3365  }
  3366  
  3367  // method id "dns.dnsKeys.list":
  3368  
  3369  type DnsKeysListCall struct {
  3370  	s            *Service
  3371  	project      string
  3372  	location     string
  3373  	managedZone  string
  3374  	urlParams_   gensupport.URLParams
  3375  	ifNoneMatch_ string
  3376  	ctx_         context.Context
  3377  	header_      http.Header
  3378  }
  3379  
  3380  // List: Enumerates DnsKeys to a ResourceRecordSet collection.
  3381  //
  3382  //   - location: Specifies the location of the resource. This information
  3383  //     will be used for routing and will be part of the resource name.
  3384  //   - managedZone: Identifies the managed zone addressed by this request.
  3385  //     Can be the managed zone name or ID.
  3386  //   - project: Identifies the project addressed by this request.
  3387  func (r *DnsKeysService) List(project string, location string, managedZone string) *DnsKeysListCall {
  3388  	c := &DnsKeysListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3389  	c.project = project
  3390  	c.location = location
  3391  	c.managedZone = managedZone
  3392  	return c
  3393  }
  3394  
  3395  // DigestType sets the optional parameter "digestType": An optional
  3396  // comma-separated list of digest types to compute and display for key
  3397  // signing keys. If omitted, the recommended digest type is computed and
  3398  // displayed.
  3399  func (c *DnsKeysListCall) DigestType(digestType string) *DnsKeysListCall {
  3400  	c.urlParams_.Set("digestType", digestType)
  3401  	return c
  3402  }
  3403  
  3404  // MaxResults sets the optional parameter "maxResults": Maximum number
  3405  // of results to be returned. If unspecified, the server decides how
  3406  // many results to return.
  3407  func (c *DnsKeysListCall) MaxResults(maxResults int64) *DnsKeysListCall {
  3408  	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  3409  	return c
  3410  }
  3411  
  3412  // PageToken sets the optional parameter "pageToken": A tag returned by
  3413  // a previous list request that was truncated. Use this parameter to
  3414  // continue a previous list request.
  3415  func (c *DnsKeysListCall) PageToken(pageToken string) *DnsKeysListCall {
  3416  	c.urlParams_.Set("pageToken", pageToken)
  3417  	return c
  3418  }
  3419  
  3420  // Fields allows partial responses to be retrieved. See
  3421  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3422  // for more information.
  3423  func (c *DnsKeysListCall) Fields(s ...googleapi.Field) *DnsKeysListCall {
  3424  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3425  	return c
  3426  }
  3427  
  3428  // IfNoneMatch sets the optional parameter which makes the operation
  3429  // fail if the object's ETag matches the given value. This is useful for
  3430  // getting updates only after the object has changed since the last
  3431  // request. Use googleapi.IsNotModified to check whether the response
  3432  // error from Do is the result of In-None-Match.
  3433  func (c *DnsKeysListCall) IfNoneMatch(entityTag string) *DnsKeysListCall {
  3434  	c.ifNoneMatch_ = entityTag
  3435  	return c
  3436  }
  3437  
  3438  // Context sets the context to be used in this call's Do method. Any
  3439  // pending HTTP request will be aborted if the provided context is
  3440  // canceled.
  3441  func (c *DnsKeysListCall) Context(ctx context.Context) *DnsKeysListCall {
  3442  	c.ctx_ = ctx
  3443  	return c
  3444  }
  3445  
  3446  // Header returns an http.Header that can be modified by the caller to
  3447  // add HTTP headers to the request.
  3448  func (c *DnsKeysListCall) Header() http.Header {
  3449  	if c.header_ == nil {
  3450  		c.header_ = make(http.Header)
  3451  	}
  3452  	return c.header_
  3453  }
  3454  
  3455  func (c *DnsKeysListCall) doRequest(alt string) (*http.Response, error) {
  3456  	reqHeaders := make(http.Header)
  3457  	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
  3458  	for k, v := range c.header_ {
  3459  		reqHeaders[k] = v
  3460  	}
  3461  	reqHeaders.Set("User-Agent", c.s.userAgent())
  3462  	if c.ifNoneMatch_ != "" {
  3463  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3464  	}
  3465  	var body io.Reader = nil
  3466  	c.urlParams_.Set("alt", alt)
  3467  	c.urlParams_.Set("prettyPrint", "false")
  3468  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/dnsKeys")
  3469  	urls += "?" + c.urlParams_.Encode()
  3470  	req, err := http.NewRequest("GET", urls, body)
  3471  	if err != nil {
  3472  		return nil, err
  3473  	}
  3474  	req.Header = reqHeaders
  3475  	googleapi.Expand(req.URL, map[string]string{
  3476  		"project":     c.project,
  3477  		"location":    c.location,
  3478  		"managedZone": c.managedZone,
  3479  	})
  3480  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3481  }
  3482  
  3483  // Do executes the "dns.dnsKeys.list" call.
  3484  // Exactly one of *DnsKeysListResponse or error will be non-nil. Any
  3485  // non-2xx status code is an error. Response headers are in either
  3486  // *DnsKeysListResponse.ServerResponse.Header or (if a response was
  3487  // returned at all) in error.(*googleapi.Error).Header. Use
  3488  // googleapi.IsNotModified to check whether the returned error was
  3489  // because http.StatusNotModified was returned.
  3490  func (c *DnsKeysListCall) Do(opts ...googleapi.CallOption) (*DnsKeysListResponse, error) {
  3491  	gensupport.SetOptions(c.urlParams_, opts...)
  3492  	res, err := c.doRequest("json")
  3493  	if res != nil && res.StatusCode == http.StatusNotModified {
  3494  		if res.Body != nil {
  3495  			res.Body.Close()
  3496  		}
  3497  		return nil, &googleapi.Error{
  3498  			Code:   res.StatusCode,
  3499  			Header: res.Header,
  3500  		}
  3501  	}
  3502  	if err != nil {
  3503  		return nil, err
  3504  	}
  3505  	defer googleapi.CloseBody(res)
  3506  	if err := googleapi.CheckResponse(res); err != nil {
  3507  		return nil, err
  3508  	}
  3509  	ret := &DnsKeysListResponse{
  3510  		ServerResponse: googleapi.ServerResponse{
  3511  			Header:         res.Header,
  3512  			HTTPStatusCode: res.StatusCode,
  3513  		},
  3514  	}
  3515  	target := &ret
  3516  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3517  		return nil, err
  3518  	}
  3519  	return ret, nil
  3520  	// {
  3521  	//   "description": "Enumerates DnsKeys to a ResourceRecordSet collection.",
  3522  	//   "flatPath": "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/dnsKeys",
  3523  	//   "httpMethod": "GET",
  3524  	//   "id": "dns.dnsKeys.list",
  3525  	//   "parameterOrder": [
  3526  	//     "project",
  3527  	//     "location",
  3528  	//     "managedZone"
  3529  	//   ],
  3530  	//   "parameters": {
  3531  	//     "digestType": {
  3532  	//       "description": "An optional comma-separated list of digest types to compute and display for key signing keys. If omitted, the recommended digest type is computed and displayed.",
  3533  	//       "location": "query",
  3534  	//       "type": "string"
  3535  	//     },
  3536  	//     "location": {
  3537  	//       "default": "global",
  3538  	//       "description": "Specifies the location of the resource. This information will be used for routing and will be part of the resource name.",
  3539  	//       "location": "path",
  3540  	//       "required": true,
  3541  	//       "type": "string"
  3542  	//     },
  3543  	//     "managedZone": {
  3544  	//       "description": "Identifies the managed zone addressed by this request. Can be the managed zone name or ID.",
  3545  	//       "location": "path",
  3546  	//       "required": true,
  3547  	//       "type": "string"
  3548  	//     },
  3549  	//     "maxResults": {
  3550  	//       "description": "Optional. Maximum number of results to be returned. If unspecified, the server decides how many results to return.",
  3551  	//       "format": "int32",
  3552  	//       "location": "query",
  3553  	//       "type": "integer"
  3554  	//     },
  3555  	//     "pageToken": {
  3556  	//       "description": "Optional. A tag returned by a previous list request that was truncated. Use this parameter to continue a previous list request.",
  3557  	//       "location": "query",
  3558  	//       "type": "string"
  3559  	//     },
  3560  	//     "project": {
  3561  	//       "description": "Identifies the project addressed by this request.",
  3562  	//       "location": "path",
  3563  	//       "required": true,
  3564  	//       "type": "string"
  3565  	//     }
  3566  	//   },
  3567  	//   "path": "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/dnsKeys",
  3568  	//   "response": {
  3569  	//     "$ref": "DnsKeysListResponse"
  3570  	//   },
  3571  	//   "scopes": [
  3572  	//     "https://www.googleapis.com/auth/cloud-platform",
  3573  	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
  3574  	//     "https://www.googleapis.com/auth/ndev.clouddns.readonly",
  3575  	//     "https://www.googleapis.com/auth/ndev.clouddns.readwrite"
  3576  	//   ]
  3577  	// }
  3578  
  3579  }
  3580  
  3581  // Pages invokes f for each page of results.
  3582  // A non-nil error returned from f will halt the iteration.
  3583  // The provided context supersedes any context provided to the Context method.
  3584  func (c *DnsKeysListCall) Pages(ctx context.Context, f func(*DnsKeysListResponse) error) error {
  3585  	c.ctx_ = ctx
  3586  	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  3587  	for {
  3588  		x, err := c.Do()
  3589  		if err != nil {
  3590  			return err
  3591  		}
  3592  		if err := f(x); err != nil {
  3593  			return err
  3594  		}
  3595  		if x.NextPageToken == "" {
  3596  			return nil
  3597  		}
  3598  		c.PageToken(x.NextPageToken)
  3599  	}
  3600  }
  3601  
  3602  // method id "dns.managedZoneOperations.get":
  3603  
  3604  type ManagedZoneOperationsGetCall struct {
  3605  	s            *Service
  3606  	project      string
  3607  	location     string
  3608  	managedZone  string
  3609  	operation    string
  3610  	urlParams_   gensupport.URLParams
  3611  	ifNoneMatch_ string
  3612  	ctx_         context.Context
  3613  	header_      http.Header
  3614  }
  3615  
  3616  // Get: Fetches the representation of an existing Operation.
  3617  //
  3618  //   - location: Specifies the location of the resource. This information
  3619  //     will be used for routing and will be part of the resource name.
  3620  //   - managedZone: Identifies the managed zone addressed by this request.
  3621  //   - operation: Identifies the operation addressed by this request (ID
  3622  //     of the operation).
  3623  //   - project: Identifies the project addressed by this request.
  3624  func (r *ManagedZoneOperationsService) Get(project string, location string, managedZone string, operation string) *ManagedZoneOperationsGetCall {
  3625  	c := &ManagedZoneOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3626  	c.project = project
  3627  	c.location = location
  3628  	c.managedZone = managedZone
  3629  	c.operation = operation
  3630  	return c
  3631  }
  3632  
  3633  // ClientOperationId sets the optional parameter "clientOperationId":
  3634  // For mutating operation requests only. An optional identifier
  3635  // specified by the client. Must be unique for operation resources in
  3636  // the Operations collection.
  3637  func (c *ManagedZoneOperationsGetCall) ClientOperationId(clientOperationId string) *ManagedZoneOperationsGetCall {
  3638  	c.urlParams_.Set("clientOperationId", clientOperationId)
  3639  	return c
  3640  }
  3641  
  3642  // Fields allows partial responses to be retrieved. See
  3643  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3644  // for more information.
  3645  func (c *ManagedZoneOperationsGetCall) Fields(s ...googleapi.Field) *ManagedZoneOperationsGetCall {
  3646  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3647  	return c
  3648  }
  3649  
  3650  // IfNoneMatch sets the optional parameter which makes the operation
  3651  // fail if the object's ETag matches the given value. This is useful for
  3652  // getting updates only after the object has changed since the last
  3653  // request. Use googleapi.IsNotModified to check whether the response
  3654  // error from Do is the result of In-None-Match.
  3655  func (c *ManagedZoneOperationsGetCall) IfNoneMatch(entityTag string) *ManagedZoneOperationsGetCall {
  3656  	c.ifNoneMatch_ = entityTag
  3657  	return c
  3658  }
  3659  
  3660  // Context sets the context to be used in this call's Do method. Any
  3661  // pending HTTP request will be aborted if the provided context is
  3662  // canceled.
  3663  func (c *ManagedZoneOperationsGetCall) Context(ctx context.Context) *ManagedZoneOperationsGetCall {
  3664  	c.ctx_ = ctx
  3665  	return c
  3666  }
  3667  
  3668  // Header returns an http.Header that can be modified by the caller to
  3669  // add HTTP headers to the request.
  3670  func (c *ManagedZoneOperationsGetCall) Header() http.Header {
  3671  	if c.header_ == nil {
  3672  		c.header_ = make(http.Header)
  3673  	}
  3674  	return c.header_
  3675  }
  3676  
  3677  func (c *ManagedZoneOperationsGetCall) doRequest(alt string) (*http.Response, error) {
  3678  	reqHeaders := make(http.Header)
  3679  	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
  3680  	for k, v := range c.header_ {
  3681  		reqHeaders[k] = v
  3682  	}
  3683  	reqHeaders.Set("User-Agent", c.s.userAgent())
  3684  	if c.ifNoneMatch_ != "" {
  3685  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3686  	}
  3687  	var body io.Reader = nil
  3688  	c.urlParams_.Set("alt", alt)
  3689  	c.urlParams_.Set("prettyPrint", "false")
  3690  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/operations/{operation}")
  3691  	urls += "?" + c.urlParams_.Encode()
  3692  	req, err := http.NewRequest("GET", urls, body)
  3693  	if err != nil {
  3694  		return nil, err
  3695  	}
  3696  	req.Header = reqHeaders
  3697  	googleapi.Expand(req.URL, map[string]string{
  3698  		"project":     c.project,
  3699  		"location":    c.location,
  3700  		"managedZone": c.managedZone,
  3701  		"operation":   c.operation,
  3702  	})
  3703  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3704  }
  3705  
  3706  // Do executes the "dns.managedZoneOperations.get" call.
  3707  // Exactly one of *Operation or error will be non-nil. Any non-2xx
  3708  // status code is an error. Response headers are in either
  3709  // *Operation.ServerResponse.Header or (if a response was returned at
  3710  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  3711  // to check whether the returned error was because
  3712  // http.StatusNotModified was returned.
  3713  func (c *ManagedZoneOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  3714  	gensupport.SetOptions(c.urlParams_, opts...)
  3715  	res, err := c.doRequest("json")
  3716  	if res != nil && res.StatusCode == http.StatusNotModified {
  3717  		if res.Body != nil {
  3718  			res.Body.Close()
  3719  		}
  3720  		return nil, &googleapi.Error{
  3721  			Code:   res.StatusCode,
  3722  			Header: res.Header,
  3723  		}
  3724  	}
  3725  	if err != nil {
  3726  		return nil, err
  3727  	}
  3728  	defer googleapi.CloseBody(res)
  3729  	if err := googleapi.CheckResponse(res); err != nil {
  3730  		return nil, err
  3731  	}
  3732  	ret := &Operation{
  3733  		ServerResponse: googleapi.ServerResponse{
  3734  			Header:         res.Header,
  3735  			HTTPStatusCode: res.StatusCode,
  3736  		},
  3737  	}
  3738  	target := &ret
  3739  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3740  		return nil, err
  3741  	}
  3742  	return ret, nil
  3743  	// {
  3744  	//   "description": "Fetches the representation of an existing Operation.",
  3745  	//   "flatPath": "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/operations/{operation}",
  3746  	//   "httpMethod": "GET",
  3747  	//   "id": "dns.managedZoneOperations.get",
  3748  	//   "parameterOrder": [
  3749  	//     "project",
  3750  	//     "location",
  3751  	//     "managedZone",
  3752  	//     "operation"
  3753  	//   ],
  3754  	//   "parameters": {
  3755  	//     "clientOperationId": {
  3756  	//       "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.",
  3757  	//       "location": "query",
  3758  	//       "type": "string"
  3759  	//     },
  3760  	//     "location": {
  3761  	//       "default": "global",
  3762  	//       "description": "Specifies the location of the resource. This information will be used for routing and will be part of the resource name.",
  3763  	//       "location": "path",
  3764  	//       "required": true,
  3765  	//       "type": "string"
  3766  	//     },
  3767  	//     "managedZone": {
  3768  	//       "description": "Identifies the managed zone addressed by this request.",
  3769  	//       "location": "path",
  3770  	//       "required": true,
  3771  	//       "type": "string"
  3772  	//     },
  3773  	//     "operation": {
  3774  	//       "description": "Identifies the operation addressed by this request (ID of the operation).",
  3775  	//       "location": "path",
  3776  	//       "required": true,
  3777  	//       "type": "string"
  3778  	//     },
  3779  	//     "project": {
  3780  	//       "description": "Identifies the project addressed by this request.",
  3781  	//       "location": "path",
  3782  	//       "required": true,
  3783  	//       "type": "string"
  3784  	//     }
  3785  	//   },
  3786  	//   "path": "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/operations/{operation}",
  3787  	//   "response": {
  3788  	//     "$ref": "Operation"
  3789  	//   },
  3790  	//   "scopes": [
  3791  	//     "https://www.googleapis.com/auth/cloud-platform",
  3792  	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
  3793  	//     "https://www.googleapis.com/auth/ndev.clouddns.readonly",
  3794  	//     "https://www.googleapis.com/auth/ndev.clouddns.readwrite"
  3795  	//   ]
  3796  	// }
  3797  
  3798  }
  3799  
  3800  // method id "dns.managedZoneOperations.list":
  3801  
  3802  type ManagedZoneOperationsListCall struct {
  3803  	s            *Service
  3804  	project      string
  3805  	location     string
  3806  	managedZone  string
  3807  	urlParams_   gensupport.URLParams
  3808  	ifNoneMatch_ string
  3809  	ctx_         context.Context
  3810  	header_      http.Header
  3811  }
  3812  
  3813  // List: Enumerates Operations for the given ManagedZone.
  3814  //
  3815  //   - location: Specifies the location of the resource. This information
  3816  //     will be used for routing and will be part of the resource name.
  3817  //   - managedZone: Identifies the managed zone addressed by this request.
  3818  //   - project: Identifies the project addressed by this request.
  3819  func (r *ManagedZoneOperationsService) List(project string, location string, managedZone string) *ManagedZoneOperationsListCall {
  3820  	c := &ManagedZoneOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3821  	c.project = project
  3822  	c.location = location
  3823  	c.managedZone = managedZone
  3824  	return c
  3825  }
  3826  
  3827  // MaxResults sets the optional parameter "maxResults": Maximum number
  3828  // of results to be returned. If unspecified, the server decides how
  3829  // many results to return.
  3830  func (c *ManagedZoneOperationsListCall) MaxResults(maxResults int64) *ManagedZoneOperationsListCall {
  3831  	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  3832  	return c
  3833  }
  3834  
  3835  // PageToken sets the optional parameter "pageToken": A tag returned by
  3836  // a previous list request that was truncated. Use this parameter to
  3837  // continue a previous list request.
  3838  func (c *ManagedZoneOperationsListCall) PageToken(pageToken string) *ManagedZoneOperationsListCall {
  3839  	c.urlParams_.Set("pageToken", pageToken)
  3840  	return c
  3841  }
  3842  
  3843  // SortBy sets the optional parameter "sortBy": Sorting criterion. The
  3844  // only supported values are START_TIME and ID.
  3845  //
  3846  // Possible values:
  3847  //
  3848  //	"START_TIME" (default)
  3849  //	"ID"
  3850  func (c *ManagedZoneOperationsListCall) SortBy(sortBy string) *ManagedZoneOperationsListCall {
  3851  	c.urlParams_.Set("sortBy", sortBy)
  3852  	return c
  3853  }
  3854  
  3855  // Fields allows partial responses to be retrieved. See
  3856  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3857  // for more information.
  3858  func (c *ManagedZoneOperationsListCall) Fields(s ...googleapi.Field) *ManagedZoneOperationsListCall {
  3859  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3860  	return c
  3861  }
  3862  
  3863  // IfNoneMatch sets the optional parameter which makes the operation
  3864  // fail if the object's ETag matches the given value. This is useful for
  3865  // getting updates only after the object has changed since the last
  3866  // request. Use googleapi.IsNotModified to check whether the response
  3867  // error from Do is the result of In-None-Match.
  3868  func (c *ManagedZoneOperationsListCall) IfNoneMatch(entityTag string) *ManagedZoneOperationsListCall {
  3869  	c.ifNoneMatch_ = entityTag
  3870  	return c
  3871  }
  3872  
  3873  // Context sets the context to be used in this call's Do method. Any
  3874  // pending HTTP request will be aborted if the provided context is
  3875  // canceled.
  3876  func (c *ManagedZoneOperationsListCall) Context(ctx context.Context) *ManagedZoneOperationsListCall {
  3877  	c.ctx_ = ctx
  3878  	return c
  3879  }
  3880  
  3881  // Header returns an http.Header that can be modified by the caller to
  3882  // add HTTP headers to the request.
  3883  func (c *ManagedZoneOperationsListCall) Header() http.Header {
  3884  	if c.header_ == nil {
  3885  		c.header_ = make(http.Header)
  3886  	}
  3887  	return c.header_
  3888  }
  3889  
  3890  func (c *ManagedZoneOperationsListCall) doRequest(alt string) (*http.Response, error) {
  3891  	reqHeaders := make(http.Header)
  3892  	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
  3893  	for k, v := range c.header_ {
  3894  		reqHeaders[k] = v
  3895  	}
  3896  	reqHeaders.Set("User-Agent", c.s.userAgent())
  3897  	if c.ifNoneMatch_ != "" {
  3898  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3899  	}
  3900  	var body io.Reader = nil
  3901  	c.urlParams_.Set("alt", alt)
  3902  	c.urlParams_.Set("prettyPrint", "false")
  3903  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/operations")
  3904  	urls += "?" + c.urlParams_.Encode()
  3905  	req, err := http.NewRequest("GET", urls, body)
  3906  	if err != nil {
  3907  		return nil, err
  3908  	}
  3909  	req.Header = reqHeaders
  3910  	googleapi.Expand(req.URL, map[string]string{
  3911  		"project":     c.project,
  3912  		"location":    c.location,
  3913  		"managedZone": c.managedZone,
  3914  	})
  3915  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3916  }
  3917  
  3918  // Do executes the "dns.managedZoneOperations.list" call.
  3919  // Exactly one of *ManagedZoneOperationsListResponse or error will be
  3920  // non-nil. Any non-2xx status code is an error. Response headers are in
  3921  // either *ManagedZoneOperationsListResponse.ServerResponse.Header or
  3922  // (if a response was returned at all) in
  3923  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3924  // whether the returned error was because http.StatusNotModified was
  3925  // returned.
  3926  func (c *ManagedZoneOperationsListCall) Do(opts ...googleapi.CallOption) (*ManagedZoneOperationsListResponse, error) {
  3927  	gensupport.SetOptions(c.urlParams_, opts...)
  3928  	res, err := c.doRequest("json")
  3929  	if res != nil && res.StatusCode == http.StatusNotModified {
  3930  		if res.Body != nil {
  3931  			res.Body.Close()
  3932  		}
  3933  		return nil, &googleapi.Error{
  3934  			Code:   res.StatusCode,
  3935  			Header: res.Header,
  3936  		}
  3937  	}
  3938  	if err != nil {
  3939  		return nil, err
  3940  	}
  3941  	defer googleapi.CloseBody(res)
  3942  	if err := googleapi.CheckResponse(res); err != nil {
  3943  		return nil, err
  3944  	}
  3945  	ret := &ManagedZoneOperationsListResponse{
  3946  		ServerResponse: googleapi.ServerResponse{
  3947  			Header:         res.Header,
  3948  			HTTPStatusCode: res.StatusCode,
  3949  		},
  3950  	}
  3951  	target := &ret
  3952  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3953  		return nil, err
  3954  	}
  3955  	return ret, nil
  3956  	// {
  3957  	//   "description": "Enumerates Operations for the given ManagedZone.",
  3958  	//   "flatPath": "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/operations",
  3959  	//   "httpMethod": "GET",
  3960  	//   "id": "dns.managedZoneOperations.list",
  3961  	//   "parameterOrder": [
  3962  	//     "project",
  3963  	//     "location",
  3964  	//     "managedZone"
  3965  	//   ],
  3966  	//   "parameters": {
  3967  	//     "location": {
  3968  	//       "default": "global",
  3969  	//       "description": "Specifies the location of the resource. This information will be used for routing and will be part of the resource name.",
  3970  	//       "location": "path",
  3971  	//       "required": true,
  3972  	//       "type": "string"
  3973  	//     },
  3974  	//     "managedZone": {
  3975  	//       "description": "Identifies the managed zone addressed by this request.",
  3976  	//       "location": "path",
  3977  	//       "required": true,
  3978  	//       "type": "string"
  3979  	//     },
  3980  	//     "maxResults": {
  3981  	//       "description": "Optional. Maximum number of results to be returned. If unspecified, the server decides how many results to return.",
  3982  	//       "format": "int32",
  3983  	//       "location": "query",
  3984  	//       "type": "integer"
  3985  	//     },
  3986  	//     "pageToken": {
  3987  	//       "description": "Optional. A tag returned by a previous list request that was truncated. Use this parameter to continue a previous list request.",
  3988  	//       "location": "query",
  3989  	//       "type": "string"
  3990  	//     },
  3991  	//     "project": {
  3992  	//       "description": "Identifies the project addressed by this request.",
  3993  	//       "location": "path",
  3994  	//       "required": true,
  3995  	//       "type": "string"
  3996  	//     },
  3997  	//     "sortBy": {
  3998  	//       "default": "START_TIME",
  3999  	//       "description": "Sorting criterion. The only supported values are START_TIME and ID.",
  4000  	//       "enum": [
  4001  	//         "START_TIME",
  4002  	//         "ID"
  4003  	//       ],
  4004  	//       "enumDescriptions": [
  4005  	//         "",
  4006  	//         ""
  4007  	//       ],
  4008  	//       "location": "query",
  4009  	//       "type": "string"
  4010  	//     }
  4011  	//   },
  4012  	//   "path": "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/operations",
  4013  	//   "response": {
  4014  	//     "$ref": "ManagedZoneOperationsListResponse"
  4015  	//   },
  4016  	//   "scopes": [
  4017  	//     "https://www.googleapis.com/auth/cloud-platform",
  4018  	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
  4019  	//     "https://www.googleapis.com/auth/ndev.clouddns.readonly",
  4020  	//     "https://www.googleapis.com/auth/ndev.clouddns.readwrite"
  4021  	//   ]
  4022  	// }
  4023  
  4024  }
  4025  
  4026  // Pages invokes f for each page of results.
  4027  // A non-nil error returned from f will halt the iteration.
  4028  // The provided context supersedes any context provided to the Context method.
  4029  func (c *ManagedZoneOperationsListCall) Pages(ctx context.Context, f func(*ManagedZoneOperationsListResponse) error) error {
  4030  	c.ctx_ = ctx
  4031  	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  4032  	for {
  4033  		x, err := c.Do()
  4034  		if err != nil {
  4035  			return err
  4036  		}
  4037  		if err := f(x); err != nil {
  4038  			return err
  4039  		}
  4040  		if x.NextPageToken == "" {
  4041  			return nil
  4042  		}
  4043  		c.PageToken(x.NextPageToken)
  4044  	}
  4045  }
  4046  
  4047  // method id "dns.managedZones.create":
  4048  
  4049  type ManagedZonesCreateCall struct {
  4050  	s           *Service
  4051  	project     string
  4052  	location    string
  4053  	managedzone *ManagedZone
  4054  	urlParams_  gensupport.URLParams
  4055  	ctx_        context.Context
  4056  	header_     http.Header
  4057  }
  4058  
  4059  // Create: Creates a new ManagedZone.
  4060  //
  4061  //   - location: Specifies the location of the resource. This information
  4062  //     will be used for routing and will be part of the resource name.
  4063  //   - project: Identifies the project addressed by this request.
  4064  func (r *ManagedZonesService) Create(project string, location string, managedzone *ManagedZone) *ManagedZonesCreateCall {
  4065  	c := &ManagedZonesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4066  	c.project = project
  4067  	c.location = location
  4068  	c.managedzone = managedzone
  4069  	return c
  4070  }
  4071  
  4072  // ClientOperationId sets the optional parameter "clientOperationId":
  4073  // For mutating operation requests only. An optional identifier
  4074  // specified by the client. Must be unique for operation resources in
  4075  // the Operations collection.
  4076  func (c *ManagedZonesCreateCall) ClientOperationId(clientOperationId string) *ManagedZonesCreateCall {
  4077  	c.urlParams_.Set("clientOperationId", clientOperationId)
  4078  	return c
  4079  }
  4080  
  4081  // Fields allows partial responses to be retrieved. See
  4082  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4083  // for more information.
  4084  func (c *ManagedZonesCreateCall) Fields(s ...googleapi.Field) *ManagedZonesCreateCall {
  4085  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4086  	return c
  4087  }
  4088  
  4089  // Context sets the context to be used in this call's Do method. Any
  4090  // pending HTTP request will be aborted if the provided context is
  4091  // canceled.
  4092  func (c *ManagedZonesCreateCall) Context(ctx context.Context) *ManagedZonesCreateCall {
  4093  	c.ctx_ = ctx
  4094  	return c
  4095  }
  4096  
  4097  // Header returns an http.Header that can be modified by the caller to
  4098  // add HTTP headers to the request.
  4099  func (c *ManagedZonesCreateCall) Header() http.Header {
  4100  	if c.header_ == nil {
  4101  		c.header_ = make(http.Header)
  4102  	}
  4103  	return c.header_
  4104  }
  4105  
  4106  func (c *ManagedZonesCreateCall) doRequest(alt string) (*http.Response, error) {
  4107  	reqHeaders := make(http.Header)
  4108  	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
  4109  	for k, v := range c.header_ {
  4110  		reqHeaders[k] = v
  4111  	}
  4112  	reqHeaders.Set("User-Agent", c.s.userAgent())
  4113  	var body io.Reader = nil
  4114  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.managedzone)
  4115  	if err != nil {
  4116  		return nil, err
  4117  	}
  4118  	reqHeaders.Set("Content-Type", "application/json")
  4119  	c.urlParams_.Set("alt", alt)
  4120  	c.urlParams_.Set("prettyPrint", "false")
  4121  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v2/projects/{project}/locations/{location}/managedZones")
  4122  	urls += "?" + c.urlParams_.Encode()
  4123  	req, err := http.NewRequest("POST", urls, body)
  4124  	if err != nil {
  4125  		return nil, err
  4126  	}
  4127  	req.Header = reqHeaders
  4128  	googleapi.Expand(req.URL, map[string]string{
  4129  		"project":  c.project,
  4130  		"location": c.location,
  4131  	})
  4132  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4133  }
  4134  
  4135  // Do executes the "dns.managedZones.create" call.
  4136  // Exactly one of *ManagedZone or error will be non-nil. Any non-2xx
  4137  // status code is an error. Response headers are in either
  4138  // *ManagedZone.ServerResponse.Header or (if a response was returned at
  4139  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  4140  // to check whether the returned error was because
  4141  // http.StatusNotModified was returned.
  4142  func (c *ManagedZonesCreateCall) Do(opts ...googleapi.CallOption) (*ManagedZone, error) {
  4143  	gensupport.SetOptions(c.urlParams_, opts...)
  4144  	res, err := c.doRequest("json")
  4145  	if res != nil && res.StatusCode == http.StatusNotModified {
  4146  		if res.Body != nil {
  4147  			res.Body.Close()
  4148  		}
  4149  		return nil, &googleapi.Error{
  4150  			Code:   res.StatusCode,
  4151  			Header: res.Header,
  4152  		}
  4153  	}
  4154  	if err != nil {
  4155  		return nil, err
  4156  	}
  4157  	defer googleapi.CloseBody(res)
  4158  	if err := googleapi.CheckResponse(res); err != nil {
  4159  		return nil, err
  4160  	}
  4161  	ret := &ManagedZone{
  4162  		ServerResponse: googleapi.ServerResponse{
  4163  			Header:         res.Header,
  4164  			HTTPStatusCode: res.StatusCode,
  4165  		},
  4166  	}
  4167  	target := &ret
  4168  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4169  		return nil, err
  4170  	}
  4171  	return ret, nil
  4172  	// {
  4173  	//   "description": "Creates a new ManagedZone.",
  4174  	//   "flatPath": "dns/v2/projects/{project}/locations/{location}/managedZones",
  4175  	//   "httpMethod": "POST",
  4176  	//   "id": "dns.managedZones.create",
  4177  	//   "parameterOrder": [
  4178  	//     "project",
  4179  	//     "location"
  4180  	//   ],
  4181  	//   "parameters": {
  4182  	//     "clientOperationId": {
  4183  	//       "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.",
  4184  	//       "location": "query",
  4185  	//       "type": "string"
  4186  	//     },
  4187  	//     "location": {
  4188  	//       "default": "global",
  4189  	//       "description": "Specifies the location of the resource. This information will be used for routing and will be part of the resource name.",
  4190  	//       "location": "path",
  4191  	//       "required": true,
  4192  	//       "type": "string"
  4193  	//     },
  4194  	//     "project": {
  4195  	//       "description": "Identifies the project addressed by this request.",
  4196  	//       "location": "path",
  4197  	//       "required": true,
  4198  	//       "type": "string"
  4199  	//     }
  4200  	//   },
  4201  	//   "path": "dns/v2/projects/{project}/locations/{location}/managedZones",
  4202  	//   "request": {
  4203  	//     "$ref": "ManagedZone"
  4204  	//   },
  4205  	//   "response": {
  4206  	//     "$ref": "ManagedZone"
  4207  	//   },
  4208  	//   "scopes": [
  4209  	//     "https://www.googleapis.com/auth/cloud-platform",
  4210  	//     "https://www.googleapis.com/auth/ndev.clouddns.readwrite"
  4211  	//   ]
  4212  	// }
  4213  
  4214  }
  4215  
  4216  // method id "dns.managedZones.delete":
  4217  
  4218  type ManagedZonesDeleteCall struct {
  4219  	s           *Service
  4220  	project     string
  4221  	location    string
  4222  	managedZone string
  4223  	urlParams_  gensupport.URLParams
  4224  	ctx_        context.Context
  4225  	header_     http.Header
  4226  }
  4227  
  4228  // Delete: Deletes a previously created ManagedZone.
  4229  //
  4230  //   - location: Specifies the location of the resource. This information
  4231  //     will be used for routing and will be part of the resource name.
  4232  //   - managedZone: Identifies the managed zone addressed by this request.
  4233  //     Can be the managed zone name or ID.
  4234  //   - project: Identifies the project addressed by this request.
  4235  func (r *ManagedZonesService) Delete(project string, location string, managedZone string) *ManagedZonesDeleteCall {
  4236  	c := &ManagedZonesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4237  	c.project = project
  4238  	c.location = location
  4239  	c.managedZone = managedZone
  4240  	return c
  4241  }
  4242  
  4243  // ClientOperationId sets the optional parameter "clientOperationId":
  4244  // For mutating operation requests only. An optional identifier
  4245  // specified by the client. Must be unique for operation resources in
  4246  // the Operations collection.
  4247  func (c *ManagedZonesDeleteCall) ClientOperationId(clientOperationId string) *ManagedZonesDeleteCall {
  4248  	c.urlParams_.Set("clientOperationId", clientOperationId)
  4249  	return c
  4250  }
  4251  
  4252  // Fields allows partial responses to be retrieved. See
  4253  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4254  // for more information.
  4255  func (c *ManagedZonesDeleteCall) Fields(s ...googleapi.Field) *ManagedZonesDeleteCall {
  4256  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4257  	return c
  4258  }
  4259  
  4260  // Context sets the context to be used in this call's Do method. Any
  4261  // pending HTTP request will be aborted if the provided context is
  4262  // canceled.
  4263  func (c *ManagedZonesDeleteCall) Context(ctx context.Context) *ManagedZonesDeleteCall {
  4264  	c.ctx_ = ctx
  4265  	return c
  4266  }
  4267  
  4268  // Header returns an http.Header that can be modified by the caller to
  4269  // add HTTP headers to the request.
  4270  func (c *ManagedZonesDeleteCall) Header() http.Header {
  4271  	if c.header_ == nil {
  4272  		c.header_ = make(http.Header)
  4273  	}
  4274  	return c.header_
  4275  }
  4276  
  4277  func (c *ManagedZonesDeleteCall) doRequest(alt string) (*http.Response, error) {
  4278  	reqHeaders := make(http.Header)
  4279  	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
  4280  	for k, v := range c.header_ {
  4281  		reqHeaders[k] = v
  4282  	}
  4283  	reqHeaders.Set("User-Agent", c.s.userAgent())
  4284  	var body io.Reader = nil
  4285  	c.urlParams_.Set("alt", alt)
  4286  	c.urlParams_.Set("prettyPrint", "false")
  4287  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}")
  4288  	urls += "?" + c.urlParams_.Encode()
  4289  	req, err := http.NewRequest("DELETE", urls, body)
  4290  	if err != nil {
  4291  		return nil, err
  4292  	}
  4293  	req.Header = reqHeaders
  4294  	googleapi.Expand(req.URL, map[string]string{
  4295  		"project":     c.project,
  4296  		"location":    c.location,
  4297  		"managedZone": c.managedZone,
  4298  	})
  4299  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4300  }
  4301  
  4302  // Do executes the "dns.managedZones.delete" call.
  4303  func (c *ManagedZonesDeleteCall) Do(opts ...googleapi.CallOption) error {
  4304  	gensupport.SetOptions(c.urlParams_, opts...)
  4305  	res, err := c.doRequest("json")
  4306  	if err != nil {
  4307  		return err
  4308  	}
  4309  	defer googleapi.CloseBody(res)
  4310  	if err := googleapi.CheckResponse(res); err != nil {
  4311  		return err
  4312  	}
  4313  	return nil
  4314  	// {
  4315  	//   "description": "Deletes a previously created ManagedZone.",
  4316  	//   "flatPath": "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}",
  4317  	//   "httpMethod": "DELETE",
  4318  	//   "id": "dns.managedZones.delete",
  4319  	//   "parameterOrder": [
  4320  	//     "project",
  4321  	//     "location",
  4322  	//     "managedZone"
  4323  	//   ],
  4324  	//   "parameters": {
  4325  	//     "clientOperationId": {
  4326  	//       "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.",
  4327  	//       "location": "query",
  4328  	//       "type": "string"
  4329  	//     },
  4330  	//     "location": {
  4331  	//       "default": "global",
  4332  	//       "description": "Specifies the location of the resource. This information will be used for routing and will be part of the resource name.",
  4333  	//       "location": "path",
  4334  	//       "required": true,
  4335  	//       "type": "string"
  4336  	//     },
  4337  	//     "managedZone": {
  4338  	//       "description": "Identifies the managed zone addressed by this request. Can be the managed zone name or ID.",
  4339  	//       "location": "path",
  4340  	//       "required": true,
  4341  	//       "type": "string"
  4342  	//     },
  4343  	//     "project": {
  4344  	//       "description": "Identifies the project addressed by this request.",
  4345  	//       "location": "path",
  4346  	//       "required": true,
  4347  	//       "type": "string"
  4348  	//     }
  4349  	//   },
  4350  	//   "path": "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}",
  4351  	//   "scopes": [
  4352  	//     "https://www.googleapis.com/auth/cloud-platform",
  4353  	//     "https://www.googleapis.com/auth/ndev.clouddns.readwrite"
  4354  	//   ]
  4355  	// }
  4356  
  4357  }
  4358  
  4359  // method id "dns.managedZones.get":
  4360  
  4361  type ManagedZonesGetCall struct {
  4362  	s            *Service
  4363  	project      string
  4364  	location     string
  4365  	managedZone  string
  4366  	urlParams_   gensupport.URLParams
  4367  	ifNoneMatch_ string
  4368  	ctx_         context.Context
  4369  	header_      http.Header
  4370  }
  4371  
  4372  // Get: Fetches the representation of an existing ManagedZone.
  4373  //
  4374  //   - location: Specifies the location of the resource. This information
  4375  //     will be used for routing and will be part of the resource name.
  4376  //   - managedZone: Identifies the managed zone addressed by this request.
  4377  //     Can be the managed zone name or ID.
  4378  //   - project: Identifies the project addressed by this request.
  4379  func (r *ManagedZonesService) Get(project string, location string, managedZone string) *ManagedZonesGetCall {
  4380  	c := &ManagedZonesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4381  	c.project = project
  4382  	c.location = location
  4383  	c.managedZone = managedZone
  4384  	return c
  4385  }
  4386  
  4387  // ClientOperationId sets the optional parameter "clientOperationId":
  4388  // For mutating operation requests only. An optional identifier
  4389  // specified by the client. Must be unique for operation resources in
  4390  // the Operations collection.
  4391  func (c *ManagedZonesGetCall) ClientOperationId(clientOperationId string) *ManagedZonesGetCall {
  4392  	c.urlParams_.Set("clientOperationId", clientOperationId)
  4393  	return c
  4394  }
  4395  
  4396  // Fields allows partial responses to be retrieved. See
  4397  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4398  // for more information.
  4399  func (c *ManagedZonesGetCall) Fields(s ...googleapi.Field) *ManagedZonesGetCall {
  4400  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4401  	return c
  4402  }
  4403  
  4404  // IfNoneMatch sets the optional parameter which makes the operation
  4405  // fail if the object's ETag matches the given value. This is useful for
  4406  // getting updates only after the object has changed since the last
  4407  // request. Use googleapi.IsNotModified to check whether the response
  4408  // error from Do is the result of In-None-Match.
  4409  func (c *ManagedZonesGetCall) IfNoneMatch(entityTag string) *ManagedZonesGetCall {
  4410  	c.ifNoneMatch_ = entityTag
  4411  	return c
  4412  }
  4413  
  4414  // Context sets the context to be used in this call's Do method. Any
  4415  // pending HTTP request will be aborted if the provided context is
  4416  // canceled.
  4417  func (c *ManagedZonesGetCall) Context(ctx context.Context) *ManagedZonesGetCall {
  4418  	c.ctx_ = ctx
  4419  	return c
  4420  }
  4421  
  4422  // Header returns an http.Header that can be modified by the caller to
  4423  // add HTTP headers to the request.
  4424  func (c *ManagedZonesGetCall) Header() http.Header {
  4425  	if c.header_ == nil {
  4426  		c.header_ = make(http.Header)
  4427  	}
  4428  	return c.header_
  4429  }
  4430  
  4431  func (c *ManagedZonesGetCall) doRequest(alt string) (*http.Response, error) {
  4432  	reqHeaders := make(http.Header)
  4433  	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
  4434  	for k, v := range c.header_ {
  4435  		reqHeaders[k] = v
  4436  	}
  4437  	reqHeaders.Set("User-Agent", c.s.userAgent())
  4438  	if c.ifNoneMatch_ != "" {
  4439  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4440  	}
  4441  	var body io.Reader = nil
  4442  	c.urlParams_.Set("alt", alt)
  4443  	c.urlParams_.Set("prettyPrint", "false")
  4444  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}")
  4445  	urls += "?" + c.urlParams_.Encode()
  4446  	req, err := http.NewRequest("GET", urls, body)
  4447  	if err != nil {
  4448  		return nil, err
  4449  	}
  4450  	req.Header = reqHeaders
  4451  	googleapi.Expand(req.URL, map[string]string{
  4452  		"project":     c.project,
  4453  		"location":    c.location,
  4454  		"managedZone": c.managedZone,
  4455  	})
  4456  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4457  }
  4458  
  4459  // Do executes the "dns.managedZones.get" call.
  4460  // Exactly one of *ManagedZone or error will be non-nil. Any non-2xx
  4461  // status code is an error. Response headers are in either
  4462  // *ManagedZone.ServerResponse.Header or (if a response was returned at
  4463  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  4464  // to check whether the returned error was because
  4465  // http.StatusNotModified was returned.
  4466  func (c *ManagedZonesGetCall) Do(opts ...googleapi.CallOption) (*ManagedZone, error) {
  4467  	gensupport.SetOptions(c.urlParams_, opts...)
  4468  	res, err := c.doRequest("json")
  4469  	if res != nil && res.StatusCode == http.StatusNotModified {
  4470  		if res.Body != nil {
  4471  			res.Body.Close()
  4472  		}
  4473  		return nil, &googleapi.Error{
  4474  			Code:   res.StatusCode,
  4475  			Header: res.Header,
  4476  		}
  4477  	}
  4478  	if err != nil {
  4479  		return nil, err
  4480  	}
  4481  	defer googleapi.CloseBody(res)
  4482  	if err := googleapi.CheckResponse(res); err != nil {
  4483  		return nil, err
  4484  	}
  4485  	ret := &ManagedZone{
  4486  		ServerResponse: googleapi.ServerResponse{
  4487  			Header:         res.Header,
  4488  			HTTPStatusCode: res.StatusCode,
  4489  		},
  4490  	}
  4491  	target := &ret
  4492  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4493  		return nil, err
  4494  	}
  4495  	return ret, nil
  4496  	// {
  4497  	//   "description": "Fetches the representation of an existing ManagedZone.",
  4498  	//   "flatPath": "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}",
  4499  	//   "httpMethod": "GET",
  4500  	//   "id": "dns.managedZones.get",
  4501  	//   "parameterOrder": [
  4502  	//     "project",
  4503  	//     "location",
  4504  	//     "managedZone"
  4505  	//   ],
  4506  	//   "parameters": {
  4507  	//     "clientOperationId": {
  4508  	//       "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.",
  4509  	//       "location": "query",
  4510  	//       "type": "string"
  4511  	//     },
  4512  	//     "location": {
  4513  	//       "default": "global",
  4514  	//       "description": "Specifies the location of the resource. This information will be used for routing and will be part of the resource name.",
  4515  	//       "location": "path",
  4516  	//       "required": true,
  4517  	//       "type": "string"
  4518  	//     },
  4519  	//     "managedZone": {
  4520  	//       "description": "Identifies the managed zone addressed by this request. Can be the managed zone name or ID.",
  4521  	//       "location": "path",
  4522  	//       "required": true,
  4523  	//       "type": "string"
  4524  	//     },
  4525  	//     "project": {
  4526  	//       "description": "Identifies the project addressed by this request.",
  4527  	//       "location": "path",
  4528  	//       "required": true,
  4529  	//       "type": "string"
  4530  	//     }
  4531  	//   },
  4532  	//   "path": "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}",
  4533  	//   "response": {
  4534  	//     "$ref": "ManagedZone"
  4535  	//   },
  4536  	//   "scopes": [
  4537  	//     "https://www.googleapis.com/auth/cloud-platform",
  4538  	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
  4539  	//     "https://www.googleapis.com/auth/ndev.clouddns.readonly",
  4540  	//     "https://www.googleapis.com/auth/ndev.clouddns.readwrite"
  4541  	//   ]
  4542  	// }
  4543  
  4544  }
  4545  
  4546  // method id "dns.managedZones.list":
  4547  
  4548  type ManagedZonesListCall struct {
  4549  	s            *Service
  4550  	project      string
  4551  	location     string
  4552  	urlParams_   gensupport.URLParams
  4553  	ifNoneMatch_ string
  4554  	ctx_         context.Context
  4555  	header_      http.Header
  4556  }
  4557  
  4558  // List: Enumerates ManagedZones that have been created but not yet
  4559  // deleted.
  4560  //
  4561  //   - location: Specifies the location of the resource. This information
  4562  //     will be used for routing and will be part of the resource name.
  4563  //   - project: Identifies the project addressed by this request.
  4564  func (r *ManagedZonesService) List(project string, location string) *ManagedZonesListCall {
  4565  	c := &ManagedZonesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4566  	c.project = project
  4567  	c.location = location
  4568  	return c
  4569  }
  4570  
  4571  // DnsName sets the optional parameter "dnsName": Restricts the list to
  4572  // return only zones with this domain name.
  4573  func (c *ManagedZonesListCall) DnsName(dnsName string) *ManagedZonesListCall {
  4574  	c.urlParams_.Set("dnsName", dnsName)
  4575  	return c
  4576  }
  4577  
  4578  // MaxResults sets the optional parameter "maxResults": Maximum number
  4579  // of results to be returned. If unspecified, the server decides how
  4580  // many results to return.
  4581  func (c *ManagedZonesListCall) MaxResults(maxResults int64) *ManagedZonesListCall {
  4582  	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  4583  	return c
  4584  }
  4585  
  4586  // PageToken sets the optional parameter "pageToken": A tag returned by
  4587  // a previous list request that was truncated. Use this parameter to
  4588  // continue a previous list request.
  4589  func (c *ManagedZonesListCall) PageToken(pageToken string) *ManagedZonesListCall {
  4590  	c.urlParams_.Set("pageToken", pageToken)
  4591  	return c
  4592  }
  4593  
  4594  // Fields allows partial responses to be retrieved. See
  4595  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4596  // for more information.
  4597  func (c *ManagedZonesListCall) Fields(s ...googleapi.Field) *ManagedZonesListCall {
  4598  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4599  	return c
  4600  }
  4601  
  4602  // IfNoneMatch sets the optional parameter which makes the operation
  4603  // fail if the object's ETag matches the given value. This is useful for
  4604  // getting updates only after the object has changed since the last
  4605  // request. Use googleapi.IsNotModified to check whether the response
  4606  // error from Do is the result of In-None-Match.
  4607  func (c *ManagedZonesListCall) IfNoneMatch(entityTag string) *ManagedZonesListCall {
  4608  	c.ifNoneMatch_ = entityTag
  4609  	return c
  4610  }
  4611  
  4612  // Context sets the context to be used in this call's Do method. Any
  4613  // pending HTTP request will be aborted if the provided context is
  4614  // canceled.
  4615  func (c *ManagedZonesListCall) Context(ctx context.Context) *ManagedZonesListCall {
  4616  	c.ctx_ = ctx
  4617  	return c
  4618  }
  4619  
  4620  // Header returns an http.Header that can be modified by the caller to
  4621  // add HTTP headers to the request.
  4622  func (c *ManagedZonesListCall) Header() http.Header {
  4623  	if c.header_ == nil {
  4624  		c.header_ = make(http.Header)
  4625  	}
  4626  	return c.header_
  4627  }
  4628  
  4629  func (c *ManagedZonesListCall) doRequest(alt string) (*http.Response, error) {
  4630  	reqHeaders := make(http.Header)
  4631  	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
  4632  	for k, v := range c.header_ {
  4633  		reqHeaders[k] = v
  4634  	}
  4635  	reqHeaders.Set("User-Agent", c.s.userAgent())
  4636  	if c.ifNoneMatch_ != "" {
  4637  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4638  	}
  4639  	var body io.Reader = nil
  4640  	c.urlParams_.Set("alt", alt)
  4641  	c.urlParams_.Set("prettyPrint", "false")
  4642  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v2/projects/{project}/locations/{location}/managedZones")
  4643  	urls += "?" + c.urlParams_.Encode()
  4644  	req, err := http.NewRequest("GET", urls, body)
  4645  	if err != nil {
  4646  		return nil, err
  4647  	}
  4648  	req.Header = reqHeaders
  4649  	googleapi.Expand(req.URL, map[string]string{
  4650  		"project":  c.project,
  4651  		"location": c.location,
  4652  	})
  4653  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4654  }
  4655  
  4656  // Do executes the "dns.managedZones.list" call.
  4657  // Exactly one of *ManagedZonesListResponse or error will be non-nil.
  4658  // Any non-2xx status code is an error. Response headers are in either
  4659  // *ManagedZonesListResponse.ServerResponse.Header or (if a response was
  4660  // returned at all) in error.(*googleapi.Error).Header. Use
  4661  // googleapi.IsNotModified to check whether the returned error was
  4662  // because http.StatusNotModified was returned.
  4663  func (c *ManagedZonesListCall) Do(opts ...googleapi.CallOption) (*ManagedZonesListResponse, error) {
  4664  	gensupport.SetOptions(c.urlParams_, opts...)
  4665  	res, err := c.doRequest("json")
  4666  	if res != nil && res.StatusCode == http.StatusNotModified {
  4667  		if res.Body != nil {
  4668  			res.Body.Close()
  4669  		}
  4670  		return nil, &googleapi.Error{
  4671  			Code:   res.StatusCode,
  4672  			Header: res.Header,
  4673  		}
  4674  	}
  4675  	if err != nil {
  4676  		return nil, err
  4677  	}
  4678  	defer googleapi.CloseBody(res)
  4679  	if err := googleapi.CheckResponse(res); err != nil {
  4680  		return nil, err
  4681  	}
  4682  	ret := &ManagedZonesListResponse{
  4683  		ServerResponse: googleapi.ServerResponse{
  4684  			Header:         res.Header,
  4685  			HTTPStatusCode: res.StatusCode,
  4686  		},
  4687  	}
  4688  	target := &ret
  4689  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4690  		return nil, err
  4691  	}
  4692  	return ret, nil
  4693  	// {
  4694  	//   "description": "Enumerates ManagedZones that have been created but not yet deleted.",
  4695  	//   "flatPath": "dns/v2/projects/{project}/locations/{location}/managedZones",
  4696  	//   "httpMethod": "GET",
  4697  	//   "id": "dns.managedZones.list",
  4698  	//   "parameterOrder": [
  4699  	//     "project",
  4700  	//     "location"
  4701  	//   ],
  4702  	//   "parameters": {
  4703  	//     "dnsName": {
  4704  	//       "description": "Restricts the list to return only zones with this domain name.",
  4705  	//       "location": "query",
  4706  	//       "type": "string"
  4707  	//     },
  4708  	//     "location": {
  4709  	//       "default": "global",
  4710  	//       "description": "Specifies the location of the resource. This information will be used for routing and will be part of the resource name.",
  4711  	//       "location": "path",
  4712  	//       "required": true,
  4713  	//       "type": "string"
  4714  	//     },
  4715  	//     "maxResults": {
  4716  	//       "description": "Optional. Maximum number of results to be returned. If unspecified, the server decides how many results to return.",
  4717  	//       "format": "int32",
  4718  	//       "location": "query",
  4719  	//       "type": "integer"
  4720  	//     },
  4721  	//     "pageToken": {
  4722  	//       "description": "Optional. A tag returned by a previous list request that was truncated. Use this parameter to continue a previous list request.",
  4723  	//       "location": "query",
  4724  	//       "type": "string"
  4725  	//     },
  4726  	//     "project": {
  4727  	//       "description": "Identifies the project addressed by this request.",
  4728  	//       "location": "path",
  4729  	//       "required": true,
  4730  	//       "type": "string"
  4731  	//     }
  4732  	//   },
  4733  	//   "path": "dns/v2/projects/{project}/locations/{location}/managedZones",
  4734  	//   "response": {
  4735  	//     "$ref": "ManagedZonesListResponse"
  4736  	//   },
  4737  	//   "scopes": [
  4738  	//     "https://www.googleapis.com/auth/cloud-platform",
  4739  	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
  4740  	//     "https://www.googleapis.com/auth/ndev.clouddns.readonly",
  4741  	//     "https://www.googleapis.com/auth/ndev.clouddns.readwrite"
  4742  	//   ]
  4743  	// }
  4744  
  4745  }
  4746  
  4747  // Pages invokes f for each page of results.
  4748  // A non-nil error returned from f will halt the iteration.
  4749  // The provided context supersedes any context provided to the Context method.
  4750  func (c *ManagedZonesListCall) Pages(ctx context.Context, f func(*ManagedZonesListResponse) error) error {
  4751  	c.ctx_ = ctx
  4752  	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  4753  	for {
  4754  		x, err := c.Do()
  4755  		if err != nil {
  4756  			return err
  4757  		}
  4758  		if err := f(x); err != nil {
  4759  			return err
  4760  		}
  4761  		if x.NextPageToken == "" {
  4762  			return nil
  4763  		}
  4764  		c.PageToken(x.NextPageToken)
  4765  	}
  4766  }
  4767  
  4768  // method id "dns.managedZones.patch":
  4769  
  4770  type ManagedZonesPatchCall struct {
  4771  	s           *Service
  4772  	project     string
  4773  	location    string
  4774  	managedZone string
  4775  	managedzone *ManagedZone
  4776  	urlParams_  gensupport.URLParams
  4777  	ctx_        context.Context
  4778  	header_     http.Header
  4779  }
  4780  
  4781  // Patch: Applies a partial update to an existing ManagedZone.
  4782  //
  4783  //   - location: Specifies the location of the resource. This information
  4784  //     will be used for routing and will be part of the resource name.
  4785  //   - managedZone: Identifies the managed zone addressed by this request.
  4786  //     Can be the managed zone name or ID.
  4787  //   - project: Identifies the project addressed by this request.
  4788  func (r *ManagedZonesService) Patch(project string, location string, managedZone string, managedzone *ManagedZone) *ManagedZonesPatchCall {
  4789  	c := &ManagedZonesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4790  	c.project = project
  4791  	c.location = location
  4792  	c.managedZone = managedZone
  4793  	c.managedzone = managedzone
  4794  	return c
  4795  }
  4796  
  4797  // ClientOperationId sets the optional parameter "clientOperationId":
  4798  // For mutating operation requests only. An optional identifier
  4799  // specified by the client. Must be unique for operation resources in
  4800  // the Operations collection.
  4801  func (c *ManagedZonesPatchCall) ClientOperationId(clientOperationId string) *ManagedZonesPatchCall {
  4802  	c.urlParams_.Set("clientOperationId", clientOperationId)
  4803  	return c
  4804  }
  4805  
  4806  // Fields allows partial responses to be retrieved. See
  4807  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4808  // for more information.
  4809  func (c *ManagedZonesPatchCall) Fields(s ...googleapi.Field) *ManagedZonesPatchCall {
  4810  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4811  	return c
  4812  }
  4813  
  4814  // Context sets the context to be used in this call's Do method. Any
  4815  // pending HTTP request will be aborted if the provided context is
  4816  // canceled.
  4817  func (c *ManagedZonesPatchCall) Context(ctx context.Context) *ManagedZonesPatchCall {
  4818  	c.ctx_ = ctx
  4819  	return c
  4820  }
  4821  
  4822  // Header returns an http.Header that can be modified by the caller to
  4823  // add HTTP headers to the request.
  4824  func (c *ManagedZonesPatchCall) Header() http.Header {
  4825  	if c.header_ == nil {
  4826  		c.header_ = make(http.Header)
  4827  	}
  4828  	return c.header_
  4829  }
  4830  
  4831  func (c *ManagedZonesPatchCall) doRequest(alt string) (*http.Response, error) {
  4832  	reqHeaders := make(http.Header)
  4833  	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
  4834  	for k, v := range c.header_ {
  4835  		reqHeaders[k] = v
  4836  	}
  4837  	reqHeaders.Set("User-Agent", c.s.userAgent())
  4838  	var body io.Reader = nil
  4839  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.managedzone)
  4840  	if err != nil {
  4841  		return nil, err
  4842  	}
  4843  	reqHeaders.Set("Content-Type", "application/json")
  4844  	c.urlParams_.Set("alt", alt)
  4845  	c.urlParams_.Set("prettyPrint", "false")
  4846  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}")
  4847  	urls += "?" + c.urlParams_.Encode()
  4848  	req, err := http.NewRequest("PATCH", urls, body)
  4849  	if err != nil {
  4850  		return nil, err
  4851  	}
  4852  	req.Header = reqHeaders
  4853  	googleapi.Expand(req.URL, map[string]string{
  4854  		"project":     c.project,
  4855  		"location":    c.location,
  4856  		"managedZone": c.managedZone,
  4857  	})
  4858  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4859  }
  4860  
  4861  // Do executes the "dns.managedZones.patch" call.
  4862  // Exactly one of *Operation or error will be non-nil. Any non-2xx
  4863  // status code is an error. Response headers are in either
  4864  // *Operation.ServerResponse.Header or (if a response was returned at
  4865  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  4866  // to check whether the returned error was because
  4867  // http.StatusNotModified was returned.
  4868  func (c *ManagedZonesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  4869  	gensupport.SetOptions(c.urlParams_, opts...)
  4870  	res, err := c.doRequest("json")
  4871  	if res != nil && res.StatusCode == http.StatusNotModified {
  4872  		if res.Body != nil {
  4873  			res.Body.Close()
  4874  		}
  4875  		return nil, &googleapi.Error{
  4876  			Code:   res.StatusCode,
  4877  			Header: res.Header,
  4878  		}
  4879  	}
  4880  	if err != nil {
  4881  		return nil, err
  4882  	}
  4883  	defer googleapi.CloseBody(res)
  4884  	if err := googleapi.CheckResponse(res); err != nil {
  4885  		return nil, err
  4886  	}
  4887  	ret := &Operation{
  4888  		ServerResponse: googleapi.ServerResponse{
  4889  			Header:         res.Header,
  4890  			HTTPStatusCode: res.StatusCode,
  4891  		},
  4892  	}
  4893  	target := &ret
  4894  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4895  		return nil, err
  4896  	}
  4897  	return ret, nil
  4898  	// {
  4899  	//   "description": "Applies a partial update to an existing ManagedZone.",
  4900  	//   "flatPath": "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}",
  4901  	//   "httpMethod": "PATCH",
  4902  	//   "id": "dns.managedZones.patch",
  4903  	//   "parameterOrder": [
  4904  	//     "project",
  4905  	//     "location",
  4906  	//     "managedZone"
  4907  	//   ],
  4908  	//   "parameters": {
  4909  	//     "clientOperationId": {
  4910  	//       "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.",
  4911  	//       "location": "query",
  4912  	//       "type": "string"
  4913  	//     },
  4914  	//     "location": {
  4915  	//       "default": "global",
  4916  	//       "description": "Specifies the location of the resource. This information will be used for routing and will be part of the resource name.",
  4917  	//       "location": "path",
  4918  	//       "required": true,
  4919  	//       "type": "string"
  4920  	//     },
  4921  	//     "managedZone": {
  4922  	//       "description": "Identifies the managed zone addressed by this request. Can be the managed zone name or ID.",
  4923  	//       "location": "path",
  4924  	//       "required": true,
  4925  	//       "type": "string"
  4926  	//     },
  4927  	//     "project": {
  4928  	//       "description": "Identifies the project addressed by this request.",
  4929  	//       "location": "path",
  4930  	//       "required": true,
  4931  	//       "type": "string"
  4932  	//     }
  4933  	//   },
  4934  	//   "path": "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}",
  4935  	//   "request": {
  4936  	//     "$ref": "ManagedZone"
  4937  	//   },
  4938  	//   "response": {
  4939  	//     "$ref": "Operation"
  4940  	//   },
  4941  	//   "scopes": [
  4942  	//     "https://www.googleapis.com/auth/cloud-platform",
  4943  	//     "https://www.googleapis.com/auth/ndev.clouddns.readwrite"
  4944  	//   ]
  4945  	// }
  4946  
  4947  }
  4948  
  4949  // method id "dns.managedZones.update":
  4950  
  4951  type ManagedZonesUpdateCall struct {
  4952  	s           *Service
  4953  	project     string
  4954  	location    string
  4955  	managedZone string
  4956  	managedzone *ManagedZone
  4957  	urlParams_  gensupport.URLParams
  4958  	ctx_        context.Context
  4959  	header_     http.Header
  4960  }
  4961  
  4962  // Update: Updates an existing ManagedZone.
  4963  //
  4964  //   - location: Specifies the location of the resource. This information
  4965  //     will be used for routing and will be part of the resource name.
  4966  //   - managedZone: Identifies the managed zone addressed by this request.
  4967  //     Can be the managed zone name or ID.
  4968  //   - project: Identifies the project addressed by this request.
  4969  func (r *ManagedZonesService) Update(project string, location string, managedZone string, managedzone *ManagedZone) *ManagedZonesUpdateCall {
  4970  	c := &ManagedZonesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4971  	c.project = project
  4972  	c.location = location
  4973  	c.managedZone = managedZone
  4974  	c.managedzone = managedzone
  4975  	return c
  4976  }
  4977  
  4978  // ClientOperationId sets the optional parameter "clientOperationId":
  4979  // For mutating operation requests only. An optional identifier
  4980  // specified by the client. Must be unique for operation resources in
  4981  // the Operations collection.
  4982  func (c *ManagedZonesUpdateCall) ClientOperationId(clientOperationId string) *ManagedZonesUpdateCall {
  4983  	c.urlParams_.Set("clientOperationId", clientOperationId)
  4984  	return c
  4985  }
  4986  
  4987  // Fields allows partial responses to be retrieved. See
  4988  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4989  // for more information.
  4990  func (c *ManagedZonesUpdateCall) Fields(s ...googleapi.Field) *ManagedZonesUpdateCall {
  4991  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4992  	return c
  4993  }
  4994  
  4995  // Context sets the context to be used in this call's Do method. Any
  4996  // pending HTTP request will be aborted if the provided context is
  4997  // canceled.
  4998  func (c *ManagedZonesUpdateCall) Context(ctx context.Context) *ManagedZonesUpdateCall {
  4999  	c.ctx_ = ctx
  5000  	return c
  5001  }
  5002  
  5003  // Header returns an http.Header that can be modified by the caller to
  5004  // add HTTP headers to the request.
  5005  func (c *ManagedZonesUpdateCall) Header() http.Header {
  5006  	if c.header_ == nil {
  5007  		c.header_ = make(http.Header)
  5008  	}
  5009  	return c.header_
  5010  }
  5011  
  5012  func (c *ManagedZonesUpdateCall) doRequest(alt string) (*http.Response, error) {
  5013  	reqHeaders := make(http.Header)
  5014  	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
  5015  	for k, v := range c.header_ {
  5016  		reqHeaders[k] = v
  5017  	}
  5018  	reqHeaders.Set("User-Agent", c.s.userAgent())
  5019  	var body io.Reader = nil
  5020  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.managedzone)
  5021  	if err != nil {
  5022  		return nil, err
  5023  	}
  5024  	reqHeaders.Set("Content-Type", "application/json")
  5025  	c.urlParams_.Set("alt", alt)
  5026  	c.urlParams_.Set("prettyPrint", "false")
  5027  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}")
  5028  	urls += "?" + c.urlParams_.Encode()
  5029  	req, err := http.NewRequest("PUT", urls, body)
  5030  	if err != nil {
  5031  		return nil, err
  5032  	}
  5033  	req.Header = reqHeaders
  5034  	googleapi.Expand(req.URL, map[string]string{
  5035  		"project":     c.project,
  5036  		"location":    c.location,
  5037  		"managedZone": c.managedZone,
  5038  	})
  5039  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5040  }
  5041  
  5042  // Do executes the "dns.managedZones.update" call.
  5043  // Exactly one of *Operation or error will be non-nil. Any non-2xx
  5044  // status code is an error. Response headers are in either
  5045  // *Operation.ServerResponse.Header or (if a response was returned at
  5046  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  5047  // to check whether the returned error was because
  5048  // http.StatusNotModified was returned.
  5049  func (c *ManagedZonesUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  5050  	gensupport.SetOptions(c.urlParams_, opts...)
  5051  	res, err := c.doRequest("json")
  5052  	if res != nil && res.StatusCode == http.StatusNotModified {
  5053  		if res.Body != nil {
  5054  			res.Body.Close()
  5055  		}
  5056  		return nil, &googleapi.Error{
  5057  			Code:   res.StatusCode,
  5058  			Header: res.Header,
  5059  		}
  5060  	}
  5061  	if err != nil {
  5062  		return nil, err
  5063  	}
  5064  	defer googleapi.CloseBody(res)
  5065  	if err := googleapi.CheckResponse(res); err != nil {
  5066  		return nil, err
  5067  	}
  5068  	ret := &Operation{
  5069  		ServerResponse: googleapi.ServerResponse{
  5070  			Header:         res.Header,
  5071  			HTTPStatusCode: res.StatusCode,
  5072  		},
  5073  	}
  5074  	target := &ret
  5075  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5076  		return nil, err
  5077  	}
  5078  	return ret, nil
  5079  	// {
  5080  	//   "description": "Updates an existing ManagedZone.",
  5081  	//   "flatPath": "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}",
  5082  	//   "httpMethod": "PUT",
  5083  	//   "id": "dns.managedZones.update",
  5084  	//   "parameterOrder": [
  5085  	//     "project",
  5086  	//     "location",
  5087  	//     "managedZone"
  5088  	//   ],
  5089  	//   "parameters": {
  5090  	//     "clientOperationId": {
  5091  	//       "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.",
  5092  	//       "location": "query",
  5093  	//       "type": "string"
  5094  	//     },
  5095  	//     "location": {
  5096  	//       "default": "global",
  5097  	//       "description": "Specifies the location of the resource. This information will be used for routing and will be part of the resource name.",
  5098  	//       "location": "path",
  5099  	//       "required": true,
  5100  	//       "type": "string"
  5101  	//     },
  5102  	//     "managedZone": {
  5103  	//       "description": "Identifies the managed zone addressed by this request. Can be the managed zone name or ID.",
  5104  	//       "location": "path",
  5105  	//       "required": true,
  5106  	//       "type": "string"
  5107  	//     },
  5108  	//     "project": {
  5109  	//       "description": "Identifies the project addressed by this request.",
  5110  	//       "location": "path",
  5111  	//       "required": true,
  5112  	//       "type": "string"
  5113  	//     }
  5114  	//   },
  5115  	//   "path": "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}",
  5116  	//   "request": {
  5117  	//     "$ref": "ManagedZone"
  5118  	//   },
  5119  	//   "response": {
  5120  	//     "$ref": "Operation"
  5121  	//   },
  5122  	//   "scopes": [
  5123  	//     "https://www.googleapis.com/auth/cloud-platform",
  5124  	//     "https://www.googleapis.com/auth/ndev.clouddns.readwrite"
  5125  	//   ]
  5126  	// }
  5127  
  5128  }
  5129  
  5130  // method id "dns.policies.create":
  5131  
  5132  type PoliciesCreateCall struct {
  5133  	s          *Service
  5134  	project    string
  5135  	location   string
  5136  	policy     *Policy
  5137  	urlParams_ gensupport.URLParams
  5138  	ctx_       context.Context
  5139  	header_    http.Header
  5140  }
  5141  
  5142  // Create: Creates a new Policy.
  5143  //
  5144  //   - location: Specifies the location of the resource. This information
  5145  //     will be used for routing and will be part of the resource name.
  5146  //   - project: Identifies the project addressed by this request.
  5147  func (r *PoliciesService) Create(project string, location string, policy *Policy) *PoliciesCreateCall {
  5148  	c := &PoliciesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5149  	c.project = project
  5150  	c.location = location
  5151  	c.policy = policy
  5152  	return c
  5153  }
  5154  
  5155  // ClientOperationId sets the optional parameter "clientOperationId":
  5156  // For mutating operation requests only. An optional identifier
  5157  // specified by the client. Must be unique for operation resources in
  5158  // the Operations collection.
  5159  func (c *PoliciesCreateCall) ClientOperationId(clientOperationId string) *PoliciesCreateCall {
  5160  	c.urlParams_.Set("clientOperationId", clientOperationId)
  5161  	return c
  5162  }
  5163  
  5164  // Fields allows partial responses to be retrieved. See
  5165  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5166  // for more information.
  5167  func (c *PoliciesCreateCall) Fields(s ...googleapi.Field) *PoliciesCreateCall {
  5168  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5169  	return c
  5170  }
  5171  
  5172  // Context sets the context to be used in this call's Do method. Any
  5173  // pending HTTP request will be aborted if the provided context is
  5174  // canceled.
  5175  func (c *PoliciesCreateCall) Context(ctx context.Context) *PoliciesCreateCall {
  5176  	c.ctx_ = ctx
  5177  	return c
  5178  }
  5179  
  5180  // Header returns an http.Header that can be modified by the caller to
  5181  // add HTTP headers to the request.
  5182  func (c *PoliciesCreateCall) Header() http.Header {
  5183  	if c.header_ == nil {
  5184  		c.header_ = make(http.Header)
  5185  	}
  5186  	return c.header_
  5187  }
  5188  
  5189  func (c *PoliciesCreateCall) doRequest(alt string) (*http.Response, error) {
  5190  	reqHeaders := make(http.Header)
  5191  	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
  5192  	for k, v := range c.header_ {
  5193  		reqHeaders[k] = v
  5194  	}
  5195  	reqHeaders.Set("User-Agent", c.s.userAgent())
  5196  	var body io.Reader = nil
  5197  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.policy)
  5198  	if err != nil {
  5199  		return nil, err
  5200  	}
  5201  	reqHeaders.Set("Content-Type", "application/json")
  5202  	c.urlParams_.Set("alt", alt)
  5203  	c.urlParams_.Set("prettyPrint", "false")
  5204  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v2/projects/{project}/locations/{location}/policies")
  5205  	urls += "?" + c.urlParams_.Encode()
  5206  	req, err := http.NewRequest("POST", urls, body)
  5207  	if err != nil {
  5208  		return nil, err
  5209  	}
  5210  	req.Header = reqHeaders
  5211  	googleapi.Expand(req.URL, map[string]string{
  5212  		"project":  c.project,
  5213  		"location": c.location,
  5214  	})
  5215  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5216  }
  5217  
  5218  // Do executes the "dns.policies.create" call.
  5219  // Exactly one of *Policy or error will be non-nil. Any non-2xx status
  5220  // code is an error. Response headers are in either
  5221  // *Policy.ServerResponse.Header or (if a response was returned at all)
  5222  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  5223  // check whether the returned error was because http.StatusNotModified
  5224  // was returned.
  5225  func (c *PoliciesCreateCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  5226  	gensupport.SetOptions(c.urlParams_, opts...)
  5227  	res, err := c.doRequest("json")
  5228  	if res != nil && res.StatusCode == http.StatusNotModified {
  5229  		if res.Body != nil {
  5230  			res.Body.Close()
  5231  		}
  5232  		return nil, &googleapi.Error{
  5233  			Code:   res.StatusCode,
  5234  			Header: res.Header,
  5235  		}
  5236  	}
  5237  	if err != nil {
  5238  		return nil, err
  5239  	}
  5240  	defer googleapi.CloseBody(res)
  5241  	if err := googleapi.CheckResponse(res); err != nil {
  5242  		return nil, err
  5243  	}
  5244  	ret := &Policy{
  5245  		ServerResponse: googleapi.ServerResponse{
  5246  			Header:         res.Header,
  5247  			HTTPStatusCode: res.StatusCode,
  5248  		},
  5249  	}
  5250  	target := &ret
  5251  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5252  		return nil, err
  5253  	}
  5254  	return ret, nil
  5255  	// {
  5256  	//   "description": "Creates a new Policy.",
  5257  	//   "flatPath": "dns/v2/projects/{project}/locations/{location}/policies",
  5258  	//   "httpMethod": "POST",
  5259  	//   "id": "dns.policies.create",
  5260  	//   "parameterOrder": [
  5261  	//     "project",
  5262  	//     "location"
  5263  	//   ],
  5264  	//   "parameters": {
  5265  	//     "clientOperationId": {
  5266  	//       "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.",
  5267  	//       "location": "query",
  5268  	//       "type": "string"
  5269  	//     },
  5270  	//     "location": {
  5271  	//       "default": "global",
  5272  	//       "description": "Specifies the location of the resource. This information will be used for routing and will be part of the resource name.",
  5273  	//       "location": "path",
  5274  	//       "required": true,
  5275  	//       "type": "string"
  5276  	//     },
  5277  	//     "project": {
  5278  	//       "description": "Identifies the project addressed by this request.",
  5279  	//       "location": "path",
  5280  	//       "required": true,
  5281  	//       "type": "string"
  5282  	//     }
  5283  	//   },
  5284  	//   "path": "dns/v2/projects/{project}/locations/{location}/policies",
  5285  	//   "request": {
  5286  	//     "$ref": "Policy"
  5287  	//   },
  5288  	//   "response": {
  5289  	//     "$ref": "Policy"
  5290  	//   },
  5291  	//   "scopes": [
  5292  	//     "https://www.googleapis.com/auth/cloud-platform",
  5293  	//     "https://www.googleapis.com/auth/ndev.clouddns.readwrite"
  5294  	//   ]
  5295  	// }
  5296  
  5297  }
  5298  
  5299  // method id "dns.policies.delete":
  5300  
  5301  type PoliciesDeleteCall struct {
  5302  	s          *Service
  5303  	project    string
  5304  	location   string
  5305  	policy     string
  5306  	urlParams_ gensupport.URLParams
  5307  	ctx_       context.Context
  5308  	header_    http.Header
  5309  }
  5310  
  5311  // Delete: Deletes a previously created Policy. Fails if the policy is
  5312  // still being referenced by a network.
  5313  //
  5314  //   - location: Specifies the location of the resource. This information
  5315  //     will be used for routing and will be part of the resource name.
  5316  //   - policy: User given friendly name of the policy addressed by this
  5317  //     request.
  5318  //   - project: Identifies the project addressed by this request.
  5319  func (r *PoliciesService) Delete(project string, location string, policy string) *PoliciesDeleteCall {
  5320  	c := &PoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5321  	c.project = project
  5322  	c.location = location
  5323  	c.policy = policy
  5324  	return c
  5325  }
  5326  
  5327  // ClientOperationId sets the optional parameter "clientOperationId":
  5328  // For mutating operation requests only. An optional identifier
  5329  // specified by the client. Must be unique for operation resources in
  5330  // the Operations collection.
  5331  func (c *PoliciesDeleteCall) ClientOperationId(clientOperationId string) *PoliciesDeleteCall {
  5332  	c.urlParams_.Set("clientOperationId", clientOperationId)
  5333  	return c
  5334  }
  5335  
  5336  // Fields allows partial responses to be retrieved. See
  5337  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5338  // for more information.
  5339  func (c *PoliciesDeleteCall) Fields(s ...googleapi.Field) *PoliciesDeleteCall {
  5340  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5341  	return c
  5342  }
  5343  
  5344  // Context sets the context to be used in this call's Do method. Any
  5345  // pending HTTP request will be aborted if the provided context is
  5346  // canceled.
  5347  func (c *PoliciesDeleteCall) Context(ctx context.Context) *PoliciesDeleteCall {
  5348  	c.ctx_ = ctx
  5349  	return c
  5350  }
  5351  
  5352  // Header returns an http.Header that can be modified by the caller to
  5353  // add HTTP headers to the request.
  5354  func (c *PoliciesDeleteCall) Header() http.Header {
  5355  	if c.header_ == nil {
  5356  		c.header_ = make(http.Header)
  5357  	}
  5358  	return c.header_
  5359  }
  5360  
  5361  func (c *PoliciesDeleteCall) doRequest(alt string) (*http.Response, error) {
  5362  	reqHeaders := make(http.Header)
  5363  	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
  5364  	for k, v := range c.header_ {
  5365  		reqHeaders[k] = v
  5366  	}
  5367  	reqHeaders.Set("User-Agent", c.s.userAgent())
  5368  	var body io.Reader = nil
  5369  	c.urlParams_.Set("alt", alt)
  5370  	c.urlParams_.Set("prettyPrint", "false")
  5371  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v2/projects/{project}/locations/{location}/policies/{policy}")
  5372  	urls += "?" + c.urlParams_.Encode()
  5373  	req, err := http.NewRequest("DELETE", urls, body)
  5374  	if err != nil {
  5375  		return nil, err
  5376  	}
  5377  	req.Header = reqHeaders
  5378  	googleapi.Expand(req.URL, map[string]string{
  5379  		"project":  c.project,
  5380  		"location": c.location,
  5381  		"policy":   c.policy,
  5382  	})
  5383  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5384  }
  5385  
  5386  // Do executes the "dns.policies.delete" call.
  5387  func (c *PoliciesDeleteCall) Do(opts ...googleapi.CallOption) error {
  5388  	gensupport.SetOptions(c.urlParams_, opts...)
  5389  	res, err := c.doRequest("json")
  5390  	if err != nil {
  5391  		return err
  5392  	}
  5393  	defer googleapi.CloseBody(res)
  5394  	if err := googleapi.CheckResponse(res); err != nil {
  5395  		return err
  5396  	}
  5397  	return nil
  5398  	// {
  5399  	//   "description": "Deletes a previously created Policy. Fails if the policy is still being referenced by a network.",
  5400  	//   "flatPath": "dns/v2/projects/{project}/locations/{location}/policies/{policy}",
  5401  	//   "httpMethod": "DELETE",
  5402  	//   "id": "dns.policies.delete",
  5403  	//   "parameterOrder": [
  5404  	//     "project",
  5405  	//     "location",
  5406  	//     "policy"
  5407  	//   ],
  5408  	//   "parameters": {
  5409  	//     "clientOperationId": {
  5410  	//       "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.",
  5411  	//       "location": "query",
  5412  	//       "type": "string"
  5413  	//     },
  5414  	//     "location": {
  5415  	//       "default": "global",
  5416  	//       "description": "Specifies the location of the resource. This information will be used for routing and will be part of the resource name.",
  5417  	//       "location": "path",
  5418  	//       "required": true,
  5419  	//       "type": "string"
  5420  	//     },
  5421  	//     "policy": {
  5422  	//       "description": "User given friendly name of the policy addressed by this request.",
  5423  	//       "location": "path",
  5424  	//       "required": true,
  5425  	//       "type": "string"
  5426  	//     },
  5427  	//     "project": {
  5428  	//       "description": "Identifies the project addressed by this request.",
  5429  	//       "location": "path",
  5430  	//       "required": true,
  5431  	//       "type": "string"
  5432  	//     }
  5433  	//   },
  5434  	//   "path": "dns/v2/projects/{project}/locations/{location}/policies/{policy}",
  5435  	//   "scopes": [
  5436  	//     "https://www.googleapis.com/auth/cloud-platform",
  5437  	//     "https://www.googleapis.com/auth/ndev.clouddns.readwrite"
  5438  	//   ]
  5439  	// }
  5440  
  5441  }
  5442  
  5443  // method id "dns.policies.get":
  5444  
  5445  type PoliciesGetCall struct {
  5446  	s            *Service
  5447  	project      string
  5448  	location     string
  5449  	policy       string
  5450  	urlParams_   gensupport.URLParams
  5451  	ifNoneMatch_ string
  5452  	ctx_         context.Context
  5453  	header_      http.Header
  5454  }
  5455  
  5456  // Get: Fetches the representation of an existing Policy.
  5457  //
  5458  //   - location: Specifies the location of the resource. This information
  5459  //     will be used for routing and will be part of the resource name.
  5460  //   - policy: User given friendly name of the policy addressed by this
  5461  //     request.
  5462  //   - project: Identifies the project addressed by this request.
  5463  func (r *PoliciesService) Get(project string, location string, policy string) *PoliciesGetCall {
  5464  	c := &PoliciesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5465  	c.project = project
  5466  	c.location = location
  5467  	c.policy = policy
  5468  	return c
  5469  }
  5470  
  5471  // ClientOperationId sets the optional parameter "clientOperationId":
  5472  // For mutating operation requests only. An optional identifier
  5473  // specified by the client. Must be unique for operation resources in
  5474  // the Operations collection.
  5475  func (c *PoliciesGetCall) ClientOperationId(clientOperationId string) *PoliciesGetCall {
  5476  	c.urlParams_.Set("clientOperationId", clientOperationId)
  5477  	return c
  5478  }
  5479  
  5480  // Fields allows partial responses to be retrieved. See
  5481  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5482  // for more information.
  5483  func (c *PoliciesGetCall) Fields(s ...googleapi.Field) *PoliciesGetCall {
  5484  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5485  	return c
  5486  }
  5487  
  5488  // IfNoneMatch sets the optional parameter which makes the operation
  5489  // fail if the object's ETag matches the given value. This is useful for
  5490  // getting updates only after the object has changed since the last
  5491  // request. Use googleapi.IsNotModified to check whether the response
  5492  // error from Do is the result of In-None-Match.
  5493  func (c *PoliciesGetCall) IfNoneMatch(entityTag string) *PoliciesGetCall {
  5494  	c.ifNoneMatch_ = entityTag
  5495  	return c
  5496  }
  5497  
  5498  // Context sets the context to be used in this call's Do method. Any
  5499  // pending HTTP request will be aborted if the provided context is
  5500  // canceled.
  5501  func (c *PoliciesGetCall) Context(ctx context.Context) *PoliciesGetCall {
  5502  	c.ctx_ = ctx
  5503  	return c
  5504  }
  5505  
  5506  // Header returns an http.Header that can be modified by the caller to
  5507  // add HTTP headers to the request.
  5508  func (c *PoliciesGetCall) Header() http.Header {
  5509  	if c.header_ == nil {
  5510  		c.header_ = make(http.Header)
  5511  	}
  5512  	return c.header_
  5513  }
  5514  
  5515  func (c *PoliciesGetCall) doRequest(alt string) (*http.Response, error) {
  5516  	reqHeaders := make(http.Header)
  5517  	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
  5518  	for k, v := range c.header_ {
  5519  		reqHeaders[k] = v
  5520  	}
  5521  	reqHeaders.Set("User-Agent", c.s.userAgent())
  5522  	if c.ifNoneMatch_ != "" {
  5523  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5524  	}
  5525  	var body io.Reader = nil
  5526  	c.urlParams_.Set("alt", alt)
  5527  	c.urlParams_.Set("prettyPrint", "false")
  5528  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v2/projects/{project}/locations/{location}/policies/{policy}")
  5529  	urls += "?" + c.urlParams_.Encode()
  5530  	req, err := http.NewRequest("GET", urls, body)
  5531  	if err != nil {
  5532  		return nil, err
  5533  	}
  5534  	req.Header = reqHeaders
  5535  	googleapi.Expand(req.URL, map[string]string{
  5536  		"project":  c.project,
  5537  		"location": c.location,
  5538  		"policy":   c.policy,
  5539  	})
  5540  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5541  }
  5542  
  5543  // Do executes the "dns.policies.get" call.
  5544  // Exactly one of *Policy or error will be non-nil. Any non-2xx status
  5545  // code is an error. Response headers are in either
  5546  // *Policy.ServerResponse.Header or (if a response was returned at all)
  5547  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  5548  // check whether the returned error was because http.StatusNotModified
  5549  // was returned.
  5550  func (c *PoliciesGetCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  5551  	gensupport.SetOptions(c.urlParams_, opts...)
  5552  	res, err := c.doRequest("json")
  5553  	if res != nil && res.StatusCode == http.StatusNotModified {
  5554  		if res.Body != nil {
  5555  			res.Body.Close()
  5556  		}
  5557  		return nil, &googleapi.Error{
  5558  			Code:   res.StatusCode,
  5559  			Header: res.Header,
  5560  		}
  5561  	}
  5562  	if err != nil {
  5563  		return nil, err
  5564  	}
  5565  	defer googleapi.CloseBody(res)
  5566  	if err := googleapi.CheckResponse(res); err != nil {
  5567  		return nil, err
  5568  	}
  5569  	ret := &Policy{
  5570  		ServerResponse: googleapi.ServerResponse{
  5571  			Header:         res.Header,
  5572  			HTTPStatusCode: res.StatusCode,
  5573  		},
  5574  	}
  5575  	target := &ret
  5576  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5577  		return nil, err
  5578  	}
  5579  	return ret, nil
  5580  	// {
  5581  	//   "description": "Fetches the representation of an existing Policy.",
  5582  	//   "flatPath": "dns/v2/projects/{project}/locations/{location}/policies/{policy}",
  5583  	//   "httpMethod": "GET",
  5584  	//   "id": "dns.policies.get",
  5585  	//   "parameterOrder": [
  5586  	//     "project",
  5587  	//     "location",
  5588  	//     "policy"
  5589  	//   ],
  5590  	//   "parameters": {
  5591  	//     "clientOperationId": {
  5592  	//       "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.",
  5593  	//       "location": "query",
  5594  	//       "type": "string"
  5595  	//     },
  5596  	//     "location": {
  5597  	//       "default": "global",
  5598  	//       "description": "Specifies the location of the resource. This information will be used for routing and will be part of the resource name.",
  5599  	//       "location": "path",
  5600  	//       "required": true,
  5601  	//       "type": "string"
  5602  	//     },
  5603  	//     "policy": {
  5604  	//       "description": "User given friendly name of the policy addressed by this request.",
  5605  	//       "location": "path",
  5606  	//       "required": true,
  5607  	//       "type": "string"
  5608  	//     },
  5609  	//     "project": {
  5610  	//       "description": "Identifies the project addressed by this request.",
  5611  	//       "location": "path",
  5612  	//       "required": true,
  5613  	//       "type": "string"
  5614  	//     }
  5615  	//   },
  5616  	//   "path": "dns/v2/projects/{project}/locations/{location}/policies/{policy}",
  5617  	//   "response": {
  5618  	//     "$ref": "Policy"
  5619  	//   },
  5620  	//   "scopes": [
  5621  	//     "https://www.googleapis.com/auth/cloud-platform",
  5622  	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
  5623  	//     "https://www.googleapis.com/auth/ndev.clouddns.readonly",
  5624  	//     "https://www.googleapis.com/auth/ndev.clouddns.readwrite"
  5625  	//   ]
  5626  	// }
  5627  
  5628  }
  5629  
  5630  // method id "dns.policies.list":
  5631  
  5632  type PoliciesListCall struct {
  5633  	s            *Service
  5634  	project      string
  5635  	location     string
  5636  	urlParams_   gensupport.URLParams
  5637  	ifNoneMatch_ string
  5638  	ctx_         context.Context
  5639  	header_      http.Header
  5640  }
  5641  
  5642  // List: Enumerates all Policies associated with a project.
  5643  //
  5644  //   - location: Specifies the location of the resource. This information
  5645  //     will be used for routing and will be part of the resource name.
  5646  //   - project: Identifies the project addressed by this request.
  5647  func (r *PoliciesService) List(project string, location string) *PoliciesListCall {
  5648  	c := &PoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5649  	c.project = project
  5650  	c.location = location
  5651  	return c
  5652  }
  5653  
  5654  // MaxResults sets the optional parameter "maxResults": Maximum number
  5655  // of results to be returned. If unspecified, the server decides how
  5656  // many results to return.
  5657  func (c *PoliciesListCall) MaxResults(maxResults int64) *PoliciesListCall {
  5658  	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  5659  	return c
  5660  }
  5661  
  5662  // PageToken sets the optional parameter "pageToken": A tag returned by
  5663  // a previous list request that was truncated. Use this parameter to
  5664  // continue a previous list request.
  5665  func (c *PoliciesListCall) PageToken(pageToken string) *PoliciesListCall {
  5666  	c.urlParams_.Set("pageToken", pageToken)
  5667  	return c
  5668  }
  5669  
  5670  // Fields allows partial responses to be retrieved. See
  5671  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5672  // for more information.
  5673  func (c *PoliciesListCall) Fields(s ...googleapi.Field) *PoliciesListCall {
  5674  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5675  	return c
  5676  }
  5677  
  5678  // IfNoneMatch sets the optional parameter which makes the operation
  5679  // fail if the object's ETag matches the given value. This is useful for
  5680  // getting updates only after the object has changed since the last
  5681  // request. Use googleapi.IsNotModified to check whether the response
  5682  // error from Do is the result of In-None-Match.
  5683  func (c *PoliciesListCall) IfNoneMatch(entityTag string) *PoliciesListCall {
  5684  	c.ifNoneMatch_ = entityTag
  5685  	return c
  5686  }
  5687  
  5688  // Context sets the context to be used in this call's Do method. Any
  5689  // pending HTTP request will be aborted if the provided context is
  5690  // canceled.
  5691  func (c *PoliciesListCall) Context(ctx context.Context) *PoliciesListCall {
  5692  	c.ctx_ = ctx
  5693  	return c
  5694  }
  5695  
  5696  // Header returns an http.Header that can be modified by the caller to
  5697  // add HTTP headers to the request.
  5698  func (c *PoliciesListCall) Header() http.Header {
  5699  	if c.header_ == nil {
  5700  		c.header_ = make(http.Header)
  5701  	}
  5702  	return c.header_
  5703  }
  5704  
  5705  func (c *PoliciesListCall) doRequest(alt string) (*http.Response, error) {
  5706  	reqHeaders := make(http.Header)
  5707  	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
  5708  	for k, v := range c.header_ {
  5709  		reqHeaders[k] = v
  5710  	}
  5711  	reqHeaders.Set("User-Agent", c.s.userAgent())
  5712  	if c.ifNoneMatch_ != "" {
  5713  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5714  	}
  5715  	var body io.Reader = nil
  5716  	c.urlParams_.Set("alt", alt)
  5717  	c.urlParams_.Set("prettyPrint", "false")
  5718  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v2/projects/{project}/locations/{location}/policies")
  5719  	urls += "?" + c.urlParams_.Encode()
  5720  	req, err := http.NewRequest("GET", urls, body)
  5721  	if err != nil {
  5722  		return nil, err
  5723  	}
  5724  	req.Header = reqHeaders
  5725  	googleapi.Expand(req.URL, map[string]string{
  5726  		"project":  c.project,
  5727  		"location": c.location,
  5728  	})
  5729  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5730  }
  5731  
  5732  // Do executes the "dns.policies.list" call.
  5733  // Exactly one of *PoliciesListResponse or error will be non-nil. Any
  5734  // non-2xx status code is an error. Response headers are in either
  5735  // *PoliciesListResponse.ServerResponse.Header or (if a response was
  5736  // returned at all) in error.(*googleapi.Error).Header. Use
  5737  // googleapi.IsNotModified to check whether the returned error was
  5738  // because http.StatusNotModified was returned.
  5739  func (c *PoliciesListCall) Do(opts ...googleapi.CallOption) (*PoliciesListResponse, error) {
  5740  	gensupport.SetOptions(c.urlParams_, opts...)
  5741  	res, err := c.doRequest("json")
  5742  	if res != nil && res.StatusCode == http.StatusNotModified {
  5743  		if res.Body != nil {
  5744  			res.Body.Close()
  5745  		}
  5746  		return nil, &googleapi.Error{
  5747  			Code:   res.StatusCode,
  5748  			Header: res.Header,
  5749  		}
  5750  	}
  5751  	if err != nil {
  5752  		return nil, err
  5753  	}
  5754  	defer googleapi.CloseBody(res)
  5755  	if err := googleapi.CheckResponse(res); err != nil {
  5756  		return nil, err
  5757  	}
  5758  	ret := &PoliciesListResponse{
  5759  		ServerResponse: googleapi.ServerResponse{
  5760  			Header:         res.Header,
  5761  			HTTPStatusCode: res.StatusCode,
  5762  		},
  5763  	}
  5764  	target := &ret
  5765  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5766  		return nil, err
  5767  	}
  5768  	return ret, nil
  5769  	// {
  5770  	//   "description": "Enumerates all Policies associated with a project.",
  5771  	//   "flatPath": "dns/v2/projects/{project}/locations/{location}/policies",
  5772  	//   "httpMethod": "GET",
  5773  	//   "id": "dns.policies.list",
  5774  	//   "parameterOrder": [
  5775  	//     "project",
  5776  	//     "location"
  5777  	//   ],
  5778  	//   "parameters": {
  5779  	//     "location": {
  5780  	//       "default": "global",
  5781  	//       "description": "Specifies the location of the resource. This information will be used for routing and will be part of the resource name.",
  5782  	//       "location": "path",
  5783  	//       "required": true,
  5784  	//       "type": "string"
  5785  	//     },
  5786  	//     "maxResults": {
  5787  	//       "description": "Optional. Maximum number of results to be returned. If unspecified, the server decides how many results to return.",
  5788  	//       "format": "int32",
  5789  	//       "location": "query",
  5790  	//       "type": "integer"
  5791  	//     },
  5792  	//     "pageToken": {
  5793  	//       "description": "Optional. A tag returned by a previous list request that was truncated. Use this parameter to continue a previous list request.",
  5794  	//       "location": "query",
  5795  	//       "type": "string"
  5796  	//     },
  5797  	//     "project": {
  5798  	//       "description": "Identifies the project addressed by this request.",
  5799  	//       "location": "path",
  5800  	//       "required": true,
  5801  	//       "type": "string"
  5802  	//     }
  5803  	//   },
  5804  	//   "path": "dns/v2/projects/{project}/locations/{location}/policies",
  5805  	//   "response": {
  5806  	//     "$ref": "PoliciesListResponse"
  5807  	//   },
  5808  	//   "scopes": [
  5809  	//     "https://www.googleapis.com/auth/cloud-platform",
  5810  	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
  5811  	//     "https://www.googleapis.com/auth/ndev.clouddns.readonly",
  5812  	//     "https://www.googleapis.com/auth/ndev.clouddns.readwrite"
  5813  	//   ]
  5814  	// }
  5815  
  5816  }
  5817  
  5818  // Pages invokes f for each page of results.
  5819  // A non-nil error returned from f will halt the iteration.
  5820  // The provided context supersedes any context provided to the Context method.
  5821  func (c *PoliciesListCall) Pages(ctx context.Context, f func(*PoliciesListResponse) error) error {
  5822  	c.ctx_ = ctx
  5823  	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  5824  	for {
  5825  		x, err := c.Do()
  5826  		if err != nil {
  5827  			return err
  5828  		}
  5829  		if err := f(x); err != nil {
  5830  			return err
  5831  		}
  5832  		if x.NextPageToken == "" {
  5833  			return nil
  5834  		}
  5835  		c.PageToken(x.NextPageToken)
  5836  	}
  5837  }
  5838  
  5839  // method id "dns.policies.patch":
  5840  
  5841  type PoliciesPatchCall struct {
  5842  	s          *Service
  5843  	project    string
  5844  	location   string
  5845  	policy     string
  5846  	policy2    *Policy
  5847  	urlParams_ gensupport.URLParams
  5848  	ctx_       context.Context
  5849  	header_    http.Header
  5850  }
  5851  
  5852  // Patch: Applies a partial update to an existing Policy.
  5853  //
  5854  //   - location: Specifies the location of the resource. This information
  5855  //     will be used for routing and will be part of the resource name.
  5856  //   - policy: User given friendly name of the policy addressed by this
  5857  //     request.
  5858  //   - project: Identifies the project addressed by this request.
  5859  func (r *PoliciesService) Patch(project string, location string, policy string, policy2 *Policy) *PoliciesPatchCall {
  5860  	c := &PoliciesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5861  	c.project = project
  5862  	c.location = location
  5863  	c.policy = policy
  5864  	c.policy2 = policy2
  5865  	return c
  5866  }
  5867  
  5868  // ClientOperationId sets the optional parameter "clientOperationId":
  5869  // For mutating operation requests only. An optional identifier
  5870  // specified by the client. Must be unique for operation resources in
  5871  // the Operations collection.
  5872  func (c *PoliciesPatchCall) ClientOperationId(clientOperationId string) *PoliciesPatchCall {
  5873  	c.urlParams_.Set("clientOperationId", clientOperationId)
  5874  	return c
  5875  }
  5876  
  5877  // Fields allows partial responses to be retrieved. See
  5878  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5879  // for more information.
  5880  func (c *PoliciesPatchCall) Fields(s ...googleapi.Field) *PoliciesPatchCall {
  5881  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5882  	return c
  5883  }
  5884  
  5885  // Context sets the context to be used in this call's Do method. Any
  5886  // pending HTTP request will be aborted if the provided context is
  5887  // canceled.
  5888  func (c *PoliciesPatchCall) Context(ctx context.Context) *PoliciesPatchCall {
  5889  	c.ctx_ = ctx
  5890  	return c
  5891  }
  5892  
  5893  // Header returns an http.Header that can be modified by the caller to
  5894  // add HTTP headers to the request.
  5895  func (c *PoliciesPatchCall) Header() http.Header {
  5896  	if c.header_ == nil {
  5897  		c.header_ = make(http.Header)
  5898  	}
  5899  	return c.header_
  5900  }
  5901  
  5902  func (c *PoliciesPatchCall) doRequest(alt string) (*http.Response, error) {
  5903  	reqHeaders := make(http.Header)
  5904  	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
  5905  	for k, v := range c.header_ {
  5906  		reqHeaders[k] = v
  5907  	}
  5908  	reqHeaders.Set("User-Agent", c.s.userAgent())
  5909  	var body io.Reader = nil
  5910  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.policy2)
  5911  	if err != nil {
  5912  		return nil, err
  5913  	}
  5914  	reqHeaders.Set("Content-Type", "application/json")
  5915  	c.urlParams_.Set("alt", alt)
  5916  	c.urlParams_.Set("prettyPrint", "false")
  5917  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v2/projects/{project}/locations/{location}/policies/{policy}")
  5918  	urls += "?" + c.urlParams_.Encode()
  5919  	req, err := http.NewRequest("PATCH", urls, body)
  5920  	if err != nil {
  5921  		return nil, err
  5922  	}
  5923  	req.Header = reqHeaders
  5924  	googleapi.Expand(req.URL, map[string]string{
  5925  		"project":  c.project,
  5926  		"location": c.location,
  5927  		"policy":   c.policy,
  5928  	})
  5929  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5930  }
  5931  
  5932  // Do executes the "dns.policies.patch" call.
  5933  // Exactly one of *PoliciesPatchResponse or error will be non-nil. Any
  5934  // non-2xx status code is an error. Response headers are in either
  5935  // *PoliciesPatchResponse.ServerResponse.Header or (if a response was
  5936  // returned at all) in error.(*googleapi.Error).Header. Use
  5937  // googleapi.IsNotModified to check whether the returned error was
  5938  // because http.StatusNotModified was returned.
  5939  func (c *PoliciesPatchCall) Do(opts ...googleapi.CallOption) (*PoliciesPatchResponse, error) {
  5940  	gensupport.SetOptions(c.urlParams_, opts...)
  5941  	res, err := c.doRequest("json")
  5942  	if res != nil && res.StatusCode == http.StatusNotModified {
  5943  		if res.Body != nil {
  5944  			res.Body.Close()
  5945  		}
  5946  		return nil, &googleapi.Error{
  5947  			Code:   res.StatusCode,
  5948  			Header: res.Header,
  5949  		}
  5950  	}
  5951  	if err != nil {
  5952  		return nil, err
  5953  	}
  5954  	defer googleapi.CloseBody(res)
  5955  	if err := googleapi.CheckResponse(res); err != nil {
  5956  		return nil, err
  5957  	}
  5958  	ret := &PoliciesPatchResponse{
  5959  		ServerResponse: googleapi.ServerResponse{
  5960  			Header:         res.Header,
  5961  			HTTPStatusCode: res.StatusCode,
  5962  		},
  5963  	}
  5964  	target := &ret
  5965  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5966  		return nil, err
  5967  	}
  5968  	return ret, nil
  5969  	// {
  5970  	//   "description": "Applies a partial update to an existing Policy.",
  5971  	//   "flatPath": "dns/v2/projects/{project}/locations/{location}/policies/{policy}",
  5972  	//   "httpMethod": "PATCH",
  5973  	//   "id": "dns.policies.patch",
  5974  	//   "parameterOrder": [
  5975  	//     "project",
  5976  	//     "location",
  5977  	//     "policy"
  5978  	//   ],
  5979  	//   "parameters": {
  5980  	//     "clientOperationId": {
  5981  	//       "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.",
  5982  	//       "location": "query",
  5983  	//       "type": "string"
  5984  	//     },
  5985  	//     "location": {
  5986  	//       "default": "global",
  5987  	//       "description": "Specifies the location of the resource. This information will be used for routing and will be part of the resource name.",
  5988  	//       "location": "path",
  5989  	//       "required": true,
  5990  	//       "type": "string"
  5991  	//     },
  5992  	//     "policy": {
  5993  	//       "description": "User given friendly name of the policy addressed by this request.",
  5994  	//       "location": "path",
  5995  	//       "required": true,
  5996  	//       "type": "string"
  5997  	//     },
  5998  	//     "project": {
  5999  	//       "description": "Identifies the project addressed by this request.",
  6000  	//       "location": "path",
  6001  	//       "required": true,
  6002  	//       "type": "string"
  6003  	//     }
  6004  	//   },
  6005  	//   "path": "dns/v2/projects/{project}/locations/{location}/policies/{policy}",
  6006  	//   "request": {
  6007  	//     "$ref": "Policy"
  6008  	//   },
  6009  	//   "response": {
  6010  	//     "$ref": "PoliciesPatchResponse"
  6011  	//   },
  6012  	//   "scopes": [
  6013  	//     "https://www.googleapis.com/auth/cloud-platform",
  6014  	//     "https://www.googleapis.com/auth/ndev.clouddns.readwrite"
  6015  	//   ]
  6016  	// }
  6017  
  6018  }
  6019  
  6020  // method id "dns.policies.update":
  6021  
  6022  type PoliciesUpdateCall struct {
  6023  	s          *Service
  6024  	project    string
  6025  	location   string
  6026  	policy     string
  6027  	policy2    *Policy
  6028  	urlParams_ gensupport.URLParams
  6029  	ctx_       context.Context
  6030  	header_    http.Header
  6031  }
  6032  
  6033  // Update: Updates an existing Policy.
  6034  //
  6035  //   - location: Specifies the location of the resource. This information
  6036  //     will be used for routing and will be part of the resource name.
  6037  //   - policy: User given friendly name of the policy addressed by this
  6038  //     request.
  6039  //   - project: Identifies the project addressed by this request.
  6040  func (r *PoliciesService) Update(project string, location string, policy string, policy2 *Policy) *PoliciesUpdateCall {
  6041  	c := &PoliciesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6042  	c.project = project
  6043  	c.location = location
  6044  	c.policy = policy
  6045  	c.policy2 = policy2
  6046  	return c
  6047  }
  6048  
  6049  // ClientOperationId sets the optional parameter "clientOperationId":
  6050  // For mutating operation requests only. An optional identifier
  6051  // specified by the client. Must be unique for operation resources in
  6052  // the Operations collection.
  6053  func (c *PoliciesUpdateCall) ClientOperationId(clientOperationId string) *PoliciesUpdateCall {
  6054  	c.urlParams_.Set("clientOperationId", clientOperationId)
  6055  	return c
  6056  }
  6057  
  6058  // Fields allows partial responses to be retrieved. See
  6059  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6060  // for more information.
  6061  func (c *PoliciesUpdateCall) Fields(s ...googleapi.Field) *PoliciesUpdateCall {
  6062  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6063  	return c
  6064  }
  6065  
  6066  // Context sets the context to be used in this call's Do method. Any
  6067  // pending HTTP request will be aborted if the provided context is
  6068  // canceled.
  6069  func (c *PoliciesUpdateCall) Context(ctx context.Context) *PoliciesUpdateCall {
  6070  	c.ctx_ = ctx
  6071  	return c
  6072  }
  6073  
  6074  // Header returns an http.Header that can be modified by the caller to
  6075  // add HTTP headers to the request.
  6076  func (c *PoliciesUpdateCall) Header() http.Header {
  6077  	if c.header_ == nil {
  6078  		c.header_ = make(http.Header)
  6079  	}
  6080  	return c.header_
  6081  }
  6082  
  6083  func (c *PoliciesUpdateCall) doRequest(alt string) (*http.Response, error) {
  6084  	reqHeaders := make(http.Header)
  6085  	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
  6086  	for k, v := range c.header_ {
  6087  		reqHeaders[k] = v
  6088  	}
  6089  	reqHeaders.Set("User-Agent", c.s.userAgent())
  6090  	var body io.Reader = nil
  6091  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.policy2)
  6092  	if err != nil {
  6093  		return nil, err
  6094  	}
  6095  	reqHeaders.Set("Content-Type", "application/json")
  6096  	c.urlParams_.Set("alt", alt)
  6097  	c.urlParams_.Set("prettyPrint", "false")
  6098  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v2/projects/{project}/locations/{location}/policies/{policy}")
  6099  	urls += "?" + c.urlParams_.Encode()
  6100  	req, err := http.NewRequest("PUT", urls, body)
  6101  	if err != nil {
  6102  		return nil, err
  6103  	}
  6104  	req.Header = reqHeaders
  6105  	googleapi.Expand(req.URL, map[string]string{
  6106  		"project":  c.project,
  6107  		"location": c.location,
  6108  		"policy":   c.policy,
  6109  	})
  6110  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6111  }
  6112  
  6113  // Do executes the "dns.policies.update" call.
  6114  // Exactly one of *PoliciesUpdateResponse or error will be non-nil. Any
  6115  // non-2xx status code is an error. Response headers are in either
  6116  // *PoliciesUpdateResponse.ServerResponse.Header or (if a response was
  6117  // returned at all) in error.(*googleapi.Error).Header. Use
  6118  // googleapi.IsNotModified to check whether the returned error was
  6119  // because http.StatusNotModified was returned.
  6120  func (c *PoliciesUpdateCall) Do(opts ...googleapi.CallOption) (*PoliciesUpdateResponse, error) {
  6121  	gensupport.SetOptions(c.urlParams_, opts...)
  6122  	res, err := c.doRequest("json")
  6123  	if res != nil && res.StatusCode == http.StatusNotModified {
  6124  		if res.Body != nil {
  6125  			res.Body.Close()
  6126  		}
  6127  		return nil, &googleapi.Error{
  6128  			Code:   res.StatusCode,
  6129  			Header: res.Header,
  6130  		}
  6131  	}
  6132  	if err != nil {
  6133  		return nil, err
  6134  	}
  6135  	defer googleapi.CloseBody(res)
  6136  	if err := googleapi.CheckResponse(res); err != nil {
  6137  		return nil, err
  6138  	}
  6139  	ret := &PoliciesUpdateResponse{
  6140  		ServerResponse: googleapi.ServerResponse{
  6141  			Header:         res.Header,
  6142  			HTTPStatusCode: res.StatusCode,
  6143  		},
  6144  	}
  6145  	target := &ret
  6146  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6147  		return nil, err
  6148  	}
  6149  	return ret, nil
  6150  	// {
  6151  	//   "description": "Updates an existing Policy.",
  6152  	//   "flatPath": "dns/v2/projects/{project}/locations/{location}/policies/{policy}",
  6153  	//   "httpMethod": "PUT",
  6154  	//   "id": "dns.policies.update",
  6155  	//   "parameterOrder": [
  6156  	//     "project",
  6157  	//     "location",
  6158  	//     "policy"
  6159  	//   ],
  6160  	//   "parameters": {
  6161  	//     "clientOperationId": {
  6162  	//       "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.",
  6163  	//       "location": "query",
  6164  	//       "type": "string"
  6165  	//     },
  6166  	//     "location": {
  6167  	//       "default": "global",
  6168  	//       "description": "Specifies the location of the resource. This information will be used for routing and will be part of the resource name.",
  6169  	//       "location": "path",
  6170  	//       "required": true,
  6171  	//       "type": "string"
  6172  	//     },
  6173  	//     "policy": {
  6174  	//       "description": "User given friendly name of the policy addressed by this request.",
  6175  	//       "location": "path",
  6176  	//       "required": true,
  6177  	//       "type": "string"
  6178  	//     },
  6179  	//     "project": {
  6180  	//       "description": "Identifies the project addressed by this request.",
  6181  	//       "location": "path",
  6182  	//       "required": true,
  6183  	//       "type": "string"
  6184  	//     }
  6185  	//   },
  6186  	//   "path": "dns/v2/projects/{project}/locations/{location}/policies/{policy}",
  6187  	//   "request": {
  6188  	//     "$ref": "Policy"
  6189  	//   },
  6190  	//   "response": {
  6191  	//     "$ref": "PoliciesUpdateResponse"
  6192  	//   },
  6193  	//   "scopes": [
  6194  	//     "https://www.googleapis.com/auth/cloud-platform",
  6195  	//     "https://www.googleapis.com/auth/ndev.clouddns.readwrite"
  6196  	//   ]
  6197  	// }
  6198  
  6199  }
  6200  
  6201  // method id "dns.projects.get":
  6202  
  6203  type ProjectsGetCall struct {
  6204  	s            *Service
  6205  	project      string
  6206  	location     string
  6207  	urlParams_   gensupport.URLParams
  6208  	ifNoneMatch_ string
  6209  	ctx_         context.Context
  6210  	header_      http.Header
  6211  }
  6212  
  6213  // Get: Fetches the representation of an existing Project.
  6214  //
  6215  // - location: .
  6216  // - project: Identifies the project addressed by this request.
  6217  func (r *ProjectsService) Get(project string, location string) *ProjectsGetCall {
  6218  	c := &ProjectsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6219  	c.project = project
  6220  	c.location = location
  6221  	return c
  6222  }
  6223  
  6224  // ClientOperationId sets the optional parameter "clientOperationId":
  6225  // For mutating operation requests only. An optional identifier
  6226  // specified by the client. Must be unique for operation resources in
  6227  // the Operations collection.
  6228  func (c *ProjectsGetCall) ClientOperationId(clientOperationId string) *ProjectsGetCall {
  6229  	c.urlParams_.Set("clientOperationId", clientOperationId)
  6230  	return c
  6231  }
  6232  
  6233  // Fields allows partial responses to be retrieved. See
  6234  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6235  // for more information.
  6236  func (c *ProjectsGetCall) Fields(s ...googleapi.Field) *ProjectsGetCall {
  6237  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6238  	return c
  6239  }
  6240  
  6241  // IfNoneMatch sets the optional parameter which makes the operation
  6242  // fail if the object's ETag matches the given value. This is useful for
  6243  // getting updates only after the object has changed since the last
  6244  // request. Use googleapi.IsNotModified to check whether the response
  6245  // error from Do is the result of In-None-Match.
  6246  func (c *ProjectsGetCall) IfNoneMatch(entityTag string) *ProjectsGetCall {
  6247  	c.ifNoneMatch_ = entityTag
  6248  	return c
  6249  }
  6250  
  6251  // Context sets the context to be used in this call's Do method. Any
  6252  // pending HTTP request will be aborted if the provided context is
  6253  // canceled.
  6254  func (c *ProjectsGetCall) Context(ctx context.Context) *ProjectsGetCall {
  6255  	c.ctx_ = ctx
  6256  	return c
  6257  }
  6258  
  6259  // Header returns an http.Header that can be modified by the caller to
  6260  // add HTTP headers to the request.
  6261  func (c *ProjectsGetCall) Header() http.Header {
  6262  	if c.header_ == nil {
  6263  		c.header_ = make(http.Header)
  6264  	}
  6265  	return c.header_
  6266  }
  6267  
  6268  func (c *ProjectsGetCall) doRequest(alt string) (*http.Response, error) {
  6269  	reqHeaders := make(http.Header)
  6270  	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
  6271  	for k, v := range c.header_ {
  6272  		reqHeaders[k] = v
  6273  	}
  6274  	reqHeaders.Set("User-Agent", c.s.userAgent())
  6275  	if c.ifNoneMatch_ != "" {
  6276  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6277  	}
  6278  	var body io.Reader = nil
  6279  	c.urlParams_.Set("alt", alt)
  6280  	c.urlParams_.Set("prettyPrint", "false")
  6281  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v2/projects/{project}/locations/{location}")
  6282  	urls += "?" + c.urlParams_.Encode()
  6283  	req, err := http.NewRequest("GET", urls, body)
  6284  	if err != nil {
  6285  		return nil, err
  6286  	}
  6287  	req.Header = reqHeaders
  6288  	googleapi.Expand(req.URL, map[string]string{
  6289  		"project":  c.project,
  6290  		"location": c.location,
  6291  	})
  6292  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6293  }
  6294  
  6295  // Do executes the "dns.projects.get" call.
  6296  // Exactly one of *Project or error will be non-nil. Any non-2xx status
  6297  // code is an error. Response headers are in either
  6298  // *Project.ServerResponse.Header or (if a response was returned at all)
  6299  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  6300  // check whether the returned error was because http.StatusNotModified
  6301  // was returned.
  6302  func (c *ProjectsGetCall) Do(opts ...googleapi.CallOption) (*Project, error) {
  6303  	gensupport.SetOptions(c.urlParams_, opts...)
  6304  	res, err := c.doRequest("json")
  6305  	if res != nil && res.StatusCode == http.StatusNotModified {
  6306  		if res.Body != nil {
  6307  			res.Body.Close()
  6308  		}
  6309  		return nil, &googleapi.Error{
  6310  			Code:   res.StatusCode,
  6311  			Header: res.Header,
  6312  		}
  6313  	}
  6314  	if err != nil {
  6315  		return nil, err
  6316  	}
  6317  	defer googleapi.CloseBody(res)
  6318  	if err := googleapi.CheckResponse(res); err != nil {
  6319  		return nil, err
  6320  	}
  6321  	ret := &Project{
  6322  		ServerResponse: googleapi.ServerResponse{
  6323  			Header:         res.Header,
  6324  			HTTPStatusCode: res.StatusCode,
  6325  		},
  6326  	}
  6327  	target := &ret
  6328  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6329  		return nil, err
  6330  	}
  6331  	return ret, nil
  6332  	// {
  6333  	//   "description": "Fetches the representation of an existing Project.",
  6334  	//   "flatPath": "dns/v2/projects/{project}/locations/{location}",
  6335  	//   "httpMethod": "GET",
  6336  	//   "id": "dns.projects.get",
  6337  	//   "parameterOrder": [
  6338  	//     "project",
  6339  	//     "location"
  6340  	//   ],
  6341  	//   "parameters": {
  6342  	//     "clientOperationId": {
  6343  	//       "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.",
  6344  	//       "location": "query",
  6345  	//       "type": "string"
  6346  	//     },
  6347  	//     "location": {
  6348  	//       "default": "global",
  6349  	//       "location": "path",
  6350  	//       "required": true,
  6351  	//       "type": "string"
  6352  	//     },
  6353  	//     "project": {
  6354  	//       "description": "Identifies the project addressed by this request.",
  6355  	//       "location": "path",
  6356  	//       "required": true,
  6357  	//       "type": "string"
  6358  	//     }
  6359  	//   },
  6360  	//   "path": "dns/v2/projects/{project}/locations/{location}",
  6361  	//   "response": {
  6362  	//     "$ref": "Project"
  6363  	//   },
  6364  	//   "scopes": [
  6365  	//     "https://www.googleapis.com/auth/cloud-platform",
  6366  	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
  6367  	//     "https://www.googleapis.com/auth/ndev.clouddns.readonly",
  6368  	//     "https://www.googleapis.com/auth/ndev.clouddns.readwrite"
  6369  	//   ]
  6370  	// }
  6371  
  6372  }
  6373  
  6374  // method id "dns.resourceRecordSets.create":
  6375  
  6376  type ResourceRecordSetsCreateCall struct {
  6377  	s                 *Service
  6378  	project           string
  6379  	location          string
  6380  	managedZone       string
  6381  	resourcerecordset *ResourceRecordSet
  6382  	urlParams_        gensupport.URLParams
  6383  	ctx_              context.Context
  6384  	header_           http.Header
  6385  }
  6386  
  6387  // Create: Creates a new ResourceRecordSet.
  6388  //
  6389  //   - location: Specifies the location of the resource. This information
  6390  //     will be used for routing and will be part of the resource name.
  6391  //   - managedZone: Identifies the managed zone addressed by this request.
  6392  //     Can be the managed zone name or ID.
  6393  //   - project: Identifies the project addressed by this request.
  6394  func (r *ResourceRecordSetsService) Create(project string, location string, managedZone string, resourcerecordset *ResourceRecordSet) *ResourceRecordSetsCreateCall {
  6395  	c := &ResourceRecordSetsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6396  	c.project = project
  6397  	c.location = location
  6398  	c.managedZone = managedZone
  6399  	c.resourcerecordset = resourcerecordset
  6400  	return c
  6401  }
  6402  
  6403  // ClientOperationId sets the optional parameter "clientOperationId":
  6404  // For mutating operation requests only. An optional identifier
  6405  // specified by the client. Must be unique for operation resources in
  6406  // the Operations collection.
  6407  func (c *ResourceRecordSetsCreateCall) ClientOperationId(clientOperationId string) *ResourceRecordSetsCreateCall {
  6408  	c.urlParams_.Set("clientOperationId", clientOperationId)
  6409  	return c
  6410  }
  6411  
  6412  // Fields allows partial responses to be retrieved. See
  6413  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6414  // for more information.
  6415  func (c *ResourceRecordSetsCreateCall) Fields(s ...googleapi.Field) *ResourceRecordSetsCreateCall {
  6416  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6417  	return c
  6418  }
  6419  
  6420  // Context sets the context to be used in this call's Do method. Any
  6421  // pending HTTP request will be aborted if the provided context is
  6422  // canceled.
  6423  func (c *ResourceRecordSetsCreateCall) Context(ctx context.Context) *ResourceRecordSetsCreateCall {
  6424  	c.ctx_ = ctx
  6425  	return c
  6426  }
  6427  
  6428  // Header returns an http.Header that can be modified by the caller to
  6429  // add HTTP headers to the request.
  6430  func (c *ResourceRecordSetsCreateCall) Header() http.Header {
  6431  	if c.header_ == nil {
  6432  		c.header_ = make(http.Header)
  6433  	}
  6434  	return c.header_
  6435  }
  6436  
  6437  func (c *ResourceRecordSetsCreateCall) doRequest(alt string) (*http.Response, error) {
  6438  	reqHeaders := make(http.Header)
  6439  	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
  6440  	for k, v := range c.header_ {
  6441  		reqHeaders[k] = v
  6442  	}
  6443  	reqHeaders.Set("User-Agent", c.s.userAgent())
  6444  	var body io.Reader = nil
  6445  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.resourcerecordset)
  6446  	if err != nil {
  6447  		return nil, err
  6448  	}
  6449  	reqHeaders.Set("Content-Type", "application/json")
  6450  	c.urlParams_.Set("alt", alt)
  6451  	c.urlParams_.Set("prettyPrint", "false")
  6452  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/rrsets")
  6453  	urls += "?" + c.urlParams_.Encode()
  6454  	req, err := http.NewRequest("POST", urls, body)
  6455  	if err != nil {
  6456  		return nil, err
  6457  	}
  6458  	req.Header = reqHeaders
  6459  	googleapi.Expand(req.URL, map[string]string{
  6460  		"project":     c.project,
  6461  		"location":    c.location,
  6462  		"managedZone": c.managedZone,
  6463  	})
  6464  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6465  }
  6466  
  6467  // Do executes the "dns.resourceRecordSets.create" call.
  6468  // Exactly one of *ResourceRecordSet or error will be non-nil. Any
  6469  // non-2xx status code is an error. Response headers are in either
  6470  // *ResourceRecordSet.ServerResponse.Header or (if a response was
  6471  // returned at all) in error.(*googleapi.Error).Header. Use
  6472  // googleapi.IsNotModified to check whether the returned error was
  6473  // because http.StatusNotModified was returned.
  6474  func (c *ResourceRecordSetsCreateCall) Do(opts ...googleapi.CallOption) (*ResourceRecordSet, error) {
  6475  	gensupport.SetOptions(c.urlParams_, opts...)
  6476  	res, err := c.doRequest("json")
  6477  	if res != nil && res.StatusCode == http.StatusNotModified {
  6478  		if res.Body != nil {
  6479  			res.Body.Close()
  6480  		}
  6481  		return nil, &googleapi.Error{
  6482  			Code:   res.StatusCode,
  6483  			Header: res.Header,
  6484  		}
  6485  	}
  6486  	if err != nil {
  6487  		return nil, err
  6488  	}
  6489  	defer googleapi.CloseBody(res)
  6490  	if err := googleapi.CheckResponse(res); err != nil {
  6491  		return nil, err
  6492  	}
  6493  	ret := &ResourceRecordSet{
  6494  		ServerResponse: googleapi.ServerResponse{
  6495  			Header:         res.Header,
  6496  			HTTPStatusCode: res.StatusCode,
  6497  		},
  6498  	}
  6499  	target := &ret
  6500  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6501  		return nil, err
  6502  	}
  6503  	return ret, nil
  6504  	// {
  6505  	//   "description": "Creates a new ResourceRecordSet.",
  6506  	//   "flatPath": "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/rrsets",
  6507  	//   "httpMethod": "POST",
  6508  	//   "id": "dns.resourceRecordSets.create",
  6509  	//   "parameterOrder": [
  6510  	//     "project",
  6511  	//     "location",
  6512  	//     "managedZone"
  6513  	//   ],
  6514  	//   "parameters": {
  6515  	//     "clientOperationId": {
  6516  	//       "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.",
  6517  	//       "location": "query",
  6518  	//       "type": "string"
  6519  	//     },
  6520  	//     "location": {
  6521  	//       "default": "global",
  6522  	//       "description": "Specifies the location of the resource. This information will be used for routing and will be part of the resource name.",
  6523  	//       "location": "path",
  6524  	//       "required": true,
  6525  	//       "type": "string"
  6526  	//     },
  6527  	//     "managedZone": {
  6528  	//       "description": "Identifies the managed zone addressed by this request. Can be the managed zone name or ID.",
  6529  	//       "location": "path",
  6530  	//       "required": true,
  6531  	//       "type": "string"
  6532  	//     },
  6533  	//     "project": {
  6534  	//       "description": "Identifies the project addressed by this request.",
  6535  	//       "location": "path",
  6536  	//       "required": true,
  6537  	//       "type": "string"
  6538  	//     }
  6539  	//   },
  6540  	//   "path": "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/rrsets",
  6541  	//   "request": {
  6542  	//     "$ref": "ResourceRecordSet"
  6543  	//   },
  6544  	//   "response": {
  6545  	//     "$ref": "ResourceRecordSet"
  6546  	//   },
  6547  	//   "scopes": [
  6548  	//     "https://www.googleapis.com/auth/cloud-platform",
  6549  	//     "https://www.googleapis.com/auth/ndev.clouddns.readwrite"
  6550  	//   ]
  6551  	// }
  6552  
  6553  }
  6554  
  6555  // method id "dns.resourceRecordSets.delete":
  6556  
  6557  type ResourceRecordSetsDeleteCall struct {
  6558  	s           *Service
  6559  	project     string
  6560  	location    string
  6561  	managedZone string
  6562  	name        string
  6563  	type_       string
  6564  	urlParams_  gensupport.URLParams
  6565  	ctx_        context.Context
  6566  	header_     http.Header
  6567  }
  6568  
  6569  // Delete: Deletes a previously created ResourceRecordSet.
  6570  //
  6571  //   - location: Specifies the location of the resource. This information
  6572  //     will be used for routing and will be part of the resource name.
  6573  //   - managedZone: Identifies the managed zone addressed by this request.
  6574  //     Can be the managed zone name or ID.
  6575  //   - name: Fully qualified domain name.
  6576  //   - project: Identifies the project addressed by this request.
  6577  //   - type: RRSet type.
  6578  func (r *ResourceRecordSetsService) Delete(project string, location string, managedZone string, name string, type_ string) *ResourceRecordSetsDeleteCall {
  6579  	c := &ResourceRecordSetsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6580  	c.project = project
  6581  	c.location = location
  6582  	c.managedZone = managedZone
  6583  	c.name = name
  6584  	c.type_ = type_
  6585  	return c
  6586  }
  6587  
  6588  // ClientOperationId sets the optional parameter "clientOperationId":
  6589  // For mutating operation requests only. An optional identifier
  6590  // specified by the client. Must be unique for operation resources in
  6591  // the Operations collection.
  6592  func (c *ResourceRecordSetsDeleteCall) ClientOperationId(clientOperationId string) *ResourceRecordSetsDeleteCall {
  6593  	c.urlParams_.Set("clientOperationId", clientOperationId)
  6594  	return c
  6595  }
  6596  
  6597  // Fields allows partial responses to be retrieved. See
  6598  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6599  // for more information.
  6600  func (c *ResourceRecordSetsDeleteCall) Fields(s ...googleapi.Field) *ResourceRecordSetsDeleteCall {
  6601  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6602  	return c
  6603  }
  6604  
  6605  // Context sets the context to be used in this call's Do method. Any
  6606  // pending HTTP request will be aborted if the provided context is
  6607  // canceled.
  6608  func (c *ResourceRecordSetsDeleteCall) Context(ctx context.Context) *ResourceRecordSetsDeleteCall {
  6609  	c.ctx_ = ctx
  6610  	return c
  6611  }
  6612  
  6613  // Header returns an http.Header that can be modified by the caller to
  6614  // add HTTP headers to the request.
  6615  func (c *ResourceRecordSetsDeleteCall) Header() http.Header {
  6616  	if c.header_ == nil {
  6617  		c.header_ = make(http.Header)
  6618  	}
  6619  	return c.header_
  6620  }
  6621  
  6622  func (c *ResourceRecordSetsDeleteCall) doRequest(alt string) (*http.Response, error) {
  6623  	reqHeaders := make(http.Header)
  6624  	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
  6625  	for k, v := range c.header_ {
  6626  		reqHeaders[k] = v
  6627  	}
  6628  	reqHeaders.Set("User-Agent", c.s.userAgent())
  6629  	var body io.Reader = nil
  6630  	c.urlParams_.Set("alt", alt)
  6631  	c.urlParams_.Set("prettyPrint", "false")
  6632  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/rrsets/{name}/{type}")
  6633  	urls += "?" + c.urlParams_.Encode()
  6634  	req, err := http.NewRequest("DELETE", urls, body)
  6635  	if err != nil {
  6636  		return nil, err
  6637  	}
  6638  	req.Header = reqHeaders
  6639  	googleapi.Expand(req.URL, map[string]string{
  6640  		"project":     c.project,
  6641  		"location":    c.location,
  6642  		"managedZone": c.managedZone,
  6643  		"name":        c.name,
  6644  		"type":        c.type_,
  6645  	})
  6646  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6647  }
  6648  
  6649  // Do executes the "dns.resourceRecordSets.delete" call.
  6650  func (c *ResourceRecordSetsDeleteCall) Do(opts ...googleapi.CallOption) error {
  6651  	gensupport.SetOptions(c.urlParams_, opts...)
  6652  	res, err := c.doRequest("json")
  6653  	if err != nil {
  6654  		return err
  6655  	}
  6656  	defer googleapi.CloseBody(res)
  6657  	if err := googleapi.CheckResponse(res); err != nil {
  6658  		return err
  6659  	}
  6660  	return nil
  6661  	// {
  6662  	//   "description": "Deletes a previously created ResourceRecordSet.",
  6663  	//   "flatPath": "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/rrsets/{name}/{type}",
  6664  	//   "httpMethod": "DELETE",
  6665  	//   "id": "dns.resourceRecordSets.delete",
  6666  	//   "parameterOrder": [
  6667  	//     "project",
  6668  	//     "location",
  6669  	//     "managedZone",
  6670  	//     "name",
  6671  	//     "type"
  6672  	//   ],
  6673  	//   "parameters": {
  6674  	//     "clientOperationId": {
  6675  	//       "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.",
  6676  	//       "location": "query",
  6677  	//       "type": "string"
  6678  	//     },
  6679  	//     "location": {
  6680  	//       "default": "global",
  6681  	//       "description": "Specifies the location of the resource. This information will be used for routing and will be part of the resource name.",
  6682  	//       "location": "path",
  6683  	//       "required": true,
  6684  	//       "type": "string"
  6685  	//     },
  6686  	//     "managedZone": {
  6687  	//       "description": "Identifies the managed zone addressed by this request. Can be the managed zone name or ID.",
  6688  	//       "location": "path",
  6689  	//       "required": true,
  6690  	//       "type": "string"
  6691  	//     },
  6692  	//     "name": {
  6693  	//       "description": "Fully qualified domain name.",
  6694  	//       "location": "path",
  6695  	//       "required": true,
  6696  	//       "type": "string"
  6697  	//     },
  6698  	//     "project": {
  6699  	//       "description": "Identifies the project addressed by this request.",
  6700  	//       "location": "path",
  6701  	//       "required": true,
  6702  	//       "type": "string"
  6703  	//     },
  6704  	//     "type": {
  6705  	//       "description": "RRSet type.",
  6706  	//       "location": "path",
  6707  	//       "required": true,
  6708  	//       "type": "string"
  6709  	//     }
  6710  	//   },
  6711  	//   "path": "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/rrsets/{name}/{type}",
  6712  	//   "scopes": [
  6713  	//     "https://www.googleapis.com/auth/cloud-platform",
  6714  	//     "https://www.googleapis.com/auth/ndev.clouddns.readwrite"
  6715  	//   ]
  6716  	// }
  6717  
  6718  }
  6719  
  6720  // method id "dns.resourceRecordSets.get":
  6721  
  6722  type ResourceRecordSetsGetCall struct {
  6723  	s            *Service
  6724  	project      string
  6725  	location     string
  6726  	managedZone  string
  6727  	name         string
  6728  	type_        string
  6729  	urlParams_   gensupport.URLParams
  6730  	ifNoneMatch_ string
  6731  	ctx_         context.Context
  6732  	header_      http.Header
  6733  }
  6734  
  6735  // Get: Fetches the representation of an existing ResourceRecordSet.
  6736  //
  6737  //   - location: Specifies the location of the resource. This information
  6738  //     will be used for routing and will be part of the resource name.
  6739  //   - managedZone: Identifies the managed zone addressed by this request.
  6740  //     Can be the managed zone name or ID.
  6741  //   - name: Fully qualified domain name.
  6742  //   - project: Identifies the project addressed by this request.
  6743  //   - type: RRSet type.
  6744  func (r *ResourceRecordSetsService) Get(project string, location string, managedZone string, name string, type_ string) *ResourceRecordSetsGetCall {
  6745  	c := &ResourceRecordSetsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6746  	c.project = project
  6747  	c.location = location
  6748  	c.managedZone = managedZone
  6749  	c.name = name
  6750  	c.type_ = type_
  6751  	return c
  6752  }
  6753  
  6754  // ClientOperationId sets the optional parameter "clientOperationId":
  6755  // For mutating operation requests only. An optional identifier
  6756  // specified by the client. Must be unique for operation resources in
  6757  // the Operations collection.
  6758  func (c *ResourceRecordSetsGetCall) ClientOperationId(clientOperationId string) *ResourceRecordSetsGetCall {
  6759  	c.urlParams_.Set("clientOperationId", clientOperationId)
  6760  	return c
  6761  }
  6762  
  6763  // Fields allows partial responses to be retrieved. See
  6764  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6765  // for more information.
  6766  func (c *ResourceRecordSetsGetCall) Fields(s ...googleapi.Field) *ResourceRecordSetsGetCall {
  6767  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6768  	return c
  6769  }
  6770  
  6771  // IfNoneMatch sets the optional parameter which makes the operation
  6772  // fail if the object's ETag matches the given value. This is useful for
  6773  // getting updates only after the object has changed since the last
  6774  // request. Use googleapi.IsNotModified to check whether the response
  6775  // error from Do is the result of In-None-Match.
  6776  func (c *ResourceRecordSetsGetCall) IfNoneMatch(entityTag string) *ResourceRecordSetsGetCall {
  6777  	c.ifNoneMatch_ = entityTag
  6778  	return c
  6779  }
  6780  
  6781  // Context sets the context to be used in this call's Do method. Any
  6782  // pending HTTP request will be aborted if the provided context is
  6783  // canceled.
  6784  func (c *ResourceRecordSetsGetCall) Context(ctx context.Context) *ResourceRecordSetsGetCall {
  6785  	c.ctx_ = ctx
  6786  	return c
  6787  }
  6788  
  6789  // Header returns an http.Header that can be modified by the caller to
  6790  // add HTTP headers to the request.
  6791  func (c *ResourceRecordSetsGetCall) Header() http.Header {
  6792  	if c.header_ == nil {
  6793  		c.header_ = make(http.Header)
  6794  	}
  6795  	return c.header_
  6796  }
  6797  
  6798  func (c *ResourceRecordSetsGetCall) doRequest(alt string) (*http.Response, error) {
  6799  	reqHeaders := make(http.Header)
  6800  	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
  6801  	for k, v := range c.header_ {
  6802  		reqHeaders[k] = v
  6803  	}
  6804  	reqHeaders.Set("User-Agent", c.s.userAgent())
  6805  	if c.ifNoneMatch_ != "" {
  6806  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6807  	}
  6808  	var body io.Reader = nil
  6809  	c.urlParams_.Set("alt", alt)
  6810  	c.urlParams_.Set("prettyPrint", "false")
  6811  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/rrsets/{name}/{type}")
  6812  	urls += "?" + c.urlParams_.Encode()
  6813  	req, err := http.NewRequest("GET", urls, body)
  6814  	if err != nil {
  6815  		return nil, err
  6816  	}
  6817  	req.Header = reqHeaders
  6818  	googleapi.Expand(req.URL, map[string]string{
  6819  		"project":     c.project,
  6820  		"location":    c.location,
  6821  		"managedZone": c.managedZone,
  6822  		"name":        c.name,
  6823  		"type":        c.type_,
  6824  	})
  6825  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6826  }
  6827  
  6828  // Do executes the "dns.resourceRecordSets.get" call.
  6829  // Exactly one of *ResourceRecordSet or error will be non-nil. Any
  6830  // non-2xx status code is an error. Response headers are in either
  6831  // *ResourceRecordSet.ServerResponse.Header or (if a response was
  6832  // returned at all) in error.(*googleapi.Error).Header. Use
  6833  // googleapi.IsNotModified to check whether the returned error was
  6834  // because http.StatusNotModified was returned.
  6835  func (c *ResourceRecordSetsGetCall) Do(opts ...googleapi.CallOption) (*ResourceRecordSet, error) {
  6836  	gensupport.SetOptions(c.urlParams_, opts...)
  6837  	res, err := c.doRequest("json")
  6838  	if res != nil && res.StatusCode == http.StatusNotModified {
  6839  		if res.Body != nil {
  6840  			res.Body.Close()
  6841  		}
  6842  		return nil, &googleapi.Error{
  6843  			Code:   res.StatusCode,
  6844  			Header: res.Header,
  6845  		}
  6846  	}
  6847  	if err != nil {
  6848  		return nil, err
  6849  	}
  6850  	defer googleapi.CloseBody(res)
  6851  	if err := googleapi.CheckResponse(res); err != nil {
  6852  		return nil, err
  6853  	}
  6854  	ret := &ResourceRecordSet{
  6855  		ServerResponse: googleapi.ServerResponse{
  6856  			Header:         res.Header,
  6857  			HTTPStatusCode: res.StatusCode,
  6858  		},
  6859  	}
  6860  	target := &ret
  6861  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6862  		return nil, err
  6863  	}
  6864  	return ret, nil
  6865  	// {
  6866  	//   "description": "Fetches the representation of an existing ResourceRecordSet.",
  6867  	//   "flatPath": "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/rrsets/{name}/{type}",
  6868  	//   "httpMethod": "GET",
  6869  	//   "id": "dns.resourceRecordSets.get",
  6870  	//   "parameterOrder": [
  6871  	//     "project",
  6872  	//     "location",
  6873  	//     "managedZone",
  6874  	//     "name",
  6875  	//     "type"
  6876  	//   ],
  6877  	//   "parameters": {
  6878  	//     "clientOperationId": {
  6879  	//       "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.",
  6880  	//       "location": "query",
  6881  	//       "type": "string"
  6882  	//     },
  6883  	//     "location": {
  6884  	//       "default": "global",
  6885  	//       "description": "Specifies the location of the resource. This information will be used for routing and will be part of the resource name.",
  6886  	//       "location": "path",
  6887  	//       "required": true,
  6888  	//       "type": "string"
  6889  	//     },
  6890  	//     "managedZone": {
  6891  	//       "description": "Identifies the managed zone addressed by this request. Can be the managed zone name or ID.",
  6892  	//       "location": "path",
  6893  	//       "required": true,
  6894  	//       "type": "string"
  6895  	//     },
  6896  	//     "name": {
  6897  	//       "description": "Fully qualified domain name.",
  6898  	//       "location": "path",
  6899  	//       "required": true,
  6900  	//       "type": "string"
  6901  	//     },
  6902  	//     "project": {
  6903  	//       "description": "Identifies the project addressed by this request.",
  6904  	//       "location": "path",
  6905  	//       "required": true,
  6906  	//       "type": "string"
  6907  	//     },
  6908  	//     "type": {
  6909  	//       "description": "RRSet type.",
  6910  	//       "location": "path",
  6911  	//       "required": true,
  6912  	//       "type": "string"
  6913  	//     }
  6914  	//   },
  6915  	//   "path": "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/rrsets/{name}/{type}",
  6916  	//   "response": {
  6917  	//     "$ref": "ResourceRecordSet"
  6918  	//   },
  6919  	//   "scopes": [
  6920  	//     "https://www.googleapis.com/auth/cloud-platform",
  6921  	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
  6922  	//     "https://www.googleapis.com/auth/ndev.clouddns.readonly",
  6923  	//     "https://www.googleapis.com/auth/ndev.clouddns.readwrite"
  6924  	//   ]
  6925  	// }
  6926  
  6927  }
  6928  
  6929  // method id "dns.resourceRecordSets.list":
  6930  
  6931  type ResourceRecordSetsListCall struct {
  6932  	s            *Service
  6933  	project      string
  6934  	location     string
  6935  	managedZone  string
  6936  	urlParams_   gensupport.URLParams
  6937  	ifNoneMatch_ string
  6938  	ctx_         context.Context
  6939  	header_      http.Header
  6940  }
  6941  
  6942  // List: Enumerates ResourceRecordSets that you have created but not yet
  6943  // deleted.
  6944  //
  6945  //   - location: Specifies the location of the resource. This information
  6946  //     will be used for routing and will be part of the resource name.
  6947  //   - managedZone: Identifies the managed zone addressed by this request.
  6948  //     Can be the managed zone name or ID.
  6949  //   - project: Identifies the project addressed by this request.
  6950  func (r *ResourceRecordSetsService) List(project string, location string, managedZone string) *ResourceRecordSetsListCall {
  6951  	c := &ResourceRecordSetsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6952  	c.project = project
  6953  	c.location = location
  6954  	c.managedZone = managedZone
  6955  	return c
  6956  }
  6957  
  6958  // MaxResults sets the optional parameter "maxResults": Maximum number
  6959  // of results to be returned. If unspecified, the server decides how
  6960  // many results to return.
  6961  func (c *ResourceRecordSetsListCall) MaxResults(maxResults int64) *ResourceRecordSetsListCall {
  6962  	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  6963  	return c
  6964  }
  6965  
  6966  // Name sets the optional parameter "name": Restricts the list to return
  6967  // only records with this fully qualified domain name.
  6968  func (c *ResourceRecordSetsListCall) Name(name string) *ResourceRecordSetsListCall {
  6969  	c.urlParams_.Set("name", name)
  6970  	return c
  6971  }
  6972  
  6973  // PageToken sets the optional parameter "pageToken": A tag returned by
  6974  // a previous list request that was truncated. Use this parameter to
  6975  // continue a previous list request.
  6976  func (c *ResourceRecordSetsListCall) PageToken(pageToken string) *ResourceRecordSetsListCall {
  6977  	c.urlParams_.Set("pageToken", pageToken)
  6978  	return c
  6979  }
  6980  
  6981  // Type sets the optional parameter "type": Restricts the list to return
  6982  // only records of this type. If present, the "name" parameter must also
  6983  // be present.
  6984  func (c *ResourceRecordSetsListCall) Type(type_ string) *ResourceRecordSetsListCall {
  6985  	c.urlParams_.Set("type", type_)
  6986  	return c
  6987  }
  6988  
  6989  // Fields allows partial responses to be retrieved. See
  6990  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6991  // for more information.
  6992  func (c *ResourceRecordSetsListCall) Fields(s ...googleapi.Field) *ResourceRecordSetsListCall {
  6993  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6994  	return c
  6995  }
  6996  
  6997  // IfNoneMatch sets the optional parameter which makes the operation
  6998  // fail if the object's ETag matches the given value. This is useful for
  6999  // getting updates only after the object has changed since the last
  7000  // request. Use googleapi.IsNotModified to check whether the response
  7001  // error from Do is the result of In-None-Match.
  7002  func (c *ResourceRecordSetsListCall) IfNoneMatch(entityTag string) *ResourceRecordSetsListCall {
  7003  	c.ifNoneMatch_ = entityTag
  7004  	return c
  7005  }
  7006  
  7007  // Context sets the context to be used in this call's Do method. Any
  7008  // pending HTTP request will be aborted if the provided context is
  7009  // canceled.
  7010  func (c *ResourceRecordSetsListCall) Context(ctx context.Context) *ResourceRecordSetsListCall {
  7011  	c.ctx_ = ctx
  7012  	return c
  7013  }
  7014  
  7015  // Header returns an http.Header that can be modified by the caller to
  7016  // add HTTP headers to the request.
  7017  func (c *ResourceRecordSetsListCall) Header() http.Header {
  7018  	if c.header_ == nil {
  7019  		c.header_ = make(http.Header)
  7020  	}
  7021  	return c.header_
  7022  }
  7023  
  7024  func (c *ResourceRecordSetsListCall) doRequest(alt string) (*http.Response, error) {
  7025  	reqHeaders := make(http.Header)
  7026  	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
  7027  	for k, v := range c.header_ {
  7028  		reqHeaders[k] = v
  7029  	}
  7030  	reqHeaders.Set("User-Agent", c.s.userAgent())
  7031  	if c.ifNoneMatch_ != "" {
  7032  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7033  	}
  7034  	var body io.Reader = nil
  7035  	c.urlParams_.Set("alt", alt)
  7036  	c.urlParams_.Set("prettyPrint", "false")
  7037  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/rrsets")
  7038  	urls += "?" + c.urlParams_.Encode()
  7039  	req, err := http.NewRequest("GET", urls, body)
  7040  	if err != nil {
  7041  		return nil, err
  7042  	}
  7043  	req.Header = reqHeaders
  7044  	googleapi.Expand(req.URL, map[string]string{
  7045  		"project":     c.project,
  7046  		"location":    c.location,
  7047  		"managedZone": c.managedZone,
  7048  	})
  7049  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7050  }
  7051  
  7052  // Do executes the "dns.resourceRecordSets.list" call.
  7053  // Exactly one of *ResourceRecordSetsListResponse or error will be
  7054  // non-nil. Any non-2xx status code is an error. Response headers are in
  7055  // either *ResourceRecordSetsListResponse.ServerResponse.Header or (if a
  7056  // response was returned at all) in error.(*googleapi.Error).Header. Use
  7057  // googleapi.IsNotModified to check whether the returned error was
  7058  // because http.StatusNotModified was returned.
  7059  func (c *ResourceRecordSetsListCall) Do(opts ...googleapi.CallOption) (*ResourceRecordSetsListResponse, error) {
  7060  	gensupport.SetOptions(c.urlParams_, opts...)
  7061  	res, err := c.doRequest("json")
  7062  	if res != nil && res.StatusCode == http.StatusNotModified {
  7063  		if res.Body != nil {
  7064  			res.Body.Close()
  7065  		}
  7066  		return nil, &googleapi.Error{
  7067  			Code:   res.StatusCode,
  7068  			Header: res.Header,
  7069  		}
  7070  	}
  7071  	if err != nil {
  7072  		return nil, err
  7073  	}
  7074  	defer googleapi.CloseBody(res)
  7075  	if err := googleapi.CheckResponse(res); err != nil {
  7076  		return nil, err
  7077  	}
  7078  	ret := &ResourceRecordSetsListResponse{
  7079  		ServerResponse: googleapi.ServerResponse{
  7080  			Header:         res.Header,
  7081  			HTTPStatusCode: res.StatusCode,
  7082  		},
  7083  	}
  7084  	target := &ret
  7085  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7086  		return nil, err
  7087  	}
  7088  	return ret, nil
  7089  	// {
  7090  	//   "description": "Enumerates ResourceRecordSets that you have created but not yet deleted.",
  7091  	//   "flatPath": "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/rrsets",
  7092  	//   "httpMethod": "GET",
  7093  	//   "id": "dns.resourceRecordSets.list",
  7094  	//   "parameterOrder": [
  7095  	//     "project",
  7096  	//     "location",
  7097  	//     "managedZone"
  7098  	//   ],
  7099  	//   "parameters": {
  7100  	//     "location": {
  7101  	//       "default": "global",
  7102  	//       "description": "Specifies the location of the resource. This information will be used for routing and will be part of the resource name.",
  7103  	//       "location": "path",
  7104  	//       "required": true,
  7105  	//       "type": "string"
  7106  	//     },
  7107  	//     "managedZone": {
  7108  	//       "description": "Identifies the managed zone addressed by this request. Can be the managed zone name or ID.",
  7109  	//       "location": "path",
  7110  	//       "required": true,
  7111  	//       "type": "string"
  7112  	//     },
  7113  	//     "maxResults": {
  7114  	//       "description": "Optional. Maximum number of results to be returned. If unspecified, the server decides how many results to return.",
  7115  	//       "format": "int32",
  7116  	//       "location": "query",
  7117  	//       "type": "integer"
  7118  	//     },
  7119  	//     "name": {
  7120  	//       "description": "Restricts the list to return only records with this fully qualified domain name.",
  7121  	//       "location": "query",
  7122  	//       "type": "string"
  7123  	//     },
  7124  	//     "pageToken": {
  7125  	//       "description": "Optional. A tag returned by a previous list request that was truncated. Use this parameter to continue a previous list request.",
  7126  	//       "location": "query",
  7127  	//       "type": "string"
  7128  	//     },
  7129  	//     "project": {
  7130  	//       "description": "Identifies the project addressed by this request.",
  7131  	//       "location": "path",
  7132  	//       "required": true,
  7133  	//       "type": "string"
  7134  	//     },
  7135  	//     "type": {
  7136  	//       "description": "Restricts the list to return only records of this type. If present, the \"name\" parameter must also be present.",
  7137  	//       "location": "query",
  7138  	//       "type": "string"
  7139  	//     }
  7140  	//   },
  7141  	//   "path": "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/rrsets",
  7142  	//   "response": {
  7143  	//     "$ref": "ResourceRecordSetsListResponse"
  7144  	//   },
  7145  	//   "scopes": [
  7146  	//     "https://www.googleapis.com/auth/cloud-platform",
  7147  	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
  7148  	//     "https://www.googleapis.com/auth/ndev.clouddns.readonly",
  7149  	//     "https://www.googleapis.com/auth/ndev.clouddns.readwrite"
  7150  	//   ]
  7151  	// }
  7152  
  7153  }
  7154  
  7155  // Pages invokes f for each page of results.
  7156  // A non-nil error returned from f will halt the iteration.
  7157  // The provided context supersedes any context provided to the Context method.
  7158  func (c *ResourceRecordSetsListCall) Pages(ctx context.Context, f func(*ResourceRecordSetsListResponse) error) error {
  7159  	c.ctx_ = ctx
  7160  	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  7161  	for {
  7162  		x, err := c.Do()
  7163  		if err != nil {
  7164  			return err
  7165  		}
  7166  		if err := f(x); err != nil {
  7167  			return err
  7168  		}
  7169  		if x.NextPageToken == "" {
  7170  			return nil
  7171  		}
  7172  		c.PageToken(x.NextPageToken)
  7173  	}
  7174  }
  7175  
  7176  // method id "dns.resourceRecordSets.patch":
  7177  
  7178  type ResourceRecordSetsPatchCall struct {
  7179  	s                 *Service
  7180  	project           string
  7181  	location          string
  7182  	managedZone       string
  7183  	name              string
  7184  	type_             string
  7185  	resourcerecordset *ResourceRecordSet
  7186  	urlParams_        gensupport.URLParams
  7187  	ctx_              context.Context
  7188  	header_           http.Header
  7189  }
  7190  
  7191  // Patch: Applies a partial update to an existing ResourceRecordSet.
  7192  //
  7193  //   - location: Specifies the location of the resource. This information
  7194  //     will be used for routing and will be part of the resource name.
  7195  //   - managedZone: Identifies the managed zone addressed by this request.
  7196  //     Can be the managed zone name or ID.
  7197  //   - name: Fully qualified domain name.
  7198  //   - project: Identifies the project addressed by this request.
  7199  //   - type: RRSet type.
  7200  func (r *ResourceRecordSetsService) Patch(project string, location string, managedZone string, name string, type_ string, resourcerecordset *ResourceRecordSet) *ResourceRecordSetsPatchCall {
  7201  	c := &ResourceRecordSetsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7202  	c.project = project
  7203  	c.location = location
  7204  	c.managedZone = managedZone
  7205  	c.name = name
  7206  	c.type_ = type_
  7207  	c.resourcerecordset = resourcerecordset
  7208  	return c
  7209  }
  7210  
  7211  // ClientOperationId sets the optional parameter "clientOperationId":
  7212  // For mutating operation requests only. An optional identifier
  7213  // specified by the client. Must be unique for operation resources in
  7214  // the Operations collection.
  7215  func (c *ResourceRecordSetsPatchCall) ClientOperationId(clientOperationId string) *ResourceRecordSetsPatchCall {
  7216  	c.urlParams_.Set("clientOperationId", clientOperationId)
  7217  	return c
  7218  }
  7219  
  7220  // Fields allows partial responses to be retrieved. See
  7221  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7222  // for more information.
  7223  func (c *ResourceRecordSetsPatchCall) Fields(s ...googleapi.Field) *ResourceRecordSetsPatchCall {
  7224  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7225  	return c
  7226  }
  7227  
  7228  // Context sets the context to be used in this call's Do method. Any
  7229  // pending HTTP request will be aborted if the provided context is
  7230  // canceled.
  7231  func (c *ResourceRecordSetsPatchCall) Context(ctx context.Context) *ResourceRecordSetsPatchCall {
  7232  	c.ctx_ = ctx
  7233  	return c
  7234  }
  7235  
  7236  // Header returns an http.Header that can be modified by the caller to
  7237  // add HTTP headers to the request.
  7238  func (c *ResourceRecordSetsPatchCall) Header() http.Header {
  7239  	if c.header_ == nil {
  7240  		c.header_ = make(http.Header)
  7241  	}
  7242  	return c.header_
  7243  }
  7244  
  7245  func (c *ResourceRecordSetsPatchCall) doRequest(alt string) (*http.Response, error) {
  7246  	reqHeaders := make(http.Header)
  7247  	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
  7248  	for k, v := range c.header_ {
  7249  		reqHeaders[k] = v
  7250  	}
  7251  	reqHeaders.Set("User-Agent", c.s.userAgent())
  7252  	var body io.Reader = nil
  7253  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.resourcerecordset)
  7254  	if err != nil {
  7255  		return nil, err
  7256  	}
  7257  	reqHeaders.Set("Content-Type", "application/json")
  7258  	c.urlParams_.Set("alt", alt)
  7259  	c.urlParams_.Set("prettyPrint", "false")
  7260  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/rrsets/{name}/{type}")
  7261  	urls += "?" + c.urlParams_.Encode()
  7262  	req, err := http.NewRequest("PATCH", urls, body)
  7263  	if err != nil {
  7264  		return nil, err
  7265  	}
  7266  	req.Header = reqHeaders
  7267  	googleapi.Expand(req.URL, map[string]string{
  7268  		"project":     c.project,
  7269  		"location":    c.location,
  7270  		"managedZone": c.managedZone,
  7271  		"name":        c.name,
  7272  		"type":        c.type_,
  7273  	})
  7274  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7275  }
  7276  
  7277  // Do executes the "dns.resourceRecordSets.patch" call.
  7278  // Exactly one of *ResourceRecordSet or error will be non-nil. Any
  7279  // non-2xx status code is an error. Response headers are in either
  7280  // *ResourceRecordSet.ServerResponse.Header or (if a response was
  7281  // returned at all) in error.(*googleapi.Error).Header. Use
  7282  // googleapi.IsNotModified to check whether the returned error was
  7283  // because http.StatusNotModified was returned.
  7284  func (c *ResourceRecordSetsPatchCall) Do(opts ...googleapi.CallOption) (*ResourceRecordSet, error) {
  7285  	gensupport.SetOptions(c.urlParams_, opts...)
  7286  	res, err := c.doRequest("json")
  7287  	if res != nil && res.StatusCode == http.StatusNotModified {
  7288  		if res.Body != nil {
  7289  			res.Body.Close()
  7290  		}
  7291  		return nil, &googleapi.Error{
  7292  			Code:   res.StatusCode,
  7293  			Header: res.Header,
  7294  		}
  7295  	}
  7296  	if err != nil {
  7297  		return nil, err
  7298  	}
  7299  	defer googleapi.CloseBody(res)
  7300  	if err := googleapi.CheckResponse(res); err != nil {
  7301  		return nil, err
  7302  	}
  7303  	ret := &ResourceRecordSet{
  7304  		ServerResponse: googleapi.ServerResponse{
  7305  			Header:         res.Header,
  7306  			HTTPStatusCode: res.StatusCode,
  7307  		},
  7308  	}
  7309  	target := &ret
  7310  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7311  		return nil, err
  7312  	}
  7313  	return ret, nil
  7314  	// {
  7315  	//   "description": "Applies a partial update to an existing ResourceRecordSet.",
  7316  	//   "flatPath": "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/rrsets/{name}/{type}",
  7317  	//   "httpMethod": "PATCH",
  7318  	//   "id": "dns.resourceRecordSets.patch",
  7319  	//   "parameterOrder": [
  7320  	//     "project",
  7321  	//     "location",
  7322  	//     "managedZone",
  7323  	//     "name",
  7324  	//     "type"
  7325  	//   ],
  7326  	//   "parameters": {
  7327  	//     "clientOperationId": {
  7328  	//       "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.",
  7329  	//       "location": "query",
  7330  	//       "type": "string"
  7331  	//     },
  7332  	//     "location": {
  7333  	//       "default": "global",
  7334  	//       "description": "Specifies the location of the resource. This information will be used for routing and will be part of the resource name.",
  7335  	//       "location": "path",
  7336  	//       "required": true,
  7337  	//       "type": "string"
  7338  	//     },
  7339  	//     "managedZone": {
  7340  	//       "description": "Identifies the managed zone addressed by this request. Can be the managed zone name or ID.",
  7341  	//       "location": "path",
  7342  	//       "required": true,
  7343  	//       "type": "string"
  7344  	//     },
  7345  	//     "name": {
  7346  	//       "description": "Fully qualified domain name.",
  7347  	//       "location": "path",
  7348  	//       "required": true,
  7349  	//       "type": "string"
  7350  	//     },
  7351  	//     "project": {
  7352  	//       "description": "Identifies the project addressed by this request.",
  7353  	//       "location": "path",
  7354  	//       "required": true,
  7355  	//       "type": "string"
  7356  	//     },
  7357  	//     "type": {
  7358  	//       "description": "RRSet type.",
  7359  	//       "location": "path",
  7360  	//       "required": true,
  7361  	//       "type": "string"
  7362  	//     }
  7363  	//   },
  7364  	//   "path": "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/rrsets/{name}/{type}",
  7365  	//   "request": {
  7366  	//     "$ref": "ResourceRecordSet"
  7367  	//   },
  7368  	//   "response": {
  7369  	//     "$ref": "ResourceRecordSet"
  7370  	//   },
  7371  	//   "scopes": [
  7372  	//     "https://www.googleapis.com/auth/cloud-platform",
  7373  	//     "https://www.googleapis.com/auth/ndev.clouddns.readwrite"
  7374  	//   ]
  7375  	// }
  7376  
  7377  }
  7378  
  7379  // method id "dns.responsePolicies.create":
  7380  
  7381  type ResponsePoliciesCreateCall struct {
  7382  	s              *Service
  7383  	project        string
  7384  	location       string
  7385  	responsepolicy *ResponsePolicy
  7386  	urlParams_     gensupport.URLParams
  7387  	ctx_           context.Context
  7388  	header_        http.Header
  7389  }
  7390  
  7391  // Create: Creates a new Response Policy
  7392  //
  7393  //   - location: Specifies the location of the resource, only applicable
  7394  //     in the v APIs. This information will be used for routing and will
  7395  //     be part of the resource name.
  7396  //   - project: Identifies the project addressed by this request.
  7397  func (r *ResponsePoliciesService) Create(project string, location string, responsepolicy *ResponsePolicy) *ResponsePoliciesCreateCall {
  7398  	c := &ResponsePoliciesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7399  	c.project = project
  7400  	c.location = location
  7401  	c.responsepolicy = responsepolicy
  7402  	return c
  7403  }
  7404  
  7405  // ClientOperationId sets the optional parameter "clientOperationId":
  7406  // For mutating operation requests only. An optional identifier
  7407  // specified by the client. Must be unique for operation resources in
  7408  // the Operations collection.
  7409  func (c *ResponsePoliciesCreateCall) ClientOperationId(clientOperationId string) *ResponsePoliciesCreateCall {
  7410  	c.urlParams_.Set("clientOperationId", clientOperationId)
  7411  	return c
  7412  }
  7413  
  7414  // Fields allows partial responses to be retrieved. See
  7415  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7416  // for more information.
  7417  func (c *ResponsePoliciesCreateCall) Fields(s ...googleapi.Field) *ResponsePoliciesCreateCall {
  7418  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7419  	return c
  7420  }
  7421  
  7422  // Context sets the context to be used in this call's Do method. Any
  7423  // pending HTTP request will be aborted if the provided context is
  7424  // canceled.
  7425  func (c *ResponsePoliciesCreateCall) Context(ctx context.Context) *ResponsePoliciesCreateCall {
  7426  	c.ctx_ = ctx
  7427  	return c
  7428  }
  7429  
  7430  // Header returns an http.Header that can be modified by the caller to
  7431  // add HTTP headers to the request.
  7432  func (c *ResponsePoliciesCreateCall) Header() http.Header {
  7433  	if c.header_ == nil {
  7434  		c.header_ = make(http.Header)
  7435  	}
  7436  	return c.header_
  7437  }
  7438  
  7439  func (c *ResponsePoliciesCreateCall) doRequest(alt string) (*http.Response, error) {
  7440  	reqHeaders := make(http.Header)
  7441  	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
  7442  	for k, v := range c.header_ {
  7443  		reqHeaders[k] = v
  7444  	}
  7445  	reqHeaders.Set("User-Agent", c.s.userAgent())
  7446  	var body io.Reader = nil
  7447  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.responsepolicy)
  7448  	if err != nil {
  7449  		return nil, err
  7450  	}
  7451  	reqHeaders.Set("Content-Type", "application/json")
  7452  	c.urlParams_.Set("alt", alt)
  7453  	c.urlParams_.Set("prettyPrint", "false")
  7454  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v2/projects/{project}/locations/{location}/responsePolicies")
  7455  	urls += "?" + c.urlParams_.Encode()
  7456  	req, err := http.NewRequest("POST", urls, body)
  7457  	if err != nil {
  7458  		return nil, err
  7459  	}
  7460  	req.Header = reqHeaders
  7461  	googleapi.Expand(req.URL, map[string]string{
  7462  		"project":  c.project,
  7463  		"location": c.location,
  7464  	})
  7465  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7466  }
  7467  
  7468  // Do executes the "dns.responsePolicies.create" call.
  7469  // Exactly one of *ResponsePolicy or error will be non-nil. Any non-2xx
  7470  // status code is an error. Response headers are in either
  7471  // *ResponsePolicy.ServerResponse.Header or (if a response was returned
  7472  // at all) in error.(*googleapi.Error).Header. Use
  7473  // googleapi.IsNotModified to check whether the returned error was
  7474  // because http.StatusNotModified was returned.
  7475  func (c *ResponsePoliciesCreateCall) Do(opts ...googleapi.CallOption) (*ResponsePolicy, error) {
  7476  	gensupport.SetOptions(c.urlParams_, opts...)
  7477  	res, err := c.doRequest("json")
  7478  	if res != nil && res.StatusCode == http.StatusNotModified {
  7479  		if res.Body != nil {
  7480  			res.Body.Close()
  7481  		}
  7482  		return nil, &googleapi.Error{
  7483  			Code:   res.StatusCode,
  7484  			Header: res.Header,
  7485  		}
  7486  	}
  7487  	if err != nil {
  7488  		return nil, err
  7489  	}
  7490  	defer googleapi.CloseBody(res)
  7491  	if err := googleapi.CheckResponse(res); err != nil {
  7492  		return nil, err
  7493  	}
  7494  	ret := &ResponsePolicy{
  7495  		ServerResponse: googleapi.ServerResponse{
  7496  			Header:         res.Header,
  7497  			HTTPStatusCode: res.StatusCode,
  7498  		},
  7499  	}
  7500  	target := &ret
  7501  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7502  		return nil, err
  7503  	}
  7504  	return ret, nil
  7505  	// {
  7506  	//   "description": "Creates a new Response Policy",
  7507  	//   "flatPath": "dns/v2/projects/{project}/locations/{location}/responsePolicies",
  7508  	//   "httpMethod": "POST",
  7509  	//   "id": "dns.responsePolicies.create",
  7510  	//   "parameterOrder": [
  7511  	//     "project",
  7512  	//     "location"
  7513  	//   ],
  7514  	//   "parameters": {
  7515  	//     "clientOperationId": {
  7516  	//       "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.",
  7517  	//       "location": "query",
  7518  	//       "type": "string"
  7519  	//     },
  7520  	//     "location": {
  7521  	//       "default": "global",
  7522  	//       "description": "Specifies the location of the resource, only applicable in the v APIs. This information will be used for routing and will be part of the resource name.",
  7523  	//       "location": "path",
  7524  	//       "required": true,
  7525  	//       "type": "string"
  7526  	//     },
  7527  	//     "project": {
  7528  	//       "description": "Identifies the project addressed by this request.",
  7529  	//       "location": "path",
  7530  	//       "required": true,
  7531  	//       "type": "string"
  7532  	//     }
  7533  	//   },
  7534  	//   "path": "dns/v2/projects/{project}/locations/{location}/responsePolicies",
  7535  	//   "request": {
  7536  	//     "$ref": "ResponsePolicy"
  7537  	//   },
  7538  	//   "response": {
  7539  	//     "$ref": "ResponsePolicy"
  7540  	//   },
  7541  	//   "scopes": [
  7542  	//     "https://www.googleapis.com/auth/cloud-platform",
  7543  	//     "https://www.googleapis.com/auth/ndev.clouddns.readwrite"
  7544  	//   ]
  7545  	// }
  7546  
  7547  }
  7548  
  7549  // method id "dns.responsePolicies.delete":
  7550  
  7551  type ResponsePoliciesDeleteCall struct {
  7552  	s              *Service
  7553  	project        string
  7554  	location       string
  7555  	responsePolicy string
  7556  	urlParams_     gensupport.URLParams
  7557  	ctx_           context.Context
  7558  	header_        http.Header
  7559  }
  7560  
  7561  // Delete: Deletes a previously created Response Policy. Fails if the
  7562  // response policy is non-empty or still being referenced by a network.
  7563  //
  7564  //   - location: Specifies the location of the resource. This information
  7565  //     will be used for routing and will be part of the resource name.
  7566  //   - project: Identifies the project addressed by this request.
  7567  //   - responsePolicy: User assigned name of the Response Policy addressed
  7568  //     by this request.
  7569  func (r *ResponsePoliciesService) Delete(project string, location string, responsePolicy string) *ResponsePoliciesDeleteCall {
  7570  	c := &ResponsePoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7571  	c.project = project
  7572  	c.location = location
  7573  	c.responsePolicy = responsePolicy
  7574  	return c
  7575  }
  7576  
  7577  // ClientOperationId sets the optional parameter "clientOperationId":
  7578  // For mutating operation requests only. An optional identifier
  7579  // specified by the client. Must be unique for operation resources in
  7580  // the Operations collection.
  7581  func (c *ResponsePoliciesDeleteCall) ClientOperationId(clientOperationId string) *ResponsePoliciesDeleteCall {
  7582  	c.urlParams_.Set("clientOperationId", clientOperationId)
  7583  	return c
  7584  }
  7585  
  7586  // Fields allows partial responses to be retrieved. See
  7587  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7588  // for more information.
  7589  func (c *ResponsePoliciesDeleteCall) Fields(s ...googleapi.Field) *ResponsePoliciesDeleteCall {
  7590  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7591  	return c
  7592  }
  7593  
  7594  // Context sets the context to be used in this call's Do method. Any
  7595  // pending HTTP request will be aborted if the provided context is
  7596  // canceled.
  7597  func (c *ResponsePoliciesDeleteCall) Context(ctx context.Context) *ResponsePoliciesDeleteCall {
  7598  	c.ctx_ = ctx
  7599  	return c
  7600  }
  7601  
  7602  // Header returns an http.Header that can be modified by the caller to
  7603  // add HTTP headers to the request.
  7604  func (c *ResponsePoliciesDeleteCall) Header() http.Header {
  7605  	if c.header_ == nil {
  7606  		c.header_ = make(http.Header)
  7607  	}
  7608  	return c.header_
  7609  }
  7610  
  7611  func (c *ResponsePoliciesDeleteCall) doRequest(alt string) (*http.Response, error) {
  7612  	reqHeaders := make(http.Header)
  7613  	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
  7614  	for k, v := range c.header_ {
  7615  		reqHeaders[k] = v
  7616  	}
  7617  	reqHeaders.Set("User-Agent", c.s.userAgent())
  7618  	var body io.Reader = nil
  7619  	c.urlParams_.Set("alt", alt)
  7620  	c.urlParams_.Set("prettyPrint", "false")
  7621  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v2/projects/{project}/locations/{location}/responsePolicies/{responsePolicy}")
  7622  	urls += "?" + c.urlParams_.Encode()
  7623  	req, err := http.NewRequest("DELETE", urls, body)
  7624  	if err != nil {
  7625  		return nil, err
  7626  	}
  7627  	req.Header = reqHeaders
  7628  	googleapi.Expand(req.URL, map[string]string{
  7629  		"project":        c.project,
  7630  		"location":       c.location,
  7631  		"responsePolicy": c.responsePolicy,
  7632  	})
  7633  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7634  }
  7635  
  7636  // Do executes the "dns.responsePolicies.delete" call.
  7637  func (c *ResponsePoliciesDeleteCall) Do(opts ...googleapi.CallOption) error {
  7638  	gensupport.SetOptions(c.urlParams_, opts...)
  7639  	res, err := c.doRequest("json")
  7640  	if err != nil {
  7641  		return err
  7642  	}
  7643  	defer googleapi.CloseBody(res)
  7644  	if err := googleapi.CheckResponse(res); err != nil {
  7645  		return err
  7646  	}
  7647  	return nil
  7648  	// {
  7649  	//   "description": "Deletes a previously created Response Policy. Fails if the response policy is non-empty or still being referenced by a network.",
  7650  	//   "flatPath": "dns/v2/projects/{project}/locations/{location}/responsePolicies/{responsePolicy}",
  7651  	//   "httpMethod": "DELETE",
  7652  	//   "id": "dns.responsePolicies.delete",
  7653  	//   "parameterOrder": [
  7654  	//     "project",
  7655  	//     "location",
  7656  	//     "responsePolicy"
  7657  	//   ],
  7658  	//   "parameters": {
  7659  	//     "clientOperationId": {
  7660  	//       "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.",
  7661  	//       "location": "query",
  7662  	//       "type": "string"
  7663  	//     },
  7664  	//     "location": {
  7665  	//       "default": "global",
  7666  	//       "description": "Specifies the location of the resource. This information will be used for routing and will be part of the resource name.",
  7667  	//       "location": "path",
  7668  	//       "required": true,
  7669  	//       "type": "string"
  7670  	//     },
  7671  	//     "project": {
  7672  	//       "description": "Identifies the project addressed by this request.",
  7673  	//       "location": "path",
  7674  	//       "required": true,
  7675  	//       "type": "string"
  7676  	//     },
  7677  	//     "responsePolicy": {
  7678  	//       "description": "User assigned name of the Response Policy addressed by this request.",
  7679  	//       "location": "path",
  7680  	//       "required": true,
  7681  	//       "type": "string"
  7682  	//     }
  7683  	//   },
  7684  	//   "path": "dns/v2/projects/{project}/locations/{location}/responsePolicies/{responsePolicy}",
  7685  	//   "scopes": [
  7686  	//     "https://www.googleapis.com/auth/cloud-platform",
  7687  	//     "https://www.googleapis.com/auth/ndev.clouddns.readwrite"
  7688  	//   ]
  7689  	// }
  7690  
  7691  }
  7692  
  7693  // method id "dns.responsePolicies.get":
  7694  
  7695  type ResponsePoliciesGetCall struct {
  7696  	s              *Service
  7697  	project        string
  7698  	location       string
  7699  	responsePolicy string
  7700  	urlParams_     gensupport.URLParams
  7701  	ifNoneMatch_   string
  7702  	ctx_           context.Context
  7703  	header_        http.Header
  7704  }
  7705  
  7706  // Get: Fetches the representation of an existing Response Policy.
  7707  //
  7708  //   - location: Specifies the location of the resource. This information
  7709  //     will be used for routing and will be part of the resource name.
  7710  //   - project: Identifies the project addressed by this request.
  7711  //   - responsePolicy: User assigned name of the Response Policy addressed
  7712  //     by this request.
  7713  func (r *ResponsePoliciesService) Get(project string, location string, responsePolicy string) *ResponsePoliciesGetCall {
  7714  	c := &ResponsePoliciesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7715  	c.project = project
  7716  	c.location = location
  7717  	c.responsePolicy = responsePolicy
  7718  	return c
  7719  }
  7720  
  7721  // ClientOperationId sets the optional parameter "clientOperationId":
  7722  // For mutating operation requests only. An optional identifier
  7723  // specified by the client. Must be unique for operation resources in
  7724  // the Operations collection.
  7725  func (c *ResponsePoliciesGetCall) ClientOperationId(clientOperationId string) *ResponsePoliciesGetCall {
  7726  	c.urlParams_.Set("clientOperationId", clientOperationId)
  7727  	return c
  7728  }
  7729  
  7730  // Fields allows partial responses to be retrieved. See
  7731  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7732  // for more information.
  7733  func (c *ResponsePoliciesGetCall) Fields(s ...googleapi.Field) *ResponsePoliciesGetCall {
  7734  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7735  	return c
  7736  }
  7737  
  7738  // IfNoneMatch sets the optional parameter which makes the operation
  7739  // fail if the object's ETag matches the given value. This is useful for
  7740  // getting updates only after the object has changed since the last
  7741  // request. Use googleapi.IsNotModified to check whether the response
  7742  // error from Do is the result of In-None-Match.
  7743  func (c *ResponsePoliciesGetCall) IfNoneMatch(entityTag string) *ResponsePoliciesGetCall {
  7744  	c.ifNoneMatch_ = entityTag
  7745  	return c
  7746  }
  7747  
  7748  // Context sets the context to be used in this call's Do method. Any
  7749  // pending HTTP request will be aborted if the provided context is
  7750  // canceled.
  7751  func (c *ResponsePoliciesGetCall) Context(ctx context.Context) *ResponsePoliciesGetCall {
  7752  	c.ctx_ = ctx
  7753  	return c
  7754  }
  7755  
  7756  // Header returns an http.Header that can be modified by the caller to
  7757  // add HTTP headers to the request.
  7758  func (c *ResponsePoliciesGetCall) Header() http.Header {
  7759  	if c.header_ == nil {
  7760  		c.header_ = make(http.Header)
  7761  	}
  7762  	return c.header_
  7763  }
  7764  
  7765  func (c *ResponsePoliciesGetCall) doRequest(alt string) (*http.Response, error) {
  7766  	reqHeaders := make(http.Header)
  7767  	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
  7768  	for k, v := range c.header_ {
  7769  		reqHeaders[k] = v
  7770  	}
  7771  	reqHeaders.Set("User-Agent", c.s.userAgent())
  7772  	if c.ifNoneMatch_ != "" {
  7773  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7774  	}
  7775  	var body io.Reader = nil
  7776  	c.urlParams_.Set("alt", alt)
  7777  	c.urlParams_.Set("prettyPrint", "false")
  7778  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v2/projects/{project}/locations/{location}/responsePolicies/{responsePolicy}")
  7779  	urls += "?" + c.urlParams_.Encode()
  7780  	req, err := http.NewRequest("GET", urls, body)
  7781  	if err != nil {
  7782  		return nil, err
  7783  	}
  7784  	req.Header = reqHeaders
  7785  	googleapi.Expand(req.URL, map[string]string{
  7786  		"project":        c.project,
  7787  		"location":       c.location,
  7788  		"responsePolicy": c.responsePolicy,
  7789  	})
  7790  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7791  }
  7792  
  7793  // Do executes the "dns.responsePolicies.get" call.
  7794  // Exactly one of *ResponsePolicy or error will be non-nil. Any non-2xx
  7795  // status code is an error. Response headers are in either
  7796  // *ResponsePolicy.ServerResponse.Header or (if a response was returned
  7797  // at all) in error.(*googleapi.Error).Header. Use
  7798  // googleapi.IsNotModified to check whether the returned error was
  7799  // because http.StatusNotModified was returned.
  7800  func (c *ResponsePoliciesGetCall) Do(opts ...googleapi.CallOption) (*ResponsePolicy, error) {
  7801  	gensupport.SetOptions(c.urlParams_, opts...)
  7802  	res, err := c.doRequest("json")
  7803  	if res != nil && res.StatusCode == http.StatusNotModified {
  7804  		if res.Body != nil {
  7805  			res.Body.Close()
  7806  		}
  7807  		return nil, &googleapi.Error{
  7808  			Code:   res.StatusCode,
  7809  			Header: res.Header,
  7810  		}
  7811  	}
  7812  	if err != nil {
  7813  		return nil, err
  7814  	}
  7815  	defer googleapi.CloseBody(res)
  7816  	if err := googleapi.CheckResponse(res); err != nil {
  7817  		return nil, err
  7818  	}
  7819  	ret := &ResponsePolicy{
  7820  		ServerResponse: googleapi.ServerResponse{
  7821  			Header:         res.Header,
  7822  			HTTPStatusCode: res.StatusCode,
  7823  		},
  7824  	}
  7825  	target := &ret
  7826  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7827  		return nil, err
  7828  	}
  7829  	return ret, nil
  7830  	// {
  7831  	//   "description": "Fetches the representation of an existing Response Policy.",
  7832  	//   "flatPath": "dns/v2/projects/{project}/locations/{location}/responsePolicies/{responsePolicy}",
  7833  	//   "httpMethod": "GET",
  7834  	//   "id": "dns.responsePolicies.get",
  7835  	//   "parameterOrder": [
  7836  	//     "project",
  7837  	//     "location",
  7838  	//     "responsePolicy"
  7839  	//   ],
  7840  	//   "parameters": {
  7841  	//     "clientOperationId": {
  7842  	//       "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.",
  7843  	//       "location": "query",
  7844  	//       "type": "string"
  7845  	//     },
  7846  	//     "location": {
  7847  	//       "default": "global",
  7848  	//       "description": "Specifies the location of the resource. This information will be used for routing and will be part of the resource name.",
  7849  	//       "location": "path",
  7850  	//       "required": true,
  7851  	//       "type": "string"
  7852  	//     },
  7853  	//     "project": {
  7854  	//       "description": "Identifies the project addressed by this request.",
  7855  	//       "location": "path",
  7856  	//       "required": true,
  7857  	//       "type": "string"
  7858  	//     },
  7859  	//     "responsePolicy": {
  7860  	//       "description": "User assigned name of the Response Policy addressed by this request.",
  7861  	//       "location": "path",
  7862  	//       "required": true,
  7863  	//       "type": "string"
  7864  	//     }
  7865  	//   },
  7866  	//   "path": "dns/v2/projects/{project}/locations/{location}/responsePolicies/{responsePolicy}",
  7867  	//   "response": {
  7868  	//     "$ref": "ResponsePolicy"
  7869  	//   },
  7870  	//   "scopes": [
  7871  	//     "https://www.googleapis.com/auth/cloud-platform",
  7872  	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
  7873  	//     "https://www.googleapis.com/auth/ndev.clouddns.readonly",
  7874  	//     "https://www.googleapis.com/auth/ndev.clouddns.readwrite"
  7875  	//   ]
  7876  	// }
  7877  
  7878  }
  7879  
  7880  // method id "dns.responsePolicies.list":
  7881  
  7882  type ResponsePoliciesListCall struct {
  7883  	s            *Service
  7884  	project      string
  7885  	location     string
  7886  	urlParams_   gensupport.URLParams
  7887  	ifNoneMatch_ string
  7888  	ctx_         context.Context
  7889  	header_      http.Header
  7890  }
  7891  
  7892  // List: Enumerates all Response Policies associated with a project.
  7893  //
  7894  //   - location: Specifies the location of the resource. This information
  7895  //     will be used for routing and will be part of the resource name.
  7896  //   - project: Identifies the project addressed by this request.
  7897  func (r *ResponsePoliciesService) List(project string, location string) *ResponsePoliciesListCall {
  7898  	c := &ResponsePoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7899  	c.project = project
  7900  	c.location = location
  7901  	return c
  7902  }
  7903  
  7904  // MaxResults sets the optional parameter "maxResults": Maximum number
  7905  // of results to be returned. If unspecified, the server decides how
  7906  // many results to return.
  7907  func (c *ResponsePoliciesListCall) MaxResults(maxResults int64) *ResponsePoliciesListCall {
  7908  	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  7909  	return c
  7910  }
  7911  
  7912  // PageToken sets the optional parameter "pageToken": A tag returned by
  7913  // a previous list request that was truncated. Use this parameter to
  7914  // continue a previous list request.
  7915  func (c *ResponsePoliciesListCall) PageToken(pageToken string) *ResponsePoliciesListCall {
  7916  	c.urlParams_.Set("pageToken", pageToken)
  7917  	return c
  7918  }
  7919  
  7920  // Fields allows partial responses to be retrieved. See
  7921  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7922  // for more information.
  7923  func (c *ResponsePoliciesListCall) Fields(s ...googleapi.Field) *ResponsePoliciesListCall {
  7924  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7925  	return c
  7926  }
  7927  
  7928  // IfNoneMatch sets the optional parameter which makes the operation
  7929  // fail if the object's ETag matches the given value. This is useful for
  7930  // getting updates only after the object has changed since the last
  7931  // request. Use googleapi.IsNotModified to check whether the response
  7932  // error from Do is the result of In-None-Match.
  7933  func (c *ResponsePoliciesListCall) IfNoneMatch(entityTag string) *ResponsePoliciesListCall {
  7934  	c.ifNoneMatch_ = entityTag
  7935  	return c
  7936  }
  7937  
  7938  // Context sets the context to be used in this call's Do method. Any
  7939  // pending HTTP request will be aborted if the provided context is
  7940  // canceled.
  7941  func (c *ResponsePoliciesListCall) Context(ctx context.Context) *ResponsePoliciesListCall {
  7942  	c.ctx_ = ctx
  7943  	return c
  7944  }
  7945  
  7946  // Header returns an http.Header that can be modified by the caller to
  7947  // add HTTP headers to the request.
  7948  func (c *ResponsePoliciesListCall) Header() http.Header {
  7949  	if c.header_ == nil {
  7950  		c.header_ = make(http.Header)
  7951  	}
  7952  	return c.header_
  7953  }
  7954  
  7955  func (c *ResponsePoliciesListCall) doRequest(alt string) (*http.Response, error) {
  7956  	reqHeaders := make(http.Header)
  7957  	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
  7958  	for k, v := range c.header_ {
  7959  		reqHeaders[k] = v
  7960  	}
  7961  	reqHeaders.Set("User-Agent", c.s.userAgent())
  7962  	if c.ifNoneMatch_ != "" {
  7963  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7964  	}
  7965  	var body io.Reader = nil
  7966  	c.urlParams_.Set("alt", alt)
  7967  	c.urlParams_.Set("prettyPrint", "false")
  7968  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v2/projects/{project}/locations/{location}/responsePolicies")
  7969  	urls += "?" + c.urlParams_.Encode()
  7970  	req, err := http.NewRequest("GET", urls, body)
  7971  	if err != nil {
  7972  		return nil, err
  7973  	}
  7974  	req.Header = reqHeaders
  7975  	googleapi.Expand(req.URL, map[string]string{
  7976  		"project":  c.project,
  7977  		"location": c.location,
  7978  	})
  7979  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7980  }
  7981  
  7982  // Do executes the "dns.responsePolicies.list" call.
  7983  // Exactly one of *ResponsePoliciesListResponse or error will be
  7984  // non-nil. Any non-2xx status code is an error. Response headers are in
  7985  // either *ResponsePoliciesListResponse.ServerResponse.Header or (if a
  7986  // response was returned at all) in error.(*googleapi.Error).Header. Use
  7987  // googleapi.IsNotModified to check whether the returned error was
  7988  // because http.StatusNotModified was returned.
  7989  func (c *ResponsePoliciesListCall) Do(opts ...googleapi.CallOption) (*ResponsePoliciesListResponse, error) {
  7990  	gensupport.SetOptions(c.urlParams_, opts...)
  7991  	res, err := c.doRequest("json")
  7992  	if res != nil && res.StatusCode == http.StatusNotModified {
  7993  		if res.Body != nil {
  7994  			res.Body.Close()
  7995  		}
  7996  		return nil, &googleapi.Error{
  7997  			Code:   res.StatusCode,
  7998  			Header: res.Header,
  7999  		}
  8000  	}
  8001  	if err != nil {
  8002  		return nil, err
  8003  	}
  8004  	defer googleapi.CloseBody(res)
  8005  	if err := googleapi.CheckResponse(res); err != nil {
  8006  		return nil, err
  8007  	}
  8008  	ret := &ResponsePoliciesListResponse{
  8009  		ServerResponse: googleapi.ServerResponse{
  8010  			Header:         res.Header,
  8011  			HTTPStatusCode: res.StatusCode,
  8012  		},
  8013  	}
  8014  	target := &ret
  8015  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8016  		return nil, err
  8017  	}
  8018  	return ret, nil
  8019  	// {
  8020  	//   "description": "Enumerates all Response Policies associated with a project.",
  8021  	//   "flatPath": "dns/v2/projects/{project}/locations/{location}/responsePolicies",
  8022  	//   "httpMethod": "GET",
  8023  	//   "id": "dns.responsePolicies.list",
  8024  	//   "parameterOrder": [
  8025  	//     "project",
  8026  	//     "location"
  8027  	//   ],
  8028  	//   "parameters": {
  8029  	//     "location": {
  8030  	//       "default": "global",
  8031  	//       "description": "Specifies the location of the resource. This information will be used for routing and will be part of the resource name.",
  8032  	//       "location": "path",
  8033  	//       "required": true,
  8034  	//       "type": "string"
  8035  	//     },
  8036  	//     "maxResults": {
  8037  	//       "description": "Optional. Maximum number of results to be returned. If unspecified, the server decides how many results to return.",
  8038  	//       "format": "int32",
  8039  	//       "location": "query",
  8040  	//       "type": "integer"
  8041  	//     },
  8042  	//     "pageToken": {
  8043  	//       "description": "Optional. A tag returned by a previous list request that was truncated. Use this parameter to continue a previous list request.",
  8044  	//       "location": "query",
  8045  	//       "type": "string"
  8046  	//     },
  8047  	//     "project": {
  8048  	//       "description": "Identifies the project addressed by this request.",
  8049  	//       "location": "path",
  8050  	//       "required": true,
  8051  	//       "type": "string"
  8052  	//     }
  8053  	//   },
  8054  	//   "path": "dns/v2/projects/{project}/locations/{location}/responsePolicies",
  8055  	//   "response": {
  8056  	//     "$ref": "ResponsePoliciesListResponse"
  8057  	//   },
  8058  	//   "scopes": [
  8059  	//     "https://www.googleapis.com/auth/cloud-platform",
  8060  	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
  8061  	//     "https://www.googleapis.com/auth/ndev.clouddns.readonly",
  8062  	//     "https://www.googleapis.com/auth/ndev.clouddns.readwrite"
  8063  	//   ]
  8064  	// }
  8065  
  8066  }
  8067  
  8068  // Pages invokes f for each page of results.
  8069  // A non-nil error returned from f will halt the iteration.
  8070  // The provided context supersedes any context provided to the Context method.
  8071  func (c *ResponsePoliciesListCall) Pages(ctx context.Context, f func(*ResponsePoliciesListResponse) error) error {
  8072  	c.ctx_ = ctx
  8073  	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  8074  	for {
  8075  		x, err := c.Do()
  8076  		if err != nil {
  8077  			return err
  8078  		}
  8079  		if err := f(x); err != nil {
  8080  			return err
  8081  		}
  8082  		if x.NextPageToken == "" {
  8083  			return nil
  8084  		}
  8085  		c.PageToken(x.NextPageToken)
  8086  	}
  8087  }
  8088  
  8089  // method id "dns.responsePolicies.patch":
  8090  
  8091  type ResponsePoliciesPatchCall struct {
  8092  	s              *Service
  8093  	project        string
  8094  	location       string
  8095  	responsePolicy string
  8096  	responsepolicy *ResponsePolicy
  8097  	urlParams_     gensupport.URLParams
  8098  	ctx_           context.Context
  8099  	header_        http.Header
  8100  }
  8101  
  8102  // Patch: Applies a partial update to an existing Response Policy.
  8103  //
  8104  //   - location: Specifies the location of the resource. This information
  8105  //     will be used for routing and will be part of the resource name.
  8106  //   - project: Identifies the project addressed by this request.
  8107  //   - responsePolicy: User assigned name of the Respones Policy addressed
  8108  //     by this request.
  8109  func (r *ResponsePoliciesService) Patch(project string, location string, responsePolicy string, responsepolicy *ResponsePolicy) *ResponsePoliciesPatchCall {
  8110  	c := &ResponsePoliciesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8111  	c.project = project
  8112  	c.location = location
  8113  	c.responsePolicy = responsePolicy
  8114  	c.responsepolicy = responsepolicy
  8115  	return c
  8116  }
  8117  
  8118  // ClientOperationId sets the optional parameter "clientOperationId":
  8119  // For mutating operation requests only. An optional identifier
  8120  // specified by the client. Must be unique for operation resources in
  8121  // the Operations collection.
  8122  func (c *ResponsePoliciesPatchCall) ClientOperationId(clientOperationId string) *ResponsePoliciesPatchCall {
  8123  	c.urlParams_.Set("clientOperationId", clientOperationId)
  8124  	return c
  8125  }
  8126  
  8127  // Fields allows partial responses to be retrieved. See
  8128  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8129  // for more information.
  8130  func (c *ResponsePoliciesPatchCall) Fields(s ...googleapi.Field) *ResponsePoliciesPatchCall {
  8131  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8132  	return c
  8133  }
  8134  
  8135  // Context sets the context to be used in this call's Do method. Any
  8136  // pending HTTP request will be aborted if the provided context is
  8137  // canceled.
  8138  func (c *ResponsePoliciesPatchCall) Context(ctx context.Context) *ResponsePoliciesPatchCall {
  8139  	c.ctx_ = ctx
  8140  	return c
  8141  }
  8142  
  8143  // Header returns an http.Header that can be modified by the caller to
  8144  // add HTTP headers to the request.
  8145  func (c *ResponsePoliciesPatchCall) Header() http.Header {
  8146  	if c.header_ == nil {
  8147  		c.header_ = make(http.Header)
  8148  	}
  8149  	return c.header_
  8150  }
  8151  
  8152  func (c *ResponsePoliciesPatchCall) doRequest(alt string) (*http.Response, error) {
  8153  	reqHeaders := make(http.Header)
  8154  	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
  8155  	for k, v := range c.header_ {
  8156  		reqHeaders[k] = v
  8157  	}
  8158  	reqHeaders.Set("User-Agent", c.s.userAgent())
  8159  	var body io.Reader = nil
  8160  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.responsepolicy)
  8161  	if err != nil {
  8162  		return nil, err
  8163  	}
  8164  	reqHeaders.Set("Content-Type", "application/json")
  8165  	c.urlParams_.Set("alt", alt)
  8166  	c.urlParams_.Set("prettyPrint", "false")
  8167  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v2/projects/{project}/locations/{location}/responsePolicies/{responsePolicy}")
  8168  	urls += "?" + c.urlParams_.Encode()
  8169  	req, err := http.NewRequest("PATCH", urls, body)
  8170  	if err != nil {
  8171  		return nil, err
  8172  	}
  8173  	req.Header = reqHeaders
  8174  	googleapi.Expand(req.URL, map[string]string{
  8175  		"project":        c.project,
  8176  		"location":       c.location,
  8177  		"responsePolicy": c.responsePolicy,
  8178  	})
  8179  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8180  }
  8181  
  8182  // Do executes the "dns.responsePolicies.patch" call.
  8183  // Exactly one of *ResponsePoliciesPatchResponse or error will be
  8184  // non-nil. Any non-2xx status code is an error. Response headers are in
  8185  // either *ResponsePoliciesPatchResponse.ServerResponse.Header or (if a
  8186  // response was returned at all) in error.(*googleapi.Error).Header. Use
  8187  // googleapi.IsNotModified to check whether the returned error was
  8188  // because http.StatusNotModified was returned.
  8189  func (c *ResponsePoliciesPatchCall) Do(opts ...googleapi.CallOption) (*ResponsePoliciesPatchResponse, error) {
  8190  	gensupport.SetOptions(c.urlParams_, opts...)
  8191  	res, err := c.doRequest("json")
  8192  	if res != nil && res.StatusCode == http.StatusNotModified {
  8193  		if res.Body != nil {
  8194  			res.Body.Close()
  8195  		}
  8196  		return nil, &googleapi.Error{
  8197  			Code:   res.StatusCode,
  8198  			Header: res.Header,
  8199  		}
  8200  	}
  8201  	if err != nil {
  8202  		return nil, err
  8203  	}
  8204  	defer googleapi.CloseBody(res)
  8205  	if err := googleapi.CheckResponse(res); err != nil {
  8206  		return nil, err
  8207  	}
  8208  	ret := &ResponsePoliciesPatchResponse{
  8209  		ServerResponse: googleapi.ServerResponse{
  8210  			Header:         res.Header,
  8211  			HTTPStatusCode: res.StatusCode,
  8212  		},
  8213  	}
  8214  	target := &ret
  8215  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8216  		return nil, err
  8217  	}
  8218  	return ret, nil
  8219  	// {
  8220  	//   "description": "Applies a partial update to an existing Response Policy.",
  8221  	//   "flatPath": "dns/v2/projects/{project}/locations/{location}/responsePolicies/{responsePolicy}",
  8222  	//   "httpMethod": "PATCH",
  8223  	//   "id": "dns.responsePolicies.patch",
  8224  	//   "parameterOrder": [
  8225  	//     "project",
  8226  	//     "location",
  8227  	//     "responsePolicy"
  8228  	//   ],
  8229  	//   "parameters": {
  8230  	//     "clientOperationId": {
  8231  	//       "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.",
  8232  	//       "location": "query",
  8233  	//       "type": "string"
  8234  	//     },
  8235  	//     "location": {
  8236  	//       "default": "global",
  8237  	//       "description": "Specifies the location of the resource. This information will be used for routing and will be part of the resource name.",
  8238  	//       "location": "path",
  8239  	//       "required": true,
  8240  	//       "type": "string"
  8241  	//     },
  8242  	//     "project": {
  8243  	//       "description": "Identifies the project addressed by this request.",
  8244  	//       "location": "path",
  8245  	//       "required": true,
  8246  	//       "type": "string"
  8247  	//     },
  8248  	//     "responsePolicy": {
  8249  	//       "description": "User assigned name of the Respones Policy addressed by this request.",
  8250  	//       "location": "path",
  8251  	//       "required": true,
  8252  	//       "type": "string"
  8253  	//     }
  8254  	//   },
  8255  	//   "path": "dns/v2/projects/{project}/locations/{location}/responsePolicies/{responsePolicy}",
  8256  	//   "request": {
  8257  	//     "$ref": "ResponsePolicy"
  8258  	//   },
  8259  	//   "response": {
  8260  	//     "$ref": "ResponsePoliciesPatchResponse"
  8261  	//   },
  8262  	//   "scopes": [
  8263  	//     "https://www.googleapis.com/auth/cloud-platform",
  8264  	//     "https://www.googleapis.com/auth/ndev.clouddns.readwrite"
  8265  	//   ]
  8266  	// }
  8267  
  8268  }
  8269  
  8270  // method id "dns.responsePolicies.update":
  8271  
  8272  type ResponsePoliciesUpdateCall struct {
  8273  	s              *Service
  8274  	project        string
  8275  	location       string
  8276  	responsePolicy string
  8277  	responsepolicy *ResponsePolicy
  8278  	urlParams_     gensupport.URLParams
  8279  	ctx_           context.Context
  8280  	header_        http.Header
  8281  }
  8282  
  8283  // Update: Updates an existing Response Policy.
  8284  //
  8285  //   - location: Specifies the location of the resource. This information
  8286  //     will be used for routing and will be part of the resource name.
  8287  //   - project: Identifies the project addressed by this request.
  8288  //   - responsePolicy: User assigned name of the Response Policy addressed
  8289  //     by this request.
  8290  func (r *ResponsePoliciesService) Update(project string, location string, responsePolicy string, responsepolicy *ResponsePolicy) *ResponsePoliciesUpdateCall {
  8291  	c := &ResponsePoliciesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8292  	c.project = project
  8293  	c.location = location
  8294  	c.responsePolicy = responsePolicy
  8295  	c.responsepolicy = responsepolicy
  8296  	return c
  8297  }
  8298  
  8299  // ClientOperationId sets the optional parameter "clientOperationId":
  8300  // For mutating operation requests only. An optional identifier
  8301  // specified by the client. Must be unique for operation resources in
  8302  // the Operations collection.
  8303  func (c *ResponsePoliciesUpdateCall) ClientOperationId(clientOperationId string) *ResponsePoliciesUpdateCall {
  8304  	c.urlParams_.Set("clientOperationId", clientOperationId)
  8305  	return c
  8306  }
  8307  
  8308  // Fields allows partial responses to be retrieved. See
  8309  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8310  // for more information.
  8311  func (c *ResponsePoliciesUpdateCall) Fields(s ...googleapi.Field) *ResponsePoliciesUpdateCall {
  8312  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8313  	return c
  8314  }
  8315  
  8316  // Context sets the context to be used in this call's Do method. Any
  8317  // pending HTTP request will be aborted if the provided context is
  8318  // canceled.
  8319  func (c *ResponsePoliciesUpdateCall) Context(ctx context.Context) *ResponsePoliciesUpdateCall {
  8320  	c.ctx_ = ctx
  8321  	return c
  8322  }
  8323  
  8324  // Header returns an http.Header that can be modified by the caller to
  8325  // add HTTP headers to the request.
  8326  func (c *ResponsePoliciesUpdateCall) Header() http.Header {
  8327  	if c.header_ == nil {
  8328  		c.header_ = make(http.Header)
  8329  	}
  8330  	return c.header_
  8331  }
  8332  
  8333  func (c *ResponsePoliciesUpdateCall) doRequest(alt string) (*http.Response, error) {
  8334  	reqHeaders := make(http.Header)
  8335  	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
  8336  	for k, v := range c.header_ {
  8337  		reqHeaders[k] = v
  8338  	}
  8339  	reqHeaders.Set("User-Agent", c.s.userAgent())
  8340  	var body io.Reader = nil
  8341  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.responsepolicy)
  8342  	if err != nil {
  8343  		return nil, err
  8344  	}
  8345  	reqHeaders.Set("Content-Type", "application/json")
  8346  	c.urlParams_.Set("alt", alt)
  8347  	c.urlParams_.Set("prettyPrint", "false")
  8348  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v2/projects/{project}/locations/{location}/responsePolicies/{responsePolicy}")
  8349  	urls += "?" + c.urlParams_.Encode()
  8350  	req, err := http.NewRequest("PUT", urls, body)
  8351  	if err != nil {
  8352  		return nil, err
  8353  	}
  8354  	req.Header = reqHeaders
  8355  	googleapi.Expand(req.URL, map[string]string{
  8356  		"project":        c.project,
  8357  		"location":       c.location,
  8358  		"responsePolicy": c.responsePolicy,
  8359  	})
  8360  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8361  }
  8362  
  8363  // Do executes the "dns.responsePolicies.update" call.
  8364  // Exactly one of *ResponsePoliciesUpdateResponse or error will be
  8365  // non-nil. Any non-2xx status code is an error. Response headers are in
  8366  // either *ResponsePoliciesUpdateResponse.ServerResponse.Header or (if a
  8367  // response was returned at all) in error.(*googleapi.Error).Header. Use
  8368  // googleapi.IsNotModified to check whether the returned error was
  8369  // because http.StatusNotModified was returned.
  8370  func (c *ResponsePoliciesUpdateCall) Do(opts ...googleapi.CallOption) (*ResponsePoliciesUpdateResponse, error) {
  8371  	gensupport.SetOptions(c.urlParams_, opts...)
  8372  	res, err := c.doRequest("json")
  8373  	if res != nil && res.StatusCode == http.StatusNotModified {
  8374  		if res.Body != nil {
  8375  			res.Body.Close()
  8376  		}
  8377  		return nil, &googleapi.Error{
  8378  			Code:   res.StatusCode,
  8379  			Header: res.Header,
  8380  		}
  8381  	}
  8382  	if err != nil {
  8383  		return nil, err
  8384  	}
  8385  	defer googleapi.CloseBody(res)
  8386  	if err := googleapi.CheckResponse(res); err != nil {
  8387  		return nil, err
  8388  	}
  8389  	ret := &ResponsePoliciesUpdateResponse{
  8390  		ServerResponse: googleapi.ServerResponse{
  8391  			Header:         res.Header,
  8392  			HTTPStatusCode: res.StatusCode,
  8393  		},
  8394  	}
  8395  	target := &ret
  8396  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8397  		return nil, err
  8398  	}
  8399  	return ret, nil
  8400  	// {
  8401  	//   "description": "Updates an existing Response Policy.",
  8402  	//   "flatPath": "dns/v2/projects/{project}/locations/{location}/responsePolicies/{responsePolicy}",
  8403  	//   "httpMethod": "PUT",
  8404  	//   "id": "dns.responsePolicies.update",
  8405  	//   "parameterOrder": [
  8406  	//     "project",
  8407  	//     "location",
  8408  	//     "responsePolicy"
  8409  	//   ],
  8410  	//   "parameters": {
  8411  	//     "clientOperationId": {
  8412  	//       "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.",
  8413  	//       "location": "query",
  8414  	//       "type": "string"
  8415  	//     },
  8416  	//     "location": {
  8417  	//       "default": "global",
  8418  	//       "description": "Specifies the location of the resource. This information will be used for routing and will be part of the resource name.",
  8419  	//       "location": "path",
  8420  	//       "required": true,
  8421  	//       "type": "string"
  8422  	//     },
  8423  	//     "project": {
  8424  	//       "description": "Identifies the project addressed by this request.",
  8425  	//       "location": "path",
  8426  	//       "required": true,
  8427  	//       "type": "string"
  8428  	//     },
  8429  	//     "responsePolicy": {
  8430  	//       "description": "User assigned name of the Response Policy addressed by this request.",
  8431  	//       "location": "path",
  8432  	//       "required": true,
  8433  	//       "type": "string"
  8434  	//     }
  8435  	//   },
  8436  	//   "path": "dns/v2/projects/{project}/locations/{location}/responsePolicies/{responsePolicy}",
  8437  	//   "request": {
  8438  	//     "$ref": "ResponsePolicy"
  8439  	//   },
  8440  	//   "response": {
  8441  	//     "$ref": "ResponsePoliciesUpdateResponse"
  8442  	//   },
  8443  	//   "scopes": [
  8444  	//     "https://www.googleapis.com/auth/cloud-platform",
  8445  	//     "https://www.googleapis.com/auth/ndev.clouddns.readwrite"
  8446  	//   ]
  8447  	// }
  8448  
  8449  }
  8450  
  8451  // method id "dns.responsePolicyRules.create":
  8452  
  8453  type ResponsePolicyRulesCreateCall struct {
  8454  	s                  *Service
  8455  	project            string
  8456  	location           string
  8457  	responsePolicy     string
  8458  	responsepolicyrule *ResponsePolicyRule
  8459  	urlParams_         gensupport.URLParams
  8460  	ctx_               context.Context
  8461  	header_            http.Header
  8462  }
  8463  
  8464  // Create: Creates a new Response Policy Rule.
  8465  //
  8466  //   - location: Specifies the location of the resource. This information
  8467  //     will be used for routing and will be part of the resource name.
  8468  //   - project: Identifies the project addressed by this request.
  8469  //   - responsePolicy: User assigned name of the Response Policy
  8470  //     containing the Response Policy Rule.
  8471  func (r *ResponsePolicyRulesService) Create(project string, location string, responsePolicy string, responsepolicyrule *ResponsePolicyRule) *ResponsePolicyRulesCreateCall {
  8472  	c := &ResponsePolicyRulesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8473  	c.project = project
  8474  	c.location = location
  8475  	c.responsePolicy = responsePolicy
  8476  	c.responsepolicyrule = responsepolicyrule
  8477  	return c
  8478  }
  8479  
  8480  // ClientOperationId sets the optional parameter "clientOperationId":
  8481  // For mutating operation requests only. An optional identifier
  8482  // specified by the client. Must be unique for operation resources in
  8483  // the Operations collection.
  8484  func (c *ResponsePolicyRulesCreateCall) ClientOperationId(clientOperationId string) *ResponsePolicyRulesCreateCall {
  8485  	c.urlParams_.Set("clientOperationId", clientOperationId)
  8486  	return c
  8487  }
  8488  
  8489  // Fields allows partial responses to be retrieved. See
  8490  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8491  // for more information.
  8492  func (c *ResponsePolicyRulesCreateCall) Fields(s ...googleapi.Field) *ResponsePolicyRulesCreateCall {
  8493  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8494  	return c
  8495  }
  8496  
  8497  // Context sets the context to be used in this call's Do method. Any
  8498  // pending HTTP request will be aborted if the provided context is
  8499  // canceled.
  8500  func (c *ResponsePolicyRulesCreateCall) Context(ctx context.Context) *ResponsePolicyRulesCreateCall {
  8501  	c.ctx_ = ctx
  8502  	return c
  8503  }
  8504  
  8505  // Header returns an http.Header that can be modified by the caller to
  8506  // add HTTP headers to the request.
  8507  func (c *ResponsePolicyRulesCreateCall) Header() http.Header {
  8508  	if c.header_ == nil {
  8509  		c.header_ = make(http.Header)
  8510  	}
  8511  	return c.header_
  8512  }
  8513  
  8514  func (c *ResponsePolicyRulesCreateCall) doRequest(alt string) (*http.Response, error) {
  8515  	reqHeaders := make(http.Header)
  8516  	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
  8517  	for k, v := range c.header_ {
  8518  		reqHeaders[k] = v
  8519  	}
  8520  	reqHeaders.Set("User-Agent", c.s.userAgent())
  8521  	var body io.Reader = nil
  8522  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.responsepolicyrule)
  8523  	if err != nil {
  8524  		return nil, err
  8525  	}
  8526  	reqHeaders.Set("Content-Type", "application/json")
  8527  	c.urlParams_.Set("alt", alt)
  8528  	c.urlParams_.Set("prettyPrint", "false")
  8529  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v2/projects/{project}/locations/{location}/responsePolicies/{responsePolicy}/rules")
  8530  	urls += "?" + c.urlParams_.Encode()
  8531  	req, err := http.NewRequest("POST", urls, body)
  8532  	if err != nil {
  8533  		return nil, err
  8534  	}
  8535  	req.Header = reqHeaders
  8536  	googleapi.Expand(req.URL, map[string]string{
  8537  		"project":        c.project,
  8538  		"location":       c.location,
  8539  		"responsePolicy": c.responsePolicy,
  8540  	})
  8541  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8542  }
  8543  
  8544  // Do executes the "dns.responsePolicyRules.create" call.
  8545  // Exactly one of *ResponsePolicyRule or error will be non-nil. Any
  8546  // non-2xx status code is an error. Response headers are in either
  8547  // *ResponsePolicyRule.ServerResponse.Header or (if a response was
  8548  // returned at all) in error.(*googleapi.Error).Header. Use
  8549  // googleapi.IsNotModified to check whether the returned error was
  8550  // because http.StatusNotModified was returned.
  8551  func (c *ResponsePolicyRulesCreateCall) Do(opts ...googleapi.CallOption) (*ResponsePolicyRule, error) {
  8552  	gensupport.SetOptions(c.urlParams_, opts...)
  8553  	res, err := c.doRequest("json")
  8554  	if res != nil && res.StatusCode == http.StatusNotModified {
  8555  		if res.Body != nil {
  8556  			res.Body.Close()
  8557  		}
  8558  		return nil, &googleapi.Error{
  8559  			Code:   res.StatusCode,
  8560  			Header: res.Header,
  8561  		}
  8562  	}
  8563  	if err != nil {
  8564  		return nil, err
  8565  	}
  8566  	defer googleapi.CloseBody(res)
  8567  	if err := googleapi.CheckResponse(res); err != nil {
  8568  		return nil, err
  8569  	}
  8570  	ret := &ResponsePolicyRule{
  8571  		ServerResponse: googleapi.ServerResponse{
  8572  			Header:         res.Header,
  8573  			HTTPStatusCode: res.StatusCode,
  8574  		},
  8575  	}
  8576  	target := &ret
  8577  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8578  		return nil, err
  8579  	}
  8580  	return ret, nil
  8581  	// {
  8582  	//   "description": "Creates a new Response Policy Rule.",
  8583  	//   "flatPath": "dns/v2/projects/{project}/locations/{location}/responsePolicies/{responsePolicy}/rules",
  8584  	//   "httpMethod": "POST",
  8585  	//   "id": "dns.responsePolicyRules.create",
  8586  	//   "parameterOrder": [
  8587  	//     "project",
  8588  	//     "location",
  8589  	//     "responsePolicy"
  8590  	//   ],
  8591  	//   "parameters": {
  8592  	//     "clientOperationId": {
  8593  	//       "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.",
  8594  	//       "location": "query",
  8595  	//       "type": "string"
  8596  	//     },
  8597  	//     "location": {
  8598  	//       "default": "global",
  8599  	//       "description": "Specifies the location of the resource. This information will be used for routing and will be part of the resource name.",
  8600  	//       "location": "path",
  8601  	//       "required": true,
  8602  	//       "type": "string"
  8603  	//     },
  8604  	//     "project": {
  8605  	//       "description": "Identifies the project addressed by this request.",
  8606  	//       "location": "path",
  8607  	//       "required": true,
  8608  	//       "type": "string"
  8609  	//     },
  8610  	//     "responsePolicy": {
  8611  	//       "description": "User assigned name of the Response Policy containing the Response Policy Rule.",
  8612  	//       "location": "path",
  8613  	//       "required": true,
  8614  	//       "type": "string"
  8615  	//     }
  8616  	//   },
  8617  	//   "path": "dns/v2/projects/{project}/locations/{location}/responsePolicies/{responsePolicy}/rules",
  8618  	//   "request": {
  8619  	//     "$ref": "ResponsePolicyRule"
  8620  	//   },
  8621  	//   "response": {
  8622  	//     "$ref": "ResponsePolicyRule"
  8623  	//   },
  8624  	//   "scopes": [
  8625  	//     "https://www.googleapis.com/auth/cloud-platform",
  8626  	//     "https://www.googleapis.com/auth/ndev.clouddns.readwrite"
  8627  	//   ]
  8628  	// }
  8629  
  8630  }
  8631  
  8632  // method id "dns.responsePolicyRules.delete":
  8633  
  8634  type ResponsePolicyRulesDeleteCall struct {
  8635  	s                  *Service
  8636  	project            string
  8637  	location           string
  8638  	responsePolicy     string
  8639  	responsePolicyRule string
  8640  	urlParams_         gensupport.URLParams
  8641  	ctx_               context.Context
  8642  	header_            http.Header
  8643  }
  8644  
  8645  // Delete: Deletes a previously created Response Policy Rule.
  8646  //
  8647  //   - location: Specifies the location of the resource. This information
  8648  //     will be used for routing and will be part of the resource name.
  8649  //   - project: Identifies the project addressed by this request.
  8650  //   - responsePolicy: User assigned name of the Response Policy
  8651  //     containing the Response Policy Rule.
  8652  //   - responsePolicyRule: User assigned name of the Response Policy Rule
  8653  //     addressed by this request.
  8654  func (r *ResponsePolicyRulesService) Delete(project string, location string, responsePolicy string, responsePolicyRule string) *ResponsePolicyRulesDeleteCall {
  8655  	c := &ResponsePolicyRulesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8656  	c.project = project
  8657  	c.location = location
  8658  	c.responsePolicy = responsePolicy
  8659  	c.responsePolicyRule = responsePolicyRule
  8660  	return c
  8661  }
  8662  
  8663  // ClientOperationId sets the optional parameter "clientOperationId":
  8664  // For mutating operation requests only. An optional identifier
  8665  // specified by the client. Must be unique for operation resources in
  8666  // the Operations collection.
  8667  func (c *ResponsePolicyRulesDeleteCall) ClientOperationId(clientOperationId string) *ResponsePolicyRulesDeleteCall {
  8668  	c.urlParams_.Set("clientOperationId", clientOperationId)
  8669  	return c
  8670  }
  8671  
  8672  // Fields allows partial responses to be retrieved. See
  8673  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8674  // for more information.
  8675  func (c *ResponsePolicyRulesDeleteCall) Fields(s ...googleapi.Field) *ResponsePolicyRulesDeleteCall {
  8676  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8677  	return c
  8678  }
  8679  
  8680  // Context sets the context to be used in this call's Do method. Any
  8681  // pending HTTP request will be aborted if the provided context is
  8682  // canceled.
  8683  func (c *ResponsePolicyRulesDeleteCall) Context(ctx context.Context) *ResponsePolicyRulesDeleteCall {
  8684  	c.ctx_ = ctx
  8685  	return c
  8686  }
  8687  
  8688  // Header returns an http.Header that can be modified by the caller to
  8689  // add HTTP headers to the request.
  8690  func (c *ResponsePolicyRulesDeleteCall) Header() http.Header {
  8691  	if c.header_ == nil {
  8692  		c.header_ = make(http.Header)
  8693  	}
  8694  	return c.header_
  8695  }
  8696  
  8697  func (c *ResponsePolicyRulesDeleteCall) doRequest(alt string) (*http.Response, error) {
  8698  	reqHeaders := make(http.Header)
  8699  	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
  8700  	for k, v := range c.header_ {
  8701  		reqHeaders[k] = v
  8702  	}
  8703  	reqHeaders.Set("User-Agent", c.s.userAgent())
  8704  	var body io.Reader = nil
  8705  	c.urlParams_.Set("alt", alt)
  8706  	c.urlParams_.Set("prettyPrint", "false")
  8707  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v2/projects/{project}/locations/{location}/responsePolicies/{responsePolicy}/rules/{responsePolicyRule}")
  8708  	urls += "?" + c.urlParams_.Encode()
  8709  	req, err := http.NewRequest("DELETE", urls, body)
  8710  	if err != nil {
  8711  		return nil, err
  8712  	}
  8713  	req.Header = reqHeaders
  8714  	googleapi.Expand(req.URL, map[string]string{
  8715  		"project":            c.project,
  8716  		"location":           c.location,
  8717  		"responsePolicy":     c.responsePolicy,
  8718  		"responsePolicyRule": c.responsePolicyRule,
  8719  	})
  8720  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8721  }
  8722  
  8723  // Do executes the "dns.responsePolicyRules.delete" call.
  8724  func (c *ResponsePolicyRulesDeleteCall) Do(opts ...googleapi.CallOption) error {
  8725  	gensupport.SetOptions(c.urlParams_, opts...)
  8726  	res, err := c.doRequest("json")
  8727  	if err != nil {
  8728  		return err
  8729  	}
  8730  	defer googleapi.CloseBody(res)
  8731  	if err := googleapi.CheckResponse(res); err != nil {
  8732  		return err
  8733  	}
  8734  	return nil
  8735  	// {
  8736  	//   "description": "Deletes a previously created Response Policy Rule.",
  8737  	//   "flatPath": "dns/v2/projects/{project}/locations/{location}/responsePolicies/{responsePolicy}/rules/{responsePolicyRule}",
  8738  	//   "httpMethod": "DELETE",
  8739  	//   "id": "dns.responsePolicyRules.delete",
  8740  	//   "parameterOrder": [
  8741  	//     "project",
  8742  	//     "location",
  8743  	//     "responsePolicy",
  8744  	//     "responsePolicyRule"
  8745  	//   ],
  8746  	//   "parameters": {
  8747  	//     "clientOperationId": {
  8748  	//       "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.",
  8749  	//       "location": "query",
  8750  	//       "type": "string"
  8751  	//     },
  8752  	//     "location": {
  8753  	//       "default": "global",
  8754  	//       "description": "Specifies the location of the resource. This information will be used for routing and will be part of the resource name.",
  8755  	//       "location": "path",
  8756  	//       "required": true,
  8757  	//       "type": "string"
  8758  	//     },
  8759  	//     "project": {
  8760  	//       "description": "Identifies the project addressed by this request.",
  8761  	//       "location": "path",
  8762  	//       "required": true,
  8763  	//       "type": "string"
  8764  	//     },
  8765  	//     "responsePolicy": {
  8766  	//       "description": "User assigned name of the Response Policy containing the Response Policy Rule.",
  8767  	//       "location": "path",
  8768  	//       "required": true,
  8769  	//       "type": "string"
  8770  	//     },
  8771  	//     "responsePolicyRule": {
  8772  	//       "description": "User assigned name of the Response Policy Rule addressed by this request.",
  8773  	//       "location": "path",
  8774  	//       "required": true,
  8775  	//       "type": "string"
  8776  	//     }
  8777  	//   },
  8778  	//   "path": "dns/v2/projects/{project}/locations/{location}/responsePolicies/{responsePolicy}/rules/{responsePolicyRule}",
  8779  	//   "scopes": [
  8780  	//     "https://www.googleapis.com/auth/cloud-platform",
  8781  	//     "https://www.googleapis.com/auth/ndev.clouddns.readwrite"
  8782  	//   ]
  8783  	// }
  8784  
  8785  }
  8786  
  8787  // method id "dns.responsePolicyRules.get":
  8788  
  8789  type ResponsePolicyRulesGetCall struct {
  8790  	s                  *Service
  8791  	project            string
  8792  	location           string
  8793  	responsePolicy     string
  8794  	responsePolicyRule string
  8795  	urlParams_         gensupport.URLParams
  8796  	ifNoneMatch_       string
  8797  	ctx_               context.Context
  8798  	header_            http.Header
  8799  }
  8800  
  8801  // Get: Fetches the representation of an existing Response Policy Rule.
  8802  //
  8803  //   - location: Specifies the location of the resource. This information
  8804  //     will be used for routing and will be part of the resource name.
  8805  //   - project: Identifies the project addressed by this request.
  8806  //   - responsePolicy: User assigned name of the Response Policy
  8807  //     containing the Response Policy Rule.
  8808  //   - responsePolicyRule: User assigned name of the Response Policy Rule
  8809  //     addressed by this request.
  8810  func (r *ResponsePolicyRulesService) Get(project string, location string, responsePolicy string, responsePolicyRule string) *ResponsePolicyRulesGetCall {
  8811  	c := &ResponsePolicyRulesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8812  	c.project = project
  8813  	c.location = location
  8814  	c.responsePolicy = responsePolicy
  8815  	c.responsePolicyRule = responsePolicyRule
  8816  	return c
  8817  }
  8818  
  8819  // ClientOperationId sets the optional parameter "clientOperationId":
  8820  // For mutating operation requests only. An optional identifier
  8821  // specified by the client. Must be unique for operation resources in
  8822  // the Operations collection.
  8823  func (c *ResponsePolicyRulesGetCall) ClientOperationId(clientOperationId string) *ResponsePolicyRulesGetCall {
  8824  	c.urlParams_.Set("clientOperationId", clientOperationId)
  8825  	return c
  8826  }
  8827  
  8828  // Fields allows partial responses to be retrieved. See
  8829  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8830  // for more information.
  8831  func (c *ResponsePolicyRulesGetCall) Fields(s ...googleapi.Field) *ResponsePolicyRulesGetCall {
  8832  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8833  	return c
  8834  }
  8835  
  8836  // IfNoneMatch sets the optional parameter which makes the operation
  8837  // fail if the object's ETag matches the given value. This is useful for
  8838  // getting updates only after the object has changed since the last
  8839  // request. Use googleapi.IsNotModified to check whether the response
  8840  // error from Do is the result of In-None-Match.
  8841  func (c *ResponsePolicyRulesGetCall) IfNoneMatch(entityTag string) *ResponsePolicyRulesGetCall {
  8842  	c.ifNoneMatch_ = entityTag
  8843  	return c
  8844  }
  8845  
  8846  // Context sets the context to be used in this call's Do method. Any
  8847  // pending HTTP request will be aborted if the provided context is
  8848  // canceled.
  8849  func (c *ResponsePolicyRulesGetCall) Context(ctx context.Context) *ResponsePolicyRulesGetCall {
  8850  	c.ctx_ = ctx
  8851  	return c
  8852  }
  8853  
  8854  // Header returns an http.Header that can be modified by the caller to
  8855  // add HTTP headers to the request.
  8856  func (c *ResponsePolicyRulesGetCall) Header() http.Header {
  8857  	if c.header_ == nil {
  8858  		c.header_ = make(http.Header)
  8859  	}
  8860  	return c.header_
  8861  }
  8862  
  8863  func (c *ResponsePolicyRulesGetCall) doRequest(alt string) (*http.Response, error) {
  8864  	reqHeaders := make(http.Header)
  8865  	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
  8866  	for k, v := range c.header_ {
  8867  		reqHeaders[k] = v
  8868  	}
  8869  	reqHeaders.Set("User-Agent", c.s.userAgent())
  8870  	if c.ifNoneMatch_ != "" {
  8871  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8872  	}
  8873  	var body io.Reader = nil
  8874  	c.urlParams_.Set("alt", alt)
  8875  	c.urlParams_.Set("prettyPrint", "false")
  8876  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v2/projects/{project}/locations/{location}/responsePolicies/{responsePolicy}/rules/{responsePolicyRule}")
  8877  	urls += "?" + c.urlParams_.Encode()
  8878  	req, err := http.NewRequest("GET", urls, body)
  8879  	if err != nil {
  8880  		return nil, err
  8881  	}
  8882  	req.Header = reqHeaders
  8883  	googleapi.Expand(req.URL, map[string]string{
  8884  		"project":            c.project,
  8885  		"location":           c.location,
  8886  		"responsePolicy":     c.responsePolicy,
  8887  		"responsePolicyRule": c.responsePolicyRule,
  8888  	})
  8889  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8890  }
  8891  
  8892  // Do executes the "dns.responsePolicyRules.get" call.
  8893  // Exactly one of *ResponsePolicyRule or error will be non-nil. Any
  8894  // non-2xx status code is an error. Response headers are in either
  8895  // *ResponsePolicyRule.ServerResponse.Header or (if a response was
  8896  // returned at all) in error.(*googleapi.Error).Header. Use
  8897  // googleapi.IsNotModified to check whether the returned error was
  8898  // because http.StatusNotModified was returned.
  8899  func (c *ResponsePolicyRulesGetCall) Do(opts ...googleapi.CallOption) (*ResponsePolicyRule, error) {
  8900  	gensupport.SetOptions(c.urlParams_, opts...)
  8901  	res, err := c.doRequest("json")
  8902  	if res != nil && res.StatusCode == http.StatusNotModified {
  8903  		if res.Body != nil {
  8904  			res.Body.Close()
  8905  		}
  8906  		return nil, &googleapi.Error{
  8907  			Code:   res.StatusCode,
  8908  			Header: res.Header,
  8909  		}
  8910  	}
  8911  	if err != nil {
  8912  		return nil, err
  8913  	}
  8914  	defer googleapi.CloseBody(res)
  8915  	if err := googleapi.CheckResponse(res); err != nil {
  8916  		return nil, err
  8917  	}
  8918  	ret := &ResponsePolicyRule{
  8919  		ServerResponse: googleapi.ServerResponse{
  8920  			Header:         res.Header,
  8921  			HTTPStatusCode: res.StatusCode,
  8922  		},
  8923  	}
  8924  	target := &ret
  8925  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8926  		return nil, err
  8927  	}
  8928  	return ret, nil
  8929  	// {
  8930  	//   "description": "Fetches the representation of an existing Response Policy Rule.",
  8931  	//   "flatPath": "dns/v2/projects/{project}/locations/{location}/responsePolicies/{responsePolicy}/rules/{responsePolicyRule}",
  8932  	//   "httpMethod": "GET",
  8933  	//   "id": "dns.responsePolicyRules.get",
  8934  	//   "parameterOrder": [
  8935  	//     "project",
  8936  	//     "location",
  8937  	//     "responsePolicy",
  8938  	//     "responsePolicyRule"
  8939  	//   ],
  8940  	//   "parameters": {
  8941  	//     "clientOperationId": {
  8942  	//       "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.",
  8943  	//       "location": "query",
  8944  	//       "type": "string"
  8945  	//     },
  8946  	//     "location": {
  8947  	//       "default": "global",
  8948  	//       "description": "Specifies the location of the resource. This information will be used for routing and will be part of the resource name.",
  8949  	//       "location": "path",
  8950  	//       "required": true,
  8951  	//       "type": "string"
  8952  	//     },
  8953  	//     "project": {
  8954  	//       "description": "Identifies the project addressed by this request.",
  8955  	//       "location": "path",
  8956  	//       "required": true,
  8957  	//       "type": "string"
  8958  	//     },
  8959  	//     "responsePolicy": {
  8960  	//       "description": "User assigned name of the Response Policy containing the Response Policy Rule.",
  8961  	//       "location": "path",
  8962  	//       "required": true,
  8963  	//       "type": "string"
  8964  	//     },
  8965  	//     "responsePolicyRule": {
  8966  	//       "description": "User assigned name of the Response Policy Rule addressed by this request.",
  8967  	//       "location": "path",
  8968  	//       "required": true,
  8969  	//       "type": "string"
  8970  	//     }
  8971  	//   },
  8972  	//   "path": "dns/v2/projects/{project}/locations/{location}/responsePolicies/{responsePolicy}/rules/{responsePolicyRule}",
  8973  	//   "response": {
  8974  	//     "$ref": "ResponsePolicyRule"
  8975  	//   },
  8976  	//   "scopes": [
  8977  	//     "https://www.googleapis.com/auth/cloud-platform",
  8978  	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
  8979  	//     "https://www.googleapis.com/auth/ndev.clouddns.readonly",
  8980  	//     "https://www.googleapis.com/auth/ndev.clouddns.readwrite"
  8981  	//   ]
  8982  	// }
  8983  
  8984  }
  8985  
  8986  // method id "dns.responsePolicyRules.list":
  8987  
  8988  type ResponsePolicyRulesListCall struct {
  8989  	s              *Service
  8990  	project        string
  8991  	location       string
  8992  	responsePolicy string
  8993  	urlParams_     gensupport.URLParams
  8994  	ifNoneMatch_   string
  8995  	ctx_           context.Context
  8996  	header_        http.Header
  8997  }
  8998  
  8999  // List: Enumerates all Response Policy Rules associated with a project.
  9000  //
  9001  //   - location: Specifies the location of the resource. This information
  9002  //     will be used for routing and will be part of the resource name.
  9003  //   - project: Identifies the project addressed by this request.
  9004  //   - responsePolicy: User assigned name of the Response Policy to list.
  9005  func (r *ResponsePolicyRulesService) List(project string, location string, responsePolicy string) *ResponsePolicyRulesListCall {
  9006  	c := &ResponsePolicyRulesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9007  	c.project = project
  9008  	c.location = location
  9009  	c.responsePolicy = responsePolicy
  9010  	return c
  9011  }
  9012  
  9013  // MaxResults sets the optional parameter "maxResults": Maximum number
  9014  // of results to be returned. If unspecified, the server decides how
  9015  // many results to return.
  9016  func (c *ResponsePolicyRulesListCall) MaxResults(maxResults int64) *ResponsePolicyRulesListCall {
  9017  	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  9018  	return c
  9019  }
  9020  
  9021  // PageToken sets the optional parameter "pageToken": A tag returned by
  9022  // a previous list request that was truncated. Use this parameter to
  9023  // continue a previous list request.
  9024  func (c *ResponsePolicyRulesListCall) PageToken(pageToken string) *ResponsePolicyRulesListCall {
  9025  	c.urlParams_.Set("pageToken", pageToken)
  9026  	return c
  9027  }
  9028  
  9029  // Fields allows partial responses to be retrieved. See
  9030  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  9031  // for more information.
  9032  func (c *ResponsePolicyRulesListCall) Fields(s ...googleapi.Field) *ResponsePolicyRulesListCall {
  9033  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9034  	return c
  9035  }
  9036  
  9037  // IfNoneMatch sets the optional parameter which makes the operation
  9038  // fail if the object's ETag matches the given value. This is useful for
  9039  // getting updates only after the object has changed since the last
  9040  // request. Use googleapi.IsNotModified to check whether the response
  9041  // error from Do is the result of In-None-Match.
  9042  func (c *ResponsePolicyRulesListCall) IfNoneMatch(entityTag string) *ResponsePolicyRulesListCall {
  9043  	c.ifNoneMatch_ = entityTag
  9044  	return c
  9045  }
  9046  
  9047  // Context sets the context to be used in this call's Do method. Any
  9048  // pending HTTP request will be aborted if the provided context is
  9049  // canceled.
  9050  func (c *ResponsePolicyRulesListCall) Context(ctx context.Context) *ResponsePolicyRulesListCall {
  9051  	c.ctx_ = ctx
  9052  	return c
  9053  }
  9054  
  9055  // Header returns an http.Header that can be modified by the caller to
  9056  // add HTTP headers to the request.
  9057  func (c *ResponsePolicyRulesListCall) Header() http.Header {
  9058  	if c.header_ == nil {
  9059  		c.header_ = make(http.Header)
  9060  	}
  9061  	return c.header_
  9062  }
  9063  
  9064  func (c *ResponsePolicyRulesListCall) doRequest(alt string) (*http.Response, error) {
  9065  	reqHeaders := make(http.Header)
  9066  	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
  9067  	for k, v := range c.header_ {
  9068  		reqHeaders[k] = v
  9069  	}
  9070  	reqHeaders.Set("User-Agent", c.s.userAgent())
  9071  	if c.ifNoneMatch_ != "" {
  9072  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  9073  	}
  9074  	var body io.Reader = nil
  9075  	c.urlParams_.Set("alt", alt)
  9076  	c.urlParams_.Set("prettyPrint", "false")
  9077  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v2/projects/{project}/locations/{location}/responsePolicies/{responsePolicy}/rules")
  9078  	urls += "?" + c.urlParams_.Encode()
  9079  	req, err := http.NewRequest("GET", urls, body)
  9080  	if err != nil {
  9081  		return nil, err
  9082  	}
  9083  	req.Header = reqHeaders
  9084  	googleapi.Expand(req.URL, map[string]string{
  9085  		"project":        c.project,
  9086  		"location":       c.location,
  9087  		"responsePolicy": c.responsePolicy,
  9088  	})
  9089  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9090  }
  9091  
  9092  // Do executes the "dns.responsePolicyRules.list" call.
  9093  // Exactly one of *ResponsePolicyRulesListResponse or error will be
  9094  // non-nil. Any non-2xx status code is an error. Response headers are in
  9095  // either *ResponsePolicyRulesListResponse.ServerResponse.Header or (if
  9096  // a response was returned at all) in error.(*googleapi.Error).Header.
  9097  // Use googleapi.IsNotModified to check whether the returned error was
  9098  // because http.StatusNotModified was returned.
  9099  func (c *ResponsePolicyRulesListCall) Do(opts ...googleapi.CallOption) (*ResponsePolicyRulesListResponse, error) {
  9100  	gensupport.SetOptions(c.urlParams_, opts...)
  9101  	res, err := c.doRequest("json")
  9102  	if res != nil && res.StatusCode == http.StatusNotModified {
  9103  		if res.Body != nil {
  9104  			res.Body.Close()
  9105  		}
  9106  		return nil, &googleapi.Error{
  9107  			Code:   res.StatusCode,
  9108  			Header: res.Header,
  9109  		}
  9110  	}
  9111  	if err != nil {
  9112  		return nil, err
  9113  	}
  9114  	defer googleapi.CloseBody(res)
  9115  	if err := googleapi.CheckResponse(res); err != nil {
  9116  		return nil, err
  9117  	}
  9118  	ret := &ResponsePolicyRulesListResponse{
  9119  		ServerResponse: googleapi.ServerResponse{
  9120  			Header:         res.Header,
  9121  			HTTPStatusCode: res.StatusCode,
  9122  		},
  9123  	}
  9124  	target := &ret
  9125  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9126  		return nil, err
  9127  	}
  9128  	return ret, nil
  9129  	// {
  9130  	//   "description": "Enumerates all Response Policy Rules associated with a project.",
  9131  	//   "flatPath": "dns/v2/projects/{project}/locations/{location}/responsePolicies/{responsePolicy}/rules",
  9132  	//   "httpMethod": "GET",
  9133  	//   "id": "dns.responsePolicyRules.list",
  9134  	//   "parameterOrder": [
  9135  	//     "project",
  9136  	//     "location",
  9137  	//     "responsePolicy"
  9138  	//   ],
  9139  	//   "parameters": {
  9140  	//     "location": {
  9141  	//       "default": "global",
  9142  	//       "description": "Specifies the location of the resource. This information will be used for routing and will be part of the resource name.",
  9143  	//       "location": "path",
  9144  	//       "required": true,
  9145  	//       "type": "string"
  9146  	//     },
  9147  	//     "maxResults": {
  9148  	//       "description": "Optional. Maximum number of results to be returned. If unspecified, the server decides how many results to return.",
  9149  	//       "format": "int32",
  9150  	//       "location": "query",
  9151  	//       "type": "integer"
  9152  	//     },
  9153  	//     "pageToken": {
  9154  	//       "description": "Optional. A tag returned by a previous list request that was truncated. Use this parameter to continue a previous list request.",
  9155  	//       "location": "query",
  9156  	//       "type": "string"
  9157  	//     },
  9158  	//     "project": {
  9159  	//       "description": "Identifies the project addressed by this request.",
  9160  	//       "location": "path",
  9161  	//       "required": true,
  9162  	//       "type": "string"
  9163  	//     },
  9164  	//     "responsePolicy": {
  9165  	//       "description": "User assigned name of the Response Policy to list.",
  9166  	//       "location": "path",
  9167  	//       "required": true,
  9168  	//       "type": "string"
  9169  	//     }
  9170  	//   },
  9171  	//   "path": "dns/v2/projects/{project}/locations/{location}/responsePolicies/{responsePolicy}/rules",
  9172  	//   "response": {
  9173  	//     "$ref": "ResponsePolicyRulesListResponse"
  9174  	//   },
  9175  	//   "scopes": [
  9176  	//     "https://www.googleapis.com/auth/cloud-platform",
  9177  	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
  9178  	//     "https://www.googleapis.com/auth/ndev.clouddns.readonly",
  9179  	//     "https://www.googleapis.com/auth/ndev.clouddns.readwrite"
  9180  	//   ]
  9181  	// }
  9182  
  9183  }
  9184  
  9185  // Pages invokes f for each page of results.
  9186  // A non-nil error returned from f will halt the iteration.
  9187  // The provided context supersedes any context provided to the Context method.
  9188  func (c *ResponsePolicyRulesListCall) Pages(ctx context.Context, f func(*ResponsePolicyRulesListResponse) error) error {
  9189  	c.ctx_ = ctx
  9190  	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  9191  	for {
  9192  		x, err := c.Do()
  9193  		if err != nil {
  9194  			return err
  9195  		}
  9196  		if err := f(x); err != nil {
  9197  			return err
  9198  		}
  9199  		if x.NextPageToken == "" {
  9200  			return nil
  9201  		}
  9202  		c.PageToken(x.NextPageToken)
  9203  	}
  9204  }
  9205  
  9206  // method id "dns.responsePolicyRules.patch":
  9207  
  9208  type ResponsePolicyRulesPatchCall struct {
  9209  	s                  *Service
  9210  	project            string
  9211  	location           string
  9212  	responsePolicy     string
  9213  	responsePolicyRule string
  9214  	responsepolicyrule *ResponsePolicyRule
  9215  	urlParams_         gensupport.URLParams
  9216  	ctx_               context.Context
  9217  	header_            http.Header
  9218  }
  9219  
  9220  // Patch: Applies a partial update to an existing Response Policy Rule.
  9221  //
  9222  //   - location: Specifies the location of the resource. This information
  9223  //     will be used for routing and will be part of the resource name.
  9224  //   - project: Identifies the project addressed by this request.
  9225  //   - responsePolicy: User assigned name of the Response Policy
  9226  //     containing the Response Policy Rule.
  9227  //   - responsePolicyRule: User assigned name of the Response Policy Rule
  9228  //     addressed by this request.
  9229  func (r *ResponsePolicyRulesService) Patch(project string, location string, responsePolicy string, responsePolicyRule string, responsepolicyrule *ResponsePolicyRule) *ResponsePolicyRulesPatchCall {
  9230  	c := &ResponsePolicyRulesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9231  	c.project = project
  9232  	c.location = location
  9233  	c.responsePolicy = responsePolicy
  9234  	c.responsePolicyRule = responsePolicyRule
  9235  	c.responsepolicyrule = responsepolicyrule
  9236  	return c
  9237  }
  9238  
  9239  // ClientOperationId sets the optional parameter "clientOperationId":
  9240  // For mutating operation requests only. An optional identifier
  9241  // specified by the client. Must be unique for operation resources in
  9242  // the Operations collection.
  9243  func (c *ResponsePolicyRulesPatchCall) ClientOperationId(clientOperationId string) *ResponsePolicyRulesPatchCall {
  9244  	c.urlParams_.Set("clientOperationId", clientOperationId)
  9245  	return c
  9246  }
  9247  
  9248  // Fields allows partial responses to be retrieved. See
  9249  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  9250  // for more information.
  9251  func (c *ResponsePolicyRulesPatchCall) Fields(s ...googleapi.Field) *ResponsePolicyRulesPatchCall {
  9252  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9253  	return c
  9254  }
  9255  
  9256  // Context sets the context to be used in this call's Do method. Any
  9257  // pending HTTP request will be aborted if the provided context is
  9258  // canceled.
  9259  func (c *ResponsePolicyRulesPatchCall) Context(ctx context.Context) *ResponsePolicyRulesPatchCall {
  9260  	c.ctx_ = ctx
  9261  	return c
  9262  }
  9263  
  9264  // Header returns an http.Header that can be modified by the caller to
  9265  // add HTTP headers to the request.
  9266  func (c *ResponsePolicyRulesPatchCall) Header() http.Header {
  9267  	if c.header_ == nil {
  9268  		c.header_ = make(http.Header)
  9269  	}
  9270  	return c.header_
  9271  }
  9272  
  9273  func (c *ResponsePolicyRulesPatchCall) doRequest(alt string) (*http.Response, error) {
  9274  	reqHeaders := make(http.Header)
  9275  	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
  9276  	for k, v := range c.header_ {
  9277  		reqHeaders[k] = v
  9278  	}
  9279  	reqHeaders.Set("User-Agent", c.s.userAgent())
  9280  	var body io.Reader = nil
  9281  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.responsepolicyrule)
  9282  	if err != nil {
  9283  		return nil, err
  9284  	}
  9285  	reqHeaders.Set("Content-Type", "application/json")
  9286  	c.urlParams_.Set("alt", alt)
  9287  	c.urlParams_.Set("prettyPrint", "false")
  9288  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v2/projects/{project}/locations/{location}/responsePolicies/{responsePolicy}/rules/{responsePolicyRule}")
  9289  	urls += "?" + c.urlParams_.Encode()
  9290  	req, err := http.NewRequest("PATCH", urls, body)
  9291  	if err != nil {
  9292  		return nil, err
  9293  	}
  9294  	req.Header = reqHeaders
  9295  	googleapi.Expand(req.URL, map[string]string{
  9296  		"project":            c.project,
  9297  		"location":           c.location,
  9298  		"responsePolicy":     c.responsePolicy,
  9299  		"responsePolicyRule": c.responsePolicyRule,
  9300  	})
  9301  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9302  }
  9303  
  9304  // Do executes the "dns.responsePolicyRules.patch" call.
  9305  // Exactly one of *ResponsePolicyRulesPatchResponse or error will be
  9306  // non-nil. Any non-2xx status code is an error. Response headers are in
  9307  // either *ResponsePolicyRulesPatchResponse.ServerResponse.Header or (if
  9308  // a response was returned at all) in error.(*googleapi.Error).Header.
  9309  // Use googleapi.IsNotModified to check whether the returned error was
  9310  // because http.StatusNotModified was returned.
  9311  func (c *ResponsePolicyRulesPatchCall) Do(opts ...googleapi.CallOption) (*ResponsePolicyRulesPatchResponse, error) {
  9312  	gensupport.SetOptions(c.urlParams_, opts...)
  9313  	res, err := c.doRequest("json")
  9314  	if res != nil && res.StatusCode == http.StatusNotModified {
  9315  		if res.Body != nil {
  9316  			res.Body.Close()
  9317  		}
  9318  		return nil, &googleapi.Error{
  9319  			Code:   res.StatusCode,
  9320  			Header: res.Header,
  9321  		}
  9322  	}
  9323  	if err != nil {
  9324  		return nil, err
  9325  	}
  9326  	defer googleapi.CloseBody(res)
  9327  	if err := googleapi.CheckResponse(res); err != nil {
  9328  		return nil, err
  9329  	}
  9330  	ret := &ResponsePolicyRulesPatchResponse{
  9331  		ServerResponse: googleapi.ServerResponse{
  9332  			Header:         res.Header,
  9333  			HTTPStatusCode: res.StatusCode,
  9334  		},
  9335  	}
  9336  	target := &ret
  9337  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9338  		return nil, err
  9339  	}
  9340  	return ret, nil
  9341  	// {
  9342  	//   "description": "Applies a partial update to an existing Response Policy Rule.",
  9343  	//   "flatPath": "dns/v2/projects/{project}/locations/{location}/responsePolicies/{responsePolicy}/rules/{responsePolicyRule}",
  9344  	//   "httpMethod": "PATCH",
  9345  	//   "id": "dns.responsePolicyRules.patch",
  9346  	//   "parameterOrder": [
  9347  	//     "project",
  9348  	//     "location",
  9349  	//     "responsePolicy",
  9350  	//     "responsePolicyRule"
  9351  	//   ],
  9352  	//   "parameters": {
  9353  	//     "clientOperationId": {
  9354  	//       "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.",
  9355  	//       "location": "query",
  9356  	//       "type": "string"
  9357  	//     },
  9358  	//     "location": {
  9359  	//       "default": "global",
  9360  	//       "description": "Specifies the location of the resource. This information will be used for routing and will be part of the resource name.",
  9361  	//       "location": "path",
  9362  	//       "required": true,
  9363  	//       "type": "string"
  9364  	//     },
  9365  	//     "project": {
  9366  	//       "description": "Identifies the project addressed by this request.",
  9367  	//       "location": "path",
  9368  	//       "required": true,
  9369  	//       "type": "string"
  9370  	//     },
  9371  	//     "responsePolicy": {
  9372  	//       "description": "User assigned name of the Response Policy containing the Response Policy Rule.",
  9373  	//       "location": "path",
  9374  	//       "required": true,
  9375  	//       "type": "string"
  9376  	//     },
  9377  	//     "responsePolicyRule": {
  9378  	//       "description": "User assigned name of the Response Policy Rule addressed by this request.",
  9379  	//       "location": "path",
  9380  	//       "required": true,
  9381  	//       "type": "string"
  9382  	//     }
  9383  	//   },
  9384  	//   "path": "dns/v2/projects/{project}/locations/{location}/responsePolicies/{responsePolicy}/rules/{responsePolicyRule}",
  9385  	//   "request": {
  9386  	//     "$ref": "ResponsePolicyRule"
  9387  	//   },
  9388  	//   "response": {
  9389  	//     "$ref": "ResponsePolicyRulesPatchResponse"
  9390  	//   },
  9391  	//   "scopes": [
  9392  	//     "https://www.googleapis.com/auth/cloud-platform",
  9393  	//     "https://www.googleapis.com/auth/ndev.clouddns.readwrite"
  9394  	//   ]
  9395  	// }
  9396  
  9397  }
  9398  
  9399  // method id "dns.responsePolicyRules.update":
  9400  
  9401  type ResponsePolicyRulesUpdateCall struct {
  9402  	s                  *Service
  9403  	project            string
  9404  	location           string
  9405  	responsePolicy     string
  9406  	responsePolicyRule string
  9407  	responsepolicyrule *ResponsePolicyRule
  9408  	urlParams_         gensupport.URLParams
  9409  	ctx_               context.Context
  9410  	header_            http.Header
  9411  }
  9412  
  9413  // Update: Updates an existing Response Policy Rule.
  9414  //
  9415  //   - location: Specifies the location of the resource. This information
  9416  //     will be used for routing and will be part of the resource name.
  9417  //   - project: Identifies the project addressed by this request.
  9418  //   - responsePolicy: User assigned name of the Response Policy
  9419  //     containing the Response Policy Rule.
  9420  //   - responsePolicyRule: User assigned name of the Response Policy Rule
  9421  //     addressed by this request.
  9422  func (r *ResponsePolicyRulesService) Update(project string, location string, responsePolicy string, responsePolicyRule string, responsepolicyrule *ResponsePolicyRule) *ResponsePolicyRulesUpdateCall {
  9423  	c := &ResponsePolicyRulesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9424  	c.project = project
  9425  	c.location = location
  9426  	c.responsePolicy = responsePolicy
  9427  	c.responsePolicyRule = responsePolicyRule
  9428  	c.responsepolicyrule = responsepolicyrule
  9429  	return c
  9430  }
  9431  
  9432  // ClientOperationId sets the optional parameter "clientOperationId":
  9433  // For mutating operation requests only. An optional identifier
  9434  // specified by the client. Must be unique for operation resources in
  9435  // the Operations collection.
  9436  func (c *ResponsePolicyRulesUpdateCall) ClientOperationId(clientOperationId string) *ResponsePolicyRulesUpdateCall {
  9437  	c.urlParams_.Set("clientOperationId", clientOperationId)
  9438  	return c
  9439  }
  9440  
  9441  // Fields allows partial responses to be retrieved. See
  9442  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  9443  // for more information.
  9444  func (c *ResponsePolicyRulesUpdateCall) Fields(s ...googleapi.Field) *ResponsePolicyRulesUpdateCall {
  9445  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9446  	return c
  9447  }
  9448  
  9449  // Context sets the context to be used in this call's Do method. Any
  9450  // pending HTTP request will be aborted if the provided context is
  9451  // canceled.
  9452  func (c *ResponsePolicyRulesUpdateCall) Context(ctx context.Context) *ResponsePolicyRulesUpdateCall {
  9453  	c.ctx_ = ctx
  9454  	return c
  9455  }
  9456  
  9457  // Header returns an http.Header that can be modified by the caller to
  9458  // add HTTP headers to the request.
  9459  func (c *ResponsePolicyRulesUpdateCall) Header() http.Header {
  9460  	if c.header_ == nil {
  9461  		c.header_ = make(http.Header)
  9462  	}
  9463  	return c.header_
  9464  }
  9465  
  9466  func (c *ResponsePolicyRulesUpdateCall) doRequest(alt string) (*http.Response, error) {
  9467  	reqHeaders := make(http.Header)
  9468  	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
  9469  	for k, v := range c.header_ {
  9470  		reqHeaders[k] = v
  9471  	}
  9472  	reqHeaders.Set("User-Agent", c.s.userAgent())
  9473  	var body io.Reader = nil
  9474  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.responsepolicyrule)
  9475  	if err != nil {
  9476  		return nil, err
  9477  	}
  9478  	reqHeaders.Set("Content-Type", "application/json")
  9479  	c.urlParams_.Set("alt", alt)
  9480  	c.urlParams_.Set("prettyPrint", "false")
  9481  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v2/projects/{project}/locations/{location}/responsePolicies/{responsePolicy}/rules/{responsePolicyRule}")
  9482  	urls += "?" + c.urlParams_.Encode()
  9483  	req, err := http.NewRequest("PUT", urls, body)
  9484  	if err != nil {
  9485  		return nil, err
  9486  	}
  9487  	req.Header = reqHeaders
  9488  	googleapi.Expand(req.URL, map[string]string{
  9489  		"project":            c.project,
  9490  		"location":           c.location,
  9491  		"responsePolicy":     c.responsePolicy,
  9492  		"responsePolicyRule": c.responsePolicyRule,
  9493  	})
  9494  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9495  }
  9496  
  9497  // Do executes the "dns.responsePolicyRules.update" call.
  9498  // Exactly one of *ResponsePolicyRulesUpdateResponse or error will be
  9499  // non-nil. Any non-2xx status code is an error. Response headers are in
  9500  // either *ResponsePolicyRulesUpdateResponse.ServerResponse.Header or
  9501  // (if a response was returned at all) in
  9502  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  9503  // whether the returned error was because http.StatusNotModified was
  9504  // returned.
  9505  func (c *ResponsePolicyRulesUpdateCall) Do(opts ...googleapi.CallOption) (*ResponsePolicyRulesUpdateResponse, error) {
  9506  	gensupport.SetOptions(c.urlParams_, opts...)
  9507  	res, err := c.doRequest("json")
  9508  	if res != nil && res.StatusCode == http.StatusNotModified {
  9509  		if res.Body != nil {
  9510  			res.Body.Close()
  9511  		}
  9512  		return nil, &googleapi.Error{
  9513  			Code:   res.StatusCode,
  9514  			Header: res.Header,
  9515  		}
  9516  	}
  9517  	if err != nil {
  9518  		return nil, err
  9519  	}
  9520  	defer googleapi.CloseBody(res)
  9521  	if err := googleapi.CheckResponse(res); err != nil {
  9522  		return nil, err
  9523  	}
  9524  	ret := &ResponsePolicyRulesUpdateResponse{
  9525  		ServerResponse: googleapi.ServerResponse{
  9526  			Header:         res.Header,
  9527  			HTTPStatusCode: res.StatusCode,
  9528  		},
  9529  	}
  9530  	target := &ret
  9531  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9532  		return nil, err
  9533  	}
  9534  	return ret, nil
  9535  	// {
  9536  	//   "description": "Updates an existing Response Policy Rule.",
  9537  	//   "flatPath": "dns/v2/projects/{project}/locations/{location}/responsePolicies/{responsePolicy}/rules/{responsePolicyRule}",
  9538  	//   "httpMethod": "PUT",
  9539  	//   "id": "dns.responsePolicyRules.update",
  9540  	//   "parameterOrder": [
  9541  	//     "project",
  9542  	//     "location",
  9543  	//     "responsePolicy",
  9544  	//     "responsePolicyRule"
  9545  	//   ],
  9546  	//   "parameters": {
  9547  	//     "clientOperationId": {
  9548  	//       "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.",
  9549  	//       "location": "query",
  9550  	//       "type": "string"
  9551  	//     },
  9552  	//     "location": {
  9553  	//       "default": "global",
  9554  	//       "description": "Specifies the location of the resource. This information will be used for routing and will be part of the resource name.",
  9555  	//       "location": "path",
  9556  	//       "required": true,
  9557  	//       "type": "string"
  9558  	//     },
  9559  	//     "project": {
  9560  	//       "description": "Identifies the project addressed by this request.",
  9561  	//       "location": "path",
  9562  	//       "required": true,
  9563  	//       "type": "string"
  9564  	//     },
  9565  	//     "responsePolicy": {
  9566  	//       "description": "User assigned name of the Response Policy containing the Response Policy Rule.",
  9567  	//       "location": "path",
  9568  	//       "required": true,
  9569  	//       "type": "string"
  9570  	//     },
  9571  	//     "responsePolicyRule": {
  9572  	//       "description": "User assigned name of the Response Policy Rule addressed by this request.",
  9573  	//       "location": "path",
  9574  	//       "required": true,
  9575  	//       "type": "string"
  9576  	//     }
  9577  	//   },
  9578  	//   "path": "dns/v2/projects/{project}/locations/{location}/responsePolicies/{responsePolicy}/rules/{responsePolicyRule}",
  9579  	//   "request": {
  9580  	//     "$ref": "ResponsePolicyRule"
  9581  	//   },
  9582  	//   "response": {
  9583  	//     "$ref": "ResponsePolicyRulesUpdateResponse"
  9584  	//   },
  9585  	//   "scopes": [
  9586  	//     "https://www.googleapis.com/auth/cloud-platform",
  9587  	//     "https://www.googleapis.com/auth/ndev.clouddns.readwrite"
  9588  	//   ]
  9589  	// }
  9590  
  9591  }
  9592  

View as plain text