google-cloud-gke_backup-v1 0.12.0 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/gke_backup/v1/backup_for_gke/client.rb +1910 -339
  3. data/lib/google/cloud/gke_backup/v1/backup_for_gke/paths.rb +80 -0
  4. data/lib/google/cloud/gke_backup/v1/backup_for_gke/rest/client.rb +1764 -285
  5. data/lib/google/cloud/gke_backup/v1/backup_for_gke/rest/service_stub.rb +878 -20
  6. data/lib/google/cloud/gke_backup/v1/version.rb +1 -1
  7. data/lib/google/cloud/gkebackup/v1/backup_channel_pb.rb +48 -0
  8. data/lib/google/cloud/gkebackup/v1/backup_pb.rb +1 -1
  9. data/lib/google/cloud/gkebackup/v1/backup_plan_binding_pb.rb +50 -0
  10. data/lib/google/cloud/gkebackup/v1/backup_plan_pb.rb +1 -1
  11. data/lib/google/cloud/gkebackup/v1/gkebackup_pb.rb +27 -1
  12. data/lib/google/cloud/gkebackup/v1/gkebackup_services_pb.rb +28 -0
  13. data/lib/google/cloud/gkebackup/v1/restore_channel_pb.rb +48 -0
  14. data/lib/google/cloud/gkebackup/v1/restore_pb.rb +1 -1
  15. data/lib/google/cloud/gkebackup/v1/restore_plan_binding_pb.rb +48 -0
  16. data/lib/google/cloud/gkebackup/v1/volume_pb.rb +1 -1
  17. data/proto_docs/google/api/client.rb +14 -0
  18. data/proto_docs/google/api/field_info.rb +88 -0
  19. data/proto_docs/google/cloud/gkebackup/v1/backup.rb +8 -1
  20. data/proto_docs/google/cloud/gkebackup/v1/backup_channel.rb +88 -0
  21. data/proto_docs/google/cloud/gkebackup/v1/backup_plan.rb +8 -1
  22. data/proto_docs/google/cloud/gkebackup/v1/backup_plan_binding.rb +130 -0
  23. data/proto_docs/google/cloud/gkebackup/v1/common.rb +2 -2
  24. data/proto_docs/google/cloud/gkebackup/v1/gkebackup.rb +389 -3
  25. data/proto_docs/google/cloud/gkebackup/v1/restore.rb +14 -6
  26. data/proto_docs/google/cloud/gkebackup/v1/restore_channel.rb +87 -0
  27. data/proto_docs/google/cloud/gkebackup/v1/restore_plan.rb +3 -1
  28. data/proto_docs/google/cloud/gkebackup/v1/restore_plan_binding.rb +68 -0
  29. data/proto_docs/google/cloud/gkebackup/v1/volume.rb +13 -1
  30. metadata +12 -3
@@ -91,6 +91,32 @@ module Google
91
91
 
92
92
  default_config.rpcs.delete_backup_plan.timeout = 60.0
93
93
 
94
+ default_config.rpcs.create_backup_channel.timeout = 60.0
95
+
96
+ default_config.rpcs.list_backup_channels.timeout = 60.0
97
+ default_config.rpcs.list_backup_channels.retry_policy = {
98
+ initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
99
+ }
100
+
101
+ default_config.rpcs.get_backup_channel.timeout = 60.0
102
+ default_config.rpcs.get_backup_channel.retry_policy = {
103
+ initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
104
+ }
105
+
106
+ default_config.rpcs.update_backup_channel.timeout = 60.0
107
+
108
+ default_config.rpcs.delete_backup_channel.timeout = 60.0
109
+
110
+ default_config.rpcs.list_backup_plan_bindings.timeout = 60.0
111
+ default_config.rpcs.list_backup_plan_bindings.retry_policy = {
112
+ initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
113
+ }
114
+
115
+ default_config.rpcs.get_backup_plan_binding.timeout = 60.0
116
+ default_config.rpcs.get_backup_plan_binding.retry_policy = {
117
+ initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
118
+ }
119
+
94
120
  default_config.rpcs.create_backup.timeout = 120.0
95
121
 
96
122
  default_config.rpcs.list_backups.timeout = 60.0
@@ -133,6 +159,32 @@ module Google
133
159
 
134
160
  default_config.rpcs.delete_restore_plan.timeout = 60.0
135
161
 
162
+ default_config.rpcs.create_restore_channel.timeout = 60.0
163
+
164
+ default_config.rpcs.list_restore_channels.timeout = 60.0
165
+ default_config.rpcs.list_restore_channels.retry_policy = {
166
+ initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
167
+ }
168
+
169
+ default_config.rpcs.get_restore_channel.timeout = 60.0
170
+ default_config.rpcs.get_restore_channel.retry_policy = {
171
+ initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
172
+ }
173
+
174
+ default_config.rpcs.update_restore_channel.timeout = 60.0
175
+
176
+ default_config.rpcs.delete_restore_channel.timeout = 60.0
177
+
178
+ default_config.rpcs.list_restore_plan_bindings.timeout = 60.0
179
+ default_config.rpcs.list_restore_plan_bindings.retry_policy = {
180
+ initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
181
+ }
182
+
183
+ default_config.rpcs.get_restore_plan_binding.timeout = 60.0
184
+ default_config.rpcs.get_restore_plan_binding.retry_policy = {
185
+ initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
186
+ }
187
+
136
188
  default_config.rpcs.create_restore.timeout = 120.0
137
189
 
138
190
  default_config.rpcs.list_restores.timeout = 60.0
@@ -453,10 +505,10 @@ module Google
453
505
  # @param order_by [::String]
454
506
  # Optional. Field by which to sort the results.
455
507
  # @yield [result, operation] Access the result along with the TransportOperation object
456
- # @yieldparam result [::Google::Cloud::GkeBackup::V1::ListBackupPlansResponse]
508
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeBackup::V1::BackupPlan>]
457
509
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
458
510
  #
459
- # @return [::Google::Cloud::GkeBackup::V1::ListBackupPlansResponse]
511
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeBackup::V1::BackupPlan>]
460
512
  #
461
513
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
462
514
  #
@@ -508,7 +560,9 @@ module Google
508
560
  retry_policy: @config.retry_policy
509
561
 
510
562
  @backup_for_gke_stub.list_backup_plans request, options do |result, operation|
563
+ result = ::Gapic::Rest::PagedEnumerable.new @backup_for_gke_stub, :list_backup_plans, "backup_plans", request, result, options
511
564
  yield result, operation if block_given?
565
+ throw :response, result
512
566
  end
513
567
  rescue ::Gapic::Rest::Error => e
514
568
  raise ::Google::Cloud::Error.from_error(e)
@@ -784,37 +838,38 @@ module Google
784
838
  end
785
839
 
786
840
  ##
787
- # Creates a Backup for the given BackupPlan.
841
+ # Creates a new BackupChannel in a given location.
788
842
  #
789
- # @overload create_backup(request, options = nil)
790
- # Pass arguments to `create_backup` via a request object, either of type
791
- # {::Google::Cloud::GkeBackup::V1::CreateBackupRequest} or an equivalent Hash.
843
+ # @overload create_backup_channel(request, options = nil)
844
+ # Pass arguments to `create_backup_channel` via a request object, either of type
845
+ # {::Google::Cloud::GkeBackup::V1::CreateBackupChannelRequest} or an equivalent Hash.
792
846
  #
793
- # @param request [::Google::Cloud::GkeBackup::V1::CreateBackupRequest, ::Hash]
847
+ # @param request [::Google::Cloud::GkeBackup::V1::CreateBackupChannelRequest, ::Hash]
794
848
  # A request object representing the call parameters. Required. To specify no
795
849
  # parameters, or to keep all the default parameter values, pass an empty Hash.
796
850
  # @param options [::Gapic::CallOptions, ::Hash]
797
851
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
798
852
  #
799
- # @overload create_backup(parent: nil, backup: nil, backup_id: nil)
800
- # Pass arguments to `create_backup` via keyword arguments. Note that at
853
+ # @overload create_backup_channel(parent: nil, backup_channel: nil, backup_channel_id: nil)
854
+ # Pass arguments to `create_backup_channel` via keyword arguments. Note that at
801
855
  # least one keyword argument is required. To specify no parameters, or to keep all
802
856
  # the default parameter values, pass an empty Hash as a request object (see above).
803
857
  #
804
858
  # @param parent [::String]
805
- # Required. The BackupPlan within which to create the Backup.
806
- # Format: `projects/*/locations/*/backupPlans/*`
807
- # @param backup [::Google::Cloud::GkeBackup::V1::Backup, ::Hash]
808
- # Optional. The Backup resource to create.
809
- # @param backup_id [::String]
810
- # Optional. The client-provided short name for the Backup resource.
859
+ # Required. The location within which to create the BackupChannel.
860
+ # Format: `projects/*/locations/*`
861
+ # @param backup_channel [::Google::Cloud::GkeBackup::V1::BackupChannel, ::Hash]
862
+ # Required. The BackupChannel resource object to create.
863
+ # @param backup_channel_id [::String]
864
+ # Optional. The client-provided short name for the BackupChannel resource.
811
865
  # This name must:
812
866
  #
813
867
  # - be between 1 and 63 characters long (inclusive)
814
868
  # - consist of only lower-case ASCII letters, numbers, and dashes
815
869
  # - start with a lower-case letter
816
870
  # - end with a lower-case letter or number
817
- # - be unique within the set of Backups in this BackupPlan
871
+ # - be unique within the set of BackupChannels in this location
872
+ # If the user does not provide a name, a uuid will be used as the name.
818
873
  # @yield [result, operation] Access the result along with the TransportOperation object
819
874
  # @yieldparam result [::Gapic::Operation]
820
875
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -830,10 +885,10 @@ module Google
830
885
  # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new
831
886
  #
832
887
  # # Create a request. To set request fields, pass in keyword arguments.
833
- # request = Google::Cloud::GkeBackup::V1::CreateBackupRequest.new
888
+ # request = Google::Cloud::GkeBackup::V1::CreateBackupChannelRequest.new
834
889
  #
835
- # # Call the create_backup method.
836
- # result = client.create_backup request
890
+ # # Call the create_backup_channel method.
891
+ # result = client.create_backup_channel request
837
892
  #
838
893
  # # The returned object is of type Gapic::Operation. You can use it to
839
894
  # # check the status of an operation, cancel it, or wait for results.
@@ -845,16 +900,16 @@ module Google
845
900
  # puts "No response received."
846
901
  # end
847
902
  #
848
- def create_backup request, options = nil
903
+ def create_backup_channel request, options = nil
849
904
  raise ::ArgumentError, "request must be provided" if request.nil?
850
905
 
851
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::CreateBackupRequest
906
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::CreateBackupChannelRequest
852
907
 
853
908
  # Converts hash and nil to an options object
854
909
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
855
910
 
856
911
  # Customize the options with defaults
857
- call_metadata = @config.rpcs.create_backup.metadata.to_h
912
+ call_metadata = @config.rpcs.create_backup_channel.metadata.to_h
858
913
 
859
914
  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
860
915
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -865,15 +920,15 @@ module Google
865
920
  call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
866
921
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
867
922
 
868
- options.apply_defaults timeout: @config.rpcs.create_backup.timeout,
923
+ options.apply_defaults timeout: @config.rpcs.create_backup_channel.timeout,
869
924
  metadata: call_metadata,
870
- retry_policy: @config.rpcs.create_backup.retry_policy
925
+ retry_policy: @config.rpcs.create_backup_channel.retry_policy
871
926
 
872
927
  options.apply_defaults timeout: @config.timeout,
873
928
  metadata: @config.metadata,
874
929
  retry_policy: @config.retry_policy
875
930
 
876
- @backup_for_gke_stub.create_backup request, options do |result, operation|
931
+ @backup_for_gke_stub.create_backup_channel request, options do |result, operation|
877
932
  result = ::Gapic::Operation.new result, @operations_client, options: options
878
933
  yield result, operation if block_given?
879
934
  throw :response, result
@@ -883,49 +938,50 @@ module Google
883
938
  end
884
939
 
885
940
  ##
886
- # Lists the Backups for a given BackupPlan.
941
+ # Lists BackupChannels in a given location.
887
942
  #
888
- # @overload list_backups(request, options = nil)
889
- # Pass arguments to `list_backups` via a request object, either of type
890
- # {::Google::Cloud::GkeBackup::V1::ListBackupsRequest} or an equivalent Hash.
943
+ # @overload list_backup_channels(request, options = nil)
944
+ # Pass arguments to `list_backup_channels` via a request object, either of type
945
+ # {::Google::Cloud::GkeBackup::V1::ListBackupChannelsRequest} or an equivalent Hash.
891
946
  #
892
- # @param request [::Google::Cloud::GkeBackup::V1::ListBackupsRequest, ::Hash]
947
+ # @param request [::Google::Cloud::GkeBackup::V1::ListBackupChannelsRequest, ::Hash]
893
948
  # A request object representing the call parameters. Required. To specify no
894
949
  # parameters, or to keep all the default parameter values, pass an empty Hash.
895
950
  # @param options [::Gapic::CallOptions, ::Hash]
896
951
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
897
952
  #
898
- # @overload list_backups(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
899
- # Pass arguments to `list_backups` via keyword arguments. Note that at
953
+ # @overload list_backup_channels(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
954
+ # Pass arguments to `list_backup_channels` via keyword arguments. Note that at
900
955
  # least one keyword argument is required. To specify no parameters, or to keep all
901
956
  # the default parameter values, pass an empty Hash as a request object (see above).
902
957
  #
903
958
  # @param parent [::String]
904
- # Required. The BackupPlan that contains the Backups to list.
905
- # Format: `projects/*/locations/*/backupPlans/*`
959
+ # Required. The location that contains the BackupChannels to list.
960
+ # Format: `projects/*/locations/*`
906
961
  # @param page_size [::Integer]
907
962
  # Optional. The target number of results to return in a single response.
908
963
  # If not specified, a default value will be chosen by the service.
909
964
  # Note that the response may include a partial list and a caller should
910
965
  # only rely on the response's
911
- # {::Google::Cloud::GkeBackup::V1::ListBackupsResponse#next_page_token next_page_token}
966
+ # {::Google::Cloud::GkeBackup::V1::ListBackupChannelsResponse#next_page_token next_page_token}
912
967
  # to determine if there are more instances left to be queried.
913
968
  # @param page_token [::String]
914
969
  # Optional. The value of
915
- # {::Google::Cloud::GkeBackup::V1::ListBackupsResponse#next_page_token next_page_token}
916
- # received from a previous `ListBackups` call.
970
+ # {::Google::Cloud::GkeBackup::V1::ListBackupChannelsResponse#next_page_token next_page_token}
971
+ # received from a previous `ListBackupChannels` call.
917
972
  # Provide this to retrieve the subsequent page in a multi-page list of
918
973
  # results. When paginating, all other parameters provided to
919
- # `ListBackups` must match the call that provided the page token.
974
+ # `ListBackupChannels` must match the call that provided the page
975
+ # token.
920
976
  # @param filter [::String]
921
977
  # Optional. Field match expression used to filter the results.
922
978
  # @param order_by [::String]
923
979
  # Optional. Field by which to sort the results.
924
980
  # @yield [result, operation] Access the result along with the TransportOperation object
925
- # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeBackup::V1::Backup>]
981
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeBackup::V1::BackupChannel>]
926
982
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
927
983
  #
928
- # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeBackup::V1::Backup>]
984
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeBackup::V1::BackupChannel>]
929
985
  #
930
986
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
931
987
  #
@@ -936,28 +992,28 @@ module Google
936
992
  # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new
937
993
  #
938
994
  # # Create a request. To set request fields, pass in keyword arguments.
939
- # request = Google::Cloud::GkeBackup::V1::ListBackupsRequest.new
995
+ # request = Google::Cloud::GkeBackup::V1::ListBackupChannelsRequest.new
940
996
  #
941
- # # Call the list_backups method.
942
- # result = client.list_backups request
997
+ # # Call the list_backup_channels method.
998
+ # result = client.list_backup_channels request
943
999
  #
944
1000
  # # The returned object is of type Gapic::PagedEnumerable. You can iterate
945
1001
  # # over elements, and API calls will be issued to fetch pages as needed.
946
1002
  # result.each do |item|
947
- # # Each element is of type ::Google::Cloud::GkeBackup::V1::Backup.
1003
+ # # Each element is of type ::Google::Cloud::GkeBackup::V1::BackupChannel.
948
1004
  # p item
949
1005
  # end
950
1006
  #
951
- def list_backups request, options = nil
1007
+ def list_backup_channels request, options = nil
952
1008
  raise ::ArgumentError, "request must be provided" if request.nil?
953
1009
 
954
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::ListBackupsRequest
1010
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::ListBackupChannelsRequest
955
1011
 
956
1012
  # Converts hash and nil to an options object
957
1013
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
958
1014
 
959
1015
  # Customize the options with defaults
960
- call_metadata = @config.rpcs.list_backups.metadata.to_h
1016
+ call_metadata = @config.rpcs.list_backup_channels.metadata.to_h
961
1017
 
962
1018
  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
963
1019
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -968,16 +1024,16 @@ module Google
968
1024
  call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
969
1025
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
970
1026
 
971
- options.apply_defaults timeout: @config.rpcs.list_backups.timeout,
1027
+ options.apply_defaults timeout: @config.rpcs.list_backup_channels.timeout,
972
1028
  metadata: call_metadata,
973
- retry_policy: @config.rpcs.list_backups.retry_policy
1029
+ retry_policy: @config.rpcs.list_backup_channels.retry_policy
974
1030
 
975
1031
  options.apply_defaults timeout: @config.timeout,
976
1032
  metadata: @config.metadata,
977
1033
  retry_policy: @config.retry_policy
978
1034
 
