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
/// Encapsulates progress related information for a Cloud Spanner long
/// running operation.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OperationProgress {
/// Percent completion of the operation.
/// Values are between 0 and 100 inclusive.
#[prost(int32, tag = "1")]
pub progress_percent: i32,
/// Time the request was received.
#[prost(message, optional, tag = "2")]
pub start_time: ::core::option::Option<::prost_types::Timestamp>,
/// If set, the time at which this operation failed or was completed
/// successfully.
#[prost(message, optional, tag = "3")]
pub end_time: ::core::option::Option<::prost_types::Timestamp>,
}
/// Encryption configuration for a Cloud Spanner database.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EncryptionConfig {
/// The Cloud KMS key to be used for encrypting and decrypting
/// the database. Values are of the form
/// `projects/<project>/locations/<location>/keyRings/<key_ring>/cryptoKeys/<kms_key_name>`.
#[prost(string, tag = "2")]
pub kms_key_name: ::prost::alloc::string::String,
}
/// Encryption information for a Cloud Spanner database or backup.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EncryptionInfo {
/// Output only. The type of encryption.
#[prost(enumeration = "encryption_info::Type", tag = "3")]
pub encryption_type: i32,
/// Output only. If present, the status of a recent encrypt/decrypt call on underlying data
/// for this database or backup. Regardless of status, data is always encrypted
/// at rest.
#[prost(message, optional, tag = "4")]
pub encryption_status: ::core::option::Option<super::super::super::super::rpc::Status>,
/// Output only. A Cloud KMS key version that is being used to protect the database or
/// backup.
#[prost(string, tag = "2")]
pub kms_key_version: ::prost::alloc::string::String,
}
/// Nested message and enum types in `EncryptionInfo`.
pub mod encryption_info {
/// Possible encryption types.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Type {
/// Encryption type was not specified, though data at rest remains encrypted.
Unspecified = 0,
/// The data is encrypted at rest with a key that is
/// fully managed by Google. No key version or status will be populated.
/// This is the default state.
GoogleDefaultEncryption = 1,
/// The data is encrypted at rest with a key that is
/// managed by the customer. The active version of the key. `kms_key_version`
/// will be populated, and `encryption_status` may be populated.
CustomerManagedEncryption = 2,
}
}
/// A backup of a Cloud Spanner database.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Backup {
/// Required for the \[CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup\] operation.
/// Name of the database from which this backup was
/// created. This needs to be in the same instance as the backup.
/// Values are of the form
/// `projects/<project>/instances/<instance>/databases/<database>`.
#[prost(string, tag = "2")]
pub database: ::prost::alloc::string::String,
/// The backup will contain an externally consistent copy of the database at
/// the timestamp specified by `version_time`. If `version_time` is not
/// specified, the system will set `version_time` to the `create_time` of the
/// backup.
#[prost(message, optional, tag = "9")]
pub version_time: ::core::option::Option<::prost_types::Timestamp>,
/// Required for the \[CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup\]
/// operation. The expiration time of the backup, with microseconds
/// granularity that must be at least 6 hours and at most 366 days
/// from the time the CreateBackup request is processed. Once the `expire_time`
/// has passed, the backup is eligible to be automatically deleted by Cloud
/// Spanner to free the resources used by the backup.
#[prost(message, optional, tag = "3")]
pub expire_time: ::core::option::Option<::prost_types::Timestamp>,
/// Output only for the \[CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup\] operation.
/// Required for the \[UpdateBackup][google.spanner.admin.database.v1.DatabaseAdmin.UpdateBackup\] operation.
///
/// A globally unique identifier for the backup which cannot be
/// changed. Values are of the form
/// `projects/<project>/instances/<instance>/backups/\[a-z][a-z0-9_\-]*[a-z0-9\]`
/// The final segment of the name must be between 2 and 60 characters
/// in length.
///
/// The backup is stored in the location(s) specified in the instance
/// configuration of the instance containing the backup, identified
/// by the prefix of the backup name of the form
/// `projects/<project>/instances/<instance>`.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Output only. The time the \[CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup\]
/// request is received. If the request does not specify `version_time`, the
/// `version_time` of the backup will be equivalent to the `create_time`.
#[prost(message, optional, tag = "4")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
/// Output only. Size of the backup in bytes.
#[prost(int64, tag = "5")]
pub size_bytes: i64,
/// Output only. The current state of the backup.
#[prost(enumeration = "backup::State", tag = "6")]
pub state: i32,
/// Output only. The names of the restored databases that reference the backup.
/// The database names are of
/// the form `projects/<project>/instances/<instance>/databases/<database>`.
/// Referencing databases may exist in different instances. The existence of
/// any referencing database prevents the backup from being deleted. When a
/// restored database from the backup enters the `READY` state, the reference
/// to the backup is removed.
#[prost(string, repeated, tag = "7")]
pub referencing_databases: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// Output only. The encryption information for the backup.
#[prost(message, optional, tag = "8")]
pub encryption_info: ::core::option::Option<EncryptionInfo>,
}
/// Nested message and enum types in `Backup`.
pub mod backup {
/// Indicates the current state of the backup.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum State {
/// Not specified.
Unspecified = 0,
/// The pending backup is still being created. Operations on the
/// backup may fail with `FAILED_PRECONDITION` in this state.
Creating = 1,
/// The backup is complete and ready for use.
Ready = 2,
}
}
/// The request for \[CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup\].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateBackupRequest {
/// Required. The name of the instance in which the backup will be
/// created. This must be the same instance that contains the database the
/// backup will be created from. The backup will be stored in the
/// location(s) specified in the instance configuration of this
/// instance. Values are of the form
/// `projects/<project>/instances/<instance>`.
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
/// Required. The id of the backup to be created. The `backup_id` appended to
/// `parent` forms the full backup name of the form
/// `projects/<project>/instances/<instance>/backups/<backup_id>`.
#[prost(string, tag = "2")]
pub backup_id: ::prost::alloc::string::String,
/// Required. The backup to create.
#[prost(message, optional, tag = "3")]
pub backup: ::core::option::Option<Backup>,
/// Optional. The encryption configuration used to encrypt the backup. If this field is
/// not specified, the backup will use the same
/// encryption configuration as the database by default, namely
/// \[encryption_type][google.spanner.admin.database.v1.CreateBackupEncryptionConfig.encryption_type\] =
/// `USE_DATABASE_ENCRYPTION`.
#[prost(message, optional, tag = "4")]
pub encryption_config: ::core::option::Option<CreateBackupEncryptionConfig>,
}
/// Metadata type for the operation returned by
/// \[CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup\].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateBackupMetadata {
/// The name of the backup being created.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// The name of the database the backup is created from.
#[prost(string, tag = "2")]
pub database: ::prost::alloc::string::String,
/// The progress of the
/// \[CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup\] operation.
#[prost(message, optional, tag = "3")]
pub progress: ::core::option::Option<OperationProgress>,
/// The time at which cancellation of this operation was received.
/// \[Operations.CancelOperation][google.longrunning.Operations.CancelOperation\]
/// starts asynchronous cancellation on a long-running operation. The server
/// makes a best effort to cancel the operation, but success is not guaranteed.
/// Clients can use
/// \[Operations.GetOperation][google.longrunning.Operations.GetOperation\] or
/// other methods to check whether the cancellation succeeded or whether the
/// operation completed despite cancellation. On successful cancellation,
/// the operation is not deleted; instead, it becomes an operation with
/// an \[Operation.error][google.longrunning.Operation.error\] value with a
/// \[google.rpc.Status.code][google.rpc.Status.code\] of 1,
/// corresponding to `Code.CANCELLED`.
#[prost(message, optional, tag = "4")]
pub cancel_time: ::core::option::Option<::prost_types::Timestamp>,
}
/// The request for \[UpdateBackup][google.spanner.admin.database.v1.DatabaseAdmin.UpdateBackup\].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateBackupRequest {
/// Required. The backup to update. `backup.name`, and the fields to be updated
/// as specified by `update_mask` are required. Other fields are ignored.
/// Update is only supported for the following fields:
/// * `backup.expire_time`.
#[prost(message, optional, tag = "1")]
pub backup: ::core::option::Option<Backup>,
/// Required. A mask specifying which fields (e.g. `expire_time`) in the
/// Backup resource should be updated. This mask is relative to the Backup
/// resource, not to the request message. The field mask must always be
/// specified; this prevents any future fields from being erased accidentally
/// by clients that do not know about them.
#[prost(message, optional, tag = "2")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
}
/// The request for \[GetBackup][google.spanner.admin.database.v1.DatabaseAdmin.GetBackup\].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetBackupRequest {
/// Required. Name of the backup.
/// Values are of the form
/// `projects/<project>/instances/<instance>/backups/<backup>`.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
/// The request for \[DeleteBackup][google.spanner.admin.database.v1.DatabaseAdmin.DeleteBackup\].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteBackupRequest {
/// Required. Name of the backup to delete.
/// Values are of the form
/// `projects/<project>/instances/<instance>/backups/<backup>`.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
/// The request for \[ListBackups][google.spanner.admin.database.v1.DatabaseAdmin.ListBackups\].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListBackupsRequest {
/// Required. The instance to list backups from. Values are of the
/// form `projects/<project>/instances/<instance>`.
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
/// An expression that filters the list of returned backups.
///
/// A filter expression consists of a field name, a comparison operator, and a
/// value for filtering.
/// The value must be a string, a number, or a boolean. The comparison operator
/// must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`.
/// Colon `:` is the contains operator. Filter rules are not case sensitive.
///
/// The following fields in the \[Backup][google.spanner.admin.database.v1.Backup\] are eligible for filtering:
///
/// * `name`
/// * `database`
/// * `state`
/// * `create_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
/// * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
/// * `version_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
/// * `size_bytes`
///
/// You can combine multiple expressions by enclosing each expression in
/// parentheses. By default, expressions are combined with AND logic, but
/// you can specify AND, OR, and NOT logic explicitly.
///
/// Here are a few examples:
///
/// * `name:Howl` - The backup's name contains the string "howl".
/// * `database:prod`
/// - The database's name contains the string "prod".
/// * `state:CREATING` - The backup is pending creation.
/// * `state:READY` - The backup is fully created and ready for use.
/// * `(name:howl) AND (create_time < \"2018-03-28T14:50:00Z\")`
/// - The backup name contains the string "howl" and `create_time`
/// of the backup is before 2018-03-28T14:50:00Z.
/// * `expire_time < \"2018-03-28T14:50:00Z\"`
/// - The backup `expire_time` is before 2018-03-28T14:50:00Z.
/// * `size_bytes > 10000000000` - The backup's size is greater than 10GB
#[prost(string, tag = "2")]
pub filter: ::prost::alloc::string::String,
/// Number of backups to be returned in the response. If 0 or
/// less, defaults to the server's maximum allowed page size.
#[prost(int32, tag = "3")]
pub page_size: i32,
/// If non-empty, `page_token` should contain a
/// \[next_page_token][google.spanner.admin.database.v1.ListBackupsResponse.next_page_token\] from a
/// previous \[ListBackupsResponse][google.spanner.admin.database.v1.ListBackupsResponse\] to the same `parent` and with the same
/// `filter`.
#[prost(string, tag = "4")]
pub page_token: ::prost::alloc::string::String,
}
/// The response for \[ListBackups][google.spanner.admin.database.v1.DatabaseAdmin.ListBackups\].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListBackupsResponse {
/// The list of matching backups. Backups returned are ordered by `create_time`
/// in descending order, starting from the most recent `create_time`.
#[prost(message, repeated, tag = "1")]
pub backups: ::prost::alloc::vec::Vec<Backup>,
/// `next_page_token` can be sent in a subsequent
/// \[ListBackups][google.spanner.admin.database.v1.DatabaseAdmin.ListBackups\] call to fetch more
/// of the matching backups.
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
/// The request for
/// \[ListBackupOperations][google.spanner.admin.database.v1.DatabaseAdmin.ListBackupOperations\].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListBackupOperationsRequest {
/// Required. The instance of the backup operations. Values are of
/// the form `projects/<project>/instances/<instance>`.
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
/// An expression that filters the list of returned backup operations.
///
/// A filter expression consists of a field name, a
/// comparison operator, and a value for filtering.
/// The value must be a string, a number, or a boolean. The comparison operator
/// must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`.
/// Colon `:` is the contains operator. Filter rules are not case sensitive.
///
/// The following fields in the \[operation][google.longrunning.Operation\]
/// are eligible for filtering:
///
/// * `name` - The name of the long-running operation
/// * `done` - False if the operation is in progress, else true.
/// * `metadata.@type` - the type of metadata. For example, the type string
/// for \[CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata\] is
/// `type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata`.
/// * `metadata.<field_name>` - any field in metadata.value.
/// * `error` - Error associated with the long-running operation.
/// * `response.@type` - the type of response.
/// * `response.<field_name>` - any field in response.value.
///
/// You can combine multiple expressions by enclosing each expression in
/// parentheses. By default, expressions are combined with AND logic, but
/// you can specify AND, OR, and NOT logic explicitly.
///
/// Here are a few examples:
///
/// * `done:true` - The operation is complete.
/// * `metadata.database:prod` - The database the backup was taken from has
/// a name containing the string "prod".
/// * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \
/// `(metadata.name:howl) AND` \
/// `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \
/// `(error:*)` - Returns operations where:
/// * The operation's metadata type is \[CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata\].
/// * The backup name contains the string "howl".
/// * The operation started before 2018-03-28T14:50:00Z.
/// * The operation resulted in an error.
#[prost(string, tag = "2")]
pub filter: ::prost::alloc::string::String,
/// Number of operations to be returned in the response. If 0 or
/// less, defaults to the server's maximum allowed page size.
#[prost(int32, tag = "3")]
pub page_size: i32,
/// If non-empty, `page_token` should contain a
/// \[next_page_token][google.spanner.admin.database.v1.ListBackupOperationsResponse.next_page_token\]
/// from a previous \[ListBackupOperationsResponse][google.spanner.admin.database.v1.ListBackupOperationsResponse\] to the
/// same `parent` and with the same `filter`.
#[prost(string, tag = "4")]
pub page_token: ::prost::alloc::string::String,
}
/// The response for
/// \[ListBackupOperations][google.spanner.admin.database.v1.DatabaseAdmin.ListBackupOperations\].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListBackupOperationsResponse {
/// The list of matching backup [long-running
/// operations]\[google.longrunning.Operation\]. Each operation's name will be
/// prefixed by the backup's name and the operation's
/// \[metadata][google.longrunning.Operation.metadata\] will be of type
/// \[CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata\]. Operations returned include those that are
/// pending or have completed/failed/canceled within the last 7 days.
/// Operations returned are ordered by
/// `operation.metadata.value.progress.start_time` in descending order starting
/// from the most recently started operation.
#[prost(message, repeated, tag = "1")]
pub operations: ::prost::alloc::vec::Vec<super::super::super::super::longrunning::Operation>,
/// `next_page_token` can be sent in a subsequent
/// \[ListBackupOperations][google.spanner.admin.database.v1.DatabaseAdmin.ListBackupOperations\]
/// call to fetch more of the matching metadata.
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
/// Information about a backup.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BackupInfo {
/// Name of the backup.
#[prost(string, tag = "1")]
pub backup: ::prost::alloc::string::String,
/// The backup contains an externally consistent copy of `source_database` at
/// the timestamp specified by `version_time`. If the
/// \[CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup\] request did not specify
/// `version_time`, the `version_time` of the backup is equivalent to the
/// `create_time`.
#[prost(message, optional, tag = "4")]
pub version_time: ::core::option::Option<::prost_types::Timestamp>,
/// The time the \[CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup\] request was
/// received.
#[prost(message, optional, tag = "2")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
/// Name of the database the backup was created from.
#[prost(string, tag = "3")]
pub source_database: ::prost::alloc::string::String,
}
/// Encryption configuration for the backup to create.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateBackupEncryptionConfig {
/// Required. The encryption type of the backup.
#[prost(
enumeration = "create_backup_encryption_config::EncryptionType",
tag = "1"
)]
pub encryption_type: i32,
/// Optional. The Cloud KMS key that will be used to protect the backup.
/// This field should be set only when
/// \[encryption_type][google.spanner.admin.database.v1.CreateBackupEncryptionConfig.encryption_type\] is
/// `CUSTOMER_MANAGED_ENCRYPTION`. Values are of the form
/// `projects/<project>/locations/<location>/keyRings/<key_ring>/cryptoKeys/<kms_key_name>`.
#[prost(string, tag = "2")]
pub kms_key_name: ::prost::alloc::string::String,
}
/// Nested message and enum types in `CreateBackupEncryptionConfig`.
pub mod create_backup_encryption_config {
/// Encryption types for the backup.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum EncryptionType {
/// Unspecified. Do not use.
Unspecified = 0,
/// Use the same encryption configuration as the database. This is the
/// default option when
/// \[encryption_config][google.spanner.admin.database.v1.CreateBackupEncryptionConfig\] is empty.
/// For example, if the database is using `Customer_Managed_Encryption`, the
/// backup will be using the same Cloud KMS key as the database.
UseDatabaseEncryption = 1,
/// Use Google default encryption.
GoogleDefaultEncryption = 2,
/// Use customer managed encryption. If specified, `kms_key_name`
/// must contain a valid Cloud KMS key.
CustomerManagedEncryption = 3,
}
}
/// Information about the database restore.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RestoreInfo {
/// The type of the restore source.
#[prost(enumeration = "RestoreSourceType", tag = "1")]
pub source_type: i32,
/// Information about the source used to restore the database.
#[prost(oneof = "restore_info::SourceInfo", tags = "2")]
pub source_info: ::core::option::Option<restore_info::SourceInfo>,
}
/// Nested message and enum types in `RestoreInfo`.
pub mod restore_info {
/// Information about the source used to restore the database.
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum SourceInfo {
/// Information about the backup used to restore the database. The backup
/// may no longer exist.
#[prost(message, tag = "2")]
BackupInfo(super::BackupInfo),
}
}
/// A Cloud Spanner database.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Database {
/// Required. The name of the database. Values are of the form
/// `projects/<project>/instances/<instance>/databases/<database>`,
/// where `<database>` is as specified in the `CREATE DATABASE`
/// statement. This name can be passed to other API methods to
/// identify the database.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Output only. The current database state.
#[prost(enumeration = "database::State", tag = "2")]
pub state: i32,
/// Output only. If exists, the time at which the database creation started.
#[prost(message, optional, tag = "3")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
/// Output only. Applicable only for restored databases. Contains information
/// about the restore source.
#[prost(message, optional, tag = "4")]
pub restore_info: ::core::option::Option<RestoreInfo>,
/// Output only. For databases that are using customer managed encryption, this
/// field contains the encryption configuration for the database.
/// For databases that are using Google default or other types of encryption,
/// this field is empty.
#[prost(message, optional, tag = "5")]
pub encryption_config: ::core::option::Option<EncryptionConfig>,
/// Output only. For databases that are using customer managed encryption, this
/// field contains the encryption information for the database, such as
/// encryption state and the Cloud KMS key versions that are in use.
///
/// For databases that are using Google default or other types of encryption,
/// this field is empty.
///
/// This field is propagated lazily from the backend. There might be a delay
/// from when a key version is being used and when it appears in this field.
#[prost(message, repeated, tag = "8")]
pub encryption_info: ::prost::alloc::vec::Vec<EncryptionInfo>,
/// Output only. The period in which Cloud Spanner retains all versions of data
/// for the database. This is the same as the value of version_retention_period
/// database option set using
/// \[UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl\]. Defaults to 1 hour,
/// if not set.
#[prost(string, tag = "6")]
pub version_retention_period: ::prost::alloc::string::String,
/// Output only. Earliest timestamp at which older versions of the data can be
/// read. This value is continuously updated by Cloud Spanner and becomes stale
/// the moment it is queried. If you are using this value to recover data, make
/// sure to account for the time from the moment when the value is queried to
/// the moment when you initiate the recovery.
#[prost(message, optional, tag = "7")]
pub earliest_version_time: ::core::option::Option<::prost_types::Timestamp>,
/// Output only. The read-write region which contains the database's leader
/// replicas.
///
/// This is the same as the value of default_leader
/// database option set using DatabaseAdmin.CreateDatabase or
/// DatabaseAdmin.UpdateDatabaseDdl. If not explicitly set, this is empty.
#[prost(string, tag = "9")]
pub default_leader: ::prost::alloc::string::String,
}
/// Nested message and enum types in `Database`.
pub mod database {
/// Indicates the current state of the database.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum State {
/// Not specified.
Unspecified = 0,
/// The database is still being created. Operations on the database may fail
/// with `FAILED_PRECONDITION` in this state.
Creating = 1,
/// The database is fully created and ready for use.
Ready = 2,
/// The database is fully created and ready for use, but is still
/// being optimized for performance and cannot handle full load.
///
/// In this state, the database still references the backup
/// it was restore from, preventing the backup
/// from being deleted. When optimizations are complete, the full performance
/// of the database will be restored, and the database will transition to
/// `READY` state.
ReadyOptimizing = 3,
}
}
/// The request for \[ListDatabases][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabases\].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListDatabasesRequest {
/// Required. The instance whose databases should be listed.
/// Values are of the form `projects/<project>/instances/<instance>`.
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
/// Number of databases to be returned in the response. If 0 or less,
/// defaults to the server's maximum allowed page size.
#[prost(int32, tag = "3")]
pub page_size: i32,
/// If non-empty, `page_token` should contain a
/// \[next_page_token][google.spanner.admin.database.v1.ListDatabasesResponse.next_page_token\] from a
/// previous \[ListDatabasesResponse][google.spanner.admin.database.v1.ListDatabasesResponse\].
#[prost(string, tag = "4")]
pub page_token: ::prost::alloc::string::String,
}
/// The response for \[ListDatabases][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabases\].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListDatabasesResponse {
/// Databases that matched the request.
#[prost(message, repeated, tag = "1")]
pub databases: ::prost::alloc::vec::Vec<Database>,
/// `next_page_token` can be sent in a subsequent
/// \[ListDatabases][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabases\] call to fetch more
/// of the matching databases.
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
/// The request for \[CreateDatabase][google.spanner.admin.database.v1.DatabaseAdmin.CreateDatabase\].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateDatabaseRequest {
/// Required. The name of the instance that will serve the new database.
/// Values are of the form `projects/<project>/instances/<instance>`.
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
/// Required. A `CREATE DATABASE` statement, which specifies the ID of the
/// new database. The database ID must conform to the regular expression
/// `\[a-z][a-z0-9_\-]*[a-z0-9\]` and be between 2 and 30 characters in length.
/// If the database ID is a reserved word or if it contains a hyphen, the
/// database ID must be enclosed in backticks (`` ` ``).
#[prost(string, tag = "2")]
pub create_statement: ::prost::alloc::string::String,
/// Optional. A list of DDL statements to run inside the newly created
/// database. Statements can create tables, indexes, etc. These
/// statements execute atomically with the creation of the database:
/// if there is an error in any statement, the database is not created.
#[prost(string, repeated, tag = "3")]
pub extra_statements: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// Optional. The encryption configuration for the database. If this field is not
/// specified, Cloud Spanner will encrypt/decrypt all data at rest using
/// Google default encryption.
#[prost(message, optional, tag = "4")]
pub encryption_config: ::core::option::Option<EncryptionConfig>,
}
/// Metadata type for the operation returned by
/// \[CreateDatabase][google.spanner.admin.database.v1.DatabaseAdmin.CreateDatabase\].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateDatabaseMetadata {
/// The database being created.
#[prost(string, tag = "1")]
pub database: ::prost::alloc::string::String,
}
/// The request for \[GetDatabase][google.spanner.admin.database.v1.DatabaseAdmin.GetDatabase\].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetDatabaseRequest {
/// Required. The name of the requested database. Values are of the form
/// `projects/<project>/instances/<instance>/databases/<database>`.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
/// Enqueues the given DDL statements to be applied, in order but not
/// necessarily all at once, to the database schema at some point (or
/// points) in the future. The server checks that the statements
/// are executable (syntactically valid, name tables that exist, etc.)
/// before enqueueing them, but they may still fail upon
/// later execution (e.g., if a statement from another batch of
/// statements is applied first and it conflicts in some way, or if
/// there is some data-related problem like a `NULL` value in a column to
/// which `NOT NULL` would be added). If a statement fails, all
/// subsequent statements in the batch are automatically cancelled.
///
/// Each batch of statements is assigned a name which can be used with
/// the \[Operations][google.longrunning.Operations\] API to monitor
/// progress. See the
/// \[operation_id][google.spanner.admin.database.v1.UpdateDatabaseDdlRequest.operation_id\] field for more
/// details.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateDatabaseDdlRequest {
/// Required. The database to update.
#[prost(string, tag = "1")]
pub database: ::prost::alloc::string::String,
/// Required. DDL statements to be applied to the database.
#[prost(string, repeated, tag = "2")]
pub statements: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// If empty, the new update request is assigned an
/// automatically-generated operation ID. Otherwise, `operation_id`
/// is used to construct the name of the resulting
/// \[Operation][google.longrunning.Operation\].
///
/// Specifying an explicit operation ID simplifies determining
/// whether the statements were executed in the event that the
/// \[UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl\] call is replayed,
/// or the return value is otherwise lost: the \[database][google.spanner.admin.database.v1.UpdateDatabaseDdlRequest.database\] and
/// `operation_id` fields can be combined to form the
/// \[name][google.longrunning.Operation.name\] of the resulting
/// \[longrunning.Operation][google.longrunning.Operation\]: `<database>/operations/<operation_id>`.
///
/// `operation_id` should be unique within the database, and must be
/// a valid identifier: `\[a-z][a-z0-9_\]*`. Note that
/// automatically-generated operation IDs always begin with an
/// underscore. If the named operation already exists,
/// \[UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl\] returns
/// `ALREADY_EXISTS`.
#[prost(string, tag = "3")]
pub operation_id: ::prost::alloc::string::String,
}
/// Metadata type for the operation returned by
/// \[UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl\].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateDatabaseDdlMetadata {
/// The database being modified.
#[prost(string, tag = "1")]
pub database: ::prost::alloc::string::String,
/// For an update this list contains all the statements. For an
/// individual statement, this list contains only that statement.
#[prost(string, repeated, tag = "2")]
pub statements: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// Reports the commit timestamps of all statements that have
/// succeeded so far, where `commit_timestamps\[i\]` is the commit
/// timestamp for the statement `statements\[i\]`.
#[prost(message, repeated, tag = "3")]
pub commit_timestamps: ::prost::alloc::vec::Vec<::prost_types::Timestamp>,
/// Output only. When true, indicates that the operation is throttled e.g
/// due to resource constraints. When resources become available the operation
/// will resume and this field will be false again.
#[prost(bool, tag = "4")]
pub throttled: bool,
/// The progress of the
/// \[UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl\] operations.
/// Currently, only index creation statements will have a continuously
/// updating progress.
/// For non-index creation statements, `progress\[i\]` will have start time
/// and end time populated with commit timestamp of operation,
/// as well as a progress of 100% once the operation has completed.
/// `progress\[i\]` is the operation progress for `statements\[i\]`.
#[prost(message, repeated, tag = "5")]
pub progress: ::prost::alloc::vec::Vec<OperationProgress>,
}
/// The request for \[DropDatabase][google.spanner.admin.database.v1.DatabaseAdmin.DropDatabase\].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DropDatabaseRequest {
/// Required. The database to be dropped.
#[prost(string, tag = "1")]
pub database: ::prost::alloc::string::String,
}
/// The request for \[GetDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.GetDatabaseDdl\].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetDatabaseDdlRequest {
/// Required. The database whose schema we wish to get.
/// Values are of the form
/// `projects/<project>/instances/<instance>/databases/<database>`
#[prost(string, tag = "1")]
pub database: ::prost::alloc::string::String,
}
/// The response for \[GetDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.GetDatabaseDdl\].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetDatabaseDdlResponse {
/// A list of formatted DDL statements defining the schema of the database
/// specified in the request.
#[prost(string, repeated, tag = "1")]
pub statements: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// The request for
/// \[ListDatabaseOperations][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabaseOperations\].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListDatabaseOperationsRequest {
/// Required. The instance of the database operations.
/// Values are of the form `projects/<project>/instances/<instance>`.
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
/// An expression that filters the list of returned operations.
///
/// A filter expression consists of a field name, a
/// comparison operator, and a value for filtering.
/// The value must be a string, a number, or a boolean. The comparison operator
/// must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`.
/// Colon `:` is the contains operator. Filter rules are not case sensitive.
///
/// The following fields in the \[Operation][google.longrunning.Operation\]
/// are eligible for filtering:
///
/// * `name` - The name of the long-running operation
/// * `done` - False if the operation is in progress, else true.
/// * `metadata.@type` - the type of metadata. For example, the type string
/// for \[RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata\] is
/// `type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata`.
/// * `metadata.<field_name>` - any field in metadata.value.
/// * `error` - Error associated with the long-running operation.
/// * `response.@type` - the type of response.
/// * `response.<field_name>` - any field in response.value.
///
/// You can combine multiple expressions by enclosing each expression in
/// parentheses. By default, expressions are combined with AND logic. However,
/// you can specify AND, OR, and NOT logic explicitly.
///
/// Here are a few examples:
///
/// * `done:true` - The operation is complete.
/// * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata) AND` \
/// `(metadata.source_type:BACKUP) AND` \
/// `(metadata.backup_info.backup:backup_howl) AND` \
/// `(metadata.name:restored_howl) AND` \
/// `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \
/// `(error:*)` - Return operations where:
/// * The operation's metadata type is \[RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata\].
/// * The database is restored from a backup.
/// * The backup name contains "backup_howl".
/// * The restored database's name contains "restored_howl".
/// * The operation started before 2018-03-28T14:50:00Z.
/// * The operation resulted in an error.
#[prost(string, tag = "2")]
pub filter: ::prost::alloc::string::String,
/// Number of operations to be returned in the response. If 0 or
/// less, defaults to the server's maximum allowed page size.
#[prost(int32, tag = "3")]
pub page_size: i32,
/// If non-empty, `page_token` should contain a
/// \[next_page_token][google.spanner.admin.database.v1.ListDatabaseOperationsResponse.next_page_token\]
/// from a previous \[ListDatabaseOperationsResponse][google.spanner.admin.database.v1.ListDatabaseOperationsResponse\] to the
/// same `parent` and with the same `filter`.
#[prost(string, tag = "4")]
pub page_token: ::prost::alloc::string::String,
}
/// The response for
/// \[ListDatabaseOperations][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabaseOperations\].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListDatabaseOperationsResponse {
/// The list of matching database [long-running
/// operations]\[google.longrunning.Operation\]. Each operation's name will be
/// prefixed by the database's name. The operation's
/// \[metadata][google.longrunning.Operation.metadata\] field type
/// `metadata.type_url` describes the type of the metadata.
#[prost(message, repeated, tag = "1")]
pub operations: ::prost::alloc::vec::Vec<super::super::super::super::longrunning::Operation>,
/// `next_page_token` can be sent in a subsequent
/// \[ListDatabaseOperations][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabaseOperations\]
/// call to fetch more of the matching metadata.
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
/// The request for
/// \[RestoreDatabase][google.spanner.admin.database.v1.DatabaseAdmin.RestoreDatabase\].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RestoreDatabaseRequest {
/// Required. The name of the instance in which to create the
/// restored database. This instance must be in the same project and
/// have the same instance configuration as the instance containing
/// the source backup. Values are of the form
/// `projects/<project>/instances/<instance>`.
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
/// Required. The id of the database to create and restore to. This
/// database must not already exist. The `database_id` appended to
/// `parent` forms the full database name of the form
/// `projects/<project>/instances/<instance>/databases/<database_id>`.
#[prost(string, tag = "2")]
pub database_id: ::prost::alloc::string::String,
/// Optional. An encryption configuration describing the encryption type and key
/// resources in Cloud KMS used to encrypt/decrypt the database to restore to.
/// If this field is not specified, the restored database will use
/// the same encryption configuration as the backup by default, namely
/// \[encryption_type][google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig.encryption_type\] =
/// `USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION`.
#[prost(message, optional, tag = "4")]
pub encryption_config: ::core::option::Option<RestoreDatabaseEncryptionConfig>,
/// Required. The source from which to restore.
#[prost(oneof = "restore_database_request::Source", tags = "3")]
pub source: ::core::option::Option<restore_database_request::Source>,
}
/// Nested message and enum types in `RestoreDatabaseRequest`.
pub mod restore_database_request {
/// Required. The source from which to restore.
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Source {
/// Name of the backup from which to restore. Values are of the form
/// `projects/<project>/instances/<instance>/backups/<backup>`.
#[prost(string, tag = "3")]
Backup(::prost::alloc::string::String),
}
}
/// Encryption configuration for the restored database.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RestoreDatabaseEncryptionConfig {
/// Required. The encryption type of the restored database.
#[prost(
enumeration = "restore_database_encryption_config::EncryptionType",
tag = "1"
)]
pub encryption_type: i32,
/// Optional. The Cloud KMS key that will be used to encrypt/decrypt the restored
/// database. This field should be set only when
/// \[encryption_type][google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig.encryption_type\] is
/// `CUSTOMER_MANAGED_ENCRYPTION`. Values are of the form
/// `projects/<project>/locations/<location>/keyRings/<key_ring>/cryptoKeys/<kms_key_name>`.
#[prost(string, tag = "2")]
pub kms_key_name: ::prost::alloc::string::String,
}
/// Nested message and enum types in `RestoreDatabaseEncryptionConfig`.
pub mod restore_database_encryption_config {
/// Encryption types for the database to be restored.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum EncryptionType {
/// Unspecified. Do not use.
Unspecified = 0,
/// This is the default option when
/// \[encryption_config][google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig\] is not specified.
UseConfigDefaultOrBackupEncryption = 1,
/// Use Google default encryption.
GoogleDefaultEncryption = 2,
/// Use customer managed encryption. If specified, `kms_key_name` must
/// must contain a valid Cloud KMS key.
CustomerManagedEncryption = 3,
}
}
/// Metadata type for the long-running operation returned by
/// \[RestoreDatabase][google.spanner.admin.database.v1.DatabaseAdmin.RestoreDatabase\].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RestoreDatabaseMetadata {
/// Name of the database being created and restored to.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// The type of the restore source.
#[prost(enumeration = "RestoreSourceType", tag = "2")]
pub source_type: i32,
/// The progress of the
/// \[RestoreDatabase][google.spanner.admin.database.v1.DatabaseAdmin.RestoreDatabase\]
/// operation.
#[prost(message, optional, tag = "4")]
pub progress: ::core::option::Option<OperationProgress>,
/// The time at which cancellation of this operation was received.
/// \[Operations.CancelOperation][google.longrunning.Operations.CancelOperation\]
/// starts asynchronous cancellation on a long-running operation. The server
/// makes a best effort to cancel the operation, but success is not guaranteed.
/// Clients can use
/// \[Operations.GetOperation][google.longrunning.Operations.GetOperation\] or
/// other methods to check whether the cancellation succeeded or whether the
/// operation completed despite cancellation. On successful cancellation,
/// the operation is not deleted; instead, it becomes an operation with
/// an \[Operation.error][google.longrunning.Operation.error\] value with a
/// \[google.rpc.Status.code][google.rpc.Status.code\] of 1, corresponding to `Code.CANCELLED`.
#[prost(message, optional, tag = "5")]
pub cancel_time: ::core::option::Option<::prost_types::Timestamp>,
/// If exists, the name of the long-running operation that will be used to
/// track the post-restore optimization process to optimize the performance of
/// the restored database, and remove the dependency on the restore source.
/// The name is of the form
/// `projects/<project>/instances/<instance>/databases/<database>/operations/<operation>`
/// where the <database> is the name of database being created and restored to.
/// The metadata type of the long-running operation is
/// \[OptimizeRestoredDatabaseMetadata][google.spanner.admin.database.v1.OptimizeRestoredDatabaseMetadata\]. This long-running operation will be
/// automatically created by the system after the RestoreDatabase long-running
/// operation completes successfully. This operation will not be created if the
/// restore was not successful.
#[prost(string, tag = "6")]
pub optimize_database_operation_name: ::prost::alloc::string::String,
/// Information about the source used to restore the database, as specified by
/// `source` in \[RestoreDatabaseRequest][google.spanner.admin.database.v1.RestoreDatabaseRequest\].
#[prost(oneof = "restore_database_metadata::SourceInfo", tags = "3")]
pub source_info: ::core::option::Option<restore_database_metadata::SourceInfo>,
}
/// Nested message and enum types in `RestoreDatabaseMetadata`.
pub mod restore_database_metadata {
/// Information about the source used to restore the database, as specified by
/// `source` in \[RestoreDatabaseRequest][google.spanner.admin.database.v1.RestoreDatabaseRequest\].
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum SourceInfo {
/// Information about the backup used to restore the database.
#[prost(message, tag = "3")]
BackupInfo(super::BackupInfo),
}
}
/// Metadata type for the long-running operation used to track the progress
/// of optimizations performed on a newly restored database. This long-running
/// operation is automatically created by the system after the successful
/// completion of a database restore, and cannot be cancelled.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OptimizeRestoredDatabaseMetadata {
/// Name of the restored database being optimized.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// The progress of the post-restore optimizations.
#[prost(message, optional, tag = "2")]
pub progress: ::core::option::Option<OperationProgress>,
}
/// Indicates the type of the restore source.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum RestoreSourceType {
/// No restore associated.
TypeUnspecified = 0,
/// A backup was used as the source of the restore.
Backup = 1,
}
#[doc = r" Generated client implementations."]
pub mod database_admin_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Cloud Spanner Database Admin API"]
#[doc = ""]
#[doc = " The Cloud Spanner Database Admin API can be used to create, drop, and"]
#[doc = " list databases. It also enables updating the schema of pre-existing"]
#[doc = " databases. It can be also used to create, delete and list backups for a"]
#[doc = " database and to restore from an existing backup."]
#[derive(Debug, Clone)]
pub struct DatabaseAdminClient<T> {
inner: tonic::client::Grpc<T>,
}
impl DatabaseAdminClient<tonic::transport::Channel> {
#[doc = r" Attempt to create a new client by connecting to a given endpoint."]
pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
where
D: std::convert::TryInto<tonic::transport::Endpoint>,
D::Error: Into<StdError>,
{
let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
Ok(Self::new(conn))
}
}
impl<T> DatabaseAdminClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> DatabaseAdminClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
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> + Send + Sync,
{
DatabaseAdminClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Lists Cloud Spanner databases."]
pub async fn list_databases(
&mut self,
request: impl tonic::IntoRequest<super::ListDatabasesRequest>,
) -> Result<tonic::Response<super::ListDatabasesResponse>, 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.spanner.admin.database.v1.DatabaseAdmin/ListDatabases",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Creates a new Cloud Spanner database and starts to prepare it for serving."]
#[doc = " The returned [long-running operation][google.longrunning.Operation] will"]
#[doc = " have a name of the format `<database_name>/operations/<operation_id>` and"]
#[doc = " can be used to track preparation of the database. The"]
#[doc = " [metadata][google.longrunning.Operation.metadata] field type is"]
#[doc = " [CreateDatabaseMetadata][google.spanner.admin.database.v1.CreateDatabaseMetadata]. The"]
#[doc = " [response][google.longrunning.Operation.response] field type is"]
#[doc = " [Database][google.spanner.admin.database.v1.Database], if successful."]
pub async fn create_database(
&mut self,
request: impl tonic::IntoRequest<super::CreateDatabaseRequest>,
) -> Result<
tonic::Response<super::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.spanner.admin.database.v1.DatabaseAdmin/CreateDatabase",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Gets the state of a Cloud Spanner database."]
pub async fn get_database(
&mut self,
request: impl tonic::IntoRequest<super::GetDatabaseRequest>,
) -> Result<tonic::Response<super::Database>, 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.spanner.admin.database.v1.DatabaseAdmin/GetDatabase",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Updates the schema of a Cloud Spanner database by"]
#[doc = " creating/altering/dropping tables, columns, indexes, etc. The returned"]
#[doc = " [long-running operation][google.longrunning.Operation] will have a name of"]
#[doc = " the format `<database_name>/operations/<operation_id>` and can be used to"]
#[doc = " track execution of the schema change(s). The"]
#[doc = " [metadata][google.longrunning.Operation.metadata] field type is"]
#[doc = " [UpdateDatabaseDdlMetadata][google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata]. The operation has no response."]
pub async fn update_database_ddl(
&mut self,
request: impl tonic::IntoRequest<super::UpdateDatabaseDdlRequest>,
) -> Result<
tonic::Response<super::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.spanner.admin.database.v1.DatabaseAdmin/UpdateDatabaseDdl",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Drops (aka deletes) a Cloud Spanner database."]
#[doc = " Completed backups for the database will be retained according to their"]
#[doc = " `expire_time`."]
pub async fn drop_database(
&mut self,
request: impl tonic::IntoRequest<super::DropDatabaseRequest>,
) -> Result<tonic::Response<()>, 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.spanner.admin.database.v1.DatabaseAdmin/DropDatabase",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Returns the schema of a Cloud Spanner database as a list of formatted"]
#[doc = " DDL statements. This method does not show pending schema updates, those may"]
#[doc = " be queried using the [Operations][google.longrunning.Operations] API."]
pub async fn get_database_ddl(
&mut self,
request: impl tonic::IntoRequest<super::GetDatabaseDdlRequest>,
) -> Result<tonic::Response<super::GetDatabaseDdlResponse>, 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.spanner.admin.database.v1.DatabaseAdmin/GetDatabaseDdl",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Sets the access control policy on a database or backup resource."]
#[doc = " Replaces any existing policy."]
#[doc = ""]
#[doc = " Authorization requires `spanner.databases.setIamPolicy`"]
#[doc = " permission on [resource][google.iam.v1.SetIamPolicyRequest.resource]."]
#[doc = " For backups, authorization requires `spanner.backups.setIamPolicy`"]
#[doc = " permission on [resource][google.iam.v1.SetIamPolicyRequest.resource]."]
pub async fn set_iam_policy(
&mut self,
request: impl tonic::IntoRequest<
super::super::super::super::super::iam::v1::SetIamPolicyRequest,
>,
) -> Result<
tonic::Response<super::super::super::super::super::iam::v1::Policy>,
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.spanner.admin.database.v1.DatabaseAdmin/SetIamPolicy",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Gets the access control policy for a database or backup resource."]
#[doc = " Returns an empty policy if a database or backup exists but does not have a"]
#[doc = " policy set."]
#[doc = ""]
#[doc = " Authorization requires `spanner.databases.getIamPolicy` permission on"]
#[doc = " [resource][google.iam.v1.GetIamPolicyRequest.resource]."]
#[doc = " For backups, authorization requires `spanner.backups.getIamPolicy`"]
#[doc = " permission on [resource][google.iam.v1.GetIamPolicyRequest.resource]."]
pub async fn get_iam_policy(
&mut self,
request: impl tonic::IntoRequest<
super::super::super::super::super::iam::v1::GetIamPolicyRequest,
>,
) -> Result<
tonic::Response<super::super::super::super::super::iam::v1::Policy>,
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.spanner.admin.database.v1.DatabaseAdmin/GetIamPolicy",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Returns permissions that the caller has on the specified database or backup"]
#[doc = " resource."]
#[doc = ""]
#[doc = " Attempting this RPC on a non-existent Cloud Spanner database will"]
#[doc = " result in a NOT_FOUND error if the user has"]
#[doc = " `spanner.databases.list` permission on the containing Cloud"]
#[doc = " Spanner instance. Otherwise returns an empty set of permissions."]
#[doc = " Calling this method on a backup that does not exist will"]
#[doc = " result in a NOT_FOUND error if the user has"]
#[doc = " `spanner.backups.list` permission on the containing instance."]
pub async fn test_iam_permissions(
&mut self,
request: impl tonic::IntoRequest<
super::super::super::super::super::iam::v1::TestIamPermissionsRequest,
>,
) -> Result<
tonic::Response<super::super::super::super::super::iam::v1::TestIamPermissionsResponse>,
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.spanner.admin.database.v1.DatabaseAdmin/TestIamPermissions",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Starts creating a new Cloud Spanner Backup."]
#[doc = " The returned backup [long-running operation][google.longrunning.Operation]"]
#[doc = " will have a name of the format"]
#[doc = " `projects/<project>/instances/<instance>/backups/<backup>/operations/<operation_id>`"]
#[doc = " and can be used to track creation of the backup. The"]
#[doc = " [metadata][google.longrunning.Operation.metadata] field type is"]
#[doc = " [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. The"]
#[doc = " [response][google.longrunning.Operation.response] field type is"]
#[doc = " [Backup][google.spanner.admin.database.v1.Backup], if successful. Cancelling the returned operation will stop the"]
#[doc = " creation and delete the backup."]
#[doc = " There can be only one pending backup creation per database. Backup creation"]
#[doc = " of different databases can run concurrently."]
pub async fn create_backup(
&mut self,
request: impl tonic::IntoRequest<super::CreateBackupRequest>,
) -> Result<
tonic::Response<super::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.spanner.admin.database.v1.DatabaseAdmin/CreateBackup",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Gets metadata on a pending or completed [Backup][google.spanner.admin.database.v1.Backup]."]
pub async fn get_backup(
&mut self,
request: impl tonic::IntoRequest<super::GetBackupRequest>,
) -> Result<tonic::Response<super::Backup>, 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.spanner.admin.database.v1.DatabaseAdmin/GetBackup",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Updates a pending or completed [Backup][google.spanner.admin.database.v1.Backup]."]
pub async fn update_backup(
&mut self,
request: impl tonic::IntoRequest<super::UpdateBackupRequest>,
) -> Result<tonic::Response<super::Backup>, 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.spanner.admin.database.v1.DatabaseAdmin/UpdateBackup",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Deletes a pending or completed [Backup][google.spanner.admin.database.v1.Backup]."]
pub async fn delete_backup(
&mut self,
request: impl tonic::IntoRequest<super::DeleteBackupRequest>,
) -> Result<tonic::Response<()>, 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.spanner.admin.database.v1.DatabaseAdmin/DeleteBackup",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Lists completed and pending backups."]
#[doc = " Backups returned are ordered by `create_time` in descending order,"]
#[doc = " starting from the most recent `create_time`."]
pub async fn list_backups(
&mut self,
request: impl tonic::IntoRequest<super::ListBackupsRequest>,
) -> Result<tonic::Response<super::ListBackupsResponse>, 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.spanner.admin.database.v1.DatabaseAdmin/ListBackups",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Create a new database by restoring from a completed backup. The new"]
#[doc = " database must be in the same project and in an instance with the same"]
#[doc = " instance configuration as the instance containing"]
#[doc = " the backup. The returned database [long-running"]
#[doc = " operation][google.longrunning.Operation] has a name of the format"]
#[doc = " `projects/<project>/instances/<instance>/databases/<database>/operations/<operation_id>`,"]
#[doc = " and can be used to track the progress of the operation, and to cancel it."]
#[doc = " The [metadata][google.longrunning.Operation.metadata] field type is"]
#[doc = " [RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata]."]
#[doc = " The [response][google.longrunning.Operation.response] type"]
#[doc = " is [Database][google.spanner.admin.database.v1.Database], if"]
#[doc = " successful. Cancelling the returned operation will stop the restore and"]
#[doc = " delete the database."]
#[doc = " There can be only one database being restored into an instance at a time."]
#[doc = " Once the restore operation completes, a new restore operation can be"]
#[doc = " initiated, without waiting for the optimize operation associated with the"]
#[doc = " first restore to complete."]
pub async fn restore_database(
&mut self,
request: impl tonic::IntoRequest<super::RestoreDatabaseRequest>,
) -> Result<
tonic::Response<super::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.spanner.admin.database.v1.DatabaseAdmin/RestoreDatabase",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Lists database [longrunning-operations][google.longrunning.Operation]."]
#[doc = " A database operation has a name of the form"]
#[doc = " `projects/<project>/instances/<instance>/databases/<database>/operations/<operation>`."]
#[doc = " The long-running operation"]
#[doc = " [metadata][google.longrunning.Operation.metadata] field type"]
#[doc = " `metadata.type_url` describes the type of the metadata. Operations returned"]
#[doc = " include those that have completed/failed/canceled within the last 7 days,"]
#[doc = " and pending operations."]
pub async fn list_database_operations(
&mut self,
request: impl tonic::IntoRequest<super::ListDatabaseOperationsRequest>,
) -> Result<tonic::Response<super::ListDatabaseOperationsResponse>, 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.spanner.admin.database.v1.DatabaseAdmin/ListDatabaseOperations",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Lists the backup [long-running operations][google.longrunning.Operation] in"]
#[doc = " the given instance. A backup operation has a name of the form"]
#[doc = " `projects/<project>/instances/<instance>/backups/<backup>/operations/<operation>`."]
#[doc = " The long-running operation"]
#[doc = " [metadata][google.longrunning.Operation.metadata] field type"]
#[doc = " `metadata.type_url` describes the type of the metadata. Operations returned"]
#[doc = " include those that have completed/failed/canceled within the last 7 days,"]
#[doc = " and pending operations. Operations returned are ordered by"]
#[doc = " `operation.metadata.value.progress.start_time` in descending order starting"]
#[doc = " from the most recently started operation."]
pub async fn list_backup_operations(
&mut self,
request: impl tonic::IntoRequest<super::ListBackupOperationsRequest>,
) -> Result<tonic::Response<super::ListBackupOperationsResponse>, 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.spanner.admin.database.v1.DatabaseAdmin/ListBackupOperations",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}