google-cloud-gke_backup-v1 0.8.0 → 0.10.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (26) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/gke_backup/v1/backup_for_gke/client.rb +197 -70
  3. data/lib/google/cloud/gke_backup/v1/backup_for_gke/operations.rb +13 -5
  4. data/lib/google/cloud/gke_backup/v1/backup_for_gke/rest/client.rb +190 -70
  5. data/lib/google/cloud/gke_backup/v1/backup_for_gke/rest/operations.rb +13 -6
  6. data/lib/google/cloud/gke_backup/v1/backup_for_gke/rest/service_stub.rb +59 -0
  7. data/lib/google/cloud/gke_backup/v1/version.rb +1 -1
  8. data/lib/google/cloud/gkebackup/v1/backup_pb.rb +1 -1
  9. data/lib/google/cloud/gkebackup/v1/backup_plan_pb.rb +11 -1
  10. data/lib/google/cloud/gkebackup/v1/common_pb.rb +4 -1
  11. data/lib/google/cloud/gkebackup/v1/gkebackup_pb.rb +3 -1
  12. data/lib/google/cloud/gkebackup/v1/gkebackup_services_pb.rb +2 -0
  13. data/lib/google/cloud/gkebackup/v1/restore_pb.rb +7 -1
  14. data/lib/google/cloud/gkebackup/v1/restore_plan_pb.rb +1 -1
  15. data/proto_docs/google/api/client.rb +4 -0
  16. data/proto_docs/google/cloud/gkebackup/v1/backup.rb +27 -18
  17. data/proto_docs/google/cloud/gkebackup/v1/backup_plan.rb +139 -34
  18. data/proto_docs/google/cloud/gkebackup/v1/common.rb +20 -5
  19. data/proto_docs/google/cloud/gkebackup/v1/gkebackup.rb +65 -46
  20. data/proto_docs/google/cloud/gkebackup/v1/restore.rb +233 -61
  21. data/proto_docs/google/cloud/gkebackup/v1/restore_plan.rb +2 -3
  22. data/proto_docs/google/cloud/gkebackup/v1/volume.rb +0 -2
  23. data/proto_docs/google/type/date.rb +53 -0
  24. data/proto_docs/google/type/dayofweek.rb +49 -0
  25. data/proto_docs/google/type/timeofday.rb +45 -0
  26. metadata +5 -2
@@ -33,6 +33,9 @@ module Google
33
33
  # manage backup and restore operations for their GKE clusters.
34
34
  #
35
35
  class Client
36
+ # @private
37
+ API_VERSION = ""
38
+
36
39
  # @private
37
40
  DEFAULT_ENDPOINT_TEMPLATE = "gkebackup.$UNIVERSE_DOMAIN$"
38
41
 
@@ -154,6 +157,11 @@ module Google
154
157
  initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
155
158
  }
156
159
 
160
+ default_config.rpcs.get_backup_index_download_url.timeout = 60.0
161
+ default_config.rpcs.get_backup_index_download_url.retry_policy = {
162
+ initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
163
+ }
164
+
157
165
  default_config
158
166
  end
159
167
  yield @configure if block_given?
@@ -363,10 +371,11 @@ module Google
363
371
  # Customize the options with defaults
364
372
  metadata = @config.rpcs.create_backup_plan.metadata.to_h
365
373
 
366
- # Set x-goog-api-client and x-goog-user-project headers
374
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
367
375
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
368
376
  lib_name: @config.lib_name, lib_version: @config.lib_version,
369
377
  gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION
378
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
370
379
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
371
380
 
372
381
  header_params = {}
@@ -416,23 +425,23 @@ module Google
416
425
  # Required. The location that contains the BackupPlans to list.
417
426
  # Format: `projects/*/locations/*`
418
427
  # @param page_size [::Integer]
419
- # The target number of results to return in a single response.
428
+ # Optional. The target number of results to return in a single response.
420
429
  # If not specified, a default value will be chosen by the service.
421
- # Note that the response may inclue a partial list and a caller should
430
+ # Note that the response may include a partial list and a caller should
422
431
  # only rely on the response's
423
432
  # {::Google::Cloud::GkeBackup::V1::ListBackupPlansResponse#next_page_token next_page_token}
424
433
  # to determine if there are more instances left to be queried.
425
434
  # @param page_token [::String]
426
- # The value of
435
+ # Optional. The value of
427
436
  # {::Google::Cloud::GkeBackup::V1::ListBackupPlansResponse#next_page_token next_page_token}