979
- @backup_for_gke_stub.list_backups request, options do |result, operation|
980
- result = ::Gapic::Rest::PagedEnumerable.new @backup_for_gke_stub, :list_backups, "backups", request, result, options
1035
+ @backup_for_gke_stub.list_backup_channels request, options do |result, operation|
1036
+ result = ::Gapic::Rest::PagedEnumerable.new @backup_for_gke_stub, :list_backup_channels, "backup_channels", request, result, options
981
1037
  yield result, operation if block_given?
982
1038
  throw :response, result
983
1039
  end
@@ -986,31 +1042,31 @@ module Google
986
1042
  end
987
1043
 
988
1044
  ##
989
- # Retrieve the details of a single Backup.
1045
+ # Retrieve the details of a single BackupChannel.
990
1046
  #
991
- # @overload get_backup(request, options = nil)
992
- # Pass arguments to `get_backup` via a request object, either of type
993
- # {::Google::Cloud::GkeBackup::V1::GetBackupRequest} or an equivalent Hash.
1047
+ # @overload get_backup_channel(request, options = nil)
1048
+ # Pass arguments to `get_backup_channel` via a request object, either of type
1049
+ # {::Google::Cloud::GkeBackup::V1::GetBackupChannelRequest} or an equivalent Hash.
994
1050
  #
995
- # @param request [::Google::Cloud::GkeBackup::V1::GetBackupRequest, ::Hash]
1051
+ # @param request [::Google::Cloud::GkeBackup::V1::GetBackupChannelRequest, ::Hash]
996
1052
  # A request object representing the call parameters. Required. To specify no
997
1053
  # parameters, or to keep all the default parameter values, pass an empty Hash.
998
1054
  # @param options [::Gapic::CallOptions, ::Hash]
999
1055
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1000
1056
  #
1001
- # @overload get_backup(name: nil)
1002
- # Pass arguments to `get_backup` via keyword arguments. Note that at
1057
+ # @overload get_backup_channel(name: nil)
1058
+ # Pass arguments to `get_backup_channel` via keyword arguments. Note that at
1003
1059
  # least one keyword argument is required. To specify no parameters, or to keep all
1004
1060
  # the default parameter values, pass an empty Hash as a request object (see above).
1005
1061
  #
1006
1062
  # @param name [::String]
1007
- # Required. Full name of the Backup resource.
1008
- # Format: `projects/*/locations/*/backupPlans/*/backups/*`
1063
+ # Required. Fully qualified BackupChannel name.
1064
+ # Format: `projects/*/locations/*/backupChannels/*`
1009
1065
  # @yield [result, operation] Access the result along with the TransportOperation object
1010
- # @yieldparam result [::Google::Cloud::GkeBackup::V1::Backup]
1066
+ # @yieldparam result [::Google::Cloud::GkeBackup::V1::BackupChannel]
1011
1067
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
1012
1068
  #
1013
- # @return [::Google::Cloud::GkeBackup::V1::Backup]
1069
+ # @return [::Google::Cloud::GkeBackup::V1::BackupChannel]
1014
1070
  #
1015
1071
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1016
1072
  #
@@ -1021,24 +1077,24 @@ module Google
1021
1077
  # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new
1022
1078
  #
1023
1079
  # # Create a request. To set request fields, pass in keyword arguments.
1024
- # request = Google::Cloud::GkeBackup::V1::GetBackupRequest.new
1080
+ # request = Google::Cloud::GkeBackup::V1::GetBackupChannelRequest.new
1025
1081
  #
1026
- # # Call the get_backup method.
1027
- # result = client.get_backup request
1082
+ # # Call the get_backup_channel method.
1083
+ # result = client.get_backup_channel request
1028
1084
  #
1029
- # # The returned object is of type Google::Cloud::GkeBackup::V1::Backup.
1085
+ # # The returned object is of type Google::Cloud::GkeBackup::V1::BackupChannel.
1030
1086
  # p result
1031
1087
  #
1032
- def get_backup request, options = nil
1088
+ def get_backup_channel request, options = nil
1033
1089
  raise ::ArgumentError, "request must be provided" if request.nil?
1034
1090
 
1035
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::GetBackupRequest
1091
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::GetBackupChannelRequest
1036
1092
 
1037
1093
  # Converts hash and nil to an options object
1038
1094
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1039
1095
 
1040
1096
  # Customize the options with defaults
1041
- call_metadata = @config.rpcs.get_backup.metadata.to_h
1097
+ call_metadata = @config.rpcs.get_backup_channel.metadata.to_h
1042
1098
 
1043
1099
  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1044
1100
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -1049,15 +1105,15 @@ module Google
1049
1105
  call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1050
1106
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1051
1107
 
1052
- options.apply_defaults timeout: @config.rpcs.get_backup.timeout,
1108
+ options.apply_defaults timeout: @config.rpcs.get_backup_channel.timeout,
1053
1109
  metadata: call_metadata,
1054
- retry_policy: @config.rpcs.get_backup.retry_policy
1110
+ retry_policy: @config.rpcs.get_backup_channel.retry_policy
1055
1111
 
1056
1112
  options.apply_defaults timeout: @config.timeout,
1057
1113
  metadata: @config.metadata,
1058
1114
  retry_policy: @config.retry_policy
1059
1115
 
1060
- @backup_for_gke_stub.get_backup request, options do |result, operation|
1116
+ @backup_for_gke_stub.get_backup_channel request, options do |result, operation|
1061
1117
  yield result, operation if block_given?
1062
1118
  end
1063
1119
  rescue ::Gapic::Rest::Error => e
@@ -1065,35 +1121,36 @@ module Google
1065
1121
  end
1066
1122
 
1067
1123
  ##
1068
- # Update a Backup.
1124
+ # Update a BackupChannel.
1069
1125
  #
1070
- # @overload update_backup(request, options = nil)
1071
- # Pass arguments to `update_backup` via a request object, either of type
1072
- # {::Google::Cloud::GkeBackup::V1::UpdateBackupRequest} or an equivalent Hash.
1126
+ # @overload update_backup_channel(request, options = nil)
1127
+ # Pass arguments to `update_backup_channel` via a request object, either of type
1128
+ # {::Google::Cloud::GkeBackup::V1::UpdateBackupChannelRequest} or an equivalent Hash.
1073
1129
  #
1074
- # @param request [::Google::Cloud::GkeBackup::V1::UpdateBackupRequest, ::Hash]
1130
+ # @param request [::Google::Cloud::GkeBackup::V1::UpdateBackupChannelRequest, ::Hash]
1075
1131
  # A request object representing the call parameters. Required. To specify no
1076
1132
  # parameters, or to keep all the default parameter values, pass an empty Hash.
1077
1133
  # @param options [::Gapic::CallOptions, ::Hash]
1078
1134
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1079
1135
  #
1080
- # @overload update_backup(backup: nil, update_mask: nil)
1081
- # Pass arguments to `update_backup` via keyword arguments. Note that at
1136
+ # @overload update_backup_channel(backup_channel: nil, update_mask: nil)
1137
+ # Pass arguments to `update_backup_channel` via keyword arguments. Note that at
1082
1138
  # least one keyword argument is required. To specify no parameters, or to keep all
1083
1139
  # the default parameter values, pass an empty Hash as a request object (see above).
1084
1140
  #
1085
- # @param backup [::Google::Cloud::GkeBackup::V1::Backup, ::Hash]
1086
- # Required. A new version of the Backup resource that contains updated
1141
+ # @param backup_channel [::Google::Cloud::GkeBackup::V1::BackupChannel, ::Hash]
1142
+ # Required. A new version of the BackupChannel resource that contains updated
1087
1143
  # fields. This may be sparsely populated if an `update_mask` is provided.
1088
1144
  # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
1089
1145
  # Optional. This is used to specify the fields to be overwritten in the
1090
- # Backup targeted for update. The values for each of these
1091
- # updated fields will be taken from the `backup_plan` provided
1092
- # with this request. Field names are relative to the root of the resource.
1093
- # If no `update_mask` is provided, all fields in `backup` will be
1094
- # written to the target Backup resource.
1095
- # Note that OUTPUT_ONLY and IMMUTABLE fields in `backup` are ignored
1096
- # and are not used to update the target Backup.
1146
+ # BackupChannel targeted for update. The values for each of these
1147
+ # updated fields will be taken from the `backup_channel` provided
1148
+ # with this request. Field names are relative to the root of the resource
1149
+ # (e.g., `description`, `labels`, etc.)
1150
+ # If no `update_mask` is provided, all fields in `backup_channel` will
1151
+ # be written to the target BackupChannel resource. Note that
1152
+ # OUTPUT_ONLY and IMMUTABLE fields in `backup_channel` are ignored and
1153
+ # are not used to update the target BackupChannel.
1097
1154
  # @yield [result, operation] Access the result along with the TransportOperation object
1098
1155
  # @yieldparam result [::Gapic::Operation]
1099
1156
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -1109,10 +1166,10 @@ module Google
1109
1166
  # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new
1110
1167
  #
1111
1168
  # # Create a request. To set request fields, pass in keyword arguments.
1112
- # request = Google::Cloud::GkeBackup::V1::UpdateBackupRequest.new
1169
+ # request = Google::Cloud::GkeBackup::V1::UpdateBackupChannelRequest.new
1113
1170
  #
1114
- # # Call the update_backup method.
1115
- # result = client.update_backup request
1171
+ # # Call the update_backup_channel method.
1172
+ # result = client.update_backup_channel request
1116
1173
  #
1117
1174
  # # The returned object is of type Gapic::Operation. You can use it to
1118
1175
  # # check the status of an operation, cancel it, or wait for results.
@@ -1124,16 +1181,16 @@ module Google
1124
1181
  # puts "No response received."
1125
1182
  # end
1126
1183
  #
1127
- def update_backup request, options = nil
1184
+ def update_backup_channel request, options = nil
1128
1185
  raise ::ArgumentError, "request must be provided" if request.nil?
1129
1186
 
1130
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::UpdateBackupRequest
1187
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::UpdateBackupChannelRequest
1131
1188
 
1132
1189
  # Converts hash and nil to an options object
1133
1190
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1134
1191
 
1135
1192
  # Customize the options with defaults
1136
- call_metadata = @config.rpcs.update_backup.metadata.to_h
1193
+ call_metadata = @config.rpcs.update_backup_channel.metadata.to_h
1137
1194
 
1138
1195
  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1139
1196
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -1144,15 +1201,15 @@ module Google
1144
1201
  call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1145
1202
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1146
1203
 
1147
- options.apply_defaults timeout: @config.rpcs.update_backup.timeout,
1204
+ options.apply_defaults timeout: @config.rpcs.update_backup_channel.timeout,
1148
1205
  metadata: call_metadata,
1149
- retry_policy: @config.rpcs.update_backup.retry_policy
1206
+ retry_policy: @config.rpcs.update_backup_channel.retry_policy
1150
1207
 
1151
1208
  options.apply_defaults timeout: @config.timeout,
1152
1209
  metadata: @config.metadata,
1153
1210
  retry_policy: @config.retry_policy
1154
1211
 
1155
- @backup_for_gke_stub.update_backup request, options do |result, operation|
1212
+ @backup_for_gke_stub.update_backup_channel request, options do |result, operation|
1156
1213
  result = ::Gapic::Operation.new result, @operations_client, options: options
1157
1214
  yield result, operation if block_given?
1158
1215
  throw :response, result
@@ -1162,34 +1219,34 @@ module Google
1162
1219
  end
1163
1220
 
1164
1221
  ##
1165
- # Deletes an existing Backup.
1222
+ # Deletes an existing BackupChannel.
1166
1223
  #
1167
- # @overload delete_backup(request, options = nil)
1168
- # Pass arguments to `delete_backup` via a request object, either of type
1169
- # {::Google::Cloud::GkeBackup::V1::DeleteBackupRequest} or an equivalent Hash.
1224
+ # @overload delete_backup_channel(request, options = nil)
1225
+ # Pass arguments to `delete_backup_channel` via a request object, either of type
1226
+ # {::Google::Cloud::GkeBackup::V1::DeleteBackupChannelRequest} or an equivalent Hash.
1170
1227
  #
1171
- # @param request [::Google::Cloud::GkeBackup::V1::DeleteBackupRequest, ::Hash]
1228
+ # @param request [::Google::Cloud::GkeBackup::V1::DeleteBackupChannelRequest, ::Hash]
1172
1229
  # A request object representing the call parameters. Required. To specify no
1173
1230
  # parameters, or to keep all the default parameter values, pass an empty Hash.
1174
1231
  # @param options [::Gapic::CallOptions, ::Hash]
1175
1232
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1176
1233
  #
1177
- # @overload delete_backup(name: nil, etag: nil, force: nil)
1178
- # Pass arguments to `delete_backup` via keyword arguments. Note that at
1234
+ # @overload delete_backup_channel(name: nil, etag: nil, force: nil)
1235
+ # Pass arguments to `delete_backup_channel` via keyword arguments. Note that at
1179
1236
  # least one keyword argument is required. To specify no parameters, or to keep all
1180
1237
  # the default parameter values, pass an empty Hash as a request object (see above).
1181
1238
  #
1182
1239
  # @param name [::String]
1183
- # Required. Name of the Backup resource.
1184
- # Format: `projects/*/locations/*/backupPlans/*/backups/*`
1240
+ # Required. Fully qualified BackupChannel name.
1241
+ # Format: `projects/*/locations/*/backupChannels/*`
1185
1242
  # @param etag [::String]
1186
1243
  # Optional. If provided, this value must match the current value of the
1187
- # target Backup's {::Google::Cloud::GkeBackup::V1::Backup#etag etag} field or the
1188
- # request is rejected.
1244
+ # target BackupChannel's {::Google::Cloud::GkeBackup::V1::BackupChannel#etag etag}
1245
+ # field or the request is rejected.
1189
1246
  # @param force [::Boolean]
1190
- # Optional. If set to true, any VolumeBackups below this Backup will also be
1191
- # deleted. Otherwise, the request will only succeed if the Backup has no
1192
- # VolumeBackups.
1247
+ # Optional. If set to true, any BackupPlanAssociations below this
1248
+ # BackupChannel will also be deleted. Otherwise, the request will only
1249
+ # succeed if the BackupChannel has no BackupPlanAssociations.
1193
1250
  # @yield [result, operation] Access the result along with the TransportOperation object
1194
1251
  # @yieldparam result [::Gapic::Operation]
1195
1252
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -1205,10 +1262,10 @@ module Google
1205
1262
  # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new
1206
1263
  #
1207
1264
  # # Create a request. To set request fields, pass in keyword arguments.
1208
- # request = Google::Cloud::GkeBackup::V1::DeleteBackupRequest.new
1265
+ # request = Google::Cloud::GkeBackup::V1::DeleteBackupChannelRequest.new
1209
1266
  #
1210
- # # Call the delete_backup method.
1211
- # result = client.delete_backup request
1267
+ # # Call the delete_backup_channel method.
1268
+ # result = client.delete_backup_channel request
1212
1269
  #
1213
1270
  # # The returned object is of type Gapic::Operation. You can use it to
1214
1271
  # # check the status of an operation, cancel it, or wait for results.
@@ -1220,16 +1277,16 @@ module Google
1220
1277
  # puts "No response received."
1221
1278
  # end
1222
1279
  #
1223
- def delete_backup request, options = nil
1280
+ def delete_backup_channel request, options = nil
1224
1281
  raise ::ArgumentError, "request must be provided" if request.nil?
1225
1282
 
1226
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::DeleteBackupRequest
1283
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::DeleteBackupChannelRequest
1227
1284
 
1228
1285
  # Converts hash and nil to an options object
1229
1286
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1230
1287
 
1231
1288
  # Customize the options with defaults
1232
- call_metadata = @config.rpcs.delete_backup.metadata.to_h
1289
+ call_metadata = @config.rpcs.delete_backup_channel.metadata.to_h
1233
1290
 
1234
1291
  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1235
1292
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -1240,15 +1297,15 @@ module Google
1240
1297
  call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1241
1298
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1242
1299
 
1243
- options.apply_defaults timeout: @config.rpcs.delete_backup.timeout,
1300
+ options.apply_defaults timeout: @config.rpcs.delete_backup_channel.timeout,
1244
1301
  metadata: call_metadata,
1245
- retry_policy: @config.rpcs.delete_backup.retry_policy
1302
+ retry_policy: @config.rpcs.delete_backup_channel.retry_policy
1246
1303
 
1247
1304
  options.apply_defaults timeout: @config.timeout,
1248
1305
  metadata: @config.metadata,
1249
1306
  retry_policy: @config.retry_policy
1250
1307
 
1251
- @backup_for_gke_stub.delete_backup request, options do |result, operation|
1308
+ @backup_for_gke_stub.delete_backup_channel request, options do |result, operation|
1252
1309
  result = ::Gapic::Operation.new result, @operations_client, options: options
1253
1310
  yield result, operation if block_given?
1254
1311
  throw :response, result
@@ -1258,49 +1315,50 @@ module Google
1258
1315
  end
1259
1316
 
1260
1317
  ##
1261
- # Lists the VolumeBackups for a given Backup.
1318
+ # Lists BackupPlanBindings in a given location.
1262
1319
  #
1263
- # @overload list_volume_backups(request, options = nil)
1264
- # Pass arguments to `list_volume_backups` via a request object, either of type
1265
- # {::Google::Cloud::GkeBackup::V1::ListVolumeBackupsRequest} or an equivalent Hash.
1320
+ # @overload list_backup_plan_bindings(request, options = nil)
1321
+ # Pass arguments to `list_backup_plan_bindings` via a request object, either of type
1322
+ # {::Google::Cloud::GkeBackup::V1::ListBackupPlanBindingsRequest} or an equivalent Hash.
1266
1323
  #
1267
- # @param request [::Google::Cloud::GkeBackup::V1::ListVolumeBackupsRequest, ::Hash]
1324
+ # @param request [::Google::Cloud::GkeBackup::V1::ListBackupPlanBindingsRequest, ::Hash]
1268
1325
  # A request object representing the call parameters. Required. To specify no
