1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
// This file is @generated by prost-build.
/// The `Registration` resource facilitates managing and configuring domain name
/// registrations.
///
/// There are several ways to create a new `Registration` resource:
///
/// To create a new `Registration` resource, find a suitable domain name by
/// calling the `SearchDomains` method with a query to see available domain name
/// options. After choosing a name, call `RetrieveRegisterParameters` to
/// ensure availability and obtain information like pricing, which is needed to
/// build a call to `RegisterDomain`.
///
/// Another way to create a new `Registration` is to transfer an existing
/// domain from another registrar. First, go to the current registrar to unlock
/// the domain for transfer and retrieve the domain's transfer authorization
/// code. Then call `RetrieveTransferParameters` to confirm that the domain is
/// unlocked and to get values needed to build a call to `TransferDomain`.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Registration {
    /// Output only. Name of the `Registration` resource, in the format
    /// `projects/*/locations/*/registrations/<domain_name>`.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Required. Immutable. The domain name. Unicode domain names must be expressed in Punycode format.
    #[prost(string, tag = "2")]
    pub domain_name: ::prost::alloc::string::String,
    /// Output only. The creation timestamp of the `Registration` resource.
    #[prost(message, optional, tag = "3")]
    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. The expiration timestamp of the `Registration`.
    #[prost(message, optional, tag = "6")]
    pub expire_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. The state of the `Registration`
    #[prost(enumeration = "registration::State", tag = "7")]
    pub state: i32,
    /// Output only. The set of issues with the `Registration` that require attention.
    #[prost(enumeration = "registration::Issue", repeated, packed = "false", tag = "8")]
    pub issues: ::prost::alloc::vec::Vec<i32>,
    /// Set of labels associated with the `Registration`.
    #[prost(btree_map = "string, string", tag = "9")]
    pub labels: ::prost::alloc::collections::BTreeMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
    /// Settings for management of the `Registration`, including renewal, billing,
    /// and transfer. You cannot update these with the `UpdateRegistration`
    /// method. To update these settings, use the `ConfigureManagementSettings`
    /// method.
    #[prost(message, optional, tag = "10")]
    pub management_settings: ::core::option::Option<ManagementSettings>,
    /// Settings controlling the DNS configuration of the `Registration`. You
    /// cannot update these with the `UpdateRegistration` method. To update these
    /// settings, use the `ConfigureDnsSettings` method.
    #[prost(message, optional, tag = "11")]
    pub dns_settings: ::core::option::Option<DnsSettings>,
    /// Required. Settings for contact information linked to the `Registration`. You cannot
    /// update these with the `UpdateRegistration` method. To update these
    /// settings, use the `ConfigureContactSettings` method.
    #[prost(message, optional, tag = "12")]
    pub contact_settings: ::core::option::Option<ContactSettings>,
    /// Output only. Pending contact settings for the `Registration`. Updates to the
    /// `contact_settings` field that change its `registrant_contact` or `privacy`
    /// fields require email confirmation by the `registrant_contact`
    /// before taking effect. This field is set only if there are pending updates
    /// to the `contact_settings` that have not been confirmed. To confirm the
    /// changes, the `registrant_contact` must follow the instructions in the
    /// email they receive.
    #[prost(message, optional, tag = "13")]
    pub pending_contact_settings: ::core::option::Option<ContactSettings>,
    /// Output only. Set of options for the `contact_settings.privacy` field that this
    /// `Registration` supports.
    #[prost(enumeration = "ContactPrivacy", repeated, packed = "false", tag = "14")]
    pub supported_privacy: ::prost::alloc::vec::Vec<i32>,
}
/// Nested message and enum types in `Registration`.
pub mod registration {
    /// Possible states of a `Registration`.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum State {
        /// The state is undefined.
        Unspecified = 0,
        /// The domain is being registered.
        RegistrationPending = 1,
        /// The domain registration failed. You can delete resources in this state
        /// to allow registration to be retried.
        RegistrationFailed = 2,
        /// The domain is being transferred from another registrar to Cloud Domains.
        TransferPending = 3,
        /// The attempt to transfer the domain from another registrar to
        /// Cloud Domains failed. You can delete resources in this state and retry
        /// the transfer.
        TransferFailed = 4,
        /// The domain is registered and operational. The domain renews automatically
        /// as long as it remains in this state.
        Active = 6,
        /// The domain is suspended and inoperative. For more details, see the
        /// `issues` field.
        Suspended = 7,
        /// The domain is no longer managed with Cloud Domains. It may have been
        /// transferred to another registrar or exported for management in
        /// [Google Domains](<https://domains.google/>). You can no longer update it
        /// with this API, and information shown about it may be stale. Domains in
        /// this state are not automatically renewed by Cloud Domains.
        Exported = 8,
    }
    impl State {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                State::Unspecified => "STATE_UNSPECIFIED",
                State::RegistrationPending => "REGISTRATION_PENDING",
                State::RegistrationFailed => "REGISTRATION_FAILED",
                State::TransferPending => "TRANSFER_PENDING",
                State::TransferFailed => "TRANSFER_FAILED",
                State::Active => "ACTIVE",
                State::Suspended => "SUSPENDED",
                State::Exported => "EXPORTED",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "STATE_UNSPECIFIED" => Some(Self::Unspecified),
                "REGISTRATION_PENDING" => Some(Self::RegistrationPending),
                "REGISTRATION_FAILED" => Some(Self::RegistrationFailed),
                "TRANSFER_PENDING" => Some(Self::TransferPending),
                "TRANSFER_FAILED" => Some(Self::TransferFailed),
                "ACTIVE" => Some(Self::Active),
                "SUSPENDED" => Some(Self::Suspended),
                "EXPORTED" => Some(Self::Exported),
                _ => None,
            }
        }
    }
    /// Possible issues with a `Registration` that require attention.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum Issue {
        /// The issue is undefined.
        Unspecified = 0,
        /// Contact the Cloud Support team to resolve a problem with this domain.
        ContactSupport = 1,
        /// [ICANN](<https://icann.org/>) requires verification of the email address
        /// in the `Registration`'s `contact_settings.registrant_contact` field. To
        /// verify the email address, follow the
        /// instructions in the email the `registrant_contact` receives following
        /// registration. If you do not complete email verification within
        /// 15 days of registration, the domain is suspended. To resend the
        /// verification email, call ConfigureContactSettings and provide the current
        /// `registrant_contact.email`.
        UnverifiedEmail = 2,
    }
    impl Issue {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Issue::Unspecified => "ISSUE_UNSPECIFIED",
                Issue::ContactSupport => "CONTACT_SUPPORT",
                Issue::UnverifiedEmail => "UNVERIFIED_EMAIL",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "ISSUE_UNSPECIFIED" => Some(Self::Unspecified),
                "CONTACT_SUPPORT" => Some(Self::ContactSupport),
                "UNVERIFIED_EMAIL" => Some(Self::UnverifiedEmail),
                _ => None,
            }
        }
    }
}
/// Defines renewal, billing, and transfer settings for a `Registration`.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ManagementSettings {
    /// Output only. The renewal method for this `Registration`.
    #[prost(enumeration = "management_settings::RenewalMethod", tag = "3")]
    pub renewal_method: i32,
    /// Controls whether the domain can be transferred to another registrar.
    #[prost(enumeration = "TransferLockState", tag = "4")]
    pub transfer_lock_state: i32,
}
/// Nested message and enum types in `ManagementSettings`.
pub mod management_settings {
    /// Defines how the `Registration` is renewed.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum RenewalMethod {
        /// The renewal method is undefined.
        Unspecified = 0,
        /// The domain is automatically renewed each year .
        ///
        /// To disable automatic renewals, delete the resource by calling
        /// `DeleteRegistration` or export it by calling `ExportRegistration`.
        AutomaticRenewal = 1,
        /// The domain must be explicitly renewed each year before its
        /// `expire_time`. This option is only available when the `Registration`
        /// is in state `EXPORTED`.
        ///
        /// To manage the domain's current billing and
        /// renewal settings, go to [Google Domains](<https://domains.google/>).
        ManualRenewal = 2,
    }
    impl RenewalMethod {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                RenewalMethod::Unspecified => "RENEWAL_METHOD_UNSPECIFIED",
                RenewalMethod::AutomaticRenewal => "AUTOMATIC_RENEWAL",
                RenewalMethod::ManualRenewal => "MANUAL_RENEWAL",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "RENEWAL_METHOD_UNSPECIFIED" => Some(Self::Unspecified),
                "AUTOMATIC_RENEWAL" => Some(Self::AutomaticRenewal),
                "MANUAL_RENEWAL" => Some(Self::ManualRenewal),
                _ => None,
            }
        }
    }
}
/// Defines the DNS configuration of a `Registration`, including name servers,
/// DNSSEC, and glue records.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DnsSettings {
    /// The list of glue records for this `Registration`. Commonly empty.
    #[prost(message, repeated, tag = "4")]
    pub glue_records: ::prost::alloc::vec::Vec<dns_settings::GlueRecord>,
    /// The DNS provider of the registration.
    #[prost(oneof = "dns_settings::DnsProvider", tags = "1, 2")]
    pub dns_provider: ::core::option::Option<dns_settings::DnsProvider>,
}
/// Nested message and enum types in `DnsSettings`.
pub mod dns_settings {
    /// Configuration for an arbitrary DNS provider.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct CustomDns {
        /// Required. A list of name servers that store the DNS zone for this domain. Each name
        /// server is a domain name, with Unicode domain names expressed in
        /// Punycode format.
        #[prost(string, repeated, tag = "1")]
        pub name_servers: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
        /// The list of DS records for this domain, which are used to enable DNSSEC.
        /// The domain's DNS provider can provide the values to set here. If this
        /// field is empty, DNSSEC is disabled.
        #[prost(message, repeated, tag = "2")]
        pub ds_records: ::prost::alloc::vec::Vec<DsRecord>,
    }
    /// Configuration for using the free DNS zone provided by Google Domains as a
    /// `Registration`'s `dns_provider`. You cannot configure the DNS zone itself
    /// using the API. To configure the DNS zone, go to
    /// [Google Domains](<https://domains.google/>).
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct GoogleDomainsDns {
        /// Output only. A list of name servers that store the DNS zone for this domain. Each name
        /// server is a domain name, with Unicode domain names expressed in
        /// Punycode format. This field is automatically populated with the name
        /// servers assigned to the Google Domains DNS zone.
        #[prost(string, repeated, tag = "1")]
        pub name_servers: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
        /// Required. The state of DS records for this domain. Used to enable or disable
        /// automatic DNSSEC.
        #[prost(enumeration = "DsState", tag = "2")]
        pub ds_state: i32,
        /// Output only. The list of DS records published for this domain. The list is
        /// automatically populated when `ds_state` is `DS_RECORDS_PUBLISHED`,
        /// otherwise it remains empty.
        #[prost(message, repeated, tag = "3")]
        pub ds_records: ::prost::alloc::vec::Vec<DsRecord>,
    }
    /// Defines a Delegation Signer (DS) record, which is needed to enable DNSSEC
    /// for a domain. It contains a digest (hash) of a DNSKEY record that must be
    /// present in the domain's DNS zone.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct DsRecord {
        /// The key tag of the record. Must be set in range 0 -- 65535.
        #[prost(int32, tag = "1")]
        pub key_tag: i32,
        /// The algorithm used to generate the referenced DNSKEY.
        #[prost(enumeration = "ds_record::Algorithm", tag = "2")]
        pub algorithm: i32,
        /// The hash function used to generate the digest of the referenced DNSKEY.
        #[prost(enumeration = "ds_record::DigestType", tag = "3")]
        pub digest_type: i32,
        /// The digest generated from the referenced DNSKEY.
        #[prost(string, tag = "4")]
        pub digest: ::prost::alloc::string::String,
    }
    /// Nested message and enum types in `DsRecord`.
    pub mod ds_record {
        /// List of algorithms used to create a DNSKEY. Certain
        /// algorithms are not supported for particular domains.
        #[derive(
            Clone,
            Copy,
            Debug,
            PartialEq,
            Eq,
            Hash,
            PartialOrd,
            Ord,
            ::prost::Enumeration
        )]
        #[repr(i32)]
        pub enum Algorithm {
            /// The algorithm is unspecified.
            Unspecified = 0,
            /// RSA/MD5. Cannot be used for new deployments.
            Rsamd5 = 1,
            /// Diffie-Hellman. Cannot be used for new deployments.
            Dh = 2,
            /// DSA/SHA1. Not recommended for new deployments.
            Dsa = 3,
            /// ECC. Not recommended for new deployments.
            Ecc = 4,
            /// RSA/SHA-1. Not recommended for new deployments.
            Rsasha1 = 5,
            /// DSA-NSEC3-SHA1. Not recommended for new deployments.
            Dsansec3sha1 = 6,
            /// RSA/SHA1-NSEC3-SHA1. Not recommended for new deployments.
            Rsasha1nsec3sha1 = 7,
            /// RSA/SHA-256.
            Rsasha256 = 8,
            /// RSA/SHA-512.
            Rsasha512 = 10,
            /// GOST R 34.10-2001.
            Eccgost = 12,
            /// ECDSA Curve P-256 with SHA-256.
            Ecdsap256sha256 = 13,
            /// ECDSA Curve P-384 with SHA-384.
            Ecdsap384sha384 = 14,
            /// Ed25519.
            Ed25519 = 15,
            /// Ed448.
            Ed448 = 16,
            /// Reserved for Indirect Keys. Cannot be used for new deployments.
            Indirect = 252,
            /// Private algorithm. Cannot be used for new deployments.
            Privatedns = 253,
            /// Private algorithm OID. Cannot be used for new deployments.
            Privateoid = 254,
        }
        impl Algorithm {
            /// String value of the enum field names used in the ProtoBuf definition.
            ///
            /// The values are not transformed in any way and thus are considered stable
            /// (if the ProtoBuf definition does not change) and safe for programmatic use.
            pub fn as_str_name(&self) -> &'static str {
                match self {
                    Algorithm::Unspecified => "ALGORITHM_UNSPECIFIED",
                    Algorithm::Rsamd5 => "RSAMD5",
                    Algorithm::Dh => "DH",
                    Algorithm::Dsa => "DSA",
                    Algorithm::Ecc => "ECC",
                    Algorithm::Rsasha1 => "RSASHA1",
                    Algorithm::Dsansec3sha1 => "DSANSEC3SHA1",
                    Algorithm::Rsasha1nsec3sha1 => "RSASHA1NSEC3SHA1",
                    Algorithm::Rsasha256 => "RSASHA256",
                    Algorithm::Rsasha512 => "RSASHA512",
                    Algorithm::Eccgost => "ECCGOST",
                    Algorithm::Ecdsap256sha256 => "ECDSAP256SHA256",
                    Algorithm::Ecdsap384sha384 => "ECDSAP384SHA384",
                    Algorithm::Ed25519 => "ED25519",
                    Algorithm::Ed448 => "ED448",
                    Algorithm::Indirect => "INDIRECT",
                    Algorithm::Privatedns => "PRIVATEDNS",
                    Algorithm::Privateoid => "PRIVATEOID",
                }
            }
            /// Creates an enum from field names used in the ProtoBuf definition.
            pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
                match value {
                    "ALGORITHM_UNSPECIFIED" => Some(Self::Unspecified),
                    "RSAMD5" => Some(Self::Rsamd5),
                    "DH" => Some(Self::Dh),
                    "DSA" => Some(Self::Dsa),
                    "ECC" => Some(Self::Ecc),
                    "RSASHA1" => Some(Self::Rsasha1),
                    "DSANSEC3SHA1" => Some(Self::Dsansec3sha1),
                    "RSASHA1NSEC3SHA1" => Some(Self::Rsasha1nsec3sha1),
                    "RSASHA256" => Some(Self::Rsasha256),
                    "RSASHA512" => Some(Self::Rsasha512),
                    "ECCGOST" => Some(Self::Eccgost),
                    "ECDSAP256SHA256" => Some(Self::Ecdsap256sha256),
                    "ECDSAP384SHA384" => Some(Self::Ecdsap384sha384),
                    "ED25519" => Some(Self::Ed25519),
                    "ED448" => Some(Self::Ed448),
                    "INDIRECT" => Some(Self::Indirect),
                    "PRIVATEDNS" => Some(Self::Privatedns),
                    "PRIVATEOID" => Some(Self::Privateoid),
                    _ => None,
                }
            }
        }
        /// List of hash functions that may have been used to generate a digest of a
        /// DNSKEY.
        #[derive(
            Clone,
            Copy,
            Debug,
            PartialEq,
            Eq,
            Hash,
            PartialOrd,
            Ord,
            ::prost::Enumeration
        )]
        #[repr(i32)]
        pub enum DigestType {
            /// The DigestType is unspecified.
            Unspecified = 0,
            /// SHA-1. Not recommended for new deployments.
            Sha1 = 1,
            /// SHA-256.
            Sha256 = 2,
            /// GOST R 34.11-94.
            Gost3411 = 3,
            /// SHA-384.
            Sha384 = 4,
        }
        impl DigestType {
            /// String value of the enum field names used in the ProtoBuf definition.
            ///
            /// The values are not transformed in any way and thus are considered stable
            /// (if the ProtoBuf definition does not change) and safe for programmatic use.
            pub fn as_str_name(&self) -> &'static str {
                match self {
                    DigestType::Unspecified => "DIGEST_TYPE_UNSPECIFIED",
                    DigestType::Sha1 => "SHA1",
                    DigestType::Sha256 => "SHA256",
                    DigestType::Gost3411 => "GOST3411",
                    DigestType::Sha384 => "SHA384",
                }
            }
            /// Creates an enum from field names used in the ProtoBuf definition.
            pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
                match value {
                    "DIGEST_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
                    "SHA1" => Some(Self::Sha1),
                    "SHA256" => Some(Self::Sha256),
                    "GOST3411" => Some(Self::Gost3411),
                    "SHA384" => Some(Self::Sha384),
                    _ => None,
                }
            }
        }
    }
    /// Defines a host on your domain that is a DNS name server for your domain
    /// and/or other domains. Glue records are a way of making the IP address of a
    /// name server known, even when it serves DNS queries for its parent domain.
    /// For example, when `ns.example.com` is a name server for `example.com`, the
    /// host `ns.example.com` must have a glue record to break the circular DNS
    /// reference.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct GlueRecord {
        /// Required. Domain name of the host in Punycode format.
        #[prost(string, tag = "1")]
        pub host_name: ::prost::alloc::string::String,
        /// List of IPv4 addresses corresponding to this host in the standard decimal
        /// format (e.g. `198.51.100.1`). At least one of `ipv4_address` and
        /// `ipv6_address` must be set.
        #[prost(string, repeated, tag = "2")]
        pub ipv4_addresses: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
        /// List of IPv6 addresses corresponding to this host in the standard
        /// hexadecimal format (e.g. `2001:db8::`). At least one of
        /// `ipv4_address` and `ipv6_address` must be set.
        #[prost(string, repeated, tag = "3")]
        pub ipv6_addresses: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    }
    /// The publication state of DS records for a `Registration`.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum DsState {
        /// DS state is unspecified.
        Unspecified = 0,
        /// DNSSEC is disabled for this domain. No DS records for this domain are
        /// published in the parent DNS zone.
        DsRecordsUnpublished = 1,
        /// DNSSEC is enabled for this domain. Appropriate DS records for this domain
        /// are published in the parent DNS zone. This option is valid only if the
        /// DNS zone referenced in the `Registration`'s `dns_provider` field is
        /// already DNSSEC-signed.
        DsRecordsPublished = 2,
    }
    impl DsState {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                DsState::Unspecified => "DS_STATE_UNSPECIFIED",
                DsState::DsRecordsUnpublished => "DS_RECORDS_UNPUBLISHED",
                DsState::DsRecordsPublished => "DS_RECORDS_PUBLISHED",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "DS_STATE_UNSPECIFIED" => Some(Self::Unspecified),
                "DS_RECORDS_UNPUBLISHED" => Some(Self::DsRecordsUnpublished),
                "DS_RECORDS_PUBLISHED" => Some(Self::DsRecordsPublished),
                _ => None,
            }
        }
    }
    /// The DNS provider of the registration.
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum DnsProvider {
        /// An arbitrary DNS provider identified by its name servers.
        #[prost(message, tag = "1")]
        CustomDns(CustomDns),
        /// The free DNS zone provided by
        /// [Google Domains](<https://domains.google/>).
        #[prost(message, tag = "2")]
        GoogleDomainsDns(GoogleDomainsDns),
    }
}
/// Defines the contact information associated with a `Registration`.
///
/// [ICANN](<https://icann.org/>) requires all domain names to have associated
/// contact information. The `registrant_contact` is considered the
/// domain's legal owner, and often the other contacts are identical.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ContactSettings {
    /// Required. Privacy setting for the contacts associated with the `Registration`.
    #[prost(enumeration = "ContactPrivacy", tag = "1")]
    pub privacy: i32,
    /// Required. The registrant contact for the `Registration`.
    ///
    /// *Caution: Anyone with access to this email address, phone number,
    /// and/or postal address can take control of the domain.*
    ///
    /// *Warning: For new `Registration`s, the registrant receives an email
    /// confirmation that they must complete within 15 days to avoid domain
    /// suspension.*
    #[prost(message, optional, tag = "2")]
    pub registrant_contact: ::core::option::Option<contact_settings::Contact>,
    /// Required. The administrative contact for the `Registration`.
    #[prost(message, optional, tag = "3")]
    pub admin_contact: ::core::option::Option<contact_settings::Contact>,
    /// Required. The technical contact for the `Registration`.
    #[prost(message, optional, tag = "4")]
    pub technical_contact: ::core::option::Option<contact_settings::Contact>,
}
/// Nested message and enum types in `ContactSettings`.
pub mod contact_settings {
    /// Details required for a contact associated with a `Registration`.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct Contact {
        /// Required. Postal address of the contact.
        #[prost(message, optional, tag = "1")]
        pub postal_address: ::core::option::Option<
            super::super::super::super::r#type::PostalAddress,
        >,
        /// Required. Email address of the contact.
        #[prost(string, tag = "2")]
        pub email: ::prost::alloc::string::String,
        /// Required. Phone number of the contact in international format. For example,
        /// `"+1-800-555-0123"`.
        #[prost(string, tag = "3")]
        pub phone_number: ::prost::alloc::string::String,
        /// Fax number of the contact in international format. For example,
        /// `"+1-800-555-0123"`.
        #[prost(string, tag = "4")]
        pub fax_number: ::prost::alloc::string::String,
    }
}
/// Request for the `SearchDomains` method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchDomainsRequest {
    /// Required. String used to search for available domain names.
    #[prost(string, tag = "1")]
    pub query: ::prost::alloc::string::String,
    /// Required. The location. Must be in the format `projects/*/locations/*`.
    #[prost(string, tag = "2")]
    pub location: ::prost::alloc::string::String,
}
/// Response for the `SearchDomains` method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchDomainsResponse {
    /// Results of the domain name search.
    #[prost(message, repeated, tag = "1")]
    pub register_parameters: ::prost::alloc::vec::Vec<RegisterParameters>,
}
/// Request for the `RetrieveRegisterParameters` method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RetrieveRegisterParametersRequest {
    /// Required. The domain name. Unicode domain names must be expressed in Punycode format.
    #[prost(string, tag = "1")]
    pub domain_name: ::prost::alloc::string::String,
    /// Required. The location. Must be in the format `projects/*/locations/*`.
    #[prost(string, tag = "2")]
    pub location: ::prost::alloc::string::String,
}
/// Response for the `RetrieveRegisterParameters` method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RetrieveRegisterParametersResponse {
    /// Parameters to use when calling the `RegisterDomain` method.
    #[prost(message, optional, tag = "1")]
    pub register_parameters: ::core::option::Option<RegisterParameters>,
}
/// Request for the `RegisterDomain` method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RegisterDomainRequest {
    /// Required. The parent resource of the `Registration`. Must be in the
    /// format `projects/*/locations/*`.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Required. The complete `Registration` resource to be created.
    #[prost(message, optional, tag = "2")]
    pub registration: ::core::option::Option<Registration>,
    /// The list of domain notices that you acknowledge. Call
    /// `RetrieveRegisterParameters` to see the notices that need acknowledgement.
    #[prost(enumeration = "DomainNotice", repeated, tag = "3")]
    pub domain_notices: ::prost::alloc::vec::Vec<i32>,
    /// The list of contact notices that the caller acknowledges. The notices
    /// needed here depend on the values specified in
    /// `registration.contact_settings`.
    #[prost(enumeration = "ContactNotice", repeated, tag = "4")]
    pub contact_notices: ::prost::alloc::vec::Vec<i32>,
    /// Required. Yearly price to register or renew the domain.
    /// The value that should be put here can be obtained from
    /// RetrieveRegisterParameters or SearchDomains calls.
    #[prost(message, optional, tag = "5")]
    pub yearly_price: ::core::option::Option<super::super::super::r#type::Money>,
    /// When true, only validation is performed, without actually registering
    /// the domain. Follows:
    /// <https://cloud.google.com/apis/design/design_patterns#request_validation>
    #[prost(bool, tag = "6")]
    pub validate_only: bool,
}
/// Request for the `RetrieveTransferParameters` method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RetrieveTransferParametersRequest {
    /// Required. The domain name. Unicode domain names must be expressed in Punycode format.
    #[prost(string, tag = "1")]
    pub domain_name: ::prost::alloc::string::String,
    /// Required. The location. Must be in the format `projects/*/locations/*`.
    #[prost(string, tag = "2")]
    pub location: ::prost::alloc::string::String,
}
/// Response for the `RetrieveTransferParameters` method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RetrieveTransferParametersResponse {
    /// Parameters to use when calling the `TransferDomain` method.
    #[prost(message, optional, tag = "1")]
    pub transfer_parameters: ::core::option::Option<TransferParameters>,
}
/// Request for the `TransferDomain` method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TransferDomainRequest {
    /// Required. The parent resource of the `Registration`. Must be in the
    /// format `projects/*/locations/*`.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Required. The complete `Registration` resource to be created.
    ///
    /// You can leave `registration.dns_settings` unset to import the
    /// domain's current DNS configuration from its current registrar. Use this
    /// option only if you are sure that the domain's current DNS service
    /// does not cease upon transfer, as is often the case for DNS services
    /// provided for free by the registrar.
    #[prost(message, optional, tag = "2")]
    pub registration: ::core::option::Option<Registration>,
    /// The list of contact notices that you acknowledge. The notices
    /// needed here depend on the values specified in
    /// `registration.contact_settings`.
    #[prost(enumeration = "ContactNotice", repeated, tag = "3")]
    pub contact_notices: ::prost::alloc::vec::Vec<i32>,
    /// Required. Acknowledgement of the price to transfer or renew the domain for one year.
    /// Call `RetrieveTransferParameters` to obtain the price, which you must
    /// acknowledge.
    #[prost(message, optional, tag = "4")]
    pub yearly_price: ::core::option::Option<super::super::super::r#type::Money>,
    /// The domain's transfer authorization code. You can obtain this from the
    /// domain's current registrar.
    #[prost(message, optional, tag = "5")]
    pub authorization_code: ::core::option::Option<AuthorizationCode>,
    /// Validate the request without actually transferring the domain.
    #[prost(bool, tag = "6")]
    pub validate_only: bool,
}
/// Request for the `ListRegistrations` method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListRegistrationsRequest {
    /// Required. The project and location from which to list `Registration`s, specified in
    /// the format `projects/*/locations/*`.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Maximum number of results to return.
    #[prost(int32, tag = "2")]
    pub page_size: i32,
    /// When set to the `next_page_token` from a prior response, provides the next
    /// page of results.
    #[prost(string, tag = "3")]
    pub page_token: ::prost::alloc::string::String,
    /// Filter expression to restrict the `Registration`s returned.
    ///
    /// The expression must specify the field name, a comparison operator, and the
    /// value that you want to use for filtering. The value must be a string, a
    /// number, a boolean, or an enum value. The comparison operator should be one
    /// of =, !=, >, <, >=, <=, or : for prefix or wildcard matches.
    ///
    /// For example, to filter to a specific domain name, use an expression like
    /// `domainName="example.com"`. You can also check for the existence of a
    /// field; for example, to find domains using custom DNS settings, use an
    /// expression like `dnsSettings.customDns:*`.
    ///
    /// You can also create compound filters by combining expressions with the
    /// `AND` and `OR` operators. For example, to find domains that are suspended
    /// or have specific issues flagged, use an expression like
    /// `(state=SUSPENDED) OR (issue:*)`.
    #[prost(string, tag = "4")]
    pub filter: ::prost::alloc::string::String,
}
/// Response for the `ListRegistrations` method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListRegistrationsResponse {
    /// A list of `Registration`s.
    #[prost(message, repeated, tag = "1")]
    pub registrations: ::prost::alloc::vec::Vec<Registration>,
    /// When present, there are more results to retrieve. Set `page_token` to this
    /// value on a subsequent call to get the next page of results.
    #[prost(string, tag = "2")]
    pub next_page_token: ::prost::alloc::string::String,
}
/// Request for the `GetRegistration` method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetRegistrationRequest {
    /// Required. The name of the `Registration` to get, in the format
    /// `projects/*/locations/*/registrations/*`.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// Request for the `UpdateRegistration` method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateRegistrationRequest {
    /// Fields of the `Registration` to update.
    #[prost(message, optional, tag = "1")]
    pub registration: ::core::option::Option<Registration>,
    /// Required. The field mask describing which fields to update as a comma-separated list.
    /// For example, if only the labels are being updated, the `update_mask` is
    /// `"labels"`.
    #[prost(message, optional, tag = "2")]
    pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
}
/// Request for the `ConfigureManagementSettings` method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConfigureManagementSettingsRequest {
    /// Required. The name of the `Registration` whose management settings are being updated,
    /// in the format `projects/*/locations/*/registrations/*`.
    #[prost(string, tag = "1")]
    pub registration: ::prost::alloc::string::String,
    /// Fields of the `ManagementSettings` to update.
    #[prost(message, optional, tag = "2")]
    pub management_settings: ::core::option::Option<ManagementSettings>,
    /// Required. The field mask describing which fields to update as a comma-separated list.
    /// For example, if only the transfer lock is being updated, the `update_mask`
    /// is `"transfer_lock_state"`.
    #[prost(message, optional, tag = "3")]
    pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
}
/// Request for the `ConfigureDnsSettings` method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConfigureDnsSettingsRequest {
    /// Required. The name of the `Registration` whose DNS settings are being updated,
    /// in the format `projects/*/locations/*/registrations/*`.
    #[prost(string, tag = "1")]
    pub registration: ::prost::alloc::string::String,
    /// Fields of the `DnsSettings` to update.
    #[prost(message, optional, tag = "2")]
    pub dns_settings: ::core::option::Option<DnsSettings>,
    /// Required. The field mask describing which fields to update as a comma-separated list.
    /// For example, if only the name servers are being updated for an existing
    /// Custom DNS configuration, the `update_mask` is
    /// `"custom_dns.name_servers"`.
    ///
    /// When changing the DNS provider from one type to another, pass the new
    /// provider's field name as part of the field mask. For example, when changing
    /// from a Google Domains DNS configuration to a Custom DNS configuration, the
    /// `update_mask` is `"custom_dns"`. //
    #[prost(message, optional, tag = "3")]
    pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
    /// Validate the request without actually updating the DNS settings.
    #[prost(bool, tag = "4")]
    pub validate_only: bool,
}
/// Request for the `ConfigureContactSettings` method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConfigureContactSettingsRequest {
    /// Required. The name of the `Registration` whose contact settings are being updated,
    /// in the format `projects/*/locations/*/registrations/*`.
    #[prost(string, tag = "1")]
    pub registration: ::prost::alloc::string::String,
    /// Fields of the `ContactSettings` to update.
    #[prost(message, optional, tag = "2")]
    pub contact_settings: ::core::option::Option<ContactSettings>,
    /// Required. The field mask describing which fields to update as a comma-separated list.
    /// For example, if only the registrant contact is being updated, the
    /// `update_mask` is `"registrant_contact"`.
    #[prost(message, optional, tag = "3")]
    pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
    /// The list of contact notices that the caller acknowledges. The notices
    /// needed here depend on the values specified in `contact_settings`.
    #[prost(enumeration = "ContactNotice", repeated, tag = "4")]
    pub contact_notices: ::prost::alloc::vec::Vec<i32>,
    /// Validate the request without actually updating the contact settings.
    #[prost(bool, tag = "5")]
    pub validate_only: bool,
}
/// Request for the `ExportRegistration` method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExportRegistrationRequest {
    /// Required. The name of the `Registration` to export,
    /// in the format `projects/*/locations/*/registrations/*`.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// Request for the `DeleteRegistration` method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteRegistrationRequest {
    /// Required. The name of the `Registration` to delete,
    /// in the format `projects/*/locations/*/registrations/*`.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// Request for the `RetrieveAuthorizationCode` method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RetrieveAuthorizationCodeRequest {
    /// Required. The name of the `Registration` whose authorization code is being retrieved,
    /// in the format `projects/*/locations/*/registrations/*`.
    #[prost(string, tag = "1")]
    pub registration: ::prost::alloc::string::String,
}
/// Request for the `ResetAuthorizationCode` method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResetAuthorizationCodeRequest {
    /// Required. The name of the `Registration` whose authorization code is being reset,
    /// in the format `projects/*/locations/*/registrations/*`.
    #[prost(string, tag = "1")]
    pub registration: ::prost::alloc::string::String,
}
/// Parameters required to register a new domain.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RegisterParameters {
    /// The domain name. Unicode domain names are expressed in Punycode format.
    #[prost(string, tag = "1")]
    pub domain_name: ::prost::alloc::string::String,
    /// Indicates whether the domain is available for registration. This value is
    /// accurate when obtained by calling `RetrieveRegisterParameters`, but is
    /// approximate when obtained by calling `SearchDomains`.
    #[prost(enumeration = "register_parameters::Availability", tag = "2")]
    pub availability: i32,
    /// Contact privacy options that the domain supports.
    #[prost(enumeration = "ContactPrivacy", repeated, tag = "3")]
    pub supported_privacy: ::prost::alloc::vec::Vec<i32>,
    /// Notices about special properties of the domain.
    #[prost(enumeration = "DomainNotice", repeated, tag = "4")]
    pub domain_notices: ::prost::alloc::vec::Vec<i32>,
    /// Price to register or renew the domain for one year.
    #[prost(message, optional, tag = "5")]
    pub yearly_price: ::core::option::Option<super::super::super::r#type::Money>,
}
/// Nested message and enum types in `RegisterParameters`.
pub mod register_parameters {
    /// Possible availability states of a domain name.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum Availability {
        /// The availability is unspecified.
        Unspecified = 0,
        /// The domain is available for registration.
        Available = 1,
        /// The domain is not available for registration. Generally this means it is
        /// already registered to another party.
        Unavailable = 2,
        /// The domain is not currently supported by Cloud Domains, but may
        /// be available elsewhere.
        Unsupported = 3,
        /// Cloud Domains is unable to determine domain availability, generally
        /// due to system maintenance at the domain name registry.
        Unknown = 4,
    }
    impl Availability {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Availability::Unspecified => "AVAILABILITY_UNSPECIFIED",
                Availability::Available => "AVAILABLE",
                Availability::Unavailable => "UNAVAILABLE",
                Availability::Unsupported => "UNSUPPORTED",
                Availability::Unknown => "UNKNOWN",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "AVAILABILITY_UNSPECIFIED" => Some(Self::Unspecified),
                "AVAILABLE" => Some(Self::Available),
                "UNAVAILABLE" => Some(Self::Unavailable),
                "UNSUPPORTED" => Some(Self::Unsupported),
                "UNKNOWN" => Some(Self::Unknown),
                _ => None,
            }
        }
    }
}
/// Parameters required to transfer a domain from another registrar.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TransferParameters {
    /// The domain name. Unicode domain names are expressed in Punycode format.
    #[prost(string, tag = "1")]
    pub domain_name: ::prost::alloc::string::String,
    /// The registrar that currently manages the domain.
    #[prost(string, tag = "2")]
    pub current_registrar: ::prost::alloc::string::String,
    /// The name servers that currently store the configuration of the domain.
    #[prost(string, repeated, tag = "3")]
    pub name_servers: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// Indicates whether the domain is protected by a transfer lock. For a
    /// transfer to succeed, this must show `UNLOCKED`. To unlock a domain,
    /// go to its current registrar.
    #[prost(enumeration = "TransferLockState", tag = "4")]
    pub transfer_lock_state: i32,
    /// Contact privacy options that the domain supports.
    #[prost(enumeration = "ContactPrivacy", repeated, tag = "5")]
    pub supported_privacy: ::prost::alloc::vec::Vec<i32>,
    /// Price to transfer or renew the domain for one year.
    #[prost(message, optional, tag = "6")]
    pub yearly_price: ::core::option::Option<super::super::super::r#type::Money>,
}
/// Defines an authorization code.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AuthorizationCode {
    /// The Authorization Code in ASCII. It can be used to transfer the domain
    /// to or from another registrar.
    #[prost(string, tag = "1")]
    pub code: ::prost::alloc::string::String,
}
/// Represents the metadata of the long-running operation. Output only.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OperationMetadata {
    /// The time the operation was created.
    #[prost(message, optional, tag = "1")]
    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
    /// The time the operation finished running.
    #[prost(message, optional, tag = "2")]
    pub end_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Server-defined resource path for the target of the operation.
    #[prost(string, tag = "3")]
    pub target: ::prost::alloc::string::String,
    /// Name of the verb executed by the operation.
    #[prost(string, tag = "4")]
    pub verb: ::prost::alloc::string::String,
    /// Human-readable status of the operation, if any.
    #[prost(string, tag = "5")]
    pub status_detail: ::prost::alloc::string::String,
    /// API version used to start the operation.
    #[prost(string, tag = "6")]
    pub api_version: ::prost::alloc::string::String,
}
/// Defines a set of possible contact privacy settings for a `Registration`.
///
/// [ICANN](<https://icann.org/>) maintains the WHOIS database, a publicly
/// accessible mapping from domain name to contact information, and requires that
/// each domain name have an entry. Choose from these options to control how much
/// information in your `ContactSettings` is published.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ContactPrivacy {
    /// The contact privacy settings are undefined.
    Unspecified = 0,
    /// All the data from `ContactSettings` is publicly available. When setting
    /// this option, you must also provide a
    /// `PUBLIC_CONTACT_DATA_ACKNOWLEDGEMENT` in the `contact_notices` field of the
    /// request.
    PublicContactData = 1,
    /// None of the data from `ContactSettings` is publicly available. Instead,
    /// proxy contact data is published for your domain. Email sent to the proxy
    /// email address is forwarded to the registrant's email address. Cloud Domains
    /// provides this privacy proxy service at no additional cost.
    PrivateContactData = 2,
    /// Some data from `ContactSettings` is publicly available. The actual
    /// information redacted depends on the domain. For details, see [the
    /// registration privacy
    /// article](<https://support.google.com/domains/answer/3251242>).
    RedactedContactData = 3,
}
impl ContactPrivacy {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            ContactPrivacy::Unspecified => "CONTACT_PRIVACY_UNSPECIFIED",
            ContactPrivacy::PublicContactData => "PUBLIC_CONTACT_DATA",
            ContactPrivacy::PrivateContactData => "PRIVATE_CONTACT_DATA",
            ContactPrivacy::RedactedContactData => "REDACTED_CONTACT_DATA",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "CONTACT_PRIVACY_UNSPECIFIED" => Some(Self::Unspecified),
            "PUBLIC_CONTACT_DATA" => Some(Self::PublicContactData),
            "PRIVATE_CONTACT_DATA" => Some(Self::PrivateContactData),
            "REDACTED_CONTACT_DATA" => Some(Self::RedactedContactData),
            _ => None,
        }
    }
}
/// Notices about special properties of certain domains.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum DomainNotice {
    /// The notice is undefined.
    Unspecified = 0,
    /// Indicates that the domain is preloaded on the HTTP Strict Transport
    /// Security list in browsers. Serving a website on such domain requires
    /// an SSL certificate. For details, see
    /// [how to get an SSL
    /// certificate](<https://support.google.com/domains/answer/7638036>).
    HstsPreloaded = 1,
}
impl DomainNotice {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            DomainNotice::Unspecified => "DOMAIN_NOTICE_UNSPECIFIED",
            DomainNotice::HstsPreloaded => "HSTS_PRELOADED",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "DOMAIN_NOTICE_UNSPECIFIED" => Some(Self::Unspecified),
            "HSTS_PRELOADED" => Some(Self::HstsPreloaded),
            _ => None,
        }
    }
}
/// Notices related to contact information.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ContactNotice {
    /// The notice is undefined.
    Unspecified = 0,
    /// Required when setting the `privacy` field of `ContactSettings` to
    /// `PUBLIC_CONTACT_DATA`, which exposes contact data publicly.
    PublicContactDataAcknowledgement = 1,
}
impl ContactNotice {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            ContactNotice::Unspecified => "CONTACT_NOTICE_UNSPECIFIED",
            ContactNotice::PublicContactDataAcknowledgement => {
                "PUBLIC_CONTACT_DATA_ACKNOWLEDGEMENT"
            }
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "CONTACT_NOTICE_UNSPECIFIED" => Some(Self::Unspecified),
            "PUBLIC_CONTACT_DATA_ACKNOWLEDGEMENT" => {
                Some(Self::PublicContactDataAcknowledgement)
            }
            _ => None,
        }
    }
}
/// Possible states of a `Registration`'s transfer lock.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum TransferLockState {
    /// The state is unspecified.
    Unspecified = 0,
    /// The domain is unlocked and can be transferred to another registrar.
    Unlocked = 1,
    /// The domain is locked and cannot be transferred to another registrar.
    Locked = 2,
}
impl TransferLockState {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            TransferLockState::Unspecified => "TRANSFER_LOCK_STATE_UNSPECIFIED",
            TransferLockState::Unlocked => "UNLOCKED",
            TransferLockState::Locked => "LOCKED",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "TRANSFER_LOCK_STATE_UNSPECIFIED" => Some(Self::Unspecified),
            "UNLOCKED" => Some(Self::Unlocked),
            "LOCKED" => Some(Self::Locked),
            _ => None,
        }
    }
}
/// Generated client implementations.
pub mod domains_client {
    #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
    use tonic::codegen::*;
    use tonic::codegen::http::Uri;
    /// The Cloud Domains API enables management and configuration of domain names.
    #[derive(Debug, Clone)]
    pub struct DomainsClient<T> {
        inner: tonic::client::Grpc<T>,
    }
    impl<T> DomainsClient<T>
    where
        T: tonic::client::GrpcService<tonic::body::BoxBody>,
        T::Error: Into<StdError>,
        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
    {
        pub fn new(inner: T) -> Self {
            let inner = tonic::client::Grpc::new(inner);
            Self { inner }
        }
        pub fn with_origin(inner: T, origin: Uri) -> Self {
            let inner = tonic::client::Grpc::with_origin(inner, origin);
            Self { inner }
        }
        pub fn with_interceptor<F>(
            inner: T,
            interceptor: F,
        ) -> DomainsClient<InterceptedService<T, F>>
        where
            F: tonic::service::Interceptor,
            T::ResponseBody: Default,
            T: tonic::codegen::Service<
                http::Request<tonic::body::BoxBody>,
                Response = http::Response<
                    <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
                >,
            >,
            <T as tonic::codegen::Service<
                http::Request<tonic::body::BoxBody>,
            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
        {
            DomainsClient::new(InterceptedService::new(inner, interceptor))
        }
        /// Compress requests with the given encoding.
        ///
        /// This requires the server to support it otherwise it might respond with an
        /// error.
        #[must_use]
        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
            self.inner = self.inner.send_compressed(encoding);
            self
        }
        /// Enable decompressing responses.
        #[must_use]
        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
            self.inner = self.inner.accept_compressed(encoding);
            self
        }
        /// Limits the maximum size of a decoded message.
        ///
        /// Default: `4MB`
        #[must_use]
        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
            self.inner = self.inner.max_decoding_message_size(limit);
            self
        }
        /// Limits the maximum size of an encoded message.
        ///
        /// Default: `usize::MAX`
        #[must_use]
        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
            self.inner = self.inner.max_encoding_message_size(limit);
            self
        }
        /// Searches for available domain names similar to the provided query.
        ///
        /// Availability results from this method are approximate; call
        /// `RetrieveRegisterParameters` on a domain before registering to confirm
        /// availability.
        pub async fn search_domains(
            &mut self,
            request: impl tonic::IntoRequest<super::SearchDomainsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::SearchDomainsResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.domains.v1.Domains/SearchDomains",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new("google.cloud.domains.v1.Domains", "SearchDomains"),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Gets parameters needed to register a new domain name, including price and
        /// up-to-date availability. Use the returned values to call `RegisterDomain`.
        pub async fn retrieve_register_parameters(
            &mut self,
            request: impl tonic::IntoRequest<super::RetrieveRegisterParametersRequest>,
        ) -> std::result::Result<
            tonic::Response<super::RetrieveRegisterParametersResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.domains.v1.Domains/RetrieveRegisterParameters",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.domains.v1.Domains",
                        "RetrieveRegisterParameters",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Registers a new domain name and creates a corresponding `Registration`
        /// resource.
        ///
        /// Call `RetrieveRegisterParameters` first to check availability of the domain
        /// name and determine parameters like price that are needed to build a call to
        /// this method.
        ///
        /// A successful call creates a `Registration` resource in state
        /// `REGISTRATION_PENDING`, which resolves to `ACTIVE` within 1-2
        /// minutes, indicating that the domain was successfully registered. If the
        /// resource ends up in state `REGISTRATION_FAILED`, it indicates that the
        /// domain was not registered successfully, and you can safely delete the
        /// resource and retry registration.
        pub async fn register_domain(
            &mut self,
            request: impl tonic::IntoRequest<super::RegisterDomainRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::longrunning::Operation>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.domains.v1.Domains/RegisterDomain",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new("google.cloud.domains.v1.Domains", "RegisterDomain"),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Gets parameters needed to transfer a domain name from another registrar to
        /// Cloud Domains. For domains managed by Google Domains, transferring to Cloud
        /// Domains is not supported.
        ///
        ///
        /// Use the returned values to call `TransferDomain`.
        pub async fn retrieve_transfer_parameters(
            &mut self,
            request: impl tonic::IntoRequest<super::RetrieveTransferParametersRequest>,
        ) -> std::result::Result<
            tonic::Response<super::RetrieveTransferParametersResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.domains.v1.Domains/RetrieveTransferParameters",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.domains.v1.Domains",
                        "RetrieveTransferParameters",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Transfers a domain name from another registrar to Cloud Domains.  For
        /// domains managed by Google Domains, transferring to Cloud Domains is not
        /// supported.
        ///
        ///
        /// Before calling this method, go to the domain's current registrar to unlock
        /// the domain for transfer and retrieve the domain's transfer authorization
        /// code. Then call `RetrieveTransferParameters` to confirm that the domain is
        /// unlocked and to get values needed to build a call to this method.
        ///
        /// A successful call creates a `Registration` resource in state
        /// `TRANSFER_PENDING`. It can take several days to complete the transfer
        /// process. The registrant can often speed up this process by approving the
        /// transfer through the current registrar, either by clicking a link in an
        /// email from the registrar or by visiting the registrar's website.
        ///
        /// A few minutes after transfer approval, the resource transitions to state
        /// `ACTIVE`, indicating that the transfer was successful. If the transfer is
        /// rejected or the request expires without being approved, the resource can
        /// end up in state `TRANSFER_FAILED`. If transfer fails, you can safely delete
        /// the resource and retry the transfer.
        pub async fn transfer_domain(
            &mut self,
            request: impl tonic::IntoRequest<super::TransferDomainRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::longrunning::Operation>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.domains.v1.Domains/TransferDomain",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new("google.cloud.domains.v1.Domains", "TransferDomain"),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Lists the `Registration` resources in a project.
        pub async fn list_registrations(
            &mut self,
            request: impl tonic::IntoRequest<super::ListRegistrationsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListRegistrationsResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.domains.v1.Domains/ListRegistrations",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.domains.v1.Domains",
                        "ListRegistrations",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Gets the details of a `Registration` resource.
        pub async fn get_registration(
            &mut self,
            request: impl tonic::IntoRequest<super::GetRegistrationRequest>,
        ) -> std::result::Result<tonic::Response<super::Registration>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.domains.v1.Domains/GetRegistration",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new("google.cloud.domains.v1.Domains", "GetRegistration"),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Updates select fields of a `Registration` resource, notably `labels`. To
        /// update other fields, use the appropriate custom update method:
        ///
        /// * To update management settings, see `ConfigureManagementSettings`
        /// * To update DNS configuration, see `ConfigureDnsSettings`
        /// * To update contact information, see `ConfigureContactSettings`
        pub async fn update_registration(
            &mut self,
            request: impl tonic::IntoRequest<super::UpdateRegistrationRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::longrunning::Operation>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.domains.v1.Domains/UpdateRegistration",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.domains.v1.Domains",
                        "UpdateRegistration",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Updates a `Registration`'s management settings.
        pub async fn configure_management_settings(
            &mut self,
            request: impl tonic::IntoRequest<super::ConfigureManagementSettingsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::longrunning::Operation>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.domains.v1.Domains/ConfigureManagementSettings",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.domains.v1.Domains",
                        "ConfigureManagementSettings",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Updates a `Registration`'s DNS settings.
        pub async fn configure_dns_settings(
            &mut self,
            request: impl tonic::IntoRequest<super::ConfigureDnsSettingsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::longrunning::Operation>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.domains.v1.Domains/ConfigureDnsSettings",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.domains.v1.Domains",
                        "ConfigureDnsSettings",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Updates a `Registration`'s contact settings. Some changes require
        /// confirmation by the domain's registrant contact .
        pub async fn configure_contact_settings(
            &mut self,
            request: impl tonic::IntoRequest<super::ConfigureContactSettingsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::longrunning::Operation>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.domains.v1.Domains/ConfigureContactSettings",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.domains.v1.Domains",
                        "ConfigureContactSettings",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Exports a `Registration` resource, such that it is no longer managed by
        /// Cloud Domains.
        ///
        /// When an active domain is successfully exported, you can continue to use the
        /// domain in [Google Domains](https://domains.google/) until it expires. The
        /// calling user becomes the domain's sole owner in Google Domains, and
        /// permissions for the domain are subsequently managed there. The domain does
        /// not renew automatically unless the new owner sets up billing in Google
        /// Domains.
        pub async fn export_registration(
            &mut self,
            request: impl tonic::IntoRequest<super::ExportRegistrationRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::longrunning::Operation>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.domains.v1.Domains/ExportRegistration",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.domains.v1.Domains",
                        "ExportRegistration",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Deletes a `Registration` resource.
        ///
        /// This method works on any `Registration` resource using [Subscription or
        /// Commitment billing](/domains/pricing#billing-models), provided that the
        /// resource was created at least 1 day in the past.
        ///
        /// For `Registration` resources using
        /// [Monthly billing](/domains/pricing#billing-models), this method works if:
        ///
        /// * `state` is `EXPORTED` with `expire_time` in the past
        /// * `state` is `REGISTRATION_FAILED`
        /// * `state` is `TRANSFER_FAILED`
        ///
        /// When an active registration is successfully deleted, you can continue to
        /// use the domain in [Google Domains](https://domains.google/) until it
        /// expires. The calling user becomes the domain's sole owner in Google
        /// Domains, and permissions for the domain are subsequently managed there. The
        /// domain does not renew automatically unless the new owner sets up billing in
        /// Google Domains.
        pub async fn delete_registration(
            &mut self,
            request: impl tonic::IntoRequest<super::DeleteRegistrationRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::longrunning::Operation>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.domains.v1.Domains/DeleteRegistration",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.domains.v1.Domains",
                        "DeleteRegistration",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Gets the authorization code of the `Registration` for the purpose of
        /// transferring the domain to another registrar.
        ///
        /// You can call this method only after 60 days have elapsed since the initial
        /// domain registration.
        pub async fn retrieve_authorization_code(
            &mut self,
            request: impl tonic::IntoRequest<super::RetrieveAuthorizationCodeRequest>,
        ) -> std::result::Result<
            tonic::Response<super::AuthorizationCode>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.domains.v1.Domains/RetrieveAuthorizationCode",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.domains.v1.Domains",
                        "RetrieveAuthorizationCode",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Resets the authorization code of the `Registration` to a new random string.
        ///
        /// You can call this method only after 60 days have elapsed since the initial
        /// domain registration.
        pub async fn reset_authorization_code(
            &mut self,
            request: impl tonic::IntoRequest<super::ResetAuthorizationCodeRequest>,
        ) -> std::result::Result<
            tonic::Response<super::AuthorizationCode>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.domains.v1.Domains/ResetAuthorizationCode",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.domains.v1.Domains",
                        "ResetAuthorizationCode",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
    }
}