Debian Codegraph @

domains/v1alpha2/domains-gen.go

raw symbols SCIP
1 // Copyright 2026 Google LLC.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
4
5 // Code generated file. DO NOT EDIT.
6
7 // Package 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 "log/slog"
61 "net/http"
62 "net/url"
63 "strconv"
64 "strings"
65
66 "github.com/googleapis/gax-go/v2/internallog"
67 googleapi "google.golang.org/api/googleapi"
68 internal "google.golang.org/api/internal"
69 gensupport "google.golang.org/api/internal/gensupport"
70 option "google.golang.org/api/option"
71 internaloption "google.golang.org/api/option/internaloption"
72 htransport "google.golang.org/api/transport/http"
73 )
74
75 // Always reference these packages, just in case the auto-generated code
76 // below doesn't.
77 var _ = bytes.NewBuffer
78 var _ = strconv.Itoa
79 var _ = fmt.Sprintf
80 var _ = json.NewDecoder
81 var _ = io.Copy
82 var _ = url.Parse
83 var _ = gensupport.MarshalJSON
84 var _ = googleapi.Version
85 var _ = errors.New
86 var _ = strings.Replace
87 var _ = context.Canceled
88 var _ = internaloption.WithDefaultEndpoint
89 var _ = internal.Version
90 var _ = internallog.New
91
92 const apiId = "domains:v1alpha2"
93 const apiName = "domains"
94 const apiVersion = "v1alpha2"
95 const basePath = "https://domains.googleapis.com/"
96 const basePathTemplate = "https://domains.UNIVERSE_DOMAIN/"
97 const mtlsBasePath = "https://domains.mtls.googleapis.com/"
98
99 // OAuth2 scopes used by this API.
100 const (
101 // See, edit, configure, and delete your Google Cloud data and see the email
102 // address for your Google Account.
103 CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
104 )
105
106 // NewService creates a new Service.
107 func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
108 scopesOption := internaloption.WithDefaultScopes(
109 "https://www.googleapis.com/auth/cloud-platform",
110 )
111 // NOTE: prepend, so we don't override user-specified scopes.
112 opts = append([]option.ClientOption{scopesOption}, opts...)
113 opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
114 opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate))
115 opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
116 opts = append(opts, internaloption.EnableNewAuthLibrary())
117 client, endpoint, err := htransport.NewClient(ctx, opts...)
118 if err != nil {
119 return nil, err
120 }
121 s := &Service{client: client, BasePath: basePath, logger: internaloption.GetLogger(opts)}
122 s.Projects = NewProjectsService(s)
123 if endpoint != "" {
124 s.BasePath = endpoint
125 }
126 return s, nil
127 }
128
129 // New creates a new Service. It uses the provided http.Client for requests.
130 //
131 // Deprecated: please use NewService instead.
132 // To provide a custom HTTP client, use option.WithHTTPClient.
133 // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
134 func New(client *http.Client) (*Service, error) {
135 if client == nil {
136 return nil, errors.New("client is nil")
137 }
138 return NewService(context.TODO(), option.WithHTTPClient(client))
139 }
140
141 type Service struct {
142 client *http.Client
143 logger *slog.Logger
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:[email protected]" ] }, { "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:[email protected]" ] } ] } ] } For
215 // sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ
216 // logging. It also exempts `[email protected]` from DATA_READ logging, and
217 // `[email protected]` 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:[email protected]" ] }, { "log_type":
246 // "DATA_WRITE" } ] } This enables 'DATA_READ' and 'DATA_WRITE' logging, while
247 // exempting [email protected] 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 // `[email protected]` . * `serviceAccount:{emailid}`: An email address that
324 // represents a Google service account. For example,
325 // `[email protected]`. *
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, `[email protected]`. * `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, `[email protected]?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 // `[email protected]?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 // `[email protected]?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 // GoogleDomainsRedirectsDataAvailable: Output only. Indicates if this
632 // `Registration` has configured one of the following deprecated Google Domains
633 // DNS features: * Domain forwarding (HTTP `301` and `302` response status
634 // codes), * Email forwarding. See
635 // https://cloud.google.com/domains/docs/deprecations/feature-deprecations for
636 // more details. If any of these features is enabled call the
637 // `RetrieveGoogleDomainsForwardingConfig` method to get details about the
638 // feature's configuration. A forwarding configuration might not work correctly
639 // if required DNS records are not present in the domain's authoritative DNS
640 // Zone.
641 GoogleDomainsRedirectsDataAvailable bool `json:"googleDomainsRedirectsDataAvailable,omitempty"`
642 // ForceSendFields is a list of field names (e.g. "CustomDns") to
643 // unconditionally include in API requests. By default, fields with empty or
644 // default values are omitted from API requests. See
645 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
646 // details.
647 ForceSendFields []string `json:"-"`
648 // NullFields is a list of field names (e.g. "CustomDns") to include in API
649 // requests with the JSON null value. By default, fields with empty values are
650 // omitted from API requests. See
651 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
652 NullFields []string `json:"-"`
653 }
654
655 func (s DnsSettings) MarshalJSON() ([]byte, error) {
656 type NoMethod DnsSettings
657 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
658 }
659
660 // Domain: A domain that the calling user manages in Google Domains.
661 type Domain struct {
662 // DomainName: The domain name. Unicode domain names are expressed in Punycode
663 // format.
664 DomainName string `json:"domainName,omitempty"`
665 // ResourceState: The state of this domain as a `Registration` resource.
666 //
667 // Possible values:
668 // "RESOURCE_STATE_UNSPECIFIED" - The assessment is undefined.
669 // "IMPORTABLE" - A `Registration` resource can be created for this domain by
670 // calling `ImportDomain`.
671 // "UNSUPPORTED" - A `Registration` resource cannot be created for this
672 // domain because it is not supported by Cloud Domains; for example, the
673 // top-level domain is not supported or the registry charges non-standard
674 // pricing for yearly renewals.
675 // "SUSPENDED" - A `Registration` resource cannot be created for this domain
676 // because it is suspended and needs to be resolved with Google Domains.
677 // "EXPIRED" - A `Registration` resource cannot be created for this domain
678 // because it is expired and needs to be renewed with Google Domains.
679 // "DELETED" - A `Registration` resource cannot be created for this domain
680 // because it is deleted, but it may be possible to restore it with Google
681 // Domains.
682 ResourceState string `json:"resourceState,omitempty"`
683 // YearlyPrice: Price to renew the domain for one year. Only set when
684 // `resource_state` is `IMPORTABLE`.
685 YearlyPrice *Money `json:"yearlyPrice,omitempty"`
686 // ForceSendFields is a list of field names (e.g. "DomainName") to
687 // unconditionally include in API requests. By default, fields with empty or
688 // default values are omitted from API requests. See
689 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
690 // details.
691 ForceSendFields []string `json:"-"`
692 // NullFields is a list of field names (e.g. "DomainName") to include in API
693 // requests with the JSON null value. By default, fields with empty values are
694 // omitted from API requests. See
695 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
696 NullFields []string `json:"-"`
697 }
698
699 func (s Domain) MarshalJSON() ([]byte, error) {
700 type NoMethod Domain
701 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
702 }
703
704 // DomainForwarding: Domain forwarding configuration.
705 type DomainForwarding struct {
706 // PathForwarding: If true, forwards the path after the domain name to the same
707 // path at the new address.
708 PathForwarding bool `json:"pathForwarding,omitempty"`
709 // PemCertificate: The PEM-encoded certificate chain.
710 PemCertificate string `json:"pemCertificate,omitempty"`
711 // RedirectType: The redirect type.
712 //
713 // Possible values:
714 // "REDIRECT_TYPE_UNSPECIFIED" - Redirect Type is unspecified.
715 // "TEMPORARY" - 301 redirect. Allows to propagate changes to the forwarding
716 // address quickly.
717 // "PERMANENT" - 302 redirect. Allows browsers to cache the forwarding
718 // address. This may help the address resolve more quickly. Changes may take
719 // longer to propagate
720 RedirectType string `json:"redirectType,omitempty"`
721 // SslEnabled: If true, the forwarding works also over HTTPS.
722 SslEnabled bool `json:"sslEnabled,omitempty"`
723 // Subdomain: The subdomain of the registered domain that is being forwarded.
724 // E.g. `www.example.com`, `example.com` (i.e. the registered domain itself) or
725 // `*.example.com` (i.e. all subdomains).
726 Subdomain string `json:"subdomain,omitempty"`
727 // TargetUri: The target of the domain forwarding, i.e. the path to redirect
728 // the `subdomain` to.
729 TargetUri string `json:"targetUri,omitempty"`
730 // ForceSendFields is a list of field names (e.g. "PathForwarding") to
731 // unconditionally include in API requests. By default, fields with empty or
732 // default values are omitted from API requests. See
733 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
734 // details.
735 ForceSendFields []string `json:"-"`
736 // NullFields is a list of field names (e.g. "PathForwarding") to include in
737 // API requests with the JSON null value. By default, fields with empty values
738 // are omitted from API requests. See
739 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
740 NullFields []string `json:"-"`
741 }
742
743 func (s DomainForwarding) MarshalJSON() ([]byte, error) {
744 type NoMethod DomainForwarding
745 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
746 }
747
748 // DsRecord: Defines a Delegation Signer (DS) record, which is needed to enable
749 // DNSSEC for a domain. It contains a digest (hash) of a DNSKEY record that
750 // must be present in the domain's DNS zone.
751 type DsRecord struct {
752 // Algorithm: The algorithm used to generate the referenced DNSKEY.
753 //
754 // Possible values:
755 // "ALGORITHM_UNSPECIFIED" - The algorithm is unspecified.
756 // "RSAMD5" - RSA/MD5. Cannot be used for new deployments.
757 // "DH" - Diffie-Hellman. Cannot be used for new deployments.
758 // "DSA" - DSA/SHA1. Not recommended for new deployments.
759 // "ECC" - ECC. Not recommended for new deployments.
760 // "RSASHA1" - RSA/SHA-1. Not recommended for new deployments.
761 // "DSANSEC3SHA1" - DSA-NSEC3-SHA1. Not recommended for new deployments.
762 // "RSASHA1NSEC3SHA1" - RSA/SHA1-NSEC3-SHA1. Not recommended for new
763 // deployments.
764 // "RSASHA256" - RSA/SHA-256.
765 // "RSASHA512" - RSA/SHA-512.
766 // "ECCGOST" - GOST R 34.10-2001.
767 // "ECDSAP256SHA256" - ECDSA Curve P-256 with SHA-256.
768 // "ECDSAP384SHA384" - ECDSA Curve P-384 with SHA-384.
769 // "ED25519" - Ed25519.
770 // "ED448" - Ed448.
771 // "INDIRECT" - Reserved for Indirect Keys. Cannot be used for new
772 // deployments.
773 // "PRIVATEDNS" - Private algorithm. Cannot be used for new deployments.
774 // "PRIVATEOID" - Private algorithm OID. Cannot be used for new deployments.
775 Algorithm string `json:"algorithm,omitempty"`
776 // Digest: The digest generated from the referenced DNSKEY.
777 Digest string `json:"digest,omitempty"`
778 // DigestType: The hash function used to generate the digest of the referenced
779 // DNSKEY.
780 //
781 // Possible values:
782 // "DIGEST_TYPE_UNSPECIFIED" - The DigestType is unspecified.
783 // "SHA1" - SHA-1. Not recommended for new deployments.
784 // "SHA256" - SHA-256.
785 // "GOST3411" - GOST R 34.11-94.
786 // "SHA384" - SHA-384.
787 DigestType string `json:"digestType,omitempty"`
788 // KeyTag: The key tag of the record. Must be set in range 0 -- 65535.
789 KeyTag int64 `json:"keyTag,omitempty"`
790 // ForceSendFields is a list of field names (e.g. "Algorithm") 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. "Algorithm") 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 DsRecord) MarshalJSON() ([]byte, error) {
804 type NoMethod DsRecord
805 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
806 }
807
808 // EmailForwarding: Email forwarding configuration.
809 type EmailForwarding struct {
810 // Alias: An alias recipient email that forwards emails to the
811 // `target_email_address`. For example, `[email protected]` or `*@example.com`
812 // (wildcard alias forwards all the emails under the registered domain).
813 Alias string `json:"alias,omitempty"`
814 // TargetEmailAddress: Target email that receives emails sent to the `alias`.
815 TargetEmailAddress string `json:"targetEmailAddress,omitempty"`
816 // ForceSendFields is a list of field names (e.g. "Alias") to unconditionally
817 // include in API requests. By default, fields with empty or default values are
818 // omitted from API requests. See
819 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
820 // details.
821 ForceSendFields []string `json:"-"`
822 // NullFields is a list of field names (e.g. "Alias") to include in API
823 // requests with the JSON null value. By default, fields with empty values are
824 // omitted from API requests. See
825 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
826 NullFields []string `json:"-"`
827 }
828
829 func (s EmailForwarding) MarshalJSON() ([]byte, error) {
830 type NoMethod EmailForwarding
831 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
832 }
833
834 // ExportRegistrationRequest: Deprecated: For more information, see Cloud
835 // Domains feature deprecation
836 // (https://cloud.google.com/domains/docs/deprecations/feature-deprecations).
837 // Request for the `ExportRegistration` method.
838 type ExportRegistrationRequest struct {
839 }
840
841 // Expr: Represents a textual expression in the Common Expression Language
842 // (CEL) syntax. CEL is a C-like expression language. The syntax and semantics
843 // of CEL are documented at https://github.com/google/cel-spec. Example
844 // (Comparison): title: "Summary size limit" description: "Determines if a
845 // summary is less than 100 chars" expression: "document.summary.size() < 100"
846 // Example (Equality): title: "Requestor is owner" description: "Determines if
847 // requestor is the document owner" expression: "document.owner ==
848 // request.auth.claims.email" Example (Logic): title: "Public documents"
849 // description: "Determine whether the document should be publicly visible"
850 // expression: "document.type != 'private' && document.type != 'internal'"
851 // Example (Data Manipulation): title: "Notification string" description:
852 // "Create a notification string with a timestamp." expression: "'New message
853 // received at ' + string(document.create_time)" The exact variables and
854 // functions that may be referenced within an expression are determined by the
855 // service that evaluates it. See the service documentation for additional
856 // information.
857 type Expr struct {
858 // Description: Optional. Description of the expression. This is a longer text
859 // which describes the expression, e.g. when hovered over it in a UI.
860 Description string `json:"description,omitempty"`
861 // Expression: Textual representation of an expression in Common Expression
862 // Language syntax.
863 Expression string `json:"expression,omitempty"`
864 // Location: Optional. String indicating the location of the expression for
865 // error reporting, e.g. a file name and a position in the file.
866 Location string `json:"location,omitempty"`
867 // Title: Optional. Title for the expression, i.e. a short string describing
868 // its purpose. This can be used e.g. in UIs which allow to enter the
869 // expression.
870 Title string `json:"title,omitempty"`
871 // ForceSendFields is a list of field names (e.g. "Description") to
872 // unconditionally include in API requests. By default, fields with empty or
873 // default values are omitted from API requests. See
874 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
875 // details.
876 ForceSendFields []string `json:"-"`
877 // NullFields is a list of field names (e.g. "Description") to include in API
878 // requests with the JSON null value. By default, fields with empty values are
879 // omitted from API requests. See
880 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
881 NullFields []string `json:"-"`
882 }
883
884 func (s Expr) MarshalJSON() ([]byte, error) {
885 type NoMethod Expr
886 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
887 }
888
889 // GeoPolicy: Configures a `RRSetRoutingPolicy` that routes based on the geo
890 // location of the querying user.
891 type GeoPolicy struct {
892 // EnableFencing: Without fencing, if health check fails for all configured
893 // items in the current geo bucket, we failover to the next nearest geo bucket.
894 // With fencing, if health checking is enabled, as long as some targets in the
895 // current geo bucket are healthy, we return only the healthy targets. However,
896 // if all targets are unhealthy, we don't failover to the next nearest bucket;
897 // instead, we return all the items in the current bucket even when all targets
898 // are unhealthy.
899 EnableFencing bool `json:"enableFencing,omitempty"`
900 // Item: The primary geo routing configuration. If there are multiple items
901 // with the same location, an error is returned instead.
902 Item []*GeoPolicyItem `json:"item,omitempty"`
903 // ForceSendFields is a list of field names (e.g. "EnableFencing") to
904 // unconditionally include in API requests. By default, fields with empty or
905 // default values are omitted from API requests. See
906 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
907 // details.
908 ForceSendFields []string `json:"-"`
909 // NullFields is a list of field names (e.g. "EnableFencing") to include in API
910 // requests with the JSON null value. By default, fields with empty values are
911 // omitted from API requests. See
912 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
913 NullFields []string `json:"-"`
914 }
915
916 func (s GeoPolicy) MarshalJSON() ([]byte, error) {
917 type NoMethod GeoPolicy
918 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
919 }
920
921 // GeoPolicyItem: ResourceRecordSet data for one geo location.
922 type GeoPolicyItem struct {
923 // HealthCheckedTargets: For A and AAAA types only. Endpoints to return in the
924 // query result only if they are healthy. These can be specified along with
925 // `rrdata` within this item.
926 HealthCheckedTargets *HealthCheckTargets `json:"healthCheckedTargets,omitempty"`
927 // Location: The geo-location granularity is a GCP region. This location string
928 // should correspond to a GCP region. e.g. "us-east1", "southamerica-east1",
929 // "asia-east1", etc.
930 Location string `json:"location,omitempty"`
931 Rrdata []string `json:"rrdata,omitempty"`
932 // SignatureRrdata: DNSSEC generated signatures for all the `rrdata` within
933 // this item. When using health-checked targets for DNSSEC-enabled zones, you
934 // can only use at most one health-checked IP address per item.
935 SignatureRrdata []string `json:"signatureRrdata,omitempty"`
936 // ForceSendFields is a list of field names (e.g. "HealthCheckedTargets") to
937 // unconditionally include in API requests. By default, fields with empty or
938 // default values are omitted from API requests. See
939 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
940 // details.
941 ForceSendFields []string `json:"-"`
942 // NullFields is a list of field names (e.g. "HealthCheckedTargets") to include
943 // in API requests with the JSON null value. By default, fields with empty
944 // values are omitted from API requests. See
945 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
946 NullFields []string `json:"-"`
947 }
948
949 func (s GeoPolicyItem) MarshalJSON() ([]byte, error) {
950 type NoMethod GeoPolicyItem
951 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
952 }
953
954 // GlueRecord: Defines a host on your domain that is a DNS name server for your
955 // domain and/or other domains. Glue records are a way of making the IP address
956 // of a name server known, even when it serves DNS queries for its parent
957 // domain. For example, when `ns.example.com` is a name server for
958 // `example.com`, the host `ns.example.com` must have a glue record to break
959 // the circular DNS reference.
960 type GlueRecord struct {
961 // HostName: Required. Domain name of the host in Punycode format.
962 HostName string `json:"hostName,omitempty"`
963 // Ipv4Addresses: List of IPv4 addresses corresponding to this host in the
964 // standard decimal format (e.g. `198.51.100.1`). At least one of
965 // `ipv4_address` and `ipv6_address` must be set.
966 Ipv4Addresses []string `json:"ipv4Addresses,omitempty"`
967 // Ipv6Addresses: List of IPv6 addresses corresponding to this host in the
968 // standard hexadecimal format (e.g. `2001:db8::`). At least one of
969 // `ipv4_address` and `ipv6_address` must be set.
970 Ipv6Addresses []string `json:"ipv6Addresses,omitempty"`
971 // ForceSendFields is a list of field names (e.g. "HostName") to
972 // unconditionally include in API requests. By default, fields with empty or
973 // default values are omitted from API requests. See
974 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
975 // details.
976 ForceSendFields []string `json:"-"`
977 // NullFields is a list of field names (e.g. "HostName") to include in API
978 // requests with the JSON null value. By default, fields with empty values are
979 // omitted from API requests. See
980 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
981 NullFields []string `json:"-"`
982 }
983
984 func (s GlueRecord) MarshalJSON() ([]byte, error) {
985 type NoMethod GlueRecord
986 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
987 }
988
989 // GoogleDomainsDns: Deprecated: For more information, see Cloud Domains
990 // feature deprecation
991 // (https://cloud.google.com/domains/docs/deprecations/feature-deprecations).
992 // Configuration for using the free DNS zone provided by Google Domains as a
993 // `Registration`'s `dns_provider`. You cannot configure the DNS zone itself
994 // using the API. To configure the DNS zone, go to Google Domains
995 // (https://domains.google/).
996 type GoogleDomainsDns struct {
997 // DsRecords: Output only. The list of DS records published for this domain.
998 // The list is automatically populated when `ds_state` is
999 // `DS_RECORDS_PUBLISHED`, otherwise it remains empty.
1000 DsRecords []*DsRecord `json:"dsRecords,omitempty"`
1001 // DsState: Required. The state of DS records for this domain. Used to enable
1002 // or disable automatic DNSSEC.
1003 //
1004 // Possible values:
1005 // "DS_STATE_UNSPECIFIED" - DS state is unspecified.
1006 // "DS_RECORDS_UNPUBLISHED" - DNSSEC is disabled for this domain. No DS
1007 // records for this domain are published in the parent DNS zone.
1008 // "DS_RECORDS_PUBLISHED" - DNSSEC is enabled for this domain. Appropriate DS
1009 // records for this domain are published in the parent DNS zone. This option is
1010 // valid only if the DNS zone referenced in the `Registration`'s `dns_provider`
1011 // field is already DNSSEC-signed.
1012 DsState string `json:"dsState,omitempty"`
1013 // NameServers: Output only. A list of name servers that store the DNS zone for
1014 // this domain. Each name server is a domain name, with Unicode domain names
1015 // expressed in Punycode format. This field is automatically populated with the
1016 // name servers assigned to the Google Domains DNS zone.
1017 NameServers []string `json:"nameServers,omitempty"`
1018 // ForceSendFields is a list of field names (e.g. "DsRecords") to
1019 // unconditionally include in API requests. By default, fields with empty or
1020 // default values are omitted from API requests. See
1021 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1022 // details.
1023 ForceSendFields []string `json:"-"`
1024 // NullFields is a list of field names (e.g. "DsRecords") to include in API
1025 // requests with the JSON null value. By default, fields with empty values are
1026 // omitted from API requests. See
1027 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1028 NullFields []string `json:"-"`
1029 }
1030
1031 func (s GoogleDomainsDns) MarshalJSON() ([]byte, error) {
1032 type NoMethod GoogleDomainsDns
1033 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1034 }
1035
1036 // HealthCheckTargets: HealthCheckTargets describes endpoints to health-check
1037 // when responding to Routing Policy queries. Only the healthy endpoints will
1038 // be included in the response. Set either `internal_load_balancer` or
1039 // `external_endpoints`. Do not set both.
1040 type HealthCheckTargets struct {
1041 // ExternalEndpoints: The Internet IP addresses to be health checked. The
1042 // format matches the format of ResourceRecordSet.rrdata as defined in RFC 1035
1043 // (section 5) and RFC 1034 (section 3.6.1)
1044 ExternalEndpoints []string `json:"externalEndpoints,omitempty"`
1045 // InternalLoadBalancer: Configuration for internal load balancers to be health
1046 // checked.
1047 InternalLoadBalancer []*LoadBalancerTarget `json:"internalLoadBalancer,omitempty"`
1048 // ForceSendFields is a list of field names (e.g. "ExternalEndpoints") to
1049 // unconditionally include in API requests. By default, fields with empty or
1050 // default values are omitted from API requests. See
1051 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1052 // details.
1053 ForceSendFields []string `json:"-"`
1054 // NullFields is a list of field names (e.g. "ExternalEndpoints") to include in
1055 // API requests with the JSON null value. By default, fields with empty values
1056 // are omitted from API requests. See
1057 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1058 NullFields []string `json:"-"`
1059 }
1060
1061 func (s HealthCheckTargets) MarshalJSON() ([]byte, error) {
1062 type NoMethod HealthCheckTargets
1063 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1064 }
1065
1066 // ImportDomainRequest: Deprecated: For more information, see Cloud Domains
1067 // feature deprecation
1068 // (https://cloud.google.com/domains/docs/deprecations/feature-deprecations).
1069 // Request for the `ImportDomain` method.
1070 type ImportDomainRequest struct {
1071 // DomainName: Required. The domain name. Unicode domain names must be
1072 // expressed in Punycode format.
1073 DomainName string `json:"domainName,omitempty"`
1074 // Labels: Set of labels associated with the `Registration`.
1075 Labels map[string]string `json:"labels,omitempty"`
1076 // ForceSendFields is a list of field names (e.g. "DomainName") to
1077 // unconditionally include in API requests. By default, fields with empty or
1078 // default values are omitted from API requests. See
1079 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1080 // details.
1081 ForceSendFields []string `json:"-"`
1082 // NullFields is a list of field names (e.g. "DomainName") to include in API
1083 // requests with the JSON null value. By default, fields with empty values are
1084 // omitted from API requests. See
1085 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1086 NullFields []string `json:"-"`
1087 }
1088
1089 func (s ImportDomainRequest) MarshalJSON() ([]byte, error) {
1090 type NoMethod ImportDomainRequest
1091 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1092 }
1093
1094 // InitiatePushTransferRequest: Request for the `InitiatePushTransfer` method.
1095 type InitiatePushTransferRequest struct {
1096 // Tag: Required. The Tag of the new registrar. Can be found at List of
1097 // registrars (https://nominet.uk/registrar-list/).
1098 Tag string `json:"tag,omitempty"`
1099 // ForceSendFields is a list of field names (e.g. "Tag") to unconditionally
1100 // include in API requests. By default, fields with empty or default values are
1101 // omitted from API requests. See
1102 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1103 // details.
1104 ForceSendFields []string `json:"-"`
1105 // NullFields is a list of field names (e.g. "Tag") to include in API requests
1106 // with the JSON null value. By default, fields with empty values are omitted
1107 // from API requests. See
1108 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1109 NullFields []string `json:"-"`
1110 }
1111
1112 func (s InitiatePushTransferRequest) MarshalJSON() ([]byte, error) {
1113 type NoMethod InitiatePushTransferRequest
1114 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1115 }
1116
1117 // ListLocationsResponse: The response message for Locations.ListLocations.
1118 type ListLocationsResponse struct {
1119 // Locations: A list of locations that matches the specified filter in the
1120 // request.
1121 Locations []*Location `json:"locations,omitempty"`
1122 // NextPageToken: The standard List next-page token.
1123 NextPageToken string `json:"nextPageToken,omitempty"`
1124
1125 // ServerResponse contains the HTTP response code and headers from the server.
1126 googleapi.ServerResponse `json:"-"`
1127 // ForceSendFields is a list of field names (e.g. "Locations") to
1128 // unconditionally include in API requests. By default, fields with empty or
1129 // default values are omitted from API requests. See
1130 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1131 // details.
1132 ForceSendFields []string `json:"-"`
1133 // NullFields is a list of field names (e.g. "Locations") to include in API
1134 // requests with the JSON null value. By default, fields with empty values are
1135 // omitted from API requests. See
1136 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1137 NullFields []string `json:"-"`
1138 }
1139
1140 func (s ListLocationsResponse) MarshalJSON() ([]byte, error) {
1141 type NoMethod ListLocationsResponse
1142 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1143 }
1144
1145 // ListOperationsResponse: The response message for Operations.ListOperations.
1146 type ListOperationsResponse struct {
1147 // NextPageToken: The standard List next-page token.
1148 NextPageToken string `json:"nextPageToken,omitempty"`
1149 // Operations: A list of operations that matches the specified filter in the
1150 // request.
1151 Operations []*Operation `json:"operations,omitempty"`
1152 // Unreachable: Unordered list. Unreachable resources. Populated when the
1153 // request sets `ListOperationsRequest.return_partial_success` and reads across
1154 // collections. For example, when attempting to list all resources across all
1155 // supported locations.
1156 Unreachable []string `json:"unreachable,omitempty"`
1157
1158 // ServerResponse contains the HTTP response code and headers from the server.
1159 googleapi.ServerResponse `json:"-"`
1160 // ForceSendFields is a list of field names (e.g. "NextPageToken") to
1161 // unconditionally include in API requests. By default, fields with empty or
1162 // default values are omitted from API requests. See
1163 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1164 // details.
1165 ForceSendFields []string `json:"-"`
1166 // NullFields is a list of field names (e.g. "NextPageToken") to include in API
1167 // requests with the JSON null value. By default, fields with empty values are
1168 // omitted from API requests. See
1169 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1170 NullFields []string `json:"-"`
1171 }
1172
1173 func (s ListOperationsResponse) MarshalJSON() ([]byte, error) {
1174 type NoMethod ListOperationsResponse
1175 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1176 }
1177
1178 // ListRegistrationsResponse: Response for the `ListRegistrations` method.
1179 type ListRegistrationsResponse struct {
1180 // NextPageToken: When present, there are more results to retrieve. Set
1181 // `page_token` to this value on a subsequent call to get the next page of
1182 // results.
1183 NextPageToken string `json:"nextPageToken,omitempty"`
1184 // Registrations: A list of `Registration`s.
1185 Registrations []*Registration `json:"registrations,omitempty"`
1186
1187 // ServerResponse contains the HTTP response code and headers from the server.
1188 googleapi.ServerResponse `json:"-"`
1189 // ForceSendFields is a list of field names (e.g. "NextPageToken") to
1190 // unconditionally include in API requests. By default, fields with empty or
1191 // default values are omitted from API requests. See
1192 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1193 // details.
1194 ForceSendFields []string `json:"-"`
1195 // NullFields is a list of field names (e.g. "NextPageToken") to include in API
1196 // requests with the JSON null value. By default, fields with empty values are
1197 // omitted from API requests. See
1198 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1199 NullFields []string `json:"-"`
1200 }
1201
1202 func (s ListRegistrationsResponse) MarshalJSON() ([]byte, error) {
1203 type NoMethod ListRegistrationsResponse
1204 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1205 }
1206
1207 // LoadBalancerTarget: The configuration for an individual load balancer to
1208 // health check.
1209 type LoadBalancerTarget struct {
1210 // IpAddress: The frontend IP address of the load balancer to health check.
1211 IpAddress string `json:"ipAddress,omitempty"`
1212 // IpProtocol: The protocol of the load balancer to health check.
1213 //
1214 // Possible values:
1215 // "UNDEFINED"
1216 // "TCP" - Indicates the load balancer is accessible via TCP.
1217 // "UDP" - Indicates the load balancer is accessible via UDP.
1218 IpProtocol string `json:"ipProtocol,omitempty"`
1219 // LoadBalancerType: The type of load balancer specified by this target. This
1220 // value must match the configuration of the load balancer located at the
1221 // LoadBalancerTarget's IP address, port, and region. Use the following: -
1222 // *regionalL4ilb*: for a regional internal passthrough Network Load Balancer.
1223 // - *regionalL7ilb*: for a regional internal Application Load Balancer. -
1224 // *globalL7ilb*: for a global internal Application Load Balancer.
1225 //
1226 // Possible values:
1227 // "NONE"
1228 // "GLOBAL_L7ILB" - Indicates the load balancer is a Cross-Region Application
1229 // Load Balancer.
1230 // "REGIONAL_L4ILB" - Indicates the load balancer is a Regional Network
1231 // Passthrough Load Balancer.
1232 // "REGIONAL_L7ILB" - Indicates the load balancer is a Regional Application
1233 // Load Balancer.
1234 LoadBalancerType string `json:"loadBalancerType,omitempty"`
1235 // NetworkUrl: The fully qualified URL of the network that the load balancer is
1236 // attached to. This should be formatted like
1237 // `https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{ne
1238 // twork}`.
1239 NetworkUrl string `json:"networkUrl,omitempty"`
1240 // Port: The configured port of the load balancer.
1241 Port string `json:"port,omitempty"`
1242 // Project: The project ID in which the load balancer is located.
1243 Project string `json:"project,omitempty"`
1244 // Region: The region in which the load balancer is located.
1245 Region string `json:"region,omitempty"`
1246 // ForceSendFields is a list of field names (e.g. "IpAddress") to
1247 // unconditionally include in API requests. By default, fields with empty or
1248 // default values are omitted from API requests. See
1249 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1250 // details.
1251 ForceSendFields []string `json:"-"`
1252 // NullFields is a list of field names (e.g. "IpAddress") to include in API
1253 // requests with the JSON null value. By default, fields with empty values are
1254 // omitted from API requests. See
1255 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1256 NullFields []string `json:"-"`
1257 }
1258
1259 func (s LoadBalancerTarget) MarshalJSON() ([]byte, error) {
1260 type NoMethod LoadBalancerTarget
1261 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1262 }
1263
1264 // Location: A resource that represents a Google Cloud location.
1265 type Location struct {
1266 // DisplayName: The friendly name for this location, typically a nearby city
1267 // name. For example, "Tokyo".
1268 DisplayName string `json:"displayName,omitempty"`
1269 // Labels: Cross-service attributes for the location. For example
1270 // {"cloud.googleapis.com/region": "us-east1"}
1271 Labels map[string]string `json:"labels,omitempty"`
1272 // LocationId: The canonical id for this location. For example: "us-east1".
1273 LocationId string `json:"locationId,omitempty"`
1274 // Metadata: Service-specific metadata. For example the available capacity at
1275 // the given location.
1276 Metadata googleapi.RawMessage `json:"metadata,omitempty"`
1277 // Name: Resource name for the location, which may vary between
1278 // implementations. For example:
1279 // "projects/example-project/locations/us-east1"
1280 Name string `json:"name,omitempty"`
1281
1282 // ServerResponse contains the HTTP response code and headers from the server.
1283 googleapi.ServerResponse `json:"-"`
1284 // ForceSendFields is a list of field names (e.g. "DisplayName") to
1285 // unconditionally include in API requests. By default, fields with empty or
1286 // default values are omitted from API requests. See
1287 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1288 // details.
1289 ForceSendFields []string `json:"-"`
1290 // NullFields is a list of field names (e.g. "DisplayName") to include in API
1291 // requests with the JSON null value. By default, fields with empty values are
1292 // omitted from API requests. See
1293 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1294 NullFields []string `json:"-"`
1295 }
1296
1297 func (s Location) MarshalJSON() ([]byte, error) {
1298 type NoMethod Location
1299 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1300 }
1301
1302 // ManagementSettings: Defines renewal, billing, and transfer settings for a
1303 // `Registration`.
1304 type ManagementSettings struct {
1305 // EffectiveTransferLockState: Output only. The actual transfer lock state for
1306 // this `Registration`.
1307 //
1308 // Possible values:
1309 // "TRANSFER_LOCK_STATE_UNSPECIFIED" - The state is unspecified.
1310 // "UNLOCKED" - The domain is unlocked and can be transferred to another
1311 // registrar.
1312 // "LOCKED" - The domain is locked and cannot be transferred to another
1313 // registrar.
1314 EffectiveTransferLockState string `json:"effectiveTransferLockState,omitempty"`
1315 // PreferredRenewalMethod: Optional. The desired renewal method for this
1316 // `Registration`. The actual `renewal_method` is automatically updated to
1317 // reflect this choice. If unset or equal to `RENEWAL_METHOD_UNSPECIFIED`, the
1318 // actual `renewalMethod` is treated as if it were set to `AUTOMATIC_RENEWAL`.
1319 // You cannot use `RENEWAL_DISABLED` during resource creation, and you can
1320 // update the renewal status only when the `Registration` resource has state
1321 // `ACTIVE` or `SUSPENDED`. When `preferred_renewal_method` is set to
1322 // `AUTOMATIC_RENEWAL`, the actual `renewal_method` can be set to
1323 // `RENEWAL_DISABLED` in case of problems with the billing account or reported
1324 // domain abuse. In such cases, check the `issues` field on the `Registration`.
1325 // After the problem is resolved, the `renewal_method` is automatically updated
1326 // to `preferred_renewal_method` in a few hours.
1327 //
1328 // Possible values:
1329 // "RENEWAL_METHOD_UNSPECIFIED" - The renewal method is undefined.
1330 // "AUTOMATIC_RENEWAL" - The domain is automatically renewed each year.
1331 // "MANUAL_RENEWAL" - Deprecated: For more information, see [Cloud Domains
1332 // feature
1333 // deprecation](https://cloud.google.com/domains/docs/deprecations/feature-depre
1334 // cations). This option was never used. Use `RENEWAL_DISABLED` instead.
1335 // "RENEWAL_DISABLED" - The domain won't be renewed and will expire at its
1336 // expiration time.
1337 PreferredRenewalMethod string `json:"preferredRenewalMethod,omitempty"`
1338 // RenewalMethod: Output only. The actual renewal method for this
1339 // `Registration`. When `preferred_renewal_method` is set to
1340 // `AUTOMATIC_RENEWAL`, the actual `renewal_method` can be equal to
1341 // `RENEWAL_DISABLED`—for example, when there are problems with the billing
1342 // account or reported domain abuse. In such cases, check the `issues` field on
1343 // the `Registration`. After the problem is resolved, the `renewal_method` is
1344 // automatically updated to `preferred_renewal_method` in a few hours.
1345 //
1346 // Possible values:
1347 // "RENEWAL_METHOD_UNSPECIFIED" - The renewal method is undefined.
1348 // "AUTOMATIC_RENEWAL" - The domain is automatically renewed each year.
1349 // "MANUAL_RENEWAL" - Deprecated: For more information, see [Cloud Domains
1350 // feature
1351 // deprecation](https://cloud.google.com/domains/docs/deprecations/feature-depre
1352 // cations). This option was never used. Use `RENEWAL_DISABLED` instead.
1353 // "RENEWAL_DISABLED" - The domain won't be renewed and will expire at its
1354 // expiration time.
1355 RenewalMethod string `json:"renewalMethod,omitempty"`
1356 // TransferLockState: This is the desired transfer lock state for this
1357 // `Registration`. A transfer lock controls whether the domain can be
1358 // transferred to another registrar. The transfer lock state of the domain is
1359 // returned in the `effective_transfer_lock_state` property. The transfer lock
1360 // state values might be different for the following reasons: *
1361 // `transfer_lock_state` was updated only a short time ago. * Domains with the
1362 // `TRANSFER_LOCK_UNSUPPORTED_BY_REGISTRY` state are in the list of
1363 // `domain_properties`. These domains are always in the `UNLOCKED` state.
1364 //
1365 // Possible values:
1366 // "TRANSFER_LOCK_STATE_UNSPECIFIED" - The state is unspecified.
1367 // "UNLOCKED" - The domain is unlocked and can be transferred to another
1368 // registrar.
1369 // "LOCKED" - The domain is locked and cannot be transferred to another
1370 // registrar.
1371 TransferLockState string `json:"transferLockState,omitempty"`
1372 // ForceSendFields is a list of field names (e.g. "EffectiveTransferLockState")
1373 // to unconditionally include in API requests. By default, fields with empty or
1374 // default values are omitted from API requests. See
1375 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1376 // details.
1377 ForceSendFields []string `json:"-"`
1378 // NullFields is a list of field names (e.g. "EffectiveTransferLockState") to
1379 // include in API requests with the JSON null value. By default, fields with
1380 // empty values are omitted from API requests. See
1381 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1382 NullFields []string `json:"-"`
1383 }
1384
1385 func (s ManagementSettings) MarshalJSON() ([]byte, error) {
1386 type NoMethod ManagementSettings
1387 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1388 }
1389
1390 // Money: Represents an amount of money with its currency type.
1391 type Money struct {
1392 // CurrencyCode: The three-letter currency code defined in ISO 4217.
1393 CurrencyCode string `json:"currencyCode,omitempty"`
1394 // Nanos: Number of nano (10^-9) units of the amount. The value must be between
1395 // -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos`
1396 // must be positive or zero. If `units` is zero, `nanos` can be positive, zero,
1397 // or negative. If `units` is negative, `nanos` must be negative or zero. For
1398 // example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
1399 Nanos int64 `json:"nanos,omitempty"`
1400 // Units: The whole units of the amount. For example if `currencyCode` is
1401 // "USD", then 1 unit is one US dollar.
1402 Units int64 `json:"units,omitempty,string"`
1403 // ForceSendFields is a list of field names (e.g. "CurrencyCode") to
1404 // unconditionally include in API requests. By default, fields with empty or
1405 // default values are omitted from API requests. See
1406 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1407 // details.
1408 ForceSendFields []string `json:"-"`
1409 // NullFields is a list of field names (e.g. "CurrencyCode") to include in API
1410 // requests with the JSON null value. By default, fields with empty values are
1411 // omitted from API requests. See
1412 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1413 NullFields []string `json:"-"`
1414 }
1415
1416 func (s Money) MarshalJSON() ([]byte, error) {
1417 type NoMethod Money
1418 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1419 }
1420
1421 // Operation: This resource represents a long-running operation that is the
1422 // result of a network API call.
1423 type Operation struct {
1424 // Done: If the value is `false`, it means the operation is still in progress.
1425 // If `true`, the operation is completed, and either `error` or `response` is
1426 // available.
1427 Done bool `json:"done,omitempty"`
1428 // Error: The error result of the operation in case of failure or cancellation.
1429 Error *Status `json:"error,omitempty"`
1430 // Metadata: Service-specific metadata associated with the operation. It
1431 // typically contains progress information and common metadata such as create
1432 // time. Some services might not provide such metadata. Any method that returns
1433 // a long-running operation should document the metadata type, if any.
1434 Metadata googleapi.RawMessage `json:"metadata,omitempty"`
1435 // Name: The server-assigned name, which is only unique within the same service
1436 // that originally returns it. If you use the default HTTP mapping, the `name`
1437 // should be a resource name ending with `operations/{unique_id}`.
1438 Name string `json:"name,omitempty"`
1439 // Response: The normal, successful response of the operation. If the original
1440 // method returns no data on success, such as `Delete`, the response is
1441 // `google.protobuf.Empty`. If the original method is standard
1442 // `Get`/`Create`/`Update`, the response should be the resource. For other
1443 // methods, the response should have the type `XxxResponse`, where `Xxx` is the
1444 // original method name. For example, if the original method name is
1445 // `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
1446 Response googleapi.RawMessage `json:"response,omitempty"`
1447
1448 // ServerResponse contains the HTTP response code and headers from the server.
1449 googleapi.ServerResponse `json:"-"`
1450 // ForceSendFields is a list of field names (e.g. "Done") to unconditionally
1451 // include in API requests. By default, fields with empty or default values are
1452 // omitted from API requests. See
1453 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1454 // details.
1455 ForceSendFields []string `json:"-"`
1456 // NullFields is a list of field names (e.g. "Done") to include in API requests
1457 // with the JSON null value. By default, fields with empty values are omitted
1458 // from API requests. See
1459 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1460 NullFields []string `json:"-"`
1461 }
1462
1463 func (s Operation) MarshalJSON() ([]byte, error) {
1464 type NoMethod Operation
1465 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1466 }
1467
1468 // OperationMetadata: Represents the metadata of the long-running operation.
1469 // Output only.
1470 type OperationMetadata struct {
1471 // ApiVersion: API version used to start the operation.
1472 ApiVersion string `json:"apiVersion,omitempty"`
1473 // CreateTime: The time the operation was created.
1474 CreateTime string `json:"createTime,omitempty"`
1475 // EndTime: The time the operation finished running.
1476 EndTime string `json:"endTime,omitempty"`
1477 // StatusDetail: Human-readable status of the operation, if any.
1478 StatusDetail string `json:"statusDetail,omitempty"`
1479 // Target: Server-defined resource path for the target of the operation.
1480 Target string `json:"target,omitempty"`
1481 // Verb: Name of the verb executed by the operation.
1482 Verb string `json:"verb,omitempty"`
1483 // ForceSendFields is a list of field names (e.g. "ApiVersion") to
1484 // unconditionally include in API requests. By default, fields with empty or
1485 // default values are omitted from API requests. See
1486 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1487 // details.
1488 ForceSendFields []string `json:"-"`
1489 // NullFields is a list of field names (e.g. "ApiVersion") to include in API
1490 // requests with the JSON null value. By default, fields with empty values are
1491 // omitted from API requests. See
1492 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1493 NullFields []string `json:"-"`
1494 }
1495
1496 func (s OperationMetadata) MarshalJSON() ([]byte, error) {
1497 type NoMethod OperationMetadata
1498 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1499 }
1500
1501 // Policy: An Identity and Access Management (IAM) policy, which specifies
1502 // access controls for Google Cloud resources. A `Policy` is a collection of
1503 // `bindings`. A `binding` binds one or more `members`, or principals, to a
1504 // single `role`. Principals can be user accounts, service accounts, Google
1505 // groups, and domains (such as G Suite). A `role` is a named list of
1506 // permissions; each `role` can be an IAM predefined role or a user-created
1507 // custom role. For some types of Google Cloud resources, a `binding` can also
1508 // specify a `condition`, which is a logical expression that allows access to a
1509 // resource only if the expression evaluates to `true`. A condition can add
1510 // constraints based on attributes of the request, the resource, or both. To
1511 // learn which resources support conditions in their IAM policies, see the IAM
1512 // documentation
1513 // (https://cloud.google.com/iam/help/conditions/resource-policies). **JSON
1514 // example:** ``` { "bindings": [ { "role":
1515 // "roles/resourcemanager.organizationAdmin", "members": [
1516 // "user:[email protected]", "group:[email protected]", "domain:google.com",
1517 // "serviceAccount:[email protected]" ] }, { "role":
1518 // "roles/resourcemanager.organizationViewer", "members": [
1519 // "user:[email protected]" ], "condition": { "title": "expirable access",
1520 // "description": "Does not grant access after Sep 2020", "expression":
1521 // "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag":
1522 // "BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` bindings: -
1523 // members: - user:[email protected] - group:[email protected] -
1524 // domain:google.com - serviceAccount:[email protected]
1525 // role: roles/resourcemanager.organizationAdmin - members: -
1526 // user:[email protected] role: roles/resourcemanager.organizationViewer
1527 // condition: title: expirable access description: Does not grant access after
1528 // Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z')
1529 // etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features,
1530 // see the IAM documentation (https://cloud.google.com/iam/docs/).
1531 type Policy struct {
1532 // AuditConfigs: Specifies cloud audit logging configuration for this policy.
1533 AuditConfigs []*AuditConfig `json:"auditConfigs,omitempty"`
1534 // Bindings: Associates a list of `members`, or principals, with a `role`.
1535 // Optionally, may specify a `condition` that determines how and when the
1536 // `bindings` are applied. Each of the `bindings` must contain at least one
1537 // principal. The `bindings` in a `Policy` can refer to up to 1,500 principals;
1538 // up to 250 of these principals can be Google groups. Each occurrence of a
1539 // principal counts towards these limits. For example, if the `bindings` grant
1540 // 50 different roles to `user:[email protected]`, and not to any other
1541 // principal, then you can add another 1,450 principals to the `bindings` in
1542 // the `Policy`.
1543 Bindings []*Binding `json:"bindings,omitempty"`
1544 // Etag: `etag` is used for optimistic concurrency control as a way to help
1545 // prevent simultaneous updates of a policy from overwriting each other. It is
1546 // strongly suggested that systems make use of the `etag` in the
1547 // read-modify-write cycle to perform policy updates in order to avoid race
1548 // conditions: An `etag` is returned in the response to `getIamPolicy`, and
1549 // systems are expected to put that etag in the request to `setIamPolicy` to
1550 // ensure that their change will be applied to the same version of the policy.
1551 // **Important:** If you use IAM Conditions, you must include the `etag` field
1552 // whenever you call `setIamPolicy`. If you omit this field, then IAM allows
1553 // you to overwrite a version `3` policy with a version `1` policy, and all of
1554 // the conditions in the version `3` policy are lost.
1555 Etag string `json:"etag,omitempty"`
1556 // Version: Specifies the format of the policy. Valid values are `0`, `1`, and
1557 // `3`. Requests that specify an invalid value are rejected. Any operation that
1558 // affects conditional role bindings must specify version `3`. This requirement
1559 // applies to the following operations: * Getting a policy that includes a
1560 // conditional role binding * Adding a conditional role binding to a policy *
1561 // Changing a conditional role binding in a policy * Removing any role binding,
1562 // with or without a condition, from a policy that includes conditions
1563 // **Important:** If you use IAM Conditions, you must include the `etag` field
1564 // whenever you call `setIamPolicy`. If you omit this field, then IAM allows
1565 // you to overwrite a version `3` policy with a version `1` policy, and all of
1566 // the conditions in the version `3` policy are lost. If a policy does not
1567 // include any conditions, operations on that policy may specify any valid
1568 // version or leave the field unset. To learn which resources support
1569 // conditions in their IAM policies, see the IAM documentation
1570 // (https://cloud.google.com/iam/help/conditions/resource-policies).
1571 Version int64 `json:"version,omitempty"`
1572
1573 // ServerResponse contains the HTTP response code and headers from the server.
1574 googleapi.ServerResponse `json:"-"`
1575 // ForceSendFields is a list of field names (e.g. "AuditConfigs") to
1576 // unconditionally include in API requests. By default, fields with empty or
1577 // default values are omitted from API requests. See
1578 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1579 // details.
1580 ForceSendFields []string `json:"-"`
1581 // NullFields is a list of field names (e.g. "AuditConfigs") to include in API
1582 // requests with the JSON null value. By default, fields with empty values are
1583 // omitted from API requests. See
1584 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1585 NullFields []string `json:"-"`
1586 }
1587
1588 func (s Policy) MarshalJSON() ([]byte, error) {
1589 type NoMethod Policy
1590 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1591 }
1592
1593 // PostalAddress: Represents a postal address, such as for postal delivery or
1594 // payments addresses. With a postal address, a postal service can deliver
1595 // items to a premise, P.O. box, or similar. A postal address is not intended
1596 // to model geographical locations like roads, towns, or mountains. In typical
1597 // usage, an address would be created by user input or from importing existing
1598 // data, depending on the type of process. Advice on address input or editing:
1599 // - Use an internationalization-ready address widget such as
1600 // https://github.com/google/libaddressinput. - Users should not be presented
1601 // with UI elements for input or editing of fields outside countries where that
1602 // field is used. For more guidance on how to use this schema, see:
1603 // https://support.google.com/business/answer/6397478.
1604 type PostalAddress struct {
1605 // AddressLines: Unstructured address lines describing the lower levels of an
1606 // address. Because values in `address_lines` do not have type information and
1607 // may sometimes contain multiple values in a single field (for example,
1608 // "Austin, TX"), it is important that the line order is clear. The order of
1609 // address lines should be "envelope order" for the country or region of the
1610 // address. In places where this can vary (for example, Japan),
1611 // `address_language` is used to make it explicit (for example, "ja" for
1612 // large-to-small ordering and "ja-Latn" or "en" for small-to-large). In this
1613 // way, the most specific line of an address can be selected based on the
1614 // language. The minimum permitted structural representation of an address
1615 // consists of a `region_code` with all remaining information placed in the
1616 // `address_lines`. It would be possible to format such an address very
1617 // approximately without geocoding, but no semantic reasoning could be made
1618 // about any of the address components until it was at least partially
1619 // resolved. Creating an address only containing a `region_code` and
1620 // `address_lines` and then geocoding is the recommended way to handle
1621 // completely unstructured addresses (as opposed to guessing which parts of the
1622 // address should be localities or administrative areas).
1623 AddressLines []string `json:"addressLines,omitempty"`
1624 // AdministrativeArea: Optional. Highest administrative subdivision which is
1625 // used for postal addresses of a country or region. For example, this can be a
1626 // state, a province, an oblast, or a prefecture. For Spain, this is the
1627 // province and not the autonomous community (for example, "Barcelona" and not
1628 // "Catalonia"). Many countries don't use an administrative area in postal
1629 // addresses. For example, in Switzerland, this should be left unpopulated.
1630 AdministrativeArea string `json:"administrativeArea,omitempty"`
1631 // LanguageCode: Optional. BCP-47 language code of the contents of this address
1632 // (if known). This is often the UI language of the input form or is expected
1633 // to match one of the languages used in the address' country/region, or their
1634 // transliterated equivalents. This can affect formatting in certain countries,
1635 // but is not critical to the correctness of the data and will never affect any
1636 // validation or other non-formatting related operations. If this value is not
1637 // known, it should be omitted (rather than specifying a possibly incorrect
1638 // default). Examples: "zh-Hant", "ja", "ja-Latn", "en".
1639 LanguageCode string `json:"languageCode,omitempty"`
1640 // Locality: Optional. Generally refers to the city or town portion of the
1641 // address. Examples: US city, IT comune, UK post town. In regions of the world
1642 // where localities are not well defined or do not fit into this structure
1643 // well, leave `locality` empty and use `address_lines`.
1644 Locality string `json:"locality,omitempty"`
1645 // Organization: Optional. The name of the organization at the address.
1646 Organization string `json:"organization,omitempty"`
1647 // PostalCode: Optional. Postal code of the address. Not all countries use or
1648 // require postal codes to be present, but where they are used, they may
1649 // trigger additional validation with other parts of the address (for example,
1650 // state or zip code validation in the United States).
1651 PostalCode string `json:"postalCode,omitempty"`
1652 // Recipients: Optional. The recipient at the address. This field may, under
1653 // certain circumstances, contain multiline information. For example, it might
1654 // contain "care of" information.
1655 Recipients []string `json:"recipients,omitempty"`
1656 // RegionCode: Required. CLDR region code of the country/region of the address.
1657 // This is never inferred and it is up to the user to ensure the value is
1658 // correct. See https://cldr.unicode.org/ and
1659 // https://www.unicode.org/cldr/charts/30/supplemental/territory_information.html
1660 // for details. Example: "CH" for Switzerland.
1661 RegionCode string `json:"regionCode,omitempty"`
1662 // Revision: The schema revision of the `PostalAddress`. This must be set to 0,
1663 // which is the latest revision. All new revisions **must** be backward
1664 // compatible with old revisions.
1665 Revision int64 `json:"revision,omitempty"`
1666 // SortingCode: Optional. Additional, country-specific, sorting code. This is
1667 // not used in most regions. Where it is used, the value is either a string
1668 // like "CEDEX", optionally followed by a number (for example, "CEDEX 7"), or
1669 // just a number alone, representing the "sector code" (Jamaica), "delivery
1670 // area indicator" (Malawi) or "post office indicator" (Côte d'Ivoire).
1671 SortingCode string `json:"sortingCode,omitempty"`
1672 // Sublocality: Optional. Sublocality of the address. For example, this can be
1673 // a neighborhood, borough, or district.
1674 Sublocality string `json:"sublocality,omitempty"`
1675 // ForceSendFields is a list of field names (e.g. "AddressLines") to
1676 // unconditionally include in API requests. By default, fields with empty or
1677 // default values are omitted from API requests. See
1678 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1679 // details.
1680 ForceSendFields []string `json:"-"`
1681 // NullFields is a list of field names (e.g. "AddressLines") to include in API
1682 // requests with the JSON null value. By default, fields with empty values are
1683 // omitted from API requests. See
1684 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1685 NullFields []string `json:"-"`
1686 }
1687
1688 func (s PostalAddress) MarshalJSON() ([]byte, error) {
1689 type NoMethod PostalAddress
1690 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1691 }
1692
1693 // PrimaryBackupPolicy: Configures a RRSetRoutingPolicy such that all queries
1694 // are responded with the primary_targets if they are healthy. And if all of
1695 // them are unhealthy, then we fallback to a geo localized policy.
1696 type PrimaryBackupPolicy struct {
1697 // BackupGeoTargets: Backup targets provide a regional failover policy for the
1698 // otherwise global primary targets. If serving state is set to `BACKUP`, this
1699 // policy essentially becomes a geo routing policy.
1700 BackupGeoTargets *GeoPolicy `json:"backupGeoTargets,omitempty"`
1701 // PrimaryTargets: Endpoints that are health checked before making the routing
1702 // decision. Unhealthy endpoints are omitted from the results. If all endpoints
1703 // are unhealthy, we serve a response based on the `backup_geo_targets`.
1704 PrimaryTargets *HealthCheckTargets `json:"primaryTargets,omitempty"`
1705 // TrickleTraffic: When serving state is `PRIMARY`, this field provides the
1706 // option of sending a small percentage of the traffic to the backup targets.
1707 TrickleTraffic float64 `json:"trickleTraffic,omitempty"`
1708 // ForceSendFields is a list of field names (e.g. "BackupGeoTargets") to
1709 // unconditionally include in API requests. By default, fields with empty or
1710 // default values are omitted from API requests. See
1711 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1712 // details.
1713 ForceSendFields []string `json:"-"`
1714 // NullFields is a list of field names (e.g. "BackupGeoTargets") to include in
1715 // API requests with the JSON null value. By default, fields with empty values
1716 // are omitted from API requests. See
1717 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1718 NullFields []string `json:"-"`
1719 }
1720
1721 func (s PrimaryBackupPolicy) MarshalJSON() ([]byte, error) {
1722 type NoMethod PrimaryBackupPolicy
1723 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1724 }
1725
1726 func (s *PrimaryBackupPolicy) UnmarshalJSON(data []byte) error {
1727 type NoMethod PrimaryBackupPolicy
1728 var s1 struct {
1729 TrickleTraffic gensupport.JSONFloat64 `json:"trickleTraffic"`
1730 *NoMethod
1731 }
1732 s1.NoMethod = (*NoMethod)(s)
1733 if err := json.Unmarshal(data, &s1); err != nil {
1734 return err
1735 }
1736 s.TrickleTraffic = float64(s1.TrickleTraffic)
1737 return nil
1738 }
1739
1740 // RRSetRoutingPolicy: A RRSetRoutingPolicy represents ResourceRecordSet data
1741 // that is returned dynamically with the response varying based on configured
1742 // properties such as geolocation or by weighted random selection.
1743 type RRSetRoutingPolicy struct {
1744 Geo *GeoPolicy `json:"geo,omitempty"`
1745 GeoPolicy *GeoPolicy `json:"geoPolicy,omitempty"`
1746 // HealthCheck: The fully qualified URL of the HealthCheck to use for this
1747 // RRSetRoutingPolicy. Format this URL like
1748 // `https://www.googleapis.com/compute/v1/projects/{project}/global/healthChecks
1749 // /{healthCheck}`.
1750 // https://cloud.google.com/compute/docs/reference/rest/v1/healthChecks
1751 HealthCheck string `json:"healthCheck,omitempty"`
1752 PrimaryBackup *PrimaryBackupPolicy `json:"primaryBackup,omitempty"`
1753 Wrr *WrrPolicy `json:"wrr,omitempty"`
1754 WrrPolicy *WrrPolicy `json:"wrrPolicy,omitempty"`
1755 // ForceSendFields is a list of field names (e.g. "Geo") to unconditionally
1756 // include in API requests. By default, fields with empty or default values are
1757 // omitted from API requests. See
1758 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1759 // details.
1760 ForceSendFields []string `json:"-"`
1761 // NullFields is a list of field names (e.g. "Geo") to include in API requests
1762 // with the JSON null value. By default, fields with empty values are omitted
1763 // from API requests. See
1764 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1765 NullFields []string `json:"-"`
1766 }
1767
1768 func (s RRSetRoutingPolicy) MarshalJSON() ([]byte, error) {
1769 type NoMethod RRSetRoutingPolicy
1770 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1771 }
1772
1773 // RegisterDomainRequest: Request for the `RegisterDomain` method.
1774 type RegisterDomainRequest struct {
1775 // ContactNotices: The list of contact notices that the caller acknowledges.
1776 // The notices needed here depend on the values specified in
1777 // `registration.contact_settings`.
1778 //
1779 // Possible values:
1780 // "CONTACT_NOTICE_UNSPECIFIED" - The notice is undefined.
1781 // "PUBLIC_CONTACT_DATA_ACKNOWLEDGEMENT" - Required when setting the
1782 // `privacy` field of `ContactSettings` to `PUBLIC_CONTACT_DATA`, which exposes
1783 // contact data publicly.
1784 ContactNotices []string `json:"contactNotices,omitempty"`
1785 // DomainNotices: The list of domain notices that you acknowledge. Call
1786 // `RetrieveRegisterParameters` to see the notices that need acknowledgement.
1787 //
1788 // Possible values:
1789 // "DOMAIN_NOTICE_UNSPECIFIED" - The notice is undefined.
1790 // "HSTS_PRELOADED" - Indicates that the domain is preloaded on the HTTP
1791 // Strict Transport Security list in browsers. Serving a website on such domain
1792 // requires an SSL certificate. For details, see [how to get an SSL
1793 // certificate](https://support.google.com/domains/answer/7638036).
1794 DomainNotices []string `json:"domainNotices,omitempty"`
1795 // Registration: Required. The complete `Registration` resource to be created.
1796 Registration *Registration `json:"registration,omitempty"`
1797 // ValidateOnly: When true, only validation is performed, without actually
1798 // registering the domain. Follows:
1799 // https://cloud.google.com/apis/design/design_patterns#request_validation
1800 ValidateOnly bool `json:"validateOnly,omitempty"`
1801 // YearlyPrice: Required. Yearly price to register or renew the domain. The
1802 // value that should be put here can be obtained from
1803 // RetrieveRegisterParameters or SearchDomains calls.
1804 YearlyPrice *Money `json:"yearlyPrice,omitempty"`
1805 // ForceSendFields is a list of field names (e.g. "ContactNotices") to
1806 // unconditionally include in API requests. By default, fields with empty or
1807 // default values are omitted from API requests. See
1808 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1809 // details.
1810 ForceSendFields []string `json:"-"`
1811 // NullFields is a list of field names (e.g. "ContactNotices") to include in
1812 // API requests with the JSON null value. By default, fields with empty values
1813 // are omitted from API requests. See
1814 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1815 NullFields []string `json:"-"`
1816 }
1817
1818 func (s RegisterDomainRequest) MarshalJSON() ([]byte, error) {
1819 type NoMethod RegisterDomainRequest
1820 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1821 }
1822
1823 // RegisterParameters: Parameters required to register a new domain.
1824 type RegisterParameters struct {
1825 // Availability: Indicates whether the domain is available for registration.
1826 // This value is accurate when obtained by calling
1827 // `RetrieveRegisterParameters`, but is approximate when obtained by calling
1828 // `SearchDomains`.
1829 //
1830 // Possible values:
1831 // "AVAILABILITY_UNSPECIFIED" - The availability is unspecified.
1832 // "AVAILABLE" - The domain is available for registration.
1833 // "UNAVAILABLE" - The domain is not available for registration. Generally
1834 // this means it is already registered to another party.
1835 // "UNSUPPORTED" - The domain is not currently supported by Cloud Domains,
1836 // but may be available elsewhere.
1837 // "UNKNOWN" - Cloud Domains is unable to determine domain availability,
1838 // generally due to system maintenance at the domain name registry.
1839 Availability string `json:"availability,omitempty"`
1840 // DomainName: The domain name. Unicode domain names are expressed in Punycode
1841 // format.
1842 DomainName string `json:"domainName,omitempty"`
1843 // DomainNotices: Notices about special properties of the domain.
1844 //
1845 // Possible values:
1846 // "DOMAIN_NOTICE_UNSPECIFIED" - The notice is undefined.
1847 // "HSTS_PRELOADED" - Indicates that the domain is preloaded on the HTTP
1848 // Strict Transport Security list in browsers. Serving a website on such domain
1849 // requires an SSL certificate. For details, see [how to get an SSL
1850 // certificate](https://support.google.com/domains/answer/7638036).
1851 DomainNotices []string `json:"domainNotices,omitempty"`
1852 // SupportedPrivacy: Contact privacy options that the domain supports.
1853 //
1854 // Possible values:
1855 // "CONTACT_PRIVACY_UNSPECIFIED" - The contact privacy settings are
1856 // undefined.
1857 // "PUBLIC_CONTACT_DATA" - All the data from `ContactSettings` is publicly
1858 // available. When setting this option, you must also provide a
1859 // `PUBLIC_CONTACT_DATA_ACKNOWLEDGEMENT` in the `contact_notices` field of the
1860 // request.
1861 // "PRIVATE_CONTACT_DATA" - Deprecated: For more information, see [Cloud
1862 // Domains feature
1863 // deprecation](https://cloud.google.com/domains/docs/deprecations/feature-depre
1864 // cations). None of the data from `ContactSettings` is publicly available.
1865 // Instead, proxy contact data is published for your domain. Email sent to the
1866 // proxy email address is forwarded to the registrant's email address. Cloud
1867 // Domains provides this privacy proxy service at no additional cost.
1868 // "REDACTED_CONTACT_DATA" - The organization name (if provided) and limited
1869 // non-identifying data from `ContactSettings` is available to the public (e.g.
1870 // country and state). The remaining data is marked as `REDACTED FOR PRIVACY`
1871 // in the WHOIS database. The actual information redacted depends on the
1872 // domain. For details, see [the registration privacy
1873 // article](https://support.google.com/domains/answer/3251242).
1874 SupportedPrivacy []string `json:"supportedPrivacy,omitempty"`
1875 // YearlyPrice: Price to register or renew the domain for one year.
1876 YearlyPrice *Money `json:"yearlyPrice,omitempty"`
1877 // ForceSendFields is a list of field names (e.g. "Availability") to
1878 // unconditionally include in API requests. By default, fields with empty or
1879 // default values are omitted from API requests. See
1880 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1881 // details.
1882 ForceSendFields []string `json:"-"`
1883 // NullFields is a list of field names (e.g. "Availability") to include in API
1884 // requests with the JSON null value. By default, fields with empty values are
1885 // omitted from API requests. See
1886 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1887 NullFields []string `json:"-"`
1888 }
1889
1890 func (s RegisterParameters) MarshalJSON() ([]byte, error) {
1891 type NoMethod RegisterParameters
1892 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1893 }
1894
1895 // Registration: The `Registration` resource facilitates managing and
1896 // configuring domain name registrations. There are several ways to create a
1897 // new `Registration` resource: To create a new `Registration` resource, find a
1898 // suitable domain name by calling the `SearchDomains` method with a query to
1899 // see available domain name options. After choosing a name, call
1900 // `RetrieveRegisterParameters` to ensure availability and obtain information
1901 // like pricing, which is needed to build a call to `RegisterDomain`. Another
1902 // way to create a new `Registration` is to transfer an existing domain from
1903 // another registrar (Deprecated: For more information, see Cloud Domains
1904 // feature deprecation
1905 // (https://cloud.google.com/domains/docs/deprecations/feature-deprecations)).
1906 // First, go to the current registrar to unlock the domain for transfer and
1907 // retrieve the domain's transfer authorization code. Then call
1908 // `RetrieveTransferParameters` to confirm that the domain is unlocked and to
1909 // get values needed to build a call to `TransferDomain`. Finally, you can
1910 // create a new `Registration` by importing an existing domain managed with
1911 // Google Domains (https://domains.google/) (Deprecated: For more information,
1912 // see Cloud Domains feature deprecation
1913 // (https://cloud.google.com/domains/docs/deprecations/feature-deprecations)).
1914 // First, call `RetrieveImportableDomains` to list domains to which the calling
1915 // user has sufficient access. Then call `ImportDomain` on any domain names you
1916 // want to use with Cloud Domains.
1917 type Registration struct {
1918 // ContactSettings: Required. Settings for contact information linked to the
1919 // `Registration`. You cannot update these with the `UpdateRegistration`
1920 // method. To update these settings, use the `ConfigureContactSettings` method.
1921 ContactSettings *ContactSettings `json:"contactSettings,omitempty"`
1922 // CreateTime: Output only. The creation timestamp of the `Registration`
1923 // resource.
1924 CreateTime string `json:"createTime,omitempty"`
1925 // DnsSettings: Settings controlling the DNS configuration of the
1926 // `Registration`. You cannot update these with the `UpdateRegistration`
1927 // method. To update these settings, use the `ConfigureDnsSettings` method.
1928 DnsSettings *DnsSettings `json:"dnsSettings,omitempty"`
1929 // DomainName: Required. Immutable. The domain name. Unicode domain names must
1930 // be expressed in Punycode format.
1931 DomainName string `json:"domainName,omitempty"`
1932 // DomainProperties: Output only. Special properties of the domain.
1933 //
1934 // Possible values:
1935 // "DOMAIN_PROPERTY_UNSPECIFIED" - The property is undefined.
1936 // "TRANSFER_LOCK_UNSUPPORTED_BY_REGISTRY" - The domain does not support
1937 // transfer locks due to restrictions of the registry. Such domains are
1938 // effectively always unlocked and any change made to
1939 // `management_settings.transfer_lock_state` is ignored.
1940 // "REQUIRE_PUSH_TRANSFER" - The domain uses an alternative `Push Transfer`
1941 // process to transfer the domain to another registrar. There are two important
1942 // consequences: * Cloud Domains does not supply the authorization codes. * To
1943 // initiate the process to transfer the domain to another registrar, you must
1944 // provide a tag of the registrar you want to transfer to. You can do this by
1945 // using the `InitiatePushTransfer` method. For more information, see [Transfer
1946 // a registered domain to another
1947 // registrar](https://cloud.google.com/domains/docs/transfer-domain-to-another-r
1948 // egistrar).
1949 DomainProperties []string `json:"domainProperties,omitempty"`
1950 // ExpireTime: Output only. The expiration timestamp of the `Registration`.
1951 ExpireTime string `json:"expireTime,omitempty"`
1952 // Issues: Output only. The set of issues with the `Registration` that require
1953 // attention.
1954 //
1955 // Possible values:
1956 // "ISSUE_UNSPECIFIED" - The issue is undefined.
1957 // "CONTACT_SUPPORT" - Contact the Cloud Support team to resolve a problem
1958 // with this domain.
1959 // "UNVERIFIED_EMAIL" - [ICANN](https://icann.org/) requires verification of
1960 // the email address in the `Registration`'s
1961 // `contact_settings.registrant_contact` field. To verify the email address,
1962 // follow the instructions in the email the `registrant_contact` receives
1963 // following registration. If you do not complete email verification within 15
1964 // days of registration, the domain is suspended. To resend the verification
1965 // email, call ConfigureContactSettings and provide the current
1966 // `registrant_contact.email`.
1967 // "PROBLEM_WITH_BILLING" - The billing account is not in good standing. The
1968 // domain is not automatically renewed at its expiration time unless you
1969 // resolve problems with your billing account.
1970 // "DNS_NOT_ACTIVATED" - The registry failed to validate your DNS
1971 // configuration and activate your domain. The failure might happen for the
1972 // following reasons: * You recently registered the domain (wait up to 72
1973 // hours). * You provided invalid name servers or name servers that correspond
1974 // to a newly created DNS zone. Verify your DNS configuration. If the
1975 // configuration is incorrect, you must fix it. If the configuration is
1976 // correct, either wait or call the ConfigureDnsSettings method to retry the
1977 // registry validation.
1978 // "AUTO_RENEWAL_UPDATE_NOT_EFFECTIVE" - Due to SquareSpace's constraints,
1979 // the auto-renewal update you made may not be effective during a certain
1980 // period of time. Generally, the time period is 15 days before expiration for
1981 // generic TLD domains, and 15 days before expiration + 3 days after expiration
1982 // for country-code TLD domains.
1983 Issues []string `json:"issues,omitempty"`
1984 // Labels: Set of labels associated with the `Registration`.
1985 Labels map[string]string `json:"labels,omitempty"`
1986 // ManagementSettings: Settings for management of the `Registration`, including
1987 // renewal, billing, and transfer. You cannot update these with the
1988 // `UpdateRegistration` method. To update these settings, use the
1989 // `ConfigureManagementSettings` method.
1990 ManagementSettings *ManagementSettings `json:"managementSettings,omitempty"`
1991 // Name: Output only. Name of the `Registration` resource, in the format
1992 // `projects/*/locations/*/registrations/`.
1993 Name string `json:"name,omitempty"`
1994 // PendingContactSettings: Output only. Pending contact settings for the
1995 // `Registration`. Updates to the `contact_settings` field that change its
1996 // `registrant_contact` or `privacy` fields require email confirmation by the
1997 // `registrant_contact` before taking effect. This field is set only if there
1998 // are pending updates to the `contact_settings` that have not been confirmed.
1999 // To confirm the changes, the `registrant_contact` must follow the
2000 // instructions in the email they receive.
2001 PendingContactSettings *ContactSettings `json:"pendingContactSettings,omitempty"`
2002 // Provider: Output only. Current domain management provider.
2003 //
2004 // Possible values:
2005 // "REGISTRAR_UNSPECIFIED" - Registrar is not selected.
2006 // "GOOGLE_DOMAINS" - Use Google Domains registrar.
2007 // "SQUARESPACE" - Use Squarespace registrar
2008 Provider string `json:"provider,omitempty"`
2009 // RegisterFailureReason: Output only. The reason the domain registration
2010 // failed. Only set for domains in REGISTRATION_FAILED state.
2011 //
2012 // Possible values:
2013 // "REGISTER_FAILURE_REASON_UNSPECIFIED" - Register failure unspecified.
2014 // "REGISTER_FAILURE_REASON_UNKNOWN" - Registration failed for an unknown
2015 // reason.
2016 // "DOMAIN_NOT_AVAILABLE" - The domain is not available for registration.
2017 // "INVALID_CONTACTS" - The provided contact information was rejected.
2018 RegisterFailureReason string `json:"registerFailureReason,omitempty"`
2019 // State: Output only. The state of the `Registration`
2020 //
2021 // Possible values:
2022 // "STATE_UNSPECIFIED" - The state is undefined.
2023 // "REGISTRATION_PENDING" - The domain is being registered.
2024 // "REGISTRATION_FAILED" - The domain registration failed. You can delete
2025 // resources in this state to allow registration to be retried.
2026 // "TRANSFER_PENDING" - The domain is being transferred from another
2027 // registrar to Cloud Domains.
2028 // "TRANSFER_FAILED" - The attempt to transfer the domain from another
2029 // registrar to Cloud Domains failed. You can delete resources in this state
2030 // and retry the transfer.
2031 // "IMPORT_PENDING" - The domain is being imported from Google Domains to
2032 // Cloud Domains.
2033 // "ACTIVE" - The domain is registered and operational. The domain renews
2034 // automatically as long as it remains in this state and the `RenewalMethod` is
2035 // set to `AUTOMATIC_RENEWAL`.
2036 // "SUSPENDED" - The domain is suspended and inoperative. For more details,
2037 // see the `issues` field.
2038 // "EXPORTED" - The domain is no longer managed with Cloud Domains. It may
2039 // have been transferred to another registrar or exported for management in
2040 // [Google Domains](https://domains.google/). You can no longer update it with
2041 // this API, and information shown about it may be stale. Domains in this state
2042 // are not automatically renewed by Cloud Domains.
2043 // "EXPIRED" - The domain is expired.
2044 State string `json:"state,omitempty"`
2045 // SupportedPrivacy: Output only. Set of options for the
2046 // `contact_settings.privacy` field that this `Registration` supports.
2047 //
2048 // Possible values:
2049 // "CONTACT_PRIVACY_UNSPECIFIED" - The contact privacy settings are
2050 // undefined.
2051 // "PUBLIC_CONTACT_DATA" - All the data from `ContactSettings` is publicly
2052 // available. When setting this option, you must also provide a
2053 // `PUBLIC_CONTACT_DATA_ACKNOWLEDGEMENT` in the `contact_notices` field of the
2054 // request.
2055 // "PRIVATE_CONTACT_DATA" - Deprecated: For more information, see [Cloud
2056 // Domains feature
2057 // deprecation](https://cloud.google.com/domains/docs/deprecations/feature-depre
2058 // cations). None of the data from `ContactSettings` is publicly available.
2059 // Instead, proxy contact data is published for your domain. Email sent to the
2060 // proxy email address is forwarded to the registrant's email address. Cloud
2061 // Domains provides this privacy proxy service at no additional cost.
2062 // "REDACTED_CONTACT_DATA" - The organization name (if provided) and limited
2063 // non-identifying data from `ContactSettings` is available to the public (e.g.
2064 // country and state). The remaining data is marked as `REDACTED FOR PRIVACY`
2065 // in the WHOIS database. The actual information redacted depends on the
2066 // domain. For details, see [the registration privacy
2067 // article](https://support.google.com/domains/answer/3251242).
2068 SupportedPrivacy []string `json:"supportedPrivacy,omitempty"`
2069 // TransferFailureReason: Output only. Deprecated: For more information, see
2070 // Cloud Domains feature deprecation
2071 // (https://cloud.google.com/domains/docs/deprecations/feature-deprecations).
2072 // The reason the domain transfer failed. Only set for domains in
2073 // TRANSFER_FAILED state.
2074 //
2075 // Possible values:
2076 // "TRANSFER_FAILURE_REASON_UNSPECIFIED" - Transfer failure unspecified.
2077 // "TRANSFER_FAILURE_REASON_UNKNOWN" - Transfer failed for an unknown reason.
2078 // "EMAIL_CONFIRMATION_FAILURE" - An email confirmation sent to the user was
2079 // rejected or expired.
2080 // "DOMAIN_NOT_REGISTERED" - The domain is available for registration.
2081 // "DOMAIN_HAS_TRANSFER_LOCK" - The domain has a transfer lock with its
2082 // current registrar which must be removed prior to transfer.
2083 // "INVALID_AUTHORIZATION_CODE" - The authorization code entered is not
2084 // valid.
2085 // "TRANSFER_CANCELLED" - The transfer was cancelled by the domain owner,
2086 // current registrar, or TLD registry.
2087 // "TRANSFER_REJECTED" - The transfer was rejected by the current registrar.
2088 // Contact the current registrar for more information.
2089 // "INVALID_REGISTRANT_EMAIL_ADDRESS" - The registrant email address cannot
2090 // be parsed from the domain's current public contact data.
2091 // "DOMAIN_NOT_ELIGIBLE_FOR_TRANSFER" - The domain is not eligible for
2092 // transfer due requirements imposed by the current registrar or TLD registry.
2093 // "TRANSFER_ALREADY_PENDING" - Another transfer is already pending for this
2094 // domain. The existing transfer attempt must expire or be cancelled in order
2095 // to proceed.
2096 TransferFailureReason string `json:"transferFailureReason,omitempty"`
2097
2098 // ServerResponse contains the HTTP response code and headers from the server.
2099 googleapi.ServerResponse `json:"-"`
2100 // ForceSendFields is a list of field names (e.g. "ContactSettings") to
2101 // unconditionally include in API requests. By default, fields with empty or
2102 // default values are omitted from API requests. See
2103 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2104 // details.
2105 ForceSendFields []string `json:"-"`
2106 // NullFields is a list of field names (e.g. "ContactSettings") to include in
2107 // API requests with the JSON null value. By default, fields with empty values
2108 // are omitted from API requests. See
2109 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2110 NullFields []string `json:"-"`
2111 }
2112
2113 func (s Registration) MarshalJSON() ([]byte, error) {
2114 type NoMethod Registration
2115 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2116 }
2117
2118 // RenewDomainRequest: Request for the `RenewDomain` method.
2119 type RenewDomainRequest struct {
2120 // ValidateOnly: Optional. When true, only validation is performed, without
2121 // actually renewing the domain. For more information, see Request validation
2122 // (https://cloud.google.com/apis/design/design_patterns#request_validation)
2123 ValidateOnly bool `json:"validateOnly,omitempty"`
2124 // YearlyPrice: Required. Acknowledgement of the price to renew the domain for
2125 // one year. To get the price, see Cloud Domains pricing
2126 // (https://cloud.google.com/domains/pricing). If not provided, the expected
2127 // price is returned in the error message.
2128 YearlyPrice *Money `json:"yearlyPrice,omitempty"`
2129 // ForceSendFields is a list of field names (e.g. "ValidateOnly") to
2130 // unconditionally include in API requests. By default, fields with empty or
2131 // default values are omitted from API requests. See
2132 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2133 // details.
2134 ForceSendFields []string `json:"-"`
2135 // NullFields is a list of field names (e.g. "ValidateOnly") to include in API
2136 // requests with the JSON null value. By default, fields with empty values are
2137 // omitted from API requests. See
2138 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2139 NullFields []string `json:"-"`
2140 }
2141
2142 func (s RenewDomainRequest) MarshalJSON() ([]byte, error) {
2143 type NoMethod RenewDomainRequest
2144 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2145 }
2146
2147 // ResetAuthorizationCodeRequest: Request for the `ResetAuthorizationCode`
2148 // method.
2149 type ResetAuthorizationCodeRequest struct {
2150 }
2151
2152 // ResourceRecordSet: A unit of data that is returned by the DNS servers.
2153 type ResourceRecordSet struct {
2154 // Name: For example, www.example.com.
2155 Name string `json:"name,omitempty"`
2156 // RoutingPolicy: Configures dynamic query responses based on either the geo
2157 // location of the querying user or a weighted round robin based routing
2158 // policy. A valid `ResourceRecordSet` contains only `rrdata` (for static
2159 // resolution) or a `routing_policy` (for dynamic resolution).
2160 RoutingPolicy *RRSetRoutingPolicy `json:"routingPolicy,omitempty"`
2161 // Rrdata: As defined in RFC 1035 (section 5) and RFC 1034 (section 3.6.1) --
2162 // see examples.
2163 Rrdata []string `json:"rrdata,omitempty"`
2164 // SignatureRrdata: As defined in RFC 4034 (section 3.2).
2165 SignatureRrdata []string `json:"signatureRrdata,omitempty"`
2166 // Ttl: Number of seconds that this `ResourceRecordSet` can be cached by
2167 // resolvers.
2168 Ttl int64 `json:"ttl,omitempty"`
2169 // Type: The identifier of a supported record type. See the list of Supported
2170 // DNS record types.
2171 Type string `json:"type,omitempty"`
2172 // ForceSendFields is a list of field names (e.g. "Name") to unconditionally
2173 // include in API requests. By default, fields with empty or default values are
2174 // omitted from API requests. See
2175 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2176 // details.
2177 ForceSendFields []string `json:"-"`
2178 // NullFields is a list of field names (e.g. "Name") to include in API requests
2179 // with the JSON null value. By default, fields with empty values are omitted
2180 // from API requests. See
2181 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2182 NullFields []string `json:"-"`
2183 }
2184
2185 func (s ResourceRecordSet) MarshalJSON() ([]byte, error) {
2186 type NoMethod ResourceRecordSet
2187 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2188 }
2189
2190 // RetrieveGoogleDomainsDnsRecordsResponse: Response for the
2191 // `RetrieveGoogleDomainsDnsRecords` method.
2192 type RetrieveGoogleDomainsDnsRecordsResponse struct {
2193 // NextPageToken: When present, there are more results to retrieve. Set
2194 // `page_token` to this value on a subsequent call to get the next page of
2195 // results.
2196 NextPageToken string `json:"nextPageToken,omitempty"`
2197 // Rrset: The resource record set resources (DNS Zone records).
2198 Rrset []*ResourceRecordSet `json:"rrset,omitempty"`
2199
2200 // ServerResponse contains the HTTP response code and headers from the server.
2201 googleapi.ServerResponse `json:"-"`
2202 // ForceSendFields is a list of field names (e.g. "NextPageToken") to
2203 // unconditionally include in API requests. By default, fields with empty or
2204 // default values are omitted from API requests. See
2205 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2206 // details.
2207 ForceSendFields []string `json:"-"`
2208 // NullFields is a list of field names (e.g. "NextPageToken") to include in API
2209 // requests with the JSON null value. By default, fields with empty values are
2210 // omitted from API requests. See
2211 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2212 NullFields []string `json:"-"`
2213 }
2214
2215 func (s RetrieveGoogleDomainsDnsRecordsResponse) MarshalJSON() ([]byte, error) {
2216 type NoMethod RetrieveGoogleDomainsDnsRecordsResponse
2217 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2218 }
2219
2220 // RetrieveGoogleDomainsForwardingConfigResponse: Response for the
2221 // `RetrieveGoogleDomainsForwardingConfig` method.
2222 type RetrieveGoogleDomainsForwardingConfigResponse struct {
2223 // DomainForwardings: The list of domain forwarding configurations. A
2224 // forwarding configuration might not work correctly if the required DNS
2225 // records are not present in the domain's authoritative DNS zone.
2226 DomainForwardings []*DomainForwarding `json:"domainForwardings,omitempty"`
2227 // EmailForwardings: The list of email forwarding configurations. A forwarding
2228 // configuration might not work correctly if the required DNS records are not
2229 // present in the domain's authoritative DNS zone.
2230 EmailForwardings []*EmailForwarding `json:"emailForwardings,omitempty"`
2231
2232 // ServerResponse contains the HTTP response code and headers from the server.
2233 googleapi.ServerResponse `json:"-"`
2234 // ForceSendFields is a list of field names (e.g. "DomainForwardings") to
2235 // unconditionally include in API requests. By default, fields with empty or
2236 // default values are omitted from API requests. See
2237 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2238 // details.
2239 ForceSendFields []string `json:"-"`
2240 // NullFields is a list of field names (e.g. "DomainForwardings") to include in
2241 // API requests with the JSON null value. By default, fields with empty values
2242 // are omitted from API requests. See
2243 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2244 NullFields []string `json:"-"`
2245 }
2246
2247 func (s RetrieveGoogleDomainsForwardingConfigResponse) MarshalJSON() ([]byte, error) {
2248 type NoMethod RetrieveGoogleDomainsForwardingConfigResponse
2249 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2250 }
2251
2252 // RetrieveImportableDomainsResponse: Deprecated: For more information, see
2253 // Cloud Domains feature deprecation
2254 // (https://cloud.google.com/domains/docs/deprecations/feature-deprecations).
2255 // Response for the `RetrieveImportableDomains` method.
2256 type RetrieveImportableDomainsResponse struct {
2257 // Domains: A list of domains that the calling user manages in Google Domains.
2258 Domains []*Domain `json:"domains,omitempty"`
2259 // NextPageToken: When present, there are more results to retrieve. Set
2260 // `page_token` to this value on a subsequent call to get the next page of
2261 // results.
2262 NextPageToken string `json:"nextPageToken,omitempty"`
2263
2264 // ServerResponse contains the HTTP response code and headers from the server.
2265 googleapi.ServerResponse `json:"-"`
2266 // ForceSendFields is a list of field names (e.g. "Domains") to unconditionally
2267 // include in API requests. By default, fields with empty or default values are
2268 // omitted from API requests. See
2269 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2270 // details.
2271 ForceSendFields []string `json:"-"`
2272 // NullFields is a list of field names (e.g. "Domains") to include in API
2273 // requests with the JSON null value. By default, fields with empty values are
2274 // omitted from API requests. See
2275 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2276 NullFields []string `json:"-"`
2277 }
2278
2279 func (s RetrieveImportableDomainsResponse) MarshalJSON() ([]byte, error) {
2280 type NoMethod RetrieveImportableDomainsResponse
2281 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2282 }
2283
2284 // RetrieveRegisterParametersResponse: Response for the
2285 // `RetrieveRegisterParameters` method.
2286 type RetrieveRegisterParametersResponse struct {
2287 // RegisterParameters: Parameters to use when calling the `RegisterDomain`
2288 // method.
2289 RegisterParameters *RegisterParameters `json:"registerParameters,omitempty"`
2290
2291 // ServerResponse contains the HTTP response code and headers from the server.
2292 googleapi.ServerResponse `json:"-"`
2293 // ForceSendFields is a list of field names (e.g. "RegisterParameters") to
2294 // unconditionally include in API requests. By default, fields with empty or
2295 // default values are omitted from API requests. See
2296 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2297 // details.
2298 ForceSendFields []string `json:"-"`
2299 // NullFields is a list of field names (e.g. "RegisterParameters") to include
2300 // in API requests with the JSON null value. By default, fields with empty
2301 // values are omitted from API requests. See
2302 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2303 NullFields []string `json:"-"`
2304 }
2305
2306 func (s RetrieveRegisterParametersResponse) MarshalJSON() ([]byte, error) {
2307 type NoMethod RetrieveRegisterParametersResponse
2308 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2309 }
2310
2311 // RetrieveTransferParametersResponse: Deprecated: For more information, see
2312 // Cloud Domains feature deprecation
2313 // (https://cloud.google.com/domains/docs/deprecations/feature-deprecations).
2314 // Response for the `RetrieveTransferParameters` method.
2315 type RetrieveTransferParametersResponse struct {
2316 // TransferParameters: Parameters to use when calling the `TransferDomain`
2317 // method.
2318 TransferParameters *TransferParameters `json:"transferParameters,omitempty"`
2319
2320 // ServerResponse contains the HTTP response code and headers from the server.
2321 googleapi.ServerResponse `json:"-"`
2322 // ForceSendFields is a list of field names (e.g. "TransferParameters") to
2323 // unconditionally include in API requests. By default, fields with empty or
2324 // default values are omitted from API requests. See
2325 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2326 // details.
2327 ForceSendFields []string `json:"-"`
2328 // NullFields is a list of field names (e.g. "TransferParameters") to include
2329 // in API requests with the JSON null value. By default, fields with empty
2330 // values are omitted from API requests. See
2331 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2332 NullFields []string `json:"-"`
2333 }
2334
2335 func (s RetrieveTransferParametersResponse) MarshalJSON() ([]byte, error) {
2336 type NoMethod RetrieveTransferParametersResponse
2337 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2338 }
2339
2340 // SearchDomainsResponse: Response for the `SearchDomains` method.
2341 type SearchDomainsResponse struct {
2342 // RegisterParameters: Results of the domain name search.
2343 RegisterParameters []*RegisterParameters `json:"registerParameters,omitempty"`
2344
2345 // ServerResponse contains the HTTP response code and headers from the server.
2346 googleapi.ServerResponse `json:"-"`
2347 // ForceSendFields is a list of field names (e.g. "RegisterParameters") to
2348 // unconditionally include in API requests. By default, fields with empty or
2349 // default values are omitted from API requests. See
2350 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2351 // details.
2352 ForceSendFields []string `json:"-"`
2353 // NullFields is a list of field names (e.g. "RegisterParameters") to include
2354 // in API requests with the JSON null value. By default, fields with empty
2355 // values are omitted from API requests. See
2356 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2357 NullFields []string `json:"-"`
2358 }
2359
2360 func (s SearchDomainsResponse) MarshalJSON() ([]byte, error) {
2361 type NoMethod SearchDomainsResponse
2362 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2363 }
2364
2365 // SetIamPolicyRequest: Request message for `SetIamPolicy` method.
2366 type SetIamPolicyRequest struct {
2367 // Policy: REQUIRED: The complete policy to be applied to the `resource`. The
2368 // size of the policy is limited to a few 10s of KB. An empty policy is a valid
2369 // policy but certain Google Cloud services (such as Projects) might reject
2370 // them.
2371 Policy *Policy `json:"policy,omitempty"`
2372 // UpdateMask: OPTIONAL: A FieldMask specifying which fields of the policy to
2373 // modify. Only the fields in the mask will be modified. If no mask is
2374 // provided, the following default mask is used: `paths: "bindings, etag"
2375 UpdateMask string `json:"updateMask,omitempty"`
2376 // ForceSendFields is a list of field names (e.g. "Policy") to unconditionally
2377 // include in API requests. By default, fields with empty or default values are
2378 // omitted from API requests. See
2379 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2380 // details.
2381 ForceSendFields []string `json:"-"`
2382 // NullFields is a list of field names (e.g. "Policy") to include in API
2383 // requests with the JSON null value. By default, fields with empty values are
2384 // omitted from API requests. See
2385 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2386 NullFields []string `json:"-"`
2387 }
2388
2389 func (s SetIamPolicyRequest) MarshalJSON() ([]byte, error) {
2390 type NoMethod SetIamPolicyRequest
2391 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2392 }
2393
2394 // Status: The `Status` type defines a logical error model that is suitable for
2395 // different programming environments, including REST APIs and RPC APIs. It is
2396 // used by gRPC (https://github.com/grpc). Each `Status` message contains three
2397 // pieces of data: error code, error message, and error details. You can find
2398 // out more about this error model and how to work with it in the API Design
2399 // Guide (https://cloud.google.com/apis/design/errors).
2400 type Status struct {
2401 // Code: The status code, which should be an enum value of google.rpc.Code.
2402 Code int64 `json:"code,omitempty"`
2403 // Details: A list of messages that carry the error details. There is a common
2404 // set of message types for APIs to use.
2405 Details []googleapi.RawMessage `json:"details,omitempty"`
2406 // Message: A developer-facing error message, which should be in English. Any
2407 // user-facing error message should be localized and sent in the
2408 // google.rpc.Status.details field, or localized by the client.
2409 Message string `json:"message,omitempty"`
2410 // ForceSendFields is a list of field names (e.g. "Code") to unconditionally
2411 // include in API requests. By default, fields with empty or default values are
2412 // omitted from API requests. See
2413 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2414 // details.
2415 ForceSendFields []string `json:"-"`
2416 // NullFields is a list of field names (e.g. "Code") to include in API requests
2417 // with the JSON null value. By default, fields with empty values are omitted
2418 // from API requests. See
2419 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2420 NullFields []string `json:"-"`
2421 }
2422
2423 func (s Status) MarshalJSON() ([]byte, error) {
2424 type NoMethod Status
2425 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2426 }
2427
2428 // TestIamPermissionsRequest: Request message for `TestIamPermissions` method.
2429 type TestIamPermissionsRequest struct {
2430 // Permissions: The set of permissions to check for the `resource`. Permissions
2431 // with wildcards (such as `*` or `storage.*`) are not allowed. For more
2432 // information see IAM Overview
2433 // (https://cloud.google.com/iam/docs/overview#permissions).
2434 Permissions []string `json:"permissions,omitempty"`
2435 // ForceSendFields is a list of field names (e.g. "Permissions") to
2436 // unconditionally include in API requests. By default, fields with empty or
2437 // default values are omitted from API requests. See
2438 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2439 // details.
2440 ForceSendFields []string `json:"-"`
2441 // NullFields is a list of field names (e.g. "Permissions") to include in API
2442 // requests with the JSON null value. By default, fields with empty values are
2443 // omitted from API requests. See
2444 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2445 NullFields []string `json:"-"`
2446 }
2447
2448 func (s TestIamPermissionsRequest) MarshalJSON() ([]byte, error) {
2449 type NoMethod TestIamPermissionsRequest
2450 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2451 }
2452
2453 // TestIamPermissionsResponse: Response message for `TestIamPermissions`
2454 // method.
2455 type TestIamPermissionsResponse struct {
2456 // Permissions: A subset of `TestPermissionsRequest.permissions` that the
2457 // caller is allowed.
2458 Permissions []string `json:"permissions,omitempty"`
2459
2460 // ServerResponse contains the HTTP response code and headers from the server.
2461 googleapi.ServerResponse `json:"-"`
2462 // ForceSendFields is a list of field names (e.g. "Permissions") to
2463 // unconditionally include in API requests. By default, fields with empty or
2464 // default values are omitted from API requests. See
2465 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2466 // details.
2467 ForceSendFields []string `json:"-"`
2468 // NullFields is a list of field names (e.g. "Permissions") to include in API
2469 // requests with the JSON null value. By default, fields with empty values are
2470 // omitted from API requests. See
2471 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2472 NullFields []string `json:"-"`
2473 }
2474
2475 func (s TestIamPermissionsResponse) MarshalJSON() ([]byte, error) {
2476 type NoMethod TestIamPermissionsResponse
2477 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2478 }
2479
2480 // TransferDomainRequest: Deprecated: For more information, see Cloud Domains
2481 // feature deprecation
2482 // (https://cloud.google.com/domains/docs/deprecations/feature-deprecations).
2483 // Request for the `TransferDomain` method.
2484 type TransferDomainRequest struct {
2485 // AuthorizationCode: The domain's transfer authorization code. You can obtain
2486 // this from the domain's current registrar.
2487 AuthorizationCode *AuthorizationCode `json:"authorizationCode,omitempty"`
2488 // ContactNotices: The list of contact notices that you acknowledge. The
2489 // notices needed here depend on the values specified in
2490 // `registration.contact_settings`.
2491 //
2492 // Possible values:
2493 // "CONTACT_NOTICE_UNSPECIFIED" - The notice is undefined.
2494 // "PUBLIC_CONTACT_DATA_ACKNOWLEDGEMENT" - Required when setting the
2495 // `privacy` field of `ContactSettings` to `PUBLIC_CONTACT_DATA`, which exposes
2496 // contact data publicly.
2497 ContactNotices []string `json:"contactNotices,omitempty"`
2498 // Registration: Required. The complete `Registration` resource to be created.
2499 // You can leave `registration.dns_settings` unset to import the domain's
2500 // current DNS configuration from its current registrar. Use this option only
2501 // if you are sure that the domain's current DNS service does not cease upon
2502 // transfer, as is often the case for DNS services provided for free by the
2503 // registrar.
2504 Registration *Registration `json:"registration,omitempty"`
2505 // ValidateOnly: Validate the request without actually transferring the domain.
2506 ValidateOnly bool `json:"validateOnly,omitempty"`
2507 // YearlyPrice: Required. Acknowledgement of the price to transfer or renew the
2508 // domain for one year. Call `RetrieveTransferParameters` to obtain the price,
2509 // which you must acknowledge.
2510 YearlyPrice *Money `json:"yearlyPrice,omitempty"`
2511 // ForceSendFields is a list of field names (e.g. "AuthorizationCode") to
2512 // unconditionally include in API requests. By default, fields with empty or
2513 // default values are omitted from API requests. See
2514 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2515 // details.
2516 ForceSendFields []string `json:"-"`
2517 // NullFields is a list of field names (e.g. "AuthorizationCode") to include in
2518 // API requests with the JSON null value. By default, fields with empty values
2519 // are omitted from API requests. See
2520 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2521 NullFields []string `json:"-"`
2522 }
2523
2524 func (s TransferDomainRequest) MarshalJSON() ([]byte, error) {
2525 type NoMethod TransferDomainRequest
2526 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2527 }
2528
2529 // TransferParameters: Deprecated: For more information, see Cloud Domains
2530 // feature deprecation
2531 // (https://cloud.google.com/domains/docs/deprecations/feature-deprecations).
2532 // Parameters required to transfer a domain from another registrar.
2533 type TransferParameters struct {
2534 // CurrentRegistrar: The registrar that currently manages the domain.
2535 CurrentRegistrar string `json:"currentRegistrar,omitempty"`
2536 // CurrentRegistrarUri: The URL of the registrar that currently manages the
2537 // domain.
2538 CurrentRegistrarUri string `json:"currentRegistrarUri,omitempty"`
2539 // DomainName: The domain name. Unicode domain names are expressed in Punycode
2540 // format.
2541 DomainName string `json:"domainName,omitempty"`
2542 // NameServers: The name servers that currently store the configuration of the
2543 // domain.
2544 NameServers []string `json:"nameServers,omitempty"`
2545 // SupportedPrivacy: Contact privacy options that the domain supports.
2546 //
2547 // Possible values:
2548 // "CONTACT_PRIVACY_UNSPECIFIED" - The contact privacy settings are
2549 // undefined.
2550 // "PUBLIC_CONTACT_DATA" - All the data from `ContactSettings` is publicly
2551 // available. When setting this option, you must also provide a
2552 // `PUBLIC_CONTACT_DATA_ACKNOWLEDGEMENT` in the `contact_notices` field of the
2553 // request.
2554 // "PRIVATE_CONTACT_DATA" - Deprecated: For more information, see [Cloud
2555 // Domains feature
2556 // deprecation](https://cloud.google.com/domains/docs/deprecations/feature-depre
2557 // cations). None of the data from `ContactSettings` is publicly available.
2558 // Instead, proxy contact data is published for your domain. Email sent to the
2559 // proxy email address is forwarded to the registrant's email address. Cloud
2560 // Domains provides this privacy proxy service at no additional cost.
2561 // "REDACTED_CONTACT_DATA" - The organization name (if provided) and limited
2562 // non-identifying data from `ContactSettings` is available to the public (e.g.
2563 // country and state). The remaining data is marked as `REDACTED FOR PRIVACY`
2564 // in the WHOIS database. The actual information redacted depends on the
2565 // domain. For details, see [the registration privacy
2566 // article](https://support.google.com/domains/answer/3251242).
2567 SupportedPrivacy []string `json:"supportedPrivacy,omitempty"`
2568 // TransferLockState: Indicates whether the domain is protected by a transfer
2569 // lock. For a transfer to succeed, this must show `UNLOCKED`. To unlock a
2570 // domain, go to its current registrar.
2571 //
2572 // Possible values:
2573 // "TRANSFER_LOCK_STATE_UNSPECIFIED" - The state is unspecified.
2574 // "UNLOCKED" - The domain is unlocked and can be transferred to another
2575 // registrar.
2576 // "LOCKED" - The domain is locked and cannot be transferred to another
2577 // registrar.
2578 TransferLockState string `json:"transferLockState,omitempty"`
2579 // YearlyPrice: Price to transfer or renew the domain for one year.
2580 YearlyPrice *Money `json:"yearlyPrice,omitempty"`
2581 // ForceSendFields is a list of field names (e.g. "CurrentRegistrar") to
2582 // unconditionally include in API requests. By default, fields with empty or
2583 // default values are omitted from API requests. See
2584 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2585 // details.
2586 ForceSendFields []string `json:"-"`
2587 // NullFields is a list of field names (e.g. "CurrentRegistrar") to include in
2588 // API requests with the JSON null value. By default, fields with empty values
2589 // are omitted from API requests. See
2590 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2591 NullFields []string `json:"-"`
2592 }
2593
2594 func (s TransferParameters) MarshalJSON() ([]byte, error) {
2595 type NoMethod TransferParameters
2596 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2597 }
2598
2599 // WrrPolicy: Configures a RRSetRoutingPolicy that routes in a weighted round
2600 // robin fashion.
2601 type WrrPolicy struct {
2602 Item []*WrrPolicyItem `json:"item,omitempty"`
2603 // ForceSendFields is a list of field names (e.g. "Item") to unconditionally
2604 // include in API requests. By default, fields with empty or default values are
2605 // omitted from API requests. See
2606 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2607 // details.
2608 ForceSendFields []string `json:"-"`
2609 // NullFields is a list of field names (e.g. "Item") to include in API requests
2610 // with the JSON null value. By default, fields with empty values are omitted
2611 // from API requests. See
2612 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2613 NullFields []string `json:"-"`
2614 }
2615
2616 func (s WrrPolicy) MarshalJSON() ([]byte, error) {
2617 type NoMethod WrrPolicy
2618 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2619 }
2620
2621 // WrrPolicyItem: A routing block which contains the routing information for
2622 // one WRR item.
2623 type WrrPolicyItem struct {
2624 // HealthCheckedTargets: Endpoints that are health checked before making the
2625 // routing decision. The unhealthy endpoints are omitted from the result. If
2626 // all endpoints within a bucket are unhealthy, we choose a different bucket
2627 // (sampled with respect to its weight) for responding. If DNSSEC is enabled
2628 // for this zone, only one of `rrdata` or `health_checked_targets` can be set.
2629 HealthCheckedTargets *HealthCheckTargets `json:"healthCheckedTargets,omitempty"`
2630 Rrdata []string `json:"rrdata,omitempty"`
2631 // SignatureRrdata: DNSSEC generated signatures for all the `rrdata` within
2632 // this item. When using health-checked targets for DNSSEC-enabled zones, you
2633 // can only use at most one health-checked IP address per item.
2634 SignatureRrdata []string `json:"signatureRrdata,omitempty"`
2635 // Weight: The weight corresponding to this `WrrPolicyItem` object. When
2636 // multiple `WrrPolicyItem` objects are configured, the probability of
2637 // returning an `WrrPolicyItem` object's data is proportional to its weight
2638 // relative to the sum of weights configured for all items. This weight must be
2639 // non-negative.
2640 Weight float64 `json:"weight,omitempty"`
2641 // ForceSendFields is a list of field names (e.g. "HealthCheckedTargets") to
2642 // unconditionally include in API requests. By default, fields with empty or
2643 // default values are omitted from API requests. See
2644 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2645 // details.
2646 ForceSendFields []string `json:"-"`
2647 // NullFields is a list of field names (e.g. "HealthCheckedTargets") to include
2648 // in API requests with the JSON null value. By default, fields with empty
2649 // values are omitted from API requests. See
2650 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2651 NullFields []string `json:"-"`
2652 }
2653
2654 func (s WrrPolicyItem) MarshalJSON() ([]byte, error) {
2655 type NoMethod WrrPolicyItem
2656 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2657 }
2658
2659 func (s *WrrPolicyItem) UnmarshalJSON(data []byte) error {
2660 type NoMethod WrrPolicyItem
2661 var s1 struct {
2662 Weight gensupport.JSONFloat64 `json:"weight"`
2663 *NoMethod
2664 }
2665 s1.NoMethod = (*NoMethod)(s)
2666 if err := json.Unmarshal(data, &s1); err != nil {
2667 return err
2668 }
2669 s.Weight = float64(s1.Weight)
2670 return nil
2671 }
2672
2673 type ProjectsLocationsGetCall struct {
2674 s *Service
2675 name string
2676 urlParams_ gensupport.URLParams
2677 ifNoneMatch_ string
2678 ctx_ context.Context
2679 header_ http.Header
2680 }
2681
2682 // Get: Gets information about a location.
2683 //
2684 // - name: Resource name for the location.
2685 func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall {
2686 c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2687 c.name = name
2688 return c
2689 }
2690
2691 // Fields allows partial responses to be retrieved. See
2692 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
2693 // details.
2694 func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall {
2695 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2696 return c
2697 }
2698
2699 // IfNoneMatch sets an optional parameter which makes the operation fail if the
2700 // object's ETag matches the given value. This is useful for getting updates
2701 // only after the object has changed since the last request.
2702 func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall {
2703 c.ifNoneMatch_ = entityTag
2704 return c
2705 }
2706
2707 // Context sets the context to be used in this call's Do method.
2708 func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall {
2709 c.ctx_ = ctx
2710 return c
2711 }
2712
2713 // Header returns a http.Header that can be modified by the caller to add
2714 // headers to the request.
2715 func (c *ProjectsLocationsGetCall) Header() http.Header {
2716 if c.header_ == nil {
2717 c.header_ = make(http.Header)
2718 }
2719 return c.header_
2720 }
2721
2722 func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) {
2723 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
2724 if c.ifNoneMatch_ != "" {
2725 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2726 }
2727 c.urlParams_.Set("alt", alt)
2728 c.urlParams_.Set("prettyPrint", "false")
2729 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+name}")
2730 urls += "?" + c.urlParams_.Encode()
2731 req, err := http.NewRequest("GET", urls, nil)
2732 if err != nil {
2733 return nil, err
2734 }
2735 req.Header = reqHeaders
2736 googleapi.Expand(req.URL, map[string]string{
2737 "name": c.name,
2738 })
2739 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "domains.projects.locations.get", "request", internallog.HTTPRequest(req, nil))
2740 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2741 }
2742
2743 // Do executes the "domains.projects.locations.get" call.
2744 // Any non-2xx status code is an error. Response headers are in either
2745 // *Location.ServerResponse.Header or (if a response was returned at all) in
2746 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
2747 // whether the returned error was because http.StatusNotModified was returned.
2748 func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) {
2749 gensupport.SetOptions(c.urlParams_, opts...)
2750 res, err := c.doRequest("json")
2751 if res != nil && res.StatusCode == http.StatusNotModified {
2752 if res.Body != nil {
2753 res.Body.Close()
2754 }
2755 return nil, gensupport.WrapError(&googleapi.Error{
2756 Code: res.StatusCode,
2757 Header: res.Header,
2758 })
2759 }
2760 if err != nil {
2761 return nil, err
2762 }
2763 defer googleapi.CloseBody(res)
2764 if err := googleapi.CheckResponse(res); err != nil {
2765 return nil, gensupport.WrapError(err)
2766 }
2767 ret := &Location{
2768 ServerResponse: googleapi.ServerResponse{
2769 Header: res.Header,
2770 HTTPStatusCode: res.StatusCode,
2771 },
2772 }
2773 target := &ret
2774 b, err := gensupport.DecodeResponseBytes(target, res)
2775 if err != nil {
2776 return nil, err
2777 }
2778 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "domains.projects.locations.get", "response", internallog.HTTPResponse(res, b))
2779 return ret, nil
2780 }
2781
2782 type ProjectsLocationsListCall struct {
2783 s *Service
2784 name string
2785 urlParams_ gensupport.URLParams
2786 ifNoneMatch_ string
2787 ctx_ context.Context
2788 header_ http.Header
2789 }
2790
2791 // List: Lists information about the supported locations for this service. This
2792 // method can be called in two ways: * **List all public locations:** Use the
2793 // path `GET /v1/locations`. * **List project-visible locations:** Use the path
2794 // `GET /v1/projects/{project_id}/locations`. This may include public locations
2795 // as well as private or other locations specifically visible to the project.
2796 //
2797 // - name: The resource that owns the locations collection, if applicable.
2798 func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall {
2799 c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2800 c.name = name
2801 return c
2802 }
2803
2804 // ExtraLocationTypes sets the optional parameter "extraLocationTypes": Do not
2805 // use this field. It is unsupported and is ignored unless explicitly
2806 // documented otherwise. This is primarily for internal usage.
2807 func (c *ProjectsLocationsListCall) ExtraLocationTypes(extraLocationTypes ...string) *ProjectsLocationsListCall {
2808 c.urlParams_.SetMulti("extraLocationTypes", append([]string{}, extraLocationTypes...))
2809 return c
2810 }
2811
2812 // Filter sets the optional parameter "filter": A filter to narrow down results
2813 // to a preferred subset. The filtering language accepts strings like
2814 // "displayName=tokyo", and is documented in more detail in AIP-160
2815 // (https://google.aip.dev/160).
2816 func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall {
2817 c.urlParams_.Set("filter", filter)
2818 return c
2819 }
2820
2821 // PageSize sets the optional parameter "pageSize": The maximum number of
2822 // results to return. If not set, the service selects a default.
2823 func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall {
2824 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
2825 return c
2826 }
2827
2828 // PageToken sets the optional parameter "pageToken": A page token received
2829 // from the `next_page_token` field in the response. Send that page token to
2830 // receive the subsequent page.
2831 func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall {
2832 c.urlParams_.Set("pageToken", pageToken)
2833 return c
2834 }
2835
2836 // Fields allows partial responses to be retrieved. See
2837 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
2838 // details.
2839 func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall {
2840 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2841 return c
2842 }
2843
2844 // IfNoneMatch sets an optional parameter which makes the operation fail if the
2845 // object's ETag matches the given value. This is useful for getting updates
2846 // only after the object has changed since the last request.
2847 func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall {
2848 c.ifNoneMatch_ = entityTag
2849 return c
2850 }
2851
2852 // Context sets the context to be used in this call's Do method.
2853 func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall {
2854 c.ctx_ = ctx
2855 return c
2856 }
2857
2858 // Header returns a http.Header that can be modified by the caller to add
2859 // headers to the request.
2860 func (c *ProjectsLocationsListCall) Header() http.Header {
2861 if c.header_ == nil {
2862 c.header_ = make(http.Header)
2863 }
2864 return c.header_
2865 }
2866
2867 func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) {
2868 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
2869 if c.ifNoneMatch_ != "" {
2870 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2871 }
2872 c.urlParams_.Set("alt", alt)
2873 c.urlParams_.Set("prettyPrint", "false")
2874 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+name}/locations")
2875 urls += "?" + c.urlParams_.Encode()
2876 req, err := http.NewRequest("GET", urls, nil)
2877 if err != nil {
2878 return nil, err
2879 }
2880 req.Header = reqHeaders
2881 googleapi.Expand(req.URL, map[string]string{
2882 "name": c.name,
2883 })
2884 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "domains.projects.locations.list", "request", internallog.HTTPRequest(req, nil))
2885 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2886 }
2887
2888 // Do executes the "domains.projects.locations.list" call.
2889 // Any non-2xx status code is an error. Response headers are in either
2890 // *ListLocationsResponse.ServerResponse.Header or (if a response was returned
2891 // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
2892 // check whether the returned error was because http.StatusNotModified was
2893 // returned.
2894 func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) {
2895 gensupport.SetOptions(c.urlParams_, opts...)
2896 res, err := c.doRequest("json")
2897 if res != nil && res.StatusCode == http.StatusNotModified {
2898 if res.Body != nil {
2899 res.Body.Close()
2900 }
2901 return nil, gensupport.WrapError(&googleapi.Error{
2902 Code: res.StatusCode,
2903 Header: res.Header,
2904 })
2905 }
2906 if err != nil {
2907 return nil, err
2908 }
2909 defer googleapi.CloseBody(res)
2910 if err := googleapi.CheckResponse(res); err != nil {
2911 return nil, gensupport.WrapError(err)
2912 }
2913 ret := &ListLocationsResponse{
2914 ServerResponse: googleapi.ServerResponse{
2915 Header: res.Header,
2916 HTTPStatusCode: res.StatusCode,
2917 },
2918 }
2919 target := &ret
2920 b, err := gensupport.DecodeResponseBytes(target, res)
2921 if err != nil {
2922 return nil, err
2923 }
2924 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "domains.projects.locations.list", "response", internallog.HTTPResponse(res, b))
2925 return ret, nil
2926 }
2927
2928 // Pages invokes f for each page of results.
2929 // A non-nil error returned from f will halt the iteration.
2930 // The provided context supersedes any context provided to the Context method.
2931 func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error {
2932 c.ctx_ = ctx
2933 defer c.PageToken(c.urlParams_.Get("pageToken"))
2934 for {
2935 x, err := c.Do()
2936 if err != nil {
2937 return err
2938 }
2939 if err := f(x); err != nil {
2940 return err
2941 }
2942 if x.NextPageToken == "" {
2943 return nil
2944 }
2945 c.PageToken(x.NextPageToken)
2946 }
2947 }
2948
2949 type ProjectsLocationsOperationsGetCall struct {
2950 s *Service
2951 name string
2952 urlParams_ gensupport.URLParams
2953 ifNoneMatch_ string
2954 ctx_ context.Context
2955 header_ http.Header
2956 }
2957
2958 // Get: Gets the latest state of a long-running operation. Clients can use this
2959 // method to poll the operation result at intervals as recommended by the API
2960 // service.
2961 //
2962 // - name: The name of the operation resource.
2963 func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall {
2964 c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2965 c.name = name
2966 return c
2967 }
2968
2969 // Fields allows partial responses to be retrieved. See
2970 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
2971 // details.
2972 func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall {
2973 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2974 return c
2975 }
2976
2977 // IfNoneMatch sets an optional parameter which makes the operation fail if the
2978 // object's ETag matches the given value. This is useful for getting updates
2979 // only after the object has changed since the last request.
2980 func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall {
2981 c.ifNoneMatch_ = entityTag
2982 return c
2983 }
2984
2985 // Context sets the context to be used in this call's Do method.
2986 func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall {
2987 c.ctx_ = ctx
2988 return c
2989 }
2990
2991 // Header returns a http.Header that can be modified by the caller to add
2992 // headers to the request.
2993 func (c *ProjectsLocationsOperationsGetCall) Header() http.Header {
2994 if c.header_ == nil {
2995 c.header_ = make(http.Header)
2996 }
2997 return c.header_
2998 }
2999
3000 func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
3001 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3002 if c.ifNoneMatch_ != "" {
3003 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3004 }
3005 c.urlParams_.Set("alt", alt)
3006 c.urlParams_.Set("prettyPrint", "false")
3007 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+name}")
3008 urls += "?" + c.urlParams_.Encode()
3009 req, err := http.NewRequest("GET", urls, nil)
3010 if err != nil {
3011 return nil, err
3012 }
3013 req.Header = reqHeaders
3014 googleapi.Expand(req.URL, map[string]string{
3015 "name": c.name,
3016 })
3017 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "domains.projects.locations.operations.get", "request", internallog.HTTPRequest(req, nil))
3018 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3019 }
3020
3021 // Do executes the "domains.projects.locations.operations.get" call.
3022 // Any non-2xx status code is an error. Response headers are in either
3023 // *Operation.ServerResponse.Header or (if a response was returned at all) in
3024 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
3025 // whether the returned error was because http.StatusNotModified was returned.
3026 func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
3027 gensupport.SetOptions(c.urlParams_, opts...)
3028 res, err := c.doRequest("json")
3029 if res != nil && res.StatusCode == http.StatusNotModified {
3030 if res.Body != nil {
3031 res.Body.Close()
3032 }
3033 return nil, gensupport.WrapError(&googleapi.Error{
3034 Code: res.StatusCode,
3035 Header: res.Header,
3036 })
3037 }
3038 if err != nil {
3039 return nil, err
3040 }
3041 defer googleapi.CloseBody(res)
3042 if err := googleapi.CheckResponse(res); err != nil {
3043 return nil, gensupport.WrapError(err)
3044 }
3045 ret := &Operation{
3046 ServerResponse: googleapi.ServerResponse{
3047 Header: res.Header,
3048 HTTPStatusCode: res.StatusCode,
3049 },
3050 }
3051 target := &ret
3052 b, err := gensupport.DecodeResponseBytes(target, res)
3053 if err != nil {
3054 return nil, err
3055 }
3056 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "domains.projects.locations.operations.get", "response", internallog.HTTPResponse(res, b))
3057 return ret, nil
3058 }
3059
3060 type ProjectsLocationsOperationsListCall struct {
3061 s *Service
3062 name string
3063 urlParams_ gensupport.URLParams
3064 ifNoneMatch_ string
3065 ctx_ context.Context
3066 header_ http.Header
3067 }
3068
3069 // List: Lists operations that match the specified filter in the request. If
3070 // the server doesn't support this method, it returns `UNIMPLEMENTED`.
3071 //
3072 // - name: The name of the operation's parent resource.
3073 func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall {
3074 c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3075 c.name = name
3076 return c
3077 }
3078
3079 // Filter sets the optional parameter "filter": The standard list filter.
3080 func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall {
3081 c.urlParams_.Set("filter", filter)
3082 return c
3083 }
3084
3085 // PageSize sets the optional parameter "pageSize": The standard list page
3086 // size.
3087 func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall {
3088 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
3089 return c
3090 }
3091
3092 // PageToken sets the optional parameter "pageToken": The standard list page
3093 // token.
3094 func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall {
3095 c.urlParams_.Set("pageToken", pageToken)
3096 return c
3097 }
3098
3099 // ReturnPartialSuccess sets the optional parameter "returnPartialSuccess":
3100 // When set to `true`, operations that are reachable are returned as normal,
3101 // and those that are unreachable are returned in the
3102 // ListOperationsResponse.unreachable field. This can only be `true` when
3103 // reading across collections. For example, when `parent` is set to
3104 // "projects/example/locations/-". This field is not supported by default and
3105 // will result in an `UNIMPLEMENTED` error if set unless explicitly documented
3106 // otherwise in service or product specific documentation.
3107 func (c *ProjectsLocationsOperationsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ProjectsLocationsOperationsListCall {
3108 c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess))
3109 return c
3110 }
3111
3112 // Fields allows partial responses to be retrieved. See
3113 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
3114 // details.
3115 func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall {
3116 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3117 return c
3118 }
3119
3120 // IfNoneMatch sets an optional parameter which makes the operation fail if the
3121 // object's ETag matches the given value. This is useful for getting updates
3122 // only after the object has changed since the last request.
3123 func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall {
3124 c.ifNoneMatch_ = entityTag
3125 return c
3126 }
3127
3128 // Context sets the context to be used in this call's Do method.
3129 func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall {
3130 c.ctx_ = ctx
3131 return c
3132 }
3133
3134 // Header returns a http.Header that can be modified by the caller to add
3135 // headers to the request.
3136 func (c *ProjectsLocationsOperationsListCall) Header() http.Header {
3137 if c.header_ == nil {
3138 c.header_ = make(http.Header)
3139 }
3140 return c.header_
3141 }
3142
3143 func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) {
3144 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3145 if c.ifNoneMatch_ != "" {
3146 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3147 }
3148 c.urlParams_.Set("alt", alt)
3149 c.urlParams_.Set("prettyPrint", "false")
3150 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+name}/operations")
3151 urls += "?" + c.urlParams_.Encode()
3152 req, err := http.NewRequest("GET", urls, nil)
3153 if err != nil {
3154 return nil, err
3155 }
3156 req.Header = reqHeaders
3157 googleapi.Expand(req.URL, map[string]string{
3158 "name": c.name,
3159 })
3160 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "domains.projects.locations.operations.list", "request", internallog.HTTPRequest(req, nil))
3161 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3162 }
3163
3164 // Do executes the "domains.projects.locations.operations.list" call.
3165 // Any non-2xx status code is an error. Response headers are in either
3166 // *ListOperationsResponse.ServerResponse.Header or (if a response was returned
3167 // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
3168 // check whether the returned error was because http.StatusNotModified was
3169 // returned.
3170 func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
3171 gensupport.SetOptions(c.urlParams_, opts...)
3172 res, err := c.doRequest("json")
3173 if res != nil && res.StatusCode == http.StatusNotModified {
3174 if res.Body != nil {
3175 res.Body.Close()
3176 }
3177 return nil, gensupport.WrapError(&googleapi.Error{
3178 Code: res.StatusCode,
3179 Header: res.Header,
3180 })
3181 }
3182 if err != nil {
3183 return nil, err
3184 }
3185 defer googleapi.CloseBody(res)
3186 if err := googleapi.CheckResponse(res); err != nil {
3187 return nil, gensupport.WrapError(err)
3188 }
3189 ret := &ListOperationsResponse{
3190 ServerResponse: googleapi.ServerResponse{
3191 Header: res.Header,
3192 HTTPStatusCode: res.StatusCode,
3193 },
3194 }
3195 target := &ret
3196 b, err := gensupport.DecodeResponseBytes(target, res)
3197 if err != nil {
3198 return nil, err
3199 }
3200 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "domains.projects.locations.operations.list", "response", internallog.HTTPResponse(res, b))
3201 return ret, nil
3202 }
3203
3204 // Pages invokes f for each page of results.
3205 // A non-nil error returned from f will halt the iteration.
3206 // The provided context supersedes any context provided to the Context method.
3207 func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
3208 c.ctx_ = ctx
3209 defer c.PageToken(c.urlParams_.Get("pageToken"))
3210 for {
3211 x, err := c.Do()
3212 if err != nil {
3213 return err
3214 }
3215 if err := f(x); err != nil {
3216 return err
3217 }
3218 if x.NextPageToken == "" {
3219 return nil
3220 }
3221 c.PageToken(x.NextPageToken)
3222 }
3223 }
3224
3225 type ProjectsLocationsRegistrationsConfigureContactSettingsCall struct {
3226 s *Service
3227 registration string
3228 configurecontactsettingsrequest *ConfigureContactSettingsRequest
3229 urlParams_ gensupport.URLParams
3230 ctx_ context.Context
3231 header_ http.Header
3232 }
3233
3234 // ConfigureContactSettings: Updates a `Registration`'s contact settings. Some
3235 // changes require confirmation by the domain's registrant contact . Caution:
3236 // Please consider carefully any changes to contact privacy settings when
3237 // changing from `REDACTED_CONTACT_DATA` to `PUBLIC_CONTACT_DATA.` There may be
3238 // a delay in reflecting updates you make to registrant contact information
3239 // such that any changes you make to contact privacy (including from
3240 // `REDACTED_CONTACT_DATA` to `PUBLIC_CONTACT_DATA`) will be applied without
3241 // delay but changes to registrant contact information may take a limited time
3242 // to be publicized. This means that changes to contact privacy from
3243 // `REDACTED_CONTACT_DATA` to `PUBLIC_CONTACT_DATA` may make the previous
3244 // registrant contact data public until the modified registrant contact details
3245 // are published.
3246 //
3247 // - registration: The name of the `Registration` whose contact settings are
3248 // being updated, in the format `projects/*/locations/*/registrations/*`.
3249 func (r *ProjectsLocationsRegistrationsService) ConfigureContactSettings(registration string, configurecontactsettingsrequest *ConfigureContactSettingsRequest) *ProjectsLocationsRegistrationsConfigureContactSettingsCall {
3250 c := &ProjectsLocationsRegistrationsConfigureContactSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3251 c.registration = registration
3252 c.configurecontactsettingsrequest = configurecontactsettingsrequest
3253 return c
3254 }
3255
3256 // Fields allows partial responses to be retrieved. See
3257 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
3258 // details.
3259 func (c *ProjectsLocationsRegistrationsConfigureContactSettingsCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistrationsConfigureContactSettingsCall {
3260 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3261 return c
3262 }
3263
3264 // Context sets the context to be used in this call's Do method.
3265 func (c *ProjectsLocationsRegistrationsConfigureContactSettingsCall) Context(ctx context.Context) *ProjectsLocationsRegistrationsConfigureContactSettingsCall {
3266 c.ctx_ = ctx
3267 return c
3268 }
3269
3270 // Header returns a http.Header that can be modified by the caller to add
3271 // headers to the request.
3272 func (c *ProjectsLocationsRegistrationsConfigureContactSettingsCall) Header() http.Header {
3273 if c.header_ == nil {
3274 c.header_ = make(http.Header)
3275 }
3276 return c.header_
3277 }
3278
3279 func (c *ProjectsLocationsRegistrationsConfigureContactSettingsCall) doRequest(alt string) (*http.Response, error) {
3280 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
3281 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.configurecontactsettingsrequest)
3282 if err != nil {
3283 return nil, err
3284 }
3285 c.urlParams_.Set("alt", alt)
3286 c.urlParams_.Set("prettyPrint", "false")
3287 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+registration}:configureContactSettings")
3288 urls += "?" + c.urlParams_.Encode()
3289 req, err := http.NewRequest("POST", urls, body)
3290 if err != nil {
3291 return nil, err
3292 }
3293 req.Header = reqHeaders
3294 googleapi.Expand(req.URL, map[string]string{
3295 "registration": c.registration,
3296 })
3297 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "domains.projects.locations.registrations.configureContactSettings", "request", internallog.HTTPRequest(req, body.Bytes()))
3298 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3299 }
3300
3301 // Do executes the "domains.projects.locations.registrations.configureContactSettings" call.
3302 // Any non-2xx status code is an error. Response headers are in either
3303 // *Operation.ServerResponse.Header or (if a response was returned at all) in
3304 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
3305 // whether the returned error was because http.StatusNotModified was returned.
3306 func (c *ProjectsLocationsRegistrationsConfigureContactSettingsCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
3307 gensupport.SetOptions(c.urlParams_, opts...)
3308 res, err := c.doRequest("json")
3309 if res != nil && res.StatusCode == http.StatusNotModified {
3310 if res.Body != nil {
3311 res.Body.Close()
3312 }
3313 return nil, gensupport.WrapError(&googleapi.Error{
3314 Code: res.StatusCode,
3315 Header: res.Header,
3316 })
3317 }
3318 if err != nil {
3319 return nil, err
3320 }
3321 defer googleapi.CloseBody(res)
3322 if err := googleapi.CheckResponse(res); err != nil {
3323 return nil, gensupport.WrapError(err)
3324 }
3325 ret := &Operation{
3326 ServerResponse: googleapi.ServerResponse{
3327 Header: res.Header,
3328 HTTPStatusCode: res.StatusCode,
3329 },
3330 }
3331 target := &ret
3332 b, err := gensupport.DecodeResponseBytes(target, res)
3333 if err != nil {
3334 return nil, err
3335 }
3336 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "domains.projects.locations.registrations.configureContactSettings", "response", internallog.HTTPResponse(res, b))
3337 return ret, nil
3338 }
3339
3340 type ProjectsLocationsRegistrationsConfigureDnsSettingsCall struct {
3341 s *Service
3342 registration string
3343 configurednssettingsrequest *ConfigureDnsSettingsRequest
3344 urlParams_ gensupport.URLParams
3345 ctx_ context.Context
3346 header_ http.Header
3347 }
3348
3349 // ConfigureDnsSettings: Updates a `Registration`'s DNS settings.
3350 //
3351 // - registration: The name of the `Registration` whose DNS settings are being
3352 // updated, in the format `projects/*/locations/*/registrations/*`.
3353 func (r *ProjectsLocationsRegistrationsService) ConfigureDnsSettings(registration string, configurednssettingsrequest *ConfigureDnsSettingsRequest) *ProjectsLocationsRegistrationsConfigureDnsSettingsCall {
3354 c := &ProjectsLocationsRegistrationsConfigureDnsSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3355 c.registration = registration
3356 c.configurednssettingsrequest = configurednssettingsrequest
3357 return c
3358 }
3359
3360 // Fields allows partial responses to be retrieved. See
3361 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
3362 // details.
3363 func (c *ProjectsLocationsRegistrationsConfigureDnsSettingsCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistrationsConfigureDnsSettingsCall {
3364 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3365 return c
3366 }
3367
3368 // Context sets the context to be used in this call's Do method.
3369 func (c *ProjectsLocationsRegistrationsConfigureDnsSettingsCall) Context(ctx context.Context) *ProjectsLocationsRegistrationsConfigureDnsSettingsCall {
3370 c.ctx_ = ctx
3371 return c
3372 }
3373
3374 // Header returns a http.Header that can be modified by the caller to add
3375 // headers to the request.
3376 func (c *ProjectsLocationsRegistrationsConfigureDnsSettingsCall) Header() http.Header {
3377 if c.header_ == nil {
3378 c.header_ = make(http.Header)
3379 }
3380 return c.header_
3381 }
3382
3383 func (c *ProjectsLocationsRegistrationsConfigureDnsSettingsCall) doRequest(alt string) (*http.Response, error) {
3384 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
3385 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.configurednssettingsrequest)
3386 if err != nil {
3387 return nil, err
3388 }
3389 c.urlParams_.Set("alt", alt)
3390 c.urlParams_.Set("prettyPrint", "false")
3391 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+registration}:configureDnsSettings")
3392 urls += "?" + c.urlParams_.Encode()
3393 req, err := http.NewRequest("POST", urls, body)
3394 if err != nil {
3395 return nil, err
3396 }
3397 req.Header = reqHeaders
3398 googleapi.Expand(req.URL, map[string]string{
3399 "registration": c.registration,
3400 })
3401 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "domains.projects.locations.registrations.configureDnsSettings", "request", internallog.HTTPRequest(req, body.Bytes()))
3402 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3403 }
3404
3405 // Do executes the "domains.projects.locations.registrations.configureDnsSettings" call.
3406 // Any non-2xx status code is an error. Response headers are in either
3407 // *Operation.ServerResponse.Header or (if a response was returned at all) in
3408 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
3409 // whether the returned error was because http.StatusNotModified was returned.
3410 func (c *ProjectsLocationsRegistrationsConfigureDnsSettingsCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
3411 gensupport.SetOptions(c.urlParams_, opts...)
3412 res, err := c.doRequest("json")
3413 if res != nil && res.StatusCode == http.StatusNotModified {
3414 if res.Body != nil {
3415 res.Body.Close()
3416 }
3417 return nil, gensupport.WrapError(&googleapi.Error{
3418 Code: res.StatusCode,
3419 Header: res.Header,
3420 })
3421 }
3422 if err != nil {
3423 return nil, err
3424 }
3425 defer googleapi.CloseBody(res)
3426 if err := googleapi.CheckResponse(res); err != nil {
3427 return nil, gensupport.WrapError(err)
3428 }
3429 ret := &Operation{
3430 ServerResponse: googleapi.ServerResponse{
3431 Header: res.Header,
3432 HTTPStatusCode: res.StatusCode,
3433 },
3434 }
3435 target := &ret
3436 b, err := gensupport.DecodeResponseBytes(target, res)
3437 if err != nil {
3438 return nil, err
3439 }
3440 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "domains.projects.locations.registrations.configureDnsSettings", "response", internallog.HTTPResponse(res, b))
3441 return ret, nil
3442 }
3443
3444 type ProjectsLocationsRegistrationsConfigureManagementSettingsCall struct {
3445 s *Service
3446 registration string
3447 configuremanagementsettingsrequest *ConfigureManagementSettingsRequest
3448 urlParams_ gensupport.URLParams
3449 ctx_ context.Context
3450 header_ http.Header
3451 }
3452
3453 // ConfigureManagementSettings: Updates a `Registration`'s management settings.
3454 //
3455 // - registration: The name of the `Registration` whose management settings are
3456 // being updated, in the format `projects/*/locations/*/registrations/*`.
3457 func (r *ProjectsLocationsRegistrationsService) ConfigureManagementSettings(registration string, configuremanagementsettingsrequest *ConfigureManagementSettingsRequest) *ProjectsLocationsRegistrationsConfigureManagementSettingsCall {
3458 c := &ProjectsLocationsRegistrationsConfigureManagementSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3459 c.registration = registration
3460 c.configuremanagementsettingsrequest = configuremanagementsettingsrequest
3461 return c
3462 }
3463
3464 // Fields allows partial responses to be retrieved. See
3465 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
3466 // details.
3467 func (c *ProjectsLocationsRegistrationsConfigureManagementSettingsCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistrationsConfigureManagementSettingsCall {
3468 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3469 return c
3470 }
3471
3472 // Context sets the context to be used in this call's Do method.
3473 func (c *ProjectsLocationsRegistrationsConfigureManagementSettingsCall) Context(ctx context.Context) *ProjectsLocationsRegistrationsConfigureManagementSettingsCall {
3474 c.ctx_ = ctx
3475 return c
3476 }
3477
3478 // Header returns a http.Header that can be modified by the caller to add
3479 // headers to the request.
3480 func (c *ProjectsLocationsRegistrationsConfigureManagementSettingsCall) Header() http.Header {
3481 if c.header_ == nil {
3482 c.header_ = make(http.Header)
3483 }
3484 return c.header_
3485 }
3486
3487 func (c *ProjectsLocationsRegistrationsConfigureManagementSettingsCall) doRequest(alt string) (*http.Response, error) {
3488 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
3489 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.configuremanagementsettingsrequest)
3490 if err != nil {
3491 return nil, err
3492 }
3493 c.urlParams_.Set("alt", alt)
3494 c.urlParams_.Set("prettyPrint", "false")
3495 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+registration}:configureManagementSettings")
3496 urls += "?" + c.urlParams_.Encode()
3497 req, err := http.NewRequest("POST", urls, body)
3498 if err != nil {
3499 return nil, err
3500 }
3501 req.Header = reqHeaders
3502 googleapi.Expand(req.URL, map[string]string{
3503 "registration": c.registration,
3504 })
3505 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "domains.projects.locations.registrations.configureManagementSettings", "request", internallog.HTTPRequest(req, body.Bytes()))
3506 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3507 }
3508
3509 // Do executes the "domains.projects.locations.registrations.configureManagementSettings" call.
3510 // Any non-2xx status code is an error. Response headers are in either
3511 // *Operation.ServerResponse.Header or (if a response was returned at all) in
3512 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
3513 // whether the returned error was because http.StatusNotModified was returned.
3514 func (c *ProjectsLocationsRegistrationsConfigureManagementSettingsCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
3515 gensupport.SetOptions(c.urlParams_, opts...)
3516 res, err := c.doRequest("json")
3517 if res != nil && res.StatusCode == http.StatusNotModified {
3518 if res.Body != nil {
3519 res.Body.Close()
3520 }
3521 return nil, gensupport.WrapError(&googleapi.Error{
3522 Code: res.StatusCode,
3523 Header: res.Header,
3524 })
3525 }
3526 if err != nil {
3527 return nil, err
3528 }
3529 defer googleapi.CloseBody(res)
3530 if err := googleapi.CheckResponse(res); err != nil {
3531 return nil, gensupport.WrapError(err)
3532 }
3533 ret := &Operation{
3534 ServerResponse: googleapi.ServerResponse{
3535 Header: res.Header,
3536 HTTPStatusCode: res.StatusCode,
3537 },
3538 }
3539 target := &ret
3540 b, err := gensupport.DecodeResponseBytes(target, res)
3541 if err != nil {
3542 return nil, err
3543 }
3544 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "domains.projects.locations.registrations.configureManagementSettings", "response", internallog.HTTPResponse(res, b))
3545 return ret, nil
3546 }
3547
3548 type ProjectsLocationsRegistrationsDeleteCall struct {
3549 s *Service
3550 name string
3551 urlParams_ gensupport.URLParams
3552 ctx_ context.Context
3553 header_ http.Header
3554 }
3555
3556 // Delete: Deletes a `Registration` resource. This method works on any
3557 // `Registration` resource using Subscription or Commitment billing
3558 // (/domains/pricing#billing-models), provided that the resource was created at
3559 // least 1 day in the past. When an active registration is successfully
3560 // deleted, you can continue to use the domain in Google Domains
3561 // (https://domains.google/) until it expires. The calling user becomes the
3562 // domain's sole owner in Google Domains, and permissions for the domain are
3563 // subsequently managed there. The domain does not renew automatically unless
3564 // the new owner sets up billing in Google Domains. After January 2024 you will
3565 // only be able to delete `Registration` resources when `state` is one of:
3566 // `EXPORTED`, `EXPIRED`,`REGISTRATION_FAILED` or `TRANSFER_FAILED`. See Cloud
3567 // Domains feature deprecation
3568 // (https://cloud.google.com/domains/docs/deprecations/feature-deprecations)
3569 // for more details.
3570 //
3571 // - name: The name of the `Registration` to delete, in the format
3572 // `projects/*/locations/*/registrations/*`.
3573 func (r *ProjectsLocationsRegistrationsService) Delete(name string) *ProjectsLocationsRegistrationsDeleteCall {
3574 c := &ProjectsLocationsRegistrationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3575 c.name = name
3576 return c
3577 }
3578
3579 // Fields allows partial responses to be retrieved. See
3580 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
3581 // details.
3582 func (c *ProjectsLocationsRegistrationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistrationsDeleteCall {
3583 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3584 return c
3585 }
3586
3587 // Context sets the context to be used in this call's Do method.
3588 func (c *ProjectsLocationsRegistrationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsRegistrationsDeleteCall {
3589 c.ctx_ = ctx
3590 return c
3591 }
3592
3593 // Header returns a http.Header that can be modified by the caller to add
3594 // headers to the request.
3595 func (c *ProjectsLocationsRegistrationsDeleteCall) Header() http.Header {
3596 if c.header_ == nil {
3597 c.header_ = make(http.Header)
3598 }
3599 return c.header_
3600 }
3601
3602 func (c *ProjectsLocationsRegistrationsDeleteCall) doRequest(alt string) (*http.Response, error) {
3603 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3604 c.urlParams_.Set("alt", alt)
3605 c.urlParams_.Set("prettyPrint", "false")
3606 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+name}")
3607 urls += "?" + c.urlParams_.Encode()
3608 req, err := http.NewRequest("DELETE", urls, nil)
3609 if err != nil {
3610 return nil, err
3611 }
3612 req.Header = reqHeaders
3613 googleapi.Expand(req.URL, map[string]string{
3614 "name": c.name,
3615 })
3616 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "domains.projects.locations.registrations.delete", "request", internallog.HTTPRequest(req, nil))
3617 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3618 }
3619
3620 // Do executes the "domains.projects.locations.registrations.delete" call.
3621 // Any non-2xx status code is an error. Response headers are in either
3622 // *Operation.ServerResponse.Header or (if a response was returned at all) in
3623 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
3624 // whether the returned error was because http.StatusNotModified was returned.
3625 func (c *ProjectsLocationsRegistrationsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
3626 gensupport.SetOptions(c.urlParams_, opts...)
3627 res, err := c.doRequest("json")
3628 if res != nil && res.StatusCode == http.StatusNotModified {
3629 if res.Body != nil {
3630 res.Body.Close()
3631 }
3632 return nil, gensupport.WrapError(&googleapi.Error{
3633 Code: res.StatusCode,
3634 Header: res.Header,
3635 })
3636 }
3637 if err != nil {
3638 return nil, err
3639 }
3640 defer googleapi.CloseBody(res)
3641 if err := googleapi.CheckResponse(res); err != nil {
3642 return nil, gensupport.WrapError(err)
3643 }
3644 ret := &Operation{
3645 ServerResponse: googleapi.ServerResponse{
3646 Header: res.Header,
3647 HTTPStatusCode: res.StatusCode,
3648 },
3649 }
3650 target := &ret
3651 b, err := gensupport.DecodeResponseBytes(target, res)
3652 if err != nil {
3653 return nil, err
3654 }
3655 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "domains.projects.locations.registrations.delete", "response", internallog.HTTPResponse(res, b))
3656 return ret, nil
3657 }
3658
3659 type ProjectsLocationsRegistrationsExportCall struct {
3660 s *Service
3661 name string
3662 exportregistrationrequest *ExportRegistrationRequest
3663 urlParams_ gensupport.URLParams
3664 ctx_ context.Context
3665 header_ http.Header
3666 }
3667
3668 // Export: Deprecated: For more information, see Cloud Domains feature
3669 // deprecation
3670 // (https://cloud.google.com/domains/docs/deprecations/feature-deprecations)
3671 // Exports a `Registration` resource, such that it is no longer managed by
3672 // Cloud Domains. When an active domain is successfully exported, you can
3673 // continue to use the domain in Google Domains (https://domains.google/) until
3674 // it expires. The calling user becomes the domain's sole owner in Google
3675 // Domains, and permissions for the domain are subsequently managed there. The
3676 // domain does not renew automatically unless the new owner sets up billing in
3677 // Google Domains.
3678 //
3679 // - name: The name of the `Registration` to export, in the format
3680 // `projects/*/locations/*/registrations/*`.
3681 func (r *ProjectsLocationsRegistrationsService) Export(name string, exportregistrationrequest *ExportRegistrationRequest) *ProjectsLocationsRegistrationsExportCall {
3682 c := &ProjectsLocationsRegistrationsExportCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3683 c.name = name
3684 c.exportregistrationrequest = exportregistrationrequest
3685 return c
3686 }
3687
3688 // Fields allows partial responses to be retrieved. See
3689 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
3690 // details.
3691 func (c *ProjectsLocationsRegistrationsExportCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistrationsExportCall {
3692 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3693 return c
3694 }
3695
3696 // Context sets the context to be used in this call's Do method.
3697 func (c *ProjectsLocationsRegistrationsExportCall) Context(ctx context.Context) *ProjectsLocationsRegistrationsExportCall {
3698 c.ctx_ = ctx
3699 return c
3700 }
3701
3702 // Header returns a http.Header that can be modified by the caller to add
3703 // headers to the request.
3704 func (c *ProjectsLocationsRegistrationsExportCall) Header() http.Header {
3705 if c.header_ == nil {
3706 c.header_ = make(http.Header)
3707 }
3708 return c.header_
3709 }
3710
3711 func (c *ProjectsLocationsRegistrationsExportCall) doRequest(alt string) (*http.Response, error) {
3712 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
3713 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.exportregistrationrequest)
3714 if err != nil {
3715 return nil, err
3716 }
3717 c.urlParams_.Set("alt", alt)
3718 c.urlParams_.Set("prettyPrint", "false")
3719 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+name}:export")
3720 urls += "?" + c.urlParams_.Encode()
3721 req, err := http.NewRequest("POST", urls, body)
3722 if err != nil {
3723 return nil, err
3724 }
3725 req.Header = reqHeaders
3726 googleapi.Expand(req.URL, map[string]string{
3727 "name": c.name,
3728 })
3729 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "domains.projects.locations.registrations.export", "request", internallog.HTTPRequest(req, body.Bytes()))
3730 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3731 }
3732
3733 // Do executes the "domains.projects.locations.registrations.export" call.
3734 // Any non-2xx status code is an error. Response headers are in either
3735 // *Operation.ServerResponse.Header or (if a response was returned at all) in
3736 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
3737 // whether the returned error was because http.StatusNotModified was returned.
3738 func (c *ProjectsLocationsRegistrationsExportCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
3739 gensupport.SetOptions(c.urlParams_, opts...)
3740 res, err := c.doRequest("json")
3741 if res != nil && res.StatusCode == http.StatusNotModified {
3742 if res.Body != nil {
3743 res.Body.Close()
3744 }
3745 return nil, gensupport.WrapError(&googleapi.Error{
3746 Code: res.StatusCode,
3747 Header: res.Header,
3748 })
3749 }
3750 if err != nil {
3751 return nil, err
3752 }
3753 defer googleapi.CloseBody(res)
3754 if err := googleapi.CheckResponse(res); err != nil {
3755 return nil, gensupport.WrapError(err)
3756 }
3757 ret := &Operation{
3758 ServerResponse: googleapi.ServerResponse{
3759 Header: res.Header,
3760 HTTPStatusCode: res.StatusCode,
3761 },
3762 }
3763 target := &ret
3764 b, err := gensupport.DecodeResponseBytes(target, res)
3765 if err != nil {
3766 return nil, err
3767 }
3768 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "domains.projects.locations.registrations.export", "response", internallog.HTTPResponse(res, b))
3769 return ret, nil
3770 }
3771
3772 type ProjectsLocationsRegistrationsGetCall struct {
3773 s *Service
3774 name string
3775 urlParams_ gensupport.URLParams
3776 ifNoneMatch_ string
3777 ctx_ context.Context
3778 header_ http.Header
3779 }
3780
3781 // Get: Gets the details of a `Registration` resource.
3782 //
3783 // - name: The name of the `Registration` to get, in the format
3784 // `projects/*/locations/*/registrations/*`.
3785 func (r *ProjectsLocationsRegistrationsService) Get(name string) *ProjectsLocationsRegistrationsGetCall {
3786 c := &ProjectsLocationsRegistrationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3787 c.name = name
3788 return c
3789 }
3790
3791 // Fields allows partial responses to be retrieved. See
3792 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
3793 // details.
3794 func (c *ProjectsLocationsRegistrationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistrationsGetCall {
3795 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3796 return c
3797 }
3798
3799 // IfNoneMatch sets an optional parameter which makes the operation fail if the
3800 // object's ETag matches the given value. This is useful for getting updates
3801 // only after the object has changed since the last request.
3802 func (c *ProjectsLocationsRegistrationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsRegistrationsGetCall {
3803 c.ifNoneMatch_ = entityTag
3804 return c
3805 }
3806
3807 // Context sets the context to be used in this call's Do method.
3808 func (c *ProjectsLocationsRegistrationsGetCall) Context(ctx context.Context) *ProjectsLocationsRegistrationsGetCall {
3809 c.ctx_ = ctx
3810 return c
3811 }
3812
3813 // Header returns a http.Header that can be modified by the caller to add
3814 // headers to the request.
3815 func (c *ProjectsLocationsRegistrationsGetCall) Header() http.Header {
3816 if c.header_ == nil {
3817 c.header_ = make(http.Header)
3818 }
3819 return c.header_
3820 }
3821
3822 func (c *ProjectsLocationsRegistrationsGetCall) doRequest(alt string) (*http.Response, error) {
3823 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3824 if c.ifNoneMatch_ != "" {
3825 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3826 }
3827 c.urlParams_.Set("alt", alt)
3828 c.urlParams_.Set("prettyPrint", "false")
3829 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+name}")
3830 urls += "?" + c.urlParams_.Encode()
3831 req, err := http.NewRequest("GET", urls, nil)
3832 if err != nil {
3833 return nil, err
3834 }
3835 req.Header = reqHeaders
3836 googleapi.Expand(req.URL, map[string]string{
3837 "name": c.name,
3838 })
3839 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "domains.projects.locations.registrations.get", "request", internallog.HTTPRequest(req, nil))
3840 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3841 }
3842
3843 // Do executes the "domains.projects.locations.registrations.get" call.
3844 // Any non-2xx status code is an error. Response headers are in either
3845 // *Registration.ServerResponse.Header or (if a response was returned at all)
3846 // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
3847 // whether the returned error was because http.StatusNotModified was returned.
3848 func (c *ProjectsLocationsRegistrationsGetCall) Do(opts ...googleapi.CallOption) (*Registration, error) {
3849 gensupport.SetOptions(c.urlParams_, opts...)
3850 res, err := c.doRequest("json")
3851 if res != nil && res.StatusCode == http.StatusNotModified {
3852 if res.Body != nil {
3853 res.Body.Close()
3854 }
3855 return nil, gensupport.WrapError(&googleapi.Error{
3856 Code: res.StatusCode,
3857 Header: res.Header,
3858 })
3859 }
3860 if err != nil {
3861 return nil, err
3862 }
3863 defer googleapi.CloseBody(res)
3864 if err := googleapi.CheckResponse(res); err != nil {
3865 return nil, gensupport.WrapError(err)
3866 }
3867 ret := &Registration{
3868 ServerResponse: googleapi.ServerResponse{
3869 Header: res.Header,
3870 HTTPStatusCode: res.StatusCode,
3871 },
3872 }
3873 target := &ret
3874 b, err := gensupport.DecodeResponseBytes(target, res)
3875 if err != nil {
3876 return nil, err
3877 }
3878 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "domains.projects.locations.registrations.get", "response", internallog.HTTPResponse(res, b))
3879 return ret, nil
3880 }
3881
3882 type ProjectsLocationsRegistrationsGetIamPolicyCall struct {
3883 s *Service
3884 resource string
3885 urlParams_ gensupport.URLParams
3886 ifNoneMatch_ string
3887 ctx_ context.Context
3888 header_ http.Header
3889 }
3890
3891 // GetIamPolicy: Gets the access control policy for a resource. Returns an
3892 // empty policy if the resource exists and does not have a policy set.
3893 //
3894 // - resource: REQUIRED: The resource for which the policy is being requested.
3895 // See Resource names (https://cloud.google.com/apis/design/resource_names)
3896 // for the appropriate value for this field.
3897 func (r *ProjectsLocationsRegistrationsService) GetIamPolicy(resource string) *ProjectsLocationsRegistrationsGetIamPolicyCall {
3898 c := &ProjectsLocationsRegistrationsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3899 c.resource = resource
3900 return c
3901 }
3902
3903 // OptionsRequestedPolicyVersion sets the optional parameter
3904 // "options.requestedPolicyVersion": The maximum policy version that will be
3905 // used to format the policy. Valid values are 0, 1, and 3. Requests specifying
3906 // an invalid value will be rejected. Requests for policies with any
3907 // conditional role bindings must specify version 3. Policies with no
3908 // conditional role bindings may specify any valid value or leave the field
3909 // unset. The policy in the response might use the policy version that you
3910 // specified, or it might use a lower policy version. For example, if you
3911 // specify version 3, but the policy has no conditional role bindings, the
3912 // response uses version 1. To learn which resources support conditions in
3913 // their IAM policies, see the IAM documentation
3914 // (https://cloud.google.com/iam/help/conditions/resource-policies).
3915 func (c *ProjectsLocationsRegistrationsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsRegistrationsGetIamPolicyCall {
3916 c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
3917 return c
3918 }
3919
3920 // Fields allows partial responses to be retrieved. See
3921 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
3922 // details.
3923 func (c *ProjectsLocationsRegistrationsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistrationsGetIamPolicyCall {
3924 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3925 return c
3926 }
3927
3928 // IfNoneMatch sets an optional parameter which makes the operation fail if the
3929 // object's ETag matches the given value. This is useful for getting updates
3930 // only after the object has changed since the last request.
3931 func (c *ProjectsLocationsRegistrationsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsRegistrationsGetIamPolicyCall {
3932 c.ifNoneMatch_ = entityTag
3933 return c
3934 }
3935
3936 // Context sets the context to be used in this call's Do method.
3937 func (c *ProjectsLocationsRegistrationsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsRegistrationsGetIamPolicyCall {
3938 c.ctx_ = ctx
3939 return c
3940 }
3941
3942 // Header returns a http.Header that can be modified by the caller to add
3943 // headers to the request.
3944 func (c *ProjectsLocationsRegistrationsGetIamPolicyCall) Header() http.Header {
3945 if c.header_ == nil {
3946 c.header_ = make(http.Header)
3947 }
3948 return c.header_
3949 }
3950
3951 func (c *ProjectsLocationsRegistrationsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
3952 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3953 if c.ifNoneMatch_ != "" {
3954 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3955 }
3956 c.urlParams_.Set("alt", alt)
3957 c.urlParams_.Set("prettyPrint", "false")
3958 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+resource}:getIamPolicy")
3959 urls += "?" + c.urlParams_.Encode()
3960 req, err := http.NewRequest("GET", urls, nil)
3961 if err != nil {
3962 return nil, err
3963 }
3964 req.Header = reqHeaders
3965 googleapi.Expand(req.URL, map[string]string{
3966 "resource": c.resource,
3967 })
3968 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "domains.projects.locations.registrations.getIamPolicy", "request", internallog.HTTPRequest(req, nil))
3969 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3970 }
3971
3972 // Do executes the "domains.projects.locations.registrations.getIamPolicy" call.
3973 // Any non-2xx status code is an error. Response headers are in either
3974 // *Policy.ServerResponse.Header or (if a response was returned at all) in
3975 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
3976 // whether the returned error was because http.StatusNotModified was returned.
3977 func (c *ProjectsLocationsRegistrationsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
3978 gensupport.SetOptions(c.urlParams_, opts...)
3979 res, err := c.doRequest("json")
3980 if res != nil && res.StatusCode == http.StatusNotModified {
3981 if res.Body != nil {
3982 res.Body.Close()
3983 }
3984 return nil, gensupport.WrapError(&googleapi.Error{
3985 Code: res.StatusCode,
3986 Header: res.Header,
3987 })
3988 }
3989 if err != nil {
3990 return nil, err
3991 }
3992 defer googleapi.CloseBody(res)
3993 if err := googleapi.CheckResponse(res); err != nil {
3994 return nil, gensupport.WrapError(err)
3995 }
3996 ret := &Policy{
3997 ServerResponse: googleapi.ServerResponse{
3998 Header: res.Header,
3999 HTTPStatusCode: res.StatusCode,
4000 },
4001 }
4002 target := &ret
4003 b, err := gensupport.DecodeResponseBytes(target, res)
4004 if err != nil {
4005 return nil, err
4006 }
4007 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "domains.projects.locations.registrations.getIamPolicy", "response", internallog.HTTPResponse(res, b))
4008 return ret, nil
4009 }
4010
4011 type ProjectsLocationsRegistrationsImportCall struct {
4012 s *Service
4013 parent string
4014 importdomainrequest *ImportDomainRequest
4015 urlParams_ gensupport.URLParams
4016 ctx_ context.Context
4017 header_ http.Header
4018 }
4019
4020 // Import: Deprecated: For more information, see Cloud Domains feature
4021 // deprecation
4022 // (https://cloud.google.com/domains/docs/deprecations/feature-deprecations)
4023 // Imports a domain name from Google Domains (https://domains.google/) for use
4024 // in Cloud Domains. To transfer a domain from another registrar, use the
4025 // `TransferDomain` method instead. Since individual users can own domains in
4026 // Google Domains, the calling user must have ownership permission on the
4027 // domain.
4028 //
4029 // - parent: The parent resource of the Registration. Must be in the format
4030 // `projects/*/locations/*`.
4031 func (r *ProjectsLocationsRegistrationsService) Import(parent string, importdomainrequest *ImportDomainRequest) *ProjectsLocationsRegistrationsImportCall {
4032 c := &ProjectsLocationsRegistrationsImportCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4033 c.parent = parent
4034 c.importdomainrequest = importdomainrequest
4035 return c
4036 }
4037
4038 // Fields allows partial responses to be retrieved. See
4039 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
4040 // details.
4041 func (c *ProjectsLocationsRegistrationsImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistrationsImportCall {
4042 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4043 return c
4044 }
4045
4046 // Context sets the context to be used in this call's Do method.
4047 func (c *ProjectsLocationsRegistrationsImportCall) Context(ctx context.Context) *ProjectsLocationsRegistrationsImportCall {
4048 c.ctx_ = ctx
4049 return c
4050 }
4051
4052 // Header returns a http.Header that can be modified by the caller to add
4053 // headers to the request.
4054 func (c *ProjectsLocationsRegistrationsImportCall) Header() http.Header {
4055 if c.header_ == nil {
4056 c.header_ = make(http.Header)
4057 }
4058 return c.header_
4059 }
4060
4061 func (c *ProjectsLocationsRegistrationsImportCall) doRequest(alt string) (*http.Response, error) {
4062 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4063 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.importdomainrequest)
4064 if err != nil {
4065 return nil, err
4066 }
4067 c.urlParams_.Set("alt", alt)
4068 c.urlParams_.Set("prettyPrint", "false")
4069 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+parent}/registrations:import")
4070 urls += "?" + c.urlParams_.Encode()
4071 req, err := http.NewRequest("POST", urls, body)
4072 if err != nil {
4073 return nil, err
4074 }
4075 req.Header = reqHeaders
4076 googleapi.Expand(req.URL, map[string]string{
4077 "parent": c.parent,
4078 })
4079 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "domains.projects.locations.registrations.import", "request", internallog.HTTPRequest(req, body.Bytes()))
4080 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4081 }
4082
4083 // Do executes the "domains.projects.locations.registrations.import" call.
4084 // Any non-2xx status code is an error. Response headers are in either
4085 // *Operation.ServerResponse.Header or (if a response was returned at all) in
4086 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
4087 // whether the returned error was because http.StatusNotModified was returned.
4088 func (c *ProjectsLocationsRegistrationsImportCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4089 gensupport.SetOptions(c.urlParams_, opts...)
4090 res, err := c.doRequest("json")
4091 if res != nil && res.StatusCode == http.StatusNotModified {
4092 if res.Body != nil {
4093 res.Body.Close()
4094 }
4095 return nil, gensupport.WrapError(&googleapi.Error{
4096 Code: res.StatusCode,
4097 Header: res.Header,
4098 })
4099 }
4100 if err != nil {
4101 return nil, err
4102 }
4103 defer googleapi.CloseBody(res)
4104 if err := googleapi.CheckResponse(res); err != nil {
4105 return nil, gensupport.WrapError(err)
4106 }
4107 ret := &Operation{
4108 ServerResponse: googleapi.ServerResponse{
4109 Header: res.Header,
4110 HTTPStatusCode: res.StatusCode,
4111 },
4112 }
4113 target := &ret
4114 b, err := gensupport.DecodeResponseBytes(target, res)
4115 if err != nil {
4116 return nil, err
4117 }
4118 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "domains.projects.locations.registrations.import", "response", internallog.HTTPResponse(res, b))
4119 return ret, nil
4120 }
4121
4122 type ProjectsLocationsRegistrationsInitiatePushTransferCall struct {
4123 s *Service
4124 registration string
4125 initiatepushtransferrequest *InitiatePushTransferRequest
4126 urlParams_ gensupport.URLParams
4127 ctx_ context.Context
4128 header_ http.Header
4129 }
4130
4131 // InitiatePushTransfer: Initiates the `Push Transfer` process to transfer the
4132 // domain to another registrar. The process might complete instantly or might
4133 // require confirmation or additional work. Check the emails sent to the email
4134 // address of the registrant. The process is aborted after a timeout if it's
4135 // not completed. This method is only supported for domains that have the
4136 // `REQUIRE_PUSH_TRANSFER` property in the list of `domain_properties`. The
4137 // domain must also be unlocked before it can be transferred to a different
4138 // registrar. For more information, see Transfer a registered domain to another
4139 // registrar
4140 // (https://cloud.google.com/domains/docs/transfer-domain-to-another-registrar).
4141 //
4142 // - registration: The name of the `Registration` for which the push transfer
4143 // is initiated, in the format `projects/*/locations/*/registrations/*`.
4144 func (r *ProjectsLocationsRegistrationsService) InitiatePushTransfer(registration string, initiatepushtransferrequest *InitiatePushTransferRequest) *ProjectsLocationsRegistrationsInitiatePushTransferCall {
4145 c := &ProjectsLocationsRegistrationsInitiatePushTransferCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4146 c.registration = registration
4147 c.initiatepushtransferrequest = initiatepushtransferrequest
4148 return c
4149 }
4150
4151 // Fields allows partial responses to be retrieved. See
4152 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
4153 // details.
4154 func (c *ProjectsLocationsRegistrationsInitiatePushTransferCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistrationsInitiatePushTransferCall {
4155 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4156 return c
4157 }
4158
4159 // Context sets the context to be used in this call's Do method.
4160 func (c *ProjectsLocationsRegistrationsInitiatePushTransferCall) Context(ctx context.Context) *ProjectsLocationsRegistrationsInitiatePushTransferCall {
4161 c.ctx_ = ctx
4162 return c
4163 }
4164
4165 // Header returns a http.Header that can be modified by the caller to add
4166 // headers to the request.
4167 func (c *ProjectsLocationsRegistrationsInitiatePushTransferCall) Header() http.Header {
4168 if c.header_ == nil {
4169 c.header_ = make(http.Header)
4170 }
4171 return c.header_
4172 }
4173
4174 func (c *ProjectsLocationsRegistrationsInitiatePushTransferCall) doRequest(alt string) (*http.Response, error) {
4175 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4176 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.initiatepushtransferrequest)
4177 if err != nil {
4178 return nil, err
4179 }
4180 c.urlParams_.Set("alt", alt)
4181 c.urlParams_.Set("prettyPrint", "false")
4182 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+registration}:initiatePushTransfer")
4183 urls += "?" + c.urlParams_.Encode()
4184 req, err := http.NewRequest("POST", urls, body)
4185 if err != nil {
4186 return nil, err
4187 }
4188 req.Header = reqHeaders
4189 googleapi.Expand(req.URL, map[string]string{
4190 "registration": c.registration,
4191 })
4192 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "domains.projects.locations.registrations.initiatePushTransfer", "request", internallog.HTTPRequest(req, body.Bytes()))
4193 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4194 }
4195
4196 // Do executes the "domains.projects.locations.registrations.initiatePushTransfer" call.
4197 // Any non-2xx status code is an error. Response headers are in either
4198 // *Operation.ServerResponse.Header or (if a response was returned at all) in
4199 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
4200 // whether the returned error was because http.StatusNotModified was returned.
4201 func (c *ProjectsLocationsRegistrationsInitiatePushTransferCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4202 gensupport.SetOptions(c.urlParams_, opts...)
4203 res, err := c.doRequest("json")
4204 if res != nil && res.StatusCode == http.StatusNotModified {
4205 if res.Body != nil {
4206 res.Body.Close()
4207 }
4208 return nil, gensupport.WrapError(&googleapi.Error{
4209 Code: res.StatusCode,
4210 Header: res.Header,
4211 })
4212 }
4213 if err != nil {
4214 return nil, err
4215 }
4216 defer googleapi.CloseBody(res)
4217 if err := googleapi.CheckResponse(res); err != nil {
4218 return nil, gensupport.WrapError(err)
4219 }
4220 ret := &Operation{
4221 ServerResponse: googleapi.ServerResponse{
4222 Header: res.Header,
4223 HTTPStatusCode: res.StatusCode,
4224 },
4225 }
4226 target := &ret
4227 b, err := gensupport.DecodeResponseBytes(target, res)
4228 if err != nil {
4229 return nil, err
4230 }
4231 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "domains.projects.locations.registrations.initiatePushTransfer", "response", internallog.HTTPResponse(res, b))
4232 return ret, nil
4233 }
4234
4235 type ProjectsLocationsRegistrationsListCall struct {
4236 s *Service
4237 parent string
4238 urlParams_ gensupport.URLParams
4239 ifNoneMatch_ string
4240 ctx_ context.Context
4241 header_ http.Header
4242 }
4243
4244 // List: Lists the `Registration` resources in a project.
4245 //
4246 // - parent: The project and location from which to list `Registration`s,
4247 // specified in the format `projects/*/locations/*`.
4248 func (r *ProjectsLocationsRegistrationsService) List(parent string) *ProjectsLocationsRegistrationsListCall {
4249 c := &ProjectsLocationsRegistrationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4250 c.parent = parent
4251 return c
4252 }
4253
4254 // Filter sets the optional parameter "filter": Filter expression to restrict
4255 // the `Registration`s returned. The expression must specify the field name, a
4256 // comparison operator, and the value that you want to use for filtering. The
4257 // value must be a string, a number, a boolean, or an enum value. The
4258 // comparison operator should be one of =, !=, >, <, >=, <=, or : for prefix or
4259 // wildcard matches. For example, to filter to a specific domain name, use an
4260 // expression like `domainName="example.com". You can also check for the
4261 // existence of a field; for example, to find domains using custom DNS
4262 // settings, use an expression like `dnsSettings.customDns:*`. You can also
4263 // create compound filters by combining expressions with the `AND` and `OR`
4264 // operators. For example, to find domains that are suspended or have specific
4265 // issues flagged, use an expression like `(state=SUSPENDED) OR (issue:*)`.
4266 func (c *ProjectsLocationsRegistrationsListCall) Filter(filter string) *ProjectsLocationsRegistrationsListCall {
4267 c.urlParams_.Set("filter", filter)
4268 return c
4269 }
4270
4271 // PageSize sets the optional parameter "pageSize": Maximum number of results
4272 // to return.
4273 func (c *ProjectsLocationsRegistrationsListCall) PageSize(pageSize int64) *ProjectsLocationsRegistrationsListCall {
4274 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
4275 return c
4276 }
4277
4278 // PageToken sets the optional parameter "pageToken": When set to the
4279 // `next_page_token` from a prior response, provides the next page of results.
4280 func (c *ProjectsLocationsRegistrationsListCall) PageToken(pageToken string) *ProjectsLocationsRegistrationsListCall {
4281 c.urlParams_.Set("pageToken", pageToken)
4282 return c
4283 }
4284
4285 // Fields allows partial responses to be retrieved. See
4286 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
4287 // details.
4288 func (c *ProjectsLocationsRegistrationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistrationsListCall {
4289 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4290 return c
4291 }
4292
4293 // IfNoneMatch sets an optional parameter which makes the operation fail if the
4294 // object's ETag matches the given value. This is useful for getting updates
4295 // only after the object has changed since the last request.
4296 func (c *ProjectsLocationsRegistrationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsRegistrationsListCall {
4297 c.ifNoneMatch_ = entityTag
4298 return c
4299 }
4300
4301 // Context sets the context to be used in this call's Do method.
4302 func (c *ProjectsLocationsRegistrationsListCall) Context(ctx context.Context) *ProjectsLocationsRegistrationsListCall {
4303 c.ctx_ = ctx
4304 return c
4305 }
4306
4307 // Header returns a http.Header that can be modified by the caller to add
4308 // headers to the request.
4309 func (c *ProjectsLocationsRegistrationsListCall) Header() http.Header {
4310 if c.header_ == nil {
4311 c.header_ = make(http.Header)
4312 }
4313 return c.header_
4314 }
4315
4316 func (c *ProjectsLocationsRegistrationsListCall) doRequest(alt string) (*http.Response, error) {
4317 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4318 if c.ifNoneMatch_ != "" {
4319 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4320 }
4321 c.urlParams_.Set("alt", alt)
4322 c.urlParams_.Set("prettyPrint", "false")
4323 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+parent}/registrations")
4324 urls += "?" + c.urlParams_.Encode()
4325 req, err := http.NewRequest("GET", urls, nil)
4326 if err != nil {
4327 return nil, err
4328 }
4329 req.Header = reqHeaders
4330 googleapi.Expand(req.URL, map[string]string{
4331 "parent": c.parent,
4332 })
4333 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "domains.projects.locations.registrations.list", "request", internallog.HTTPRequest(req, nil))
4334 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4335 }
4336
4337 // Do executes the "domains.projects.locations.registrations.list" call.
4338 // Any non-2xx status code is an error. Response headers are in either
4339 // *ListRegistrationsResponse.ServerResponse.Header or (if a response was
4340 // returned at all) in error.(*googleapi.Error).Header. Use
4341 // googleapi.IsNotModified to check whether the returned error was because
4342 // http.StatusNotModified was returned.
4343 func (c *ProjectsLocationsRegistrationsListCall) Do(opts ...googleapi.CallOption) (*ListRegistrationsResponse, error) {
4344 gensupport.SetOptions(c.urlParams_, opts...)
4345 res, err := c.doRequest("json")
4346 if res != nil && res.StatusCode == http.StatusNotModified {
4347 if res.Body != nil {
4348 res.Body.Close()
4349 }
4350 return nil, gensupport.WrapError(&googleapi.Error{
4351 Code: res.StatusCode,
4352 Header: res.Header,
4353 })
4354 }
4355 if err != nil {
4356 return nil, err
4357 }
4358 defer googleapi.CloseBody(res)
4359 if err := googleapi.CheckResponse(res); err != nil {
4360 return nil, gensupport.WrapError(err)
4361 }
4362 ret := &ListRegistrationsResponse{
4363 ServerResponse: googleapi.ServerResponse{
4364 Header: res.Header,
4365 HTTPStatusCode: res.StatusCode,
4366 },
4367 }
4368 target := &ret
4369 b, err := gensupport.DecodeResponseBytes(target, res)
4370 if err != nil {
4371 return nil, err
4372 }
4373 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "domains.projects.locations.registrations.list", "response", internallog.HTTPResponse(res, b))
4374 return ret, nil
4375 }
4376
4377 // Pages invokes f for each page of results.
4378 // A non-nil error returned from f will halt the iteration.
4379 // The provided context supersedes any context provided to the Context method.
4380 func (c *ProjectsLocationsRegistrationsListCall) Pages(ctx context.Context, f func(*ListRegistrationsResponse) error) error {
4381 c.ctx_ = ctx
4382 defer c.PageToken(c.urlParams_.Get("pageToken"))
4383 for {
4384 x, err := c.Do()
4385 if err != nil {
4386 return err
4387 }
4388 if err := f(x); err != nil {
4389 return err
4390 }
4391 if x.NextPageToken == "" {
4392 return nil
4393 }
4394 c.PageToken(x.NextPageToken)
4395 }
4396 }
4397
4398 type ProjectsLocationsRegistrationsPatchCall struct {
4399 s *Service
4400 name string
4401 registration *Registration
4402 urlParams_ gensupport.URLParams
4403 ctx_ context.Context
4404 header_ http.Header
4405 }
4406
4407 // Patch: Updates select fields of a `Registration` resource, notably `labels`.
4408 // To update other fields, use the appropriate custom update method: * To
4409 // update management settings, see `ConfigureManagementSettings` * To update
4410 // DNS configuration, see `ConfigureDnsSettings` * To update contact
4411 // information, see `ConfigureContactSettings`
4412 //
4413 // - name: Output only. Name of the `Registration` resource, in the format
4414 // `projects/*/locations/*/registrations/`.
4415 func (r *ProjectsLocationsRegistrationsService) Patch(name string, registration *Registration) *ProjectsLocationsRegistrationsPatchCall {
4416 c := &ProjectsLocationsRegistrationsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4417 c.name = name
4418 c.registration = registration
4419 return c
4420 }
4421
4422 // UpdateMask sets the optional parameter "updateMask": Required. The field
4423 // mask describing which fields to update as a comma-separated list. For
4424 // example, if only the labels are being updated, the `update_mask` is
4425 // "labels".
4426 func (c *ProjectsLocationsRegistrationsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsRegistrationsPatchCall {
4427 c.urlParams_.Set("updateMask", updateMask)
4428 return c
4429 }
4430
4431 // Fields allows partial responses to be retrieved. See
4432 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
4433 // details.
4434 func (c *ProjectsLocationsRegistrationsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistrationsPatchCall {
4435 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4436 return c
4437 }
4438
4439 // Context sets the context to be used in this call's Do method.
4440 func (c *ProjectsLocationsRegistrationsPatchCall) Context(ctx context.Context) *ProjectsLocationsRegistrationsPatchCall {
4441 c.ctx_ = ctx
4442 return c
4443 }
4444
4445 // Header returns a http.Header that can be modified by the caller to add
4446 // headers to the request.
4447 func (c *ProjectsLocationsRegistrationsPatchCall) Header() http.Header {
4448 if c.header_ == nil {
4449 c.header_ = make(http.Header)
4450 }
4451 return c.header_
4452 }
4453
4454 func (c *ProjectsLocationsRegistrationsPatchCall) doRequest(alt string) (*http.Response, error) {
4455 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4456 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.registration)
4457 if err != nil {
4458 return nil, err
4459 }
4460 c.urlParams_.Set("alt", alt)
4461 c.urlParams_.Set("prettyPrint", "false")
4462 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+name}")
4463 urls += "?" + c.urlParams_.Encode()
4464 req, err := http.NewRequest("PATCH", urls, body)
4465 if err != nil {
4466 return nil, err
4467 }
4468 req.Header = reqHeaders
4469 googleapi.Expand(req.URL, map[string]string{
4470 "name": c.name,
4471 })
4472 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "domains.projects.locations.registrations.patch", "request", internallog.HTTPRequest(req, body.Bytes()))
4473 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4474 }
4475
4476 // Do executes the "domains.projects.locations.registrations.patch" call.
4477 // Any non-2xx status code is an error. Response headers are in either
4478 // *Operation.ServerResponse.Header or (if a response was returned at all) in
4479 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
4480 // whether the returned error was because http.StatusNotModified was returned.
4481 func (c *ProjectsLocationsRegistrationsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4482 gensupport.SetOptions(c.urlParams_, opts...)
4483 res, err := c.doRequest("json")
4484 if res != nil && res.StatusCode == http.StatusNotModified {
4485 if res.Body != nil {
4486 res.Body.Close()
4487 }
4488 return nil, gensupport.WrapError(&googleapi.Error{
4489 Code: res.StatusCode,
4490 Header: res.Header,
4491 })
4492 }
4493 if err != nil {
4494 return nil, err
4495 }
4496 defer googleapi.CloseBody(res)
4497 if err := googleapi.CheckResponse(res); err != nil {
4498 return nil, gensupport.WrapError(err)
4499 }
4500 ret := &Operation{
4501 ServerResponse: googleapi.ServerResponse{
4502 Header: res.Header,
4503 HTTPStatusCode: res.StatusCode,
4504 },
4505 }
4506 target := &ret
4507 b, err := gensupport.DecodeResponseBytes(target, res)
4508 if err != nil {
4509 return nil, err
4510 }
4511 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "domains.projects.locations.registrations.patch", "response", internallog.HTTPResponse(res, b))
4512 return ret, nil
4513 }
4514
4515 type ProjectsLocationsRegistrationsRegisterCall struct {
4516 s *Service
4517 parent string
4518 registerdomainrequest *RegisterDomainRequest
4519 urlParams_ gensupport.URLParams
4520 ctx_ context.Context
4521 header_ http.Header
4522 }
4523
4524 // Register: Registers a new domain name and creates a corresponding
4525 // `Registration` resource. Call `RetrieveRegisterParameters` first to check
4526 // availability of the domain name and determine parameters like price that are
4527 // needed to build a call to this method. A successful call creates a
4528 // `Registration` resource in state `REGISTRATION_PENDING`, which resolves to
4529 // `ACTIVE` within 1-2 minutes, indicating that the domain was successfully
4530 // registered. If the resource ends up in state `REGISTRATION_FAILED`, it
4531 // indicates that the domain was not registered successfully, and you can
4532 // safely delete the resource and retry registration.
4533 //
4534 // - parent: The parent resource of the `Registration`. Must be in the format
4535 // `projects/*/locations/*`.
4536 func (r *ProjectsLocationsRegistrationsService) Register(parent string, registerdomainrequest *RegisterDomainRequest) *ProjectsLocationsRegistrationsRegisterCall {
4537 c := &ProjectsLocationsRegistrationsRegisterCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4538 c.parent = parent
4539 c.registerdomainrequest = registerdomainrequest
4540 return c
4541 }
4542
4543 // Fields allows partial responses to be retrieved. See
4544 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
4545 // details.
4546 func (c *ProjectsLocationsRegistrationsRegisterCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistrationsRegisterCall {
4547 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4548 return c
4549 }
4550
4551 // Context sets the context to be used in this call's Do method.
4552 func (c *ProjectsLocationsRegistrationsRegisterCall) Context(ctx context.Context) *ProjectsLocationsRegistrationsRegisterCall {
4553 c.ctx_ = ctx
4554 return c
4555 }
4556
4557 // Header returns a http.Header that can be modified by the caller to add
4558 // headers to the request.
4559 func (c *ProjectsLocationsRegistrationsRegisterCall) Header() http.Header {
4560 if c.header_ == nil {
4561 c.header_ = make(http.Header)
4562 }
4563 return c.header_
4564 }
4565
4566 func (c *ProjectsLocationsRegistrationsRegisterCall) doRequest(alt string) (*http.Response, error) {
4567 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4568 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.registerdomainrequest)
4569 if err != nil {
4570 return nil, err
4571 }
4572 c.urlParams_.Set("alt", alt)
4573 c.urlParams_.Set("prettyPrint", "false")
4574 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+parent}/registrations:register")
4575 urls += "?" + c.urlParams_.Encode()
4576 req, err := http.NewRequest("POST", urls, body)
4577 if err != nil {
4578 return nil, err
4579 }
4580 req.Header = reqHeaders
4581 googleapi.Expand(req.URL, map[string]string{
4582 "parent": c.parent,
4583 })
4584 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "domains.projects.locations.registrations.register", "request", internallog.HTTPRequest(req, body.Bytes()))
4585 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4586 }
4587
4588 // Do executes the "domains.projects.locations.registrations.register" call.
4589 // Any non-2xx status code is an error. Response headers are in either
4590 // *Operation.ServerResponse.Header or (if a response was returned at all) in
4591 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
4592 // whether the returned error was because http.StatusNotModified was returned.
4593 func (c *ProjectsLocationsRegistrationsRegisterCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4594 gensupport.SetOptions(c.urlParams_, opts...)
4595 res, err := c.doRequest("json")
4596 if res != nil && res.StatusCode == http.StatusNotModified {
4597 if res.Body != nil {
4598 res.Body.Close()
4599 }
4600 return nil, gensupport.WrapError(&googleapi.Error{
4601 Code: res.StatusCode,
4602 Header: res.Header,
4603 })
4604 }
4605 if err != nil {
4606 return nil, err
4607 }
4608 defer googleapi.CloseBody(res)
4609 if err := googleapi.CheckResponse(res); err != nil {
4610 return nil, gensupport.WrapError(err)
4611 }
4612 ret := &Operation{
4613 ServerResponse: googleapi.ServerResponse{
4614 Header: res.Header,
4615 HTTPStatusCode: res.StatusCode,
4616 },
4617 }
4618 target := &ret
4619 b, err := gensupport.DecodeResponseBytes(target, res)
4620 if err != nil {
4621 return nil, err
4622 }
4623 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "domains.projects.locations.registrations.register", "response", internallog.HTTPResponse(res, b))
4624 return ret, nil
4625 }
4626
4627 type ProjectsLocationsRegistrationsRenewDomainCall struct {
4628 s *Service
4629 registration string
4630 renewdomainrequest *RenewDomainRequest
4631 urlParams_ gensupport.URLParams
4632 ctx_ context.Context
4633 header_ http.Header
4634 }
4635
4636 // RenewDomain: Renews a recently expired domain. This method can only be
4637 // called on domains that expired in the previous 30 days. After the renewal,
4638 // the new expiration time of the domain is one year after the old expiration
4639 // time and you are charged a `yearly_price` for the renewal.
4640 //
4641 // - registration: The name of the `Registration` whish is being renewed, in
4642 // the format `projects/*/locations/*/registrations/*`.
4643 func (r *ProjectsLocationsRegistrationsService) RenewDomain(registration string, renewdomainrequest *RenewDomainRequest) *ProjectsLocationsRegistrationsRenewDomainCall {
4644 c := &ProjectsLocationsRegistrationsRenewDomainCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4645 c.registration = registration
4646 c.renewdomainrequest = renewdomainrequest
4647 return c
4648 }
4649
4650 // Fields allows partial responses to be retrieved. See
4651 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
4652 // details.
4653 func (c *ProjectsLocationsRegistrationsRenewDomainCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistrationsRenewDomainCall {
4654 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4655 return c
4656 }
4657
4658 // Context sets the context to be used in this call's Do method.
4659 func (c *ProjectsLocationsRegistrationsRenewDomainCall) Context(ctx context.Context) *ProjectsLocationsRegistrationsRenewDomainCall {
4660 c.ctx_ = ctx
4661 return c
4662 }
4663
4664 // Header returns a http.Header that can be modified by the caller to add
4665 // headers to the request.
4666 func (c *ProjectsLocationsRegistrationsRenewDomainCall) Header() http.Header {
4667 if c.header_ == nil {
4668 c.header_ = make(http.Header)
4669 }
4670 return c.header_
4671 }
4672
4673 func (c *ProjectsLocationsRegistrationsRenewDomainCall) doRequest(alt string) (*http.Response, error) {
4674 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4675 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.renewdomainrequest)
4676 if err != nil {
4677 return nil, err
4678 }
4679 c.urlParams_.Set("alt", alt)
4680 c.urlParams_.Set("prettyPrint", "false")
4681 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+registration}:renewDomain")
4682 urls += "?" + c.urlParams_.Encode()
4683 req, err := http.NewRequest("POST", urls, body)
4684 if err != nil {
4685 return nil, err
4686 }
4687 req.Header = reqHeaders
4688 googleapi.Expand(req.URL, map[string]string{
4689 "registration": c.registration,
4690 })
4691 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "domains.projects.locations.registrations.renewDomain", "request", internallog.HTTPRequest(req, body.Bytes()))
4692 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4693 }
4694
4695 // Do executes the "domains.projects.locations.registrations.renewDomain" call.
4696 // Any non-2xx status code is an error. Response headers are in either
4697 // *Operation.ServerResponse.Header or (if a response was returned at all) in
4698 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
4699 // whether the returned error was because http.StatusNotModified was returned.
4700 func (c *ProjectsLocationsRegistrationsRenewDomainCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4701 gensupport.SetOptions(c.urlParams_, opts...)
4702 res, err := c.doRequest("json")
4703 if res != nil && res.StatusCode == http.StatusNotModified {
4704 if res.Body != nil {
4705 res.Body.Close()
4706 }
4707 return nil, gensupport.WrapError(&googleapi.Error{
4708 Code: res.StatusCode,
4709 Header: res.Header,
4710 })
4711 }
4712 if err != nil {
4713 return nil, err
4714 }
4715 defer googleapi.CloseBody(res)
4716 if err := googleapi.CheckResponse(res); err != nil {
4717 return nil, gensupport.WrapError(err)
4718 }
4719 ret := &Operation{
4720 ServerResponse: googleapi.ServerResponse{
4721 Header: res.Header,
4722 HTTPStatusCode: res.StatusCode,
4723 },
4724 }
4725 target := &ret
4726 b, err := gensupport.DecodeResponseBytes(target, res)
4727 if err != nil {
4728 return nil, err
4729 }
4730 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "domains.projects.locations.registrations.renewDomain", "response", internallog.HTTPResponse(res, b))
4731 return ret, nil
4732 }
4733
4734 type ProjectsLocationsRegistrationsResetAuthorizationCodeCall struct {
4735 s *Service
4736 registration string
4737 resetauthorizationcoderequest *ResetAuthorizationCodeRequest
4738 urlParams_ gensupport.URLParams
4739 ctx_ context.Context
4740 header_ http.Header
4741 }
4742
4743 // ResetAuthorizationCode: Resets the authorization code of the `Registration`
4744 // to a new random string. You can call this method only after 60 days have
4745 // elapsed since the initial domain registration. Domains that have the
4746 // `REQUIRE_PUSH_TRANSFER` property in the list of `domain_properties` don't
4747 // support authorization codes and must use the `InitiatePushTransfer` method
4748 // to initiate the process to transfer the domain to a different registrar.
4749 //
4750 // - registration: The name of the `Registration` whose authorization code is
4751 // being reset, in the format `projects/*/locations/*/registrations/*`.
4752 func (r *ProjectsLocationsRegistrationsService) ResetAuthorizationCode(registration string, resetauthorizationcoderequest *ResetAuthorizationCodeRequest) *ProjectsLocationsRegistrationsResetAuthorizationCodeCall {
4753 c := &ProjectsLocationsRegistrationsResetAuthorizationCodeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4754 c.registration = registration
4755 c.resetauthorizationcoderequest = resetauthorizationcoderequest
4756 return c
4757 }
4758
4759 // Fields allows partial responses to be retrieved. See
4760 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
4761 // details.
4762 func (c *ProjectsLocationsRegistrationsResetAuthorizationCodeCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistrationsResetAuthorizationCodeCall {
4763 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4764 return c
4765 }
4766
4767 // Context sets the context to be used in this call's Do method.
4768 func (c *ProjectsLocationsRegistrationsResetAuthorizationCodeCall) Context(ctx context.Context) *ProjectsLocationsRegistrationsResetAuthorizationCodeCall {
4769 c.ctx_ = ctx
4770 return c
4771 }
4772
4773 // Header returns a http.Header that can be modified by the caller to add
4774 // headers to the request.
4775 func (c *ProjectsLocationsRegistrationsResetAuthorizationCodeCall) Header() http.Header {
4776 if c.header_ == nil {
4777 c.header_ = make(http.Header)
4778 }
4779 return c.header_
4780 }
4781
4782 func (c *ProjectsLocationsRegistrationsResetAuthorizationCodeCall) doRequest(alt string) (*http.Response, error) {
4783 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4784 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.resetauthorizationcoderequest)
4785 if err != nil {
4786 return nil, err
4787 }
4788 c.urlParams_.Set("alt", alt)
4789 c.urlParams_.Set("prettyPrint", "false")
4790 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+registration}:resetAuthorizationCode")
4791 urls += "?" + c.urlParams_.Encode()
4792 req, err := http.NewRequest("POST", urls, body)
4793 if err != nil {
4794 return nil, err
4795 }
4796 req.Header = reqHeaders
4797 googleapi.Expand(req.URL, map[string]string{
4798 "registration": c.registration,
4799 })
4800 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "domains.projects.locations.registrations.resetAuthorizationCode", "request", internallog.HTTPRequest(req, body.Bytes()))
4801 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4802 }
4803
4804 // Do executes the "domains.projects.locations.registrations.resetAuthorizationCode" call.
4805 // Any non-2xx status code is an error. Response headers are in either
4806 // *AuthorizationCode.ServerResponse.Header or (if a response was returned at
4807 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
4808 // check whether the returned error was because http.StatusNotModified was
4809 // returned.
4810 func (c *ProjectsLocationsRegistrationsResetAuthorizationCodeCall) Do(opts ...googleapi.CallOption) (*AuthorizationCode, error) {
4811 gensupport.SetOptions(c.urlParams_, opts...)
4812 res, err := c.doRequest("json")
4813 if res != nil && res.StatusCode == http.StatusNotModified {
4814 if res.Body != nil {
4815 res.Body.Close()
4816 }
4817 return nil, gensupport.WrapError(&googleapi.Error{
4818 Code: res.StatusCode,
4819 Header: res.Header,
4820 })
4821 }
4822 if err != nil {
4823 return nil, err
4824 }
4825 defer googleapi.CloseBody(res)
4826 if err := googleapi.CheckResponse(res); err != nil {
4827 return nil, gensupport.WrapError(err)
4828 }
4829 ret := &AuthorizationCode{
4830 ServerResponse: googleapi.ServerResponse{
4831 Header: res.Header,
4832 HTTPStatusCode: res.StatusCode,
4833 },
4834 }
4835 target := &ret
4836 b, err := gensupport.DecodeResponseBytes(target, res)
4837 if err != nil {
4838 return nil, err
4839 }
4840 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "domains.projects.locations.registrations.resetAuthorizationCode", "response", internallog.HTTPResponse(res, b))
4841 return ret, nil
4842 }
4843
4844 type ProjectsLocationsRegistrationsRetrieveAuthorizationCodeCall struct {
4845 s *Service
4846 registration string
4847 urlParams_ gensupport.URLParams
4848 ifNoneMatch_ string
4849 ctx_ context.Context
4850 header_ http.Header
4851 }
4852
4853 // RetrieveAuthorizationCode: Gets the authorization code of the `Registration`
4854 // for the purpose of transferring the domain to another registrar. You can
4855 // call this method only after 60 days have elapsed since the initial domain
4856 // registration. Domains that have the `REQUIRE_PUSH_TRANSFER` property in the
4857 // list of `domain_properties` don't support authorization codes and must use
4858 // the `InitiatePushTransfer` method to initiate the process to transfer the
4859 // domain to a different registrar.
4860 //
4861 // - registration: The name of the `Registration` whose authorization code is
4862 // being retrieved, in the format `projects/*/locations/*/registrations/*`.
4863 func (r *ProjectsLocationsRegistrationsService) RetrieveAuthorizationCode(registration string) *ProjectsLocationsRegistrationsRetrieveAuthorizationCodeCall {
4864 c := &ProjectsLocationsRegistrationsRetrieveAuthorizationCodeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4865 c.registration = registration
4866 return c
4867 }
4868
4869 // Fields allows partial responses to be retrieved. See
4870 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
4871 // details.
4872 func (c *ProjectsLocationsRegistrationsRetrieveAuthorizationCodeCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistrationsRetrieveAuthorizationCodeCall {
4873 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4874 return c
4875 }
4876
4877 // IfNoneMatch sets an optional parameter which makes the operation fail if the
4878 // object's ETag matches the given value. This is useful for getting updates
4879 // only after the object has changed since the last request.
4880 func (c *ProjectsLocationsRegistrationsRetrieveAuthorizationCodeCall) IfNoneMatch(entityTag string) *ProjectsLocationsRegistrationsRetrieveAuthorizationCodeCall {
4881 c.ifNoneMatch_ = entityTag
4882 return c
4883 }
4884
4885 // Context sets the context to be used in this call's Do method.
4886 func (c *ProjectsLocationsRegistrationsRetrieveAuthorizationCodeCall) Context(ctx context.Context) *ProjectsLocationsRegistrationsRetrieveAuthorizationCodeCall {
4887 c.ctx_ = ctx
4888 return c
4889 }
4890
4891 // Header returns a http.Header that can be modified by the caller to add
4892 // headers to the request.
4893 func (c *ProjectsLocationsRegistrationsRetrieveAuthorizationCodeCall) Header() http.Header {
4894 if c.header_ == nil {
4895 c.header_ = make(http.Header)
4896 }
4897 return c.header_
4898 }
4899
4900 func (c *ProjectsLocationsRegistrationsRetrieveAuthorizationCodeCall) doRequest(alt string) (*http.Response, error) {
4901 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4902 if c.ifNoneMatch_ != "" {
4903 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4904 }
4905 c.urlParams_.Set("alt", alt)
4906 c.urlParams_.Set("prettyPrint", "false")
4907 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+registration}:retrieveAuthorizationCode")
4908 urls += "?" + c.urlParams_.Encode()
4909 req, err := http.NewRequest("GET", urls, nil)
4910 if err != nil {
4911 return nil, err
4912 }
4913 req.Header = reqHeaders
4914 googleapi.Expand(req.URL, map[string]string{
4915 "registration": c.registration,
4916 })
4917 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "domains.projects.locations.registrations.retrieveAuthorizationCode", "request", internallog.HTTPRequest(req, nil))
4918 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4919 }
4920
4921 // Do executes the "domains.projects.locations.registrations.retrieveAuthorizationCode" call.
4922 // Any non-2xx status code is an error. Response headers are in either
4923 // *AuthorizationCode.ServerResponse.Header or (if a response was returned at
4924 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
4925 // check whether the returned error was because http.StatusNotModified was
4926 // returned.
4927 func (c *ProjectsLocationsRegistrationsRetrieveAuthorizationCodeCall) Do(opts ...googleapi.CallOption) (*AuthorizationCode, error) {
4928 gensupport.SetOptions(c.urlParams_, opts...)
4929 res, err := c.doRequest("json")
4930 if res != nil && res.StatusCode == http.StatusNotModified {
4931 if res.Body != nil {
4932 res.Body.Close()
4933 }
4934 return nil, gensupport.WrapError(&googleapi.Error{
4935 Code: res.StatusCode,
4936 Header: res.Header,
4937 })
4938 }
4939 if err != nil {
4940 return nil, err
4941 }
4942 defer googleapi.CloseBody(res)
4943 if err := googleapi.CheckResponse(res); err != nil {
4944 return nil, gensupport.WrapError(err)
4945 }
4946 ret := &AuthorizationCode{
4947 ServerResponse: googleapi.ServerResponse{
4948 Header: res.Header,
4949 HTTPStatusCode: res.StatusCode,
4950 },
4951 }
4952 target := &ret
4953 b, err := gensupport.DecodeResponseBytes(target, res)
4954 if err != nil {
4955 return nil, err
4956 }
4957 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "domains.projects.locations.registrations.retrieveAuthorizationCode", "response", internallog.HTTPResponse(res, b))
4958 return ret, nil
4959 }
4960
4961 type ProjectsLocationsRegistrationsRetrieveGoogleDomainsDnsRecordsCall struct {
4962 s *Service
4963 registration string
4964 urlParams_ gensupport.URLParams
4965 ifNoneMatch_ string
4966 ctx_ context.Context
4967 header_ http.Header
4968 }
4969
4970 // RetrieveGoogleDomainsDnsRecords: Lists the DNS records from the Google
4971 // Domains DNS zone for domains that use the deprecated `google_domains_dns` in
4972 // the `Registration`'s `dns_settings`.
4973 //
4974 // - registration: The name of the `Registration` whose Google Domains DNS
4975 // records details you are retrieving, in the format
4976 // `projects/*/locations/*/registrations/*`.
4977 func (r *ProjectsLocationsRegistrationsService) RetrieveGoogleDomainsDnsRecords(registration string) *ProjectsLocationsRegistrationsRetrieveGoogleDomainsDnsRecordsCall {
4978 c := &ProjectsLocationsRegistrationsRetrieveGoogleDomainsDnsRecordsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4979 c.registration = registration
4980 return c
4981 }
4982
4983 // PageSize sets the optional parameter "pageSize": Maximum number of results
4984 // to return.
4985 func (c *ProjectsLocationsRegistrationsRetrieveGoogleDomainsDnsRecordsCall) PageSize(pageSize int64) *ProjectsLocationsRegistrationsRetrieveGoogleDomainsDnsRecordsCall {
4986 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
4987 return c
4988 }
4989
4990 // PageToken sets the optional parameter "pageToken": When set to the
4991 // `next_page_token` from a prior response, provides the next page of results.
4992 func (c *ProjectsLocationsRegistrationsRetrieveGoogleDomainsDnsRecordsCall) PageToken(pageToken string) *ProjectsLocationsRegistrationsRetrieveGoogleDomainsDnsRecordsCall {
4993 c.urlParams_.Set("pageToken", pageToken)
4994 return c
4995 }
4996
4997 // Fields allows partial responses to be retrieved. See
4998 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
4999 // details.
5000 func (c *ProjectsLocationsRegistrationsRetrieveGoogleDomainsDnsRecordsCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistrationsRetrieveGoogleDomainsDnsRecordsCall {
5001 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5002 return c
5003 }
5004
5005 // IfNoneMatch sets an optional parameter which makes the operation fail if the
5006 // object's ETag matches the given value. This is useful for getting updates
5007 // only after the object has changed since the last request.
5008 func (c *ProjectsLocationsRegistrationsRetrieveGoogleDomainsDnsRecordsCall) IfNoneMatch(entityTag string) *ProjectsLocationsRegistrationsRetrieveGoogleDomainsDnsRecordsCall {
5009 c.ifNoneMatch_ = entityTag
5010 return c
5011 }
5012
5013 // Context sets the context to be used in this call's Do method.
5014 func (c *ProjectsLocationsRegistrationsRetrieveGoogleDomainsDnsRecordsCall) Context(ctx context.Context) *ProjectsLocationsRegistrationsRetrieveGoogleDomainsDnsRecordsCall {
5015 c.ctx_ = ctx
5016 return c
5017 }
5018
5019 // Header returns a http.Header that can be modified by the caller to add
5020 // headers to the request.
5021 func (c *ProjectsLocationsRegistrationsRetrieveGoogleDomainsDnsRecordsCall) Header() http.Header {
5022 if c.header_ == nil {
5023 c.header_ = make(http.Header)
5024 }
5025 return c.header_
5026 }
5027
5028 func (c *ProjectsLocationsRegistrationsRetrieveGoogleDomainsDnsRecordsCall) doRequest(alt string) (*http.Response, error) {
5029 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5030 if c.ifNoneMatch_ != "" {
5031 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5032 }
5033 c.urlParams_.Set("alt", alt)
5034 c.urlParams_.Set("prettyPrint", "false")
5035 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+registration}:retrieveGoogleDomainsDnsRecords")
5036 urls += "?" + c.urlParams_.Encode()
5037 req, err := http.NewRequest("GET", urls, nil)
5038 if err != nil {
5039 return nil, err
5040 }
5041 req.Header = reqHeaders
5042 googleapi.Expand(req.URL, map[string]string{
5043 "registration": c.registration,
5044 })
5045 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "domains.projects.locations.registrations.retrieveGoogleDomainsDnsRecords", "request", internallog.HTTPRequest(req, nil))
5046 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5047 }
5048
5049 // Do executes the "domains.projects.locations.registrations.retrieveGoogleDomainsDnsRecords" call.
5050 // Any non-2xx status code is an error. Response headers are in either
5051 // *RetrieveGoogleDomainsDnsRecordsResponse.ServerResponse.Header or (if a
5052 // response was returned at all) in error.(*googleapi.Error).Header. Use
5053 // googleapi.IsNotModified to check whether the returned error was because
5054 // http.StatusNotModified was returned.
5055 func (c *ProjectsLocationsRegistrationsRetrieveGoogleDomainsDnsRecordsCall) Do(opts ...googleapi.CallOption) (*RetrieveGoogleDomainsDnsRecordsResponse, error) {
5056 gensupport.SetOptions(c.urlParams_, opts...)
5057 res, err := c.doRequest("json")
5058 if res != nil && res.StatusCode == http.StatusNotModified {
5059 if res.Body != nil {
5060 res.Body.Close()
5061 }
5062 return nil, gensupport.WrapError(&googleapi.Error{
5063 Code: res.StatusCode,
5064 Header: res.Header,
5065 })
5066 }
5067 if err != nil {
5068 return nil, err
5069 }
5070 defer googleapi.CloseBody(res)
5071 if err := googleapi.CheckResponse(res); err != nil {
5072 return nil, gensupport.WrapError(err)
5073 }
5074 ret := &RetrieveGoogleDomainsDnsRecordsResponse{
5075 ServerResponse: googleapi.ServerResponse{
5076 Header: res.Header,
5077 HTTPStatusCode: res.StatusCode,
5078 },
5079 }
5080 target := &ret
5081 b, err := gensupport.DecodeResponseBytes(target, res)
5082 if err != nil {
5083 return nil, err
5084 }
5085 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "domains.projects.locations.registrations.retrieveGoogleDomainsDnsRecords", "response", internallog.HTTPResponse(res, b))
5086 return ret, nil
5087 }
5088
5089 // Pages invokes f for each page of results.
5090 // A non-nil error returned from f will halt the iteration.
5091 // The provided context supersedes any context provided to the Context method.
5092 func (c *ProjectsLocationsRegistrationsRetrieveGoogleDomainsDnsRecordsCall) Pages(ctx context.Context, f func(*RetrieveGoogleDomainsDnsRecordsResponse) error) error {
5093 c.ctx_ = ctx
5094 defer c.PageToken(c.urlParams_.Get("pageToken"))
5095 for {
5096 x, err := c.Do()
5097 if err != nil {
5098 return err
5099 }
5100 if err := f(x); err != nil {
5101 return err
5102 }
5103 if x.NextPageToken == "" {
5104 return nil
5105 }
5106 c.PageToken(x.NextPageToken)
5107 }
5108 }
5109
5110 type ProjectsLocationsRegistrationsRetrieveGoogleDomainsForwardingConfigCall struct {
5111 s *Service
5112 registration string
5113 urlParams_ gensupport.URLParams
5114 ifNoneMatch_ string
5115 ctx_ context.Context
5116 header_ http.Header
5117 }
5118
5119 // RetrieveGoogleDomainsForwardingConfig: Lists the deprecated domain and email
5120 // forwarding configurations you set up in the deprecated Google Domains UI.
5121 // The configuration is present only for domains with the
5122 // `google_domains_redirects_data_available` set to `true` in the
5123 // `Registration`'s `dns_settings`. A forwarding configuration might not work
5124 // correctly if required DNS records are not present in the domain's
5125 // authoritative DNS Zone.
5126 //
5127 // - registration: The name of the `Registration` whose Google Domains
5128 // forwarding configuration details are being retrieved, in the format
5129 // `projects/*/locations/*/registrations/*`.
5130 func (r *ProjectsLocationsRegistrationsService) RetrieveGoogleDomainsForwardingConfig(registration string) *ProjectsLocationsRegistrationsRetrieveGoogleDomainsForwardingConfigCall {
5131 c := &ProjectsLocationsRegistrationsRetrieveGoogleDomainsForwardingConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5132 c.registration = registration
5133 return c
5134 }
5135
5136 // Fields allows partial responses to be retrieved. See
5137 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
5138 // details.
5139 func (c *ProjectsLocationsRegistrationsRetrieveGoogleDomainsForwardingConfigCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistrationsRetrieveGoogleDomainsForwardingConfigCall {
5140 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5141 return c
5142 }
5143
5144 // IfNoneMatch sets an optional parameter which makes the operation fail if the
5145 // object's ETag matches the given value. This is useful for getting updates
5146 // only after the object has changed since the last request.
5147 func (c *ProjectsLocationsRegistrationsRetrieveGoogleDomainsForwardingConfigCall) IfNoneMatch(entityTag string) *ProjectsLocationsRegistrationsRetrieveGoogleDomainsForwardingConfigCall {
5148 c.ifNoneMatch_ = entityTag
5149 return c
5150 }
5151
5152 // Context sets the context to be used in this call's Do method.
5153 func (c *ProjectsLocationsRegistrationsRetrieveGoogleDomainsForwardingConfigCall) Context(ctx context.Context) *ProjectsLocationsRegistrationsRetrieveGoogleDomainsForwardingConfigCall {
5154 c.ctx_ = ctx
5155 return c
5156 }
5157
5158 // Header returns a http.Header that can be modified by the caller to add
5159 // headers to the request.
5160 func (c *ProjectsLocationsRegistrationsRetrieveGoogleDomainsForwardingConfigCall) Header() http.Header {
5161 if c.header_ == nil {
5162 c.header_ = make(http.Header)
5163 }
5164 return c.header_
5165 }
5166
5167 func (c *ProjectsLocationsRegistrationsRetrieveGoogleDomainsForwardingConfigCall) doRequest(alt string) (*http.Response, error) {
5168 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5169 if c.ifNoneMatch_ != "" {
5170 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5171 }
5172 c.urlParams_.Set("alt", alt)
5173 c.urlParams_.Set("prettyPrint", "false")
5174 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+registration}:retrieveGoogleDomainsForwardingConfig")
5175 urls += "?" + c.urlParams_.Encode()
5176 req, err := http.NewRequest("GET", urls, nil)
5177 if err != nil {
5178 return nil, err
5179 }
5180 req.Header = reqHeaders
5181 googleapi.Expand(req.URL, map[string]string{
5182 "registration": c.registration,
5183 })
5184 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "domains.projects.locations.registrations.retrieveGoogleDomainsForwardingConfig", "request", internallog.HTTPRequest(req, nil))
5185 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5186 }
5187
5188 // Do executes the "domains.projects.locations.registrations.retrieveGoogleDomainsForwardingConfig" call.
5189 // Any non-2xx status code is an error. Response headers are in either
5190 // *RetrieveGoogleDomainsForwardingConfigResponse.ServerResponse.Header or (if
5191 // a response was returned at all) in error.(*googleapi.Error).Header. Use
5192 // googleapi.IsNotModified to check whether the returned error was because
5193 // http.StatusNotModified was returned.
5194 func (c *ProjectsLocationsRegistrationsRetrieveGoogleDomainsForwardingConfigCall) Do(opts ...googleapi.CallOption) (*RetrieveGoogleDomainsForwardingConfigResponse, error) {
5195 gensupport.SetOptions(c.urlParams_, opts...)
5196 res, err := c.doRequest("json")
5197 if res != nil && res.StatusCode == http.StatusNotModified {
5198 if res.Body != nil {
5199 res.Body.Close()
5200 }
5201 return nil, gensupport.WrapError(&googleapi.Error{
5202 Code: res.StatusCode,
5203 Header: res.Header,
5204 })
5205 }
5206 if err != nil {
5207 return nil, err
5208 }
5209 defer googleapi.CloseBody(res)
5210 if err := googleapi.CheckResponse(res); err != nil {
5211 return nil, gensupport.WrapError(err)
5212 }
5213 ret := &RetrieveGoogleDomainsForwardingConfigResponse{
5214 ServerResponse: googleapi.ServerResponse{
5215 Header: res.Header,
5216 HTTPStatusCode: res.StatusCode,
5217 },
5218 }
5219 target := &ret
5220 b, err := gensupport.DecodeResponseBytes(target, res)
5221 if err != nil {
5222 return nil, err
5223 }
5224 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "domains.projects.locations.registrations.retrieveGoogleDomainsForwardingConfig", "response", internallog.HTTPResponse(res, b))
5225 return ret, nil
5226 }
5227
5228 type ProjectsLocationsRegistrationsRetrieveImportableDomainsCall struct {
5229 s *Service
5230 location string
5231 urlParams_ gensupport.URLParams
5232 ifNoneMatch_ string
5233 ctx_ context.Context
5234 header_ http.Header
5235 }
5236
5237 // RetrieveImportableDomains: Deprecated: For more information, see Cloud
5238 // Domains feature deprecation
5239 // (https://cloud.google.com/domains/docs/deprecations/feature-deprecations)
5240 // Lists domain names from Google Domains (https://domains.google/) that can be
5241 // imported to Cloud Domains using the `ImportDomain` method. Since individual
5242 // users can own domains in Google Domains, the list of domains returned
5243 // depends on the individual user making the call. Domains already managed by
5244 // Cloud Domains are not returned.
5245 //
5246 // - location: The location. Must be in the format `projects/*/locations/*`.
5247 func (r *ProjectsLocationsRegistrationsService) RetrieveImportableDomains(location string) *ProjectsLocationsRegistrationsRetrieveImportableDomainsCall {
5248 c := &ProjectsLocationsRegistrationsRetrieveImportableDomainsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5249 c.location = location
5250 return c
5251 }
5252
5253 // PageSize sets the optional parameter "pageSize": Maximum number of results
5254 // to return.
5255 func (c *ProjectsLocationsRegistrationsRetrieveImportableDomainsCall) PageSize(pageSize int64) *ProjectsLocationsRegistrationsRetrieveImportableDomainsCall {
5256 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
5257 return c
5258 }
5259
5260 // PageToken sets the optional parameter "pageToken": When set to the
5261 // `next_page_token` from a prior response, provides the next page of results.
5262 func (c *ProjectsLocationsRegistrationsRetrieveImportableDomainsCall) PageToken(pageToken string) *ProjectsLocationsRegistrationsRetrieveImportableDomainsCall {
5263 c.urlParams_.Set("pageToken", pageToken)
5264 return c
5265 }
5266
5267 // Fields allows partial responses to be retrieved. See
5268 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
5269 // details.
5270 func (c *ProjectsLocationsRegistrationsRetrieveImportableDomainsCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistrationsRetrieveImportableDomainsCall {
5271 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5272 return c
5273 }
5274
5275 // IfNoneMatch sets an optional parameter which makes the operation fail if the
5276 // object's ETag matches the given value. This is useful for getting updates
5277 // only after the object has changed since the last request.
5278 func (c *ProjectsLocationsRegistrationsRetrieveImportableDomainsCall) IfNoneMatch(entityTag string) *ProjectsLocationsRegistrationsRetrieveImportableDomainsCall {
5279 c.ifNoneMatch_ = entityTag
5280 return c
5281 }
5282
5283 // Context sets the context to be used in this call's Do method.
5284 func (c *ProjectsLocationsRegistrationsRetrieveImportableDomainsCall) Context(ctx context.Context) *ProjectsLocationsRegistrationsRetrieveImportableDomainsCall {
5285 c.ctx_ = ctx
5286 return c
5287 }
5288
5289 // Header returns a http.Header that can be modified by the caller to add
5290 // headers to the request.
5291 func (c *ProjectsLocationsRegistrationsRetrieveImportableDomainsCall) Header() http.Header {
5292 if c.header_ == nil {
5293 c.header_ = make(http.Header)
5294 }
5295 return c.header_
5296 }
5297
5298 func (c *ProjectsLocationsRegistrationsRetrieveImportableDomainsCall) doRequest(alt string) (*http.Response, error) {
5299 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5300 if c.ifNoneMatch_ != "" {
5301 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5302 }
5303 c.urlParams_.Set("alt", alt)
5304 c.urlParams_.Set("prettyPrint", "false")
5305 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+location}/registrations:retrieveImportableDomains")
5306 urls += "?" + c.urlParams_.Encode()
5307 req, err := http.NewRequest("GET", urls, nil)
5308 if err != nil {
5309 return nil, err
5310 }
5311 req.Header = reqHeaders
5312 googleapi.Expand(req.URL, map[string]string{
5313 "location": c.location,
5314 })
5315 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "domains.projects.locations.registrations.retrieveImportableDomains", "request", internallog.HTTPRequest(req, nil))
5316 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5317 }
5318
5319 // Do executes the "domains.projects.locations.registrations.retrieveImportableDomains" call.
5320 // Any non-2xx status code is an error. Response headers are in either
5321 // *RetrieveImportableDomainsResponse.ServerResponse.Header or (if a response
5322 // was returned at all) in error.(*googleapi.Error).Header. Use
5323 // googleapi.IsNotModified to check whether the returned error was because
5324 // http.StatusNotModified was returned.
5325 func (c *ProjectsLocationsRegistrationsRetrieveImportableDomainsCall) Do(opts ...googleapi.CallOption) (*RetrieveImportableDomainsResponse, error) {
5326 gensupport.SetOptions(c.urlParams_, opts...)
5327 res, err := c.doRequest("json")
5328 if res != nil && res.StatusCode == http.StatusNotModified {
5329 if res.Body != nil {
5330 res.Body.Close()
5331 }
5332 return nil, gensupport.WrapError(&googleapi.Error{
5333 Code: res.StatusCode,
5334 Header: res.Header,
5335 })
5336 }
5337 if err != nil {
5338 return nil, err
5339 }
5340 defer googleapi.CloseBody(res)
5341 if err := googleapi.CheckResponse(res); err != nil {
5342 return nil, gensupport.WrapError(err)
5343 }
5344 ret := &RetrieveImportableDomainsResponse{
5345 ServerResponse: googleapi.ServerResponse{
5346 Header: res.Header,
5347 HTTPStatusCode: res.StatusCode,
5348 },
5349 }
5350 target := &ret
5351 b, err := gensupport.DecodeResponseBytes(target, res)
5352 if err != nil {
5353 return nil, err
5354 }
5355 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "domains.projects.locations.registrations.retrieveImportableDomains", "response", internallog.HTTPResponse(res, b))
5356 return ret, nil
5357 }
5358
5359 // Pages invokes f for each page of results.
5360 // A non-nil error returned from f will halt the iteration.
5361 // The provided context supersedes any context provided to the Context method.
5362 func (c *ProjectsLocationsRegistrationsRetrieveImportableDomainsCall) Pages(ctx context.Context, f func(*RetrieveImportableDomainsResponse) error) error {
5363 c.ctx_ = ctx
5364 defer c.PageToken(c.urlParams_.Get("pageToken"))
5365 for {
5366 x, err := c.Do()
5367 if err != nil {
5368 return err
5369 }
5370 if err := f(x); err != nil {
5371 return err
5372 }
5373 if x.NextPageToken == "" {
5374 return nil
5375 }
5376 c.PageToken(x.NextPageToken)
5377 }
5378 }
5379
5380 type ProjectsLocationsRegistrationsRetrieveRegisterParametersCall struct {
5381 s *Service
5382 location string
5383 urlParams_ gensupport.URLParams
5384 ifNoneMatch_ string
5385 ctx_ context.Context
5386 header_ http.Header
5387 }
5388
5389 // RetrieveRegisterParameters: Gets parameters needed to register a new domain
5390 // name, including price and up-to-date availability. Use the returned values
5391 // to call `RegisterDomain`.
5392 //
5393 // - location: The location. Must be in the format `projects/*/locations/*`.
5394 func (r *ProjectsLocationsRegistrationsService) RetrieveRegisterParameters(location string) *ProjectsLocationsRegistrationsRetrieveRegisterParametersCall {
5395 c := &ProjectsLocationsRegistrationsRetrieveRegisterParametersCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5396 c.location = location
5397 return c
5398 }
5399
5400 // DomainName sets the optional parameter "domainName": Required. The domain
5401 // name. Unicode domain names must be expressed in Punycode format.
5402 func (c *ProjectsLocationsRegistrationsRetrieveRegisterParametersCall) DomainName(domainName string) *ProjectsLocationsRegistrationsRetrieveRegisterParametersCall {
5403 c.urlParams_.Set("domainName", domainName)
5404 return c
5405 }
5406
5407 // Fields allows partial responses to be retrieved. See
5408 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
5409 // details.
5410 func (c *ProjectsLocationsRegistrationsRetrieveRegisterParametersCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistrationsRetrieveRegisterParametersCall {
5411 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5412 return c
5413 }
5414
5415 // IfNoneMatch sets an optional parameter which makes the operation fail if the
5416 // object's ETag matches the given value. This is useful for getting updates
5417 // only after the object has changed since the last request.
5418 func (c *ProjectsLocationsRegistrationsRetrieveRegisterParametersCall) IfNoneMatch(entityTag string) *ProjectsLocationsRegistrationsRetrieveRegisterParametersCall {
5419 c.ifNoneMatch_ = entityTag
5420 return c
5421 }
5422
5423 // Context sets the context to be used in this call's Do method.
5424 func (c *ProjectsLocationsRegistrationsRetrieveRegisterParametersCall) Context(ctx context.Context) *ProjectsLocationsRegistrationsRetrieveRegisterParametersCall {
5425 c.ctx_ = ctx
5426 return c
5427 }
5428
5429 // Header returns a http.Header that can be modified by the caller to add
5430 // headers to the request.
5431 func (c *ProjectsLocationsRegistrationsRetrieveRegisterParametersCall) Header() http.Header {
5432 if c.header_ == nil {
5433 c.header_ = make(http.Header)
5434 }
5435 return c.header_
5436 }
5437
5438 func (c *ProjectsLocationsRegistrationsRetrieveRegisterParametersCall) doRequest(alt string) (*http.Response, error) {
5439 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5440 if c.ifNoneMatch_ != "" {
5441 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5442 }
5443 c.urlParams_.Set("alt", alt)
5444 c.urlParams_.Set("prettyPrint", "false")
5445 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+location}/registrations:retrieveRegisterParameters")
5446 urls += "?" + c.urlParams_.Encode()
5447 req, err := http.NewRequest("GET", urls, nil)
5448 if err != nil {
5449 return nil, err
5450 }
5451 req.Header = reqHeaders
5452 googleapi.Expand(req.URL, map[string]string{
5453 "location": c.location,
5454 })
5455 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "domains.projects.locations.registrations.retrieveRegisterParameters", "request", internallog.HTTPRequest(req, nil))
5456 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5457 }
5458
5459 // Do executes the "domains.projects.locations.registrations.retrieveRegisterParameters" call.
5460 // Any non-2xx status code is an error. Response headers are in either
5461 // *RetrieveRegisterParametersResponse.ServerResponse.Header or (if a response
5462 // was returned at all) in error.(*googleapi.Error).Header. Use
5463 // googleapi.IsNotModified to check whether the returned error was because
5464 // http.StatusNotModified was returned.
5465 func (c *ProjectsLocationsRegistrationsRetrieveRegisterParametersCall) Do(opts ...googleapi.CallOption) (*RetrieveRegisterParametersResponse, error) {
5466 gensupport.SetOptions(c.urlParams_, opts...)
5467 res, err := c.doRequest("json")
5468 if res != nil && res.StatusCode == http.StatusNotModified {
5469 if res.Body != nil {
5470 res.Body.Close()
5471 }
5472 return nil, gensupport.WrapError(&googleapi.Error{
5473 Code: res.StatusCode,
5474 Header: res.Header,
5475 })
5476 }
5477 if err != nil {
5478 return nil, err
5479 }
5480 defer googleapi.CloseBody(res)
5481 if err := googleapi.CheckResponse(res); err != nil {
5482 return nil, gensupport.WrapError(err)
5483 }
5484 ret := &RetrieveRegisterParametersResponse{
5485 ServerResponse: googleapi.ServerResponse{
5486 Header: res.Header,
5487 HTTPStatusCode: res.StatusCode,
5488 },
5489 }
5490 target := &ret
5491 b, err := gensupport.DecodeResponseBytes(target, res)
5492 if err != nil {
5493 return nil, err
5494 }
5495 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "domains.projects.locations.registrations.retrieveRegisterParameters", "response", internallog.HTTPResponse(res, b))
5496 return ret, nil
5497 }
5498
5499 type ProjectsLocationsRegistrationsRetrieveTransferParametersCall struct {
5500 s *Service
5501 location string
5502 urlParams_ gensupport.URLParams
5503 ifNoneMatch_ string
5504 ctx_ context.Context
5505 header_ http.Header
5506 }
5507
5508 // RetrieveTransferParameters: Deprecated: For more information, see Cloud
5509 // Domains feature deprecation
5510 // (https://cloud.google.com/domains/docs/deprecations/feature-deprecations)
5511 // Gets parameters needed to transfer a domain name from another registrar to
5512 // Cloud Domains. For domains already managed by Google Domains
5513 // (https://domains.google/), use `ImportDomain` instead. Use the returned
5514 // values to call `TransferDomain`.
5515 //
5516 // - location: The location. Must be in the format `projects/*/locations/*`.
5517 func (r *ProjectsLocationsRegistrationsService) RetrieveTransferParameters(location string) *ProjectsLocationsRegistrationsRetrieveTransferParametersCall {
5518 c := &ProjectsLocationsRegistrationsRetrieveTransferParametersCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5519 c.location = location
5520 return c
5521 }
5522
5523 // DomainName sets the optional parameter "domainName": Required. The domain
5524 // name. Unicode domain names must be expressed in Punycode format.
5525 func (c *ProjectsLocationsRegistrationsRetrieveTransferParametersCall) DomainName(domainName string) *ProjectsLocationsRegistrationsRetrieveTransferParametersCall {
5526 c.urlParams_.Set("domainName", domainName)
5527 return c
5528 }
5529
5530 // Fields allows partial responses to be retrieved. See
5531 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
5532 // details.
5533 func (c *ProjectsLocationsRegistrationsRetrieveTransferParametersCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistrationsRetrieveTransferParametersCall {
5534 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5535 return c
5536 }
5537
5538 // IfNoneMatch sets an optional parameter which makes the operation fail if the
5539 // object's ETag matches the given value. This is useful for getting updates
5540 // only after the object has changed since the last request.
5541 func (c *ProjectsLocationsRegistrationsRetrieveTransferParametersCall) IfNoneMatch(entityTag string) *ProjectsLocationsRegistrationsRetrieveTransferParametersCall {
5542 c.ifNoneMatch_ = entityTag
5543 return c
5544 }
5545
5546 // Context sets the context to be used in this call's Do method.
5547 func (c *ProjectsLocationsRegistrationsRetrieveTransferParametersCall) Context(ctx context.Context) *ProjectsLocationsRegistrationsRetrieveTransferParametersCall {
5548 c.ctx_ = ctx
5549 return c
5550 }
5551
5552 // Header returns a http.Header that can be modified by the caller to add
5553 // headers to the request.
5554 func (c *ProjectsLocationsRegistrationsRetrieveTransferParametersCall) Header() http.Header {
5555 if c.header_ == nil {
5556 c.header_ = make(http.Header)
5557 }
5558 return c.header_
5559 }
5560
5561 func (c *ProjectsLocationsRegistrationsRetrieveTransferParametersCall) doRequest(alt string) (*http.Response, error) {
5562 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5563 if c.ifNoneMatch_ != "" {
5564 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5565 }
5566 c.urlParams_.Set("alt", alt)
5567 c.urlParams_.Set("prettyPrint", "false")
5568 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+location}/registrations:retrieveTransferParameters")
5569 urls += "?" + c.urlParams_.Encode()
5570 req, err := http.NewRequest("GET", urls, nil)
5571 if err != nil {
5572 return nil, err
5573 }
5574 req.Header = reqHeaders
5575 googleapi.Expand(req.URL, map[string]string{
5576 "location": c.location,
5577 })
5578 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "domains.projects.locations.registrations.retrieveTransferParameters", "request", internallog.HTTPRequest(req, nil))
5579 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5580 }
5581
5582 // Do executes the "domains.projects.locations.registrations.retrieveTransferParameters" call.
5583 // Any non-2xx status code is an error. Response headers are in either
5584 // *RetrieveTransferParametersResponse.ServerResponse.Header or (if a response
5585 // was returned at all) in error.(*googleapi.Error).Header. Use
5586 // googleapi.IsNotModified to check whether the returned error was because
5587 // http.StatusNotModified was returned.
5588 func (c *ProjectsLocationsRegistrationsRetrieveTransferParametersCall) Do(opts ...googleapi.CallOption) (*RetrieveTransferParametersResponse, error) {
5589 gensupport.SetOptions(c.urlParams_, opts...)
5590 res, err := c.doRequest("json")
5591 if res != nil && res.StatusCode == http.StatusNotModified {
5592 if res.Body != nil {
5593 res.Body.Close()
5594 }
5595 return nil, gensupport.WrapError(&googleapi.Error{
5596 Code: res.StatusCode,
5597 Header: res.Header,
5598 })
5599 }
5600 if err != nil {
5601 return nil, err
5602 }
5603 defer googleapi.CloseBody(res)
5604 if err := googleapi.CheckResponse(res); err != nil {
5605 return nil, gensupport.WrapError(err)
5606 }
5607 ret := &RetrieveTransferParametersResponse{
5608 ServerResponse: googleapi.ServerResponse{
5609 Header: res.Header,
5610 HTTPStatusCode: res.StatusCode,
5611 },
5612 }
5613 target := &ret
5614 b, err := gensupport.DecodeResponseBytes(target, res)
5615 if err != nil {
5616 return nil, err
5617 }
5618 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "domains.projects.locations.registrations.retrieveTransferParameters", "response", internallog.HTTPResponse(res, b))
5619 return ret, nil
5620 }
5621
5622 type ProjectsLocationsRegistrationsSearchDomainsCall struct {
5623 s *Service
5624 location string
5625 urlParams_ gensupport.URLParams
5626 ifNoneMatch_ string
5627 ctx_ context.Context
5628 header_ http.Header
5629 }
5630
5631 // SearchDomains: Searches for available domain names similar to the provided
5632 // query. Availability results from this method are approximate; call
5633 // `RetrieveRegisterParameters` on a domain before registering to confirm
5634 // availability.
5635 //
5636 // - location: The location. Must be in the format `projects/*/locations/*`.
5637 func (r *ProjectsLocationsRegistrationsService) SearchDomains(location string) *ProjectsLocationsRegistrationsSearchDomainsCall {
5638 c := &ProjectsLocationsRegistrationsSearchDomainsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5639 c.location = location
5640 return c
5641 }
5642
5643 // Query sets the optional parameter "query": Required. String used to search
5644 // for available domain names.
5645 func (c *ProjectsLocationsRegistrationsSearchDomainsCall) Query(query string) *ProjectsLocationsRegistrationsSearchDomainsCall {
5646 c.urlParams_.Set("query", query)
5647 return c
5648 }
5649
5650 // Fields allows partial responses to be retrieved. See
5651 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
5652 // details.
5653 func (c *ProjectsLocationsRegistrationsSearchDomainsCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistrationsSearchDomainsCall {
5654 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5655 return c
5656 }
5657
5658 // IfNoneMatch sets an optional parameter which makes the operation fail if the
5659 // object's ETag matches the given value. This is useful for getting updates
5660 // only after the object has changed since the last request.
5661 func (c *ProjectsLocationsRegistrationsSearchDomainsCall) IfNoneMatch(entityTag string) *ProjectsLocationsRegistrationsSearchDomainsCall {
5662 c.ifNoneMatch_ = entityTag
5663 return c
5664 }
5665
5666 // Context sets the context to be used in this call's Do method.
5667 func (c *ProjectsLocationsRegistrationsSearchDomainsCall) Context(ctx context.Context) *ProjectsLocationsRegistrationsSearchDomainsCall {
5668 c.ctx_ = ctx
5669 return c
5670 }
5671
5672 // Header returns a http.Header that can be modified by the caller to add
5673 // headers to the request.
5674 func (c *ProjectsLocationsRegistrationsSearchDomainsCall) Header() http.Header {
5675 if c.header_ == nil {
5676 c.header_ = make(http.Header)
5677 }
5678 return c.header_
5679 }
5680
5681 func (c *ProjectsLocationsRegistrationsSearchDomainsCall) doRequest(alt string) (*http.Response, error) {
5682 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5683 if c.ifNoneMatch_ != "" {
5684 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5685 }
5686 c.urlParams_.Set("alt", alt)
5687 c.urlParams_.Set("prettyPrint", "false")
5688 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+location}/registrations:searchDomains")
5689 urls += "?" + c.urlParams_.Encode()
5690 req, err := http.NewRequest("GET", urls, nil)
5691 if err != nil {
5692 return nil, err
5693 }
5694 req.Header = reqHeaders
5695 googleapi.Expand(req.URL, map[string]string{
5696 "location": c.location,
5697 })
5698 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "domains.projects.locations.registrations.searchDomains", "request", internallog.HTTPRequest(req, nil))
5699 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5700 }
5701
5702 // Do executes the "domains.projects.locations.registrations.searchDomains" call.
5703 // Any non-2xx status code is an error. Response headers are in either
5704 // *SearchDomainsResponse.ServerResponse.Header or (if a response was returned
5705 // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
5706 // check whether the returned error was because http.StatusNotModified was
5707 // returned.
5708 func (c *ProjectsLocationsRegistrationsSearchDomainsCall) Do(opts ...googleapi.CallOption) (*SearchDomainsResponse, error) {
5709 gensupport.SetOptions(c.urlParams_, opts...)
5710 res, err := c.doRequest("json")
5711 if res != nil && res.StatusCode == http.StatusNotModified {
5712 if res.Body != nil {
5713 res.Body.Close()
5714 }
5715 return nil, gensupport.WrapError(&googleapi.Error{
5716 Code: res.StatusCode,
5717 Header: res.Header,
5718 })
5719 }
5720 if err != nil {
5721 return nil, err
5722 }
5723 defer googleapi.CloseBody(res)
5724 if err := googleapi.CheckResponse(res); err != nil {
5725 return nil, gensupport.WrapError(err)
5726 }
5727 ret := &SearchDomainsResponse{
5728 ServerResponse: googleapi.ServerResponse{
5729 Header: res.Header,
5730 HTTPStatusCode: res.StatusCode,
5731 },
5732 }
5733 target := &ret
5734 b, err := gensupport.DecodeResponseBytes(target, res)
5735 if err != nil {
5736 return nil, err
5737 }
5738 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "domains.projects.locations.registrations.searchDomains", "response", internallog.HTTPResponse(res, b))
5739 return ret, nil
5740 }
5741
5742 type ProjectsLocationsRegistrationsSetIamPolicyCall struct {
5743 s *Service
5744 resource string
5745 setiampolicyrequest *SetIamPolicyRequest
5746 urlParams_ gensupport.URLParams
5747 ctx_ context.Context
5748 header_ http.Header
5749 }
5750
5751 // SetIamPolicy: Sets the access control policy on the specified resource.
5752 // Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`,
5753 // and `PERMISSION_DENIED` errors.
5754 //
5755 // - resource: REQUIRED: The resource for which the policy is being specified.
5756 // See Resource names (https://cloud.google.com/apis/design/resource_names)
5757 // for the appropriate value for this field.
5758 func (r *ProjectsLocationsRegistrationsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsRegistrationsSetIamPolicyCall {
5759 c := &ProjectsLocationsRegistrationsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5760 c.resource = resource
5761 c.setiampolicyrequest = setiampolicyrequest
5762 return c
5763 }
5764
5765 // Fields allows partial responses to be retrieved. See
5766 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
5767 // details.
5768 func (c *ProjectsLocationsRegistrationsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistrationsSetIamPolicyCall {
5769 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5770 return c
5771 }
5772
5773 // Context sets the context to be used in this call's Do method.
5774 func (c *ProjectsLocationsRegistrationsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsRegistrationsSetIamPolicyCall {
5775 c.ctx_ = ctx
5776 return c
5777 }
5778
5779 // Header returns a http.Header that can be modified by the caller to add
5780 // headers to the request.
5781 func (c *ProjectsLocationsRegistrationsSetIamPolicyCall) Header() http.Header {
5782 if c.header_ == nil {
5783 c.header_ = make(http.Header)
5784 }
5785 return c.header_
5786 }
5787
5788 func (c *ProjectsLocationsRegistrationsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
5789 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5790 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.setiampolicyrequest)
5791 if err != nil {
5792 return nil, err
5793 }
5794 c.urlParams_.Set("alt", alt)
5795 c.urlParams_.Set("prettyPrint", "false")
5796 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+resource}:setIamPolicy")
5797 urls += "?" + c.urlParams_.Encode()
5798 req, err := http.NewRequest("POST", urls, body)
5799 if err != nil {
5800 return nil, err
5801 }
5802 req.Header = reqHeaders
5803 googleapi.Expand(req.URL, map[string]string{
5804 "resource": c.resource,
5805 })
5806 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "domains.projects.locations.registrations.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes()))
5807 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5808 }
5809
5810 // Do executes the "domains.projects.locations.registrations.setIamPolicy" call.
5811 // Any non-2xx status code is an error. Response headers are in either
5812 // *Policy.ServerResponse.Header or (if a response was returned at all) in
5813 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
5814 // whether the returned error was because http.StatusNotModified was returned.
5815 func (c *ProjectsLocationsRegistrationsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
5816 gensupport.SetOptions(c.urlParams_, opts...)
5817 res, err := c.doRequest("json")
5818 if res != nil && res.StatusCode == http.StatusNotModified {
5819 if res.Body != nil {
5820 res.Body.Close()
5821 }
5822 return nil, gensupport.WrapError(&googleapi.Error{
5823 Code: res.StatusCode,
5824 Header: res.Header,
5825 })
5826 }
5827 if err != nil {
5828 return nil, err
5829 }
5830 defer googleapi.CloseBody(res)
5831 if err := googleapi.CheckResponse(res); err != nil {
5832 return nil, gensupport.WrapError(err)
5833 }
5834 ret := &Policy{
5835 ServerResponse: googleapi.ServerResponse{
5836 Header: res.Header,
5837 HTTPStatusCode: res.StatusCode,
5838 },
5839 }
5840 target := &ret
5841 b, err := gensupport.DecodeResponseBytes(target, res)
5842 if err != nil {
5843 return nil, err
5844 }
5845 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "domains.projects.locations.registrations.setIamPolicy", "response", internallog.HTTPResponse(res, b))
5846 return ret, nil
5847 }
5848
5849 type ProjectsLocationsRegistrationsTestIamPermissionsCall struct {
5850 s *Service
5851 resource string
5852 testiampermissionsrequest *TestIamPermissionsRequest
5853 urlParams_ gensupport.URLParams
5854 ctx_ context.Context
5855 header_ http.Header
5856 }
5857
5858 // TestIamPermissions: Returns permissions that a caller has on the specified
5859 // resource. If the resource does not exist, this will return an empty set of
5860 // permissions, not a `NOT_FOUND` error. Note: This operation is designed to be
5861 // used for building permission-aware UIs and command-line tools, not for
5862 // authorization checking. This operation may "fail open" without warning.
5863 //
5864 // - resource: REQUIRED: The resource for which the policy detail is being
5865 // requested. See Resource names
5866 // (https://cloud.google.com/apis/design/resource_names) for the appropriate
5867 // value for this field.
5868 func (r *ProjectsLocationsRegistrationsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsRegistrationsTestIamPermissionsCall {
5869 c := &ProjectsLocationsRegistrationsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5870 c.resource = resource
5871 c.testiampermissionsrequest = testiampermissionsrequest
5872 return c
5873 }
5874
5875 // Fields allows partial responses to be retrieved. See
5876 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
5877 // details.
5878 func (c *ProjectsLocationsRegistrationsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistrationsTestIamPermissionsCall {
5879 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5880 return c
5881 }
5882
5883 // Context sets the context to be used in this call's Do method.
5884 func (c *ProjectsLocationsRegistrationsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsRegistrationsTestIamPermissionsCall {
5885 c.ctx_ = ctx
5886 return c
5887 }
5888
5889 // Header returns a http.Header that can be modified by the caller to add
5890 // headers to the request.
5891 func (c *ProjectsLocationsRegistrationsTestIamPermissionsCall) Header() http.Header {
5892 if c.header_ == nil {
5893 c.header_ = make(http.Header)
5894 }
5895 return c.header_
5896 }
5897
5898 func (c *ProjectsLocationsRegistrationsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
5899 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5900 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testiampermissionsrequest)
5901 if err != nil {
5902 return nil, err
5903 }
5904 c.urlParams_.Set("alt", alt)
5905 c.urlParams_.Set("prettyPrint", "false")
5906 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+resource}:testIamPermissions")
5907 urls += "?" + c.urlParams_.Encode()
5908 req, err := http.NewRequest("POST", urls, body)
5909 if err != nil {
5910 return nil, err
5911 }
5912 req.Header = reqHeaders
5913 googleapi.Expand(req.URL, map[string]string{
5914 "resource": c.resource,
5915 })
5916 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "domains.projects.locations.registrations.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes()))
5917 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5918 }
5919
5920 // Do executes the "domains.projects.locations.registrations.testIamPermissions" call.
5921 // Any non-2xx status code is an error. Response headers are in either
5922 // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was
5923 // returned at all) in error.(*googleapi.Error).Header. Use
5924 // googleapi.IsNotModified to check whether the returned error was because
5925 // http.StatusNotModified was returned.
5926 func (c *ProjectsLocationsRegistrationsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
5927 gensupport.SetOptions(c.urlParams_, opts...)
5928 res, err := c.doRequest("json")
5929 if res != nil && res.StatusCode == http.StatusNotModified {
5930 if res.Body != nil {
5931 res.Body.Close()
5932 }
5933 return nil, gensupport.WrapError(&googleapi.Error{
5934 Code: res.StatusCode,
5935 Header: res.Header,
5936 })
5937 }
5938 if err != nil {
5939 return nil, err
5940 }
5941 defer googleapi.CloseBody(res)
5942 if err := googleapi.CheckResponse(res); err != nil {
5943 return nil, gensupport.WrapError(err)
5944 }
5945 ret := &TestIamPermissionsResponse{
5946 ServerResponse: googleapi.ServerResponse{
5947 Header: res.Header,
5948 HTTPStatusCode: res.StatusCode,
5949 },
5950 }
5951 target := &ret
5952 b, err := gensupport.DecodeResponseBytes(target, res)
5953 if err != nil {
5954 return nil, err
5955 }
5956 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "domains.projects.locations.registrations.testIamPermissions", "response", internallog.HTTPResponse(res, b))
5957 return ret, nil
5958 }
5959
5960 type ProjectsLocationsRegistrationsTransferCall struct {
5961 s *Service
5962 parent string
5963 transferdomainrequest *TransferDomainRequest
5964 urlParams_ gensupport.URLParams
5965 ctx_ context.Context
5966 header_ http.Header
5967 }
5968
5969 // Transfer: Deprecated: For more information, see Cloud Domains feature
5970 // deprecation
5971 // (https://cloud.google.com/domains/docs/deprecations/feature-deprecations)
5972 // Transfers a domain name from another registrar to Cloud Domains. For domains
5973 // already managed by Google Domains (https://domains.google/), use
5974 // `ImportDomain` instead. Before calling this method, go to the domain's
5975 // current registrar to unlock the domain for transfer and retrieve the
5976 // domain's transfer authorization code. Then call `RetrieveTransferParameters`
5977 // to confirm that the domain is unlocked and to get values needed to build a
5978 // call to this method. A successful call creates a `Registration` resource in
5979 // state `TRANSFER_PENDING`. It can take several days to complete the transfer
5980 // process. The registrant can often speed up this process by approving the
5981 // transfer through the current registrar, either by clicking a link in an
5982 // email from the registrar or by visiting the registrar's website. A few
5983 // minutes after transfer approval, the resource transitions to state `ACTIVE`,
5984 // indicating that the transfer was successful. If the transfer is rejected or
5985 // the request expires without being approved, the resource can end up in state
5986 // `TRANSFER_FAILED`. If transfer fails, you can safely delete the resource and
5987 // retry the transfer.
5988 //
5989 // - parent: The parent resource of the `Registration`. Must be in the format
5990 // `projects/*/locations/*`.
5991 func (r *ProjectsLocationsRegistrationsService) Transfer(parent string, transferdomainrequest *TransferDomainRequest) *ProjectsLocationsRegistrationsTransferCall {
5992 c := &ProjectsLocationsRegistrationsTransferCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5993 c.parent = parent
5994 c.transferdomainrequest = transferdomainrequest
5995 return c
5996 }
5997
5998 // Fields allows partial responses to be retrieved. See
5999 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
6000 // details.
6001 func (c *ProjectsLocationsRegistrationsTransferCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistrationsTransferCall {
6002 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6003 return c
6004 }
6005
6006 // Context sets the context to be used in this call's Do method.
6007 func (c *ProjectsLocationsRegistrationsTransferCall) Context(ctx context.Context) *ProjectsLocationsRegistrationsTransferCall {
6008 c.ctx_ = ctx
6009 return c
6010 }
6011
6012 // Header returns a http.Header that can be modified by the caller to add
6013 // headers to the request.
6014 func (c *ProjectsLocationsRegistrationsTransferCall) Header() http.Header {
6015 if c.header_ == nil {
6016 c.header_ = make(http.Header)
6017 }
6018 return c.header_
6019 }
6020
6021 func (c *ProjectsLocationsRegistrationsTransferCall) doRequest(alt string) (*http.Response, error) {
6022 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6023 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.transferdomainrequest)
6024 if err != nil {
6025 return nil, err
6026 }
6027 c.urlParams_.Set("alt", alt)
6028 c.urlParams_.Set("prettyPrint", "false")
6029 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+parent}/registrations:transfer")
6030 urls += "?" + c.urlParams_.Encode()
6031 req, err := http.NewRequest("POST", urls, body)
6032 if err != nil {
6033 return nil, err
6034 }
6035 req.Header = reqHeaders
6036 googleapi.Expand(req.URL, map[string]string{
6037 "parent": c.parent,
6038 })
6039 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "domains.projects.locations.registrations.transfer", "request", internallog.HTTPRequest(req, body.Bytes()))
6040 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6041 }
6042
6043 // Do executes the "domains.projects.locations.registrations.transfer" call.
6044 // Any non-2xx status code is an error. Response headers are in either
6045 // *Operation.ServerResponse.Header or (if a response was returned at all) in
6046 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
6047 // whether the returned error was because http.StatusNotModified was returned.
6048 func (c *ProjectsLocationsRegistrationsTransferCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
6049 gensupport.SetOptions(c.urlParams_, opts...)
6050 res, err := c.doRequest("json")
6051 if res != nil && res.StatusCode == http.StatusNotModified {
6052 if res.Body != nil {
6053 res.Body.Close()
6054 }
6055 return nil, gensupport.WrapError(&googleapi.Error{
6056 Code: res.StatusCode,
6057 Header: res.Header,
6058 })
6059 }
6060 if err != nil {
6061 return nil, err
6062 }
6063 defer googleapi.CloseBody(res)
6064 if err := googleapi.CheckResponse(res); err != nil {
6065 return nil, gensupport.WrapError(err)
6066 }
6067 ret := &Operation{
6068 ServerResponse: googleapi.ServerResponse{
6069 Header: res.Header,
6070 HTTPStatusCode: res.StatusCode,
6071 },
6072 }
6073 target := &ret
6074 b, err := gensupport.DecodeResponseBytes(target, res)
6075 if err != nil {
6076 return nil, err
6077 }
6078 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "domains.projects.locations.registrations.transfer", "response", internallog.HTTPResponse(res, b))
6079 return ret, nil
6080 }