1269
1326
  # parameters, or to keep all the default parameter values, pass an empty Hash.
1270
1327
  # @param options [::Gapic::CallOptions, ::Hash]
1271
1328
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1272
1329
  #
1273
- # @overload list_volume_backups(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
1274
- # Pass arguments to `list_volume_backups` via keyword arguments. Note that at
1330
+ # @overload list_backup_plan_bindings(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
1331
+ # Pass arguments to `list_backup_plan_bindings` via keyword arguments. Note that at
1275
1332
  # least one keyword argument is required. To specify no parameters, or to keep all
1276
1333
  # the default parameter values, pass an empty Hash as a request object (see above).
1277
1334
  #
1278
1335
  # @param parent [::String]
1279
- # Required. The Backup that contains the VolumeBackups to list.
1280
- # Format: `projects/*/locations/*/backupPlans/*/backups/*`
1336
+ # Required. The BackupChannel that contains the BackupPlanBindings to list.
1337
+ # Format: `projects/*/locations/*/backupChannels/*`
1281
1338
  # @param page_size [::Integer]
1282
1339
  # Optional. The target number of results to return in a single response.
1283
1340
  # If not specified, a default value will be chosen by the service.
1284
1341
  # Note that the response may include a partial list and a caller should
1285
1342
  # only rely on the response's
1286
- # {::Google::Cloud::GkeBackup::V1::ListVolumeBackupsResponse#next_page_token next_page_token}
1343
+ # {::Google::Cloud::GkeBackup::V1::ListBackupPlanBindingsResponse#next_page_token next_page_token}
1287
1344
  # to determine if there are more instances left to be queried.
1288
1345
  # @param page_token [::String]
1289
1346
  # Optional. The value of
1290
- # {::Google::Cloud::GkeBackup::V1::ListVolumeBackupsResponse#next_page_token next_page_token}
1291
- # received from a previous `ListVolumeBackups` call.
1347
+ # {::Google::Cloud::GkeBackup::V1::ListBackupPlanBindingsResponse#next_page_token next_page_token}
1348
+ # received from a previous `ListBackupPlanBindings` call.
1292
1349
  # Provide this to retrieve the subsequent page in a multi-page list of
1293
1350
  # results. When paginating, all other parameters provided to
1294
- # `ListVolumeBackups` must match the call that provided the page token.
1351
+ # `ListBackupPlanBindings` must match the call that provided the page
1352
+ # token.
1295
1353
  # @param filter [::String]
1296
1354
  # Optional. Field match expression used to filter the results.
1297
1355
  # @param order_by [::String]
1298
1356
  # Optional. Field by which to sort the results.
1299
1357
  # @yield [result, operation] Access the result along with the TransportOperation object
1300
- # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeBackup::V1::VolumeBackup>]
1358
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeBackup::V1::BackupPlanBinding>]
1301
1359
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
1302
1360
  #
1303
- # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeBackup::V1::VolumeBackup>]
1361
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeBackup::V1::BackupPlanBinding>]
1304
1362
  #
1305
1363
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1306
1364
  #
@@ -1311,28 +1369,28 @@ module Google
1311
1369
  # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new
1312
1370
  #
1313
1371
  # # Create a request. To set request fields, pass in keyword arguments.
1314
- # request = Google::Cloud::GkeBackup::V1::ListVolumeBackupsRequest.new
1372
+ # request = Google::Cloud::GkeBackup::V1::ListBackupPlanBindingsRequest.new
1315
1373
  #
1316
- # # Call the list_volume_backups method.
1317
- # result = client.list_volume_backups request
1374
+ # # Call the list_backup_plan_bindings method.
1375
+ # result = client.list_backup_plan_bindings request
1318
1376
  #
1319
1377
  # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1320
1378
  # # over elements, and API calls will be issued to fetch pages as needed.
1321
1379
  # result.each do |item|
1322
- # # Each element is of type ::Google::Cloud::GkeBackup::V1::VolumeBackup.
1380
+ # # Each element is of type ::Google::Cloud::GkeBackup::V1::BackupPlanBinding.
1323
1381
  # p item
1324
1382
  # end
1325
1383
  #
1326
- def list_volume_backups request, options = nil
1384
+ def list_backup_plan_bindings request, options = nil
1327
1385
  raise ::ArgumentError, "request must be provided" if request.nil?
1328
1386
 
1329
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::ListVolumeBackupsRequest
1387
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::ListBackupPlanBindingsRequest
1330
1388
 
1331
1389
  # Converts hash and nil to an options object
1332
1390
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1333
1391
 
1334
1392
  # Customize the options with defaults
1335
- call_metadata = @config.rpcs.list_volume_backups.metadata.to_h
1393
+ call_metadata = @config.rpcs.list_backup_plan_bindings.metadata.to_h
1336
1394
 
1337
1395
  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1338
1396
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -1343,16 +1401,16 @@ module Google
1343
1401
  call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1344
1402
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1345
1403
 
1346
- options.apply_defaults timeout: @config.rpcs.list_volume_backups.timeout,
1404
+ options.apply_defaults timeout: @config.rpcs.list_backup_plan_bindings.timeout,
1347
1405
  metadata: call_metadata,
1348
- retry_policy: @config.rpcs.list_volume_backups.retry_policy
1406
+ retry_policy: @config.rpcs.list_backup_plan_bindings.retry_policy
1349
1407
 
1350
1408
  options.apply_defaults timeout: @config.timeout,
1351
1409
  metadata: @config.metadata,
1352
1410
  retry_policy: @config.retry_policy
1353
1411
 
1354
- @backup_for_gke_stub.list_volume_backups request, options do |result, operation|
1355
- result = ::Gapic::Rest::PagedEnumerable.new @backup_for_gke_stub, :list_volume_backups, "volume_backups", request, result, options
1412
+ @backup_for_gke_stub.list_backup_plan_bindings request, options do |result, operation|
1413
+ result = ::Gapic::Rest::PagedEnumerable.new @backup_for_gke_stub, :list_backup_plan_bindings, "backup_plan_bindings", request, result, options
1356
1414
  yield result, operation if block_given?
1357
1415
  throw :response, result
1358
1416
  end
@@ -1361,31 +1419,32 @@ module Google
1361
1419
  end
1362
1420
 
1363
1421
  ##
1364
- # Retrieve the details of a single VolumeBackup.
1422
+ # Retrieve the details of a single BackupPlanBinding.
1365
1423
  #
1366
- # @overload get_volume_backup(request, options = nil)
1367
- # Pass arguments to `get_volume_backup` via a request object, either of type
1368
- # {::Google::Cloud::GkeBackup::V1::GetVolumeBackupRequest} or an equivalent Hash.
1424
+ # @overload get_backup_plan_binding(request, options = nil)
1425
+ # Pass arguments to `get_backup_plan_binding` via a request object, either of type
1426
+ # {::Google::Cloud::GkeBackup::V1::GetBackupPlanBindingRequest} or an equivalent Hash.
1369
1427
  #
1370
- # @param request [::Google::Cloud::GkeBackup::V1::GetVolumeBackupRequest, ::Hash]
1428
+ # @param request [::Google::Cloud::GkeBackup::V1::GetBackupPlanBindingRequest, ::Hash]
1371
1429
  # A request object representing the call parameters. Required. To specify no
1372
1430
  # parameters, or to keep all the default parameter values, pass an empty Hash.
1373
1431
  # @param options [::Gapic::CallOptions, ::Hash]
1374
1432
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1375
1433
  #
1376
- # @overload get_volume_backup(name: nil)
1377
- # Pass arguments to `get_volume_backup` via keyword arguments. Note that at
1434
+ # @overload get_backup_plan_binding(name: nil)
1435
+ # Pass arguments to `get_backup_plan_binding` via keyword arguments. Note that at
1378
1436
  # least one keyword argument is required. To specify no parameters, or to keep all
1379
1437
  # the default parameter values, pass an empty Hash as a request object (see above).
1380
1438
  #
1381
1439
  # @param name [::String]
1382
- # Required. Full name of the VolumeBackup resource.
1383
- # Format: `projects/*/locations/*/backupPlans/*/backups/*/volumeBackups/*`
1440
+ # Required. Fully qualified BackupPlanBinding name.
1441
+ # Format:
1442
+ # `projects/*/locations/*/backupChannels/*/backupPlanBindings/*`
1384
1443
  # @yield [result, operation] Access the result along with the TransportOperation object
1385
- # @yieldparam result [::Google::Cloud::GkeBackup::V1::VolumeBackup]
1444
+ # @yieldparam result [::Google::Cloud::GkeBackup::V1::BackupPlanBinding]
1386
1445
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
1387
1446
  #
1388
- # @return [::Google::Cloud::GkeBackup::V1::VolumeBackup]
1447
+ # @return [::Google::Cloud::GkeBackup::V1::BackupPlanBinding]
1389
1448
  #
1390
1449
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1391
1450
  #
@@ -1396,24 +1455,24 @@ module Google
1396
1455
  # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new
1397
1456
  #
1398
1457
  # # Create a request. To set request fields, pass in keyword arguments.
1399
- # request = Google::Cloud::GkeBackup::V1::GetVolumeBackupRequest.new
1458
+ # request = Google::Cloud::GkeBackup::V1::GetBackupPlanBindingRequest.new
1400
1459
  #
1401
- # # Call the get_volume_backup method.
1402
- # result = client.get_volume_backup request
1460
+ # # Call the get_backup_plan_binding method.
1461
+ # result = client.get_backup_plan_binding request
1403
1462
  #
1404
- # # The returned object is of type Google::Cloud::GkeBackup::V1::VolumeBackup.
1463
+ # # The returned object is of type Google::Cloud::GkeBackup::V1::BackupPlanBinding.
1405
1464
  # p result
1406
1465
  #
1407
- def get_volume_backup request, options = nil
1466
+ def get_backup_plan_binding request, options = nil
1408
1467
  raise ::ArgumentError, "request must be provided" if request.nil?
1409
1468
 
1410
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::GetVolumeBackupRequest
1469
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::GetBackupPlanBindingRequest
1411
1470
 
1412
1471
  # Converts hash and nil to an options object
1413
1472
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1414
1473
 
1415
1474
  # Customize the options with defaults
1416
- call_metadata = @config.rpcs.get_volume_backup.metadata.to_h
1475
+ call_metadata = @config.rpcs.get_backup_plan_binding.metadata.to_h
1417
1476
 
1418
1477
  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1419
1478
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -1424,15 +1483,15 @@ module Google
1424
1483
  call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1425
1484
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1426
1485
 
1427
- options.apply_defaults timeout: @config.rpcs.get_volume_backup.timeout,
1486
+ options.apply_defaults timeout: @config.rpcs.get_backup_plan_binding.timeout,
1428
1487
  metadata: call_metadata,
1429
- retry_policy: @config.rpcs.get_volume_backup.retry_policy
1488
+ retry_policy: @config.rpcs.get_backup_plan_binding.retry_policy
1430
1489
 
1431
1490
  options.apply_defaults timeout: @config.timeout,
1432
1491
  metadata: @config.metadata,
1433
1492
  retry_policy: @config.retry_policy
1434
1493
 
1435
- @backup_for_gke_stub.get_volume_backup request, options do |result, operation|
1494
+ @backup_for_gke_stub.get_backup_plan_binding request, options do |result, operation|
1436
1495
  yield result, operation if block_given?
1437
1496
  end
1438
1497
  rescue ::Gapic::Rest::Error => e
@@ -1440,37 +1499,37 @@ module Google
1440
1499
  end
1441
1500
 
1442
1501
  ##
1443
- # Creates a new RestorePlan in a given location.
1502
+ # Creates a Backup for the given BackupPlan.
1444
1503
  #
1445
- # @overload create_restore_plan(request, options = nil)
1446
- # Pass arguments to `create_restore_plan` via a request object, either of type
1447
- # {::Google::Cloud::GkeBackup::V1::CreateRestorePlanRequest} or an equivalent Hash.
1504
+ # @overload create_backup(request, options = nil)
1505
+ # Pass arguments to `create_backup` via a request object, either of type
1506
+ # {::Google::Cloud::GkeBackup::V1::CreateBackupRequest} or an equivalent Hash.
1448
1507
  #
1449
- # @param request [::Google::Cloud::GkeBackup::V1::CreateRestorePlanRequest, ::Hash]
1508
+ # @param request [::Google::Cloud::GkeBackup::V1::CreateBackupRequest, ::Hash]
1450
1509
  # A request object representing the call parameters. Required. To specify no
1451
1510
  # parameters, or to keep all the default parameter values, pass an empty Hash.
1452
1511
  # @param options [::Gapic::CallOptions, ::Hash]
1453
1512
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1454
1513
  #
1455
- # @overload create_restore_plan(parent: nil, restore_plan: nil, restore_plan_id: nil)
1456
- # Pass arguments to `create_restore_plan` via keyword arguments. Note that at
1514
+ # @overload create_backup(parent: nil, backup: nil, backup_id: nil)
1515
+ # Pass arguments to `create_backup` via keyword arguments. Note that at
1457
1516
  # least one keyword argument is required. To specify no parameters, or to keep all
1458
1517
  # the default parameter values, pass an empty Hash as a request object (see above).
1459
1518
  #
1460
1519
  # @param parent [::String]
1461
- # Required. The location within which to create the RestorePlan.
1462
- # Format: `projects/*/locations/*`
1463
- # @param restore_plan [::Google::Cloud::GkeBackup::V1::RestorePlan, ::Hash]
1464
- # Required. The RestorePlan resource object to create.
1465
- # @param restore_plan_id [::String]
1466
- # Required. The client-provided short name for the RestorePlan resource.
1520
+ # Required. The BackupPlan within which to create the Backup.
1521
+ # Format: `projects/*/locations/*/backupPlans/*`
1522
+ # @param backup [::Google::Cloud::GkeBackup::V1::Backup, ::Hash]
1523
+ # Optional. The Backup resource to create.
1524
+ # @param backup_id [::String]
1525
+ # Optional. The client-provided short name for the Backup resource.
1467
1526
  # This name must:
1468
1527
  #
1469
1528
  # - be between 1 and 63 characters long (inclusive)
1470
1529
  # - consist of only lower-case ASCII letters, numbers, and dashes
1471
1530
  # - start with a lower-case letter
1472
1531
  # - end with a lower-case letter or number
1473
- # - be unique within the set of RestorePlans in this location
1532
+ # - be unique within the set of Backups in this BackupPlan
1474
1533
  # @yield [result, operation] Access the result along with the TransportOperation object
1475
1534
  # @yieldparam result [::Gapic::Operation]
1476
1535
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -1486,10 +1545,10 @@ module Google
1486
1545
  # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new
1487
1546
  #
1488
1547
  # # Create a request. To set request fields, pass in keyword arguments.
1489
- # request = Google::Cloud::GkeBackup::V1::CreateRestorePlanRequest.new
1548
+ # request = Google::Cloud::GkeBackup::V1::CreateBackupRequest.new
1490
1549
  #
1491
- # # Call the create_restore_plan method.
1492
- # result = client.create_restore_plan request
1550
+ # # Call the create_backup method.
1551
+ # result = client.create_backup request
1493
1552
  #
1494
1553
  # # The returned object is of type Gapic::Operation. You can use it to
1495
1554
  # # check the status of an operation, cancel it, or wait for results.
@@ -1501,16 +1560,16 @@ module Google
1501
1560
  # puts "No response received."
1502
1561
  # end
1503
1562
  #
1504
- def create_restore_plan request, options = nil
1563
+ def create_backup request, options = nil
1505
1564
  raise ::ArgumentError, "request must be provided" if request.nil?
1506
1565
 
1507
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::CreateRestorePlanRequest
1566
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::CreateBackupRequest
1508
1567
 
1509
1568
  # Converts hash and nil to an options object
1510
1569
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1511
1570
 
1512
1571
  # Customize the options with defaults
1513
- call_metadata = @config.rpcs.create_restore_plan.metadata.to_h
1572
+ call_metadata = @config.rpcs.create_backup.metadata.to_h
1514
1573
 
1515
1574
  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1516
1575
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -1521,15 +1580,15 @@ module Google
1521
1580
  call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1522
1581
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1523
1582
 
1524
- options.apply_defaults timeout: @config.rpcs.create_restore_plan.timeout,
1583
+ options.apply_defaults timeout: @config.rpcs.create_backup.timeout,
1525
1584
  metadata: call_metadata,
1526
- retry_policy: @config.rpcs.create_restore_plan.retry_policy
1585
+ retry_policy: @config.rpcs.create_backup.retry_policy
1527
1586
 
1528
1587
  options.apply_defaults timeout: @config.timeout,
1529
1588
  metadata: @config.metadata,
1530
1589
  retry_policy: @config.retry_policy
1531
1590
 
1532
- @backup_for_gke_stub.create_restore_plan request, options do |result, operation|
1591
+ @backup_for_gke_stub.create_backup request, options do |result, operation|
1533
1592
  result = ::Gapic::Operation.new result, @operations_client, options: options
1534
1593
  yield result, operation if block_given?
1535
1594
  throw :response, result
@@ -1539,13 +1598,672 @@ module Google
1539
1598
  end
1540
1599
 
1541
1600
  ##
1542
- # Lists RestorePlans in a given location.
1601
+ # Lists the Backups for a given BackupPlan.
1543
1602
  #
1544
- # @overload list_restore_plans(request, options = nil)
1545
- # Pass arguments to `list_restore_plans` via a request object, either of type
1546
- # {::Google::Cloud::GkeBackup::V1::ListRestorePlansRequest} or an equivalent Hash.
1603
+ # @overload list_backups(request, options = nil)
1604
+ # Pass arguments to `list_backups` via a request object, either of type
1605
+ # {::Google::Cloud::GkeBackup::V1::ListBackupsRequest} or an equivalent Hash.
1547
1606
  #