428
437
  # received from a previous `ListBackupPlans` call.
429
438
  # Provide this to retrieve the subsequent page in a multi-page list of
430
439
  # results. When paginating, all other parameters provided to
431
440
  # `ListBackupPlans` must match the call that provided the page token.
432
441
  # @param filter [::String]
433
- # Field match expression used to filter the results.
442
+ # Optional. Field match expression used to filter the results.
434
443
  # @param order_by [::String]
435
- # Field by which to sort the results.
444
+ # Optional. Field by which to sort the results.
436
445
  #
437
446
  # @yield [response, operation] Access the result along with the RPC operation
438
447
  # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::BackupPlan>]
@@ -472,10 +481,11 @@ module Google
472
481
  # Customize the options with defaults
473
482
  metadata = @config.rpcs.list_backup_plans.metadata.to_h
474
483
 
475
- # Set x-goog-api-client and x-goog-user-project headers
484
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
476
485
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
477
486
  lib_name: @config.lib_name, lib_version: @config.lib_version,
478
487
  gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION
488
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
479
489
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
480
490
 
481
491
  header_params = {}
@@ -559,10 +569,11 @@ module Google
559
569
  # Customize the options with defaults
560
570
  metadata = @config.rpcs.get_backup_plan.metadata.to_h
561
571
 
562
- # Set x-goog-api-client and x-goog-user-project headers
572
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
563
573
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
564
574
  lib_name: @config.lib_name, lib_version: @config.lib_version,
565
575
  gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION
576
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
566
577
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
567
578
 
568
579
  header_params = {}
@@ -611,7 +622,7 @@ module Google
611
622
  # Required. A new version of the BackupPlan resource that contains updated
612
623
  # fields. This may be sparsely populated if an `update_mask` is provided.
613
624
  # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
614
- # This is used to specify the fields to be overwritten in the
625
+ # Optional. This is used to specify the fields to be overwritten in the
615
626
  # BackupPlan targeted for update. The values for each of these
616
627
  # updated fields will be taken from the `backup_plan` provided
617
628
  # with this request. Field names are relative to the root of the resource
@@ -662,10 +673,11 @@ module Google
662
673
  # Customize the options with defaults
663
674
  metadata = @config.rpcs.update_backup_plan.metadata.to_h
664
675
 
665
- # Set x-goog-api-client and x-goog-user-project headers
676
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
666
677
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
667
678
  lib_name: @config.lib_name, lib_version: @config.lib_version,
668
679
  gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION
680
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
669
681
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
670
682
 
671
683
  header_params = {}
@@ -715,7 +727,7 @@ module Google
715
727
  # Required. Fully qualified BackupPlan name.
716
728
  # Format: `projects/*/locations/*/backupPlans/*`
717
729
  # @param etag [::String]
718
- # If provided, this value must match the current value of the
730
+ # Optional. If provided, this value must match the current value of the
719
731
  # target BackupPlan's {::Google::Cloud::GkeBackup::V1::BackupPlan#etag etag} field
720
732
  # or the request is rejected.
721
733
  #
@@ -760,10 +772,11 @@ module Google
760
772
  # Customize the options with defaults
761
773
  metadata = @config.rpcs.delete_backup_plan.metadata.to_h
762
774
 
763
- # Set x-goog-api-client and x-goog-user-project headers
775
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
764
776
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
765
777
  lib_name: @config.lib_name, lib_version: @config.lib_version,
766
778
  gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION
779
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
767
780
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
768
781
 
769
782
  header_params = {}
@@ -813,9 +826,9 @@ module Google
813
826
  # Required. The BackupPlan within which to create the Backup.
814
827
  # Format: `projects/*/locations/*/backupPlans/*`
815
828
  # @param backup [::Google::Cloud::GkeBackup::V1::Backup, ::Hash]
816
- # The Backup resource to create.
829
+ # Optional. The Backup resource to create.
817
830
  # @param backup_id [::String]
818
- # The client-provided short name for the Backup resource.
831
+ # Optional. The client-provided short name for the Backup resource.
819
832
  # This name must:
820
833
  #
821
834
  # - be between 1 and 63 characters long (inclusive)
@@ -865,10 +878,11 @@ module Google
865
878
  # Customize the options with defaults
866
879
  metadata = @config.rpcs.create_backup.metadata.to_h
867
880
 
868
- # Set x-goog-api-client and x-goog-user-project headers
881
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
869
882
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
870
883
  lib_name: @config.lib_name, lib_version: @config.lib_version,
