1// Copyright 2021 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15syntax = "proto3";
16
17package google.cloud.domains.v1beta1;
18
19import "google/api/annotations.proto";
20import "google/api/client.proto";
21import "google/api/field_behavior.proto";
22import "google/api/resource.proto";
23import "google/longrunning/operations.proto";
24import "google/protobuf/field_mask.proto";
25import "google/protobuf/timestamp.proto";
26import "google/type/money.proto";
27import "google/type/postal_address.proto";
28
29option go_package = "cloud.google.com/go/domains/apiv1beta1/domainspb;domainspb";
30option java_multiple_files = true;
31option java_outer_classname = "DomainsProto";
32option java_package = "com.google.cloud.domains.v1beta1";
33
34// The Cloud Domains API enables management and configuration of domain names.
35service Domains {
36  option (google.api.default_host) = "domains.googleapis.com";
37  option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform";
38
39  // Searches for available domain names similar to the provided query.
40  //
41  // Availability results from this method are approximate; call
42  // `RetrieveRegisterParameters` on a domain before registering to confirm
43  // availability.
44  rpc SearchDomains(SearchDomainsRequest) returns (SearchDomainsResponse) {
45    option (google.api.http) = {
46      get: "/v1beta1/{location=projects/*/locations/*}/registrations:searchDomains"
47    };
48    option (google.api.method_signature) = "location,query";
49  }
50
51  // Gets parameters needed to register a new domain name, including price and
52  // up-to-date availability. Use the returned values to call `RegisterDomain`.
53  rpc RetrieveRegisterParameters(RetrieveRegisterParametersRequest) returns (RetrieveRegisterParametersResponse) {
54    option (google.api.http) = {
55      get: "/v1beta1/{location=projects/*/locations/*}/registrations:retrieveRegisterParameters"
56    };
57    option (google.api.method_signature) = "location,domain_name";
58  }
59
60  // Registers a new domain name and creates a corresponding `Registration`
61  // resource.
62  //
63  // Call `RetrieveRegisterParameters` first to check availability of the domain
64  // name and determine parameters like price that are needed to build a call to
65  // this method.
66  //
67  // A successful call creates a `Registration` resource in state
68  // `REGISTRATION_PENDING`, which resolves to `ACTIVE` within 1-2
69  // minutes, indicating that the domain was successfully registered. If the
70  // resource ends up in state `REGISTRATION_FAILED`, it indicates that the
71  // domain was not registered successfully, and you can safely delete the
72  // resource and retry registration.
73  rpc RegisterDomain(RegisterDomainRequest) returns (google.longrunning.Operation) {
74    option (google.api.http) = {
75      post: "/v1beta1/{parent=projects/*/locations/*}/registrations:register"
76      body: "*"
77    };
78    option (google.api.method_signature) = "parent,registration,yearly_price";
79    option (google.longrunning.operation_info) = {
80      response_type: "Registration"
81      metadata_type: "OperationMetadata"
82    };
83  }
84
85  // Gets parameters needed to transfer a domain name from another registrar to
86  // Cloud Domains. For domains managed by Google Domains, transferring to Cloud
87  // Domains is not supported.
88  //
89  //
90  // Use the returned values to call `TransferDomain`.
91  rpc RetrieveTransferParameters(RetrieveTransferParametersRequest) returns (RetrieveTransferParametersResponse) {
92    option (google.api.http) = {
93      get: "/v1beta1/{location=projects/*/locations/*}/registrations:retrieveTransferParameters"
94    };
95    option (google.api.method_signature) = "location,domain_name";
96  }
97
98  // Transfers a domain name from another registrar to Cloud Domains.  For
99  // domains managed by Google Domains, transferring to Cloud Domains is not
100  // supported.
101  //
102  //
103  // Before calling this method, go to the domain's current registrar to unlock
104  // the domain for transfer and retrieve the domain's transfer authorization
105  // code. Then call `RetrieveTransferParameters` to confirm that the domain is
106  // unlocked and to get values needed to build a call to this method.
107  //
108  // A successful call creates a `Registration` resource in state
109  // `TRANSFER_PENDING`. It can take several days to complete the transfer
110  // process. The registrant can often speed up this process by approving the
111  // transfer through the current registrar, either by clicking a link in an
112  // email from the registrar or by visiting the registrar's website.
113  //
114  // A few minutes after transfer approval, the resource transitions to state
115  // `ACTIVE`, indicating that the transfer was successful. If the transfer is
116  // rejected or the request expires without being approved, the resource can
117  // end up in state `TRANSFER_FAILED`. If transfer fails, you can safely delete
118  // the resource and retry the transfer.
119  rpc TransferDomain(TransferDomainRequest) returns (google.longrunning.Operation) {
120    option (google.api.http) = {
121      post: "/v1beta1/{parent=projects/*/locations/*}/registrations:transfer"
122      body: "*"
123    };
124    option (google.api.method_signature) = "parent,registration,yearly_price,authorization_code";
125    option (google.longrunning.operation_info) = {
126      response_type: "Registration"
127      metadata_type: "OperationMetadata"
128    };
129  }
130
131  // Lists the `Registration` resources in a project.
132  rpc ListRegistrations(ListRegistrationsRequest) returns (ListRegistrationsResponse) {
133    option (google.api.http) = {
134      get: "/v1beta1/{parent=projects/*/locations/*}/registrations"
135    };
136    option (google.api.method_signature) = "parent";
137  }
138
139  // Gets the details of a `Registration` resource.
140  rpc GetRegistration(GetRegistrationRequest) returns (Registration) {
141    option (google.api.http) = {
142      get: "/v1beta1/{name=projects/*/locations/*/registrations/*}"
143    };
144    option (google.api.method_signature) = "name";
145  }
146
147  // Updates select fields of a `Registration` resource, notably `labels`. To
148  // update other fields, use the appropriate custom update method:
149  //
150  // * To update management settings, see `ConfigureManagementSettings`
151  // * To update DNS configuration, see `ConfigureDnsSettings`
152  // * To update contact information, see `ConfigureContactSettings`
153  rpc UpdateRegistration(UpdateRegistrationRequest) returns (google.longrunning.Operation) {
154    option (google.api.http) = {
155      patch: "/v1beta1/{registration.name=projects/*/locations/*/registrations/*}"
156      body: "registration"
157    };
158    option (google.api.method_signature) = "registration,update_mask";
159    option (google.longrunning.operation_info) = {
160      response_type: "Registration"
161      metadata_type: "OperationMetadata"
162    };
163  }
164
165  // Updates a `Registration`'s management settings.
166  rpc ConfigureManagementSettings(ConfigureManagementSettingsRequest) returns (google.longrunning.Operation) {
167    option (google.api.http) = {
168      post: "/v1beta1/{registration=projects/*/locations/*/registrations/*}:configureManagementSettings"
169      body: "*"
170    };
171    option (google.api.method_signature) = "registration,management_settings,update_mask";
172    option (google.longrunning.operation_info) = {
173      response_type: "Registration"
174      metadata_type: "OperationMetadata"
175    };
176  }
177
178  // Updates a `Registration`'s DNS settings.
179  rpc ConfigureDnsSettings(ConfigureDnsSettingsRequest) returns (google.longrunning.Operation) {
180    option (google.api.http) = {
181      post: "/v1beta1/{registration=projects/*/locations/*/registrations/*}:configureDnsSettings"
182      body: "*"
183    };
184    option (google.api.method_signature) = "registration,dns_settings,update_mask";
185    option (google.longrunning.operation_info) = {
186      response_type: "Registration"
187      metadata_type: "OperationMetadata"
188    };
189  }
190
191  // Updates a `Registration`'s contact settings. Some changes require
192  // confirmation by the domain's registrant contact .
193  rpc ConfigureContactSettings(ConfigureContactSettingsRequest) returns (google.longrunning.Operation) {
194    option (google.api.http) = {
195      post: "/v1beta1/{registration=projects/*/locations/*/registrations/*}:configureContactSettings"
196      body: "*"
197    };
198    option (google.api.method_signature) = "registration,contact_settings,update_mask";
199    option (google.longrunning.operation_info) = {
200      response_type: "Registration"
201      metadata_type: "OperationMetadata"
202    };
203  }
204
205  // Exports a `Registration` resource, such that it is no longer managed by
206  // Cloud Domains.
207  //
208  // When an active domain is successfully exported, you can continue to use the
209  // domain in [Google Domains](https://domains.google/) until it expires. The
210  // calling user becomes the domain's sole owner in Google Domains, and
211  // permissions for the domain are subsequently managed there. The domain does
212  // not renew automatically unless the new owner sets up billing in Google
213  // Domains.
214  rpc ExportRegistration(ExportRegistrationRequest) returns (google.longrunning.Operation) {
215    option (google.api.http) = {
216      post: "/v1beta1/{name=projects/*/locations/*/registrations/*}:export"
217      body: "*"
218    };
219    option (google.api.method_signature) = "name";
220    option (google.longrunning.operation_info) = {
221      response_type: "Registration"
222      metadata_type: "OperationMetadata"
223    };
224  }
225
226  // Deletes a `Registration` resource.
227  //
228  // This method works on any `Registration` resource using [Subscription or
229  // Commitment billing](/domains/pricing#billing-models), provided that the
230  // resource was created at least 1 day in the past.
231  //
232  // For `Registration` resources using
233  // [Monthly billing](/domains/pricing#billing-models), this method works if:
234  //
235  // * `state` is `EXPORTED` with `expire_time` in the past
236  // * `state` is `REGISTRATION_FAILED`
237  // * `state` is `TRANSFER_FAILED`
238  //
239  // When an active registration is successfully deleted, you can continue to
240  // use the domain in [Google Domains](https://domains.google/) until it
241  // expires. The calling user becomes the domain's sole owner in Google
242  // Domains, and permissions for the domain are subsequently managed there. The
243  // domain does not renew automatically unless the new owner sets up billing in
244  // Google Domains.
245  rpc DeleteRegistration(DeleteRegistrationRequest) returns (google.longrunning.Operation) {
246    option (google.api.http) = {
247      delete: "/v1beta1/{name=projects/*/locations/*/registrations/*}"
248    };
249    option (google.api.method_signature) = "name";
250    option (google.longrunning.operation_info) = {
251      response_type: "google.protobuf.Empty"
252      metadata_type: "OperationMetadata"
253    };
254  }
255
256  // Gets the authorization code of the `Registration` for the purpose of
257  // transferring the domain to another registrar.
258  //
259  // You can call this method only after 60 days have elapsed since the initial
260  // domain registration.
261  rpc RetrieveAuthorizationCode(RetrieveAuthorizationCodeRequest) returns (AuthorizationCode) {
262    option (google.api.http) = {
263      get: "/v1beta1/{registration=projects/*/locations/*/registrations/*}:retrieveAuthorizationCode"
264    };
265    option (google.api.method_signature) = "registration";
266  }
267
268  // Resets the authorization code of the `Registration` to a new random string.
269  //
270  // You can call this method only after 60 days have elapsed since the initial
271  // domain registration.
272  rpc ResetAuthorizationCode(ResetAuthorizationCodeRequest) returns (AuthorizationCode) {
273    option (google.api.http) = {
274      post: "/v1beta1/{registration=projects/*/locations/*/registrations/*}:resetAuthorizationCode"
275      body: "*"
276    };
277    option (google.api.method_signature) = "registration";
278  }
279}
280
281// The `Registration` resource facilitates managing and configuring domain name
282// registrations.
283//
284// There are several ways to create a new `Registration` resource:
285//
286// To create a new `Registration` resource, find a suitable domain name by
287// calling the `SearchDomains` method with a query to see available domain name
288// options. After choosing a name, call `RetrieveRegisterParameters` to
289// ensure availability and obtain information like pricing, which is needed to
290// build a call to `RegisterDomain`.
291//
292// Another way to create a new `Registration` is to transfer an existing
293// domain from another registrar. First, go to the current registrar to unlock
294// the domain for transfer and retrieve the domain's transfer authorization
295// code. Then call `RetrieveTransferParameters` to confirm that the domain is
296// unlocked and to get values needed to build a call to `TransferDomain`.
297message Registration {
298  option (google.api.resource) = {
299    type: "domains.googleapis.com/Registration"
300    pattern: "projects/{project}/locations/{location}/registrations/{registration}"
301  };
302
303  // Possible states of a `Registration`.
304  enum State {
305    // The state is undefined.
306    STATE_UNSPECIFIED = 0;
307
308    // The domain is being registered.
309    REGISTRATION_PENDING = 1;
310
311    // The domain registration failed. You can delete resources in this state
312    // to allow registration to be retried.
313    REGISTRATION_FAILED = 2;
314
315    // The domain is being transferred from another registrar to Cloud Domains.
316    TRANSFER_PENDING = 3;
317
318    // The attempt to transfer the domain from another registrar to
319    // Cloud Domains failed. You can delete resources in this state and retry
320    // the transfer.
321    TRANSFER_FAILED = 4;
322
323    // The domain is registered and operational. The domain renews automatically
324    // as long as it remains in this state.
325    ACTIVE = 6;
326
327    // The domain is suspended and inoperative. For more details, see the
328    // `issues` field.
329    SUSPENDED = 7;
330
331    // The domain is no longer managed with Cloud Domains. It may have been
332    // transferred to another registrar or exported for management in
333    // [Google Domains](https://domains.google/). You can no longer update it
334    // with this API, and information shown about it may be stale. Domains in
335    // this state are not automatically renewed by Cloud Domains.
336    EXPORTED = 8;
337  }
338
339  // Possible issues with a `Registration` that require attention.
340  enum Issue {
341    // The issue is undefined.
342    ISSUE_UNSPECIFIED = 0;
343
344    // Contact the Cloud Support team to resolve a problem with this domain.
345    CONTACT_SUPPORT = 1;
346
347    // [ICANN](https://icann.org/) requires verification of the email address
348    // in the `Registration`'s `contact_settings.registrant_contact` field. To
349    // verify the email address, follow the
350    // instructions in the email the `registrant_contact` receives following
351    // registration. If you do not complete email verification within
352    // 15 days of registration, the domain is suspended. To resend the
353    // verification email, call ConfigureContactSettings and provide the current
354    // `registrant_contact.email`.
355    UNVERIFIED_EMAIL = 2;
356  }
357
358  // Output only. Name of the `Registration` resource, in the format
359  // `projects/*/locations/*/registrations/<domain_name>`.
360  string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
361
362  // Required. Immutable. The domain name. Unicode domain names must be expressed in Punycode format.
363  string domain_name = 2 [
364    (google.api.field_behavior) = REQUIRED,
365    (google.api.field_behavior) = IMMUTABLE
366  ];
367
368  // Output only. The creation timestamp of the `Registration` resource.
369  google.protobuf.Timestamp create_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
370
371  // Output only. The expiration timestamp of the `Registration`.
372  google.protobuf.Timestamp expire_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
373
374  // Output only. The state of the `Registration`
375  State state = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
376
377  // Output only. The set of issues with the `Registration` that require attention.
378  repeated Issue issues = 8 [(google.api.field_behavior) = OUTPUT_ONLY];
379
380  // Set of labels associated with the `Registration`.
381  map<string, string> labels = 9;
382
383  // Settings for management of the `Registration`, including renewal, billing,
384  // and transfer. You cannot update these with the `UpdateRegistration`
385  // method. To update these settings, use the `ConfigureManagementSettings`
386  // method.
387  ManagementSettings management_settings = 10;
388
389  // Settings controlling the DNS configuration of the `Registration`. You
390  // cannot update these with the `UpdateRegistration` method. To update these
391  // settings, use the `ConfigureDnsSettings` method.
392  DnsSettings dns_settings = 11;
393
394  // Required. Settings for contact information linked to the `Registration`. You cannot
395  // update these with the `UpdateRegistration` method. To update these
396  // settings, use the `ConfigureContactSettings` method.
397  ContactSettings contact_settings = 12 [(google.api.field_behavior) = REQUIRED];
398
399  // Output only. Pending contact settings for the `Registration`. Updates to the
400  // `contact_settings` field that change its `registrant_contact` or `privacy`
401  // fields require email confirmation by the `registrant_contact`
402  // before taking effect. This field is set only if there are pending updates
403  // to the `contact_settings` that have not been confirmed. To confirm the
404  // changes, the `registrant_contact` must follow the instructions in the
405  // email they receive.
406  ContactSettings pending_contact_settings = 13 [(google.api.field_behavior) = OUTPUT_ONLY];
407
408  // Output only. Set of options for the `contact_settings.privacy` field that this
409  // `Registration` supports.
410  repeated ContactPrivacy supported_privacy = 14 [(google.api.field_behavior) = OUTPUT_ONLY];
411}
412
413// Defines renewal, billing, and transfer settings for a `Registration`.
414message ManagementSettings {
415  // Defines how the `Registration` is renewed.
416  enum RenewalMethod {
417    // The renewal method is undefined.
418    RENEWAL_METHOD_UNSPECIFIED = 0;
419
420    // The domain is automatically renewed each year .
421    //
422    // To disable automatic renewals, delete the resource by calling
423    // `DeleteRegistration` or export it by calling `ExportRegistration`.
424    AUTOMATIC_RENEWAL = 1;
425
426    // The domain must be explicitly renewed each year before its
427    // `expire_time`. This option is only available when the `Registration`
428    // is in state `EXPORTED`.
429    //
430    // To manage the domain's current billing and
431    // renewal settings, go to [Google Domains](https://domains.google/).
432    MANUAL_RENEWAL = 2;
433  }
434
435  // Output only. The renewal method for this `Registration`.
436  RenewalMethod renewal_method = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
437
438  // Controls whether the domain can be transferred to another registrar.
439  TransferLockState transfer_lock_state = 4;
440}
441
442// Defines the DNS configuration of a `Registration`, including name servers,
443// DNSSEC, and glue records.
444message DnsSettings {
445  // Configuration for an arbitrary DNS provider.
446  message CustomDns {
447    // Required. A list of name servers that store the DNS zone for this domain. Each name
448    // server is a domain name, with Unicode domain names expressed in
449    // Punycode format.
450    repeated string name_servers = 1 [(google.api.field_behavior) = REQUIRED];
451
452    // The list of DS records for this domain, which are used to enable DNSSEC.
453    // The domain's DNS provider can provide the values to set here. If this
454    // field is empty, DNSSEC is disabled.
455    repeated DsRecord ds_records = 2;
456  }
457
458  // Configuration for using the free DNS zone provided by Google Domains as a
459  // `Registration`'s `dns_provider`. You cannot configure the DNS zone itself
460  // using the API. To configure the DNS zone, go to
461  // [Google Domains](https://domains.google/).
462  message GoogleDomainsDns {
463    // Output only. A list of name servers that store the DNS zone for this domain. Each name
464    // server is a domain name, with Unicode domain names expressed in
465    // Punycode format. This field is automatically populated with the name
466    // servers assigned to the Google Domains DNS zone.
467    repeated string name_servers = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
468
469    // Required. The state of DS records for this domain. Used to enable or disable
470    // automatic DNSSEC.
471    DsState ds_state = 2 [(google.api.field_behavior) = REQUIRED];
472
473    // Output only. The list of DS records published for this domain. The list is
474    // automatically populated when `ds_state` is `DS_RECORDS_PUBLISHED`,
475    // otherwise it remains empty.
476    repeated DsRecord ds_records = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
477  }
478
479  // Defines a Delegation Signer (DS) record, which is needed to enable DNSSEC
480  // for a domain. It contains a digest (hash) of a DNSKEY record that must be
481  // present in the domain's DNS zone.
482  message DsRecord {
483    // List of algorithms used to create a DNSKEY. Certain
484    // algorithms are not supported for particular domains.
485    enum Algorithm {
486      // The algorithm is unspecified.
487      ALGORITHM_UNSPECIFIED = 0;
488
489      // RSA/MD5. Cannot be used for new deployments.
490      RSAMD5 = 1;
491
492      // Diffie-Hellman. Cannot be used for new deployments.
493      DH = 2;
494
495      // DSA/SHA1. Not recommended for new deployments.
496      DSA = 3;
497
498      // ECC. Not recommended for new deployments.
499      ECC = 4;
500
501      // RSA/SHA-1. Not recommended for new deployments.
502      RSASHA1 = 5;
503
504      // DSA-NSEC3-SHA1. Not recommended for new deployments.
505      DSANSEC3SHA1 = 6;
506
507      // RSA/SHA1-NSEC3-SHA1. Not recommended for new deployments.
508      RSASHA1NSEC3SHA1 = 7;
509
510      // RSA/SHA-256.
511      RSASHA256 = 8;
512
513      // RSA/SHA-512.
514      RSASHA512 = 10;
515
516      // GOST R 34.10-2001.
517      ECCGOST = 12;
518
519      // ECDSA Curve P-256 with SHA-256.
520      ECDSAP256SHA256 = 13;
521
522      // ECDSA Curve P-384 with SHA-384.
523      ECDSAP384SHA384 = 14;
524
525      // Ed25519.
526      ED25519 = 15;
527
528      // Ed448.
529      ED448 = 16;
530
531      // Reserved for Indirect Keys. Cannot be used for new deployments.
532      INDIRECT = 252;
533
534      // Private algorithm. Cannot be used for new deployments.
535      PRIVATEDNS = 253;
536
537      // Private algorithm OID. Cannot be used for new deployments.
538      PRIVATEOID = 254;
539    }
540
541    // List of hash functions that may have been used to generate a digest of a
542    // DNSKEY.
543    enum DigestType {
544      // The DigestType is unspecified.
545      DIGEST_TYPE_UNSPECIFIED = 0;
546
547      // SHA-1. Not recommended for new deployments.
548      SHA1 = 1;
549
550      // SHA-256.
551      SHA256 = 2;
552
553      // GOST R 34.11-94.
554      GOST3411 = 3;
555
556      // SHA-384.
557      SHA384 = 4;
558    }
559
560    // The key tag of the record. Must be set in range 0 -- 65535.
561    int32 key_tag = 1;
562
563    // The algorithm used to generate the referenced DNSKEY.
564    Algorithm algorithm = 2;
565
566    // The hash function used to generate the digest of the referenced DNSKEY.
567    DigestType digest_type = 3;
568
569    // The digest generated from the referenced DNSKEY.
570    string digest = 4;
571  }
572
573  // Defines a host on your domain that is a DNS name server for your domain
574  // and/or other domains. Glue records are a way of making the IP address of a
575  // name server known, even when it serves DNS queries for its parent domain.
576  // For example, when `ns.example.com` is a name server for `example.com`, the
577  // host `ns.example.com` must have a glue record to break the circular DNS
578  // reference.
579  message GlueRecord {
580    // Required. Domain name of the host in Punycode format.
581    string host_name = 1 [(google.api.field_behavior) = REQUIRED];
582
583    // List of IPv4 addresses corresponding to this host in the standard decimal
584    // format (e.g. `198.51.100.1`). At least one of `ipv4_address` and
585    // `ipv6_address` must be set.
586    repeated string ipv4_addresses = 2;
587
588    // List of IPv6 addresses corresponding to this host in the standard
589    // hexadecimal format (e.g. `2001:db8::`). At least one of
590    // `ipv4_address` and `ipv6_address` must be set.
591    repeated string ipv6_addresses = 3;
592  }
593
594  // The publication state of DS records for a `Registration`.
595  enum DsState {
596    // DS state is unspecified.
597    DS_STATE_UNSPECIFIED = 0;
598
599    // DNSSEC is disabled for this domain. No DS records for this domain are
600    // published in the parent DNS zone.
601    DS_RECORDS_UNPUBLISHED = 1;
602
603    // DNSSEC is enabled for this domain. Appropriate DS records for this domain
604    // are published in the parent DNS zone. This option is valid only if the
605    // DNS zone referenced in the `Registration`'s `dns_provider` field is
606    // already DNSSEC-signed.
607    DS_RECORDS_PUBLISHED = 2;
608  }
609
610  // The DNS provider of the registration.
611  oneof dns_provider {
612    // An arbitrary DNS provider identified by its name servers.
613    CustomDns custom_dns = 1;
614
615    // The free DNS zone provided by
616    // [Google Domains](https://domains.google/).
617    GoogleDomainsDns google_domains_dns = 2;
618  }
619
620  // The list of glue records for this `Registration`. Commonly empty.
621  repeated GlueRecord glue_records = 4;
622}
623
624// Defines the contact information associated with a `Registration`.
625//
626// [ICANN](https://icann.org/) requires all domain names to have associated
627// contact information. The `registrant_contact` is considered the
628// domain's legal owner, and often the other contacts are identical.
629message ContactSettings {
630  // Details required for a contact associated with a `Registration`.
631  message Contact {
632    // Required. Postal address of the contact.
633    google.type.PostalAddress postal_address = 1 [(google.api.field_behavior) = REQUIRED];
634
635    // Required. Email address of the contact.
636    string email = 2 [(google.api.field_behavior) = REQUIRED];
637
638    // Required. Phone number of the contact in international format. For example,
639    // `"+1-800-555-0123"`.
640    string phone_number = 3 [(google.api.field_behavior) = REQUIRED];
641
642    // Fax number of the contact in international format. For example,
643    // `"+1-800-555-0123"`.
644    string fax_number = 4;
645  }
646
647  // Required. Privacy setting for the contacts associated with the `Registration`.
648  ContactPrivacy privacy = 1 [(google.api.field_behavior) = REQUIRED];
649
650  // Required. The registrant contact for the `Registration`.
651  //
652  // *Caution: Anyone with access to this email address, phone number,
653  // and/or postal address can take control of the domain.*
654  //
655  // *Warning: For new `Registration`s, the registrant receives an email
656  // confirmation that they must complete within 15 days to avoid domain
657  // suspension.*
658  Contact registrant_contact = 2 [(google.api.field_behavior) = REQUIRED];
659
660  // Required. The administrative contact for the `Registration`.
661  Contact admin_contact = 3 [(google.api.field_behavior) = REQUIRED];
662
663  // Required. The technical contact for the `Registration`.
664  Contact technical_contact = 4 [(google.api.field_behavior) = REQUIRED];
665}
666
667// Request for the `SearchDomains` method.
668message SearchDomainsRequest {
669  // Required. String used to search for available domain names.
670  string query = 1 [(google.api.field_behavior) = REQUIRED];
671
672  // Required. The location. Must be in the format `projects/*/locations/*`.
673  string location = 2 [
674    (google.api.field_behavior) = REQUIRED,
675    (google.api.resource_reference) = {
676      type: "locations.googleapis.com/Location"
677    }
678  ];
679}
680
681// Response for the `SearchDomains` method.
682message SearchDomainsResponse {
683  // Results of the domain name search.
684  repeated RegisterParameters register_parameters = 1;
685}
686
687// Request for the `RetrieveRegisterParameters` method.
688message RetrieveRegisterParametersRequest {
689  // Required. The domain name. Unicode domain names must be expressed in Punycode format.
690  string domain_name = 1 [(google.api.field_behavior) = REQUIRED];
691
692  // Required. The location. Must be in the format `projects/*/locations/*`.
693  string location = 2 [
694    (google.api.field_behavior) = REQUIRED,
695    (google.api.resource_reference) = {
696      type: "locations.googleapis.com/Location"
697    }
698  ];
699}
700
701// Response for the `RetrieveRegisterParameters` method.
702message RetrieveRegisterParametersResponse {
703  // Parameters to use when calling the `RegisterDomain` method.
704  RegisterParameters register_parameters = 1;
705}
706
707// Request for the `RegisterDomain` method.
708message RegisterDomainRequest {
709  // Required. The parent resource of the `Registration`. Must be in the
710  // format `projects/*/locations/*`.
711  string parent = 1 [
712    (google.api.field_behavior) = REQUIRED,
713    (google.api.resource_reference) = {
714      type: "locations.googleapis.com/Location"
715    }
716  ];
717
718  // Required. The complete `Registration` resource to be created.
719  Registration registration = 2 [(google.api.field_behavior) = REQUIRED];
720
721  // The list of domain notices that you acknowledge. Call
722  // `RetrieveRegisterParameters` to see the notices that need acknowledgement.
723  repeated DomainNotice domain_notices = 3;
724
725  // The list of contact notices that the caller acknowledges. The notices
726  // needed here depend on the values specified in
727  // `registration.contact_settings`.
728  repeated ContactNotice contact_notices = 4;
729
730  // Required. Yearly price to register or renew the domain.
731  // The value that should be put here can be obtained from
732  // RetrieveRegisterParameters or SearchDomains calls.
733  google.type.Money yearly_price = 5 [(google.api.field_behavior) = REQUIRED];
734
735  // When true, only validation is performed, without actually registering
736  // the domain. Follows:
737  // https://cloud.google.com/apis/design/design_patterns#request_validation
738  bool validate_only = 6;
739}
740
741// Request for the `RetrieveTransferParameters` method.
742message RetrieveTransferParametersRequest {
743  // Required. The domain name. Unicode domain names must be expressed in Punycode format.
744  string domain_name = 1 [(google.api.field_behavior) = REQUIRED];
745
746  // Required. The location. Must be in the format `projects/*/locations/*`.
747  string location = 2 [
748    (google.api.field_behavior) = REQUIRED,
749    (google.api.resource_reference) = {
750      type: "locations.googleapis.com/Location"
751    }
752  ];
753}
754
755// Response for the `RetrieveTransferParameters` method.
756message RetrieveTransferParametersResponse {
757  // Parameters to use when calling the `TransferDomain` method.
758  TransferParameters transfer_parameters = 1;
759}
760
761// Request for the `TransferDomain` method.
762message TransferDomainRequest {
763  // Required. The parent resource of the `Registration`. Must be in the
764  // format `projects/*/locations/*`.
765  string parent = 1 [
766    (google.api.field_behavior) = REQUIRED,
767    (google.api.resource_reference) = {
768      type: "locations.googleapis.com/Location"
769    }
770  ];
771
772  // Required. The complete `Registration` resource to be created.
773  //
774  // You can leave `registration.dns_settings` unset to import the
775  // domain's current DNS configuration from its current registrar. Use this
776  // option only if you are sure that the domain's current DNS service
777  // does not cease upon transfer, as is often the case for DNS services
778  // provided for free by the registrar.
779  Registration registration = 2 [(google.api.field_behavior) = REQUIRED];
780
781  // The list of contact notices that you acknowledge. The notices
782  // needed here depend on the values specified in
783  // `registration.contact_settings`.
784  repeated ContactNotice contact_notices = 3;
785
786  // Required. Acknowledgement of the price to transfer or renew the domain for one year.
787  // Call `RetrieveTransferParameters` to obtain the price, which you must
788  // acknowledge.
789  google.type.Money yearly_price = 4 [(google.api.field_behavior) = REQUIRED];
790
791  // The domain's transfer authorization code. You can obtain this from the
792  // domain's current registrar.
793  AuthorizationCode authorization_code = 5;
794
795  // Validate the request without actually transferring the domain.
796  bool validate_only = 6;
797}
798
799// Request for the `ListRegistrations` method.
800message ListRegistrationsRequest {
801  // Required. The project and location from which to list `Registration`s, specified in
802  // the format `projects/*/locations/*`.
803  string parent = 1 [
804    (google.api.field_behavior) = REQUIRED,
805    (google.api.resource_reference) = {
806      type: "locations.googleapis.com/Location"
807    }
808  ];
809
810  // Maximum number of results to return.
811  int32 page_size = 2;
812
813  // When set to the `next_page_token` from a prior response, provides the next
814  // page of results.
815  string page_token = 3;
816
817  // Filter expression to restrict the `Registration`s returned.
818  //
819  // The expression must specify the field name, a comparison operator, and the
820  // value that you want to use for filtering. The value must be a string, a
821  // number, a boolean, or an enum value. The comparison operator should be one
822  // of =, !=, >, <, >=, <=, or : for prefix or wildcard matches.
823  //
824  // For example, to filter to a specific domain name, use an expression like
825  // `domainName="example.com"`. You can also check for the existence of a
826  // field; for example, to find domains using custom DNS settings, use an
827  // expression like `dnsSettings.customDns:*`.
828  //
829  // You can also create compound filters by combining expressions with the
830  // `AND` and `OR` operators. For example, to find domains that are suspended
831  // or have specific issues flagged, use an expression like
832  // `(state=SUSPENDED) OR (issue:*)`.
833  string filter = 4;
834}
835
836// Response for the `ListRegistrations` method.
837message ListRegistrationsResponse {
838  // A list of `Registration`s.
839  repeated Registration registrations = 1;
840
841  // When present, there are more results to retrieve. Set `page_token` to this
842  // value on a subsequent call to get the next page of results.
843  string next_page_token = 2;
844}
845
846// Request for the `GetRegistration` method.
847message GetRegistrationRequest {
848  // Required. The name of the `Registration` to get, in the format
849  // `projects/*/locations/*/registrations/*`.
850  string name = 1 [
851    (google.api.field_behavior) = REQUIRED,
852    (google.api.resource_reference) = {
853      type: "domains.googleapis.com/Registration"
854    }
855  ];
856}
857
858// Request for the `UpdateRegistration` method.
859message UpdateRegistrationRequest {
860  // Fields of the `Registration` to update.
861  Registration registration = 1;
862
863  // Required. The field mask describing which fields to update as a comma-separated list.
864  // For example, if only the labels are being updated, the `update_mask` is
865  // `"labels"`.
866  google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED];
867}
868
869// Request for the `ConfigureManagementSettings` method.
870message ConfigureManagementSettingsRequest {
871  // Required. The name of the `Registration` whose management settings are being updated,
872  // in the format `projects/*/locations/*/registrations/*`.
873  string registration = 1 [
874    (google.api.field_behavior) = REQUIRED,
875    (google.api.resource_reference) = {
876      type: "domains.googleapis.com/Registration"
877    }
878  ];
879
880  // Fields of the `ManagementSettings` to update.
881  ManagementSettings management_settings = 2;
882
883  // Required. The field mask describing which fields to update as a comma-separated list.
884  // For example, if only the transfer lock is being updated, the `update_mask`
885  // is `"transfer_lock_state"`.
886  google.protobuf.FieldMask update_mask = 3 [(google.api.field_behavior) = REQUIRED];
887}
888
889// Request for the `ConfigureDnsSettings` method.
890message ConfigureDnsSettingsRequest {
891  // Required. The name of the `Registration` whose DNS settings are being updated,
892  // in the format `projects/*/locations/*/registrations/*`.
893  string registration = 1 [
894    (google.api.field_behavior) = REQUIRED,
895    (google.api.resource_reference) = {
896      type: "domains.googleapis.com/Registration"
897    }
898  ];
899
900  // Fields of the `DnsSettings` to update.
901  DnsSettings dns_settings = 2;
902
903  // Required. The field mask describing which fields to update as a comma-separated list.
904  // For example, if only the name servers are being updated for an existing
905  // Custom DNS configuration, the `update_mask` is
906  // `"custom_dns.name_servers"`.
907  //
908  // When changing the DNS provider from one type to another, pass the new
909  // provider's field name as part of the field mask. For example, when changing
910  // from a Google Domains DNS configuration to a Custom DNS configuration, the
911  // `update_mask` is `"custom_dns"`. //
912  google.protobuf.FieldMask update_mask = 3 [(google.api.field_behavior) = REQUIRED];
913
914  // Validate the request without actually updating the DNS settings.
915  bool validate_only = 4;
916}
917
918// Request for the `ConfigureContactSettings` method.
919message ConfigureContactSettingsRequest {
920  // Required. The name of the `Registration` whose contact settings are being updated,
921  // in the format `projects/*/locations/*/registrations/*`.
922  string registration = 1 [
923    (google.api.field_behavior) = REQUIRED,
924    (google.api.resource_reference) = {
925      type: "domains.googleapis.com/Registration"
926    }
927  ];
928
929  // Fields of the `ContactSettings` to update.
930  ContactSettings contact_settings = 2;
931
932  // Required. The field mask describing which fields to update as a comma-separated list.
933  // For example, if only the registrant contact is being updated, the
934  // `update_mask` is `"registrant_contact"`.
935  google.protobuf.FieldMask update_mask = 3 [(google.api.field_behavior) = REQUIRED];
936
937  // The list of contact notices that the caller acknowledges. The notices
938  // needed here depend on the values specified in `contact_settings`.
939  repeated ContactNotice contact_notices = 4;
940
941  // Validate the request without actually updating the contact settings.
942  bool validate_only = 5;
943}
944
945// Request for the `ExportRegistration` method.
946message ExportRegistrationRequest {
947  // Required. The name of the `Registration` to export,
948  // in the format `projects/*/locations/*/registrations/*`.
949  string name = 1 [
950    (google.api.field_behavior) = REQUIRED,
951    (google.api.resource_reference) = {
952      type: "domains.googleapis.com/Registration"
953    }
954  ];
955}
956
957// Request for the `DeleteRegistration` method.
958message DeleteRegistrationRequest {
959  // Required. The name of the `Registration` to delete,
960  // in the format `projects/*/locations/*/registrations/*`.
961  string name = 1 [
962    (google.api.field_behavior) = REQUIRED,
963    (google.api.resource_reference) = {
964      type: "domains.googleapis.com/Registration"
965    }
966  ];
967}
968
969// Request for the `RetrieveAuthorizationCode` method.
970message RetrieveAuthorizationCodeRequest {
971  // Required. The name of the `Registration` whose authorization code is being retrieved,
972  // in the format `projects/*/locations/*/registrations/*`.
973  string registration = 1 [
974    (google.api.field_behavior) = REQUIRED,
975    (google.api.resource_reference) = {
976      type: "domains.googleapis.com/Registration"
977    }
978  ];
979}
980
981// Request for the `ResetAuthorizationCode` method.
982message ResetAuthorizationCodeRequest {
983  // Required. The name of the `Registration` whose authorization code is being reset,
984  // in the format `projects/*/locations/*/registrations/*`.
985  string registration = 1 [
986    (google.api.field_behavior) = REQUIRED,
987    (google.api.resource_reference) = {
988      type: "domains.googleapis.com/Registration"
989    }
990  ];
991}
992
993// Parameters required to register a new domain.
994message RegisterParameters {
995  // Possible availability states of a domain name.
996  enum Availability {
997    // The availability is unspecified.
998    AVAILABILITY_UNSPECIFIED = 0;
999
1000    // The domain is available for registration.
1001    AVAILABLE = 1;
1002
1003    // The domain is not available for registration. Generally this means it is
1004    // already registered to another party.
1005    UNAVAILABLE = 2;
1006
1007    // The domain is not currently supported by Cloud Domains, but may
1008    // be available elsewhere.
1009    UNSUPPORTED = 3;
1010
1011    // Cloud Domains is unable to determine domain availability, generally
1012    // due to system maintenance at the domain name registry.
1013    UNKNOWN = 4;
1014  }
1015
1016  // The domain name. Unicode domain names are expressed in Punycode format.
1017  string domain_name = 1;
1018
1019  // Indicates whether the domain is available for registration. This value is
1020  // accurate when obtained by calling `RetrieveRegisterParameters`, but is
1021  // approximate when obtained by calling `SearchDomains`.
1022  Availability availability = 2;
1023
1024  // Contact privacy options that the domain supports.
1025  repeated ContactPrivacy supported_privacy = 3;
1026
1027  // Notices about special properties of the domain.
1028  repeated DomainNotice domain_notices = 4;
1029
1030  // Price to register or renew the domain for one year.
1031  google.type.Money yearly_price = 5;
1032}
1033
1034// Parameters required to transfer a domain from another registrar.
1035message TransferParameters {
1036  // The domain name. Unicode domain names are expressed in Punycode format.
1037  string domain_name = 1;
1038
1039  // The registrar that currently manages the domain.
1040  string current_registrar = 2;
1041
1042  // The name servers that currently store the configuration of the domain.
1043  repeated string name_servers = 3;
1044
1045  // Indicates whether the domain is protected by a transfer lock. For a
1046  // transfer to succeed, this must show `UNLOCKED`. To unlock a domain,
1047  // go to its current registrar.
1048  TransferLockState transfer_lock_state = 4;
1049
1050  // Contact privacy options that the domain supports.
1051  repeated ContactPrivacy supported_privacy = 5;
1052
1053  // Price to transfer or renew the domain for one year.
1054  google.type.Money yearly_price = 6;
1055}
1056
1057// Defines an authorization code.
1058message AuthorizationCode {
1059  // The Authorization Code in ASCII. It can be used to transfer the domain
1060  // to or from another registrar.
1061  string code = 1;
1062}
1063
1064// Represents the metadata of the long-running operation. Output only.
1065message OperationMetadata {
1066  // The time the operation was created.
1067  google.protobuf.Timestamp create_time = 1;
1068
1069  // The time the operation finished running.
1070  google.protobuf.Timestamp end_time = 2;
1071
1072  // Server-defined resource path for the target of the operation.
1073  string target = 3;
1074
1075  // Name of the verb executed by the operation.
1076  string verb = 4;
1077
1078  // Human-readable status of the operation, if any.
1079  string status_detail = 5;
1080
1081  // API version used to start the operation.
1082  string api_version = 6;
1083}
1084
1085// Defines a set of possible contact privacy settings for a `Registration`.
1086//
1087// [ICANN](https://icann.org/) maintains the WHOIS database, a publicly
1088// accessible mapping from domain name to contact information, and requires that
1089// each domain name have an entry. Choose from these options to control how much
1090// information in your `ContactSettings` is published.
1091enum ContactPrivacy {
1092  // The contact privacy settings are undefined.
1093  CONTACT_PRIVACY_UNSPECIFIED = 0;
1094
1095  // All the data from `ContactSettings` is publicly available. When setting
1096  // this option, you must also provide a
1097  // `PUBLIC_CONTACT_DATA_ACKNOWLEDGEMENT` in the `contact_notices` field of the
1098  // request.
1099  PUBLIC_CONTACT_DATA = 1;
1100
1101  // None of the data from `ContactSettings` is publicly available. Instead,
1102  // proxy contact data is published for your domain. Email sent to the proxy
1103  // email address is forwarded to the registrant's email address. Cloud Domains
1104  // provides this privacy proxy service at no additional cost.
1105  PRIVATE_CONTACT_DATA = 2;
1106
1107  // Some data from `ContactSettings` is publicly available. The actual
1108  // information redacted depends on the domain. For details, see [the
1109  // registration privacy
1110  // article](https://support.google.com/domains/answer/3251242).
1111  REDACTED_CONTACT_DATA = 3;
1112}
1113
1114// Notices about special properties of certain domains.
1115enum DomainNotice {
1116  // The notice is undefined.
1117  DOMAIN_NOTICE_UNSPECIFIED = 0;
1118
1119  // Indicates that the domain is preloaded on the HTTP Strict Transport
1120  // Security list in browsers. Serving a website on such domain requires
1121  // an SSL certificate. For details, see
1122  // [how to get an SSL
1123  // certificate](https://support.google.com/domains/answer/7638036).
1124  HSTS_PRELOADED = 1;
1125}
1126
1127// Notices related to contact information.
1128enum ContactNotice {
1129  // The notice is undefined.
1130  CONTACT_NOTICE_UNSPECIFIED = 0;
1131
1132  // Required when setting the `privacy` field of `ContactSettings` to
1133  // `PUBLIC_CONTACT_DATA`, which exposes contact data publicly.
1134  PUBLIC_CONTACT_DATA_ACKNOWLEDGEMENT = 1;
1135}
1136
1137// Possible states of a `Registration`'s transfer lock.
1138enum TransferLockState {
1139  // The state is unspecified.
1140  TRANSFER_LOCK_STATE_UNSPECIFIED = 0;
1141
1142  // The domain is unlocked and can be transferred to another registrar.
1143  UNLOCKED = 1;
1144
1145  // The domain is locked and cannot be transferred to another registrar.
1146  LOCKED = 2;
1147}
1148