1548
- # @param request [::Google::Cloud::GkeBackup::V1::ListRestorePlansRequest, ::Hash]
1607
+ # @param request [::Google::Cloud::GkeBackup::V1::ListBackupsRequest, ::Hash]
1608
+ # A request object representing the call parameters. Required. To specify no
1609
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1610
+ # @param options [::Gapic::CallOptions, ::Hash]
1611
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1612
+ #
1613
+ # @overload list_backups(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, return_partial_success: nil)
1614
+ # Pass arguments to `list_backups` via keyword arguments. Note that at
1615
+ # least one keyword argument is required. To specify no parameters, or to keep all
1616
+ # the default parameter values, pass an empty Hash as a request object (see above).
1617
+ #
1618
+ # @param parent [::String]
1619
+ # Required. The BackupPlan that contains the Backups to list.
1620
+ # Format: `projects/*/locations/*/backupPlans/*`
1621
+ # @param page_size [::Integer]
1622
+ # Optional. The target number of results to return in a single response.
1623
+ # If not specified, a default value will be chosen by the service.
1624
+ # Note that the response may include a partial list and a caller should
1625
+ # only rely on the response's
1626
+ # {::Google::Cloud::GkeBackup::V1::ListBackupsResponse#next_page_token next_page_token}
1627
+ # to determine if there are more instances left to be queried.
1628
+ # @param page_token [::String]
1629
+ # Optional. The value of
1630
+ # {::Google::Cloud::GkeBackup::V1::ListBackupsResponse#next_page_token next_page_token}
1631
+ # received from a previous `ListBackups` call.
1632
+ # Provide this to retrieve the subsequent page in a multi-page list of
1633
+ # results. When paginating, all other parameters provided to
1634
+ # `ListBackups` must match the call that provided the page token.
1635
+ # @param filter [::String]
1636
+ # Optional. Field match expression used to filter the results.
1637
+ # @param order_by [::String]
1638
+ # Optional. Field by which to sort the results.
1639
+ # @param return_partial_success [::Boolean]
1640
+ # Optional. If set to true, the response will return partial results when
1641
+ # some regions are unreachable and the unreachable field will be populated.
1642
+ # @yield [result, operation] Access the result along with the TransportOperation object
1643
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeBackup::V1::Backup>]
1644
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1645
+ #
1646
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeBackup::V1::Backup>]
1647
+ #
1648
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1649
+ #
1650
+ # @example Basic example
1651
+ # require "google/cloud/gke_backup/v1"
1652
+ #
1653
+ # # Create a client object. The client can be reused for multiple calls.
1654
+ # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new
1655
+ #
1656
+ # # Create a request. To set request fields, pass in keyword arguments.
1657
+ # request = Google::Cloud::GkeBackup::V1::ListBackupsRequest.new
1658
+ #
1659
+ # # Call the list_backups method.
1660
+ # result = client.list_backups request
1661
+ #
1662
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1663
+ # # over elements, and API calls will be issued to fetch pages as needed.
1664
+ # result.each do |item|
1665
+ # # Each element is of type ::Google::Cloud::GkeBackup::V1::Backup.
1666
+ # p item
1667
+ # end
1668
+ #
1669
+ def list_backups request, options = nil
1670
+ raise ::ArgumentError, "request must be provided" if request.nil?
1671
+
1672
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::ListBackupsRequest
1673
+
1674
+ # Converts hash and nil to an options object
1675
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1676
+
1677
+ # Customize the options with defaults
1678
+ call_metadata = @config.rpcs.list_backups.metadata.to_h
1679
+
1680
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1681
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1682
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1683
+ gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION,
1684
+ transports_version_send: [:rest]
1685
+
1686
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1687
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1688
+
1689
+ options.apply_defaults timeout: @config.rpcs.list_backups.timeout,
1690
+ metadata: call_metadata,
1691
+ retry_policy: @config.rpcs.list_backups.retry_policy
1692
+
1693
+ options.apply_defaults timeout: @config.timeout,
1694
+ metadata: @config.metadata,
1695
+ retry_policy: @config.retry_policy
1696
+
1697
+ @backup_for_gke_stub.list_backups request, options do |result, operation|
1698
+ result = ::Gapic::Rest::PagedEnumerable.new @backup_for_gke_stub, :list_backups, "backups", request, result, options
1699
+ yield result, operation if block_given?
1700
+ throw :response, result
1701
+ end
1702
+ rescue ::Gapic::Rest::Error => e
1703
+ raise ::Google::Cloud::Error.from_error(e)
1704
+ end
1705
+
1706
+ ##
1707
+ # Retrieve the details of a single Backup.
1708
+ #
1709
+ # @overload get_backup(request, options = nil)
1710
+ # Pass arguments to `get_backup` via a request object, either of type
1711
+ # {::Google::Cloud::GkeBackup::V1::GetBackupRequest} or an equivalent Hash.
1712
+ #
1713
+ # @param request [::Google::Cloud::GkeBackup::V1::GetBackupRequest, ::Hash]
1714
+ # A request object representing the call parameters. Required. To specify no
1715
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1716
+ # @param options [::Gapic::CallOptions, ::Hash]
1717
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1718
+ #
1719
+ # @overload get_backup(name: nil)
1720
+ # Pass arguments to `get_backup` via keyword arguments. Note that at
1721
+ # least one keyword argument is required. To specify no parameters, or to keep all
1722
+ # the default parameter values, pass an empty Hash as a request object (see above).
1723
+ #
1724
+ # @param name [::String]
1725
+ # Required. Full name of the Backup resource.
1726
+ # Format: `projects/*/locations/*/backupPlans/*/backups/*`
1727
+ # @yield [result, operation] Access the result along with the TransportOperation object
1728
+ # @yieldparam result [::Google::Cloud::GkeBackup::V1::Backup]
1729
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1730
+ #
1731
+ # @return [::Google::Cloud::GkeBackup::V1::Backup]
1732
+ #
1733
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1734
+ #
1735
+ # @example Basic example
1736
+ # require "google/cloud/gke_backup/v1"
1737
+ #
1738
+ # # Create a client object. The client can be reused for multiple calls.
1739
+ # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new
1740
+ #
1741
+ # # Create a request. To set request fields, pass in keyword arguments.
1742
+ # request = Google::Cloud::GkeBackup::V1::GetBackupRequest.new
1743
+ #
1744
+ # # Call the get_backup method.
1745
+ # result = client.get_backup request
1746
+ #
1747
+ # # The returned object is of type Google::Cloud::GkeBackup::V1::Backup.
1748
+ # p result
1749
+ #
1750
+ def get_backup request, options = nil
1751
+ raise ::ArgumentError, "request must be provided" if request.nil?
1752
+
1753
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::GetBackupRequest
1754
+
1755
+ # Converts hash and nil to an options object
1756
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1757
+
1758
+ # Customize the options with defaults
1759
+ call_metadata = @config.rpcs.get_backup.metadata.to_h
1760
+
1761
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1762
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1763
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1764
+ gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION,
1765
+ transports_version_send: [:rest]
1766
+
1767
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1768
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1769
+
1770
+ options.apply_defaults timeout: @config.rpcs.get_backup.timeout,
1771
+ metadata: call_metadata,
1772
+ retry_policy: @config.rpcs.get_backup.retry_policy
1773
+
1774
+ options.apply_defaults timeout: @config.timeout,
1775
+ metadata: @config.metadata,
1776
+ retry_policy: @config.retry_policy
1777
+
1778
+ @backup_for_gke_stub.get_backup request, options do |result, operation|
1779
+ yield result, operation if block_given?
1780
+ end
1781
+ rescue ::Gapic::Rest::Error => e
1782
+ raise ::Google::Cloud::Error.from_error(e)
1783
+ end
1784
+
1785
+ ##
1786
+ # Update a Backup.
1787
+ #
1788
+ # @overload update_backup(request, options = nil)
1789
+ # Pass arguments to `update_backup` via a request object, either of type
1790
+ # {::Google::Cloud::GkeBackup::V1::UpdateBackupRequest} or an equivalent Hash.
1791
+ #
1792
+ # @param request [::Google::Cloud::GkeBackup::V1::UpdateBackupRequest, ::Hash]
1793
+ # A request object representing the call parameters. Required. To specify no
1794
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1795
+ # @param options [::Gapic::CallOptions, ::Hash]
1796
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1797
+ #
1798
+ # @overload update_backup(backup: nil, update_mask: nil)
1799
+ # Pass arguments to `update_backup` via keyword arguments. Note that at
1800
+ # least one keyword argument is required. To specify no parameters, or to keep all
1801
+ # the default parameter values, pass an empty Hash as a request object (see above).
1802
+ #
1803
+ # @param backup [::Google::Cloud::GkeBackup::V1::Backup, ::Hash]
1804
+ # Required. A new version of the Backup resource that contains updated
1805
+ # fields. This may be sparsely populated if an `update_mask` is provided.
1806
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
1807
+ # Optional. This is used to specify the fields to be overwritten in the
1808
+ # Backup targeted for update. The values for each of these
1809
+ # updated fields will be taken from the `backup_plan` provided
1810
+ # with this request. Field names are relative to the root of the resource.
1811
+ # If no `update_mask` is provided, all fields in `backup` will be
1812
+ # written to the target Backup resource.
1813
+ # Note that OUTPUT_ONLY and IMMUTABLE fields in `backup` are ignored
1814
+ # and are not used to update the target Backup.
1815
+ # @yield [result, operation] Access the result along with the TransportOperation object
1816
+ # @yieldparam result [::Gapic::Operation]
1817
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1818
+ #
1819
+ # @return [::Gapic::Operation]
1820
+ #
1821
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1822
+ #
1823
+ # @example Basic example
1824
+ # require "google/cloud/gke_backup/v1"
1825
+ #
1826
+ # # Create a client object. The client can be reused for multiple calls.
1827
+ # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new
1828
+ #
1829
+ # # Create a request. To set request fields, pass in keyword arguments.
1830
+ # request = Google::Cloud::GkeBackup::V1::UpdateBackupRequest.new
1831
+ #
1832
+ # # Call the update_backup method.
1833
+ # result = client.update_backup request
1834
+ #
1835
+ # # The returned object is of type Gapic::Operation. You can use it to
1836
+ # # check the status of an operation, cancel it, or wait for results.
1837
+ # # Here is how to wait for a response.
1838
+ # result.wait_until_done! timeout: 60
1839
+ # if result.response?
1840
+ # p result.response
1841
+ # else
1842
+ # puts "No response received."
1843
+ # end
1844
+ #
1845
+ def update_backup request, options = nil
1846
+ raise ::ArgumentError, "request must be provided" if request.nil?
1847
+
1848
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::UpdateBackupRequest
1849
+
1850
+ # Converts hash and nil to an options object
1851
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1852
+
1853
+ # Customize the options with defaults
1854
+ call_metadata = @config.rpcs.update_backup.metadata.to_h
1855
+
1856
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1857
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1858
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1859
+ gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION,
1860
+ transports_version_send: [:rest]
1861
+
1862
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1863
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1864
+
1865
+ options.apply_defaults timeout: @config.rpcs.update_backup.timeout,
1866
+ metadata: call_metadata,
1867
+ retry_policy: @config.rpcs.update_backup.retry_policy
1868
+
1869
+ options.apply_defaults timeout: @config.timeout,
1870
+ metadata: @config.metadata,
1871
+ retry_policy: @config.retry_policy
1872
+
1873
+ @backup_for_gke_stub.update_backup request, options do |result, operation|
1874
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1875
+ yield result, operation if block_given?
1876
+ throw :response, result
1877
+ end
1878
+ rescue ::Gapic::Rest::Error => e
1879
+ raise ::Google::Cloud::Error.from_error(e)
1880
+ end
1881
+
1882
+ ##
1883
+ # Deletes an existing Backup.
1884
+ #
1885
+ # @overload delete_backup(request, options = nil)
1886
+ # Pass arguments to `delete_backup` via a request object, either of type
1887
+ # {::Google::Cloud::GkeBackup::V1::DeleteBackupRequest} or an equivalent Hash.
1888
+ #
1889
+ # @param request [::Google::Cloud::GkeBackup::V1::DeleteBackupRequest, ::Hash]
1890
+ # A request object representing the call parameters. Required. To specify no
1891
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1892
+ # @param options [::Gapic::CallOptions, ::Hash]
1893
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1894
+ #
1895
+ # @overload delete_backup(name: nil, etag: nil, force: nil)
1896
+ # Pass arguments to `delete_backup` via keyword arguments. Note that at
1897
+ # least one keyword argument is required. To specify no parameters, or to keep all
1898
+ # the default parameter values, pass an empty Hash as a request object (see above).
1899
+ #
1900
+ # @param name [::String]
1901
+ # Required. Name of the Backup resource.
1902
+ # Format: `projects/*/locations/*/backupPlans/*/backups/*`
1903
+ # @param etag [::String]
1904
+ # Optional. If provided, this value must match the current value of the
1905
+ # target Backup's {::Google::Cloud::GkeBackup::V1::Backup#etag etag} field or the
1906
+ # request is rejected.
1907
+ # @param force [::Boolean]
1908
+ # Optional. If set to true, any VolumeBackups below this Backup will also be
1909
+ # deleted. Otherwise, the request will only succeed if the Backup has no
1910
+ # VolumeBackups.
1911
+ # @yield [result, operation] Access the result along with the TransportOperation object
1912
+ # @yieldparam result [::Gapic::Operation]
1913
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1914
+ #
1915
+ # @return [::Gapic::Operation]
1916
+ #
1917
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1918
+ #
1919
+ # @example Basic example
1920
+ # require "google/cloud/gke_backup/v1"
1921
+ #
1922
+ # # Create a client object. The client can be reused for multiple calls.
1923
+ # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new
1924
+ #
1925
+ # # Create a request. To set request fields, pass in keyword arguments.
1926
+ # request = Google::Cloud::GkeBackup::V1::DeleteBackupRequest.new
1927
+ #
1928
+ # # Call the delete_backup method.
1929
+ # result = client.delete_backup request
1930
+ #
1931
+ # # The returned object is of type Gapic::Operation. You can use it to
1932
+ # # check the status of an operation, cancel it, or wait for results.
1933
+ # # Here is how to wait for a response.
1934
+ # result.wait_until_done! timeout: 60
1935
+ # if result.response?
1936
+ # p result.response
1937
+ # else
1938
+ # puts "No response received."
1939
+ # end
1940
+ #
1941
+ def delete_backup request, options = nil
1942
+ raise ::ArgumentError, "request must be provided" if request.nil?
1943
+
1944
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::DeleteBackupRequest
1945
+
1946
+ # Converts hash and nil to an options object
1947
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1948
+
1949
+ # Customize the options with defaults
1950
+ call_metadata = @config.rpcs.delete_backup.metadata.to_h
1951
+
1952
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1953
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1954
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1955
+ gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION,
1956
+ transports_version_send: [:rest]
1957
+
1958
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1959
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1960
+
1961
+ options.apply_defaults timeout: @config.rpcs.delete_backup.timeout,
1962
+ metadata: call_metadata,
1963
+ retry_policy: @config.rpcs.delete_backup.retry_policy
1964
+
1965
+ options.apply_defaults timeout: @config.timeout,
1966
+ metadata: @config.metadata,
1967
+ retry_policy: @config.retry_policy
1968
+
1969
+ @backup_for_gke_stub.delete_backup request, options do |result, operation|
1970
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1971
+ yield result, operation if block_given?
1972
+ throw :response, result
1973
+ end
1974
+ rescue ::Gapic::Rest::Error => e
1975
+ raise ::Google::Cloud::Error.from_error(e)
1976
+ end
1977
+
1978
+ ##
1979
+ # Lists the VolumeBackups for a given Backup.
1980
+ #
1981
+ # @overload list_volume_backups(request, options = nil)
1982
+ # Pass arguments to `list_volume_backups` via a request object, either of type
1983
+ # {::Google::Cloud::GkeBackup::V1::ListVolumeBackupsRequest} or an equivalent Hash.
1984
+ #
1985
+ # @param request [::Google::Cloud::GkeBackup::V1::ListVolumeBackupsRequest, ::Hash]
1986
+ # A request object representing the call parameters. Required. To specify no
1987
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1988
+ # @param options [::Gapic::CallOptions, ::Hash]
1989
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1990
+ #
1991
+ # @overload list_volume_backups(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
1992
+ # Pass arguments to `list_volume_backups` via keyword arguments. Note that at
1993
+ # least one keyword argument is required. To specify no parameters, or to keep all
1994
+ # the default parameter values, pass an empty Hash as a request object (see above).
1995
+ #
1996
+ # @param parent [::String]
1997
+ # Required. The Backup that contains the VolumeBackups to list.
1998
+ # Format: `projects/*/locations/*/backupPlans/*/backups/*`
1999
+ # @param page_size [::Integer]
2000
+ # Optional. The target number of results to return in a single response.
2001
+ # If not specified, a default value will be chosen by the service.
2002
+ # Note that the response may include a partial list and a caller should
2003
+ # only rely on the response's
2004
+ # {::Google::Cloud::GkeBackup::V1::ListVolumeBackupsResponse#next_page_token next_page_token}
2005
+ # to determine if there are more instances left to be queried.
2006
+ # @param page_token [::String]
2007
+ # Optional. The value of
2008
+ # {::Google::Cloud::GkeBackup::V1::ListVolumeBackupsResponse#next_page_token next_page_token}
2009
+ # received from a previous `ListVolumeBackups` call.
2010
+ # Provide this to retrieve the subsequent page in a multi-page list of
2011
+ # results. When paginating, all other parameters provided to
2012
+ # `ListVolumeBackups` must match the call that provided the page token.
2013
+ # @param filter [::String]
2014
+ # Optional. Field match expression used to filter the results.
2015
+ # @param order_by [::String]
2016
+ # Optional. Field by which to sort the results.
2017
+ # @yield [result, operation] Access the result along with the TransportOperation object
2018
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeBackup::V1::VolumeBackup>]
2019
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2020
+ #
2021
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeBackup::V1::VolumeBackup>]
2022
+ #
2023
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2024
+ #
2025
+ # @example Basic example
2026
+ # require "google/cloud/gke_backup/v1"
2027
+ #
2028
+ # # Create a client object. The client can be reused for multiple calls.
2029
+ # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new
2030
+ #
2031
+ # # Create a request. To set request fields, pass in keyword arguments.
2032
+ # request = Google::Cloud::GkeBackup::V1::ListVolumeBackupsRequest.new
2033
+ #
2034
+ # # Call the list_volume_backups method.
2035
+ # result = client.list_volume_backups request
2036
+ #
2037
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
2038
+ # # over elements, and API calls will be issued to fetch pages as needed.
2039
+ # result.each do |item|
2040
+ # # Each element is of type ::Google::Cloud::GkeBackup::V1::VolumeBackup.
2041
+ # p item
2042
+ # end
2043
+ #
2044
+ def list_volume_backups request, options = nil
2045
+ raise ::ArgumentError, "request must be provided" if request.nil?
2046
+
2047
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::ListVolumeBackupsRequest
2048
+
2049
+ # Converts hash and nil to an options object
2050
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2051
+
2052
+ # Customize the options with defaults
2053
+ call_metadata = @config.rpcs.list_volume_backups.metadata.to_h
2054
+
2055
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2056
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2057
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2058
+ gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION,
2059
+ transports_version_send: [:rest]
2060
+
2061
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2062
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2063
+
2064
+ options.apply_defaults timeout: @config.rpcs.list_volume_backups.timeout,
2065
+ metadata: call_metadata,
2066
+ retry_policy: @config.rpcs.list_volume_backups.retry_policy
2067
+
2068
+ options.apply_defaults timeout: @config.timeout,
2069
+ metadata: @config.metadata,
2070
+ retry_policy: @config.retry_policy
2071
+
2072
+ @backup_for_gke_stub.list_volume_backups request, options do |result, operation|
2073
+ result = ::Gapic::Rest::PagedEnumerable.new @backup_for_gke_stub, :list_volume_backups, "volume_backups", request, result, options
2074
+ yield result, operation if block_given?
2075
+ throw :response, result
2076
+ end
2077
+ rescue ::Gapic::Rest::Error => e
2078
+ raise ::Google::Cloud::Error.from_error(e)
2079
+ end
2080
+
2081
+ ##
2082
+ # Retrieve the details of a single VolumeBackup.
2083
+ #
2084
+ # @overload get_volume_backup(request, options = nil)
2085
+ # Pass arguments to `get_volume_backup` via a request object, either of type
2086
+ # {::Google::Cloud::GkeBackup::V1::GetVolumeBackupRequest} or an equivalent Hash.
2087
+ #
2088
+ # @param request [::Google::Cloud::GkeBackup::V1::GetVolumeBackupRequest, ::Hash]
2089
+ # A request object representing the call parameters. Required. To specify no
2090
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2091
+ # @param options [::Gapic::CallOptions, ::Hash]
2092
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2093
+ #
2094
+ # @overload get_volume_backup(name: nil)
2095
+ # Pass arguments to `get_volume_backup` via keyword arguments. Note that at
2096
+ # least one keyword argument is required. To specify no parameters, or to keep all
2097
+ # the default parameter values, pass an empty Hash as a request object (see above).
2098
+ #
2099
+ # @param name [::String]
2100
+ # Required. Full name of the VolumeBackup resource.
2101
+ # Format: `projects/*/locations/*/backupPlans/*/backups/*/volumeBackups/*`
2102
+ # @yield [result, operation] Access the result along with the TransportOperation object
2103
+ # @yieldparam result [::Google::Cloud::GkeBackup::V1::VolumeBackup]
2104
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2105
+ #
2106
+ # @return [::Google::Cloud::GkeBackup::V1::VolumeBackup]
2107
+ #
2108
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2109
+ #
2110
+ # @example Basic example
2111
+ # require "google/cloud/gke_backup/v1"
2112
+ #
2113
+ # # Create a client object. The client can be reused for multiple calls.
2114
+ # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new
2115
+ #
2116
+ # # Create a request. To set request fields, pass in keyword arguments.
2117
+ # request = Google::Cloud::GkeBackup::V1::GetVolumeBackupRequest.new
2118
+ #
2119
+ # # Call the get_volume_backup method.
2120
+ # result = client.get_volume_backup request
2121
+ #
2122
+ # # The returned object is of type Google::Cloud::GkeBackup::V1::VolumeBackup.
2123
+ # p result
2124
+ #
2125
+ def get_volume_backup request, options = nil
2126
+ raise ::ArgumentError, "request must be provided" if request.nil?
2127
+
2128
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::GetVolumeBackupRequest
2129
+
2130
+ # Converts hash and nil to an options object
2131
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2132
+
2133
+ # Customize the options with defaults
2134
+ call_metadata = @config.rpcs.get_volume_backup.metadata.to_h
2135
+
2136
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2137
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2138
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2139
+ gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION,
2140
+ transports_version_send: [:rest]
2141
+
2142
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2143
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2144
+
2145
+ options.apply_defaults timeout: @config.rpcs.get_volume_backup.timeout,
2146
+ metadata: call_metadata,
2147
+ retry_policy: @config.rpcs.get_volume_backup.retry_policy
2148
+
2149
+ options.apply_defaults timeout: @config.timeout,
2150
+ metadata: @config.metadata,
2151
+ retry_policy: @config.retry_policy
2152
+
2153
+ @backup_for_gke_stub.get_volume_backup request, options do |result, operation|
2154
+ yield result, operation if block_given?
2155
+ end
2156
+ rescue ::Gapic::Rest::Error => e
2157
+ raise ::Google::Cloud::Error.from_error(e)
2158
+ end
2159
+
2160
+ ##
2161
+ # Creates a new RestorePlan in a given location.
2162
+ #
2163
+ # @overload create_restore_plan(request, options = nil)
2164
+ # Pass arguments to `create_restore_plan` via a request object, either of type
2165
+ # {::Google::Cloud::GkeBackup::V1::CreateRestorePlanRequest} or an equivalent Hash.
2166
+ #
2167
+ # @param request [::Google::Cloud::GkeBackup::V1::CreateRestorePlanRequest, ::Hash]
2168
+ # A request object representing the call parameters. Required. To specify no
2169
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2170
+ # @param options [::Gapic::CallOptions, ::Hash]
2171
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2172
+ #
2173
+ # @overload create_restore_plan(parent: nil, restore_plan: nil, restore_plan_id: nil)
2174
+ # Pass arguments to `create_restore_plan` via keyword arguments. Note that at
2175
+ # least one keyword argument is required. To specify no parameters, or to keep all
2176
+ # the default parameter values, pass an empty Hash as a request object (see above).
2177
+ #
2178
+ # @param parent [::String]
2179
+ # Required. The location within which to create the RestorePlan.
2180
+ # Format: `projects/*/locations/*`
2181
+ # @param restore_plan [::Google::Cloud::GkeBackup::V1::RestorePlan, ::Hash]
2182
+ # Required. The RestorePlan resource object to create.
2183
+ # @param restore_plan_id [::String]
2184
+ # Required. The client-provided short name for the RestorePlan resource.
2185
+ # This name must:
2186
+ #
2187
+ # - be between 1 and 63 characters long (inclusive)
2188
+ # - consist of only lower-case ASCII letters, numbers, and dashes
2189
+ # - start with a lower-case letter
2190
+ # - end with a lower-case letter or number
2191
+ # - be unique within the set of RestorePlans in this location
2192
+ # @yield [result, operation] Access the result along with the TransportOperation object
2193
+ # @yieldparam result [::Gapic::Operation]
2194
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2195
+ #
2196
+ # @return [::Gapic::Operation]
2197
+ #
2198
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2199
+ #
2200
+ # @example Basic example
2201
+ # require "google/cloud/gke_backup/v1"
2202
+ #
2203
+ # # Create a client object. The client can be reused for multiple calls.
2204
+ # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new
2205
+ #
2206
+ # # Create a request. To set request fields, pass in keyword arguments.
2207
+ # request = Google::Cloud::GkeBackup::V1::CreateRestorePlanRequest.new
2208
+ #
2209
+ # # Call the create_restore_plan method.
2210
+ # result = client.create_restore_plan request
2211
+ #
2212
+ # # The returned object is of type Gapic::Operation. You can use it to
2213
+ # # check the status of an operation, cancel it, or wait for results.
2214
+ # # Here is how to wait for a response.
2215
+ # result.wait_until_done! timeout: 60
2216
+ # if result.response?
2217
+ # p result.response
2218
+ # else
2219
+ # puts "No response received."
2220
+ # end
2221
+ #
2222
+ def create_restore_plan request, options = nil
2223
+ raise ::ArgumentError, "request must be provided" if request.nil?
2224
+
2225
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::CreateRestorePlanRequest
2226
+
2227
+ # Converts hash and nil to an options object
2228
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2229
+
2230
+ # Customize the options with defaults
2231
+ call_metadata = @config.rpcs.create_restore_plan.metadata.to_h
2232
+
2233
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2234
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2235
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2236
+ gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION,
2237
+ transports_version_send: [:rest]
2238
+
2239
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2240
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2241
+
2242
+ options.apply_defaults timeout: @config.rpcs.create_restore_plan.timeout,
2243
+ metadata: call_metadata,
2244
+ retry_policy: @config.rpcs.create_restore_plan.retry_policy
2245
+
2246
+ options.apply_defaults timeout: @config.timeout,
2247
+ metadata: @config.metadata,
2248
+ retry_policy: @config.retry_policy
2249
+
2250
+ @backup_for_gke_stub.create_restore_plan request, options do |result, operation|
2251
+ result = ::Gapic::Operation.new result, @operations_client, options: options
2252
+ yield result, operation if block_given?
2253
+ throw :response, result
2254
+ end
2255
+ rescue ::Gapic::Rest::Error => e
2256
+ raise ::Google::Cloud::Error.from_error(e)
2257
+ end
2258
+
2259
+ ##
2260
+ # Lists RestorePlans in a given location.
2261
+ #
2262
+ # @overload list_restore_plans(request, options = nil)
2263
+ # Pass arguments to `list_restore_plans` via a request object, either of type
2264
+ # {::Google::Cloud::GkeBackup::V1::ListRestorePlansRequest} or an equivalent Hash.
2265
+ #
2266
+ # @param request [::Google::Cloud::GkeBackup::V1::ListRestorePlansRequest, ::Hash]
1549
2267
  # A request object representing the call parameters. Required. To specify no