871
884
  gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION
885
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
872
886
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
873
887
 
874
888
  header_params = {}
@@ -918,23 +932,23 @@ module Google
918
932
  # Required. The BackupPlan that contains the Backups to list.
919
933
  # Format: `projects/*/locations/*/backupPlans/*`
920
934
  # @param page_size [::Integer]
921
- # The target number of results to return in a single response.
935
+ # Optional. The target number of results to return in a single response.
922
936
  # If not specified, a default value will be chosen by the service.
923
- # Note that the response may inclue a partial list and a caller should
937
+ # Note that the response may include a partial list and a caller should
924
938
  # only rely on the response's
925
939
  # {::Google::Cloud::GkeBackup::V1::ListBackupsResponse#next_page_token next_page_token}
926
940
  # to determine if there are more instances left to be queried.
927
941
  # @param page_token [::String]
928
- # The value of
942
+ # Optional. The value of
929
943
  # {::Google::Cloud::GkeBackup::V1::ListBackupsResponse#next_page_token next_page_token}
930
944
  # received from a previous `ListBackups` call.
931
945
  # Provide this to retrieve the subsequent page in a multi-page list of
932
946
  # results. When paginating, all other parameters provided to
933
947
  # `ListBackups` must match the call that provided the page token.
934
948
  # @param filter [::String]
935
- # Field match expression used to filter the results.
949
+ # Optional. Field match expression used to filter the results.
936
950
  # @param order_by [::String]
937
- # Field by which to sort the results.
951
+ # Optional. Field by which to sort the results.
938
952
  #
939
953
  # @yield [response, operation] Access the result along with the RPC operation
940
954
  # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::Backup>]
@@ -974,10 +988,11 @@ module Google
974
988
  # Customize the options with defaults
975
989
  metadata = @config.rpcs.list_backups.metadata.to_h
976
990
 
977
- # Set x-goog-api-client and x-goog-user-project headers
991
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
978
992
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
979
993
  lib_name: @config.lib_name, lib_version: @config.lib_version,
980
994
  gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION
995
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
981
996
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
982
997
 
983
998
  header_params = {}
@@ -1061,10 +1076,11 @@ module Google
1061
1076
  # Customize the options with defaults
1062
1077
  metadata = @config.rpcs.get_backup.metadata.to_h
1063
1078
 
1064
- # Set x-goog-api-client and x-goog-user-project headers
1079
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1065
1080
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1066
1081
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1067
1082
  gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION
1083
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1068
1084
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1069
1085
 
1070
1086
  header_params = {}
@@ -1113,7 +1129,7 @@ module Google
1113
1129
  # Required. A new version of the Backup resource that contains updated
1114
1130
  # fields. This may be sparsely populated if an `update_mask` is provided.
1115
1131
  # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
1116
- # This is used to specify the fields to be overwritten in the
1132
+ # Optional. This is used to specify the fields to be overwritten in the
1117
1133
  # Backup targeted for update. The values for each of these
1118
1134
  # updated fields will be taken from the `backup_plan` provided
1119
1135
  # with this request. Field names are relative to the root of the resource.
@@ -1163,10 +1179,11 @@ module Google
1163
1179
  # Customize the options with defaults
1164
1180
  metadata = @config.rpcs.update_backup.metadata.to_h
1165
1181
 
1166
- # Set x-goog-api-client and x-goog-user-project headers
1182
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1167
1183
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1168
1184
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1169
1185
  gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION
1186
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1170
1187
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1171
1188
 
1172
1189
  header_params = {}
@@ -1216,12 +1233,12 @@ module Google
1216
1233
  # Required. Name of the Backup resource.
1217
1234
  # Format: `projects/*/locations/*/backupPlans/*/backups/*`
1218
1235
  # @param etag [::String]
1219
- # If provided, this value must match the current value of the
1236
+ # Optional. If provided, this value must match the current value of the
1220
1237
  # target Backup's {::Google::Cloud::GkeBackup::V1::Backup#etag etag} field or the
1221
1238
  # request is rejected.
1222
1239
  # @param force [::Boolean]
1223
- # If set to true, any VolumeBackups below this Backup will also be deleted.
1224
- # Otherwise, the request will only succeed if the Backup has no
1240
+ # Optional. If set to true, any VolumeBackups below this Backup will also be
1241
+ # deleted. Otherwise, the request will only succeed if the Backup has no
1225
1242
  # VolumeBackups.
1226
1243
  #
1227
1244
  # @yield [response, operation] Access the result along with the RPC operation
