...

Source file src/google.golang.org/api/domains/v1alpha2/domains-gen.go

Documentation: google.golang.org/api/domains/v1alpha2

     1  // Copyright 2024 Google LLC.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  // Code generated file. DO NOT EDIT.
     6  
     7  // Package domains provides access to the Cloud Domains API.
     8  //
     9  // For product documentation, see: https://cloud.google.com/domains/
    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/domains/v1alpha2"
    27  //	...
    28  //	ctx := context.Background()
    29  //	domainsService, err := domains.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  // To use an API key for authentication (note: some APIs do not support API
    38  // keys), use [google.golang.org/api/option.WithAPIKey]:
    39  //
    40  //	domainsService, err := domains.NewService(ctx, option.WithAPIKey("AIza..."))
    41  //
    42  // To use an OAuth token (e.g., a user token obtained via a three-legged OAuth
    43  // flow, use [google.golang.org/api/option.WithTokenSource]:
    44  //
    45  //	config := &oauth2.Config{...}
    46  //	// ...
    47  //	token, err := config.Exchange(ctx, ...)
    48  //	domainsService, err := domains.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
    49  //
    50  // See [google.golang.org/api/option.ClientOption] for details on options.
    51  package domains // import "google.golang.org/api/domains/v1alpha2"
    52  
    53  import (
    54  	"bytes"
    55  	"context"
    56  	"encoding/json"
    57  	"errors"
    58  	"fmt"
    59  	"io"
    60  	"net/http"
    61  	"net/url"
    62  	"strconv"
    63  	"strings"
    64  
    65  	googleapi "google.golang.org/api/googleapi"
    66  	internal "google.golang.org/api/internal"
    67  	gensupport "google.golang.org/api/internal/gensupport"
    68  	option "google.golang.org/api/option"
    69  	internaloption "google.golang.org/api/option/internaloption"
    70  	htransport "google.golang.org/api/transport/http"
    71  )
    72  
    73  // Always reference these packages, just in case the auto-generated code
    74  // below doesn't.
    75  var _ = bytes.NewBuffer
    76  var _ = strconv.Itoa
    77  var _ = fmt.Sprintf
    78  var _ = json.NewDecoder
    79  var _ = io.Copy
    80  var _ = url.Parse
    81  var _ = gensupport.MarshalJSON
    82  var _ = googleapi.Version
    83  var _ = errors.New
    84  var _ = strings.Replace
    85  var _ = context.Canceled
    86  var _ = internaloption.WithDefaultEndpoint
    87  var _ = internal.Version
    88  
    89  const apiId = "domains:v1alpha2"
    90  const apiName = "domains"
    91  const apiVersion = "v1alpha2"
    92  const basePath = "https://domains.googleapis.com/"
    93  const basePathTemplate = "https://domains.UNIVERSE_DOMAIN/"
    94  const mtlsBasePath = "https://domains.mtls.googleapis.com/"
    95  
    96  // OAuth2 scopes used by this API.
    97  const (
    98  	// See, edit, configure, and delete your Google Cloud data and see the email
    99  	// address for your Google Account.
   100  	CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
   101  )
   102  
   103  // NewService creates a new Service.
   104  func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
   105  	scopesOption := internaloption.WithDefaultScopes(
   106  		"https://www.googleapis.com/auth/cloud-platform",
   107  	)
   108  	// NOTE: prepend, so we don't override user-specified scopes.
   109  	opts = append([]option.ClientOption{scopesOption}, opts...)
   110  	opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
   111  	opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate))
   112  	opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
   113  	opts = append(opts, internaloption.EnableNewAuthLibrary())
   114  	client, endpoint, err := htransport.NewClient(ctx, opts...)
   115  	if err != nil {
   116  		return nil, err
   117  	}
   118  	s, err := New(client)
   119  	if err != nil {
   120  		return nil, err
   121  	}
   122  	if endpoint != "" {
   123  		s.BasePath = endpoint
   124  	}
   125  	return s, nil
   126  }
   127  
   128  // New creates a new Service. It uses the provided http.Client for requests.
   129  //
   130  // Deprecated: please use NewService instead.
   131  // To provide a custom HTTP client, use option.WithHTTPClient.
   132  // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
   133  func New(client *http.Client) (*Service, error) {
   134  	if client == nil {
   135  		return nil, errors.New("client is nil")
   136  	}
   137  	s := &Service{client: client, BasePath: basePath}
   138  	s.Projects = NewProjectsService(s)
   139  	return s, nil
   140  }
   141  
   142  type Service struct {
   143  	client    *http.Client
   144  	BasePath  string // API endpoint base URL
   145  	UserAgent string // optional additional User-Agent fragment
   146  
   147  	Projects *ProjectsService
   148  }
   149  
   150  func (s *Service) userAgent() string {
   151  	if s.UserAgent == "" {
   152  		return googleapi.UserAgent
   153  	}
   154  	return googleapi.UserAgent + " " + s.UserAgent
   155  }
   156  
   157  func NewProjectsService(s *Service) *ProjectsService {
   158  	rs := &ProjectsService{s: s}
   159  	rs.Locations = NewProjectsLocationsService(s)
   160  	return rs
   161  }
   162  
   163  type ProjectsService struct {
   164  	s *Service
   165  
   166  	Locations *ProjectsLocationsService
   167  }
   168  
   169  func NewProjectsLocationsService(s *Service) *ProjectsLocationsService {
   170  	rs := &ProjectsLocationsService{s: s}
   171  	rs.Operations = NewProjectsLocationsOperationsService(s)
   172  	rs.Registrations = NewProjectsLocationsRegistrationsService(s)
   173  	return rs
   174  }
   175  
   176  type ProjectsLocationsService struct {
   177  	s *Service
   178  
   179  	Operations *ProjectsLocationsOperationsService
   180  
   181  	Registrations *ProjectsLocationsRegistrationsService
   182  }
   183  
   184  func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService {
   185  	rs := &ProjectsLocationsOperationsService{s: s}
   186  	return rs
   187  }
   188  
   189  type ProjectsLocationsOperationsService struct {
   190  	s *Service
   191  }
   192  
   193  func NewProjectsLocationsRegistrationsService(s *Service) *ProjectsLocationsRegistrationsService {
   194  	rs := &ProjectsLocationsRegistrationsService{s: s}
   195  	return rs
   196  }
   197  
   198  type ProjectsLocationsRegistrationsService struct {
   199  	s *Service
   200  }
   201  
   202  // AuditConfig: Specifies the audit configuration for a service. The
   203  // configuration determines which permission types are logged, and what
   204  // identities, if any, are exempted from logging. An AuditConfig must have one
   205  // or more AuditLogConfigs. If there are AuditConfigs for both `allServices`
   206  // and a specific service, the union of the two AuditConfigs is used for that
   207  // service: the log_types specified in each AuditConfig are enabled, and the
   208  // exempted_members in each AuditLogConfig are exempted. Example Policy with
   209  // multiple AuditConfigs: { "audit_configs": [ { "service": "allServices",
   210  // "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [
   211  // "user:jose@example.com" ] }, { "log_type": "DATA_WRITE" }, { "log_type":
   212  // "ADMIN_READ" } ] }, { "service": "sampleservice.googleapis.com",
   213  // "audit_log_configs": [ { "log_type": "DATA_READ" }, { "log_type":
   214  // "DATA_WRITE", "exempted_members": [ "user:aliya@example.com" ] } ] } ] } For
   215  // sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ
   216  // logging. It also exempts `jose@example.com` from DATA_READ logging, and
   217  // `aliya@example.com` from DATA_WRITE logging.
   218  type AuditConfig struct {
   219  	// AuditLogConfigs: The configuration for logging of each type of permission.
   220  	AuditLogConfigs []*AuditLogConfig `json:"auditLogConfigs,omitempty"`
   221  	// Service: Specifies a service that will be enabled for audit logging. For
   222  	// example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices`
   223  	// is a special value that covers all services.
   224  	Service string `json:"service,omitempty"`
   225  	// ForceSendFields is a list of field names (e.g. "AuditLogConfigs") to
   226  	// unconditionally include in API requests. By default, fields with empty or
   227  	// default values are omitted from API requests. See
   228  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   229  	// details.
   230  	ForceSendFields []string `json:"-"`
   231  	// NullFields is a list of field names (e.g. "AuditLogConfigs") to include in
   232  	// API requests with the JSON null value. By default, fields with empty values
   233  	// are omitted from API requests. See
   234  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   235  	NullFields []string `json:"-"`
   236  }
   237  
   238  func (s *AuditConfig) MarshalJSON() ([]byte, error) {
   239  	type NoMethod AuditConfig
   240  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   241  }
   242  
   243  // AuditLogConfig: Provides the configuration for logging a type of
   244  // permissions. Example: { "audit_log_configs": [ { "log_type": "DATA_READ",
   245  // "exempted_members": [ "user:jose@example.com" ] }, { "log_type":
   246  // "DATA_WRITE" } ] } This enables 'DATA_READ' and 'DATA_WRITE' logging, while
   247  // exempting jose@example.com from DATA_READ logging.
   248  type AuditLogConfig struct {
   249  	// ExemptedMembers: Specifies the identities that do not cause logging for this
   250  	// type of permission. Follows the same format of Binding.members.
   251  	ExemptedMembers []string `json:"exemptedMembers,omitempty"`
   252  	// LogType: The log type that this config enables.
   253  	//
   254  	// Possible values:
   255  	//   "LOG_TYPE_UNSPECIFIED" - Default case. Should never be this.
   256  	//   "ADMIN_READ" - Admin reads. Example: CloudIAM getIamPolicy
   257  	//   "DATA_WRITE" - Data writes. Example: CloudSQL Users create
   258  	//   "DATA_READ" - Data reads. Example: CloudSQL Users list
   259  	LogType string `json:"logType,omitempty"`
   260  	// ForceSendFields is a list of field names (e.g. "ExemptedMembers") to
   261  	// unconditionally include in API requests. By default, fields with empty or
   262  	// default values are omitted from API requests. See
   263  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   264  	// details.
   265  	ForceSendFields []string `json:"-"`
   266  	// NullFields is a list of field names (e.g. "ExemptedMembers") to include in
   267  	// API requests with the JSON null value. By default, fields with empty values
   268  	// are omitted from API requests. See
   269  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   270  	NullFields []string `json:"-"`
   271  }
   272  
   273  func (s *AuditLogConfig) MarshalJSON() ([]byte, error) {
   274  	type NoMethod AuditLogConfig
   275  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   276  }
   277  
   278  // AuthorizationCode: Defines an authorization code.
   279  type AuthorizationCode struct {
   280  	// Code: The Authorization Code in ASCII. It can be used to transfer the domain
   281  	// to or from another registrar.
   282  	Code string `json:"code,omitempty"`
   283  
   284  	// ServerResponse contains the HTTP response code and headers from the server.
   285  	googleapi.ServerResponse `json:"-"`
   286  	// ForceSendFields is a list of field names (e.g. "Code") to unconditionally
   287  	// include in API requests. By default, fields with empty or default values are
   288  	// omitted from API requests. See
   289  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   290  	// details.
   291  	ForceSendFields []string `json:"-"`
   292  	// NullFields is a list of field names (e.g. "Code") to include in API requests
   293  	// with the JSON null value. By default, fields with empty values are omitted
   294  	// from API requests. See
   295  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   296  	NullFields []string `json:"-"`
   297  }
   298  
   299  func (s *AuthorizationCode) MarshalJSON() ([]byte, error) {
   300  	type NoMethod AuthorizationCode
   301  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   302  }
   303  
   304  // Binding: Associates `members`, or principals, with a `role`.
   305  type Binding struct {
   306  	// Condition: The condition that is associated with this binding. If the
   307  	// condition evaluates to `true`, then this binding applies to the current
   308  	// request. If the condition evaluates to `false`, then this binding does not
   309  	// apply to the current request. However, a different role binding might grant
   310  	// the same role to one or more of the principals in this binding. To learn
   311  	// which resources support conditions in their IAM policies, see the IAM
   312  	// documentation
   313  	// (https://cloud.google.com/iam/help/conditions/resource-policies).
   314  	Condition *Expr `json:"condition,omitempty"`
   315  	// Members: Specifies the principals requesting access for a Google Cloud
   316  	// resource. `members` can have the following values: * `allUsers`: A special
   317  	// identifier that represents anyone who is on the internet; with or without a
   318  	// Google account. * `allAuthenticatedUsers`: A special identifier that
   319  	// represents anyone who is authenticated with a Google account or a service
   320  	// account. Does not include identities that come from external identity
   321  	// providers (IdPs) through identity federation. * `user:{emailid}`: An email
   322  	// address that represents a specific Google account. For example,
   323  	// `alice@example.com` . * `serviceAccount:{emailid}`: An email address that
   324  	// represents a Google service account. For example,
   325  	// `my-other-app@appspot.gserviceaccount.com`. *
   326  	// `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An
   327  	// identifier for a Kubernetes service account
   328  	// (https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts).
   329  	// For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. *
   330  	// `group:{emailid}`: An email address that represents a Google group. For
   331  	// example, `admins@example.com`. * `domain:{domain}`: The G Suite domain
   332  	// (primary) that represents all the users of that domain. For example,
   333  	// `google.com` or `example.com`. *
   334  	// `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/sub
   335  	// ject/{subject_attribute_value}`: A single identity in a workforce identity
   336  	// pool. *
   337  	// `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/
   338  	// group/{group_id}`: All workforce identities in a group. *
   339  	// `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/
   340  	// attribute.{attribute_name}/{attribute_value}`: All workforce identities with
   341  	// a specific attribute value. *
   342  	// `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/
   343  	// *`: All identities in a workforce identity pool. *
   344  	// `principal://iam.googleapis.com/projects/{project_number}/locations/global/wo
   345  	// rkloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single
   346  	// identity in a workload identity pool. *
   347  	// `principalSet://iam.googleapis.com/projects/{project_number}/locations/global
   348  	// /workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool
   349  	// group. *
   350  	// `principalSet://iam.googleapis.com/projects/{project_number}/locations/global
   351  	// /workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}
   352  	// `: All identities in a workload identity pool with a certain attribute. *
   353  	// `principalSet://iam.googleapis.com/projects/{project_number}/locations/global
   354  	// /workloadIdentityPools/{pool_id}/*`: All identities in a workload identity
   355  	// pool. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus
   356  	// unique identifier) representing a user that has been recently deleted. For
   357  	// example, `alice@example.com?uid=123456789012345678901`. If the user is
   358  	// recovered, this value reverts to `user:{emailid}` and the recovered user
   359  	// retains the role in the binding. *
   360  	// `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
   361  	// unique identifier) representing a service account that has been recently
   362  	// deleted. For example,
   363  	// `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the
   364  	// service account is undeleted, this value reverts to
   365  	// `serviceAccount:{emailid}` and the undeleted service account retains the
   366  	// role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email
   367  	// address (plus unique identifier) representing a Google group that has been
   368  	// recently deleted. For example,
   369  	// `admins@example.com?uid=123456789012345678901`. If the group is recovered,
   370  	// this value reverts to `group:{emailid}` and the recovered group retains the
   371  	// role in the binding. *
   372  	// `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool
   373  	// _id}/subject/{subject_attribute_value}`: Deleted single identity in a
   374  	// workforce identity pool. For example,
   375  	// `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-po
   376  	// ol-id/subject/my-subject-attribute-value`.
   377  	Members []string `json:"members,omitempty"`
   378  	// Role: Role that is assigned to the list of `members`, or principals. For
   379  	// example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview
   380  	// of the IAM roles and permissions, see the IAM documentation
   381  	// (https://cloud.google.com/iam/docs/roles-overview). For a list of the
   382  	// available pre-defined roles, see here
   383  	// (https://cloud.google.com/iam/docs/understanding-roles).
   384  	Role string `json:"role,omitempty"`
   385  	// ForceSendFields is a list of field names (e.g. "Condition") to
   386  	// unconditionally include in API requests. By default, fields with empty or
   387  	// default values are omitted from API requests. See
   388  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   389  	// details.
   390  	ForceSendFields []string `json:"-"`
   391  	// NullFields is a list of field names (e.g. "Condition") to include in API
   392  	// requests with the JSON null value. By default, fields with empty values are
   393  	// omitted from API requests. See
   394  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   395  	NullFields []string `json:"-"`
   396  }
   397  
   398  func (s *Binding) MarshalJSON() ([]byte, error) {
   399  	type NoMethod Binding
   400  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   401  }
   402  
   403  // ConfigureContactSettingsRequest: Request for the `ConfigureContactSettings`
   404  // method.
   405  type ConfigureContactSettingsRequest struct {
   406  	// ContactNotices: The list of contact notices that the caller acknowledges.
   407  	// The notices needed here depend on the values specified in
   408  	// `contact_settings`.
   409  	//
   410  	// Possible values:
   411  	//   "CONTACT_NOTICE_UNSPECIFIED" - The notice is undefined.
   412  	//   "PUBLIC_CONTACT_DATA_ACKNOWLEDGEMENT" - Required when setting the
   413  	// `privacy` field of `ContactSettings` to `PUBLIC_CONTACT_DATA`, which exposes
   414  	// contact data publicly.
   415  	ContactNotices []string `json:"contactNotices,omitempty"`
   416  	// ContactSettings: Fields of the `ContactSettings` to update.
   417  	ContactSettings *ContactSettings `json:"contactSettings,omitempty"`
   418  	// UpdateMask: Required. The field mask describing which fields to update as a
   419  	// comma-separated list. For example, if only the registrant contact is being
   420  	// updated, the `update_mask` is "registrant_contact".
   421  	UpdateMask string `json:"updateMask,omitempty"`
   422  	// ValidateOnly: Validate the request without actually updating the contact
   423  	// settings.
   424  	ValidateOnly bool `json:"validateOnly,omitempty"`
   425  	// ForceSendFields is a list of field names (e.g. "ContactNotices") to
   426  	// unconditionally include in API requests. By default, fields with empty or
   427  	// default values are omitted from API requests. See
   428  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   429  	// details.
   430  	ForceSendFields []string `json:"-"`
   431  	// NullFields is a list of field names (e.g. "ContactNotices") to include in
   432  	// API requests with the JSON null value. By default, fields with empty values
   433  	// are omitted from API requests. See
   434  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   435  	NullFields []string `json:"-"`
   436  }
   437  
   438  func (s *ConfigureContactSettingsRequest) MarshalJSON() ([]byte, error) {
   439  	type NoMethod ConfigureContactSettingsRequest
   440  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   441  }
   442  
   443  // ConfigureDnsSettingsRequest: Request for the `ConfigureDnsSettings` method.
   444  type ConfigureDnsSettingsRequest struct {
   445  	// DnsSettings: Fields of the `DnsSettings` to update.
   446  	DnsSettings *DnsSettings `json:"dnsSettings,omitempty"`
   447  	// UpdateMask: Required. The field mask describing which fields to update as a
   448  	// comma-separated list. For example, if only the name servers are being
   449  	// updated for an existing Custom DNS configuration, the `update_mask` is
   450  	// "custom_dns.name_servers". When changing the DNS provider from one type to
   451  	// another, pass the new provider's field name as part of the field mask. For
   452  	// example, when changing from a Google Domains DNS configuration to a Custom
   453  	// DNS configuration, the `update_mask` is "custom_dns". //
   454  	UpdateMask string `json:"updateMask,omitempty"`
   455  	// ValidateOnly: Validate the request without actually updating the DNS
   456  	// settings.
   457  	ValidateOnly bool `json:"validateOnly,omitempty"`
   458  	// ForceSendFields is a list of field names (e.g. "DnsSettings") to
   459  	// unconditionally include in API requests. By default, fields with empty or
   460  	// default values are omitted from API requests. See
   461  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   462  	// details.
   463  	ForceSendFields []string `json:"-"`
   464  	// NullFields is a list of field names (e.g. "DnsSettings") to include in API
   465  	// requests with the JSON null value. By default, fields with empty values are
   466  	// omitted from API requests. See
   467  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   468  	NullFields []string `json:"-"`
   469  }
   470  
   471  func (s *ConfigureDnsSettingsRequest) MarshalJSON() ([]byte, error) {
   472  	type NoMethod ConfigureDnsSettingsRequest
   473  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   474  }
   475  
   476  // ConfigureManagementSettingsRequest: Request for the
   477  // `ConfigureManagementSettings` method.
   478  type ConfigureManagementSettingsRequest struct {
   479  	// ManagementSettings: Fields of the `ManagementSettings` to update.
   480  	ManagementSettings *ManagementSettings `json:"managementSettings,omitempty"`
   481  	// UpdateMask: Required. The field mask describing which fields to update as a
   482  	// comma-separated list. For example, if only the transfer lock is being
   483  	// updated, the `update_mask` is "transfer_lock_state".
   484  	UpdateMask string `json:"updateMask,omitempty"`
   485  	// ForceSendFields is a list of field names (e.g. "ManagementSettings") to
   486  	// unconditionally include in API requests. By default, fields with empty or
   487  	// default values are omitted from API requests. See
   488  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   489  	// details.
   490  	ForceSendFields []string `json:"-"`
   491  	// NullFields is a list of field names (e.g. "ManagementSettings") to include
   492  	// in API requests with the JSON null value. By default, fields with empty
   493  	// values are omitted from API requests. See
   494  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   495  	NullFields []string `json:"-"`
   496  }
   497  
   498  func (s *ConfigureManagementSettingsRequest) MarshalJSON() ([]byte, error) {
   499  	type NoMethod ConfigureManagementSettingsRequest
   500  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   501  }
   502  
   503  // Contact: Details required for a contact associated with a `Registration`.
   504  type Contact struct {
   505  	// Email: Required. Email address of the contact.
   506  	Email string `json:"email,omitempty"`
   507  	// FaxNumber: Fax number of the contact in international format. For example,
   508  	// "+1-800-555-0123".
   509  	FaxNumber string `json:"faxNumber,omitempty"`
   510  	// PhoneNumber: Required. Phone number of the contact in international format.
   511  	// For example, "+1-800-555-0123".
   512  	PhoneNumber string `json:"phoneNumber,omitempty"`
   513  	// PostalAddress: Required. Postal address of the contact.
   514  	PostalAddress *PostalAddress `json:"postalAddress,omitempty"`
   515  	// ForceSendFields is a list of field names (e.g. "Email") to unconditionally
   516  	// include in API requests. By default, fields with empty or default values are
   517  	// omitted from API requests. See
   518  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   519  	// details.
   520  	ForceSendFields []string `json:"-"`
   521  	// NullFields is a list of field names (e.g. "Email") to include in API
   522  	// requests with the JSON null value. By default, fields with empty values are
   523  	// omitted from API requests. See
   524  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   525  	NullFields []string `json:"-"`
   526  }
   527  
   528  func (s *Contact) MarshalJSON() ([]byte, error) {
   529  	type NoMethod Contact
   530  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   531  }
   532  
   533  // ContactSettings: Defines the contact information associated with a
   534  // `Registration`. ICANN (https://icann.org/) requires all domain names to have
   535  // associated contact information. The `registrant_contact` is considered the
   536  // domain's legal owner, and often the other contacts are identical.
   537  type ContactSettings struct {
   538  	// AdminContact: Required. The administrative contact for the `Registration`.
   539  	AdminContact *Contact `json:"adminContact,omitempty"`
   540  	// Privacy: Required. Privacy setting for the contacts associated with the
   541  	// `Registration`.
   542  	//
   543  	// Possible values:
   544  	//   "CONTACT_PRIVACY_UNSPECIFIED" - The contact privacy settings are
   545  	// undefined.
   546  	//   "PUBLIC_CONTACT_DATA" - All the data from `ContactSettings` is publicly
   547  	// available. When setting this option, you must also provide a
   548  	// `PUBLIC_CONTACT_DATA_ACKNOWLEDGEMENT` in the `contact_notices` field of the
   549  	// request.
   550  	//   "PRIVATE_CONTACT_DATA" - Deprecated: For more information, see [Cloud
   551  	// Domains feature
   552  	// deprecation](https://cloud.google.com/domains/docs/deprecations/feature-depre
   553  	// cations). None of the data from `ContactSettings` is publicly available.
   554  	// Instead, proxy contact data is published for your domain. Email sent to the
   555  	// proxy email address is forwarded to the registrant's email address. Cloud
   556  	// Domains provides this privacy proxy service at no additional cost.
   557  	//   "REDACTED_CONTACT_DATA" - The organization name (if provided) and limited
   558  	// non-identifying data from `ContactSettings` is available to the public (e.g.
   559  	// country and state). The remaining data is marked as `REDACTED FOR PRIVACY`
   560  	// in the WHOIS database. The actual information redacted depends on the
   561  	// domain. For details, see [the registration privacy
   562  	// article](https://support.google.com/domains/answer/3251242).
   563  	Privacy string `json:"privacy,omitempty"`
   564  	// RegistrantContact: Required. The registrant contact for the `Registration`.
   565  	// *Caution: Anyone with access to this email address, phone number, and/or
   566  	// postal address can take control of the domain.* *Warning: For new
   567  	// `Registration`s, the registrant receives an email confirmation that they
   568  	// must complete within 15 days to avoid domain suspension.*
   569  	RegistrantContact *Contact `json:"registrantContact,omitempty"`
   570  	// TechnicalContact: Required. The technical contact for the `Registration`.
   571  	TechnicalContact *Contact `json:"technicalContact,omitempty"`
   572  	// ForceSendFields is a list of field names (e.g. "AdminContact") to
   573  	// unconditionally include in API requests. By default, fields with empty or
   574  	// default values are omitted from API requests. See
   575  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   576  	// details.
   577  	ForceSendFields []string `json:"-"`
   578  	// NullFields is a list of field names (e.g. "AdminContact") to include in API
   579  	// requests with the JSON null value. By default, fields with empty values are
   580  	// omitted from API requests. See
   581  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   582  	NullFields []string `json:"-"`
   583  }
   584  
   585  func (s *ContactSettings) MarshalJSON() ([]byte, error) {
   586  	type NoMethod ContactSettings
   587  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   588  }
   589  
   590  // CustomDns: Configuration for an arbitrary DNS provider.
   591  type CustomDns struct {
   592  	// DsRecords: The list of DS records for this domain, which are used to enable
   593  	// DNSSEC. The domain's DNS provider can provide the values to set here. If
   594  	// this field is empty, DNSSEC is disabled.
   595  	DsRecords []*DsRecord `json:"dsRecords,omitempty"`
   596  	// NameServers: Required. A list of name servers that store the DNS zone for
   597  	// this domain. Each name server is a domain name, with Unicode domain names
   598  	// expressed in Punycode format.
   599  	NameServers []string `json:"nameServers,omitempty"`
   600  	// ForceSendFields is a list of field names (e.g. "DsRecords") to
   601  	// unconditionally include in API requests. By default, fields with empty or
   602  	// default values are omitted from API requests. See
   603  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   604  	// details.
   605  	ForceSendFields []string `json:"-"`
   606  	// NullFields is a list of field names (e.g. "DsRecords") to include in API
   607  	// requests with the JSON null value. By default, fields with empty values are
   608  	// omitted from API requests. See
   609  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   610  	NullFields []string `json:"-"`
   611  }
   612  
   613  func (s *CustomDns) MarshalJSON() ([]byte, error) {
   614  	type NoMethod CustomDns
   615  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   616  }
   617  
   618  // DnsSettings: Defines the DNS configuration of a `Registration`, including
   619  // name servers, DNSSEC, and glue records.
   620  type DnsSettings struct {
   621  	// CustomDns: An arbitrary DNS provider identified by its name servers.
   622  	CustomDns *CustomDns `json:"customDns,omitempty"`
   623  	// GlueRecords: The list of glue records for this `Registration`. Commonly
   624  	// empty.
   625  	GlueRecords []*GlueRecord `json:"glueRecords,omitempty"`
   626  	// GoogleDomainsDns: Deprecated: For more information, see Cloud Domains
   627  	// feature deprecation
   628  	// (https://cloud.google.com/domains/docs/deprecations/feature-deprecations).
   629  	// The free DNS zone provided by Google Domains (https://domains.google/).
   630  	GoogleDomainsDns *GoogleDomainsDns `json:"googleDomainsDns,omitempty"`
   631  	// ForceSendFields is a list of field names (e.g. "CustomDns") to
   632  	// unconditionally include in API requests. By default, fields with empty or
   633  	// default values are omitted from API requests. See
   634  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   635  	// details.
   636  	ForceSendFields []string `json:"-"`
   637  	// NullFields is a list of field names (e.g. "CustomDns") to include in API
   638  	// requests with the JSON null value. By default, fields with empty values are
   639  	// omitted from API requests. See
   640  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   641  	NullFields []string `json:"-"`
   642  }
   643  
   644  func (s *DnsSettings) MarshalJSON() ([]byte, error) {
   645  	type NoMethod DnsSettings
   646  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   647  }
   648  
   649  // Domain: A domain that the calling user manages in Google Domains.
   650  type Domain struct {
   651  	// DomainName: The domain name. Unicode domain names are expressed in Punycode
   652  	// format.
   653  	DomainName string `json:"domainName,omitempty"`
   654  	// ResourceState: The state of this domain as a `Registration` resource.
   655  	//
   656  	// Possible values:
   657  	//   "RESOURCE_STATE_UNSPECIFIED" - The assessment is undefined.
   658  	//   "IMPORTABLE" - A `Registration` resource can be created for this domain by
   659  	// calling `ImportDomain`.
   660  	//   "UNSUPPORTED" - A `Registration` resource cannot be created for this
   661  	// domain because it is not supported by Cloud Domains; for example, the
   662  	// top-level domain is not supported or the registry charges non-standard
   663  	// pricing for yearly renewals.
   664  	//   "SUSPENDED" - A `Registration` resource cannot be created for this domain
   665  	// because it is suspended and needs to be resolved with Google Domains.
   666  	//   "EXPIRED" - A `Registration` resource cannot be created for this domain
   667  	// because it is expired and needs to be renewed with Google Domains.
   668  	//   "DELETED" - A `Registration` resource cannot be created for this domain
   669  	// because it is deleted, but it may be possible to restore it with Google
   670  	// Domains.
   671  	ResourceState string `json:"resourceState,omitempty"`
   672  	// YearlyPrice: Price to renew the domain for one year. Only set when
   673  	// `resource_state` is `IMPORTABLE`.
   674  	YearlyPrice *Money `json:"yearlyPrice,omitempty"`
   675  	// ForceSendFields is a list of field names (e.g. "DomainName") to
   676  	// unconditionally include in API requests. By default, fields with empty or
   677  	// default values are omitted from API requests. See
   678  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   679  	// details.
   680  	ForceSendFields []string `json:"-"`
   681  	// NullFields is a list of field names (e.g. "DomainName") to include in API
   682  	// requests with the JSON null value. By default, fields with empty values are
   683  	// omitted from API requests. See
   684  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   685  	NullFields []string `json:"-"`
   686  }
   687  
   688  func (s *Domain) MarshalJSON() ([]byte, error) {
   689  	type NoMethod Domain
   690  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   691  }
   692  
   693  // DsRecord: Defines a Delegation Signer (DS) record, which is needed to enable
   694  // DNSSEC for a domain. It contains a digest (hash) of a DNSKEY record that
   695  // must be present in the domain's DNS zone.
   696  type DsRecord struct {
   697  	// Algorithm: The algorithm used to generate the referenced DNSKEY.
   698  	//
   699  	// Possible values:
   700  	//   "ALGORITHM_UNSPECIFIED" - The algorithm is unspecified.
   701  	//   "RSAMD5" - RSA/MD5. Cannot be used for new deployments.
   702  	//   "DH" - Diffie-Hellman. Cannot be used for new deployments.
   703  	//   "DSA" - DSA/SHA1. Not recommended for new deployments.
   704  	//   "ECC" - ECC. Not recommended for new deployments.
   705  	//   "RSASHA1" - RSA/SHA-1. Not recommended for new deployments.
   706  	//   "DSANSEC3SHA1" - DSA-NSEC3-SHA1. Not recommended for new deployments.
   707  	//   "RSASHA1NSEC3SHA1" - RSA/SHA1-NSEC3-SHA1. Not recommended for new
   708  	// deployments.
   709  	//   "RSASHA256" - RSA/SHA-256.
   710  	//   "RSASHA512" - RSA/SHA-512.
   711  	//   "ECCGOST" - GOST R 34.10-2001.
   712  	//   "ECDSAP256SHA256" - ECDSA Curve P-256 with SHA-256.
   713  	//   "ECDSAP384SHA384" - ECDSA Curve P-384 with SHA-384.
   714  	//   "ED25519" - Ed25519.
   715  	//   "ED448" - Ed448.
   716  	//   "INDIRECT" - Reserved for Indirect Keys. Cannot be used for new
   717  	// deployments.
   718  	//   "PRIVATEDNS" - Private algorithm. Cannot be used for new deployments.
   719  	//   "PRIVATEOID" - Private algorithm OID. Cannot be used for new deployments.
   720  	Algorithm string `json:"algorithm,omitempty"`
   721  	// Digest: The digest generated from the referenced DNSKEY.
   722  	Digest string `json:"digest,omitempty"`
   723  	// DigestType: The hash function used to generate the digest of the referenced
   724  	// DNSKEY.
   725  	//
   726  	// Possible values:
   727  	//   "DIGEST_TYPE_UNSPECIFIED" - The DigestType is unspecified.
   728  	//   "SHA1" - SHA-1. Not recommended for new deployments.
   729  	//   "SHA256" - SHA-256.
   730  	//   "GOST3411" - GOST R 34.11-94.
   731  	//   "SHA384" - SHA-384.
   732  	DigestType string `json:"digestType,omitempty"`
   733  	// KeyTag: The key tag of the record. Must be set in range 0 -- 65535.
   734  	KeyTag int64 `json:"keyTag,omitempty"`
   735  	// ForceSendFields is a list of field names (e.g. "Algorithm") to
   736  	// unconditionally include in API requests. By default, fields with empty or
   737  	// default values are omitted from API requests. See
   738  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   739  	// details.
   740  	ForceSendFields []string `json:"-"`
   741  	// NullFields is a list of field names (e.g. "Algorithm") to include in API
   742  	// requests with the JSON null value. By default, fields with empty values are
   743  	// omitted from API requests. See
   744  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   745  	NullFields []string `json:"-"`
   746  }
   747  
   748  func (s *DsRecord) MarshalJSON() ([]byte, error) {
   749  	type NoMethod DsRecord
   750  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   751  }
   752  
   753  // ExportRegistrationRequest: Deprecated: For more information, see Cloud
   754  // Domains feature deprecation
   755  // (https://cloud.google.com/domains/docs/deprecations/feature-deprecations).
   756  // Request for the `ExportRegistration` method.
   757  type ExportRegistrationRequest struct {
   758  }
   759  
   760  // Expr: Represents a textual expression in the Common Expression Language
   761  // (CEL) syntax. CEL is a C-like expression language. The syntax and semantics
   762  // of CEL are documented at https://github.com/google/cel-spec. Example
   763  // (Comparison): title: "Summary size limit" description: "Determines if a
   764  // summary is less than 100 chars" expression: "document.summary.size() < 100"
   765  // Example (Equality): title: "Requestor is owner" description: "Determines if
   766  // requestor is the document owner" expression: "document.owner ==
   767  // request.auth.claims.email" Example (Logic): title: "Public documents"
   768  // description: "Determine whether the document should be publicly visible"
   769  // expression: "document.type != 'private' && document.type != 'internal'"
   770  // Example (Data Manipulation): title: "Notification string" description:
   771  // "Create a notification string with a timestamp." expression: "'New message
   772  // received at ' + string(document.create_time)" The exact variables and
   773  // functions that may be referenced within an expression are determined by the
   774  // service that evaluates it. See the service documentation for additional
   775  // information.
   776  type Expr struct {
   777  	// Description: Optional. Description of the expression. This is a longer text
   778  	// which describes the expression, e.g. when hovered over it in a UI.
   779  	Description string `json:"description,omitempty"`
   780  	// Expression: Textual representation of an expression in Common Expression
   781  	// Language syntax.
   782  	Expression string `json:"expression,omitempty"`
   783  	// Location: Optional. String indicating the location of the expression for
   784  	// error reporting, e.g. a file name and a position in the file.
   785  	Location string `json:"location,omitempty"`
   786  	// Title: Optional. Title for the expression, i.e. a short string describing
   787  	// its purpose. This can be used e.g. in UIs which allow to enter the
   788  	// expression.
   789  	Title string `json:"title,omitempty"`
   790  	// ForceSendFields is a list of field names (e.g. "Description") to
   791  	// unconditionally include in API requests. By default, fields with empty or
   792  	// default values are omitted from API requests. See
   793  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   794  	// details.
   795  	ForceSendFields []string `json:"-"`
   796  	// NullFields is a list of field names (e.g. "Description") to include in API
   797  	// requests with the JSON null value. By default, fields with empty values are
   798  	// omitted from API requests. See
   799  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   800  	NullFields []string `json:"-"`
   801  }
   802  
   803  func (s *Expr) MarshalJSON() ([]byte, error) {
   804  	type NoMethod Expr
   805  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   806  }
   807  
   808  // GlueRecord: Defines a host on your domain that is a DNS name server for your
   809  // domain and/or other domains. Glue records are a way of making the IP address
   810  // of a name server known, even when it serves DNS queries for its parent
   811  // domain. For example, when `ns.example.com` is a name server for
   812  // `example.com`, the host `ns.example.com` must have a glue record to break
   813  // the circular DNS reference.
   814  type GlueRecord struct {
   815  	// HostName: Required. Domain name of the host in Punycode format.
   816  	HostName string `json:"hostName,omitempty"`
   817  	// Ipv4Addresses: List of IPv4 addresses corresponding to this host in the
   818  	// standard decimal format (e.g. `198.51.100.1`). At least one of
   819  	// `ipv4_address` and `ipv6_address` must be set.
   820  	Ipv4Addresses []string `json:"ipv4Addresses,omitempty"`
   821  	// Ipv6Addresses: List of IPv6 addresses corresponding to this host in the
   822  	// standard hexadecimal format (e.g. `2001:db8::`). At least one of
   823  	// `ipv4_address` and `ipv6_address` must be set.
   824  	Ipv6Addresses []string `json:"ipv6Addresses,omitempty"`
   825  	// ForceSendFields is a list of field names (e.g. "HostName") to
   826  	// unconditionally include in API requests. By default, fields with empty or
   827  	// default values are omitted from API requests. See
   828  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   829  	// details.
   830  	ForceSendFields []string `json:"-"`
   831  	// NullFields is a list of field names (e.g. "HostName") to include in API
   832  	// requests with the JSON null value. By default, fields with empty values are
   833  	// omitted from API requests. See
   834  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   835  	NullFields []string `json:"-"`
   836  }
   837  
   838  func (s *GlueRecord) MarshalJSON() ([]byte, error) {
   839  	type NoMethod GlueRecord
   840  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   841  }
   842  
   843  // GoogleDomainsDns: Deprecated: For more information, see Cloud Domains
   844  // feature deprecation
   845  // (https://cloud.google.com/domains/docs/deprecations/feature-deprecations).
   846  // Configuration for using the free DNS zone provided by Google Domains as a
   847  // `Registration`'s `dns_provider`. You cannot configure the DNS zone itself
   848  // using the API. To configure the DNS zone, go to Google Domains
   849  // (https://domains.google/).
   850  type GoogleDomainsDns struct {
   851  	// DsRecords: Output only. The list of DS records published for this domain.
   852  	// The list is automatically populated when `ds_state` is
   853  	// `DS_RECORDS_PUBLISHED`, otherwise it remains empty.
   854  	DsRecords []*DsRecord `json:"dsRecords,omitempty"`
   855  	// DsState: Required. The state of DS records for this domain. Used to enable
   856  	// or disable automatic DNSSEC.
   857  	//
   858  	// Possible values:
   859  	//   "DS_STATE_UNSPECIFIED" - DS state is unspecified.
   860  	//   "DS_RECORDS_UNPUBLISHED" - DNSSEC is disabled for this domain. No DS
   861  	// records for this domain are published in the parent DNS zone.
   862  	//   "DS_RECORDS_PUBLISHED" - DNSSEC is enabled for this domain. Appropriate DS
   863  	// records for this domain are published in the parent DNS zone. This option is
   864  	// valid only if the DNS zone referenced in the `Registration`'s `dns_provider`
   865  	// field is already DNSSEC-signed.
   866  	DsState string `json:"dsState,omitempty"`
   867  	// NameServers: Output only. A list of name servers that store the DNS zone for
   868  	// this domain. Each name server is a domain name, with Unicode domain names
   869  	// expressed in Punycode format. This field is automatically populated with the
   870  	// name servers assigned to the Google Domains DNS zone.
   871  	NameServers []string `json:"nameServers,omitempty"`
   872  	// ForceSendFields is a list of field names (e.g. "DsRecords") to
   873  	// unconditionally include in API requests. By default, fields with empty or
   874  	// default values are omitted from API requests. See
   875  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   876  	// details.
   877  	ForceSendFields []string `json:"-"`
   878  	// NullFields is a list of field names (e.g. "DsRecords") to include in API
   879  	// requests with the JSON null value. By default, fields with empty values are
   880  	// omitted from API requests. See
   881  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   882  	NullFields []string `json:"-"`
   883  }
   884  
   885  func (s *GoogleDomainsDns) MarshalJSON() ([]byte, error) {
   886  	type NoMethod GoogleDomainsDns
   887  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   888  }
   889  
   890  // ImportDomainRequest: Deprecated: For more information, see Cloud Domains
   891  // feature deprecation
   892  // (https://cloud.google.com/domains/docs/deprecations/feature-deprecations).
   893  // Request for the `ImportDomain` method.
   894  type ImportDomainRequest struct {
   895  	// DomainName: Required. The domain name. Unicode domain names must be
   896  	// expressed in Punycode format.
   897  	DomainName string `json:"domainName,omitempty"`
   898  	// Labels: Set of labels associated with the `Registration`.
   899  	Labels map[string]string `json:"labels,omitempty"`
   900  	// ForceSendFields is a list of field names (e.g. "DomainName") to
   901  	// unconditionally include in API requests. By default, fields with empty or
   902  	// default values are omitted from API requests. See
   903  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   904  	// details.
   905  	ForceSendFields []string `json:"-"`
   906  	// NullFields is a list of field names (e.g. "DomainName") to include in API
   907  	// requests with the JSON null value. By default, fields with empty values are
   908  	// omitted from API requests. See
   909  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   910  	NullFields []string `json:"-"`
   911  }
   912  
   913  func (s *ImportDomainRequest) MarshalJSON() ([]byte, error) {
   914  	type NoMethod ImportDomainRequest
   915  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   916  }
   917  
   918  // ListLocationsResponse: The response message for Locations.ListLocations.
   919  type ListLocationsResponse struct {
   920  	// Locations: A list of locations that matches the specified filter in the
   921  	// request.
   922  	Locations []*Location `json:"locations,omitempty"`
   923  	// NextPageToken: The standard List next-page token.
   924  	NextPageToken string `json:"nextPageToken,omitempty"`
   925  
   926  	// ServerResponse contains the HTTP response code and headers from the server.
   927  	googleapi.ServerResponse `json:"-"`
   928  	// ForceSendFields is a list of field names (e.g. "Locations") to
   929  	// unconditionally include in API requests. By default, fields with empty or
   930  	// default values are omitted from API requests. See
   931  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   932  	// details.
   933  	ForceSendFields []string `json:"-"`
   934  	// NullFields is a list of field names (e.g. "Locations") to include in API
   935  	// requests with the JSON null value. By default, fields with empty values are
   936  	// omitted from API requests. See
   937  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   938  	NullFields []string `json:"-"`
   939  }
   940  
   941  func (s *ListLocationsResponse) MarshalJSON() ([]byte, error) {
   942  	type NoMethod ListLocationsResponse
   943  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   944  }
   945  
   946  // ListOperationsResponse: The response message for Operations.ListOperations.
   947  type ListOperationsResponse struct {
   948  	// NextPageToken: The standard List next-page token.
   949  	NextPageToken string `json:"nextPageToken,omitempty"`
   950  	// Operations: A list of operations that matches the specified filter in the
   951  	// request.
   952  	Operations []*Operation `json:"operations,omitempty"`
   953  
   954  	// ServerResponse contains the HTTP response code and headers from the server.
   955  	googleapi.ServerResponse `json:"-"`
   956  	// ForceSendFields is a list of field names (e.g. "NextPageToken") 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. "NextPageToken") 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 *ListOperationsResponse) MarshalJSON() ([]byte, error) {
   970  	type NoMethod ListOperationsResponse
   971  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   972  }
   973  
   974  // ListRegistrationsResponse: Response for the `ListRegistrations` method.
   975  type ListRegistrationsResponse struct {
   976  	// NextPageToken: When present, there are more results to retrieve. Set
   977  	// `page_token` to this value on a subsequent call to get the next page of
   978  	// results.
   979  	NextPageToken string `json:"nextPageToken,omitempty"`
   980  	// Registrations: A list of `Registration`s.
   981  	Registrations []*Registration `json:"registrations,omitempty"`
   982  
   983  	// ServerResponse contains the HTTP response code and headers from the server.
   984  	googleapi.ServerResponse `json:"-"`
   985  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
   986  	// unconditionally include in API requests. By default, fields with empty or
   987  	// default values are omitted from API requests. See
   988  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   989  	// details.
   990  	ForceSendFields []string `json:"-"`
   991  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
   992  	// requests with the JSON null value. By default, fields with empty values are
   993  	// omitted from API requests. See
   994  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   995  	NullFields []string `json:"-"`
   996  }
   997  
   998  func (s *ListRegistrationsResponse) MarshalJSON() ([]byte, error) {
   999  	type NoMethod ListRegistrationsResponse
  1000  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1001  }
  1002  
  1003  // Location: A resource that represents a Google Cloud location.
  1004  type Location struct {
  1005  	// DisplayName: The friendly name for this location, typically a nearby city
  1006  	// name. For example, "Tokyo".
  1007  	DisplayName string `json:"displayName,omitempty"`
  1008  	// Labels: Cross-service attributes for the location. For example
  1009  	// {"cloud.googleapis.com/region": "us-east1"}
  1010  	Labels map[string]string `json:"labels,omitempty"`
  1011  	// LocationId: The canonical id for this location. For example: "us-east1".
  1012  	LocationId string `json:"locationId,omitempty"`
  1013  	// Metadata: Service-specific metadata. For example the available capacity at
  1014  	// the given location.
  1015  	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
  1016  	// Name: Resource name for the location, which may vary between
  1017  	// implementations. For example:
  1018  	// "projects/example-project/locations/us-east1"
  1019  	Name string `json:"name,omitempty"`
  1020  
  1021  	// ServerResponse contains the HTTP response code and headers from the server.
  1022  	googleapi.ServerResponse `json:"-"`
  1023  	// ForceSendFields is a list of field names (e.g. "DisplayName") to
  1024  	// unconditionally include in API requests. By default, fields with empty or
  1025  	// default values are omitted from API requests. See
  1026  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1027  	// details.
  1028  	ForceSendFields []string `json:"-"`
  1029  	// NullFields is a list of field names (e.g. "DisplayName") to include in API
  1030  	// requests with the JSON null value. By default, fields with empty values are
  1031  	// omitted from API requests. See
  1032  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1033  	NullFields []string `json:"-"`
  1034  }
  1035  
  1036  func (s *Location) MarshalJSON() ([]byte, error) {
  1037  	type NoMethod Location
  1038  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1039  }
  1040  
  1041  // ManagementSettings: Defines renewal, billing, and transfer settings for a
  1042  // `Registration`.
  1043  type ManagementSettings struct {
  1044  	// PreferredRenewalMethod: Optional. The desired renewal method for this
  1045  	// `Registration`. The actual `renewal_method` is automatically updated to
  1046  	// reflect this choice. If unset or equal to `RENEWAL_METHOD_UNSPECIFIED`, the
  1047  	// actual `renewalMethod` is treated as if it were set to `AUTOMATIC_RENEWAL`.
  1048  	// You cannot use `RENEWAL_DISABLED` during resource creation, and you can
  1049  	// update the renewal status only when the `Registration` resource has state
  1050  	// `ACTIVE` or `SUSPENDED`. When `preferred_renewal_method` is set to
  1051  	// `AUTOMATIC_RENEWAL`, the actual `renewal_method` can be set to
  1052  	// `RENEWAL_DISABLED` in case of problems with the billing account or reported
  1053  	// domain abuse. In such cases, check the `issues` field on the `Registration`.
  1054  	// After the problem is resolved, the `renewal_method` is automatically updated
  1055  	// to `preferred_renewal_method` in a few hours.
  1056  	//
  1057  	// Possible values:
  1058  	//   "RENEWAL_METHOD_UNSPECIFIED" - The renewal method is undefined.
  1059  	//   "AUTOMATIC_RENEWAL" - The domain is automatically renewed each year.
  1060  	//   "MANUAL_RENEWAL" - Deprecated: For more information, see [Cloud Domains
  1061  	// feature
  1062  	// deprecation](https://cloud.google.com/domains/docs/deprecations/feature-depre
  1063  	// cations). This option was never used. Use `RENEWAL_DISABLED` instead.
  1064  	//   "RENEWAL_DISABLED" - The domain won't be renewed and will expire at its
  1065  	// expiration time.
  1066  	PreferredRenewalMethod string `json:"preferredRenewalMethod,omitempty"`
  1067  	// RenewalMethod: Output only. The actual renewal method for this
  1068  	// `Registration`. When `preferred_renewal_method` is set to
  1069  	// `AUTOMATIC_RENEWAL`, the actual `renewal_method` can be equal to
  1070  	// `RENEWAL_DISABLED`—for example, when there are problems with the billing
  1071  	// account or reported domain abuse. In such cases, check the `issues` field on
  1072  	// the `Registration`. After the problem is resolved, the `renewal_method` is
  1073  	// automatically updated to `preferred_renewal_method` in a few hours.
  1074  	//
  1075  	// Possible values:
  1076  	//   "RENEWAL_METHOD_UNSPECIFIED" - The renewal method is undefined.
  1077  	//   "AUTOMATIC_RENEWAL" - The domain is automatically renewed each year.
  1078  	//   "MANUAL_RENEWAL" - Deprecated: For more information, see [Cloud Domains
  1079  	// feature
  1080  	// deprecation](https://cloud.google.com/domains/docs/deprecations/feature-depre
  1081  	// cations). This option was never used. Use `RENEWAL_DISABLED` instead.
  1082  	//   "RENEWAL_DISABLED" - The domain won't be renewed and will expire at its
  1083  	// expiration time.
  1084  	RenewalMethod string `json:"renewalMethod,omitempty"`
  1085  	// TransferLockState: Controls whether the domain can be transferred to another
  1086  	// registrar.
  1087  	//
  1088  	// Possible values:
  1089  	//   "TRANSFER_LOCK_STATE_UNSPECIFIED" - The state is unspecified.
  1090  	//   "UNLOCKED" - The domain is unlocked and can be transferred to another
  1091  	// registrar.
  1092  	//   "LOCKED" - The domain is locked and cannot be transferred to another
  1093  	// registrar.
  1094  	TransferLockState string `json:"transferLockState,omitempty"`
  1095  	// ForceSendFields is a list of field names (e.g. "PreferredRenewalMethod") to
  1096  	// unconditionally include in API requests. By default, fields with empty or
  1097  	// default values are omitted from API requests. See
  1098  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1099  	// details.
  1100  	ForceSendFields []string `json:"-"`
  1101  	// NullFields is a list of field names (e.g. "PreferredRenewalMethod") to
  1102  	// include in API requests with the JSON null value. By default, fields with
  1103  	// empty values are omitted from API requests. See
  1104  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1105  	NullFields []string `json:"-"`
  1106  }
  1107  
  1108  func (s *ManagementSettings) MarshalJSON() ([]byte, error) {
  1109  	type NoMethod ManagementSettings
  1110  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1111  }
  1112  
  1113  // Money: Represents an amount of money with its currency type.
  1114  type Money struct {
  1115  	// CurrencyCode: The three-letter currency code defined in ISO 4217.
  1116  	CurrencyCode string `json:"currencyCode,omitempty"`
  1117  	// Nanos: Number of nano (10^-9) units of the amount. The value must be between
  1118  	// -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos`
  1119  	// must be positive or zero. If `units` is zero, `nanos` can be positive, zero,
  1120  	// or negative. If `units` is negative, `nanos` must be negative or zero. For
  1121  	// example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
  1122  	Nanos int64 `json:"nanos,omitempty"`
  1123  	// Units: The whole units of the amount. For example if `currencyCode` is
  1124  	// "USD", then 1 unit is one US dollar.
  1125  	Units int64 `json:"units,omitempty,string"`
  1126  	// ForceSendFields is a list of field names (e.g. "CurrencyCode") to
  1127  	// unconditionally include in API requests. By default, fields with empty or
  1128  	// default values are omitted from API requests. See
  1129  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1130  	// details.
  1131  	ForceSendFields []string `json:"-"`
  1132  	// NullFields is a list of field names (e.g. "CurrencyCode") to include in API
  1133  	// requests with the JSON null value. By default, fields with empty values are
  1134  	// omitted from API requests. See
  1135  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1136  	NullFields []string `json:"-"`
  1137  }
  1138  
  1139  func (s *Money) MarshalJSON() ([]byte, error) {
  1140  	type NoMethod Money
  1141  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1142  }
  1143  
  1144  // Operation: This resource represents a long-running operation that is the
  1145  // result of a network API call.
  1146  type Operation struct {
  1147  	// Done: If the value is `false`, it means the operation is still in progress.
  1148  	// If `true`, the operation is completed, and either `error` or `response` is
  1149  	// available.
  1150  	Done bool `json:"done,omitempty"`
  1151  	// Error: The error result of the operation in case of failure or cancellation.
  1152  	Error *Status `json:"error,omitempty"`
  1153  	// Metadata: Service-specific metadata associated with the operation. It
  1154  	// typically contains progress information and common metadata such as create
  1155  	// time. Some services might not provide such metadata. Any method that returns
  1156  	// a long-running operation should document the metadata type, if any.
  1157  	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
  1158  	// Name: The server-assigned name, which is only unique within the same service
  1159  	// that originally returns it. If you use the default HTTP mapping, the `name`
  1160  	// should be a resource name ending with `operations/{unique_id}`.
  1161  	Name string `json:"name,omitempty"`
  1162  	// Response: The normal, successful response of the operation. If the original
  1163  	// method returns no data on success, such as `Delete`, the response is
  1164  	// `google.protobuf.Empty`. If the original method is standard
  1165  	// `Get`/`Create`/`Update`, the response should be the resource. For other
  1166  	// methods, the response should have the type `XxxResponse`, where `Xxx` is the
  1167  	// original method name. For example, if the original method name is
  1168  	// `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
  1169  	Response googleapi.RawMessage `json:"response,omitempty"`
  1170  
  1171  	// ServerResponse contains the HTTP response code and headers from the server.
  1172  	googleapi.ServerResponse `json:"-"`
  1173  	// ForceSendFields is a list of field names (e.g. "Done") to unconditionally
  1174  	// include in API requests. By default, fields with empty or default values are
  1175  	// omitted from API requests. See
  1176  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1177  	// details.
  1178  	ForceSendFields []string `json:"-"`
  1179  	// NullFields is a list of field names (e.g. "Done") to include in API requests
  1180  	// with the JSON null value. By default, fields with empty values are omitted
  1181  	// from API requests. See
  1182  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1183  	NullFields []string `json:"-"`
  1184  }
  1185  
  1186  func (s *Operation) MarshalJSON() ([]byte, error) {
  1187  	type NoMethod Operation
  1188  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1189  }
  1190  
  1191  // OperationMetadata: Represents the metadata of the long-running operation.
  1192  // Output only.
  1193  type OperationMetadata struct {
  1194  	// ApiVersion: API version used to start the operation.
  1195  	ApiVersion string `json:"apiVersion,omitempty"`
  1196  	// CreateTime: The time the operation was created.
  1197  	CreateTime string `json:"createTime,omitempty"`
  1198  	// EndTime: The time the operation finished running.
  1199  	EndTime string `json:"endTime,omitempty"`
  1200  	// StatusDetail: Human-readable status of the operation, if any.
  1201  	StatusDetail string `json:"statusDetail,omitempty"`
  1202  	// Target: Server-defined resource path for the target of the operation.
  1203  	Target string `json:"target,omitempty"`
  1204  	// Verb: Name of the verb executed by the operation.
  1205  	Verb string `json:"verb,omitempty"`
  1206  	// ForceSendFields is a list of field names (e.g. "ApiVersion") to
  1207  	// unconditionally include in API requests. By default, fields with empty or
  1208  	// default values are omitted from API requests. See
  1209  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1210  	// details.
  1211  	ForceSendFields []string `json:"-"`
  1212  	// NullFields is a list of field names (e.g. "ApiVersion") to include in API
  1213  	// requests with the JSON null value. By default, fields with empty values are
  1214  	// omitted from API requests. See
  1215  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1216  	NullFields []string `json:"-"`
  1217  }
  1218  
  1219  func (s *OperationMetadata) MarshalJSON() ([]byte, error) {
  1220  	type NoMethod OperationMetadata
  1221  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1222  }
  1223  
  1224  // Policy: An Identity and Access Management (IAM) policy, which specifies
  1225  // access controls for Google Cloud resources. A `Policy` is a collection of
  1226  // `bindings`. A `binding` binds one or more `members`, or principals, to a
  1227  // single `role`. Principals can be user accounts, service accounts, Google
  1228  // groups, and domains (such as G Suite). A `role` is a named list of
  1229  // permissions; each `role` can be an IAM predefined role or a user-created
  1230  // custom role. For some types of Google Cloud resources, a `binding` can also
  1231  // specify a `condition`, which is a logical expression that allows access to a
  1232  // resource only if the expression evaluates to `true`. A condition can add
  1233  // constraints based on attributes of the request, the resource, or both. To
  1234  // learn which resources support conditions in their IAM policies, see the IAM
  1235  // documentation
  1236  // (https://cloud.google.com/iam/help/conditions/resource-policies). **JSON
  1237  // example:** ``` { "bindings": [ { "role":
  1238  // "roles/resourcemanager.organizationAdmin", "members": [
  1239  // "user:mike@example.com", "group:admins@example.com", "domain:google.com",
  1240  // "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role":
  1241  // "roles/resourcemanager.organizationViewer", "members": [
  1242  // "user:eve@example.com" ], "condition": { "title": "expirable access",
  1243  // "description": "Does not grant access after Sep 2020", "expression":
  1244  // "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag":
  1245  // "BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` bindings: -
  1246  // members: - user:mike@example.com - group:admins@example.com -
  1247  // domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com
  1248  // role: roles/resourcemanager.organizationAdmin - members: -
  1249  // user:eve@example.com role: roles/resourcemanager.organizationViewer
  1250  // condition: title: expirable access description: Does not grant access after
  1251  // Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z')
  1252  // etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features,
  1253  // see the IAM documentation (https://cloud.google.com/iam/docs/).
  1254  type Policy struct {
  1255  	// AuditConfigs: Specifies cloud audit logging configuration for this policy.
  1256  	AuditConfigs []*AuditConfig `json:"auditConfigs,omitempty"`
  1257  	// Bindings: Associates a list of `members`, or principals, with a `role`.
  1258  	// Optionally, may specify a `condition` that determines how and when the
  1259  	// `bindings` are applied. Each of the `bindings` must contain at least one
  1260  	// principal. The `bindings` in a `Policy` can refer to up to 1,500 principals;
  1261  	// up to 250 of these principals can be Google groups. Each occurrence of a
  1262  	// principal counts towards these limits. For example, if the `bindings` grant
  1263  	// 50 different roles to `user:alice@example.com`, and not to any other
  1264  	// principal, then you can add another 1,450 principals to the `bindings` in
  1265  	// the `Policy`.
  1266  	Bindings []*Binding `json:"bindings,omitempty"`
  1267  	// Etag: `etag` is used for optimistic concurrency control as a way to help
  1268  	// prevent simultaneous updates of a policy from overwriting each other. It is
  1269  	// strongly suggested that systems make use of the `etag` in the
  1270  	// read-modify-write cycle to perform policy updates in order to avoid race
  1271  	// conditions: An `etag` is returned in the response to `getIamPolicy`, and
  1272  	// systems are expected to put that etag in the request to `setIamPolicy` to
  1273  	// ensure that their change will be applied to the same version of the policy.
  1274  	// **Important:** If you use IAM Conditions, you must include the `etag` field
  1275  	// whenever you call `setIamPolicy`. If you omit this field, then IAM allows
  1276  	// you to overwrite a version `3` policy with a version `1` policy, and all of
  1277  	// the conditions in the version `3` policy are lost.
  1278  	Etag string `json:"etag,omitempty"`
  1279  	// Version: Specifies the format of the policy. Valid values are `0`, `1`, and
  1280  	// `3`. Requests that specify an invalid value are rejected. Any operation that
  1281  	// affects conditional role bindings must specify version `3`. This requirement
  1282  	// applies to the following operations: * Getting a policy that includes a
  1283  	// conditional role binding * Adding a conditional role binding to a policy *
  1284  	// Changing a conditional role binding in a policy * Removing any role binding,
  1285  	// with or without a condition, from a policy that includes conditions
  1286  	// **Important:** If you use IAM Conditions, you must include the `etag` field
  1287  	// whenever you call `setIamPolicy`. If you omit this field, then IAM allows
  1288  	// you to overwrite a version `3` policy with a version `1` policy, and all of
  1289  	// the conditions in the version `3` policy are lost. If a policy does not
  1290  	// include any conditions, operations on that policy may specify any valid
  1291  	// version or leave the field unset. To learn which resources support
  1292  	// conditions in their IAM policies, see the IAM documentation
  1293  	// (https://cloud.google.com/iam/help/conditions/resource-policies).
  1294  	Version int64 `json:"version,omitempty"`
  1295  
  1296  	// ServerResponse contains the HTTP response code and headers from the server.
  1297  	googleapi.ServerResponse `json:"-"`
  1298  	// ForceSendFields is a list of field names (e.g. "AuditConfigs") to
  1299  	// unconditionally include in API requests. By default, fields with empty or
  1300  	// default values are omitted from API requests. See
  1301  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1302  	// details.
  1303  	ForceSendFields []string `json:"-"`
  1304  	// NullFields is a list of field names (e.g. "AuditConfigs") to include in API
  1305  	// requests with the JSON null value. By default, fields with empty values are
  1306  	// omitted from API requests. See
  1307  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1308  	NullFields []string `json:"-"`
  1309  }
  1310  
  1311  func (s *Policy) MarshalJSON() ([]byte, error) {
  1312  	type NoMethod Policy
  1313  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1314  }
  1315  
  1316  // PostalAddress: Represents a postal address, e.g. for postal delivery or
  1317  // payments addresses. Given a postal address, a postal service can deliver
  1318  // items to a premise, P.O. Box or similar. It is not intended to model
  1319  // geographical locations (roads, towns, mountains). In typical usage an
  1320  // address would be created via user input or from importing existing data,
  1321  // depending on the type of process. Advice on address input / editing: - Use
  1322  // an internationalization-ready address widget such as
  1323  // https://github.com/google/libaddressinput) - Users should not be presented
  1324  // with UI elements for input or editing of fields outside countries where that
  1325  // field is used. For more guidance on how to use this schema, please see:
  1326  // https://support.google.com/business/answer/6397478
  1327  type PostalAddress struct {
  1328  	// AddressLines: Unstructured address lines describing the lower levels of an
  1329  	// address. Because values in address_lines do not have type information and
  1330  	// may sometimes contain multiple values in a single field (e.g. "Austin, TX"),
  1331  	// it is important that the line order is clear. The order of address lines
  1332  	// should be "envelope order" for the country/region of the address. In places
  1333  	// where this can vary (e.g. Japan), address_language is used to make it
  1334  	// explicit (e.g. "ja" for large-to-small ordering and "ja-Latn" or "en" for
  1335  	// small-to-large). This way, the most specific line of an address can be
  1336  	// selected based on the language. The minimum permitted structural
  1337  	// representation of an address consists of a region_code with all remaining
  1338  	// information placed in the address_lines. It would be possible to format such
  1339  	// an address very approximately without geocoding, but no semantic reasoning
  1340  	// could be made about any of the address components until it was at least
  1341  	// partially resolved. Creating an address only containing a region_code and
  1342  	// address_lines, and then geocoding is the recommended way to handle
  1343  	// completely unstructured addresses (as opposed to guessing which parts of the
  1344  	// address should be localities or administrative areas).
  1345  	AddressLines []string `json:"addressLines,omitempty"`
  1346  	// AdministrativeArea: Optional. Highest administrative subdivision which is
  1347  	// used for postal addresses of a country or region. For example, this can be a
  1348  	// state, a province, an oblast, or a prefecture. Specifically, for Spain this
  1349  	// is the province and not the autonomous community (e.g. "Barcelona" and not
  1350  	// "Catalonia"). Many countries don't use an administrative area in postal
  1351  	// addresses. E.g. in Switzerland this should be left unpopulated.
  1352  	AdministrativeArea string `json:"administrativeArea,omitempty"`
  1353  	// LanguageCode: Optional. BCP-47 language code of the contents of this address
  1354  	// (if known). This is often the UI language of the input form or is expected
  1355  	// to match one of the languages used in the address' country/region, or their
  1356  	// transliterated equivalents. This can affect formatting in certain countries,
  1357  	// but is not critical to the correctness of the data and will never affect any
  1358  	// validation or other non-formatting related operations. If this value is not
  1359  	// known, it should be omitted (rather than specifying a possibly incorrect
  1360  	// default). Examples: "zh-Hant", "ja", "ja-Latn", "en".
  1361  	LanguageCode string `json:"languageCode,omitempty"`
  1362  	// Locality: Optional. Generally refers to the city/town portion of the
  1363  	// address. Examples: US city, IT comune, UK post town. In regions of the world
  1364  	// where localities are not well defined or do not fit into this structure
  1365  	// well, leave locality empty and use address_lines.
  1366  	Locality string `json:"locality,omitempty"`
  1367  	// Organization: Optional. The name of the organization at the address.
  1368  	Organization string `json:"organization,omitempty"`
  1369  	// PostalCode: Optional. Postal code of the address. Not all countries use or
  1370  	// require postal codes to be present, but where they are used, they may
  1371  	// trigger additional validation with other parts of the address (e.g.
  1372  	// state/zip validation in the U.S.A.).
  1373  	PostalCode string `json:"postalCode,omitempty"`
  1374  	// Recipients: Optional. The recipient at the address. This field may, under
  1375  	// certain circumstances, contain multiline information. For example, it might
  1376  	// contain "care of" information.
  1377  	Recipients []string `json:"recipients,omitempty"`
  1378  	// RegionCode: Required. CLDR region code of the country/region of the address.
  1379  	// This is never inferred and it is up to the user to ensure the value is
  1380  	// correct. See https://cldr.unicode.org/ and
  1381  	// https://www.unicode.org/cldr/charts/30/supplemental/territory_information.html
  1382  	// for details. Example: "CH" for Switzerland.
  1383  	RegionCode string `json:"regionCode,omitempty"`
  1384  	// Revision: The schema revision of the `PostalAddress`. This must be set to 0,
  1385  	// which is the latest revision. All new revisions **must** be backward
  1386  	// compatible with old revisions.
  1387  	Revision int64 `json:"revision,omitempty"`
  1388  	// SortingCode: Optional. Additional, country-specific, sorting code. This is
  1389  	// not used in most regions. Where it is used, the value is either a string
  1390  	// like "CEDEX", optionally followed by a number (e.g. "CEDEX 7"), or just a
  1391  	// number alone, representing the "sector code" (Jamaica), "delivery area
  1392  	// indicator" (Malawi) or "post office indicator" (e.g. Côte d'Ivoire).
  1393  	SortingCode string `json:"sortingCode,omitempty"`
  1394  	// Sublocality: Optional. Sublocality of the address. For example, this can be
  1395  	// neighborhoods, boroughs, districts.
  1396  	Sublocality string `json:"sublocality,omitempty"`
  1397  	// ForceSendFields is a list of field names (e.g. "AddressLines") to
  1398  	// unconditionally include in API requests. By default, fields with empty or
  1399  	// default values are omitted from API requests. See
  1400  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1401  	// details.
  1402  	ForceSendFields []string `json:"-"`
  1403  	// NullFields is a list of field names (e.g. "AddressLines") to include in API
  1404  	// requests with the JSON null value. By default, fields with empty values are
  1405  	// omitted from API requests. See
  1406  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1407  	NullFields []string `json:"-"`
  1408  }
  1409  
  1410  func (s *PostalAddress) MarshalJSON() ([]byte, error) {
  1411  	type NoMethod PostalAddress
  1412  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1413  }
  1414  
  1415  // RegisterDomainRequest: Request for the `RegisterDomain` method.
  1416  type RegisterDomainRequest struct {
  1417  	// ContactNotices: The list of contact notices that the caller acknowledges.
  1418  	// The notices needed here depend on the values specified in
  1419  	// `registration.contact_settings`.
  1420  	//
  1421  	// Possible values:
  1422  	//   "CONTACT_NOTICE_UNSPECIFIED" - The notice is undefined.
  1423  	//   "PUBLIC_CONTACT_DATA_ACKNOWLEDGEMENT" - Required when setting the
  1424  	// `privacy` field of `ContactSettings` to `PUBLIC_CONTACT_DATA`, which exposes
  1425  	// contact data publicly.
  1426  	ContactNotices []string `json:"contactNotices,omitempty"`
  1427  	// DomainNotices: The list of domain notices that you acknowledge. Call
  1428  	// `RetrieveRegisterParameters` to see the notices that need acknowledgement.
  1429  	//
  1430  	// Possible values:
  1431  	//   "DOMAIN_NOTICE_UNSPECIFIED" - The notice is undefined.
  1432  	//   "HSTS_PRELOADED" - Indicates that the domain is preloaded on the HTTP
  1433  	// Strict Transport Security list in browsers. Serving a website on such domain
  1434  	// requires an SSL certificate. For details, see [how to get an SSL
  1435  	// certificate](https://support.google.com/domains/answer/7638036).
  1436  	DomainNotices []string `json:"domainNotices,omitempty"`
  1437  	// Registration: Required. The complete `Registration` resource to be created.
  1438  	Registration *Registration `json:"registration,omitempty"`
  1439  	// ValidateOnly: When true, only validation is performed, without actually
  1440  	// registering the domain. Follows:
  1441  	// https://cloud.google.com/apis/design/design_patterns#request_validation
  1442  	ValidateOnly bool `json:"validateOnly,omitempty"`
  1443  	// YearlyPrice: Required. Yearly price to register or renew the domain. The
  1444  	// value that should be put here can be obtained from
  1445  	// RetrieveRegisterParameters or SearchDomains calls.
  1446  	YearlyPrice *Money `json:"yearlyPrice,omitempty"`
  1447  	// ForceSendFields is a list of field names (e.g. "ContactNotices") to
  1448  	// unconditionally include in API requests. By default, fields with empty or
  1449  	// default values are omitted from API requests. See
  1450  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1451  	// details.
  1452  	ForceSendFields []string `json:"-"`
  1453  	// NullFields is a list of field names (e.g. "ContactNotices") to include in
  1454  	// API requests with the JSON null value. By default, fields with empty values
  1455  	// are omitted from API requests. See
  1456  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1457  	NullFields []string `json:"-"`
  1458  }
  1459  
  1460  func (s *RegisterDomainRequest) MarshalJSON() ([]byte, error) {
  1461  	type NoMethod RegisterDomainRequest
  1462  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1463  }
  1464  
  1465  // RegisterParameters: Parameters required to register a new domain.
  1466  type RegisterParameters struct {
  1467  	// Availability: Indicates whether the domain is available for registration.
  1468  	// This value is accurate when obtained by calling
  1469  	// `RetrieveRegisterParameters`, but is approximate when obtained by calling
  1470  	// `SearchDomains`.
  1471  	//
  1472  	// Possible values:
  1473  	//   "AVAILABILITY_UNSPECIFIED" - The availability is unspecified.
  1474  	//   "AVAILABLE" - The domain is available for registration.
  1475  	//   "UNAVAILABLE" - The domain is not available for registration. Generally
  1476  	// this means it is already registered to another party.
  1477  	//   "UNSUPPORTED" - The domain is not currently supported by Cloud Domains,
  1478  	// but may be available elsewhere.
  1479  	//   "UNKNOWN" - Cloud Domains is unable to determine domain availability,
  1480  	// generally due to system maintenance at the domain name registry.
  1481  	Availability string `json:"availability,omitempty"`
  1482  	// DomainName: The domain name. Unicode domain names are expressed in Punycode
  1483  	// format.
  1484  	DomainName string `json:"domainName,omitempty"`
  1485  	// DomainNotices: Notices about special properties of the domain.
  1486  	//
  1487  	// Possible values:
  1488  	//   "DOMAIN_NOTICE_UNSPECIFIED" - The notice is undefined.
  1489  	//   "HSTS_PRELOADED" - Indicates that the domain is preloaded on the HTTP
  1490  	// Strict Transport Security list in browsers. Serving a website on such domain
  1491  	// requires an SSL certificate. For details, see [how to get an SSL
  1492  	// certificate](https://support.google.com/domains/answer/7638036).
  1493  	DomainNotices []string `json:"domainNotices,omitempty"`
  1494  	// SupportedPrivacy: Contact privacy options that the domain supports.
  1495  	//
  1496  	// Possible values:
  1497  	//   "CONTACT_PRIVACY_UNSPECIFIED" - The contact privacy settings are
  1498  	// undefined.
  1499  	//   "PUBLIC_CONTACT_DATA" - All the data from `ContactSettings` is publicly
  1500  	// available. When setting this option, you must also provide a
  1501  	// `PUBLIC_CONTACT_DATA_ACKNOWLEDGEMENT` in the `contact_notices` field of the
  1502  	// request.
  1503  	//   "PRIVATE_CONTACT_DATA" - Deprecated: For more information, see [Cloud
  1504  	// Domains feature
  1505  	// deprecation](https://cloud.google.com/domains/docs/deprecations/feature-depre
  1506  	// cations). None of the data from `ContactSettings` is publicly available.
  1507  	// Instead, proxy contact data is published for your domain. Email sent to the
  1508  	// proxy email address is forwarded to the registrant's email address. Cloud
  1509  	// Domains provides this privacy proxy service at no additional cost.
  1510  	//   "REDACTED_CONTACT_DATA" - The organization name (if provided) and limited
  1511  	// non-identifying data from `ContactSettings` is available to the public (e.g.
  1512  	// country and state). The remaining data is marked as `REDACTED FOR PRIVACY`
  1513  	// in the WHOIS database. The actual information redacted depends on the
  1514  	// domain. For details, see [the registration privacy
  1515  	// article](https://support.google.com/domains/answer/3251242).
  1516  	SupportedPrivacy []string `json:"supportedPrivacy,omitempty"`
  1517  	// YearlyPrice: Price to register or renew the domain for one year.
  1518  	YearlyPrice *Money `json:"yearlyPrice,omitempty"`
  1519  	// ForceSendFields is a list of field names (e.g. "Availability") to
  1520  	// unconditionally include in API requests. By default, fields with empty or
  1521  	// default values are omitted from API requests. See
  1522  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1523  	// details.
  1524  	ForceSendFields []string `json:"-"`
  1525  	// NullFields is a list of field names (e.g. "Availability") to include in API
  1526  	// requests with the JSON null value. By default, fields with empty values are
  1527  	// omitted from API requests. See
  1528  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1529  	NullFields []string `json:"-"`
  1530  }
  1531  
  1532  func (s *RegisterParameters) MarshalJSON() ([]byte, error) {
  1533  	type NoMethod RegisterParameters
  1534  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1535  }
  1536  
  1537  // Registration: The `Registration` resource facilitates managing and
  1538  // configuring domain name registrations. There are several ways to create a
  1539  // new `Registration` resource: To create a new `Registration` resource, find a
  1540  // suitable domain name by calling the `SearchDomains` method with a query to
  1541  // see available domain name options. After choosing a name, call
  1542  // `RetrieveRegisterParameters` to ensure availability and obtain information
  1543  // like pricing, which is needed to build a call to `RegisterDomain`. Another
  1544  // way to create a new `Registration` is to transfer an existing domain from
  1545  // another registrar (Deprecated: For more information, see Cloud Domains
  1546  // feature deprecation
  1547  // (https://cloud.google.com/domains/docs/deprecations/feature-deprecations)).
  1548  // First, go to the current registrar to unlock the domain for transfer and
  1549  // retrieve the domain's transfer authorization code. Then call
  1550  // `RetrieveTransferParameters` to confirm that the domain is unlocked and to
  1551  // get values needed to build a call to `TransferDomain`. Finally, you can
  1552  // create a new `Registration` by importing an existing domain managed with
  1553  // Google Domains (https://domains.google/) (Deprecated: For more information,
  1554  // see Cloud Domains feature deprecation
  1555  // (https://cloud.google.com/domains/docs/deprecations/feature-deprecations)).
  1556  // First, call `RetrieveImportableDomains` to list domains to which the calling
  1557  // user has sufficient access. Then call `ImportDomain` on any domain names you
  1558  // want to use with Cloud Domains.
  1559  type Registration struct {
  1560  	// ContactSettings: Required. Settings for contact information linked to the
  1561  	// `Registration`. You cannot update these with the `UpdateRegistration`
  1562  	// method. To update these settings, use the `ConfigureContactSettings` method.
  1563  	ContactSettings *ContactSettings `json:"contactSettings,omitempty"`
  1564  	// CreateTime: Output only. The creation timestamp of the `Registration`
  1565  	// resource.
  1566  	CreateTime string `json:"createTime,omitempty"`
  1567  	// DnsSettings: Settings controlling the DNS configuration of the
  1568  	// `Registration`. You cannot update these with the `UpdateRegistration`
  1569  	// method. To update these settings, use the `ConfigureDnsSettings` method.
  1570  	DnsSettings *DnsSettings `json:"dnsSettings,omitempty"`
  1571  	// DomainName: Required. Immutable. The domain name. Unicode domain names must
  1572  	// be expressed in Punycode format.
  1573  	DomainName string `json:"domainName,omitempty"`
  1574  	// ExpireTime: Output only. The expiration timestamp of the `Registration`.
  1575  	ExpireTime string `json:"expireTime,omitempty"`
  1576  	// Issues: Output only. The set of issues with the `Registration` that require
  1577  	// attention.
  1578  	//
  1579  	// Possible values:
  1580  	//   "ISSUE_UNSPECIFIED" - The issue is undefined.
  1581  	//   "CONTACT_SUPPORT" - Contact the Cloud Support team to resolve a problem
  1582  	// with this domain.
  1583  	//   "UNVERIFIED_EMAIL" - [ICANN](https://icann.org/) requires verification of
  1584  	// the email address in the `Registration`'s
  1585  	// `contact_settings.registrant_contact` field. To verify the email address,
  1586  	// follow the instructions in the email the `registrant_contact` receives
  1587  	// following registration. If you do not complete email verification within 15
  1588  	// days of registration, the domain is suspended. To resend the verification
  1589  	// email, call ConfigureContactSettings and provide the current
  1590  	// `registrant_contact.email`.
  1591  	//   "PROBLEM_WITH_BILLING" - The billing account is not in good standing. The
  1592  	// domain is not automatically renewed at its expiration time unless you
  1593  	// resolve problems with your billing account.
  1594  	Issues []string `json:"issues,omitempty"`
  1595  	// Labels: Set of labels associated with the `Registration`.
  1596  	Labels map[string]string `json:"labels,omitempty"`
  1597  	// ManagementSettings: Settings for management of the `Registration`, including
  1598  	// renewal, billing, and transfer. You cannot update these with the
  1599  	// `UpdateRegistration` method. To update these settings, use the
  1600  	// `ConfigureManagementSettings` method.
  1601  	ManagementSettings *ManagementSettings `json:"managementSettings,omitempty"`
  1602  	// Name: Output only. Name of the `Registration` resource, in the format
  1603  	// `projects/*/locations/*/registrations/`.
  1604  	Name string `json:"name,omitempty"`
  1605  	// PendingContactSettings: Output only. Pending contact settings for the
  1606  	// `Registration`. Updates to the `contact_settings` field that change its
  1607  	// `registrant_contact` or `privacy` fields require email confirmation by the
  1608  	// `registrant_contact` before taking effect. This field is set only if there
  1609  	// are pending updates to the `contact_settings` that have not been confirmed.
  1610  	// To confirm the changes, the `registrant_contact` must follow the
  1611  	// instructions in the email they receive.
  1612  	PendingContactSettings *ContactSettings `json:"pendingContactSettings,omitempty"`
  1613  	// Provider: Output only. Current domain management provider.
  1614  	//
  1615  	// Possible values:
  1616  	//   "REGISTRAR_UNSPECIFIED" - Registrar is not selected.
  1617  	//   "GOOGLE_DOMAINS" - Use Google Domains registrar.
  1618  	//   "SQUARESPACE" - Use Squarespace registrar
  1619  	Provider string `json:"provider,omitempty"`
  1620  	// RegisterFailureReason: Output only. The reason the domain registration
  1621  	// failed. Only set for domains in REGISTRATION_FAILED state.
  1622  	//
  1623  	// Possible values:
  1624  	//   "REGISTER_FAILURE_REASON_UNSPECIFIED" - Register failure unspecified.
  1625  	//   "REGISTER_FAILURE_REASON_UNKNOWN" - Registration failed for an unknown
  1626  	// reason.
  1627  	//   "DOMAIN_NOT_AVAILABLE" - The domain is not available for registration.
  1628  	//   "INVALID_CONTACTS" - The provided contact information was rejected.
  1629  	RegisterFailureReason string `json:"registerFailureReason,omitempty"`
  1630  	// State: Output only. The state of the `Registration`
  1631  	//
  1632  	// Possible values:
  1633  	//   "STATE_UNSPECIFIED" - The state is undefined.
  1634  	//   "REGISTRATION_PENDING" - The domain is being registered.
  1635  	//   "REGISTRATION_FAILED" - The domain registration failed. You can delete
  1636  	// resources in this state to allow registration to be retried.
  1637  	//   "TRANSFER_PENDING" - The domain is being transferred from another
  1638  	// registrar to Cloud Domains.
  1639  	//   "TRANSFER_FAILED" - The attempt to transfer the domain from another
  1640  	// registrar to Cloud Domains failed. You can delete resources in this state
  1641  	// and retry the transfer.
  1642  	//   "IMPORT_PENDING" - The domain is being imported from Google Domains to
  1643  	// Cloud Domains.
  1644  	//   "ACTIVE" - The domain is registered and operational. The domain renews
  1645  	// automatically as long as it remains in this state and the `RenewalMethod` is
  1646  	// set to `AUTOMATIC_RENEWAL`.
  1647  	//   "SUSPENDED" - The domain is suspended and inoperative. For more details,
  1648  	// see the `issues` field.
  1649  	//   "EXPORTED" - The domain is no longer managed with Cloud Domains. It may
  1650  	// have been transferred to another registrar or exported for management in
  1651  	// [Google Domains](https://domains.google/). You can no longer update it with
  1652  	// this API, and information shown about it may be stale. Domains in this state
  1653  	// are not automatically renewed by Cloud Domains.
  1654  	//   "EXPIRED" - The domain is expired.
  1655  	State string `json:"state,omitempty"`
  1656  	// SupportedPrivacy: Output only. Set of options for the
  1657  	// `contact_settings.privacy` field that this `Registration` supports.
  1658  	//
  1659  	// Possible values:
  1660  	//   "CONTACT_PRIVACY_UNSPECIFIED" - The contact privacy settings are
  1661  	// undefined.
  1662  	//   "PUBLIC_CONTACT_DATA" - All the data from `ContactSettings` is publicly
  1663  	// available. When setting this option, you must also provide a
  1664  	// `PUBLIC_CONTACT_DATA_ACKNOWLEDGEMENT` in the `contact_notices` field of the
  1665  	// request.
  1666  	//   "PRIVATE_CONTACT_DATA" - Deprecated: For more information, see [Cloud
  1667  	// Domains feature
  1668  	// deprecation](https://cloud.google.com/domains/docs/deprecations/feature-depre
  1669  	// cations). None of the data from `ContactSettings` is publicly available.
  1670  	// Instead, proxy contact data is published for your domain. Email sent to the
  1671  	// proxy email address is forwarded to the registrant's email address. Cloud
  1672  	// Domains provides this privacy proxy service at no additional cost.
  1673  	//   "REDACTED_CONTACT_DATA" - The organization name (if provided) and limited
  1674  	// non-identifying data from `ContactSettings` is available to the public (e.g.
  1675  	// country and state). The remaining data is marked as `REDACTED FOR PRIVACY`
  1676  	// in the WHOIS database. The actual information redacted depends on the
  1677  	// domain. For details, see [the registration privacy
  1678  	// article](https://support.google.com/domains/answer/3251242).
  1679  	SupportedPrivacy []string `json:"supportedPrivacy,omitempty"`
  1680  	// TransferFailureReason: Output only. Deprecated: For more information, see
  1681  	// Cloud Domains feature deprecation
  1682  	// (https://cloud.google.com/domains/docs/deprecations/feature-deprecations).
  1683  	// The reason the domain transfer failed. Only set for domains in
  1684  	// TRANSFER_FAILED state.
  1685  	//
  1686  	// Possible values:
  1687  	//   "TRANSFER_FAILURE_REASON_UNSPECIFIED" - Transfer failure unspecified.
  1688  	//   "TRANSFER_FAILURE_REASON_UNKNOWN" - Transfer failed for an unknown reason.
  1689  	//   "EMAIL_CONFIRMATION_FAILURE" - An email confirmation sent to the user was
  1690  	// rejected or expired.
  1691  	//   "DOMAIN_NOT_REGISTERED" - The domain is available for registration.
  1692  	//   "DOMAIN_HAS_TRANSFER_LOCK" - The domain has a transfer lock with its
  1693  	// current registrar which must be removed prior to transfer.
  1694  	//   "INVALID_AUTHORIZATION_CODE" - The authorization code entered is not
  1695  	// valid.
  1696  	//   "TRANSFER_CANCELLED" - The transfer was cancelled by the domain owner,
  1697  	// current registrar, or TLD registry.
  1698  	//   "TRANSFER_REJECTED" - The transfer was rejected by the current registrar.
  1699  	// Contact the current registrar for more information.
  1700  	//   "INVALID_REGISTRANT_EMAIL_ADDRESS" - The registrant email address cannot
  1701  	// be parsed from the domain's current public contact data.
  1702  	//   "DOMAIN_NOT_ELIGIBLE_FOR_TRANSFER" - The domain is not eligible for
  1703  	// transfer due requirements imposed by the current registrar or TLD registry.
  1704  	//   "TRANSFER_ALREADY_PENDING" - Another transfer is already pending for this
  1705  	// domain. The existing transfer attempt must expire or be cancelled in order
  1706  	// to proceed.
  1707  	TransferFailureReason string `json:"transferFailureReason,omitempty"`
  1708  
  1709  	// ServerResponse contains the HTTP response code and headers from the server.
  1710  	googleapi.ServerResponse `json:"-"`
  1711  	// ForceSendFields is a list of field names (e.g. "ContactSettings") to
  1712  	// unconditionally include in API requests. By default, fields with empty or
  1713  	// default values are omitted from API requests. See
  1714  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1715  	// details.
  1716  	ForceSendFields []string `json:"-"`
  1717  	// NullFields is a list of field names (e.g. "ContactSettings") to include in
  1718  	// API requests with the JSON null value. By default, fields with empty values
  1719  	// are omitted from API requests. See
  1720  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1721  	NullFields []string `json:"-"`
  1722  }
  1723  
  1724  func (s *Registration) MarshalJSON() ([]byte, error) {
  1725  	type NoMethod Registration
  1726  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1727  }
  1728  
  1729  // ResetAuthorizationCodeRequest: Request for the `ResetAuthorizationCode`
  1730  // method.
  1731  type ResetAuthorizationCodeRequest struct {
  1732  }
  1733  
  1734  // RetrieveImportableDomainsResponse: Deprecated: For more information, see
  1735  // Cloud Domains feature deprecation
  1736  // (https://cloud.google.com/domains/docs/deprecations/feature-deprecations).
  1737  // Response for the `RetrieveImportableDomains` method.
  1738  type RetrieveImportableDomainsResponse struct {
  1739  	// Domains: A list of domains that the calling user manages in Google Domains.
  1740  	Domains []*Domain `json:"domains,omitempty"`
  1741  	// NextPageToken: When present, there are more results to retrieve. Set
  1742  	// `page_token` to this value on a subsequent call to get the next page of
  1743  	// results.
  1744  	NextPageToken string `json:"nextPageToken,omitempty"`
  1745  
  1746  	// ServerResponse contains the HTTP response code and headers from the server.
  1747  	googleapi.ServerResponse `json:"-"`
  1748  	// ForceSendFields is a list of field names (e.g. "Domains") to unconditionally
  1749  	// include in API requests. By default, fields with empty or default values are
  1750  	// omitted from API requests. See
  1751  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1752  	// details.
  1753  	ForceSendFields []string `json:"-"`
  1754  	// NullFields is a list of field names (e.g. "Domains") to include in API
  1755  	// requests with the JSON null value. By default, fields with empty values are
  1756  	// omitted from API requests. See
  1757  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1758  	NullFields []string `json:"-"`
  1759  }
  1760  
  1761  func (s *RetrieveImportableDomainsResponse) MarshalJSON() ([]byte, error) {
  1762  	type NoMethod RetrieveImportableDomainsResponse
  1763  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1764  }
  1765  
  1766  // RetrieveRegisterParametersResponse: Response for the
  1767  // `RetrieveRegisterParameters` method.
  1768  type RetrieveRegisterParametersResponse struct {
  1769  	// RegisterParameters: Parameters to use when calling the `RegisterDomain`
  1770  	// method.
  1771  	RegisterParameters *RegisterParameters `json:"registerParameters,omitempty"`
  1772  
  1773  	// ServerResponse contains the HTTP response code and headers from the server.
  1774  	googleapi.ServerResponse `json:"-"`
  1775  	// ForceSendFields is a list of field names (e.g. "RegisterParameters") to
  1776  	// unconditionally include in API requests. By default, fields with empty or
  1777  	// default values are omitted from API requests. See
  1778  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1779  	// details.
  1780  	ForceSendFields []string `json:"-"`
  1781  	// NullFields is a list of field names (e.g. "RegisterParameters") to include
  1782  	// in API requests with the JSON null value. By default, fields with empty
  1783  	// values are omitted from API requests. See
  1784  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1785  	NullFields []string `json:"-"`
  1786  }
  1787  
  1788  func (s *RetrieveRegisterParametersResponse) MarshalJSON() ([]byte, error) {
  1789  	type NoMethod RetrieveRegisterParametersResponse
  1790  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1791  }
  1792  
  1793  // RetrieveTransferParametersResponse: Deprecated: For more information, see
  1794  // Cloud Domains feature deprecation
  1795  // (https://cloud.google.com/domains/docs/deprecations/feature-deprecations).
  1796  // Response for the `RetrieveTransferParameters` method.
  1797  type RetrieveTransferParametersResponse struct {
  1798  	// TransferParameters: Parameters to use when calling the `TransferDomain`
  1799  	// method.
  1800  	TransferParameters *TransferParameters `json:"transferParameters,omitempty"`
  1801  
  1802  	// ServerResponse contains the HTTP response code and headers from the server.
  1803  	googleapi.ServerResponse `json:"-"`
  1804  	// ForceSendFields is a list of field names (e.g. "TransferParameters") to
  1805  	// unconditionally include in API requests. By default, fields with empty or
  1806  	// default values are omitted from API requests. See
  1807  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1808  	// details.
  1809  	ForceSendFields []string `json:"-"`
  1810  	// NullFields is a list of field names (e.g. "TransferParameters") to include
  1811  	// in API requests with the JSON null value. By default, fields with empty
  1812  	// values are omitted from API requests. See
  1813  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1814  	NullFields []string `json:"-"`
  1815  }
  1816  
  1817  func (s *RetrieveTransferParametersResponse) MarshalJSON() ([]byte, error) {
  1818  	type NoMethod RetrieveTransferParametersResponse
  1819  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1820  }
  1821  
  1822  // SearchDomainsResponse: Response for the `SearchDomains` method.
  1823  type SearchDomainsResponse struct {
  1824  	// RegisterParameters: Results of the domain name search.
  1825  	RegisterParameters []*RegisterParameters `json:"registerParameters,omitempty"`
  1826  
  1827  	// ServerResponse contains the HTTP response code and headers from the server.
  1828  	googleapi.ServerResponse `json:"-"`
  1829  	// ForceSendFields is a list of field names (e.g. "RegisterParameters") to
  1830  	// unconditionally include in API requests. By default, fields with empty or
  1831  	// default values are omitted from API requests. See
  1832  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1833  	// details.
  1834  	ForceSendFields []string `json:"-"`
  1835  	// NullFields is a list of field names (e.g. "RegisterParameters") to include
  1836  	// in API requests with the JSON null value. By default, fields with empty
  1837  	// values are omitted from API requests. See
  1838  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1839  	NullFields []string `json:"-"`
  1840  }
  1841  
  1842  func (s *SearchDomainsResponse) MarshalJSON() ([]byte, error) {
  1843  	type NoMethod SearchDomainsResponse
  1844  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1845  }
  1846  
  1847  // SetIamPolicyRequest: Request message for `SetIamPolicy` method.
  1848  type SetIamPolicyRequest struct {
  1849  	// Policy: REQUIRED: The complete policy to be applied to the `resource`. The
  1850  	// size of the policy is limited to a few 10s of KB. An empty policy is a valid
  1851  	// policy but certain Google Cloud services (such as Projects) might reject
  1852  	// them.
  1853  	Policy *Policy `json:"policy,omitempty"`
  1854  	// UpdateMask: OPTIONAL: A FieldMask specifying which fields of the policy to
  1855  	// modify. Only the fields in the mask will be modified. If no mask is
  1856  	// provided, the following default mask is used: `paths: "bindings, etag"
  1857  	UpdateMask string `json:"updateMask,omitempty"`
  1858  	// ForceSendFields is a list of field names (e.g. "Policy") to unconditionally
  1859  	// include in API requests. By default, fields with empty or default values are
  1860  	// omitted from API requests. See
  1861  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1862  	// details.
  1863  	ForceSendFields []string `json:"-"`
  1864  	// NullFields is a list of field names (e.g. "Policy") to include in API
  1865  	// requests with the JSON null value. By default, fields with empty values are
  1866  	// omitted from API requests. See
  1867  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1868  	NullFields []string `json:"-"`
  1869  }
  1870  
  1871  func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) {
  1872  	type NoMethod SetIamPolicyRequest
  1873  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1874  }
  1875  
  1876  // Status: The `Status` type defines a logical error model that is suitable for
  1877  // different programming environments, including REST APIs and RPC APIs. It is
  1878  // used by gRPC (https://github.com/grpc). Each `Status` message contains three
  1879  // pieces of data: error code, error message, and error details. You can find
  1880  // out more about this error model and how to work with it in the API Design
  1881  // Guide (https://cloud.google.com/apis/design/errors).
  1882  type Status struct {
  1883  	// Code: The status code, which should be an enum value of google.rpc.Code.
  1884  	Code int64 `json:"code,omitempty"`
  1885  	// Details: A list of messages that carry the error details. There is a common
  1886  	// set of message types for APIs to use.
  1887  	Details []googleapi.RawMessage `json:"details,omitempty"`
  1888  	// Message: A developer-facing error message, which should be in English. Any
  1889  	// user-facing error message should be localized and sent in the
  1890  	// google.rpc.Status.details field, or localized by the client.
  1891  	Message string `json:"message,omitempty"`
  1892  	// ForceSendFields is a list of field names (e.g. "Code") to unconditionally
  1893  	// include in API requests. By default, fields with empty or default values are
  1894  	// omitted from API requests. See
  1895  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1896  	// details.
  1897  	ForceSendFields []string `json:"-"`
  1898  	// NullFields is a list of field names (e.g. "Code") to include in API requests
  1899  	// with the JSON null value. By default, fields with empty values are omitted
  1900  	// from API requests. See
  1901  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1902  	NullFields []string `json:"-"`
  1903  }
  1904  
  1905  func (s *Status) MarshalJSON() ([]byte, error) {
  1906  	type NoMethod Status
  1907  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1908  }
  1909  
  1910  // TestIamPermissionsRequest: Request message for `TestIamPermissions` method.
  1911  type TestIamPermissionsRequest struct {
  1912  	// Permissions: The set of permissions to check for the `resource`. Permissions
  1913  	// with wildcards (such as `*` or `storage.*`) are not allowed. For more
  1914  	// information see IAM Overview
  1915  	// (https://cloud.google.com/iam/docs/overview#permissions).
  1916  	Permissions []string `json:"permissions,omitempty"`
  1917  	// ForceSendFields is a list of field names (e.g. "Permissions") to
  1918  	// unconditionally include in API requests. By default, fields with empty or
  1919  	// default values are omitted from API requests. See
  1920  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1921  	// details.
  1922  	ForceSendFields []string `json:"-"`
  1923  	// NullFields is a list of field names (e.g. "Permissions") to include in API
  1924  	// requests with the JSON null value. By default, fields with empty values are
  1925  	// omitted from API requests. See
  1926  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1927  	NullFields []string `json:"-"`
  1928  }
  1929  
  1930  func (s *TestIamPermissionsRequest) MarshalJSON() ([]byte, error) {
  1931  	type NoMethod TestIamPermissionsRequest
  1932  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1933  }
  1934  
  1935  // TestIamPermissionsResponse: Response message for `TestIamPermissions`
  1936  // method.
  1937  type TestIamPermissionsResponse struct {
  1938  	// Permissions: A subset of `TestPermissionsRequest.permissions` that the
  1939  	// caller is allowed.
  1940  	Permissions []string `json:"permissions,omitempty"`
  1941  
  1942  	// ServerResponse contains the HTTP response code and headers from the server.
  1943  	googleapi.ServerResponse `json:"-"`
  1944  	// ForceSendFields is a list of field names (e.g. "Permissions") to
  1945  	// unconditionally include in API requests. By default, fields with empty or
  1946  	// default values are omitted from API requests. See
  1947  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1948  	// details.
  1949  	ForceSendFields []string `json:"-"`
  1950  	// NullFields is a list of field names (e.g. "Permissions") to include in API
  1951  	// requests with the JSON null value. By default, fields with empty values are
  1952  	// omitted from API requests. See
  1953  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1954  	NullFields []string `json:"-"`
  1955  }
  1956  
  1957  func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) {
  1958  	type NoMethod TestIamPermissionsResponse
  1959  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1960  }
  1961  
  1962  // TransferDomainRequest: Deprecated: For more information, see Cloud Domains
  1963  // feature deprecation
  1964  // (https://cloud.google.com/domains/docs/deprecations/feature-deprecations).
  1965  // Request for the `TransferDomain` method.
  1966  type TransferDomainRequest struct {
  1967  	// AuthorizationCode: The domain's transfer authorization code. You can obtain
  1968  	// this from the domain's current registrar.
  1969  	AuthorizationCode *AuthorizationCode `json:"authorizationCode,omitempty"`
  1970  	// ContactNotices: The list of contact notices that you acknowledge. The
  1971  	// notices needed here depend on the values specified in
  1972  	// `registration.contact_settings`.
  1973  	//
  1974  	// Possible values:
  1975  	//   "CONTACT_NOTICE_UNSPECIFIED" - The notice is undefined.
  1976  	//   "PUBLIC_CONTACT_DATA_ACKNOWLEDGEMENT" - Required when setting the
  1977  	// `privacy` field of `ContactSettings` to `PUBLIC_CONTACT_DATA`, which exposes
  1978  	// contact data publicly.
  1979  	ContactNotices []string `json:"contactNotices,omitempty"`
  1980  	// Registration: Required. The complete `Registration` resource to be created.
  1981  	// You can leave `registration.dns_settings` unset to import the domain's
  1982  	// current DNS configuration from its current registrar. Use this option only
  1983  	// if you are sure that the domain's current DNS service does not cease upon
  1984  	// transfer, as is often the case for DNS services provided for free by the
  1985  	// registrar.
  1986  	Registration *Registration `json:"registration,omitempty"`
  1987  	// ValidateOnly: Validate the request without actually transferring the domain.
  1988  	ValidateOnly bool `json:"validateOnly,omitempty"`
  1989  	// YearlyPrice: Required. Acknowledgement of the price to transfer or renew the
  1990  	// domain for one year. Call `RetrieveTransferParameters` to obtain the price,
  1991  	// which you must acknowledge.
  1992  	YearlyPrice *Money `json:"yearlyPrice,omitempty"`
  1993  	// ForceSendFields is a list of field names (e.g. "AuthorizationCode") to
  1994  	// unconditionally include in API requests. By default, fields with empty or
  1995  	// default values are omitted from API requests. See
  1996  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1997  	// details.
  1998  	ForceSendFields []string `json:"-"`
  1999  	// NullFields is a list of field names (e.g. "AuthorizationCode") to include in
  2000  	// API requests with the JSON null value. By default, fields with empty values
  2001  	// are omitted from API requests. See
  2002  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2003  	NullFields []string `json:"-"`
  2004  }
  2005  
  2006  func (s *TransferDomainRequest) MarshalJSON() ([]byte, error) {
  2007  	type NoMethod TransferDomainRequest
  2008  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2009  }
  2010  
  2011  // TransferParameters: Deprecated: For more information, see Cloud Domains
  2012  // feature deprecation
  2013  // (https://cloud.google.com/domains/docs/deprecations/feature-deprecations).
  2014  // Parameters required to transfer a domain from another registrar.
  2015  type TransferParameters struct {
  2016  	// CurrentRegistrar: The registrar that currently manages the domain.
  2017  	CurrentRegistrar string `json:"currentRegistrar,omitempty"`
  2018  	// CurrentRegistrarUri: The URL of the registrar that currently manages the
  2019  	// domain.
  2020  	CurrentRegistrarUri string `json:"currentRegistrarUri,omitempty"`
  2021  	// DomainName: The domain name. Unicode domain names are expressed in Punycode
  2022  	// format.
  2023  	DomainName string `json:"domainName,omitempty"`
  2024  	// NameServers: The name servers that currently store the configuration of the
  2025  	// domain.
  2026  	NameServers []string `json:"nameServers,omitempty"`
  2027  	// SupportedPrivacy: Contact privacy options that the domain supports.
  2028  	//
  2029  	// Possible values:
  2030  	//   "CONTACT_PRIVACY_UNSPECIFIED" - The contact privacy settings are
  2031  	// undefined.
  2032  	//   "PUBLIC_CONTACT_DATA" - All the data from `ContactSettings` is publicly
  2033  	// available. When setting this option, you must also provide a
  2034  	// `PUBLIC_CONTACT_DATA_ACKNOWLEDGEMENT` in the `contact_notices` field of the
  2035  	// request.
  2036  	//   "PRIVATE_CONTACT_DATA" - Deprecated: For more information, see [Cloud
  2037  	// Domains feature
  2038  	// deprecation](https://cloud.google.com/domains/docs/deprecations/feature-depre
  2039  	// cations). None of the data from `ContactSettings` is publicly available.
  2040  	// Instead, proxy contact data is published for your domain. Email sent to the
  2041  	// proxy email address is forwarded to the registrant's email address. Cloud
  2042  	// Domains provides this privacy proxy service at no additional cost.
  2043  	//   "REDACTED_CONTACT_DATA" - The organization name (if provided) and limited
  2044  	// non-identifying data from `ContactSettings` is available to the public (e.g.
  2045  	// country and state). The remaining data is marked as `REDACTED FOR PRIVACY`
  2046  	// in the WHOIS database. The actual information redacted depends on the
  2047  	// domain. For details, see [the registration privacy
  2048  	// article](https://support.google.com/domains/answer/3251242).
  2049  	SupportedPrivacy []string `json:"supportedPrivacy,omitempty"`
  2050  	// TransferLockState: Indicates whether the domain is protected by a transfer
  2051  	// lock. For a transfer to succeed, this must show `UNLOCKED`. To unlock a
  2052  	// domain, go to its current registrar.
  2053  	//
  2054  	// Possible values:
  2055  	//   "TRANSFER_LOCK_STATE_UNSPECIFIED" - The state is unspecified.
  2056  	//   "UNLOCKED" - The domain is unlocked and can be transferred to another
  2057  	// registrar.
  2058  	//   "LOCKED" - The domain is locked and cannot be transferred to another
  2059  	// registrar.
  2060  	TransferLockState string `json:"transferLockState,omitempty"`
  2061  	// YearlyPrice: Price to transfer or renew the domain for one year.
  2062  	YearlyPrice *Money `json:"yearlyPrice,omitempty"`
  2063  	// ForceSendFields is a list of field names (e.g. "CurrentRegistrar") to
  2064  	// unconditionally include in API requests. By default, fields with empty or
  2065  	// default values are omitted from API requests. See
  2066  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2067  	// details.
  2068  	ForceSendFields []string `json:"-"`
  2069  	// NullFields is a list of field names (e.g. "CurrentRegistrar") to include in
  2070  	// API requests with the JSON null value. By default, fields with empty values
  2071  	// are omitted from API requests. See
  2072  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2073  	NullFields []string `json:"-"`
  2074  }
  2075  
  2076  func (s *TransferParameters) MarshalJSON() ([]byte, error) {
  2077  	type NoMethod TransferParameters
  2078  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2079  }
  2080  
  2081  type ProjectsLocationsGetCall struct {
  2082  	s            *Service
  2083  	name         string
  2084  	urlParams_   gensupport.URLParams
  2085  	ifNoneMatch_ string
  2086  	ctx_         context.Context
  2087  	header_      http.Header
  2088  }
  2089  
  2090  // Get: Gets information about a location.
  2091  //
  2092  // - name: Resource name for the location.
  2093  func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall {
  2094  	c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2095  	c.name = name
  2096  	return c
  2097  }
  2098  
  2099  // Fields allows partial responses to be retrieved. See
  2100  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2101  // details.
  2102  func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall {
  2103  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2104  	return c
  2105  }
  2106  
  2107  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2108  // object's ETag matches the given value. This is useful for getting updates
  2109  // only after the object has changed since the last request.
  2110  func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall {
  2111  	c.ifNoneMatch_ = entityTag
  2112  	return c
  2113  }
  2114  
  2115  // Context sets the context to be used in this call's Do method.
  2116  func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall {
  2117  	c.ctx_ = ctx
  2118  	return c
  2119  }
  2120  
  2121  // Header returns a http.Header that can be modified by the caller to add
  2122  // headers to the request.
  2123  func (c *ProjectsLocationsGetCall) Header() http.Header {
  2124  	if c.header_ == nil {
  2125  		c.header_ = make(http.Header)
  2126  	}
  2127  	return c.header_
  2128  }
  2129  
  2130  func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) {
  2131  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2132  	if c.ifNoneMatch_ != "" {
  2133  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2134  	}
  2135  	var body io.Reader = nil
  2136  	c.urlParams_.Set("alt", alt)
  2137  	c.urlParams_.Set("prettyPrint", "false")
  2138  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+name}")
  2139  	urls += "?" + c.urlParams_.Encode()
  2140  	req, err := http.NewRequest("GET", urls, body)
  2141  	if err != nil {
  2142  		return nil, err
  2143  	}
  2144  	req.Header = reqHeaders
  2145  	googleapi.Expand(req.URL, map[string]string{
  2146  		"name": c.name,
  2147  	})
  2148  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2149  }
  2150  
  2151  // Do executes the "domains.projects.locations.get" call.
  2152  // Any non-2xx status code is an error. Response headers are in either
  2153  // *Location.ServerResponse.Header or (if a response was returned at all) in
  2154  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2155  // whether the returned error was because http.StatusNotModified was returned.
  2156  func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) {
  2157  	gensupport.SetOptions(c.urlParams_, opts...)
  2158  	res, err := c.doRequest("json")
  2159  	if res != nil && res.StatusCode == http.StatusNotModified {
  2160  		if res.Body != nil {
  2161  			res.Body.Close()
  2162  		}
  2163  		return nil, gensupport.WrapError(&googleapi.Error{
  2164  			Code:   res.StatusCode,
  2165  			Header: res.Header,
  2166  		})
  2167  	}
  2168  	if err != nil {
  2169  		return nil, err
  2170  	}
  2171  	defer googleapi.CloseBody(res)
  2172  	if err := googleapi.CheckResponse(res); err != nil {
  2173  		return nil, gensupport.WrapError(err)
  2174  	}
  2175  	ret := &Location{
  2176  		ServerResponse: googleapi.ServerResponse{
  2177  			Header:         res.Header,
  2178  			HTTPStatusCode: res.StatusCode,
  2179  		},
  2180  	}
  2181  	target := &ret
  2182  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2183  		return nil, err
  2184  	}
  2185  	return ret, nil
  2186  }
  2187  
  2188  type ProjectsLocationsListCall struct {
  2189  	s            *Service
  2190  	name         string
  2191  	urlParams_   gensupport.URLParams
  2192  	ifNoneMatch_ string
  2193  	ctx_         context.Context
  2194  	header_      http.Header
  2195  }
  2196  
  2197  // List: Lists information about the supported locations for this service.
  2198  //
  2199  // - name: The resource that owns the locations collection, if applicable.
  2200  func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall {
  2201  	c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2202  	c.name = name
  2203  	return c
  2204  }
  2205  
  2206  // Filter sets the optional parameter "filter": A filter to narrow down results
  2207  // to a preferred subset. The filtering language accepts strings like
  2208  // "displayName=tokyo", and is documented in more detail in AIP-160
  2209  // (https://google.aip.dev/160).
  2210  func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall {
  2211  	c.urlParams_.Set("filter", filter)
  2212  	return c
  2213  }
  2214  
  2215  // PageSize sets the optional parameter "pageSize": The maximum number of
  2216  // results to return. If not set, the service selects a default.
  2217  func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall {
  2218  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  2219  	return c
  2220  }
  2221  
  2222  // PageToken sets the optional parameter "pageToken": A page token received
  2223  // from the `next_page_token` field in the response. Send that page token to
  2224  // receive the subsequent page.
  2225  func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall {
  2226  	c.urlParams_.Set("pageToken", pageToken)
  2227  	return c
  2228  }
  2229  
  2230  // Fields allows partial responses to be retrieved. See
  2231  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2232  // details.
  2233  func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall {
  2234  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2235  	return c
  2236  }
  2237  
  2238  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2239  // object's ETag matches the given value. This is useful for getting updates
  2240  // only after the object has changed since the last request.
  2241  func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall {
  2242  	c.ifNoneMatch_ = entityTag
  2243  	return c
  2244  }
  2245  
  2246  // Context sets the context to be used in this call's Do method.
  2247  func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall {
  2248  	c.ctx_ = ctx
  2249  	return c
  2250  }
  2251  
  2252  // Header returns a http.Header that can be modified by the caller to add
  2253  // headers to the request.
  2254  func (c *ProjectsLocationsListCall) Header() http.Header {
  2255  	if c.header_ == nil {
  2256  		c.header_ = make(http.Header)
  2257  	}
  2258  	return c.header_
  2259  }
  2260  
  2261  func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) {
  2262  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2263  	if c.ifNoneMatch_ != "" {
  2264  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2265  	}
  2266  	var body io.Reader = nil
  2267  	c.urlParams_.Set("alt", alt)
  2268  	c.urlParams_.Set("prettyPrint", "false")
  2269  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+name}/locations")
  2270  	urls += "?" + c.urlParams_.Encode()
  2271  	req, err := http.NewRequest("GET", urls, body)
  2272  	if err != nil {
  2273  		return nil, err
  2274  	}
  2275  	req.Header = reqHeaders
  2276  	googleapi.Expand(req.URL, map[string]string{
  2277  		"name": c.name,
  2278  	})
  2279  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2280  }
  2281  
  2282  // Do executes the "domains.projects.locations.list" call.
  2283  // Any non-2xx status code is an error. Response headers are in either
  2284  // *ListLocationsResponse.ServerResponse.Header or (if a response was returned
  2285  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  2286  // check whether the returned error was because http.StatusNotModified was
  2287  // returned.
  2288  func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) {
  2289  	gensupport.SetOptions(c.urlParams_, opts...)
  2290  	res, err := c.doRequest("json")
  2291  	if res != nil && res.StatusCode == http.StatusNotModified {
  2292  		if res.Body != nil {
  2293  			res.Body.Close()
  2294  		}
  2295  		return nil, gensupport.WrapError(&googleapi.Error{
  2296  			Code:   res.StatusCode,
  2297  			Header: res.Header,
  2298  		})
  2299  	}
  2300  	if err != nil {
  2301  		return nil, err
  2302  	}
  2303  	defer googleapi.CloseBody(res)
  2304  	if err := googleapi.CheckResponse(res); err != nil {
  2305  		return nil, gensupport.WrapError(err)
  2306  	}
  2307  	ret := &ListLocationsResponse{
  2308  		ServerResponse: googleapi.ServerResponse{
  2309  			Header:         res.Header,
  2310  			HTTPStatusCode: res.StatusCode,
  2311  		},
  2312  	}
  2313  	target := &ret
  2314  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2315  		return nil, err
  2316  	}
  2317  	return ret, nil
  2318  }
  2319  
  2320  // Pages invokes f for each page of results.
  2321  // A non-nil error returned from f will halt the iteration.
  2322  // The provided context supersedes any context provided to the Context method.
  2323  func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error {
  2324  	c.ctx_ = ctx
  2325  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  2326  	for {
  2327  		x, err := c.Do()
  2328  		if err != nil {
  2329  			return err
  2330  		}
  2331  		if err := f(x); err != nil {
  2332  			return err
  2333  		}
  2334  		if x.NextPageToken == "" {
  2335  			return nil
  2336  		}
  2337  		c.PageToken(x.NextPageToken)
  2338  	}
  2339  }
  2340  
  2341  type ProjectsLocationsOperationsGetCall struct {
  2342  	s            *Service
  2343  	name         string
  2344  	urlParams_   gensupport.URLParams
  2345  	ifNoneMatch_ string
  2346  	ctx_         context.Context
  2347  	header_      http.Header
  2348  }
  2349  
  2350  // Get: Gets the latest state of a long-running operation. Clients can use this
  2351  // method to poll the operation result at intervals as recommended by the API
  2352  // service.
  2353  //
  2354  // - name: The name of the operation resource.
  2355  func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall {
  2356  	c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2357  	c.name = name
  2358  	return c
  2359  }
  2360  
  2361  // Fields allows partial responses to be retrieved. See
  2362  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2363  // details.
  2364  func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall {
  2365  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2366  	return c
  2367  }
  2368  
  2369  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2370  // object's ETag matches the given value. This is useful for getting updates
  2371  // only after the object has changed since the last request.
  2372  func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall {
  2373  	c.ifNoneMatch_ = entityTag
  2374  	return c
  2375  }
  2376  
  2377  // Context sets the context to be used in this call's Do method.
  2378  func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall {
  2379  	c.ctx_ = ctx
  2380  	return c
  2381  }
  2382  
  2383  // Header returns a http.Header that can be modified by the caller to add
  2384  // headers to the request.
  2385  func (c *ProjectsLocationsOperationsGetCall) Header() http.Header {
  2386  	if c.header_ == nil {
  2387  		c.header_ = make(http.Header)
  2388  	}
  2389  	return c.header_
  2390  }
  2391  
  2392  func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
  2393  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2394  	if c.ifNoneMatch_ != "" {
  2395  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2396  	}
  2397  	var body io.Reader = nil
  2398  	c.urlParams_.Set("alt", alt)
  2399  	c.urlParams_.Set("prettyPrint", "false")
  2400  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+name}")
  2401  	urls += "?" + c.urlParams_.Encode()
  2402  	req, err := http.NewRequest("GET", urls, body)
  2403  	if err != nil {
  2404  		return nil, err
  2405  	}
  2406  	req.Header = reqHeaders
  2407  	googleapi.Expand(req.URL, map[string]string{
  2408  		"name": c.name,
  2409  	})
  2410  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2411  }
  2412  
  2413  // Do executes the "domains.projects.locations.operations.get" call.
  2414  // Any non-2xx status code is an error. Response headers are in either
  2415  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  2416  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2417  // whether the returned error was because http.StatusNotModified was returned.
  2418  func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  2419  	gensupport.SetOptions(c.urlParams_, opts...)
  2420  	res, err := c.doRequest("json")
  2421  	if res != nil && res.StatusCode == http.StatusNotModified {
  2422  		if res.Body != nil {
  2423  			res.Body.Close()
  2424  		}
  2425  		return nil, gensupport.WrapError(&googleapi.Error{
  2426  			Code:   res.StatusCode,
  2427  			Header: res.Header,
  2428  		})
  2429  	}
  2430  	if err != nil {
  2431  		return nil, err
  2432  	}
  2433  	defer googleapi.CloseBody(res)
  2434  	if err := googleapi.CheckResponse(res); err != nil {
  2435  		return nil, gensupport.WrapError(err)
  2436  	}
  2437  	ret := &Operation{
  2438  		ServerResponse: googleapi.ServerResponse{
  2439  			Header:         res.Header,
  2440  			HTTPStatusCode: res.StatusCode,
  2441  		},
  2442  	}
  2443  	target := &ret
  2444  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2445  		return nil, err
  2446  	}
  2447  	return ret, nil
  2448  }
  2449  
  2450  type ProjectsLocationsOperationsListCall struct {
  2451  	s            *Service
  2452  	name         string
  2453  	urlParams_   gensupport.URLParams
  2454  	ifNoneMatch_ string
  2455  	ctx_         context.Context
  2456  	header_      http.Header
  2457  }
  2458  
  2459  // List: Lists operations that match the specified filter in the request. If
  2460  // the server doesn't support this method, it returns `UNIMPLEMENTED`.
  2461  //
  2462  // - name: The name of the operation's parent resource.
  2463  func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall {
  2464  	c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2465  	c.name = name
  2466  	return c
  2467  }
  2468  
  2469  // Filter sets the optional parameter "filter": The standard list filter.
  2470  func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall {
  2471  	c.urlParams_.Set("filter", filter)
  2472  	return c
  2473  }
  2474  
  2475  // PageSize sets the optional parameter "pageSize": The standard list page
  2476  // size.
  2477  func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall {
  2478  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  2479  	return c
  2480  }
  2481  
  2482  // PageToken sets the optional parameter "pageToken": The standard list page
  2483  // token.
  2484  func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall {
  2485  	c.urlParams_.Set("pageToken", pageToken)
  2486  	return c
  2487  }
  2488  
  2489  // Fields allows partial responses to be retrieved. See
  2490  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2491  // details.
  2492  func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall {
  2493  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2494  	return c
  2495  }
  2496  
  2497  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2498  // object's ETag matches the given value. This is useful for getting updates
  2499  // only after the object has changed since the last request.
  2500  func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall {
  2501  	c.ifNoneMatch_ = entityTag
  2502  	return c
  2503  }
  2504  
  2505  // Context sets the context to be used in this call's Do method.
  2506  func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall {
  2507  	c.ctx_ = ctx
  2508  	return c
  2509  }
  2510  
  2511  // Header returns a http.Header that can be modified by the caller to add
  2512  // headers to the request.
  2513  func (c *ProjectsLocationsOperationsListCall) Header() http.Header {
  2514  	if c.header_ == nil {
  2515  		c.header_ = make(http.Header)
  2516  	}
  2517  	return c.header_
  2518  }
  2519  
  2520  func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) {
  2521  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2522  	if c.ifNoneMatch_ != "" {
  2523  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2524  	}
  2525  	var body io.Reader = nil
  2526  	c.urlParams_.Set("alt", alt)
  2527  	c.urlParams_.Set("prettyPrint", "false")
  2528  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+name}/operations")
  2529  	urls += "?" + c.urlParams_.Encode()
  2530  	req, err := http.NewRequest("GET", urls, body)
  2531  	if err != nil {
  2532  		return nil, err
  2533  	}
  2534  	req.Header = reqHeaders
  2535  	googleapi.Expand(req.URL, map[string]string{
  2536  		"name": c.name,
  2537  	})
  2538  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2539  }
  2540  
  2541  // Do executes the "domains.projects.locations.operations.list" call.
  2542  // Any non-2xx status code is an error. Response headers are in either
  2543  // *ListOperationsResponse.ServerResponse.Header or (if a response was returned
  2544  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  2545  // check whether the returned error was because http.StatusNotModified was
  2546  // returned.
  2547  func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
  2548  	gensupport.SetOptions(c.urlParams_, opts...)
  2549  	res, err := c.doRequest("json")
  2550  	if res != nil && res.StatusCode == http.StatusNotModified {
  2551  		if res.Body != nil {
  2552  			res.Body.Close()
  2553  		}
  2554  		return nil, gensupport.WrapError(&googleapi.Error{
  2555  			Code:   res.StatusCode,
  2556  			Header: res.Header,
  2557  		})
  2558  	}
  2559  	if err != nil {
  2560  		return nil, err
  2561  	}
  2562  	defer googleapi.CloseBody(res)
  2563  	if err := googleapi.CheckResponse(res); err != nil {
  2564  		return nil, gensupport.WrapError(err)
  2565  	}
  2566  	ret := &ListOperationsResponse{
  2567  		ServerResponse: googleapi.ServerResponse{
  2568  			Header:         res.Header,
  2569  			HTTPStatusCode: res.StatusCode,
  2570  		},
  2571  	}
  2572  	target := &ret
  2573  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2574  		return nil, err
  2575  	}
  2576  	return ret, nil
  2577  }
  2578  
  2579  // Pages invokes f for each page of results.
  2580  // A non-nil error returned from f will halt the iteration.
  2581  // The provided context supersedes any context provided to the Context method.
  2582  func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
  2583  	c.ctx_ = ctx
  2584  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  2585  	for {
  2586  		x, err := c.Do()
  2587  		if err != nil {
  2588  			return err
  2589  		}
  2590  		if err := f(x); err != nil {
  2591  			return err
  2592  		}
  2593  		if x.NextPageToken == "" {
  2594  			return nil
  2595  		}
  2596  		c.PageToken(x.NextPageToken)
  2597  	}
  2598  }
  2599  
  2600  type ProjectsLocationsRegistrationsConfigureContactSettingsCall struct {
  2601  	s                               *Service
  2602  	registration                    string
  2603  	configurecontactsettingsrequest *ConfigureContactSettingsRequest
  2604  	urlParams_                      gensupport.URLParams
  2605  	ctx_                            context.Context
  2606  	header_                         http.Header
  2607  }
  2608  
  2609  // ConfigureContactSettings: Updates a `Registration`'s contact settings. Some
  2610  // changes require confirmation by the domain's registrant contact . Caution:
  2611  // Please consider carefully any changes to contact privacy settings when
  2612  // changing from `REDACTED_CONTACT_DATA` to `PUBLIC_CONTACT_DATA.` There may be
  2613  // a delay in reflecting updates you make to registrant contact information
  2614  // such that any changes you make to contact privacy (including from
  2615  // `REDACTED_CONTACT_DATA` to `PUBLIC_CONTACT_DATA`) will be applied without
  2616  // delay but changes to registrant contact information may take a limited time
  2617  // to be publicized. This means that changes to contact privacy from
  2618  // `REDACTED_CONTACT_DATA` to `PUBLIC_CONTACT_DATA` may make the previous
  2619  // registrant contact data public until the modified registrant contact details
  2620  // are published.
  2621  //
  2622  //   - registration: The name of the `Registration` whose contact settings are
  2623  //     being updated, in the format `projects/*/locations/*/registrations/*`.
  2624  func (r *ProjectsLocationsRegistrationsService) ConfigureContactSettings(registration string, configurecontactsettingsrequest *ConfigureContactSettingsRequest) *ProjectsLocationsRegistrationsConfigureContactSettingsCall {
  2625  	c := &ProjectsLocationsRegistrationsConfigureContactSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2626  	c.registration = registration
  2627  	c.configurecontactsettingsrequest = configurecontactsettingsrequest
  2628  	return c
  2629  }
  2630  
  2631  // Fields allows partial responses to be retrieved. See
  2632  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2633  // details.
  2634  func (c *ProjectsLocationsRegistrationsConfigureContactSettingsCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistrationsConfigureContactSettingsCall {
  2635  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2636  	return c
  2637  }
  2638  
  2639  // Context sets the context to be used in this call's Do method.
  2640  func (c *ProjectsLocationsRegistrationsConfigureContactSettingsCall) Context(ctx context.Context) *ProjectsLocationsRegistrationsConfigureContactSettingsCall {
  2641  	c.ctx_ = ctx
  2642  	return c
  2643  }
  2644  
  2645  // Header returns a http.Header that can be modified by the caller to add
  2646  // headers to the request.
  2647  func (c *ProjectsLocationsRegistrationsConfigureContactSettingsCall) Header() http.Header {
  2648  	if c.header_ == nil {
  2649  		c.header_ = make(http.Header)
  2650  	}
  2651  	return c.header_
  2652  }
  2653  
  2654  func (c *ProjectsLocationsRegistrationsConfigureContactSettingsCall) doRequest(alt string) (*http.Response, error) {
  2655  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  2656  	var body io.Reader = nil
  2657  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.configurecontactsettingsrequest)
  2658  	if err != nil {
  2659  		return nil, err
  2660  	}
  2661  	c.urlParams_.Set("alt", alt)
  2662  	c.urlParams_.Set("prettyPrint", "false")
  2663  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+registration}:configureContactSettings")
  2664  	urls += "?" + c.urlParams_.Encode()
  2665  	req, err := http.NewRequest("POST", urls, body)
  2666  	if err != nil {
  2667  		return nil, err
  2668  	}
  2669  	req.Header = reqHeaders
  2670  	googleapi.Expand(req.URL, map[string]string{
  2671  		"registration": c.registration,
  2672  	})
  2673  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2674  }
  2675  
  2676  // Do executes the "domains.projects.locations.registrations.configureContactSettings" call.
  2677  // Any non-2xx status code is an error. Response headers are in either
  2678  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  2679  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2680  // whether the returned error was because http.StatusNotModified was returned.
  2681  func (c *ProjectsLocationsRegistrationsConfigureContactSettingsCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  2682  	gensupport.SetOptions(c.urlParams_, opts...)
  2683  	res, err := c.doRequest("json")
  2684  	if res != nil && res.StatusCode == http.StatusNotModified {
  2685  		if res.Body != nil {
  2686  			res.Body.Close()
  2687  		}
  2688  		return nil, gensupport.WrapError(&googleapi.Error{
  2689  			Code:   res.StatusCode,
  2690  			Header: res.Header,
  2691  		})
  2692  	}
  2693  	if err != nil {
  2694  		return nil, err
  2695  	}
  2696  	defer googleapi.CloseBody(res)
  2697  	if err := googleapi.CheckResponse(res); err != nil {
  2698  		return nil, gensupport.WrapError(err)
  2699  	}
  2700  	ret := &Operation{
  2701  		ServerResponse: googleapi.ServerResponse{
  2702  			Header:         res.Header,
  2703  			HTTPStatusCode: res.StatusCode,
  2704  		},
  2705  	}
  2706  	target := &ret
  2707  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2708  		return nil, err
  2709  	}
  2710  	return ret, nil
  2711  }
  2712  
  2713  type ProjectsLocationsRegistrationsConfigureDnsSettingsCall struct {
  2714  	s                           *Service
  2715  	registration                string
  2716  	configurednssettingsrequest *ConfigureDnsSettingsRequest
  2717  	urlParams_                  gensupport.URLParams
  2718  	ctx_                        context.Context
  2719  	header_                     http.Header
  2720  }
  2721  
  2722  // ConfigureDnsSettings: Updates a `Registration`'s DNS settings.
  2723  //
  2724  //   - registration: The name of the `Registration` whose DNS settings are being
  2725  //     updated, in the format `projects/*/locations/*/registrations/*`.
  2726  func (r *ProjectsLocationsRegistrationsService) ConfigureDnsSettings(registration string, configurednssettingsrequest *ConfigureDnsSettingsRequest) *ProjectsLocationsRegistrationsConfigureDnsSettingsCall {
  2727  	c := &ProjectsLocationsRegistrationsConfigureDnsSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2728  	c.registration = registration
  2729  	c.configurednssettingsrequest = configurednssettingsrequest
  2730  	return c
  2731  }
  2732  
  2733  // Fields allows partial responses to be retrieved. See
  2734  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2735  // details.
  2736  func (c *ProjectsLocationsRegistrationsConfigureDnsSettingsCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistrationsConfigureDnsSettingsCall {
  2737  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2738  	return c
  2739  }
  2740  
  2741  // Context sets the context to be used in this call's Do method.
  2742  func (c *ProjectsLocationsRegistrationsConfigureDnsSettingsCall) Context(ctx context.Context) *ProjectsLocationsRegistrationsConfigureDnsSettingsCall {
  2743  	c.ctx_ = ctx
  2744  	return c
  2745  }
  2746  
  2747  // Header returns a http.Header that can be modified by the caller to add
  2748  // headers to the request.
  2749  func (c *ProjectsLocationsRegistrationsConfigureDnsSettingsCall) Header() http.Header {
  2750  	if c.header_ == nil {
  2751  		c.header_ = make(http.Header)
  2752  	}
  2753  	return c.header_
  2754  }
  2755  
  2756  func (c *ProjectsLocationsRegistrationsConfigureDnsSettingsCall) doRequest(alt string) (*http.Response, error) {
  2757  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  2758  	var body io.Reader = nil
  2759  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.configurednssettingsrequest)
  2760  	if err != nil {
  2761  		return nil, err
  2762  	}
  2763  	c.urlParams_.Set("alt", alt)
  2764  	c.urlParams_.Set("prettyPrint", "false")
  2765  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+registration}:configureDnsSettings")
  2766  	urls += "?" + c.urlParams_.Encode()
  2767  	req, err := http.NewRequest("POST", urls, body)
  2768  	if err != nil {
  2769  		return nil, err
  2770  	}
  2771  	req.Header = reqHeaders
  2772  	googleapi.Expand(req.URL, map[string]string{
  2773  		"registration": c.registration,
  2774  	})
  2775  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2776  }
  2777  
  2778  // Do executes the "domains.projects.locations.registrations.configureDnsSettings" call.
  2779  // Any non-2xx status code is an error. Response headers are in either
  2780  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  2781  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2782  // whether the returned error was because http.StatusNotModified was returned.
  2783  func (c *ProjectsLocationsRegistrationsConfigureDnsSettingsCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  2784  	gensupport.SetOptions(c.urlParams_, opts...)
  2785  	res, err := c.doRequest("json")
  2786  	if res != nil && res.StatusCode == http.StatusNotModified {
  2787  		if res.Body != nil {
  2788  			res.Body.Close()
  2789  		}
  2790  		return nil, gensupport.WrapError(&googleapi.Error{
  2791  			Code:   res.StatusCode,
  2792  			Header: res.Header,
  2793  		})
  2794  	}
  2795  	if err != nil {
  2796  		return nil, err
  2797  	}
  2798  	defer googleapi.CloseBody(res)
  2799  	if err := googleapi.CheckResponse(res); err != nil {
  2800  		return nil, gensupport.WrapError(err)
  2801  	}
  2802  	ret := &Operation{
  2803  		ServerResponse: googleapi.ServerResponse{
  2804  			Header:         res.Header,
  2805  			HTTPStatusCode: res.StatusCode,
  2806  		},
  2807  	}
  2808  	target := &ret
  2809  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2810  		return nil, err
  2811  	}
  2812  	return ret, nil
  2813  }
  2814  
  2815  type ProjectsLocationsRegistrationsConfigureManagementSettingsCall struct {
  2816  	s                                  *Service
  2817  	registration                       string
  2818  	configuremanagementsettingsrequest *ConfigureManagementSettingsRequest
  2819  	urlParams_                         gensupport.URLParams
  2820  	ctx_                               context.Context
  2821  	header_                            http.Header
  2822  }
  2823  
  2824  // ConfigureManagementSettings: Updates a `Registration`'s management settings.
  2825  //
  2826  //   - registration: The name of the `Registration` whose management settings are
  2827  //     being updated, in the format `projects/*/locations/*/registrations/*`.
  2828  func (r *ProjectsLocationsRegistrationsService) ConfigureManagementSettings(registration string, configuremanagementsettingsrequest *ConfigureManagementSettingsRequest) *ProjectsLocationsRegistrationsConfigureManagementSettingsCall {
  2829  	c := &ProjectsLocationsRegistrationsConfigureManagementSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2830  	c.registration = registration
  2831  	c.configuremanagementsettingsrequest = configuremanagementsettingsrequest
  2832  	return c
  2833  }
  2834  
  2835  // Fields allows partial responses to be retrieved. See
  2836  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2837  // details.
  2838  func (c *ProjectsLocationsRegistrationsConfigureManagementSettingsCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistrationsConfigureManagementSettingsCall {
  2839  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2840  	return c
  2841  }
  2842  
  2843  // Context sets the context to be used in this call's Do method.
  2844  func (c *ProjectsLocationsRegistrationsConfigureManagementSettingsCall) Context(ctx context.Context) *ProjectsLocationsRegistrationsConfigureManagementSettingsCall {
  2845  	c.ctx_ = ctx
  2846  	return c
  2847  }
  2848  
  2849  // Header returns a http.Header that can be modified by the caller to add
  2850  // headers to the request.
  2851  func (c *ProjectsLocationsRegistrationsConfigureManagementSettingsCall) Header() http.Header {
  2852  	if c.header_ == nil {
  2853  		c.header_ = make(http.Header)
  2854  	}
  2855  	return c.header_
  2856  }
  2857  
  2858  func (c *ProjectsLocationsRegistrationsConfigureManagementSettingsCall) doRequest(alt string) (*http.Response, error) {
  2859  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  2860  	var body io.Reader = nil
  2861  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.configuremanagementsettingsrequest)
  2862  	if err != nil {
  2863  		return nil, err
  2864  	}
  2865  	c.urlParams_.Set("alt", alt)
  2866  	c.urlParams_.Set("prettyPrint", "false")
  2867  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+registration}:configureManagementSettings")
  2868  	urls += "?" + c.urlParams_.Encode()
  2869  	req, err := http.NewRequest("POST", urls, body)
  2870  	if err != nil {
  2871  		return nil, err
  2872  	}
  2873  	req.Header = reqHeaders
  2874  	googleapi.Expand(req.URL, map[string]string{
  2875  		"registration": c.registration,
  2876  	})
  2877  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2878  }
  2879  
  2880  // Do executes the "domains.projects.locations.registrations.configureManagementSettings" call.
  2881  // Any non-2xx status code is an error. Response headers are in either
  2882  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  2883  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2884  // whether the returned error was because http.StatusNotModified was returned.
  2885  func (c *ProjectsLocationsRegistrationsConfigureManagementSettingsCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  2886  	gensupport.SetOptions(c.urlParams_, opts...)
  2887  	res, err := c.doRequest("json")
  2888  	if res != nil && res.StatusCode == http.StatusNotModified {
  2889  		if res.Body != nil {
  2890  			res.Body.Close()
  2891  		}
  2892  		return nil, gensupport.WrapError(&googleapi.Error{
  2893  			Code:   res.StatusCode,
  2894  			Header: res.Header,
  2895  		})
  2896  	}
  2897  	if err != nil {
  2898  		return nil, err
  2899  	}
  2900  	defer googleapi.CloseBody(res)
  2901  	if err := googleapi.CheckResponse(res); err != nil {
  2902  		return nil, gensupport.WrapError(err)
  2903  	}
  2904  	ret := &Operation{
  2905  		ServerResponse: googleapi.ServerResponse{
  2906  			Header:         res.Header,
  2907  			HTTPStatusCode: res.StatusCode,
  2908  		},
  2909  	}
  2910  	target := &ret
  2911  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2912  		return nil, err
  2913  	}
  2914  	return ret, nil
  2915  }
  2916  
  2917  type ProjectsLocationsRegistrationsDeleteCall struct {
  2918  	s          *Service
  2919  	name       string
  2920  	urlParams_ gensupport.URLParams
  2921  	ctx_       context.Context
  2922  	header_    http.Header
  2923  }
  2924  
  2925  // Delete: Deletes a `Registration` resource. This method works on any
  2926  // `Registration` resource using Subscription or Commitment billing
  2927  // (/domains/pricing#billing-models), provided that the resource was created at
  2928  // least 1 day in the past. When an active registration is successfully
  2929  // deleted, you can continue to use the domain in Google Domains
  2930  // (https://domains.google/) until it expires. The calling user becomes the
  2931  // domain's sole owner in Google Domains, and permissions for the domain are
  2932  // subsequently managed there. The domain does not renew automatically unless
  2933  // the new owner sets up billing in Google Domains. After January 2024 you will
  2934  // only be able to delete `Registration` resources when `state` is one of:
  2935  // `EXPORTED`, `EXPIRED`,`REGISTRATION_FAILED` or `TRANSFER_FAILED`. See Cloud
  2936  // Domains feature deprecation
  2937  // (https://cloud.google.com/domains/docs/deprecations/feature-deprecations)
  2938  // for more details.
  2939  //
  2940  //   - name: The name of the `Registration` to delete, in the format
  2941  //     `projects/*/locations/*/registrations/*`.
  2942  func (r *ProjectsLocationsRegistrationsService) Delete(name string) *ProjectsLocationsRegistrationsDeleteCall {
  2943  	c := &ProjectsLocationsRegistrationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2944  	c.name = name
  2945  	return c
  2946  }
  2947  
  2948  // Fields allows partial responses to be retrieved. See
  2949  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2950  // details.
  2951  func (c *ProjectsLocationsRegistrationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistrationsDeleteCall {
  2952  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2953  	return c
  2954  }
  2955  
  2956  // Context sets the context to be used in this call's Do method.
  2957  func (c *ProjectsLocationsRegistrationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsRegistrationsDeleteCall {
  2958  	c.ctx_ = ctx
  2959  	return c
  2960  }
  2961  
  2962  // Header returns a http.Header that can be modified by the caller to add
  2963  // headers to the request.
  2964  func (c *ProjectsLocationsRegistrationsDeleteCall) Header() http.Header {
  2965  	if c.header_ == nil {
  2966  		c.header_ = make(http.Header)
  2967  	}
  2968  	return c.header_
  2969  }
  2970  
  2971  func (c *ProjectsLocationsRegistrationsDeleteCall) doRequest(alt string) (*http.Response, error) {
  2972  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2973  	var body io.Reader = nil
  2974  	c.urlParams_.Set("alt", alt)
  2975  	c.urlParams_.Set("prettyPrint", "false")
  2976  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+name}")
  2977  	urls += "?" + c.urlParams_.Encode()
  2978  	req, err := http.NewRequest("DELETE", urls, body)
  2979  	if err != nil {
  2980  		return nil, err
  2981  	}
  2982  	req.Header = reqHeaders
  2983  	googleapi.Expand(req.URL, map[string]string{
  2984  		"name": c.name,
  2985  	})
  2986  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2987  }
  2988  
  2989  // Do executes the "domains.projects.locations.registrations.delete" call.
  2990  // Any non-2xx status code is an error. Response headers are in either
  2991  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  2992  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2993  // whether the returned error was because http.StatusNotModified was returned.
  2994  func (c *ProjectsLocationsRegistrationsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  2995  	gensupport.SetOptions(c.urlParams_, opts...)
  2996  	res, err := c.doRequest("json")
  2997  	if res != nil && res.StatusCode == http.StatusNotModified {
  2998  		if res.Body != nil {
  2999  			res.Body.Close()
  3000  		}
  3001  		return nil, gensupport.WrapError(&googleapi.Error{
  3002  			Code:   res.StatusCode,
  3003  			Header: res.Header,
  3004  		})
  3005  	}
  3006  	if err != nil {
  3007  		return nil, err
  3008  	}
  3009  	defer googleapi.CloseBody(res)
  3010  	if err := googleapi.CheckResponse(res); err != nil {
  3011  		return nil, gensupport.WrapError(err)
  3012  	}
  3013  	ret := &Operation{
  3014  		ServerResponse: googleapi.ServerResponse{
  3015  			Header:         res.Header,
  3016  			HTTPStatusCode: res.StatusCode,
  3017  		},
  3018  	}
  3019  	target := &ret
  3020  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3021  		return nil, err
  3022  	}
  3023  	return ret, nil
  3024  }
  3025  
  3026  type ProjectsLocationsRegistrationsExportCall struct {
  3027  	s                         *Service
  3028  	name                      string
  3029  	exportregistrationrequest *ExportRegistrationRequest
  3030  	urlParams_                gensupport.URLParams
  3031  	ctx_                      context.Context
  3032  	header_                   http.Header
  3033  }
  3034  
  3035  // Export: Deprecated: For more information, see Cloud Domains feature
  3036  // deprecation
  3037  // (https://cloud.google.com/domains/docs/deprecations/feature-deprecations)
  3038  // Exports a `Registration` resource, such that it is no longer managed by
  3039  // Cloud Domains. When an active domain is successfully exported, you can
  3040  // continue to use the domain in Google Domains (https://domains.google/) until
  3041  // it expires. The calling user becomes the domain's sole owner in Google
  3042  // Domains, and permissions for the domain are subsequently managed there. The
  3043  // domain does not renew automatically unless the new owner sets up billing in
  3044  // Google Domains.
  3045  //
  3046  //   - name: The name of the `Registration` to export, in the format
  3047  //     `projects/*/locations/*/registrations/*`.
  3048  func (r *ProjectsLocationsRegistrationsService) Export(name string, exportregistrationrequest *ExportRegistrationRequest) *ProjectsLocationsRegistrationsExportCall {
  3049  	c := &ProjectsLocationsRegistrationsExportCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3050  	c.name = name
  3051  	c.exportregistrationrequest = exportregistrationrequest
  3052  	return c
  3053  }
  3054  
  3055  // Fields allows partial responses to be retrieved. See
  3056  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3057  // details.
  3058  func (c *ProjectsLocationsRegistrationsExportCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistrationsExportCall {
  3059  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3060  	return c
  3061  }
  3062  
  3063  // Context sets the context to be used in this call's Do method.
  3064  func (c *ProjectsLocationsRegistrationsExportCall) Context(ctx context.Context) *ProjectsLocationsRegistrationsExportCall {
  3065  	c.ctx_ = ctx
  3066  	return c
  3067  }
  3068  
  3069  // Header returns a http.Header that can be modified by the caller to add
  3070  // headers to the request.
  3071  func (c *ProjectsLocationsRegistrationsExportCall) Header() http.Header {
  3072  	if c.header_ == nil {
  3073  		c.header_ = make(http.Header)
  3074  	}
  3075  	return c.header_
  3076  }
  3077  
  3078  func (c *ProjectsLocationsRegistrationsExportCall) doRequest(alt string) (*http.Response, error) {
  3079  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3080  	var body io.Reader = nil
  3081  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.exportregistrationrequest)
  3082  	if err != nil {
  3083  		return nil, err
  3084  	}
  3085  	c.urlParams_.Set("alt", alt)
  3086  	c.urlParams_.Set("prettyPrint", "false")
  3087  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+name}:export")
  3088  	urls += "?" + c.urlParams_.Encode()
  3089  	req, err := http.NewRequest("POST", urls, body)
  3090  	if err != nil {
  3091  		return nil, err
  3092  	}
  3093  	req.Header = reqHeaders
  3094  	googleapi.Expand(req.URL, map[string]string{
  3095  		"name": c.name,
  3096  	})
  3097  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3098  }
  3099  
  3100  // Do executes the "domains.projects.locations.registrations.export" call.
  3101  // Any non-2xx status code is an error. Response headers are in either
  3102  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  3103  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3104  // whether the returned error was because http.StatusNotModified was returned.
  3105  func (c *ProjectsLocationsRegistrationsExportCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  3106  	gensupport.SetOptions(c.urlParams_, opts...)
  3107  	res, err := c.doRequest("json")
  3108  	if res != nil && res.StatusCode == http.StatusNotModified {
  3109  		if res.Body != nil {
  3110  			res.Body.Close()
  3111  		}
  3112  		return nil, gensupport.WrapError(&googleapi.Error{
  3113  			Code:   res.StatusCode,
  3114  			Header: res.Header,
  3115  		})
  3116  	}
  3117  	if err != nil {
  3118  		return nil, err
  3119  	}
  3120  	defer googleapi.CloseBody(res)
  3121  	if err := googleapi.CheckResponse(res); err != nil {
  3122  		return nil, gensupport.WrapError(err)
  3123  	}
  3124  	ret := &Operation{
  3125  		ServerResponse: googleapi.ServerResponse{
  3126  			Header:         res.Header,
  3127  			HTTPStatusCode: res.StatusCode,
  3128  		},
  3129  	}
  3130  	target := &ret
  3131  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3132  		return nil, err
  3133  	}
  3134  	return ret, nil
  3135  }
  3136  
  3137  type ProjectsLocationsRegistrationsGetCall struct {
  3138  	s            *Service
  3139  	name         string
  3140  	urlParams_   gensupport.URLParams
  3141  	ifNoneMatch_ string
  3142  	ctx_         context.Context
  3143  	header_      http.Header
  3144  }
  3145  
  3146  // Get: Gets the details of a `Registration` resource.
  3147  //
  3148  //   - name: The name of the `Registration` to get, in the format
  3149  //     `projects/*/locations/*/registrations/*`.
  3150  func (r *ProjectsLocationsRegistrationsService) Get(name string) *ProjectsLocationsRegistrationsGetCall {
  3151  	c := &ProjectsLocationsRegistrationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3152  	c.name = name
  3153  	return c
  3154  }
  3155  
  3156  // Fields allows partial responses to be retrieved. See
  3157  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3158  // details.
  3159  func (c *ProjectsLocationsRegistrationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistrationsGetCall {
  3160  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3161  	return c
  3162  }
  3163  
  3164  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3165  // object's ETag matches the given value. This is useful for getting updates
  3166  // only after the object has changed since the last request.
  3167  func (c *ProjectsLocationsRegistrationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsRegistrationsGetCall {
  3168  	c.ifNoneMatch_ = entityTag
  3169  	return c
  3170  }
  3171  
  3172  // Context sets the context to be used in this call's Do method.
  3173  func (c *ProjectsLocationsRegistrationsGetCall) Context(ctx context.Context) *ProjectsLocationsRegistrationsGetCall {
  3174  	c.ctx_ = ctx
  3175  	return c
  3176  }
  3177  
  3178  // Header returns a http.Header that can be modified by the caller to add
  3179  // headers to the request.
  3180  func (c *ProjectsLocationsRegistrationsGetCall) Header() http.Header {
  3181  	if c.header_ == nil {
  3182  		c.header_ = make(http.Header)
  3183  	}
  3184  	return c.header_
  3185  }
  3186  
  3187  func (c *ProjectsLocationsRegistrationsGetCall) doRequest(alt string) (*http.Response, error) {
  3188  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3189  	if c.ifNoneMatch_ != "" {
  3190  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3191  	}
  3192  	var body io.Reader = nil
  3193  	c.urlParams_.Set("alt", alt)
  3194  	c.urlParams_.Set("prettyPrint", "false")
  3195  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+name}")
  3196  	urls += "?" + c.urlParams_.Encode()
  3197  	req, err := http.NewRequest("GET", urls, body)
  3198  	if err != nil {
  3199  		return nil, err
  3200  	}
  3201  	req.Header = reqHeaders
  3202  	googleapi.Expand(req.URL, map[string]string{
  3203  		"name": c.name,
  3204  	})
  3205  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3206  }
  3207  
  3208  // Do executes the "domains.projects.locations.registrations.get" call.
  3209  // Any non-2xx status code is an error. Response headers are in either
  3210  // *Registration.ServerResponse.Header or (if a response was returned at all)
  3211  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3212  // whether the returned error was because http.StatusNotModified was returned.
  3213  func (c *ProjectsLocationsRegistrationsGetCall) Do(opts ...googleapi.CallOption) (*Registration, error) {
  3214  	gensupport.SetOptions(c.urlParams_, opts...)
  3215  	res, err := c.doRequest("json")
  3216  	if res != nil && res.StatusCode == http.StatusNotModified {
  3217  		if res.Body != nil {
  3218  			res.Body.Close()
  3219  		}
  3220  		return nil, gensupport.WrapError(&googleapi.Error{
  3221  			Code:   res.StatusCode,
  3222  			Header: res.Header,
  3223  		})
  3224  	}
  3225  	if err != nil {
  3226  		return nil, err
  3227  	}
  3228  	defer googleapi.CloseBody(res)
  3229  	if err := googleapi.CheckResponse(res); err != nil {
  3230  		return nil, gensupport.WrapError(err)
  3231  	}
  3232  	ret := &Registration{
  3233  		ServerResponse: googleapi.ServerResponse{
  3234  			Header:         res.Header,
  3235  			HTTPStatusCode: res.StatusCode,
  3236  		},
  3237  	}
  3238  	target := &ret
  3239  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3240  		return nil, err
  3241  	}
  3242  	return ret, nil
  3243  }
  3244  
  3245  type ProjectsLocationsRegistrationsGetIamPolicyCall struct {
  3246  	s            *Service
  3247  	resource     string
  3248  	urlParams_   gensupport.URLParams
  3249  	ifNoneMatch_ string
  3250  	ctx_         context.Context
  3251  	header_      http.Header
  3252  }
  3253  
  3254  // GetIamPolicy: Gets the access control policy for a resource. Returns an
  3255  // empty policy if the resource exists and does not have a policy set.
  3256  //
  3257  //   - resource: REQUIRED: The resource for which the policy is being requested.
  3258  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  3259  //     for the appropriate value for this field.
  3260  func (r *ProjectsLocationsRegistrationsService) GetIamPolicy(resource string) *ProjectsLocationsRegistrationsGetIamPolicyCall {
  3261  	c := &ProjectsLocationsRegistrationsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3262  	c.resource = resource
  3263  	return c
  3264  }
  3265  
  3266  // OptionsRequestedPolicyVersion sets the optional parameter
  3267  // "options.requestedPolicyVersion": The maximum policy version that will be
  3268  // used to format the policy. Valid values are 0, 1, and 3. Requests specifying
  3269  // an invalid value will be rejected. Requests for policies with any
  3270  // conditional role bindings must specify version 3. Policies with no
  3271  // conditional role bindings may specify any valid value or leave the field
  3272  // unset. The policy in the response might use the policy version that you
  3273  // specified, or it might use a lower policy version. For example, if you
  3274  // specify version 3, but the policy has no conditional role bindings, the
  3275  // response uses version 1. To learn which resources support conditions in
  3276  // their IAM policies, see the IAM documentation
  3277  // (https://cloud.google.com/iam/help/conditions/resource-policies).
  3278  func (c *ProjectsLocationsRegistrationsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsRegistrationsGetIamPolicyCall {
  3279  	c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
  3280  	return c
  3281  }
  3282  
  3283  // Fields allows partial responses to be retrieved. See
  3284  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3285  // details.
  3286  func (c *ProjectsLocationsRegistrationsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistrationsGetIamPolicyCall {
  3287  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3288  	return c
  3289  }
  3290  
  3291  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3292  // object's ETag matches the given value. This is useful for getting updates
  3293  // only after the object has changed since the last request.
  3294  func (c *ProjectsLocationsRegistrationsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsRegistrationsGetIamPolicyCall {
  3295  	c.ifNoneMatch_ = entityTag
  3296  	return c
  3297  }
  3298  
  3299  // Context sets the context to be used in this call's Do method.
  3300  func (c *ProjectsLocationsRegistrationsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsRegistrationsGetIamPolicyCall {
  3301  	c.ctx_ = ctx
  3302  	return c
  3303  }
  3304  
  3305  // Header returns a http.Header that can be modified by the caller to add
  3306  // headers to the request.
  3307  func (c *ProjectsLocationsRegistrationsGetIamPolicyCall) Header() http.Header {
  3308  	if c.header_ == nil {
  3309  		c.header_ = make(http.Header)
  3310  	}
  3311  	return c.header_
  3312  }
  3313  
  3314  func (c *ProjectsLocationsRegistrationsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  3315  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3316  	if c.ifNoneMatch_ != "" {
  3317  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3318  	}
  3319  	var body io.Reader = nil
  3320  	c.urlParams_.Set("alt", alt)
  3321  	c.urlParams_.Set("prettyPrint", "false")
  3322  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+resource}:getIamPolicy")
  3323  	urls += "?" + c.urlParams_.Encode()
  3324  	req, err := http.NewRequest("GET", urls, body)
  3325  	if err != nil {
  3326  		return nil, err
  3327  	}
  3328  	req.Header = reqHeaders
  3329  	googleapi.Expand(req.URL, map[string]string{
  3330  		"resource": c.resource,
  3331  	})
  3332  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3333  }
  3334  
  3335  // Do executes the "domains.projects.locations.registrations.getIamPolicy" call.
  3336  // Any non-2xx status code is an error. Response headers are in either
  3337  // *Policy.ServerResponse.Header or (if a response was returned at all) in
  3338  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3339  // whether the returned error was because http.StatusNotModified was returned.
  3340  func (c *ProjectsLocationsRegistrationsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  3341  	gensupport.SetOptions(c.urlParams_, opts...)
  3342  	res, err := c.doRequest("json")
  3343  	if res != nil && res.StatusCode == http.StatusNotModified {
  3344  		if res.Body != nil {
  3345  			res.Body.Close()
  3346  		}
  3347  		return nil, gensupport.WrapError(&googleapi.Error{
  3348  			Code:   res.StatusCode,
  3349  			Header: res.Header,
  3350  		})
  3351  	}
  3352  	if err != nil {
  3353  		return nil, err
  3354  	}
  3355  	defer googleapi.CloseBody(res)
  3356  	if err := googleapi.CheckResponse(res); err != nil {
  3357  		return nil, gensupport.WrapError(err)
  3358  	}
  3359  	ret := &Policy{
  3360  		ServerResponse: googleapi.ServerResponse{
  3361  			Header:         res.Header,
  3362  			HTTPStatusCode: res.StatusCode,
  3363  		},
  3364  	}
  3365  	target := &ret
  3366  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3367  		return nil, err
  3368  	}
  3369  	return ret, nil
  3370  }
  3371  
  3372  type ProjectsLocationsRegistrationsImportCall struct {
  3373  	s                   *Service
  3374  	parent              string
  3375  	importdomainrequest *ImportDomainRequest
  3376  	urlParams_          gensupport.URLParams
  3377  	ctx_                context.Context
  3378  	header_             http.Header
  3379  }
  3380  
  3381  // Import: Deprecated: For more information, see Cloud Domains feature
  3382  // deprecation
  3383  // (https://cloud.google.com/domains/docs/deprecations/feature-deprecations)
  3384  // Imports a domain name from Google Domains (https://domains.google/) for use
  3385  // in Cloud Domains. To transfer a domain from another registrar, use the
  3386  // `TransferDomain` method instead. Since individual users can own domains in
  3387  // Google Domains, the calling user must have ownership permission on the
  3388  // domain.
  3389  //
  3390  //   - parent: The parent resource of the Registration. Must be in the format
  3391  //     `projects/*/locations/*`.
  3392  func (r *ProjectsLocationsRegistrationsService) Import(parent string, importdomainrequest *ImportDomainRequest) *ProjectsLocationsRegistrationsImportCall {
  3393  	c := &ProjectsLocationsRegistrationsImportCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3394  	c.parent = parent
  3395  	c.importdomainrequest = importdomainrequest
  3396  	return c
  3397  }
  3398  
  3399  // Fields allows partial responses to be retrieved. See
  3400  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3401  // details.
  3402  func (c *ProjectsLocationsRegistrationsImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistrationsImportCall {
  3403  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3404  	return c
  3405  }
  3406  
  3407  // Context sets the context to be used in this call's Do method.
  3408  func (c *ProjectsLocationsRegistrationsImportCall) Context(ctx context.Context) *ProjectsLocationsRegistrationsImportCall {
  3409  	c.ctx_ = ctx
  3410  	return c
  3411  }
  3412  
  3413  // Header returns a http.Header that can be modified by the caller to add
  3414  // headers to the request.
  3415  func (c *ProjectsLocationsRegistrationsImportCall) Header() http.Header {
  3416  	if c.header_ == nil {
  3417  		c.header_ = make(http.Header)
  3418  	}
  3419  	return c.header_
  3420  }
  3421  
  3422  func (c *ProjectsLocationsRegistrationsImportCall) doRequest(alt string) (*http.Response, error) {
  3423  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3424  	var body io.Reader = nil
  3425  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.importdomainrequest)
  3426  	if err != nil {
  3427  		return nil, err
  3428  	}
  3429  	c.urlParams_.Set("alt", alt)
  3430  	c.urlParams_.Set("prettyPrint", "false")
  3431  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+parent}/registrations:import")
  3432  	urls += "?" + c.urlParams_.Encode()
  3433  	req, err := http.NewRequest("POST", urls, body)
  3434  	if err != nil {
  3435  		return nil, err
  3436  	}
  3437  	req.Header = reqHeaders
  3438  	googleapi.Expand(req.URL, map[string]string{
  3439  		"parent": c.parent,
  3440  	})
  3441  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3442  }
  3443  
  3444  // Do executes the "domains.projects.locations.registrations.import" call.
  3445  // Any non-2xx status code is an error. Response headers are in either
  3446  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  3447  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3448  // whether the returned error was because http.StatusNotModified was returned.
  3449  func (c *ProjectsLocationsRegistrationsImportCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  3450  	gensupport.SetOptions(c.urlParams_, opts...)
  3451  	res, err := c.doRequest("json")
  3452  	if res != nil && res.StatusCode == http.StatusNotModified {
  3453  		if res.Body != nil {
  3454  			res.Body.Close()
  3455  		}
  3456  		return nil, gensupport.WrapError(&googleapi.Error{
  3457  			Code:   res.StatusCode,
  3458  			Header: res.Header,
  3459  		})
  3460  	}
  3461  	if err != nil {
  3462  		return nil, err
  3463  	}
  3464  	defer googleapi.CloseBody(res)
  3465  	if err := googleapi.CheckResponse(res); err != nil {
  3466  		return nil, gensupport.WrapError(err)
  3467  	}
  3468  	ret := &Operation{
  3469  		ServerResponse: googleapi.ServerResponse{
  3470  			Header:         res.Header,
  3471  			HTTPStatusCode: res.StatusCode,
  3472  		},
  3473  	}
  3474  	target := &ret
  3475  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3476  		return nil, err
  3477  	}
  3478  	return ret, nil
  3479  }
  3480  
  3481  type ProjectsLocationsRegistrationsListCall struct {
  3482  	s            *Service
  3483  	parent       string
  3484  	urlParams_   gensupport.URLParams
  3485  	ifNoneMatch_ string
  3486  	ctx_         context.Context
  3487  	header_      http.Header
  3488  }
  3489  
  3490  // List: Lists the `Registration` resources in a project.
  3491  //
  3492  //   - parent: The project and location from which to list `Registration`s,
  3493  //     specified in the format `projects/*/locations/*`.
  3494  func (r *ProjectsLocationsRegistrationsService) List(parent string) *ProjectsLocationsRegistrationsListCall {
  3495  	c := &ProjectsLocationsRegistrationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3496  	c.parent = parent
  3497  	return c
  3498  }
  3499  
  3500  // Filter sets the optional parameter "filter": Filter expression to restrict
  3501  // the `Registration`s returned. The expression must specify the field name, a
  3502  // comparison operator, and the value that you want to use for filtering. The
  3503  // value must be a string, a number, a boolean, or an enum value. The
  3504  // comparison operator should be one of =, !=, >, <, >=, <=, or : for prefix or
  3505  // wildcard matches. For example, to filter to a specific domain name, use an
  3506  // expression like `domainName="example.com". You can also check for the
  3507  // existence of a field; for example, to find domains using custom DNS
  3508  // settings, use an expression like `dnsSettings.customDns:*`. You can also
  3509  // create compound filters by combining expressions with the `AND` and `OR`
  3510  // operators. For example, to find domains that are suspended or have specific
  3511  // issues flagged, use an expression like `(state=SUSPENDED) OR (issue:*)`.
  3512  func (c *ProjectsLocationsRegistrationsListCall) Filter(filter string) *ProjectsLocationsRegistrationsListCall {
  3513  	c.urlParams_.Set("filter", filter)
  3514  	return c
  3515  }
  3516  
  3517  // PageSize sets the optional parameter "pageSize": Maximum number of results
  3518  // to return.
  3519  func (c *ProjectsLocationsRegistrationsListCall) PageSize(pageSize int64) *ProjectsLocationsRegistrationsListCall {
  3520  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  3521  	return c
  3522  }
  3523  
  3524  // PageToken sets the optional parameter "pageToken": When set to the
  3525  // `next_page_token` from a prior response, provides the next page of results.
  3526  func (c *ProjectsLocationsRegistrationsListCall) PageToken(pageToken string) *ProjectsLocationsRegistrationsListCall {
  3527  	c.urlParams_.Set("pageToken", pageToken)
  3528  	return c
  3529  }
  3530  
  3531  // Fields allows partial responses to be retrieved. See
  3532  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3533  // details.
  3534  func (c *ProjectsLocationsRegistrationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistrationsListCall {
  3535  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3536  	return c
  3537  }
  3538  
  3539  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3540  // object's ETag matches the given value. This is useful for getting updates
  3541  // only after the object has changed since the last request.
  3542  func (c *ProjectsLocationsRegistrationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsRegistrationsListCall {
  3543  	c.ifNoneMatch_ = entityTag
  3544  	return c
  3545  }
  3546  
  3547  // Context sets the context to be used in this call's Do method.
  3548  func (c *ProjectsLocationsRegistrationsListCall) Context(ctx context.Context) *ProjectsLocationsRegistrationsListCall {
  3549  	c.ctx_ = ctx
  3550  	return c
  3551  }
  3552  
  3553  // Header returns a http.Header that can be modified by the caller to add
  3554  // headers to the request.
  3555  func (c *ProjectsLocationsRegistrationsListCall) Header() http.Header {
  3556  	if c.header_ == nil {
  3557  		c.header_ = make(http.Header)
  3558  	}
  3559  	return c.header_
  3560  }
  3561  
  3562  func (c *ProjectsLocationsRegistrationsListCall) doRequest(alt string) (*http.Response, error) {
  3563  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3564  	if c.ifNoneMatch_ != "" {
  3565  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3566  	}
  3567  	var body io.Reader = nil
  3568  	c.urlParams_.Set("alt", alt)
  3569  	c.urlParams_.Set("prettyPrint", "false")
  3570  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+parent}/registrations")
  3571  	urls += "?" + c.urlParams_.Encode()
  3572  	req, err := http.NewRequest("GET", urls, body)
  3573  	if err != nil {
  3574  		return nil, err
  3575  	}
  3576  	req.Header = reqHeaders
  3577  	googleapi.Expand(req.URL, map[string]string{
  3578  		"parent": c.parent,
  3579  	})
  3580  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3581  }
  3582  
  3583  // Do executes the "domains.projects.locations.registrations.list" call.
  3584  // Any non-2xx status code is an error. Response headers are in either
  3585  // *ListRegistrationsResponse.ServerResponse.Header or (if a response was
  3586  // returned at all) in error.(*googleapi.Error).Header. Use
  3587  // googleapi.IsNotModified to check whether the returned error was because
  3588  // http.StatusNotModified was returned.
  3589  func (c *ProjectsLocationsRegistrationsListCall) Do(opts ...googleapi.CallOption) (*ListRegistrationsResponse, error) {
  3590  	gensupport.SetOptions(c.urlParams_, opts...)
  3591  	res, err := c.doRequest("json")
  3592  	if res != nil && res.StatusCode == http.StatusNotModified {
  3593  		if res.Body != nil {
  3594  			res.Body.Close()
  3595  		}
  3596  		return nil, gensupport.WrapError(&googleapi.Error{
  3597  			Code:   res.StatusCode,
  3598  			Header: res.Header,
  3599  		})
  3600  	}
  3601  	if err != nil {
  3602  		return nil, err
  3603  	}
  3604  	defer googleapi.CloseBody(res)
  3605  	if err := googleapi.CheckResponse(res); err != nil {
  3606  		return nil, gensupport.WrapError(err)
  3607  	}
  3608  	ret := &ListRegistrationsResponse{
  3609  		ServerResponse: googleapi.ServerResponse{
  3610  			Header:         res.Header,
  3611  			HTTPStatusCode: res.StatusCode,
  3612  		},
  3613  	}
  3614  	target := &ret
  3615  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3616  		return nil, err
  3617  	}
  3618  	return ret, nil
  3619  }
  3620  
  3621  // Pages invokes f for each page of results.
  3622  // A non-nil error returned from f will halt the iteration.
  3623  // The provided context supersedes any context provided to the Context method.
  3624  func (c *ProjectsLocationsRegistrationsListCall) Pages(ctx context.Context, f func(*ListRegistrationsResponse) error) error {
  3625  	c.ctx_ = ctx
  3626  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  3627  	for {
  3628  		x, err := c.Do()
  3629  		if err != nil {
  3630  			return err
  3631  		}
  3632  		if err := f(x); err != nil {
  3633  			return err
  3634  		}
  3635  		if x.NextPageToken == "" {
  3636  			return nil
  3637  		}
  3638  		c.PageToken(x.NextPageToken)
  3639  	}
  3640  }
  3641  
  3642  type ProjectsLocationsRegistrationsPatchCall struct {
  3643  	s            *Service
  3644  	name         string
  3645  	registration *Registration
  3646  	urlParams_   gensupport.URLParams
  3647  	ctx_         context.Context
  3648  	header_      http.Header
  3649  }
  3650  
  3651  // Patch: Updates select fields of a `Registration` resource, notably `labels`.
  3652  // To update other fields, use the appropriate custom update method: * To
  3653  // update management settings, see `ConfigureManagementSettings` * To update
  3654  // DNS configuration, see `ConfigureDnsSettings` * To update contact
  3655  // information, see `ConfigureContactSettings`
  3656  //
  3657  //   - name: Output only. Name of the `Registration` resource, in the format
  3658  //     `projects/*/locations/*/registrations/`.
  3659  func (r *ProjectsLocationsRegistrationsService) Patch(name string, registration *Registration) *ProjectsLocationsRegistrationsPatchCall {
  3660  	c := &ProjectsLocationsRegistrationsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3661  	c.name = name
  3662  	c.registration = registration
  3663  	return c
  3664  }
  3665  
  3666  // UpdateMask sets the optional parameter "updateMask": Required. The field
  3667  // mask describing which fields to update as a comma-separated list. For
  3668  // example, if only the labels are being updated, the `update_mask` is
  3669  // "labels".
  3670  func (c *ProjectsLocationsRegistrationsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsRegistrationsPatchCall {
  3671  	c.urlParams_.Set("updateMask", updateMask)
  3672  	return c
  3673  }
  3674  
  3675  // Fields allows partial responses to be retrieved. See
  3676  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3677  // details.
  3678  func (c *ProjectsLocationsRegistrationsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistrationsPatchCall {
  3679  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3680  	return c
  3681  }
  3682  
  3683  // Context sets the context to be used in this call's Do method.
  3684  func (c *ProjectsLocationsRegistrationsPatchCall) Context(ctx context.Context) *ProjectsLocationsRegistrationsPatchCall {
  3685  	c.ctx_ = ctx
  3686  	return c
  3687  }
  3688  
  3689  // Header returns a http.Header that can be modified by the caller to add
  3690  // headers to the request.
  3691  func (c *ProjectsLocationsRegistrationsPatchCall) Header() http.Header {
  3692  	if c.header_ == nil {
  3693  		c.header_ = make(http.Header)
  3694  	}
  3695  	return c.header_
  3696  }
  3697  
  3698  func (c *ProjectsLocationsRegistrationsPatchCall) doRequest(alt string) (*http.Response, error) {
  3699  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3700  	var body io.Reader = nil
  3701  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.registration)
  3702  	if err != nil {
  3703  		return nil, err
  3704  	}
  3705  	c.urlParams_.Set("alt", alt)
  3706  	c.urlParams_.Set("prettyPrint", "false")
  3707  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+name}")
  3708  	urls += "?" + c.urlParams_.Encode()
  3709  	req, err := http.NewRequest("PATCH", urls, body)
  3710  	if err != nil {
  3711  		return nil, err
  3712  	}
  3713  	req.Header = reqHeaders
  3714  	googleapi.Expand(req.URL, map[string]string{
  3715  		"name": c.name,
  3716  	})
  3717  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3718  }
  3719  
  3720  // Do executes the "domains.projects.locations.registrations.patch" call.
  3721  // Any non-2xx status code is an error. Response headers are in either
  3722  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  3723  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3724  // whether the returned error was because http.StatusNotModified was returned.
  3725  func (c *ProjectsLocationsRegistrationsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  3726  	gensupport.SetOptions(c.urlParams_, opts...)
  3727  	res, err := c.doRequest("json")
  3728  	if res != nil && res.StatusCode == http.StatusNotModified {
  3729  		if res.Body != nil {
  3730  			res.Body.Close()
  3731  		}
  3732  		return nil, gensupport.WrapError(&googleapi.Error{
  3733  			Code:   res.StatusCode,
  3734  			Header: res.Header,
  3735  		})
  3736  	}
  3737  	if err != nil {
  3738  		return nil, err
  3739  	}
  3740  	defer googleapi.CloseBody(res)
  3741  	if err := googleapi.CheckResponse(res); err != nil {
  3742  		return nil, gensupport.WrapError(err)
  3743  	}
  3744  	ret := &Operation{
  3745  		ServerResponse: googleapi.ServerResponse{
  3746  			Header:         res.Header,
  3747  			HTTPStatusCode: res.StatusCode,
  3748  		},
  3749  	}
  3750  	target := &ret
  3751  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3752  		return nil, err
  3753  	}
  3754  	return ret, nil
  3755  }
  3756  
  3757  type ProjectsLocationsRegistrationsRegisterCall struct {
  3758  	s                     *Service
  3759  	parent                string
  3760  	registerdomainrequest *RegisterDomainRequest
  3761  	urlParams_            gensupport.URLParams
  3762  	ctx_                  context.Context
  3763  	header_               http.Header
  3764  }
  3765  
  3766  // Register: Registers a new domain name and creates a corresponding
  3767  // `Registration` resource. Call `RetrieveRegisterParameters` first to check
  3768  // availability of the domain name and determine parameters like price that are
  3769  // needed to build a call to this method. A successful call creates a
  3770  // `Registration` resource in state `REGISTRATION_PENDING`, which resolves to
  3771  // `ACTIVE` within 1-2 minutes, indicating that the domain was successfully
  3772  // registered. If the resource ends up in state `REGISTRATION_FAILED`, it
  3773  // indicates that the domain was not registered successfully, and you can
  3774  // safely delete the resource and retry registration.
  3775  //
  3776  //   - parent: The parent resource of the `Registration`. Must be in the format
  3777  //     `projects/*/locations/*`.
  3778  func (r *ProjectsLocationsRegistrationsService) Register(parent string, registerdomainrequest *RegisterDomainRequest) *ProjectsLocationsRegistrationsRegisterCall {
  3779  	c := &ProjectsLocationsRegistrationsRegisterCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3780  	c.parent = parent
  3781  	c.registerdomainrequest = registerdomainrequest
  3782  	return c
  3783  }
  3784  
  3785  // Fields allows partial responses to be retrieved. See
  3786  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3787  // details.
  3788  func (c *ProjectsLocationsRegistrationsRegisterCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistrationsRegisterCall {
  3789  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3790  	return c
  3791  }
  3792  
  3793  // Context sets the context to be used in this call's Do method.
  3794  func (c *ProjectsLocationsRegistrationsRegisterCall) Context(ctx context.Context) *ProjectsLocationsRegistrationsRegisterCall {
  3795  	c.ctx_ = ctx
  3796  	return c
  3797  }
  3798  
  3799  // Header returns a http.Header that can be modified by the caller to add
  3800  // headers to the request.
  3801  func (c *ProjectsLocationsRegistrationsRegisterCall) Header() http.Header {
  3802  	if c.header_ == nil {
  3803  		c.header_ = make(http.Header)
  3804  	}
  3805  	return c.header_
  3806  }
  3807  
  3808  func (c *ProjectsLocationsRegistrationsRegisterCall) doRequest(alt string) (*http.Response, error) {
  3809  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3810  	var body io.Reader = nil
  3811  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.registerdomainrequest)
  3812  	if err != nil {
  3813  		return nil, err
  3814  	}
  3815  	c.urlParams_.Set("alt", alt)
  3816  	c.urlParams_.Set("prettyPrint", "false")
  3817  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+parent}/registrations:register")
  3818  	urls += "?" + c.urlParams_.Encode()
  3819  	req, err := http.NewRequest("POST", urls, body)
  3820  	if err != nil {
  3821  		return nil, err
  3822  	}
  3823  	req.Header = reqHeaders
  3824  	googleapi.Expand(req.URL, map[string]string{
  3825  		"parent": c.parent,
  3826  	})
  3827  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3828  }
  3829  
  3830  // Do executes the "domains.projects.locations.registrations.register" call.
  3831  // Any non-2xx status code is an error. Response headers are in either
  3832  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  3833  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3834  // whether the returned error was because http.StatusNotModified was returned.
  3835  func (c *ProjectsLocationsRegistrationsRegisterCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  3836  	gensupport.SetOptions(c.urlParams_, opts...)
  3837  	res, err := c.doRequest("json")
  3838  	if res != nil && res.StatusCode == http.StatusNotModified {
  3839  		if res.Body != nil {
  3840  			res.Body.Close()
  3841  		}
  3842  		return nil, gensupport.WrapError(&googleapi.Error{
  3843  			Code:   res.StatusCode,
  3844  			Header: res.Header,
  3845  		})
  3846  	}
  3847  	if err != nil {
  3848  		return nil, err
  3849  	}
  3850  	defer googleapi.CloseBody(res)
  3851  	if err := googleapi.CheckResponse(res); err != nil {
  3852  		return nil, gensupport.WrapError(err)
  3853  	}
  3854  	ret := &Operation{
  3855  		ServerResponse: googleapi.ServerResponse{
  3856  			Header:         res.Header,
  3857  			HTTPStatusCode: res.StatusCode,
  3858  		},
  3859  	}
  3860  	target := &ret
  3861  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3862  		return nil, err
  3863  	}
  3864  	return ret, nil
  3865  }
  3866  
  3867  type ProjectsLocationsRegistrationsResetAuthorizationCodeCall struct {
  3868  	s                             *Service
  3869  	registration                  string
  3870  	resetauthorizationcoderequest *ResetAuthorizationCodeRequest
  3871  	urlParams_                    gensupport.URLParams
  3872  	ctx_                          context.Context
  3873  	header_                       http.Header
  3874  }
  3875  
  3876  // ResetAuthorizationCode: Resets the authorization code of the `Registration`
  3877  // to a new random string. You can call this method only after 60 days have
  3878  // elapsed since the initial domain registration.
  3879  //
  3880  //   - registration: The name of the `Registration` whose authorization code is
  3881  //     being reset, in the format `projects/*/locations/*/registrations/*`.
  3882  func (r *ProjectsLocationsRegistrationsService) ResetAuthorizationCode(registration string, resetauthorizationcoderequest *ResetAuthorizationCodeRequest) *ProjectsLocationsRegistrationsResetAuthorizationCodeCall {
  3883  	c := &ProjectsLocationsRegistrationsResetAuthorizationCodeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3884  	c.registration = registration
  3885  	c.resetauthorizationcoderequest = resetauthorizationcoderequest
  3886  	return c
  3887  }
  3888  
  3889  // Fields allows partial responses to be retrieved. See
  3890  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3891  // details.
  3892  func (c *ProjectsLocationsRegistrationsResetAuthorizationCodeCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistrationsResetAuthorizationCodeCall {
  3893  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3894  	return c
  3895  }
  3896  
  3897  // Context sets the context to be used in this call's Do method.
  3898  func (c *ProjectsLocationsRegistrationsResetAuthorizationCodeCall) Context(ctx context.Context) *ProjectsLocationsRegistrationsResetAuthorizationCodeCall {
  3899  	c.ctx_ = ctx
  3900  	return c
  3901  }
  3902  
  3903  // Header returns a http.Header that can be modified by the caller to add
  3904  // headers to the request.
  3905  func (c *ProjectsLocationsRegistrationsResetAuthorizationCodeCall) Header() http.Header {
  3906  	if c.header_ == nil {
  3907  		c.header_ = make(http.Header)
  3908  	}
  3909  	return c.header_
  3910  }
  3911  
  3912  func (c *ProjectsLocationsRegistrationsResetAuthorizationCodeCall) doRequest(alt string) (*http.Response, error) {
  3913  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3914  	var body io.Reader = nil
  3915  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.resetauthorizationcoderequest)
  3916  	if err != nil {
  3917  		return nil, err
  3918  	}
  3919  	c.urlParams_.Set("alt", alt)
  3920  	c.urlParams_.Set("prettyPrint", "false")
  3921  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+registration}:resetAuthorizationCode")
  3922  	urls += "?" + c.urlParams_.Encode()
  3923  	req, err := http.NewRequest("POST", urls, body)
  3924  	if err != nil {
  3925  		return nil, err
  3926  	}
  3927  	req.Header = reqHeaders
  3928  	googleapi.Expand(req.URL, map[string]string{
  3929  		"registration": c.registration,
  3930  	})
  3931  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3932  }
  3933  
  3934  // Do executes the "domains.projects.locations.registrations.resetAuthorizationCode" call.
  3935  // Any non-2xx status code is an error. Response headers are in either
  3936  // *AuthorizationCode.ServerResponse.Header or (if a response was returned at
  3937  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  3938  // check whether the returned error was because http.StatusNotModified was
  3939  // returned.
  3940  func (c *ProjectsLocationsRegistrationsResetAuthorizationCodeCall) Do(opts ...googleapi.CallOption) (*AuthorizationCode, error) {
  3941  	gensupport.SetOptions(c.urlParams_, opts...)
  3942  	res, err := c.doRequest("json")
  3943  	if res != nil && res.StatusCode == http.StatusNotModified {
  3944  		if res.Body != nil {
  3945  			res.Body.Close()
  3946  		}
  3947  		return nil, gensupport.WrapError(&googleapi.Error{
  3948  			Code:   res.StatusCode,
  3949  			Header: res.Header,
  3950  		})
  3951  	}
  3952  	if err != nil {
  3953  		return nil, err
  3954  	}
  3955  	defer googleapi.CloseBody(res)
  3956  	if err := googleapi.CheckResponse(res); err != nil {
  3957  		return nil, gensupport.WrapError(err)
  3958  	}
  3959  	ret := &AuthorizationCode{
  3960  		ServerResponse: googleapi.ServerResponse{
  3961  			Header:         res.Header,
  3962  			HTTPStatusCode: res.StatusCode,
  3963  		},
  3964  	}
  3965  	target := &ret
  3966  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3967  		return nil, err
  3968  	}
  3969  	return ret, nil
  3970  }
  3971  
  3972  type ProjectsLocationsRegistrationsRetrieveAuthorizationCodeCall struct {
  3973  	s            *Service
  3974  	registration string
  3975  	urlParams_   gensupport.URLParams
  3976  	ifNoneMatch_ string
  3977  	ctx_         context.Context
  3978  	header_      http.Header
  3979  }
  3980  
  3981  // RetrieveAuthorizationCode: Gets the authorization code of the `Registration`
  3982  // for the purpose of transferring the domain to another registrar. You can
  3983  // call this method only after 60 days have elapsed since the initial domain
  3984  // registration.
  3985  //
  3986  //   - registration: The name of the `Registration` whose authorization code is
  3987  //     being retrieved, in the format `projects/*/locations/*/registrations/*`.
  3988  func (r *ProjectsLocationsRegistrationsService) RetrieveAuthorizationCode(registration string) *ProjectsLocationsRegistrationsRetrieveAuthorizationCodeCall {
  3989  	c := &ProjectsLocationsRegistrationsRetrieveAuthorizationCodeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3990  	c.registration = registration
  3991  	return c
  3992  }
  3993  
  3994  // Fields allows partial responses to be retrieved. See
  3995  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3996  // details.
  3997  func (c *ProjectsLocationsRegistrationsRetrieveAuthorizationCodeCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistrationsRetrieveAuthorizationCodeCall {
  3998  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3999  	return c
  4000  }
  4001  
  4002  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4003  // object's ETag matches the given value. This is useful for getting updates
  4004  // only after the object has changed since the last request.
  4005  func (c *ProjectsLocationsRegistrationsRetrieveAuthorizationCodeCall) IfNoneMatch(entityTag string) *ProjectsLocationsRegistrationsRetrieveAuthorizationCodeCall {
  4006  	c.ifNoneMatch_ = entityTag
  4007  	return c
  4008  }
  4009  
  4010  // Context sets the context to be used in this call's Do method.
  4011  func (c *ProjectsLocationsRegistrationsRetrieveAuthorizationCodeCall) Context(ctx context.Context) *ProjectsLocationsRegistrationsRetrieveAuthorizationCodeCall {
  4012  	c.ctx_ = ctx
  4013  	return c
  4014  }
  4015  
  4016  // Header returns a http.Header that can be modified by the caller to add
  4017  // headers to the request.
  4018  func (c *ProjectsLocationsRegistrationsRetrieveAuthorizationCodeCall) Header() http.Header {
  4019  	if c.header_ == nil {
  4020  		c.header_ = make(http.Header)
  4021  	}
  4022  	return c.header_
  4023  }
  4024  
  4025  func (c *ProjectsLocationsRegistrationsRetrieveAuthorizationCodeCall) doRequest(alt string) (*http.Response, error) {
  4026  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4027  	if c.ifNoneMatch_ != "" {
  4028  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4029  	}
  4030  	var body io.Reader = nil
  4031  	c.urlParams_.Set("alt", alt)
  4032  	c.urlParams_.Set("prettyPrint", "false")
  4033  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+registration}:retrieveAuthorizationCode")
  4034  	urls += "?" + c.urlParams_.Encode()
  4035  	req, err := http.NewRequest("GET", urls, body)
  4036  	if err != nil {
  4037  		return nil, err
  4038  	}
  4039  	req.Header = reqHeaders
  4040  	googleapi.Expand(req.URL, map[string]string{
  4041  		"registration": c.registration,
  4042  	})
  4043  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4044  }
  4045  
  4046  // Do executes the "domains.projects.locations.registrations.retrieveAuthorizationCode" call.
  4047  // Any non-2xx status code is an error. Response headers are in either
  4048  // *AuthorizationCode.ServerResponse.Header or (if a response was returned at
  4049  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  4050  // check whether the returned error was because http.StatusNotModified was
  4051  // returned.
  4052  func (c *ProjectsLocationsRegistrationsRetrieveAuthorizationCodeCall) Do(opts ...googleapi.CallOption) (*AuthorizationCode, error) {
  4053  	gensupport.SetOptions(c.urlParams_, opts...)
  4054  	res, err := c.doRequest("json")
  4055  	if res != nil && res.StatusCode == http.StatusNotModified {
  4056  		if res.Body != nil {
  4057  			res.Body.Close()
  4058  		}
  4059  		return nil, gensupport.WrapError(&googleapi.Error{
  4060  			Code:   res.StatusCode,
  4061  			Header: res.Header,
  4062  		})
  4063  	}
  4064  	if err != nil {
  4065  		return nil, err
  4066  	}
  4067  	defer googleapi.CloseBody(res)
  4068  	if err := googleapi.CheckResponse(res); err != nil {
  4069  		return nil, gensupport.WrapError(err)
  4070  	}
  4071  	ret := &AuthorizationCode{
  4072  		ServerResponse: googleapi.ServerResponse{
  4073  			Header:         res.Header,
  4074  			HTTPStatusCode: res.StatusCode,
  4075  		},
  4076  	}
  4077  	target := &ret
  4078  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4079  		return nil, err
  4080  	}
  4081  	return ret, nil
  4082  }
  4083  
  4084  type ProjectsLocationsRegistrationsRetrieveImportableDomainsCall struct {
  4085  	s            *Service
  4086  	location     string
  4087  	urlParams_   gensupport.URLParams
  4088  	ifNoneMatch_ string
  4089  	ctx_         context.Context
  4090  	header_      http.Header
  4091  }
  4092  
  4093  // RetrieveImportableDomains: Deprecated: For more information, see Cloud
  4094  // Domains feature deprecation
  4095  // (https://cloud.google.com/domains/docs/deprecations/feature-deprecations)
  4096  // Lists domain names from Google Domains (https://domains.google/) that can be
  4097  // imported to Cloud Domains using the `ImportDomain` method. Since individual
  4098  // users can own domains in Google Domains, the list of domains returned
  4099  // depends on the individual user making the call. Domains already managed by
  4100  // Cloud Domains are not returned.
  4101  //
  4102  // - location: The location. Must be in the format `projects/*/locations/*`.
  4103  func (r *ProjectsLocationsRegistrationsService) RetrieveImportableDomains(location string) *ProjectsLocationsRegistrationsRetrieveImportableDomainsCall {
  4104  	c := &ProjectsLocationsRegistrationsRetrieveImportableDomainsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4105  	c.location = location
  4106  	return c
  4107  }
  4108  
  4109  // PageSize sets the optional parameter "pageSize": Maximum number of results
  4110  // to return.
  4111  func (c *ProjectsLocationsRegistrationsRetrieveImportableDomainsCall) PageSize(pageSize int64) *ProjectsLocationsRegistrationsRetrieveImportableDomainsCall {
  4112  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  4113  	return c
  4114  }
  4115  
  4116  // PageToken sets the optional parameter "pageToken": When set to the
  4117  // `next_page_token` from a prior response, provides the next page of results.
  4118  func (c *ProjectsLocationsRegistrationsRetrieveImportableDomainsCall) PageToken(pageToken string) *ProjectsLocationsRegistrationsRetrieveImportableDomainsCall {
  4119  	c.urlParams_.Set("pageToken", pageToken)
  4120  	return c
  4121  }
  4122  
  4123  // Fields allows partial responses to be retrieved. See
  4124  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4125  // details.
  4126  func (c *ProjectsLocationsRegistrationsRetrieveImportableDomainsCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistrationsRetrieveImportableDomainsCall {
  4127  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4128  	return c
  4129  }
  4130  
  4131  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4132  // object's ETag matches the given value. This is useful for getting updates
  4133  // only after the object has changed since the last request.
  4134  func (c *ProjectsLocationsRegistrationsRetrieveImportableDomainsCall) IfNoneMatch(entityTag string) *ProjectsLocationsRegistrationsRetrieveImportableDomainsCall {
  4135  	c.ifNoneMatch_ = entityTag
  4136  	return c
  4137  }
  4138  
  4139  // Context sets the context to be used in this call's Do method.
  4140  func (c *ProjectsLocationsRegistrationsRetrieveImportableDomainsCall) Context(ctx context.Context) *ProjectsLocationsRegistrationsRetrieveImportableDomainsCall {
  4141  	c.ctx_ = ctx
  4142  	return c
  4143  }
  4144  
  4145  // Header returns a http.Header that can be modified by the caller to add
  4146  // headers to the request.
  4147  func (c *ProjectsLocationsRegistrationsRetrieveImportableDomainsCall) Header() http.Header {
  4148  	if c.header_ == nil {
  4149  		c.header_ = make(http.Header)
  4150  	}
  4151  	return c.header_
  4152  }
  4153  
  4154  func (c *ProjectsLocationsRegistrationsRetrieveImportableDomainsCall) doRequest(alt string) (*http.Response, error) {
  4155  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4156  	if c.ifNoneMatch_ != "" {
  4157  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4158  	}
  4159  	var body io.Reader = nil
  4160  	c.urlParams_.Set("alt", alt)
  4161  	c.urlParams_.Set("prettyPrint", "false")
  4162  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+location}/registrations:retrieveImportableDomains")
  4163  	urls += "?" + c.urlParams_.Encode()
  4164  	req, err := http.NewRequest("GET", urls, body)
  4165  	if err != nil {
  4166  		return nil, err
  4167  	}
  4168  	req.Header = reqHeaders
  4169  	googleapi.Expand(req.URL, map[string]string{
  4170  		"location": c.location,
  4171  	})
  4172  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4173  }
  4174  
  4175  // Do executes the "domains.projects.locations.registrations.retrieveImportableDomains" call.
  4176  // Any non-2xx status code is an error. Response headers are in either
  4177  // *RetrieveImportableDomainsResponse.ServerResponse.Header or (if a response
  4178  // was returned at all) in error.(*googleapi.Error).Header. Use
  4179  // googleapi.IsNotModified to check whether the returned error was because
  4180  // http.StatusNotModified was returned.
  4181  func (c *ProjectsLocationsRegistrationsRetrieveImportableDomainsCall) Do(opts ...googleapi.CallOption) (*RetrieveImportableDomainsResponse, error) {
  4182  	gensupport.SetOptions(c.urlParams_, opts...)
  4183  	res, err := c.doRequest("json")
  4184  	if res != nil && res.StatusCode == http.StatusNotModified {
  4185  		if res.Body != nil {
  4186  			res.Body.Close()
  4187  		}
  4188  		return nil, gensupport.WrapError(&googleapi.Error{
  4189  			Code:   res.StatusCode,
  4190  			Header: res.Header,
  4191  		})
  4192  	}
  4193  	if err != nil {
  4194  		return nil, err
  4195  	}
  4196  	defer googleapi.CloseBody(res)
  4197  	if err := googleapi.CheckResponse(res); err != nil {
  4198  		return nil, gensupport.WrapError(err)
  4199  	}
  4200  	ret := &RetrieveImportableDomainsResponse{
  4201  		ServerResponse: googleapi.ServerResponse{
  4202  			Header:         res.Header,
  4203  			HTTPStatusCode: res.StatusCode,
  4204  		},
  4205  	}
  4206  	target := &ret
  4207  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4208  		return nil, err
  4209  	}
  4210  	return ret, nil
  4211  }
  4212  
  4213  // Pages invokes f for each page of results.
  4214  // A non-nil error returned from f will halt the iteration.
  4215  // The provided context supersedes any context provided to the Context method.
  4216  func (c *ProjectsLocationsRegistrationsRetrieveImportableDomainsCall) Pages(ctx context.Context, f func(*RetrieveImportableDomainsResponse) error) error {
  4217  	c.ctx_ = ctx
  4218  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  4219  	for {
  4220  		x, err := c.Do()
  4221  		if err != nil {
  4222  			return err
  4223  		}
  4224  		if err := f(x); err != nil {
  4225  			return err
  4226  		}
  4227  		if x.NextPageToken == "" {
  4228  			return nil
  4229  		}
  4230  		c.PageToken(x.NextPageToken)
  4231  	}
  4232  }
  4233  
  4234  type ProjectsLocationsRegistrationsRetrieveRegisterParametersCall struct {
  4235  	s            *Service
  4236  	location     string
  4237  	urlParams_   gensupport.URLParams
  4238  	ifNoneMatch_ string
  4239  	ctx_         context.Context
  4240  	header_      http.Header
  4241  }
  4242  
  4243  // RetrieveRegisterParameters: Gets parameters needed to register a new domain
  4244  // name, including price and up-to-date availability. Use the returned values
  4245  // to call `RegisterDomain`.
  4246  //
  4247  // - location: The location. Must be in the format `projects/*/locations/*`.
  4248  func (r *ProjectsLocationsRegistrationsService) RetrieveRegisterParameters(location string) *ProjectsLocationsRegistrationsRetrieveRegisterParametersCall {
  4249  	c := &ProjectsLocationsRegistrationsRetrieveRegisterParametersCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4250  	c.location = location
  4251  	return c
  4252  }
  4253  
  4254  // DomainName sets the optional parameter "domainName": Required. The domain
  4255  // name. Unicode domain names must be expressed in Punycode format.
  4256  func (c *ProjectsLocationsRegistrationsRetrieveRegisterParametersCall) DomainName(domainName string) *ProjectsLocationsRegistrationsRetrieveRegisterParametersCall {
  4257  	c.urlParams_.Set("domainName", domainName)
  4258  	return c
  4259  }
  4260  
  4261  // Fields allows partial responses to be retrieved. See
  4262  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4263  // details.
  4264  func (c *ProjectsLocationsRegistrationsRetrieveRegisterParametersCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistrationsRetrieveRegisterParametersCall {
  4265  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4266  	return c
  4267  }
  4268  
  4269  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4270  // object's ETag matches the given value. This is useful for getting updates
  4271  // only after the object has changed since the last request.
  4272  func (c *ProjectsLocationsRegistrationsRetrieveRegisterParametersCall) IfNoneMatch(entityTag string) *ProjectsLocationsRegistrationsRetrieveRegisterParametersCall {
  4273  	c.ifNoneMatch_ = entityTag
  4274  	return c
  4275  }
  4276  
  4277  // Context sets the context to be used in this call's Do method.
  4278  func (c *ProjectsLocationsRegistrationsRetrieveRegisterParametersCall) Context(ctx context.Context) *ProjectsLocationsRegistrationsRetrieveRegisterParametersCall {
  4279  	c.ctx_ = ctx
  4280  	return c
  4281  }
  4282  
  4283  // Header returns a http.Header that can be modified by the caller to add
  4284  // headers to the request.
  4285  func (c *ProjectsLocationsRegistrationsRetrieveRegisterParametersCall) Header() http.Header {
  4286  	if c.header_ == nil {
  4287  		c.header_ = make(http.Header)
  4288  	}
  4289  	return c.header_
  4290  }
  4291  
  4292  func (c *ProjectsLocationsRegistrationsRetrieveRegisterParametersCall) doRequest(alt string) (*http.Response, error) {
  4293  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4294  	if c.ifNoneMatch_ != "" {
  4295  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4296  	}
  4297  	var body io.Reader = nil
  4298  	c.urlParams_.Set("alt", alt)
  4299  	c.urlParams_.Set("prettyPrint", "false")
  4300  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+location}/registrations:retrieveRegisterParameters")
  4301  	urls += "?" + c.urlParams_.Encode()
  4302  	req, err := http.NewRequest("GET", urls, body)
  4303  	if err != nil {
  4304  		return nil, err
  4305  	}
  4306  	req.Header = reqHeaders
  4307  	googleapi.Expand(req.URL, map[string]string{
  4308  		"location": c.location,
  4309  	})
  4310  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4311  }
  4312  
  4313  // Do executes the "domains.projects.locations.registrations.retrieveRegisterParameters" call.
  4314  // Any non-2xx status code is an error. Response headers are in either
  4315  // *RetrieveRegisterParametersResponse.ServerResponse.Header or (if a response
  4316  // was returned at all) in error.(*googleapi.Error).Header. Use
  4317  // googleapi.IsNotModified to check whether the returned error was because
  4318  // http.StatusNotModified was returned.
  4319  func (c *ProjectsLocationsRegistrationsRetrieveRegisterParametersCall) Do(opts ...googleapi.CallOption) (*RetrieveRegisterParametersResponse, error) {
  4320  	gensupport.SetOptions(c.urlParams_, opts...)
  4321  	res, err := c.doRequest("json")
  4322  	if res != nil && res.StatusCode == http.StatusNotModified {
  4323  		if res.Body != nil {
  4324  			res.Body.Close()
  4325  		}
  4326  		return nil, gensupport.WrapError(&googleapi.Error{
  4327  			Code:   res.StatusCode,
  4328  			Header: res.Header,
  4329  		})
  4330  	}
  4331  	if err != nil {
  4332  		return nil, err
  4333  	}
  4334  	defer googleapi.CloseBody(res)
  4335  	if err := googleapi.CheckResponse(res); err != nil {
  4336  		return nil, gensupport.WrapError(err)
  4337  	}
  4338  	ret := &RetrieveRegisterParametersResponse{
  4339  		ServerResponse: googleapi.ServerResponse{
  4340  			Header:         res.Header,
  4341  			HTTPStatusCode: res.StatusCode,
  4342  		},
  4343  	}
  4344  	target := &ret
  4345  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4346  		return nil, err
  4347  	}
  4348  	return ret, nil
  4349  }
  4350  
  4351  type ProjectsLocationsRegistrationsRetrieveTransferParametersCall struct {
  4352  	s            *Service
  4353  	location     string
  4354  	urlParams_   gensupport.URLParams
  4355  	ifNoneMatch_ string
  4356  	ctx_         context.Context
  4357  	header_      http.Header
  4358  }
  4359  
  4360  // RetrieveTransferParameters: Deprecated: For more information, see Cloud
  4361  // Domains feature deprecation
  4362  // (https://cloud.google.com/domains/docs/deprecations/feature-deprecations)
  4363  // Gets parameters needed to transfer a domain name from another registrar to
  4364  // Cloud Domains. For domains already managed by Google Domains
  4365  // (https://domains.google/), use `ImportDomain` instead. Use the returned
  4366  // values to call `TransferDomain`.
  4367  //
  4368  // - location: The location. Must be in the format `projects/*/locations/*`.
  4369  func (r *ProjectsLocationsRegistrationsService) RetrieveTransferParameters(location string) *ProjectsLocationsRegistrationsRetrieveTransferParametersCall {
  4370  	c := &ProjectsLocationsRegistrationsRetrieveTransferParametersCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4371  	c.location = location
  4372  	return c
  4373  }
  4374  
  4375  // DomainName sets the optional parameter "domainName": Required. The domain
  4376  // name. Unicode domain names must be expressed in Punycode format.
  4377  func (c *ProjectsLocationsRegistrationsRetrieveTransferParametersCall) DomainName(domainName string) *ProjectsLocationsRegistrationsRetrieveTransferParametersCall {
  4378  	c.urlParams_.Set("domainName", domainName)
  4379  	return c
  4380  }
  4381  
  4382  // Fields allows partial responses to be retrieved. See
  4383  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4384  // details.
  4385  func (c *ProjectsLocationsRegistrationsRetrieveTransferParametersCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistrationsRetrieveTransferParametersCall {
  4386  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4387  	return c
  4388  }
  4389  
  4390  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4391  // object's ETag matches the given value. This is useful for getting updates
  4392  // only after the object has changed since the last request.
  4393  func (c *ProjectsLocationsRegistrationsRetrieveTransferParametersCall) IfNoneMatch(entityTag string) *ProjectsLocationsRegistrationsRetrieveTransferParametersCall {
  4394  	c.ifNoneMatch_ = entityTag
  4395  	return c
  4396  }
  4397  
  4398  // Context sets the context to be used in this call's Do method.
  4399  func (c *ProjectsLocationsRegistrationsRetrieveTransferParametersCall) Context(ctx context.Context) *ProjectsLocationsRegistrationsRetrieveTransferParametersCall {
  4400  	c.ctx_ = ctx
  4401  	return c
  4402  }
  4403  
  4404  // Header returns a http.Header that can be modified by the caller to add
  4405  // headers to the request.
  4406  func (c *ProjectsLocationsRegistrationsRetrieveTransferParametersCall) Header() http.Header {
  4407  	if c.header_ == nil {
  4408  		c.header_ = make(http.Header)
  4409  	}
  4410  	return c.header_
  4411  }
  4412  
  4413  func (c *ProjectsLocationsRegistrationsRetrieveTransferParametersCall) doRequest(alt string) (*http.Response, error) {
  4414  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4415  	if c.ifNoneMatch_ != "" {
  4416  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4417  	}
  4418  	var body io.Reader = nil
  4419  	c.urlParams_.Set("alt", alt)
  4420  	c.urlParams_.Set("prettyPrint", "false")
  4421  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+location}/registrations:retrieveTransferParameters")
  4422  	urls += "?" + c.urlParams_.Encode()
  4423  	req, err := http.NewRequest("GET", urls, body)
  4424  	if err != nil {
  4425  		return nil, err
  4426  	}
  4427  	req.Header = reqHeaders
  4428  	googleapi.Expand(req.URL, map[string]string{
  4429  		"location": c.location,
  4430  	})
  4431  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4432  }
  4433  
  4434  // Do executes the "domains.projects.locations.registrations.retrieveTransferParameters" call.
  4435  // Any non-2xx status code is an error. Response headers are in either
  4436  // *RetrieveTransferParametersResponse.ServerResponse.Header or (if a response
  4437  // was returned at all) in error.(*googleapi.Error).Header. Use
  4438  // googleapi.IsNotModified to check whether the returned error was because
  4439  // http.StatusNotModified was returned.
  4440  func (c *ProjectsLocationsRegistrationsRetrieveTransferParametersCall) Do(opts ...googleapi.CallOption) (*RetrieveTransferParametersResponse, error) {
  4441  	gensupport.SetOptions(c.urlParams_, opts...)
  4442  	res, err := c.doRequest("json")
  4443  	if res != nil && res.StatusCode == http.StatusNotModified {
  4444  		if res.Body != nil {
  4445  			res.Body.Close()
  4446  		}
  4447  		return nil, gensupport.WrapError(&googleapi.Error{
  4448  			Code:   res.StatusCode,
  4449  			Header: res.Header,
  4450  		})
  4451  	}
  4452  	if err != nil {
  4453  		return nil, err
  4454  	}
  4455  	defer googleapi.CloseBody(res)
  4456  	if err := googleapi.CheckResponse(res); err != nil {
  4457  		return nil, gensupport.WrapError(err)
  4458  	}
  4459  	ret := &RetrieveTransferParametersResponse{
  4460  		ServerResponse: googleapi.ServerResponse{
  4461  			Header:         res.Header,
  4462  			HTTPStatusCode: res.StatusCode,
  4463  		},
  4464  	}
  4465  	target := &ret
  4466  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4467  		return nil, err
  4468  	}
  4469  	return ret, nil
  4470  }
  4471  
  4472  type ProjectsLocationsRegistrationsSearchDomainsCall struct {
  4473  	s            *Service
  4474  	location     string
  4475  	urlParams_   gensupport.URLParams
  4476  	ifNoneMatch_ string
  4477  	ctx_         context.Context
  4478  	header_      http.Header
  4479  }
  4480  
  4481  // SearchDomains: Searches for available domain names similar to the provided
  4482  // query. Availability results from this method are approximate; call
  4483  // `RetrieveRegisterParameters` on a domain before registering to confirm
  4484  // availability.
  4485  //
  4486  // - location: The location. Must be in the format `projects/*/locations/*`.
  4487  func (r *ProjectsLocationsRegistrationsService) SearchDomains(location string) *ProjectsLocationsRegistrationsSearchDomainsCall {
  4488  	c := &ProjectsLocationsRegistrationsSearchDomainsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4489  	c.location = location
  4490  	return c
  4491  }
  4492  
  4493  // Query sets the optional parameter "query": Required. String used to search
  4494  // for available domain names.
  4495  func (c *ProjectsLocationsRegistrationsSearchDomainsCall) Query(query string) *ProjectsLocationsRegistrationsSearchDomainsCall {
  4496  	c.urlParams_.Set("query", query)
  4497  	return c
  4498  }
  4499  
  4500  // Fields allows partial responses to be retrieved. See
  4501  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4502  // details.
  4503  func (c *ProjectsLocationsRegistrationsSearchDomainsCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistrationsSearchDomainsCall {
  4504  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4505  	return c
  4506  }
  4507  
  4508  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4509  // object's ETag matches the given value. This is useful for getting updates
  4510  // only after the object has changed since the last request.
  4511  func (c *ProjectsLocationsRegistrationsSearchDomainsCall) IfNoneMatch(entityTag string) *ProjectsLocationsRegistrationsSearchDomainsCall {
  4512  	c.ifNoneMatch_ = entityTag
  4513  	return c
  4514  }
  4515  
  4516  // Context sets the context to be used in this call's Do method.
  4517  func (c *ProjectsLocationsRegistrationsSearchDomainsCall) Context(ctx context.Context) *ProjectsLocationsRegistrationsSearchDomainsCall {
  4518  	c.ctx_ = ctx
  4519  	return c
  4520  }
  4521  
  4522  // Header returns a http.Header that can be modified by the caller to add
  4523  // headers to the request.
  4524  func (c *ProjectsLocationsRegistrationsSearchDomainsCall) Header() http.Header {
  4525  	if c.header_ == nil {
  4526  		c.header_ = make(http.Header)
  4527  	}
  4528  	return c.header_
  4529  }
  4530  
  4531  func (c *ProjectsLocationsRegistrationsSearchDomainsCall) doRequest(alt string) (*http.Response, error) {
  4532  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4533  	if c.ifNoneMatch_ != "" {
  4534  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4535  	}
  4536  	var body io.Reader = nil
  4537  	c.urlParams_.Set("alt", alt)
  4538  	c.urlParams_.Set("prettyPrint", "false")
  4539  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+location}/registrations:searchDomains")
  4540  	urls += "?" + c.urlParams_.Encode()
  4541  	req, err := http.NewRequest("GET", urls, body)
  4542  	if err != nil {
  4543  		return nil, err
  4544  	}
  4545  	req.Header = reqHeaders
  4546  	googleapi.Expand(req.URL, map[string]string{
  4547  		"location": c.location,
  4548  	})
  4549  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4550  }
  4551  
  4552  // Do executes the "domains.projects.locations.registrations.searchDomains" call.
  4553  // Any non-2xx status code is an error. Response headers are in either
  4554  // *SearchDomainsResponse.ServerResponse.Header or (if a response was returned
  4555  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  4556  // check whether the returned error was because http.StatusNotModified was
  4557  // returned.
  4558  func (c *ProjectsLocationsRegistrationsSearchDomainsCall) Do(opts ...googleapi.CallOption) (*SearchDomainsResponse, error) {
  4559  	gensupport.SetOptions(c.urlParams_, opts...)
  4560  	res, err := c.doRequest("json")
  4561  	if res != nil && res.StatusCode == http.StatusNotModified {
  4562  		if res.Body != nil {
  4563  			res.Body.Close()
  4564  		}
  4565  		return nil, gensupport.WrapError(&googleapi.Error{
  4566  			Code:   res.StatusCode,
  4567  			Header: res.Header,
  4568  		})
  4569  	}
  4570  	if err != nil {
  4571  		return nil, err
  4572  	}
  4573  	defer googleapi.CloseBody(res)
  4574  	if err := googleapi.CheckResponse(res); err != nil {
  4575  		return nil, gensupport.WrapError(err)
  4576  	}
  4577  	ret := &SearchDomainsResponse{
  4578  		ServerResponse: googleapi.ServerResponse{
  4579  			Header:         res.Header,
  4580  			HTTPStatusCode: res.StatusCode,
  4581  		},
  4582  	}
  4583  	target := &ret
  4584  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4585  		return nil, err
  4586  	}
  4587  	return ret, nil
  4588  }
  4589  
  4590  type ProjectsLocationsRegistrationsSetIamPolicyCall struct {
  4591  	s                   *Service
  4592  	resource            string
  4593  	setiampolicyrequest *SetIamPolicyRequest
  4594  	urlParams_          gensupport.URLParams
  4595  	ctx_                context.Context
  4596  	header_             http.Header
  4597  }
  4598  
  4599  // SetIamPolicy: Sets the access control policy on the specified resource.
  4600  // Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`,
  4601  // and `PERMISSION_DENIED` errors.
  4602  //
  4603  //   - resource: REQUIRED: The resource for which the policy is being specified.
  4604  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  4605  //     for the appropriate value for this field.
  4606  func (r *ProjectsLocationsRegistrationsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsRegistrationsSetIamPolicyCall {
  4607  	c := &ProjectsLocationsRegistrationsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4608  	c.resource = resource
  4609  	c.setiampolicyrequest = setiampolicyrequest
  4610  	return c
  4611  }
  4612  
  4613  // Fields allows partial responses to be retrieved. See
  4614  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4615  // details.
  4616  func (c *ProjectsLocationsRegistrationsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistrationsSetIamPolicyCall {
  4617  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4618  	return c
  4619  }
  4620  
  4621  // Context sets the context to be used in this call's Do method.
  4622  func (c *ProjectsLocationsRegistrationsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsRegistrationsSetIamPolicyCall {
  4623  	c.ctx_ = ctx
  4624  	return c
  4625  }
  4626  
  4627  // Header returns a http.Header that can be modified by the caller to add
  4628  // headers to the request.
  4629  func (c *ProjectsLocationsRegistrationsSetIamPolicyCall) Header() http.Header {
  4630  	if c.header_ == nil {
  4631  		c.header_ = make(http.Header)
  4632  	}
  4633  	return c.header_
  4634  }
  4635  
  4636  func (c *ProjectsLocationsRegistrationsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  4637  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4638  	var body io.Reader = nil
  4639  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
  4640  	if err != nil {
  4641  		return nil, err
  4642  	}
  4643  	c.urlParams_.Set("alt", alt)
  4644  	c.urlParams_.Set("prettyPrint", "false")
  4645  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+resource}:setIamPolicy")
  4646  	urls += "?" + c.urlParams_.Encode()
  4647  	req, err := http.NewRequest("POST", urls, body)
  4648  	if err != nil {
  4649  		return nil, err
  4650  	}
  4651  	req.Header = reqHeaders
  4652  	googleapi.Expand(req.URL, map[string]string{
  4653  		"resource": c.resource,
  4654  	})
  4655  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4656  }
  4657  
  4658  // Do executes the "domains.projects.locations.registrations.setIamPolicy" call.
  4659  // Any non-2xx status code is an error. Response headers are in either
  4660  // *Policy.ServerResponse.Header or (if a response was returned at all) in
  4661  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4662  // whether the returned error was because http.StatusNotModified was returned.
  4663  func (c *ProjectsLocationsRegistrationsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  4664  	gensupport.SetOptions(c.urlParams_, opts...)
  4665  	res, err := c.doRequest("json")
  4666  	if res != nil && res.StatusCode == http.StatusNotModified {
  4667  		if res.Body != nil {
  4668  			res.Body.Close()
  4669  		}
  4670  		return nil, gensupport.WrapError(&googleapi.Error{
  4671  			Code:   res.StatusCode,
  4672  			Header: res.Header,
  4673  		})
  4674  	}
  4675  	if err != nil {
  4676  		return nil, err
  4677  	}
  4678  	defer googleapi.CloseBody(res)
  4679  	if err := googleapi.CheckResponse(res); err != nil {
  4680  		return nil, gensupport.WrapError(err)
  4681  	}
  4682  	ret := &Policy{
  4683  		ServerResponse: googleapi.ServerResponse{
  4684  			Header:         res.Header,
  4685  			HTTPStatusCode: res.StatusCode,
  4686  		},
  4687  	}
  4688  	target := &ret
  4689  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4690  		return nil, err
  4691  	}
  4692  	return ret, nil
  4693  }
  4694  
  4695  type ProjectsLocationsRegistrationsTestIamPermissionsCall struct {
  4696  	s                         *Service
  4697  	resource                  string
  4698  	testiampermissionsrequest *TestIamPermissionsRequest
  4699  	urlParams_                gensupport.URLParams
  4700  	ctx_                      context.Context
  4701  	header_                   http.Header
  4702  }
  4703  
  4704  // TestIamPermissions: Returns permissions that a caller has on the specified
  4705  // resource. If the resource does not exist, this will return an empty set of
  4706  // permissions, not a `NOT_FOUND` error. Note: This operation is designed to be
  4707  // used for building permission-aware UIs and command-line tools, not for
  4708  // authorization checking. This operation may "fail open" without warning.
  4709  //
  4710  //   - resource: REQUIRED: The resource for which the policy detail is being
  4711  //     requested. See Resource names
  4712  //     (https://cloud.google.com/apis/design/resource_names) for the appropriate
  4713  //     value for this field.
  4714  func (r *ProjectsLocationsRegistrationsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsRegistrationsTestIamPermissionsCall {
  4715  	c := &ProjectsLocationsRegistrationsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4716  	c.resource = resource
  4717  	c.testiampermissionsrequest = testiampermissionsrequest
  4718  	return c
  4719  }
  4720  
  4721  // Fields allows partial responses to be retrieved. See
  4722  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4723  // details.
  4724  func (c *ProjectsLocationsRegistrationsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistrationsTestIamPermissionsCall {
  4725  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4726  	return c
  4727  }
  4728  
  4729  // Context sets the context to be used in this call's Do method.
  4730  func (c *ProjectsLocationsRegistrationsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsRegistrationsTestIamPermissionsCall {
  4731  	c.ctx_ = ctx
  4732  	return c
  4733  }
  4734  
  4735  // Header returns a http.Header that can be modified by the caller to add
  4736  // headers to the request.
  4737  func (c *ProjectsLocationsRegistrationsTestIamPermissionsCall) Header() http.Header {
  4738  	if c.header_ == nil {
  4739  		c.header_ = make(http.Header)
  4740  	}
  4741  	return c.header_
  4742  }
  4743  
  4744  func (c *ProjectsLocationsRegistrationsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
  4745  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4746  	var body io.Reader = nil
  4747  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
  4748  	if err != nil {
  4749  		return nil, err
  4750  	}
  4751  	c.urlParams_.Set("alt", alt)
  4752  	c.urlParams_.Set("prettyPrint", "false")
  4753  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+resource}:testIamPermissions")
  4754  	urls += "?" + c.urlParams_.Encode()
  4755  	req, err := http.NewRequest("POST", urls, body)
  4756  	if err != nil {
  4757  		return nil, err
  4758  	}
  4759  	req.Header = reqHeaders
  4760  	googleapi.Expand(req.URL, map[string]string{
  4761  		"resource": c.resource,
  4762  	})
  4763  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4764  }
  4765  
  4766  // Do executes the "domains.projects.locations.registrations.testIamPermissions" call.
  4767  // Any non-2xx status code is an error. Response headers are in either
  4768  // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was
  4769  // returned at all) in error.(*googleapi.Error).Header. Use
  4770  // googleapi.IsNotModified to check whether the returned error was because
  4771  // http.StatusNotModified was returned.
  4772  func (c *ProjectsLocationsRegistrationsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
  4773  	gensupport.SetOptions(c.urlParams_, opts...)
  4774  	res, err := c.doRequest("json")
  4775  	if res != nil && res.StatusCode == http.StatusNotModified {
  4776  		if res.Body != nil {
  4777  			res.Body.Close()
  4778  		}
  4779  		return nil, gensupport.WrapError(&googleapi.Error{
  4780  			Code:   res.StatusCode,
  4781  			Header: res.Header,
  4782  		})
  4783  	}
  4784  	if err != nil {
  4785  		return nil, err
  4786  	}
  4787  	defer googleapi.CloseBody(res)
  4788  	if err := googleapi.CheckResponse(res); err != nil {
  4789  		return nil, gensupport.WrapError(err)
  4790  	}
  4791  	ret := &TestIamPermissionsResponse{
  4792  		ServerResponse: googleapi.ServerResponse{
  4793  			Header:         res.Header,
  4794  			HTTPStatusCode: res.StatusCode,
  4795  		},
  4796  	}
  4797  	target := &ret
  4798  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4799  		return nil, err
  4800  	}
  4801  	return ret, nil
  4802  }
  4803  
  4804  type ProjectsLocationsRegistrationsTransferCall struct {
  4805  	s                     *Service
  4806  	parent                string
  4807  	transferdomainrequest *TransferDomainRequest
  4808  	urlParams_            gensupport.URLParams
  4809  	ctx_                  context.Context
  4810  	header_               http.Header
  4811  }
  4812  
  4813  // Transfer: Deprecated: For more information, see Cloud Domains feature
  4814  // deprecation
  4815  // (https://cloud.google.com/domains/docs/deprecations/feature-deprecations)
  4816  // Transfers a domain name from another registrar to Cloud Domains. For domains
  4817  // already managed by Google Domains (https://domains.google/), use
  4818  // `ImportDomain` instead. Before calling this method, go to the domain's
  4819  // current registrar to unlock the domain for transfer and retrieve the
  4820  // domain's transfer authorization code. Then call `RetrieveTransferParameters`
  4821  // to confirm that the domain is unlocked and to get values needed to build a
  4822  // call to this method. A successful call creates a `Registration` resource in
  4823  // state `TRANSFER_PENDING`. It can take several days to complete the transfer
  4824  // process. The registrant can often speed up this process by approving the
  4825  // transfer through the current registrar, either by clicking a link in an
  4826  // email from the registrar or by visiting the registrar's website. A few
  4827  // minutes after transfer approval, the resource transitions to state `ACTIVE`,
  4828  // indicating that the transfer was successful. If the transfer is rejected or
  4829  // the request expires without being approved, the resource can end up in state
  4830  // `TRANSFER_FAILED`. If transfer fails, you can safely delete the resource and
  4831  // retry the transfer.
  4832  //
  4833  //   - parent: The parent resource of the `Registration`. Must be in the format
  4834  //     `projects/*/locations/*`.
  4835  func (r *ProjectsLocationsRegistrationsService) Transfer(parent string, transferdomainrequest *TransferDomainRequest) *ProjectsLocationsRegistrationsTransferCall {
  4836  	c := &ProjectsLocationsRegistrationsTransferCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4837  	c.parent = parent
  4838  	c.transferdomainrequest = transferdomainrequest
  4839  	return c
  4840  }
  4841  
  4842  // Fields allows partial responses to be retrieved. See
  4843  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4844  // details.
  4845  func (c *ProjectsLocationsRegistrationsTransferCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistrationsTransferCall {
  4846  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4847  	return c
  4848  }
  4849  
  4850  // Context sets the context to be used in this call's Do method.
  4851  func (c *ProjectsLocationsRegistrationsTransferCall) Context(ctx context.Context) *ProjectsLocationsRegistrationsTransferCall {
  4852  	c.ctx_ = ctx
  4853  	return c
  4854  }
  4855  
  4856  // Header returns a http.Header that can be modified by the caller to add
  4857  // headers to the request.
  4858  func (c *ProjectsLocationsRegistrationsTransferCall) Header() http.Header {
  4859  	if c.header_ == nil {
  4860  		c.header_ = make(http.Header)
  4861  	}
  4862  	return c.header_
  4863  }
  4864  
  4865  func (c *ProjectsLocationsRegistrationsTransferCall) doRequest(alt string) (*http.Response, error) {
  4866  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4867  	var body io.Reader = nil
  4868  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.transferdomainrequest)
  4869  	if err != nil {
  4870  		return nil, err
  4871  	}
  4872  	c.urlParams_.Set("alt", alt)
  4873  	c.urlParams_.Set("prettyPrint", "false")
  4874  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+parent}/registrations:transfer")
  4875  	urls += "?" + c.urlParams_.Encode()
  4876  	req, err := http.NewRequest("POST", urls, body)
  4877  	if err != nil {
  4878  		return nil, err
  4879  	}
  4880  	req.Header = reqHeaders
  4881  	googleapi.Expand(req.URL, map[string]string{
  4882  		"parent": c.parent,
  4883  	})
  4884  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4885  }
  4886  
  4887  // Do executes the "domains.projects.locations.registrations.transfer" call.
  4888  // Any non-2xx status code is an error. Response headers are in either
  4889  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  4890  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4891  // whether the returned error was because http.StatusNotModified was returned.
  4892  func (c *ProjectsLocationsRegistrationsTransferCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  4893  	gensupport.SetOptions(c.urlParams_, opts...)
  4894  	res, err := c.doRequest("json")
  4895  	if res != nil && res.StatusCode == http.StatusNotModified {
  4896  		if res.Body != nil {
  4897  			res.Body.Close()
  4898  		}
  4899  		return nil, gensupport.WrapError(&googleapi.Error{
  4900  			Code:   res.StatusCode,
  4901  			Header: res.Header,
  4902  		})
  4903  	}
  4904  	if err != nil {
  4905  		return nil, err
  4906  	}
  4907  	defer googleapi.CloseBody(res)
  4908  	if err := googleapi.CheckResponse(res); err != nil {
  4909  		return nil, gensupport.WrapError(err)
  4910  	}
  4911  	ret := &Operation{
  4912  		ServerResponse: googleapi.ServerResponse{
  4913  			Header:         res.Header,
  4914  			HTTPStatusCode: res.StatusCode,
  4915  		},
  4916  	}
  4917  	target := &ret
  4918  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4919  		return nil, err
  4920  	}
  4921  	return ret, nil
  4922  }
  4923  

View as plain text