1550
2268
  # parameters, or to keep all the default parameter values, pass an empty Hash.
1551
2269
  # @param options [::Gapic::CallOptions, ::Hash]
@@ -1557,31 +2275,507 @@ module Google
1557
2275
  # the default parameter values, pass an empty Hash as a request object (see above).
1558
2276
  #
1559
2277
  # @param parent [::String]
1560
- # Required. The location that contains the RestorePlans to list.
2278
+ # Required. The location that contains the RestorePlans to list.
2279
+ # Format: `projects/*/locations/*`
2280
+ # @param page_size [::Integer]
2281
+ # Optional. The target number of results to return in a single response.
2282
+ # If not specified, a default value will be chosen by the service.
2283
+ # Note that the response may include a partial list and a caller should
2284
+ # only rely on the response's
2285
+ # {::Google::Cloud::GkeBackup::V1::ListRestorePlansResponse#next_page_token next_page_token}
2286
+ # to determine if there are more instances left to be queried.
2287
+ # @param page_token [::String]
2288
+ # Optional. The value of
2289
+ # {::Google::Cloud::GkeBackup::V1::ListRestorePlansResponse#next_page_token next_page_token}
2290
+ # received from a previous `ListRestorePlans` call.
2291
+ # Provide this to retrieve the subsequent page in a multi-page list of
2292
+ # results. When paginating, all other parameters provided to
2293
+ # `ListRestorePlans` must match the call that provided the page token.
2294
+ # @param filter [::String]
2295
+ # Optional. Field match expression used to filter the results.
2296
+ # @param order_by [::String]
2297
+ # Optional. Field by which to sort the results.
2298
+ # @yield [result, operation] Access the result along with the TransportOperation object
2299
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeBackup::V1::RestorePlan>]
2300
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2301
+ #
2302
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeBackup::V1::RestorePlan>]
2303
+ #
2304
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2305
+ #
2306
+ # @example Basic example
2307
+ # require "google/cloud/gke_backup/v1"
2308
+ #
2309
+ # # Create a client object. The client can be reused for multiple calls.
2310
+ # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new
2311
+ #
2312
+ # # Create a request. To set request fields, pass in keyword arguments.
2313
+ # request = Google::Cloud::GkeBackup::V1::ListRestorePlansRequest.new
2314
+ #
2315
+ # # Call the list_restore_plans method.
2316
+ # result = client.list_restore_plans request
2317
+ #
2318
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
2319
+ # # over elements, and API calls will be issued to fetch pages as needed.
2320
+ # result.each do |item|
2321
+ # # Each element is of type ::Google::Cloud::GkeBackup::V1::RestorePlan.
2322
+ # p item
2323
+ # end
2324
+ #
2325
+ def list_restore_plans request, options = nil
2326
+ raise ::ArgumentError, "request must be provided" if request.nil?
2327
+
2328
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::ListRestorePlansRequest
2329
+
2330
+ # Converts hash and nil to an options object
2331
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2332
+
2333
+ # Customize the options with defaults
2334
+ call_metadata = @config.rpcs.list_restore_plans.metadata.to_h
2335
+
2336
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2337
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2338
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2339
+ gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION,
2340
+ transports_version_send: [:rest]
2341
+
2342
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2343
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2344
+
2345
+ options.apply_defaults timeout: @config.rpcs.list_restore_plans.timeout,
2346
+ metadata: call_metadata,
2347
+ retry_policy: @config.rpcs.list_restore_plans.retry_policy
2348
+
2349
+ options.apply_defaults timeout: @config.timeout,
2350
+ metadata: @config.metadata,
2351
+ retry_policy: @config.retry_policy
2352
+
2353
+ @backup_for_gke_stub.list_restore_plans request, options do |result, operation|
2354
+ result = ::Gapic::Rest::PagedEnumerable.new @backup_for_gke_stub, :list_restore_plans, "restore_plans", request, result, options
2355
+ yield result, operation if block_given?
2356
+ throw :response, result
2357
+ end
2358
+ rescue ::Gapic::Rest::Error => e
2359
+ raise ::Google::Cloud::Error.from_error(e)
2360
+ end
2361
+
2362
+ ##
2363
+ # Retrieve the details of a single RestorePlan.
2364
+ #
2365
+ # @overload get_restore_plan(request, options = nil)
2366
+ # Pass arguments to `get_restore_plan` via a request object, either of type
2367
+ # {::Google::Cloud::GkeBackup::V1::GetRestorePlanRequest} or an equivalent Hash.
2368
+ #
2369
+ # @param request [::Google::Cloud::GkeBackup::V1::GetRestorePlanRequest, ::Hash]
2370
+ # A request object representing the call parameters. Required. To specify no
2371
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2372
+ # @param options [::Gapic::CallOptions, ::Hash]
2373
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2374
+ #
2375
+ # @overload get_restore_plan(name: nil)
2376
+ # Pass arguments to `get_restore_plan` via keyword arguments. Note that at
2377
+ # least one keyword argument is required. To specify no parameters, or to keep all
2378
+ # the default parameter values, pass an empty Hash as a request object (see above).
2379
+ #
2380
+ # @param name [::String]
2381
+ # Required. Fully qualified RestorePlan name.
2382
+ # Format: `projects/*/locations/*/restorePlans/*`
2383
+ # @yield [result, operation] Access the result along with the TransportOperation object
2384
+ # @yieldparam result [::Google::Cloud::GkeBackup::V1::RestorePlan]
2385
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2386
+ #
2387
+ # @return [::Google::Cloud::GkeBackup::V1::RestorePlan]
2388
+ #
2389
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2390
+ #
2391
+ # @example Basic example
2392
+ # require "google/cloud/gke_backup/v1"
2393
+ #
2394
+ # # Create a client object. The client can be reused for multiple calls.
2395
+ # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new
2396
+ #
2397
+ # # Create a request. To set request fields, pass in keyword arguments.
2398
+ # request = Google::Cloud::GkeBackup::V1::GetRestorePlanRequest.new
2399
+ #
2400
+ # # Call the get_restore_plan method.
2401
+ # result = client.get_restore_plan request
2402
+ #
2403
+ # # The returned object is of type Google::Cloud::GkeBackup::V1::RestorePlan.
2404
+ # p result
2405
+ #
2406
+ def get_restore_plan request, options = nil
2407
+ raise ::ArgumentError, "request must be provided" if request.nil?
2408
+
2409
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::GetRestorePlanRequest
2410
+
2411
+ # Converts hash and nil to an options object
2412
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2413
+
2414
+ # Customize the options with defaults
2415
+ call_metadata = @config.rpcs.get_restore_plan.metadata.to_h
2416
+
2417
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2418
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2419
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2420
+ gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION,
2421
+ transports_version_send: [:rest]
2422
+
2423
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2424
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2425
+
2426
+ options.apply_defaults timeout: @config.rpcs.get_restore_plan.timeout,
2427
+ metadata: call_metadata,
2428
+ retry_policy: @config.rpcs.get_restore_plan.retry_policy
2429
+
2430
+ options.apply_defaults timeout: @config.timeout,
2431
+ metadata: @config.metadata,
2432
+ retry_policy: @config.retry_policy
2433
+
2434
+ @backup_for_gke_stub.get_restore_plan request, options do |result, operation|
2435
+ yield result, operation if block_given?
2436
+ end
2437
+ rescue ::Gapic::Rest::Error => e
2438
+ raise ::Google::Cloud::Error.from_error(e)
2439
+ end
2440
+
2441
+ ##
2442
+ # Update a RestorePlan.
2443
+ #
2444
+ # @overload update_restore_plan(request, options = nil)
2445
+ # Pass arguments to `update_restore_plan` via a request object, either of type
2446
+ # {::Google::Cloud::GkeBackup::V1::UpdateRestorePlanRequest} or an equivalent Hash.
2447
+ #
2448
+ # @param request [::Google::Cloud::GkeBackup::V1::UpdateRestorePlanRequest, ::Hash]
2449
+ # A request object representing the call parameters. Required. To specify no
2450
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2451
+ # @param options [::Gapic::CallOptions, ::Hash]
2452
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2453
+ #
2454
+ # @overload update_restore_plan(restore_plan: nil, update_mask: nil)
2455
+ # Pass arguments to `update_restore_plan` via keyword arguments. Note that at
2456
+ # least one keyword argument is required. To specify no parameters, or to keep all
2457
+ # the default parameter values, pass an empty Hash as a request object (see above).
2458
+ #
2459
+ # @param restore_plan [::Google::Cloud::GkeBackup::V1::RestorePlan, ::Hash]
2460
+ # Required. A new version of the RestorePlan resource that contains updated
2461
+ # fields. This may be sparsely populated if an `update_mask` is provided.
2462
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
2463
+ # Optional. This is used to specify the fields to be overwritten in the
2464
+ # RestorePlan targeted for update. The values for each of these
2465
+ # updated fields will be taken from the `restore_plan` provided
2466
+ # with this request. Field names are relative to the root of the resource.
2467
+ # If no `update_mask` is provided, all fields in `restore_plan` will be
2468
+ # written to the target RestorePlan resource.
2469
+ # Note that OUTPUT_ONLY and IMMUTABLE fields in `restore_plan` are ignored
2470
+ # and are not used to update the target RestorePlan.
2471
+ # @yield [result, operation] Access the result along with the TransportOperation object
2472
+ # @yieldparam result [::Gapic::Operation]
2473
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2474
+ #
2475
+ # @return [::Gapic::Operation]
2476
+ #
2477
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2478
+ #
2479
+ # @example Basic example
2480
+ # require "google/cloud/gke_backup/v1"
2481
+ #
2482
+ # # Create a client object. The client can be reused for multiple calls.
2483
+ # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new
2484
+ #
2485
+ # # Create a request. To set request fields, pass in keyword arguments.
2486
+ # request = Google::Cloud::GkeBackup::V1::UpdateRestorePlanRequest.new
2487
+ #
2488
+ # # Call the update_restore_plan method.
2489
+ # result = client.update_restore_plan request
2490
+ #
2491
+ # # The returned object is of type Gapic::Operation. You can use it to
2492
+ # # check the status of an operation, cancel it, or wait for results.
2493
+ # # Here is how to wait for a response.
2494
+ # result.wait_until_done! timeout: 60
2495
+ # if result.response?
2496
+ # p result.response
2497
+ # else
2498
+ # puts "No response received."
2499
+ # end
2500
+ #
2501
+ def update_restore_plan request, options = nil
2502
+ raise ::ArgumentError, "request must be provided" if request.nil?
2503
+
2504
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::UpdateRestorePlanRequest
2505
+
2506
+ # Converts hash and nil to an options object
2507
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2508
+
2509
+ # Customize the options with defaults
2510
+ call_metadata = @config.rpcs.update_restore_plan.metadata.to_h
2511
+
2512
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2513
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2514
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2515
+ gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION,
2516
+ transports_version_send: [:rest]
2517
+
2518
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2519
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2520
+
2521
+ options.apply_defaults timeout: @config.rpcs.update_restore_plan.timeout,
2522
+ metadata: call_metadata,
2523
+ retry_policy: @config.rpcs.update_restore_plan.retry_policy
2524
+
2525
+ options.apply_defaults timeout: @config.timeout,
2526
+ metadata: @config.metadata,
2527
+ retry_policy: @config.retry_policy
2528
+
2529
+ @backup_for_gke_stub.update_restore_plan request, options do |result, operation|
2530
+ result = ::Gapic::Operation.new result, @operations_client, options: options
2531
+ yield result, operation if block_given?
2532
+ throw :response, result
2533
+ end
2534
+ rescue ::Gapic::Rest::Error => e
2535
+ raise ::Google::Cloud::Error.from_error(e)
2536
+ end
2537
+
2538
+ ##
2539
+ # Deletes an existing RestorePlan.
2540
+ #
2541
+ # @overload delete_restore_plan(request, options = nil)
2542
+ # Pass arguments to `delete_restore_plan` via a request object, either of type
2543
+ # {::Google::Cloud::GkeBackup::V1::DeleteRestorePlanRequest} or an equivalent Hash.
2544
+ #
2545
+ # @param request [::Google::Cloud::GkeBackup::V1::DeleteRestorePlanRequest, ::Hash]
2546
+ # A request object representing the call parameters. Required. To specify no
2547
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2548
+ # @param options [::Gapic::CallOptions, ::Hash]
2549
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2550
+ #
2551
+ # @overload delete_restore_plan(name: nil, etag: nil, force: nil)
2552
+ # Pass arguments to `delete_restore_plan` via keyword arguments. Note that at
2553
+ # least one keyword argument is required. To specify no parameters, or to keep all
2554
+ # the default parameter values, pass an empty Hash as a request object (see above).
2555
+ #
2556
+ # @param name [::String]
2557
+ # Required. Fully qualified RestorePlan name.
2558
+ # Format: `projects/*/locations/*/restorePlans/*`
2559
+ # @param etag [::String]
2560
+ # Optional. If provided, this value must match the current value of the
2561
+ # target RestorePlan's {::Google::Cloud::GkeBackup::V1::RestorePlan#etag etag}
2562
+ # field or the request is rejected.
2563
+ # @param force [::Boolean]
2564
+ # Optional. If set to true, any Restores below this RestorePlan will also be
2565
+ # deleted. Otherwise, the request will only succeed if the RestorePlan has no
2566
+ # Restores.
2567
+ # @yield [result, operation] Access the result along with the TransportOperation object
2568
+ # @yieldparam result [::Gapic::Operation]
2569
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2570
+ #
2571
+ # @return [::Gapic::Operation]
2572
+ #
2573
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2574
+ #
2575
+ # @example Basic example
2576
+ # require "google/cloud/gke_backup/v1"
2577
+ #
2578
+ # # Create a client object. The client can be reused for multiple calls.
2579
+ # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new
2580
+ #
2581
+ # # Create a request. To set request fields, pass in keyword arguments.
2582
+ # request = Google::Cloud::GkeBackup::V1::DeleteRestorePlanRequest.new
2583
+ #
2584
+ # # Call the delete_restore_plan method.
2585
+ # result = client.delete_restore_plan request
2586
+ #
2587
+ # # The returned object is of type Gapic::Operation. You can use it to
2588
+ # # check the status of an operation, cancel it, or wait for results.
2589
+ # # Here is how to wait for a response.
2590
+ # result.wait_until_done! timeout: 60
2591
+ # if result.response?
2592
+ # p result.response
2593
+ # else
2594
+ # puts "No response received."
2595
+ # end
2596
+ #
2597
+ def delete_restore_plan request, options = nil
2598
+ raise ::ArgumentError, "request must be provided" if request.nil?
2599
+
2600
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::DeleteRestorePlanRequest
2601
+
2602
+ # Converts hash and nil to an options object
2603
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2604
+
2605
+ # Customize the options with defaults
2606
+ call_metadata = @config.rpcs.delete_restore_plan.metadata.to_h
2607
+
2608
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2609
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2610
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2611
+ gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION,
2612
+ transports_version_send: [:rest]
2613
+
2614
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2615
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2616
+
2617
+ options.apply_defaults timeout: @config.rpcs.delete_restore_plan.timeout,
2618
+ metadata: call_metadata,
2619
+ retry_policy: @config.rpcs.delete_restore_plan.retry_policy
2620
+
2621
+ options.apply_defaults timeout: @config.timeout,
2622
+ metadata: @config.metadata,
2623
+ retry_policy: @config.retry_policy
2624
+
2625
+ @backup_for_gke_stub.delete_restore_plan request, options do |result, operation|
2626
+ result = ::Gapic::Operation.new result, @operations_client, options: options
2627
+ yield result, operation if block_given?
2628
+ throw :response, result
2629
+ end
2630
+ rescue ::Gapic::Rest::Error => e
2631
+ raise ::Google::Cloud::Error.from_error(e)
2632
+ end
2633
+
2634
+ ##
2635
+ # Creates a new RestoreChannel in a given location.
2636
+ #
2637
+ # @overload create_restore_channel(request, options = nil)
2638
+ # Pass arguments to `create_restore_channel` via a request object, either of type
2639
+ # {::Google::Cloud::GkeBackup::V1::CreateRestoreChannelRequest} or an equivalent Hash.
2640
+ #
2641
+ # @param request [::Google::Cloud::GkeBackup::V1::CreateRestoreChannelRequest, ::Hash]
2642
+ # A request object representing the call parameters. Required. To specify no
2643
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2644
+ # @param options [::Gapic::CallOptions, ::Hash]
2645
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2646
+ #
2647
+ # @overload create_restore_channel(parent: nil, restore_channel: nil, restore_channel_id: nil)
2648
+ # Pass arguments to `create_restore_channel` via keyword arguments. Note that at
2649
+ # least one keyword argument is required. To specify no parameters, or to keep all
2650
+ # the default parameter values, pass an empty Hash as a request object (see above).
2651
+ #
2652
+ # @param parent [::String]
2653
+ # Required. The location within which to create the RestoreChannel.
2654
+ # Format: `projects/*/locations/*`
2655
+ # @param restore_channel [::Google::Cloud::GkeBackup::V1::RestoreChannel, ::Hash]
2656
+ # Required. The RestoreChannel resource object to create.
2657
+ # @param restore_channel_id [::String]
2658
+ # Optional. The client-provided short name for the RestoreChannel resource.
2659
+ # This name must:
2660
+ #
2661
+ # - be between 1 and 63 characters long (inclusive)
2662
+ # - consist of only lower-case ASCII letters, numbers, and dashes
2663
+ # - start with a lower-case letter
2664
+ # - end with a lower-case letter or number
2665
+ # - be unique within the set of RestoreChannels in this location
2666
+ # If the user does not provide a name, a uuid will be used as the name.
2667
+ # @yield [result, operation] Access the result along with the TransportOperation object
2668
+ # @yieldparam result [::Gapic::Operation]
2669
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2670
+ #
2671
+ # @return [::Gapic::Operation]
2672
+ #
2673
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2674
+ #
2675
+ # @example Basic example
2676
+ # require "google/cloud/gke_backup/v1"
2677
+ #
2678
+ # # Create a client object. The client can be reused for multiple calls.
2679
+ # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new
2680
+ #
2681
+ # # Create a request. To set request fields, pass in keyword arguments.
2682
+ # request = Google::Cloud::GkeBackup::V1::CreateRestoreChannelRequest.new
2683
+ #
2684
+ # # Call the create_restore_channel method.
2685
+ # result = client.create_restore_channel request
2686
+ #
2687
+ # # The returned object is of type Gapic::Operation. You can use it to
2688
+ # # check the status of an operation, cancel it, or wait for results.
2689
+ # # Here is how to wait for a response.
2690
+ # result.wait_until_done! timeout: 60
2691
+ # if result.response?
2692
+ # p result.response
2693
+ # else
2694
+ # puts "No response received."
2695
+ # end
2696
+ #
2697
+ def create_restore_channel request, options = nil
2698
+ raise ::ArgumentError, "request must be provided" if request.nil?
2699
+
2700
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::CreateRestoreChannelRequest
2701
+
2702
+ # Converts hash and nil to an options object
2703
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2704
+
2705
+ # Customize the options with defaults
2706
+ call_metadata = @config.rpcs.create_restore_channel.metadata.to_h
2707
+
2708
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2709
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2710
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2711
+ gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION,
2712
+ transports_version_send: [:rest]
2713
+
2714
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2715
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2716
+
2717
+ options.apply_defaults timeout: @config.rpcs.create_restore_channel.timeout,
2718
+ metadata: call_metadata,
2719
+ retry_policy: @config.rpcs.create_restore_channel.retry_policy
2720
+
2721
+ options.apply_defaults timeout: @config.timeout,
2722
+ metadata: @config.metadata,
2723
+ retry_policy: @config.retry_policy
2724
+
2725
+ @backup_for_gke_stub.create_restore_channel request, options do |result, operation|
2726
+ result = ::Gapic::Operation.new result, @operations_client, options: options
2727
+ yield result, operation if block_given?
2728
+ throw :response, result
2729
+ end
2730
+ rescue ::Gapic::Rest::Error => e
2731
+ raise ::Google::Cloud::Error.from_error(e)
2732
+ end
2733
+
2734
+ ##
2735
+ # Lists RestoreChannels in a given location.
2736
+ #
2737
+ # @overload list_restore_channels(request, options = nil)
2738
+ # Pass arguments to `list_restore_channels` via a request object, either of type
2739
+ # {::Google::Cloud::GkeBackup::V1::ListRestoreChannelsRequest} or an equivalent Hash.
2740
+ #
2741
+ # @param request [::Google::Cloud::GkeBackup::V1::ListRestoreChannelsRequest, ::Hash]
2742
+ # A request object representing the call parameters. Required. To specify no
2743
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2744
+ # @param options [::Gapic::CallOptions, ::Hash]
2745
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2746
+ #
2747
+ # @overload list_restore_channels(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
2748
+ # Pass arguments to `list_restore_channels` via keyword arguments. Note that at
2749
+ # least one keyword argument is required. To specify no parameters, or to keep all
2750
+ # the default parameter values, pass an empty Hash as a request object (see above).
2751
+ #
2752
+ # @param parent [::String]
2753
+ # Required. The location that contains the RestoreChannels to list.
1561
2754
  # Format: `projects/*/locations/*`