@@ -1265,10 +1282,11 @@ module Google
1265
1282
  # Customize the options with defaults
1266
1283
  metadata = @config.rpcs.delete_backup.metadata.to_h
1267
1284
 
1268
- # Set x-goog-api-client and x-goog-user-project headers
1285
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1269
1286
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1270
1287
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1271
1288
  gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION
1289
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1272
1290
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1273
1291
 
1274
1292
  header_params = {}
@@ -1318,23 +1336,23 @@ module Google
1318
1336
  # Required. The Backup that contains the VolumeBackups to list.
1319
1337
  # Format: `projects/*/locations/*/backupPlans/*/backups/*`
1320
1338
  # @param page_size [::Integer]
1321
- # The target number of results to return in a single response.
1339
+ # Optional. The target number of results to return in a single response.
1322
1340
  # If not specified, a default value will be chosen by the service.
1323
- # Note that the response may inclue a partial list and a caller should
1341
+ # Note that the response may include a partial list and a caller should
1324
1342
  # only rely on the response's
1325
1343
  # {::Google::Cloud::GkeBackup::V1::ListVolumeBackupsResponse#next_page_token next_page_token}
1326
1344
  # to determine if there are more instances left to be queried.
1327
1345
  # @param page_token [::String]
1328
- # The value of
1346
+ # Optional. The value of
1329
1347
  # {::Google::Cloud::GkeBackup::V1::ListVolumeBackupsResponse#next_page_token next_page_token}
1330
1348
  # received from a previous `ListVolumeBackups` call.
1331
1349
  # Provide this to retrieve the subsequent page in a multi-page list of
1332
1350
  # results. When paginating, all other parameters provided to
1333
1351
  # `ListVolumeBackups` must match the call that provided the page token.
1334
1352
  # @param filter [::String]
1335
- # Field match expression used to filter the results.
1353
+ # Optional. Field match expression used to filter the results.
1336
1354
  # @param order_by [::String]
1337
- # Field by which to sort the results.
1355
+ # Optional. Field by which to sort the results.
1338
1356
  #
1339
1357
  # @yield [response, operation] Access the result along with the RPC operation
1340
1358
  # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::VolumeBackup>]
@@ -1374,10 +1392,11 @@ module Google
1374
1392
  # Customize the options with defaults
1375
1393
  metadata = @config.rpcs.list_volume_backups.metadata.to_h
1376
1394
 
1377
- # Set x-goog-api-client and x-goog-user-project headers
1395
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1378
1396
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1379
1397
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1380
1398
  gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION
1399
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1381
1400
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1382
1401
 
1383
1402
  header_params = {}
@@ -1461,10 +1480,11 @@ module Google
1461
1480
  # Customize the options with defaults
1462
1481
  metadata = @config.rpcs.get_volume_backup.metadata.to_h
1463
1482
 
1464
- # Set x-goog-api-client and x-goog-user-project headers
1483
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1465
1484
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1466
1485
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1467
1486
  gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION
1487
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1468
1488
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1469
1489
 
1470
1490
  header_params = {}
@@ -1565,10 +1585,11 @@ module Google
1565
1585
  # Customize the options with defaults
1566
1586
  metadata = @config.rpcs.create_restore_plan.metadata.to_h
1567
1587
 
1568
- # Set x-goog-api-client and x-goog-user-project headers
1588
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1569
1589
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1570
1590
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1571
1591
  gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION
1592
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1572
1593
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1573
1594
 
1574
1595
  header_params = {}
@@ -1618,23 +1639,23 @@ module Google
1618
1639
  # Required. The location that contains the RestorePlans to list.
1619
1640
  # Format: `projects/*/locations/*`
1620
1641
  # @param page_size [::Integer]
1621
- # The target number of results to return in a single response.
1642
+ # Optional. The target number of results to return in a single response.
1622
1643
  # If not specified, a default value will be chosen by the service.
1623
- # Note that the response may inclue a partial list and a caller should
1644
+ # Note that the response may include a partial list and a caller should
1624
1645
  # only rely on the response's
1625
1646
  # {::Google::Cloud::GkeBackup::V1::ListRestorePlansResponse#next_page_token next_page_token}
1626
1647
  # to determine if there are more instances left to be queried.
1627
1648
  # @param page_token [::String]
1628
- # The value of
1649
+ # Optional. The value of
1629
1650
  # {::Google::Cloud::GkeBackup::V1::ListRestorePlansResponse#next_page_token next_page_token}
