dns-gen.go raw

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