...

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

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

     1  // Copyright 2024 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  // # Library status
    12  //
    13  // These client libraries are officially supported by Google. However, this
    14  // library is considered complete and is in maintenance mode. This means
    15  // that we will address critical bugs and security issues but will not add
    16  // any new features.
    17  //
    18  // When possible, we recommend using our newer
    19  // [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go)
    20  // that are still actively being worked and iterated on.
    21  //
    22  // # Creating a client
    23  //
    24  // Usage example:
    25  //
    26  //	import "google.golang.org/api/dns/v1beta2"
    27  //	...
    28  //	ctx := context.Background()
    29  //	dnsService, err := dns.NewService(ctx)
    30  //
    31  // In this example, Google Application Default Credentials are used for
    32  // authentication. For information on how to create and obtain Application
    33  // Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
    34  //
    35  // # Other authentication options
    36  //
    37  // By default, all available scopes (see "Constants") are used to authenticate.
    38  // To restrict scopes, use [google.golang.org/api/option.WithScopes]:
    39  //
    40  //	dnsService, err := dns.NewService(ctx, option.WithScopes(dns.NdevClouddnsReadwriteScope))
    41  //
    42  // To use an API key for authentication (note: some APIs do not support API
    43  // keys), use [google.golang.org/api/option.WithAPIKey]:
    44  //
    45  //	dnsService, err := dns.NewService(ctx, option.WithAPIKey("AIza..."))
    46  //
    47  // To use an OAuth token (e.g., a user token obtained via a three-legged OAuth
    48  // flow, use [google.golang.org/api/option.WithTokenSource]:
    49  //
    50  //	config := &oauth2.Config{...}
    51  //	// ...
    52  //	token, err := config.Exchange(ctx, ...)
    53  //	dnsService, err := dns.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
    54  //
    55  // See [google.golang.org/api/option.ClientOption] for details on options.
    56  package dns // import "google.golang.org/api/dns/v1beta2"
    57  
    58  import (
    59  	"bytes"
    60  	"context"
    61  	"encoding/json"
    62  	"errors"
    63  	"fmt"
    64  	"io"
    65  	"net/http"
    66  	"net/url"
    67  	"strconv"
    68  	"strings"
    69  
    70  	googleapi "google.golang.org/api/googleapi"
    71  	internal "google.golang.org/api/internal"
    72  	gensupport "google.golang.org/api/internal/gensupport"
    73  	option "google.golang.org/api/option"
    74  	internaloption "google.golang.org/api/option/internaloption"
    75  	htransport "google.golang.org/api/transport/http"
    76  )
    77  
    78  // Always reference these packages, just in case the auto-generated code
    79  // below doesn't.
    80  var _ = bytes.NewBuffer
    81  var _ = strconv.Itoa
    82  var _ = fmt.Sprintf
    83  var _ = json.NewDecoder
    84  var _ = io.Copy
    85  var _ = url.Parse
    86  var _ = gensupport.MarshalJSON
    87  var _ = googleapi.Version
    88  var _ = errors.New
    89  var _ = strings.Replace
    90  var _ = context.Canceled
    91  var _ = internaloption.WithDefaultEndpoint
    92  var _ = internal.Version
    93  
    94  const apiId = "dns:v1beta2"
    95  const apiName = "dns"
    96  const apiVersion = "v1beta2"
    97  const basePath = "https://dns.googleapis.com/"
    98  const basePathTemplate = "https://dns.UNIVERSE_DOMAIN/"
    99  const mtlsBasePath = "https://dns.mtls.googleapis.com/"
   100  
   101  // OAuth2 scopes used by this API.
   102  const (
   103  	// See, edit, configure, and delete your Google Cloud data and see the email
   104  	// address for your Google Account.
   105  	CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
   106  
   107  	// View your data across Google Cloud services and see the email address of
   108  	// your Google Account
   109  	CloudPlatformReadOnlyScope = "https://www.googleapis.com/auth/cloud-platform.read-only"
   110  
   111  	// View your DNS records hosted by Google Cloud DNS
   112  	NdevClouddnsReadonlyScope = "https://www.googleapis.com/auth/ndev.clouddns.readonly"
   113  
   114  	// View and manage your DNS records hosted by Google Cloud DNS
   115  	NdevClouddnsReadwriteScope = "https://www.googleapis.com/auth/ndev.clouddns.readwrite"
   116  )
   117  
   118  // NewService creates a new Service.
   119  func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
   120  	scopesOption := internaloption.WithDefaultScopes(
   121  		"https://www.googleapis.com/auth/cloud-platform",
   122  		"https://www.googleapis.com/auth/cloud-platform.read-only",
   123  		"https://www.googleapis.com/auth/ndev.clouddns.readonly",
   124  		"https://www.googleapis.com/auth/ndev.clouddns.readwrite",
   125  	)
   126  	// NOTE: prepend, so we don't override user-specified scopes.
   127  	opts = append([]option.ClientOption{scopesOption}, opts...)
   128  	opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
   129  	opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate))
   130  	opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
   131  	opts = append(opts, internaloption.EnableNewAuthLibrary())
   132  	client, endpoint, err := htransport.NewClient(ctx, opts...)
   133  	if err != nil {
   134  		return nil, err
   135  	}
   136  	s, err := New(client)
   137  	if err != nil {
   138  		return nil, err
   139  	}
   140  	if endpoint != "" {
   141  		s.BasePath = endpoint
   142  	}
   143  	return s, nil
   144  }
   145  
   146  // New creates a new Service. It uses the provided http.Client for requests.
   147  //
   148  // Deprecated: please use NewService instead.
   149  // To provide a custom HTTP client, use option.WithHTTPClient.
   150  // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
   151  func New(client *http.Client) (*Service, error) {
   152  	if client == nil {
   153  		return nil, errors.New("client is nil")
   154  	}
   155  	s := &Service{client: client, BasePath: basePath}
   156  	s.Changes = NewChangesService(s)
   157  	s.DnsKeys = NewDnsKeysService(s)
   158  	s.ManagedZoneOperations = NewManagedZoneOperationsService(s)
   159  	s.ManagedZones = NewManagedZonesService(s)
   160  	s.Policies = NewPoliciesService(s)
   161  	s.Projects = NewProjectsService(s)
   162  	s.ResourceRecordSets = NewResourceRecordSetsService(s)
   163  	s.ResponsePolicies = NewResponsePoliciesService(s)
   164  	s.ResponsePolicyRules = NewResponsePolicyRulesService(s)
   165  	return s, nil
   166  }
   167  
   168  type Service struct {
   169  	client    *http.Client
   170  	BasePath  string // API endpoint base URL
   171  	UserAgent string // optional additional User-Agent fragment
   172  
   173  	Changes *ChangesService
   174  
   175  	DnsKeys *DnsKeysService
   176  
   177  	ManagedZoneOperations *ManagedZoneOperationsService
   178  
   179  	ManagedZones *ManagedZonesService
   180  
   181  	Policies *PoliciesService
   182  
   183  	Projects *ProjectsService
   184  
   185  	ResourceRecordSets *ResourceRecordSetsService
   186  
   187  	ResponsePolicies *ResponsePoliciesService
   188  
   189  	ResponsePolicyRules *ResponsePolicyRulesService
   190  }
   191  
   192  func (s *Service) userAgent() string {
   193  	if s.UserAgent == "" {
   194  		return googleapi.UserAgent
   195  	}
   196  	return googleapi.UserAgent + " " + s.UserAgent
   197  }
   198  
   199  func NewChangesService(s *Service) *ChangesService {
   200  	rs := &ChangesService{s: s}
   201  	return rs
   202  }
   203  
   204  type ChangesService struct {
   205  	s *Service
   206  }
   207  
   208  func NewDnsKeysService(s *Service) *DnsKeysService {
   209  	rs := &DnsKeysService{s: s}
   210  	return rs
   211  }
   212  
   213  type DnsKeysService struct {
   214  	s *Service
   215  }
   216  
   217  func NewManagedZoneOperationsService(s *Service) *ManagedZoneOperationsService {
   218  	rs := &ManagedZoneOperationsService{s: s}
   219  	return rs
   220  }
   221  
   222  type ManagedZoneOperationsService struct {
   223  	s *Service
   224  }
   225  
   226  func NewManagedZonesService(s *Service) *ManagedZonesService {
   227  	rs := &ManagedZonesService{s: s}
   228  	return rs
   229  }
   230  
   231  type ManagedZonesService struct {
   232  	s *Service
   233  }
   234  
   235  func NewPoliciesService(s *Service) *PoliciesService {
   236  	rs := &PoliciesService{s: s}
   237  	return rs
   238  }
   239  
   240  type PoliciesService struct {
   241  	s *Service
   242  }
   243  
   244  func NewProjectsService(s *Service) *ProjectsService {
   245  	rs := &ProjectsService{s: s}
   246  	return rs
   247  }
   248  
   249  type ProjectsService struct {
   250  	s *Service
   251  }
   252  
   253  func NewResourceRecordSetsService(s *Service) *ResourceRecordSetsService {
   254  	rs := &ResourceRecordSetsService{s: s}
   255  	return rs
   256  }
   257  
   258  type ResourceRecordSetsService struct {
   259  	s *Service
   260  }
   261  
   262  func NewResponsePoliciesService(s *Service) *ResponsePoliciesService {
   263  	rs := &ResponsePoliciesService{s: s}
   264  	return rs
   265  }
   266  
   267  type ResponsePoliciesService struct {
   268  	s *Service
   269  }
   270  
   271  func NewResponsePolicyRulesService(s *Service) *ResponsePolicyRulesService {
   272  	rs := &ResponsePolicyRulesService{s: s}
   273  	return rs
   274  }
   275  
   276  type ResponsePolicyRulesService struct {
   277  	s *Service
   278  }
   279  
   280  // Change: A Change represents a set of ResourceRecordSet additions and
   281  // deletions applied atomically to a ManagedZone. ResourceRecordSets within a
   282  // ManagedZone are modified by creating a new Change element in the Changes
   283  // collection. In turn the Changes collection also records the past
   284  // modifications to the ResourceRecordSets in a ManagedZone. The current state
   285  // of the ManagedZone is the sum effect of applying all Change elements in the
   286  // Changes collection in sequence.
   287  type Change struct {
   288  	// Additions: Which ResourceRecordSets to add?
   289  	Additions []*ResourceRecordSet `json:"additions,omitempty"`
   290  	// Deletions: Which ResourceRecordSets to remove? Must match existing data
   291  	// exactly.
   292  	Deletions []*ResourceRecordSet `json:"deletions,omitempty"`
   293  	// Id: Unique identifier for the resource; defined by the server (output only).
   294  	Id string `json:"id,omitempty"`
   295  	// IsServing: If the DNS queries for the zone will be served.
   296  	IsServing bool   `json:"isServing,omitempty"`
   297  	Kind      string `json:"kind,omitempty"`
   298  	// StartTime: The time that this operation was started by the server (output
   299  	// only). This is in RFC3339 text format.
   300  	StartTime string `json:"startTime,omitempty"`
   301  	// Status: Status of the operation (output only). A status of "done" means that
   302  	// the request to update the authoritative servers has been sent, but the
   303  	// servers might not be updated yet.
   304  	//
   305  	// Possible values:
   306  	//   "pending"
   307  	//   "done"
   308  	Status string `json:"status,omitempty"`
   309  
   310  	// ServerResponse contains the HTTP response code and headers from the server.
   311  	googleapi.ServerResponse `json:"-"`
   312  	// ForceSendFields is a list of field names (e.g. "Additions") to
   313  	// unconditionally include in API requests. By default, fields with empty or
   314  	// default values are omitted from API requests. See
   315  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   316  	// details.
   317  	ForceSendFields []string `json:"-"`
   318  	// NullFields is a list of field names (e.g. "Additions") to include in API
   319  	// requests with the JSON null value. By default, fields with empty values are
   320  	// omitted from API requests. See
   321  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   322  	NullFields []string `json:"-"`
   323  }
   324  
   325  func (s *Change) MarshalJSON() ([]byte, error) {
   326  	type NoMethod Change
   327  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   328  }
   329  
   330  // ChangesListResponse: The response to a request to enumerate Changes to a
   331  // ResourceRecordSets collection.
   332  type ChangesListResponse struct {
   333  	// Changes: The requested changes.
   334  	Changes []*Change       `json:"changes,omitempty"`
   335  	Header  *ResponseHeader `json:"header,omitempty"`
   336  	// Kind: Type of resource.
   337  	Kind string `json:"kind,omitempty"`
   338  	// NextPageToken: The presence of this field indicates that there exist more
   339  	// results following your last page of results in pagination order. To fetch
   340  	// them, make another list request using this value as your pagination token.
   341  	// This lets you retrieve the complete contents of even very large collections
   342  	// one page at a time. However, if the contents of the collection change
   343  	// between the first and last paginated list request, the set of all elements
   344  	// returned are an inconsistent view of the collection. You cannot retrieve a
   345  	// "snapshot" 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 server.
   349  	googleapi.ServerResponse `json:"-"`
   350  	// ForceSendFields is a list of field names (e.g. "Changes") to unconditionally
   351  	// include in API requests. By default, fields with empty or default values are
   352  	// omitted from API requests. See
   353  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   354  	// details.
   355  	ForceSendFields []string `json:"-"`
   356  	// NullFields is a list of field names (e.g. "Changes") to include in API
   357  	// requests with the JSON null value. By default, fields with empty values are
   358  	// omitted from API requests. See
   359  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   360  	NullFields []string `json:"-"`
   361  }
   362  
   363  func (s *ChangesListResponse) MarshalJSON() ([]byte, error) {
   364  	type NoMethod ChangesListResponse
   365  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   366  }
   367  
   368  // DnsKey: A DNSSEC key pair.
   369  type DnsKey struct {
   370  	// Algorithm: String mnemonic specifying the DNSSEC algorithm of this key.
   371  	// Immutable after creation time.
   372  	//
   373  	// Possible values:
   374  	//   "rsasha1"
   375  	//   "rsasha256"
   376  	//   "rsasha512"
   377  	//   "ecdsap256sha256"
   378  	//   "ecdsap384sha384"
   379  	Algorithm string `json:"algorithm,omitempty"`
   380  	// CreationTime: The time that this resource was created in the control plane.
   381  	// This is in RFC3339 text format. Output only.
   382  	CreationTime string `json:"creationTime,omitempty"`
   383  	// Description: A mutable string of at most 1024 characters associated with
   384  	// this resource for the user's convenience. Has no effect on the resource's
   385  	// function.
   386  	Description string `json:"description,omitempty"`
   387  	// Digests: Cryptographic hashes of the DNSKEY resource record associated with
   388  	// this DnsKey. These digests are needed to construct a DS record that points
   389  	// at this DNS key. Output only.
   390  	Digests []*DnsKeyDigest `json:"digests,omitempty"`
   391  	// Id: Unique identifier for the resource; defined by the server (output only).
   392  	Id string `json:"id,omitempty"`
   393  	// IsActive: Active keys are used to sign subsequent changes to the
   394  	// ManagedZone. Inactive keys are still present as DNSKEY Resource Records for
   395  	// the use of resolvers validating existing signatures.
   396  	IsActive bool `json:"isActive,omitempty"`
   397  	// KeyLength: Length of the key in bits. Specified at creation time, and then
   398  	// immutable.
   399  	KeyLength int64 `json:"keyLength,omitempty"`
   400  	// KeyTag: The key tag is a non-cryptographic hash of the a DNSKEY resource
   401  	// record associated with this DnsKey. The key tag can be used to identify a
   402  	// DNSKEY more quickly (but it is not a unique identifier). In particular, the
   403  	// key tag is used in a parent zone's DS record to point at the DNSKEY in this
   404  	// child ManagedZone. The key tag is a number in the range [0, 65535] and the
   405  	// algorithm to calculate it is specified in RFC4034 Appendix B. Output only.
   406  	KeyTag int64  `json:"keyTag,omitempty"`
   407  	Kind   string `json:"kind,omitempty"`
   408  	// PublicKey: Base64 encoded public half of this key. Output only.
   409  	PublicKey string `json:"publicKey,omitempty"`
   410  	// Type: One of "KEY_SIGNING" or "ZONE_SIGNING". Keys of type KEY_SIGNING have
   411  	// the Secure Entry Point flag set and, when active, are used to sign only
   412  	// resource record sets of type DNSKEY. Otherwise, the Secure Entry Point flag
   413  	// is cleared, and this key is used to sign only resource record sets of other
   414  	// types. Immutable after creation time.
   415  	//
   416  	// Possible values:
   417  	//   "keySigning"
   418  	//   "zoneSigning"
   419  	Type string `json:"type,omitempty"`
   420  
   421  	// ServerResponse contains the HTTP response code and headers from the server.
   422  	googleapi.ServerResponse `json:"-"`
   423  	// ForceSendFields is a list of field names (e.g. "Algorithm") to
   424  	// unconditionally include in API requests. By default, fields with empty or
   425  	// default values are omitted from API requests. See
   426  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   427  	// details.
   428  	ForceSendFields []string `json:"-"`
   429  	// NullFields is a list of field names (e.g. "Algorithm") to include in API
   430  	// requests with the JSON null value. By default, fields with empty values are
   431  	// omitted from API requests. See
   432  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   433  	NullFields []string `json:"-"`
   434  }
   435  
   436  func (s *DnsKey) MarshalJSON() ([]byte, error) {
   437  	type NoMethod DnsKey
   438  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   439  }
   440  
   441  type DnsKeyDigest struct {
   442  	// Digest: The base-16 encoded bytes of this digest. Suitable for use in a DS
   443  	// resource record.
   444  	Digest string `json:"digest,omitempty"`
   445  	// Type: Specifies the algorithm used to calculate this digest.
   446  	//
   447  	// Possible values:
   448  	//   "sha1"
   449  	//   "sha256"
   450  	//   "sha384"
   451  	Type string `json:"type,omitempty"`
   452  	// ForceSendFields is a list of field names (e.g. "Digest") to unconditionally
   453  	// include in API requests. By default, fields with empty or default values are
   454  	// omitted from API requests. See
   455  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   456  	// details.
   457  	ForceSendFields []string `json:"-"`
   458  	// NullFields is a list of field names (e.g. "Digest") to include in API
   459  	// requests with the JSON null value. By default, fields with empty values are
   460  	// omitted from API requests. See
   461  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   462  	NullFields []string `json:"-"`
   463  }
   464  
   465  func (s *DnsKeyDigest) MarshalJSON() ([]byte, error) {
   466  	type NoMethod DnsKeyDigest
   467  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   468  }
   469  
   470  // DnsKeySpec: Parameters for DnsKey key generation. Used for generating
   471  // initial keys for a new ManagedZone and as default when adding a new DnsKey.
   472  type DnsKeySpec struct {
   473  	// Algorithm: String mnemonic specifying the DNSSEC algorithm of this key.
   474  	//
   475  	// Possible values:
   476  	//   "rsasha1"
   477  	//   "rsasha256"
   478  	//   "rsasha512"
   479  	//   "ecdsap256sha256"
   480  	//   "ecdsap384sha384"
   481  	Algorithm string `json:"algorithm,omitempty"`
   482  	// KeyLength: Length of the keys in bits.
   483  	KeyLength int64 `json:"keyLength,omitempty"`
   484  	// KeyType: Specifies whether this is a key signing key (KSK) or a zone signing
   485  	// key (ZSK). Key signing keys have the Secure Entry Point flag set and, when
   486  	// active, are only used to sign resource record sets of type DNSKEY. Zone
   487  	// signing keys do not have the Secure Entry Point flag set and are used to
   488  	// sign all other types of resource record sets.
   489  	//
   490  	// Possible values:
   491  	//   "keySigning"
   492  	//   "zoneSigning"
   493  	KeyType string `json:"keyType,omitempty"`
   494  	Kind    string `json:"kind,omitempty"`
   495  	// ForceSendFields is a list of field names (e.g. "Algorithm") to
   496  	// unconditionally include in API requests. By default, fields with empty or
   497  	// default values are omitted from API requests. See
   498  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   499  	// details.
   500  	ForceSendFields []string `json:"-"`
   501  	// NullFields is a list of field names (e.g. "Algorithm") to include in API
   502  	// requests with the JSON null value. By default, fields with empty values are
   503  	// omitted from API requests. See
   504  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   505  	NullFields []string `json:"-"`
   506  }
   507  
   508  func (s *DnsKeySpec) MarshalJSON() ([]byte, error) {
   509  	type NoMethod DnsKeySpec
   510  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   511  }
   512  
   513  // DnsKeysListResponse: The response to a request to enumerate DnsKeys in a
   514  // ManagedZone.
   515  type DnsKeysListResponse struct {
   516  	// DnsKeys: The requested resources.
   517  	DnsKeys []*DnsKey       `json:"dnsKeys,omitempty"`
   518  	Header  *ResponseHeader `json:"header,omitempty"`
   519  	// Kind: Type of resource.
   520  	Kind string `json:"kind,omitempty"`
   521  	// NextPageToken: The presence of this field indicates that there exist more
   522  	// results following your last page of results in pagination order. To fetch
   523  	// them, make another list request using this value as your pagination token.
   524  	// In this way you can retrieve the complete contents of even very large
   525  	// collections one page at a time. However, if the contents of the collection
   526  	// change between the first and last paginated list request, the set of all
   527  	// elements returned are an inconsistent view of the collection. There is no
   528  	// way to retrieve a "snapshot" of collections larger than the maximum page
   529  	// size.
   530  	NextPageToken string `json:"nextPageToken,omitempty"`
   531  
   532  	// ServerResponse contains the HTTP response code and headers from the server.
   533  	googleapi.ServerResponse `json:"-"`
   534  	// ForceSendFields is a list of field names (e.g. "DnsKeys") to unconditionally
   535  	// include in API requests. By default, fields with empty or default values are
   536  	// omitted from API requests. See
   537  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   538  	// details.
   539  	ForceSendFields []string `json:"-"`
   540  	// NullFields is a list of field names (e.g. "DnsKeys") to include in API
   541  	// requests with the JSON null value. By default, fields with empty values are
   542  	// omitted from API requests. See
   543  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   544  	NullFields []string `json:"-"`
   545  }
   546  
   547  func (s *DnsKeysListResponse) MarshalJSON() ([]byte, error) {
   548  	type NoMethod DnsKeysListResponse
   549  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   550  }
   551  
   552  // Expr: Represents a textual expression in the Common Expression Language
   553  // (CEL) syntax. CEL is a C-like expression language. The syntax and semantics
   554  // of CEL are documented at https://github.com/google/cel-spec. Example
   555  // (Comparison): title: "Summary size limit" description: "Determines if a
   556  // summary is less than 100 chars" expression: "document.summary.size() < 100"
   557  // Example (Equality): title: "Requestor is owner" description: "Determines if
   558  // requestor is the document owner" expression: "document.owner ==
   559  // request.auth.claims.email" Example (Logic): title: "Public documents"
   560  // description: "Determine whether the document should be publicly visible"
   561  // expression: "document.type != 'private' && document.type != 'internal'"
   562  // Example (Data Manipulation): title: "Notification string" description:
   563  // "Create a notification string with a timestamp." expression: "'New message
   564  // received at ' + string(document.create_time)" The exact variables and
   565  // functions that may be referenced within an expression are determined by the
   566  // service that evaluates it. See the service documentation for additional
   567  // information.
   568  type Expr struct {
   569  	// Description: Optional. Description of the expression. This is a longer text
   570  	// which describes the expression, e.g. when hovered over it in a UI.
   571  	Description string `json:"description,omitempty"`
   572  	// Expression: Textual representation of an expression in Common Expression
   573  	// Language syntax.
   574  	Expression string `json:"expression,omitempty"`
   575  	// Location: Optional. String indicating the location of the expression for
   576  	// error reporting, e.g. a file name and a position in the file.
   577  	Location string `json:"location,omitempty"`
   578  	// Title: Optional. Title for the expression, i.e. a short string describing
   579  	// its purpose. This can be used e.g. in UIs which allow to enter the
   580  	// expression.
   581  	Title string `json:"title,omitempty"`
   582  	// ForceSendFields is a list of field names (e.g. "Description") to
   583  	// unconditionally include in API requests. By default, fields with empty or
   584  	// default values are omitted from API requests. See
   585  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   586  	// details.
   587  	ForceSendFields []string `json:"-"`
   588  	// NullFields is a list of field names (e.g. "Description") to include in API
   589  	// requests with the JSON null value. By default, fields with empty values are
   590  	// omitted from API requests. See
   591  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   592  	NullFields []string `json:"-"`
   593  }
   594  
   595  func (s *Expr) MarshalJSON() ([]byte, error) {
   596  	type NoMethod Expr
   597  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   598  }
   599  
   600  // GoogleIamV1AuditConfig: Specifies the audit configuration for a service. The
   601  // configuration determines which permission types are logged, and what
   602  // identities, if any, are exempted from logging. An AuditConfig must have one
   603  // or more AuditLogConfigs. If there are AuditConfigs for both `allServices`
   604  // and a specific service, the union of the two AuditConfigs is used for that
   605  // service: the log_types specified in each AuditConfig are enabled, and the
   606  // exempted_members in each AuditLogConfig are exempted. Example Policy with
   607  // multiple AuditConfigs: { "audit_configs": [ { "service": "allServices",
   608  // "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [
   609  // "user:jose@example.com" ] }, { "log_type": "DATA_WRITE" }, { "log_type":
   610  // "ADMIN_READ" } ] }, { "service": "sampleservice.googleapis.com",
   611  // "audit_log_configs": [ { "log_type": "DATA_READ" }, { "log_type":
   612  // "DATA_WRITE", "exempted_members": [ "user:aliya@example.com" ] } ] } ] } For
   613  // sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ
   614  // logging. It also exempts `jose@example.com` from DATA_READ logging, and
   615  // `aliya@example.com` from DATA_WRITE logging.
   616  type GoogleIamV1AuditConfig struct {
   617  	// AuditLogConfigs: The configuration for logging of each type of permission.
   618  	AuditLogConfigs []*GoogleIamV1AuditLogConfig `json:"auditLogConfigs,omitempty"`
   619  	// Service: Specifies a service that will be enabled for audit logging. For
   620  	// example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices`
   621  	// is a special value that covers all services.
   622  	Service string `json:"service,omitempty"`
   623  	// ForceSendFields is a list of field names (e.g. "AuditLogConfigs") to
   624  	// unconditionally include in API requests. By default, fields with empty or
   625  	// default values are omitted from API requests. See
   626  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   627  	// details.
   628  	ForceSendFields []string `json:"-"`
   629  	// NullFields is a list of field names (e.g. "AuditLogConfigs") to include in
   630  	// API requests with the JSON null value. By default, fields with empty values
   631  	// are omitted from API requests. See
   632  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   633  	NullFields []string `json:"-"`
   634  }
   635  
   636  func (s *GoogleIamV1AuditConfig) MarshalJSON() ([]byte, error) {
   637  	type NoMethod GoogleIamV1AuditConfig
   638  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   639  }
   640  
   641  // GoogleIamV1AuditLogConfig: Provides the configuration for logging a type of
   642  // permissions. Example: { "audit_log_configs": [ { "log_type": "DATA_READ",
   643  // "exempted_members": [ "user:jose@example.com" ] }, { "log_type":
   644  // "DATA_WRITE" } ] } This enables 'DATA_READ' and 'DATA_WRITE' logging, while
   645  // exempting jose@example.com from DATA_READ logging.
   646  type GoogleIamV1AuditLogConfig struct {
   647  	// ExemptedMembers: Specifies the identities that do not cause logging for this
   648  	// type of permission. Follows the same format of Binding.members.
   649  	ExemptedMembers []string `json:"exemptedMembers,omitempty"`
   650  	// LogType: The log type that this config enables.
   651  	//
   652  	// Possible values:
   653  	//   "LOG_TYPE_UNSPECIFIED" - Default case. Should never be this.
   654  	//   "ADMIN_READ" - Admin reads. Example: CloudIAM getIamPolicy
   655  	//   "DATA_WRITE" - Data writes. Example: CloudSQL Users create
   656  	//   "DATA_READ" - Data reads. Example: CloudSQL Users list
   657  	LogType string `json:"logType,omitempty"`
   658  	// ForceSendFields is a list of field names (e.g. "ExemptedMembers") to
   659  	// unconditionally include in API requests. By default, fields with empty or
   660  	// default values are omitted from API requests. See
   661  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   662  	// details.
   663  	ForceSendFields []string `json:"-"`
   664  	// NullFields is a list of field names (e.g. "ExemptedMembers") to include in
   665  	// API requests with the JSON null value. By default, fields with empty values
   666  	// are omitted from API requests. See
   667  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   668  	NullFields []string `json:"-"`
   669  }
   670  
   671  func (s *GoogleIamV1AuditLogConfig) MarshalJSON() ([]byte, error) {
   672  	type NoMethod GoogleIamV1AuditLogConfig
   673  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   674  }
   675  
   676  // GoogleIamV1Binding: Associates `members`, or principals, with a `role`.
   677  type GoogleIamV1Binding struct {
   678  	// Condition: The condition that is associated with this binding. If the
   679  	// condition evaluates to `true`, then this binding applies to the current
   680  	// request. If the condition evaluates to `false`, then this binding does not
   681  	// apply to the current request. However, a different role binding might grant
   682  	// the same role to one or more of the principals in this binding. To learn
   683  	// which resources support conditions in their IAM policies, see the IAM
   684  	// documentation
   685  	// (https://cloud.google.com/iam/help/conditions/resource-policies).
   686  	Condition *Expr `json:"condition,omitempty"`
   687  	// Members: Specifies the principals requesting access for a Google Cloud
   688  	// resource. `members` can have the following values: * `allUsers`: A special
   689  	// identifier that represents anyone who is on the internet; with or without a
   690  	// Google account. * `allAuthenticatedUsers`: A special identifier that
   691  	// represents anyone who is authenticated with a Google account or a service
   692  	// account. Does not include identities that come from external identity
   693  	// providers (IdPs) through identity federation. * `user:{emailid}`: An email
   694  	// address that represents a specific Google account. For example,
   695  	// `alice@example.com` . * `serviceAccount:{emailid}`: An email address that
   696  	// represents a Google service account. For example,
   697  	// `my-other-app@appspot.gserviceaccount.com`. *
   698  	// `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An
   699  	// identifier for a Kubernetes service account
   700  	// (https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts).
   701  	// For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. *
   702  	// `group:{emailid}`: An email address that represents a Google group. For
   703  	// example, `admins@example.com`. * `domain:{domain}`: The G Suite domain
   704  	// (primary) that represents all the users of that domain. For example,
   705  	// `google.com` or `example.com`. *
   706  	// `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/sub
   707  	// ject/{subject_attribute_value}`: A single identity in a workforce identity
   708  	// pool. *
   709  	// `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/
   710  	// group/{group_id}`: All workforce identities in a group. *
   711  	// `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/
   712  	// attribute.{attribute_name}/{attribute_value}`: All workforce identities with
   713  	// a specific attribute value. *
   714  	// `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/
   715  	// *`: All identities in a workforce identity pool. *
   716  	// `principal://iam.googleapis.com/projects/{project_number}/locations/global/wo
   717  	// rkloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single
   718  	// identity in a workload identity pool. *
   719  	// `principalSet://iam.googleapis.com/projects/{project_number}/locations/global
   720  	// /workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool
   721  	// group. *
   722  	// `principalSet://iam.googleapis.com/projects/{project_number}/locations/global
   723  	// /workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}
   724  	// `: All identities in a workload identity pool with a certain attribute. *
   725  	// `principalSet://iam.googleapis.com/projects/{project_number}/locations/global
   726  	// /workloadIdentityPools/{pool_id}/*`: All identities in a workload identity
   727  	// pool. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus
   728  	// unique identifier) representing a user that has been recently deleted. For
   729  	// example, `alice@example.com?uid=123456789012345678901`. If the user is
   730  	// recovered, this value reverts to `user:{emailid}` and the recovered user
   731  	// retains the role in the binding. *
   732  	// `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
   733  	// unique identifier) representing a service account that has been recently
   734  	// deleted. For example,
   735  	// `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the
   736  	// service account is undeleted, this value reverts to
   737  	// `serviceAccount:{emailid}` and the undeleted service account retains the
   738  	// role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email
   739  	// address (plus unique identifier) representing a Google group that has been
   740  	// recently deleted. For example,
   741  	// `admins@example.com?uid=123456789012345678901`. If the group is recovered,
   742  	// this value reverts to `group:{emailid}` and the recovered group retains the
   743  	// role in the binding. *
   744  	// `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool
   745  	// _id}/subject/{subject_attribute_value}`: Deleted single identity in a
   746  	// workforce identity pool. For example,
   747  	// `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-po
   748  	// ol-id/subject/my-subject-attribute-value`.
   749  	Members []string `json:"members,omitempty"`
   750  	// Role: Role that is assigned to the list of `members`, or principals. For
   751  	// example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview
   752  	// of the IAM roles and permissions, see the IAM documentation
   753  	// (https://cloud.google.com/iam/docs/roles-overview). For a list of the
   754  	// available pre-defined roles, see here
   755  	// (https://cloud.google.com/iam/docs/understanding-roles).
   756  	Role string `json:"role,omitempty"`
   757  	// ForceSendFields is a list of field names (e.g. "Condition") to
   758  	// unconditionally include in API requests. By default, fields with empty or
   759  	// default values are omitted from API requests. See
   760  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   761  	// details.
   762  	ForceSendFields []string `json:"-"`
   763  	// NullFields is a list of field names (e.g. "Condition") to include in API
   764  	// requests with the JSON null value. By default, fields with empty values are
   765  	// omitted from API requests. See
   766  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   767  	NullFields []string `json:"-"`
   768  }
   769  
   770  func (s *GoogleIamV1Binding) MarshalJSON() ([]byte, error) {
   771  	type NoMethod GoogleIamV1Binding
   772  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   773  }
   774  
   775  // GoogleIamV1GetIamPolicyRequest: Request message for `GetIamPolicy` method.
   776  type GoogleIamV1GetIamPolicyRequest struct {
   777  	// Options: OPTIONAL: A `GetPolicyOptions` object for specifying options to
   778  	// `GetIamPolicy`.
   779  	Options *GoogleIamV1GetPolicyOptions `json:"options,omitempty"`
   780  	// ForceSendFields is a list of field names (e.g. "Options") to unconditionally
   781  	// include in API requests. By default, fields with empty or default values are
   782  	// omitted from API requests. See
   783  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   784  	// details.
   785  	ForceSendFields []string `json:"-"`
   786  	// NullFields is a list of field names (e.g. "Options") to include in API
   787  	// requests with the JSON null value. By default, fields with empty values are
   788  	// omitted from API requests. See
   789  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   790  	NullFields []string `json:"-"`
   791  }
   792  
   793  func (s *GoogleIamV1GetIamPolicyRequest) MarshalJSON() ([]byte, error) {
   794  	type NoMethod GoogleIamV1GetIamPolicyRequest
   795  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   796  }
   797  
   798  // GoogleIamV1GetPolicyOptions: Encapsulates settings provided to GetIamPolicy.
   799  type GoogleIamV1GetPolicyOptions struct {
   800  	// RequestedPolicyVersion: Optional. The maximum policy version that will be
   801  	// used to format the policy. Valid values are 0, 1, and 3. Requests specifying
   802  	// an invalid value will be rejected. Requests for policies with any
   803  	// conditional role bindings must specify version 3. Policies with no
   804  	// conditional role bindings may specify any valid value or leave the field
   805  	// unset. The policy in the response might use the policy version that you
   806  	// specified, or it might use a lower policy version. For example, if you
   807  	// specify version 3, but the policy has no conditional role bindings, the
   808  	// response uses version 1. To learn which resources support conditions in
   809  	// their IAM policies, see the IAM documentation
   810  	// (https://cloud.google.com/iam/help/conditions/resource-policies).
   811  	RequestedPolicyVersion int64 `json:"requestedPolicyVersion,omitempty"`
   812  	// ForceSendFields is a list of field names (e.g. "RequestedPolicyVersion") to
   813  	// unconditionally include in API requests. By default, fields with empty or
   814  	// default values are omitted from API requests. See
   815  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   816  	// details.
   817  	ForceSendFields []string `json:"-"`
   818  	// NullFields is a list of field names (e.g. "RequestedPolicyVersion") to
   819  	// include in API requests with the JSON null value. By default, fields with
   820  	// empty values are omitted from API requests. See
   821  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   822  	NullFields []string `json:"-"`
   823  }
   824  
   825  func (s *GoogleIamV1GetPolicyOptions) MarshalJSON() ([]byte, error) {
   826  	type NoMethod GoogleIamV1GetPolicyOptions
   827  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   828  }
   829  
   830  // GoogleIamV1Policy: An Identity and Access Management (IAM) policy, which
   831  // specifies access controls for Google Cloud resources. A `Policy` is a
   832  // collection of `bindings`. A `binding` binds one or more `members`, or
   833  // principals, to a single `role`. Principals can be user accounts, service
   834  // accounts, Google groups, and domains (such as G Suite). A `role` is a named
   835  // list of permissions; each `role` can be an IAM predefined role or a
   836  // user-created custom role. For some types of Google Cloud resources, a
   837  // `binding` can also specify a `condition`, which is a logical expression that
   838  // allows access to a resource only if the expression evaluates to `true`. A
   839  // condition can add constraints based on attributes of the request, the
   840  // resource, or both. To learn which resources support conditions in their IAM
   841  // policies, see the IAM documentation
   842  // (https://cloud.google.com/iam/help/conditions/resource-policies). **JSON
   843  // example:** ``` { "bindings": [ { "role":
   844  // "roles/resourcemanager.organizationAdmin", "members": [
   845  // "user:mike@example.com", "group:admins@example.com", "domain:google.com",
   846  // "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role":
   847  // "roles/resourcemanager.organizationViewer", "members": [
   848  // "user:eve@example.com" ], "condition": { "title": "expirable access",
   849  // "description": "Does not grant access after Sep 2020", "expression":
   850  // "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag":
   851  // "BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` bindings: -
   852  // members: - user:mike@example.com - group:admins@example.com -
   853  // domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com
   854  // role: roles/resourcemanager.organizationAdmin - members: -
   855  // user:eve@example.com role: roles/resourcemanager.organizationViewer
   856  // condition: title: expirable access description: Does not grant access after
   857  // Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z')
   858  // etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features,
   859  // see the IAM documentation (https://cloud.google.com/iam/docs/).
   860  type GoogleIamV1Policy struct {
   861  	// AuditConfigs: Specifies cloud audit logging configuration for this policy.
   862  	AuditConfigs []*GoogleIamV1AuditConfig `json:"auditConfigs,omitempty"`
   863  	// Bindings: Associates a list of `members`, or principals, with a `role`.
   864  	// Optionally, may specify a `condition` that determines how and when the
   865  	// `bindings` are applied. Each of the `bindings` must contain at least one
   866  	// principal. The `bindings` in a `Policy` can refer to up to 1,500 principals;
   867  	// up to 250 of these principals can be Google groups. Each occurrence of a
   868  	// principal counts towards these limits. For example, if the `bindings` grant
   869  	// 50 different roles to `user:alice@example.com`, and not to any other
   870  	// principal, then you can add another 1,450 principals to the `bindings` in
   871  	// the `Policy`.
   872  	Bindings []*GoogleIamV1Binding `json:"bindings,omitempty"`
   873  	// Etag: `etag` is used for optimistic concurrency control as a way to help
   874  	// prevent simultaneous updates of a policy from overwriting each other. It is
   875  	// strongly suggested that systems make use of the `etag` in the
   876  	// read-modify-write cycle to perform policy updates in order to avoid race
   877  	// conditions: An `etag` is returned in the response to `getIamPolicy`, and
   878  	// systems are expected to put that etag in the request to `setIamPolicy` to
   879  	// ensure that their change will be applied to the same version of the policy.
   880  	// **Important:** If you use IAM Conditions, you must include the `etag` field
   881  	// whenever you call `setIamPolicy`. If you omit this field, then IAM allows
   882  	// you to overwrite a version `3` policy with a version `1` policy, and all of
   883  	// the conditions in the version `3` policy are lost.
   884  	Etag string `json:"etag,omitempty"`
   885  	// Version: Specifies the format of the policy. Valid values are `0`, `1`, and
   886  	// `3`. Requests that specify an invalid value are rejected. Any operation that
   887  	// affects conditional role bindings must specify version `3`. This requirement
   888  	// applies to the following operations: * Getting a policy that includes a
   889  	// conditional role binding * Adding a conditional role binding to a policy *
   890  	// Changing a conditional role binding in a policy * Removing any role binding,
   891  	// with or without a condition, from a policy that includes conditions
   892  	// **Important:** If you use IAM Conditions, you must include the `etag` field
   893  	// whenever you call `setIamPolicy`. If you omit this field, then IAM allows
   894  	// you to overwrite a version `3` policy with a version `1` policy, and all of
   895  	// the conditions in the version `3` policy are lost. If a policy does not
   896  	// include any conditions, operations on that policy may specify any valid
   897  	// version or leave the field unset. To learn which resources support
   898  	// conditions in their IAM policies, see the IAM documentation
   899  	// (https://cloud.google.com/iam/help/conditions/resource-policies).
   900  	Version int64 `json:"version,omitempty"`
   901  
   902  	// ServerResponse contains the HTTP response code and headers from the server.
   903  	googleapi.ServerResponse `json:"-"`
   904  	// ForceSendFields is a list of field names (e.g. "AuditConfigs") to
   905  	// unconditionally include in API requests. By default, fields with empty or
   906  	// default values are omitted from API requests. See
   907  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   908  	// details.
   909  	ForceSendFields []string `json:"-"`
   910  	// NullFields is a list of field names (e.g. "AuditConfigs") to include in API
   911  	// requests with the JSON null value. By default, fields with empty values are
   912  	// omitted from API requests. See
   913  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   914  	NullFields []string `json:"-"`
   915  }
   916  
   917  func (s *GoogleIamV1Policy) MarshalJSON() ([]byte, error) {
   918  	type NoMethod GoogleIamV1Policy
   919  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   920  }
   921  
   922  // GoogleIamV1SetIamPolicyRequest: Request message for `SetIamPolicy` method.
   923  type GoogleIamV1SetIamPolicyRequest struct {
   924  	// Policy: REQUIRED: The complete policy to be applied to the `resource`. The
   925  	// size of the policy is limited to a few 10s of KB. An empty policy is a valid
   926  	// policy but certain Google Cloud services (such as Projects) might reject
   927  	// them.
   928  	Policy *GoogleIamV1Policy `json:"policy,omitempty"`
   929  	// UpdateMask: OPTIONAL: A FieldMask specifying which fields of the policy to
   930  	// modify. Only the fields in the mask will be modified. If no mask is
   931  	// provided, the following default mask is used: `paths: "bindings, etag"
   932  	UpdateMask string `json:"updateMask,omitempty"`
   933  	// ForceSendFields is a list of field names (e.g. "Policy") to unconditionally
   934  	// include in API requests. By default, fields with empty or default values are
   935  	// omitted from API requests. See
   936  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   937  	// details.
   938  	ForceSendFields []string `json:"-"`
   939  	// NullFields is a list of field names (e.g. "Policy") to include in API
   940  	// requests with the JSON null value. By default, fields with empty values are
   941  	// omitted from API requests. See
   942  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   943  	NullFields []string `json:"-"`
   944  }
   945  
   946  func (s *GoogleIamV1SetIamPolicyRequest) MarshalJSON() ([]byte, error) {
   947  	type NoMethod GoogleIamV1SetIamPolicyRequest
   948  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   949  }
   950  
   951  // GoogleIamV1TestIamPermissionsRequest: Request message for
   952  // `TestIamPermissions` method.
   953  type GoogleIamV1TestIamPermissionsRequest struct {
   954  	// Permissions: The set of permissions to check for the `resource`. Permissions
   955  	// with wildcards (such as `*` or `storage.*`) are not allowed. For more
   956  	// information see IAM Overview
   957  	// (https://cloud.google.com/iam/docs/overview#permissions).
   958  	Permissions []string `json:"permissions,omitempty"`
   959  	// ForceSendFields is a list of field names (e.g. "Permissions") to
   960  	// unconditionally include in API requests. By default, fields with empty or
   961  	// default values are omitted from API requests. See
   962  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   963  	// details.
   964  	ForceSendFields []string `json:"-"`
   965  	// NullFields is a list of field names (e.g. "Permissions") to include in API
   966  	// requests with the JSON null value. By default, fields with empty values are
   967  	// omitted from API requests. See
   968  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   969  	NullFields []string `json:"-"`
   970  }
   971  
   972  func (s *GoogleIamV1TestIamPermissionsRequest) MarshalJSON() ([]byte, error) {
   973  	type NoMethod GoogleIamV1TestIamPermissionsRequest
   974  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   975  }
   976  
   977  // GoogleIamV1TestIamPermissionsResponse: Response message for
   978  // `TestIamPermissions` method.
   979  type GoogleIamV1TestIamPermissionsResponse struct {
   980  	// Permissions: A subset of `TestPermissionsRequest.permissions` that the
   981  	// caller is allowed.
   982  	Permissions []string `json:"permissions,omitempty"`
   983  
   984  	// ServerResponse contains the HTTP response code and headers from the server.
   985  	googleapi.ServerResponse `json:"-"`
   986  	// ForceSendFields is a list of field names (e.g. "Permissions") to
   987  	// unconditionally include in API requests. By default, fields with empty or
   988  	// default values are omitted from API requests. See
   989  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   990  	// details.
   991  	ForceSendFields []string `json:"-"`
   992  	// NullFields is a list of field names (e.g. "Permissions") to include in API
   993  	// requests with the JSON null value. By default, fields with empty values are
   994  	// omitted from API requests. See
   995  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   996  	NullFields []string `json:"-"`
   997  }
   998  
   999  func (s *GoogleIamV1TestIamPermissionsResponse) MarshalJSON() ([]byte, error) {
  1000  	type NoMethod GoogleIamV1TestIamPermissionsResponse
  1001  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1002  }
  1003  
  1004  // ManagedZone: A zone is a subtree of the DNS namespace under one
  1005  // administrative responsibility. A ManagedZone is a resource that represents a
  1006  // DNS zone hosted by the Cloud DNS service.
  1007  type ManagedZone struct {
  1008  	CloudLoggingConfig *ManagedZoneCloudLoggingConfig `json:"cloudLoggingConfig,omitempty"`
  1009  	// CreationTime: The time that this resource was created on the server. This is
  1010  	// in RFC3339 text format. Output only.
  1011  	CreationTime string `json:"creationTime,omitempty"`
  1012  	// Description: A mutable string of at most 1024 characters associated with
  1013  	// this resource for the user's convenience. Has no effect on the managed
  1014  	// zone's function.
  1015  	Description string `json:"description,omitempty"`
  1016  	// DnsName: The DNS name of this managed zone, for instance "example.com.".
  1017  	DnsName string `json:"dnsName,omitempty"`
  1018  	// DnssecConfig: DNSSEC configuration.
  1019  	DnssecConfig *ManagedZoneDnsSecConfig `json:"dnssecConfig,omitempty"`
  1020  	// ForwardingConfig: The presence for this field indicates that outbound
  1021  	// forwarding is enabled for this zone. The value of this field contains the
  1022  	// set of destinations to forward to.
  1023  	ForwardingConfig *ManagedZoneForwardingConfig `json:"forwardingConfig,omitempty"`
  1024  	// Id: Unique identifier for the resource; defined by the server (output only)
  1025  	Id   uint64 `json:"id,omitempty,string"`
  1026  	Kind string `json:"kind,omitempty"`
  1027  	// Labels: User labels.
  1028  	Labels map[string]string `json:"labels,omitempty"`
  1029  	// Name: User assigned name for this resource. Must be unique within the
  1030  	// project. The name must be 1-63 characters long, must begin with a letter,
  1031  	// end with a letter or digit, and only contain lowercase letters, digits or
  1032  	// dashes.
  1033  	Name string `json:"name,omitempty"`
  1034  	// NameServerSet: Optionally specifies the NameServerSet for this ManagedZone.
  1035  	// A NameServerSet is a set of DNS name servers that all host the same
  1036  	// ManagedZones. Most users leave this field unset. If you need to use this
  1037  	// field, contact your account team.
  1038  	NameServerSet string `json:"nameServerSet,omitempty"`
  1039  	// NameServers: Delegate your managed_zone to these virtual name servers;
  1040  	// defined by the server (output only)
  1041  	NameServers []string `json:"nameServers,omitempty"`
  1042  	// PeeringConfig: The presence of this field indicates that DNS Peering is
  1043  	// enabled for this zone. The value of this field contains the network to peer
  1044  	// with.
  1045  	PeeringConfig *ManagedZonePeeringConfig `json:"peeringConfig,omitempty"`
  1046  	// PrivateVisibilityConfig: For privately visible zones, the set of Virtual
  1047  	// Private Cloud resources that the zone is visible from.
  1048  	PrivateVisibilityConfig *ManagedZonePrivateVisibilityConfig `json:"privateVisibilityConfig,omitempty"`
  1049  	// ReverseLookupConfig: The presence of this field indicates that this is a
  1050  	// managed reverse lookup zone and Cloud DNS resolves reverse lookup queries
  1051  	// using automatically configured records for VPC resources. This only applies
  1052  	// to networks listed under private_visibility_config.
  1053  	ReverseLookupConfig *ManagedZoneReverseLookupConfig `json:"reverseLookupConfig,omitempty"`
  1054  	// ServiceDirectoryConfig: This field links to the associated service directory
  1055  	// namespace. Do not set this field for public zones or forwarding zones.
  1056  	ServiceDirectoryConfig *ManagedZoneServiceDirectoryConfig `json:"serviceDirectoryConfig,omitempty"`
  1057  	// Visibility: The zone's visibility: public zones are exposed to the Internet,
  1058  	// while private zones are visible only to Virtual Private Cloud resources.
  1059  	//
  1060  	// Possible values:
  1061  	//   "public"
  1062  	//   "private"
  1063  	Visibility string `json:"visibility,omitempty"`
  1064  
  1065  	// ServerResponse contains the HTTP response code and headers from the server.
  1066  	googleapi.ServerResponse `json:"-"`
  1067  	// ForceSendFields is a list of field names (e.g. "CloudLoggingConfig") to
  1068  	// unconditionally include in API requests. By default, fields with empty or
  1069  	// default values are omitted from API requests. See
  1070  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1071  	// details.
  1072  	ForceSendFields []string `json:"-"`
  1073  	// NullFields is a list of field names (e.g. "CloudLoggingConfig") to include
  1074  	// in API requests with the JSON null value. By default, fields with empty
  1075  	// values are omitted from API requests. See
  1076  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1077  	NullFields []string `json:"-"`
  1078  }
  1079  
  1080  func (s *ManagedZone) MarshalJSON() ([]byte, error) {
  1081  	type NoMethod ManagedZone
  1082  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1083  }
  1084  
  1085  // ManagedZoneCloudLoggingConfig: Cloud Logging configurations for publicly
  1086  // visible zones.
  1087  type ManagedZoneCloudLoggingConfig struct {
  1088  	// EnableLogging: If set, enable query logging for this ManagedZone. False by
  1089  	// default, making logging opt-in.
  1090  	EnableLogging bool   `json:"enableLogging,omitempty"`
  1091  	Kind          string `json:"kind,omitempty"`
  1092  	// ForceSendFields is a list of field names (e.g. "EnableLogging") to
  1093  	// unconditionally include in API requests. By default, fields with empty or
  1094  	// default values are omitted from API requests. See
  1095  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1096  	// details.
  1097  	ForceSendFields []string `json:"-"`
  1098  	// NullFields is a list of field names (e.g. "EnableLogging") to include in API
  1099  	// requests with the JSON null value. By default, fields with empty values are
  1100  	// omitted from API requests. See
  1101  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1102  	NullFields []string `json:"-"`
  1103  }
  1104  
  1105  func (s *ManagedZoneCloudLoggingConfig) MarshalJSON() ([]byte, error) {
  1106  	type NoMethod ManagedZoneCloudLoggingConfig
  1107  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1108  }
  1109  
  1110  type ManagedZoneDnsSecConfig struct {
  1111  	// DefaultKeySpecs: Specifies parameters for generating initial DnsKeys for
  1112  	// this ManagedZone. Can only be changed while the state is OFF.
  1113  	DefaultKeySpecs []*DnsKeySpec `json:"defaultKeySpecs,omitempty"`
  1114  	Kind            string        `json:"kind,omitempty"`
  1115  	// NonExistence: Specifies the mechanism for authenticated denial-of-existence
  1116  	// responses. Can only be changed while the state is OFF.
  1117  	//
  1118  	// Possible values:
  1119  	//   "nsec"
  1120  	//   "nsec3"
  1121  	NonExistence string `json:"nonExistence,omitempty"`
  1122  	// State: Specifies whether DNSSEC is enabled, and what mode it is in.
  1123  	//
  1124  	// Possible values:
  1125  	//   "off" - DNSSEC is disabled; the zone is not signed.
  1126  	//   "on" - DNSSEC is enabled; the zone is signed and fully managed.
  1127  	//   "transfer" - DNSSEC is enabled, but in a "transfer" mode.
  1128  	State string `json:"state,omitempty"`
  1129  	// ForceSendFields is a list of field names (e.g. "DefaultKeySpecs") to
  1130  	// unconditionally include in API requests. By default, fields with empty or
  1131  	// default values are omitted from API requests. See
  1132  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1133  	// details.
  1134  	ForceSendFields []string `json:"-"`
  1135  	// NullFields is a list of field names (e.g. "DefaultKeySpecs") to include in
  1136  	// API requests with the JSON null value. By default, fields with empty values
  1137  	// are omitted from API requests. See
  1138  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1139  	NullFields []string `json:"-"`
  1140  }
  1141  
  1142  func (s *ManagedZoneDnsSecConfig) MarshalJSON() ([]byte, error) {
  1143  	type NoMethod ManagedZoneDnsSecConfig
  1144  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1145  }
  1146  
  1147  type ManagedZoneForwardingConfig struct {
  1148  	Kind string `json:"kind,omitempty"`
  1149  	// TargetNameServers: List of target name servers to forward to. Cloud DNS
  1150  	// selects the best available name server if more than one target is given.
  1151  	TargetNameServers []*ManagedZoneForwardingConfigNameServerTarget `json:"targetNameServers,omitempty"`
  1152  	// ForceSendFields is a list of field names (e.g. "Kind") to unconditionally
  1153  	// include in API requests. By default, fields with empty or default values are
  1154  	// omitted from API requests. See
  1155  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1156  	// details.
  1157  	ForceSendFields []string `json:"-"`
  1158  	// NullFields is a list of field names (e.g. "Kind") to include in API requests
  1159  	// with the JSON null value. By default, fields with empty values are omitted
  1160  	// from API requests. See
  1161  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1162  	NullFields []string `json:"-"`
  1163  }
  1164  
  1165  func (s *ManagedZoneForwardingConfig) MarshalJSON() ([]byte, error) {
  1166  	type NoMethod ManagedZoneForwardingConfig
  1167  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1168  }
  1169  
  1170  type ManagedZoneForwardingConfigNameServerTarget struct {
  1171  	// ForwardingPath: Forwarding path for this NameServerTarget. If unset or set
  1172  	// to DEFAULT, Cloud DNS makes forwarding decisions based on IP address ranges;
  1173  	// that is, RFC1918 addresses go to the VPC network, non-RFC1918 addresses go
  1174  	// to the internet. When set to PRIVATE, Cloud DNS always sends queries through
  1175  	// the VPC network for this target.
  1176  	//
  1177  	// Possible values:
  1178  	//   "default" - Cloud DNS makes forwarding decisions based on address ranges;
  1179  	// that is, RFC1918 addresses forward to the target through the VPC and
  1180  	// non-RFC1918 addresses forward to the target through the internet
  1181  	//   "private" - Cloud DNS always forwards to this target through the VPC.
  1182  	ForwardingPath string `json:"forwardingPath,omitempty"`
  1183  	// Ipv4Address: IPv4 address of a target name server.
  1184  	Ipv4Address string `json:"ipv4Address,omitempty"`
  1185  	// Ipv6Address: IPv6 address of a target name server. Does not accept both
  1186  	// fields (ipv4 & ipv6) being populated. Public preview as of November 2022.
  1187  	Ipv6Address string `json:"ipv6Address,omitempty"`
  1188  	Kind        string `json:"kind,omitempty"`
  1189  	// ForceSendFields is a list of field names (e.g. "ForwardingPath") to
  1190  	// unconditionally include in API requests. By default, fields with empty or
  1191  	// default values are omitted from API requests. See
  1192  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1193  	// details.
  1194  	ForceSendFields []string `json:"-"`
  1195  	// NullFields is a list of field names (e.g. "ForwardingPath") to include in
  1196  	// API requests with the JSON null value. By default, fields with empty values
  1197  	// are omitted from API requests. See
  1198  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1199  	NullFields []string `json:"-"`
  1200  }
  1201  
  1202  func (s *ManagedZoneForwardingConfigNameServerTarget) MarshalJSON() ([]byte, error) {
  1203  	type NoMethod ManagedZoneForwardingConfigNameServerTarget
  1204  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1205  }
  1206  
  1207  type ManagedZoneOperationsListResponse struct {
  1208  	Header *ResponseHeader `json:"header,omitempty"`
  1209  	// Kind: Type of resource.
  1210  	Kind string `json:"kind,omitempty"`
  1211  	// NextPageToken: The presence of this field indicates that there exist more
  1212  	// results following your last page of results in pagination order. To fetch
  1213  	// them, make another list request using this value as your page token. This
  1214  	// lets you retrieve the complete contents of even very large collections one
  1215  	// page at a time. However, if the contents of the collection change between
  1216  	// the first and last paginated list request, the set of all elements returned
  1217  	// are an inconsistent view of the collection. You cannot retrieve a consistent
  1218  	// snapshot of a collection larger than the maximum page size.
  1219  	NextPageToken string `json:"nextPageToken,omitempty"`
  1220  	// Operations: The operation resources.
  1221  	Operations []*Operation `json:"operations,omitempty"`
  1222  
  1223  	// ServerResponse contains the HTTP response code and headers from the server.
  1224  	googleapi.ServerResponse `json:"-"`
  1225  	// ForceSendFields is a list of field names (e.g. "Header") to unconditionally
  1226  	// include in API requests. By default, fields with empty or default values are
  1227  	// omitted from API requests. See
  1228  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1229  	// details.
  1230  	ForceSendFields []string `json:"-"`
  1231  	// NullFields is a list of field names (e.g. "Header") to include in API
  1232  	// requests with the JSON null value. By default, fields with empty values are
  1233  	// omitted from API requests. See
  1234  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1235  	NullFields []string `json:"-"`
  1236  }
  1237  
  1238  func (s *ManagedZoneOperationsListResponse) MarshalJSON() ([]byte, error) {
  1239  	type NoMethod ManagedZoneOperationsListResponse
  1240  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1241  }
  1242  
  1243  type ManagedZonePeeringConfig struct {
  1244  	Kind string `json:"kind,omitempty"`
  1245  	// TargetNetwork: The network with which to peer.
  1246  	TargetNetwork *ManagedZonePeeringConfigTargetNetwork `json:"targetNetwork,omitempty"`
  1247  	// ForceSendFields is a list of field names (e.g. "Kind") to unconditionally
  1248  	// include in API requests. By default, fields with empty or default values are
  1249  	// omitted from API requests. See
  1250  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1251  	// details.
  1252  	ForceSendFields []string `json:"-"`
  1253  	// NullFields is a list of field names (e.g. "Kind") to include in API requests
  1254  	// with the JSON null value. By default, fields with empty values are omitted
  1255  	// from API requests. See
  1256  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1257  	NullFields []string `json:"-"`
  1258  }
  1259  
  1260  func (s *ManagedZonePeeringConfig) MarshalJSON() ([]byte, error) {
  1261  	type NoMethod ManagedZonePeeringConfig
  1262  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1263  }
  1264  
  1265  type ManagedZonePeeringConfigTargetNetwork struct {
  1266  	// DeactivateTime: The time at which the zone was deactivated, in RFC 3339
  1267  	// date-time format. An empty string indicates that the peering connection is
  1268  	// active. The producer network can deactivate a zone. The zone is
  1269  	// automatically deactivated if the producer network that the zone targeted is
  1270  	// deleted. Output only.
  1271  	DeactivateTime string `json:"deactivateTime,omitempty"`
  1272  	Kind           string `json:"kind,omitempty"`
  1273  	// NetworkUrl: The fully qualified URL of the VPC network to forward queries
  1274  	// to. This should be formatted like
  1275  	// https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}
  1276  	NetworkUrl string `json:"networkUrl,omitempty"`
  1277  	// ForceSendFields is a list of field names (e.g. "DeactivateTime") to
  1278  	// unconditionally include in API requests. By default, fields with empty or
  1279  	// default values are omitted from API requests. See
  1280  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1281  	// details.
  1282  	ForceSendFields []string `json:"-"`
  1283  	// NullFields is a list of field names (e.g. "DeactivateTime") to include in
  1284  	// API requests with the JSON null value. By default, fields with empty values
  1285  	// are omitted from API requests. See
  1286  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1287  	NullFields []string `json:"-"`
  1288  }
  1289  
  1290  func (s *ManagedZonePeeringConfigTargetNetwork) MarshalJSON() ([]byte, error) {
  1291  	type NoMethod ManagedZonePeeringConfigTargetNetwork
  1292  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1293  }
  1294  
  1295  type ManagedZonePrivateVisibilityConfig struct {
  1296  	// GkeClusters: The list of Google Kubernetes Engine clusters that can see this
  1297  	// zone.
  1298  	GkeClusters []*ManagedZonePrivateVisibilityConfigGKECluster `json:"gkeClusters,omitempty"`
  1299  	Kind        string                                          `json:"kind,omitempty"`
  1300  	// Networks: The list of VPC networks that can see this zone.
  1301  	Networks []*ManagedZonePrivateVisibilityConfigNetwork `json:"networks,omitempty"`
  1302  	// ForceSendFields is a list of field names (e.g. "GkeClusters") to
  1303  	// unconditionally include in API requests. By default, fields with empty or
  1304  	// default values are omitted from API requests. See
  1305  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1306  	// details.
  1307  	ForceSendFields []string `json:"-"`
  1308  	// NullFields is a list of field names (e.g. "GkeClusters") to include in API
  1309  	// requests with the JSON null value. By default, fields with empty values are
  1310  	// omitted from API requests. See
  1311  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1312  	NullFields []string `json:"-"`
  1313  }
  1314  
  1315  func (s *ManagedZonePrivateVisibilityConfig) MarshalJSON() ([]byte, error) {
  1316  	type NoMethod ManagedZonePrivateVisibilityConfig
  1317  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1318  }
  1319  
  1320  type ManagedZonePrivateVisibilityConfigGKECluster struct {
  1321  	// GkeClusterName: The resource name of the cluster to bind this ManagedZone
  1322  	// to. This should be specified in the format like:
  1323  	// projects/*/locations/*/clusters/*. This is referenced from GKE
  1324  	// projects.locations.clusters.get API:
  1325  	// https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters/get
  1326  	GkeClusterName string `json:"gkeClusterName,omitempty"`
  1327  	Kind           string `json:"kind,omitempty"`
  1328  	// ForceSendFields is a list of field names (e.g. "GkeClusterName") to
  1329  	// unconditionally include in API requests. By default, fields with empty or
  1330  	// default values are omitted from API requests. See
  1331  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1332  	// details.
  1333  	ForceSendFields []string `json:"-"`
  1334  	// NullFields is a list of field names (e.g. "GkeClusterName") to include in
  1335  	// API requests with the JSON null value. By default, fields with empty values
  1336  	// are omitted from API requests. See
  1337  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1338  	NullFields []string `json:"-"`
  1339  }
  1340  
  1341  func (s *ManagedZonePrivateVisibilityConfigGKECluster) MarshalJSON() ([]byte, error) {
  1342  	type NoMethod ManagedZonePrivateVisibilityConfigGKECluster
  1343  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1344  }
  1345  
  1346  type ManagedZonePrivateVisibilityConfigNetwork struct {
  1347  	Kind string `json:"kind,omitempty"`
  1348  	// NetworkUrl: The fully qualified URL of the VPC network to bind to. Format
  1349  	// this URL like
  1350  	// https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}
  1351  	NetworkUrl string `json:"networkUrl,omitempty"`
  1352  	// ForceSendFields is a list of field names (e.g. "Kind") to unconditionally
  1353  	// include in API requests. By default, fields with empty or default values are
  1354  	// omitted from API requests. See
  1355  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1356  	// details.
  1357  	ForceSendFields []string `json:"-"`
  1358  	// NullFields is a list of field names (e.g. "Kind") to include in API requests
  1359  	// with the JSON null value. By default, fields with empty values are omitted
  1360  	// from API requests. See
  1361  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1362  	NullFields []string `json:"-"`
  1363  }
  1364  
  1365  func (s *ManagedZonePrivateVisibilityConfigNetwork) MarshalJSON() ([]byte, error) {
  1366  	type NoMethod ManagedZonePrivateVisibilityConfigNetwork
  1367  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1368  }
  1369  
  1370  type ManagedZoneReverseLookupConfig struct {
  1371  	Kind string `json:"kind,omitempty"`
  1372  	// ForceSendFields is a list of field names (e.g. "Kind") to unconditionally
  1373  	// include in API requests. By default, fields with empty or default values are
  1374  	// omitted from API requests. See
  1375  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1376  	// details.
  1377  	ForceSendFields []string `json:"-"`
  1378  	// NullFields is a list of field names (e.g. "Kind") to include in API requests
  1379  	// with the JSON null value. By default, fields with empty values are omitted
  1380  	// from API requests. See
  1381  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1382  	NullFields []string `json:"-"`
  1383  }
  1384  
  1385  func (s *ManagedZoneReverseLookupConfig) MarshalJSON() ([]byte, error) {
  1386  	type NoMethod ManagedZoneReverseLookupConfig
  1387  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1388  }
  1389  
  1390  // ManagedZoneServiceDirectoryConfig: Contains information about Service
  1391  // Directory-backed zones.
  1392  type ManagedZoneServiceDirectoryConfig struct {
  1393  	Kind string `json:"kind,omitempty"`
  1394  	// Namespace: Contains information about the namespace associated with the
  1395  	// zone.
  1396  	Namespace *ManagedZoneServiceDirectoryConfigNamespace `json:"namespace,omitempty"`
  1397  	// ForceSendFields is a list of field names (e.g. "Kind") to unconditionally
  1398  	// include in API requests. By default, fields with empty or default values are
  1399  	// omitted from API requests. See
  1400  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1401  	// details.
  1402  	ForceSendFields []string `json:"-"`
  1403  	// NullFields is a list of field names (e.g. "Kind") to include in API requests
  1404  	// with the JSON null value. By default, fields with empty values are omitted
  1405  	// from API requests. See
  1406  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1407  	NullFields []string `json:"-"`
  1408  }
  1409  
  1410  func (s *ManagedZoneServiceDirectoryConfig) MarshalJSON() ([]byte, error) {
  1411  	type NoMethod ManagedZoneServiceDirectoryConfig
  1412  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1413  }
  1414  
  1415  type ManagedZoneServiceDirectoryConfigNamespace struct {
  1416  	// DeletionTime: The time that the namespace backing this zone was deleted; an
  1417  	// empty string if it still exists. This is in RFC3339 text format. Output
  1418  	// only.
  1419  	DeletionTime string `json:"deletionTime,omitempty"`
  1420  	Kind         string `json:"kind,omitempty"`
  1421  	// NamespaceUrl: The fully qualified URL of the namespace associated with the
  1422  	// zone. Format must be
  1423  	// https://servicedirectory.googleapis.com/v1/projects/{project}/locations/{location}/namespaces/{namespace}
  1424  	NamespaceUrl string `json:"namespaceUrl,omitempty"`
  1425  	// ForceSendFields is a list of field names (e.g. "DeletionTime") to
  1426  	// unconditionally include in API requests. By default, fields with empty or
  1427  	// default values are omitted from API requests. See
  1428  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1429  	// details.
  1430  	ForceSendFields []string `json:"-"`
  1431  	// NullFields is a list of field names (e.g. "DeletionTime") to include in API
  1432  	// requests with the JSON null value. By default, fields with empty values are
  1433  	// omitted from API requests. See
  1434  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1435  	NullFields []string `json:"-"`
  1436  }
  1437  
  1438  func (s *ManagedZoneServiceDirectoryConfigNamespace) MarshalJSON() ([]byte, error) {
  1439  	type NoMethod ManagedZoneServiceDirectoryConfigNamespace
  1440  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1441  }
  1442  
  1443  type ManagedZonesListResponse struct {
  1444  	Header *ResponseHeader `json:"header,omitempty"`
  1445  	// Kind: Type of resource.
  1446  	Kind string `json:"kind,omitempty"`
  1447  	// ManagedZones: The managed zone resources.
  1448  	ManagedZones []*ManagedZone `json:"managedZones,omitempty"`
  1449  	// NextPageToken: The presence of this field indicates that there exist more
  1450  	// results following your last page of results in pagination order. To fetch
  1451  	// them, make another list request using this value as your page token. This
  1452  	// lets you the complete contents of even very large collections one page at a
  1453  	// time. However, if the contents of the collection change between the first
  1454  	// and last paginated list request, the set of all elements returned are an
  1455  	// inconsistent view of the collection. You cannot retrieve a consistent
  1456  	// snapshot of a collection larger than the maximum page size.
  1457  	NextPageToken string `json:"nextPageToken,omitempty"`
  1458  
  1459  	// ServerResponse contains the HTTP response code and headers from the server.
  1460  	googleapi.ServerResponse `json:"-"`
  1461  	// ForceSendFields is a list of field names (e.g. "Header") to unconditionally
  1462  	// include in API requests. By default, fields with empty or default values are
  1463  	// omitted from API requests. See
  1464  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1465  	// details.
  1466  	ForceSendFields []string `json:"-"`
  1467  	// NullFields is a list of field names (e.g. "Header") to include in API
  1468  	// requests with the JSON null value. By default, fields with empty values are
  1469  	// omitted from API requests. See
  1470  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1471  	NullFields []string `json:"-"`
  1472  }
  1473  
  1474  func (s *ManagedZonesListResponse) MarshalJSON() ([]byte, error) {
  1475  	type NoMethod ManagedZonesListResponse
  1476  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1477  }
  1478  
  1479  // Operation: An operation represents a successful mutation performed on a
  1480  // Cloud DNS resource. Operations provide: - An audit log of server resource
  1481  // mutations. - A way to recover/retry API calls in the case where the response
  1482  // is never received by the caller. Use the caller specified
  1483  // client_operation_id.
  1484  type Operation struct {
  1485  	// DnsKeyContext: Only populated if the operation targeted a DnsKey (output
  1486  	// only).
  1487  	DnsKeyContext *OperationDnsKeyContext `json:"dnsKeyContext,omitempty"`
  1488  	// Id: Unique identifier for the resource. This is the client_operation_id if
  1489  	// the client specified it when the mutation was initiated, otherwise, it is
  1490  	// generated by the server. The name must be 1-63 characters long and match the
  1491  	// regular expression [-a-z0-9]? (output only)
  1492  	Id   string `json:"id,omitempty"`
  1493  	Kind string `json:"kind,omitempty"`
  1494  	// StartTime: The time that this operation was started by the server. This is
  1495  	// in RFC3339 text format (output only).
  1496  	StartTime string `json:"startTime,omitempty"`
  1497  	// Status: Status of the operation. Can be one of the following: "PENDING" or
  1498  	// "DONE" (output only). A status of "DONE" means that the request to update
  1499  	// the authoritative servers has been sent, but the servers might not be
  1500  	// updated yet.
  1501  	//
  1502  	// Possible values:
  1503  	//   "pending"
  1504  	//   "done"
  1505  	Status string `json:"status,omitempty"`
  1506  	// Type: Type of the operation. Operations include insert, update, and delete
  1507  	// (output only).
  1508  	Type string `json:"type,omitempty"`
  1509  	// User: User who requested the operation, for example: user@example.com.
  1510  	// cloud-dns-system for operations automatically done by the system. (output
  1511  	// only)
  1512  	User string `json:"user,omitempty"`
  1513  	// ZoneContext: Only populated if the operation targeted a ManagedZone (output
  1514  	// only).
  1515  	ZoneContext *OperationManagedZoneContext `json:"zoneContext,omitempty"`
  1516  
  1517  	// ServerResponse contains the HTTP response code and headers from the server.
  1518  	googleapi.ServerResponse `json:"-"`
  1519  	// ForceSendFields is a list of field names (e.g. "DnsKeyContext") to
  1520  	// unconditionally include in API requests. By default, fields with empty or
  1521  	// default values are omitted from API requests. See
  1522  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1523  	// details.
  1524  	ForceSendFields []string `json:"-"`
  1525  	// NullFields is a list of field names (e.g. "DnsKeyContext") to include in API
  1526  	// requests with the JSON null value. By default, fields with empty values are
  1527  	// omitted from API requests. See
  1528  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1529  	NullFields []string `json:"-"`
  1530  }
  1531  
  1532  func (s *Operation) MarshalJSON() ([]byte, error) {
  1533  	type NoMethod Operation
  1534  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1535  }
  1536  
  1537  type OperationDnsKeyContext struct {
  1538  	// NewValue: The post-operation DnsKey resource.
  1539  	NewValue *DnsKey `json:"newValue,omitempty"`
  1540  	// OldValue: The pre-operation DnsKey resource.
  1541  	OldValue *DnsKey `json:"oldValue,omitempty"`
  1542  	// ForceSendFields is a list of field names (e.g. "NewValue") to
  1543  	// unconditionally include in API requests. By default, fields with empty or
  1544  	// default values are omitted from API requests. See
  1545  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1546  	// details.
  1547  	ForceSendFields []string `json:"-"`
  1548  	// NullFields is a list of field names (e.g. "NewValue") to include in API
  1549  	// requests with the JSON null value. By default, fields with empty values are
  1550  	// omitted from API requests. See
  1551  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1552  	NullFields []string `json:"-"`
  1553  }
  1554  
  1555  func (s *OperationDnsKeyContext) MarshalJSON() ([]byte, error) {
  1556  	type NoMethod OperationDnsKeyContext
  1557  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1558  }
  1559  
  1560  type OperationManagedZoneContext struct {
  1561  	// NewValue: The post-operation ManagedZone resource.
  1562  	NewValue *ManagedZone `json:"newValue,omitempty"`
  1563  	// OldValue: The pre-operation ManagedZone resource.
  1564  	OldValue *ManagedZone `json:"oldValue,omitempty"`
  1565  	// ForceSendFields is a list of field names (e.g. "NewValue") to
  1566  	// unconditionally include in API requests. By default, fields with empty or
  1567  	// default values are omitted from API requests. See
  1568  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1569  	// details.
  1570  	ForceSendFields []string `json:"-"`
  1571  	// NullFields is a list of field names (e.g. "NewValue") to include in API
  1572  	// requests with the JSON null value. By default, fields with empty values are
  1573  	// omitted from API requests. See
  1574  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1575  	NullFields []string `json:"-"`
  1576  }
  1577  
  1578  func (s *OperationManagedZoneContext) MarshalJSON() ([]byte, error) {
  1579  	type NoMethod OperationManagedZoneContext
  1580  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1581  }
  1582  
  1583  type PoliciesListResponse struct {
  1584  	Header *ResponseHeader `json:"header,omitempty"`
  1585  	// Kind: Type of resource.
  1586  	Kind string `json:"kind,omitempty"`
  1587  	// NextPageToken: The presence of this field indicates that there exist more
  1588  	// results following your last page of results in pagination order. To fetch
  1589  	// them, make another list request using this value as your page token. This
  1590  	// lets you the complete contents of even very large collections one page at a
  1591  	// time. However, if the contents of the collection change between the first
  1592  	// and last paginated list request, the set of all elements returned are an
  1593  	// inconsistent view of the collection. You cannot retrieve a consistent
  1594  	// snapshot of a collection larger than the maximum page size.
  1595  	NextPageToken string `json:"nextPageToken,omitempty"`
  1596  	// Policies: The policy resources.
  1597  	Policies []*Policy `json:"policies,omitempty"`
  1598  
  1599  	// ServerResponse contains the HTTP response code and headers from the server.
  1600  	googleapi.ServerResponse `json:"-"`
  1601  	// ForceSendFields is a list of field names (e.g. "Header") to unconditionally
  1602  	// include in API requests. By default, fields with empty or default values are
  1603  	// omitted from API requests. See
  1604  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1605  	// details.
  1606  	ForceSendFields []string `json:"-"`
  1607  	// NullFields is a list of field names (e.g. "Header") to include in API
  1608  	// requests with the JSON null value. By default, fields with empty values are
  1609  	// omitted from API requests. See
  1610  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1611  	NullFields []string `json:"-"`
  1612  }
  1613  
  1614  func (s *PoliciesListResponse) MarshalJSON() ([]byte, error) {
  1615  	type NoMethod PoliciesListResponse
  1616  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1617  }
  1618  
  1619  type PoliciesPatchResponse struct {
  1620  	Header *ResponseHeader `json:"header,omitempty"`
  1621  	Policy *Policy         `json:"policy,omitempty"`
  1622  
  1623  	// ServerResponse contains the HTTP response code and headers from the server.
  1624  	googleapi.ServerResponse `json:"-"`
  1625  	// ForceSendFields is a list of field names (e.g. "Header") to unconditionally
  1626  	// include in API requests. By default, fields with empty or default values are
  1627  	// omitted from API requests. See
  1628  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1629  	// details.
  1630  	ForceSendFields []string `json:"-"`
  1631  	// NullFields is a list of field names (e.g. "Header") to include in API
  1632  	// requests with the JSON null value. By default, fields with empty values are
  1633  	// omitted from API requests. See
  1634  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1635  	NullFields []string `json:"-"`
  1636  }
  1637  
  1638  func (s *PoliciesPatchResponse) MarshalJSON() ([]byte, error) {
  1639  	type NoMethod PoliciesPatchResponse
  1640  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1641  }
  1642  
  1643  type PoliciesUpdateResponse struct {
  1644  	Header *ResponseHeader `json:"header,omitempty"`
  1645  	Policy *Policy         `json:"policy,omitempty"`
  1646  
  1647  	// ServerResponse contains the HTTP response code and headers from the server.
  1648  	googleapi.ServerResponse `json:"-"`
  1649  	// ForceSendFields is a list of field names (e.g. "Header") to unconditionally
  1650  	// include in API requests. By default, fields with empty or default values are
  1651  	// omitted from API requests. See
  1652  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1653  	// details.
  1654  	ForceSendFields []string `json:"-"`
  1655  	// NullFields is a list of field names (e.g. "Header") to include in API
  1656  	// requests with the JSON null value. By default, fields with empty values are
  1657  	// omitted from API requests. See
  1658  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1659  	NullFields []string `json:"-"`
  1660  }
  1661  
  1662  func (s *PoliciesUpdateResponse) MarshalJSON() ([]byte, error) {
  1663  	type NoMethod PoliciesUpdateResponse
  1664  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1665  }
  1666  
  1667  // Policy: A policy is a collection of DNS rules applied to one or more Virtual
  1668  // Private Cloud resources.
  1669  type Policy struct {
  1670  	// AlternativeNameServerConfig: Sets an alternative name server for the
  1671  	// associated networks. When specified, all DNS queries are forwarded to a name
  1672  	// server that you choose. Names such as .internal are not available when an
  1673  	// alternative name server is specified.
  1674  	AlternativeNameServerConfig *PolicyAlternativeNameServerConfig `json:"alternativeNameServerConfig,omitempty"`
  1675  	// Description: A mutable string of at most 1024 characters associated with
  1676  	// this resource for the user's convenience. Has no effect on the policy's
  1677  	// function.
  1678  	Description string `json:"description,omitempty"`
  1679  	// EnableInboundForwarding: Allows networks bound to this policy to receive DNS
  1680  	// queries sent by VMs or applications over VPN connections. When enabled, a
  1681  	// virtual IP address is allocated from each of the subnetworks that are bound
  1682  	// to this policy.
  1683  	EnableInboundForwarding bool `json:"enableInboundForwarding,omitempty"`
  1684  	// EnableLogging: Controls whether logging is enabled for the networks bound to
  1685  	// this policy. Defaults to no logging if not set.
  1686  	EnableLogging bool `json:"enableLogging,omitempty"`
  1687  	// Id: Unique identifier for the resource; defined by the server (output only).
  1688  	Id   uint64 `json:"id,omitempty,string"`
  1689  	Kind string `json:"kind,omitempty"`
  1690  	// Name: User-assigned name for this policy.
  1691  	Name string `json:"name,omitempty"`
  1692  	// Networks: List of network names specifying networks to which this policy is
  1693  	// applied.
  1694  	Networks []*PolicyNetwork `json:"networks,omitempty"`
  1695  
  1696  	// ServerResponse contains the HTTP response code and headers from the server.
  1697  	googleapi.ServerResponse `json:"-"`
  1698  	// ForceSendFields is a list of field names (e.g.
  1699  	// "AlternativeNameServerConfig") to unconditionally include in API requests.
  1700  	// By default, fields with empty or default values are omitted from API
  1701  	// requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields
  1702  	// for more details.
  1703  	ForceSendFields []string `json:"-"`
  1704  	// NullFields is a list of field names (e.g. "AlternativeNameServerConfig") to
  1705  	// include in API requests with the JSON null value. By default, fields with
  1706  	// empty values are omitted from API requests. See
  1707  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1708  	NullFields []string `json:"-"`
  1709  }
  1710  
  1711  func (s *Policy) MarshalJSON() ([]byte, error) {
  1712  	type NoMethod Policy
  1713  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1714  }
  1715  
  1716  type PolicyAlternativeNameServerConfig struct {
  1717  	Kind string `json:"kind,omitempty"`
  1718  	// TargetNameServers: Sets an alternative name server for the associated
  1719  	// networks. When specified, all DNS queries are forwarded to a name server
  1720  	// that you choose. Names such as .internal are not available when an
  1721  	// alternative name server is specified.
  1722  	TargetNameServers []*PolicyAlternativeNameServerConfigTargetNameServer `json:"targetNameServers,omitempty"`
  1723  	// ForceSendFields is a list of field names (e.g. "Kind") to unconditionally
  1724  	// include in API requests. By default, fields with empty or default values are
  1725  	// omitted from API requests. See
  1726  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1727  	// details.
  1728  	ForceSendFields []string `json:"-"`
  1729  	// NullFields is a list of field names (e.g. "Kind") to include in API requests
  1730  	// with the JSON null value. By default, fields with empty values are omitted
  1731  	// from API requests. See
  1732  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1733  	NullFields []string `json:"-"`
  1734  }
  1735  
  1736  func (s *PolicyAlternativeNameServerConfig) MarshalJSON() ([]byte, error) {
  1737  	type NoMethod PolicyAlternativeNameServerConfig
  1738  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1739  }
  1740  
  1741  type PolicyAlternativeNameServerConfigTargetNameServer struct {
  1742  	// ForwardingPath: Forwarding path for this TargetNameServer. If unset or set
  1743  	// to DEFAULT, Cloud DNS makes forwarding decisions based on address ranges;
  1744  	// that is, RFC1918 addresses go to the VPC network, non-RFC1918 addresses go
  1745  	// to the internet. When set to PRIVATE, Cloud DNS always sends queries through
  1746  	// the VPC network for this target.
  1747  	//
  1748  	// Possible values:
  1749  	//   "default" - Cloud DNS makes forwarding decision based on IP address
  1750  	// ranges; that is, RFC1918 addresses forward to the target through the VPC and
  1751  	// non-RFC1918 addresses forward to the target through the internet
  1752  	//   "private" - Cloud DNS always forwards to this target through the VPC.
  1753  	ForwardingPath string `json:"forwardingPath,omitempty"`
  1754  	// Ipv4Address: IPv4 address to forward queries to.
  1755  	Ipv4Address string `json:"ipv4Address,omitempty"`
  1756  	// Ipv6Address: IPv6 address to forward to. Does not accept both fields (ipv4 &
  1757  	// ipv6) being populated. Public preview as of November 2022.
  1758  	Ipv6Address string `json:"ipv6Address,omitempty"`
  1759  	Kind        string `json:"kind,omitempty"`
  1760  	// ForceSendFields is a list of field names (e.g. "ForwardingPath") to
  1761  	// unconditionally include in API requests. By default, fields with empty or
  1762  	// default values are omitted from API requests. See
  1763  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1764  	// details.
  1765  	ForceSendFields []string `json:"-"`
  1766  	// NullFields is a list of field names (e.g. "ForwardingPath") to include in
  1767  	// API requests with the JSON null value. By default, fields with empty values
  1768  	// are omitted from API requests. See
  1769  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1770  	NullFields []string `json:"-"`
  1771  }
  1772  
  1773  func (s *PolicyAlternativeNameServerConfigTargetNameServer) MarshalJSON() ([]byte, error) {
  1774  	type NoMethod PolicyAlternativeNameServerConfigTargetNameServer
  1775  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1776  }
  1777  
  1778  type PolicyNetwork struct {
  1779  	Kind string `json:"kind,omitempty"`
  1780  	// NetworkUrl: The fully qualified URL of the VPC network to bind to. This
  1781  	// should be formatted like
  1782  	// https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}
  1783  	NetworkUrl string `json:"networkUrl,omitempty"`
  1784  	// ForceSendFields is a list of field names (e.g. "Kind") to unconditionally
  1785  	// include in API requests. By default, fields with empty or default values are
  1786  	// omitted from API requests. See
  1787  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1788  	// details.
  1789  	ForceSendFields []string `json:"-"`
  1790  	// NullFields is a list of field names (e.g. "Kind") to include in API requests
  1791  	// with the JSON null value. By default, fields with empty values are omitted
  1792  	// from API requests. See
  1793  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1794  	NullFields []string `json:"-"`
  1795  }
  1796  
  1797  func (s *PolicyNetwork) MarshalJSON() ([]byte, error) {
  1798  	type NoMethod PolicyNetwork
  1799  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1800  }
  1801  
  1802  // Project: A project resource. The project is a top level container for
  1803  // resources including Cloud DNS ManagedZones. Projects can be created only in
  1804  // the APIs console. Next tag: 7.
  1805  type Project struct {
  1806  	// Id: User assigned unique identifier for the resource (output only).
  1807  	Id   string `json:"id,omitempty"`
  1808  	Kind string `json:"kind,omitempty"`
  1809  	// Number: Unique numeric identifier for the resource; defined by the server
  1810  	// (output only).
  1811  	Number uint64 `json:"number,omitempty,string"`
  1812  	// Quota: Quotas assigned to this project (output only).
  1813  	Quota *Quota `json:"quota,omitempty"`
  1814  
  1815  	// ServerResponse contains the HTTP response code and headers from the server.
  1816  	googleapi.ServerResponse `json:"-"`
  1817  	// ForceSendFields is a list of field names (e.g. "Id") to unconditionally
  1818  	// include in API requests. By default, fields with empty or default values are
  1819  	// omitted from API requests. See
  1820  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1821  	// details.
  1822  	ForceSendFields []string `json:"-"`
  1823  	// NullFields is a list of field names (e.g. "Id") to include in API requests
  1824  	// with the JSON null value. By default, fields with empty values are omitted
  1825  	// from API requests. See
  1826  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1827  	NullFields []string `json:"-"`
  1828  }
  1829  
  1830  func (s *Project) MarshalJSON() ([]byte, error) {
  1831  	type NoMethod Project
  1832  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1833  }
  1834  
  1835  // Quota: Limits associated with a Project.
  1836  type Quota struct {
  1837  	// DnsKeysPerManagedZone: Maximum allowed number of DnsKeys per ManagedZone.
  1838  	DnsKeysPerManagedZone int64 `json:"dnsKeysPerManagedZone,omitempty"`
  1839  	// GkeClustersPerManagedZone: Maximum allowed number of GKE clusters to which a
  1840  	// privately scoped zone can be attached.
  1841  	GkeClustersPerManagedZone int64 `json:"gkeClustersPerManagedZone,omitempty"`
  1842  	// GkeClustersPerPolicy: Maximum allowed number of GKE clusters per policy.
  1843  	GkeClustersPerPolicy int64 `json:"gkeClustersPerPolicy,omitempty"`
  1844  	// GkeClustersPerResponsePolicy: Maximum allowed number of GKE clusters per
  1845  	// response policy.
  1846  	GkeClustersPerResponsePolicy int64 `json:"gkeClustersPerResponsePolicy,omitempty"`
  1847  	// ItemsPerRoutingPolicy: Maximum allowed number of items per routing policy.
  1848  	ItemsPerRoutingPolicy int64  `json:"itemsPerRoutingPolicy,omitempty"`
  1849  	Kind                  string `json:"kind,omitempty"`
  1850  	// ManagedZones: Maximum allowed number of managed zones in the project.
  1851  	ManagedZones int64 `json:"managedZones,omitempty"`
  1852  	// ManagedZonesPerGkeCluster: Maximum allowed number of managed zones which can
  1853  	// be attached to a GKE cluster.
  1854  	ManagedZonesPerGkeCluster int64 `json:"managedZonesPerGkeCluster,omitempty"`
  1855  	// ManagedZonesPerNetwork: Maximum allowed number of managed zones which can be
  1856  	// attached to a network.
  1857  	ManagedZonesPerNetwork int64 `json:"managedZonesPerNetwork,omitempty"`
  1858  	// NameserversPerDelegation: Maximum number of nameservers per delegation,
  1859  	// meant to prevent abuse
  1860  	NameserversPerDelegation int64 `json:"nameserversPerDelegation,omitempty"`
  1861  	// NetworksPerManagedZone: Maximum allowed number of networks to which a
  1862  	// privately scoped zone can be attached.
  1863  	NetworksPerManagedZone int64 `json:"networksPerManagedZone,omitempty"`
  1864  	// NetworksPerPolicy: Maximum allowed number of networks per policy.
  1865  	NetworksPerPolicy int64 `json:"networksPerPolicy,omitempty"`
  1866  	// NetworksPerResponsePolicy: Maximum allowed number of networks per response
  1867  	// policy.
  1868  	NetworksPerResponsePolicy int64 `json:"networksPerResponsePolicy,omitempty"`
  1869  	// PeeringZonesPerTargetNetwork: Maximum allowed number of consumer peering
  1870  	// zones per target network owned by this producer project
  1871  	PeeringZonesPerTargetNetwork int64 `json:"peeringZonesPerTargetNetwork,omitempty"`
  1872  	// Policies: Maximum allowed number of policies per project.
  1873  	Policies int64 `json:"policies,omitempty"`
  1874  	// ResourceRecordsPerRrset: Maximum allowed number of ResourceRecords per
  1875  	// ResourceRecordSet.
  1876  	ResourceRecordsPerRrset int64 `json:"resourceRecordsPerRrset,omitempty"`
  1877  	// ResponsePolicies: Maximum allowed number of response policies per project.
  1878  	ResponsePolicies int64 `json:"responsePolicies,omitempty"`
  1879  	// ResponsePolicyRulesPerResponsePolicy: Maximum allowed number of rules per
  1880  	// response policy.
  1881  	ResponsePolicyRulesPerResponsePolicy int64 `json:"responsePolicyRulesPerResponsePolicy,omitempty"`
  1882  	// RrsetAdditionsPerChange: Maximum allowed number of ResourceRecordSets to add
  1883  	// per ChangesCreateRequest.
  1884  	RrsetAdditionsPerChange int64 `json:"rrsetAdditionsPerChange,omitempty"`
  1885  	// RrsetDeletionsPerChange: Maximum allowed number of ResourceRecordSets to
  1886  	// delete per ChangesCreateRequest.
  1887  	RrsetDeletionsPerChange int64 `json:"rrsetDeletionsPerChange,omitempty"`
  1888  	// RrsetsPerManagedZone: Maximum allowed number of ResourceRecordSets per zone
  1889  	// in the project.
  1890  	RrsetsPerManagedZone int64 `json:"rrsetsPerManagedZone,omitempty"`
  1891  	// TargetNameServersPerManagedZone: Maximum allowed number of target name
  1892  	// servers per managed forwarding zone.
  1893  	TargetNameServersPerManagedZone int64 `json:"targetNameServersPerManagedZone,omitempty"`
  1894  	// TargetNameServersPerPolicy: Maximum allowed number of alternative target
  1895  	// name servers per policy.
  1896  	TargetNameServersPerPolicy int64 `json:"targetNameServersPerPolicy,omitempty"`
  1897  	// TotalRrdataSizePerChange: Maximum allowed size for total rrdata in one
  1898  	// ChangesCreateRequest in bytes.
  1899  	TotalRrdataSizePerChange int64 `json:"totalRrdataSizePerChange,omitempty"`
  1900  	// WhitelistedKeySpecs: DNSSEC algorithm and key length types that can be used
  1901  	// for DnsKeys.
  1902  	WhitelistedKeySpecs []*DnsKeySpec `json:"whitelistedKeySpecs,omitempty"`
  1903  	// ForceSendFields is a list of field names (e.g. "DnsKeysPerManagedZone") to
  1904  	// unconditionally include in API requests. By default, fields with empty or
  1905  	// default values are omitted from API requests. See
  1906  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1907  	// details.
  1908  	ForceSendFields []string `json:"-"`
  1909  	// NullFields is a list of field names (e.g. "DnsKeysPerManagedZone") to
  1910  	// include in API requests with the JSON null value. By default, fields with
  1911  	// empty values are omitted from API requests. See
  1912  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1913  	NullFields []string `json:"-"`
  1914  }
  1915  
  1916  func (s *Quota) MarshalJSON() ([]byte, error) {
  1917  	type NoMethod Quota
  1918  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1919  }
  1920  
  1921  // RRSetRoutingPolicy: A RRSetRoutingPolicy represents ResourceRecordSet data
  1922  // that is returned dynamically with the response varying based on configured
  1923  // properties such as geolocation or by weighted random selection.
  1924  type RRSetRoutingPolicy struct {
  1925  	Geo           *RRSetRoutingPolicyGeoPolicy           `json:"geo,omitempty"`
  1926  	GeoPolicy     *RRSetRoutingPolicyGeoPolicy           `json:"geoPolicy,omitempty"`
  1927  	Kind          string                                 `json:"kind,omitempty"`
  1928  	PrimaryBackup *RRSetRoutingPolicyPrimaryBackupPolicy `json:"primaryBackup,omitempty"`
  1929  	Wrr           *RRSetRoutingPolicyWrrPolicy           `json:"wrr,omitempty"`
  1930  	WrrPolicy     *RRSetRoutingPolicyWrrPolicy           `json:"wrrPolicy,omitempty"`
  1931  	// ForceSendFields is a list of field names (e.g. "Geo") to unconditionally
  1932  	// include in API requests. By default, fields with empty or default values are
  1933  	// omitted from API requests. See
  1934  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1935  	// details.
  1936  	ForceSendFields []string `json:"-"`
  1937  	// NullFields is a list of field names (e.g. "Geo") to include in API requests
  1938  	// with the JSON null value. By default, fields with empty values are omitted
  1939  	// from API requests. See
  1940  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1941  	NullFields []string `json:"-"`
  1942  }
  1943  
  1944  func (s *RRSetRoutingPolicy) MarshalJSON() ([]byte, error) {
  1945  	type NoMethod RRSetRoutingPolicy
  1946  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1947  }
  1948  
  1949  // RRSetRoutingPolicyGeoPolicy: Configures a RRSetRoutingPolicy that routes
  1950  // based on the geo location of the querying user.
  1951  type RRSetRoutingPolicyGeoPolicy struct {
  1952  	// EnableFencing: Without fencing, if health check fails for all configured
  1953  	// items in the current geo bucket, we failover to the next nearest geo bucket.
  1954  	// With fencing, if health checking is enabled, as long as some targets in the
  1955  	// current geo bucket are healthy, we return only the healthy targets. However,
  1956  	// if all targets are unhealthy, we don't failover to the next nearest bucket;
  1957  	// instead, we return all the items in the current bucket even when all targets
  1958  	// are unhealthy.
  1959  	EnableFencing bool `json:"enableFencing,omitempty"`
  1960  	// Items: The primary geo routing configuration. If there are multiple items
  1961  	// with the same location, an error is returned instead.
  1962  	Items []*RRSetRoutingPolicyGeoPolicyGeoPolicyItem `json:"items,omitempty"`
  1963  	Kind  string                                      `json:"kind,omitempty"`
  1964  	// ForceSendFields is a list of field names (e.g. "EnableFencing") to
  1965  	// unconditionally include in API requests. By default, fields with empty or
  1966  	// default values are omitted from API requests. See
  1967  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1968  	// details.
  1969  	ForceSendFields []string `json:"-"`
  1970  	// NullFields is a list of field names (e.g. "EnableFencing") to include in API
  1971  	// requests with the JSON null value. By default, fields with empty values are
  1972  	// omitted from API requests. See
  1973  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1974  	NullFields []string `json:"-"`
  1975  }
  1976  
  1977  func (s *RRSetRoutingPolicyGeoPolicy) MarshalJSON() ([]byte, error) {
  1978  	type NoMethod RRSetRoutingPolicyGeoPolicy
  1979  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1980  }
  1981  
  1982  // RRSetRoutingPolicyGeoPolicyGeoPolicyItem: ResourceRecordSet data for one geo
  1983  // location.
  1984  type RRSetRoutingPolicyGeoPolicyGeoPolicyItem struct {
  1985  	// HealthCheckedTargets: For A and AAAA types only. Endpoints to return in the
  1986  	// query result only if they are healthy. These can be specified along with
  1987  	// rrdata within this item.
  1988  	HealthCheckedTargets *RRSetRoutingPolicyHealthCheckTargets `json:"healthCheckedTargets,omitempty"`
  1989  	Kind                 string                                `json:"kind,omitempty"`
  1990  	// Location: The geo-location granularity is a GCP region. This location string
  1991  	// should correspond to a GCP region. e.g. "us-east1", "southamerica-east1",
  1992  	// "asia-east1", etc.
  1993  	Location string   `json:"location,omitempty"`
  1994  	Rrdatas  []string `json:"rrdatas,omitempty"`
  1995  	// SignatureRrdatas: DNSSEC generated signatures for all the rrdata within this
  1996  	// item. If health checked targets are provided for DNSSEC enabled zones,
  1997  	// there's a restriction of 1 IP address per item.
  1998  	SignatureRrdatas []string `json:"signatureRrdatas,omitempty"`
  1999  	// ForceSendFields is a list of field names (e.g. "HealthCheckedTargets") to
  2000  	// unconditionally include in API requests. By default, fields with empty or
  2001  	// default values are omitted from API requests. See
  2002  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2003  	// details.
  2004  	ForceSendFields []string `json:"-"`
  2005  	// NullFields is a list of field names (e.g. "HealthCheckedTargets") to include
  2006  	// in API requests with the JSON null value. By default, fields with empty
  2007  	// values are omitted from API requests. See
  2008  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2009  	NullFields []string `json:"-"`
  2010  }
  2011  
  2012  func (s *RRSetRoutingPolicyGeoPolicyGeoPolicyItem) MarshalJSON() ([]byte, error) {
  2013  	type NoMethod RRSetRoutingPolicyGeoPolicyGeoPolicyItem
  2014  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2015  }
  2016  
  2017  // RRSetRoutingPolicyHealthCheckTargets: HealthCheckTargets describes endpoints
  2018  // to health-check when responding to Routing Policy queries. Only the healthy
  2019  // endpoints will be included in the response. Only one of
  2020  // internal_load_balancer and external_endpoints should be set.
  2021  type RRSetRoutingPolicyHealthCheckTargets struct {
  2022  	// InternalLoadBalancers: Configuration for internal load balancers to be
  2023  	// health checked.
  2024  	InternalLoadBalancers []*RRSetRoutingPolicyLoadBalancerTarget `json:"internalLoadBalancers,omitempty"`
  2025  	// ForceSendFields is a list of field names (e.g. "InternalLoadBalancers") to
  2026  	// unconditionally include in API requests. By default, fields with empty or
  2027  	// default values are omitted from API requests. See
  2028  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2029  	// details.
  2030  	ForceSendFields []string `json:"-"`
  2031  	// NullFields is a list of field names (e.g. "InternalLoadBalancers") to
  2032  	// include in API requests with the JSON null value. By default, fields with
  2033  	// empty values are omitted from API requests. See
  2034  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2035  	NullFields []string `json:"-"`
  2036  }
  2037  
  2038  func (s *RRSetRoutingPolicyHealthCheckTargets) MarshalJSON() ([]byte, error) {
  2039  	type NoMethod RRSetRoutingPolicyHealthCheckTargets
  2040  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2041  }
  2042  
  2043  // RRSetRoutingPolicyLoadBalancerTarget: The configuration for an individual
  2044  // load balancer to health check.
  2045  type RRSetRoutingPolicyLoadBalancerTarget struct {
  2046  	// IpAddress: The frontend IP address of the load balancer to health check.
  2047  	IpAddress string `json:"ipAddress,omitempty"`
  2048  	// IpProtocol: The protocol of the load balancer to health check.
  2049  	//
  2050  	// Possible values:
  2051  	//   "undefined"
  2052  	//   "tcp"
  2053  	//   "udp"
  2054  	IpProtocol string `json:"ipProtocol,omitempty"`
  2055  	Kind       string `json:"kind,omitempty"`
  2056  	// LoadBalancerType: The type of load balancer specified by this target. This
  2057  	// value must match the configuration of the load balancer located at the
  2058  	// LoadBalancerTarget's IP address, port, and region. Use the following: -
  2059  	// *regionalL4ilb*: for a regional internal passthrough Network Load Balancer.
  2060  	// - *regionalL7ilb*: for a regional internal Application Load Balancer. -
  2061  	// *globalL7ilb*: for a global internal Application Load Balancer.
  2062  	//
  2063  	// Possible values:
  2064  	//   "none"
  2065  	//   "globalL7ilb"
  2066  	//   "regionalL4ilb"
  2067  	//   "regionalL7ilb"
  2068  	LoadBalancerType string `json:"loadBalancerType,omitempty"`
  2069  	// NetworkUrl: The fully qualified URL of the network that the load balancer is
  2070  	// attached to. This should be formatted like
  2071  	// https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}
  2072  	// .
  2073  	NetworkUrl string `json:"networkUrl,omitempty"`
  2074  	// Port: The configured port of the load balancer.
  2075  	Port string `json:"port,omitempty"`
  2076  	// Project: The project ID in which the load balancer is located.
  2077  	Project string `json:"project,omitempty"`
  2078  	// Region: The region in which the load balancer is located.
  2079  	Region string `json:"region,omitempty"`
  2080  	// ForceSendFields is a list of field names (e.g. "IpAddress") to
  2081  	// unconditionally include in API requests. By default, fields with empty or
  2082  	// default values are omitted from API requests. See
  2083  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2084  	// details.
  2085  	ForceSendFields []string `json:"-"`
  2086  	// NullFields is a list of field names (e.g. "IpAddress") to include in API
  2087  	// requests with the JSON null value. By default, fields with empty values are
  2088  	// omitted from API requests. See
  2089  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2090  	NullFields []string `json:"-"`
  2091  }
  2092  
  2093  func (s *RRSetRoutingPolicyLoadBalancerTarget) MarshalJSON() ([]byte, error) {
  2094  	type NoMethod RRSetRoutingPolicyLoadBalancerTarget
  2095  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2096  }
  2097  
  2098  // RRSetRoutingPolicyPrimaryBackupPolicy: Configures a RRSetRoutingPolicy such
  2099  // that all queries are responded with the primary_targets if they are healthy.
  2100  // And if all of them are unhealthy, then we fallback to a geo localized
  2101  // policy.
  2102  type RRSetRoutingPolicyPrimaryBackupPolicy struct {
  2103  	// BackupGeoTargets: Backup targets provide a regional failover policy for the
  2104  	// otherwise global primary targets. If serving state is set to BACKUP, this
  2105  	// policy essentially becomes a geo routing policy.
  2106  	BackupGeoTargets *RRSetRoutingPolicyGeoPolicy `json:"backupGeoTargets,omitempty"`
  2107  	Kind             string                       `json:"kind,omitempty"`
  2108  	// PrimaryTargets: Endpoints that are health checked before making the routing
  2109  	// decision. Unhealthy endpoints are omitted from the results. If all endpoints
  2110  	// are unhealthy, we serve a response based on the backup_geo_targets.
  2111  	PrimaryTargets *RRSetRoutingPolicyHealthCheckTargets `json:"primaryTargets,omitempty"`
  2112  	// TrickleTraffic: When serving state is PRIMARY, this field provides the
  2113  	// option of sending a small percentage of the traffic to the backup targets.
  2114  	TrickleTraffic float64 `json:"trickleTraffic,omitempty"`
  2115  	// ForceSendFields is a list of field names (e.g. "BackupGeoTargets") to
  2116  	// unconditionally include in API requests. By default, fields with empty or
  2117  	// default values are omitted from API requests. See
  2118  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2119  	// details.
  2120  	ForceSendFields []string `json:"-"`
  2121  	// NullFields is a list of field names (e.g. "BackupGeoTargets") to include in
  2122  	// API requests with the JSON null value. By default, fields with empty values
  2123  	// are omitted from API requests. See
  2124  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2125  	NullFields []string `json:"-"`
  2126  }
  2127  
  2128  func (s *RRSetRoutingPolicyPrimaryBackupPolicy) MarshalJSON() ([]byte, error) {
  2129  	type NoMethod RRSetRoutingPolicyPrimaryBackupPolicy
  2130  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2131  }
  2132  
  2133  func (s *RRSetRoutingPolicyPrimaryBackupPolicy) UnmarshalJSON(data []byte) error {
  2134  	type NoMethod RRSetRoutingPolicyPrimaryBackupPolicy
  2135  	var s1 struct {
  2136  		TrickleTraffic gensupport.JSONFloat64 `json:"trickleTraffic"`
  2137  		*NoMethod
  2138  	}
  2139  	s1.NoMethod = (*NoMethod)(s)
  2140  	if err := json.Unmarshal(data, &s1); err != nil {
  2141  		return err
  2142  	}
  2143  	s.TrickleTraffic = float64(s1.TrickleTraffic)
  2144  	return nil
  2145  }
  2146  
  2147  // RRSetRoutingPolicyWrrPolicy: Configures a RRSetRoutingPolicy that routes in
  2148  // a weighted round robin fashion.
  2149  type RRSetRoutingPolicyWrrPolicy struct {
  2150  	Items []*RRSetRoutingPolicyWrrPolicyWrrPolicyItem `json:"items,omitempty"`
  2151  	Kind  string                                      `json:"kind,omitempty"`
  2152  	// ForceSendFields is a list of field names (e.g. "Items") to unconditionally
  2153  	// include in API requests. By default, fields with empty or default values are
  2154  	// omitted from API requests. See
  2155  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2156  	// details.
  2157  	ForceSendFields []string `json:"-"`
  2158  	// NullFields is a list of field names (e.g. "Items") to include in API
  2159  	// requests with the JSON null value. By default, fields with empty values are
  2160  	// omitted from API requests. See
  2161  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2162  	NullFields []string `json:"-"`
  2163  }
  2164  
  2165  func (s *RRSetRoutingPolicyWrrPolicy) MarshalJSON() ([]byte, error) {
  2166  	type NoMethod RRSetRoutingPolicyWrrPolicy
  2167  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2168  }
  2169  
  2170  // RRSetRoutingPolicyWrrPolicyWrrPolicyItem: A routing block which contains the
  2171  // routing information for one WRR item.
  2172  type RRSetRoutingPolicyWrrPolicyWrrPolicyItem struct {
  2173  	// HealthCheckedTargets: Endpoints that are health checked before making the
  2174  	// routing decision. The unhealthy endpoints are omitted from the result. If
  2175  	// all endpoints within a bucket are unhealthy, we choose a different bucket
  2176  	// (sampled with respect to its weight) for responding. If DNSSEC is enabled
  2177  	// for this zone, only one of rrdata or health_checked_targets can be set.
  2178  	HealthCheckedTargets *RRSetRoutingPolicyHealthCheckTargets `json:"healthCheckedTargets,omitempty"`
  2179  	Kind                 string                                `json:"kind,omitempty"`
  2180  	Rrdatas              []string                              `json:"rrdatas,omitempty"`
  2181  	// SignatureRrdatas: DNSSEC generated signatures for all the rrdata within this
  2182  	// item. Note that if health checked targets are provided for DNSSEC enabled
  2183  	// zones, there's a restriction of 1 IP address per item.
  2184  	SignatureRrdatas []string `json:"signatureRrdatas,omitempty"`
  2185  	// Weight: The weight corresponding to this WrrPolicyItem object. When multiple
  2186  	// WrrPolicyItem objects are configured, the probability of returning an
  2187  	// WrrPolicyItem object's data is proportional to its weight relative to the
  2188  	// sum of weights configured for all items. This weight must be non-negative.
  2189  	Weight float64 `json:"weight,omitempty"`
  2190  	// ForceSendFields is a list of field names (e.g. "HealthCheckedTargets") to
  2191  	// unconditionally include in API requests. By default, fields with empty or
  2192  	// default values are omitted from API requests. See
  2193  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2194  	// details.
  2195  	ForceSendFields []string `json:"-"`
  2196  	// NullFields is a list of field names (e.g. "HealthCheckedTargets") to include
  2197  	// in API requests with the JSON null value. By default, fields with empty
  2198  	// values are omitted from API requests. See
  2199  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2200  	NullFields []string `json:"-"`
  2201  }
  2202  
  2203  func (s *RRSetRoutingPolicyWrrPolicyWrrPolicyItem) MarshalJSON() ([]byte, error) {
  2204  	type NoMethod RRSetRoutingPolicyWrrPolicyWrrPolicyItem
  2205  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2206  }
  2207  
  2208  func (s *RRSetRoutingPolicyWrrPolicyWrrPolicyItem) UnmarshalJSON(data []byte) error {
  2209  	type NoMethod RRSetRoutingPolicyWrrPolicyWrrPolicyItem
  2210  	var s1 struct {
  2211  		Weight gensupport.JSONFloat64 `json:"weight"`
  2212  		*NoMethod
  2213  	}
  2214  	s1.NoMethod = (*NoMethod)(s)
  2215  	if err := json.Unmarshal(data, &s1); err != nil {
  2216  		return err
  2217  	}
  2218  	s.Weight = float64(s1.Weight)
  2219  	return nil
  2220  }
  2221  
  2222  // ResourceRecordSet: A unit of data that is returned by the DNS servers.
  2223  type ResourceRecordSet struct {
  2224  	Kind string `json:"kind,omitempty"`
  2225  	// Name: For example, www.example.com.
  2226  	Name string `json:"name,omitempty"`
  2227  	// RoutingPolicy: Configures dynamic query responses based on either the geo
  2228  	// location of the querying user or a weighted round robin based routing
  2229  	// policy. A valid ResourceRecordSet contains only rrdata (for static
  2230  	// resolution) or a routing_policy (for dynamic resolution).
  2231  	RoutingPolicy *RRSetRoutingPolicy `json:"routingPolicy,omitempty"`
  2232  	// Rrdatas: As defined in RFC 1035 (section 5) and RFC 1034 (section 3.6.1) --
  2233  	// see examples.
  2234  	Rrdatas []string `json:"rrdatas,omitempty"`
  2235  	// SignatureRrdatas: As defined in RFC 4034 (section 3.2).
  2236  	SignatureRrdatas []string `json:"signatureRrdatas,omitempty"`
  2237  	// Ttl: Number of seconds that this ResourceRecordSet can be cached by
  2238  	// resolvers.
  2239  	Ttl int64 `json:"ttl,omitempty"`
  2240  	// Type: The identifier of a supported record type. See the list of Supported
  2241  	// DNS record types.
  2242  	Type string `json:"type,omitempty"`
  2243  
  2244  	// ServerResponse contains the HTTP response code and headers from the server.
  2245  	googleapi.ServerResponse `json:"-"`
  2246  	// ForceSendFields is a list of field names (e.g. "Kind") to unconditionally
  2247  	// include in API requests. By default, fields with empty or default values are
  2248  	// omitted from API requests. See
  2249  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2250  	// details.
  2251  	ForceSendFields []string `json:"-"`
  2252  	// NullFields is a list of field names (e.g. "Kind") to include in API requests
  2253  	// with the JSON null value. By default, fields with empty values are omitted
  2254  	// from API requests. See
  2255  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2256  	NullFields []string `json:"-"`
  2257  }
  2258  
  2259  func (s *ResourceRecordSet) MarshalJSON() ([]byte, error) {
  2260  	type NoMethod ResourceRecordSet
  2261  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2262  }
  2263  
  2264  type ResourceRecordSetsListResponse struct {
  2265  	Header *ResponseHeader `json:"header,omitempty"`
  2266  	// Kind: Type of resource.
  2267  	Kind string `json:"kind,omitempty"`
  2268  	// NextPageToken: The presence of this field indicates that there exist more
  2269  	// results following your last page of results in pagination order. To fetch
  2270  	// them, make another list request using this value as your pagination token.
  2271  	// This lets you retrieve the complete contents of even larger collections, one
  2272  	// page at a time. However, if the collection changes between paginated list
  2273  	// requests, the set of elements returned is an inconsistent view of the
  2274  	// collection. You cannot retrieve a consistent snapshot of a collection larger
  2275  	// than the maximum page size.
  2276  	NextPageToken string `json:"nextPageToken,omitempty"`
  2277  	// Rrsets: The resource record set resources.
  2278  	Rrsets []*ResourceRecordSet `json:"rrsets,omitempty"`
  2279  
  2280  	// ServerResponse contains the HTTP response code and headers from the server.
  2281  	googleapi.ServerResponse `json:"-"`
  2282  	// ForceSendFields is a list of field names (e.g. "Header") to unconditionally
  2283  	// include in API requests. By default, fields with empty or default values are
  2284  	// omitted from API requests. See
  2285  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2286  	// details.
  2287  	ForceSendFields []string `json:"-"`
  2288  	// NullFields is a list of field names (e.g. "Header") to include in API
  2289  	// requests with the JSON null value. By default, fields with empty values are
  2290  	// omitted from API requests. See
  2291  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2292  	NullFields []string `json:"-"`
  2293  }
  2294  
  2295  func (s *ResourceRecordSetsListResponse) MarshalJSON() ([]byte, error) {
  2296  	type NoMethod ResourceRecordSetsListResponse
  2297  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2298  }
  2299  
  2300  // ResponseHeader: Elements common to every response.
  2301  type ResponseHeader struct {
  2302  	// OperationId: For mutating operation requests that completed successfully.
  2303  	// This is the client_operation_id if the client specified it, otherwise it is
  2304  	// generated by the server (output only).
  2305  	OperationId string `json:"operationId,omitempty"`
  2306  	// ForceSendFields is a list of field names (e.g. "OperationId") to
  2307  	// unconditionally include in API requests. By default, fields with empty or
  2308  	// default values are omitted from API requests. See
  2309  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2310  	// details.
  2311  	ForceSendFields []string `json:"-"`
  2312  	// NullFields is a list of field names (e.g. "OperationId") to include in API
  2313  	// requests with the JSON null value. By default, fields with empty values are
  2314  	// omitted from API requests. See
  2315  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2316  	NullFields []string `json:"-"`
  2317  }
  2318  
  2319  func (s *ResponseHeader) MarshalJSON() ([]byte, error) {
  2320  	type NoMethod ResponseHeader
  2321  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2322  }
  2323  
  2324  type ResponsePoliciesListResponse struct {
  2325  	Header *ResponseHeader `json:"header,omitempty"`
  2326  	// NextPageToken: The presence of this field indicates that more results exist
  2327  	// following your last page of results in pagination order. To fetch them, make
  2328  	// another list request by using this value as your page token. This lets you
  2329  	// view the complete contents of even very large collections one page at a
  2330  	// time. However, if the contents of the collection change between the first
  2331  	// and last paginated list request, the set of all elements returned are an
  2332  	// inconsistent view of the collection. You cannot retrieve a consistent
  2333  	// snapshot of a collection larger than the maximum page size.
  2334  	NextPageToken string `json:"nextPageToken,omitempty"`
  2335  	// ResponsePolicies: The Response Policy resources.
  2336  	ResponsePolicies []*ResponsePolicy `json:"responsePolicies,omitempty"`
  2337  
  2338  	// ServerResponse contains the HTTP response code and headers from the server.
  2339  	googleapi.ServerResponse `json:"-"`
  2340  	// ForceSendFields is a list of field names (e.g. "Header") to unconditionally
  2341  	// include in API requests. By default, fields with empty or default values are
  2342  	// omitted from API requests. See
  2343  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2344  	// details.
  2345  	ForceSendFields []string `json:"-"`
  2346  	// NullFields is a list of field names (e.g. "Header") to include in API
  2347  	// requests with the JSON null value. By default, fields with empty values are
  2348  	// omitted from API requests. See
  2349  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2350  	NullFields []string `json:"-"`
  2351  }
  2352  
  2353  func (s *ResponsePoliciesListResponse) MarshalJSON() ([]byte, error) {
  2354  	type NoMethod ResponsePoliciesListResponse
  2355  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2356  }
  2357  
  2358  type ResponsePoliciesPatchResponse struct {
  2359  	Header         *ResponseHeader `json:"header,omitempty"`
  2360  	ResponsePolicy *ResponsePolicy `json:"responsePolicy,omitempty"`
  2361  
  2362  	// ServerResponse contains the HTTP response code and headers from the server.
  2363  	googleapi.ServerResponse `json:"-"`
  2364  	// ForceSendFields is a list of field names (e.g. "Header") to unconditionally
  2365  	// include in API requests. By default, fields with empty or default values are
  2366  	// omitted from API requests. See
  2367  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2368  	// details.
  2369  	ForceSendFields []string `json:"-"`
  2370  	// NullFields is a list of field names (e.g. "Header") to include in API
  2371  	// requests with the JSON null value. By default, fields with empty values are
  2372  	// omitted from API requests. See
  2373  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2374  	NullFields []string `json:"-"`
  2375  }
  2376  
  2377  func (s *ResponsePoliciesPatchResponse) MarshalJSON() ([]byte, error) {
  2378  	type NoMethod ResponsePoliciesPatchResponse
  2379  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2380  }
  2381  
  2382  type ResponsePoliciesUpdateResponse struct {
  2383  	Header         *ResponseHeader `json:"header,omitempty"`
  2384  	ResponsePolicy *ResponsePolicy `json:"responsePolicy,omitempty"`
  2385  
  2386  	// ServerResponse contains the HTTP response code and headers from the server.
  2387  	googleapi.ServerResponse `json:"-"`
  2388  	// ForceSendFields is a list of field names (e.g. "Header") to unconditionally
  2389  	// include in API requests. By default, fields with empty or default values are
  2390  	// omitted from API requests. See
  2391  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2392  	// details.
  2393  	ForceSendFields []string `json:"-"`
  2394  	// NullFields is a list of field names (e.g. "Header") to include in API
  2395  	// requests with the JSON null value. By default, fields with empty values are
  2396  	// omitted from API requests. See
  2397  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2398  	NullFields []string `json:"-"`
  2399  }
  2400  
  2401  func (s *ResponsePoliciesUpdateResponse) MarshalJSON() ([]byte, error) {
  2402  	type NoMethod ResponsePoliciesUpdateResponse
  2403  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2404  }
  2405  
  2406  // ResponsePolicy: A Response Policy is a collection of selectors that apply to
  2407  // queries made against one or more Virtual Private Cloud networks.
  2408  type ResponsePolicy struct {
  2409  	// Description: User-provided description for this Response Policy.
  2410  	Description string `json:"description,omitempty"`
  2411  	// GkeClusters: The list of Google Kubernetes Engine clusters to which this
  2412  	// response policy is applied.
  2413  	GkeClusters []*ResponsePolicyGKECluster `json:"gkeClusters,omitempty"`
  2414  	// Id: Unique identifier for the resource; defined by the server (output only).
  2415  	Id   int64  `json:"id,omitempty,string"`
  2416  	Kind string `json:"kind,omitempty"`
  2417  	// Labels: User labels.
  2418  	Labels map[string]string `json:"labels,omitempty"`
  2419  	// Networks: List of network names specifying networks to which this policy is
  2420  	// applied.
  2421  	Networks []*ResponsePolicyNetwork `json:"networks,omitempty"`
  2422  	// ResponsePolicyName: User assigned name for this Response Policy.
  2423  	ResponsePolicyName string `json:"responsePolicyName,omitempty"`
  2424  
  2425  	// ServerResponse contains the HTTP response code and headers from the server.
  2426  	googleapi.ServerResponse `json:"-"`
  2427  	// ForceSendFields is a list of field names (e.g. "Description") to
  2428  	// unconditionally include in API requests. By default, fields with empty or
  2429  	// default values are omitted from API requests. See
  2430  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2431  	// details.
  2432  	ForceSendFields []string `json:"-"`
  2433  	// NullFields is a list of field names (e.g. "Description") to include in API
  2434  	// requests with the JSON null value. By default, fields with empty values are
  2435  	// omitted from API requests. See
  2436  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2437  	NullFields []string `json:"-"`
  2438  }
  2439  
  2440  func (s *ResponsePolicy) MarshalJSON() ([]byte, error) {
  2441  	type NoMethod ResponsePolicy
  2442  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2443  }
  2444  
  2445  type ResponsePolicyGKECluster struct {
  2446  	// GkeClusterName: The resource name of the cluster to bind this response
  2447  	// policy to. This should be specified in the format like:
  2448  	// projects/*/locations/*/clusters/*. This is referenced from GKE
  2449  	// projects.locations.clusters.get API:
  2450  	// https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters/get
  2451  	GkeClusterName string `json:"gkeClusterName,omitempty"`
  2452  	Kind           string `json:"kind,omitempty"`
  2453  	// ForceSendFields is a list of field names (e.g. "GkeClusterName") to
  2454  	// unconditionally include in API requests. By default, fields with empty or
  2455  	// default values are omitted from API requests. See
  2456  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2457  	// details.
  2458  	ForceSendFields []string `json:"-"`
  2459  	// NullFields is a list of field names (e.g. "GkeClusterName") to include in
  2460  	// API requests with the JSON null value. By default, fields with empty values
  2461  	// are omitted from API requests. See
  2462  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2463  	NullFields []string `json:"-"`
  2464  }
  2465  
  2466  func (s *ResponsePolicyGKECluster) MarshalJSON() ([]byte, error) {
  2467  	type NoMethod ResponsePolicyGKECluster
  2468  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2469  }
  2470  
  2471  type ResponsePolicyNetwork struct {
  2472  	Kind string `json:"kind,omitempty"`
  2473  	// NetworkUrl: The fully qualified URL of the VPC network to bind to. This
  2474  	// should be formatted like
  2475  	// https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}
  2476  	NetworkUrl string `json:"networkUrl,omitempty"`
  2477  	// ForceSendFields is a list of field names (e.g. "Kind") to unconditionally
  2478  	// include in API requests. By default, fields with empty or default values are
  2479  	// omitted from API requests. See
  2480  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2481  	// details.
  2482  	ForceSendFields []string `json:"-"`
  2483  	// NullFields is a list of field names (e.g. "Kind") to include in API requests
  2484  	// with the JSON null value. By default, fields with empty values are omitted
  2485  	// from API requests. See
  2486  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2487  	NullFields []string `json:"-"`
  2488  }
  2489  
  2490  func (s *ResponsePolicyNetwork) MarshalJSON() ([]byte, error) {
  2491  	type NoMethod ResponsePolicyNetwork
  2492  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2493  }
  2494  
  2495  // ResponsePolicyRule: A Response Policy Rule is a selector that applies its
  2496  // behavior to queries that match the selector. Selectors are DNS names, which
  2497  // may be wildcards or exact matches. Each DNS query subject to a Response
  2498  // Policy matches at most one ResponsePolicyRule, as identified by the dns_name
  2499  // field with the longest matching suffix.
  2500  type ResponsePolicyRule struct {
  2501  	// Behavior: Answer this query with a behavior rather than DNS data.
  2502  	//
  2503  	// Possible values:
  2504  	//   "behaviorUnspecified"
  2505  	//   "bypassResponsePolicy" - Skip a less-specific ResponsePolicyRule and
  2506  	// continue normal query logic. This can be used with a less-specific wildcard
  2507  	// selector to exempt a subset of the wildcard ResponsePolicyRule from the
  2508  	// ResponsePolicy behavior and query the public Internet instead. For instance,
  2509  	// if these rules exist: *.example.com -> LocalData 1.2.3.4 foo.example.com ->
  2510  	// Behavior 'bypassResponsePolicy' Then a query for 'foo.example.com' skips the
  2511  	// wildcard. This additionally functions to facilitate the allowlist feature.
  2512  	// RPZs can be applied to multiple levels in the (eventually org, folder,
  2513  	// project, network) hierarchy. If a rule is applied at a higher level of the
  2514  	// hierarchy, adding a passthru rule at a lower level will supersede that, and
  2515  	// a query from an affected vm to that domain will be exempt from the RPZ and
  2516  	// proceed to normal resolution behavior.
  2517  	Behavior string `json:"behavior,omitempty"`
  2518  	// DnsName: The DNS name (wildcard or exact) to apply this rule to. Must be
  2519  	// unique within the Response Policy Rule.
  2520  	DnsName string `json:"dnsName,omitempty"`
  2521  	Kind    string `json:"kind,omitempty"`
  2522  	// LocalData: Answer this query directly with DNS data. These
  2523  	// ResourceRecordSets override any other DNS behavior for the matched name; in
  2524  	// particular they override private zones, the public internet, and GCP
  2525  	// internal DNS. No SOA nor NS types are allowed.
  2526  	LocalData *ResponsePolicyRuleLocalData `json:"localData,omitempty"`
  2527  	// RuleName: An identifier for this rule. Must be unique with the
  2528  	// ResponsePolicy.
  2529  	RuleName string `json:"ruleName,omitempty"`
  2530  
  2531  	// ServerResponse contains the HTTP response code and headers from the server.
  2532  	googleapi.ServerResponse `json:"-"`
  2533  	// ForceSendFields is a list of field names (e.g. "Behavior") to
  2534  	// unconditionally include in API requests. By default, fields with empty or
  2535  	// default values are omitted from API requests. See
  2536  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2537  	// details.
  2538  	ForceSendFields []string `json:"-"`
  2539  	// NullFields is a list of field names (e.g. "Behavior") to include in API
  2540  	// requests with the JSON null value. By default, fields with empty values are
  2541  	// omitted from API requests. See
  2542  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2543  	NullFields []string `json:"-"`
  2544  }
  2545  
  2546  func (s *ResponsePolicyRule) MarshalJSON() ([]byte, error) {
  2547  	type NoMethod ResponsePolicyRule
  2548  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2549  }
  2550  
  2551  type ResponsePolicyRuleLocalData struct {
  2552  	// LocalDatas: All resource record sets for this selector, one per resource
  2553  	// record type. The name must match the dns_name.
  2554  	LocalDatas []*ResourceRecordSet `json:"localDatas,omitempty"`
  2555  	// ForceSendFields is a list of field names (e.g. "LocalDatas") to
  2556  	// unconditionally include in API requests. By default, fields with empty or
  2557  	// default values are omitted from API requests. See
  2558  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2559  	// details.
  2560  	ForceSendFields []string `json:"-"`
  2561  	// NullFields is a list of field names (e.g. "LocalDatas") to include in API
  2562  	// requests with the JSON null value. By default, fields with empty values are
  2563  	// omitted from API requests. See
  2564  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2565  	NullFields []string `json:"-"`
  2566  }
  2567  
  2568  func (s *ResponsePolicyRuleLocalData) MarshalJSON() ([]byte, error) {
  2569  	type NoMethod ResponsePolicyRuleLocalData
  2570  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2571  }
  2572  
  2573  type ResponsePolicyRulesListResponse struct {
  2574  	Header *ResponseHeader `json:"header,omitempty"`
  2575  	// NextPageToken: The presence of this field indicates that there exist more
  2576  	// results following your last page of results in pagination order. To fetch
  2577  	// them, make another list request using this value as your page token. This
  2578  	// lets you the complete contents of even very large collections one page at a
  2579  	// time. However, if the contents of the collection change between the first
  2580  	// and last paginated list request, the set of all elements returned are an
  2581  	// inconsistent view of the collection. You cannot retrieve a consistent
  2582  	// snapshot of a collection larger than the maximum page size.
  2583  	NextPageToken string `json:"nextPageToken,omitempty"`
  2584  	// ResponsePolicyRules: The Response Policy Rule resources.
  2585  	ResponsePolicyRules []*ResponsePolicyRule `json:"responsePolicyRules,omitempty"`
  2586  
  2587  	// ServerResponse contains the HTTP response code and headers from the server.
  2588  	googleapi.ServerResponse `json:"-"`
  2589  	// ForceSendFields is a list of field names (e.g. "Header") to unconditionally
  2590  	// include in API requests. By default, fields with empty or default values are
  2591  	// omitted from API requests. See
  2592  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2593  	// details.
  2594  	ForceSendFields []string `json:"-"`
  2595  	// NullFields is a list of field names (e.g. "Header") to include in API
  2596  	// requests with the JSON null value. By default, fields with empty values are
  2597  	// omitted from API requests. See
  2598  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2599  	NullFields []string `json:"-"`
  2600  }
  2601  
  2602  func (s *ResponsePolicyRulesListResponse) MarshalJSON() ([]byte, error) {
  2603  	type NoMethod ResponsePolicyRulesListResponse
  2604  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2605  }
  2606  
  2607  type ResponsePolicyRulesPatchResponse struct {
  2608  	Header             *ResponseHeader     `json:"header,omitempty"`
  2609  	ResponsePolicyRule *ResponsePolicyRule `json:"responsePolicyRule,omitempty"`
  2610  
  2611  	// ServerResponse contains the HTTP response code and headers from the server.
  2612  	googleapi.ServerResponse `json:"-"`
  2613  	// ForceSendFields is a list of field names (e.g. "Header") to unconditionally
  2614  	// include in API requests. By default, fields with empty or default values are
  2615  	// omitted from API requests. See
  2616  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2617  	// details.
  2618  	ForceSendFields []string `json:"-"`
  2619  	// NullFields is a list of field names (e.g. "Header") to include in API
  2620  	// requests with the JSON null value. By default, fields with empty values are
  2621  	// omitted from API requests. See
  2622  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2623  	NullFields []string `json:"-"`
  2624  }
  2625  
  2626  func (s *ResponsePolicyRulesPatchResponse) MarshalJSON() ([]byte, error) {
  2627  	type NoMethod ResponsePolicyRulesPatchResponse
  2628  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2629  }
  2630  
  2631  type ResponsePolicyRulesUpdateResponse struct {
  2632  	Header             *ResponseHeader     `json:"header,omitempty"`
  2633  	ResponsePolicyRule *ResponsePolicyRule `json:"responsePolicyRule,omitempty"`
  2634  
  2635  	// ServerResponse contains the HTTP response code and headers from the server.
  2636  	googleapi.ServerResponse `json:"-"`
  2637  	// ForceSendFields is a list of field names (e.g. "Header") to unconditionally
  2638  	// include in API requests. By default, fields with empty or default values are
  2639  	// omitted from API requests. See
  2640  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2641  	// details.
  2642  	ForceSendFields []string `json:"-"`
  2643  	// NullFields is a list of field names (e.g. "Header") to include in API
  2644  	// requests with the JSON null value. By default, fields with empty values are
  2645  	// omitted from API requests. See
  2646  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2647  	NullFields []string `json:"-"`
  2648  }
  2649  
  2650  func (s *ResponsePolicyRulesUpdateResponse) MarshalJSON() ([]byte, error) {
  2651  	type NoMethod ResponsePolicyRulesUpdateResponse
  2652  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2653  }
  2654  
  2655  type ChangesCreateCall struct {
  2656  	s           *Service
  2657  	project     string
  2658  	managedZone string
  2659  	change      *Change
  2660  	urlParams_  gensupport.URLParams
  2661  	ctx_        context.Context
  2662  	header_     http.Header
  2663  }
  2664  
  2665  // Create: Atomically updates the ResourceRecordSet collection.
  2666  //
  2667  //   - managedZone: Identifies the managed zone addressed by this request. Can be
  2668  //     the managed zone name or ID.
  2669  //   - project: Identifies the project addressed by this request.
  2670  func (r *ChangesService) Create(project string, managedZone string, change *Change) *ChangesCreateCall {
  2671  	c := &ChangesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2672  	c.project = project
  2673  	c.managedZone = managedZone
  2674  	c.change = change
  2675  	return c
  2676  }
  2677  
  2678  // ClientOperationId sets the optional parameter "clientOperationId": For
  2679  // mutating operation requests only. An optional identifier specified by the
  2680  // client. Must be unique for operation resources in the Operations collection.
  2681  func (c *ChangesCreateCall) ClientOperationId(clientOperationId string) *ChangesCreateCall {
  2682  	c.urlParams_.Set("clientOperationId", clientOperationId)
  2683  	return c
  2684  }
  2685  
  2686  // Fields allows partial responses to be retrieved. See
  2687  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2688  // details.
  2689  func (c *ChangesCreateCall) Fields(s ...googleapi.Field) *ChangesCreateCall {
  2690  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2691  	return c
  2692  }
  2693  
  2694  // Context sets the context to be used in this call's Do method.
  2695  func (c *ChangesCreateCall) Context(ctx context.Context) *ChangesCreateCall {
  2696  	c.ctx_ = ctx
  2697  	return c
  2698  }
  2699  
  2700  // Header returns a http.Header that can be modified by the caller to add
  2701  // headers to the request.
  2702  func (c *ChangesCreateCall) Header() http.Header {
  2703  	if c.header_ == nil {
  2704  		c.header_ = make(http.Header)
  2705  	}
  2706  	return c.header_
  2707  }
  2708  
  2709  func (c *ChangesCreateCall) doRequest(alt string) (*http.Response, error) {
  2710  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  2711  	var body io.Reader = nil
  2712  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.change)
  2713  	if err != nil {
  2714  		return nil, err
  2715  	}
  2716  	c.urlParams_.Set("alt", alt)
  2717  	c.urlParams_.Set("prettyPrint", "false")
  2718  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1beta2/projects/{project}/managedZones/{managedZone}/changes")
  2719  	urls += "?" + c.urlParams_.Encode()
  2720  	req, err := http.NewRequest("POST", urls, body)
  2721  	if err != nil {
  2722  		return nil, err
  2723  	}
  2724  	req.Header = reqHeaders
  2725  	googleapi.Expand(req.URL, map[string]string{
  2726  		"project":     c.project,
  2727  		"managedZone": c.managedZone,
  2728  	})
  2729  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2730  }
  2731  
  2732  // Do executes the "dns.changes.create" call.
  2733  // Any non-2xx status code is an error. Response headers are in either
  2734  // *Change.ServerResponse.Header or (if a response was returned at all) in
  2735  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2736  // whether the returned error was because http.StatusNotModified was returned.
  2737  func (c *ChangesCreateCall) Do(opts ...googleapi.CallOption) (*Change, error) {
  2738  	gensupport.SetOptions(c.urlParams_, opts...)
  2739  	res, err := c.doRequest("json")
  2740  	if res != nil && res.StatusCode == http.StatusNotModified {
  2741  		if res.Body != nil {
  2742  			res.Body.Close()
  2743  		}
  2744  		return nil, gensupport.WrapError(&googleapi.Error{
  2745  			Code:   res.StatusCode,
  2746  			Header: res.Header,
  2747  		})
  2748  	}
  2749  	if err != nil {
  2750  		return nil, err
  2751  	}
  2752  	defer googleapi.CloseBody(res)
  2753  	if err := googleapi.CheckResponse(res); err != nil {
  2754  		return nil, gensupport.WrapError(err)
  2755  	}
  2756  	ret := &Change{
  2757  		ServerResponse: googleapi.ServerResponse{
  2758  			Header:         res.Header,
  2759  			HTTPStatusCode: res.StatusCode,
  2760  		},
  2761  	}
  2762  	target := &ret
  2763  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2764  		return nil, err
  2765  	}
  2766  	return ret, nil
  2767  }
  2768  
  2769  type ChangesGetCall struct {
  2770  	s            *Service
  2771  	project      string
  2772  	managedZone  string
  2773  	changeId     string
  2774  	urlParams_   gensupport.URLParams
  2775  	ifNoneMatch_ string
  2776  	ctx_         context.Context
  2777  	header_      http.Header
  2778  }
  2779  
  2780  // Get: Fetches the representation of an existing Change.
  2781  //
  2782  //   - changeId: The identifier of the requested change, from a previous
  2783  //     ResourceRecordSetsChangeResponse.
  2784  //   - managedZone: Identifies the managed zone addressed by this request. Can be
  2785  //     the managed zone name or ID.
  2786  //   - project: Identifies the project addressed by this request.
  2787  func (r *ChangesService) Get(project string, managedZone string, changeId string) *ChangesGetCall {
  2788  	c := &ChangesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2789  	c.project = project
  2790  	c.managedZone = managedZone
  2791  	c.changeId = changeId
  2792  	return c
  2793  }
  2794  
  2795  // ClientOperationId sets the optional parameter "clientOperationId": For
  2796  // mutating operation requests only. An optional identifier specified by the
  2797  // client. Must be unique for operation resources in the Operations collection.
  2798  func (c *ChangesGetCall) ClientOperationId(clientOperationId string) *ChangesGetCall {
  2799  	c.urlParams_.Set("clientOperationId", clientOperationId)
  2800  	return c
  2801  }
  2802  
  2803  // Fields allows partial responses to be retrieved. See
  2804  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2805  // details.
  2806  func (c *ChangesGetCall) Fields(s ...googleapi.Field) *ChangesGetCall {
  2807  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2808  	return c
  2809  }
  2810  
  2811  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2812  // object's ETag matches the given value. This is useful for getting updates
  2813  // only after the object has changed since the last request.
  2814  func (c *ChangesGetCall) IfNoneMatch(entityTag string) *ChangesGetCall {
  2815  	c.ifNoneMatch_ = entityTag
  2816  	return c
  2817  }
  2818  
  2819  // Context sets the context to be used in this call's Do method.
  2820  func (c *ChangesGetCall) Context(ctx context.Context) *ChangesGetCall {
  2821  	c.ctx_ = ctx
  2822  	return c
  2823  }
  2824  
  2825  // Header returns a http.Header that can be modified by the caller to add
  2826  // headers to the request.
  2827  func (c *ChangesGetCall) Header() http.Header {
  2828  	if c.header_ == nil {
  2829  		c.header_ = make(http.Header)
  2830  	}
  2831  	return c.header_
  2832  }
  2833  
  2834  func (c *ChangesGetCall) doRequest(alt string) (*http.Response, error) {
  2835  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2836  	if c.ifNoneMatch_ != "" {
  2837  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2838  	}
  2839  	var body io.Reader = nil
  2840  	c.urlParams_.Set("alt", alt)
  2841  	c.urlParams_.Set("prettyPrint", "false")
  2842  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1beta2/projects/{project}/managedZones/{managedZone}/changes/{changeId}")
  2843  	urls += "?" + c.urlParams_.Encode()
  2844  	req, err := http.NewRequest("GET", urls, body)
  2845  	if err != nil {
  2846  		return nil, err
  2847  	}
  2848  	req.Header = reqHeaders
  2849  	googleapi.Expand(req.URL, map[string]string{
  2850  		"project":     c.project,
  2851  		"managedZone": c.managedZone,
  2852  		"changeId":    c.changeId,
  2853  	})
  2854  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2855  }
  2856  
  2857  // Do executes the "dns.changes.get" call.
  2858  // Any non-2xx status code is an error. Response headers are in either
  2859  // *Change.ServerResponse.Header or (if a response was returned at all) in
  2860  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2861  // whether the returned error was because http.StatusNotModified was returned.
  2862  func (c *ChangesGetCall) Do(opts ...googleapi.CallOption) (*Change, error) {
  2863  	gensupport.SetOptions(c.urlParams_, opts...)
  2864  	res, err := c.doRequest("json")
  2865  	if res != nil && res.StatusCode == http.StatusNotModified {
  2866  		if res.Body != nil {
  2867  			res.Body.Close()
  2868  		}
  2869  		return nil, gensupport.WrapError(&googleapi.Error{
  2870  			Code:   res.StatusCode,
  2871  			Header: res.Header,
  2872  		})
  2873  	}
  2874  	if err != nil {
  2875  		return nil, err
  2876  	}
  2877  	defer googleapi.CloseBody(res)
  2878  	if err := googleapi.CheckResponse(res); err != nil {
  2879  		return nil, gensupport.WrapError(err)
  2880  	}
  2881  	ret := &Change{
  2882  		ServerResponse: googleapi.ServerResponse{
  2883  			Header:         res.Header,
  2884  			HTTPStatusCode: res.StatusCode,
  2885  		},
  2886  	}
  2887  	target := &ret
  2888  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2889  		return nil, err
  2890  	}
  2891  	return ret, nil
  2892  }
  2893  
  2894  type ChangesListCall struct {
  2895  	s            *Service
  2896  	project      string
  2897  	managedZone  string
  2898  	urlParams_   gensupport.URLParams
  2899  	ifNoneMatch_ string
  2900  	ctx_         context.Context
  2901  	header_      http.Header
  2902  }
  2903  
  2904  // List: Enumerates Changes to a ResourceRecordSet collection.
  2905  //
  2906  //   - managedZone: Identifies the managed zone addressed by this request. Can be
  2907  //     the managed zone name or ID.
  2908  //   - project: Identifies the project addressed by this request.
  2909  func (r *ChangesService) List(project string, managedZone string) *ChangesListCall {
  2910  	c := &ChangesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2911  	c.project = project
  2912  	c.managedZone = managedZone
  2913  	return c
  2914  }
  2915  
  2916  // MaxResults sets the optional parameter "maxResults": Maximum number of
  2917  // results to be returned. If unspecified, the server decides how many results
  2918  // to return.
  2919  func (c *ChangesListCall) MaxResults(maxResults int64) *ChangesListCall {
  2920  	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  2921  	return c
  2922  }
  2923  
  2924  // PageToken sets the optional parameter "pageToken": A tag returned by a
  2925  // previous list request that was truncated. Use this parameter to continue a
  2926  // previous list request.
  2927  func (c *ChangesListCall) PageToken(pageToken string) *ChangesListCall {
  2928  	c.urlParams_.Set("pageToken", pageToken)
  2929  	return c
  2930  }
  2931  
  2932  // SortBy sets the optional parameter "sortBy": Sorting criterion. The only
  2933  // supported value is change sequence.
  2934  //
  2935  // Possible values:
  2936  //
  2937  //	"changeSequence" (default)
  2938  func (c *ChangesListCall) SortBy(sortBy string) *ChangesListCall {
  2939  	c.urlParams_.Set("sortBy", sortBy)
  2940  	return c
  2941  }
  2942  
  2943  // SortOrder sets the optional parameter "sortOrder": Sorting order direction:
  2944  // 'ascending' or 'descending'.
  2945  func (c *ChangesListCall) SortOrder(sortOrder string) *ChangesListCall {
  2946  	c.urlParams_.Set("sortOrder", sortOrder)
  2947  	return c
  2948  }
  2949  
  2950  // Fields allows partial responses to be retrieved. See
  2951  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2952  // details.
  2953  func (c *ChangesListCall) Fields(s ...googleapi.Field) *ChangesListCall {
  2954  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2955  	return c
  2956  }
  2957  
  2958  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2959  // object's ETag matches the given value. This is useful for getting updates
  2960  // only after the object has changed since the last request.
  2961  func (c *ChangesListCall) IfNoneMatch(entityTag string) *ChangesListCall {
  2962  	c.ifNoneMatch_ = entityTag
  2963  	return c
  2964  }
  2965  
  2966  // Context sets the context to be used in this call's Do method.
  2967  func (c *ChangesListCall) Context(ctx context.Context) *ChangesListCall {
  2968  	c.ctx_ = ctx
  2969  	return c
  2970  }
  2971  
  2972  // Header returns a http.Header that can be modified by the caller to add
  2973  // headers to the request.
  2974  func (c *ChangesListCall) Header() http.Header {
  2975  	if c.header_ == nil {
  2976  		c.header_ = make(http.Header)
  2977  	}
  2978  	return c.header_
  2979  }
  2980  
  2981  func (c *ChangesListCall) doRequest(alt string) (*http.Response, error) {
  2982  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2983  	if c.ifNoneMatch_ != "" {
  2984  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2985  	}
  2986  	var body io.Reader = nil
  2987  	c.urlParams_.Set("alt", alt)
  2988  	c.urlParams_.Set("prettyPrint", "false")
  2989  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1beta2/projects/{project}/managedZones/{managedZone}/changes")
  2990  	urls += "?" + c.urlParams_.Encode()
  2991  	req, err := http.NewRequest("GET", urls, body)
  2992  	if err != nil {
  2993  		return nil, err
  2994  	}
  2995  	req.Header = reqHeaders
  2996  	googleapi.Expand(req.URL, map[string]string{
  2997  		"project":     c.project,
  2998  		"managedZone": c.managedZone,
  2999  	})
  3000  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3001  }
  3002  
  3003  // Do executes the "dns.changes.list" call.
  3004  // Any non-2xx status code is an error. Response headers are in either
  3005  // *ChangesListResponse.ServerResponse.Header or (if a response was returned at
  3006  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  3007  // check whether the returned error was because http.StatusNotModified was
  3008  // returned.
  3009  func (c *ChangesListCall) Do(opts ...googleapi.CallOption) (*ChangesListResponse, error) {
  3010  	gensupport.SetOptions(c.urlParams_, opts...)
  3011  	res, err := c.doRequest("json")
  3012  	if res != nil && res.StatusCode == http.StatusNotModified {
  3013  		if res.Body != nil {
  3014  			res.Body.Close()
  3015  		}
  3016  		return nil, gensupport.WrapError(&googleapi.Error{
  3017  			Code:   res.StatusCode,
  3018  			Header: res.Header,
  3019  		})
  3020  	}
  3021  	if err != nil {
  3022  		return nil, err
  3023  	}
  3024  	defer googleapi.CloseBody(res)
  3025  	if err := googleapi.CheckResponse(res); err != nil {
  3026  		return nil, gensupport.WrapError(err)
  3027  	}
  3028  	ret := &ChangesListResponse{
  3029  		ServerResponse: googleapi.ServerResponse{
  3030  			Header:         res.Header,
  3031  			HTTPStatusCode: res.StatusCode,
  3032  		},
  3033  	}
  3034  	target := &ret
  3035  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3036  		return nil, err
  3037  	}
  3038  	return ret, nil
  3039  }
  3040  
  3041  // Pages invokes f for each page of results.
  3042  // A non-nil error returned from f will halt the iteration.
  3043  // The provided context supersedes any context provided to the Context method.
  3044  func (c *ChangesListCall) Pages(ctx context.Context, f func(*ChangesListResponse) error) error {
  3045  	c.ctx_ = ctx
  3046  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  3047  	for {
  3048  		x, err := c.Do()
  3049  		if err != nil {
  3050  			return err
  3051  		}
  3052  		if err := f(x); err != nil {
  3053  			return err
  3054  		}
  3055  		if x.NextPageToken == "" {
  3056  			return nil
  3057  		}
  3058  		c.PageToken(x.NextPageToken)
  3059  	}
  3060  }
  3061  
  3062  type DnsKeysGetCall struct {
  3063  	s            *Service
  3064  	project      string
  3065  	managedZone  string
  3066  	dnsKeyId     string
  3067  	urlParams_   gensupport.URLParams
  3068  	ifNoneMatch_ string
  3069  	ctx_         context.Context
  3070  	header_      http.Header
  3071  }
  3072  
  3073  // Get: Fetches the representation of an existing DnsKey.
  3074  //
  3075  //   - dnsKeyId: The identifier of the requested DnsKey.
  3076  //   - managedZone: Identifies the managed zone addressed by this request. Can be
  3077  //     the managed zone name or ID.
  3078  //   - project: Identifies the project addressed by this request.
  3079  func (r *DnsKeysService) Get(project string, managedZone string, dnsKeyId string) *DnsKeysGetCall {
  3080  	c := &DnsKeysGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3081  	c.project = project
  3082  	c.managedZone = managedZone
  3083  	c.dnsKeyId = dnsKeyId
  3084  	return c
  3085  }
  3086  
  3087  // ClientOperationId sets the optional parameter "clientOperationId": For
  3088  // mutating operation requests only. An optional identifier specified by the
  3089  // client. Must be unique for operation resources in the Operations collection.
  3090  func (c *DnsKeysGetCall) ClientOperationId(clientOperationId string) *DnsKeysGetCall {
  3091  	c.urlParams_.Set("clientOperationId", clientOperationId)
  3092  	return c
  3093  }
  3094  
  3095  // DigestType sets the optional parameter "digestType": An optional
  3096  // comma-separated list of digest types to compute and display for key signing
  3097  // keys. If omitted, the recommended digest type is computed and displayed.
  3098  func (c *DnsKeysGetCall) DigestType(digestType string) *DnsKeysGetCall {
  3099  	c.urlParams_.Set("digestType", digestType)
  3100  	return c
  3101  }
  3102  
  3103  // Fields allows partial responses to be retrieved. See
  3104  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3105  // details.
  3106  func (c *DnsKeysGetCall) Fields(s ...googleapi.Field) *DnsKeysGetCall {
  3107  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3108  	return c
  3109  }
  3110  
  3111  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3112  // object's ETag matches the given value. This is useful for getting updates
  3113  // only after the object has changed since the last request.
  3114  func (c *DnsKeysGetCall) IfNoneMatch(entityTag string) *DnsKeysGetCall {
  3115  	c.ifNoneMatch_ = entityTag
  3116  	return c
  3117  }
  3118  
  3119  // Context sets the context to be used in this call's Do method.
  3120  func (c *DnsKeysGetCall) Context(ctx context.Context) *DnsKeysGetCall {
  3121  	c.ctx_ = ctx
  3122  	return c
  3123  }
  3124  
  3125  // Header returns a http.Header that can be modified by the caller to add
  3126  // headers to the request.
  3127  func (c *DnsKeysGetCall) Header() http.Header {
  3128  	if c.header_ == nil {
  3129  		c.header_ = make(http.Header)
  3130  	}
  3131  	return c.header_
  3132  }
  3133  
  3134  func (c *DnsKeysGetCall) doRequest(alt string) (*http.Response, error) {
  3135  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3136  	if c.ifNoneMatch_ != "" {
  3137  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3138  	}
  3139  	var body io.Reader = nil
  3140  	c.urlParams_.Set("alt", alt)
  3141  	c.urlParams_.Set("prettyPrint", "false")
  3142  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1beta2/projects/{project}/managedZones/{managedZone}/dnsKeys/{dnsKeyId}")
  3143  	urls += "?" + c.urlParams_.Encode()
  3144  	req, err := http.NewRequest("GET", urls, body)
  3145  	if err != nil {
  3146  		return nil, err
  3147  	}
  3148  	req.Header = reqHeaders
  3149  	googleapi.Expand(req.URL, map[string]string{
  3150  		"project":     c.project,
  3151  		"managedZone": c.managedZone,
  3152  		"dnsKeyId":    c.dnsKeyId,
  3153  	})
  3154  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3155  }
  3156  
  3157  // Do executes the "dns.dnsKeys.get" call.
  3158  // Any non-2xx status code is an error. Response headers are in either
  3159  // *DnsKey.ServerResponse.Header or (if a response was returned at all) in
  3160  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3161  // whether the returned error was because http.StatusNotModified was returned.
  3162  func (c *DnsKeysGetCall) Do(opts ...googleapi.CallOption) (*DnsKey, error) {
  3163  	gensupport.SetOptions(c.urlParams_, opts...)
  3164  	res, err := c.doRequest("json")
  3165  	if res != nil && res.StatusCode == http.StatusNotModified {
  3166  		if res.Body != nil {
  3167  			res.Body.Close()
  3168  		}
  3169  		return nil, gensupport.WrapError(&googleapi.Error{
  3170  			Code:   res.StatusCode,
  3171  			Header: res.Header,
  3172  		})
  3173  	}
  3174  	if err != nil {
  3175  		return nil, err
  3176  	}
  3177  	defer googleapi.CloseBody(res)
  3178  	if err := googleapi.CheckResponse(res); err != nil {
  3179  		return nil, gensupport.WrapError(err)
  3180  	}
  3181  	ret := &DnsKey{
  3182  		ServerResponse: googleapi.ServerResponse{
  3183  			Header:         res.Header,
  3184  			HTTPStatusCode: res.StatusCode,
  3185  		},
  3186  	}
  3187  	target := &ret
  3188  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3189  		return nil, err
  3190  	}
  3191  	return ret, nil
  3192  }
  3193  
  3194  type DnsKeysListCall struct {
  3195  	s            *Service
  3196  	project      string
  3197  	managedZone  string
  3198  	urlParams_   gensupport.URLParams
  3199  	ifNoneMatch_ string
  3200  	ctx_         context.Context
  3201  	header_      http.Header
  3202  }
  3203  
  3204  // List: Enumerates DnsKeys to a ResourceRecordSet collection.
  3205  //
  3206  //   - managedZone: Identifies the managed zone addressed by this request. Can be
  3207  //     the managed zone name or ID.
  3208  //   - project: Identifies the project addressed by this request.
  3209  func (r *DnsKeysService) List(project string, managedZone string) *DnsKeysListCall {
  3210  	c := &DnsKeysListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3211  	c.project = project
  3212  	c.managedZone = managedZone
  3213  	return c
  3214  }
  3215  
  3216  // DigestType sets the optional parameter "digestType": An optional
  3217  // comma-separated list of digest types to compute and display for key signing
  3218  // keys. If omitted, the recommended digest type is computed and displayed.
  3219  func (c *DnsKeysListCall) DigestType(digestType string) *DnsKeysListCall {
  3220  	c.urlParams_.Set("digestType", digestType)
  3221  	return c
  3222  }
  3223  
  3224  // MaxResults sets the optional parameter "maxResults": Maximum number of
  3225  // results to be returned. If unspecified, the server decides how many results
  3226  // to return.
  3227  func (c *DnsKeysListCall) MaxResults(maxResults int64) *DnsKeysListCall {
  3228  	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  3229  	return c
  3230  }
  3231  
  3232  // PageToken sets the optional parameter "pageToken": A tag returned by a
  3233  // previous list request that was truncated. Use this parameter to continue a
  3234  // previous list request.
  3235  func (c *DnsKeysListCall) PageToken(pageToken string) *DnsKeysListCall {
  3236  	c.urlParams_.Set("pageToken", pageToken)
  3237  	return c
  3238  }
  3239  
  3240  // Fields allows partial responses to be retrieved. See
  3241  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3242  // details.
  3243  func (c *DnsKeysListCall) Fields(s ...googleapi.Field) *DnsKeysListCall {
  3244  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3245  	return c
  3246  }
  3247  
  3248  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3249  // object's ETag matches the given value. This is useful for getting updates
  3250  // only after the object has changed since the last request.
  3251  func (c *DnsKeysListCall) IfNoneMatch(entityTag string) *DnsKeysListCall {
  3252  	c.ifNoneMatch_ = entityTag
  3253  	return c
  3254  }
  3255  
  3256  // Context sets the context to be used in this call's Do method.
  3257  func (c *DnsKeysListCall) Context(ctx context.Context) *DnsKeysListCall {
  3258  	c.ctx_ = ctx
  3259  	return c
  3260  }
  3261  
  3262  // Header returns a http.Header that can be modified by the caller to add
  3263  // headers to the request.
  3264  func (c *DnsKeysListCall) Header() http.Header {
  3265  	if c.header_ == nil {
  3266  		c.header_ = make(http.Header)
  3267  	}
  3268  	return c.header_
  3269  }
  3270  
  3271  func (c *DnsKeysListCall) doRequest(alt string) (*http.Response, error) {
  3272  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3273  	if c.ifNoneMatch_ != "" {
  3274  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3275  	}
  3276  	var body io.Reader = nil
  3277  	c.urlParams_.Set("alt", alt)
  3278  	c.urlParams_.Set("prettyPrint", "false")
  3279  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1beta2/projects/{project}/managedZones/{managedZone}/dnsKeys")
  3280  	urls += "?" + c.urlParams_.Encode()
  3281  	req, err := http.NewRequest("GET", urls, body)
  3282  	if err != nil {
  3283  		return nil, err
  3284  	}
  3285  	req.Header = reqHeaders
  3286  	googleapi.Expand(req.URL, map[string]string{
  3287  		"project":     c.project,
  3288  		"managedZone": c.managedZone,
  3289  	})
  3290  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3291  }
  3292  
  3293  // Do executes the "dns.dnsKeys.list" call.
  3294  // Any non-2xx status code is an error. Response headers are in either
  3295  // *DnsKeysListResponse.ServerResponse.Header or (if a response was returned at
  3296  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  3297  // check whether the returned error was because http.StatusNotModified was
  3298  // returned.
  3299  func (c *DnsKeysListCall) Do(opts ...googleapi.CallOption) (*DnsKeysListResponse, error) {
  3300  	gensupport.SetOptions(c.urlParams_, opts...)
  3301  	res, err := c.doRequest("json")
  3302  	if res != nil && res.StatusCode == http.StatusNotModified {
  3303  		if res.Body != nil {
  3304  			res.Body.Close()
  3305  		}
  3306  		return nil, gensupport.WrapError(&googleapi.Error{
  3307  			Code:   res.StatusCode,
  3308  			Header: res.Header,
  3309  		})
  3310  	}
  3311  	if err != nil {
  3312  		return nil, err
  3313  	}
  3314  	defer googleapi.CloseBody(res)
  3315  	if err := googleapi.CheckResponse(res); err != nil {
  3316  		return nil, gensupport.WrapError(err)
  3317  	}
  3318  	ret := &DnsKeysListResponse{
  3319  		ServerResponse: googleapi.ServerResponse{
  3320  			Header:         res.Header,
  3321  			HTTPStatusCode: res.StatusCode,
  3322  		},
  3323  	}
  3324  	target := &ret
  3325  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3326  		return nil, err
  3327  	}
  3328  	return ret, nil
  3329  }
  3330  
  3331  // Pages invokes f for each page of results.
  3332  // A non-nil error returned from f will halt the iteration.
  3333  // The provided context supersedes any context provided to the Context method.
  3334  func (c *DnsKeysListCall) Pages(ctx context.Context, f func(*DnsKeysListResponse) error) error {
  3335  	c.ctx_ = ctx
  3336  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  3337  	for {
  3338  		x, err := c.Do()
  3339  		if err != nil {
  3340  			return err
  3341  		}
  3342  		if err := f(x); err != nil {
  3343  			return err
  3344  		}
  3345  		if x.NextPageToken == "" {
  3346  			return nil
  3347  		}
  3348  		c.PageToken(x.NextPageToken)
  3349  	}
  3350  }
  3351  
  3352  type ManagedZoneOperationsGetCall struct {
  3353  	s            *Service
  3354  	project      string
  3355  	managedZone  string
  3356  	operation    string
  3357  	urlParams_   gensupport.URLParams
  3358  	ifNoneMatch_ string
  3359  	ctx_         context.Context
  3360  	header_      http.Header
  3361  }
  3362  
  3363  // Get: Fetches the representation of an existing Operation.
  3364  //
  3365  //   - managedZone: Identifies the managed zone addressed by this request.
  3366  //   - operation: Identifies the operation addressed by this request (ID of the
  3367  //     operation).
  3368  //   - project: Identifies the project addressed by this request.
  3369  func (r *ManagedZoneOperationsService) Get(project string, managedZone string, operation string) *ManagedZoneOperationsGetCall {
  3370  	c := &ManagedZoneOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3371  	c.project = project
  3372  	c.managedZone = managedZone
  3373  	c.operation = operation
  3374  	return c
  3375  }
  3376  
  3377  // ClientOperationId sets the optional parameter "clientOperationId": For
  3378  // mutating operation requests only. An optional identifier specified by the
  3379  // client. Must be unique for operation resources in the Operations collection.
  3380  func (c *ManagedZoneOperationsGetCall) ClientOperationId(clientOperationId string) *ManagedZoneOperationsGetCall {
  3381  	c.urlParams_.Set("clientOperationId", clientOperationId)
  3382  	return c
  3383  }
  3384  
  3385  // Fields allows partial responses to be retrieved. See
  3386  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3387  // details.
  3388  func (c *ManagedZoneOperationsGetCall) Fields(s ...googleapi.Field) *ManagedZoneOperationsGetCall {
  3389  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3390  	return c
  3391  }
  3392  
  3393  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3394  // object's ETag matches the given value. This is useful for getting updates
  3395  // only after the object has changed since the last request.
  3396  func (c *ManagedZoneOperationsGetCall) IfNoneMatch(entityTag string) *ManagedZoneOperationsGetCall {
  3397  	c.ifNoneMatch_ = entityTag
  3398  	return c
  3399  }
  3400  
  3401  // Context sets the context to be used in this call's Do method.
  3402  func (c *ManagedZoneOperationsGetCall) Context(ctx context.Context) *ManagedZoneOperationsGetCall {
  3403  	c.ctx_ = ctx
  3404  	return c
  3405  }
  3406  
  3407  // Header returns a http.Header that can be modified by the caller to add
  3408  // headers to the request.
  3409  func (c *ManagedZoneOperationsGetCall) Header() http.Header {
  3410  	if c.header_ == nil {
  3411  		c.header_ = make(http.Header)
  3412  	}
  3413  	return c.header_
  3414  }
  3415  
  3416  func (c *ManagedZoneOperationsGetCall) doRequest(alt string) (*http.Response, error) {
  3417  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3418  	if c.ifNoneMatch_ != "" {
  3419  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3420  	}
  3421  	var body io.Reader = nil
  3422  	c.urlParams_.Set("alt", alt)
  3423  	c.urlParams_.Set("prettyPrint", "false")
  3424  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1beta2/projects/{project}/managedZones/{managedZone}/operations/{operation}")
  3425  	urls += "?" + c.urlParams_.Encode()
  3426  	req, err := http.NewRequest("GET", urls, body)
  3427  	if err != nil {
  3428  		return nil, err
  3429  	}
  3430  	req.Header = reqHeaders
  3431  	googleapi.Expand(req.URL, map[string]string{
  3432  		"project":     c.project,
  3433  		"managedZone": c.managedZone,
  3434  		"operation":   c.operation,
  3435  	})
  3436  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3437  }
  3438  
  3439  // Do executes the "dns.managedZoneOperations.get" call.
  3440  // Any non-2xx status code is an error. Response headers are in either
  3441  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  3442  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3443  // whether the returned error was because http.StatusNotModified was returned.
  3444  func (c *ManagedZoneOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  3445  	gensupport.SetOptions(c.urlParams_, opts...)
  3446  	res, err := c.doRequest("json")
  3447  	if res != nil && res.StatusCode == http.StatusNotModified {
  3448  		if res.Body != nil {
  3449  			res.Body.Close()
  3450  		}
  3451  		return nil, gensupport.WrapError(&googleapi.Error{
  3452  			Code:   res.StatusCode,
  3453  			Header: res.Header,
  3454  		})
  3455  	}
  3456  	if err != nil {
  3457  		return nil, err
  3458  	}
  3459  	defer googleapi.CloseBody(res)
  3460  	if err := googleapi.CheckResponse(res); err != nil {
  3461  		return nil, gensupport.WrapError(err)
  3462  	}
  3463  	ret := &Operation{
  3464  		ServerResponse: googleapi.ServerResponse{
  3465  			Header:         res.Header,
  3466  			HTTPStatusCode: res.StatusCode,
  3467  		},
  3468  	}
  3469  	target := &ret
  3470  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3471  		return nil, err
  3472  	}
  3473  	return ret, nil
  3474  }
  3475  
  3476  type ManagedZoneOperationsListCall struct {
  3477  	s            *Service
  3478  	project      string
  3479  	managedZone  string
  3480  	urlParams_   gensupport.URLParams
  3481  	ifNoneMatch_ string
  3482  	ctx_         context.Context
  3483  	header_      http.Header
  3484  }
  3485  
  3486  // List: Enumerates Operations for the given ManagedZone.
  3487  //
  3488  // - managedZone: Identifies the managed zone addressed by this request.
  3489  // - project: Identifies the project addressed by this request.
  3490  func (r *ManagedZoneOperationsService) List(project string, managedZone string) *ManagedZoneOperationsListCall {
  3491  	c := &ManagedZoneOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3492  	c.project = project
  3493  	c.managedZone = managedZone
  3494  	return c
  3495  }
  3496  
  3497  // MaxResults sets the optional parameter "maxResults": Maximum number of
  3498  // results to be returned. If unspecified, the server decides how many results
  3499  // to return.
  3500  func (c *ManagedZoneOperationsListCall) MaxResults(maxResults int64) *ManagedZoneOperationsListCall {
  3501  	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  3502  	return c
  3503  }
  3504  
  3505  // PageToken sets the optional parameter "pageToken": A tag returned by a
  3506  // previous list request that was truncated. Use this parameter to continue a
  3507  // previous list request.
  3508  func (c *ManagedZoneOperationsListCall) PageToken(pageToken string) *ManagedZoneOperationsListCall {
  3509  	c.urlParams_.Set("pageToken", pageToken)
  3510  	return c
  3511  }
  3512  
  3513  // SortBy sets the optional parameter "sortBy": Sorting criterion. The only
  3514  // supported values are START_TIME and ID.
  3515  //
  3516  // Possible values:
  3517  //
  3518  //	"startTime" (default)
  3519  //	"id"
  3520  func (c *ManagedZoneOperationsListCall) SortBy(sortBy string) *ManagedZoneOperationsListCall {
  3521  	c.urlParams_.Set("sortBy", sortBy)
  3522  	return c
  3523  }
  3524  
  3525  // Fields allows partial responses to be retrieved. See
  3526  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3527  // details.
  3528  func (c *ManagedZoneOperationsListCall) Fields(s ...googleapi.Field) *ManagedZoneOperationsListCall {
  3529  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3530  	return c
  3531  }
  3532  
  3533  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3534  // object's ETag matches the given value. This is useful for getting updates
  3535  // only after the object has changed since the last request.
  3536  func (c *ManagedZoneOperationsListCall) IfNoneMatch(entityTag string) *ManagedZoneOperationsListCall {
  3537  	c.ifNoneMatch_ = entityTag
  3538  	return c
  3539  }
  3540  
  3541  // Context sets the context to be used in this call's Do method.
  3542  func (c *ManagedZoneOperationsListCall) Context(ctx context.Context) *ManagedZoneOperationsListCall {
  3543  	c.ctx_ = ctx
  3544  	return c
  3545  }
  3546  
  3547  // Header returns a http.Header that can be modified by the caller to add
  3548  // headers to the request.
  3549  func (c *ManagedZoneOperationsListCall) Header() http.Header {
  3550  	if c.header_ == nil {
  3551  		c.header_ = make(http.Header)
  3552  	}
  3553  	return c.header_
  3554  }
  3555  
  3556  func (c *ManagedZoneOperationsListCall) doRequest(alt string) (*http.Response, error) {
  3557  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3558  	if c.ifNoneMatch_ != "" {
  3559  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3560  	}
  3561  	var body io.Reader = nil
  3562  	c.urlParams_.Set("alt", alt)
  3563  	c.urlParams_.Set("prettyPrint", "false")
  3564  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1beta2/projects/{project}/managedZones/{managedZone}/operations")
  3565  	urls += "?" + c.urlParams_.Encode()
  3566  	req, err := http.NewRequest("GET", urls, body)
  3567  	if err != nil {
  3568  		return nil, err
  3569  	}
  3570  	req.Header = reqHeaders
  3571  	googleapi.Expand(req.URL, map[string]string{
  3572  		"project":     c.project,
  3573  		"managedZone": c.managedZone,
  3574  	})
  3575  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3576  }
  3577  
  3578  // Do executes the "dns.managedZoneOperations.list" call.
  3579  // Any non-2xx status code is an error. Response headers are in either
  3580  // *ManagedZoneOperationsListResponse.ServerResponse.Header or (if a response
  3581  // was returned at all) in error.(*googleapi.Error).Header. Use
  3582  // googleapi.IsNotModified to check whether the returned error was because
  3583  // http.StatusNotModified was returned.
  3584  func (c *ManagedZoneOperationsListCall) Do(opts ...googleapi.CallOption) (*ManagedZoneOperationsListResponse, error) {
  3585  	gensupport.SetOptions(c.urlParams_, opts...)
  3586  	res, err := c.doRequest("json")
  3587  	if res != nil && res.StatusCode == http.StatusNotModified {
  3588  		if res.Body != nil {
  3589  			res.Body.Close()
  3590  		}
  3591  		return nil, gensupport.WrapError(&googleapi.Error{
  3592  			Code:   res.StatusCode,
  3593  			Header: res.Header,
  3594  		})
  3595  	}
  3596  	if err != nil {
  3597  		return nil, err
  3598  	}
  3599  	defer googleapi.CloseBody(res)
  3600  	if err := googleapi.CheckResponse(res); err != nil {
  3601  		return nil, gensupport.WrapError(err)
  3602  	}
  3603  	ret := &ManagedZoneOperationsListResponse{
  3604  		ServerResponse: googleapi.ServerResponse{
  3605  			Header:         res.Header,
  3606  			HTTPStatusCode: res.StatusCode,
  3607  		},
  3608  	}
  3609  	target := &ret
  3610  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3611  		return nil, err
  3612  	}
  3613  	return ret, nil
  3614  }
  3615  
  3616  // Pages invokes f for each page of results.
  3617  // A non-nil error returned from f will halt the iteration.
  3618  // The provided context supersedes any context provided to the Context method.
  3619  func (c *ManagedZoneOperationsListCall) Pages(ctx context.Context, f func(*ManagedZoneOperationsListResponse) error) error {
  3620  	c.ctx_ = ctx
  3621  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  3622  	for {
  3623  		x, err := c.Do()
  3624  		if err != nil {
  3625  			return err
  3626  		}
  3627  		if err := f(x); err != nil {
  3628  			return err
  3629  		}
  3630  		if x.NextPageToken == "" {
  3631  			return nil
  3632  		}
  3633  		c.PageToken(x.NextPageToken)
  3634  	}
  3635  }
  3636  
  3637  type ManagedZonesCreateCall struct {
  3638  	s           *Service
  3639  	project     string
  3640  	managedzone *ManagedZone
  3641  	urlParams_  gensupport.URLParams
  3642  	ctx_        context.Context
  3643  	header_     http.Header
  3644  }
  3645  
  3646  // Create: Creates a new ManagedZone.
  3647  //
  3648  // - project: Identifies the project addressed by this request.
  3649  func (r *ManagedZonesService) Create(project string, managedzone *ManagedZone) *ManagedZonesCreateCall {
  3650  	c := &ManagedZonesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3651  	c.project = project
  3652  	c.managedzone = managedzone
  3653  	return c
  3654  }
  3655  
  3656  // ClientOperationId sets the optional parameter "clientOperationId": For
  3657  // mutating operation requests only. An optional identifier specified by the
  3658  // client. Must be unique for operation resources in the Operations collection.
  3659  func (c *ManagedZonesCreateCall) ClientOperationId(clientOperationId string) *ManagedZonesCreateCall {
  3660  	c.urlParams_.Set("clientOperationId", clientOperationId)
  3661  	return c
  3662  }
  3663  
  3664  // Fields allows partial responses to be retrieved. See
  3665  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3666  // details.
  3667  func (c *ManagedZonesCreateCall) Fields(s ...googleapi.Field) *ManagedZonesCreateCall {
  3668  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3669  	return c
  3670  }
  3671  
  3672  // Context sets the context to be used in this call's Do method.
  3673  func (c *ManagedZonesCreateCall) Context(ctx context.Context) *ManagedZonesCreateCall {
  3674  	c.ctx_ = ctx
  3675  	return c
  3676  }
  3677  
  3678  // Header returns a http.Header that can be modified by the caller to add
  3679  // headers to the request.
  3680  func (c *ManagedZonesCreateCall) Header() http.Header {
  3681  	if c.header_ == nil {
  3682  		c.header_ = make(http.Header)
  3683  	}
  3684  	return c.header_
  3685  }
  3686  
  3687  func (c *ManagedZonesCreateCall) doRequest(alt string) (*http.Response, error) {
  3688  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3689  	var body io.Reader = nil
  3690  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.managedzone)
  3691  	if err != nil {
  3692  		return nil, err
  3693  	}
  3694  	c.urlParams_.Set("alt", alt)
  3695  	c.urlParams_.Set("prettyPrint", "false")
  3696  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1beta2/projects/{project}/managedZones")
  3697  	urls += "?" + c.urlParams_.Encode()
  3698  	req, err := http.NewRequest("POST", urls, body)
  3699  	if err != nil {
  3700  		return nil, err
  3701  	}
  3702  	req.Header = reqHeaders
  3703  	googleapi.Expand(req.URL, map[string]string{
  3704  		"project": c.project,
  3705  	})
  3706  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3707  }
  3708  
  3709  // Do executes the "dns.managedZones.create" call.
  3710  // Any non-2xx status code is an error. Response headers are in either
  3711  // *ManagedZone.ServerResponse.Header or (if a response was returned at all) in
  3712  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3713  // whether the returned error was because http.StatusNotModified was returned.
  3714  func (c *ManagedZonesCreateCall) Do(opts ...googleapi.CallOption) (*ManagedZone, error) {
  3715  	gensupport.SetOptions(c.urlParams_, opts...)
  3716  	res, err := c.doRequest("json")
  3717  	if res != nil && res.StatusCode == http.StatusNotModified {
  3718  		if res.Body != nil {
  3719  			res.Body.Close()
  3720  		}
  3721  		return nil, gensupport.WrapError(&googleapi.Error{
  3722  			Code:   res.StatusCode,
  3723  			Header: res.Header,
  3724  		})
  3725  	}
  3726  	if err != nil {
  3727  		return nil, err
  3728  	}
  3729  	defer googleapi.CloseBody(res)
  3730  	if err := googleapi.CheckResponse(res); err != nil {
  3731  		return nil, gensupport.WrapError(err)
  3732  	}
  3733  	ret := &ManagedZone{
  3734  		ServerResponse: googleapi.ServerResponse{
  3735  			Header:         res.Header,
  3736  			HTTPStatusCode: res.StatusCode,
  3737  		},
  3738  	}
  3739  	target := &ret
  3740  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3741  		return nil, err
  3742  	}
  3743  	return ret, nil
  3744  }
  3745  
  3746  type ManagedZonesDeleteCall struct {
  3747  	s           *Service
  3748  	project     string
  3749  	managedZone string
  3750  	urlParams_  gensupport.URLParams
  3751  	ctx_        context.Context
  3752  	header_     http.Header
  3753  }
  3754  
  3755  // Delete: Deletes a previously created ManagedZone.
  3756  //
  3757  //   - managedZone: Identifies the managed zone addressed by this request. Can be
  3758  //     the managed zone name or ID.
  3759  //   - project: Identifies the project addressed by this request.
  3760  func (r *ManagedZonesService) Delete(project string, managedZone string) *ManagedZonesDeleteCall {
  3761  	c := &ManagedZonesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3762  	c.project = project
  3763  	c.managedZone = managedZone
  3764  	return c
  3765  }
  3766  
  3767  // ClientOperationId sets the optional parameter "clientOperationId": For
  3768  // mutating operation requests only. An optional identifier specified by the
  3769  // client. Must be unique for operation resources in the Operations collection.
  3770  func (c *ManagedZonesDeleteCall) ClientOperationId(clientOperationId string) *ManagedZonesDeleteCall {
  3771  	c.urlParams_.Set("clientOperationId", clientOperationId)
  3772  	return c
  3773  }
  3774  
  3775  // Fields allows partial responses to be retrieved. See
  3776  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3777  // details.
  3778  func (c *ManagedZonesDeleteCall) Fields(s ...googleapi.Field) *ManagedZonesDeleteCall {
  3779  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3780  	return c
  3781  }
  3782  
  3783  // Context sets the context to be used in this call's Do method.
  3784  func (c *ManagedZonesDeleteCall) Context(ctx context.Context) *ManagedZonesDeleteCall {
  3785  	c.ctx_ = ctx
  3786  	return c
  3787  }
  3788  
  3789  // Header returns a http.Header that can be modified by the caller to add
  3790  // headers to the request.
  3791  func (c *ManagedZonesDeleteCall) Header() http.Header {
  3792  	if c.header_ == nil {
  3793  		c.header_ = make(http.Header)
  3794  	}
  3795  	return c.header_
  3796  }
  3797  
  3798  func (c *ManagedZonesDeleteCall) doRequest(alt string) (*http.Response, error) {
  3799  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3800  	var body io.Reader = nil
  3801  	c.urlParams_.Set("alt", alt)
  3802  	c.urlParams_.Set("prettyPrint", "false")
  3803  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1beta2/projects/{project}/managedZones/{managedZone}")
  3804  	urls += "?" + c.urlParams_.Encode()
  3805  	req, err := http.NewRequest("DELETE", urls, body)
  3806  	if err != nil {
  3807  		return nil, err
  3808  	}
  3809  	req.Header = reqHeaders
  3810  	googleapi.Expand(req.URL, map[string]string{
  3811  		"project":     c.project,
  3812  		"managedZone": c.managedZone,
  3813  	})
  3814  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3815  }
  3816  
  3817  // Do executes the "dns.managedZones.delete" call.
  3818  func (c *ManagedZonesDeleteCall) Do(opts ...googleapi.CallOption) error {
  3819  	gensupport.SetOptions(c.urlParams_, opts...)
  3820  	res, err := c.doRequest("json")
  3821  	if err != nil {
  3822  		return err
  3823  	}
  3824  	defer googleapi.CloseBody(res)
  3825  	if err := googleapi.CheckResponse(res); err != nil {
  3826  		return gensupport.WrapError(err)
  3827  	}
  3828  	return nil
  3829  }
  3830  
  3831  type ManagedZonesGetCall struct {
  3832  	s            *Service
  3833  	project      string
  3834  	managedZone  string
  3835  	urlParams_   gensupport.URLParams
  3836  	ifNoneMatch_ string
  3837  	ctx_         context.Context
  3838  	header_      http.Header
  3839  }
  3840  
  3841  // Get: Fetches the representation of an existing ManagedZone.
  3842  //
  3843  //   - managedZone: Identifies the managed zone addressed by this request. Can be
  3844  //     the managed zone name or ID.
  3845  //   - project: Identifies the project addressed by this request.
  3846  func (r *ManagedZonesService) Get(project string, managedZone string) *ManagedZonesGetCall {
  3847  	c := &ManagedZonesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3848  	c.project = project
  3849  	c.managedZone = managedZone
  3850  	return c
  3851  }
  3852  
  3853  // ClientOperationId sets the optional parameter "clientOperationId": For
  3854  // mutating operation requests only. An optional identifier specified by the
  3855  // client. Must be unique for operation resources in the Operations collection.
  3856  func (c *ManagedZonesGetCall) ClientOperationId(clientOperationId string) *ManagedZonesGetCall {
  3857  	c.urlParams_.Set("clientOperationId", clientOperationId)
  3858  	return c
  3859  }
  3860  
  3861  // Fields allows partial responses to be retrieved. See
  3862  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3863  // details.
  3864  func (c *ManagedZonesGetCall) Fields(s ...googleapi.Field) *ManagedZonesGetCall {
  3865  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3866  	return c
  3867  }
  3868  
  3869  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3870  // object's ETag matches the given value. This is useful for getting updates
  3871  // only after the object has changed since the last request.
  3872  func (c *ManagedZonesGetCall) IfNoneMatch(entityTag string) *ManagedZonesGetCall {
  3873  	c.ifNoneMatch_ = entityTag
  3874  	return c
  3875  }
  3876  
  3877  // Context sets the context to be used in this call's Do method.
  3878  func (c *ManagedZonesGetCall) Context(ctx context.Context) *ManagedZonesGetCall {
  3879  	c.ctx_ = ctx
  3880  	return c
  3881  }
  3882  
  3883  // Header returns a http.Header that can be modified by the caller to add
  3884  // headers to the request.
  3885  func (c *ManagedZonesGetCall) Header() http.Header {
  3886  	if c.header_ == nil {
  3887  		c.header_ = make(http.Header)
  3888  	}
  3889  	return c.header_
  3890  }
  3891  
  3892  func (c *ManagedZonesGetCall) doRequest(alt string) (*http.Response, error) {
  3893  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3894  	if c.ifNoneMatch_ != "" {
  3895  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3896  	}
  3897  	var body io.Reader = nil
  3898  	c.urlParams_.Set("alt", alt)
  3899  	c.urlParams_.Set("prettyPrint", "false")
  3900  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1beta2/projects/{project}/managedZones/{managedZone}")
  3901  	urls += "?" + c.urlParams_.Encode()
  3902  	req, err := http.NewRequest("GET", urls, body)
  3903  	if err != nil {
  3904  		return nil, err
  3905  	}
  3906  	req.Header = reqHeaders
  3907  	googleapi.Expand(req.URL, map[string]string{
  3908  		"project":     c.project,
  3909  		"managedZone": c.managedZone,
  3910  	})
  3911  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3912  }
  3913  
  3914  // Do executes the "dns.managedZones.get" call.
  3915  // Any non-2xx status code is an error. Response headers are in either
  3916  // *ManagedZone.ServerResponse.Header or (if a response was returned at all) in
  3917  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3918  // whether the returned error was because http.StatusNotModified was returned.
  3919  func (c *ManagedZonesGetCall) Do(opts ...googleapi.CallOption) (*ManagedZone, error) {
  3920  	gensupport.SetOptions(c.urlParams_, opts...)
  3921  	res, err := c.doRequest("json")
  3922  	if res != nil && res.StatusCode == http.StatusNotModified {
  3923  		if res.Body != nil {
  3924  			res.Body.Close()
  3925  		}
  3926  		return nil, gensupport.WrapError(&googleapi.Error{
  3927  			Code:   res.StatusCode,
  3928  			Header: res.Header,
  3929  		})
  3930  	}
  3931  	if err != nil {
  3932  		return nil, err
  3933  	}
  3934  	defer googleapi.CloseBody(res)
  3935  	if err := googleapi.CheckResponse(res); err != nil {
  3936  		return nil, gensupport.WrapError(err)
  3937  	}
  3938  	ret := &ManagedZone{
  3939  		ServerResponse: googleapi.ServerResponse{
  3940  			Header:         res.Header,
  3941  			HTTPStatusCode: res.StatusCode,
  3942  		},
  3943  	}
  3944  	target := &ret
  3945  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3946  		return nil, err
  3947  	}
  3948  	return ret, nil
  3949  }
  3950  
  3951  type ManagedZonesGetIamPolicyCall struct {
  3952  	s                              *Service
  3953  	resource                       string
  3954  	googleiamv1getiampolicyrequest *GoogleIamV1GetIamPolicyRequest
  3955  	urlParams_                     gensupport.URLParams
  3956  	ctx_                           context.Context
  3957  	header_                        http.Header
  3958  }
  3959  
  3960  // GetIamPolicy: Gets the access control policy for a resource. Returns an
  3961  // empty policy if the resource exists and does not have a policy set.
  3962  //
  3963  //   - resource: REQUIRED: The resource for which the policy is being requested.
  3964  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  3965  //     for the appropriate value for this field.
  3966  func (r *ManagedZonesService) GetIamPolicy(resource string, googleiamv1getiampolicyrequest *GoogleIamV1GetIamPolicyRequest) *ManagedZonesGetIamPolicyCall {
  3967  	c := &ManagedZonesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3968  	c.resource = resource
  3969  	c.googleiamv1getiampolicyrequest = googleiamv1getiampolicyrequest
  3970  	return c
  3971  }
  3972  
  3973  // Fields allows partial responses to be retrieved. See
  3974  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3975  // details.
  3976  func (c *ManagedZonesGetIamPolicyCall) Fields(s ...googleapi.Field) *ManagedZonesGetIamPolicyCall {
  3977  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3978  	return c
  3979  }
  3980  
  3981  // Context sets the context to be used in this call's Do method.
  3982  func (c *ManagedZonesGetIamPolicyCall) Context(ctx context.Context) *ManagedZonesGetIamPolicyCall {
  3983  	c.ctx_ = ctx
  3984  	return c
  3985  }
  3986  
  3987  // Header returns a http.Header that can be modified by the caller to add
  3988  // headers to the request.
  3989  func (c *ManagedZonesGetIamPolicyCall) Header() http.Header {
  3990  	if c.header_ == nil {
  3991  		c.header_ = make(http.Header)
  3992  	}
  3993  	return c.header_
  3994  }
  3995  
  3996  func (c *ManagedZonesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  3997  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3998  	var body io.Reader = nil
  3999  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1getiampolicyrequest)
  4000  	if err != nil {
  4001  		return nil, err
  4002  	}
  4003  	c.urlParams_.Set("alt", alt)
  4004  	c.urlParams_.Set("prettyPrint", "false")
  4005  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1beta2/{+resource}:getIamPolicy")
  4006  	urls += "?" + c.urlParams_.Encode()
  4007  	req, err := http.NewRequest("POST", urls, body)
  4008  	if err != nil {
  4009  		return nil, err
  4010  	}
  4011  	req.Header = reqHeaders
  4012  	googleapi.Expand(req.URL, map[string]string{
  4013  		"resource": c.resource,
  4014  	})
  4015  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4016  }
  4017  
  4018  // Do executes the "dns.managedZones.getIamPolicy" call.
  4019  // Any non-2xx status code is an error. Response headers are in either
  4020  // *GoogleIamV1Policy.ServerResponse.Header or (if a response was returned at
  4021  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  4022  // check whether the returned error was because http.StatusNotModified was
  4023  // returned.
  4024  func (c *ManagedZonesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) {
  4025  	gensupport.SetOptions(c.urlParams_, opts...)
  4026  	res, err := c.doRequest("json")
  4027  	if res != nil && res.StatusCode == http.StatusNotModified {
  4028  		if res.Body != nil {
  4029  			res.Body.Close()
  4030  		}
  4031  		return nil, gensupport.WrapError(&googleapi.Error{
  4032  			Code:   res.StatusCode,
  4033  			Header: res.Header,
  4034  		})
  4035  	}
  4036  	if err != nil {
  4037  		return nil, err
  4038  	}
  4039  	defer googleapi.CloseBody(res)
  4040  	if err := googleapi.CheckResponse(res); err != nil {
  4041  		return nil, gensupport.WrapError(err)
  4042  	}
  4043  	ret := &GoogleIamV1Policy{
  4044  		ServerResponse: googleapi.ServerResponse{
  4045  			Header:         res.Header,
  4046  			HTTPStatusCode: res.StatusCode,
  4047  		},
  4048  	}
  4049  	target := &ret
  4050  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4051  		return nil, err
  4052  	}
  4053  	return ret, nil
  4054  }
  4055  
  4056  type ManagedZonesListCall struct {
  4057  	s            *Service
  4058  	project      string
  4059  	urlParams_   gensupport.URLParams
  4060  	ifNoneMatch_ string
  4061  	ctx_         context.Context
  4062  	header_      http.Header
  4063  }
  4064  
  4065  // List: Enumerates ManagedZones that have been created but not yet deleted.
  4066  //
  4067  // - project: Identifies the project addressed by this request.
  4068  func (r *ManagedZonesService) List(project string) *ManagedZonesListCall {
  4069  	c := &ManagedZonesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4070  	c.project = project
  4071  	return c
  4072  }
  4073  
  4074  // DnsName sets the optional parameter "dnsName": Restricts the list to return
  4075  // only zones with this domain name.
  4076  func (c *ManagedZonesListCall) DnsName(dnsName string) *ManagedZonesListCall {
  4077  	c.urlParams_.Set("dnsName", dnsName)
  4078  	return c
  4079  }
  4080  
  4081  // MaxResults sets the optional parameter "maxResults": Maximum number of
  4082  // results to be returned. If unspecified, the server decides how many results
  4083  // to return.
  4084  func (c *ManagedZonesListCall) MaxResults(maxResults int64) *ManagedZonesListCall {
  4085  	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  4086  	return c
  4087  }
  4088  
  4089  // PageToken sets the optional parameter "pageToken": A tag returned by a
  4090  // previous list request that was truncated. Use this parameter to continue a
  4091  // previous list request.
  4092  func (c *ManagedZonesListCall) PageToken(pageToken string) *ManagedZonesListCall {
  4093  	c.urlParams_.Set("pageToken", pageToken)
  4094  	return c
  4095  }
  4096  
  4097  // Fields allows partial responses to be retrieved. See
  4098  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4099  // details.
  4100  func (c *ManagedZonesListCall) Fields(s ...googleapi.Field) *ManagedZonesListCall {
  4101  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4102  	return c
  4103  }
  4104  
  4105  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4106  // object's ETag matches the given value. This is useful for getting updates
  4107  // only after the object has changed since the last request.
  4108  func (c *ManagedZonesListCall) IfNoneMatch(entityTag string) *ManagedZonesListCall {
  4109  	c.ifNoneMatch_ = entityTag
  4110  	return c
  4111  }
  4112  
  4113  // Context sets the context to be used in this call's Do method.
  4114  func (c *ManagedZonesListCall) Context(ctx context.Context) *ManagedZonesListCall {
  4115  	c.ctx_ = ctx
  4116  	return c
  4117  }
  4118  
  4119  // Header returns a http.Header that can be modified by the caller to add
  4120  // headers to the request.
  4121  func (c *ManagedZonesListCall) Header() http.Header {
  4122  	if c.header_ == nil {
  4123  		c.header_ = make(http.Header)
  4124  	}
  4125  	return c.header_
  4126  }
  4127  
  4128  func (c *ManagedZonesListCall) doRequest(alt string) (*http.Response, error) {
  4129  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4130  	if c.ifNoneMatch_ != "" {
  4131  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4132  	}
  4133  	var body io.Reader = nil
  4134  	c.urlParams_.Set("alt", alt)
  4135  	c.urlParams_.Set("prettyPrint", "false")
  4136  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1beta2/projects/{project}/managedZones")
  4137  	urls += "?" + c.urlParams_.Encode()
  4138  	req, err := http.NewRequest("GET", urls, body)
  4139  	if err != nil {
  4140  		return nil, err
  4141  	}
  4142  	req.Header = reqHeaders
  4143  	googleapi.Expand(req.URL, map[string]string{
  4144  		"project": c.project,
  4145  	})
  4146  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4147  }
  4148  
  4149  // Do executes the "dns.managedZones.list" call.
  4150  // Any non-2xx status code is an error. Response headers are in either
  4151  // *ManagedZonesListResponse.ServerResponse.Header or (if a response was
  4152  // returned at all) in error.(*googleapi.Error).Header. Use
  4153  // googleapi.IsNotModified to check whether the returned error was because
  4154  // http.StatusNotModified was returned.
  4155  func (c *ManagedZonesListCall) Do(opts ...googleapi.CallOption) (*ManagedZonesListResponse, error) {
  4156  	gensupport.SetOptions(c.urlParams_, opts...)
  4157  	res, err := c.doRequest("json")
  4158  	if res != nil && res.StatusCode == http.StatusNotModified {
  4159  		if res.Body != nil {
  4160  			res.Body.Close()
  4161  		}
  4162  		return nil, gensupport.WrapError(&googleapi.Error{
  4163  			Code:   res.StatusCode,
  4164  			Header: res.Header,
  4165  		})
  4166  	}
  4167  	if err != nil {
  4168  		return nil, err
  4169  	}
  4170  	defer googleapi.CloseBody(res)
  4171  	if err := googleapi.CheckResponse(res); err != nil {
  4172  		return nil, gensupport.WrapError(err)
  4173  	}
  4174  	ret := &ManagedZonesListResponse{
  4175  		ServerResponse: googleapi.ServerResponse{
  4176  			Header:         res.Header,
  4177  			HTTPStatusCode: res.StatusCode,
  4178  		},
  4179  	}
  4180  	target := &ret
  4181  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4182  		return nil, err
  4183  	}
  4184  	return ret, nil
  4185  }
  4186  
  4187  // Pages invokes f for each page of results.
  4188  // A non-nil error returned from f will halt the iteration.
  4189  // The provided context supersedes any context provided to the Context method.
  4190  func (c *ManagedZonesListCall) Pages(ctx context.Context, f func(*ManagedZonesListResponse) error) error {
  4191  	c.ctx_ = ctx
  4192  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  4193  	for {
  4194  		x, err := c.Do()
  4195  		if err != nil {
  4196  			return err
  4197  		}
  4198  		if err := f(x); err != nil {
  4199  			return err
  4200  		}
  4201  		if x.NextPageToken == "" {
  4202  			return nil
  4203  		}
  4204  		c.PageToken(x.NextPageToken)
  4205  	}
  4206  }
  4207  
  4208  type ManagedZonesPatchCall struct {
  4209  	s           *Service
  4210  	project     string
  4211  	managedZone string
  4212  	managedzone *ManagedZone
  4213  	urlParams_  gensupport.URLParams
  4214  	ctx_        context.Context
  4215  	header_     http.Header
  4216  }
  4217  
  4218  // Patch: Applies a partial update to an existing ManagedZone.
  4219  //
  4220  //   - managedZone: Identifies the managed zone addressed by this request. Can be
  4221  //     the managed zone name or ID.
  4222  //   - project: Identifies the project addressed by this request.
  4223  func (r *ManagedZonesService) Patch(project string, managedZone string, managedzone *ManagedZone) *ManagedZonesPatchCall {
  4224  	c := &ManagedZonesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4225  	c.project = project
  4226  	c.managedZone = managedZone
  4227  	c.managedzone = managedzone
  4228  	return c
  4229  }
  4230  
  4231  // ClientOperationId sets the optional parameter "clientOperationId": For
  4232  // mutating operation requests only. An optional identifier specified by the
  4233  // client. Must be unique for operation resources in the Operations collection.
  4234  func (c *ManagedZonesPatchCall) ClientOperationId(clientOperationId string) *ManagedZonesPatchCall {
  4235  	c.urlParams_.Set("clientOperationId", clientOperationId)
  4236  	return c
  4237  }
  4238  
  4239  // Fields allows partial responses to be retrieved. See
  4240  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4241  // details.
  4242  func (c *ManagedZonesPatchCall) Fields(s ...googleapi.Field) *ManagedZonesPatchCall {
  4243  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4244  	return c
  4245  }
  4246  
  4247  // Context sets the context to be used in this call's Do method.
  4248  func (c *ManagedZonesPatchCall) Context(ctx context.Context) *ManagedZonesPatchCall {
  4249  	c.ctx_ = ctx
  4250  	return c
  4251  }
  4252  
  4253  // Header returns a http.Header that can be modified by the caller to add
  4254  // headers to the request.
  4255  func (c *ManagedZonesPatchCall) Header() http.Header {
  4256  	if c.header_ == nil {
  4257  		c.header_ = make(http.Header)
  4258  	}
  4259  	return c.header_
  4260  }
  4261  
  4262  func (c *ManagedZonesPatchCall) doRequest(alt string) (*http.Response, error) {
  4263  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4264  	var body io.Reader = nil
  4265  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.managedzone)
  4266  	if err != nil {
  4267  		return nil, err
  4268  	}
  4269  	c.urlParams_.Set("alt", alt)
  4270  	c.urlParams_.Set("prettyPrint", "false")
  4271  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1beta2/projects/{project}/managedZones/{managedZone}")
  4272  	urls += "?" + c.urlParams_.Encode()
  4273  	req, err := http.NewRequest("PATCH", urls, body)
  4274  	if err != nil {
  4275  		return nil, err
  4276  	}
  4277  	req.Header = reqHeaders
  4278  	googleapi.Expand(req.URL, map[string]string{
  4279  		"project":     c.project,
  4280  		"managedZone": c.managedZone,
  4281  	})
  4282  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4283  }
  4284  
  4285  // Do executes the "dns.managedZones.patch" call.
  4286  // Any non-2xx status code is an error. Response headers are in either
  4287  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  4288  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4289  // whether the returned error was because http.StatusNotModified was returned.
  4290  func (c *ManagedZonesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  4291  	gensupport.SetOptions(c.urlParams_, opts...)
  4292  	res, err := c.doRequest("json")
  4293  	if res != nil && res.StatusCode == http.StatusNotModified {
  4294  		if res.Body != nil {
  4295  			res.Body.Close()
  4296  		}
  4297  		return nil, gensupport.WrapError(&googleapi.Error{
  4298  			Code:   res.StatusCode,
  4299  			Header: res.Header,
  4300  		})
  4301  	}
  4302  	if err != nil {
  4303  		return nil, err
  4304  	}
  4305  	defer googleapi.CloseBody(res)
  4306  	if err := googleapi.CheckResponse(res); err != nil {
  4307  		return nil, gensupport.WrapError(err)
  4308  	}
  4309  	ret := &Operation{
  4310  		ServerResponse: googleapi.ServerResponse{
  4311  			Header:         res.Header,
  4312  			HTTPStatusCode: res.StatusCode,
  4313  		},
  4314  	}
  4315  	target := &ret
  4316  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4317  		return nil, err
  4318  	}
  4319  	return ret, nil
  4320  }
  4321  
  4322  type ManagedZonesSetIamPolicyCall struct {
  4323  	s                              *Service
  4324  	resource                       string
  4325  	googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest
  4326  	urlParams_                     gensupport.URLParams
  4327  	ctx_                           context.Context
  4328  	header_                        http.Header
  4329  }
  4330  
  4331  // SetIamPolicy: Sets the access control policy on the specified resource.
  4332  // Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`,
  4333  // and `PERMISSION_DENIED` errors.
  4334  //
  4335  //   - resource: REQUIRED: The resource for which the policy is being specified.
  4336  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  4337  //     for the appropriate value for this field.
  4338  func (r *ManagedZonesService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ManagedZonesSetIamPolicyCall {
  4339  	c := &ManagedZonesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4340  	c.resource = resource
  4341  	c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest
  4342  	return c
  4343  }
  4344  
  4345  // Fields allows partial responses to be retrieved. See
  4346  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4347  // details.
  4348  func (c *ManagedZonesSetIamPolicyCall) Fields(s ...googleapi.Field) *ManagedZonesSetIamPolicyCall {
  4349  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4350  	return c
  4351  }
  4352  
  4353  // Context sets the context to be used in this call's Do method.
  4354  func (c *ManagedZonesSetIamPolicyCall) Context(ctx context.Context) *ManagedZonesSetIamPolicyCall {
  4355  	c.ctx_ = ctx
  4356  	return c
  4357  }
  4358  
  4359  // Header returns a http.Header that can be modified by the caller to add
  4360  // headers to the request.
  4361  func (c *ManagedZonesSetIamPolicyCall) Header() http.Header {
  4362  	if c.header_ == nil {
  4363  		c.header_ = make(http.Header)
  4364  	}
  4365  	return c.header_
  4366  }
  4367  
  4368  func (c *ManagedZonesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  4369  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4370  	var body io.Reader = nil
  4371  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1setiampolicyrequest)
  4372  	if err != nil {
  4373  		return nil, err
  4374  	}
  4375  	c.urlParams_.Set("alt", alt)
  4376  	c.urlParams_.Set("prettyPrint", "false")
  4377  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1beta2/{+resource}:setIamPolicy")
  4378  	urls += "?" + c.urlParams_.Encode()
  4379  	req, err := http.NewRequest("POST", urls, body)
  4380  	if err != nil {
  4381  		return nil, err
  4382  	}
  4383  	req.Header = reqHeaders
  4384  	googleapi.Expand(req.URL, map[string]string{
  4385  		"resource": c.resource,
  4386  	})
  4387  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4388  }
  4389  
  4390  // Do executes the "dns.managedZones.setIamPolicy" call.
  4391  // Any non-2xx status code is an error. Response headers are in either
  4392  // *GoogleIamV1Policy.ServerResponse.Header or (if a response was returned at
  4393  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  4394  // check whether the returned error was because http.StatusNotModified was
  4395  // returned.
  4396  func (c *ManagedZonesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) {
  4397  	gensupport.SetOptions(c.urlParams_, opts...)
  4398  	res, err := c.doRequest("json")
  4399  	if res != nil && res.StatusCode == http.StatusNotModified {
  4400  		if res.Body != nil {
  4401  			res.Body.Close()
  4402  		}
  4403  		return nil, gensupport.WrapError(&googleapi.Error{
  4404  			Code:   res.StatusCode,
  4405  			Header: res.Header,
  4406  		})
  4407  	}
  4408  	if err != nil {
  4409  		return nil, err
  4410  	}
  4411  	defer googleapi.CloseBody(res)
  4412  	if err := googleapi.CheckResponse(res); err != nil {
  4413  		return nil, gensupport.WrapError(err)
  4414  	}
  4415  	ret := &GoogleIamV1Policy{
  4416  		ServerResponse: googleapi.ServerResponse{
  4417  			Header:         res.Header,
  4418  			HTTPStatusCode: res.StatusCode,
  4419  		},
  4420  	}
  4421  	target := &ret
  4422  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4423  		return nil, err
  4424  	}
  4425  	return ret, nil
  4426  }
  4427  
  4428  type ManagedZonesTestIamPermissionsCall struct {
  4429  	s                                    *Service
  4430  	resource                             string
  4431  	googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest
  4432  	urlParams_                           gensupport.URLParams
  4433  	ctx_                                 context.Context
  4434  	header_                              http.Header
  4435  }
  4436  
  4437  // TestIamPermissions: Returns permissions that a caller has on the specified
  4438  // resource. If the resource does not exist, this returns an empty set of
  4439  // permissions, not a `NOT_FOUND` error. Note: This operation is designed to be
  4440  // used for building permission-aware UIs and command-line tools, not for
  4441  // authorization checking. This operation may "fail open" without warning.
  4442  //
  4443  //   - resource: REQUIRED: The resource for which the policy detail is being
  4444  //     requested. See Resource names
  4445  //     (https://cloud.google.com/apis/design/resource_names) for the appropriate
  4446  //     value for this field.
  4447  func (r *ManagedZonesService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ManagedZonesTestIamPermissionsCall {
  4448  	c := &ManagedZonesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4449  	c.resource = resource
  4450  	c.googleiamv1testiampermissionsrequest = googleiamv1testiampermissionsrequest
  4451  	return c
  4452  }
  4453  
  4454  // Fields allows partial responses to be retrieved. See
  4455  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4456  // details.
  4457  func (c *ManagedZonesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ManagedZonesTestIamPermissionsCall {
  4458  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4459  	return c
  4460  }
  4461  
  4462  // Context sets the context to be used in this call's Do method.
  4463  func (c *ManagedZonesTestIamPermissionsCall) Context(ctx context.Context) *ManagedZonesTestIamPermissionsCall {
  4464  	c.ctx_ = ctx
  4465  	return c
  4466  }
  4467  
  4468  // Header returns a http.Header that can be modified by the caller to add
  4469  // headers to the request.
  4470  func (c *ManagedZonesTestIamPermissionsCall) Header() http.Header {
  4471  	if c.header_ == nil {
  4472  		c.header_ = make(http.Header)
  4473  	}
  4474  	return c.header_
  4475  }
  4476  
  4477  func (c *ManagedZonesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
  4478  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4479  	var body io.Reader = nil
  4480  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1testiampermissionsrequest)
  4481  	if err != nil {
  4482  		return nil, err
  4483  	}
  4484  	c.urlParams_.Set("alt", alt)
  4485  	c.urlParams_.Set("prettyPrint", "false")
  4486  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1beta2/{+resource}:testIamPermissions")
  4487  	urls += "?" + c.urlParams_.Encode()
  4488  	req, err := http.NewRequest("POST", urls, body)
  4489  	if err != nil {
  4490  		return nil, err
  4491  	}
  4492  	req.Header = reqHeaders
  4493  	googleapi.Expand(req.URL, map[string]string{
  4494  		"resource": c.resource,
  4495  	})
  4496  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4497  }
  4498  
  4499  // Do executes the "dns.managedZones.testIamPermissions" call.
  4500  // Any non-2xx status code is an error. Response headers are in either
  4501  // *GoogleIamV1TestIamPermissionsResponse.ServerResponse.Header or (if a
  4502  // response was returned at all) in error.(*googleapi.Error).Header. Use
  4503  // googleapi.IsNotModified to check whether the returned error was because
  4504  // http.StatusNotModified was returned.
  4505  func (c *ManagedZonesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) {
  4506  	gensupport.SetOptions(c.urlParams_, opts...)
  4507  	res, err := c.doRequest("json")
  4508  	if res != nil && res.StatusCode == http.StatusNotModified {
  4509  		if res.Body != nil {
  4510  			res.Body.Close()
  4511  		}
  4512  		return nil, gensupport.WrapError(&googleapi.Error{
  4513  			Code:   res.StatusCode,
  4514  			Header: res.Header,
  4515  		})
  4516  	}
  4517  	if err != nil {
  4518  		return nil, err
  4519  	}
  4520  	defer googleapi.CloseBody(res)
  4521  	if err := googleapi.CheckResponse(res); err != nil {
  4522  		return nil, gensupport.WrapError(err)
  4523  	}
  4524  	ret := &GoogleIamV1TestIamPermissionsResponse{
  4525  		ServerResponse: googleapi.ServerResponse{
  4526  			Header:         res.Header,
  4527  			HTTPStatusCode: res.StatusCode,
  4528  		},
  4529  	}
  4530  	target := &ret
  4531  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4532  		return nil, err
  4533  	}
  4534  	return ret, nil
  4535  }
  4536  
  4537  type ManagedZonesUpdateCall struct {
  4538  	s           *Service
  4539  	project     string
  4540  	managedZone string
  4541  	managedzone *ManagedZone
  4542  	urlParams_  gensupport.URLParams
  4543  	ctx_        context.Context
  4544  	header_     http.Header
  4545  }
  4546  
  4547  // Update: Updates an existing ManagedZone.
  4548  //
  4549  //   - managedZone: Identifies the managed zone addressed by this request. Can be
  4550  //     the managed zone name or ID.
  4551  //   - project: Identifies the project addressed by this request.
  4552  func (r *ManagedZonesService) Update(project string, managedZone string, managedzone *ManagedZone) *ManagedZonesUpdateCall {
  4553  	c := &ManagedZonesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4554  	c.project = project
  4555  	c.managedZone = managedZone
  4556  	c.managedzone = managedzone
  4557  	return c
  4558  }
  4559  
  4560  // ClientOperationId sets the optional parameter "clientOperationId": For
  4561  // mutating operation requests only. An optional identifier specified by the
  4562  // client. Must be unique for operation resources in the Operations collection.
  4563  func (c *ManagedZonesUpdateCall) ClientOperationId(clientOperationId string) *ManagedZonesUpdateCall {
  4564  	c.urlParams_.Set("clientOperationId", clientOperationId)
  4565  	return c
  4566  }
  4567  
  4568  // Fields allows partial responses to be retrieved. See
  4569  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4570  // details.
  4571  func (c *ManagedZonesUpdateCall) Fields(s ...googleapi.Field) *ManagedZonesUpdateCall {
  4572  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4573  	return c
  4574  }
  4575  
  4576  // Context sets the context to be used in this call's Do method.
  4577  func (c *ManagedZonesUpdateCall) Context(ctx context.Context) *ManagedZonesUpdateCall {
  4578  	c.ctx_ = ctx
  4579  	return c
  4580  }
  4581  
  4582  // Header returns a http.Header that can be modified by the caller to add
  4583  // headers to the request.
  4584  func (c *ManagedZonesUpdateCall) Header() http.Header {
  4585  	if c.header_ == nil {
  4586  		c.header_ = make(http.Header)
  4587  	}
  4588  	return c.header_
  4589  }
  4590  
  4591  func (c *ManagedZonesUpdateCall) doRequest(alt string) (*http.Response, error) {
  4592  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4593  	var body io.Reader = nil
  4594  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.managedzone)
  4595  	if err != nil {
  4596  		return nil, err
  4597  	}
  4598  	c.urlParams_.Set("alt", alt)
  4599  	c.urlParams_.Set("prettyPrint", "false")
  4600  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1beta2/projects/{project}/managedZones/{managedZone}")
  4601  	urls += "?" + c.urlParams_.Encode()
  4602  	req, err := http.NewRequest("PUT", urls, body)
  4603  	if err != nil {
  4604  		return nil, err
  4605  	}
  4606  	req.Header = reqHeaders
  4607  	googleapi.Expand(req.URL, map[string]string{
  4608  		"project":     c.project,
  4609  		"managedZone": c.managedZone,
  4610  	})
  4611  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4612  }
  4613  
  4614  // Do executes the "dns.managedZones.update" call.
  4615  // Any non-2xx status code is an error. Response headers are in either
  4616  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  4617  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4618  // whether the returned error was because http.StatusNotModified was returned.
  4619  func (c *ManagedZonesUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  4620  	gensupport.SetOptions(c.urlParams_, opts...)
  4621  	res, err := c.doRequest("json")
  4622  	if res != nil && res.StatusCode == http.StatusNotModified {
  4623  		if res.Body != nil {
  4624  			res.Body.Close()
  4625  		}
  4626  		return nil, gensupport.WrapError(&googleapi.Error{
  4627  			Code:   res.StatusCode,
  4628  			Header: res.Header,
  4629  		})
  4630  	}
  4631  	if err != nil {
  4632  		return nil, err
  4633  	}
  4634  	defer googleapi.CloseBody(res)
  4635  	if err := googleapi.CheckResponse(res); err != nil {
  4636  		return nil, gensupport.WrapError(err)
  4637  	}
  4638  	ret := &Operation{
  4639  		ServerResponse: googleapi.ServerResponse{
  4640  			Header:         res.Header,
  4641  			HTTPStatusCode: res.StatusCode,
  4642  		},
  4643  	}
  4644  	target := &ret
  4645  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4646  		return nil, err
  4647  	}
  4648  	return ret, nil
  4649  }
  4650  
  4651  type PoliciesCreateCall struct {
  4652  	s          *Service
  4653  	project    string
  4654  	policy     *Policy
  4655  	urlParams_ gensupport.URLParams
  4656  	ctx_       context.Context
  4657  	header_    http.Header
  4658  }
  4659  
  4660  // Create: Creates a new Policy.
  4661  //
  4662  // - project: Identifies the project addressed by this request.
  4663  func (r *PoliciesService) Create(project string, policy *Policy) *PoliciesCreateCall {
  4664  	c := &PoliciesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4665  	c.project = project
  4666  	c.policy = policy
  4667  	return c
  4668  }
  4669  
  4670  // ClientOperationId sets the optional parameter "clientOperationId": For
  4671  // mutating operation requests only. An optional identifier specified by the
  4672  // client. Must be unique for operation resources in the Operations collection.
  4673  func (c *PoliciesCreateCall) ClientOperationId(clientOperationId string) *PoliciesCreateCall {
  4674  	c.urlParams_.Set("clientOperationId", clientOperationId)
  4675  	return c
  4676  }
  4677  
  4678  // Fields allows partial responses to be retrieved. See
  4679  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4680  // details.
  4681  func (c *PoliciesCreateCall) Fields(s ...googleapi.Field) *PoliciesCreateCall {
  4682  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4683  	return c
  4684  }
  4685  
  4686  // Context sets the context to be used in this call's Do method.
  4687  func (c *PoliciesCreateCall) Context(ctx context.Context) *PoliciesCreateCall {
  4688  	c.ctx_ = ctx
  4689  	return c
  4690  }
  4691  
  4692  // Header returns a http.Header that can be modified by the caller to add
  4693  // headers to the request.
  4694  func (c *PoliciesCreateCall) Header() http.Header {
  4695  	if c.header_ == nil {
  4696  		c.header_ = make(http.Header)
  4697  	}
  4698  	return c.header_
  4699  }
  4700  
  4701  func (c *PoliciesCreateCall) doRequest(alt string) (*http.Response, error) {
  4702  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4703  	var body io.Reader = nil
  4704  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.policy)
  4705  	if err != nil {
  4706  		return nil, err
  4707  	}
  4708  	c.urlParams_.Set("alt", alt)
  4709  	c.urlParams_.Set("prettyPrint", "false")
  4710  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1beta2/projects/{project}/policies")
  4711  	urls += "?" + c.urlParams_.Encode()
  4712  	req, err := http.NewRequest("POST", urls, body)
  4713  	if err != nil {
  4714  		return nil, err
  4715  	}
  4716  	req.Header = reqHeaders
  4717  	googleapi.Expand(req.URL, map[string]string{
  4718  		"project": c.project,
  4719  	})
  4720  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4721  }
  4722  
  4723  // Do executes the "dns.policies.create" call.
  4724  // Any non-2xx status code is an error. Response headers are in either
  4725  // *Policy.ServerResponse.Header or (if a response was returned at all) in
  4726  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4727  // whether the returned error was because http.StatusNotModified was returned.
  4728  func (c *PoliciesCreateCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  4729  	gensupport.SetOptions(c.urlParams_, opts...)
  4730  	res, err := c.doRequest("json")
  4731  	if res != nil && res.StatusCode == http.StatusNotModified {
  4732  		if res.Body != nil {
  4733  			res.Body.Close()
  4734  		}
  4735  		return nil, gensupport.WrapError(&googleapi.Error{
  4736  			Code:   res.StatusCode,
  4737  			Header: res.Header,
  4738  		})
  4739  	}
  4740  	if err != nil {
  4741  		return nil, err
  4742  	}
  4743  	defer googleapi.CloseBody(res)
  4744  	if err := googleapi.CheckResponse(res); err != nil {
  4745  		return nil, gensupport.WrapError(err)
  4746  	}
  4747  	ret := &Policy{
  4748  		ServerResponse: googleapi.ServerResponse{
  4749  			Header:         res.Header,
  4750  			HTTPStatusCode: res.StatusCode,
  4751  		},
  4752  	}
  4753  	target := &ret
  4754  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4755  		return nil, err
  4756  	}
  4757  	return ret, nil
  4758  }
  4759  
  4760  type PoliciesDeleteCall struct {
  4761  	s          *Service
  4762  	project    string
  4763  	policy     string
  4764  	urlParams_ gensupport.URLParams
  4765  	ctx_       context.Context
  4766  	header_    http.Header
  4767  }
  4768  
  4769  // Delete: Deletes a previously created Policy. Fails if the policy is still
  4770  // being referenced by a network.
  4771  //
  4772  // - policy: User given friendly name of the policy addressed by this request.
  4773  // - project: Identifies the project addressed by this request.
  4774  func (r *PoliciesService) Delete(project string, policy string) *PoliciesDeleteCall {
  4775  	c := &PoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4776  	c.project = project
  4777  	c.policy = policy
  4778  	return c
  4779  }
  4780  
  4781  // ClientOperationId sets the optional parameter "clientOperationId": For
  4782  // mutating operation requests only. An optional identifier specified by the
  4783  // client. Must be unique for operation resources in the Operations collection.
  4784  func (c *PoliciesDeleteCall) ClientOperationId(clientOperationId string) *PoliciesDeleteCall {
  4785  	c.urlParams_.Set("clientOperationId", clientOperationId)
  4786  	return c
  4787  }
  4788  
  4789  // Fields allows partial responses to be retrieved. See
  4790  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4791  // details.
  4792  func (c *PoliciesDeleteCall) Fields(s ...googleapi.Field) *PoliciesDeleteCall {
  4793  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4794  	return c
  4795  }
  4796  
  4797  // Context sets the context to be used in this call's Do method.
  4798  func (c *PoliciesDeleteCall) Context(ctx context.Context) *PoliciesDeleteCall {
  4799  	c.ctx_ = ctx
  4800  	return c
  4801  }
  4802  
  4803  // Header returns a http.Header that can be modified by the caller to add
  4804  // headers to the request.
  4805  func (c *PoliciesDeleteCall) Header() http.Header {
  4806  	if c.header_ == nil {
  4807  		c.header_ = make(http.Header)
  4808  	}
  4809  	return c.header_
  4810  }
  4811  
  4812  func (c *PoliciesDeleteCall) doRequest(alt string) (*http.Response, error) {
  4813  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4814  	var body io.Reader = nil
  4815  	c.urlParams_.Set("alt", alt)
  4816  	c.urlParams_.Set("prettyPrint", "false")
  4817  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1beta2/projects/{project}/policies/{policy}")
  4818  	urls += "?" + c.urlParams_.Encode()
  4819  	req, err := http.NewRequest("DELETE", urls, body)
  4820  	if err != nil {
  4821  		return nil, err
  4822  	}
  4823  	req.Header = reqHeaders
  4824  	googleapi.Expand(req.URL, map[string]string{
  4825  		"project": c.project,
  4826  		"policy":  c.policy,
  4827  	})
  4828  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4829  }
  4830  
  4831  // Do executes the "dns.policies.delete" call.
  4832  func (c *PoliciesDeleteCall) Do(opts ...googleapi.CallOption) error {
  4833  	gensupport.SetOptions(c.urlParams_, opts...)
  4834  	res, err := c.doRequest("json")
  4835  	if err != nil {
  4836  		return err
  4837  	}
  4838  	defer googleapi.CloseBody(res)
  4839  	if err := googleapi.CheckResponse(res); err != nil {
  4840  		return gensupport.WrapError(err)
  4841  	}
  4842  	return nil
  4843  }
  4844  
  4845  type PoliciesGetCall struct {
  4846  	s            *Service
  4847  	project      string
  4848  	policy       string
  4849  	urlParams_   gensupport.URLParams
  4850  	ifNoneMatch_ string
  4851  	ctx_         context.Context
  4852  	header_      http.Header
  4853  }
  4854  
  4855  // Get: Fetches the representation of an existing Policy.
  4856  //
  4857  // - policy: User given friendly name of the policy addressed by this request.
  4858  // - project: Identifies the project addressed by this request.
  4859  func (r *PoliciesService) Get(project string, policy string) *PoliciesGetCall {
  4860  	c := &PoliciesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4861  	c.project = project
  4862  	c.policy = policy
  4863  	return c
  4864  }
  4865  
  4866  // ClientOperationId sets the optional parameter "clientOperationId": For
  4867  // mutating operation requests only. An optional identifier specified by the
  4868  // client. Must be unique for operation resources in the Operations collection.
  4869  func (c *PoliciesGetCall) ClientOperationId(clientOperationId string) *PoliciesGetCall {
  4870  	c.urlParams_.Set("clientOperationId", clientOperationId)
  4871  	return c
  4872  }
  4873  
  4874  // Fields allows partial responses to be retrieved. See
  4875  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4876  // details.
  4877  func (c *PoliciesGetCall) Fields(s ...googleapi.Field) *PoliciesGetCall {
  4878  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4879  	return c
  4880  }
  4881  
  4882  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4883  // object's ETag matches the given value. This is useful for getting updates
  4884  // only after the object has changed since the last request.
  4885  func (c *PoliciesGetCall) IfNoneMatch(entityTag string) *PoliciesGetCall {
  4886  	c.ifNoneMatch_ = entityTag
  4887  	return c
  4888  }
  4889  
  4890  // Context sets the context to be used in this call's Do method.
  4891  func (c *PoliciesGetCall) Context(ctx context.Context) *PoliciesGetCall {
  4892  	c.ctx_ = ctx
  4893  	return c
  4894  }
  4895  
  4896  // Header returns a http.Header that can be modified by the caller to add
  4897  // headers to the request.
  4898  func (c *PoliciesGetCall) Header() http.Header {
  4899  	if c.header_ == nil {
  4900  		c.header_ = make(http.Header)
  4901  	}
  4902  	return c.header_
  4903  }
  4904  
  4905  func (c *PoliciesGetCall) doRequest(alt string) (*http.Response, error) {
  4906  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4907  	if c.ifNoneMatch_ != "" {
  4908  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4909  	}
  4910  	var body io.Reader = nil
  4911  	c.urlParams_.Set("alt", alt)
  4912  	c.urlParams_.Set("prettyPrint", "false")
  4913  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1beta2/projects/{project}/policies/{policy}")
  4914  	urls += "?" + c.urlParams_.Encode()
  4915  	req, err := http.NewRequest("GET", urls, body)
  4916  	if err != nil {
  4917  		return nil, err
  4918  	}
  4919  	req.Header = reqHeaders
  4920  	googleapi.Expand(req.URL, map[string]string{
  4921  		"project": c.project,
  4922  		"policy":  c.policy,
  4923  	})
  4924  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4925  }
  4926  
  4927  // Do executes the "dns.policies.get" call.
  4928  // Any non-2xx status code is an error. Response headers are in either
  4929  // *Policy.ServerResponse.Header or (if a response was returned at all) in
  4930  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4931  // whether the returned error was because http.StatusNotModified was returned.
  4932  func (c *PoliciesGetCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  4933  	gensupport.SetOptions(c.urlParams_, opts...)
  4934  	res, err := c.doRequest("json")
  4935  	if res != nil && res.StatusCode == http.StatusNotModified {
  4936  		if res.Body != nil {
  4937  			res.Body.Close()
  4938  		}
  4939  		return nil, gensupport.WrapError(&googleapi.Error{
  4940  			Code:   res.StatusCode,
  4941  			Header: res.Header,
  4942  		})
  4943  	}
  4944  	if err != nil {
  4945  		return nil, err
  4946  	}
  4947  	defer googleapi.CloseBody(res)
  4948  	if err := googleapi.CheckResponse(res); err != nil {
  4949  		return nil, gensupport.WrapError(err)
  4950  	}
  4951  	ret := &Policy{
  4952  		ServerResponse: googleapi.ServerResponse{
  4953  			Header:         res.Header,
  4954  			HTTPStatusCode: res.StatusCode,
  4955  		},
  4956  	}
  4957  	target := &ret
  4958  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4959  		return nil, err
  4960  	}
  4961  	return ret, nil
  4962  }
  4963  
  4964  type PoliciesListCall struct {
  4965  	s            *Service
  4966  	project      string
  4967  	urlParams_   gensupport.URLParams
  4968  	ifNoneMatch_ string
  4969  	ctx_         context.Context
  4970  	header_      http.Header
  4971  }
  4972  
  4973  // List: Enumerates all Policies associated with a project.
  4974  //
  4975  // - project: Identifies the project addressed by this request.
  4976  func (r *PoliciesService) List(project string) *PoliciesListCall {
  4977  	c := &PoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4978  	c.project = project
  4979  	return c
  4980  }
  4981  
  4982  // MaxResults sets the optional parameter "maxResults": Maximum number of
  4983  // results to be returned. If unspecified, the server decides how many results
  4984  // to return.
  4985  func (c *PoliciesListCall) MaxResults(maxResults int64) *PoliciesListCall {
  4986  	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  4987  	return c
  4988  }
  4989  
  4990  // PageToken sets the optional parameter "pageToken": A tag returned by a
  4991  // previous list request that was truncated. Use this parameter to continue a
  4992  // previous list request.
  4993  func (c *PoliciesListCall) PageToken(pageToken string) *PoliciesListCall {
  4994  	c.urlParams_.Set("pageToken", pageToken)
  4995  	return c
  4996  }
  4997  
  4998  // Fields allows partial responses to be retrieved. See
  4999  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5000  // details.
  5001  func (c *PoliciesListCall) Fields(s ...googleapi.Field) *PoliciesListCall {
  5002  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5003  	return c
  5004  }
  5005  
  5006  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5007  // object's ETag matches the given value. This is useful for getting updates
  5008  // only after the object has changed since the last request.
  5009  func (c *PoliciesListCall) IfNoneMatch(entityTag string) *PoliciesListCall {
  5010  	c.ifNoneMatch_ = entityTag
  5011  	return c
  5012  }
  5013  
  5014  // Context sets the context to be used in this call's Do method.
  5015  func (c *PoliciesListCall) Context(ctx context.Context) *PoliciesListCall {
  5016  	c.ctx_ = ctx
  5017  	return c
  5018  }
  5019  
  5020  // Header returns a http.Header that can be modified by the caller to add
  5021  // headers to the request.
  5022  func (c *PoliciesListCall) Header() http.Header {
  5023  	if c.header_ == nil {
  5024  		c.header_ = make(http.Header)
  5025  	}
  5026  	return c.header_
  5027  }
  5028  
  5029  func (c *PoliciesListCall) doRequest(alt string) (*http.Response, error) {
  5030  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5031  	if c.ifNoneMatch_ != "" {
  5032  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5033  	}
  5034  	var body io.Reader = nil
  5035  	c.urlParams_.Set("alt", alt)
  5036  	c.urlParams_.Set("prettyPrint", "false")
  5037  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1beta2/projects/{project}/policies")
  5038  	urls += "?" + c.urlParams_.Encode()
  5039  	req, err := http.NewRequest("GET", urls, body)
  5040  	if err != nil {
  5041  		return nil, err
  5042  	}
  5043  	req.Header = reqHeaders
  5044  	googleapi.Expand(req.URL, map[string]string{
  5045  		"project": c.project,
  5046  	})
  5047  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5048  }
  5049  
  5050  // Do executes the "dns.policies.list" call.
  5051  // Any non-2xx status code is an error. Response headers are in either
  5052  // *PoliciesListResponse.ServerResponse.Header or (if a response was returned
  5053  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  5054  // check whether the returned error was because http.StatusNotModified was
  5055  // returned.
  5056  func (c *PoliciesListCall) Do(opts ...googleapi.CallOption) (*PoliciesListResponse, error) {
  5057  	gensupport.SetOptions(c.urlParams_, opts...)
  5058  	res, err := c.doRequest("json")
  5059  	if res != nil && res.StatusCode == http.StatusNotModified {
  5060  		if res.Body != nil {
  5061  			res.Body.Close()
  5062  		}
  5063  		return nil, gensupport.WrapError(&googleapi.Error{
  5064  			Code:   res.StatusCode,
  5065  			Header: res.Header,
  5066  		})
  5067  	}
  5068  	if err != nil {
  5069  		return nil, err
  5070  	}
  5071  	defer googleapi.CloseBody(res)
  5072  	if err := googleapi.CheckResponse(res); err != nil {
  5073  		return nil, gensupport.WrapError(err)
  5074  	}
  5075  	ret := &PoliciesListResponse{
  5076  		ServerResponse: googleapi.ServerResponse{
  5077  			Header:         res.Header,
  5078  			HTTPStatusCode: res.StatusCode,
  5079  		},
  5080  	}
  5081  	target := &ret
  5082  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5083  		return nil, err
  5084  	}
  5085  	return ret, nil
  5086  }
  5087  
  5088  // Pages invokes f for each page of results.
  5089  // A non-nil error returned from f will halt the iteration.
  5090  // The provided context supersedes any context provided to the Context method.
  5091  func (c *PoliciesListCall) Pages(ctx context.Context, f func(*PoliciesListResponse) error) error {
  5092  	c.ctx_ = ctx
  5093  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  5094  	for {
  5095  		x, err := c.Do()
  5096  		if err != nil {
  5097  			return err
  5098  		}
  5099  		if err := f(x); err != nil {
  5100  			return err
  5101  		}
  5102  		if x.NextPageToken == "" {
  5103  			return nil
  5104  		}
  5105  		c.PageToken(x.NextPageToken)
  5106  	}
  5107  }
  5108  
  5109  type PoliciesPatchCall struct {
  5110  	s          *Service
  5111  	project    string
  5112  	policy     string
  5113  	policy2    *Policy
  5114  	urlParams_ gensupport.URLParams
  5115  	ctx_       context.Context
  5116  	header_    http.Header
  5117  }
  5118  
  5119  // Patch: Applies a partial update to an existing Policy.
  5120  //
  5121  // - policy: User given friendly name of the policy addressed by this request.
  5122  // - project: Identifies the project addressed by this request.
  5123  func (r *PoliciesService) Patch(project string, policy string, policy2 *Policy) *PoliciesPatchCall {
  5124  	c := &PoliciesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5125  	c.project = project
  5126  	c.policy = policy
  5127  	c.policy2 = policy2
  5128  	return c
  5129  }
  5130  
  5131  // ClientOperationId sets the optional parameter "clientOperationId": For
  5132  // mutating operation requests only. An optional identifier specified by the
  5133  // client. Must be unique for operation resources in the Operations collection.
  5134  func (c *PoliciesPatchCall) ClientOperationId(clientOperationId string) *PoliciesPatchCall {
  5135  	c.urlParams_.Set("clientOperationId", clientOperationId)
  5136  	return c
  5137  }
  5138  
  5139  // Fields allows partial responses to be retrieved. See
  5140  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5141  // details.
  5142  func (c *PoliciesPatchCall) Fields(s ...googleapi.Field) *PoliciesPatchCall {
  5143  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5144  	return c
  5145  }
  5146  
  5147  // Context sets the context to be used in this call's Do method.
  5148  func (c *PoliciesPatchCall) Context(ctx context.Context) *PoliciesPatchCall {
  5149  	c.ctx_ = ctx
  5150  	return c
  5151  }
  5152  
  5153  // Header returns a http.Header that can be modified by the caller to add
  5154  // headers to the request.
  5155  func (c *PoliciesPatchCall) Header() http.Header {
  5156  	if c.header_ == nil {
  5157  		c.header_ = make(http.Header)
  5158  	}
  5159  	return c.header_
  5160  }
  5161  
  5162  func (c *PoliciesPatchCall) doRequest(alt string) (*http.Response, error) {
  5163  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  5164  	var body io.Reader = nil
  5165  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.policy2)
  5166  	if err != nil {
  5167  		return nil, err
  5168  	}
  5169  	c.urlParams_.Set("alt", alt)
  5170  	c.urlParams_.Set("prettyPrint", "false")
  5171  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1beta2/projects/{project}/policies/{policy}")
  5172  	urls += "?" + c.urlParams_.Encode()
  5173  	req, err := http.NewRequest("PATCH", urls, body)
  5174  	if err != nil {
  5175  		return nil, err
  5176  	}
  5177  	req.Header = reqHeaders
  5178  	googleapi.Expand(req.URL, map[string]string{
  5179  		"project": c.project,
  5180  		"policy":  c.policy,
  5181  	})
  5182  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5183  }
  5184  
  5185  // Do executes the "dns.policies.patch" call.
  5186  // Any non-2xx status code is an error. Response headers are in either
  5187  // *PoliciesPatchResponse.ServerResponse.Header or (if a response was returned
  5188  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  5189  // check whether the returned error was because http.StatusNotModified was
  5190  // returned.
  5191  func (c *PoliciesPatchCall) Do(opts ...googleapi.CallOption) (*PoliciesPatchResponse, error) {
  5192  	gensupport.SetOptions(c.urlParams_, opts...)
  5193  	res, err := c.doRequest("json")
  5194  	if res != nil && res.StatusCode == http.StatusNotModified {
  5195  		if res.Body != nil {
  5196  			res.Body.Close()
  5197  		}
  5198  		return nil, gensupport.WrapError(&googleapi.Error{
  5199  			Code:   res.StatusCode,
  5200  			Header: res.Header,
  5201  		})
  5202  	}
  5203  	if err != nil {
  5204  		return nil, err
  5205  	}
  5206  	defer googleapi.CloseBody(res)
  5207  	if err := googleapi.CheckResponse(res); err != nil {
  5208  		return nil, gensupport.WrapError(err)
  5209  	}
  5210  	ret := &PoliciesPatchResponse{
  5211  		ServerResponse: googleapi.ServerResponse{
  5212  			Header:         res.Header,
  5213  			HTTPStatusCode: res.StatusCode,
  5214  		},
  5215  	}
  5216  	target := &ret
  5217  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5218  		return nil, err
  5219  	}
  5220  	return ret, nil
  5221  }
  5222  
  5223  type PoliciesUpdateCall struct {
  5224  	s          *Service
  5225  	project    string
  5226  	policy     string
  5227  	policy2    *Policy
  5228  	urlParams_ gensupport.URLParams
  5229  	ctx_       context.Context
  5230  	header_    http.Header
  5231  }
  5232  
  5233  // Update: Updates an existing Policy.
  5234  //
  5235  // - policy: User given friendly name of the policy addressed by this request.
  5236  // - project: Identifies the project addressed by this request.
  5237  func (r *PoliciesService) Update(project string, policy string, policy2 *Policy) *PoliciesUpdateCall {
  5238  	c := &PoliciesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5239  	c.project = project
  5240  	c.policy = policy
  5241  	c.policy2 = policy2
  5242  	return c
  5243  }
  5244  
  5245  // ClientOperationId sets the optional parameter "clientOperationId": For
  5246  // mutating operation requests only. An optional identifier specified by the
  5247  // client. Must be unique for operation resources in the Operations collection.
  5248  func (c *PoliciesUpdateCall) ClientOperationId(clientOperationId string) *PoliciesUpdateCall {
  5249  	c.urlParams_.Set("clientOperationId", clientOperationId)
  5250  	return c
  5251  }
  5252  
  5253  // Fields allows partial responses to be retrieved. See
  5254  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5255  // details.
  5256  func (c *PoliciesUpdateCall) Fields(s ...googleapi.Field) *PoliciesUpdateCall {
  5257  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5258  	return c
  5259  }
  5260  
  5261  // Context sets the context to be used in this call's Do method.
  5262  func (c *PoliciesUpdateCall) Context(ctx context.Context) *PoliciesUpdateCall {
  5263  	c.ctx_ = ctx
  5264  	return c
  5265  }
  5266  
  5267  // Header returns a http.Header that can be modified by the caller to add
  5268  // headers to the request.
  5269  func (c *PoliciesUpdateCall) Header() http.Header {
  5270  	if c.header_ == nil {
  5271  		c.header_ = make(http.Header)
  5272  	}
  5273  	return c.header_
  5274  }
  5275  
  5276  func (c *PoliciesUpdateCall) doRequest(alt string) (*http.Response, error) {
  5277  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  5278  	var body io.Reader = nil
  5279  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.policy2)
  5280  	if err != nil {
  5281  		return nil, err
  5282  	}
  5283  	c.urlParams_.Set("alt", alt)
  5284  	c.urlParams_.Set("prettyPrint", "false")
  5285  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1beta2/projects/{project}/policies/{policy}")
  5286  	urls += "?" + c.urlParams_.Encode()
  5287  	req, err := http.NewRequest("PUT", urls, body)
  5288  	if err != nil {
  5289  		return nil, err
  5290  	}
  5291  	req.Header = reqHeaders
  5292  	googleapi.Expand(req.URL, map[string]string{
  5293  		"project": c.project,
  5294  		"policy":  c.policy,
  5295  	})
  5296  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5297  }
  5298  
  5299  // Do executes the "dns.policies.update" call.
  5300  // Any non-2xx status code is an error. Response headers are in either
  5301  // *PoliciesUpdateResponse.ServerResponse.Header or (if a response was returned
  5302  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  5303  // check whether the returned error was because http.StatusNotModified was
  5304  // returned.
  5305  func (c *PoliciesUpdateCall) Do(opts ...googleapi.CallOption) (*PoliciesUpdateResponse, error) {
  5306  	gensupport.SetOptions(c.urlParams_, opts...)
  5307  	res, err := c.doRequest("json")
  5308  	if res != nil && res.StatusCode == http.StatusNotModified {
  5309  		if res.Body != nil {
  5310  			res.Body.Close()
  5311  		}
  5312  		return nil, gensupport.WrapError(&googleapi.Error{
  5313  			Code:   res.StatusCode,
  5314  			Header: res.Header,
  5315  		})
  5316  	}
  5317  	if err != nil {
  5318  		return nil, err
  5319  	}
  5320  	defer googleapi.CloseBody(res)
  5321  	if err := googleapi.CheckResponse(res); err != nil {
  5322  		return nil, gensupport.WrapError(err)
  5323  	}
  5324  	ret := &PoliciesUpdateResponse{
  5325  		ServerResponse: googleapi.ServerResponse{
  5326  			Header:         res.Header,
  5327  			HTTPStatusCode: res.StatusCode,
  5328  		},
  5329  	}
  5330  	target := &ret
  5331  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5332  		return nil, err
  5333  	}
  5334  	return ret, nil
  5335  }
  5336  
  5337  type ProjectsGetCall struct {
  5338  	s            *Service
  5339  	project      string
  5340  	urlParams_   gensupport.URLParams
  5341  	ifNoneMatch_ string
  5342  	ctx_         context.Context
  5343  	header_      http.Header
  5344  }
  5345  
  5346  // Get: Fetches the representation of an existing Project.
  5347  //
  5348  // - project: Identifies the project addressed by this request.
  5349  func (r *ProjectsService) Get(project string) *ProjectsGetCall {
  5350  	c := &ProjectsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5351  	c.project = project
  5352  	return c
  5353  }
  5354  
  5355  // ClientOperationId sets the optional parameter "clientOperationId": For
  5356  // mutating operation requests only. An optional identifier specified by the
  5357  // client. Must be unique for operation resources in the Operations collection.
  5358  func (c *ProjectsGetCall) ClientOperationId(clientOperationId string) *ProjectsGetCall {
  5359  	c.urlParams_.Set("clientOperationId", clientOperationId)
  5360  	return c
  5361  }
  5362  
  5363  // Fields allows partial responses to be retrieved. See
  5364  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5365  // details.
  5366  func (c *ProjectsGetCall) Fields(s ...googleapi.Field) *ProjectsGetCall {
  5367  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5368  	return c
  5369  }
  5370  
  5371  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5372  // object's ETag matches the given value. This is useful for getting updates
  5373  // only after the object has changed since the last request.
  5374  func (c *ProjectsGetCall) IfNoneMatch(entityTag string) *ProjectsGetCall {
  5375  	c.ifNoneMatch_ = entityTag
  5376  	return c
  5377  }
  5378  
  5379  // Context sets the context to be used in this call's Do method.
  5380  func (c *ProjectsGetCall) Context(ctx context.Context) *ProjectsGetCall {
  5381  	c.ctx_ = ctx
  5382  	return c
  5383  }
  5384  
  5385  // Header returns a http.Header that can be modified by the caller to add
  5386  // headers to the request.
  5387  func (c *ProjectsGetCall) Header() http.Header {
  5388  	if c.header_ == nil {
  5389  		c.header_ = make(http.Header)
  5390  	}
  5391  	return c.header_
  5392  }
  5393  
  5394  func (c *ProjectsGetCall) doRequest(alt string) (*http.Response, error) {
  5395  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5396  	if c.ifNoneMatch_ != "" {
  5397  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5398  	}
  5399  	var body io.Reader = nil
  5400  	c.urlParams_.Set("alt", alt)
  5401  	c.urlParams_.Set("prettyPrint", "false")
  5402  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1beta2/projects/{project}")
  5403  	urls += "?" + c.urlParams_.Encode()
  5404  	req, err := http.NewRequest("GET", urls, body)
  5405  	if err != nil {
  5406  		return nil, err
  5407  	}
  5408  	req.Header = reqHeaders
  5409  	googleapi.Expand(req.URL, map[string]string{
  5410  		"project": c.project,
  5411  	})
  5412  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5413  }
  5414  
  5415  // Do executes the "dns.projects.get" call.
  5416  // Any non-2xx status code is an error. Response headers are in either
  5417  // *Project.ServerResponse.Header or (if a response was returned at all) in
  5418  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5419  // whether the returned error was because http.StatusNotModified was returned.
  5420  func (c *ProjectsGetCall) Do(opts ...googleapi.CallOption) (*Project, error) {
  5421  	gensupport.SetOptions(c.urlParams_, opts...)
  5422  	res, err := c.doRequest("json")
  5423  	if res != nil && res.StatusCode == http.StatusNotModified {
  5424  		if res.Body != nil {
  5425  			res.Body.Close()
  5426  		}
  5427  		return nil, gensupport.WrapError(&googleapi.Error{
  5428  			Code:   res.StatusCode,
  5429  			Header: res.Header,
  5430  		})
  5431  	}
  5432  	if err != nil {
  5433  		return nil, err
  5434  	}
  5435  	defer googleapi.CloseBody(res)
  5436  	if err := googleapi.CheckResponse(res); err != nil {
  5437  		return nil, gensupport.WrapError(err)
  5438  	}
  5439  	ret := &Project{
  5440  		ServerResponse: googleapi.ServerResponse{
  5441  			Header:         res.Header,
  5442  			HTTPStatusCode: res.StatusCode,
  5443  		},
  5444  	}
  5445  	target := &ret
  5446  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5447  		return nil, err
  5448  	}
  5449  	return ret, nil
  5450  }
  5451  
  5452  type ResourceRecordSetsCreateCall struct {
  5453  	s                 *Service
  5454  	project           string
  5455  	managedZone       string
  5456  	resourcerecordset *ResourceRecordSet
  5457  	urlParams_        gensupport.URLParams
  5458  	ctx_              context.Context
  5459  	header_           http.Header
  5460  }
  5461  
  5462  // Create: Creates a new ResourceRecordSet.
  5463  //
  5464  //   - managedZone: Identifies the managed zone addressed by this request. Can be
  5465  //     the managed zone name or ID.
  5466  //   - project: Identifies the project addressed by this request.
  5467  func (r *ResourceRecordSetsService) Create(project string, managedZone string, resourcerecordset *ResourceRecordSet) *ResourceRecordSetsCreateCall {
  5468  	c := &ResourceRecordSetsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5469  	c.project = project
  5470  	c.managedZone = managedZone
  5471  	c.resourcerecordset = resourcerecordset
  5472  	return c
  5473  }
  5474  
  5475  // ClientOperationId sets the optional parameter "clientOperationId": For
  5476  // mutating operation requests only. An optional identifier specified by the
  5477  // client. Must be unique for operation resources in the Operations collection.
  5478  func (c *ResourceRecordSetsCreateCall) ClientOperationId(clientOperationId string) *ResourceRecordSetsCreateCall {
  5479  	c.urlParams_.Set("clientOperationId", clientOperationId)
  5480  	return c
  5481  }
  5482  
  5483  // Fields allows partial responses to be retrieved. See
  5484  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5485  // details.
  5486  func (c *ResourceRecordSetsCreateCall) Fields(s ...googleapi.Field) *ResourceRecordSetsCreateCall {
  5487  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5488  	return c
  5489  }
  5490  
  5491  // Context sets the context to be used in this call's Do method.
  5492  func (c *ResourceRecordSetsCreateCall) Context(ctx context.Context) *ResourceRecordSetsCreateCall {
  5493  	c.ctx_ = ctx
  5494  	return c
  5495  }
  5496  
  5497  // Header returns a http.Header that can be modified by the caller to add
  5498  // headers to the request.
  5499  func (c *ResourceRecordSetsCreateCall) Header() http.Header {
  5500  	if c.header_ == nil {
  5501  		c.header_ = make(http.Header)
  5502  	}
  5503  	return c.header_
  5504  }
  5505  
  5506  func (c *ResourceRecordSetsCreateCall) doRequest(alt string) (*http.Response, error) {
  5507  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  5508  	var body io.Reader = nil
  5509  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.resourcerecordset)
  5510  	if err != nil {
  5511  		return nil, err
  5512  	}
  5513  	c.urlParams_.Set("alt", alt)
  5514  	c.urlParams_.Set("prettyPrint", "false")
  5515  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1beta2/projects/{project}/managedZones/{managedZone}/rrsets")
  5516  	urls += "?" + c.urlParams_.Encode()
  5517  	req, err := http.NewRequest("POST", urls, body)
  5518  	if err != nil {
  5519  		return nil, err
  5520  	}
  5521  	req.Header = reqHeaders
  5522  	googleapi.Expand(req.URL, map[string]string{
  5523  		"project":     c.project,
  5524  		"managedZone": c.managedZone,
  5525  	})
  5526  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5527  }
  5528  
  5529  // Do executes the "dns.resourceRecordSets.create" call.
  5530  // Any non-2xx status code is an error. Response headers are in either
  5531  // *ResourceRecordSet.ServerResponse.Header or (if a response was returned at
  5532  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  5533  // check whether the returned error was because http.StatusNotModified was
  5534  // returned.
  5535  func (c *ResourceRecordSetsCreateCall) Do(opts ...googleapi.CallOption) (*ResourceRecordSet, error) {
  5536  	gensupport.SetOptions(c.urlParams_, opts...)
  5537  	res, err := c.doRequest("json")
  5538  	if res != nil && res.StatusCode == http.StatusNotModified {
  5539  		if res.Body != nil {
  5540  			res.Body.Close()
  5541  		}
  5542  		return nil, gensupport.WrapError(&googleapi.Error{
  5543  			Code:   res.StatusCode,
  5544  			Header: res.Header,
  5545  		})
  5546  	}
  5547  	if err != nil {
  5548  		return nil, err
  5549  	}
  5550  	defer googleapi.CloseBody(res)
  5551  	if err := googleapi.CheckResponse(res); err != nil {
  5552  		return nil, gensupport.WrapError(err)
  5553  	}
  5554  	ret := &ResourceRecordSet{
  5555  		ServerResponse: googleapi.ServerResponse{
  5556  			Header:         res.Header,
  5557  			HTTPStatusCode: res.StatusCode,
  5558  		},
  5559  	}
  5560  	target := &ret
  5561  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5562  		return nil, err
  5563  	}
  5564  	return ret, nil
  5565  }
  5566  
  5567  type ResourceRecordSetsDeleteCall struct {
  5568  	s           *Service
  5569  	project     string
  5570  	managedZone string
  5571  	name        string
  5572  	type_       string
  5573  	urlParams_  gensupport.URLParams
  5574  	ctx_        context.Context
  5575  	header_     http.Header
  5576  }
  5577  
  5578  // Delete: Deletes a previously created ResourceRecordSet.
  5579  //
  5580  //   - managedZone: Identifies the managed zone addressed by this request. Can be
  5581  //     the managed zone name or ID.
  5582  //   - name: Fully qualified domain name.
  5583  //   - project: Identifies the project addressed by this request.
  5584  //   - type: RRSet type.
  5585  func (r *ResourceRecordSetsService) Delete(project string, managedZone string, name string, type_ string) *ResourceRecordSetsDeleteCall {
  5586  	c := &ResourceRecordSetsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5587  	c.project = project
  5588  	c.managedZone = managedZone
  5589  	c.name = name
  5590  	c.type_ = type_
  5591  	return c
  5592  }
  5593  
  5594  // ClientOperationId sets the optional parameter "clientOperationId": For
  5595  // mutating operation requests only. An optional identifier specified by the
  5596  // client. Must be unique for operation resources in the Operations collection.
  5597  func (c *ResourceRecordSetsDeleteCall) ClientOperationId(clientOperationId string) *ResourceRecordSetsDeleteCall {
  5598  	c.urlParams_.Set("clientOperationId", clientOperationId)
  5599  	return c
  5600  }
  5601  
  5602  // Fields allows partial responses to be retrieved. See
  5603  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5604  // details.
  5605  func (c *ResourceRecordSetsDeleteCall) Fields(s ...googleapi.Field) *ResourceRecordSetsDeleteCall {
  5606  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5607  	return c
  5608  }
  5609  
  5610  // Context sets the context to be used in this call's Do method.
  5611  func (c *ResourceRecordSetsDeleteCall) Context(ctx context.Context) *ResourceRecordSetsDeleteCall {
  5612  	c.ctx_ = ctx
  5613  	return c
  5614  }
  5615  
  5616  // Header returns a http.Header that can be modified by the caller to add
  5617  // headers to the request.
  5618  func (c *ResourceRecordSetsDeleteCall) Header() http.Header {
  5619  	if c.header_ == nil {
  5620  		c.header_ = make(http.Header)
  5621  	}
  5622  	return c.header_
  5623  }
  5624  
  5625  func (c *ResourceRecordSetsDeleteCall) doRequest(alt string) (*http.Response, error) {
  5626  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5627  	var body io.Reader = nil
  5628  	c.urlParams_.Set("alt", alt)
  5629  	c.urlParams_.Set("prettyPrint", "false")
  5630  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1beta2/projects/{project}/managedZones/{managedZone}/rrsets/{name}/{type}")
  5631  	urls += "?" + c.urlParams_.Encode()
  5632  	req, err := http.NewRequest("DELETE", urls, body)
  5633  	if err != nil {
  5634  		return nil, err
  5635  	}
  5636  	req.Header = reqHeaders
  5637  	googleapi.Expand(req.URL, map[string]string{
  5638  		"project":     c.project,
  5639  		"managedZone": c.managedZone,
  5640  		"name":        c.name,
  5641  		"type":        c.type_,
  5642  	})
  5643  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5644  }
  5645  
  5646  // Do executes the "dns.resourceRecordSets.delete" call.
  5647  func (c *ResourceRecordSetsDeleteCall) Do(opts ...googleapi.CallOption) error {
  5648  	gensupport.SetOptions(c.urlParams_, opts...)
  5649  	res, err := c.doRequest("json")
  5650  	if err != nil {
  5651  		return err
  5652  	}
  5653  	defer googleapi.CloseBody(res)
  5654  	if err := googleapi.CheckResponse(res); err != nil {
  5655  		return gensupport.WrapError(err)
  5656  	}
  5657  	return nil
  5658  }
  5659  
  5660  type ResourceRecordSetsGetCall struct {
  5661  	s            *Service
  5662  	project      string
  5663  	managedZone  string
  5664  	name         string
  5665  	type_        string
  5666  	urlParams_   gensupport.URLParams
  5667  	ifNoneMatch_ string
  5668  	ctx_         context.Context
  5669  	header_      http.Header
  5670  }
  5671  
  5672  // Get: Fetches the representation of an existing ResourceRecordSet.
  5673  //
  5674  //   - managedZone: Identifies the managed zone addressed by this request. Can be
  5675  //     the managed zone name or ID.
  5676  //   - name: Fully qualified domain name.
  5677  //   - project: Identifies the project addressed by this request.
  5678  //   - type: RRSet type.
  5679  func (r *ResourceRecordSetsService) Get(project string, managedZone string, name string, type_ string) *ResourceRecordSetsGetCall {
  5680  	c := &ResourceRecordSetsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5681  	c.project = project
  5682  	c.managedZone = managedZone
  5683  	c.name = name
  5684  	c.type_ = type_
  5685  	return c
  5686  }
  5687  
  5688  // ClientOperationId sets the optional parameter "clientOperationId": For
  5689  // mutating operation requests only. An optional identifier specified by the
  5690  // client. Must be unique for operation resources in the Operations collection.
  5691  func (c *ResourceRecordSetsGetCall) ClientOperationId(clientOperationId string) *ResourceRecordSetsGetCall {
  5692  	c.urlParams_.Set("clientOperationId", clientOperationId)
  5693  	return c
  5694  }
  5695  
  5696  // Fields allows partial responses to be retrieved. See
  5697  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5698  // details.
  5699  func (c *ResourceRecordSetsGetCall) Fields(s ...googleapi.Field) *ResourceRecordSetsGetCall {
  5700  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5701  	return c
  5702  }
  5703  
  5704  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5705  // object's ETag matches the given value. This is useful for getting updates
  5706  // only after the object has changed since the last request.
  5707  func (c *ResourceRecordSetsGetCall) IfNoneMatch(entityTag string) *ResourceRecordSetsGetCall {
  5708  	c.ifNoneMatch_ = entityTag
  5709  	return c
  5710  }
  5711  
  5712  // Context sets the context to be used in this call's Do method.
  5713  func (c *ResourceRecordSetsGetCall) Context(ctx context.Context) *ResourceRecordSetsGetCall {
  5714  	c.ctx_ = ctx
  5715  	return c
  5716  }
  5717  
  5718  // Header returns a http.Header that can be modified by the caller to add
  5719  // headers to the request.
  5720  func (c *ResourceRecordSetsGetCall) Header() http.Header {
  5721  	if c.header_ == nil {
  5722  		c.header_ = make(http.Header)
  5723  	}
  5724  	return c.header_
  5725  }
  5726  
  5727  func (c *ResourceRecordSetsGetCall) doRequest(alt string) (*http.Response, error) {
  5728  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5729  	if c.ifNoneMatch_ != "" {
  5730  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5731  	}
  5732  	var body io.Reader = nil
  5733  	c.urlParams_.Set("alt", alt)
  5734  	c.urlParams_.Set("prettyPrint", "false")
  5735  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1beta2/projects/{project}/managedZones/{managedZone}/rrsets/{name}/{type}")
  5736  	urls += "?" + c.urlParams_.Encode()
  5737  	req, err := http.NewRequest("GET", urls, body)
  5738  	if err != nil {
  5739  		return nil, err
  5740  	}
  5741  	req.Header = reqHeaders
  5742  	googleapi.Expand(req.URL, map[string]string{
  5743  		"project":     c.project,
  5744  		"managedZone": c.managedZone,
  5745  		"name":        c.name,
  5746  		"type":        c.type_,
  5747  	})
  5748  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5749  }
  5750  
  5751  // Do executes the "dns.resourceRecordSets.get" call.
  5752  // Any non-2xx status code is an error. Response headers are in either
  5753  // *ResourceRecordSet.ServerResponse.Header or (if a response was returned at
  5754  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  5755  // check whether the returned error was because http.StatusNotModified was
  5756  // returned.
  5757  func (c *ResourceRecordSetsGetCall) Do(opts ...googleapi.CallOption) (*ResourceRecordSet, error) {
  5758  	gensupport.SetOptions(c.urlParams_, opts...)
  5759  	res, err := c.doRequest("json")
  5760  	if res != nil && res.StatusCode == http.StatusNotModified {
  5761  		if res.Body != nil {
  5762  			res.Body.Close()
  5763  		}
  5764  		return nil, gensupport.WrapError(&googleapi.Error{
  5765  			Code:   res.StatusCode,
  5766  			Header: res.Header,
  5767  		})
  5768  	}
  5769  	if err != nil {
  5770  		return nil, err
  5771  	}
  5772  	defer googleapi.CloseBody(res)
  5773  	if err := googleapi.CheckResponse(res); err != nil {
  5774  		return nil, gensupport.WrapError(err)
  5775  	}
  5776  	ret := &ResourceRecordSet{
  5777  		ServerResponse: googleapi.ServerResponse{
  5778  			Header:         res.Header,
  5779  			HTTPStatusCode: res.StatusCode,
  5780  		},
  5781  	}
  5782  	target := &ret
  5783  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5784  		return nil, err
  5785  	}
  5786  	return ret, nil
  5787  }
  5788  
  5789  type ResourceRecordSetsListCall struct {
  5790  	s            *Service
  5791  	project      string
  5792  	managedZone  string
  5793  	urlParams_   gensupport.URLParams
  5794  	ifNoneMatch_ string
  5795  	ctx_         context.Context
  5796  	header_      http.Header
  5797  }
  5798  
  5799  // List: Enumerates ResourceRecordSets that you have created but not yet
  5800  // deleted.
  5801  //
  5802  //   - managedZone: Identifies the managed zone addressed by this request. Can be
  5803  //     the managed zone name or ID.
  5804  //   - project: Identifies the project addressed by this request.
  5805  func (r *ResourceRecordSetsService) List(project string, managedZone string) *ResourceRecordSetsListCall {
  5806  	c := &ResourceRecordSetsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5807  	c.project = project
  5808  	c.managedZone = managedZone
  5809  	return c
  5810  }
  5811  
  5812  // MaxResults sets the optional parameter "maxResults": Maximum number of
  5813  // results to be returned. If unspecified, the server decides how many results
  5814  // to return.
  5815  func (c *ResourceRecordSetsListCall) MaxResults(maxResults int64) *ResourceRecordSetsListCall {
  5816  	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  5817  	return c
  5818  }
  5819  
  5820  // Name sets the optional parameter "name": Restricts the list to return only
  5821  // records with this fully qualified domain name.
  5822  func (c *ResourceRecordSetsListCall) Name(name string) *ResourceRecordSetsListCall {
  5823  	c.urlParams_.Set("name", name)
  5824  	return c
  5825  }
  5826  
  5827  // PageToken sets the optional parameter "pageToken": A tag returned by a
  5828  // previous list request that was truncated. Use this parameter to continue a
  5829  // previous list request.
  5830  func (c *ResourceRecordSetsListCall) PageToken(pageToken string) *ResourceRecordSetsListCall {
  5831  	c.urlParams_.Set("pageToken", pageToken)
  5832  	return c
  5833  }
  5834  
  5835  // Type sets the optional parameter "type": Restricts the list to return only
  5836  // records of this type. If present, the "name" parameter must also be present.
  5837  func (c *ResourceRecordSetsListCall) Type(type_ string) *ResourceRecordSetsListCall {
  5838  	c.urlParams_.Set("type", type_)
  5839  	return c
  5840  }
  5841  
  5842  // Fields allows partial responses to be retrieved. See
  5843  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5844  // details.
  5845  func (c *ResourceRecordSetsListCall) Fields(s ...googleapi.Field) *ResourceRecordSetsListCall {
  5846  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5847  	return c
  5848  }
  5849  
  5850  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5851  // object's ETag matches the given value. This is useful for getting updates
  5852  // only after the object has changed since the last request.
  5853  func (c *ResourceRecordSetsListCall) IfNoneMatch(entityTag string) *ResourceRecordSetsListCall {
  5854  	c.ifNoneMatch_ = entityTag
  5855  	return c
  5856  }
  5857  
  5858  // Context sets the context to be used in this call's Do method.
  5859  func (c *ResourceRecordSetsListCall) Context(ctx context.Context) *ResourceRecordSetsListCall {
  5860  	c.ctx_ = ctx
  5861  	return c
  5862  }
  5863  
  5864  // Header returns a http.Header that can be modified by the caller to add
  5865  // headers to the request.
  5866  func (c *ResourceRecordSetsListCall) Header() http.Header {
  5867  	if c.header_ == nil {
  5868  		c.header_ = make(http.Header)
  5869  	}
  5870  	return c.header_
  5871  }
  5872  
  5873  func (c *ResourceRecordSetsListCall) doRequest(alt string) (*http.Response, error) {
  5874  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5875  	if c.ifNoneMatch_ != "" {
  5876  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5877  	}
  5878  	var body io.Reader = nil
  5879  	c.urlParams_.Set("alt", alt)
  5880  	c.urlParams_.Set("prettyPrint", "false")
  5881  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1beta2/projects/{project}/managedZones/{managedZone}/rrsets")
  5882  	urls += "?" + c.urlParams_.Encode()
  5883  	req, err := http.NewRequest("GET", urls, body)
  5884  	if err != nil {
  5885  		return nil, err
  5886  	}
  5887  	req.Header = reqHeaders
  5888  	googleapi.Expand(req.URL, map[string]string{
  5889  		"project":     c.project,
  5890  		"managedZone": c.managedZone,
  5891  	})
  5892  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5893  }
  5894  
  5895  // Do executes the "dns.resourceRecordSets.list" call.
  5896  // Any non-2xx status code is an error. Response headers are in either
  5897  // *ResourceRecordSetsListResponse.ServerResponse.Header or (if a response was
  5898  // returned at all) in error.(*googleapi.Error).Header. Use
  5899  // googleapi.IsNotModified to check whether the returned error was because
  5900  // http.StatusNotModified was returned.
  5901  func (c *ResourceRecordSetsListCall) Do(opts ...googleapi.CallOption) (*ResourceRecordSetsListResponse, error) {
  5902  	gensupport.SetOptions(c.urlParams_, opts...)
  5903  	res, err := c.doRequest("json")
  5904  	if res != nil && res.StatusCode == http.StatusNotModified {
  5905  		if res.Body != nil {
  5906  			res.Body.Close()
  5907  		}
  5908  		return nil, gensupport.WrapError(&googleapi.Error{
  5909  			Code:   res.StatusCode,
  5910  			Header: res.Header,
  5911  		})
  5912  	}
  5913  	if err != nil {
  5914  		return nil, err
  5915  	}
  5916  	defer googleapi.CloseBody(res)
  5917  	if err := googleapi.CheckResponse(res); err != nil {
  5918  		return nil, gensupport.WrapError(err)
  5919  	}
  5920  	ret := &ResourceRecordSetsListResponse{
  5921  		ServerResponse: googleapi.ServerResponse{
  5922  			Header:         res.Header,
  5923  			HTTPStatusCode: res.StatusCode,
  5924  		},
  5925  	}
  5926  	target := &ret
  5927  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5928  		return nil, err
  5929  	}
  5930  	return ret, nil
  5931  }
  5932  
  5933  // Pages invokes f for each page of results.
  5934  // A non-nil error returned from f will halt the iteration.
  5935  // The provided context supersedes any context provided to the Context method.
  5936  func (c *ResourceRecordSetsListCall) Pages(ctx context.Context, f func(*ResourceRecordSetsListResponse) error) error {
  5937  	c.ctx_ = ctx
  5938  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  5939  	for {
  5940  		x, err := c.Do()
  5941  		if err != nil {
  5942  			return err
  5943  		}
  5944  		if err := f(x); err != nil {
  5945  			return err
  5946  		}
  5947  		if x.NextPageToken == "" {
  5948  			return nil
  5949  		}
  5950  		c.PageToken(x.NextPageToken)
  5951  	}
  5952  }
  5953  
  5954  type ResourceRecordSetsPatchCall struct {
  5955  	s                 *Service
  5956  	project           string
  5957  	managedZone       string
  5958  	name              string
  5959  	type_             string
  5960  	resourcerecordset *ResourceRecordSet
  5961  	urlParams_        gensupport.URLParams
  5962  	ctx_              context.Context
  5963  	header_           http.Header
  5964  }
  5965  
  5966  // Patch: Applies a partial update to an existing ResourceRecordSet.
  5967  //
  5968  //   - managedZone: Identifies the managed zone addressed by this request. Can be
  5969  //     the managed zone name or ID.
  5970  //   - name: Fully qualified domain name.
  5971  //   - project: Identifies the project addressed by this request.
  5972  //   - type: RRSet type.
  5973  func (r *ResourceRecordSetsService) Patch(project string, managedZone string, name string, type_ string, resourcerecordset *ResourceRecordSet) *ResourceRecordSetsPatchCall {
  5974  	c := &ResourceRecordSetsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5975  	c.project = project
  5976  	c.managedZone = managedZone
  5977  	c.name = name
  5978  	c.type_ = type_
  5979  	c.resourcerecordset = resourcerecordset
  5980  	return c
  5981  }
  5982  
  5983  // ClientOperationId sets the optional parameter "clientOperationId": For
  5984  // mutating operation requests only. An optional identifier specified by the
  5985  // client. Must be unique for operation resources in the Operations collection.
  5986  func (c *ResourceRecordSetsPatchCall) ClientOperationId(clientOperationId string) *ResourceRecordSetsPatchCall {
  5987  	c.urlParams_.Set("clientOperationId", clientOperationId)
  5988  	return c
  5989  }
  5990  
  5991  // Fields allows partial responses to be retrieved. See
  5992  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5993  // details.
  5994  func (c *ResourceRecordSetsPatchCall) Fields(s ...googleapi.Field) *ResourceRecordSetsPatchCall {
  5995  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5996  	return c
  5997  }
  5998  
  5999  // Context sets the context to be used in this call's Do method.
  6000  func (c *ResourceRecordSetsPatchCall) Context(ctx context.Context) *ResourceRecordSetsPatchCall {
  6001  	c.ctx_ = ctx
  6002  	return c
  6003  }
  6004  
  6005  // Header returns a http.Header that can be modified by the caller to add
  6006  // headers to the request.
  6007  func (c *ResourceRecordSetsPatchCall) Header() http.Header {
  6008  	if c.header_ == nil {
  6009  		c.header_ = make(http.Header)
  6010  	}
  6011  	return c.header_
  6012  }
  6013  
  6014  func (c *ResourceRecordSetsPatchCall) doRequest(alt string) (*http.Response, error) {
  6015  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  6016  	var body io.Reader = nil
  6017  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.resourcerecordset)
  6018  	if err != nil {
  6019  		return nil, err
  6020  	}
  6021  	c.urlParams_.Set("alt", alt)
  6022  	c.urlParams_.Set("prettyPrint", "false")
  6023  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1beta2/projects/{project}/managedZones/{managedZone}/rrsets/{name}/{type}")
  6024  	urls += "?" + c.urlParams_.Encode()
  6025  	req, err := http.NewRequest("PATCH", urls, body)
  6026  	if err != nil {
  6027  		return nil, err
  6028  	}
  6029  	req.Header = reqHeaders
  6030  	googleapi.Expand(req.URL, map[string]string{
  6031  		"project":     c.project,
  6032  		"managedZone": c.managedZone,
  6033  		"name":        c.name,
  6034  		"type":        c.type_,
  6035  	})
  6036  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6037  }
  6038  
  6039  // Do executes the "dns.resourceRecordSets.patch" call.
  6040  // Any non-2xx status code is an error. Response headers are in either
  6041  // *ResourceRecordSet.ServerResponse.Header or (if a response was returned at
  6042  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  6043  // check whether the returned error was because http.StatusNotModified was
  6044  // returned.
  6045  func (c *ResourceRecordSetsPatchCall) Do(opts ...googleapi.CallOption) (*ResourceRecordSet, error) {
  6046  	gensupport.SetOptions(c.urlParams_, opts...)
  6047  	res, err := c.doRequest("json")
  6048  	if res != nil && res.StatusCode == http.StatusNotModified {
  6049  		if res.Body != nil {
  6050  			res.Body.Close()
  6051  		}
  6052  		return nil, gensupport.WrapError(&googleapi.Error{
  6053  			Code:   res.StatusCode,
  6054  			Header: res.Header,
  6055  		})
  6056  	}
  6057  	if err != nil {
  6058  		return nil, err
  6059  	}
  6060  	defer googleapi.CloseBody(res)
  6061  	if err := googleapi.CheckResponse(res); err != nil {
  6062  		return nil, gensupport.WrapError(err)
  6063  	}
  6064  	ret := &ResourceRecordSet{
  6065  		ServerResponse: googleapi.ServerResponse{
  6066  			Header:         res.Header,
  6067  			HTTPStatusCode: res.StatusCode,
  6068  		},
  6069  	}
  6070  	target := &ret
  6071  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6072  		return nil, err
  6073  	}
  6074  	return ret, nil
  6075  }
  6076  
  6077  type ResponsePoliciesCreateCall struct {
  6078  	s              *Service
  6079  	project        string
  6080  	responsepolicy *ResponsePolicy
  6081  	urlParams_     gensupport.URLParams
  6082  	ctx_           context.Context
  6083  	header_        http.Header
  6084  }
  6085  
  6086  // Create: Creates a new Response Policy
  6087  //
  6088  // - project: Identifies the project addressed by this request.
  6089  func (r *ResponsePoliciesService) Create(project string, responsepolicy *ResponsePolicy) *ResponsePoliciesCreateCall {
  6090  	c := &ResponsePoliciesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6091  	c.project = project
  6092  	c.responsepolicy = responsepolicy
  6093  	return c
  6094  }
  6095  
  6096  // ClientOperationId sets the optional parameter "clientOperationId": For
  6097  // mutating operation requests only. An optional identifier specified by the
  6098  // client. Must be unique for operation resources in the Operations collection.
  6099  func (c *ResponsePoliciesCreateCall) ClientOperationId(clientOperationId string) *ResponsePoliciesCreateCall {
  6100  	c.urlParams_.Set("clientOperationId", clientOperationId)
  6101  	return c
  6102  }
  6103  
  6104  // Fields allows partial responses to be retrieved. See
  6105  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6106  // details.
  6107  func (c *ResponsePoliciesCreateCall) Fields(s ...googleapi.Field) *ResponsePoliciesCreateCall {
  6108  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6109  	return c
  6110  }
  6111  
  6112  // Context sets the context to be used in this call's Do method.
  6113  func (c *ResponsePoliciesCreateCall) Context(ctx context.Context) *ResponsePoliciesCreateCall {
  6114  	c.ctx_ = ctx
  6115  	return c
  6116  }
  6117  
  6118  // Header returns a http.Header that can be modified by the caller to add
  6119  // headers to the request.
  6120  func (c *ResponsePoliciesCreateCall) Header() http.Header {
  6121  	if c.header_ == nil {
  6122  		c.header_ = make(http.Header)
  6123  	}
  6124  	return c.header_
  6125  }
  6126  
  6127  func (c *ResponsePoliciesCreateCall) doRequest(alt string) (*http.Response, error) {
  6128  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  6129  	var body io.Reader = nil
  6130  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.responsepolicy)
  6131  	if err != nil {
  6132  		return nil, err
  6133  	}
  6134  	c.urlParams_.Set("alt", alt)
  6135  	c.urlParams_.Set("prettyPrint", "false")
  6136  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1beta2/projects/{project}/responsePolicies")
  6137  	urls += "?" + c.urlParams_.Encode()
  6138  	req, err := http.NewRequest("POST", urls, body)
  6139  	if err != nil {
  6140  		return nil, err
  6141  	}
  6142  	req.Header = reqHeaders
  6143  	googleapi.Expand(req.URL, map[string]string{
  6144  		"project": c.project,
  6145  	})
  6146  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6147  }
  6148  
  6149  // Do executes the "dns.responsePolicies.create" call.
  6150  // Any non-2xx status code is an error. Response headers are in either
  6151  // *ResponsePolicy.ServerResponse.Header or (if a response was returned at all)
  6152  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6153  // whether the returned error was because http.StatusNotModified was returned.
  6154  func (c *ResponsePoliciesCreateCall) Do(opts ...googleapi.CallOption) (*ResponsePolicy, error) {
  6155  	gensupport.SetOptions(c.urlParams_, opts...)
  6156  	res, err := c.doRequest("json")
  6157  	if res != nil && res.StatusCode == http.StatusNotModified {
  6158  		if res.Body != nil {
  6159  			res.Body.Close()
  6160  		}
  6161  		return nil, gensupport.WrapError(&googleapi.Error{
  6162  			Code:   res.StatusCode,
  6163  			Header: res.Header,
  6164  		})
  6165  	}
  6166  	if err != nil {
  6167  		return nil, err
  6168  	}
  6169  	defer googleapi.CloseBody(res)
  6170  	if err := googleapi.CheckResponse(res); err != nil {
  6171  		return nil, gensupport.WrapError(err)
  6172  	}
  6173  	ret := &ResponsePolicy{
  6174  		ServerResponse: googleapi.ServerResponse{
  6175  			Header:         res.Header,
  6176  			HTTPStatusCode: res.StatusCode,
  6177  		},
  6178  	}
  6179  	target := &ret
  6180  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6181  		return nil, err
  6182  	}
  6183  	return ret, nil
  6184  }
  6185  
  6186  type ResponsePoliciesDeleteCall struct {
  6187  	s              *Service
  6188  	project        string
  6189  	responsePolicy string
  6190  	urlParams_     gensupport.URLParams
  6191  	ctx_           context.Context
  6192  	header_        http.Header
  6193  }
  6194  
  6195  // Delete: Deletes a previously created Response Policy. Fails if the response
  6196  // policy is non-empty or still being referenced by a network.
  6197  //
  6198  //   - project: Identifies the project addressed by this request.
  6199  //   - responsePolicy: User assigned name of the Response Policy addressed by
  6200  //     this request.
  6201  func (r *ResponsePoliciesService) Delete(project string, responsePolicy string) *ResponsePoliciesDeleteCall {
  6202  	c := &ResponsePoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6203  	c.project = project
  6204  	c.responsePolicy = responsePolicy
  6205  	return c
  6206  }
  6207  
  6208  // ClientOperationId sets the optional parameter "clientOperationId": For
  6209  // mutating operation requests only. An optional identifier specified by the
  6210  // client. Must be unique for operation resources in the Operations collection.
  6211  func (c *ResponsePoliciesDeleteCall) ClientOperationId(clientOperationId string) *ResponsePoliciesDeleteCall {
  6212  	c.urlParams_.Set("clientOperationId", clientOperationId)
  6213  	return c
  6214  }
  6215  
  6216  // Fields allows partial responses to be retrieved. See
  6217  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6218  // details.
  6219  func (c *ResponsePoliciesDeleteCall) Fields(s ...googleapi.Field) *ResponsePoliciesDeleteCall {
  6220  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6221  	return c
  6222  }
  6223  
  6224  // Context sets the context to be used in this call's Do method.
  6225  func (c *ResponsePoliciesDeleteCall) Context(ctx context.Context) *ResponsePoliciesDeleteCall {
  6226  	c.ctx_ = ctx
  6227  	return c
  6228  }
  6229  
  6230  // Header returns a http.Header that can be modified by the caller to add
  6231  // headers to the request.
  6232  func (c *ResponsePoliciesDeleteCall) Header() http.Header {
  6233  	if c.header_ == nil {
  6234  		c.header_ = make(http.Header)
  6235  	}
  6236  	return c.header_
  6237  }
  6238  
  6239  func (c *ResponsePoliciesDeleteCall) doRequest(alt string) (*http.Response, error) {
  6240  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6241  	var body io.Reader = nil
  6242  	c.urlParams_.Set("alt", alt)
  6243  	c.urlParams_.Set("prettyPrint", "false")
  6244  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1beta2/projects/{project}/responsePolicies/{responsePolicy}")
  6245  	urls += "?" + c.urlParams_.Encode()
  6246  	req, err := http.NewRequest("DELETE", urls, body)
  6247  	if err != nil {
  6248  		return nil, err
  6249  	}
  6250  	req.Header = reqHeaders
  6251  	googleapi.Expand(req.URL, map[string]string{
  6252  		"project":        c.project,
  6253  		"responsePolicy": c.responsePolicy,
  6254  	})
  6255  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6256  }
  6257  
  6258  // Do executes the "dns.responsePolicies.delete" call.
  6259  func (c *ResponsePoliciesDeleteCall) Do(opts ...googleapi.CallOption) error {
  6260  	gensupport.SetOptions(c.urlParams_, opts...)
  6261  	res, err := c.doRequest("json")
  6262  	if err != nil {
  6263  		return err
  6264  	}
  6265  	defer googleapi.CloseBody(res)
  6266  	if err := googleapi.CheckResponse(res); err != nil {
  6267  		return gensupport.WrapError(err)
  6268  	}
  6269  	return nil
  6270  }
  6271  
  6272  type ResponsePoliciesGetCall struct {
  6273  	s              *Service
  6274  	project        string
  6275  	responsePolicy string
  6276  	urlParams_     gensupport.URLParams
  6277  	ifNoneMatch_   string
  6278  	ctx_           context.Context
  6279  	header_        http.Header
  6280  }
  6281  
  6282  // Get: Fetches the representation of an existing Response Policy.
  6283  //
  6284  //   - project: Identifies the project addressed by this request.
  6285  //   - responsePolicy: User assigned name of the Response Policy addressed by
  6286  //     this request.
  6287  func (r *ResponsePoliciesService) Get(project string, responsePolicy string) *ResponsePoliciesGetCall {
  6288  	c := &ResponsePoliciesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6289  	c.project = project
  6290  	c.responsePolicy = responsePolicy
  6291  	return c
  6292  }
  6293  
  6294  // ClientOperationId sets the optional parameter "clientOperationId": For
  6295  // mutating operation requests only. An optional identifier specified by the
  6296  // client. Must be unique for operation resources in the Operations collection.
  6297  func (c *ResponsePoliciesGetCall) ClientOperationId(clientOperationId string) *ResponsePoliciesGetCall {
  6298  	c.urlParams_.Set("clientOperationId", clientOperationId)
  6299  	return c
  6300  }
  6301  
  6302  // Fields allows partial responses to be retrieved. See
  6303  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6304  // details.
  6305  func (c *ResponsePoliciesGetCall) Fields(s ...googleapi.Field) *ResponsePoliciesGetCall {
  6306  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6307  	return c
  6308  }
  6309  
  6310  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  6311  // object's ETag matches the given value. This is useful for getting updates
  6312  // only after the object has changed since the last request.
  6313  func (c *ResponsePoliciesGetCall) IfNoneMatch(entityTag string) *ResponsePoliciesGetCall {
  6314  	c.ifNoneMatch_ = entityTag
  6315  	return c
  6316  }
  6317  
  6318  // Context sets the context to be used in this call's Do method.
  6319  func (c *ResponsePoliciesGetCall) Context(ctx context.Context) *ResponsePoliciesGetCall {
  6320  	c.ctx_ = ctx
  6321  	return c
  6322  }
  6323  
  6324  // Header returns a http.Header that can be modified by the caller to add
  6325  // headers to the request.
  6326  func (c *ResponsePoliciesGetCall) Header() http.Header {
  6327  	if c.header_ == nil {
  6328  		c.header_ = make(http.Header)
  6329  	}
  6330  	return c.header_
  6331  }
  6332  
  6333  func (c *ResponsePoliciesGetCall) doRequest(alt string) (*http.Response, error) {
  6334  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6335  	if c.ifNoneMatch_ != "" {
  6336  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6337  	}
  6338  	var body io.Reader = nil
  6339  	c.urlParams_.Set("alt", alt)
  6340  	c.urlParams_.Set("prettyPrint", "false")
  6341  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1beta2/projects/{project}/responsePolicies/{responsePolicy}")
  6342  	urls += "?" + c.urlParams_.Encode()
  6343  	req, err := http.NewRequest("GET", urls, body)
  6344  	if err != nil {
  6345  		return nil, err
  6346  	}
  6347  	req.Header = reqHeaders
  6348  	googleapi.Expand(req.URL, map[string]string{
  6349  		"project":        c.project,
  6350  		"responsePolicy": c.responsePolicy,
  6351  	})
  6352  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6353  }
  6354  
  6355  // Do executes the "dns.responsePolicies.get" call.
  6356  // Any non-2xx status code is an error. Response headers are in either
  6357  // *ResponsePolicy.ServerResponse.Header or (if a response was returned at all)
  6358  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6359  // whether the returned error was because http.StatusNotModified was returned.
  6360  func (c *ResponsePoliciesGetCall) Do(opts ...googleapi.CallOption) (*ResponsePolicy, error) {
  6361  	gensupport.SetOptions(c.urlParams_, opts...)
  6362  	res, err := c.doRequest("json")
  6363  	if res != nil && res.StatusCode == http.StatusNotModified {
  6364  		if res.Body != nil {
  6365  			res.Body.Close()
  6366  		}
  6367  		return nil, gensupport.WrapError(&googleapi.Error{
  6368  			Code:   res.StatusCode,
  6369  			Header: res.Header,
  6370  		})
  6371  	}
  6372  	if err != nil {
  6373  		return nil, err
  6374  	}
  6375  	defer googleapi.CloseBody(res)
  6376  	if err := googleapi.CheckResponse(res); err != nil {
  6377  		return nil, gensupport.WrapError(err)
  6378  	}
  6379  	ret := &ResponsePolicy{
  6380  		ServerResponse: googleapi.ServerResponse{
  6381  			Header:         res.Header,
  6382  			HTTPStatusCode: res.StatusCode,
  6383  		},
  6384  	}
  6385  	target := &ret
  6386  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6387  		return nil, err
  6388  	}
  6389  	return ret, nil
  6390  }
  6391  
  6392  type ResponsePoliciesListCall struct {
  6393  	s            *Service
  6394  	project      string
  6395  	urlParams_   gensupport.URLParams
  6396  	ifNoneMatch_ string
  6397  	ctx_         context.Context
  6398  	header_      http.Header
  6399  }
  6400  
  6401  // List: Enumerates all Response Policies associated with a project.
  6402  //
  6403  // - project: Identifies the project addressed by this request.
  6404  func (r *ResponsePoliciesService) List(project string) *ResponsePoliciesListCall {
  6405  	c := &ResponsePoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6406  	c.project = project
  6407  	return c
  6408  }
  6409  
  6410  // MaxResults sets the optional parameter "maxResults": Maximum number of
  6411  // results to be returned. If unspecified, the server decides how many results
  6412  // to return.
  6413  func (c *ResponsePoliciesListCall) MaxResults(maxResults int64) *ResponsePoliciesListCall {
  6414  	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  6415  	return c
  6416  }
  6417  
  6418  // PageToken sets the optional parameter "pageToken": A tag returned by a
  6419  // previous list request that was truncated. Use this parameter to continue a
  6420  // previous list request.
  6421  func (c *ResponsePoliciesListCall) PageToken(pageToken string) *ResponsePoliciesListCall {
  6422  	c.urlParams_.Set("pageToken", pageToken)
  6423  	return c
  6424  }
  6425  
  6426  // Fields allows partial responses to be retrieved. See
  6427  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6428  // details.
  6429  func (c *ResponsePoliciesListCall) Fields(s ...googleapi.Field) *ResponsePoliciesListCall {
  6430  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6431  	return c
  6432  }
  6433  
  6434  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  6435  // object's ETag matches the given value. This is useful for getting updates
  6436  // only after the object has changed since the last request.
  6437  func (c *ResponsePoliciesListCall) IfNoneMatch(entityTag string) *ResponsePoliciesListCall {
  6438  	c.ifNoneMatch_ = entityTag
  6439  	return c
  6440  }
  6441  
  6442  // Context sets the context to be used in this call's Do method.
  6443  func (c *ResponsePoliciesListCall) Context(ctx context.Context) *ResponsePoliciesListCall {
  6444  	c.ctx_ = ctx
  6445  	return c
  6446  }
  6447  
  6448  // Header returns a http.Header that can be modified by the caller to add
  6449  // headers to the request.
  6450  func (c *ResponsePoliciesListCall) Header() http.Header {
  6451  	if c.header_ == nil {
  6452  		c.header_ = make(http.Header)
  6453  	}
  6454  	return c.header_
  6455  }
  6456  
  6457  func (c *ResponsePoliciesListCall) doRequest(alt string) (*http.Response, error) {
  6458  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6459  	if c.ifNoneMatch_ != "" {
  6460  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6461  	}
  6462  	var body io.Reader = nil
  6463  	c.urlParams_.Set("alt", alt)
  6464  	c.urlParams_.Set("prettyPrint", "false")
  6465  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1beta2/projects/{project}/responsePolicies")
  6466  	urls += "?" + c.urlParams_.Encode()
  6467  	req, err := http.NewRequest("GET", urls, body)
  6468  	if err != nil {
  6469  		return nil, err
  6470  	}
  6471  	req.Header = reqHeaders
  6472  	googleapi.Expand(req.URL, map[string]string{
  6473  		"project": c.project,
  6474  	})
  6475  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6476  }
  6477  
  6478  // Do executes the "dns.responsePolicies.list" call.
  6479  // Any non-2xx status code is an error. Response headers are in either
  6480  // *ResponsePoliciesListResponse.ServerResponse.Header or (if a response was
  6481  // returned at all) in error.(*googleapi.Error).Header. Use
  6482  // googleapi.IsNotModified to check whether the returned error was because
  6483  // http.StatusNotModified was returned.
  6484  func (c *ResponsePoliciesListCall) Do(opts ...googleapi.CallOption) (*ResponsePoliciesListResponse, error) {
  6485  	gensupport.SetOptions(c.urlParams_, opts...)
  6486  	res, err := c.doRequest("json")
  6487  	if res != nil && res.StatusCode == http.StatusNotModified {
  6488  		if res.Body != nil {
  6489  			res.Body.Close()
  6490  		}
  6491  		return nil, gensupport.WrapError(&googleapi.Error{
  6492  			Code:   res.StatusCode,
  6493  			Header: res.Header,
  6494  		})
  6495  	}
  6496  	if err != nil {
  6497  		return nil, err
  6498  	}
  6499  	defer googleapi.CloseBody(res)
  6500  	if err := googleapi.CheckResponse(res); err != nil {
  6501  		return nil, gensupport.WrapError(err)
  6502  	}
  6503  	ret := &ResponsePoliciesListResponse{
  6504  		ServerResponse: googleapi.ServerResponse{
  6505  			Header:         res.Header,
  6506  			HTTPStatusCode: res.StatusCode,
  6507  		},
  6508  	}
  6509  	target := &ret
  6510  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6511  		return nil, err
  6512  	}
  6513  	return ret, nil
  6514  }
  6515  
  6516  // Pages invokes f for each page of results.
  6517  // A non-nil error returned from f will halt the iteration.
  6518  // The provided context supersedes any context provided to the Context method.
  6519  func (c *ResponsePoliciesListCall) Pages(ctx context.Context, f func(*ResponsePoliciesListResponse) error) error {
  6520  	c.ctx_ = ctx
  6521  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  6522  	for {
  6523  		x, err := c.Do()
  6524  		if err != nil {
  6525  			return err
  6526  		}
  6527  		if err := f(x); err != nil {
  6528  			return err
  6529  		}
  6530  		if x.NextPageToken == "" {
  6531  			return nil
  6532  		}
  6533  		c.PageToken(x.NextPageToken)
  6534  	}
  6535  }
  6536  
  6537  type ResponsePoliciesPatchCall struct {
  6538  	s              *Service
  6539  	project        string
  6540  	responsePolicy string
  6541  	responsepolicy *ResponsePolicy
  6542  	urlParams_     gensupport.URLParams
  6543  	ctx_           context.Context
  6544  	header_        http.Header
  6545  }
  6546  
  6547  // Patch: Applies a partial update to an existing Response Policy.
  6548  //
  6549  //   - project: Identifies the project addressed by this request.
  6550  //   - responsePolicy: User assigned name of the response policy addressed by
  6551  //     this request.
  6552  func (r *ResponsePoliciesService) Patch(project string, responsePolicy string, responsepolicy *ResponsePolicy) *ResponsePoliciesPatchCall {
  6553  	c := &ResponsePoliciesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6554  	c.project = project
  6555  	c.responsePolicy = responsePolicy
  6556  	c.responsepolicy = responsepolicy
  6557  	return c
  6558  }
  6559  
  6560  // ClientOperationId sets the optional parameter "clientOperationId": For
  6561  // mutating operation requests only. An optional identifier specified by the
  6562  // client. Must be unique for operation resources in the Operations collection.
  6563  func (c *ResponsePoliciesPatchCall) ClientOperationId(clientOperationId string) *ResponsePoliciesPatchCall {
  6564  	c.urlParams_.Set("clientOperationId", clientOperationId)
  6565  	return c
  6566  }
  6567  
  6568  // Fields allows partial responses to be retrieved. See
  6569  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6570  // details.
  6571  func (c *ResponsePoliciesPatchCall) Fields(s ...googleapi.Field) *ResponsePoliciesPatchCall {
  6572  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6573  	return c
  6574  }
  6575  
  6576  // Context sets the context to be used in this call's Do method.
  6577  func (c *ResponsePoliciesPatchCall) Context(ctx context.Context) *ResponsePoliciesPatchCall {
  6578  	c.ctx_ = ctx
  6579  	return c
  6580  }
  6581  
  6582  // Header returns a http.Header that can be modified by the caller to add
  6583  // headers to the request.
  6584  func (c *ResponsePoliciesPatchCall) Header() http.Header {
  6585  	if c.header_ == nil {
  6586  		c.header_ = make(http.Header)
  6587  	}
  6588  	return c.header_
  6589  }
  6590  
  6591  func (c *ResponsePoliciesPatchCall) doRequest(alt string) (*http.Response, error) {
  6592  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  6593  	var body io.Reader = nil
  6594  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.responsepolicy)
  6595  	if err != nil {
  6596  		return nil, err
  6597  	}
  6598  	c.urlParams_.Set("alt", alt)
  6599  	c.urlParams_.Set("prettyPrint", "false")
  6600  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1beta2/projects/{project}/responsePolicies/{responsePolicy}")
  6601  	urls += "?" + c.urlParams_.Encode()
  6602  	req, err := http.NewRequest("PATCH", urls, body)
  6603  	if err != nil {
  6604  		return nil, err
  6605  	}
  6606  	req.Header = reqHeaders
  6607  	googleapi.Expand(req.URL, map[string]string{
  6608  		"project":        c.project,
  6609  		"responsePolicy": c.responsePolicy,
  6610  	})
  6611  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6612  }
  6613  
  6614  // Do executes the "dns.responsePolicies.patch" call.
  6615  // Any non-2xx status code is an error. Response headers are in either
  6616  // *ResponsePoliciesPatchResponse.ServerResponse.Header or (if a response was
  6617  // returned at all) in error.(*googleapi.Error).Header. Use
  6618  // googleapi.IsNotModified to check whether the returned error was because
  6619  // http.StatusNotModified was returned.
  6620  func (c *ResponsePoliciesPatchCall) Do(opts ...googleapi.CallOption) (*ResponsePoliciesPatchResponse, error) {
  6621  	gensupport.SetOptions(c.urlParams_, opts...)
  6622  	res, err := c.doRequest("json")
  6623  	if res != nil && res.StatusCode == http.StatusNotModified {
  6624  		if res.Body != nil {
  6625  			res.Body.Close()
  6626  		}
  6627  		return nil, gensupport.WrapError(&googleapi.Error{
  6628  			Code:   res.StatusCode,
  6629  			Header: res.Header,
  6630  		})
  6631  	}
  6632  	if err != nil {
  6633  		return nil, err
  6634  	}
  6635  	defer googleapi.CloseBody(res)
  6636  	if err := googleapi.CheckResponse(res); err != nil {
  6637  		return nil, gensupport.WrapError(err)
  6638  	}
  6639  	ret := &ResponsePoliciesPatchResponse{
  6640  		ServerResponse: googleapi.ServerResponse{
  6641  			Header:         res.Header,
  6642  			HTTPStatusCode: res.StatusCode,
  6643  		},
  6644  	}
  6645  	target := &ret
  6646  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6647  		return nil, err
  6648  	}
  6649  	return ret, nil
  6650  }
  6651  
  6652  type ResponsePoliciesUpdateCall struct {
  6653  	s              *Service
  6654  	project        string
  6655  	responsePolicy string
  6656  	responsepolicy *ResponsePolicy
  6657  	urlParams_     gensupport.URLParams
  6658  	ctx_           context.Context
  6659  	header_        http.Header
  6660  }
  6661  
  6662  // Update: Updates an existing Response Policy.
  6663  //
  6664  //   - project: Identifies the project addressed by this request.
  6665  //   - responsePolicy: User assigned name of the Response Policy addressed by
  6666  //     this request.
  6667  func (r *ResponsePoliciesService) Update(project string, responsePolicy string, responsepolicy *ResponsePolicy) *ResponsePoliciesUpdateCall {
  6668  	c := &ResponsePoliciesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6669  	c.project = project
  6670  	c.responsePolicy = responsePolicy
  6671  	c.responsepolicy = responsepolicy
  6672  	return c
  6673  }
  6674  
  6675  // ClientOperationId sets the optional parameter "clientOperationId": For
  6676  // mutating operation requests only. An optional identifier specified by the
  6677  // client. Must be unique for operation resources in the Operations collection.
  6678  func (c *ResponsePoliciesUpdateCall) ClientOperationId(clientOperationId string) *ResponsePoliciesUpdateCall {
  6679  	c.urlParams_.Set("clientOperationId", clientOperationId)
  6680  	return c
  6681  }
  6682  
  6683  // Fields allows partial responses to be retrieved. See
  6684  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6685  // details.
  6686  func (c *ResponsePoliciesUpdateCall) Fields(s ...googleapi.Field) *ResponsePoliciesUpdateCall {
  6687  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6688  	return c
  6689  }
  6690  
  6691  // Context sets the context to be used in this call's Do method.
  6692  func (c *ResponsePoliciesUpdateCall) Context(ctx context.Context) *ResponsePoliciesUpdateCall {
  6693  	c.ctx_ = ctx
  6694  	return c
  6695  }
  6696  
  6697  // Header returns a http.Header that can be modified by the caller to add
  6698  // headers to the request.
  6699  func (c *ResponsePoliciesUpdateCall) Header() http.Header {
  6700  	if c.header_ == nil {
  6701  		c.header_ = make(http.Header)
  6702  	}
  6703  	return c.header_
  6704  }
  6705  
  6706  func (c *ResponsePoliciesUpdateCall) doRequest(alt string) (*http.Response, error) {
  6707  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  6708  	var body io.Reader = nil
  6709  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.responsepolicy)
  6710  	if err != nil {
  6711  		return nil, err
  6712  	}
  6713  	c.urlParams_.Set("alt", alt)
  6714  	c.urlParams_.Set("prettyPrint", "false")
  6715  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1beta2/projects/{project}/responsePolicies/{responsePolicy}")
  6716  	urls += "?" + c.urlParams_.Encode()
  6717  	req, err := http.NewRequest("PUT", urls, body)
  6718  	if err != nil {
  6719  		return nil, err
  6720  	}
  6721  	req.Header = reqHeaders
  6722  	googleapi.Expand(req.URL, map[string]string{
  6723  		"project":        c.project,
  6724  		"responsePolicy": c.responsePolicy,
  6725  	})
  6726  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6727  }
  6728  
  6729  // Do executes the "dns.responsePolicies.update" call.
  6730  // Any non-2xx status code is an error. Response headers are in either
  6731  // *ResponsePoliciesUpdateResponse.ServerResponse.Header or (if a response was
  6732  // returned at all) in error.(*googleapi.Error).Header. Use
  6733  // googleapi.IsNotModified to check whether the returned error was because
  6734  // http.StatusNotModified was returned.
  6735  func (c *ResponsePoliciesUpdateCall) Do(opts ...googleapi.CallOption) (*ResponsePoliciesUpdateResponse, error) {
  6736  	gensupport.SetOptions(c.urlParams_, opts...)
  6737  	res, err := c.doRequest("json")
  6738  	if res != nil && res.StatusCode == http.StatusNotModified {
  6739  		if res.Body != nil {
  6740  			res.Body.Close()
  6741  		}
  6742  		return nil, gensupport.WrapError(&googleapi.Error{
  6743  			Code:   res.StatusCode,
  6744  			Header: res.Header,
  6745  		})
  6746  	}
  6747  	if err != nil {
  6748  		return nil, err
  6749  	}
  6750  	defer googleapi.CloseBody(res)
  6751  	if err := googleapi.CheckResponse(res); err != nil {
  6752  		return nil, gensupport.WrapError(err)
  6753  	}
  6754  	ret := &ResponsePoliciesUpdateResponse{
  6755  		ServerResponse: googleapi.ServerResponse{
  6756  			Header:         res.Header,
  6757  			HTTPStatusCode: res.StatusCode,
  6758  		},
  6759  	}
  6760  	target := &ret
  6761  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6762  		return nil, err
  6763  	}
  6764  	return ret, nil
  6765  }
  6766  
  6767  type ResponsePolicyRulesCreateCall struct {
  6768  	s                  *Service
  6769  	project            string
  6770  	responsePolicy     string
  6771  	responsepolicyrule *ResponsePolicyRule
  6772  	urlParams_         gensupport.URLParams
  6773  	ctx_               context.Context
  6774  	header_            http.Header
  6775  }
  6776  
  6777  // Create: Creates a new Response Policy Rule.
  6778  //
  6779  //   - project: Identifies the project addressed by this request.
  6780  //   - responsePolicy: User assigned name of the Response Policy containing the
  6781  //     Response Policy Rule.
  6782  func (r *ResponsePolicyRulesService) Create(project string, responsePolicy string, responsepolicyrule *ResponsePolicyRule) *ResponsePolicyRulesCreateCall {
  6783  	c := &ResponsePolicyRulesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6784  	c.project = project
  6785  	c.responsePolicy = responsePolicy
  6786  	c.responsepolicyrule = responsepolicyrule
  6787  	return c
  6788  }
  6789  
  6790  // ClientOperationId sets the optional parameter "clientOperationId": For
  6791  // mutating operation requests only. An optional identifier specified by the
  6792  // client. Must be unique for operation resources in the Operations collection.
  6793  func (c *ResponsePolicyRulesCreateCall) ClientOperationId(clientOperationId string) *ResponsePolicyRulesCreateCall {
  6794  	c.urlParams_.Set("clientOperationId", clientOperationId)
  6795  	return c
  6796  }
  6797  
  6798  // Fields allows partial responses to be retrieved. See
  6799  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6800  // details.
  6801  func (c *ResponsePolicyRulesCreateCall) Fields(s ...googleapi.Field) *ResponsePolicyRulesCreateCall {
  6802  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6803  	return c
  6804  }
  6805  
  6806  // Context sets the context to be used in this call's Do method.
  6807  func (c *ResponsePolicyRulesCreateCall) Context(ctx context.Context) *ResponsePolicyRulesCreateCall {
  6808  	c.ctx_ = ctx
  6809  	return c
  6810  }
  6811  
  6812  // Header returns a http.Header that can be modified by the caller to add
  6813  // headers to the request.
  6814  func (c *ResponsePolicyRulesCreateCall) Header() http.Header {
  6815  	if c.header_ == nil {
  6816  		c.header_ = make(http.Header)
  6817  	}
  6818  	return c.header_
  6819  }
  6820  
  6821  func (c *ResponsePolicyRulesCreateCall) doRequest(alt string) (*http.Response, error) {
  6822  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  6823  	var body io.Reader = nil
  6824  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.responsepolicyrule)
  6825  	if err != nil {
  6826  		return nil, err
  6827  	}
  6828  	c.urlParams_.Set("alt", alt)
  6829  	c.urlParams_.Set("prettyPrint", "false")
  6830  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1beta2/projects/{project}/responsePolicies/{responsePolicy}/rules")
  6831  	urls += "?" + c.urlParams_.Encode()
  6832  	req, err := http.NewRequest("POST", urls, body)
  6833  	if err != nil {
  6834  		return nil, err
  6835  	}
  6836  	req.Header = reqHeaders
  6837  	googleapi.Expand(req.URL, map[string]string{
  6838  		"project":        c.project,
  6839  		"responsePolicy": c.responsePolicy,
  6840  	})
  6841  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6842  }
  6843  
  6844  // Do executes the "dns.responsePolicyRules.create" call.
  6845  // Any non-2xx status code is an error. Response headers are in either
  6846  // *ResponsePolicyRule.ServerResponse.Header or (if a response was returned at
  6847  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  6848  // check whether the returned error was because http.StatusNotModified was
  6849  // returned.
  6850  func (c *ResponsePolicyRulesCreateCall) Do(opts ...googleapi.CallOption) (*ResponsePolicyRule, error) {
  6851  	gensupport.SetOptions(c.urlParams_, opts...)
  6852  	res, err := c.doRequest("json")
  6853  	if res != nil && res.StatusCode == http.StatusNotModified {
  6854  		if res.Body != nil {
  6855  			res.Body.Close()
  6856  		}
  6857  		return nil, gensupport.WrapError(&googleapi.Error{
  6858  			Code:   res.StatusCode,
  6859  			Header: res.Header,
  6860  		})
  6861  	}
  6862  	if err != nil {
  6863  		return nil, err
  6864  	}
  6865  	defer googleapi.CloseBody(res)
  6866  	if err := googleapi.CheckResponse(res); err != nil {
  6867  		return nil, gensupport.WrapError(err)
  6868  	}
  6869  	ret := &ResponsePolicyRule{
  6870  		ServerResponse: googleapi.ServerResponse{
  6871  			Header:         res.Header,
  6872  			HTTPStatusCode: res.StatusCode,
  6873  		},
  6874  	}
  6875  	target := &ret
  6876  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6877  		return nil, err
  6878  	}
  6879  	return ret, nil
  6880  }
  6881  
  6882  type ResponsePolicyRulesDeleteCall struct {
  6883  	s                  *Service
  6884  	project            string
  6885  	responsePolicy     string
  6886  	responsePolicyRule string
  6887  	urlParams_         gensupport.URLParams
  6888  	ctx_               context.Context
  6889  	header_            http.Header
  6890  }
  6891  
  6892  // Delete: Deletes a previously created Response Policy Rule.
  6893  //
  6894  //   - project: Identifies the project addressed by this request.
  6895  //   - responsePolicy: User assigned name of the Response Policy containing the
  6896  //     Response Policy Rule.
  6897  //   - responsePolicyRule: User assigned name of the Response Policy Rule
  6898  //     addressed by this request.
  6899  func (r *ResponsePolicyRulesService) Delete(project string, responsePolicy string, responsePolicyRule string) *ResponsePolicyRulesDeleteCall {
  6900  	c := &ResponsePolicyRulesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6901  	c.project = project
  6902  	c.responsePolicy = responsePolicy
  6903  	c.responsePolicyRule = responsePolicyRule
  6904  	return c
  6905  }
  6906  
  6907  // ClientOperationId sets the optional parameter "clientOperationId": For
  6908  // mutating operation requests only. An optional identifier specified by the
  6909  // client. Must be unique for operation resources in the Operations collection.
  6910  func (c *ResponsePolicyRulesDeleteCall) ClientOperationId(clientOperationId string) *ResponsePolicyRulesDeleteCall {
  6911  	c.urlParams_.Set("clientOperationId", clientOperationId)
  6912  	return c
  6913  }
  6914  
  6915  // Fields allows partial responses to be retrieved. See
  6916  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6917  // details.
  6918  func (c *ResponsePolicyRulesDeleteCall) Fields(s ...googleapi.Field) *ResponsePolicyRulesDeleteCall {
  6919  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6920  	return c
  6921  }
  6922  
  6923  // Context sets the context to be used in this call's Do method.
  6924  func (c *ResponsePolicyRulesDeleteCall) Context(ctx context.Context) *ResponsePolicyRulesDeleteCall {
  6925  	c.ctx_ = ctx
  6926  	return c
  6927  }
  6928  
  6929  // Header returns a http.Header that can be modified by the caller to add
  6930  // headers to the request.
  6931  func (c *ResponsePolicyRulesDeleteCall) Header() http.Header {
  6932  	if c.header_ == nil {
  6933  		c.header_ = make(http.Header)
  6934  	}
  6935  	return c.header_
  6936  }
  6937  
  6938  func (c *ResponsePolicyRulesDeleteCall) doRequest(alt string) (*http.Response, error) {
  6939  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6940  	var body io.Reader = nil
  6941  	c.urlParams_.Set("alt", alt)
  6942  	c.urlParams_.Set("prettyPrint", "false")
  6943  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1beta2/projects/{project}/responsePolicies/{responsePolicy}/rules/{responsePolicyRule}")
  6944  	urls += "?" + c.urlParams_.Encode()
  6945  	req, err := http.NewRequest("DELETE", urls, body)
  6946  	if err != nil {
  6947  		return nil, err
  6948  	}
  6949  	req.Header = reqHeaders
  6950  	googleapi.Expand(req.URL, map[string]string{
  6951  		"project":            c.project,
  6952  		"responsePolicy":     c.responsePolicy,
  6953  		"responsePolicyRule": c.responsePolicyRule,
  6954  	})
  6955  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6956  }
  6957  
  6958  // Do executes the "dns.responsePolicyRules.delete" call.
  6959  func (c *ResponsePolicyRulesDeleteCall) Do(opts ...googleapi.CallOption) error {
  6960  	gensupport.SetOptions(c.urlParams_, opts...)
  6961  	res, err := c.doRequest("json")
  6962  	if err != nil {
  6963  		return err
  6964  	}
  6965  	defer googleapi.CloseBody(res)
  6966  	if err := googleapi.CheckResponse(res); err != nil {
  6967  		return gensupport.WrapError(err)
  6968  	}
  6969  	return nil
  6970  }
  6971  
  6972  type ResponsePolicyRulesGetCall struct {
  6973  	s                  *Service
  6974  	project            string
  6975  	responsePolicy     string
  6976  	responsePolicyRule string
  6977  	urlParams_         gensupport.URLParams
  6978  	ifNoneMatch_       string
  6979  	ctx_               context.Context
  6980  	header_            http.Header
  6981  }
  6982  
  6983  // Get: Fetches the representation of an existing Response Policy Rule.
  6984  //
  6985  //   - project: Identifies the project addressed by this request.
  6986  //   - responsePolicy: User assigned name of the Response Policy containing the
  6987  //     Response Policy Rule.
  6988  //   - responsePolicyRule: User assigned name of the Response Policy Rule
  6989  //     addressed by this request.
  6990  func (r *ResponsePolicyRulesService) Get(project string, responsePolicy string, responsePolicyRule string) *ResponsePolicyRulesGetCall {
  6991  	c := &ResponsePolicyRulesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6992  	c.project = project
  6993  	c.responsePolicy = responsePolicy
  6994  	c.responsePolicyRule = responsePolicyRule
  6995  	return c
  6996  }
  6997  
  6998  // ClientOperationId sets the optional parameter "clientOperationId": For
  6999  // mutating operation requests only. An optional identifier specified by the
  7000  // client. Must be unique for operation resources in the Operations collection.
  7001  func (c *ResponsePolicyRulesGetCall) ClientOperationId(clientOperationId string) *ResponsePolicyRulesGetCall {
  7002  	c.urlParams_.Set("clientOperationId", clientOperationId)
  7003  	return c
  7004  }
  7005  
  7006  // Fields allows partial responses to be retrieved. See
  7007  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7008  // details.
  7009  func (c *ResponsePolicyRulesGetCall) Fields(s ...googleapi.Field) *ResponsePolicyRulesGetCall {
  7010  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7011  	return c
  7012  }
  7013  
  7014  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  7015  // object's ETag matches the given value. This is useful for getting updates
  7016  // only after the object has changed since the last request.
  7017  func (c *ResponsePolicyRulesGetCall) IfNoneMatch(entityTag string) *ResponsePolicyRulesGetCall {
  7018  	c.ifNoneMatch_ = entityTag
  7019  	return c
  7020  }
  7021  
  7022  // Context sets the context to be used in this call's Do method.
  7023  func (c *ResponsePolicyRulesGetCall) Context(ctx context.Context) *ResponsePolicyRulesGetCall {
  7024  	c.ctx_ = ctx
  7025  	return c
  7026  }
  7027  
  7028  // Header returns a http.Header that can be modified by the caller to add
  7029  // headers to the request.
  7030  func (c *ResponsePolicyRulesGetCall) Header() http.Header {
  7031  	if c.header_ == nil {
  7032  		c.header_ = make(http.Header)
  7033  	}
  7034  	return c.header_
  7035  }
  7036  
  7037  func (c *ResponsePolicyRulesGetCall) doRequest(alt string) (*http.Response, error) {
  7038  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  7039  	if c.ifNoneMatch_ != "" {
  7040  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7041  	}
  7042  	var body io.Reader = nil
  7043  	c.urlParams_.Set("alt", alt)
  7044  	c.urlParams_.Set("prettyPrint", "false")
  7045  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1beta2/projects/{project}/responsePolicies/{responsePolicy}/rules/{responsePolicyRule}")
  7046  	urls += "?" + c.urlParams_.Encode()
  7047  	req, err := http.NewRequest("GET", urls, body)
  7048  	if err != nil {
  7049  		return nil, err
  7050  	}
  7051  	req.Header = reqHeaders
  7052  	googleapi.Expand(req.URL, map[string]string{
  7053  		"project":            c.project,
  7054  		"responsePolicy":     c.responsePolicy,
  7055  		"responsePolicyRule": c.responsePolicyRule,
  7056  	})
  7057  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7058  }
  7059  
  7060  // Do executes the "dns.responsePolicyRules.get" call.
  7061  // Any non-2xx status code is an error. Response headers are in either
  7062  // *ResponsePolicyRule.ServerResponse.Header or (if a response was returned at
  7063  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  7064  // check whether the returned error was because http.StatusNotModified was
  7065  // returned.
  7066  func (c *ResponsePolicyRulesGetCall) Do(opts ...googleapi.CallOption) (*ResponsePolicyRule, error) {
  7067  	gensupport.SetOptions(c.urlParams_, opts...)
  7068  	res, err := c.doRequest("json")
  7069  	if res != nil && res.StatusCode == http.StatusNotModified {
  7070  		if res.Body != nil {
  7071  			res.Body.Close()
  7072  		}
  7073  		return nil, gensupport.WrapError(&googleapi.Error{
  7074  			Code:   res.StatusCode,
  7075  			Header: res.Header,
  7076  		})
  7077  	}
  7078  	if err != nil {
  7079  		return nil, err
  7080  	}
  7081  	defer googleapi.CloseBody(res)
  7082  	if err := googleapi.CheckResponse(res); err != nil {
  7083  		return nil, gensupport.WrapError(err)
  7084  	}
  7085  	ret := &ResponsePolicyRule{
  7086  		ServerResponse: googleapi.ServerResponse{
  7087  			Header:         res.Header,
  7088  			HTTPStatusCode: res.StatusCode,
  7089  		},
  7090  	}
  7091  	target := &ret
  7092  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7093  		return nil, err
  7094  	}
  7095  	return ret, nil
  7096  }
  7097  
  7098  type ResponsePolicyRulesListCall struct {
  7099  	s              *Service
  7100  	project        string
  7101  	responsePolicy string
  7102  	urlParams_     gensupport.URLParams
  7103  	ifNoneMatch_   string
  7104  	ctx_           context.Context
  7105  	header_        http.Header
  7106  }
  7107  
  7108  // List: Enumerates all Response Policy Rules associated with a project.
  7109  //
  7110  // - project: Identifies the project addressed by this request.
  7111  // - responsePolicy: User assigned name of the Response Policy to list.
  7112  func (r *ResponsePolicyRulesService) List(project string, responsePolicy string) *ResponsePolicyRulesListCall {
  7113  	c := &ResponsePolicyRulesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7114  	c.project = project
  7115  	c.responsePolicy = responsePolicy
  7116  	return c
  7117  }
  7118  
  7119  // MaxResults sets the optional parameter "maxResults": Maximum number of
  7120  // results to be returned. If unspecified, the server decides how many results
  7121  // to return.
  7122  func (c *ResponsePolicyRulesListCall) MaxResults(maxResults int64) *ResponsePolicyRulesListCall {
  7123  	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  7124  	return c
  7125  }
  7126  
  7127  // PageToken sets the optional parameter "pageToken": A tag returned by a
  7128  // previous list request that was truncated. Use this parameter to continue a
  7129  // previous list request.
  7130  func (c *ResponsePolicyRulesListCall) PageToken(pageToken string) *ResponsePolicyRulesListCall {
  7131  	c.urlParams_.Set("pageToken", pageToken)
  7132  	return c
  7133  }
  7134  
  7135  // Fields allows partial responses to be retrieved. See
  7136  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7137  // details.
  7138  func (c *ResponsePolicyRulesListCall) Fields(s ...googleapi.Field) *ResponsePolicyRulesListCall {
  7139  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7140  	return c
  7141  }
  7142  
  7143  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  7144  // object's ETag matches the given value. This is useful for getting updates
  7145  // only after the object has changed since the last request.
  7146  func (c *ResponsePolicyRulesListCall) IfNoneMatch(entityTag string) *ResponsePolicyRulesListCall {
  7147  	c.ifNoneMatch_ = entityTag
  7148  	return c
  7149  }
  7150  
  7151  // Context sets the context to be used in this call's Do method.
  7152  func (c *ResponsePolicyRulesListCall) Context(ctx context.Context) *ResponsePolicyRulesListCall {
  7153  	c.ctx_ = ctx
  7154  	return c
  7155  }
  7156  
  7157  // Header returns a http.Header that can be modified by the caller to add
  7158  // headers to the request.
  7159  func (c *ResponsePolicyRulesListCall) Header() http.Header {
  7160  	if c.header_ == nil {
  7161  		c.header_ = make(http.Header)
  7162  	}
  7163  	return c.header_
  7164  }
  7165  
  7166  func (c *ResponsePolicyRulesListCall) doRequest(alt string) (*http.Response, error) {
  7167  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  7168  	if c.ifNoneMatch_ != "" {
  7169  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7170  	}
  7171  	var body io.Reader = nil
  7172  	c.urlParams_.Set("alt", alt)
  7173  	c.urlParams_.Set("prettyPrint", "false")
  7174  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1beta2/projects/{project}/responsePolicies/{responsePolicy}/rules")
  7175  	urls += "?" + c.urlParams_.Encode()
  7176  	req, err := http.NewRequest("GET", urls, body)
  7177  	if err != nil {
  7178  		return nil, err
  7179  	}
  7180  	req.Header = reqHeaders
  7181  	googleapi.Expand(req.URL, map[string]string{
  7182  		"project":        c.project,
  7183  		"responsePolicy": c.responsePolicy,
  7184  	})
  7185  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7186  }
  7187  
  7188  // Do executes the "dns.responsePolicyRules.list" call.
  7189  // Any non-2xx status code is an error. Response headers are in either
  7190  // *ResponsePolicyRulesListResponse.ServerResponse.Header or (if a response was
  7191  // returned at all) in error.(*googleapi.Error).Header. Use
  7192  // googleapi.IsNotModified to check whether the returned error was because
  7193  // http.StatusNotModified was returned.
  7194  func (c *ResponsePolicyRulesListCall) Do(opts ...googleapi.CallOption) (*ResponsePolicyRulesListResponse, error) {
  7195  	gensupport.SetOptions(c.urlParams_, opts...)
  7196  	res, err := c.doRequest("json")
  7197  	if res != nil && res.StatusCode == http.StatusNotModified {
  7198  		if res.Body != nil {
  7199  			res.Body.Close()
  7200  		}
  7201  		return nil, gensupport.WrapError(&googleapi.Error{
  7202  			Code:   res.StatusCode,
  7203  			Header: res.Header,
  7204  		})
  7205  	}
  7206  	if err != nil {
  7207  		return nil, err
  7208  	}
  7209  	defer googleapi.CloseBody(res)
  7210  	if err := googleapi.CheckResponse(res); err != nil {
  7211  		return nil, gensupport.WrapError(err)
  7212  	}
  7213  	ret := &ResponsePolicyRulesListResponse{
  7214  		ServerResponse: googleapi.ServerResponse{
  7215  			Header:         res.Header,
  7216  			HTTPStatusCode: res.StatusCode,
  7217  		},
  7218  	}
  7219  	target := &ret
  7220  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7221  		return nil, err
  7222  	}
  7223  	return ret, nil
  7224  }
  7225  
  7226  // Pages invokes f for each page of results.
  7227  // A non-nil error returned from f will halt the iteration.
  7228  // The provided context supersedes any context provided to the Context method.
  7229  func (c *ResponsePolicyRulesListCall) Pages(ctx context.Context, f func(*ResponsePolicyRulesListResponse) error) error {
  7230  	c.ctx_ = ctx
  7231  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  7232  	for {
  7233  		x, err := c.Do()
  7234  		if err != nil {
  7235  			return err
  7236  		}
  7237  		if err := f(x); err != nil {
  7238  			return err
  7239  		}
  7240  		if x.NextPageToken == "" {
  7241  			return nil
  7242  		}
  7243  		c.PageToken(x.NextPageToken)
  7244  	}
  7245  }
  7246  
  7247  type ResponsePolicyRulesPatchCall struct {
  7248  	s                  *Service
  7249  	project            string
  7250  	responsePolicy     string
  7251  	responsePolicyRule string
  7252  	responsepolicyrule *ResponsePolicyRule
  7253  	urlParams_         gensupport.URLParams
  7254  	ctx_               context.Context
  7255  	header_            http.Header
  7256  }
  7257  
  7258  // Patch: Applies a partial update to an existing Response Policy Rule.
  7259  //
  7260  //   - project: Identifies the project addressed by this request.
  7261  //   - responsePolicy: User assigned name of the Response Policy containing the
  7262  //     Response Policy Rule.
  7263  //   - responsePolicyRule: User assigned name of the Response Policy Rule
  7264  //     addressed by this request.
  7265  func (r *ResponsePolicyRulesService) Patch(project string, responsePolicy string, responsePolicyRule string, responsepolicyrule *ResponsePolicyRule) *ResponsePolicyRulesPatchCall {
  7266  	c := &ResponsePolicyRulesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7267  	c.project = project
  7268  	c.responsePolicy = responsePolicy
  7269  	c.responsePolicyRule = responsePolicyRule
  7270  	c.responsepolicyrule = responsepolicyrule
  7271  	return c
  7272  }
  7273  
  7274  // ClientOperationId sets the optional parameter "clientOperationId": For
  7275  // mutating operation requests only. An optional identifier specified by the
  7276  // client. Must be unique for operation resources in the Operations collection.
  7277  func (c *ResponsePolicyRulesPatchCall) ClientOperationId(clientOperationId string) *ResponsePolicyRulesPatchCall {
  7278  	c.urlParams_.Set("clientOperationId", clientOperationId)
  7279  	return c
  7280  }
  7281  
  7282  // Fields allows partial responses to be retrieved. See
  7283  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7284  // details.
  7285  func (c *ResponsePolicyRulesPatchCall) Fields(s ...googleapi.Field) *ResponsePolicyRulesPatchCall {
  7286  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7287  	return c
  7288  }
  7289  
  7290  // Context sets the context to be used in this call's Do method.
  7291  func (c *ResponsePolicyRulesPatchCall) Context(ctx context.Context) *ResponsePolicyRulesPatchCall {
  7292  	c.ctx_ = ctx
  7293  	return c
  7294  }
  7295  
  7296  // Header returns a http.Header that can be modified by the caller to add
  7297  // headers to the request.
  7298  func (c *ResponsePolicyRulesPatchCall) Header() http.Header {
  7299  	if c.header_ == nil {
  7300  		c.header_ = make(http.Header)
  7301  	}
  7302  	return c.header_
  7303  }
  7304  
  7305  func (c *ResponsePolicyRulesPatchCall) doRequest(alt string) (*http.Response, error) {
  7306  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  7307  	var body io.Reader = nil
  7308  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.responsepolicyrule)
  7309  	if err != nil {
  7310  		return nil, err
  7311  	}
  7312  	c.urlParams_.Set("alt", alt)
  7313  	c.urlParams_.Set("prettyPrint", "false")
  7314  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1beta2/projects/{project}/responsePolicies/{responsePolicy}/rules/{responsePolicyRule}")
  7315  	urls += "?" + c.urlParams_.Encode()
  7316  	req, err := http.NewRequest("PATCH", urls, body)
  7317  	if err != nil {
  7318  		return nil, err
  7319  	}
  7320  	req.Header = reqHeaders
  7321  	googleapi.Expand(req.URL, map[string]string{
  7322  		"project":            c.project,
  7323  		"responsePolicy":     c.responsePolicy,
  7324  		"responsePolicyRule": c.responsePolicyRule,
  7325  	})
  7326  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7327  }
  7328  
  7329  // Do executes the "dns.responsePolicyRules.patch" call.
  7330  // Any non-2xx status code is an error. Response headers are in either
  7331  // *ResponsePolicyRulesPatchResponse.ServerResponse.Header or (if a response
  7332  // was returned at all) in error.(*googleapi.Error).Header. Use
  7333  // googleapi.IsNotModified to check whether the returned error was because
  7334  // http.StatusNotModified was returned.
  7335  func (c *ResponsePolicyRulesPatchCall) Do(opts ...googleapi.CallOption) (*ResponsePolicyRulesPatchResponse, error) {
  7336  	gensupport.SetOptions(c.urlParams_, opts...)
  7337  	res, err := c.doRequest("json")
  7338  	if res != nil && res.StatusCode == http.StatusNotModified {
  7339  		if res.Body != nil {
  7340  			res.Body.Close()
  7341  		}
  7342  		return nil, gensupport.WrapError(&googleapi.Error{
  7343  			Code:   res.StatusCode,
  7344  			Header: res.Header,
  7345  		})
  7346  	}
  7347  	if err != nil {
  7348  		return nil, err
  7349  	}
  7350  	defer googleapi.CloseBody(res)
  7351  	if err := googleapi.CheckResponse(res); err != nil {
  7352  		return nil, gensupport.WrapError(err)
  7353  	}
  7354  	ret := &ResponsePolicyRulesPatchResponse{
  7355  		ServerResponse: googleapi.ServerResponse{
  7356  			Header:         res.Header,
  7357  			HTTPStatusCode: res.StatusCode,
  7358  		},
  7359  	}
  7360  	target := &ret
  7361  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7362  		return nil, err
  7363  	}
  7364  	return ret, nil
  7365  }
  7366  
  7367  type ResponsePolicyRulesUpdateCall struct {
  7368  	s                  *Service
  7369  	project            string
  7370  	responsePolicy     string
  7371  	responsePolicyRule string
  7372  	responsepolicyrule *ResponsePolicyRule
  7373  	urlParams_         gensupport.URLParams
  7374  	ctx_               context.Context
  7375  	header_            http.Header
  7376  }
  7377  
  7378  // Update: Updates an existing Response Policy Rule.
  7379  //
  7380  //   - project: Identifies the project addressed by this request.
  7381  //   - responsePolicy: User assigned name of the Response Policy containing the
  7382  //     Response Policy Rule.
  7383  //   - responsePolicyRule: User assigned name of the Response Policy Rule
  7384  //     addressed by this request.
  7385  func (r *ResponsePolicyRulesService) Update(project string, responsePolicy string, responsePolicyRule string, responsepolicyrule *ResponsePolicyRule) *ResponsePolicyRulesUpdateCall {
  7386  	c := &ResponsePolicyRulesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7387  	c.project = project
  7388  	c.responsePolicy = responsePolicy
  7389  	c.responsePolicyRule = responsePolicyRule
  7390  	c.responsepolicyrule = responsepolicyrule
  7391  	return c
  7392  }
  7393  
  7394  // ClientOperationId sets the optional parameter "clientOperationId": For
  7395  // mutating operation requests only. An optional identifier specified by the
  7396  // client. Must be unique for operation resources in the Operations collection.
  7397  func (c *ResponsePolicyRulesUpdateCall) ClientOperationId(clientOperationId string) *ResponsePolicyRulesUpdateCall {
  7398  	c.urlParams_.Set("clientOperationId", clientOperationId)
  7399  	return c
  7400  }
  7401  
  7402  // Fields allows partial responses to be retrieved. See
  7403  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7404  // details.
  7405  func (c *ResponsePolicyRulesUpdateCall) Fields(s ...googleapi.Field) *ResponsePolicyRulesUpdateCall {
  7406  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7407  	return c
  7408  }
  7409  
  7410  // Context sets the context to be used in this call's Do method.
  7411  func (c *ResponsePolicyRulesUpdateCall) Context(ctx context.Context) *ResponsePolicyRulesUpdateCall {
  7412  	c.ctx_ = ctx
  7413  	return c
  7414  }
  7415  
  7416  // Header returns a http.Header that can be modified by the caller to add
  7417  // headers to the request.
  7418  func (c *ResponsePolicyRulesUpdateCall) Header() http.Header {
  7419  	if c.header_ == nil {
  7420  		c.header_ = make(http.Header)
  7421  	}
  7422  	return c.header_
  7423  }
  7424  
  7425  func (c *ResponsePolicyRulesUpdateCall) doRequest(alt string) (*http.Response, error) {
  7426  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  7427  	var body io.Reader = nil
  7428  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.responsepolicyrule)
  7429  	if err != nil {
  7430  		return nil, err
  7431  	}
  7432  	c.urlParams_.Set("alt", alt)
  7433  	c.urlParams_.Set("prettyPrint", "false")
  7434  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1beta2/projects/{project}/responsePolicies/{responsePolicy}/rules/{responsePolicyRule}")
  7435  	urls += "?" + c.urlParams_.Encode()
  7436  	req, err := http.NewRequest("PUT", urls, body)
  7437  	if err != nil {
  7438  		return nil, err
  7439  	}
  7440  	req.Header = reqHeaders
  7441  	googleapi.Expand(req.URL, map[string]string{
  7442  		"project":            c.project,
  7443  		"responsePolicy":     c.responsePolicy,
  7444  		"responsePolicyRule": c.responsePolicyRule,
  7445  	})
  7446  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7447  }
  7448  
  7449  // Do executes the "dns.responsePolicyRules.update" call.
  7450  // Any non-2xx status code is an error. Response headers are in either
  7451  // *ResponsePolicyRulesUpdateResponse.ServerResponse.Header or (if a response
  7452  // was returned at all) in error.(*googleapi.Error).Header. Use
  7453  // googleapi.IsNotModified to check whether the returned error was because
  7454  // http.StatusNotModified was returned.
  7455  func (c *ResponsePolicyRulesUpdateCall) Do(opts ...googleapi.CallOption) (*ResponsePolicyRulesUpdateResponse, error) {
  7456  	gensupport.SetOptions(c.urlParams_, opts...)
  7457  	res, err := c.doRequest("json")
  7458  	if res != nil && res.StatusCode == http.StatusNotModified {
  7459  		if res.Body != nil {
  7460  			res.Body.Close()
  7461  		}
  7462  		return nil, gensupport.WrapError(&googleapi.Error{
  7463  			Code:   res.StatusCode,
  7464  			Header: res.Header,
  7465  		})
  7466  	}
  7467  	if err != nil {
  7468  		return nil, err
  7469  	}
  7470  	defer googleapi.CloseBody(res)
  7471  	if err := googleapi.CheckResponse(res); err != nil {
  7472  		return nil, gensupport.WrapError(err)
  7473  	}
  7474  	ret := &ResponsePolicyRulesUpdateResponse{
  7475  		ServerResponse: googleapi.ServerResponse{
  7476  			Header:         res.Header,
  7477  			HTTPStatusCode: res.StatusCode,
  7478  		},
  7479  	}
  7480  	target := &ret
  7481  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7482  		return nil, err
  7483  	}
  7484  	return ret, nil
  7485  }
  7486  

View as plain text