1630
1651
  # received from a previous `ListRestorePlans` call.
1631
1652
  # Provide this to retrieve the subsequent page in a multi-page list of
1632
1653
  # results. When paginating, all other parameters provided to
1633
1654
  # `ListRestorePlans` must match the call that provided the page token.
1634
1655
  # @param filter [::String]
1635
- # Field match expression used to filter the results.
1656
+ # Optional. Field match expression used to filter the results.
1636
1657
  # @param order_by [::String]
1637
- # Field by which to sort the results.
1658
+ # Optional. Field by which to sort the results.
1638
1659
  #
1639
1660
  # @yield [response, operation] Access the result along with the RPC operation
1640
1661
  # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::RestorePlan>]
@@ -1674,10 +1695,11 @@ module Google
1674
1695
  # Customize the options with defaults
1675
1696
  metadata = @config.rpcs.list_restore_plans.metadata.to_h
1676
1697
 
1677
- # Set x-goog-api-client and x-goog-user-project headers
1698
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1678
1699
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1679
1700
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1680
1701
  gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION
1702
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1681
1703
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1682
1704
 
1683
1705
  header_params = {}
@@ -1761,10 +1783,11 @@ module Google
1761
1783
  # Customize the options with defaults
1762
1784
  metadata = @config.rpcs.get_restore_plan.metadata.to_h
1763
1785
 
1764
- # Set x-goog-api-client and x-goog-user-project headers
1786
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1765
1787
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1766
1788
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1767
1789
  gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION
1790
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1768
1791
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1769
1792
 
1770
1793
  header_params = {}
@@ -1813,7 +1836,7 @@ module Google
1813
1836
  # Required. A new version of the RestorePlan resource that contains updated
1814
1837
  # fields. This may be sparsely populated if an `update_mask` is provided.
1815
1838
  # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
1816
- # This is used to specify the fields to be overwritten in the
1839
+ # Optional. This is used to specify the fields to be overwritten in the
1817
1840
  # RestorePlan targeted for update. The values for each of these
1818
1841
  # updated fields will be taken from the `restore_plan` provided
1819
1842
  # with this request. Field names are relative to the root of the resource.
@@ -1863,10 +1886,11 @@ module Google
1863
1886
  # Customize the options with defaults
1864
1887
  metadata = @config.rpcs.update_restore_plan.metadata.to_h
1865
1888
 
1866
- # Set x-goog-api-client and x-goog-user-project headers
1889
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1867
1890
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1868
1891
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1869
1892
  gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION
1893
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1870
1894
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1871
1895
 
1872
1896
  header_params = {}
@@ -1916,12 +1940,12 @@ module Google
1916
1940
  # Required. Fully qualified RestorePlan name.
1917
1941
  # Format: `projects/*/locations/*/restorePlans/*`
1918
1942
  # @param etag [::String]
1919
- # If provided, this value must match the current value of the
1943
+ # Optional. If provided, this value must match the current value of the
1920
1944
  # target RestorePlan's {::Google::Cloud::GkeBackup::V1::RestorePlan#etag etag}
1921
1945
  # field or the request is rejected.
1922
1946
  # @param force [::Boolean]
1923
- # If set to true, any Restores below this RestorePlan will also be deleted.
1924
- # Otherwise, the request will only succeed if the RestorePlan has no
1947
+ # Optional. If set to true, any Restores below this RestorePlan will also be
1948
+ # deleted. Otherwise, the request will only succeed if the RestorePlan has no
1925
1949
  # Restores.
1926
1950
  #
1927
1951
  # @yield [response, operation] Access the result along with the RPC operation
@@ -1965,10 +1989,11 @@ module Google
1965
1989
  # Customize the options with defaults
1966
1990
  metadata = @config.rpcs.delete_restore_plan.metadata.to_h
1967
1991
 
1968
- # Set x-goog-api-client and x-goog-user-project headers
1992
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1969
1993
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1970
1994
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1971
1995
  gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION
1996
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1972
1997
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1973
1998
 
1974
1999
  header_params = {}
@@ -2070,10 +2095,11 @@ module Google
2070
2095
  # Customize the options with defaults
2071
2096
  metadata = @config.rpcs.create_restore.metadata.to_h
2072
2097
 
2073
- # Set x-goog-api-client and x-goog-user-project headers
2098
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2074
2099
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2075
2100
  lib_name: @config.lib_name, lib_version: @config.lib_version,
2076
2101
  gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION
2102
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2077
2103
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2078
2104
 