1562
2755
  # @param page_size [::Integer]
1563
2756
  # Optional. The target number of results to return in a single response.
1564
2757
  # If not specified, a default value will be chosen by the service.
1565
2758
  # Note that the response may include a partial list and a caller should
1566
2759
  # only rely on the response's
1567
- # {::Google::Cloud::GkeBackup::V1::ListRestorePlansResponse#next_page_token next_page_token}
2760
+ # {::Google::Cloud::GkeBackup::V1::ListRestoreChannelsResponse#next_page_token next_page_token}
1568
2761
  # to determine if there are more instances left to be queried.
1569
2762
  # @param page_token [::String]
1570
2763
  # Optional. The value of
1571
- # {::Google::Cloud::GkeBackup::V1::ListRestorePlansResponse#next_page_token next_page_token}
1572
- # received from a previous `ListRestorePlans` call.
2764
+ # {::Google::Cloud::GkeBackup::V1::ListRestoreChannelsResponse#next_page_token next_page_token}
2765
+ # received from a previous `ListRestoreChannels` call.
1573
2766
  # Provide this to retrieve the subsequent page in a multi-page list of
1574
2767
  # results. When paginating, all other parameters provided to
1575
- # `ListRestorePlans` must match the call that provided the page token.
2768
+ # `ListRestoreChannels` must match the call that provided the page
2769
+ # token.
1576
2770
  # @param filter [::String]
1577
2771
  # Optional. Field match expression used to filter the results.
1578
2772
  # @param order_by [::String]
1579
2773
  # Optional. Field by which to sort the results.
1580
2774
  # @yield [result, operation] Access the result along with the TransportOperation object
1581
- # @yieldparam result [::Google::Cloud::GkeBackup::V1::ListRestorePlansResponse]
2775
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeBackup::V1::RestoreChannel>]
1582
2776
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
1583
2777
  #
1584
- # @return [::Google::Cloud::GkeBackup::V1::ListRestorePlansResponse]
2778
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeBackup::V1::RestoreChannel>]
1585
2779
  #
1586
2780
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1587
2781
  #
@@ -1592,28 +2786,28 @@ module Google
1592
2786
  # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new
1593
2787
  #
1594
2788
  # # Create a request. To set request fields, pass in keyword arguments.
1595
- # request = Google::Cloud::GkeBackup::V1::ListRestorePlansRequest.new
2789
+ # request = Google::Cloud::GkeBackup::V1::ListRestoreChannelsRequest.new
1596
2790
  #
1597
- # # Call the list_restore_plans method.
1598
- # result = client.list_restore_plans request
2791
+ # # Call the list_restore_channels method.
2792
+ # result = client.list_restore_channels request
1599
2793
  #
1600
2794
  # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1601
2795
  # # over elements, and API calls will be issued to fetch pages as needed.
1602
2796
  # result.each do |item|
1603
- # # Each element is of type ::Google::Cloud::GkeBackup::V1::RestorePlan.
2797
+ # # Each element is of type ::Google::Cloud::GkeBackup::V1::RestoreChannel.
1604
2798
  # p item
1605
2799
  # end
1606
2800
  #
1607
- def list_restore_plans request, options = nil
2801
+ def list_restore_channels request, options = nil
1608
2802
  raise ::ArgumentError, "request must be provided" if request.nil?
1609
2803
 
1610
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::ListRestorePlansRequest
2804
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::ListRestoreChannelsRequest
1611
2805
 
1612
2806
  # Converts hash and nil to an options object
1613
2807
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1614
2808
 
1615
2809
  # Customize the options with defaults
1616
- call_metadata = @config.rpcs.list_restore_plans.metadata.to_h
2810
+ call_metadata = @config.rpcs.list_restore_channels.metadata.to_h
1617
2811
 
1618
2812
  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1619
2813
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -1624,47 +2818,49 @@ module Google
1624
2818
  call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1625
2819
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1626
2820
 
1627
- options.apply_defaults timeout: @config.rpcs.list_restore_plans.timeout,
2821
+ options.apply_defaults timeout: @config.rpcs.list_restore_channels.timeout,
1628
2822
  metadata: call_metadata,
