...

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

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

     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/v1"
    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/v1"
    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:v1"
    95  const apiName = "dns"
    96  const apiVersion = "v1"
    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  	Kind          string                                 `json:"kind,omitempty"`
  1927  	PrimaryBackup *RRSetRoutingPolicyPrimaryBackupPolicy `json:"primaryBackup,omitempty"`
  1928  	Wrr           *RRSetRoutingPolicyWrrPolicy           `json:"wrr,omitempty"`
  1929  	// ForceSendFields is a list of field names (e.g. "Geo") to unconditionally
  1930  	// include in API requests. By default, fields with empty or default values are
  1931  	// omitted from API requests. See
  1932  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1933  	// details.
  1934  	ForceSendFields []string `json:"-"`
  1935  	// NullFields is a list of field names (e.g. "Geo") to include in API requests
  1936  	// with the JSON null value. By default, fields with empty values are omitted
  1937  	// from API requests. See
  1938  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1939  	NullFields []string `json:"-"`
  1940  }
  1941  
  1942  func (s *RRSetRoutingPolicy) MarshalJSON() ([]byte, error) {
  1943  	type NoMethod RRSetRoutingPolicy
  1944  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1945  }
  1946  
  1947  // RRSetRoutingPolicyGeoPolicy: Configures a RRSetRoutingPolicy that routes
  1948  // based on the geo location of the querying user.
  1949  type RRSetRoutingPolicyGeoPolicy struct {
  1950  	// EnableFencing: Without fencing, if health check fails for all configured
  1951  	// items in the current geo bucket, we failover to the next nearest geo bucket.
  1952  	// With fencing, if health checking is enabled, as long as some targets in the
  1953  	// current geo bucket are healthy, we return only the healthy targets. However,
  1954  	// if all targets are unhealthy, we don't failover to the next nearest bucket;
  1955  	// instead, we return all the items in the current bucket even when all targets
  1956  	// are unhealthy.
  1957  	EnableFencing bool `json:"enableFencing,omitempty"`
  1958  	// Items: The primary geo routing configuration. If there are multiple items
  1959  	// with the same location, an error is returned instead.
  1960  	Items []*RRSetRoutingPolicyGeoPolicyGeoPolicyItem `json:"items,omitempty"`
  1961  	Kind  string                                      `json:"kind,omitempty"`
  1962  	// ForceSendFields is a list of field names (e.g. "EnableFencing") to
  1963  	// unconditionally include in API requests. By default, fields with empty or
  1964  	// default values are omitted from API requests. See
  1965  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1966  	// details.
  1967  	ForceSendFields []string `json:"-"`
  1968  	// NullFields is a list of field names (e.g. "EnableFencing") to include in API
  1969  	// requests with the JSON null value. By default, fields with empty values are
  1970  	// omitted from API requests. See
  1971  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1972  	NullFields []string `json:"-"`
  1973  }
  1974  
  1975  func (s *RRSetRoutingPolicyGeoPolicy) MarshalJSON() ([]byte, error) {
  1976  	type NoMethod RRSetRoutingPolicyGeoPolicy
  1977  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1978  }
  1979  
  1980  // RRSetRoutingPolicyGeoPolicyGeoPolicyItem: ResourceRecordSet data for one geo
  1981  // location.
  1982  type RRSetRoutingPolicyGeoPolicyGeoPolicyItem struct {
  1983  	// HealthCheckedTargets: For A and AAAA types only. Endpoints to return in the
  1984  	// query result only if they are healthy. These can be specified along with
  1985  	// rrdata within this item.
  1986  	HealthCheckedTargets *RRSetRoutingPolicyHealthCheckTargets `json:"healthCheckedTargets,omitempty"`
  1987  	Kind                 string                                `json:"kind,omitempty"`
  1988  	// Location: The geo-location granularity is a GCP region. This location string
  1989  	// should correspond to a GCP region. e.g. "us-east1", "southamerica-east1",
  1990  	// "asia-east1", etc.
  1991  	Location string   `json:"location,omitempty"`
  1992  	Rrdatas  []string `json:"rrdatas,omitempty"`
  1993  	// SignatureRrdatas: DNSSEC generated signatures for all the rrdata within this
  1994  	// item. If health checked targets are provided for DNSSEC enabled zones,
  1995  	// there's a restriction of 1 IP address per item.
  1996  	SignatureRrdatas []string `json:"signatureRrdatas,omitempty"`
  1997  	// ForceSendFields is a list of field names (e.g. "HealthCheckedTargets") to
  1998  	// unconditionally include in API requests. By default, fields with empty or
  1999  	// default values are omitted from API requests. See
  2000  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2001  	// details.
  2002  	ForceSendFields []string `json:"-"`
  2003  	// NullFields is a list of field names (e.g. "HealthCheckedTargets") to include
  2004  	// in API requests with the JSON null value. By default, fields with empty
  2005  	// values are omitted from API requests. See
  2006  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2007  	NullFields []string `json:"-"`
  2008  }
  2009  
  2010  func (s *RRSetRoutingPolicyGeoPolicyGeoPolicyItem) MarshalJSON() ([]byte, error) {
  2011  	type NoMethod RRSetRoutingPolicyGeoPolicyGeoPolicyItem
  2012  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2013  }
  2014  
  2015  // RRSetRoutingPolicyHealthCheckTargets: HealthCheckTargets describes endpoints
  2016  // to health-check when responding to Routing Policy queries. Only the healthy
  2017  // endpoints will be included in the response. Only one of
  2018  // internal_load_balancer and external_endpoints should be set.
  2019  type RRSetRoutingPolicyHealthCheckTargets struct {
  2020  	// InternalLoadBalancers: Configuration for internal load balancers to be
  2021  	// health checked.
  2022  	InternalLoadBalancers []*RRSetRoutingPolicyLoadBalancerTarget `json:"internalLoadBalancers,omitempty"`
  2023  	// ForceSendFields is a list of field names (e.g. "InternalLoadBalancers") to
  2024  	// unconditionally include in API requests. By default, fields with empty or
  2025  	// default values are omitted from API requests. See
  2026  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2027  	// details.
  2028  	ForceSendFields []string `json:"-"`
  2029  	// NullFields is a list of field names (e.g. "InternalLoadBalancers") to
  2030  	// include in API requests with the JSON null value. By default, fields with
  2031  	// empty values are omitted from API requests. See
  2032  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2033  	NullFields []string `json:"-"`
  2034  }
  2035  
  2036  func (s *RRSetRoutingPolicyHealthCheckTargets) MarshalJSON() ([]byte, error) {
  2037  	type NoMethod RRSetRoutingPolicyHealthCheckTargets
  2038  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2039  }
  2040  
  2041  // RRSetRoutingPolicyLoadBalancerTarget: The configuration for an individual
  2042  // load balancer to health check.
  2043  type RRSetRoutingPolicyLoadBalancerTarget struct {
  2044  	// IpAddress: The frontend IP address of the load balancer to health check.
  2045  	IpAddress string `json:"ipAddress,omitempty"`
  2046  	// IpProtocol: The protocol of the load balancer to health check.
  2047  	//
  2048  	// Possible values:
  2049  	//   "undefined"
  2050  	//   "tcp"
  2051  	//   "udp"
  2052  	IpProtocol string `json:"ipProtocol,omitempty"`
  2053  	Kind       string `json:"kind,omitempty"`
  2054  	// LoadBalancerType: The type of load balancer specified by this target. This
  2055  	// value must match the configuration of the load balancer located at the
  2056  	// LoadBalancerTarget's IP address, port, and region. Use the following: -
  2057  	// *regionalL4ilb*: for a regional internal passthrough Network Load Balancer.
  2058  	// - *regionalL7ilb*: for a regional internal Application Load Balancer. -
  2059  	// *globalL7ilb*: for a global internal Application Load Balancer.
  2060  	//
  2061  	// Possible values:
  2062  	//   "none"
  2063  	//   "globalL7ilb"
  2064  	//   "regionalL4ilb"
  2065  	//   "regionalL7ilb"
  2066  	LoadBalancerType string `json:"loadBalancerType,omitempty"`
  2067  	// NetworkUrl: The fully qualified URL of the network that the load balancer is
  2068  	// attached to. This should be formatted like
  2069  	// https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}
  2070  	// .
  2071  	NetworkUrl string `json:"networkUrl,omitempty"`
  2072  	// Port: The configured port of the load balancer.
  2073  	Port string `json:"port,omitempty"`
  2074  	// Project: The project ID in which the load balancer is located.
  2075  	Project string `json:"project,omitempty"`
  2076  	// Region: The region in which the load balancer is located.
  2077  	Region string `json:"region,omitempty"`
  2078  	// ForceSendFields is a list of field names (e.g. "IpAddress") to
  2079  	// unconditionally include in API requests. By default, fields with empty or
  2080  	// default values are omitted from API requests. See
  2081  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2082  	// details.
  2083  	ForceSendFields []string `json:"-"`
  2084  	// NullFields is a list of field names (e.g. "IpAddress") to include in API
  2085  	// requests with the JSON null value. By default, fields with empty values are
  2086  	// omitted from API requests. See
  2087  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2088  	NullFields []string `json:"-"`
  2089  }
  2090  
  2091  func (s *RRSetRoutingPolicyLoadBalancerTarget) MarshalJSON() ([]byte, error) {
  2092  	type NoMethod RRSetRoutingPolicyLoadBalancerTarget
  2093  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2094  }
  2095  
  2096  // RRSetRoutingPolicyPrimaryBackupPolicy: Configures a RRSetRoutingPolicy such
  2097  // that all queries are responded with the primary_targets if they are healthy.
  2098  // And if all of them are unhealthy, then we fallback to a geo localized
  2099  // policy.
  2100  type RRSetRoutingPolicyPrimaryBackupPolicy struct {
  2101  	// BackupGeoTargets: Backup targets provide a regional failover policy for the
  2102  	// otherwise global primary targets. If serving state is set to BACKUP, this
  2103  	// policy essentially becomes a geo routing policy.
  2104  	BackupGeoTargets *RRSetRoutingPolicyGeoPolicy `json:"backupGeoTargets,omitempty"`
  2105  	Kind             string                       `json:"kind,omitempty"`
  2106  	// PrimaryTargets: Endpoints that are health checked before making the routing
  2107  	// decision. Unhealthy endpoints are omitted from the results. If all endpoints
  2108  	// are unhealthy, we serve a response based on the backup_geo_targets.
  2109  	PrimaryTargets *RRSetRoutingPolicyHealthCheckTargets `json:"primaryTargets,omitempty"`
  2110  	// TrickleTraffic: When serving state is PRIMARY, this field provides the
  2111  	// option of sending a small percentage of the traffic to the backup targets.
  2112  	TrickleTraffic float64 `json:"trickleTraffic,omitempty"`
  2113  	// ForceSendFields is a list of field names (e.g. "BackupGeoTargets") to
  2114  	// unconditionally include in API requests. By default, fields with empty or
  2115  	// default values are omitted from API requests. See
  2116  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2117  	// details.
  2118  	ForceSendFields []string `json:"-"`
  2119  	// NullFields is a list of field names (e.g. "BackupGeoTargets") to include in
  2120  	// API requests with the JSON null value. By default, fields with empty values
  2121  	// are omitted from API requests. See
  2122  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2123  	NullFields []string `json:"-"`
  2124  }
  2125  
  2126  func (s *RRSetRoutingPolicyPrimaryBackupPolicy) MarshalJSON() ([]byte, error) {
  2127  	type NoMethod RRSetRoutingPolicyPrimaryBackupPolicy
  2128  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2129  }
  2130  
  2131  func (s *RRSetRoutingPolicyPrimaryBackupPolicy) UnmarshalJSON(data []byte) error {
  2132  	type NoMethod RRSetRoutingPolicyPrimaryBackupPolicy
  2133  	var s1 struct {
  2134  		TrickleTraffic gensupport.JSONFloat64 `json:"trickleTraffic"`
  2135  		*NoMethod
  2136  	}
  2137  	s1.NoMethod = (*NoMethod)(s)
  2138  	if err := json.Unmarshal(data, &s1); err != nil {
  2139  		return err
  2140  	}
  2141  	s.TrickleTraffic = float64(s1.TrickleTraffic)
  2142  	return nil
  2143  }
  2144  
  2145  // RRSetRoutingPolicyWrrPolicy: Configures a RRSetRoutingPolicy that routes in
  2146  // a weighted round robin fashion.
  2147  type RRSetRoutingPolicyWrrPolicy struct {
  2148  	Items []*RRSetRoutingPolicyWrrPolicyWrrPolicyItem `json:"items,omitempty"`
  2149  	Kind  string                                      `json:"kind,omitempty"`
  2150  	// ForceSendFields is a list of field names (e.g. "Items") to unconditionally
  2151  	// include in API requests. By default, fields with empty or default values are
  2152  	// omitted from API requests. See
  2153  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2154  	// details.
  2155  	ForceSendFields []string `json:"-"`
  2156  	// NullFields is a list of field names (e.g. "Items") to include in API
  2157  	// requests with the JSON null value. By default, fields with empty values are
  2158  	// omitted from API requests. See
  2159  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2160  	NullFields []string `json:"-"`
  2161  }
  2162  
  2163  func (s *RRSetRoutingPolicyWrrPolicy) MarshalJSON() ([]byte, error) {
  2164  	type NoMethod RRSetRoutingPolicyWrrPolicy
  2165  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2166  }
  2167  
  2168  // RRSetRoutingPolicyWrrPolicyWrrPolicyItem: A routing block which contains the
  2169  // routing information for one WRR item.
  2170  type RRSetRoutingPolicyWrrPolicyWrrPolicyItem struct {
  2171  	// HealthCheckedTargets: Endpoints that are health checked before making the
  2172  	// routing decision. The unhealthy endpoints are omitted from the result. If
  2173  	// all endpoints within a bucket are unhealthy, we choose a different bucket
  2174  	// (sampled with respect to its weight) for responding. If DNSSEC is enabled
  2175  	// for this zone, only one of rrdata or health_checked_targets can be set.
  2176  	HealthCheckedTargets *RRSetRoutingPolicyHealthCheckTargets `json:"healthCheckedTargets,omitempty"`
  2177  	Kind                 string                                `json:"kind,omitempty"`
  2178  	Rrdatas              []string                              `json:"rrdatas,omitempty"`
  2179  	// SignatureRrdatas: DNSSEC generated signatures for all the rrdata within this
  2180  	// item. Note that if health checked targets are provided for DNSSEC enabled
  2181  	// zones, there's a restriction of 1 IP address per item.
  2182  	SignatureRrdatas []string `json:"signatureRrdatas,omitempty"`
  2183  	// Weight: The weight corresponding to this WrrPolicyItem object. When multiple
  2184  	// WrrPolicyItem objects are configured, the probability of returning an
  2185  	// WrrPolicyItem object's data is proportional to its weight relative to the
  2186  	// sum of weights configured for all items. This weight must be non-negative.
  2187  	Weight float64 `json:"weight,omitempty"`
  2188  	// ForceSendFields is a list of field names (e.g. "HealthCheckedTargets") to
  2189  	// unconditionally include in API requests. By default, fields with empty or
  2190  	// default values are omitted from API requests. See
  2191  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2192  	// details.
  2193  	ForceSendFields []string `json:"-"`
  2194  	// NullFields is a list of field names (e.g. "HealthCheckedTargets") to include
  2195  	// in API requests with the JSON null value. By default, fields with empty
  2196  	// values are omitted from API requests. See
  2197  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2198  	NullFields []string `json:"-"`
  2199  }
  2200  
  2201  func (s *RRSetRoutingPolicyWrrPolicyWrrPolicyItem) MarshalJSON() ([]byte, error) {
  2202  	type NoMethod RRSetRoutingPolicyWrrPolicyWrrPolicyItem
  2203  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2204  }
  2205  
  2206  func (s *RRSetRoutingPolicyWrrPolicyWrrPolicyItem) UnmarshalJSON(data []byte) error {
  2207  	type NoMethod RRSetRoutingPolicyWrrPolicyWrrPolicyItem
  2208  	var s1 struct {
  2209  		Weight gensupport.JSONFloat64 `json:"weight"`
  2210  		*NoMethod
  2211  	}
  2212  	s1.NoMethod = (*NoMethod)(s)
  2213  	if err := json.Unmarshal(data, &s1); err != nil {
  2214  		return err
  2215  	}
  2216  	s.Weight = float64(s1.Weight)
  2217  	return nil
  2218  }
  2219  
  2220  // ResourceRecordSet: A unit of data that is returned by the DNS servers.
  2221  type ResourceRecordSet struct {
  2222  	Kind string `json:"kind,omitempty"`
  2223  	// Name: For example, www.example.com.
  2224  	Name string `json:"name,omitempty"`
  2225  	// RoutingPolicy: Configures dynamic query responses based on either the geo
  2226  	// location of the querying user or a weighted round robin based routing
  2227  	// policy. A valid ResourceRecordSet contains only rrdata (for static
  2228  	// resolution) or a routing_policy (for dynamic resolution).
  2229  	RoutingPolicy *RRSetRoutingPolicy `json:"routingPolicy,omitempty"`
  2230  	// Rrdatas: As defined in RFC 1035 (section 5) and RFC 1034 (section 3.6.1) --
  2231  	// see examples.
  2232  	Rrdatas []string `json:"rrdatas,omitempty"`
  2233  	// SignatureRrdatas: As defined in RFC 4034 (section 3.2).
  2234  	SignatureRrdatas []string `json:"signatureRrdatas,omitempty"`
  2235  	// Ttl: Number of seconds that this ResourceRecordSet can be cached by
  2236  	// resolvers.
  2237  	Ttl int64 `json:"ttl,omitempty"`
  2238  	// Type: The identifier of a supported record type. See the list of Supported
  2239  	// DNS record types.
  2240  	Type string `json:"type,omitempty"`
  2241  
  2242  	// ServerResponse contains the HTTP response code and headers from the server.
  2243  	googleapi.ServerResponse `json:"-"`
  2244  	// ForceSendFields is a list of field names (e.g. "Kind") to unconditionally
  2245  	// include in API requests. By default, fields with empty or default values are
  2246  	// omitted from API requests. See
  2247  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2248  	// details.
  2249  	ForceSendFields []string `json:"-"`
  2250  	// NullFields is a list of field names (e.g. "Kind") to include in API requests
  2251  	// with the JSON null value. By default, fields with empty values are omitted
  2252  	// from API requests. See
  2253  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2254  	NullFields []string `json:"-"`
  2255  }
  2256  
  2257  func (s *ResourceRecordSet) MarshalJSON() ([]byte, error) {
  2258  	type NoMethod ResourceRecordSet
  2259  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2260  }
  2261  
  2262  type ResourceRecordSetsDeleteResponse struct {
  2263  	// ServerResponse contains the HTTP response code and headers from the server.
  2264  	googleapi.ServerResponse `json:"-"`
  2265  }
  2266  
  2267  type ResourceRecordSetsListResponse struct {
  2268  	Header *ResponseHeader `json:"header,omitempty"`
  2269  	// Kind: Type of resource.
  2270  	Kind string `json:"kind,omitempty"`
  2271  	// NextPageToken: The presence of this field indicates that there exist more
  2272  	// results following your last page of results in pagination order. To fetch
  2273  	// them, make another list request using this value as your pagination token.
  2274  	// This lets you retrieve the complete contents of even larger collections, one
  2275  	// page at a time. However, if the collection changes between paginated list
  2276  	// requests, the set of elements returned is an inconsistent view of the
  2277  	// collection. You cannot retrieve a consistent snapshot of a collection larger
  2278  	// than the maximum page size.
  2279  	NextPageToken string `json:"nextPageToken,omitempty"`
  2280  	// Rrsets: The resource record set resources.
  2281  	Rrsets []*ResourceRecordSet `json:"rrsets,omitempty"`
  2282  
  2283  	// ServerResponse contains the HTTP response code and headers from the server.
  2284  	googleapi.ServerResponse `json:"-"`
  2285  	// ForceSendFields is a list of field names (e.g. "Header") to unconditionally
  2286  	// include in API requests. By default, fields with empty or default values are
  2287  	// omitted from API requests. See
  2288  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2289  	// details.
  2290  	ForceSendFields []string `json:"-"`
  2291  	// NullFields is a list of field names (e.g. "Header") to include in API
  2292  	// requests with the JSON null value. By default, fields with empty values are
  2293  	// omitted from API requests. See
  2294  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2295  	NullFields []string `json:"-"`
  2296  }
  2297  
  2298  func (s *ResourceRecordSetsListResponse) MarshalJSON() ([]byte, error) {
  2299  	type NoMethod ResourceRecordSetsListResponse
  2300  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2301  }
  2302  
  2303  // ResponseHeader: Elements common to every response.
  2304  type ResponseHeader struct {
  2305  	// OperationId: For mutating operation requests that completed successfully.
  2306  	// This is the client_operation_id if the client specified it, otherwise it is
  2307  	// generated by the server (output only).
  2308  	OperationId string `json:"operationId,omitempty"`
  2309  	// ForceSendFields is a list of field names (e.g. "OperationId") to
  2310  	// unconditionally include in API requests. By default, fields with empty or
  2311  	// default values are omitted from API requests. See
  2312  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2313  	// details.
  2314  	ForceSendFields []string `json:"-"`
  2315  	// NullFields is a list of field names (e.g. "OperationId") to include in API
  2316  	// requests with the JSON null value. By default, fields with empty values are
  2317  	// omitted from API requests. See
  2318  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2319  	NullFields []string `json:"-"`
  2320  }
  2321  
  2322  func (s *ResponseHeader) MarshalJSON() ([]byte, error) {
  2323  	type NoMethod ResponseHeader
  2324  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2325  }
  2326  
  2327  type ResponsePoliciesListResponse struct {
  2328  	Header *ResponseHeader `json:"header,omitempty"`
  2329  	// NextPageToken: The presence of this field indicates that more results exist
  2330  	// following your last page of results in pagination order. To fetch them, make
  2331  	// another list request by using this value as your page token. This lets you
  2332  	// view the complete contents of even very large collections one page at a
  2333  	// time. However, if the contents of the collection change between the first
  2334  	// and last paginated list request, the set of all elements returned are an
  2335  	// inconsistent view of the collection. You cannot retrieve a consistent
  2336  	// snapshot of a collection larger than the maximum page size.
  2337  	NextPageToken string `json:"nextPageToken,omitempty"`
  2338  	// ResponsePolicies: The Response Policy resources.
  2339  	ResponsePolicies []*ResponsePolicy `json:"responsePolicies,omitempty"`
  2340  
  2341  	// ServerResponse contains the HTTP response code and headers from the server.
  2342  	googleapi.ServerResponse `json:"-"`
  2343  	// ForceSendFields is a list of field names (e.g. "Header") to unconditionally
  2344  	// include in API requests. By default, fields with empty or default values are
  2345  	// omitted from API requests. See
  2346  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2347  	// details.
  2348  	ForceSendFields []string `json:"-"`
  2349  	// NullFields is a list of field names (e.g. "Header") to include in API
  2350  	// requests with the JSON null value. By default, fields with empty values are
  2351  	// omitted from API requests. See
  2352  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2353  	NullFields []string `json:"-"`
  2354  }
  2355  
  2356  func (s *ResponsePoliciesListResponse) MarshalJSON() ([]byte, error) {
  2357  	type NoMethod ResponsePoliciesListResponse
  2358  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2359  }
  2360  
  2361  type ResponsePoliciesPatchResponse struct {
  2362  	Header         *ResponseHeader `json:"header,omitempty"`
  2363  	ResponsePolicy *ResponsePolicy `json:"responsePolicy,omitempty"`
  2364  
  2365  	// ServerResponse contains the HTTP response code and headers from the server.
  2366  	googleapi.ServerResponse `json:"-"`
  2367  	// ForceSendFields is a list of field names (e.g. "Header") to unconditionally
  2368  	// include in API requests. By default, fields with empty or default values are
  2369  	// omitted from API requests. See
  2370  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2371  	// details.
  2372  	ForceSendFields []string `json:"-"`
  2373  	// NullFields is a list of field names (e.g. "Header") to include in API
  2374  	// requests with the JSON null value. By default, fields with empty values are
  2375  	// omitted from API requests. See
  2376  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2377  	NullFields []string `json:"-"`
  2378  }
  2379  
  2380  func (s *ResponsePoliciesPatchResponse) MarshalJSON() ([]byte, error) {
  2381  	type NoMethod ResponsePoliciesPatchResponse
  2382  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2383  }
  2384  
  2385  type ResponsePoliciesUpdateResponse struct {
  2386  	Header         *ResponseHeader `json:"header,omitempty"`
  2387  	ResponsePolicy *ResponsePolicy `json:"responsePolicy,omitempty"`
  2388  
  2389  	// ServerResponse contains the HTTP response code and headers from the server.
  2390  	googleapi.ServerResponse `json:"-"`
  2391  	// ForceSendFields is a list of field names (e.g. "Header") to unconditionally
  2392  	// include in API requests. By default, fields with empty or default values are
  2393  	// omitted from API requests. See
  2394  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2395  	// details.
  2396  	ForceSendFields []string `json:"-"`
  2397  	// NullFields is a list of field names (e.g. "Header") to include in API
  2398  	// requests with the JSON null value. By default, fields with empty values are
  2399  	// omitted from API requests. See
  2400  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2401  	NullFields []string `json:"-"`
  2402  }
  2403  
  2404  func (s *ResponsePoliciesUpdateResponse) MarshalJSON() ([]byte, error) {
  2405  	type NoMethod ResponsePoliciesUpdateResponse
  2406  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2407  }
  2408  
  2409  // ResponsePolicy: A Response Policy is a collection of selectors that apply to
  2410  // queries made against one or more Virtual Private Cloud networks.
  2411  type ResponsePolicy struct {
  2412  	// Description: User-provided description for this Response Policy.
  2413  	Description string `json:"description,omitempty"`
  2414  	// GkeClusters: The list of Google Kubernetes Engine clusters to which this
  2415  	// response policy is applied.
  2416  	GkeClusters []*ResponsePolicyGKECluster `json:"gkeClusters,omitempty"`
  2417  	// Id: Unique identifier for the resource; defined by the server (output only).
  2418  	Id   int64  `json:"id,omitempty,string"`
  2419  	Kind string `json:"kind,omitempty"`
  2420  	// Labels: User labels.
  2421  	Labels map[string]string `json:"labels,omitempty"`
  2422  	// Networks: List of network names specifying networks to which this policy is
  2423  	// applied.
  2424  	Networks []*ResponsePolicyNetwork `json:"networks,omitempty"`
  2425  	// ResponsePolicyName: User assigned name for this Response Policy.
  2426  	ResponsePolicyName string `json:"responsePolicyName,omitempty"`
  2427  
  2428  	// ServerResponse contains the HTTP response code and headers from the server.
  2429  	googleapi.ServerResponse `json:"-"`
  2430  	// ForceSendFields is a list of field names (e.g. "Description") to
  2431  	// unconditionally include in API requests. By default, fields with empty or
  2432  	// default values are omitted from API requests. See
  2433  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2434  	// details.
  2435  	ForceSendFields []string `json:"-"`
  2436  	// NullFields is a list of field names (e.g. "Description") to include in API
  2437  	// requests with the JSON null value. By default, fields with empty values are
  2438  	// omitted from API requests. See
  2439  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2440  	NullFields []string `json:"-"`
  2441  }
  2442  
  2443  func (s *ResponsePolicy) MarshalJSON() ([]byte, error) {
  2444  	type NoMethod ResponsePolicy
  2445  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2446  }
  2447  
  2448  type ResponsePolicyGKECluster struct {
  2449  	// GkeClusterName: The resource name of the cluster to bind this response
  2450  	// policy to. This should be specified in the format like:
  2451  	// projects/*/locations/*/clusters/*. This is referenced from GKE
  2452  	// projects.locations.clusters.get API:
  2453  	// https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters/get
  2454  	GkeClusterName string `json:"gkeClusterName,omitempty"`
  2455  	Kind           string `json:"kind,omitempty"`
  2456  	// ForceSendFields is a list of field names (e.g. "GkeClusterName") to
  2457  	// unconditionally include in API requests. By default, fields with empty or
  2458  	// default values are omitted from API requests. See
  2459  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2460  	// details.
  2461  	ForceSendFields []string `json:"-"`
  2462  	// NullFields is a list of field names (e.g. "GkeClusterName") to include in
  2463  	// API requests with the JSON null value. By default, fields with empty values
  2464  	// are omitted from API requests. See
  2465  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2466  	NullFields []string `json:"-"`
  2467  }
  2468  
  2469  func (s *ResponsePolicyGKECluster) MarshalJSON() ([]byte, error) {
  2470  	type NoMethod ResponsePolicyGKECluster
  2471  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2472  }
  2473  
  2474  type ResponsePolicyNetwork struct {
  2475  	Kind string `json:"kind,omitempty"`
  2476  	// NetworkUrl: The fully qualified URL of the VPC network to bind to. This
  2477  	// should be formatted like
  2478  	// https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}
  2479  	NetworkUrl string `json:"networkUrl,omitempty"`
  2480  	// ForceSendFields is a list of field names (e.g. "Kind") to unconditionally
  2481  	// include in API requests. By default, fields with empty or default values are
  2482  	// omitted from API requests. See
  2483  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2484  	// details.
  2485  	ForceSendFields []string `json:"-"`
  2486  	// NullFields is a list of field names (e.g. "Kind") to include in API requests
  2487  	// with the JSON null value. By default, fields with empty values are omitted
  2488  	// from API requests. See
  2489  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2490  	NullFields []string `json:"-"`
  2491  }
  2492  
  2493  func (s *ResponsePolicyNetwork) MarshalJSON() ([]byte, error) {
  2494  	type NoMethod ResponsePolicyNetwork
  2495  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2496  }
  2497  
  2498  // ResponsePolicyRule: A Response Policy Rule is a selector that applies its
  2499  // behavior to queries that match the selector. Selectors are DNS names, which
  2500  // may be wildcards or exact matches. Each DNS query subject to a Response
  2501  // Policy matches at most one ResponsePolicyRule, as identified by the dns_name
  2502  // field with the longest matching suffix.
  2503  type ResponsePolicyRule struct {
  2504  	// Behavior: Answer this query with a behavior rather than DNS data.
  2505  	//
  2506  	// Possible values:
  2507  	//   "behaviorUnspecified"
  2508  	//   "bypassResponsePolicy" - Skip a less-specific ResponsePolicyRule and
  2509  	// continue normal query logic. This can be used with a less-specific wildcard
  2510  	// selector to exempt a subset of the wildcard ResponsePolicyRule from the
  2511  	// ResponsePolicy behavior and query the public Internet instead. For instance,
  2512  	// if these rules exist: *.example.com -> LocalData 1.2.3.4 foo.example.com ->
  2513  	// Behavior 'bypassResponsePolicy' Then a query for 'foo.example.com' skips the
  2514  	// wildcard. This additionally functions to facilitate the allowlist feature.
  2515  	// RPZs can be applied to multiple levels in the (eventually org, folder,
  2516  	// project, network) hierarchy. If a rule is applied at a higher level of the
  2517  	// hierarchy, adding a passthru rule at a lower level will supersede that, and
  2518  	// a query from an affected vm to that domain will be exempt from the RPZ and
  2519  	// proceed to normal resolution behavior.
  2520  	Behavior string `json:"behavior,omitempty"`
  2521  	// DnsName: The DNS name (wildcard or exact) to apply this rule to. Must be
  2522  	// unique within the Response Policy Rule.
  2523  	DnsName string `json:"dnsName,omitempty"`
  2524  	Kind    string `json:"kind,omitempty"`
  2525  	// LocalData: Answer this query directly with DNS data. These
  2526  	// ResourceRecordSets override any other DNS behavior for the matched name; in
  2527  	// particular they override private zones, the public internet, and GCP
  2528  	// internal DNS. No SOA nor NS types are allowed.
  2529  	LocalData *ResponsePolicyRuleLocalData `json:"localData,omitempty"`
  2530  	// RuleName: An identifier for this rule. Must be unique with the
  2531  	// ResponsePolicy.
  2532  	RuleName string `json:"ruleName,omitempty"`
  2533  
  2534  	// ServerResponse contains the HTTP response code and headers from the server.
  2535  	googleapi.ServerResponse `json:"-"`
  2536  	// ForceSendFields is a list of field names (e.g. "Behavior") to
  2537  	// unconditionally include in API requests. By default, fields with empty or
  2538  	// default values are omitted from API requests. See
  2539  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2540  	// details.
  2541  	ForceSendFields []string `json:"-"`
  2542  	// NullFields is a list of field names (e.g. "Behavior") to include in API
  2543  	// requests with the JSON null value. By default, fields with empty values are
  2544  	// omitted from API requests. See
  2545  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2546  	NullFields []string `json:"-"`
  2547  }
  2548  
  2549  func (s *ResponsePolicyRule) MarshalJSON() ([]byte, error) {
  2550  	type NoMethod ResponsePolicyRule
  2551  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2552  }
  2553  
  2554  type ResponsePolicyRuleLocalData struct {
  2555  	// LocalDatas: All resource record sets for this selector, one per resource
  2556  	// record type. The name must match the dns_name.
  2557  	LocalDatas []*ResourceRecordSet `json:"localDatas,omitempty"`
  2558  	// ForceSendFields is a list of field names (e.g. "LocalDatas") to
  2559  	// unconditionally include in API requests. By default, fields with empty or
  2560  	// default values are omitted from API requests. See
  2561  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2562  	// details.
  2563  	ForceSendFields []string `json:"-"`
  2564  	// NullFields is a list of field names (e.g. "LocalDatas") to include in API
  2565  	// requests with the JSON null value. By default, fields with empty values are
  2566  	// omitted from API requests. See
  2567  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2568  	NullFields []string `json:"-"`
  2569  }
  2570  
  2571  func (s *ResponsePolicyRuleLocalData) MarshalJSON() ([]byte, error) {
  2572  	type NoMethod ResponsePolicyRuleLocalData
  2573  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2574  }
  2575  
  2576  type ResponsePolicyRulesListResponse struct {
  2577  	Header *ResponseHeader `json:"header,omitempty"`
  2578  	// NextPageToken: The presence of this field indicates that there exist more
  2579  	// results following your last page of results in pagination order. To fetch
  2580  	// them, make another list request using this value as your page token. This
  2581  	// lets you the complete contents of even very large collections one page at a
  2582  	// time. However, if the contents of the collection change between the first
  2583  	// and last paginated list request, the set of all elements returned are an
  2584  	// inconsistent view of the collection. You cannot retrieve a consistent
  2585  	// snapshot of a collection larger than the maximum page size.
  2586  	NextPageToken string `json:"nextPageToken,omitempty"`
  2587  	// ResponsePolicyRules: The Response Policy Rule resources.
  2588  	ResponsePolicyRules []*ResponsePolicyRule `json:"responsePolicyRules,omitempty"`
  2589  
  2590  	// ServerResponse contains the HTTP response code and headers from the server.
  2591  	googleapi.ServerResponse `json:"-"`
  2592  	// ForceSendFields is a list of field names (e.g. "Header") to unconditionally
  2593  	// include in API requests. By default, fields with empty or default values are
  2594  	// omitted from API requests. See
  2595  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2596  	// details.
  2597  	ForceSendFields []string `json:"-"`
  2598  	// NullFields is a list of field names (e.g. "Header") to include in API
  2599  	// requests with the JSON null value. By default, fields with empty values are
  2600  	// omitted from API requests. See
  2601  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2602  	NullFields []string `json:"-"`
  2603  }
  2604  
  2605  func (s *ResponsePolicyRulesListResponse) MarshalJSON() ([]byte, error) {
  2606  	type NoMethod ResponsePolicyRulesListResponse
  2607  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2608  }
  2609  
  2610  type ResponsePolicyRulesPatchResponse struct {
  2611  	Header             *ResponseHeader     `json:"header,omitempty"`
  2612  	ResponsePolicyRule *ResponsePolicyRule `json:"responsePolicyRule,omitempty"`
  2613  
  2614  	// ServerResponse contains the HTTP response code and headers from the server.
  2615  	googleapi.ServerResponse `json:"-"`
  2616  	// ForceSendFields is a list of field names (e.g. "Header") to unconditionally
  2617  	// include in API requests. By default, fields with empty or default values are
  2618  	// omitted from API requests. See
  2619  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2620  	// details.
  2621  	ForceSendFields []string `json:"-"`
  2622  	// NullFields is a list of field names (e.g. "Header") to include in API
  2623  	// requests with the JSON null value. By default, fields with empty values are
  2624  	// omitted from API requests. See
  2625  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2626  	NullFields []string `json:"-"`
  2627  }
  2628  
  2629  func (s *ResponsePolicyRulesPatchResponse) MarshalJSON() ([]byte, error) {
  2630  	type NoMethod ResponsePolicyRulesPatchResponse
  2631  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2632  }
  2633  
  2634  type ResponsePolicyRulesUpdateResponse struct {
  2635  	Header             *ResponseHeader     `json:"header,omitempty"`
  2636  	ResponsePolicyRule *ResponsePolicyRule `json:"responsePolicyRule,omitempty"`
  2637  
  2638  	// ServerResponse contains the HTTP response code and headers from the server.
  2639  	googleapi.ServerResponse `json:"-"`
  2640  	// ForceSendFields is a list of field names (e.g. "Header") to unconditionally
  2641  	// include in API requests. By default, fields with empty or default values are
  2642  	// omitted from API requests. See
  2643  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2644  	// details.
  2645  	ForceSendFields []string `json:"-"`
  2646  	// NullFields is a list of field names (e.g. "Header") to include in API
  2647  	// requests with the JSON null value. By default, fields with empty values are
  2648  	// omitted from API requests. See
  2649  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2650  	NullFields []string `json:"-"`
  2651  }
  2652  
  2653  func (s *ResponsePolicyRulesUpdateResponse) MarshalJSON() ([]byte, error) {
  2654  	type NoMethod ResponsePolicyRulesUpdateResponse
  2655  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2656  }
  2657  
  2658  type ChangesCreateCall struct {
  2659  	s           *Service
  2660  	project     string
  2661  	managedZone string
  2662  	change      *Change
  2663  	urlParams_  gensupport.URLParams
  2664  	ctx_        context.Context
  2665  	header_     http.Header
  2666  }
  2667  
  2668  // Create: Atomically updates the ResourceRecordSet collection.
  2669  //
  2670  //   - managedZone: Identifies the managed zone addressed by this request. Can be
  2671  //     the managed zone name or ID.
  2672  //   - project: Identifies the project addressed by this request.
  2673  func (r *ChangesService) Create(project string, managedZone string, change *Change) *ChangesCreateCall {
  2674  	c := &ChangesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2675  	c.project = project
  2676  	c.managedZone = managedZone
  2677  	c.change = change
  2678  	return c
  2679  }
  2680  
  2681  // ClientOperationId sets the optional parameter "clientOperationId": For
  2682  // mutating operation requests only. An optional identifier specified by the
  2683  // client. Must be unique for operation resources in the Operations collection.
  2684  func (c *ChangesCreateCall) ClientOperationId(clientOperationId string) *ChangesCreateCall {
  2685  	c.urlParams_.Set("clientOperationId", clientOperationId)
  2686  	return c
  2687  }
  2688  
  2689  // Fields allows partial responses to be retrieved. See
  2690  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2691  // details.
  2692  func (c *ChangesCreateCall) Fields(s ...googleapi.Field) *ChangesCreateCall {
  2693  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2694  	return c
  2695  }
  2696  
  2697  // Context sets the context to be used in this call's Do method.
  2698  func (c *ChangesCreateCall) Context(ctx context.Context) *ChangesCreateCall {
  2699  	c.ctx_ = ctx
  2700  	return c
  2701  }
  2702  
  2703  // Header returns a http.Header that can be modified by the caller to add
  2704  // headers to the request.
  2705  func (c *ChangesCreateCall) Header() http.Header {
  2706  	if c.header_ == nil {
  2707  		c.header_ = make(http.Header)
  2708  	}
  2709  	return c.header_
  2710  }
  2711  
  2712  func (c *ChangesCreateCall) doRequest(alt string) (*http.Response, error) {
  2713  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  2714  	var body io.Reader = nil
  2715  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.change)
  2716  	if err != nil {
  2717  		return nil, err
  2718  	}
  2719  	c.urlParams_.Set("alt", alt)
  2720  	c.urlParams_.Set("prettyPrint", "false")
  2721  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/managedZones/{managedZone}/changes")
  2722  	urls += "?" + c.urlParams_.Encode()
  2723  	req, err := http.NewRequest("POST", urls, body)
  2724  	if err != nil {
  2725  		return nil, err
  2726  	}
  2727  	req.Header = reqHeaders
  2728  	googleapi.Expand(req.URL, map[string]string{
  2729  		"project":     c.project,
  2730  		"managedZone": c.managedZone,
  2731  	})
  2732  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2733  }
  2734  
  2735  // Do executes the "dns.changes.create" call.
  2736  // Any non-2xx status code is an error. Response headers are in either
  2737  // *Change.ServerResponse.Header or (if a response was returned at all) in
  2738  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2739  // whether the returned error was because http.StatusNotModified was returned.
  2740  func (c *ChangesCreateCall) Do(opts ...googleapi.CallOption) (*Change, error) {
  2741  	gensupport.SetOptions(c.urlParams_, opts...)
  2742  	res, err := c.doRequest("json")
  2743  	if res != nil && res.StatusCode == http.StatusNotModified {
  2744  		if res.Body != nil {
  2745  			res.Body.Close()
  2746  		}
  2747  		return nil, gensupport.WrapError(&googleapi.Error{
  2748  			Code:   res.StatusCode,
  2749  			Header: res.Header,
  2750  		})
  2751  	}
  2752  	if err != nil {
  2753  		return nil, err
  2754  	}
  2755  	defer googleapi.CloseBody(res)
  2756  	if err := googleapi.CheckResponse(res); err != nil {
  2757  		return nil, gensupport.WrapError(err)
  2758  	}
  2759  	ret := &Change{
  2760  		ServerResponse: googleapi.ServerResponse{
  2761  			Header:         res.Header,
  2762  			HTTPStatusCode: res.StatusCode,
  2763  		},
  2764  	}
  2765  	target := &ret
  2766  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2767  		return nil, err
  2768  	}
  2769  	return ret, nil
  2770  }
  2771  
  2772  type ChangesGetCall struct {
  2773  	s            *Service
  2774  	project      string
  2775  	managedZone  string
  2776  	changeId     string
  2777  	urlParams_   gensupport.URLParams
  2778  	ifNoneMatch_ string
  2779  	ctx_         context.Context
  2780  	header_      http.Header
  2781  }
  2782  
  2783  // Get: Fetches the representation of an existing Change.
  2784  //
  2785  //   - changeId: The identifier of the requested change, from a previous
  2786  //     ResourceRecordSetsChangeResponse.
  2787  //   - managedZone: Identifies the managed zone addressed by this request. Can be
  2788  //     the managed zone name or ID.
  2789  //   - project: Identifies the project addressed by this request.
  2790  func (r *ChangesService) Get(project string, managedZone string, changeId string) *ChangesGetCall {
  2791  	c := &ChangesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2792  	c.project = project
  2793  	c.managedZone = managedZone
  2794  	c.changeId = changeId
  2795  	return c
  2796  }
  2797  
  2798  // ClientOperationId sets the optional parameter "clientOperationId": For
  2799  // mutating operation requests only. An optional identifier specified by the
  2800  // client. Must be unique for operation resources in the Operations collection.
  2801  func (c *ChangesGetCall) ClientOperationId(clientOperationId string) *ChangesGetCall {
  2802  	c.urlParams_.Set("clientOperationId", clientOperationId)
  2803  	return c
  2804  }
  2805  
  2806  // Fields allows partial responses to be retrieved. See
  2807  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2808  // details.
  2809  func (c *ChangesGetCall) Fields(s ...googleapi.Field) *ChangesGetCall {
  2810  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2811  	return c
  2812  }
  2813  
  2814  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2815  // object's ETag matches the given value. This is useful for getting updates
  2816  // only after the object has changed since the last request.
  2817  func (c *ChangesGetCall) IfNoneMatch(entityTag string) *ChangesGetCall {
  2818  	c.ifNoneMatch_ = entityTag
  2819  	return c
  2820  }
  2821  
  2822  // Context sets the context to be used in this call's Do method.
  2823  func (c *ChangesGetCall) Context(ctx context.Context) *ChangesGetCall {
  2824  	c.ctx_ = ctx
  2825  	return c
  2826  }
  2827  
  2828  // Header returns a http.Header that can be modified by the caller to add
  2829  // headers to the request.
  2830  func (c *ChangesGetCall) Header() http.Header {
  2831  	if c.header_ == nil {
  2832  		c.header_ = make(http.Header)
  2833  	}
  2834  	return c.header_
  2835  }
  2836  
  2837  func (c *ChangesGetCall) doRequest(alt string) (*http.Response, error) {
  2838  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2839  	if c.ifNoneMatch_ != "" {
  2840  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2841  	}
  2842  	var body io.Reader = nil
  2843  	c.urlParams_.Set("alt", alt)
  2844  	c.urlParams_.Set("prettyPrint", "false")
  2845  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/managedZones/{managedZone}/changes/{changeId}")
  2846  	urls += "?" + c.urlParams_.Encode()
  2847  	req, err := http.NewRequest("GET", urls, body)
  2848  	if err != nil {
  2849  		return nil, err
  2850  	}
  2851  	req.Header = reqHeaders
  2852  	googleapi.Expand(req.URL, map[string]string{
  2853  		"project":     c.project,
  2854  		"managedZone": c.managedZone,
  2855  		"changeId":    c.changeId,
  2856  	})
  2857  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2858  }
  2859  
  2860  // Do executes the "dns.changes.get" call.
  2861  // Any non-2xx status code is an error. Response headers are in either
  2862  // *Change.ServerResponse.Header or (if a response was returned at all) in
  2863  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2864  // whether the returned error was because http.StatusNotModified was returned.
  2865  func (c *ChangesGetCall) Do(opts ...googleapi.CallOption) (*Change, error) {
  2866  	gensupport.SetOptions(c.urlParams_, opts...)
  2867  	res, err := c.doRequest("json")
  2868  	if res != nil && res.StatusCode == http.StatusNotModified {
  2869  		if res.Body != nil {
  2870  			res.Body.Close()
  2871  		}
  2872  		return nil, gensupport.WrapError(&googleapi.Error{
  2873  			Code:   res.StatusCode,
  2874  			Header: res.Header,
  2875  		})
  2876  	}
  2877  	if err != nil {
  2878  		return nil, err
  2879  	}
  2880  	defer googleapi.CloseBody(res)
  2881  	if err := googleapi.CheckResponse(res); err != nil {
  2882  		return nil, gensupport.WrapError(err)
  2883  	}
  2884  	ret := &Change{
  2885  		ServerResponse: googleapi.ServerResponse{
  2886  			Header:         res.Header,
  2887  			HTTPStatusCode: res.StatusCode,
  2888  		},
  2889  	}
  2890  	target := &ret
  2891  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2892  		return nil, err
  2893  	}
  2894  	return ret, nil
  2895  }
  2896  
  2897  type ChangesListCall struct {
  2898  	s            *Service
  2899  	project      string
  2900  	managedZone  string
  2901  	urlParams_   gensupport.URLParams
  2902  	ifNoneMatch_ string
  2903  	ctx_         context.Context
  2904  	header_      http.Header
  2905  }
  2906  
  2907  // List: Enumerates Changes to a ResourceRecordSet collection.
  2908  //
  2909  //   - managedZone: Identifies the managed zone addressed by this request. Can be
  2910  //     the managed zone name or ID.
  2911  //   - project: Identifies the project addressed by this request.
  2912  func (r *ChangesService) List(project string, managedZone string) *ChangesListCall {
  2913  	c := &ChangesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2914  	c.project = project
  2915  	c.managedZone = managedZone
  2916  	return c
  2917  }
  2918  
  2919  // MaxResults sets the optional parameter "maxResults": Maximum number of
  2920  // results to be returned. If unspecified, the server decides how many results
  2921  // to return.
  2922  func (c *ChangesListCall) MaxResults(maxResults int64) *ChangesListCall {
  2923  	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  2924  	return c
  2925  }
  2926  
  2927  // PageToken sets the optional parameter "pageToken": A tag returned by a
  2928  // previous list request that was truncated. Use this parameter to continue a
  2929  // previous list request.
  2930  func (c *ChangesListCall) PageToken(pageToken string) *ChangesListCall {
  2931  	c.urlParams_.Set("pageToken", pageToken)
  2932  	return c
  2933  }
  2934  
  2935  // SortBy sets the optional parameter "sortBy": Sorting criterion. The only
  2936  // supported value is change sequence.
  2937  //
  2938  // Possible values:
  2939  //
  2940  //	"changeSequence" (default)
  2941  func (c *ChangesListCall) SortBy(sortBy string) *ChangesListCall {
  2942  	c.urlParams_.Set("sortBy", sortBy)
  2943  	return c
  2944  }
  2945  
  2946  // SortOrder sets the optional parameter "sortOrder": Sorting order direction:
  2947  // 'ascending' or 'descending'.
  2948  func (c *ChangesListCall) SortOrder(sortOrder string) *ChangesListCall {
  2949  	c.urlParams_.Set("sortOrder", sortOrder)
  2950  	return c
  2951  }
  2952  
  2953  // Fields allows partial responses to be retrieved. See
  2954  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2955  // details.
  2956  func (c *ChangesListCall) Fields(s ...googleapi.Field) *ChangesListCall {
  2957  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2958  	return c
  2959  }
  2960  
  2961  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2962  // object's ETag matches the given value. This is useful for getting updates
  2963  // only after the object has changed since the last request.
  2964  func (c *ChangesListCall) IfNoneMatch(entityTag string) *ChangesListCall {
  2965  	c.ifNoneMatch_ = entityTag
  2966  	return c
  2967  }
  2968  
  2969  // Context sets the context to be used in this call's Do method.
  2970  func (c *ChangesListCall) Context(ctx context.Context) *ChangesListCall {
  2971  	c.ctx_ = ctx
  2972  	return c
  2973  }
  2974  
  2975  // Header returns a http.Header that can be modified by the caller to add
  2976  // headers to the request.
  2977  func (c *ChangesListCall) Header() http.Header {
  2978  	if c.header_ == nil {
  2979  		c.header_ = make(http.Header)
  2980  	}
  2981  	return c.header_
  2982  }
  2983  
  2984  func (c *ChangesListCall) doRequest(alt string) (*http.Response, error) {
  2985  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2986  	if c.ifNoneMatch_ != "" {
  2987  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2988  	}
  2989  	var body io.Reader = nil
  2990  	c.urlParams_.Set("alt", alt)
  2991  	c.urlParams_.Set("prettyPrint", "false")
  2992  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/managedZones/{managedZone}/changes")
  2993  	urls += "?" + c.urlParams_.Encode()
  2994  	req, err := http.NewRequest("GET", urls, body)
  2995  	if err != nil {
  2996  		return nil, err
  2997  	}
  2998  	req.Header = reqHeaders
  2999  	googleapi.Expand(req.URL, map[string]string{
  3000  		"project":     c.project,
  3001  		"managedZone": c.managedZone,
  3002  	})
  3003  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3004  }
  3005  
  3006  // Do executes the "dns.changes.list" call.
  3007  // Any non-2xx status code is an error. Response headers are in either
  3008  // *ChangesListResponse.ServerResponse.Header or (if a response was returned at
  3009  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  3010  // check whether the returned error was because http.StatusNotModified was
  3011  // returned.
  3012  func (c *ChangesListCall) Do(opts ...googleapi.CallOption) (*ChangesListResponse, error) {
  3013  	gensupport.SetOptions(c.urlParams_, opts...)
  3014  	res, err := c.doRequest("json")
  3015  	if res != nil && res.StatusCode == http.StatusNotModified {
  3016  		if res.Body != nil {
  3017  			res.Body.Close()
  3018  		}
  3019  		return nil, gensupport.WrapError(&googleapi.Error{
  3020  			Code:   res.StatusCode,
  3021  			Header: res.Header,
  3022  		})
  3023  	}
  3024  	if err != nil {
  3025  		return nil, err
  3026  	}
  3027  	defer googleapi.CloseBody(res)
  3028  	if err := googleapi.CheckResponse(res); err != nil {
  3029  		return nil, gensupport.WrapError(err)
  3030  	}
  3031  	ret := &ChangesListResponse{
  3032  		ServerResponse: googleapi.ServerResponse{
  3033  			Header:         res.Header,
  3034  			HTTPStatusCode: res.StatusCode,
  3035  		},
  3036  	}
  3037  	target := &ret
  3038  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3039  		return nil, err
  3040  	}
  3041  	return ret, nil
  3042  }
  3043  
  3044  // Pages invokes f for each page of results.
  3045  // A non-nil error returned from f will halt the iteration.
  3046  // The provided context supersedes any context provided to the Context method.
  3047  func (c *ChangesListCall) Pages(ctx context.Context, f func(*ChangesListResponse) error) error {
  3048  	c.ctx_ = ctx
  3049  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  3050  	for {
  3051  		x, err := c.Do()
  3052  		if err != nil {
  3053  			return err
  3054  		}
  3055  		if err := f(x); err != nil {
  3056  			return err
  3057  		}
  3058  		if x.NextPageToken == "" {
  3059  			return nil
  3060  		}
  3061  		c.PageToken(x.NextPageToken)
  3062  	}
  3063  }
  3064  
  3065  type DnsKeysGetCall struct {
  3066  	s            *Service
  3067  	project      string
  3068  	managedZone  string
  3069  	dnsKeyId     string
  3070  	urlParams_   gensupport.URLParams
  3071  	ifNoneMatch_ string
  3072  	ctx_         context.Context
  3073  	header_      http.Header
  3074  }
  3075  
  3076  // Get: Fetches the representation of an existing DnsKey.
  3077  //
  3078  //   - dnsKeyId: The identifier of the requested DnsKey.
  3079  //   - managedZone: Identifies the managed zone addressed by this request. Can be
  3080  //     the managed zone name or ID.
  3081  //   - project: Identifies the project addressed by this request.
  3082  func (r *DnsKeysService) Get(project string, managedZone string, dnsKeyId string) *DnsKeysGetCall {
  3083  	c := &DnsKeysGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3084  	c.project = project
  3085  	c.managedZone = managedZone
  3086  	c.dnsKeyId = dnsKeyId
  3087  	return c
  3088  }
  3089  
  3090  // ClientOperationId sets the optional parameter "clientOperationId": For
  3091  // mutating operation requests only. An optional identifier specified by the
  3092  // client. Must be unique for operation resources in the Operations collection.
  3093  func (c *DnsKeysGetCall) ClientOperationId(clientOperationId string) *DnsKeysGetCall {
  3094  	c.urlParams_.Set("clientOperationId", clientOperationId)
  3095  	return c
  3096  }
  3097  
  3098  // DigestType sets the optional parameter "digestType": An optional
  3099  // comma-separated list of digest types to compute and display for key signing
  3100  // keys. If omitted, the recommended digest type is computed and displayed.
  3101  func (c *DnsKeysGetCall) DigestType(digestType string) *DnsKeysGetCall {
  3102  	c.urlParams_.Set("digestType", digestType)
  3103  	return c
  3104  }
  3105  
  3106  // Fields allows partial responses to be retrieved. See
  3107  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3108  // details.
  3109  func (c *DnsKeysGetCall) Fields(s ...googleapi.Field) *DnsKeysGetCall {
  3110  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3111  	return c
  3112  }
  3113  
  3114  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3115  // object's ETag matches the given value. This is useful for getting updates
  3116  // only after the object has changed since the last request.
  3117  func (c *DnsKeysGetCall) IfNoneMatch(entityTag string) *DnsKeysGetCall {
  3118  	c.ifNoneMatch_ = entityTag
  3119  	return c
  3120  }
  3121  
  3122  // Context sets the context to be used in this call's Do method.
  3123  func (c *DnsKeysGetCall) Context(ctx context.Context) *DnsKeysGetCall {
  3124  	c.ctx_ = ctx
  3125  	return c
  3126  }
  3127  
  3128  // Header returns a http.Header that can be modified by the caller to add
  3129  // headers to the request.
  3130  func (c *DnsKeysGetCall) Header() http.Header {
  3131  	if c.header_ == nil {
  3132  		c.header_ = make(http.Header)
  3133  	}
  3134  	return c.header_
  3135  }
  3136  
  3137  func (c *DnsKeysGetCall) doRequest(alt string) (*http.Response, error) {
  3138  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3139  	if c.ifNoneMatch_ != "" {
  3140  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3141  	}
  3142  	var body io.Reader = nil
  3143  	c.urlParams_.Set("alt", alt)
  3144  	c.urlParams_.Set("prettyPrint", "false")
  3145  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/managedZones/{managedZone}/dnsKeys/{dnsKeyId}")
  3146  	urls += "?" + c.urlParams_.Encode()
  3147  	req, err := http.NewRequest("GET", urls, body)
  3148  	if err != nil {
  3149  		return nil, err
  3150  	}
  3151  	req.Header = reqHeaders
  3152  	googleapi.Expand(req.URL, map[string]string{
  3153  		"project":     c.project,
  3154  		"managedZone": c.managedZone,
  3155  		"dnsKeyId":    c.dnsKeyId,
  3156  	})
  3157  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3158  }
  3159  
  3160  // Do executes the "dns.dnsKeys.get" call.
  3161  // Any non-2xx status code is an error. Response headers are in either
  3162  // *DnsKey.ServerResponse.Header or (if a response was returned at all) in
  3163  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3164  // whether the returned error was because http.StatusNotModified was returned.
  3165  func (c *DnsKeysGetCall) Do(opts ...googleapi.CallOption) (*DnsKey, error) {
  3166  	gensupport.SetOptions(c.urlParams_, opts...)
  3167  	res, err := c.doRequest("json")
  3168  	if res != nil && res.StatusCode == http.StatusNotModified {
  3169  		if res.Body != nil {
  3170  			res.Body.Close()
  3171  		}
  3172  		return nil, gensupport.WrapError(&googleapi.Error{
  3173  			Code:   res.StatusCode,
  3174  			Header: res.Header,
  3175  		})
  3176  	}
  3177  	if err != nil {
  3178  		return nil, err
  3179  	}
  3180  	defer googleapi.CloseBody(res)
  3181  	if err := googleapi.CheckResponse(res); err != nil {
  3182  		return nil, gensupport.WrapError(err)
  3183  	}
  3184  	ret := &DnsKey{
  3185  		ServerResponse: googleapi.ServerResponse{
  3186  			Header:         res.Header,
  3187  			HTTPStatusCode: res.StatusCode,
  3188  		},
  3189  	}
  3190  	target := &ret
  3191  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3192  		return nil, err
  3193  	}
  3194  	return ret, nil
  3195  }
  3196  
  3197  type DnsKeysListCall struct {
  3198  	s            *Service
  3199  	project      string
  3200  	managedZone  string
  3201  	urlParams_   gensupport.URLParams
  3202  	ifNoneMatch_ string
  3203  	ctx_         context.Context
  3204  	header_      http.Header
  3205  }
  3206  
  3207  // List: Enumerates DnsKeys to a ResourceRecordSet collection.
  3208  //
  3209  //   - managedZone: Identifies the managed zone addressed by this request. Can be
  3210  //     the managed zone name or ID.
  3211  //   - project: Identifies the project addressed by this request.
  3212  func (r *DnsKeysService) List(project string, managedZone string) *DnsKeysListCall {
  3213  	c := &DnsKeysListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3214  	c.project = project
  3215  	c.managedZone = managedZone
  3216  	return c
  3217  }
  3218  
  3219  // DigestType sets the optional parameter "digestType": An optional
  3220  // comma-separated list of digest types to compute and display for key signing
  3221  // keys. If omitted, the recommended digest type is computed and displayed.
  3222  func (c *DnsKeysListCall) DigestType(digestType string) *DnsKeysListCall {
  3223  	c.urlParams_.Set("digestType", digestType)
  3224  	return c
  3225  }
  3226  
  3227  // MaxResults sets the optional parameter "maxResults": Maximum number of
  3228  // results to be returned. If unspecified, the server decides how many results
  3229  // to return.
  3230  func (c *DnsKeysListCall) MaxResults(maxResults int64) *DnsKeysListCall {
  3231  	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  3232  	return c
  3233  }
  3234  
  3235  // PageToken sets the optional parameter "pageToken": A tag returned by a
  3236  // previous list request that was truncated. Use this parameter to continue a
  3237  // previous list request.
  3238  func (c *DnsKeysListCall) PageToken(pageToken string) *DnsKeysListCall {
  3239  	c.urlParams_.Set("pageToken", pageToken)
  3240  	return c
  3241  }
  3242  
  3243  // Fields allows partial responses to be retrieved. See
  3244  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3245  // details.
  3246  func (c *DnsKeysListCall) Fields(s ...googleapi.Field) *DnsKeysListCall {
  3247  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3248  	return c
  3249  }
  3250  
  3251  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3252  // object's ETag matches the given value. This is useful for getting updates
  3253  // only after the object has changed since the last request.
  3254  func (c *DnsKeysListCall) IfNoneMatch(entityTag string) *DnsKeysListCall {
  3255  	c.ifNoneMatch_ = entityTag
  3256  	return c
  3257  }
  3258  
  3259  // Context sets the context to be used in this call's Do method.
  3260  func (c *DnsKeysListCall) Context(ctx context.Context) *DnsKeysListCall {
  3261  	c.ctx_ = ctx
  3262  	return c
  3263  }
  3264  
  3265  // Header returns a http.Header that can be modified by the caller to add
  3266  // headers to the request.
  3267  func (c *DnsKeysListCall) Header() http.Header {
  3268  	if c.header_ == nil {
  3269  		c.header_ = make(http.Header)
  3270  	}
  3271  	return c.header_
  3272  }
  3273  
  3274  func (c *DnsKeysListCall) doRequest(alt string) (*http.Response, error) {
  3275  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3276  	if c.ifNoneMatch_ != "" {
  3277  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3278  	}
  3279  	var body io.Reader = nil
  3280  	c.urlParams_.Set("alt", alt)
  3281  	c.urlParams_.Set("prettyPrint", "false")
  3282  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/managedZones/{managedZone}/dnsKeys")
  3283  	urls += "?" + c.urlParams_.Encode()
  3284  	req, err := http.NewRequest("GET", urls, body)
  3285  	if err != nil {
  3286  		return nil, err
  3287  	}
  3288  	req.Header = reqHeaders
  3289  	googleapi.Expand(req.URL, map[string]string{
  3290  		"project":     c.project,
  3291  		"managedZone": c.managedZone,
  3292  	})
  3293  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3294  }
  3295  
  3296  // Do executes the "dns.dnsKeys.list" call.
  3297  // Any non-2xx status code is an error. Response headers are in either
  3298  // *DnsKeysListResponse.ServerResponse.Header or (if a response was returned at
  3299  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  3300  // check whether the returned error was because http.StatusNotModified was
  3301  // returned.
  3302  func (c *DnsKeysListCall) Do(opts ...googleapi.CallOption) (*DnsKeysListResponse, error) {
  3303  	gensupport.SetOptions(c.urlParams_, opts...)
  3304  	res, err := c.doRequest("json")
  3305  	if res != nil && res.StatusCode == http.StatusNotModified {
  3306  		if res.Body != nil {
  3307  			res.Body.Close()
  3308  		}
  3309  		return nil, gensupport.WrapError(&googleapi.Error{
  3310  			Code:   res.StatusCode,
  3311  			Header: res.Header,
  3312  		})
  3313  	}
  3314  	if err != nil {
  3315  		return nil, err
  3316  	}
  3317  	defer googleapi.CloseBody(res)
  3318  	if err := googleapi.CheckResponse(res); err != nil {
  3319  		return nil, gensupport.WrapError(err)
  3320  	}
  3321  	ret := &DnsKeysListResponse{
  3322  		ServerResponse: googleapi.ServerResponse{
  3323  			Header:         res.Header,
  3324  			HTTPStatusCode: res.StatusCode,
  3325  		},
  3326  	}
  3327  	target := &ret
  3328  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3329  		return nil, err
  3330  	}
  3331  	return ret, nil
  3332  }
  3333  
  3334  // Pages invokes f for each page of results.
  3335  // A non-nil error returned from f will halt the iteration.
  3336  // The provided context supersedes any context provided to the Context method.
  3337  func (c *DnsKeysListCall) Pages(ctx context.Context, f func(*DnsKeysListResponse) error) error {
  3338  	c.ctx_ = ctx
  3339  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  3340  	for {
  3341  		x, err := c.Do()
  3342  		if err != nil {
  3343  			return err
  3344  		}
  3345  		if err := f(x); err != nil {
  3346  			return err
  3347  		}
  3348  		if x.NextPageToken == "" {
  3349  			return nil
  3350  		}
  3351  		c.PageToken(x.NextPageToken)
  3352  	}
  3353  }
  3354  
  3355  type ManagedZoneOperationsGetCall struct {
  3356  	s            *Service
  3357  	project      string
  3358  	managedZone  string
  3359  	operation    string
  3360  	urlParams_   gensupport.URLParams
  3361  	ifNoneMatch_ string
  3362  	ctx_         context.Context
  3363  	header_      http.Header
  3364  }
  3365  
  3366  // Get: Fetches the representation of an existing Operation.
  3367  //
  3368  //   - managedZone: Identifies the managed zone addressed by this request.
  3369  //   - operation: Identifies the operation addressed by this request (ID of the
  3370  //     operation).
  3371  //   - project: Identifies the project addressed by this request.
  3372  func (r *ManagedZoneOperationsService) Get(project string, managedZone string, operation string) *ManagedZoneOperationsGetCall {
  3373  	c := &ManagedZoneOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3374  	c.project = project
  3375  	c.managedZone = managedZone
  3376  	c.operation = operation
  3377  	return c
  3378  }
  3379  
  3380  // ClientOperationId sets the optional parameter "clientOperationId": For
  3381  // mutating operation requests only. An optional identifier specified by the
  3382  // client. Must be unique for operation resources in the Operations collection.
  3383  func (c *ManagedZoneOperationsGetCall) ClientOperationId(clientOperationId string) *ManagedZoneOperationsGetCall {
  3384  	c.urlParams_.Set("clientOperationId", clientOperationId)
  3385  	return c
  3386  }
  3387  
  3388  // Fields allows partial responses to be retrieved. See
  3389  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3390  // details.
  3391  func (c *ManagedZoneOperationsGetCall) Fields(s ...googleapi.Field) *ManagedZoneOperationsGetCall {
  3392  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3393  	return c
  3394  }
  3395  
  3396  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3397  // object's ETag matches the given value. This is useful for getting updates
  3398  // only after the object has changed since the last request.
  3399  func (c *ManagedZoneOperationsGetCall) IfNoneMatch(entityTag string) *ManagedZoneOperationsGetCall {
  3400  	c.ifNoneMatch_ = entityTag
  3401  	return c
  3402  }
  3403  
  3404  // Context sets the context to be used in this call's Do method.
  3405  func (c *ManagedZoneOperationsGetCall) Context(ctx context.Context) *ManagedZoneOperationsGetCall {
  3406  	c.ctx_ = ctx
  3407  	return c
  3408  }
  3409  
  3410  // Header returns a http.Header that can be modified by the caller to add
  3411  // headers to the request.
  3412  func (c *ManagedZoneOperationsGetCall) Header() http.Header {
  3413  	if c.header_ == nil {
  3414  		c.header_ = make(http.Header)
  3415  	}
  3416  	return c.header_
  3417  }
  3418  
  3419  func (c *ManagedZoneOperationsGetCall) doRequest(alt string) (*http.Response, error) {
  3420  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3421  	if c.ifNoneMatch_ != "" {
  3422  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3423  	}
  3424  	var body io.Reader = nil
  3425  	c.urlParams_.Set("alt", alt)
  3426  	c.urlParams_.Set("prettyPrint", "false")
  3427  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/managedZones/{managedZone}/operations/{operation}")
  3428  	urls += "?" + c.urlParams_.Encode()
  3429  	req, err := http.NewRequest("GET", urls, body)
  3430  	if err != nil {
  3431  		return nil, err
  3432  	}
  3433  	req.Header = reqHeaders
  3434  	googleapi.Expand(req.URL, map[string]string{
  3435  		"project":     c.project,
  3436  		"managedZone": c.managedZone,
  3437  		"operation":   c.operation,
  3438  	})
  3439  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3440  }
  3441  
  3442  // Do executes the "dns.managedZoneOperations.get" call.
  3443  // Any non-2xx status code is an error. Response headers are in either
  3444  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  3445  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3446  // whether the returned error was because http.StatusNotModified was returned.
  3447  func (c *ManagedZoneOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  3448  	gensupport.SetOptions(c.urlParams_, opts...)
  3449  	res, err := c.doRequest("json")
  3450  	if res != nil && res.StatusCode == http.StatusNotModified {
  3451  		if res.Body != nil {
  3452  			res.Body.Close()
  3453  		}
  3454  		return nil, gensupport.WrapError(&googleapi.Error{
  3455  			Code:   res.StatusCode,
  3456  			Header: res.Header,
  3457  		})
  3458  	}
  3459  	if err != nil {
  3460  		return nil, err
  3461  	}
  3462  	defer googleapi.CloseBody(res)
  3463  	if err := googleapi.CheckResponse(res); err != nil {
  3464  		return nil, gensupport.WrapError(err)
  3465  	}
  3466  	ret := &Operation{
  3467  		ServerResponse: googleapi.ServerResponse{
  3468  			Header:         res.Header,
  3469  			HTTPStatusCode: res.StatusCode,
  3470  		},
  3471  	}
  3472  	target := &ret
  3473  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3474  		return nil, err
  3475  	}
  3476  	return ret, nil
  3477  }
  3478  
  3479  type ManagedZoneOperationsListCall struct {
  3480  	s            *Service
  3481  	project      string
  3482  	managedZone  string
  3483  	urlParams_   gensupport.URLParams
  3484  	ifNoneMatch_ string
  3485  	ctx_         context.Context
  3486  	header_      http.Header
  3487  }
  3488  
  3489  // List: Enumerates Operations for the given ManagedZone.
  3490  //
  3491  // - managedZone: Identifies the managed zone addressed by this request.
  3492  // - project: Identifies the project addressed by this request.
  3493  func (r *ManagedZoneOperationsService) List(project string, managedZone string) *ManagedZoneOperationsListCall {
  3494  	c := &ManagedZoneOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3495  	c.project = project
  3496  	c.managedZone = managedZone
  3497  	return c
  3498  }
  3499  
  3500  // MaxResults sets the optional parameter "maxResults": Maximum number of
  3501  // results to be returned. If unspecified, the server decides how many results
  3502  // to return.
  3503  func (c *ManagedZoneOperationsListCall) MaxResults(maxResults int64) *ManagedZoneOperationsListCall {
  3504  	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  3505  	return c
  3506  }
  3507  
  3508  // PageToken sets the optional parameter "pageToken": A tag returned by a
  3509  // previous list request that was truncated. Use this parameter to continue a
  3510  // previous list request.
  3511  func (c *ManagedZoneOperationsListCall) PageToken(pageToken string) *ManagedZoneOperationsListCall {
  3512  	c.urlParams_.Set("pageToken", pageToken)
  3513  	return c
  3514  }
  3515  
  3516  // SortBy sets the optional parameter "sortBy": Sorting criterion. The only
  3517  // supported values are START_TIME and ID.
  3518  //
  3519  // Possible values:
  3520  //
  3521  //	"startTime" (default)
  3522  //	"id"
  3523  func (c *ManagedZoneOperationsListCall) SortBy(sortBy string) *ManagedZoneOperationsListCall {
  3524  	c.urlParams_.Set("sortBy", sortBy)
  3525  	return c
  3526  }
  3527  
  3528  // Fields allows partial responses to be retrieved. See
  3529  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3530  // details.
  3531  func (c *ManagedZoneOperationsListCall) Fields(s ...googleapi.Field) *ManagedZoneOperationsListCall {
  3532  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3533  	return c
  3534  }
  3535  
  3536  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3537  // object's ETag matches the given value. This is useful for getting updates
  3538  // only after the object has changed since the last request.
  3539  func (c *ManagedZoneOperationsListCall) IfNoneMatch(entityTag string) *ManagedZoneOperationsListCall {
  3540  	c.ifNoneMatch_ = entityTag
  3541  	return c
  3542  }
  3543  
  3544  // Context sets the context to be used in this call's Do method.
  3545  func (c *ManagedZoneOperationsListCall) Context(ctx context.Context) *ManagedZoneOperationsListCall {
  3546  	c.ctx_ = ctx
  3547  	return c
  3548  }
  3549  
  3550  // Header returns a http.Header that can be modified by the caller to add
  3551  // headers to the request.
  3552  func (c *ManagedZoneOperationsListCall) Header() http.Header {
  3553  	if c.header_ == nil {
  3554  		c.header_ = make(http.Header)
  3555  	}
  3556  	return c.header_
  3557  }
  3558  
  3559  func (c *ManagedZoneOperationsListCall) doRequest(alt string) (*http.Response, error) {
  3560  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3561  	if c.ifNoneMatch_ != "" {
  3562  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3563  	}
  3564  	var body io.Reader = nil
  3565  	c.urlParams_.Set("alt", alt)
  3566  	c.urlParams_.Set("prettyPrint", "false")
  3567  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/managedZones/{managedZone}/operations")
  3568  	urls += "?" + c.urlParams_.Encode()
  3569  	req, err := http.NewRequest("GET", urls, body)
  3570  	if err != nil {
  3571  		return nil, err
  3572  	}
  3573  	req.Header = reqHeaders
  3574  	googleapi.Expand(req.URL, map[string]string{
  3575  		"project":     c.project,
  3576  		"managedZone": c.managedZone,
  3577  	})
  3578  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3579  }
  3580  
  3581  // Do executes the "dns.managedZoneOperations.list" call.
  3582  // Any non-2xx status code is an error. Response headers are in either
  3583  // *ManagedZoneOperationsListResponse.ServerResponse.Header or (if a response
  3584  // was returned at all) in error.(*googleapi.Error).Header. Use
  3585  // googleapi.IsNotModified to check whether the returned error was because
  3586  // http.StatusNotModified was returned.
  3587  func (c *ManagedZoneOperationsListCall) Do(opts ...googleapi.CallOption) (*ManagedZoneOperationsListResponse, error) {
  3588  	gensupport.SetOptions(c.urlParams_, opts...)
  3589  	res, err := c.doRequest("json")
  3590  	if res != nil && res.StatusCode == http.StatusNotModified {
  3591  		if res.Body != nil {
  3592  			res.Body.Close()
  3593  		}
  3594  		return nil, gensupport.WrapError(&googleapi.Error{
  3595  			Code:   res.StatusCode,
  3596  			Header: res.Header,
  3597  		})
  3598  	}
  3599  	if err != nil {
  3600  		return nil, err
  3601  	}
  3602  	defer googleapi.CloseBody(res)
  3603  	if err := googleapi.CheckResponse(res); err != nil {
  3604  		return nil, gensupport.WrapError(err)
  3605  	}
  3606  	ret := &ManagedZoneOperationsListResponse{
  3607  		ServerResponse: googleapi.ServerResponse{
  3608  			Header:         res.Header,
  3609  			HTTPStatusCode: res.StatusCode,
  3610  		},
  3611  	}
  3612  	target := &ret
  3613  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3614  		return nil, err
  3615  	}
  3616  	return ret, nil
  3617  }
  3618  
  3619  // Pages invokes f for each page of results.
  3620  // A non-nil error returned from f will halt the iteration.
  3621  // The provided context supersedes any context provided to the Context method.
  3622  func (c *ManagedZoneOperationsListCall) Pages(ctx context.Context, f func(*ManagedZoneOperationsListResponse) error) error {
  3623  	c.ctx_ = ctx
  3624  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  3625  	for {
  3626  		x, err := c.Do()
  3627  		if err != nil {
  3628  			return err
  3629  		}
  3630  		if err := f(x); err != nil {
  3631  			return err
  3632  		}
  3633  		if x.NextPageToken == "" {
  3634  			return nil
  3635  		}
  3636  		c.PageToken(x.NextPageToken)
  3637  	}
  3638  }
  3639  
  3640  type ManagedZonesCreateCall struct {
  3641  	s           *Service
  3642  	project     string
  3643  	managedzone *ManagedZone
  3644  	urlParams_  gensupport.URLParams
  3645  	ctx_        context.Context
  3646  	header_     http.Header
  3647  }
  3648  
  3649  // Create: Creates a new ManagedZone.
  3650  //
  3651  // - project: Identifies the project addressed by this request.
  3652  func (r *ManagedZonesService) Create(project string, managedzone *ManagedZone) *ManagedZonesCreateCall {
  3653  	c := &ManagedZonesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3654  	c.project = project
  3655  	c.managedzone = managedzone
  3656  	return c
  3657  }
  3658  
  3659  // ClientOperationId sets the optional parameter "clientOperationId": For
  3660  // mutating operation requests only. An optional identifier specified by the
  3661  // client. Must be unique for operation resources in the Operations collection.
  3662  func (c *ManagedZonesCreateCall) ClientOperationId(clientOperationId string) *ManagedZonesCreateCall {
  3663  	c.urlParams_.Set("clientOperationId", clientOperationId)
  3664  	return c
  3665  }
  3666  
  3667  // Fields allows partial responses to be retrieved. See
  3668  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3669  // details.
  3670  func (c *ManagedZonesCreateCall) Fields(s ...googleapi.Field) *ManagedZonesCreateCall {
  3671  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3672  	return c
  3673  }
  3674  
  3675  // Context sets the context to be used in this call's Do method.
  3676  func (c *ManagedZonesCreateCall) Context(ctx context.Context) *ManagedZonesCreateCall {
  3677  	c.ctx_ = ctx
  3678  	return c
  3679  }
  3680  
  3681  // Header returns a http.Header that can be modified by the caller to add
  3682  // headers to the request.
  3683  func (c *ManagedZonesCreateCall) Header() http.Header {
  3684  	if c.header_ == nil {
  3685  		c.header_ = make(http.Header)
  3686  	}
  3687  	return c.header_
  3688  }
  3689  
  3690  func (c *ManagedZonesCreateCall) doRequest(alt string) (*http.Response, error) {
  3691  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3692  	var body io.Reader = nil
  3693  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.managedzone)
  3694  	if err != nil {
  3695  		return nil, err
  3696  	}
  3697  	c.urlParams_.Set("alt", alt)
  3698  	c.urlParams_.Set("prettyPrint", "false")
  3699  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/managedZones")
  3700  	urls += "?" + c.urlParams_.Encode()
  3701  	req, err := http.NewRequest("POST", urls, body)
  3702  	if err != nil {
  3703  		return nil, err
  3704  	}
  3705  	req.Header = reqHeaders
  3706  	googleapi.Expand(req.URL, map[string]string{
  3707  		"project": c.project,
  3708  	})
  3709  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3710  }
  3711  
  3712  // Do executes the "dns.managedZones.create" call.
  3713  // Any non-2xx status code is an error. Response headers are in either
  3714  // *ManagedZone.ServerResponse.Header or (if a response was returned at all) in
  3715  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3716  // whether the returned error was because http.StatusNotModified was returned.
  3717  func (c *ManagedZonesCreateCall) Do(opts ...googleapi.CallOption) (*ManagedZone, error) {
  3718  	gensupport.SetOptions(c.urlParams_, opts...)
  3719  	res, err := c.doRequest("json")
  3720  	if res != nil && res.StatusCode == http.StatusNotModified {
  3721  		if res.Body != nil {
  3722  			res.Body.Close()
  3723  		}
  3724  		return nil, gensupport.WrapError(&googleapi.Error{
  3725  			Code:   res.StatusCode,
  3726  			Header: res.Header,
  3727  		})
  3728  	}
  3729  	if err != nil {
  3730  		return nil, err
  3731  	}
  3732  	defer googleapi.CloseBody(res)
  3733  	if err := googleapi.CheckResponse(res); err != nil {
  3734  		return nil, gensupport.WrapError(err)
  3735  	}
  3736  	ret := &ManagedZone{
  3737  		ServerResponse: googleapi.ServerResponse{
  3738  			Header:         res.Header,
  3739  			HTTPStatusCode: res.StatusCode,
  3740  		},
  3741  	}
  3742  	target := &ret
  3743  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3744  		return nil, err
  3745  	}
  3746  	return ret, nil
  3747  }
  3748  
  3749  type ManagedZonesDeleteCall struct {
  3750  	s           *Service
  3751  	project     string
  3752  	managedZone string
  3753  	urlParams_  gensupport.URLParams
  3754  	ctx_        context.Context
  3755  	header_     http.Header
  3756  }
  3757  
  3758  // Delete: Deletes a previously created ManagedZone.
  3759  //
  3760  //   - managedZone: Identifies the managed zone addressed by this request. Can be
  3761  //     the managed zone name or ID.
  3762  //   - project: Identifies the project addressed by this request.
  3763  func (r *ManagedZonesService) Delete(project string, managedZone string) *ManagedZonesDeleteCall {
  3764  	c := &ManagedZonesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3765  	c.project = project
  3766  	c.managedZone = managedZone
  3767  	return c
  3768  }
  3769  
  3770  // ClientOperationId sets the optional parameter "clientOperationId": For
  3771  // mutating operation requests only. An optional identifier specified by the
  3772  // client. Must be unique for operation resources in the Operations collection.
  3773  func (c *ManagedZonesDeleteCall) ClientOperationId(clientOperationId string) *ManagedZonesDeleteCall {
  3774  	c.urlParams_.Set("clientOperationId", clientOperationId)
  3775  	return c
  3776  }
  3777  
  3778  // Fields allows partial responses to be retrieved. See
  3779  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3780  // details.
  3781  func (c *ManagedZonesDeleteCall) Fields(s ...googleapi.Field) *ManagedZonesDeleteCall {
  3782  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3783  	return c
  3784  }
  3785  
  3786  // Context sets the context to be used in this call's Do method.
  3787  func (c *ManagedZonesDeleteCall) Context(ctx context.Context) *ManagedZonesDeleteCall {
  3788  	c.ctx_ = ctx
  3789  	return c
  3790  }
  3791  
  3792  // Header returns a http.Header that can be modified by the caller to add
  3793  // headers to the request.
  3794  func (c *ManagedZonesDeleteCall) Header() http.Header {
  3795  	if c.header_ == nil {
  3796  		c.header_ = make(http.Header)
  3797  	}
  3798  	return c.header_
  3799  }
  3800  
  3801  func (c *ManagedZonesDeleteCall) doRequest(alt string) (*http.Response, error) {
  3802  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3803  	var body io.Reader = nil
  3804  	c.urlParams_.Set("alt", alt)
  3805  	c.urlParams_.Set("prettyPrint", "false")
  3806  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/managedZones/{managedZone}")
  3807  	urls += "?" + c.urlParams_.Encode()
  3808  	req, err := http.NewRequest("DELETE", urls, body)
  3809  	if err != nil {
  3810  		return nil, err
  3811  	}
  3812  	req.Header = reqHeaders
  3813  	googleapi.Expand(req.URL, map[string]string{
  3814  		"project":     c.project,
  3815  		"managedZone": c.managedZone,
  3816  	})
  3817  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3818  }
  3819  
  3820  // Do executes the "dns.managedZones.delete" call.
  3821  func (c *ManagedZonesDeleteCall) Do(opts ...googleapi.CallOption) error {
  3822  	gensupport.SetOptions(c.urlParams_, opts...)
  3823  	res, err := c.doRequest("json")
  3824  	if err != nil {
  3825  		return err
  3826  	}
  3827  	defer googleapi.CloseBody(res)
  3828  	if err := googleapi.CheckResponse(res); err != nil {
  3829  		return gensupport.WrapError(err)
  3830  	}
  3831  	return nil
  3832  }
  3833  
  3834  type ManagedZonesGetCall struct {
  3835  	s            *Service
  3836  	project      string
  3837  	managedZone  string
  3838  	urlParams_   gensupport.URLParams
  3839  	ifNoneMatch_ string
  3840  	ctx_         context.Context
  3841  	header_      http.Header
  3842  }
  3843  
  3844  // Get: Fetches the representation of an existing ManagedZone.
  3845  //
  3846  //   - managedZone: Identifies the managed zone addressed by this request. Can be
  3847  //     the managed zone name or ID.
  3848  //   - project: Identifies the project addressed by this request.
  3849  func (r *ManagedZonesService) Get(project string, managedZone string) *ManagedZonesGetCall {
  3850  	c := &ManagedZonesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3851  	c.project = project
  3852  	c.managedZone = managedZone
  3853  	return c
  3854  }
  3855  
  3856  // ClientOperationId sets the optional parameter "clientOperationId": For
  3857  // mutating operation requests only. An optional identifier specified by the
  3858  // client. Must be unique for operation resources in the Operations collection.
  3859  func (c *ManagedZonesGetCall) ClientOperationId(clientOperationId string) *ManagedZonesGetCall {
  3860  	c.urlParams_.Set("clientOperationId", clientOperationId)
  3861  	return c
  3862  }
  3863  
  3864  // Fields allows partial responses to be retrieved. See
  3865  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3866  // details.
  3867  func (c *ManagedZonesGetCall) Fields(s ...googleapi.Field) *ManagedZonesGetCall {
  3868  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3869  	return c
  3870  }
  3871  
  3872  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3873  // object's ETag matches the given value. This is useful for getting updates
  3874  // only after the object has changed since the last request.
  3875  func (c *ManagedZonesGetCall) IfNoneMatch(entityTag string) *ManagedZonesGetCall {
  3876  	c.ifNoneMatch_ = entityTag
  3877  	return c
  3878  }
  3879  
  3880  // Context sets the context to be used in this call's Do method.
  3881  func (c *ManagedZonesGetCall) Context(ctx context.Context) *ManagedZonesGetCall {
  3882  	c.ctx_ = ctx
  3883  	return c
  3884  }
  3885  
  3886  // Header returns a http.Header that can be modified by the caller to add
  3887  // headers to the request.
  3888  func (c *ManagedZonesGetCall) Header() http.Header {
  3889  	if c.header_ == nil {
  3890  		c.header_ = make(http.Header)
  3891  	}
  3892  	return c.header_
  3893  }
  3894  
  3895  func (c *ManagedZonesGetCall) doRequest(alt string) (*http.Response, error) {
  3896  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3897  	if c.ifNoneMatch_ != "" {
  3898  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3899  	}
  3900  	var body io.Reader = nil
  3901  	c.urlParams_.Set("alt", alt)
  3902  	c.urlParams_.Set("prettyPrint", "false")
  3903  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/managedZones/{managedZone}")
  3904  	urls += "?" + c.urlParams_.Encode()
  3905  	req, err := http.NewRequest("GET", urls, body)
  3906  	if err != nil {
  3907  		return nil, err
  3908  	}
  3909  	req.Header = reqHeaders
  3910  	googleapi.Expand(req.URL, map[string]string{
  3911  		"project":     c.project,
  3912  		"managedZone": c.managedZone,
  3913  	})
  3914  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3915  }
  3916  
  3917  // Do executes the "dns.managedZones.get" call.
  3918  // Any non-2xx status code is an error. Response headers are in either
  3919  // *ManagedZone.ServerResponse.Header or (if a response was returned at all) in
  3920  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3921  // whether the returned error was because http.StatusNotModified was returned.
  3922  func (c *ManagedZonesGetCall) Do(opts ...googleapi.CallOption) (*ManagedZone, error) {
  3923  	gensupport.SetOptions(c.urlParams_, opts...)
  3924  	res, err := c.doRequest("json")
  3925  	if res != nil && res.StatusCode == http.StatusNotModified {
  3926  		if res.Body != nil {
  3927  			res.Body.Close()
  3928  		}
  3929  		return nil, gensupport.WrapError(&googleapi.Error{
  3930  			Code:   res.StatusCode,
  3931  			Header: res.Header,
  3932  		})
  3933  	}
  3934  	if err != nil {
  3935  		return nil, err
  3936  	}
  3937  	defer googleapi.CloseBody(res)
  3938  	if err := googleapi.CheckResponse(res); err != nil {
  3939  		return nil, gensupport.WrapError(err)
  3940  	}
  3941  	ret := &ManagedZone{
  3942  		ServerResponse: googleapi.ServerResponse{
  3943  			Header:         res.Header,
  3944  			HTTPStatusCode: res.StatusCode,
  3945  		},
  3946  	}
  3947  	target := &ret
  3948  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3949  		return nil, err
  3950  	}
  3951  	return ret, nil
  3952  }
  3953  
  3954  type ManagedZonesGetIamPolicyCall struct {
  3955  	s                              *Service
  3956  	resource                       string
  3957  	googleiamv1getiampolicyrequest *GoogleIamV1GetIamPolicyRequest
  3958  	urlParams_                     gensupport.URLParams
  3959  	ctx_                           context.Context
  3960  	header_                        http.Header
  3961  }
  3962  
  3963  // GetIamPolicy: Gets the access control policy for a resource. Returns an
  3964  // empty policy if the resource exists and does not have a policy set.
  3965  //
  3966  //   - resource: REQUIRED: The resource for which the policy is being requested.
  3967  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  3968  //     for the appropriate value for this field.
  3969  func (r *ManagedZonesService) GetIamPolicy(resource string, googleiamv1getiampolicyrequest *GoogleIamV1GetIamPolicyRequest) *ManagedZonesGetIamPolicyCall {
  3970  	c := &ManagedZonesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3971  	c.resource = resource
  3972  	c.googleiamv1getiampolicyrequest = googleiamv1getiampolicyrequest
  3973  	return c
  3974  }
  3975  
  3976  // Fields allows partial responses to be retrieved. See
  3977  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3978  // details.
  3979  func (c *ManagedZonesGetIamPolicyCall) Fields(s ...googleapi.Field) *ManagedZonesGetIamPolicyCall {
  3980  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3981  	return c
  3982  }
  3983  
  3984  // Context sets the context to be used in this call's Do method.
  3985  func (c *ManagedZonesGetIamPolicyCall) Context(ctx context.Context) *ManagedZonesGetIamPolicyCall {
  3986  	c.ctx_ = ctx
  3987  	return c
  3988  }
  3989  
  3990  // Header returns a http.Header that can be modified by the caller to add
  3991  // headers to the request.
  3992  func (c *ManagedZonesGetIamPolicyCall) Header() http.Header {
  3993  	if c.header_ == nil {
  3994  		c.header_ = make(http.Header)
  3995  	}
  3996  	return c.header_
  3997  }
  3998  
  3999  func (c *ManagedZonesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  4000  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4001  	var body io.Reader = nil
  4002  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1getiampolicyrequest)
  4003  	if err != nil {
  4004  		return nil, err
  4005  	}
  4006  	c.urlParams_.Set("alt", alt)
  4007  	c.urlParams_.Set("prettyPrint", "false")
  4008  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/{+resource}:getIamPolicy")
  4009  	urls += "?" + c.urlParams_.Encode()
  4010  	req, err := http.NewRequest("POST", urls, body)
  4011  	if err != nil {
  4012  		return nil, err
  4013  	}
  4014  	req.Header = reqHeaders
  4015  	googleapi.Expand(req.URL, map[string]string{
  4016  		"resource": c.resource,
  4017  	})
  4018  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4019  }
  4020  
  4021  // Do executes the "dns.managedZones.getIamPolicy" call.
  4022  // Any non-2xx status code is an error. Response headers are in either
  4023  // *GoogleIamV1Policy.ServerResponse.Header or (if a response was returned at
  4024  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  4025  // check whether the returned error was because http.StatusNotModified was
  4026  // returned.
  4027  func (c *ManagedZonesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) {
  4028  	gensupport.SetOptions(c.urlParams_, opts...)
  4029  	res, err := c.doRequest("json")
  4030  	if res != nil && res.StatusCode == http.StatusNotModified {
  4031  		if res.Body != nil {
  4032  			res.Body.Close()
  4033  		}
  4034  		return nil, gensupport.WrapError(&googleapi.Error{
  4035  			Code:   res.StatusCode,
  4036  			Header: res.Header,
  4037  		})
  4038  	}
  4039  	if err != nil {
  4040  		return nil, err
  4041  	}
  4042  	defer googleapi.CloseBody(res)
  4043  	if err := googleapi.CheckResponse(res); err != nil {
  4044  		return nil, gensupport.WrapError(err)
  4045  	}
  4046  	ret := &GoogleIamV1Policy{
  4047  		ServerResponse: googleapi.ServerResponse{
  4048  			Header:         res.Header,
  4049  			HTTPStatusCode: res.StatusCode,
  4050  		},
  4051  	}
  4052  	target := &ret
  4053  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4054  		return nil, err
  4055  	}
  4056  	return ret, nil
  4057  }
  4058  
  4059  type ManagedZonesListCall struct {
  4060  	s            *Service
  4061  	project      string
  4062  	urlParams_   gensupport.URLParams
  4063  	ifNoneMatch_ string
  4064  	ctx_         context.Context
  4065  	header_      http.Header
  4066  }
  4067  
  4068  // List: Enumerates ManagedZones that have been created but not yet deleted.
  4069  //
  4070  // - project: Identifies the project addressed by this request.
  4071  func (r *ManagedZonesService) List(project string) *ManagedZonesListCall {
  4072  	c := &ManagedZonesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4073  	c.project = project
  4074  	return c
  4075  }
  4076  
  4077  // DnsName sets the optional parameter "dnsName": Restricts the list to return
  4078  // only zones with this domain name.
  4079  func (c *ManagedZonesListCall) DnsName(dnsName string) *ManagedZonesListCall {
  4080  	c.urlParams_.Set("dnsName", dnsName)
  4081  	return c
  4082  }
  4083  
  4084  // MaxResults sets the optional parameter "maxResults": Maximum number of
  4085  // results to be returned. If unspecified, the server decides how many results
  4086  // to return.
  4087  func (c *ManagedZonesListCall) MaxResults(maxResults int64) *ManagedZonesListCall {
  4088  	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  4089  	return c
  4090  }
  4091  
  4092  // PageToken sets the optional parameter "pageToken": A tag returned by a
  4093  // previous list request that was truncated. Use this parameter to continue a
  4094  // previous list request.
  4095  func (c *ManagedZonesListCall) PageToken(pageToken string) *ManagedZonesListCall {
  4096  	c.urlParams_.Set("pageToken", pageToken)
  4097  	return c
  4098  }
  4099  
  4100  // Fields allows partial responses to be retrieved. See
  4101  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4102  // details.
  4103  func (c *ManagedZonesListCall) Fields(s ...googleapi.Field) *ManagedZonesListCall {
  4104  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4105  	return c
  4106  }
  4107  
  4108  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4109  // object's ETag matches the given value. This is useful for getting updates
  4110  // only after the object has changed since the last request.
  4111  func (c *ManagedZonesListCall) IfNoneMatch(entityTag string) *ManagedZonesListCall {
  4112  	c.ifNoneMatch_ = entityTag
  4113  	return c
  4114  }
  4115  
  4116  // Context sets the context to be used in this call's Do method.
  4117  func (c *ManagedZonesListCall) Context(ctx context.Context) *ManagedZonesListCall {
  4118  	c.ctx_ = ctx
  4119  	return c
  4120  }
  4121  
  4122  // Header returns a http.Header that can be modified by the caller to add
  4123  // headers to the request.
  4124  func (c *ManagedZonesListCall) Header() http.Header {
  4125  	if c.header_ == nil {
  4126  		c.header_ = make(http.Header)
  4127  	}
  4128  	return c.header_
  4129  }
  4130  
  4131  func (c *ManagedZonesListCall) doRequest(alt string) (*http.Response, error) {
  4132  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4133  	if c.ifNoneMatch_ != "" {
  4134  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4135  	}
  4136  	var body io.Reader = nil
  4137  	c.urlParams_.Set("alt", alt)
  4138  	c.urlParams_.Set("prettyPrint", "false")
  4139  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/managedZones")
  4140  	urls += "?" + c.urlParams_.Encode()
  4141  	req, err := http.NewRequest("GET", urls, body)
  4142  	if err != nil {
  4143  		return nil, err
  4144  	}
  4145  	req.Header = reqHeaders
  4146  	googleapi.Expand(req.URL, map[string]string{
  4147  		"project": c.project,
  4148  	})
  4149  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4150  }
  4151  
  4152  // Do executes the "dns.managedZones.list" call.
  4153  // Any non-2xx status code is an error. Response headers are in either
  4154  // *ManagedZonesListResponse.ServerResponse.Header or (if a response was
  4155  // returned at all) in error.(*googleapi.Error).Header. Use
  4156  // googleapi.IsNotModified to check whether the returned error was because
  4157  // http.StatusNotModified was returned.
  4158  func (c *ManagedZonesListCall) Do(opts ...googleapi.CallOption) (*ManagedZonesListResponse, error) {
  4159  	gensupport.SetOptions(c.urlParams_, opts...)
  4160  	res, err := c.doRequest("json")
  4161  	if res != nil && res.StatusCode == http.StatusNotModified {
  4162  		if res.Body != nil {
  4163  			res.Body.Close()
  4164  		}
  4165  		return nil, gensupport.WrapError(&googleapi.Error{
  4166  			Code:   res.StatusCode,
  4167  			Header: res.Header,
  4168  		})
  4169  	}
  4170  	if err != nil {
  4171  		return nil, err
  4172  	}
  4173  	defer googleapi.CloseBody(res)
  4174  	if err := googleapi.CheckResponse(res); err != nil {
  4175  		return nil, gensupport.WrapError(err)
  4176  	}
  4177  	ret := &ManagedZonesListResponse{
  4178  		ServerResponse: googleapi.ServerResponse{
  4179  			Header:         res.Header,
  4180  			HTTPStatusCode: res.StatusCode,
  4181  		},
  4182  	}
  4183  	target := &ret
  4184  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4185  		return nil, err
  4186  	}
  4187  	return ret, nil
  4188  }
  4189  
  4190  // Pages invokes f for each page of results.
  4191  // A non-nil error returned from f will halt the iteration.
  4192  // The provided context supersedes any context provided to the Context method.
  4193  func (c *ManagedZonesListCall) Pages(ctx context.Context, f func(*ManagedZonesListResponse) error) error {
  4194  	c.ctx_ = ctx
  4195  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  4196  	for {
  4197  		x, err := c.Do()
  4198  		if err != nil {
  4199  			return err
  4200  		}
  4201  		if err := f(x); err != nil {
  4202  			return err
  4203  		}
  4204  		if x.NextPageToken == "" {
  4205  			return nil
  4206  		}
  4207  		c.PageToken(x.NextPageToken)
  4208  	}
  4209  }
  4210  
  4211  type ManagedZonesPatchCall struct {
  4212  	s           *Service
  4213  	project     string
  4214  	managedZone string
  4215  	managedzone *ManagedZone
  4216  	urlParams_  gensupport.URLParams
  4217  	ctx_        context.Context
  4218  	header_     http.Header
  4219  }
  4220  
  4221  // Patch: Applies a partial update to an existing ManagedZone.
  4222  //
  4223  //   - managedZone: Identifies the managed zone addressed by this request. Can be
  4224  //     the managed zone name or ID.
  4225  //   - project: Identifies the project addressed by this request.
  4226  func (r *ManagedZonesService) Patch(project string, managedZone string, managedzone *ManagedZone) *ManagedZonesPatchCall {
  4227  	c := &ManagedZonesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4228  	c.project = project
  4229  	c.managedZone = managedZone
  4230  	c.managedzone = managedzone
  4231  	return c
  4232  }
  4233  
  4234  // ClientOperationId sets the optional parameter "clientOperationId": For
  4235  // mutating operation requests only. An optional identifier specified by the
  4236  // client. Must be unique for operation resources in the Operations collection.
  4237  func (c *ManagedZonesPatchCall) ClientOperationId(clientOperationId string) *ManagedZonesPatchCall {
  4238  	c.urlParams_.Set("clientOperationId", clientOperationId)
  4239  	return c
  4240  }
  4241  
  4242  // Fields allows partial responses to be retrieved. See
  4243  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4244  // details.
  4245  func (c *ManagedZonesPatchCall) Fields(s ...googleapi.Field) *ManagedZonesPatchCall {
  4246  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4247  	return c
  4248  }
  4249  
  4250  // Context sets the context to be used in this call's Do method.
  4251  func (c *ManagedZonesPatchCall) Context(ctx context.Context) *ManagedZonesPatchCall {
  4252  	c.ctx_ = ctx
  4253  	return c
  4254  }
  4255  
  4256  // Header returns a http.Header that can be modified by the caller to add
  4257  // headers to the request.
  4258  func (c *ManagedZonesPatchCall) Header() http.Header {
  4259  	if c.header_ == nil {
  4260  		c.header_ = make(http.Header)
  4261  	}
  4262  	return c.header_
  4263  }
  4264  
  4265  func (c *ManagedZonesPatchCall) doRequest(alt string) (*http.Response, error) {
  4266  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4267  	var body io.Reader = nil
  4268  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.managedzone)
  4269  	if err != nil {
  4270  		return nil, err
  4271  	}
  4272  	c.urlParams_.Set("alt", alt)
  4273  	c.urlParams_.Set("prettyPrint", "false")
  4274  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/managedZones/{managedZone}")
  4275  	urls += "?" + c.urlParams_.Encode()
  4276  	req, err := http.NewRequest("PATCH", urls, body)
  4277  	if err != nil {
  4278  		return nil, err
  4279  	}
  4280  	req.Header = reqHeaders
  4281  	googleapi.Expand(req.URL, map[string]string{
  4282  		"project":     c.project,
  4283  		"managedZone": c.managedZone,
  4284  	})
  4285  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4286  }
  4287  
  4288  // Do executes the "dns.managedZones.patch" call.
  4289  // Any non-2xx status code is an error. Response headers are in either
  4290  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  4291  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4292  // whether the returned error was because http.StatusNotModified was returned.
  4293  func (c *ManagedZonesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  4294  	gensupport.SetOptions(c.urlParams_, opts...)
  4295  	res, err := c.doRequest("json")
  4296  	if res != nil && res.StatusCode == http.StatusNotModified {
  4297  		if res.Body != nil {
  4298  			res.Body.Close()
  4299  		}
  4300  		return nil, gensupport.WrapError(&googleapi.Error{
  4301  			Code:   res.StatusCode,
  4302  			Header: res.Header,
  4303  		})
  4304  	}
  4305  	if err != nil {
  4306  		return nil, err
  4307  	}
  4308  	defer googleapi.CloseBody(res)
  4309  	if err := googleapi.CheckResponse(res); err != nil {
  4310  		return nil, gensupport.WrapError(err)
  4311  	}
  4312  	ret := &Operation{
  4313  		ServerResponse: googleapi.ServerResponse{
  4314  			Header:         res.Header,
  4315  			HTTPStatusCode: res.StatusCode,
  4316  		},
  4317  	}
  4318  	target := &ret
  4319  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4320  		return nil, err
  4321  	}
  4322  	return ret, nil
  4323  }
  4324  
  4325  type ManagedZonesSetIamPolicyCall struct {
  4326  	s                              *Service
  4327  	resource                       string
  4328  	googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest
  4329  	urlParams_                     gensupport.URLParams
  4330  	ctx_                           context.Context
  4331  	header_                        http.Header
  4332  }
  4333  
  4334  // SetIamPolicy: Sets the access control policy on the specified resource.
  4335  // Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`,
  4336  // and `PERMISSION_DENIED` errors.
  4337  //
  4338  //   - resource: REQUIRED: The resource for which the policy is being specified.
  4339  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  4340  //     for the appropriate value for this field.
  4341  func (r *ManagedZonesService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ManagedZonesSetIamPolicyCall {
  4342  	c := &ManagedZonesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4343  	c.resource = resource
  4344  	c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest
  4345  	return c
  4346  }
  4347  
  4348  // Fields allows partial responses to be retrieved. See
  4349  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4350  // details.
  4351  func (c *ManagedZonesSetIamPolicyCall) Fields(s ...googleapi.Field) *ManagedZonesSetIamPolicyCall {
  4352  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4353  	return c
  4354  }
  4355  
  4356  // Context sets the context to be used in this call's Do method.
  4357  func (c *ManagedZonesSetIamPolicyCall) Context(ctx context.Context) *ManagedZonesSetIamPolicyCall {
  4358  	c.ctx_ = ctx
  4359  	return c
  4360  }
  4361  
  4362  // Header returns a http.Header that can be modified by the caller to add
  4363  // headers to the request.
  4364  func (c *ManagedZonesSetIamPolicyCall) Header() http.Header {
  4365  	if c.header_ == nil {
  4366  		c.header_ = make(http.Header)
  4367  	}
  4368  	return c.header_
  4369  }
  4370  
  4371  func (c *ManagedZonesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  4372  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4373  	var body io.Reader = nil
  4374  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1setiampolicyrequest)
  4375  	if err != nil {
  4376  		return nil, err
  4377  	}
  4378  	c.urlParams_.Set("alt", alt)
  4379  	c.urlParams_.Set("prettyPrint", "false")
  4380  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/{+resource}:setIamPolicy")
  4381  	urls += "?" + c.urlParams_.Encode()
  4382  	req, err := http.NewRequest("POST", urls, body)
  4383  	if err != nil {
  4384  		return nil, err
  4385  	}
  4386  	req.Header = reqHeaders
  4387  	googleapi.Expand(req.URL, map[string]string{
  4388  		"resource": c.resource,
  4389  	})
  4390  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4391  }
  4392  
  4393  // Do executes the "dns.managedZones.setIamPolicy" call.
  4394  // Any non-2xx status code is an error. Response headers are in either
  4395  // *GoogleIamV1Policy.ServerResponse.Header or (if a response was returned at
  4396  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  4397  // check whether the returned error was because http.StatusNotModified was
  4398  // returned.
  4399  func (c *ManagedZonesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) {
  4400  	gensupport.SetOptions(c.urlParams_, opts...)
  4401  	res, err := c.doRequest("json")
  4402  	if res != nil && res.StatusCode == http.StatusNotModified {
  4403  		if res.Body != nil {
  4404  			res.Body.Close()
  4405  		}
  4406  		return nil, gensupport.WrapError(&googleapi.Error{
  4407  			Code:   res.StatusCode,
  4408  			Header: res.Header,
  4409  		})
  4410  	}
  4411  	if err != nil {
  4412  		return nil, err
  4413  	}
  4414  	defer googleapi.CloseBody(res)
  4415  	if err := googleapi.CheckResponse(res); err != nil {
  4416  		return nil, gensupport.WrapError(err)
  4417  	}
  4418  	ret := &GoogleIamV1Policy{
  4419  		ServerResponse: googleapi.ServerResponse{
  4420  			Header:         res.Header,
  4421  			HTTPStatusCode: res.StatusCode,
  4422  		},
  4423  	}
  4424  	target := &ret
  4425  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4426  		return nil, err
  4427  	}
  4428  	return ret, nil
  4429  }
  4430  
  4431  type ManagedZonesTestIamPermissionsCall struct {
  4432  	s                                    *Service
  4433  	resource                             string
  4434  	googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest
  4435  	urlParams_                           gensupport.URLParams
  4436  	ctx_                                 context.Context
  4437  	header_                              http.Header
  4438  }
  4439  
  4440  // TestIamPermissions: Returns permissions that a caller has on the specified
  4441  // resource. If the resource does not exist, this returns an empty set of
  4442  // permissions, not a `NOT_FOUND` error. Note: This operation is designed to be
  4443  // used for building permission-aware UIs and command-line tools, not for
  4444  // authorization checking. This operation may "fail open" without warning.
  4445  //
  4446  //   - resource: REQUIRED: The resource for which the policy detail is being
  4447  //     requested. See Resource names
  4448  //     (https://cloud.google.com/apis/design/resource_names) for the appropriate
  4449  //     value for this field.
  4450  func (r *ManagedZonesService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ManagedZonesTestIamPermissionsCall {
  4451  	c := &ManagedZonesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4452  	c.resource = resource
  4453  	c.googleiamv1testiampermissionsrequest = googleiamv1testiampermissionsrequest
  4454  	return c
  4455  }
  4456  
  4457  // Fields allows partial responses to be retrieved. See
  4458  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4459  // details.
  4460  func (c *ManagedZonesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ManagedZonesTestIamPermissionsCall {
  4461  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4462  	return c
  4463  }
  4464  
  4465  // Context sets the context to be used in this call's Do method.
  4466  func (c *ManagedZonesTestIamPermissionsCall) Context(ctx context.Context) *ManagedZonesTestIamPermissionsCall {
  4467  	c.ctx_ = ctx
  4468  	return c
  4469  }
  4470  
  4471  // Header returns a http.Header that can be modified by the caller to add
  4472  // headers to the request.
  4473  func (c *ManagedZonesTestIamPermissionsCall) Header() http.Header {
  4474  	if c.header_ == nil {
  4475  		c.header_ = make(http.Header)
  4476  	}
  4477  	return c.header_
  4478  }
  4479  
  4480  func (c *ManagedZonesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
  4481  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4482  	var body io.Reader = nil
  4483  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1testiampermissionsrequest)
  4484  	if err != nil {
  4485  		return nil, err
  4486  	}
  4487  	c.urlParams_.Set("alt", alt)
  4488  	c.urlParams_.Set("prettyPrint", "false")
  4489  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/{+resource}:testIamPermissions")
  4490  	urls += "?" + c.urlParams_.Encode()
  4491  	req, err := http.NewRequest("POST", urls, body)
  4492  	if err != nil {
  4493  		return nil, err
  4494  	}
  4495  	req.Header = reqHeaders
  4496  	googleapi.Expand(req.URL, map[string]string{
  4497  		"resource": c.resource,
  4498  	})
  4499  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4500  }
  4501  
  4502  // Do executes the "dns.managedZones.testIamPermissions" call.
  4503  // Any non-2xx status code is an error. Response headers are in either
  4504  // *GoogleIamV1TestIamPermissionsResponse.ServerResponse.Header or (if a
  4505  // response was returned at all) in error.(*googleapi.Error).Header. Use
  4506  // googleapi.IsNotModified to check whether the returned error was because
  4507  // http.StatusNotModified was returned.
  4508  func (c *ManagedZonesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) {
  4509  	gensupport.SetOptions(c.urlParams_, opts...)
  4510  	res, err := c.doRequest("json")
  4511  	if res != nil && res.StatusCode == http.StatusNotModified {
  4512  		if res.Body != nil {
  4513  			res.Body.Close()
  4514  		}
  4515  		return nil, gensupport.WrapError(&googleapi.Error{
  4516  			Code:   res.StatusCode,
  4517  			Header: res.Header,
  4518  		})
  4519  	}
  4520  	if err != nil {
  4521  		return nil, err
  4522  	}
  4523  	defer googleapi.CloseBody(res)
  4524  	if err := googleapi.CheckResponse(res); err != nil {
  4525  		return nil, gensupport.WrapError(err)
  4526  	}
  4527  	ret := &GoogleIamV1TestIamPermissionsResponse{
  4528  		ServerResponse: googleapi.ServerResponse{
  4529  			Header:         res.Header,
  4530  			HTTPStatusCode: res.StatusCode,
  4531  		},
  4532  	}
  4533  	target := &ret
  4534  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4535  		return nil, err
  4536  	}
  4537  	return ret, nil
  4538  }
  4539  
  4540  type ManagedZonesUpdateCall struct {
  4541  	s           *Service
  4542  	project     string
  4543  	managedZone string
  4544  	managedzone *ManagedZone
  4545  	urlParams_  gensupport.URLParams
  4546  	ctx_        context.Context
  4547  	header_     http.Header
  4548  }
  4549  
  4550  // Update: Updates an existing ManagedZone.
  4551  //
  4552  //   - managedZone: Identifies the managed zone addressed by this request. Can be
  4553  //     the managed zone name or ID.
  4554  //   - project: Identifies the project addressed by this request.
  4555  func (r *ManagedZonesService) Update(project string, managedZone string, managedzone *ManagedZone) *ManagedZonesUpdateCall {
  4556  	c := &ManagedZonesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4557  	c.project = project
  4558  	c.managedZone = managedZone
  4559  	c.managedzone = managedzone
  4560  	return c
  4561  }
  4562  
  4563  // ClientOperationId sets the optional parameter "clientOperationId": For
  4564  // mutating operation requests only. An optional identifier specified by the
  4565  // client. Must be unique for operation resources in the Operations collection.
  4566  func (c *ManagedZonesUpdateCall) ClientOperationId(clientOperationId string) *ManagedZonesUpdateCall {
  4567  	c.urlParams_.Set("clientOperationId", clientOperationId)
  4568  	return c
  4569  }
  4570  
  4571  // Fields allows partial responses to be retrieved. See
  4572  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4573  // details.
  4574  func (c *ManagedZonesUpdateCall) Fields(s ...googleapi.Field) *ManagedZonesUpdateCall {
  4575  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4576  	return c
  4577  }
  4578  
  4579  // Context sets the context to be used in this call's Do method.
  4580  func (c *ManagedZonesUpdateCall) Context(ctx context.Context) *ManagedZonesUpdateCall {
  4581  	c.ctx_ = ctx
  4582  	return c
  4583  }
  4584  
  4585  // Header returns a http.Header that can be modified by the caller to add
  4586  // headers to the request.
  4587  func (c *ManagedZonesUpdateCall) Header() http.Header {
  4588  	if c.header_ == nil {
  4589  		c.header_ = make(http.Header)
  4590  	}
  4591  	return c.header_
  4592  }
  4593  
  4594  func (c *ManagedZonesUpdateCall) doRequest(alt string) (*http.Response, error) {
  4595  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4596  	var body io.Reader = nil
  4597  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.managedzone)
  4598  	if err != nil {
  4599  		return nil, err
  4600  	}
  4601  	c.urlParams_.Set("alt", alt)
  4602  	c.urlParams_.Set("prettyPrint", "false")
  4603  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/managedZones/{managedZone}")
  4604  	urls += "?" + c.urlParams_.Encode()
  4605  	req, err := http.NewRequest("PUT", urls, body)
  4606  	if err != nil {
  4607  		return nil, err
  4608  	}
  4609  	req.Header = reqHeaders
  4610  	googleapi.Expand(req.URL, map[string]string{
  4611  		"project":     c.project,
  4612  		"managedZone": c.managedZone,
  4613  	})
  4614  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4615  }
  4616  
  4617  // Do executes the "dns.managedZones.update" call.
  4618  // Any non-2xx status code is an error. Response headers are in either
  4619  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  4620  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4621  // whether the returned error was because http.StatusNotModified was returned.
  4622  func (c *ManagedZonesUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  4623  	gensupport.SetOptions(c.urlParams_, opts...)
  4624  	res, err := c.doRequest("json")
  4625  	if res != nil && res.StatusCode == http.StatusNotModified {
  4626  		if res.Body != nil {
  4627  			res.Body.Close()
  4628  		}
  4629  		return nil, gensupport.WrapError(&googleapi.Error{
  4630  			Code:   res.StatusCode,
  4631  			Header: res.Header,
  4632  		})
  4633  	}
  4634  	if err != nil {
  4635  		return nil, err
  4636  	}
  4637  	defer googleapi.CloseBody(res)
  4638  	if err := googleapi.CheckResponse(res); err != nil {
  4639  		return nil, gensupport.WrapError(err)
  4640  	}
  4641  	ret := &Operation{
  4642  		ServerResponse: googleapi.ServerResponse{
  4643  			Header:         res.Header,
  4644  			HTTPStatusCode: res.StatusCode,
  4645  		},
  4646  	}
  4647  	target := &ret
  4648  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4649  		return nil, err
  4650  	}
  4651  	return ret, nil
  4652  }
  4653  
  4654  type PoliciesCreateCall struct {
  4655  	s          *Service
  4656  	project    string
  4657  	policy     *Policy
  4658  	urlParams_ gensupport.URLParams
  4659  	ctx_       context.Context
  4660  	header_    http.Header
  4661  }
  4662  
  4663  // Create: Creates a new Policy.
  4664  //
  4665  // - project: Identifies the project addressed by this request.
  4666  func (r *PoliciesService) Create(project string, policy *Policy) *PoliciesCreateCall {
  4667  	c := &PoliciesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4668  	c.project = project
  4669  	c.policy = policy
  4670  	return c
  4671  }
  4672  
  4673  // ClientOperationId sets the optional parameter "clientOperationId": For
  4674  // mutating operation requests only. An optional identifier specified by the
  4675  // client. Must be unique for operation resources in the Operations collection.
  4676  func (c *PoliciesCreateCall) ClientOperationId(clientOperationId string) *PoliciesCreateCall {
  4677  	c.urlParams_.Set("clientOperationId", clientOperationId)
  4678  	return c
  4679  }
  4680  
  4681  // Fields allows partial responses to be retrieved. See
  4682  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4683  // details.
  4684  func (c *PoliciesCreateCall) Fields(s ...googleapi.Field) *PoliciesCreateCall {
  4685  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4686  	return c
  4687  }
  4688  
  4689  // Context sets the context to be used in this call's Do method.
  4690  func (c *PoliciesCreateCall) Context(ctx context.Context) *PoliciesCreateCall {
  4691  	c.ctx_ = ctx
  4692  	return c
  4693  }
  4694  
  4695  // Header returns a http.Header that can be modified by the caller to add
  4696  // headers to the request.
  4697  func (c *PoliciesCreateCall) Header() http.Header {
  4698  	if c.header_ == nil {
  4699  		c.header_ = make(http.Header)
  4700  	}
  4701  	return c.header_
  4702  }
  4703  
  4704  func (c *PoliciesCreateCall) doRequest(alt string) (*http.Response, error) {
  4705  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4706  	var body io.Reader = nil
  4707  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.policy)
  4708  	if err != nil {
  4709  		return nil, err
  4710  	}
  4711  	c.urlParams_.Set("alt", alt)
  4712  	c.urlParams_.Set("prettyPrint", "false")
  4713  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/policies")
  4714  	urls += "?" + c.urlParams_.Encode()
  4715  	req, err := http.NewRequest("POST", urls, body)
  4716  	if err != nil {
  4717  		return nil, err
  4718  	}
  4719  	req.Header = reqHeaders
  4720  	googleapi.Expand(req.URL, map[string]string{
  4721  		"project": c.project,
  4722  	})
  4723  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4724  }
  4725  
  4726  // Do executes the "dns.policies.create" call.
  4727  // Any non-2xx status code is an error. Response headers are in either
  4728  // *Policy.ServerResponse.Header or (if a response was returned at all) in
  4729  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4730  // whether the returned error was because http.StatusNotModified was returned.
  4731  func (c *PoliciesCreateCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  4732  	gensupport.SetOptions(c.urlParams_, opts...)
  4733  	res, err := c.doRequest("json")
  4734  	if res != nil && res.StatusCode == http.StatusNotModified {
  4735  		if res.Body != nil {
  4736  			res.Body.Close()
  4737  		}
  4738  		return nil, gensupport.WrapError(&googleapi.Error{
  4739  			Code:   res.StatusCode,
  4740  			Header: res.Header,
  4741  		})
  4742  	}
  4743  	if err != nil {
  4744  		return nil, err
  4745  	}
  4746  	defer googleapi.CloseBody(res)
  4747  	if err := googleapi.CheckResponse(res); err != nil {
  4748  		return nil, gensupport.WrapError(err)
  4749  	}
  4750  	ret := &Policy{
  4751  		ServerResponse: googleapi.ServerResponse{
  4752  			Header:         res.Header,
  4753  			HTTPStatusCode: res.StatusCode,
  4754  		},
  4755  	}
  4756  	target := &ret
  4757  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4758  		return nil, err
  4759  	}
  4760  	return ret, nil
  4761  }
  4762  
  4763  type PoliciesDeleteCall struct {
  4764  	s          *Service
  4765  	project    string
  4766  	policy     string
  4767  	urlParams_ gensupport.URLParams
  4768  	ctx_       context.Context
  4769  	header_    http.Header
  4770  }
  4771  
  4772  // Delete: Deletes a previously created Policy. Fails if the policy is still
  4773  // being referenced by a network.
  4774  //
  4775  // - policy: User given friendly name of the policy addressed by this request.
  4776  // - project: Identifies the project addressed by this request.
  4777  func (r *PoliciesService) Delete(project string, policy string) *PoliciesDeleteCall {
  4778  	c := &PoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4779  	c.project = project
  4780  	c.policy = policy
  4781  	return c
  4782  }
  4783  
  4784  // ClientOperationId sets the optional parameter "clientOperationId": For
  4785  // mutating operation requests only. An optional identifier specified by the
  4786  // client. Must be unique for operation resources in the Operations collection.
  4787  func (c *PoliciesDeleteCall) ClientOperationId(clientOperationId string) *PoliciesDeleteCall {
  4788  	c.urlParams_.Set("clientOperationId", clientOperationId)
  4789  	return c
  4790  }
  4791  
  4792  // Fields allows partial responses to be retrieved. See
  4793  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4794  // details.
  4795  func (c *PoliciesDeleteCall) Fields(s ...googleapi.Field) *PoliciesDeleteCall {
  4796  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4797  	return c
  4798  }
  4799  
  4800  // Context sets the context to be used in this call's Do method.
  4801  func (c *PoliciesDeleteCall) Context(ctx context.Context) *PoliciesDeleteCall {
  4802  	c.ctx_ = ctx
  4803  	return c
  4804  }
  4805  
  4806  // Header returns a http.Header that can be modified by the caller to add
  4807  // headers to the request.
  4808  func (c *PoliciesDeleteCall) Header() http.Header {
  4809  	if c.header_ == nil {
  4810  		c.header_ = make(http.Header)
  4811  	}
  4812  	return c.header_
  4813  }
  4814  
  4815  func (c *PoliciesDeleteCall) doRequest(alt string) (*http.Response, error) {
  4816  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4817  	var body io.Reader = nil
  4818  	c.urlParams_.Set("alt", alt)
  4819  	c.urlParams_.Set("prettyPrint", "false")
  4820  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/policies/{policy}")
  4821  	urls += "?" + c.urlParams_.Encode()
  4822  	req, err := http.NewRequest("DELETE", urls, body)
  4823  	if err != nil {
  4824  		return nil, err
  4825  	}
  4826  	req.Header = reqHeaders
  4827  	googleapi.Expand(req.URL, map[string]string{
  4828  		"project": c.project,
  4829  		"policy":  c.policy,
  4830  	})
  4831  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4832  }
  4833  
  4834  // Do executes the "dns.policies.delete" call.
  4835  func (c *PoliciesDeleteCall) Do(opts ...googleapi.CallOption) error {
  4836  	gensupport.SetOptions(c.urlParams_, opts...)
  4837  	res, err := c.doRequest("json")
  4838  	if err != nil {
  4839  		return err
  4840  	}
  4841  	defer googleapi.CloseBody(res)
  4842  	if err := googleapi.CheckResponse(res); err != nil {
  4843  		return gensupport.WrapError(err)
  4844  	}
  4845  	return nil
  4846  }
  4847  
  4848  type PoliciesGetCall struct {
  4849  	s            *Service
  4850  	project      string
  4851  	policy       string
  4852  	urlParams_   gensupport.URLParams
  4853  	ifNoneMatch_ string
  4854  	ctx_         context.Context
  4855  	header_      http.Header
  4856  }
  4857  
  4858  // Get: Fetches the representation of an existing Policy.
  4859  //
  4860  // - policy: User given friendly name of the policy addressed by this request.
  4861  // - project: Identifies the project addressed by this request.
  4862  func (r *PoliciesService) Get(project string, policy string) *PoliciesGetCall {
  4863  	c := &PoliciesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4864  	c.project = project
  4865  	c.policy = policy
  4866  	return c
  4867  }
  4868  
  4869  // ClientOperationId sets the optional parameter "clientOperationId": For
  4870  // mutating operation requests only. An optional identifier specified by the
  4871  // client. Must be unique for operation resources in the Operations collection.
  4872  func (c *PoliciesGetCall) ClientOperationId(clientOperationId string) *PoliciesGetCall {
  4873  	c.urlParams_.Set("clientOperationId", clientOperationId)
  4874  	return c
  4875  }
  4876  
  4877  // Fields allows partial responses to be retrieved. See
  4878  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4879  // details.
  4880  func (c *PoliciesGetCall) Fields(s ...googleapi.Field) *PoliciesGetCall {
  4881  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4882  	return c
  4883  }
  4884  
  4885  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4886  // object's ETag matches the given value. This is useful for getting updates
  4887  // only after the object has changed since the last request.
  4888  func (c *PoliciesGetCall) IfNoneMatch(entityTag string) *PoliciesGetCall {
  4889  	c.ifNoneMatch_ = entityTag
  4890  	return c
  4891  }
  4892  
  4893  // Context sets the context to be used in this call's Do method.
  4894  func (c *PoliciesGetCall) Context(ctx context.Context) *PoliciesGetCall {
  4895  	c.ctx_ = ctx
  4896  	return c
  4897  }
  4898  
  4899  // Header returns a http.Header that can be modified by the caller to add
  4900  // headers to the request.
  4901  func (c *PoliciesGetCall) Header() http.Header {
  4902  	if c.header_ == nil {
  4903  		c.header_ = make(http.Header)
  4904  	}
  4905  	return c.header_
  4906  }
  4907  
  4908  func (c *PoliciesGetCall) doRequest(alt string) (*http.Response, error) {
  4909  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4910  	if c.ifNoneMatch_ != "" {
  4911  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4912  	}
  4913  	var body io.Reader = nil
  4914  	c.urlParams_.Set("alt", alt)
  4915  	c.urlParams_.Set("prettyPrint", "false")
  4916  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/policies/{policy}")
  4917  	urls += "?" + c.urlParams_.Encode()
  4918  	req, err := http.NewRequest("GET", urls, body)
  4919  	if err != nil {
  4920  		return nil, err
  4921  	}
  4922  	req.Header = reqHeaders
  4923  	googleapi.Expand(req.URL, map[string]string{
  4924  		"project": c.project,
  4925  		"policy":  c.policy,
  4926  	})
  4927  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4928  }
  4929  
  4930  // Do executes the "dns.policies.get" call.
  4931  // Any non-2xx status code is an error. Response headers are in either
  4932  // *Policy.ServerResponse.Header or (if a response was returned at all) in
  4933  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4934  // whether the returned error was because http.StatusNotModified was returned.
  4935  func (c *PoliciesGetCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  4936  	gensupport.SetOptions(c.urlParams_, opts...)
  4937  	res, err := c.doRequest("json")
  4938  	if res != nil && res.StatusCode == http.StatusNotModified {
  4939  		if res.Body != nil {
  4940  			res.Body.Close()
  4941  		}
  4942  		return nil, gensupport.WrapError(&googleapi.Error{
  4943  			Code:   res.StatusCode,
  4944  			Header: res.Header,
  4945  		})
  4946  	}
  4947  	if err != nil {
  4948  		return nil, err
  4949  	}
  4950  	defer googleapi.CloseBody(res)
  4951  	if err := googleapi.CheckResponse(res); err != nil {
  4952  		return nil, gensupport.WrapError(err)
  4953  	}
  4954  	ret := &Policy{
  4955  		ServerResponse: googleapi.ServerResponse{
  4956  			Header:         res.Header,
  4957  			HTTPStatusCode: res.StatusCode,
  4958  		},
  4959  	}
  4960  	target := &ret
  4961  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4962  		return nil, err
  4963  	}
  4964  	return ret, nil
  4965  }
  4966  
  4967  type PoliciesListCall struct {
  4968  	s            *Service
  4969  	project      string
  4970  	urlParams_   gensupport.URLParams
  4971  	ifNoneMatch_ string
  4972  	ctx_         context.Context
  4973  	header_      http.Header
  4974  }
  4975  
  4976  // List: Enumerates all Policies associated with a project.
  4977  //
  4978  // - project: Identifies the project addressed by this request.
  4979  func (r *PoliciesService) List(project string) *PoliciesListCall {
  4980  	c := &PoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4981  	c.project = project
  4982  	return c
  4983  }
  4984  
  4985  // MaxResults sets the optional parameter "maxResults": Maximum number of
  4986  // results to be returned. If unspecified, the server decides how many results
  4987  // to return.
  4988  func (c *PoliciesListCall) MaxResults(maxResults int64) *PoliciesListCall {
  4989  	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  4990  	return c
  4991  }
  4992  
  4993  // PageToken sets the optional parameter "pageToken": A tag returned by a
  4994  // previous list request that was truncated. Use this parameter to continue a
  4995  // previous list request.
  4996  func (c *PoliciesListCall) PageToken(pageToken string) *PoliciesListCall {
  4997  	c.urlParams_.Set("pageToken", pageToken)
  4998  	return c
  4999  }
  5000  
  5001  // Fields allows partial responses to be retrieved. See
  5002  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5003  // details.
  5004  func (c *PoliciesListCall) Fields(s ...googleapi.Field) *PoliciesListCall {
  5005  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5006  	return c
  5007  }
  5008  
  5009  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5010  // object's ETag matches the given value. This is useful for getting updates
  5011  // only after the object has changed since the last request.
  5012  func (c *PoliciesListCall) IfNoneMatch(entityTag string) *PoliciesListCall {
  5013  	c.ifNoneMatch_ = entityTag
  5014  	return c
  5015  }
  5016  
  5017  // Context sets the context to be used in this call's Do method.
  5018  func (c *PoliciesListCall) Context(ctx context.Context) *PoliciesListCall {
  5019  	c.ctx_ = ctx
  5020  	return c
  5021  }
  5022  
  5023  // Header returns a http.Header that can be modified by the caller to add
  5024  // headers to the request.
  5025  func (c *PoliciesListCall) Header() http.Header {
  5026  	if c.header_ == nil {
  5027  		c.header_ = make(http.Header)
  5028  	}
  5029  	return c.header_
  5030  }
  5031  
  5032  func (c *PoliciesListCall) doRequest(alt string) (*http.Response, error) {
  5033  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5034  	if c.ifNoneMatch_ != "" {
  5035  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5036  	}
  5037  	var body io.Reader = nil
  5038  	c.urlParams_.Set("alt", alt)
  5039  	c.urlParams_.Set("prettyPrint", "false")
  5040  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/policies")
  5041  	urls += "?" + c.urlParams_.Encode()
  5042  	req, err := http.NewRequest("GET", urls, body)
  5043  	if err != nil {
  5044  		return nil, err
  5045  	}
  5046  	req.Header = reqHeaders
  5047  	googleapi.Expand(req.URL, map[string]string{
  5048  		"project": c.project,
  5049  	})
  5050  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5051  }
  5052  
  5053  // Do executes the "dns.policies.list" call.
  5054  // Any non-2xx status code is an error. Response headers are in either
  5055  // *PoliciesListResponse.ServerResponse.Header or (if a response was returned
  5056  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  5057  // check whether the returned error was because http.StatusNotModified was
  5058  // returned.
  5059  func (c *PoliciesListCall) Do(opts ...googleapi.CallOption) (*PoliciesListResponse, error) {
  5060  	gensupport.SetOptions(c.urlParams_, opts...)
  5061  	res, err := c.doRequest("json")
  5062  	if res != nil && res.StatusCode == http.StatusNotModified {
  5063  		if res.Body != nil {
  5064  			res.Body.Close()
  5065  		}
  5066  		return nil, gensupport.WrapError(&googleapi.Error{
  5067  			Code:   res.StatusCode,
  5068  			Header: res.Header,
  5069  		})
  5070  	}
  5071  	if err != nil {
  5072  		return nil, err
  5073  	}
  5074  	defer googleapi.CloseBody(res)
  5075  	if err := googleapi.CheckResponse(res); err != nil {
  5076  		return nil, gensupport.WrapError(err)
  5077  	}
  5078  	ret := &PoliciesListResponse{
  5079  		ServerResponse: googleapi.ServerResponse{
  5080  			Header:         res.Header,
  5081  			HTTPStatusCode: res.StatusCode,
  5082  		},
  5083  	}
  5084  	target := &ret
  5085  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5086  		return nil, err
  5087  	}
  5088  	return ret, nil
  5089  }
  5090  
  5091  // Pages invokes f for each page of results.
  5092  // A non-nil error returned from f will halt the iteration.
  5093  // The provided context supersedes any context provided to the Context method.
  5094  func (c *PoliciesListCall) Pages(ctx context.Context, f func(*PoliciesListResponse) error) error {
  5095  	c.ctx_ = ctx
  5096  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  5097  	for {
  5098  		x, err := c.Do()
  5099  		if err != nil {
  5100  			return err
  5101  		}
  5102  		if err := f(x); err != nil {
  5103  			return err
  5104  		}
  5105  		if x.NextPageToken == "" {
  5106  			return nil
  5107  		}
  5108  		c.PageToken(x.NextPageToken)
  5109  	}
  5110  }
  5111  
  5112  type PoliciesPatchCall struct {
  5113  	s          *Service
  5114  	project    string
  5115  	policy     string
  5116  	policy2    *Policy
  5117  	urlParams_ gensupport.URLParams
  5118  	ctx_       context.Context
  5119  	header_    http.Header
  5120  }
  5121  
  5122  // Patch: Applies a partial update to an existing Policy.
  5123  //
  5124  // - policy: User given friendly name of the policy addressed by this request.
  5125  // - project: Identifies the project addressed by this request.
  5126  func (r *PoliciesService) Patch(project string, policy string, policy2 *Policy) *PoliciesPatchCall {
  5127  	c := &PoliciesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5128  	c.project = project
  5129  	c.policy = policy
  5130  	c.policy2 = policy2
  5131  	return c
  5132  }
  5133  
  5134  // ClientOperationId sets the optional parameter "clientOperationId": For
  5135  // mutating operation requests only. An optional identifier specified by the
  5136  // client. Must be unique for operation resources in the Operations collection.
  5137  func (c *PoliciesPatchCall) ClientOperationId(clientOperationId string) *PoliciesPatchCall {
  5138  	c.urlParams_.Set("clientOperationId", clientOperationId)
  5139  	return c
  5140  }
  5141  
  5142  // Fields allows partial responses to be retrieved. See
  5143  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5144  // details.
  5145  func (c *PoliciesPatchCall) Fields(s ...googleapi.Field) *PoliciesPatchCall {
  5146  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5147  	return c
  5148  }
  5149  
  5150  // Context sets the context to be used in this call's Do method.
  5151  func (c *PoliciesPatchCall) Context(ctx context.Context) *PoliciesPatchCall {
  5152  	c.ctx_ = ctx
  5153  	return c
  5154  }
  5155  
  5156  // Header returns a http.Header that can be modified by the caller to add
  5157  // headers to the request.
  5158  func (c *PoliciesPatchCall) Header() http.Header {
  5159  	if c.header_ == nil {
  5160  		c.header_ = make(http.Header)
  5161  	}
  5162  	return c.header_
  5163  }
  5164  
  5165  func (c *PoliciesPatchCall) doRequest(alt string) (*http.Response, error) {
  5166  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  5167  	var body io.Reader = nil
  5168  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.policy2)
  5169  	if err != nil {
  5170  		return nil, err
  5171  	}
  5172  	c.urlParams_.Set("alt", alt)
  5173  	c.urlParams_.Set("prettyPrint", "false")
  5174  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/policies/{policy}")
  5175  	urls += "?" + c.urlParams_.Encode()
  5176  	req, err := http.NewRequest("PATCH", urls, body)
  5177  	if err != nil {
  5178  		return nil, err
  5179  	}
  5180  	req.Header = reqHeaders
  5181  	googleapi.Expand(req.URL, map[string]string{
  5182  		"project": c.project,
  5183  		"policy":  c.policy,
  5184  	})
  5185  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5186  }
  5187  
  5188  // Do executes the "dns.policies.patch" call.
  5189  // Any non-2xx status code is an error. Response headers are in either
  5190  // *PoliciesPatchResponse.ServerResponse.Header or (if a response was returned
  5191  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  5192  // check whether the returned error was because http.StatusNotModified was
  5193  // returned.
  5194  func (c *PoliciesPatchCall) Do(opts ...googleapi.CallOption) (*PoliciesPatchResponse, error) {
  5195  	gensupport.SetOptions(c.urlParams_, opts...)
  5196  	res, err := c.doRequest("json")
  5197  	if res != nil && res.StatusCode == http.StatusNotModified {
  5198  		if res.Body != nil {
  5199  			res.Body.Close()
  5200  		}
  5201  		return nil, gensupport.WrapError(&googleapi.Error{
  5202  			Code:   res.StatusCode,
  5203  			Header: res.Header,
  5204  		})
  5205  	}
  5206  	if err != nil {
  5207  		return nil, err
  5208  	}
  5209  	defer googleapi.CloseBody(res)
  5210  	if err := googleapi.CheckResponse(res); err != nil {
  5211  		return nil, gensupport.WrapError(err)
  5212  	}
  5213  	ret := &PoliciesPatchResponse{
  5214  		ServerResponse: googleapi.ServerResponse{
  5215  			Header:         res.Header,
  5216  			HTTPStatusCode: res.StatusCode,
  5217  		},
  5218  	}
  5219  	target := &ret
  5220  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5221  		return nil, err
  5222  	}
  5223  	return ret, nil
  5224  }
  5225  
  5226  type PoliciesUpdateCall struct {
  5227  	s          *Service
  5228  	project    string
  5229  	policy     string
  5230  	policy2    *Policy
  5231  	urlParams_ gensupport.URLParams
  5232  	ctx_       context.Context
  5233  	header_    http.Header
  5234  }
  5235  
  5236  // Update: Updates an existing Policy.
  5237  //
  5238  // - policy: User given friendly name of the policy addressed by this request.
  5239  // - project: Identifies the project addressed by this request.
  5240  func (r *PoliciesService) Update(project string, policy string, policy2 *Policy) *PoliciesUpdateCall {
  5241  	c := &PoliciesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5242  	c.project = project
  5243  	c.policy = policy
  5244  	c.policy2 = policy2
  5245  	return c
  5246  }
  5247  
  5248  // ClientOperationId sets the optional parameter "clientOperationId": For
  5249  // mutating operation requests only. An optional identifier specified by the
  5250  // client. Must be unique for operation resources in the Operations collection.
  5251  func (c *PoliciesUpdateCall) ClientOperationId(clientOperationId string) *PoliciesUpdateCall {
  5252  	c.urlParams_.Set("clientOperationId", clientOperationId)
  5253  	return c
  5254  }
  5255  
  5256  // Fields allows partial responses to be retrieved. See
  5257  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5258  // details.
  5259  func (c *PoliciesUpdateCall) Fields(s ...googleapi.Field) *PoliciesUpdateCall {
  5260  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5261  	return c
  5262  }
  5263  
  5264  // Context sets the context to be used in this call's Do method.
  5265  func (c *PoliciesUpdateCall) Context(ctx context.Context) *PoliciesUpdateCall {
  5266  	c.ctx_ = ctx
  5267  	return c
  5268  }
  5269  
  5270  // Header returns a http.Header that can be modified by the caller to add
  5271  // headers to the request.
  5272  func (c *PoliciesUpdateCall) Header() http.Header {
  5273  	if c.header_ == nil {
  5274  		c.header_ = make(http.Header)
  5275  	}
  5276  	return c.header_
  5277  }
  5278  
  5279  func (c *PoliciesUpdateCall) doRequest(alt string) (*http.Response, error) {
  5280  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  5281  	var body io.Reader = nil
  5282  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.policy2)
  5283  	if err != nil {
  5284  		return nil, err
  5285  	}
  5286  	c.urlParams_.Set("alt", alt)
  5287  	c.urlParams_.Set("prettyPrint", "false")
  5288  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/policies/{policy}")
  5289  	urls += "?" + c.urlParams_.Encode()
  5290  	req, err := http.NewRequest("PUT", urls, body)
  5291  	if err != nil {
  5292  		return nil, err
  5293  	}
  5294  	req.Header = reqHeaders
  5295  	googleapi.Expand(req.URL, map[string]string{
  5296  		"project": c.project,
  5297  		"policy":  c.policy,
  5298  	})
  5299  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5300  }
  5301  
  5302  // Do executes the "dns.policies.update" call.
  5303  // Any non-2xx status code is an error. Response headers are in either
  5304  // *PoliciesUpdateResponse.ServerResponse.Header or (if a response was returned
  5305  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  5306  // check whether the returned error was because http.StatusNotModified was
  5307  // returned.
  5308  func (c *PoliciesUpdateCall) Do(opts ...googleapi.CallOption) (*PoliciesUpdateResponse, error) {
  5309  	gensupport.SetOptions(c.urlParams_, opts...)
  5310  	res, err := c.doRequest("json")
  5311  	if res != nil && res.StatusCode == http.StatusNotModified {
  5312  		if res.Body != nil {
  5313  			res.Body.Close()
  5314  		}
  5315  		return nil, gensupport.WrapError(&googleapi.Error{
  5316  			Code:   res.StatusCode,
  5317  			Header: res.Header,
  5318  		})
  5319  	}
  5320  	if err != nil {
  5321  		return nil, err
  5322  	}
  5323  	defer googleapi.CloseBody(res)
  5324  	if err := googleapi.CheckResponse(res); err != nil {
  5325  		return nil, gensupport.WrapError(err)
  5326  	}
  5327  	ret := &PoliciesUpdateResponse{
  5328  		ServerResponse: googleapi.ServerResponse{
  5329  			Header:         res.Header,
  5330  			HTTPStatusCode: res.StatusCode,
  5331  		},
  5332  	}
  5333  	target := &ret
  5334  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5335  		return nil, err
  5336  	}
  5337  	return ret, nil
  5338  }
  5339  
  5340  type ProjectsGetCall struct {
  5341  	s            *Service
  5342  	project      string
  5343  	urlParams_   gensupport.URLParams
  5344  	ifNoneMatch_ string
  5345  	ctx_         context.Context
  5346  	header_      http.Header
  5347  }
  5348  
  5349  // Get: Fetches the representation of an existing Project.
  5350  //
  5351  // - project: Identifies the project addressed by this request.
  5352  func (r *ProjectsService) Get(project string) *ProjectsGetCall {
  5353  	c := &ProjectsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5354  	c.project = project
  5355  	return c
  5356  }
  5357  
  5358  // ClientOperationId sets the optional parameter "clientOperationId": For
  5359  // mutating operation requests only. An optional identifier specified by the
  5360  // client. Must be unique for operation resources in the Operations collection.
  5361  func (c *ProjectsGetCall) ClientOperationId(clientOperationId string) *ProjectsGetCall {
  5362  	c.urlParams_.Set("clientOperationId", clientOperationId)
  5363  	return c
  5364  }
  5365  
  5366  // Fields allows partial responses to be retrieved. See
  5367  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5368  // details.
  5369  func (c *ProjectsGetCall) Fields(s ...googleapi.Field) *ProjectsGetCall {
  5370  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5371  	return c
  5372  }
  5373  
  5374  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5375  // object's ETag matches the given value. This is useful for getting updates
  5376  // only after the object has changed since the last request.
  5377  func (c *ProjectsGetCall) IfNoneMatch(entityTag string) *ProjectsGetCall {
  5378  	c.ifNoneMatch_ = entityTag
  5379  	return c
  5380  }
  5381  
  5382  // Context sets the context to be used in this call's Do method.
  5383  func (c *ProjectsGetCall) Context(ctx context.Context) *ProjectsGetCall {
  5384  	c.ctx_ = ctx
  5385  	return c
  5386  }
  5387  
  5388  // Header returns a http.Header that can be modified by the caller to add
  5389  // headers to the request.
  5390  func (c *ProjectsGetCall) Header() http.Header {
  5391  	if c.header_ == nil {
  5392  		c.header_ = make(http.Header)
  5393  	}
  5394  	return c.header_
  5395  }
  5396  
  5397  func (c *ProjectsGetCall) doRequest(alt string) (*http.Response, error) {
  5398  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5399  	if c.ifNoneMatch_ != "" {
  5400  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5401  	}
  5402  	var body io.Reader = nil
  5403  	c.urlParams_.Set("alt", alt)
  5404  	c.urlParams_.Set("prettyPrint", "false")
  5405  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}")
  5406  	urls += "?" + c.urlParams_.Encode()
  5407  	req, err := http.NewRequest("GET", urls, body)
  5408  	if err != nil {
  5409  		return nil, err
  5410  	}
  5411  	req.Header = reqHeaders
  5412  	googleapi.Expand(req.URL, map[string]string{
  5413  		"project": c.project,
  5414  	})
  5415  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5416  }
  5417  
  5418  // Do executes the "dns.projects.get" call.
  5419  // Any non-2xx status code is an error. Response headers are in either
  5420  // *Project.ServerResponse.Header or (if a response was returned at all) in
  5421  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5422  // whether the returned error was because http.StatusNotModified was returned.
  5423  func (c *ProjectsGetCall) Do(opts ...googleapi.CallOption) (*Project, error) {
  5424  	gensupport.SetOptions(c.urlParams_, opts...)
  5425  	res, err := c.doRequest("json")
  5426  	if res != nil && res.StatusCode == http.StatusNotModified {
  5427  		if res.Body != nil {
  5428  			res.Body.Close()
  5429  		}
  5430  		return nil, gensupport.WrapError(&googleapi.Error{
  5431  			Code:   res.StatusCode,
  5432  			Header: res.Header,
  5433  		})
  5434  	}
  5435  	if err != nil {
  5436  		return nil, err
  5437  	}
  5438  	defer googleapi.CloseBody(res)
  5439  	if err := googleapi.CheckResponse(res); err != nil {
  5440  		return nil, gensupport.WrapError(err)
  5441  	}
  5442  	ret := &Project{
  5443  		ServerResponse: googleapi.ServerResponse{
  5444  			Header:         res.Header,
  5445  			HTTPStatusCode: res.StatusCode,
  5446  		},
  5447  	}
  5448  	target := &ret
  5449  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5450  		return nil, err
  5451  	}
  5452  	return ret, nil
  5453  }
  5454  
  5455  type ResourceRecordSetsCreateCall struct {
  5456  	s                 *Service
  5457  	project           string
  5458  	managedZone       string
  5459  	resourcerecordset *ResourceRecordSet
  5460  	urlParams_        gensupport.URLParams
  5461  	ctx_              context.Context
  5462  	header_           http.Header
  5463  }
  5464  
  5465  // Create: Creates a new ResourceRecordSet.
  5466  //
  5467  //   - managedZone: Identifies the managed zone addressed by this request. Can be
  5468  //     the managed zone name or ID.
  5469  //   - project: Identifies the project addressed by this request.
  5470  func (r *ResourceRecordSetsService) Create(project string, managedZone string, resourcerecordset *ResourceRecordSet) *ResourceRecordSetsCreateCall {
  5471  	c := &ResourceRecordSetsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5472  	c.project = project
  5473  	c.managedZone = managedZone
  5474  	c.resourcerecordset = resourcerecordset
  5475  	return c
  5476  }
  5477  
  5478  // ClientOperationId sets the optional parameter "clientOperationId": For
  5479  // mutating operation requests only. An optional identifier specified by the
  5480  // client. Must be unique for operation resources in the Operations collection.
  5481  func (c *ResourceRecordSetsCreateCall) ClientOperationId(clientOperationId string) *ResourceRecordSetsCreateCall {
  5482  	c.urlParams_.Set("clientOperationId", clientOperationId)
  5483  	return c
  5484  }
  5485  
  5486  // Fields allows partial responses to be retrieved. See
  5487  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5488  // details.
  5489  func (c *ResourceRecordSetsCreateCall) Fields(s ...googleapi.Field) *ResourceRecordSetsCreateCall {
  5490  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5491  	return c
  5492  }
  5493  
  5494  // Context sets the context to be used in this call's Do method.
  5495  func (c *ResourceRecordSetsCreateCall) Context(ctx context.Context) *ResourceRecordSetsCreateCall {
  5496  	c.ctx_ = ctx
  5497  	return c
  5498  }
  5499  
  5500  // Header returns a http.Header that can be modified by the caller to add
  5501  // headers to the request.
  5502  func (c *ResourceRecordSetsCreateCall) Header() http.Header {
  5503  	if c.header_ == nil {
  5504  		c.header_ = make(http.Header)
  5505  	}
  5506  	return c.header_
  5507  }
  5508  
  5509  func (c *ResourceRecordSetsCreateCall) doRequest(alt string) (*http.Response, error) {
  5510  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  5511  	var body io.Reader = nil
  5512  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.resourcerecordset)
  5513  	if err != nil {
  5514  		return nil, err
  5515  	}
  5516  	c.urlParams_.Set("alt", alt)
  5517  	c.urlParams_.Set("prettyPrint", "false")
  5518  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/managedZones/{managedZone}/rrsets")
  5519  	urls += "?" + c.urlParams_.Encode()
  5520  	req, err := http.NewRequest("POST", urls, body)
  5521  	if err != nil {
  5522  		return nil, err
  5523  	}
  5524  	req.Header = reqHeaders
  5525  	googleapi.Expand(req.URL, map[string]string{
  5526  		"project":     c.project,
  5527  		"managedZone": c.managedZone,
  5528  	})
  5529  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5530  }
  5531  
  5532  // Do executes the "dns.resourceRecordSets.create" call.
  5533  // Any non-2xx status code is an error. Response headers are in either
  5534  // *ResourceRecordSet.ServerResponse.Header or (if a response was returned at
  5535  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  5536  // check whether the returned error was because http.StatusNotModified was
  5537  // returned.
  5538  func (c *ResourceRecordSetsCreateCall) Do(opts ...googleapi.CallOption) (*ResourceRecordSet, error) {
  5539  	gensupport.SetOptions(c.urlParams_, opts...)
  5540  	res, err := c.doRequest("json")
  5541  	if res != nil && res.StatusCode == http.StatusNotModified {
  5542  		if res.Body != nil {
  5543  			res.Body.Close()
  5544  		}
  5545  		return nil, gensupport.WrapError(&googleapi.Error{
  5546  			Code:   res.StatusCode,
  5547  			Header: res.Header,
  5548  		})
  5549  	}
  5550  	if err != nil {
  5551  		return nil, err
  5552  	}
  5553  	defer googleapi.CloseBody(res)
  5554  	if err := googleapi.CheckResponse(res); err != nil {
  5555  		return nil, gensupport.WrapError(err)
  5556  	}
  5557  	ret := &ResourceRecordSet{
  5558  		ServerResponse: googleapi.ServerResponse{
  5559  			Header:         res.Header,
  5560  			HTTPStatusCode: res.StatusCode,
  5561  		},
  5562  	}
  5563  	target := &ret
  5564  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5565  		return nil, err
  5566  	}
  5567  	return ret, nil
  5568  }
  5569  
  5570  type ResourceRecordSetsDeleteCall struct {
  5571  	s           *Service
  5572  	project     string
  5573  	managedZone string
  5574  	name        string
  5575  	type_       string
  5576  	urlParams_  gensupport.URLParams
  5577  	ctx_        context.Context
  5578  	header_     http.Header
  5579  }
  5580  
  5581  // Delete: Deletes a previously created ResourceRecordSet.
  5582  //
  5583  //   - managedZone: Identifies the managed zone addressed by this request. Can be
  5584  //     the managed zone name or ID.
  5585  //   - name: Fully qualified domain name.
  5586  //   - project: Identifies the project addressed by this request.
  5587  //   - type: RRSet type.
  5588  func (r *ResourceRecordSetsService) Delete(project string, managedZone string, name string, type_ string) *ResourceRecordSetsDeleteCall {
  5589  	c := &ResourceRecordSetsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5590  	c.project = project
  5591  	c.managedZone = managedZone
  5592  	c.name = name
  5593  	c.type_ = type_
  5594  	return c
  5595  }
  5596  
  5597  // ClientOperationId sets the optional parameter "clientOperationId": For
  5598  // mutating operation requests only. An optional identifier specified by the
  5599  // client. Must be unique for operation resources in the Operations collection.
  5600  func (c *ResourceRecordSetsDeleteCall) ClientOperationId(clientOperationId string) *ResourceRecordSetsDeleteCall {
  5601  	c.urlParams_.Set("clientOperationId", clientOperationId)
  5602  	return c
  5603  }
  5604  
  5605  // Fields allows partial responses to be retrieved. See
  5606  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5607  // details.
  5608  func (c *ResourceRecordSetsDeleteCall) Fields(s ...googleapi.Field) *ResourceRecordSetsDeleteCall {
  5609  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5610  	return c
  5611  }
  5612  
  5613  // Context sets the context to be used in this call's Do method.
  5614  func (c *ResourceRecordSetsDeleteCall) Context(ctx context.Context) *ResourceRecordSetsDeleteCall {
  5615  	c.ctx_ = ctx
  5616  	return c
  5617  }
  5618  
  5619  // Header returns a http.Header that can be modified by the caller to add
  5620  // headers to the request.
  5621  func (c *ResourceRecordSetsDeleteCall) Header() http.Header {
  5622  	if c.header_ == nil {
  5623  		c.header_ = make(http.Header)
  5624  	}
  5625  	return c.header_
  5626  }
  5627  
  5628  func (c *ResourceRecordSetsDeleteCall) doRequest(alt string) (*http.Response, error) {
  5629  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5630  	var body io.Reader = nil
  5631  	c.urlParams_.Set("alt", alt)
  5632  	c.urlParams_.Set("prettyPrint", "false")
  5633  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/managedZones/{managedZone}/rrsets/{name}/{type}")
  5634  	urls += "?" + c.urlParams_.Encode()
  5635  	req, err := http.NewRequest("DELETE", urls, body)
  5636  	if err != nil {
  5637  		return nil, err
  5638  	}
  5639  	req.Header = reqHeaders
  5640  	googleapi.Expand(req.URL, map[string]string{
  5641  		"project":     c.project,
  5642  		"managedZone": c.managedZone,
  5643  		"name":        c.name,
  5644  		"type":        c.type_,
  5645  	})
  5646  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5647  }
  5648  
  5649  // Do executes the "dns.resourceRecordSets.delete" call.
  5650  // Any non-2xx status code is an error. Response headers are in either
  5651  // *ResourceRecordSetsDeleteResponse.ServerResponse.Header or (if a response
  5652  // was returned at all) in error.(*googleapi.Error).Header. Use
  5653  // googleapi.IsNotModified to check whether the returned error was because
  5654  // http.StatusNotModified was returned.
  5655  func (c *ResourceRecordSetsDeleteCall) Do(opts ...googleapi.CallOption) (*ResourceRecordSetsDeleteResponse, error) {
  5656  	gensupport.SetOptions(c.urlParams_, opts...)
  5657  	res, err := c.doRequest("json")
  5658  	if res != nil && res.StatusCode == http.StatusNotModified {
  5659  		if res.Body != nil {
  5660  			res.Body.Close()
  5661  		}
  5662  		return nil, gensupport.WrapError(&googleapi.Error{
  5663  			Code:   res.StatusCode,
  5664  			Header: res.Header,
  5665  		})
  5666  	}
  5667  	if err != nil {
  5668  		return nil, err
  5669  	}
  5670  	defer googleapi.CloseBody(res)
  5671  	if err := googleapi.CheckResponse(res); err != nil {
  5672  		return nil, gensupport.WrapError(err)
  5673  	}
  5674  	ret := &ResourceRecordSetsDeleteResponse{
  5675  		ServerResponse: googleapi.ServerResponse{
  5676  			Header:         res.Header,
  5677  			HTTPStatusCode: res.StatusCode,
  5678  		},
  5679  	}
  5680  	target := &ret
  5681  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5682  		return nil, err
  5683  	}
  5684  	return ret, nil
  5685  }
  5686  
  5687  type ResourceRecordSetsGetCall struct {
  5688  	s            *Service
  5689  	project      string
  5690  	managedZone  string
  5691  	name         string
  5692  	type_        string
  5693  	urlParams_   gensupport.URLParams
  5694  	ifNoneMatch_ string
  5695  	ctx_         context.Context
  5696  	header_      http.Header
  5697  }
  5698  
  5699  // Get: Fetches the representation of an existing ResourceRecordSet.
  5700  //
  5701  //   - managedZone: Identifies the managed zone addressed by this request. Can be
  5702  //     the managed zone name or ID.
  5703  //   - name: Fully qualified domain name.
  5704  //   - project: Identifies the project addressed by this request.
  5705  //   - type: RRSet type.
  5706  func (r *ResourceRecordSetsService) Get(project string, managedZone string, name string, type_ string) *ResourceRecordSetsGetCall {
  5707  	c := &ResourceRecordSetsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5708  	c.project = project
  5709  	c.managedZone = managedZone
  5710  	c.name = name
  5711  	c.type_ = type_
  5712  	return c
  5713  }
  5714  
  5715  // ClientOperationId sets the optional parameter "clientOperationId": For
  5716  // mutating operation requests only. An optional identifier specified by the
  5717  // client. Must be unique for operation resources in the Operations collection.
  5718  func (c *ResourceRecordSetsGetCall) ClientOperationId(clientOperationId string) *ResourceRecordSetsGetCall {
  5719  	c.urlParams_.Set("clientOperationId", clientOperationId)
  5720  	return c
  5721  }
  5722  
  5723  // Fields allows partial responses to be retrieved. See
  5724  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5725  // details.
  5726  func (c *ResourceRecordSetsGetCall) Fields(s ...googleapi.Field) *ResourceRecordSetsGetCall {
  5727  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5728  	return c
  5729  }
  5730  
  5731  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5732  // object's ETag matches the given value. This is useful for getting updates
  5733  // only after the object has changed since the last request.
  5734  func (c *ResourceRecordSetsGetCall) IfNoneMatch(entityTag string) *ResourceRecordSetsGetCall {
  5735  	c.ifNoneMatch_ = entityTag
  5736  	return c
  5737  }
  5738  
  5739  // Context sets the context to be used in this call's Do method.
  5740  func (c *ResourceRecordSetsGetCall) Context(ctx context.Context) *ResourceRecordSetsGetCall {
  5741  	c.ctx_ = ctx
  5742  	return c
  5743  }
  5744  
  5745  // Header returns a http.Header that can be modified by the caller to add
  5746  // headers to the request.
  5747  func (c *ResourceRecordSetsGetCall) Header() http.Header {
  5748  	if c.header_ == nil {
  5749  		c.header_ = make(http.Header)
  5750  	}
  5751  	return c.header_
  5752  }
  5753  
  5754  func (c *ResourceRecordSetsGetCall) doRequest(alt string) (*http.Response, error) {
  5755  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5756  	if c.ifNoneMatch_ != "" {
  5757  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5758  	}
  5759  	var body io.Reader = nil
  5760  	c.urlParams_.Set("alt", alt)
  5761  	c.urlParams_.Set("prettyPrint", "false")
  5762  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/managedZones/{managedZone}/rrsets/{name}/{type}")
  5763  	urls += "?" + c.urlParams_.Encode()
  5764  	req, err := http.NewRequest("GET", urls, body)
  5765  	if err != nil {
  5766  		return nil, err
  5767  	}
  5768  	req.Header = reqHeaders
  5769  	googleapi.Expand(req.URL, map[string]string{
  5770  		"project":     c.project,
  5771  		"managedZone": c.managedZone,
  5772  		"name":        c.name,
  5773  		"type":        c.type_,
  5774  	})
  5775  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5776  }
  5777  
  5778  // Do executes the "dns.resourceRecordSets.get" call.
  5779  // Any non-2xx status code is an error. Response headers are in either
  5780  // *ResourceRecordSet.ServerResponse.Header or (if a response was returned at
  5781  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  5782  // check whether the returned error was because http.StatusNotModified was
  5783  // returned.
  5784  func (c *ResourceRecordSetsGetCall) Do(opts ...googleapi.CallOption) (*ResourceRecordSet, error) {
  5785  	gensupport.SetOptions(c.urlParams_, opts...)
  5786  	res, err := c.doRequest("json")
  5787  	if res != nil && res.StatusCode == http.StatusNotModified {
  5788  		if res.Body != nil {
  5789  			res.Body.Close()
  5790  		}
  5791  		return nil, gensupport.WrapError(&googleapi.Error{
  5792  			Code:   res.StatusCode,
  5793  			Header: res.Header,
  5794  		})
  5795  	}
  5796  	if err != nil {
  5797  		return nil, err
  5798  	}
  5799  	defer googleapi.CloseBody(res)
  5800  	if err := googleapi.CheckResponse(res); err != nil {
  5801  		return nil, gensupport.WrapError(err)
  5802  	}
  5803  	ret := &ResourceRecordSet{
  5804  		ServerResponse: googleapi.ServerResponse{
  5805  			Header:         res.Header,
  5806  			HTTPStatusCode: res.StatusCode,
  5807  		},
  5808  	}
  5809  	target := &ret
  5810  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5811  		return nil, err
  5812  	}
  5813  	return ret, nil
  5814  }
  5815  
  5816  type ResourceRecordSetsListCall struct {
  5817  	s            *Service
  5818  	project      string
  5819  	managedZone  string
  5820  	urlParams_   gensupport.URLParams
  5821  	ifNoneMatch_ string
  5822  	ctx_         context.Context
  5823  	header_      http.Header
  5824  }
  5825  
  5826  // List: Enumerates ResourceRecordSets that you have created but not yet
  5827  // deleted.
  5828  //
  5829  //   - managedZone: Identifies the managed zone addressed by this request. Can be
  5830  //     the managed zone name or ID.
  5831  //   - project: Identifies the project addressed by this request.
  5832  func (r *ResourceRecordSetsService) List(project string, managedZone string) *ResourceRecordSetsListCall {
  5833  	c := &ResourceRecordSetsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5834  	c.project = project
  5835  	c.managedZone = managedZone
  5836  	return c
  5837  }
  5838  
  5839  // MaxResults sets the optional parameter "maxResults": Maximum number of
  5840  // results to be returned. If unspecified, the server decides how many results
  5841  // to return.
  5842  func (c *ResourceRecordSetsListCall) MaxResults(maxResults int64) *ResourceRecordSetsListCall {
  5843  	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  5844  	return c
  5845  }
  5846  
  5847  // Name sets the optional parameter "name": Restricts the list to return only
  5848  // records with this fully qualified domain name.
  5849  func (c *ResourceRecordSetsListCall) Name(name string) *ResourceRecordSetsListCall {
  5850  	c.urlParams_.Set("name", name)
  5851  	return c
  5852  }
  5853  
  5854  // PageToken sets the optional parameter "pageToken": A tag returned by a
  5855  // previous list request that was truncated. Use this parameter to continue a
  5856  // previous list request.
  5857  func (c *ResourceRecordSetsListCall) PageToken(pageToken string) *ResourceRecordSetsListCall {
  5858  	c.urlParams_.Set("pageToken", pageToken)
  5859  	return c
  5860  }
  5861  
  5862  // Type sets the optional parameter "type": Restricts the list to return only
  5863  // records of this type. If present, the "name" parameter must also be present.
  5864  func (c *ResourceRecordSetsListCall) Type(type_ string) *ResourceRecordSetsListCall {
  5865  	c.urlParams_.Set("type", type_)
  5866  	return c
  5867  }
  5868  
  5869  // Fields allows partial responses to be retrieved. See
  5870  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5871  // details.
  5872  func (c *ResourceRecordSetsListCall) Fields(s ...googleapi.Field) *ResourceRecordSetsListCall {
  5873  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5874  	return c
  5875  }
  5876  
  5877  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5878  // object's ETag matches the given value. This is useful for getting updates
  5879  // only after the object has changed since the last request.
  5880  func (c *ResourceRecordSetsListCall) IfNoneMatch(entityTag string) *ResourceRecordSetsListCall {
  5881  	c.ifNoneMatch_ = entityTag
  5882  	return c
  5883  }
  5884  
  5885  // Context sets the context to be used in this call's Do method.
  5886  func (c *ResourceRecordSetsListCall) Context(ctx context.Context) *ResourceRecordSetsListCall {
  5887  	c.ctx_ = ctx
  5888  	return c
  5889  }
  5890  
  5891  // Header returns a http.Header that can be modified by the caller to add
  5892  // headers to the request.
  5893  func (c *ResourceRecordSetsListCall) Header() http.Header {
  5894  	if c.header_ == nil {
  5895  		c.header_ = make(http.Header)
  5896  	}
  5897  	return c.header_
  5898  }
  5899  
  5900  func (c *ResourceRecordSetsListCall) doRequest(alt string) (*http.Response, error) {
  5901  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5902  	if c.ifNoneMatch_ != "" {
  5903  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5904  	}
  5905  	var body io.Reader = nil
  5906  	c.urlParams_.Set("alt", alt)
  5907  	c.urlParams_.Set("prettyPrint", "false")
  5908  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/managedZones/{managedZone}/rrsets")
  5909  	urls += "?" + c.urlParams_.Encode()
  5910  	req, err := http.NewRequest("GET", urls, body)
  5911  	if err != nil {
  5912  		return nil, err
  5913  	}
  5914  	req.Header = reqHeaders
  5915  	googleapi.Expand(req.URL, map[string]string{
  5916  		"project":     c.project,
  5917  		"managedZone": c.managedZone,
  5918  	})
  5919  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5920  }
  5921  
  5922  // Do executes the "dns.resourceRecordSets.list" call.
  5923  // Any non-2xx status code is an error. Response headers are in either
  5924  // *ResourceRecordSetsListResponse.ServerResponse.Header or (if a response was
  5925  // returned at all) in error.(*googleapi.Error).Header. Use
  5926  // googleapi.IsNotModified to check whether the returned error was because
  5927  // http.StatusNotModified was returned.
  5928  func (c *ResourceRecordSetsListCall) Do(opts ...googleapi.CallOption) (*ResourceRecordSetsListResponse, error) {
  5929  	gensupport.SetOptions(c.urlParams_, opts...)
  5930  	res, err := c.doRequest("json")
  5931  	if res != nil && res.StatusCode == http.StatusNotModified {
  5932  		if res.Body != nil {
  5933  			res.Body.Close()
  5934  		}
  5935  		return nil, gensupport.WrapError(&googleapi.Error{
  5936  			Code:   res.StatusCode,
  5937  			Header: res.Header,
  5938  		})
  5939  	}
  5940  	if err != nil {
  5941  		return nil, err
  5942  	}
  5943  	defer googleapi.CloseBody(res)
  5944  	if err := googleapi.CheckResponse(res); err != nil {
  5945  		return nil, gensupport.WrapError(err)
  5946  	}
  5947  	ret := &ResourceRecordSetsListResponse{
  5948  		ServerResponse: googleapi.ServerResponse{
  5949  			Header:         res.Header,
  5950  			HTTPStatusCode: res.StatusCode,
  5951  		},
  5952  	}
  5953  	target := &ret
  5954  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5955  		return nil, err
  5956  	}
  5957  	return ret, nil
  5958  }
  5959  
  5960  // Pages invokes f for each page of results.
  5961  // A non-nil error returned from f will halt the iteration.
  5962  // The provided context supersedes any context provided to the Context method.
  5963  func (c *ResourceRecordSetsListCall) Pages(ctx context.Context, f func(*ResourceRecordSetsListResponse) error) error {
  5964  	c.ctx_ = ctx
  5965  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  5966  	for {
  5967  		x, err := c.Do()
  5968  		if err != nil {
  5969  			return err
  5970  		}
  5971  		if err := f(x); err != nil {
  5972  			return err
  5973  		}
  5974  		if x.NextPageToken == "" {
  5975  			return nil
  5976  		}
  5977  		c.PageToken(x.NextPageToken)
  5978  	}
  5979  }
  5980  
  5981  type ResourceRecordSetsPatchCall struct {
  5982  	s                 *Service
  5983  	project           string
  5984  	managedZone       string
  5985  	name              string
  5986  	type_             string
  5987  	resourcerecordset *ResourceRecordSet
  5988  	urlParams_        gensupport.URLParams
  5989  	ctx_              context.Context
  5990  	header_           http.Header
  5991  }
  5992  
  5993  // Patch: Applies a partial update to an existing ResourceRecordSet.
  5994  //
  5995  //   - managedZone: Identifies the managed zone addressed by this request. Can be
  5996  //     the managed zone name or ID.
  5997  //   - name: Fully qualified domain name.
  5998  //   - project: Identifies the project addressed by this request.
  5999  //   - type: RRSet type.
  6000  func (r *ResourceRecordSetsService) Patch(project string, managedZone string, name string, type_ string, resourcerecordset *ResourceRecordSet) *ResourceRecordSetsPatchCall {
  6001  	c := &ResourceRecordSetsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6002  	c.project = project
  6003  	c.managedZone = managedZone
  6004  	c.name = name
  6005  	c.type_ = type_
  6006  	c.resourcerecordset = resourcerecordset
  6007  	return c
  6008  }
  6009  
  6010  // ClientOperationId sets the optional parameter "clientOperationId": For
  6011  // mutating operation requests only. An optional identifier specified by the
  6012  // client. Must be unique for operation resources in the Operations collection.
  6013  func (c *ResourceRecordSetsPatchCall) ClientOperationId(clientOperationId string) *ResourceRecordSetsPatchCall {
  6014  	c.urlParams_.Set("clientOperationId", clientOperationId)
  6015  	return c
  6016  }
  6017  
  6018  // Fields allows partial responses to be retrieved. See
  6019  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6020  // details.
  6021  func (c *ResourceRecordSetsPatchCall) Fields(s ...googleapi.Field) *ResourceRecordSetsPatchCall {
  6022  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6023  	return c
  6024  }
  6025  
  6026  // Context sets the context to be used in this call's Do method.
  6027  func (c *ResourceRecordSetsPatchCall) Context(ctx context.Context) *ResourceRecordSetsPatchCall {
  6028  	c.ctx_ = ctx
  6029  	return c
  6030  }
  6031  
  6032  // Header returns a http.Header that can be modified by the caller to add
  6033  // headers to the request.
  6034  func (c *ResourceRecordSetsPatchCall) Header() http.Header {
  6035  	if c.header_ == nil {
  6036  		c.header_ = make(http.Header)
  6037  	}
  6038  	return c.header_
  6039  }
  6040  
  6041  func (c *ResourceRecordSetsPatchCall) doRequest(alt string) (*http.Response, error) {
  6042  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  6043  	var body io.Reader = nil
  6044  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.resourcerecordset)
  6045  	if err != nil {
  6046  		return nil, err
  6047  	}
  6048  	c.urlParams_.Set("alt", alt)
  6049  	c.urlParams_.Set("prettyPrint", "false")
  6050  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/managedZones/{managedZone}/rrsets/{name}/{type}")
  6051  	urls += "?" + c.urlParams_.Encode()
  6052  	req, err := http.NewRequest("PATCH", urls, body)
  6053  	if err != nil {
  6054  		return nil, err
  6055  	}
  6056  	req.Header = reqHeaders
  6057  	googleapi.Expand(req.URL, map[string]string{
  6058  		"project":     c.project,
  6059  		"managedZone": c.managedZone,
  6060  		"name":        c.name,
  6061  		"type":        c.type_,
  6062  	})
  6063  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6064  }
  6065  
  6066  // Do executes the "dns.resourceRecordSets.patch" call.
  6067  // Any non-2xx status code is an error. Response headers are in either
  6068  // *ResourceRecordSet.ServerResponse.Header or (if a response was returned at
  6069  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  6070  // check whether the returned error was because http.StatusNotModified was
  6071  // returned.
  6072  func (c *ResourceRecordSetsPatchCall) Do(opts ...googleapi.CallOption) (*ResourceRecordSet, error) {
  6073  	gensupport.SetOptions(c.urlParams_, opts...)
  6074  	res, err := c.doRequest("json")
  6075  	if res != nil && res.StatusCode == http.StatusNotModified {
  6076  		if res.Body != nil {
  6077  			res.Body.Close()
  6078  		}
  6079  		return nil, gensupport.WrapError(&googleapi.Error{
  6080  			Code:   res.StatusCode,
  6081  			Header: res.Header,
  6082  		})
  6083  	}
  6084  	if err != nil {
  6085  		return nil, err
  6086  	}
  6087  	defer googleapi.CloseBody(res)
  6088  	if err := googleapi.CheckResponse(res); err != nil {
  6089  		return nil, gensupport.WrapError(err)
  6090  	}
  6091  	ret := &ResourceRecordSet{
  6092  		ServerResponse: googleapi.ServerResponse{
  6093  			Header:         res.Header,
  6094  			HTTPStatusCode: res.StatusCode,
  6095  		},
  6096  	}
  6097  	target := &ret
  6098  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6099  		return nil, err
  6100  	}
  6101  	return ret, nil
  6102  }
  6103  
  6104  type ResponsePoliciesCreateCall struct {
  6105  	s              *Service
  6106  	project        string
  6107  	responsepolicy *ResponsePolicy
  6108  	urlParams_     gensupport.URLParams
  6109  	ctx_           context.Context
  6110  	header_        http.Header
  6111  }
  6112  
  6113  // Create: Creates a new Response Policy
  6114  //
  6115  // - project: Identifies the project addressed by this request.
  6116  func (r *ResponsePoliciesService) Create(project string, responsepolicy *ResponsePolicy) *ResponsePoliciesCreateCall {
  6117  	c := &ResponsePoliciesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6118  	c.project = project
  6119  	c.responsepolicy = responsepolicy
  6120  	return c
  6121  }
  6122  
  6123  // ClientOperationId sets the optional parameter "clientOperationId": For
  6124  // mutating operation requests only. An optional identifier specified by the
  6125  // client. Must be unique for operation resources in the Operations collection.
  6126  func (c *ResponsePoliciesCreateCall) ClientOperationId(clientOperationId string) *ResponsePoliciesCreateCall {
  6127  	c.urlParams_.Set("clientOperationId", clientOperationId)
  6128  	return c
  6129  }
  6130  
  6131  // Fields allows partial responses to be retrieved. See
  6132  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6133  // details.
  6134  func (c *ResponsePoliciesCreateCall) Fields(s ...googleapi.Field) *ResponsePoliciesCreateCall {
  6135  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6136  	return c
  6137  }
  6138  
  6139  // Context sets the context to be used in this call's Do method.
  6140  func (c *ResponsePoliciesCreateCall) Context(ctx context.Context) *ResponsePoliciesCreateCall {
  6141  	c.ctx_ = ctx
  6142  	return c
  6143  }
  6144  
  6145  // Header returns a http.Header that can be modified by the caller to add
  6146  // headers to the request.
  6147  func (c *ResponsePoliciesCreateCall) Header() http.Header {
  6148  	if c.header_ == nil {
  6149  		c.header_ = make(http.Header)
  6150  	}
  6151  	return c.header_
  6152  }
  6153  
  6154  func (c *ResponsePoliciesCreateCall) doRequest(alt string) (*http.Response, error) {
  6155  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  6156  	var body io.Reader = nil
  6157  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.responsepolicy)
  6158  	if err != nil {
  6159  		return nil, err
  6160  	}
  6161  	c.urlParams_.Set("alt", alt)
  6162  	c.urlParams_.Set("prettyPrint", "false")
  6163  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/responsePolicies")
  6164  	urls += "?" + c.urlParams_.Encode()
  6165  	req, err := http.NewRequest("POST", urls, body)
  6166  	if err != nil {
  6167  		return nil, err
  6168  	}
  6169  	req.Header = reqHeaders
  6170  	googleapi.Expand(req.URL, map[string]string{
  6171  		"project": c.project,
  6172  	})
  6173  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6174  }
  6175  
  6176  // Do executes the "dns.responsePolicies.create" call.
  6177  // Any non-2xx status code is an error. Response headers are in either
  6178  // *ResponsePolicy.ServerResponse.Header or (if a response was returned at all)
  6179  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6180  // whether the returned error was because http.StatusNotModified was returned.
  6181  func (c *ResponsePoliciesCreateCall) Do(opts ...googleapi.CallOption) (*ResponsePolicy, error) {
  6182  	gensupport.SetOptions(c.urlParams_, opts...)
  6183  	res, err := c.doRequest("json")
  6184  	if res != nil && res.StatusCode == http.StatusNotModified {
  6185  		if res.Body != nil {
  6186  			res.Body.Close()
  6187  		}
  6188  		return nil, gensupport.WrapError(&googleapi.Error{
  6189  			Code:   res.StatusCode,
  6190  			Header: res.Header,
  6191  		})
  6192  	}
  6193  	if err != nil {
  6194  		return nil, err
  6195  	}
  6196  	defer googleapi.CloseBody(res)
  6197  	if err := googleapi.CheckResponse(res); err != nil {
  6198  		return nil, gensupport.WrapError(err)
  6199  	}
  6200  	ret := &ResponsePolicy{
  6201  		ServerResponse: googleapi.ServerResponse{
  6202  			Header:         res.Header,
  6203  			HTTPStatusCode: res.StatusCode,
  6204  		},
  6205  	}
  6206  	target := &ret
  6207  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6208  		return nil, err
  6209  	}
  6210  	return ret, nil
  6211  }
  6212  
  6213  type ResponsePoliciesDeleteCall struct {
  6214  	s              *Service
  6215  	project        string
  6216  	responsePolicy string
  6217  	urlParams_     gensupport.URLParams
  6218  	ctx_           context.Context
  6219  	header_        http.Header
  6220  }
  6221  
  6222  // Delete: Deletes a previously created Response Policy. Fails if the response
  6223  // policy is non-empty or still being referenced by a network.
  6224  //
  6225  //   - project: Identifies the project addressed by this request.
  6226  //   - responsePolicy: User assigned name of the Response Policy addressed by
  6227  //     this request.
  6228  func (r *ResponsePoliciesService) Delete(project string, responsePolicy string) *ResponsePoliciesDeleteCall {
  6229  	c := &ResponsePoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6230  	c.project = project
  6231  	c.responsePolicy = responsePolicy
  6232  	return c
  6233  }
  6234  
  6235  // ClientOperationId sets the optional parameter "clientOperationId": For
  6236  // mutating operation requests only. An optional identifier specified by the
  6237  // client. Must be unique for operation resources in the Operations collection.
  6238  func (c *ResponsePoliciesDeleteCall) ClientOperationId(clientOperationId string) *ResponsePoliciesDeleteCall {
  6239  	c.urlParams_.Set("clientOperationId", clientOperationId)
  6240  	return c
  6241  }
  6242  
  6243  // Fields allows partial responses to be retrieved. See
  6244  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6245  // details.
  6246  func (c *ResponsePoliciesDeleteCall) Fields(s ...googleapi.Field) *ResponsePoliciesDeleteCall {
  6247  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6248  	return c
  6249  }
  6250  
  6251  // Context sets the context to be used in this call's Do method.
  6252  func (c *ResponsePoliciesDeleteCall) Context(ctx context.Context) *ResponsePoliciesDeleteCall {
  6253  	c.ctx_ = ctx
  6254  	return c
  6255  }
  6256  
  6257  // Header returns a http.Header that can be modified by the caller to add
  6258  // headers to the request.
  6259  func (c *ResponsePoliciesDeleteCall) Header() http.Header {
  6260  	if c.header_ == nil {
  6261  		c.header_ = make(http.Header)
  6262  	}
  6263  	return c.header_
  6264  }
  6265  
  6266  func (c *ResponsePoliciesDeleteCall) doRequest(alt string) (*http.Response, error) {
  6267  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6268  	var body io.Reader = nil
  6269  	c.urlParams_.Set("alt", alt)
  6270  	c.urlParams_.Set("prettyPrint", "false")
  6271  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/responsePolicies/{responsePolicy}")
  6272  	urls += "?" + c.urlParams_.Encode()
  6273  	req, err := http.NewRequest("DELETE", urls, body)
  6274  	if err != nil {
  6275  		return nil, err
  6276  	}
  6277  	req.Header = reqHeaders
  6278  	googleapi.Expand(req.URL, map[string]string{
  6279  		"project":        c.project,
  6280  		"responsePolicy": c.responsePolicy,
  6281  	})
  6282  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6283  }
  6284  
  6285  // Do executes the "dns.responsePolicies.delete" call.
  6286  func (c *ResponsePoliciesDeleteCall) Do(opts ...googleapi.CallOption) error {
  6287  	gensupport.SetOptions(c.urlParams_, opts...)
  6288  	res, err := c.doRequest("json")
  6289  	if err != nil {
  6290  		return err
  6291  	}
  6292  	defer googleapi.CloseBody(res)
  6293  	if err := googleapi.CheckResponse(res); err != nil {
  6294  		return gensupport.WrapError(err)
  6295  	}
  6296  	return nil
  6297  }
  6298  
  6299  type ResponsePoliciesGetCall struct {
  6300  	s              *Service
  6301  	project        string
  6302  	responsePolicy string
  6303  	urlParams_     gensupport.URLParams
  6304  	ifNoneMatch_   string
  6305  	ctx_           context.Context
  6306  	header_        http.Header
  6307  }
  6308  
  6309  // Get: Fetches the representation of an existing Response Policy.
  6310  //
  6311  //   - project: Identifies the project addressed by this request.
  6312  //   - responsePolicy: User assigned name of the Response Policy addressed by
  6313  //     this request.
  6314  func (r *ResponsePoliciesService) Get(project string, responsePolicy string) *ResponsePoliciesGetCall {
  6315  	c := &ResponsePoliciesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6316  	c.project = project
  6317  	c.responsePolicy = responsePolicy
  6318  	return c
  6319  }
  6320  
  6321  // ClientOperationId sets the optional parameter "clientOperationId": For
  6322  // mutating operation requests only. An optional identifier specified by the
  6323  // client. Must be unique for operation resources in the Operations collection.
  6324  func (c *ResponsePoliciesGetCall) ClientOperationId(clientOperationId string) *ResponsePoliciesGetCall {
  6325  	c.urlParams_.Set("clientOperationId", clientOperationId)
  6326  	return c
  6327  }
  6328  
  6329  // Fields allows partial responses to be retrieved. See
  6330  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6331  // details.
  6332  func (c *ResponsePoliciesGetCall) Fields(s ...googleapi.Field) *ResponsePoliciesGetCall {
  6333  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6334  	return c
  6335  }
  6336  
  6337  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  6338  // object's ETag matches the given value. This is useful for getting updates
  6339  // only after the object has changed since the last request.
  6340  func (c *ResponsePoliciesGetCall) IfNoneMatch(entityTag string) *ResponsePoliciesGetCall {
  6341  	c.ifNoneMatch_ = entityTag
  6342  	return c
  6343  }
  6344  
  6345  // Context sets the context to be used in this call's Do method.
  6346  func (c *ResponsePoliciesGetCall) Context(ctx context.Context) *ResponsePoliciesGetCall {
  6347  	c.ctx_ = ctx
  6348  	return c
  6349  }
  6350  
  6351  // Header returns a http.Header that can be modified by the caller to add
  6352  // headers to the request.
  6353  func (c *ResponsePoliciesGetCall) Header() http.Header {
  6354  	if c.header_ == nil {
  6355  		c.header_ = make(http.Header)
  6356  	}
  6357  	return c.header_
  6358  }
  6359  
  6360  func (c *ResponsePoliciesGetCall) doRequest(alt string) (*http.Response, error) {
  6361  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6362  	if c.ifNoneMatch_ != "" {
  6363  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6364  	}
  6365  	var body io.Reader = nil
  6366  	c.urlParams_.Set("alt", alt)
  6367  	c.urlParams_.Set("prettyPrint", "false")
  6368  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/responsePolicies/{responsePolicy}")
  6369  	urls += "?" + c.urlParams_.Encode()
  6370  	req, err := http.NewRequest("GET", urls, body)
  6371  	if err != nil {
  6372  		return nil, err
  6373  	}
  6374  	req.Header = reqHeaders
  6375  	googleapi.Expand(req.URL, map[string]string{
  6376  		"project":        c.project,
  6377  		"responsePolicy": c.responsePolicy,
  6378  	})
  6379  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6380  }
  6381  
  6382  // Do executes the "dns.responsePolicies.get" call.
  6383  // Any non-2xx status code is an error. Response headers are in either
  6384  // *ResponsePolicy.ServerResponse.Header or (if a response was returned at all)
  6385  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6386  // whether the returned error was because http.StatusNotModified was returned.
  6387  func (c *ResponsePoliciesGetCall) Do(opts ...googleapi.CallOption) (*ResponsePolicy, error) {
  6388  	gensupport.SetOptions(c.urlParams_, opts...)
  6389  	res, err := c.doRequest("json")
  6390  	if res != nil && res.StatusCode == http.StatusNotModified {
  6391  		if res.Body != nil {
  6392  			res.Body.Close()
  6393  		}
  6394  		return nil, gensupport.WrapError(&googleapi.Error{
  6395  			Code:   res.StatusCode,
  6396  			Header: res.Header,
  6397  		})
  6398  	}
  6399  	if err != nil {
  6400  		return nil, err
  6401  	}
  6402  	defer googleapi.CloseBody(res)
  6403  	if err := googleapi.CheckResponse(res); err != nil {
  6404  		return nil, gensupport.WrapError(err)
  6405  	}
  6406  	ret := &ResponsePolicy{
  6407  		ServerResponse: googleapi.ServerResponse{
  6408  			Header:         res.Header,
  6409  			HTTPStatusCode: res.StatusCode,
  6410  		},
  6411  	}
  6412  	target := &ret
  6413  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6414  		return nil, err
  6415  	}
  6416  	return ret, nil
  6417  }
  6418  
  6419  type ResponsePoliciesListCall struct {
  6420  	s            *Service
  6421  	project      string
  6422  	urlParams_   gensupport.URLParams
  6423  	ifNoneMatch_ string
  6424  	ctx_         context.Context
  6425  	header_      http.Header
  6426  }
  6427  
  6428  // List: Enumerates all Response Policies associated with a project.
  6429  //
  6430  // - project: Identifies the project addressed by this request.
  6431  func (r *ResponsePoliciesService) List(project string) *ResponsePoliciesListCall {
  6432  	c := &ResponsePoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6433  	c.project = project
  6434  	return c
  6435  }
  6436  
  6437  // MaxResults sets the optional parameter "maxResults": Maximum number of
  6438  // results to be returned. If unspecified, the server decides how many results
  6439  // to return.
  6440  func (c *ResponsePoliciesListCall) MaxResults(maxResults int64) *ResponsePoliciesListCall {
  6441  	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  6442  	return c
  6443  }
  6444  
  6445  // PageToken sets the optional parameter "pageToken": A tag returned by a
  6446  // previous list request that was truncated. Use this parameter to continue a
  6447  // previous list request.
  6448  func (c *ResponsePoliciesListCall) PageToken(pageToken string) *ResponsePoliciesListCall {
  6449  	c.urlParams_.Set("pageToken", pageToken)
  6450  	return c
  6451  }
  6452  
  6453  // Fields allows partial responses to be retrieved. See
  6454  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6455  // details.
  6456  func (c *ResponsePoliciesListCall) Fields(s ...googleapi.Field) *ResponsePoliciesListCall {
  6457  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6458  	return c
  6459  }
  6460  
  6461  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  6462  // object's ETag matches the given value. This is useful for getting updates
  6463  // only after the object has changed since the last request.
  6464  func (c *ResponsePoliciesListCall) IfNoneMatch(entityTag string) *ResponsePoliciesListCall {
  6465  	c.ifNoneMatch_ = entityTag
  6466  	return c
  6467  }
  6468  
  6469  // Context sets the context to be used in this call's Do method.
  6470  func (c *ResponsePoliciesListCall) Context(ctx context.Context) *ResponsePoliciesListCall {
  6471  	c.ctx_ = ctx
  6472  	return c
  6473  }
  6474  
  6475  // Header returns a http.Header that can be modified by the caller to add
  6476  // headers to the request.
  6477  func (c *ResponsePoliciesListCall) Header() http.Header {
  6478  	if c.header_ == nil {
  6479  		c.header_ = make(http.Header)
  6480  	}
  6481  	return c.header_
  6482  }
  6483  
  6484  func (c *ResponsePoliciesListCall) doRequest(alt string) (*http.Response, error) {
  6485  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6486  	if c.ifNoneMatch_ != "" {
  6487  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6488  	}
  6489  	var body io.Reader = nil
  6490  	c.urlParams_.Set("alt", alt)
  6491  	c.urlParams_.Set("prettyPrint", "false")
  6492  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/responsePolicies")
  6493  	urls += "?" + c.urlParams_.Encode()
  6494  	req, err := http.NewRequest("GET", urls, body)
  6495  	if err != nil {
  6496  		return nil, err
  6497  	}
  6498  	req.Header = reqHeaders
  6499  	googleapi.Expand(req.URL, map[string]string{
  6500  		"project": c.project,
  6501  	})
  6502  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6503  }
  6504  
  6505  // Do executes the "dns.responsePolicies.list" call.
  6506  // Any non-2xx status code is an error. Response headers are in either
  6507  // *ResponsePoliciesListResponse.ServerResponse.Header or (if a response was
  6508  // returned at all) in error.(*googleapi.Error).Header. Use
  6509  // googleapi.IsNotModified to check whether the returned error was because
  6510  // http.StatusNotModified was returned.
  6511  func (c *ResponsePoliciesListCall) Do(opts ...googleapi.CallOption) (*ResponsePoliciesListResponse, error) {
  6512  	gensupport.SetOptions(c.urlParams_, opts...)
  6513  	res, err := c.doRequest("json")
  6514  	if res != nil && res.StatusCode == http.StatusNotModified {
  6515  		if res.Body != nil {
  6516  			res.Body.Close()
  6517  		}
  6518  		return nil, gensupport.WrapError(&googleapi.Error{
  6519  			Code:   res.StatusCode,
  6520  			Header: res.Header,
  6521  		})
  6522  	}
  6523  	if err != nil {
  6524  		return nil, err
  6525  	}
  6526  	defer googleapi.CloseBody(res)
  6527  	if err := googleapi.CheckResponse(res); err != nil {
  6528  		return nil, gensupport.WrapError(err)
  6529  	}
  6530  	ret := &ResponsePoliciesListResponse{
  6531  		ServerResponse: googleapi.ServerResponse{
  6532  			Header:         res.Header,
  6533  			HTTPStatusCode: res.StatusCode,
  6534  		},
  6535  	}
  6536  	target := &ret
  6537  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6538  		return nil, err
  6539  	}
  6540  	return ret, nil
  6541  }
  6542  
  6543  // Pages invokes f for each page of results.
  6544  // A non-nil error returned from f will halt the iteration.
  6545  // The provided context supersedes any context provided to the Context method.
  6546  func (c *ResponsePoliciesListCall) Pages(ctx context.Context, f func(*ResponsePoliciesListResponse) error) error {
  6547  	c.ctx_ = ctx
  6548  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  6549  	for {
  6550  		x, err := c.Do()
  6551  		if err != nil {
  6552  			return err
  6553  		}
  6554  		if err := f(x); err != nil {
  6555  			return err
  6556  		}
  6557  		if x.NextPageToken == "" {
  6558  			return nil
  6559  		}
  6560  		c.PageToken(x.NextPageToken)
  6561  	}
  6562  }
  6563  
  6564  type ResponsePoliciesPatchCall struct {
  6565  	s              *Service
  6566  	project        string
  6567  	responsePolicy string
  6568  	responsepolicy *ResponsePolicy
  6569  	urlParams_     gensupport.URLParams
  6570  	ctx_           context.Context
  6571  	header_        http.Header
  6572  }
  6573  
  6574  // Patch: Applies a partial update to an existing Response Policy.
  6575  //
  6576  //   - project: Identifies the project addressed by this request.
  6577  //   - responsePolicy: User assigned name of the response policy addressed by
  6578  //     this request.
  6579  func (r *ResponsePoliciesService) Patch(project string, responsePolicy string, responsepolicy *ResponsePolicy) *ResponsePoliciesPatchCall {
  6580  	c := &ResponsePoliciesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6581  	c.project = project
  6582  	c.responsePolicy = responsePolicy
  6583  	c.responsepolicy = responsepolicy
  6584  	return c
  6585  }
  6586  
  6587  // ClientOperationId sets the optional parameter "clientOperationId": For
  6588  // mutating operation requests only. An optional identifier specified by the
  6589  // client. Must be unique for operation resources in the Operations collection.
  6590  func (c *ResponsePoliciesPatchCall) ClientOperationId(clientOperationId string) *ResponsePoliciesPatchCall {
  6591  	c.urlParams_.Set("clientOperationId", clientOperationId)
  6592  	return c
  6593  }
  6594  
  6595  // Fields allows partial responses to be retrieved. See
  6596  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6597  // details.
  6598  func (c *ResponsePoliciesPatchCall) Fields(s ...googleapi.Field) *ResponsePoliciesPatchCall {
  6599  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6600  	return c
  6601  }
  6602  
  6603  // Context sets the context to be used in this call's Do method.
  6604  func (c *ResponsePoliciesPatchCall) Context(ctx context.Context) *ResponsePoliciesPatchCall {
  6605  	c.ctx_ = ctx
  6606  	return c
  6607  }
  6608  
  6609  // Header returns a http.Header that can be modified by the caller to add
  6610  // headers to the request.
  6611  func (c *ResponsePoliciesPatchCall) Header() http.Header {
  6612  	if c.header_ == nil {
  6613  		c.header_ = make(http.Header)
  6614  	}
  6615  	return c.header_
  6616  }
  6617  
  6618  func (c *ResponsePoliciesPatchCall) doRequest(alt string) (*http.Response, error) {
  6619  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  6620  	var body io.Reader = nil
  6621  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.responsepolicy)
  6622  	if err != nil {
  6623  		return nil, err
  6624  	}
  6625  	c.urlParams_.Set("alt", alt)
  6626  	c.urlParams_.Set("prettyPrint", "false")
  6627  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/responsePolicies/{responsePolicy}")
  6628  	urls += "?" + c.urlParams_.Encode()
  6629  	req, err := http.NewRequest("PATCH", urls, body)
  6630  	if err != nil {
  6631  		return nil, err
  6632  	}
  6633  	req.Header = reqHeaders
  6634  	googleapi.Expand(req.URL, map[string]string{
  6635  		"project":        c.project,
  6636  		"responsePolicy": c.responsePolicy,
  6637  	})
  6638  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6639  }
  6640  
  6641  // Do executes the "dns.responsePolicies.patch" call.
  6642  // Any non-2xx status code is an error. Response headers are in either
  6643  // *ResponsePoliciesPatchResponse.ServerResponse.Header or (if a response was
  6644  // returned at all) in error.(*googleapi.Error).Header. Use
  6645  // googleapi.IsNotModified to check whether the returned error was because
  6646  // http.StatusNotModified was returned.
  6647  func (c *ResponsePoliciesPatchCall) Do(opts ...googleapi.CallOption) (*ResponsePoliciesPatchResponse, error) {
  6648  	gensupport.SetOptions(c.urlParams_, opts...)
  6649  	res, err := c.doRequest("json")
  6650  	if res != nil && res.StatusCode == http.StatusNotModified {
  6651  		if res.Body != nil {
  6652  			res.Body.Close()
  6653  		}
  6654  		return nil, gensupport.WrapError(&googleapi.Error{
  6655  			Code:   res.StatusCode,
  6656  			Header: res.Header,
  6657  		})
  6658  	}
  6659  	if err != nil {
  6660  		return nil, err
  6661  	}
  6662  	defer googleapi.CloseBody(res)
  6663  	if err := googleapi.CheckResponse(res); err != nil {
  6664  		return nil, gensupport.WrapError(err)
  6665  	}
  6666  	ret := &ResponsePoliciesPatchResponse{
  6667  		ServerResponse: googleapi.ServerResponse{
  6668  			Header:         res.Header,
  6669  			HTTPStatusCode: res.StatusCode,
  6670  		},
  6671  	}
  6672  	target := &ret
  6673  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6674  		return nil, err
  6675  	}
  6676  	return ret, nil
  6677  }
  6678  
  6679  type ResponsePoliciesUpdateCall struct {
  6680  	s              *Service
  6681  	project        string
  6682  	responsePolicy string
  6683  	responsepolicy *ResponsePolicy
  6684  	urlParams_     gensupport.URLParams
  6685  	ctx_           context.Context
  6686  	header_        http.Header
  6687  }
  6688  
  6689  // Update: Updates an existing Response Policy.
  6690  //
  6691  //   - project: Identifies the project addressed by this request.
  6692  //   - responsePolicy: User assigned name of the Response Policy addressed by
  6693  //     this request.
  6694  func (r *ResponsePoliciesService) Update(project string, responsePolicy string, responsepolicy *ResponsePolicy) *ResponsePoliciesUpdateCall {
  6695  	c := &ResponsePoliciesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6696  	c.project = project
  6697  	c.responsePolicy = responsePolicy
  6698  	c.responsepolicy = responsepolicy
  6699  	return c
  6700  }
  6701  
  6702  // ClientOperationId sets the optional parameter "clientOperationId": For
  6703  // mutating operation requests only. An optional identifier specified by the
  6704  // client. Must be unique for operation resources in the Operations collection.
  6705  func (c *ResponsePoliciesUpdateCall) ClientOperationId(clientOperationId string) *ResponsePoliciesUpdateCall {
  6706  	c.urlParams_.Set("clientOperationId", clientOperationId)
  6707  	return c
  6708  }
  6709  
  6710  // Fields allows partial responses to be retrieved. See
  6711  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6712  // details.
  6713  func (c *ResponsePoliciesUpdateCall) Fields(s ...googleapi.Field) *ResponsePoliciesUpdateCall {
  6714  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6715  	return c
  6716  }
  6717  
  6718  // Context sets the context to be used in this call's Do method.
  6719  func (c *ResponsePoliciesUpdateCall) Context(ctx context.Context) *ResponsePoliciesUpdateCall {
  6720  	c.ctx_ = ctx
  6721  	return c
  6722  }
  6723  
  6724  // Header returns a http.Header that can be modified by the caller to add
  6725  // headers to the request.
  6726  func (c *ResponsePoliciesUpdateCall) Header() http.Header {
  6727  	if c.header_ == nil {
  6728  		c.header_ = make(http.Header)
  6729  	}
  6730  	return c.header_
  6731  }
  6732  
  6733  func (c *ResponsePoliciesUpdateCall) doRequest(alt string) (*http.Response, error) {
  6734  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  6735  	var body io.Reader = nil
  6736  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.responsepolicy)
  6737  	if err != nil {
  6738  		return nil, err
  6739  	}
  6740  	c.urlParams_.Set("alt", alt)
  6741  	c.urlParams_.Set("prettyPrint", "false")
  6742  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/responsePolicies/{responsePolicy}")
  6743  	urls += "?" + c.urlParams_.Encode()
  6744  	req, err := http.NewRequest("PUT", urls, body)
  6745  	if err != nil {
  6746  		return nil, err
  6747  	}
  6748  	req.Header = reqHeaders
  6749  	googleapi.Expand(req.URL, map[string]string{
  6750  		"project":        c.project,
  6751  		"responsePolicy": c.responsePolicy,
  6752  	})
  6753  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6754  }
  6755  
  6756  // Do executes the "dns.responsePolicies.update" call.
  6757  // Any non-2xx status code is an error. Response headers are in either
  6758  // *ResponsePoliciesUpdateResponse.ServerResponse.Header or (if a response was
  6759  // returned at all) in error.(*googleapi.Error).Header. Use
  6760  // googleapi.IsNotModified to check whether the returned error was because
  6761  // http.StatusNotModified was returned.
  6762  func (c *ResponsePoliciesUpdateCall) Do(opts ...googleapi.CallOption) (*ResponsePoliciesUpdateResponse, error) {
  6763  	gensupport.SetOptions(c.urlParams_, opts...)
  6764  	res, err := c.doRequest("json")
  6765  	if res != nil && res.StatusCode == http.StatusNotModified {
  6766  		if res.Body != nil {
  6767  			res.Body.Close()
  6768  		}
  6769  		return nil, gensupport.WrapError(&googleapi.Error{
  6770  			Code:   res.StatusCode,
  6771  			Header: res.Header,
  6772  		})
  6773  	}
  6774  	if err != nil {
  6775  		return nil, err
  6776  	}
  6777  	defer googleapi.CloseBody(res)
  6778  	if err := googleapi.CheckResponse(res); err != nil {
  6779  		return nil, gensupport.WrapError(err)
  6780  	}
  6781  	ret := &ResponsePoliciesUpdateResponse{
  6782  		ServerResponse: googleapi.ServerResponse{
  6783  			Header:         res.Header,
  6784  			HTTPStatusCode: res.StatusCode,
  6785  		},
  6786  	}
  6787  	target := &ret
  6788  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6789  		return nil, err
  6790  	}
  6791  	return ret, nil
  6792  }
  6793  
  6794  type ResponsePolicyRulesCreateCall struct {
  6795  	s                  *Service
  6796  	project            string
  6797  	responsePolicy     string
  6798  	responsepolicyrule *ResponsePolicyRule
  6799  	urlParams_         gensupport.URLParams
  6800  	ctx_               context.Context
  6801  	header_            http.Header
  6802  }
  6803  
  6804  // Create: Creates a new Response Policy Rule.
  6805  //
  6806  //   - project: Identifies the project addressed by this request.
  6807  //   - responsePolicy: User assigned name of the Response Policy containing the
  6808  //     Response Policy Rule.
  6809  func (r *ResponsePolicyRulesService) Create(project string, responsePolicy string, responsepolicyrule *ResponsePolicyRule) *ResponsePolicyRulesCreateCall {
  6810  	c := &ResponsePolicyRulesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6811  	c.project = project
  6812  	c.responsePolicy = responsePolicy
  6813  	c.responsepolicyrule = responsepolicyrule
  6814  	return c
  6815  }
  6816  
  6817  // ClientOperationId sets the optional parameter "clientOperationId": For
  6818  // mutating operation requests only. An optional identifier specified by the
  6819  // client. Must be unique for operation resources in the Operations collection.
  6820  func (c *ResponsePolicyRulesCreateCall) ClientOperationId(clientOperationId string) *ResponsePolicyRulesCreateCall {
  6821  	c.urlParams_.Set("clientOperationId", clientOperationId)
  6822  	return c
  6823  }
  6824  
  6825  // Fields allows partial responses to be retrieved. See
  6826  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6827  // details.
  6828  func (c *ResponsePolicyRulesCreateCall) Fields(s ...googleapi.Field) *ResponsePolicyRulesCreateCall {
  6829  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6830  	return c
  6831  }
  6832  
  6833  // Context sets the context to be used in this call's Do method.
  6834  func (c *ResponsePolicyRulesCreateCall) Context(ctx context.Context) *ResponsePolicyRulesCreateCall {
  6835  	c.ctx_ = ctx
  6836  	return c
  6837  }
  6838  
  6839  // Header returns a http.Header that can be modified by the caller to add
  6840  // headers to the request.
  6841  func (c *ResponsePolicyRulesCreateCall) Header() http.Header {
  6842  	if c.header_ == nil {
  6843  		c.header_ = make(http.Header)
  6844  	}
  6845  	return c.header_
  6846  }
  6847  
  6848  func (c *ResponsePolicyRulesCreateCall) doRequest(alt string) (*http.Response, error) {
  6849  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  6850  	var body io.Reader = nil
  6851  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.responsepolicyrule)
  6852  	if err != nil {
  6853  		return nil, err
  6854  	}
  6855  	c.urlParams_.Set("alt", alt)
  6856  	c.urlParams_.Set("prettyPrint", "false")
  6857  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/responsePolicies/{responsePolicy}/rules")
  6858  	urls += "?" + c.urlParams_.Encode()
  6859  	req, err := http.NewRequest("POST", urls, body)
  6860  	if err != nil {
  6861  		return nil, err
  6862  	}
  6863  	req.Header = reqHeaders
  6864  	googleapi.Expand(req.URL, map[string]string{
  6865  		"project":        c.project,
  6866  		"responsePolicy": c.responsePolicy,
  6867  	})
  6868  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6869  }
  6870  
  6871  // Do executes the "dns.responsePolicyRules.create" call.
  6872  // Any non-2xx status code is an error. Response headers are in either
  6873  // *ResponsePolicyRule.ServerResponse.Header or (if a response was returned at
  6874  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  6875  // check whether the returned error was because http.StatusNotModified was
  6876  // returned.
  6877  func (c *ResponsePolicyRulesCreateCall) Do(opts ...googleapi.CallOption) (*ResponsePolicyRule, error) {
  6878  	gensupport.SetOptions(c.urlParams_, opts...)
  6879  	res, err := c.doRequest("json")
  6880  	if res != nil && res.StatusCode == http.StatusNotModified {
  6881  		if res.Body != nil {
  6882  			res.Body.Close()
  6883  		}
  6884  		return nil, gensupport.WrapError(&googleapi.Error{
  6885  			Code:   res.StatusCode,
  6886  			Header: res.Header,
  6887  		})
  6888  	}
  6889  	if err != nil {
  6890  		return nil, err
  6891  	}
  6892  	defer googleapi.CloseBody(res)
  6893  	if err := googleapi.CheckResponse(res); err != nil {
  6894  		return nil, gensupport.WrapError(err)
  6895  	}
  6896  	ret := &ResponsePolicyRule{
  6897  		ServerResponse: googleapi.ServerResponse{
  6898  			Header:         res.Header,
  6899  			HTTPStatusCode: res.StatusCode,
  6900  		},
  6901  	}
  6902  	target := &ret
  6903  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6904  		return nil, err
  6905  	}
  6906  	return ret, nil
  6907  }
  6908  
  6909  type ResponsePolicyRulesDeleteCall struct {
  6910  	s                  *Service
  6911  	project            string
  6912  	responsePolicy     string
  6913  	responsePolicyRule string
  6914  	urlParams_         gensupport.URLParams
  6915  	ctx_               context.Context
  6916  	header_            http.Header
  6917  }
  6918  
  6919  // Delete: Deletes a previously created Response Policy Rule.
  6920  //
  6921  //   - project: Identifies the project addressed by this request.
  6922  //   - responsePolicy: User assigned name of the Response Policy containing the
  6923  //     Response Policy Rule.
  6924  //   - responsePolicyRule: User assigned name of the Response Policy Rule
  6925  //     addressed by this request.
  6926  func (r *ResponsePolicyRulesService) Delete(project string, responsePolicy string, responsePolicyRule string) *ResponsePolicyRulesDeleteCall {
  6927  	c := &ResponsePolicyRulesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6928  	c.project = project
  6929  	c.responsePolicy = responsePolicy
  6930  	c.responsePolicyRule = responsePolicyRule
  6931  	return c
  6932  }
  6933  
  6934  // ClientOperationId sets the optional parameter "clientOperationId": For
  6935  // mutating operation requests only. An optional identifier specified by the
  6936  // client. Must be unique for operation resources in the Operations collection.
  6937  func (c *ResponsePolicyRulesDeleteCall) ClientOperationId(clientOperationId string) *ResponsePolicyRulesDeleteCall {
  6938  	c.urlParams_.Set("clientOperationId", clientOperationId)
  6939  	return c
  6940  }
  6941  
  6942  // Fields allows partial responses to be retrieved. See
  6943  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6944  // details.
  6945  func (c *ResponsePolicyRulesDeleteCall) Fields(s ...googleapi.Field) *ResponsePolicyRulesDeleteCall {
  6946  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6947  	return c
  6948  }
  6949  
  6950  // Context sets the context to be used in this call's Do method.
  6951  func (c *ResponsePolicyRulesDeleteCall) Context(ctx context.Context) *ResponsePolicyRulesDeleteCall {
  6952  	c.ctx_ = ctx
  6953  	return c
  6954  }
  6955  
  6956  // Header returns a http.Header that can be modified by the caller to add
  6957  // headers to the request.
  6958  func (c *ResponsePolicyRulesDeleteCall) Header() http.Header {
  6959  	if c.header_ == nil {
  6960  		c.header_ = make(http.Header)
  6961  	}
  6962  	return c.header_
  6963  }
  6964  
  6965  func (c *ResponsePolicyRulesDeleteCall) doRequest(alt string) (*http.Response, error) {
  6966  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6967  	var body io.Reader = nil
  6968  	c.urlParams_.Set("alt", alt)
  6969  	c.urlParams_.Set("prettyPrint", "false")
  6970  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/responsePolicies/{responsePolicy}/rules/{responsePolicyRule}")
  6971  	urls += "?" + c.urlParams_.Encode()
  6972  	req, err := http.NewRequest("DELETE", urls, body)
  6973  	if err != nil {
  6974  		return nil, err
  6975  	}
  6976  	req.Header = reqHeaders
  6977  	googleapi.Expand(req.URL, map[string]string{
  6978  		"project":            c.project,
  6979  		"responsePolicy":     c.responsePolicy,
  6980  		"responsePolicyRule": c.responsePolicyRule,
  6981  	})
  6982  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6983  }
  6984  
  6985  // Do executes the "dns.responsePolicyRules.delete" call.
  6986  func (c *ResponsePolicyRulesDeleteCall) Do(opts ...googleapi.CallOption) error {
  6987  	gensupport.SetOptions(c.urlParams_, opts...)
  6988  	res, err := c.doRequest("json")
  6989  	if err != nil {
  6990  		return err
  6991  	}
  6992  	defer googleapi.CloseBody(res)
  6993  	if err := googleapi.CheckResponse(res); err != nil {
  6994  		return gensupport.WrapError(err)
  6995  	}
  6996  	return nil
  6997  }
  6998  
  6999  type ResponsePolicyRulesGetCall struct {
  7000  	s                  *Service
  7001  	project            string
  7002  	responsePolicy     string
  7003  	responsePolicyRule string
  7004  	urlParams_         gensupport.URLParams
  7005  	ifNoneMatch_       string
  7006  	ctx_               context.Context
  7007  	header_            http.Header
  7008  }
  7009  
  7010  // Get: Fetches the representation of an existing Response Policy Rule.
  7011  //
  7012  //   - project: Identifies the project addressed by this request.
  7013  //   - responsePolicy: User assigned name of the Response Policy containing the
  7014  //     Response Policy Rule.
  7015  //   - responsePolicyRule: User assigned name of the Response Policy Rule
  7016  //     addressed by this request.
  7017  func (r *ResponsePolicyRulesService) Get(project string, responsePolicy string, responsePolicyRule string) *ResponsePolicyRulesGetCall {
  7018  	c := &ResponsePolicyRulesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7019  	c.project = project
  7020  	c.responsePolicy = responsePolicy
  7021  	c.responsePolicyRule = responsePolicyRule
  7022  	return c
  7023  }
  7024  
  7025  // ClientOperationId sets the optional parameter "clientOperationId": For
  7026  // mutating operation requests only. An optional identifier specified by the
  7027  // client. Must be unique for operation resources in the Operations collection.
  7028  func (c *ResponsePolicyRulesGetCall) ClientOperationId(clientOperationId string) *ResponsePolicyRulesGetCall {
  7029  	c.urlParams_.Set("clientOperationId", clientOperationId)
  7030  	return c
  7031  }
  7032  
  7033  // Fields allows partial responses to be retrieved. See
  7034  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7035  // details.
  7036  func (c *ResponsePolicyRulesGetCall) Fields(s ...googleapi.Field) *ResponsePolicyRulesGetCall {
  7037  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7038  	return c
  7039  }
  7040  
  7041  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  7042  // object's ETag matches the given value. This is useful for getting updates
  7043  // only after the object has changed since the last request.
  7044  func (c *ResponsePolicyRulesGetCall) IfNoneMatch(entityTag string) *ResponsePolicyRulesGetCall {
  7045  	c.ifNoneMatch_ = entityTag
  7046  	return c
  7047  }
  7048  
  7049  // Context sets the context to be used in this call's Do method.
  7050  func (c *ResponsePolicyRulesGetCall) Context(ctx context.Context) *ResponsePolicyRulesGetCall {
  7051  	c.ctx_ = ctx
  7052  	return c
  7053  }
  7054  
  7055  // Header returns a http.Header that can be modified by the caller to add
  7056  // headers to the request.
  7057  func (c *ResponsePolicyRulesGetCall) Header() http.Header {
  7058  	if c.header_ == nil {
  7059  		c.header_ = make(http.Header)
  7060  	}
  7061  	return c.header_
  7062  }
  7063  
  7064  func (c *ResponsePolicyRulesGetCall) doRequest(alt string) (*http.Response, error) {
  7065  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  7066  	if c.ifNoneMatch_ != "" {
  7067  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7068  	}
  7069  	var body io.Reader = nil
  7070  	c.urlParams_.Set("alt", alt)
  7071  	c.urlParams_.Set("prettyPrint", "false")
  7072  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/responsePolicies/{responsePolicy}/rules/{responsePolicyRule}")
  7073  	urls += "?" + c.urlParams_.Encode()
  7074  	req, err := http.NewRequest("GET", urls, body)
  7075  	if err != nil {
  7076  		return nil, err
  7077  	}
  7078  	req.Header = reqHeaders
  7079  	googleapi.Expand(req.URL, map[string]string{
  7080  		"project":            c.project,
  7081  		"responsePolicy":     c.responsePolicy,
  7082  		"responsePolicyRule": c.responsePolicyRule,
  7083  	})
  7084  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7085  }
  7086  
  7087  // Do executes the "dns.responsePolicyRules.get" call.
  7088  // Any non-2xx status code is an error. Response headers are in either
  7089  // *ResponsePolicyRule.ServerResponse.Header or (if a response was returned at
  7090  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  7091  // check whether the returned error was because http.StatusNotModified was
  7092  // returned.
  7093  func (c *ResponsePolicyRulesGetCall) Do(opts ...googleapi.CallOption) (*ResponsePolicyRule, error) {
  7094  	gensupport.SetOptions(c.urlParams_, opts...)
  7095  	res, err := c.doRequest("json")
  7096  	if res != nil && res.StatusCode == http.StatusNotModified {
  7097  		if res.Body != nil {
  7098  			res.Body.Close()
  7099  		}
  7100  		return nil, gensupport.WrapError(&googleapi.Error{
  7101  			Code:   res.StatusCode,
  7102  			Header: res.Header,
  7103  		})
  7104  	}
  7105  	if err != nil {
  7106  		return nil, err
  7107  	}
  7108  	defer googleapi.CloseBody(res)
  7109  	if err := googleapi.CheckResponse(res); err != nil {
  7110  		return nil, gensupport.WrapError(err)
  7111  	}
  7112  	ret := &ResponsePolicyRule{
  7113  		ServerResponse: googleapi.ServerResponse{
  7114  			Header:         res.Header,
  7115  			HTTPStatusCode: res.StatusCode,
  7116  		},
  7117  	}
  7118  	target := &ret
  7119  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7120  		return nil, err
  7121  	}
  7122  	return ret, nil
  7123  }
  7124  
  7125  type ResponsePolicyRulesListCall struct {
  7126  	s              *Service
  7127  	project        string
  7128  	responsePolicy string
  7129  	urlParams_     gensupport.URLParams
  7130  	ifNoneMatch_   string
  7131  	ctx_           context.Context
  7132  	header_        http.Header
  7133  }
  7134  
  7135  // List: Enumerates all Response Policy Rules associated with a project.
  7136  //
  7137  // - project: Identifies the project addressed by this request.
  7138  // - responsePolicy: User assigned name of the Response Policy to list.
  7139  func (r *ResponsePolicyRulesService) List(project string, responsePolicy string) *ResponsePolicyRulesListCall {
  7140  	c := &ResponsePolicyRulesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7141  	c.project = project
  7142  	c.responsePolicy = responsePolicy
  7143  	return c
  7144  }
  7145  
  7146  // MaxResults sets the optional parameter "maxResults": Maximum number of
  7147  // results to be returned. If unspecified, the server decides how many results
  7148  // to return.
  7149  func (c *ResponsePolicyRulesListCall) MaxResults(maxResults int64) *ResponsePolicyRulesListCall {
  7150  	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  7151  	return c
  7152  }
  7153  
  7154  // PageToken sets the optional parameter "pageToken": A tag returned by a
  7155  // previous list request that was truncated. Use this parameter to continue a
  7156  // previous list request.
  7157  func (c *ResponsePolicyRulesListCall) PageToken(pageToken string) *ResponsePolicyRulesListCall {
  7158  	c.urlParams_.Set("pageToken", pageToken)
  7159  	return c
  7160  }
  7161  
  7162  // Fields allows partial responses to be retrieved. See
  7163  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7164  // details.
  7165  func (c *ResponsePolicyRulesListCall) Fields(s ...googleapi.Field) *ResponsePolicyRulesListCall {
  7166  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7167  	return c
  7168  }
  7169  
  7170  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  7171  // object's ETag matches the given value. This is useful for getting updates
  7172  // only after the object has changed since the last request.
  7173  func (c *ResponsePolicyRulesListCall) IfNoneMatch(entityTag string) *ResponsePolicyRulesListCall {
  7174  	c.ifNoneMatch_ = entityTag
  7175  	return c
  7176  }
  7177  
  7178  // Context sets the context to be used in this call's Do method.
  7179  func (c *ResponsePolicyRulesListCall) Context(ctx context.Context) *ResponsePolicyRulesListCall {
  7180  	c.ctx_ = ctx
  7181  	return c
  7182  }
  7183  
  7184  // Header returns a http.Header that can be modified by the caller to add
  7185  // headers to the request.
  7186  func (c *ResponsePolicyRulesListCall) Header() http.Header {
  7187  	if c.header_ == nil {
  7188  		c.header_ = make(http.Header)
  7189  	}
  7190  	return c.header_
  7191  }
  7192  
  7193  func (c *ResponsePolicyRulesListCall) doRequest(alt string) (*http.Response, error) {
  7194  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  7195  	if c.ifNoneMatch_ != "" {
  7196  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7197  	}
  7198  	var body io.Reader = nil
  7199  	c.urlParams_.Set("alt", alt)
  7200  	c.urlParams_.Set("prettyPrint", "false")
  7201  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/responsePolicies/{responsePolicy}/rules")
  7202  	urls += "?" + c.urlParams_.Encode()
  7203  	req, err := http.NewRequest("GET", urls, body)
  7204  	if err != nil {
  7205  		return nil, err
  7206  	}
  7207  	req.Header = reqHeaders
  7208  	googleapi.Expand(req.URL, map[string]string{
  7209  		"project":        c.project,
  7210  		"responsePolicy": c.responsePolicy,
  7211  	})
  7212  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7213  }
  7214  
  7215  // Do executes the "dns.responsePolicyRules.list" call.
  7216  // Any non-2xx status code is an error. Response headers are in either
  7217  // *ResponsePolicyRulesListResponse.ServerResponse.Header or (if a response was
  7218  // returned at all) in error.(*googleapi.Error).Header. Use
  7219  // googleapi.IsNotModified to check whether the returned error was because
  7220  // http.StatusNotModified was returned.
  7221  func (c *ResponsePolicyRulesListCall) Do(opts ...googleapi.CallOption) (*ResponsePolicyRulesListResponse, error) {
  7222  	gensupport.SetOptions(c.urlParams_, opts...)
  7223  	res, err := c.doRequest("json")
  7224  	if res != nil && res.StatusCode == http.StatusNotModified {
  7225  		if res.Body != nil {
  7226  			res.Body.Close()
  7227  		}
  7228  		return nil, gensupport.WrapError(&googleapi.Error{
  7229  			Code:   res.StatusCode,
  7230  			Header: res.Header,
  7231  		})
  7232  	}
  7233  	if err != nil {
  7234  		return nil, err
  7235  	}
  7236  	defer googleapi.CloseBody(res)
  7237  	if err := googleapi.CheckResponse(res); err != nil {
  7238  		return nil, gensupport.WrapError(err)
  7239  	}
  7240  	ret := &ResponsePolicyRulesListResponse{
  7241  		ServerResponse: googleapi.ServerResponse{
  7242  			Header:         res.Header,
  7243  			HTTPStatusCode: res.StatusCode,
  7244  		},
  7245  	}
  7246  	target := &ret
  7247  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7248  		return nil, err
  7249  	}
  7250  	return ret, nil
  7251  }
  7252  
  7253  // Pages invokes f for each page of results.
  7254  // A non-nil error returned from f will halt the iteration.
  7255  // The provided context supersedes any context provided to the Context method.
  7256  func (c *ResponsePolicyRulesListCall) Pages(ctx context.Context, f func(*ResponsePolicyRulesListResponse) error) error {
  7257  	c.ctx_ = ctx
  7258  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  7259  	for {
  7260  		x, err := c.Do()
  7261  		if err != nil {
  7262  			return err
  7263  		}
  7264  		if err := f(x); err != nil {
  7265  			return err
  7266  		}
  7267  		if x.NextPageToken == "" {
  7268  			return nil
  7269  		}
  7270  		c.PageToken(x.NextPageToken)
  7271  	}
  7272  }
  7273  
  7274  type ResponsePolicyRulesPatchCall struct {
  7275  	s                  *Service
  7276  	project            string
  7277  	responsePolicy     string
  7278  	responsePolicyRule string
  7279  	responsepolicyrule *ResponsePolicyRule
  7280  	urlParams_         gensupport.URLParams
  7281  	ctx_               context.Context
  7282  	header_            http.Header
  7283  }
  7284  
  7285  // Patch: Applies a partial update to an existing Response Policy Rule.
  7286  //
  7287  //   - project: Identifies the project addressed by this request.
  7288  //   - responsePolicy: User assigned name of the Response Policy containing the
  7289  //     Response Policy Rule.
  7290  //   - responsePolicyRule: User assigned name of the Response Policy Rule
  7291  //     addressed by this request.
  7292  func (r *ResponsePolicyRulesService) Patch(project string, responsePolicy string, responsePolicyRule string, responsepolicyrule *ResponsePolicyRule) *ResponsePolicyRulesPatchCall {
  7293  	c := &ResponsePolicyRulesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7294  	c.project = project
  7295  	c.responsePolicy = responsePolicy
  7296  	c.responsePolicyRule = responsePolicyRule
  7297  	c.responsepolicyrule = responsepolicyrule
  7298  	return c
  7299  }
  7300  
  7301  // ClientOperationId sets the optional parameter "clientOperationId": For
  7302  // mutating operation requests only. An optional identifier specified by the
  7303  // client. Must be unique for operation resources in the Operations collection.
  7304  func (c *ResponsePolicyRulesPatchCall) ClientOperationId(clientOperationId string) *ResponsePolicyRulesPatchCall {
  7305  	c.urlParams_.Set("clientOperationId", clientOperationId)
  7306  	return c
  7307  }
  7308  
  7309  // Fields allows partial responses to be retrieved. See
  7310  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7311  // details.
  7312  func (c *ResponsePolicyRulesPatchCall) Fields(s ...googleapi.Field) *ResponsePolicyRulesPatchCall {
  7313  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7314  	return c
  7315  }
  7316  
  7317  // Context sets the context to be used in this call's Do method.
  7318  func (c *ResponsePolicyRulesPatchCall) Context(ctx context.Context) *ResponsePolicyRulesPatchCall {
  7319  	c.ctx_ = ctx
  7320  	return c
  7321  }
  7322  
  7323  // Header returns a http.Header that can be modified by the caller to add
  7324  // headers to the request.
  7325  func (c *ResponsePolicyRulesPatchCall) Header() http.Header {
  7326  	if c.header_ == nil {
  7327  		c.header_ = make(http.Header)
  7328  	}
  7329  	return c.header_
  7330  }
  7331  
  7332  func (c *ResponsePolicyRulesPatchCall) doRequest(alt string) (*http.Response, error) {
  7333  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  7334  	var body io.Reader = nil
  7335  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.responsepolicyrule)
  7336  	if err != nil {
  7337  		return nil, err
  7338  	}
  7339  	c.urlParams_.Set("alt", alt)
  7340  	c.urlParams_.Set("prettyPrint", "false")
  7341  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/responsePolicies/{responsePolicy}/rules/{responsePolicyRule}")
  7342  	urls += "?" + c.urlParams_.Encode()
  7343  	req, err := http.NewRequest("PATCH", urls, body)
  7344  	if err != nil {
  7345  		return nil, err
  7346  	}
  7347  	req.Header = reqHeaders
  7348  	googleapi.Expand(req.URL, map[string]string{
  7349  		"project":            c.project,
  7350  		"responsePolicy":     c.responsePolicy,
  7351  		"responsePolicyRule": c.responsePolicyRule,
  7352  	})
  7353  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7354  }
  7355  
  7356  // Do executes the "dns.responsePolicyRules.patch" call.
  7357  // Any non-2xx status code is an error. Response headers are in either
  7358  // *ResponsePolicyRulesPatchResponse.ServerResponse.Header or (if a response
  7359  // was returned at all) in error.(*googleapi.Error).Header. Use
  7360  // googleapi.IsNotModified to check whether the returned error was because
  7361  // http.StatusNotModified was returned.
  7362  func (c *ResponsePolicyRulesPatchCall) Do(opts ...googleapi.CallOption) (*ResponsePolicyRulesPatchResponse, error) {
  7363  	gensupport.SetOptions(c.urlParams_, opts...)
  7364  	res, err := c.doRequest("json")
  7365  	if res != nil && res.StatusCode == http.StatusNotModified {
  7366  		if res.Body != nil {
  7367  			res.Body.Close()
  7368  		}
  7369  		return nil, gensupport.WrapError(&googleapi.Error{
  7370  			Code:   res.StatusCode,
  7371  			Header: res.Header,
  7372  		})
  7373  	}
  7374  	if err != nil {
  7375  		return nil, err
  7376  	}
  7377  	defer googleapi.CloseBody(res)
  7378  	if err := googleapi.CheckResponse(res); err != nil {
  7379  		return nil, gensupport.WrapError(err)
  7380  	}
  7381  	ret := &ResponsePolicyRulesPatchResponse{
  7382  		ServerResponse: googleapi.ServerResponse{
  7383  			Header:         res.Header,
  7384  			HTTPStatusCode: res.StatusCode,
  7385  		},
  7386  	}
  7387  	target := &ret
  7388  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7389  		return nil, err
  7390  	}
  7391  	return ret, nil
  7392  }
  7393  
  7394  type ResponsePolicyRulesUpdateCall struct {
  7395  	s                  *Service
  7396  	project            string
  7397  	responsePolicy     string
  7398  	responsePolicyRule string
  7399  	responsepolicyrule *ResponsePolicyRule
  7400  	urlParams_         gensupport.URLParams
  7401  	ctx_               context.Context
  7402  	header_            http.Header
  7403  }
  7404  
  7405  // Update: Updates an existing Response Policy Rule.
  7406  //
  7407  //   - project: Identifies the project addressed by this request.
  7408  //   - responsePolicy: User assigned name of the Response Policy containing the
  7409  //     Response Policy Rule.
  7410  //   - responsePolicyRule: User assigned name of the Response Policy Rule
  7411  //     addressed by this request.
  7412  func (r *ResponsePolicyRulesService) Update(project string, responsePolicy string, responsePolicyRule string, responsepolicyrule *ResponsePolicyRule) *ResponsePolicyRulesUpdateCall {
  7413  	c := &ResponsePolicyRulesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7414  	c.project = project
  7415  	c.responsePolicy = responsePolicy
  7416  	c.responsePolicyRule = responsePolicyRule
  7417  	c.responsepolicyrule = responsepolicyrule
  7418  	return c
  7419  }
  7420  
  7421  // ClientOperationId sets the optional parameter "clientOperationId": For
  7422  // mutating operation requests only. An optional identifier specified by the
  7423  // client. Must be unique for operation resources in the Operations collection.
  7424  func (c *ResponsePolicyRulesUpdateCall) ClientOperationId(clientOperationId string) *ResponsePolicyRulesUpdateCall {
  7425  	c.urlParams_.Set("clientOperationId", clientOperationId)
  7426  	return c
  7427  }
  7428  
  7429  // Fields allows partial responses to be retrieved. See
  7430  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7431  // details.
  7432  func (c *ResponsePolicyRulesUpdateCall) Fields(s ...googleapi.Field) *ResponsePolicyRulesUpdateCall {
  7433  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7434  	return c
  7435  }
  7436  
  7437  // Context sets the context to be used in this call's Do method.
  7438  func (c *ResponsePolicyRulesUpdateCall) Context(ctx context.Context) *ResponsePolicyRulesUpdateCall {
  7439  	c.ctx_ = ctx
  7440  	return c
  7441  }
  7442  
  7443  // Header returns a http.Header that can be modified by the caller to add
  7444  // headers to the request.
  7445  func (c *ResponsePolicyRulesUpdateCall) Header() http.Header {
  7446  	if c.header_ == nil {
  7447  		c.header_ = make(http.Header)
  7448  	}
  7449  	return c.header_
  7450  }
  7451  
  7452  func (c *ResponsePolicyRulesUpdateCall) doRequest(alt string) (*http.Response, error) {
  7453  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  7454  	var body io.Reader = nil
  7455  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.responsepolicyrule)
  7456  	if err != nil {
  7457  		return nil, err
  7458  	}
  7459  	c.urlParams_.Set("alt", alt)
  7460  	c.urlParams_.Set("prettyPrint", "false")
  7461  	urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/responsePolicies/{responsePolicy}/rules/{responsePolicyRule}")
  7462  	urls += "?" + c.urlParams_.Encode()
  7463  	req, err := http.NewRequest("PUT", urls, body)
  7464  	if err != nil {
  7465  		return nil, err
  7466  	}
  7467  	req.Header = reqHeaders
  7468  	googleapi.Expand(req.URL, map[string]string{
  7469  		"project":            c.project,
  7470  		"responsePolicy":     c.responsePolicy,
  7471  		"responsePolicyRule": c.responsePolicyRule,
  7472  	})
  7473  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7474  }
  7475  
  7476  // Do executes the "dns.responsePolicyRules.update" call.
  7477  // Any non-2xx status code is an error. Response headers are in either
  7478  // *ResponsePolicyRulesUpdateResponse.ServerResponse.Header or (if a response
  7479  // was returned at all) in error.(*googleapi.Error).Header. Use
  7480  // googleapi.IsNotModified to check whether the returned error was because
  7481  // http.StatusNotModified was returned.
  7482  func (c *ResponsePolicyRulesUpdateCall) Do(opts ...googleapi.CallOption) (*ResponsePolicyRulesUpdateResponse, error) {
  7483  	gensupport.SetOptions(c.urlParams_, opts...)
  7484  	res, err := c.doRequest("json")
  7485  	if res != nil && res.StatusCode == http.StatusNotModified {
  7486  		if res.Body != nil {
  7487  			res.Body.Close()
  7488  		}
  7489  		return nil, gensupport.WrapError(&googleapi.Error{
  7490  			Code:   res.StatusCode,
  7491  			Header: res.Header,
  7492  		})
  7493  	}
  7494  	if err != nil {
  7495  		return nil, err
  7496  	}
  7497  	defer googleapi.CloseBody(res)
  7498  	if err := googleapi.CheckResponse(res); err != nil {
  7499  		return nil, gensupport.WrapError(err)
  7500  	}
  7501  	ret := &ResponsePolicyRulesUpdateResponse{
  7502  		ServerResponse: googleapi.ServerResponse{
  7503  			Header:         res.Header,
  7504  			HTTPStatusCode: res.StatusCode,
  7505  		},
  7506  	}
  7507  	target := &ret
  7508  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7509  		return nil, err
  7510  	}
  7511  	return ret, nil
  7512  }
  7513  

View as plain text