2079
2105
  header_params = {}
@@ -2123,23 +2149,23 @@ module Google
2123
2149
  # Required. The RestorePlan that contains the Restores to list.
2124
2150
  # Format: `projects/*/locations/*/restorePlans/*`
2125
2151
  # @param page_size [::Integer]
2126
- # The target number of results to return in a single response.
2152
+ # Optional. The target number of results to return in a single response.
2127
2153
  # If not specified, a default value will be chosen by the service.
2128
- # Note that the response may inclue a partial list and a caller should
2154
+ # Note that the response may include a partial list and a caller should
2129
2155
  # only rely on the response's
2130
2156
  # {::Google::Cloud::GkeBackup::V1::ListRestoresResponse#next_page_token next_page_token}
2131
2157
  # to determine if there are more instances left to be queried.
2132
2158
  # @param page_token [::String]
2133
- # The value of
2159
+ # Optional. The value of
2134
2160
  # {::Google::Cloud::GkeBackup::V1::ListRestoresResponse#next_page_token next_page_token}
2135
2161
  # received from a previous `ListRestores` call.
2136
2162
  # Provide this to retrieve the subsequent page in a multi-page list of
2137
2163
  # results. When paginating, all other parameters provided to `ListRestores`
2138
2164
  # must match the call that provided the page token.
2139
2165
  # @param filter [::String]
2140
- # Field match expression used to filter the results.
2166
+ # Optional. Field match expression used to filter the results.
2141
2167
  # @param order_by [::String]
2142
- # Field by which to sort the results.
2168
+ # Optional. Field by which to sort the results.
2143
2169
  #
2144
2170
  # @yield [response, operation] Access the result along with the RPC operation
2145
2171
  # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::Restore>]
@@ -2179,10 +2205,11 @@ module Google
2179
2205
  # Customize the options with defaults
2180
2206
  metadata = @config.rpcs.list_restores.metadata.to_h
2181
2207
 
2182
- # Set x-goog-api-client and x-goog-user-project headers
2208
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2183
2209
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2184
2210
  lib_name: @config.lib_name, lib_version: @config.lib_version,
2185
2211
  gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION
2212
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2186
2213
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2187
2214
 
2188
2215
  header_params = {}
@@ -2266,10 +2293,11 @@ module Google
2266
2293
  # Customize the options with defaults
2267
2294
  metadata = @config.rpcs.get_restore.metadata.to_h
2268
2295
 
2269
- # Set x-goog-api-client and x-goog-user-project headers
2296
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2270
2297
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2271
2298
  lib_name: @config.lib_name, lib_version: @config.lib_version,
2272
2299
  gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION
2300
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2273
2301
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2274
2302
 
2275
2303
  header_params = {}
@@ -2318,7 +2346,7 @@ module Google
2318
2346
  # Required. A new version of the Restore resource that contains updated
2319
2347
  # fields. This may be sparsely populated if an `update_mask` is provided.
2320
2348
  # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
2321
- # This is used to specify the fields to be overwritten in the
2349
+ # Optional. This is used to specify the fields to be overwritten in the
2322
2350
  # Restore targeted for update. The values for each of these
2323
2351
  # updated fields will be taken from the `restore` provided
2324
2352
  # with this request. Field names are relative to the root of the resource.
@@ -2368,10 +2396,11 @@ module Google
2368
2396
  # Customize the options with defaults
2369
2397
  metadata = @config.rpcs.update_restore.metadata.to_h
2370
2398
 
2371
- # Set x-goog-api-client and x-goog-user-project headers
2399
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2372
2400
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2373
2401
  lib_name: @config.lib_name, lib_version: @config.lib_version,
2374
2402
  gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION
2403
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2375
2404
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2376
2405
 
2377
2406
  header_params = {}
@@ -2421,12 +2450,12 @@ module Google
2421
2450
  # Required. Full name of the Restore
2422
2451
  # Format: `projects/*/locations/*/restorePlans/*/restores/*`
2423
2452
  # @param etag [::String]
2424
- # If provided, this value must match the current value of the
2453
+ # Optional. If provided, this value must match the current value of the
2425
2454
  # target Restore's {::Google::Cloud::GkeBackup::V1::Restore#etag etag} field or
2426
2455
  # the request is rejected.
2427
2456
  # @param force [::Boolean]
2428
- # If set to true, any VolumeRestores below this restore will also be deleted.
2429
- # Otherwise, the request will only succeed if the restore has no
2457
+ # Optional. If set to true, any VolumeRestores below this restore will also
2458
+ # be deleted. Otherwise, the request will only succeed if the restore has no
2430
2459
  # VolumeRestores.