1629
- retry_policy: @config.rpcs.list_restore_plans.retry_policy
2823
+ retry_policy: @config.rpcs.list_restore_channels.retry_policy
1630
2824
 
1631
2825
  options.apply_defaults timeout: @config.timeout,
1632
2826
  metadata: @config.metadata,
1633
2827
  retry_policy: @config.retry_policy
1634
2828
 
1635
- @backup_for_gke_stub.list_restore_plans request, options do |result, operation|
2829
+ @backup_for_gke_stub.list_restore_channels request, options do |result, operation|
2830
+ result = ::Gapic::Rest::PagedEnumerable.new @backup_for_gke_stub, :list_restore_channels, "restore_channels", request, result, options
1636
2831
  yield result, operation if block_given?
2832
+ throw :response, result
1637
2833
  end
1638
2834
  rescue ::Gapic::Rest::Error => e
1639
2835
  raise ::Google::Cloud::Error.from_error(e)
1640
2836
  end
1641
2837
 
1642
2838
  ##
1643
- # Retrieve the details of a single RestorePlan.
2839
+ # Retrieve the details of a single RestoreChannel.
1644
2840
  #
1645
- # @overload get_restore_plan(request, options = nil)
1646
- # Pass arguments to `get_restore_plan` via a request object, either of type
1647
- # {::Google::Cloud::GkeBackup::V1::GetRestorePlanRequest} or an equivalent Hash.
2841
+ # @overload get_restore_channel(request, options = nil)
2842
+ # Pass arguments to `get_restore_channel` via a request object, either of type
2843
+ # {::Google::Cloud::GkeBackup::V1::GetRestoreChannelRequest} or an equivalent Hash.
1648
2844
  #
1649
- # @param request [::Google::Cloud::GkeBackup::V1::GetRestorePlanRequest, ::Hash]
2845
+ # @param request [::Google::Cloud::GkeBackup::V1::GetRestoreChannelRequest, ::Hash]
1650
2846
  # A request object representing the call parameters. Required. To specify no
1651
2847
  # parameters, or to keep all the default parameter values, pass an empty Hash.
1652
2848
  # @param options [::Gapic::CallOptions, ::Hash]
1653
2849
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1654
2850
  #
1655
- # @overload get_restore_plan(name: nil)
1656
- # Pass arguments to `get_restore_plan` via keyword arguments. Note that at
2851
+ # @overload get_restore_channel(name: nil)
2852
+ # Pass arguments to `get_restore_channel` via keyword arguments. Note that at
1657
2853
  # least one keyword argument is required. To specify no parameters, or to keep all
1658
2854
  # the default parameter values, pass an empty Hash as a request object (see above).
1659
2855
  #
1660
2856
  # @param name [::String]
1661
- # Required. Fully qualified RestorePlan name.
1662
- # Format: `projects/*/locations/*/restorePlans/*`
2857
+ # Required. Fully qualified RestoreChannel name.
2858
+ # Format: `projects/*/locations/*/restoreChannels/*`
1663
2859
  # @yield [result, operation] Access the result along with the TransportOperation object
1664
- # @yieldparam result [::Google::Cloud::GkeBackup::V1::RestorePlan]
2860
+ # @yieldparam result [::Google::Cloud::GkeBackup::V1::RestoreChannel]
1665
2861
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
1666
2862
  #
1667
- # @return [::Google::Cloud::GkeBackup::V1::RestorePlan]
2863
+ # @return [::Google::Cloud::GkeBackup::V1::RestoreChannel]
1668
2864
  #
1669
2865
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1670
2866
  #
@@ -1675,24 +2871,24 @@ module Google
1675
2871
  # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new
1676
2872
  #
1677
2873
  # # Create a request. To set request fields, pass in keyword arguments.
1678
- # request = Google::Cloud::GkeBackup::V1::GetRestorePlanRequest.new
2874
+ # request = Google::Cloud::GkeBackup::V1::GetRestoreChannelRequest.new
1679
2875
  #
1680
- # # Call the get_restore_plan method.
1681
- # result = client.get_restore_plan request
2876
+ # # Call the get_restore_channel method.
2877
+ # result = client.get_restore_channel request
1682
2878
  #
1683
- # # The returned object is of type Google::Cloud::GkeBackup::V1::RestorePlan.
2879
+ # # The returned object is of type Google::Cloud::GkeBackup::V1::RestoreChannel.
1684
2880
  # p result
1685
2881
  #
1686
- def get_restore_plan request, options = nil
2882
+ def get_restore_channel request, options = nil
1687
2883
  raise ::ArgumentError, "request must be provided" if request.nil?
1688
2884
 
1689
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::GetRestorePlanRequest
2885
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::GetRestoreChannelRequest
1690
2886
 
1691
2887
  # Converts hash and nil to an options object
1692
2888
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1693
2889
 
1694
2890
  # Customize the options with defaults
1695
- call_metadata = @config.rpcs.get_restore_plan.metadata.to_h
2891
+ call_metadata = @config.rpcs.get_restore_channel.metadata.to_h
1696
2892
 
1697
2893
  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1698
2894
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -1703,15 +2899,15 @@ module Google
1703
2899
  call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1704
2900
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1705
2901
 
1706
- options.apply_defaults timeout: @config.rpcs.get_restore_plan.timeout,
2902
+ options.apply_defaults timeout: @config.rpcs.get_restore_channel.timeout,
1707
2903
  metadata: call_metadata,
1708
- retry_policy: @config.rpcs.get_restore_plan.retry_policy
2904
+ retry_policy: @config.rpcs.get_restore_channel.retry_policy
1709
2905
 
1710
2906
  options.apply_defaults timeout: @config.timeout,
1711
2907
  metadata: @config.metadata,
1712
2908
  retry_policy: @config.retry_policy
1713
2909
 
1714
- @backup_for_gke_stub.get_restore_plan request, options do |result, operation|
2910
+ @backup_for_gke_stub.get_restore_channel request, options do |result, operation|
1715
2911
  yield result, operation if block_given?
1716
2912
  end
1717
2913
  rescue ::Gapic::Rest::Error => e
@@ -1719,35 +2915,37 @@ module Google
1719
2915
  end
1720
2916
 
1721
2917
  ##
1722
- # Update a RestorePlan.
2918
+ # Update a RestoreChannel.
1723
2919
  #
1724
- # @overload update_restore_plan(request, options = nil)
1725
- # Pass arguments to `update_restore_plan` via a request object, either of type
1726
- # {::Google::Cloud::GkeBackup::V1::UpdateRestorePlanRequest} or an equivalent Hash.
2920
+ # @overload update_restore_channel(request, options = nil)
2921
+ # Pass arguments to `update_restore_channel` via a request object, either of type
2922
+ # {::Google::Cloud::GkeBackup::V1::UpdateRestoreChannelRequest} or an equivalent Hash.
1727
2923
  #
1728
- # @param request [::Google::Cloud::GkeBackup::V1::UpdateRestorePlanRequest, ::Hash]
2924
+ # @param request [::Google::Cloud::GkeBackup::V1::UpdateRestoreChannelRequest, ::Hash]
1729
2925
  # A request object representing the call parameters. Required. To specify no
1730
2926
  # parameters, or to keep all the default parameter values, pass an empty Hash.
1731
2927
  # @param options [::Gapic::CallOptions, ::Hash]
1732
2928
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1733
2929
  #
1734
- # @overload update_restore_plan(restore_plan: nil, update_mask: nil)
1735
- # Pass arguments to `update_restore_plan` via keyword arguments. Note that at
2930
+ # @overload update_restore_channel(restore_channel: nil, update_mask: nil)
2931
+ # Pass arguments to `update_restore_channel` via keyword arguments. Note that at
1736
2932
  # least one keyword argument is required. To specify no parameters, or to keep all
1737
2933
  # the default parameter values, pass an empty Hash as a request object (see above).
1738
2934
  #
1739
- # @param restore_plan [::Google::Cloud::GkeBackup::V1::RestorePlan, ::Hash]
1740
- # Required. A new version of the RestorePlan resource that contains updated
1741
- # fields. This may be sparsely populated if an `update_mask` is provided.
2935
+ # @param restore_channel [::Google::Cloud::GkeBackup::V1::RestoreChannel, ::Hash]
2936
+ # Required. A new version of the RestoreChannel resource that contains
2937
+ # updated fields. This may be sparsely populated if an `update_mask` is
2938
+ # provided.
1742
2939
  # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
1743
2940
  # Optional. This is used to specify the fields to be overwritten in the
1744
- # RestorePlan targeted for update. The values for each of these
1745
- # updated fields will be taken from the `restore_plan` provided
1746
- # with this request. Field names are relative to the root of the resource.
1747
- # If no `update_mask` is provided, all fields in `restore_plan` will be
1748
- # written to the target RestorePlan resource.
1749
- # Note that OUTPUT_ONLY and IMMUTABLE fields in `restore_plan` are ignored
1750
- # and are not used to update the target RestorePlan.
2941
+ # RestoreChannel targeted for update. The values for each of these
2942
+ # updated fields will be taken from the `restore_channel` provided
2943
+ # with this request. Field names are relative to the root of the resource
2944
+ # (e.g., `description`, `destination_project_id`, etc.)
2945
+ # If no `update_mask` is provided, all fields in `restore_channel` will
2946
+ # be written to the target RestoreChannel resource. Note that
2947
+ # OUTPUT_ONLY and IMMUTABLE fields in `restore_channel` are ignored and
2948
+ # are not used to update the target RestoreChannel.
1751
2949
  # @yield [result, operation] Access the result along with the TransportOperation object
1752
2950
  # @yieldparam result [::Gapic::Operation]
1753
2951
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -1763,10 +2961,10 @@ module Google
1763
2961
  # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new
1764
2962
  #
1765
2963
  # # Create a request. To set request fields, pass in keyword arguments.
1766
- # request = Google::Cloud::GkeBackup::V1::UpdateRestorePlanRequest.new
2964
+ # request = Google::Cloud::GkeBackup::V1::UpdateRestoreChannelRequest.new
1767
2965
  #
1768
- # # Call the update_restore_plan method.
1769
- # result = client.update_restore_plan request
2966
+ # # Call the update_restore_channel method.
2967
+ # result = client.update_restore_channel request
1770
2968
  #
1771
2969
  # # The returned object is of type Gapic::Operation. You can use it to
1772
2970
  # # check the status of an operation, cancel it, or wait for results.
@@ -1778,16 +2976,16 @@ module Google
1778
2976
  # puts "No response received."
1779
2977
  # end
1780
2978
  #
1781
- def update_restore_plan request, options = nil
2979
+ def update_restore_channel request, options = nil
1782
2980
  raise ::ArgumentError, "request must be provided" if request.nil?
1783
2981
 
1784
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::UpdateRestorePlanRequest
2982
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::UpdateRestoreChannelRequest
1785
2983
 
1786
2984
  # Converts hash and nil to an options object
1787
2985
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1788
2986
 
1789
2987
  # Customize the options with defaults
1790
- call_metadata = @config.rpcs.update_restore_plan.metadata.to_h
2988
+ call_metadata = @config.rpcs.update_restore_channel.metadata.to_h
1791
2989
 
1792
2990
  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1793
2991
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -1798,15 +2996,15 @@ module Google
1798
2996
  call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1799
2997
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1800
2998
 
1801
- options.apply_defaults timeout: @config.rpcs.update_restore_plan.timeout,
2999
+ options.apply_defaults timeout: @config.rpcs.update_restore_channel.timeout,
1802
3000
  metadata: call_metadata,
1803
- retry_policy: @config.rpcs.update_restore_plan.retry_policy
3001
+ retry_policy: @config.rpcs.update_restore_channel.retry_policy
1804
3002
 
1805
3003
  options.apply_defaults timeout: @config.timeout,
1806
3004
  metadata: @config.metadata,
1807
3005
  retry_policy: @config.retry_policy
1808
3006
 
1809
- @backup_for_gke_stub.update_restore_plan request, options do |result, operation|
3007
+ @backup_for_gke_stub.update_restore_channel request, options do |result, operation|
1810
3008
  result = ::Gapic::Operation.new result, @operations_client, options: options
1811
3009
  yield result, operation if block_given?
1812
3010
  throw :response, result
@@ -1816,34 +3014,31 @@ module Google
1816
3014
  end
1817
3015
 
1818
3016
  ##
1819
- # Deletes an existing RestorePlan.
3017
+ # Deletes an existing RestoreChannel.
1820
3018
  #
1821
- # @overload delete_restore_plan(request, options = nil)
1822
- # Pass arguments to `delete_restore_plan` via a request object, either of type
1823
- # {::Google::Cloud::GkeBackup::V1::DeleteRestorePlanRequest} or an equivalent Hash.
3019
+ # @overload delete_restore_channel(request, options = nil)
3020
+ # Pass arguments to `delete_restore_channel` via a request object, either of type
3021
+ # {::Google::Cloud::GkeBackup::V1::DeleteRestoreChannelRequest} or an equivalent Hash.
1824
3022
  #
1825
- # @param request [::Google::Cloud::GkeBackup::V1::DeleteRestorePlanRequest, ::Hash]
3023
+ # @param request [::Google::Cloud::GkeBackup::V1::DeleteRestoreChannelRequest, ::Hash]
1826
3024
  # A request object representing the call parameters. Required. To specify no
1827
3025
  # parameters, or to keep all the default parameter values, pass an empty Hash.
1828
3026
  # @param options [::Gapic::CallOptions, ::Hash]
1829
3027
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1830
3028
  #
1831
- # @overload delete_restore_plan(name: nil, etag: nil, force: nil)
1832
- # Pass arguments to `delete_restore_plan` via keyword arguments. Note that at
3029
+ # @overload delete_restore_channel(name: nil, etag: nil)
3030
+ # Pass arguments to `delete_restore_channel` via keyword arguments. Note that at
1833
3031
  # least one keyword argument is required. To specify no parameters, or to keep all
1834
3032
  # the default parameter values, pass an empty Hash as a request object (see above).
1835
3033
  #
1836
3034
  # @param name [::String]
1837
- # Required. Fully qualified RestorePlan name.
1838
- # Format: `projects/*/locations/*/restorePlans/*`
3035
+ # Required. Fully qualified RestoreChannel name.
3036
+ # Format: `projects/*/locations/*/restoreChannels/*`
1839
3037
  # @param etag [::String]
1840
3038
  # Optional. If provided, this value must match the current value of the
1841
- # target RestorePlan's {::Google::Cloud::GkeBackup::V1::RestorePlan#etag etag}
1842
- # field or the request is rejected.
1843
- # @param force [::Boolean]
1844
- # Optional. If set to true, any Restores below this RestorePlan will also be
1845
- # deleted. Otherwise, the request will only succeed if the RestorePlan has no
1846
- # Restores.
3039
+ # target RestoreChannel's
3040
+ # {::Google::Cloud::GkeBackup::V1::RestoreChannel#etag etag} field or the request
3041
+ # is rejected.
1847
3042
  # @yield [result, operation] Access the result along with the TransportOperation object
1848
3043
  # @yieldparam result [::Gapic::Operation]
1849
3044
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -1859,10 +3054,10 @@ module Google
1859
3054
  # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new
1860
3055
  #
1861
3056
  # # Create a request. To set request fields, pass in keyword arguments.
1862
- # request = Google::Cloud::GkeBackup::V1::DeleteRestorePlanRequest.new
3057
+ # request = Google::Cloud::GkeBackup::V1::DeleteRestoreChannelRequest.new
1863
3058
  #
1864
- # # Call the delete_restore_plan method.
1865
- # result = client.delete_restore_plan request
3059
+ # # Call the delete_restore_channel method.
3060
+ # result = client.delete_restore_channel request
1866
3061
  #
1867
3062
  # # The returned object is of type Gapic::Operation. You can use it to
1868
3063
  # # check the status of an operation, cancel it, or wait for results.
@@ -1874,16 +3069,16 @@ module Google
1874
3069
  # puts "No response received."
1875
3070
  # end
1876
3071
  #
1877
- def delete_restore_plan request, options = nil
3072
+ def delete_restore_channel request, options = nil
1878
3073
  raise ::ArgumentError, "request must be provided" if request.nil?
1879
3074
 
1880
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::DeleteRestorePlanRequest
3075
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::DeleteRestoreChannelRequest
1881
3076
 
1882
3077
  # Converts hash and nil to an options object
1883
3078
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1884
3079
 
1885
3080
  # Customize the options with defaults
1886
- call_metadata = @config.rpcs.delete_restore_plan.metadata.to_h
3081
+ call_metadata = @config.rpcs.delete_restore_channel.metadata.to_h
1887
3082
 
1888
3083
  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1889
3084
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -1894,15 +3089,15 @@ module Google
1894
3089
  call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1895
3090
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1896
3091
 
1897
- options.apply_defaults timeout: @config.rpcs.delete_restore_plan.timeout,
3092
+ options.apply_defaults timeout: @config.rpcs.delete_restore_channel.timeout,
1898
3093
  metadata: call_metadata,
1899
- retry_policy: @config.rpcs.delete_restore_plan.retry_policy
3094
+ retry_policy: @config.rpcs.delete_restore_channel.retry_policy
1900
3095
 
1901
3096
  options.apply_defaults timeout: @config.timeout,
1902
3097
  metadata: @config.metadata,
1903
3098
  retry_policy: @config.retry_policy
1904
3099
 
1905
- @backup_for_gke_stub.delete_restore_plan request, options do |result, operation|
3100
+ @backup_for_gke_stub.delete_restore_channel request, options do |result, operation|
1906
3101
  result = ::Gapic::Operation.new result, @operations_client, options: options
1907
3102
  yield result, operation if block_given?
1908
3103
  throw :response, result
@@ -1911,6 +3106,190 @@ module Google
1911
3106
  raise ::Google::Cloud::Error.from_error(e)
1912
3107
  end
1913
3108
 