2431
2460
  #
2432
2461
  # @yield [response, operation] Access the result along with the RPC operation
@@ -2470,10 +2499,11 @@ module Google
2470
2499
  # Customize the options with defaults
2471
2500
  metadata = @config.rpcs.delete_restore.metadata.to_h
2472
2501
 
2473
- # Set x-goog-api-client and x-goog-user-project headers
2502
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2474
2503
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2475
2504
  lib_name: @config.lib_name, lib_version: @config.lib_version,
2476
2505
  gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION
2506
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2477
2507
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2478
2508
 
2479
2509
  header_params = {}
@@ -2523,23 +2553,23 @@ module Google
2523
2553
  # Required. The Restore that contains the VolumeRestores to list.
2524
2554
  # Format: `projects/*/locations/*/restorePlans/*/restores/*`
2525
2555
  # @param page_size [::Integer]
2526
- # The target number of results to return in a single response.
2556
+ # Optional. The target number of results to return in a single response.
2527
2557
  # If not specified, a default value will be chosen by the service.
2528
- # Note that the response may inclue a partial list and a caller should
2558
+ # Note that the response may include a partial list and a caller should
2529
2559
  # only rely on the response's
2530
2560
  # {::Google::Cloud::GkeBackup::V1::ListVolumeRestoresResponse#next_page_token next_page_token}
2531
2561
  # to determine if there are more instances left to be queried.
2532
2562
  # @param page_token [::String]
2533
- # The value of
2563
+ # Optional. The value of
2534
2564
  # {::Google::Cloud::GkeBackup::V1::ListVolumeRestoresResponse#next_page_token next_page_token}
2535
2565
  # received from a previous `ListVolumeRestores` call.
2536
2566
  # Provide this to retrieve the subsequent page in a multi-page list of
2537
2567
  # results. When paginating, all other parameters provided to
2538
2568
  # `ListVolumeRestores` must match the call that provided the page token.
2539
2569
  # @param filter [::String]
2540
- # Field match expression used to filter the results.
2570
+ # Optional. Field match expression used to filter the results.
2541
2571
  # @param order_by [::String]
2542
- # Field by which to sort the results.
2572
+ # Optional. Field by which to sort the results.
2543
2573
  #
2544
2574
  # @yield [response, operation] Access the result along with the RPC operation
2545
2575
  # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::VolumeRestore>]
@@ -2579,10 +2609,11 @@ module Google
2579
2609
  # Customize the options with defaults
2580
2610
  metadata = @config.rpcs.list_volume_restores.metadata.to_h
2581
2611
 
2582
- # Set x-goog-api-client and x-goog-user-project headers
2612
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2583
2613
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2584
2614
  lib_name: @config.lib_name, lib_version: @config.lib_version,
2585
2615
  gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION
2616
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2586
2617
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2587
2618
 
2588
2619
  header_params = {}
@@ -2666,10 +2697,11 @@ module Google
2666
2697
  # Customize the options with defaults
2667
2698
  metadata = @config.rpcs.get_volume_restore.metadata.to_h
2668
2699
 
2669
- # Set x-goog-api-client and x-goog-user-project headers
2700
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2670
2701
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2671
2702
  lib_name: @config.lib_name, lib_version: @config.lib_version,
2672
2703
  gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION
2704
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2673
2705
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2674
2706
 
2675
2707
  header_params = {}
@@ -2696,6 +2728,94 @@ module Google
2696
2728
  raise ::Google::Cloud::Error.from_error(e)
2697
2729
  end
2698
2730
 
2731
+ ##
2732
+ # Retrieve the link to the backupIndex.
2733
+ #
2734
+ # @overload get_backup_index_download_url(request, options = nil)
2735
+ # Pass arguments to `get_backup_index_download_url` via a request object, either of type
2736
+ # {::Google::Cloud::GkeBackup::V1::GetBackupIndexDownloadUrlRequest} or an equivalent Hash.
2737
+ #
2738
+ # @param request [::Google::Cloud::GkeBackup::V1::GetBackupIndexDownloadUrlRequest, ::Hash]
2739
+ # A request object representing the call parameters. Required. To specify no
2740
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2741
+ # @param options [::Gapic::CallOptions, ::Hash]
2742
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2743
+ #
2744
+ # @overload get_backup_index_download_url(backup: nil)
2745
+ # Pass arguments to `get_backup_index_download_url` via keyword arguments. Note that at
2746
+ # least one keyword argument is required. To specify no parameters, or to keep all
2747
+ # the default parameter values, pass an empty Hash as a request object (see above).
2748
+ #
2749
+ # @param backup [::String]
2750
+ # Required. Full name of Backup resource.
2751
+ # Format:
2752
+ # projects/\\{project}/locations/\\{location}/backupPlans/\\{backup_plan}/backups/\\{backup}
2753
+ #
2754
+ # @yield [response, operation] Access the result along with the RPC operation
2755
+ # @yieldparam response [::Google::Cloud::GkeBackup::V1::GetBackupIndexDownloadUrlResponse]
2756
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2757
+ #
2758
+ # @return [::Google::Cloud::GkeBackup::V1::GetBackupIndexDownloadUrlResponse]
2759
+ #
2760
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2761
+ #
2762
+ # @example Basic example
2763
+ # require "google/cloud/gke_backup/v1"
2764
+ #
2765
+ # # Create a client object. The client can be reused for multiple calls.
2766
+ # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new
2767
+ #
2768
+ # # Create a request. To set request fields, pass in keyword arguments.
2769
+ # request = Google::Cloud::GkeBackup::V1::GetBackupIndexDownloadUrlRequest.new
2770
+ #
2771
+ # # Call the get_backup_index_download_url method.
2772
+ # result = client.get_backup_index_download_url request
2773
+ #
2774
+ # # The returned object is of type Google::Cloud::GkeBackup::V1::GetBackupIndexDownloadUrlResponse.
2775
+ # p result
2776
+ #
2777
+ def get_backup_index_download_url request, options = nil
2778
+ raise ::ArgumentError, "request must be provided" if request.nil?
2779
+
2780
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::GetBackupIndexDownloadUrlRequest
2781
+
2782
+ # Converts hash and nil to an options object
2783
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2784
+
2785
+ # Customize the options with defaults
2786
+ metadata = @config.rpcs.get_backup_index_download_url.metadata.to_h
2787
+
2788
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2789
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2790
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2791
+ gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION
2792
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2793
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2794
+
2795
+ header_params = {}
2796
+ if request.backup
2797
+ header_params["backup"] = request.backup
2798
+ end
2799
+
2800
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2801
+ metadata[:"x-goog-request-params"] ||= request_params_header
2802
+
2803
+ options.apply_defaults timeout: @config.rpcs.get_backup_index_download_url.timeout,
2804
+ metadata: metadata,
2805
+ retry_policy: @config.rpcs.get_backup_index_download_url.retry_policy
2806
+
2807
+ options.apply_defaults timeout: @config.timeout,
2808
+ metadata: @config.metadata,
2809
+ retry_policy: @config.retry_policy
2810
+
2811
+ @backup_for_gke_stub.call_rpc :get_backup_index_download_url, request, options: options do |response, operation|
2812
+ yield response, operation if block_given?
2813
+ return response
2814
+ end
2815
+ rescue ::GRPC::BadStatus => e
2816
+ raise ::Google::Cloud::Error.from_error(e)
2817
+ end
2818
+
2699
2819
  ##
2700
2820
  # Configuration class for the BackupForGKE API.
2701
2821
  #
@@ -2969,6 +3089,11 @@ module Google
2969
3089
  # @return [::Gapic::Config::Method]
2970
3090
  #
2971
3091
  attr_reader :get_volume_restore
3092
+ ##
3093
+ # RPC-specific configuration for `get_backup_index_download_url`
3094
+ # @return [::Gapic::Config::Method]
3095
+ #
3096
+ attr_reader :get_backup_index_download_url
2972
3097
 
2973
3098
  # @private
2974
3099
  def initialize parent_rpcs = nil
@@ -3020,6 +3145,8 @@ module Google
3020
3145
  @list_volume_restores = ::Gapic::Config::Method.new list_volume_restores_config
3021
3146
  get_volume_restore_config = parent_rpcs.get_volume_restore if parent_rpcs.respond_to? :get_volume_restore
3022
3147
  @get_volume_restore = ::Gapic::Config::Method.new get_volume_restore_config
3148
+ get_backup_index_download_url_config = parent_rpcs.get_backup_index_download_url if parent_rpcs.respond_to? :get_backup_index_download_url
3149
+ @get_backup_index_download_url = ::Gapic::Config::Method.new get_backup_index_download_url_config
3023
3150
 
3024
3151
  yield self if block_given?
3025
3152
  end