3109
+ ##
3110
+ # Lists RestorePlanBindings in a given location.
3111
+ #
3112
+ # @overload list_restore_plan_bindings(request, options = nil)
3113
+ # Pass arguments to `list_restore_plan_bindings` via a request object, either of type
3114
+ # {::Google::Cloud::GkeBackup::V1::ListRestorePlanBindingsRequest} or an equivalent Hash.
3115
+ #
3116
+ # @param request [::Google::Cloud::GkeBackup::V1::ListRestorePlanBindingsRequest, ::Hash]
3117
+ # A request object representing the call parameters. Required. To specify no
3118
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3119
+ # @param options [::Gapic::CallOptions, ::Hash]
3120
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
3121
+ #
3122
+ # @overload list_restore_plan_bindings(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
3123
+ # Pass arguments to `list_restore_plan_bindings` via keyword arguments. Note that at
3124
+ # least one keyword argument is required. To specify no parameters, or to keep all
3125
+ # the default parameter values, pass an empty Hash as a request object (see above).
3126
+ #
3127
+ # @param parent [::String]
3128
+ # Required. The RestoreChannel that contains the ListRestorePlanBindings to
3129
+ # list. Format: `projects/*/locations/*/restoreChannels/*`
3130
+ # @param page_size [::Integer]
3131
+ # Optional. The target number of results to return in a single response.
3132
+ # If not specified, a default value will be chosen by the service.
3133
+ # Note that the response may include a partial list and a caller should
3134
+ # only rely on the response's
3135
+ # {::Google::Cloud::GkeBackup::V1::ListRestorePlanBindingsResponse#next_page_token next_page_token}
3136
+ # to determine if there are more instances left to be queried.
3137
+ # @param page_token [::String]
3138
+ # Optional. The value of
3139
+ # {::Google::Cloud::GkeBackup::V1::ListRestorePlanBindingsResponse#next_page_token next_page_token}
3140
+ # received from a previous `ListRestorePlanBindings` call.
3141
+ # Provide this to retrieve the subsequent page in a multi-page list of
3142
+ # results. When paginating, all other parameters provided to
3143
+ # `ListRestorePlanBindings` must match the call that provided the page
3144
+ # token.
3145
+ # @param filter [::String]
3146
+ # Optional. Field match expression used to filter the results.
3147
+ # @param order_by [::String]
3148
+ # Optional. Field by which to sort the results.
3149
+ # @yield [result, operation] Access the result along with the TransportOperation object
3150
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeBackup::V1::RestorePlanBinding>]
3151
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
3152
+ #
3153
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeBackup::V1::RestorePlanBinding>]
3154
+ #
3155
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
3156
+ #
3157
+ # @example Basic example
3158
+ # require "google/cloud/gke_backup/v1"
3159
+ #
3160
+ # # Create a client object. The client can be reused for multiple calls.
3161
+ # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new
3162
+ #
3163
+ # # Create a request. To set request fields, pass in keyword arguments.
3164
+ # request = Google::Cloud::GkeBackup::V1::ListRestorePlanBindingsRequest.new
3165
+ #
3166
+ # # Call the list_restore_plan_bindings method.
3167
+ # result = client.list_restore_plan_bindings request
3168
+ #
3169
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
3170
+ # # over elements, and API calls will be issued to fetch pages as needed.
3171
+ # result.each do |item|
3172
+ # # Each element is of type ::Google::Cloud::GkeBackup::V1::RestorePlanBinding.
3173
+ # p item
3174
+ # end
3175
+ #
3176
+ def list_restore_plan_bindings request, options = nil
3177
+ raise ::ArgumentError, "request must be provided" if request.nil?
3178
+
3179
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::ListRestorePlanBindingsRequest
3180
+
3181
+ # Converts hash and nil to an options object
3182
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3183
+
3184
+ # Customize the options with defaults
3185
+ call_metadata = @config.rpcs.list_restore_plan_bindings.metadata.to_h
3186
+
3187
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3188
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3189
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3190
+ gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION,
3191
+ transports_version_send: [:rest]
3192
+
3193
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
3194
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3195
+
3196
+ options.apply_defaults timeout: @config.rpcs.list_restore_plan_bindings.timeout,
3197
+ metadata: call_metadata,
3198
+ retry_policy: @config.rpcs.list_restore_plan_bindings.retry_policy
3199
+
3200
+ options.apply_defaults timeout: @config.timeout,
3201
+ metadata: @config.metadata,
3202
+ retry_policy: @config.retry_policy
3203
+
3204
+ @backup_for_gke_stub.list_restore_plan_bindings request, options do |result, operation|
3205
+ result = ::Gapic::Rest::PagedEnumerable.new @backup_for_gke_stub, :list_restore_plan_bindings, "restore_plan_bindings", request, result, options
3206
+ yield result, operation if block_given?
3207
+ throw :response, result
3208
+ end
3209
+ rescue ::Gapic::Rest::Error => e
3210
+ raise ::Google::Cloud::Error.from_error(e)
3211
+ end
3212
+
3213
+ ##
3214
+ # Retrieve the details of a single RestorePlanBinding.
3215
+ #
3216
+ # @overload get_restore_plan_binding(request, options = nil)
3217
+ # Pass arguments to `get_restore_plan_binding` via a request object, either of type
3218
+ # {::Google::Cloud::GkeBackup::V1::GetRestorePlanBindingRequest} or an equivalent Hash.
3219
+ #
3220
+ # @param request [::Google::Cloud::GkeBackup::V1::GetRestorePlanBindingRequest, ::Hash]
3221
+ # A request object representing the call parameters. Required. To specify no
3222
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3223
+ # @param options [::Gapic::CallOptions, ::Hash]
3224
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
3225
+ #
3226
+ # @overload get_restore_plan_binding(name: nil)
3227
+ # Pass arguments to `get_restore_plan_binding` via keyword arguments. Note that at
3228
+ # least one keyword argument is required. To specify no parameters, or to keep all
3229
+ # the default parameter values, pass an empty Hash as a request object (see above).
3230
+ #
3231
+ # @param name [::String]
3232
+ # Required. Fully qualified RestorePlanBinding name.
3233
+ # Format:
3234
+ # `projects/*/locations/*/restoreChannels/*/restorePlanBindings/*`
3235
+ # @yield [result, operation] Access the result along with the TransportOperation object
3236
+ # @yieldparam result [::Google::Cloud::GkeBackup::V1::RestorePlanBinding]
3237
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
3238
+ #
3239
+ # @return [::Google::Cloud::GkeBackup::V1::RestorePlanBinding]
3240
+ #
3241
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
3242
+ #
3243
+ # @example Basic example
3244
+ # require "google/cloud/gke_backup/v1"
3245
+ #
3246
+ # # Create a client object. The client can be reused for multiple calls.
3247
+ # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new
3248
+ #
3249
+ # # Create a request. To set request fields, pass in keyword arguments.
3250
+ # request = Google::Cloud::GkeBackup::V1::GetRestorePlanBindingRequest.new
3251
+ #
3252
+ # # Call the get_restore_plan_binding method.
3253
+ # result = client.get_restore_plan_binding request
3254
+ #
3255
+ # # The returned object is of type Google::Cloud::GkeBackup::V1::RestorePlanBinding.
3256
+ # p result
3257
+ #
3258
+ def get_restore_plan_binding request, options = nil
3259
+ raise ::ArgumentError, "request must be provided" if request.nil?
3260
+
3261
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::GetRestorePlanBindingRequest
3262
+
3263
+ # Converts hash and nil to an options object
3264
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3265
+
3266
+ # Customize the options with defaults
3267
+ call_metadata = @config.rpcs.get_restore_plan_binding.metadata.to_h
3268
+
3269
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3270
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3271
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3272
+ gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION,
3273
+ transports_version_send: [:rest]
3274
+
3275
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
3276
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3277
+
3278
+ options.apply_defaults timeout: @config.rpcs.get_restore_plan_binding.timeout,
3279
+ metadata: call_metadata,
3280
+ retry_policy: @config.rpcs.get_restore_plan_binding.retry_policy
3281
+
3282
+ options.apply_defaults timeout: @config.timeout,
3283
+ metadata: @config.metadata,
3284
+ retry_policy: @config.retry_policy
3285
+
3286
+ @backup_for_gke_stub.get_restore_plan_binding request, options do |result, operation|
3287
+ yield result, operation if block_given?
3288
+ end
3289
+ rescue ::Gapic::Rest::Error => e
3290
+ raise ::Google::Cloud::Error.from_error(e)
3291
+ end
3292
+
1914
3293
  ##
1915
3294
  # Creates a new Restore for the given RestorePlan.
1916
3295
  #
@@ -2050,10 +3429,10 @@ module Google
2050
3429
  # @param order_by [::String]
2051
3430
  # Optional. Field by which to sort the results.
2052
3431
  # @yield [result, operation] Access the result along with the TransportOperation object
2053
- # @yieldparam result [::Google::Cloud::GkeBackup::V1::ListRestoresResponse]
3432
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeBackup::V1::Restore>]
2054
3433
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
2055
3434
  #
2056
- # @return [::Google::Cloud::GkeBackup::V1::ListRestoresResponse]
3435
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeBackup::V1::Restore>]
2057
3436
  #
2058
3437
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
2059
3438
  #
@@ -2105,7 +3484,9 @@ module Google
2105
3484
  retry_policy: @config.retry_policy
2106
3485
 
2107
3486
  @backup_for_gke_stub.list_restores request, options do |result, operation|
3487
+ result = ::Gapic::Rest::PagedEnumerable.new @backup_for_gke_stub, :list_restores, "restores", request, result, options
2108
3488
  yield result, operation if block_given?
3489
+ throw :response, result
2109
3490
  end
2110
3491
  rescue ::Gapic::Rest::Error => e
2111
3492
  raise ::Google::Cloud::Error.from_error(e)
@@ -2824,6 +4205,41 @@ module Google
2824
4205
  #
2825
4206
  attr_reader :delete_backup_plan
2826
4207
  ##
4208
+ # RPC-specific configuration for `create_backup_channel`
4209
+ # @return [::Gapic::Config::Method]
4210
+ #
4211
+ attr_reader :create_backup_channel
4212
+ ##
4213
+ # RPC-specific configuration for `list_backup_channels`
4214
+ # @return [::Gapic::Config::Method]
4215
+ #
4216
+ attr_reader :list_backup_channels
4217
+ ##
4218
+ # RPC-specific configuration for `get_backup_channel`
4219
+ # @return [::Gapic::Config::Method]
4220
+ #
4221
+ attr_reader :get_backup_channel
4222
+ ##
4223
+ # RPC-specific configuration for `update_backup_channel`
4224
+ # @return [::Gapic::Config::Method]
4225
+ #
4226
+ attr_reader :update_backup_channel
4227
+ ##
4228
+ # RPC-specific configuration for `delete_backup_channel`
4229
+ # @return [::Gapic::Config::Method]
4230
+ #
4231
+ attr_reader :delete_backup_channel
4232
+ ##
4233
+ # RPC-specific configuration for `list_backup_plan_bindings`
4234
+ # @return [::Gapic::Config::Method]
4235
+ #
4236
+ attr_reader :list_backup_plan_bindings
4237
+ ##
4238
+ # RPC-specific configuration for `get_backup_plan_binding`
4239
+ # @return [::Gapic::Config::Method]
4240
+ #
4241
+ attr_reader :get_backup_plan_binding
4242
+ ##
2827
4243
  # RPC-specific configuration for `create_backup`
2828
4244
  # @return [::Gapic::Config::Method]
2829
4245
  #
@@ -2884,6 +4300,41 @@ module Google
2884
4300
  #
2885
4301
  attr_reader :delete_restore_plan
2886
4302
  ##
4303
+ # RPC-specific configuration for `create_restore_channel`
4304
+ # @return [::Gapic::Config::Method]
4305
+ #
4306
+ attr_reader :create_restore_channel
4307
+ ##
4308
+ # RPC-specific configuration for `list_restore_channels`
4309
+ # @return [::Gapic::Config::Method]
4310
+ #
4311
+ attr_reader :list_restore_channels
4312
+ ##
4313
+ # RPC-specific configuration for `get_restore_channel`
4314
+ # @return [::Gapic::Config::Method]
4315
+ #
4316
+ attr_reader :get_restore_channel
4317
+ ##
4318
+ # RPC-specific configuration for `update_restore_channel`
4319
+ # @return [::Gapic::Config::Method]
4320
+ #
4321
+ attr_reader :update_restore_channel
4322
+ ##
4323
+ # RPC-specific configuration for `delete_restore_channel`
4324
+ # @return [::Gapic::Config::Method]
4325
+ #
4326
+ attr_reader :delete_restore_channel
4327
+ ##
4328
+ # RPC-specific configuration for `list_restore_plan_bindings`
4329
+ # @return [::Gapic::Config::Method]
4330
+ #
4331
+ attr_reader :list_restore_plan_bindings
4332
+ ##
4333
+ # RPC-specific configuration for `get_restore_plan_binding`
4334
+ # @return [::Gapic::Config::Method]
4335
+ #
4336
+ attr_reader :get_restore_plan_binding
4337
+ ##
2887
4338
  # RPC-specific configuration for `create_restore`
2888
4339
  # @return [::Gapic::Config::Method]
2889
4340
  #
@@ -2936,6 +4387,20 @@ module Google
2936
4387
  @update_backup_plan = ::Gapic::Config::Method.new update_backup_plan_config
2937
4388
  delete_backup_plan_config = parent_rpcs.delete_backup_plan if parent_rpcs.respond_to? :delete_backup_plan
2938
4389
  @delete_backup_plan = ::Gapic::Config::Method.new delete_backup_plan_config
4390
+ create_backup_channel_config = parent_rpcs.create_backup_channel if parent_rpcs.respond_to? :create_backup_channel
4391
+ @create_backup_channel = ::Gapic::Config::Method.new create_backup_channel_config
4392
+ list_backup_channels_config = parent_rpcs.list_backup_channels if parent_rpcs.respond_to? :list_backup_channels
4393
+ @list_backup_channels = ::Gapic::Config::Method.new list_backup_channels_config
4394
+ get_backup_channel_config = parent_rpcs.get_backup_channel if parent_rpcs.respond_to? :get_backup_channel
4395
+ @get_backup_channel = ::Gapic::Config::Method.new get_backup_channel_config
4396
+ update_backup_channel_config = parent_rpcs.update_backup_channel if parent_rpcs.respond_to? :update_backup_channel
4397
+ @update_backup_channel = ::Gapic::Config::Method.new update_backup_channel_config
4398
+ delete_backup_channel_config = parent_rpcs.delete_backup_channel if parent_rpcs.respond_to? :delete_backup_channel
4399
+ @delete_backup_channel = ::Gapic::Config::Method.new delete_backup_channel_config
4400
+ list_backup_plan_bindings_config = parent_rpcs.list_backup_plan_bindings if parent_rpcs.respond_to? :list_backup_plan_bindings
4401
+ @list_backup_plan_bindings = ::Gapic::Config::Method.new list_backup_plan_bindings_config
4402
+ get_backup_plan_binding_config = parent_rpcs.get_backup_plan_binding if parent_rpcs.respond_to? :get_backup_plan_binding
4403
+ @get_backup_plan_binding = ::Gapic::Config::Method.new get_backup_plan_binding_config
2939
4404
  create_backup_config = parent_rpcs.create_backup if parent_rpcs.respond_to? :create_backup
2940
4405
  @create_backup = ::Gapic::Config::Method.new create_backup_config
2941
4406
  list_backups_config = parent_rpcs.list_backups if parent_rpcs.respond_to? :list_backups
@@ -2960,6 +4425,20 @@ module Google
2960
4425
  @update_restore_plan = ::Gapic::Config::Method.new update_restore_plan_config
2961
4426
  delete_restore_plan_config = parent_rpcs.delete_restore_plan if parent_rpcs.respond_to? :delete_restore_plan
2962
4427
  @delete_restore_plan = ::Gapic::Config::Method.new delete_restore_plan_config
4428
+ create_restore_channel_config = parent_rpcs.create_restore_channel if parent_rpcs.respond_to? :create_restore_channel
4429
+ @create_restore_channel = ::Gapic::Config::Method.new create_restore_channel_config
4430
+ list_restore_channels_config = parent_rpcs.list_restore_channels if parent_rpcs.respond_to? :list_restore_channels
4431
+ @list_restore_channels = ::Gapic::Config::Method.new list_restore_channels_config
4432
+ get_restore_channel_config = parent_rpcs.get_restore_channel if parent_rpcs.respond_to? :get_restore_channel
4433
+ @get_restore_channel = ::Gapic::Config::Method.new get_restore_channel_config
4434
+ update_restore_channel_config = parent_rpcs.update_restore_channel if parent_rpcs.respond_to? :update_restore_channel
4435
+ @update_restore_channel = ::Gapic::Config::Method.new update_restore_channel_config
4436
+ delete_restore_channel_config = parent_rpcs.delete_restore_channel if parent_rpcs.respond_to? :delete_restore_channel
4437
+ @delete_restore_channel = ::Gapic::Config::Method.new delete_restore_channel_config
4438
+ list_restore_plan_bindings_config = parent_rpcs.list_restore_plan_bindings if parent_rpcs.respond_to? :list_restore_plan_bindings
4439
+ @list_restore_plan_bindings = ::Gapic::Config::Method.new list_restore_plan_bindings_config
4440
+ get_restore_plan_binding_config = parent_rpcs.get_restore_plan_binding if parent_rpcs.respond_to? :get_restore_plan_binding
4441
+ @get_restore_plan_binding = ::Gapic::Config::Method.new get_restore_plan_binding_config
2963
4442
  create_restore_config = parent_rpcs.create_restore if parent_rpcs.respond_to? :create_restore
2964
4443
  @create_restore = ::Gapic::Config::Method.new create_restore_config
2965
4444
  list_restores_config = parent_rpcs.list_restores if parent_rpcs.respond_to? :list_restores