google-cloud-gke_backup-v1 1.0.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 +1756 -283
  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 +6 -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
@@ -89,6 +89,32 @@ module Google
89
89
 
90
90
  default_config.rpcs.delete_backup_plan.timeout = 60.0
91
91
 
92
+ default_config.rpcs.create_backup_channel.timeout = 60.0
93
+
94
+ default_config.rpcs.list_backup_channels.timeout = 60.0
95
+ default_config.rpcs.list_backup_channels.retry_policy = {
96
+ initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
97
+ }
98
+
99
+ default_config.rpcs.get_backup_channel.timeout = 60.0
100
+ default_config.rpcs.get_backup_channel.retry_policy = {
101
+ initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
102
+ }
103
+
104
+ default_config.rpcs.update_backup_channel.timeout = 60.0
105
+
106
+ default_config.rpcs.delete_backup_channel.timeout = 60.0
107
+
108
+ default_config.rpcs.list_backup_plan_bindings.timeout = 60.0
109
+ default_config.rpcs.list_backup_plan_bindings.retry_policy = {
110
+ initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
111
+ }
112
+
113
+ default_config.rpcs.get_backup_plan_binding.timeout = 60.0
114
+ default_config.rpcs.get_backup_plan_binding.retry_policy = {
115
+ initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
116
+ }
117
+
92
118
  default_config.rpcs.create_backup.timeout = 120.0
93
119
 
94
120
  default_config.rpcs.list_backups.timeout = 60.0
@@ -131,6 +157,32 @@ module Google
131
157
 
132
158
  default_config.rpcs.delete_restore_plan.timeout = 60.0
133
159
 
160
+ default_config.rpcs.create_restore_channel.timeout = 60.0
161
+
162
+ default_config.rpcs.list_restore_channels.timeout = 60.0
163
+ default_config.rpcs.list_restore_channels.retry_policy = {
164
+ initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
165
+ }
166
+
167
+ default_config.rpcs.get_restore_channel.timeout = 60.0
168
+ default_config.rpcs.get_restore_channel.retry_policy = {
169
+ initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
170
+ }
171
+
172
+ default_config.rpcs.update_restore_channel.timeout = 60.0
173
+
174
+ default_config.rpcs.delete_restore_channel.timeout = 60.0
175
+
176
+ default_config.rpcs.list_restore_plan_bindings.timeout = 60.0
177
+ default_config.rpcs.list_restore_plan_bindings.retry_policy = {
178
+ initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
179
+ }
180
+
181
+ default_config.rpcs.get_restore_plan_binding.timeout = 60.0
182
+ default_config.rpcs.get_restore_plan_binding.retry_policy = {
183
+ initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
184
+ }
185
+
134
186
  default_config.rpcs.create_restore.timeout = 120.0
135
187
 
136
188
  default_config.rpcs.list_restores.timeout = 60.0
@@ -826,37 +878,38 @@ module Google
826
878
  end
827
879
 
828
880
  ##
829
- # Creates a Backup for the given BackupPlan.
881
+ # Creates a new BackupChannel in a given location.
830
882
  #
831
- # @overload create_backup(request, options = nil)
832
- # Pass arguments to `create_backup` via a request object, either of type
833
- # {::Google::Cloud::GkeBackup::V1::CreateBackupRequest} or an equivalent Hash.
883
+ # @overload create_backup_channel(request, options = nil)
884
+ # Pass arguments to `create_backup_channel` via a request object, either of type
885
+ # {::Google::Cloud::GkeBackup::V1::CreateBackupChannelRequest} or an equivalent Hash.
834
886
  #
835
- # @param request [::Google::Cloud::GkeBackup::V1::CreateBackupRequest, ::Hash]
887
+ # @param request [::Google::Cloud::GkeBackup::V1::CreateBackupChannelRequest, ::Hash]
836
888
  # A request object representing the call parameters. Required. To specify no
837
889
  # parameters, or to keep all the default parameter values, pass an empty Hash.
838
890
  # @param options [::Gapic::CallOptions, ::Hash]
839
891
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
840
892
  #
841
- # @overload create_backup(parent: nil, backup: nil, backup_id: nil)
842
- # Pass arguments to `create_backup` via keyword arguments. Note that at
893
+ # @overload create_backup_channel(parent: nil, backup_channel: nil, backup_channel_id: nil)
894
+ # Pass arguments to `create_backup_channel` via keyword arguments. Note that at
843
895
  # least one keyword argument is required. To specify no parameters, or to keep all
844
896
  # the default parameter values, pass an empty Hash as a request object (see above).
845
897
  #
846
898
  # @param parent [::String]
847
- # Required. The BackupPlan within which to create the Backup.
848
- # Format: `projects/*/locations/*/backupPlans/*`
849
- # @param backup [::Google::Cloud::GkeBackup::V1::Backup, ::Hash]
850
- # Optional. The Backup resource to create.
851
- # @param backup_id [::String]
852
- # Optional. The client-provided short name for the Backup resource.
899
+ # Required. The location within which to create the BackupChannel.
900
+ # Format: `projects/*/locations/*`
901
+ # @param backup_channel [::Google::Cloud::GkeBackup::V1::BackupChannel, ::Hash]
902
+ # Required. The BackupChannel resource object to create.
903
+ # @param backup_channel_id [::String]
904
+ # Optional. The client-provided short name for the BackupChannel resource.
853
905
  # This name must:
854
906
  #
855
907
  # - be between 1 and 63 characters long (inclusive)
856
908
  # - consist of only lower-case ASCII letters, numbers, and dashes
857
909
  # - start with a lower-case letter
858
910
  # - end with a lower-case letter or number
859
- # - be unique within the set of Backups in this BackupPlan
911
+ # - be unique within the set of BackupChannels in this location
912
+ # If the user does not provide a name, a uuid will be used as the name.
860
913
  #
861
914
  # @yield [response, operation] Access the result along with the RPC operation
862
915
  # @yieldparam response [::Gapic::Operation]
@@ -873,10 +926,10 @@ module Google
873
926
  # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new
874
927
  #
875
928
  # # Create a request. To set request fields, pass in keyword arguments.
876
- # request = Google::Cloud::GkeBackup::V1::CreateBackupRequest.new
929
+ # request = Google::Cloud::GkeBackup::V1::CreateBackupChannelRequest.new
877
930
  #
878
- # # Call the create_backup method.
879
- # result = client.create_backup request
931
+ # # Call the create_backup_channel method.
932
+ # result = client.create_backup_channel request
880
933
  #
881
934
  # # The returned object is of type Gapic::Operation. You can use it to
882
935
  # # check the status of an operation, cancel it, or wait for results.
@@ -888,16 +941,16 @@ module Google
888
941
  # puts "No response received."
889
942
  # end
890
943
  #
891
- def create_backup request, options = nil
944
+ def create_backup_channel request, options = nil
892
945
  raise ::ArgumentError, "request must be provided" if request.nil?
893
946
 
894
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::CreateBackupRequest
947
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::CreateBackupChannelRequest
895
948
 
896
949
  # Converts hash and nil to an options object
897
950
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
898
951
 
899
952
  # Customize the options with defaults
900
- metadata = @config.rpcs.create_backup.metadata.to_h
953
+ metadata = @config.rpcs.create_backup_channel.metadata.to_h
901
954
 
902
955
  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
903
956
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -914,15 +967,15 @@ module Google
914
967
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
915
968
  metadata[:"x-goog-request-params"] ||= request_params_header
916
969
 
917
- options.apply_defaults timeout: @config.rpcs.create_backup.timeout,
970
+ options.apply_defaults timeout: @config.rpcs.create_backup_channel.timeout,
918
971
  metadata: metadata,
919
- retry_policy: @config.rpcs.create_backup.retry_policy
972
+ retry_policy: @config.rpcs.create_backup_channel.retry_policy
920
973
 
921
974
  options.apply_defaults timeout: @config.timeout,
922
975
  metadata: @config.metadata,
923
976
  retry_policy: @config.retry_policy
924
977
 
925
- @backup_for_gke_stub.call_rpc :create_backup, request, options: options do |response, operation|
978
+ @backup_for_gke_stub.call_rpc :create_backup_channel, request, options: options do |response, operation|
926
979
  response = ::Gapic::Operation.new response, @operations_client, options: options
927
980
  yield response, operation if block_given?
928
981
  throw :response, response
@@ -932,50 +985,51 @@ module Google
932
985
  end
933
986
 
934
987
  ##
935
- # Lists the Backups for a given BackupPlan.
988
+ # Lists BackupChannels in a given location.
936
989
  #
937
- # @overload list_backups(request, options = nil)
938
- # Pass arguments to `list_backups` via a request object, either of type
939
- # {::Google::Cloud::GkeBackup::V1::ListBackupsRequest} or an equivalent Hash.
990
+ # @overload list_backup_channels(request, options = nil)
991
+ # Pass arguments to `list_backup_channels` via a request object, either of type
992
+ # {::Google::Cloud::GkeBackup::V1::ListBackupChannelsRequest} or an equivalent Hash.
940
993
  #
941
- # @param request [::Google::Cloud::GkeBackup::V1::ListBackupsRequest, ::Hash]
994
+ # @param request [::Google::Cloud::GkeBackup::V1::ListBackupChannelsRequest, ::Hash]
942
995
  # A request object representing the call parameters. Required. To specify no
943
996
  # parameters, or to keep all the default parameter values, pass an empty Hash.
944
997
  # @param options [::Gapic::CallOptions, ::Hash]
945
998
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
946
999
  #
947
- # @overload list_backups(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
948
- # Pass arguments to `list_backups` via keyword arguments. Note that at
1000
+ # @overload list_backup_channels(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
1001
+ # Pass arguments to `list_backup_channels` via keyword arguments. Note that at
949
1002
  # least one keyword argument is required. To specify no parameters, or to keep all
950
1003
  # the default parameter values, pass an empty Hash as a request object (see above).
951
1004
  #
952
1005
  # @param parent [::String]
953
- # Required. The BackupPlan that contains the Backups to list.
954
- # Format: `projects/*/locations/*/backupPlans/*`
1006
+ # Required. The location that contains the BackupChannels to list.
1007
+ # Format: `projects/*/locations/*`
955
1008
  # @param page_size [::Integer]
956
1009
  # Optional. The target number of results to return in a single response.
957
1010
  # If not specified, a default value will be chosen by the service.
958
1011
  # Note that the response may include a partial list and a caller should
959
1012
  # only rely on the response's
960
- # {::Google::Cloud::GkeBackup::V1::ListBackupsResponse#next_page_token next_page_token}
1013
+ # {::Google::Cloud::GkeBackup::V1::ListBackupChannelsResponse#next_page_token next_page_token}
961
1014
  # to determine if there are more instances left to be queried.
962
1015
  # @param page_token [::String]
963
1016
  # Optional. The value of
964
- # {::Google::Cloud::GkeBackup::V1::ListBackupsResponse#next_page_token next_page_token}
965
- # received from a previous `ListBackups` call.
1017
+ # {::Google::Cloud::GkeBackup::V1::ListBackupChannelsResponse#next_page_token next_page_token}
1018
+ # received from a previous `ListBackupChannels` call.
966
1019
  # Provide this to retrieve the subsequent page in a multi-page list of
967
1020
  # results. When paginating, all other parameters provided to
968
- # `ListBackups` must match the call that provided the page token.
1021
+ # `ListBackupChannels` must match the call that provided the page
1022
+ # token.
969
1023
  # @param filter [::String]
970
1024
  # Optional. Field match expression used to filter the results.
971
1025
  # @param order_by [::String]
972
1026
  # Optional. Field by which to sort the results.
973
1027
  #
974
1028
  # @yield [response, operation] Access the result along with the RPC operation
975
- # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::Backup>]
1029
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::BackupChannel>]
976
1030
  # @yieldparam operation [::GRPC::ActiveCall::Operation]
977
1031
  #
978
- # @return [::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::Backup>]
1032
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::BackupChannel>]
979
1033
  #
980
1034
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
981
1035
  #
@@ -986,28 +1040,28 @@ module Google
986
1040
  # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new
987
1041
  #
988
1042
  # # Create a request. To set request fields, pass in keyword arguments.
989
- # request = Google::Cloud::GkeBackup::V1::ListBackupsRequest.new
1043
+ # request = Google::Cloud::GkeBackup::V1::ListBackupChannelsRequest.new
990
1044
  #
991
- # # Call the list_backups method.
992
- # result = client.list_backups request
1045
+ # # Call the list_backup_channels method.
1046
+ # result = client.list_backup_channels request
993
1047
  #
994
1048
  # # The returned object is of type Gapic::PagedEnumerable. You can iterate
995
1049
  # # over elements, and API calls will be issued to fetch pages as needed.
996
1050
  # result.each do |item|
997
- # # Each element is of type ::Google::Cloud::GkeBackup::V1::Backup.
1051
+ # # Each element is of type ::Google::Cloud::GkeBackup::V1::BackupChannel.
998
1052
  # p item
999
1053
  # end
1000
1054
  #
1001
- def list_backups request, options = nil
1055
+ def list_backup_channels request, options = nil
1002
1056
  raise ::ArgumentError, "request must be provided" if request.nil?
1003
1057
 
1004
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::ListBackupsRequest
1058
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::ListBackupChannelsRequest
1005
1059
 
1006
1060
  # Converts hash and nil to an options object
1007
1061
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1008
1062
 
1009
1063
  # Customize the options with defaults
1010
- metadata = @config.rpcs.list_backups.metadata.to_h
1064
+ metadata = @config.rpcs.list_backup_channels.metadata.to_h
1011
1065
 
1012
1066
  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1013
1067
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -1024,16 +1078,16 @@ module Google
1024
1078
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1025
1079
  metadata[:"x-goog-request-params"] ||= request_params_header
1026
1080
 
1027
- options.apply_defaults timeout: @config.rpcs.list_backups.timeout,
1081
+ options.apply_defaults timeout: @config.rpcs.list_backup_channels.timeout,
1028
1082
  metadata: metadata,
1029
- retry_policy: @config.rpcs.list_backups.retry_policy
1083
+ retry_policy: @config.rpcs.list_backup_channels.retry_policy
1030
1084
 
1031
1085
  options.apply_defaults timeout: @config.timeout,
1032
1086
  metadata: @config.metadata,
1033
1087
  retry_policy: @config.retry_policy
1034
1088
 
1035
- @backup_for_gke_stub.call_rpc :list_backups, request, options: options do |response, operation|
1036
- response = ::Gapic::PagedEnumerable.new @backup_for_gke_stub, :list_backups, request, response, operation, options
1089
+ @backup_for_gke_stub.call_rpc :list_backup_channels, request, options: options do |response, operation|
1090
+ response = ::Gapic::PagedEnumerable.new @backup_for_gke_stub, :list_backup_channels, request, response, operation, options
1037
1091
  yield response, operation if block_given?
1038
1092
  throw :response, response
1039
1093
  end
@@ -1042,32 +1096,32 @@ module Google
1042
1096
  end
1043
1097
 
1044
1098
  ##
1045
- # Retrieve the details of a single Backup.
1099
+ # Retrieve the details of a single BackupChannel.
1046
1100
  #
1047
- # @overload get_backup(request, options = nil)
1048
- # Pass arguments to `get_backup` via a request object, either of type
1049
- # {::Google::Cloud::GkeBackup::V1::GetBackupRequest} or an equivalent Hash.
1101
+ # @overload get_backup_channel(request, options = nil)
1102
+ # Pass arguments to `get_backup_channel` via a request object, either of type
1103
+ # {::Google::Cloud::GkeBackup::V1::GetBackupChannelRequest} or an equivalent Hash.
1050
1104
  #
1051
- # @param request [::Google::Cloud::GkeBackup::V1::GetBackupRequest, ::Hash]
1105
+ # @param request [::Google::Cloud::GkeBackup::V1::GetBackupChannelRequest, ::Hash]
1052
1106
  # A request object representing the call parameters. Required. To specify no
1053
1107
  # parameters, or to keep all the default parameter values, pass an empty Hash.
1054
1108
  # @param options [::Gapic::CallOptions, ::Hash]
1055
1109
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1056
1110
  #
1057
- # @overload get_backup(name: nil)
1058
- # Pass arguments to `get_backup` via keyword arguments. Note that at
1111
+ # @overload get_backup_channel(name: nil)
1112
+ # Pass arguments to `get_backup_channel` via keyword arguments. Note that at
1059
1113
  # least one keyword argument is required. To specify no parameters, or to keep all
1060
1114
  # the default parameter values, pass an empty Hash as a request object (see above).
1061
1115
  #
1062
1116
  # @param name [::String]
1063
- # Required. Full name of the Backup resource.
1064
- # Format: `projects/*/locations/*/backupPlans/*/backups/*`
1117
+ # Required. Fully qualified BackupChannel name.
1118
+ # Format: `projects/*/locations/*/backupChannels/*`
1065
1119
  #
1066
1120
  # @yield [response, operation] Access the result along with the RPC operation
1067
- # @yieldparam response [::Google::Cloud::GkeBackup::V1::Backup]
1121
+ # @yieldparam response [::Google::Cloud::GkeBackup::V1::BackupChannel]
1068
1122
  # @yieldparam operation [::GRPC::ActiveCall::Operation]
1069
1123
  #
1070
- # @return [::Google::Cloud::GkeBackup::V1::Backup]
1124
+ # @return [::Google::Cloud::GkeBackup::V1::BackupChannel]
1071
1125
  #
1072
1126
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1073
1127
  #
@@ -1078,24 +1132,24 @@ module Google
1078
1132
  # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new
1079
1133
  #
1080
1134
  # # Create a request. To set request fields, pass in keyword arguments.
1081
- # request = Google::Cloud::GkeBackup::V1::GetBackupRequest.new
1135
+ # request = Google::Cloud::GkeBackup::V1::GetBackupChannelRequest.new
1082
1136
  #
1083
- # # Call the get_backup method.
1084
- # result = client.get_backup request
1137
+ # # Call the get_backup_channel method.
1138
+ # result = client.get_backup_channel request
1085
1139
  #
1086
- # # The returned object is of type Google::Cloud::GkeBackup::V1::Backup.
1140
+ # # The returned object is of type Google::Cloud::GkeBackup::V1::BackupChannel.
1087
1141
  # p result
1088
1142
  #
1089
- def get_backup request, options = nil
1143
+ def get_backup_channel request, options = nil
1090
1144
  raise ::ArgumentError, "request must be provided" if request.nil?
1091
1145
 
1092
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::GetBackupRequest
1146
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::GetBackupChannelRequest
1093
1147
 
1094
1148
  # Converts hash and nil to an options object
1095
1149
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1096
1150
 
1097
1151
  # Customize the options with defaults
1098
- metadata = @config.rpcs.get_backup.metadata.to_h
1152
+ metadata = @config.rpcs.get_backup_channel.metadata.to_h
1099
1153
 
1100
1154
  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1101
1155
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -1112,15 +1166,15 @@ module Google
1112
1166
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1113
1167
  metadata[:"x-goog-request-params"] ||= request_params_header
1114
1168
 
1115
- options.apply_defaults timeout: @config.rpcs.get_backup.timeout,
1169
+ options.apply_defaults timeout: @config.rpcs.get_backup_channel.timeout,
1116
1170
  metadata: metadata,
1117
- retry_policy: @config.rpcs.get_backup.retry_policy
1171
+ retry_policy: @config.rpcs.get_backup_channel.retry_policy
1118
1172
 
1119
1173
  options.apply_defaults timeout: @config.timeout,
1120
1174
  metadata: @config.metadata,
1121
1175
  retry_policy: @config.retry_policy
1122
1176
 
1123
- @backup_for_gke_stub.call_rpc :get_backup, request, options: options do |response, operation|
1177
+ @backup_for_gke_stub.call_rpc :get_backup_channel, request, options: options do |response, operation|
1124
1178
  yield response, operation if block_given?
1125
1179
  end
1126
1180
  rescue ::GRPC::BadStatus => e
@@ -1128,35 +1182,36 @@ module Google
1128
1182
  end
1129
1183
 
1130
1184
  ##
1131
- # Update a Backup.
1185
+ # Update a BackupChannel.
1132
1186
  #
1133
- # @overload update_backup(request, options = nil)
1134
- # Pass arguments to `update_backup` via a request object, either of type
1135
- # {::Google::Cloud::GkeBackup::V1::UpdateBackupRequest} or an equivalent Hash.
1187
+ # @overload update_backup_channel(request, options = nil)
1188
+ # Pass arguments to `update_backup_channel` via a request object, either of type
1189
+ # {::Google::Cloud::GkeBackup::V1::UpdateBackupChannelRequest} or an equivalent Hash.
1136
1190
  #
1137
- # @param request [::Google::Cloud::GkeBackup::V1::UpdateBackupRequest, ::Hash]
1191
+ # @param request [::Google::Cloud::GkeBackup::V1::UpdateBackupChannelRequest, ::Hash]
1138
1192
  # A request object representing the call parameters. Required. To specify no
1139
1193
  # parameters, or to keep all the default parameter values, pass an empty Hash.
1140
1194
  # @param options [::Gapic::CallOptions, ::Hash]
1141
1195
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1142
1196
  #
1143
- # @overload update_backup(backup: nil, update_mask: nil)
1144
- # Pass arguments to `update_backup` via keyword arguments. Note that at
1197
+ # @overload update_backup_channel(backup_channel: nil, update_mask: nil)
1198
+ # Pass arguments to `update_backup_channel` via keyword arguments. Note that at
1145
1199
  # least one keyword argument is required. To specify no parameters, or to keep all
1146
1200
  # the default parameter values, pass an empty Hash as a request object (see above).
1147
1201
  #
1148
- # @param backup [::Google::Cloud::GkeBackup::V1::Backup, ::Hash]
1149
- # Required. A new version of the Backup resource that contains updated
1202
+ # @param backup_channel [::Google::Cloud::GkeBackup::V1::BackupChannel, ::Hash]
1203
+ # Required. A new version of the BackupChannel resource that contains updated
1150
1204
  # fields. This may be sparsely populated if an `update_mask` is provided.
1151
1205
  # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
1152
1206
  # Optional. This is used to specify the fields to be overwritten in the
1153
- # Backup targeted for update. The values for each of these
1154
- # updated fields will be taken from the `backup_plan` provided
1155
- # with this request. Field names are relative to the root of the resource.
1156
- # If no `update_mask` is provided, all fields in `backup` will be
1157
- # written to the target Backup resource.
1158
- # Note that OUTPUT_ONLY and IMMUTABLE fields in `backup` are ignored
1159
- # and are not used to update the target Backup.
1207
+ # BackupChannel targeted for update. The values for each of these
1208
+ # updated fields will be taken from the `backup_channel` provided
1209
+ # with this request. Field names are relative to the root of the resource
1210
+ # (e.g., `description`, `labels`, etc.)
1211
+ # If no `update_mask` is provided, all fields in `backup_channel` will
1212
+ # be written to the target BackupChannel resource. Note that
1213
+ # OUTPUT_ONLY and IMMUTABLE fields in `backup_channel` are ignored and
1214
+ # are not used to update the target BackupChannel.
1160
1215
  #
1161
1216
  # @yield [response, operation] Access the result along with the RPC operation
1162
1217
  # @yieldparam response [::Gapic::Operation]
@@ -1173,10 +1228,10 @@ module Google
1173
1228
  # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new
1174
1229
  #
1175
1230
  # # Create a request. To set request fields, pass in keyword arguments.
1176
- # request = Google::Cloud::GkeBackup::V1::UpdateBackupRequest.new
1231
+ # request = Google::Cloud::GkeBackup::V1::UpdateBackupChannelRequest.new
1177
1232
  #
1178
- # # Call the update_backup method.
1179
- # result = client.update_backup request
1233
+ # # Call the update_backup_channel method.
1234
+ # result = client.update_backup_channel request
1180
1235
  #
1181
1236
  # # The returned object is of type Gapic::Operation. You can use it to
1182
1237
  # # check the status of an operation, cancel it, or wait for results.
@@ -1188,16 +1243,16 @@ module Google
1188
1243
  # puts "No response received."
1189
1244
  # end
1190
1245
  #
1191
- def update_backup request, options = nil
1246
+ def update_backup_channel request, options = nil
1192
1247
  raise ::ArgumentError, "request must be provided" if request.nil?
1193
1248
 
1194
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::UpdateBackupRequest
1249
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::UpdateBackupChannelRequest
1195
1250
 
1196
1251
  # Converts hash and nil to an options object
1197
1252
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1198
1253
 
1199
1254
  # Customize the options with defaults
1200
- metadata = @config.rpcs.update_backup.metadata.to_h
1255
+ metadata = @config.rpcs.update_backup_channel.metadata.to_h
1201
1256
 
1202
1257
  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1203
1258
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -1207,22 +1262,22 @@ module Google
1207
1262
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1208
1263
 
1209
1264
  header_params = {}
1210
- if request.backup&.name
1211
- header_params["backup.name"] = request.backup.name
1265
+ if request.backup_channel&.name
1266
+ header_params["backup_channel.name"] = request.backup_channel.name
1212
1267
  end
1213
1268
 
1214
1269
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1215
1270
  metadata[:"x-goog-request-params"] ||= request_params_header
1216
1271
 
1217
- options.apply_defaults timeout: @config.rpcs.update_backup.timeout,
1272
+ options.apply_defaults timeout: @config.rpcs.update_backup_channel.timeout,
1218
1273
  metadata: metadata,
1219
- retry_policy: @config.rpcs.update_backup.retry_policy
1274
+ retry_policy: @config.rpcs.update_backup_channel.retry_policy
1220
1275
 
1221
1276
  options.apply_defaults timeout: @config.timeout,
1222
1277
  metadata: @config.metadata,
1223
1278
  retry_policy: @config.retry_policy
1224
1279
 
1225
- @backup_for_gke_stub.call_rpc :update_backup, request, options: options do |response, operation|
1280
+ @backup_for_gke_stub.call_rpc :update_backup_channel, request, options: options do |response, operation|
1226
1281
  response = ::Gapic::Operation.new response, @operations_client, options: options
1227
1282
  yield response, operation if block_given?
1228
1283
  throw :response, response
@@ -1232,34 +1287,34 @@ module Google
1232
1287
  end
1233
1288
 
1234
1289
  ##
1235
- # Deletes an existing Backup.
1290
+ # Deletes an existing BackupChannel.
1236
1291
  #
1237
- # @overload delete_backup(request, options = nil)
1238
- # Pass arguments to `delete_backup` via a request object, either of type
1239
- # {::Google::Cloud::GkeBackup::V1::DeleteBackupRequest} or an equivalent Hash.
1292
+ # @overload delete_backup_channel(request, options = nil)
1293
+ # Pass arguments to `delete_backup_channel` via a request object, either of type
1294
+ # {::Google::Cloud::GkeBackup::V1::DeleteBackupChannelRequest} or an equivalent Hash.
1240
1295
  #
1241
- # @param request [::Google::Cloud::GkeBackup::V1::DeleteBackupRequest, ::Hash]
1296
+ # @param request [::Google::Cloud::GkeBackup::V1::DeleteBackupChannelRequest, ::Hash]
1242
1297
  # A request object representing the call parameters. Required. To specify no
1243
1298
  # parameters, or to keep all the default parameter values, pass an empty Hash.
1244
1299
  # @param options [::Gapic::CallOptions, ::Hash]
1245
1300
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1246
1301
  #
1247
- # @overload delete_backup(name: nil, etag: nil, force: nil)
1248
- # Pass arguments to `delete_backup` via keyword arguments. Note that at
1302
+ # @overload delete_backup_channel(name: nil, etag: nil, force: nil)
1303
+ # Pass arguments to `delete_backup_channel` via keyword arguments. Note that at
1249
1304
  # least one keyword argument is required. To specify no parameters, or to keep all
1250
1305
  # the default parameter values, pass an empty Hash as a request object (see above).
1251
1306
  #
1252
1307
  # @param name [::String]
1253
- # Required. Name of the Backup resource.
1254
- # Format: `projects/*/locations/*/backupPlans/*/backups/*`
1308
+ # Required. Fully qualified BackupChannel name.
1309
+ # Format: `projects/*/locations/*/backupChannels/*`
1255
1310
  # @param etag [::String]
1256
1311
  # Optional. If provided, this value must match the current value of the
1257
- # target Backup's {::Google::Cloud::GkeBackup::V1::Backup#etag etag} field or the
1258
- # request is rejected.
1312
+ # target BackupChannel's {::Google::Cloud::GkeBackup::V1::BackupChannel#etag etag}
1313
+ # field or the request is rejected.
1259
1314
  # @param force [::Boolean]
1260
- # Optional. If set to true, any VolumeBackups below this Backup will also be
1261
- # deleted. Otherwise, the request will only succeed if the Backup has no
1262
- # VolumeBackups.
1315
+ # Optional. If set to true, any BackupPlanAssociations below this
1316
+ # BackupChannel will also be deleted. Otherwise, the request will only
1317
+ # succeed if the BackupChannel has no BackupPlanAssociations.
1263
1318
  #
1264
1319
  # @yield [response, operation] Access the result along with the RPC operation
1265
1320
  # @yieldparam response [::Gapic::Operation]
@@ -1276,10 +1331,10 @@ module Google
1276
1331
  # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new
1277
1332
  #
1278
1333
  # # Create a request. To set request fields, pass in keyword arguments.
1279
- # request = Google::Cloud::GkeBackup::V1::DeleteBackupRequest.new
1334
+ # request = Google::Cloud::GkeBackup::V1::DeleteBackupChannelRequest.new
1280
1335
  #
1281
- # # Call the delete_backup method.
1282
- # result = client.delete_backup request
1336
+ # # Call the delete_backup_channel method.
1337
+ # result = client.delete_backup_channel request
1283
1338
  #
1284
1339
  # # The returned object is of type Gapic::Operation. You can use it to
1285
1340
  # # check the status of an operation, cancel it, or wait for results.
@@ -1291,16 +1346,16 @@ module Google
1291
1346
  # puts "No response received."
1292
1347
  # end
1293
1348
  #
1294
- def delete_backup request, options = nil
1349
+ def delete_backup_channel request, options = nil
1295
1350
  raise ::ArgumentError, "request must be provided" if request.nil?
1296
1351
 
1297
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::DeleteBackupRequest
1352
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::DeleteBackupChannelRequest
1298
1353
 
1299
1354
  # Converts hash and nil to an options object
1300
1355
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1301
1356
 
1302
1357
  # Customize the options with defaults
1303
- metadata = @config.rpcs.delete_backup.metadata.to_h
1358
+ metadata = @config.rpcs.delete_backup_channel.metadata.to_h
1304
1359
 
1305
1360
  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1306
1361
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -1317,15 +1372,15 @@ module Google
1317
1372
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1318
1373
  metadata[:"x-goog-request-params"] ||= request_params_header
1319
1374
 
1320
- options.apply_defaults timeout: @config.rpcs.delete_backup.timeout,
1375
+ options.apply_defaults timeout: @config.rpcs.delete_backup_channel.timeout,
1321
1376
  metadata: metadata,
1322
- retry_policy: @config.rpcs.delete_backup.retry_policy
1377
+ retry_policy: @config.rpcs.delete_backup_channel.retry_policy
1323
1378
 
1324
1379
  options.apply_defaults timeout: @config.timeout,
1325
1380
  metadata: @config.metadata,
1326
1381
  retry_policy: @config.retry_policy
1327
1382
 
1328
- @backup_for_gke_stub.call_rpc :delete_backup, request, options: options do |response, operation|
1383
+ @backup_for_gke_stub.call_rpc :delete_backup_channel, request, options: options do |response, operation|
1329
1384
  response = ::Gapic::Operation.new response, @operations_client, options: options
1330
1385
  yield response, operation if block_given?
1331
1386
  throw :response, response
@@ -1335,50 +1390,51 @@ module Google
1335
1390
  end
1336
1391
 
1337
1392
  ##
1338
- # Lists the VolumeBackups for a given Backup.
1393
+ # Lists BackupPlanBindings in a given location.
1339
1394
  #
1340
- # @overload list_volume_backups(request, options = nil)
1341
- # Pass arguments to `list_volume_backups` via a request object, either of type
1342
- # {::Google::Cloud::GkeBackup::V1::ListVolumeBackupsRequest} or an equivalent Hash.
1395
+ # @overload list_backup_plan_bindings(request, options = nil)
1396
+ # Pass arguments to `list_backup_plan_bindings` via a request object, either of type
1397
+ # {::Google::Cloud::GkeBackup::V1::ListBackupPlanBindingsRequest} or an equivalent Hash.
1343
1398
  #
1344
- # @param request [::Google::Cloud::GkeBackup::V1::ListVolumeBackupsRequest, ::Hash]
1399
+ # @param request [::Google::Cloud::GkeBackup::V1::ListBackupPlanBindingsRequest, ::Hash]
1345
1400
  # A request object representing the call parameters. Required. To specify no
1346
1401
  # parameters, or to keep all the default parameter values, pass an empty Hash.
1347
1402
  # @param options [::Gapic::CallOptions, ::Hash]
1348
1403
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1349
1404
  #
1350
- # @overload list_volume_backups(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
1351
- # Pass arguments to `list_volume_backups` via keyword arguments. Note that at
1405
+ # @overload list_backup_plan_bindings(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
1406
+ # Pass arguments to `list_backup_plan_bindings` via keyword arguments. Note that at
1352
1407
  # least one keyword argument is required. To specify no parameters, or to keep all
1353
1408
  # the default parameter values, pass an empty Hash as a request object (see above).
1354
1409
  #
1355
1410
  # @param parent [::String]
1356
- # Required. The Backup that contains the VolumeBackups to list.
1357
- # Format: `projects/*/locations/*/backupPlans/*/backups/*`
1411
+ # Required. The BackupChannel that contains the BackupPlanBindings to list.
1412
+ # Format: `projects/*/locations/*/backupChannels/*`
1358
1413
  # @param page_size [::Integer]
1359
1414
  # Optional. The target number of results to return in a single response.
1360
1415
  # If not specified, a default value will be chosen by the service.
1361
1416
  # Note that the response may include a partial list and a caller should
1362
1417
  # only rely on the response's
1363
- # {::Google::Cloud::GkeBackup::V1::ListVolumeBackupsResponse#next_page_token next_page_token}
1418
+ # {::Google::Cloud::GkeBackup::V1::ListBackupPlanBindingsResponse#next_page_token next_page_token}
1364
1419
  # to determine if there are more instances left to be queried.
1365
1420
  # @param page_token [::String]
1366
1421
  # Optional. The value of
1367
- # {::Google::Cloud::GkeBackup::V1::ListVolumeBackupsResponse#next_page_token next_page_token}
1368
- # received from a previous `ListVolumeBackups` call.
1422
+ # {::Google::Cloud::GkeBackup::V1::ListBackupPlanBindingsResponse#next_page_token next_page_token}
1423
+ # received from a previous `ListBackupPlanBindings` call.
1369
1424
  # Provide this to retrieve the subsequent page in a multi-page list of
1370
1425
  # results. When paginating, all other parameters provided to
1371
- # `ListVolumeBackups` must match the call that provided the page token.
1426
+ # `ListBackupPlanBindings` must match the call that provided the page
1427
+ # token.
1372
1428
  # @param filter [::String]
1373
1429
  # Optional. Field match expression used to filter the results.
1374
1430
  # @param order_by [::String]
1375
1431
  # Optional. Field by which to sort the results.
1376
1432
  #
1377
1433
  # @yield [response, operation] Access the result along with the RPC operation
1378
- # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::VolumeBackup>]
1434
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::BackupPlanBinding>]
1379
1435
  # @yieldparam operation [::GRPC::ActiveCall::Operation]
1380
1436
  #
1381
- # @return [::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::VolumeBackup>]
1437
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::BackupPlanBinding>]
1382
1438
  #
1383
1439
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1384
1440
  #
@@ -1389,28 +1445,28 @@ module Google
1389
1445
  # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new
1390
1446
  #
1391
1447
  # # Create a request. To set request fields, pass in keyword arguments.
1392
- # request = Google::Cloud::GkeBackup::V1::ListVolumeBackupsRequest.new
1448
+ # request = Google::Cloud::GkeBackup::V1::ListBackupPlanBindingsRequest.new
1393
1449
  #
1394
- # # Call the list_volume_backups method.
1395
- # result = client.list_volume_backups request
1450
+ # # Call the list_backup_plan_bindings method.
1451
+ # result = client.list_backup_plan_bindings request
1396
1452
  #
1397
1453
  # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1398
1454
  # # over elements, and API calls will be issued to fetch pages as needed.
1399
1455
  # result.each do |item|
1400
- # # Each element is of type ::Google::Cloud::GkeBackup::V1::VolumeBackup.
1456
+ # # Each element is of type ::Google::Cloud::GkeBackup::V1::BackupPlanBinding.
1401
1457
  # p item
1402
1458
  # end
1403
1459
  #
1404
- def list_volume_backups request, options = nil
1460
+ def list_backup_plan_bindings request, options = nil
1405
1461
  raise ::ArgumentError, "request must be provided" if request.nil?
1406
1462
 
1407
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::ListVolumeBackupsRequest
1463
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::ListBackupPlanBindingsRequest
1408
1464
 
1409
1465
  # Converts hash and nil to an options object
1410
1466
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1411
1467
 
1412
1468
  # Customize the options with defaults
1413
- metadata = @config.rpcs.list_volume_backups.metadata.to_h
1469
+ metadata = @config.rpcs.list_backup_plan_bindings.metadata.to_h
1414
1470
 
1415
1471
  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1416
1472
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -1427,16 +1483,16 @@ module Google
1427
1483
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1428
1484
  metadata[:"x-goog-request-params"] ||= request_params_header
1429
1485
 
1430
- options.apply_defaults timeout: @config.rpcs.list_volume_backups.timeout,
1486
+ options.apply_defaults timeout: @config.rpcs.list_backup_plan_bindings.timeout,
1431
1487
  metadata: metadata,
1432
- retry_policy: @config.rpcs.list_volume_backups.retry_policy
1488
+ retry_policy: @config.rpcs.list_backup_plan_bindings.retry_policy
1433
1489
 
1434
1490
  options.apply_defaults timeout: @config.timeout,
1435
1491
  metadata: @config.metadata,
1436
1492
  retry_policy: @config.retry_policy
1437
1493
 
1438
- @backup_for_gke_stub.call_rpc :list_volume_backups, request, options: options do |response, operation|
1439
- response = ::Gapic::PagedEnumerable.new @backup_for_gke_stub, :list_volume_backups, request, response, operation, options
1494
+ @backup_for_gke_stub.call_rpc :list_backup_plan_bindings, request, options: options do |response, operation|
1495
+ response = ::Gapic::PagedEnumerable.new @backup_for_gke_stub, :list_backup_plan_bindings, request, response, operation, options
1440
1496
  yield response, operation if block_given?
1441
1497
  throw :response, response
1442
1498
  end
@@ -1445,32 +1501,33 @@ module Google
1445
1501
  end
1446
1502
 
1447
1503
  ##
1448
- # Retrieve the details of a single VolumeBackup.
1504
+ # Retrieve the details of a single BackupPlanBinding.
1449
1505
  #
1450
- # @overload get_volume_backup(request, options = nil)
1451
- # Pass arguments to `get_volume_backup` via a request object, either of type
1452
- # {::Google::Cloud::GkeBackup::V1::GetVolumeBackupRequest} or an equivalent Hash.
1506
+ # @overload get_backup_plan_binding(request, options = nil)
1507
+ # Pass arguments to `get_backup_plan_binding` via a request object, either of type
1508
+ # {::Google::Cloud::GkeBackup::V1::GetBackupPlanBindingRequest} or an equivalent Hash.
1453
1509
  #
1454
- # @param request [::Google::Cloud::GkeBackup::V1::GetVolumeBackupRequest, ::Hash]
1510
+ # @param request [::Google::Cloud::GkeBackup::V1::GetBackupPlanBindingRequest, ::Hash]
1455
1511
  # A request object representing the call parameters. Required. To specify no
1456
1512
  # parameters, or to keep all the default parameter values, pass an empty Hash.
1457
1513
  # @param options [::Gapic::CallOptions, ::Hash]
1458
1514
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1459
1515
  #
1460
- # @overload get_volume_backup(name: nil)
1461
- # Pass arguments to `get_volume_backup` via keyword arguments. Note that at
1516
+ # @overload get_backup_plan_binding(name: nil)
1517
+ # Pass arguments to `get_backup_plan_binding` via keyword arguments. Note that at
1462
1518
  # least one keyword argument is required. To specify no parameters, or to keep all
1463
1519
  # the default parameter values, pass an empty Hash as a request object (see above).
1464
1520
  #
1465
1521
  # @param name [::String]
1466
- # Required. Full name of the VolumeBackup resource.
1467
- # Format: `projects/*/locations/*/backupPlans/*/backups/*/volumeBackups/*`
1522
+ # Required. Fully qualified BackupPlanBinding name.
1523
+ # Format:
1524
+ # `projects/*/locations/*/backupChannels/*/backupPlanBindings/*`
1468
1525
  #
1469
1526
  # @yield [response, operation] Access the result along with the RPC operation
1470
- # @yieldparam response [::Google::Cloud::GkeBackup::V1::VolumeBackup]
1527
+ # @yieldparam response [::Google::Cloud::GkeBackup::V1::BackupPlanBinding]
1471
1528
  # @yieldparam operation [::GRPC::ActiveCall::Operation]
1472
1529
  #
1473
- # @return [::Google::Cloud::GkeBackup::V1::VolumeBackup]
1530
+ # @return [::Google::Cloud::GkeBackup::V1::BackupPlanBinding]
1474
1531
  #
1475
1532
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1476
1533
  #
@@ -1481,24 +1538,24 @@ module Google
1481
1538
  # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new
1482
1539
  #
1483
1540
  # # Create a request. To set request fields, pass in keyword arguments.
1484
- # request = Google::Cloud::GkeBackup::V1::GetVolumeBackupRequest.new
1541
+ # request = Google::Cloud::GkeBackup::V1::GetBackupPlanBindingRequest.new
1485
1542
  #
1486
- # # Call the get_volume_backup method.
1487
- # result = client.get_volume_backup request
1543
+ # # Call the get_backup_plan_binding method.
1544
+ # result = client.get_backup_plan_binding request
1488
1545
  #
1489
- # # The returned object is of type Google::Cloud::GkeBackup::V1::VolumeBackup.
1546
+ # # The returned object is of type Google::Cloud::GkeBackup::V1::BackupPlanBinding.
1490
1547
  # p result
1491
1548
  #
1492
- def get_volume_backup request, options = nil
1549
+ def get_backup_plan_binding request, options = nil
1493
1550
  raise ::ArgumentError, "request must be provided" if request.nil?
1494
1551
 
1495
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::GetVolumeBackupRequest
1552
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::GetBackupPlanBindingRequest
1496
1553
 
1497
1554
  # Converts hash and nil to an options object
1498
1555
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1499
1556
 
1500
1557
  # Customize the options with defaults
1501
- metadata = @config.rpcs.get_volume_backup.metadata.to_h
1558
+ metadata = @config.rpcs.get_backup_plan_binding.metadata.to_h
1502
1559
 
1503
1560
  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1504
1561
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -1515,15 +1572,15 @@ module Google
1515
1572
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1516
1573
  metadata[:"x-goog-request-params"] ||= request_params_header
1517
1574
 
1518
- options.apply_defaults timeout: @config.rpcs.get_volume_backup.timeout,
1575
+ options.apply_defaults timeout: @config.rpcs.get_backup_plan_binding.timeout,
1519
1576
  metadata: metadata,
1520
- retry_policy: @config.rpcs.get_volume_backup.retry_policy
1577
+ retry_policy: @config.rpcs.get_backup_plan_binding.retry_policy
1521
1578
 
1522
1579
  options.apply_defaults timeout: @config.timeout,
1523
1580
  metadata: @config.metadata,
1524
1581
  retry_policy: @config.retry_policy
1525
1582
 
1526
- @backup_for_gke_stub.call_rpc :get_volume_backup, request, options: options do |response, operation|
1583
+ @backup_for_gke_stub.call_rpc :get_backup_plan_binding, request, options: options do |response, operation|
1527
1584
  yield response, operation if block_given?
1528
1585
  end
1529
1586
  rescue ::GRPC::BadStatus => e
@@ -1531,37 +1588,37 @@ module Google
1531
1588
  end
1532
1589
 
1533
1590
  ##
1534
- # Creates a new RestorePlan in a given location.
1591
+ # Creates a Backup for the given BackupPlan.
1535
1592
  #
1536
- # @overload create_restore_plan(request, options = nil)
1537
- # Pass arguments to `create_restore_plan` via a request object, either of type
1538
- # {::Google::Cloud::GkeBackup::V1::CreateRestorePlanRequest} or an equivalent Hash.
1593
+ # @overload create_backup(request, options = nil)
1594
+ # Pass arguments to `create_backup` via a request object, either of type
1595
+ # {::Google::Cloud::GkeBackup::V1::CreateBackupRequest} or an equivalent Hash.
1539
1596
  #
1540
- # @param request [::Google::Cloud::GkeBackup::V1::CreateRestorePlanRequest, ::Hash]
1597
+ # @param request [::Google::Cloud::GkeBackup::V1::CreateBackupRequest, ::Hash]
1541
1598
  # A request object representing the call parameters. Required. To specify no
1542
1599
  # parameters, or to keep all the default parameter values, pass an empty Hash.
1543
1600
  # @param options [::Gapic::CallOptions, ::Hash]
1544
1601
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1545
1602
  #
1546
- # @overload create_restore_plan(parent: nil, restore_plan: nil, restore_plan_id: nil)
1547
- # Pass arguments to `create_restore_plan` via keyword arguments. Note that at
1603
+ # @overload create_backup(parent: nil, backup: nil, backup_id: nil)
1604
+ # Pass arguments to `create_backup` via keyword arguments. Note that at
1548
1605
  # least one keyword argument is required. To specify no parameters, or to keep all
1549
1606
  # the default parameter values, pass an empty Hash as a request object (see above).
1550
1607
  #
1551
1608
  # @param parent [::String]
1552
- # Required. The location within which to create the RestorePlan.
1553
- # Format: `projects/*/locations/*`
1554
- # @param restore_plan [::Google::Cloud::GkeBackup::V1::RestorePlan, ::Hash]
1555
- # Required. The RestorePlan resource object to create.
1556
- # @param restore_plan_id [::String]
1557
- # Required. The client-provided short name for the RestorePlan resource.
1609
+ # Required. The BackupPlan within which to create the Backup.
1610
+ # Format: `projects/*/locations/*/backupPlans/*`
1611
+ # @param backup [::Google::Cloud::GkeBackup::V1::Backup, ::Hash]
1612
+ # Optional. The Backup resource to create.
1613
+ # @param backup_id [::String]
1614
+ # Optional. The client-provided short name for the Backup resource.
1558
1615
  # This name must:
1559
1616
  #
1560
1617
  # - be between 1 and 63 characters long (inclusive)
1561
1618
  # - consist of only lower-case ASCII letters, numbers, and dashes
1562
1619
  # - start with a lower-case letter
1563
1620
  # - end with a lower-case letter or number
1564
- # - be unique within the set of RestorePlans in this location
1621
+ # - be unique within the set of Backups in this BackupPlan
1565
1622
  #
1566
1623
  # @yield [response, operation] Access the result along with the RPC operation
1567
1624
  # @yieldparam response [::Gapic::Operation]
@@ -1578,10 +1635,10 @@ module Google
1578
1635
  # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new
1579
1636
  #
1580
1637
  # # Create a request. To set request fields, pass in keyword arguments.
1581
- # request = Google::Cloud::GkeBackup::V1::CreateRestorePlanRequest.new
1638
+ # request = Google::Cloud::GkeBackup::V1::CreateBackupRequest.new
1582
1639
  #
1583
- # # Call the create_restore_plan method.
1584
- # result = client.create_restore_plan request
1640
+ # # Call the create_backup method.
1641
+ # result = client.create_backup request
1585
1642
  #
1586
1643
  # # The returned object is of type Gapic::Operation. You can use it to
1587
1644
  # # check the status of an operation, cancel it, or wait for results.
@@ -1593,16 +1650,16 @@ module Google
1593
1650
  # puts "No response received."
1594
1651
  # end
1595
1652
  #
1596
- def create_restore_plan request, options = nil
1653
+ def create_backup request, options = nil
1597
1654
  raise ::ArgumentError, "request must be provided" if request.nil?
1598
1655
 
1599
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::CreateRestorePlanRequest
1656
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::CreateBackupRequest
1600
1657
 
1601
1658
  # Converts hash and nil to an options object
1602
1659
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1603
1660
 
1604
1661
  # Customize the options with defaults
1605
- metadata = @config.rpcs.create_restore_plan.metadata.to_h
1662
+ metadata = @config.rpcs.create_backup.metadata.to_h
1606
1663
 
1607
1664
  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1608
1665
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -1619,15 +1676,15 @@ module Google
1619
1676
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1620
1677
  metadata[:"x-goog-request-params"] ||= request_params_header
1621
1678
 
1622
- options.apply_defaults timeout: @config.rpcs.create_restore_plan.timeout,
1679
+ options.apply_defaults timeout: @config.rpcs.create_backup.timeout,
1623
1680
  metadata: metadata,
1624
- retry_policy: @config.rpcs.create_restore_plan.retry_policy
1681
+ retry_policy: @config.rpcs.create_backup.retry_policy
1625
1682
 
1626
1683
  options.apply_defaults timeout: @config.timeout,
1627
1684
  metadata: @config.metadata,
1628
1685
  retry_policy: @config.retry_policy
1629
1686
 
1630
- @backup_for_gke_stub.call_rpc :create_restore_plan, request, options: options do |response, operation|
1687
+ @backup_for_gke_stub.call_rpc :create_backup, request, options: options do |response, operation|
1631
1688
  response = ::Gapic::Operation.new response, @operations_client, options: options
1632
1689
  yield response, operation if block_given?
1633
1690
  throw :response, response
@@ -1637,50 +1694,1458 @@ module Google
1637
1694
  end
1638
1695
 
1639
1696
  ##
1640
- # Lists RestorePlans in a given location.
1697
+ # Lists the Backups for a given BackupPlan.
1641
1698
  #
1642
- # @overload list_restore_plans(request, options = nil)
1643
- # Pass arguments to `list_restore_plans` via a request object, either of type
1644
- # {::Google::Cloud::GkeBackup::V1::ListRestorePlansRequest} or an equivalent Hash.
1699
+ # @overload list_backups(request, options = nil)
1700
+ # Pass arguments to `list_backups` via a request object, either of type
1701
+ # {::Google::Cloud::GkeBackup::V1::ListBackupsRequest} or an equivalent Hash.
1645
1702
  #
1646
- # @param request [::Google::Cloud::GkeBackup::V1::ListRestorePlansRequest, ::Hash]
1703
+ # @param request [::Google::Cloud::GkeBackup::V1::ListBackupsRequest, ::Hash]
1704
+ # A request object representing the call parameters. Required. To specify no
1705
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1706
+ # @param options [::Gapic::CallOptions, ::Hash]
1707
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1708
+ #
1709
+ # @overload list_backups(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, return_partial_success: nil)
1710
+ # Pass arguments to `list_backups` via keyword arguments. Note that at
1711
+ # least one keyword argument is required. To specify no parameters, or to keep all
1712
+ # the default parameter values, pass an empty Hash as a request object (see above).
1713
+ #
1714
+ # @param parent [::String]
1715
+ # Required. The BackupPlan that contains the Backups to list.
1716
+ # Format: `projects/*/locations/*/backupPlans/*`
1717
+ # @param page_size [::Integer]
1718
+ # Optional. The target number of results to return in a single response.
1719
+ # If not specified, a default value will be chosen by the service.
1720
+ # Note that the response may include a partial list and a caller should
1721
+ # only rely on the response's
1722
+ # {::Google::Cloud::GkeBackup::V1::ListBackupsResponse#next_page_token next_page_token}
1723
+ # to determine if there are more instances left to be queried.
1724
+ # @param page_token [::String]
1725
+ # Optional. The value of
1726
+ # {::Google::Cloud::GkeBackup::V1::ListBackupsResponse#next_page_token next_page_token}
1727
+ # received from a previous `ListBackups` call.
1728
+ # Provide this to retrieve the subsequent page in a multi-page list of
1729
+ # results. When paginating, all other parameters provided to
1730
+ # `ListBackups` must match the call that provided the page token.
1731
+ # @param filter [::String]
1732
+ # Optional. Field match expression used to filter the results.
1733
+ # @param order_by [::String]
1734
+ # Optional. Field by which to sort the results.
1735
+ # @param return_partial_success [::Boolean]
1736
+ # Optional. If set to true, the response will return partial results when
1737
+ # some regions are unreachable and the unreachable field will be populated.
1738
+ #
1739
+ # @yield [response, operation] Access the result along with the RPC operation
1740
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::Backup>]
1741
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1742
+ #
1743
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::Backup>]
1744
+ #
1745
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1746
+ #
1747
+ # @example Basic example
1748
+ # require "google/cloud/gke_backup/v1"
1749
+ #
1750
+ # # Create a client object. The client can be reused for multiple calls.
1751
+ # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new
1752
+ #
1753
+ # # Create a request. To set request fields, pass in keyword arguments.
1754
+ # request = Google::Cloud::GkeBackup::V1::ListBackupsRequest.new
1755
+ #
1756
+ # # Call the list_backups method.
1757
+ # result = client.list_backups request
1758
+ #
1759
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1760
+ # # over elements, and API calls will be issued to fetch pages as needed.
1761
+ # result.each do |item|
1762
+ # # Each element is of type ::Google::Cloud::GkeBackup::V1::Backup.
1763
+ # p item
1764
+ # end
1765
+ #
1766
+ def list_backups request, options = nil
1767
+ raise ::ArgumentError, "request must be provided" if request.nil?
1768
+
1769
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::ListBackupsRequest
1770
+
1771
+ # Converts hash and nil to an options object
1772
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1773
+
1774
+ # Customize the options with defaults
1775
+ metadata = @config.rpcs.list_backups.metadata.to_h
1776
+
1777
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1778
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1779
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1780
+ gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION
1781
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1782
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1783
+
1784
+ header_params = {}
1785
+ if request.parent
1786
+ header_params["parent"] = request.parent
1787
+ end
1788
+
1789
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1790
+ metadata[:"x-goog-request-params"] ||= request_params_header
1791
+
1792
+ options.apply_defaults timeout: @config.rpcs.list_backups.timeout,
1793
+ metadata: metadata,
1794
+ retry_policy: @config.rpcs.list_backups.retry_policy
1795
+
1796
+ options.apply_defaults timeout: @config.timeout,
1797
+ metadata: @config.metadata,
1798
+ retry_policy: @config.retry_policy
1799
+
1800
+ @backup_for_gke_stub.call_rpc :list_backups, request, options: options do |response, operation|
1801
+ response = ::Gapic::PagedEnumerable.new @backup_for_gke_stub, :list_backups, request, response, operation, options
1802
+ yield response, operation if block_given?
1803
+ throw :response, response
1804
+ end
1805
+ rescue ::GRPC::BadStatus => e
1806
+ raise ::Google::Cloud::Error.from_error(e)
1807
+ end
1808
+
1809
+ ##
1810
+ # Retrieve the details of a single Backup.
1811
+ #
1812
+ # @overload get_backup(request, options = nil)
1813
+ # Pass arguments to `get_backup` via a request object, either of type
1814
+ # {::Google::Cloud::GkeBackup::V1::GetBackupRequest} or an equivalent Hash.
1815
+ #
1816
+ # @param request [::Google::Cloud::GkeBackup::V1::GetBackupRequest, ::Hash]
1817
+ # A request object representing the call parameters. Required. To specify no
1818
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1819
+ # @param options [::Gapic::CallOptions, ::Hash]
1820
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1821
+ #
1822
+ # @overload get_backup(name: nil)
1823
+ # Pass arguments to `get_backup` via keyword arguments. Note that at
1824
+ # least one keyword argument is required. To specify no parameters, or to keep all
1825
+ # the default parameter values, pass an empty Hash as a request object (see above).
1826
+ #
1827
+ # @param name [::String]
1828
+ # Required. Full name of the Backup resource.
1829
+ # Format: `projects/*/locations/*/backupPlans/*/backups/*`
1830
+ #
1831
+ # @yield [response, operation] Access the result along with the RPC operation
1832
+ # @yieldparam response [::Google::Cloud::GkeBackup::V1::Backup]
1833
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1834
+ #
1835
+ # @return [::Google::Cloud::GkeBackup::V1::Backup]
1836
+ #
1837
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1838
+ #
1839
+ # @example Basic example
1840
+ # require "google/cloud/gke_backup/v1"
1841
+ #
1842
+ # # Create a client object. The client can be reused for multiple calls.
1843
+ # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new
1844
+ #
1845
+ # # Create a request. To set request fields, pass in keyword arguments.
1846
+ # request = Google::Cloud::GkeBackup::V1::GetBackupRequest.new
1847
+ #
1848
+ # # Call the get_backup method.
1849
+ # result = client.get_backup request
1850
+ #
1851
+ # # The returned object is of type Google::Cloud::GkeBackup::V1::Backup.
1852
+ # p result
1853
+ #
1854
+ def get_backup request, options = nil
1855
+ raise ::ArgumentError, "request must be provided" if request.nil?
1856
+
1857
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::GetBackupRequest
1858
+
1859
+ # Converts hash and nil to an options object
1860
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1861
+
1862
+ # Customize the options with defaults
1863
+ metadata = @config.rpcs.get_backup.metadata.to_h
1864
+
1865
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1866
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1867
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1868
+ gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION
1869
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1870
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1871
+
1872
+ header_params = {}
1873
+ if request.name
1874
+ header_params["name"] = request.name
1875
+ end
1876
+
1877
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1878
+ metadata[:"x-goog-request-params"] ||= request_params_header
1879
+
1880
+ options.apply_defaults timeout: @config.rpcs.get_backup.timeout,
1881
+ metadata: metadata,
1882
+ retry_policy: @config.rpcs.get_backup.retry_policy
1883
+
1884
+ options.apply_defaults timeout: @config.timeout,
1885
+ metadata: @config.metadata,
1886
+ retry_policy: @config.retry_policy
1887
+
1888
+ @backup_for_gke_stub.call_rpc :get_backup, request, options: options do |response, operation|
1889
+ yield response, operation if block_given?
1890
+ end
1891
+ rescue ::GRPC::BadStatus => e
1892
+ raise ::Google::Cloud::Error.from_error(e)
1893
+ end
1894
+
1895
+ ##
1896
+ # Update a Backup.
1897
+ #
1898
+ # @overload update_backup(request, options = nil)
1899
+ # Pass arguments to `update_backup` via a request object, either of type
1900
+ # {::Google::Cloud::GkeBackup::V1::UpdateBackupRequest} or an equivalent Hash.
1901
+ #
1902
+ # @param request [::Google::Cloud::GkeBackup::V1::UpdateBackupRequest, ::Hash]
1903
+ # A request object representing the call parameters. Required. To specify no
1904
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1905
+ # @param options [::Gapic::CallOptions, ::Hash]
1906
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1907
+ #
1908
+ # @overload update_backup(backup: nil, update_mask: nil)
1909
+ # Pass arguments to `update_backup` via keyword arguments. Note that at
1910
+ # least one keyword argument is required. To specify no parameters, or to keep all
1911
+ # the default parameter values, pass an empty Hash as a request object (see above).
1912
+ #
1913
+ # @param backup [::Google::Cloud::GkeBackup::V1::Backup, ::Hash]
1914
+ # Required. A new version of the Backup resource that contains updated
1915
+ # fields. This may be sparsely populated if an `update_mask` is provided.
1916
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
1917
+ # Optional. This is used to specify the fields to be overwritten in the
1918
+ # Backup targeted for update. The values for each of these
1919
+ # updated fields will be taken from the `backup_plan` provided
1920
+ # with this request. Field names are relative to the root of the resource.
1921
+ # If no `update_mask` is provided, all fields in `backup` will be
1922
+ # written to the target Backup resource.
1923
+ # Note that OUTPUT_ONLY and IMMUTABLE fields in `backup` are ignored
1924
+ # and are not used to update the target Backup.
1925
+ #
1926
+ # @yield [response, operation] Access the result along with the RPC operation
1927
+ # @yieldparam response [::Gapic::Operation]
1928
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1929
+ #
1930
+ # @return [::Gapic::Operation]
1931
+ #
1932
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1933
+ #
1934
+ # @example Basic example
1935
+ # require "google/cloud/gke_backup/v1"
1936
+ #
1937
+ # # Create a client object. The client can be reused for multiple calls.
1938
+ # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new
1939
+ #
1940
+ # # Create a request. To set request fields, pass in keyword arguments.
1941
+ # request = Google::Cloud::GkeBackup::V1::UpdateBackupRequest.new
1942
+ #
1943
+ # # Call the update_backup method.
1944
+ # result = client.update_backup request
1945
+ #
1946
+ # # The returned object is of type Gapic::Operation. You can use it to
1947
+ # # check the status of an operation, cancel it, or wait for results.
1948
+ # # Here is how to wait for a response.
1949
+ # result.wait_until_done! timeout: 60
1950
+ # if result.response?
1951
+ # p result.response
1952
+ # else
1953
+ # puts "No response received."
1954
+ # end
1955
+ #
1956
+ def update_backup request, options = nil
1957
+ raise ::ArgumentError, "request must be provided" if request.nil?
1958
+
1959
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::UpdateBackupRequest
1960
+
1961
+ # Converts hash and nil to an options object
1962
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1963
+
1964
+ # Customize the options with defaults
1965
+ metadata = @config.rpcs.update_backup.metadata.to_h
1966
+
1967
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1968
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1969
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1970
+ gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION
1971
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1972
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1973
+
1974
+ header_params = {}
1975
+ if request.backup&.name
1976
+ header_params["backup.name"] = request.backup.name
1977
+ end
1978
+
1979
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1980
+ metadata[:"x-goog-request-params"] ||= request_params_header
1981
+
1982
+ options.apply_defaults timeout: @config.rpcs.update_backup.timeout,
1983
+ metadata: metadata,
1984
+ retry_policy: @config.rpcs.update_backup.retry_policy
1985
+
1986
+ options.apply_defaults timeout: @config.timeout,
1987
+ metadata: @config.metadata,
1988
+ retry_policy: @config.retry_policy
1989
+
1990
+ @backup_for_gke_stub.call_rpc :update_backup, request, options: options do |response, operation|
1991
+ response = ::Gapic::Operation.new response, @operations_client, options: options
1992
+ yield response, operation if block_given?
1993
+ throw :response, response
1994
+ end
1995
+ rescue ::GRPC::BadStatus => e
1996
+ raise ::Google::Cloud::Error.from_error(e)
1997
+ end
1998
+
1999
+ ##
2000
+ # Deletes an existing Backup.
2001
+ #
2002
+ # @overload delete_backup(request, options = nil)
2003
+ # Pass arguments to `delete_backup` via a request object, either of type
2004
+ # {::Google::Cloud::GkeBackup::V1::DeleteBackupRequest} or an equivalent Hash.
2005
+ #
2006
+ # @param request [::Google::Cloud::GkeBackup::V1::DeleteBackupRequest, ::Hash]
2007
+ # A request object representing the call parameters. Required. To specify no
2008
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2009
+ # @param options [::Gapic::CallOptions, ::Hash]
2010
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2011
+ #
2012
+ # @overload delete_backup(name: nil, etag: nil, force: nil)
2013
+ # Pass arguments to `delete_backup` via keyword arguments. Note that at
2014
+ # least one keyword argument is required. To specify no parameters, or to keep all
2015
+ # the default parameter values, pass an empty Hash as a request object (see above).
2016
+ #
2017
+ # @param name [::String]
2018
+ # Required. Name of the Backup resource.
2019
+ # Format: `projects/*/locations/*/backupPlans/*/backups/*`
2020
+ # @param etag [::String]
2021
+ # Optional. If provided, this value must match the current value of the
2022
+ # target Backup's {::Google::Cloud::GkeBackup::V1::Backup#etag etag} field or the
2023
+ # request is rejected.
2024
+ # @param force [::Boolean]
2025
+ # Optional. If set to true, any VolumeBackups below this Backup will also be
2026
+ # deleted. Otherwise, the request will only succeed if the Backup has no
2027
+ # VolumeBackups.
2028
+ #
2029
+ # @yield [response, operation] Access the result along with the RPC operation
2030
+ # @yieldparam response [::Gapic::Operation]
2031
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2032
+ #
2033
+ # @return [::Gapic::Operation]
2034
+ #
2035
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2036
+ #
2037
+ # @example Basic example
2038
+ # require "google/cloud/gke_backup/v1"
2039
+ #
2040
+ # # Create a client object. The client can be reused for multiple calls.
2041
+ # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new
2042
+ #
2043
+ # # Create a request. To set request fields, pass in keyword arguments.
2044
+ # request = Google::Cloud::GkeBackup::V1::DeleteBackupRequest.new
2045
+ #
2046
+ # # Call the delete_backup method.
2047
+ # result = client.delete_backup request
2048
+ #
2049
+ # # The returned object is of type Gapic::Operation. You can use it to
2050
+ # # check the status of an operation, cancel it, or wait for results.
2051
+ # # Here is how to wait for a response.
2052
+ # result.wait_until_done! timeout: 60
2053
+ # if result.response?
2054
+ # p result.response
2055
+ # else
2056
+ # puts "No response received."
2057
+ # end
2058
+ #
2059
+ def delete_backup request, options = nil
2060
+ raise ::ArgumentError, "request must be provided" if request.nil?
2061
+
2062
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::DeleteBackupRequest
2063
+
2064
+ # Converts hash and nil to an options object
2065
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2066
+
2067
+ # Customize the options with defaults
2068
+ metadata = @config.rpcs.delete_backup.metadata.to_h
2069
+
2070
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2071
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2072
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2073
+ gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION
2074
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2075
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2076
+
2077
+ header_params = {}
2078
+ if request.name
2079
+ header_params["name"] = request.name
2080
+ end
2081
+
2082
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2083
+ metadata[:"x-goog-request-params"] ||= request_params_header
2084
+
2085
+ options.apply_defaults timeout: @config.rpcs.delete_backup.timeout,
2086
+ metadata: metadata,
2087
+ retry_policy: @config.rpcs.delete_backup.retry_policy
2088
+
2089
+ options.apply_defaults timeout: @config.timeout,
2090
+ metadata: @config.metadata,
2091
+ retry_policy: @config.retry_policy
2092
+
2093
+ @backup_for_gke_stub.call_rpc :delete_backup, request, options: options do |response, operation|
2094
+ response = ::Gapic::Operation.new response, @operations_client, options: options
2095
+ yield response, operation if block_given?
2096
+ throw :response, response
2097
+ end
2098
+ rescue ::GRPC::BadStatus => e
2099
+ raise ::Google::Cloud::Error.from_error(e)
2100
+ end
2101
+
2102
+ ##
2103
+ # Lists the VolumeBackups for a given Backup.
2104
+ #
2105
+ # @overload list_volume_backups(request, options = nil)
2106
+ # Pass arguments to `list_volume_backups` via a request object, either of type
2107
+ # {::Google::Cloud::GkeBackup::V1::ListVolumeBackupsRequest} or an equivalent Hash.
2108
+ #
2109
+ # @param request [::Google::Cloud::GkeBackup::V1::ListVolumeBackupsRequest, ::Hash]
2110
+ # A request object representing the call parameters. Required. To specify no
2111
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2112
+ # @param options [::Gapic::CallOptions, ::Hash]
2113
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2114
+ #
2115
+ # @overload list_volume_backups(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
2116
+ # Pass arguments to `list_volume_backups` via keyword arguments. Note that at
2117
+ # least one keyword argument is required. To specify no parameters, or to keep all
2118
+ # the default parameter values, pass an empty Hash as a request object (see above).
2119
+ #
2120
+ # @param parent [::String]
2121
+ # Required. The Backup that contains the VolumeBackups to list.
2122
+ # Format: `projects/*/locations/*/backupPlans/*/backups/*`
2123
+ # @param page_size [::Integer]
2124
+ # Optional. The target number of results to return in a single response.
2125
+ # If not specified, a default value will be chosen by the service.
2126
+ # Note that the response may include a partial list and a caller should
2127
+ # only rely on the response's
2128
+ # {::Google::Cloud::GkeBackup::V1::ListVolumeBackupsResponse#next_page_token next_page_token}
2129
+ # to determine if there are more instances left to be queried.
2130
+ # @param page_token [::String]
2131
+ # Optional. The value of
2132
+ # {::Google::Cloud::GkeBackup::V1::ListVolumeBackupsResponse#next_page_token next_page_token}
2133
+ # received from a previous `ListVolumeBackups` call.
2134
+ # Provide this to retrieve the subsequent page in a multi-page list of
2135
+ # results. When paginating, all other parameters provided to
2136
+ # `ListVolumeBackups` must match the call that provided the page token.
2137
+ # @param filter [::String]
2138
+ # Optional. Field match expression used to filter the results.
2139
+ # @param order_by [::String]
2140
+ # Optional. Field by which to sort the results.
2141
+ #
2142
+ # @yield [response, operation] Access the result along with the RPC operation
2143
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::VolumeBackup>]
2144
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2145
+ #
2146
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::VolumeBackup>]
2147
+ #
2148
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2149
+ #
2150
+ # @example Basic example
2151
+ # require "google/cloud/gke_backup/v1"
2152
+ #
2153
+ # # Create a client object. The client can be reused for multiple calls.
2154
+ # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new
2155
+ #
2156
+ # # Create a request. To set request fields, pass in keyword arguments.
2157
+ # request = Google::Cloud::GkeBackup::V1::ListVolumeBackupsRequest.new
2158
+ #
2159
+ # # Call the list_volume_backups method.
2160
+ # result = client.list_volume_backups request
2161
+ #
2162
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
2163
+ # # over elements, and API calls will be issued to fetch pages as needed.
2164
+ # result.each do |item|
2165
+ # # Each element is of type ::Google::Cloud::GkeBackup::V1::VolumeBackup.
2166
+ # p item
2167
+ # end
2168
+ #
2169
+ def list_volume_backups request, options = nil
2170
+ raise ::ArgumentError, "request must be provided" if request.nil?
2171
+
2172
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::ListVolumeBackupsRequest
2173
+
2174
+ # Converts hash and nil to an options object
2175
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2176
+
2177
+ # Customize the options with defaults
2178
+ metadata = @config.rpcs.list_volume_backups.metadata.to_h
2179
+
2180
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2181
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2182
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2183
+ gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION
2184
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2185
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2186
+
2187
+ header_params = {}
2188
+ if request.parent
2189
+ header_params["parent"] = request.parent
2190
+ end
2191
+
2192
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2193
+ metadata[:"x-goog-request-params"] ||= request_params_header
2194
+
2195
+ options.apply_defaults timeout: @config.rpcs.list_volume_backups.timeout,
2196
+ metadata: metadata,
2197
+ retry_policy: @config.rpcs.list_volume_backups.retry_policy
2198
+
2199
+ options.apply_defaults timeout: @config.timeout,
2200
+ metadata: @config.metadata,
2201
+ retry_policy: @config.retry_policy
2202
+
2203
+ @backup_for_gke_stub.call_rpc :list_volume_backups, request, options: options do |response, operation|
2204
+ response = ::Gapic::PagedEnumerable.new @backup_for_gke_stub, :list_volume_backups, request, response, operation, options
2205
+ yield response, operation if block_given?
2206
+ throw :response, response
2207
+ end
2208
+ rescue ::GRPC::BadStatus => e
2209
+ raise ::Google::Cloud::Error.from_error(e)
2210
+ end
2211
+
2212
+ ##
2213
+ # Retrieve the details of a single VolumeBackup.
2214
+ #
2215
+ # @overload get_volume_backup(request, options = nil)
2216
+ # Pass arguments to `get_volume_backup` via a request object, either of type
2217
+ # {::Google::Cloud::GkeBackup::V1::GetVolumeBackupRequest} or an equivalent Hash.
2218
+ #
2219
+ # @param request [::Google::Cloud::GkeBackup::V1::GetVolumeBackupRequest, ::Hash]
2220
+ # A request object representing the call parameters. Required. To specify no
2221
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2222
+ # @param options [::Gapic::CallOptions, ::Hash]
2223
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2224
+ #
2225
+ # @overload get_volume_backup(name: nil)
2226
+ # Pass arguments to `get_volume_backup` via keyword arguments. Note that at
2227
+ # least one keyword argument is required. To specify no parameters, or to keep all
2228
+ # the default parameter values, pass an empty Hash as a request object (see above).
2229
+ #
2230
+ # @param name [::String]
2231
+ # Required. Full name of the VolumeBackup resource.
2232
+ # Format: `projects/*/locations/*/backupPlans/*/backups/*/volumeBackups/*`
2233
+ #
2234
+ # @yield [response, operation] Access the result along with the RPC operation
2235
+ # @yieldparam response [::Google::Cloud::GkeBackup::V1::VolumeBackup]
2236
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2237
+ #
2238
+ # @return [::Google::Cloud::GkeBackup::V1::VolumeBackup]
2239
+ #
2240
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2241
+ #
2242
+ # @example Basic example
2243
+ # require "google/cloud/gke_backup/v1"
2244
+ #
2245
+ # # Create a client object. The client can be reused for multiple calls.
2246
+ # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new
2247
+ #
2248
+ # # Create a request. To set request fields, pass in keyword arguments.
2249
+ # request = Google::Cloud::GkeBackup::V1::GetVolumeBackupRequest.new
2250
+ #
2251
+ # # Call the get_volume_backup method.
2252
+ # result = client.get_volume_backup request
2253
+ #
2254
+ # # The returned object is of type Google::Cloud::GkeBackup::V1::VolumeBackup.
2255
+ # p result
2256
+ #
2257
+ def get_volume_backup request, options = nil
2258
+ raise ::ArgumentError, "request must be provided" if request.nil?
2259
+
2260
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::GetVolumeBackupRequest
2261
+
2262
+ # Converts hash and nil to an options object
2263
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2264
+
2265
+ # Customize the options with defaults
2266
+ metadata = @config.rpcs.get_volume_backup.metadata.to_h
2267
+
2268
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2269
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2270
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2271
+ gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION
2272
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2273
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2274
+
2275
+ header_params = {}
2276
+ if request.name
2277
+ header_params["name"] = request.name
2278
+ end
2279
+
2280
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2281
+ metadata[:"x-goog-request-params"] ||= request_params_header
2282
+
2283
+ options.apply_defaults timeout: @config.rpcs.get_volume_backup.timeout,
2284
+ metadata: metadata,
2285
+ retry_policy: @config.rpcs.get_volume_backup.retry_policy
2286
+
2287
+ options.apply_defaults timeout: @config.timeout,
2288
+ metadata: @config.metadata,
2289
+ retry_policy: @config.retry_policy
2290
+
2291
+ @backup_for_gke_stub.call_rpc :get_volume_backup, request, options: options do |response, operation|
2292
+ yield response, operation if block_given?
2293
+ end
2294
+ rescue ::GRPC::BadStatus => e
2295
+ raise ::Google::Cloud::Error.from_error(e)
2296
+ end
2297
+
2298
+ ##
2299
+ # Creates a new RestorePlan in a given location.
2300
+ #
2301
+ # @overload create_restore_plan(request, options = nil)
2302
+ # Pass arguments to `create_restore_plan` via a request object, either of type
2303
+ # {::Google::Cloud::GkeBackup::V1::CreateRestorePlanRequest} or an equivalent Hash.
2304
+ #
2305
+ # @param request [::Google::Cloud::GkeBackup::V1::CreateRestorePlanRequest, ::Hash]
2306
+ # A request object representing the call parameters. Required. To specify no
2307
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2308
+ # @param options [::Gapic::CallOptions, ::Hash]
2309
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2310
+ #
2311
+ # @overload create_restore_plan(parent: nil, restore_plan: nil, restore_plan_id: nil)
2312
+ # Pass arguments to `create_restore_plan` via keyword arguments. Note that at
2313
+ # least one keyword argument is required. To specify no parameters, or to keep all
2314
+ # the default parameter values, pass an empty Hash as a request object (see above).
2315
+ #
2316
+ # @param parent [::String]
2317
+ # Required. The location within which to create the RestorePlan.
2318
+ # Format: `projects/*/locations/*`
2319
+ # @param restore_plan [::Google::Cloud::GkeBackup::V1::RestorePlan, ::Hash]
2320
+ # Required. The RestorePlan resource object to create.
2321
+ # @param restore_plan_id [::String]
2322
+ # Required. The client-provided short name for the RestorePlan resource.
2323
+ # This name must:
2324
+ #
2325
+ # - be between 1 and 63 characters long (inclusive)
2326
+ # - consist of only lower-case ASCII letters, numbers, and dashes
2327
+ # - start with a lower-case letter
2328
+ # - end with a lower-case letter or number
2329
+ # - be unique within the set of RestorePlans in this location
2330
+ #
2331
+ # @yield [response, operation] Access the result along with the RPC operation
2332
+ # @yieldparam response [::Gapic::Operation]
2333
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2334
+ #
2335
+ # @return [::Gapic::Operation]
2336
+ #
2337
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2338
+ #
2339
+ # @example Basic example
2340
+ # require "google/cloud/gke_backup/v1"
2341
+ #
2342
+ # # Create a client object. The client can be reused for multiple calls.
2343
+ # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new
2344
+ #
2345
+ # # Create a request. To set request fields, pass in keyword arguments.
2346
+ # request = Google::Cloud::GkeBackup::V1::CreateRestorePlanRequest.new
2347
+ #
2348
+ # # Call the create_restore_plan method.
2349
+ # result = client.create_restore_plan request
2350
+ #
2351
+ # # The returned object is of type Gapic::Operation. You can use it to
2352
+ # # check the status of an operation, cancel it, or wait for results.
2353
+ # # Here is how to wait for a response.
2354
+ # result.wait_until_done! timeout: 60
2355
+ # if result.response?
2356
+ # p result.response
2357
+ # else
2358
+ # puts "No response received."
2359
+ # end
2360
+ #
2361
+ def create_restore_plan request, options = nil
2362
+ raise ::ArgumentError, "request must be provided" if request.nil?
2363
+
2364
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::CreateRestorePlanRequest
2365
+
2366
+ # Converts hash and nil to an options object
2367
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2368
+
2369
+ # Customize the options with defaults
2370
+ metadata = @config.rpcs.create_restore_plan.metadata.to_h
2371
+
2372
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2373
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2374
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2375
+ gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION
2376
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2377
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2378
+
2379
+ header_params = {}
2380
+ if request.parent
2381
+ header_params["parent"] = request.parent
2382
+ end
2383
+
2384
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2385
+ metadata[:"x-goog-request-params"] ||= request_params_header
2386
+
2387
+ options.apply_defaults timeout: @config.rpcs.create_restore_plan.timeout,
2388
+ metadata: metadata,
2389
+ retry_policy: @config.rpcs.create_restore_plan.retry_policy
2390
+
2391
+ options.apply_defaults timeout: @config.timeout,
2392
+ metadata: @config.metadata,
2393
+ retry_policy: @config.retry_policy
2394
+
2395
+ @backup_for_gke_stub.call_rpc :create_restore_plan, request, options: options do |response, operation|
2396
+ response = ::Gapic::Operation.new response, @operations_client, options: options
2397
+ yield response, operation if block_given?
2398
+ throw :response, response
2399
+ end
2400
+ rescue ::GRPC::BadStatus => e
2401
+ raise ::Google::Cloud::Error.from_error(e)
2402
+ end
2403
+
2404
+ ##
2405
+ # Lists RestorePlans in a given location.
2406
+ #
2407
+ # @overload list_restore_plans(request, options = nil)
2408
+ # Pass arguments to `list_restore_plans` via a request object, either of type
2409
+ # {::Google::Cloud::GkeBackup::V1::ListRestorePlansRequest} or an equivalent Hash.
2410
+ #
2411
+ # @param request [::Google::Cloud::GkeBackup::V1::ListRestorePlansRequest, ::Hash]
2412
+ # A request object representing the call parameters. Required. To specify no
2413
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2414
+ # @param options [::Gapic::CallOptions, ::Hash]
2415
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2416
+ #
2417
+ # @overload list_restore_plans(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
2418
+ # Pass arguments to `list_restore_plans` via keyword arguments. Note that at
2419
+ # least one keyword argument is required. To specify no parameters, or to keep all
2420
+ # the default parameter values, pass an empty Hash as a request object (see above).
2421
+ #
2422
+ # @param parent [::String]
2423
+ # Required. The location that contains the RestorePlans to list.
2424
+ # Format: `projects/*/locations/*`
2425
+ # @param page_size [::Integer]
2426
+ # Optional. The target number of results to return in a single response.
2427
+ # If not specified, a default value will be chosen by the service.
2428
+ # Note that the response may include a partial list and a caller should
2429
+ # only rely on the response's
2430
+ # {::Google::Cloud::GkeBackup::V1::ListRestorePlansResponse#next_page_token next_page_token}
2431
+ # to determine if there are more instances left to be queried.
2432
+ # @param page_token [::String]
2433
+ # Optional. The value of
2434
+ # {::Google::Cloud::GkeBackup::V1::ListRestorePlansResponse#next_page_token next_page_token}
2435
+ # received from a previous `ListRestorePlans` call.
2436
+ # Provide this to retrieve the subsequent page in a multi-page list of
2437
+ # results. When paginating, all other parameters provided to
2438
+ # `ListRestorePlans` must match the call that provided the page token.
2439
+ # @param filter [::String]
2440
+ # Optional. Field match expression used to filter the results.
2441
+ # @param order_by [::String]
2442
+ # Optional. Field by which to sort the results.
2443
+ #
2444
+ # @yield [response, operation] Access the result along with the RPC operation
2445
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::RestorePlan>]
2446
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2447
+ #
2448
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::RestorePlan>]
2449
+ #
2450
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2451
+ #
2452
+ # @example Basic example
2453
+ # require "google/cloud/gke_backup/v1"
2454
+ #
2455
+ # # Create a client object. The client can be reused for multiple calls.
2456
+ # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new
2457
+ #
2458
+ # # Create a request. To set request fields, pass in keyword arguments.
2459
+ # request = Google::Cloud::GkeBackup::V1::ListRestorePlansRequest.new
2460
+ #
2461
+ # # Call the list_restore_plans method.
2462
+ # result = client.list_restore_plans request
2463
+ #
2464
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
2465
+ # # over elements, and API calls will be issued to fetch pages as needed.
2466
+ # result.each do |item|
2467
+ # # Each element is of type ::Google::Cloud::GkeBackup::V1::RestorePlan.
2468
+ # p item
2469
+ # end
2470
+ #
2471
+ def list_restore_plans request, options = nil
2472
+ raise ::ArgumentError, "request must be provided" if request.nil?
2473
+
2474
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::ListRestorePlansRequest
2475
+
2476
+ # Converts hash and nil to an options object
2477
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2478
+
2479
+ # Customize the options with defaults
2480
+ metadata = @config.rpcs.list_restore_plans.metadata.to_h
2481
+
2482
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2483
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2484
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2485
+ gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION
2486
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2487
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2488
+
2489
+ header_params = {}
2490
+ if request.parent
2491
+ header_params["parent"] = request.parent
2492
+ end
2493
+
2494
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2495
+ metadata[:"x-goog-request-params"] ||= request_params_header
2496
+
2497
+ options.apply_defaults timeout: @config.rpcs.list_restore_plans.timeout,
2498
+ metadata: metadata,
2499
+ retry_policy: @config.rpcs.list_restore_plans.retry_policy
2500
+
2501
+ options.apply_defaults timeout: @config.timeout,
2502
+ metadata: @config.metadata,
2503
+ retry_policy: @config.retry_policy
2504
+
2505
+ @backup_for_gke_stub.call_rpc :list_restore_plans, request, options: options do |response, operation|
2506
+ response = ::Gapic::PagedEnumerable.new @backup_for_gke_stub, :list_restore_plans, request, response, operation, options
2507
+ yield response, operation if block_given?
2508
+ throw :response, response
2509
+ end
2510
+ rescue ::GRPC::BadStatus => e
2511
+ raise ::Google::Cloud::Error.from_error(e)
2512
+ end
2513
+
2514
+ ##
2515
+ # Retrieve the details of a single RestorePlan.
2516
+ #
2517
+ # @overload get_restore_plan(request, options = nil)
2518
+ # Pass arguments to `get_restore_plan` via a request object, either of type
2519
+ # {::Google::Cloud::GkeBackup::V1::GetRestorePlanRequest} or an equivalent Hash.
2520
+ #
2521
+ # @param request [::Google::Cloud::GkeBackup::V1::GetRestorePlanRequest, ::Hash]
2522
+ # A request object representing the call parameters. Required. To specify no
2523
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2524
+ # @param options [::Gapic::CallOptions, ::Hash]
2525
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2526
+ #
2527
+ # @overload get_restore_plan(name: nil)
2528
+ # Pass arguments to `get_restore_plan` via keyword arguments. Note that at
2529
+ # least one keyword argument is required. To specify no parameters, or to keep all
2530
+ # the default parameter values, pass an empty Hash as a request object (see above).
2531
+ #
2532
+ # @param name [::String]
2533
+ # Required. Fully qualified RestorePlan name.
2534
+ # Format: `projects/*/locations/*/restorePlans/*`
2535
+ #
2536
+ # @yield [response, operation] Access the result along with the RPC operation
2537
+ # @yieldparam response [::Google::Cloud::GkeBackup::V1::RestorePlan]
2538
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2539
+ #
2540
+ # @return [::Google::Cloud::GkeBackup::V1::RestorePlan]
2541
+ #
2542
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2543
+ #
2544
+ # @example Basic example
2545
+ # require "google/cloud/gke_backup/v1"
2546
+ #
2547
+ # # Create a client object. The client can be reused for multiple calls.
2548
+ # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new
2549
+ #
2550
+ # # Create a request. To set request fields, pass in keyword arguments.
2551
+ # request = Google::Cloud::GkeBackup::V1::GetRestorePlanRequest.new
2552
+ #
2553
+ # # Call the get_restore_plan method.
2554
+ # result = client.get_restore_plan request
2555
+ #
2556
+ # # The returned object is of type Google::Cloud::GkeBackup::V1::RestorePlan.
2557
+ # p result
2558
+ #
2559
+ def get_restore_plan request, options = nil
2560
+ raise ::ArgumentError, "request must be provided" if request.nil?
2561
+
2562
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::GetRestorePlanRequest
2563
+
2564
+ # Converts hash and nil to an options object
2565
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2566
+
2567
+ # Customize the options with defaults
2568
+ metadata = @config.rpcs.get_restore_plan.metadata.to_h
2569
+
2570
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2571
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2572
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2573
+ gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION
2574
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2575
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2576
+
2577
+ header_params = {}
2578
+ if request.name
2579
+ header_params["name"] = request.name
2580
+ end
2581
+
2582
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2583
+ metadata[:"x-goog-request-params"] ||= request_params_header
2584
+
2585
+ options.apply_defaults timeout: @config.rpcs.get_restore_plan.timeout,
2586
+ metadata: metadata,
2587
+ retry_policy: @config.rpcs.get_restore_plan.retry_policy
2588
+
2589
+ options.apply_defaults timeout: @config.timeout,
2590
+ metadata: @config.metadata,
2591
+ retry_policy: @config.retry_policy
2592
+
2593
+ @backup_for_gke_stub.call_rpc :get_restore_plan, request, options: options do |response, operation|
2594
+ yield response, operation if block_given?
2595
+ end
2596
+ rescue ::GRPC::BadStatus => e
2597
+ raise ::Google::Cloud::Error.from_error(e)
2598
+ end
2599
+
2600
+ ##
2601
+ # Update a RestorePlan.
2602
+ #
2603
+ # @overload update_restore_plan(request, options = nil)
2604
+ # Pass arguments to `update_restore_plan` via a request object, either of type
2605
+ # {::Google::Cloud::GkeBackup::V1::UpdateRestorePlanRequest} or an equivalent Hash.
2606
+ #
2607
+ # @param request [::Google::Cloud::GkeBackup::V1::UpdateRestorePlanRequest, ::Hash]
2608
+ # A request object representing the call parameters. Required. To specify no
2609
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2610
+ # @param options [::Gapic::CallOptions, ::Hash]
2611
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2612
+ #
2613
+ # @overload update_restore_plan(restore_plan: nil, update_mask: nil)
2614
+ # Pass arguments to `update_restore_plan` via keyword arguments. Note that at
2615
+ # least one keyword argument is required. To specify no parameters, or to keep all
2616
+ # the default parameter values, pass an empty Hash as a request object (see above).
2617
+ #
2618
+ # @param restore_plan [::Google::Cloud::GkeBackup::V1::RestorePlan, ::Hash]
2619
+ # Required. A new version of the RestorePlan resource that contains updated
2620
+ # fields. This may be sparsely populated if an `update_mask` is provided.
2621
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
2622
+ # Optional. This is used to specify the fields to be overwritten in the
2623
+ # RestorePlan targeted for update. The values for each of these
2624
+ # updated fields will be taken from the `restore_plan` provided
2625
+ # with this request. Field names are relative to the root of the resource.
2626
+ # If no `update_mask` is provided, all fields in `restore_plan` will be
2627
+ # written to the target RestorePlan resource.
2628
+ # Note that OUTPUT_ONLY and IMMUTABLE fields in `restore_plan` are ignored
2629
+ # and are not used to update the target RestorePlan.
2630
+ #
2631
+ # @yield [response, operation] Access the result along with the RPC operation
2632
+ # @yieldparam response [::Gapic::Operation]
2633
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2634
+ #
2635
+ # @return [::Gapic::Operation]
2636
+ #
2637
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2638
+ #
2639
+ # @example Basic example
2640
+ # require "google/cloud/gke_backup/v1"
2641
+ #
2642
+ # # Create a client object. The client can be reused for multiple calls.
2643
+ # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new
2644
+ #
2645
+ # # Create a request. To set request fields, pass in keyword arguments.
2646
+ # request = Google::Cloud::GkeBackup::V1::UpdateRestorePlanRequest.new
2647
+ #
2648
+ # # Call the update_restore_plan method.
2649
+ # result = client.update_restore_plan request
2650
+ #
2651
+ # # The returned object is of type Gapic::Operation. You can use it to
2652
+ # # check the status of an operation, cancel it, or wait for results.
2653
+ # # Here is how to wait for a response.
2654
+ # result.wait_until_done! timeout: 60
2655
+ # if result.response?
2656
+ # p result.response
2657
+ # else
2658
+ # puts "No response received."
2659
+ # end
2660
+ #
2661
+ def update_restore_plan request, options = nil
2662
+ raise ::ArgumentError, "request must be provided" if request.nil?
2663
+
2664
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::UpdateRestorePlanRequest
2665
+
2666
+ # Converts hash and nil to an options object
2667
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2668
+
2669
+ # Customize the options with defaults
2670
+ metadata = @config.rpcs.update_restore_plan.metadata.to_h
2671
+
2672
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2673
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2674
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2675
+ gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION
2676
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2677
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2678
+
2679
+ header_params = {}
2680
+ if request.restore_plan&.name
2681
+ header_params["restore_plan.name"] = request.restore_plan.name
2682
+ end
2683
+
2684
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2685
+ metadata[:"x-goog-request-params"] ||= request_params_header
2686
+
2687
+ options.apply_defaults timeout: @config.rpcs.update_restore_plan.timeout,
2688
+ metadata: metadata,
2689
+ retry_policy: @config.rpcs.update_restore_plan.retry_policy
2690
+
2691
+ options.apply_defaults timeout: @config.timeout,
2692
+ metadata: @config.metadata,
2693
+ retry_policy: @config.retry_policy
2694
+
2695
+ @backup_for_gke_stub.call_rpc :update_restore_plan, request, options: options do |response, operation|
2696
+ response = ::Gapic::Operation.new response, @operations_client, options: options
2697
+ yield response, operation if block_given?
2698
+ throw :response, response
2699
+ end
2700
+ rescue ::GRPC::BadStatus => e
2701
+ raise ::Google::Cloud::Error.from_error(e)
2702
+ end
2703
+
2704
+ ##
2705
+ # Deletes an existing RestorePlan.
2706
+ #
2707
+ # @overload delete_restore_plan(request, options = nil)
2708
+ # Pass arguments to `delete_restore_plan` via a request object, either of type
2709
+ # {::Google::Cloud::GkeBackup::V1::DeleteRestorePlanRequest} or an equivalent Hash.
2710
+ #
2711
+ # @param request [::Google::Cloud::GkeBackup::V1::DeleteRestorePlanRequest, ::Hash]
2712
+ # A request object representing the call parameters. Required. To specify no
2713
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2714
+ # @param options [::Gapic::CallOptions, ::Hash]
2715
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2716
+ #
2717
+ # @overload delete_restore_plan(name: nil, etag: nil, force: nil)
2718
+ # Pass arguments to `delete_restore_plan` via keyword arguments. Note that at
2719
+ # least one keyword argument is required. To specify no parameters, or to keep all
2720
+ # the default parameter values, pass an empty Hash as a request object (see above).
2721
+ #
2722
+ # @param name [::String]
2723
+ # Required. Fully qualified RestorePlan name.
2724
+ # Format: `projects/*/locations/*/restorePlans/*`
2725
+ # @param etag [::String]
2726
+ # Optional. If provided, this value must match the current value of the
2727
+ # target RestorePlan's {::Google::Cloud::GkeBackup::V1::RestorePlan#etag etag}
2728
+ # field or the request is rejected.
2729
+ # @param force [::Boolean]
2730
+ # Optional. If set to true, any Restores below this RestorePlan will also be
2731
+ # deleted. Otherwise, the request will only succeed if the RestorePlan has no
2732
+ # Restores.
2733
+ #
2734
+ # @yield [response, operation] Access the result along with the RPC operation
2735
+ # @yieldparam response [::Gapic::Operation]
2736
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2737
+ #
2738
+ # @return [::Gapic::Operation]
2739
+ #
2740
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2741
+ #
2742
+ # @example Basic example
2743
+ # require "google/cloud/gke_backup/v1"
2744
+ #
2745
+ # # Create a client object. The client can be reused for multiple calls.
2746
+ # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new
2747
+ #
2748
+ # # Create a request. To set request fields, pass in keyword arguments.
2749
+ # request = Google::Cloud::GkeBackup::V1::DeleteRestorePlanRequest.new
2750
+ #
2751
+ # # Call the delete_restore_plan method.
2752
+ # result = client.delete_restore_plan request
2753
+ #
2754
+ # # The returned object is of type Gapic::Operation. You can use it to
2755
+ # # check the status of an operation, cancel it, or wait for results.
2756
+ # # Here is how to wait for a response.
2757
+ # result.wait_until_done! timeout: 60
2758
+ # if result.response?
2759
+ # p result.response
2760
+ # else
2761
+ # puts "No response received."
2762
+ # end
2763
+ #
2764
+ def delete_restore_plan request, options = nil
2765
+ raise ::ArgumentError, "request must be provided" if request.nil?
2766
+
2767
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::DeleteRestorePlanRequest
2768
+
2769
+ # Converts hash and nil to an options object
2770
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2771
+
2772
+ # Customize the options with defaults
2773
+ metadata = @config.rpcs.delete_restore_plan.metadata.to_h
2774
+
2775
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2776
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2777
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2778
+ gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION
2779
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2780
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2781
+
2782
+ header_params = {}
2783
+ if request.name
2784
+ header_params["name"] = request.name
2785
+ end
2786
+
2787
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2788
+ metadata[:"x-goog-request-params"] ||= request_params_header
2789
+
2790
+ options.apply_defaults timeout: @config.rpcs.delete_restore_plan.timeout,
2791
+ metadata: metadata,
2792
+ retry_policy: @config.rpcs.delete_restore_plan.retry_policy
2793
+
2794
+ options.apply_defaults timeout: @config.timeout,
2795
+ metadata: @config.metadata,
2796
+ retry_policy: @config.retry_policy
2797
+
2798
+ @backup_for_gke_stub.call_rpc :delete_restore_plan, request, options: options do |response, operation|
2799
+ response = ::Gapic::Operation.new response, @operations_client, options: options
2800
+ yield response, operation if block_given?
2801
+ throw :response, response
2802
+ end
2803
+ rescue ::GRPC::BadStatus => e
2804
+ raise ::Google::Cloud::Error.from_error(e)
2805
+ end
2806
+
2807
+ ##
2808
+ # Creates a new RestoreChannel in a given location.
2809
+ #
2810
+ # @overload create_restore_channel(request, options = nil)
2811
+ # Pass arguments to `create_restore_channel` via a request object, either of type
2812
+ # {::Google::Cloud::GkeBackup::V1::CreateRestoreChannelRequest} or an equivalent Hash.
2813
+ #
2814
+ # @param request [::Google::Cloud::GkeBackup::V1::CreateRestoreChannelRequest, ::Hash]
2815
+ # A request object representing the call parameters. Required. To specify no
2816
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2817
+ # @param options [::Gapic::CallOptions, ::Hash]
2818
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2819
+ #
2820
+ # @overload create_restore_channel(parent: nil, restore_channel: nil, restore_channel_id: nil)
2821
+ # Pass arguments to `create_restore_channel` via keyword arguments. Note that at
2822
+ # least one keyword argument is required. To specify no parameters, or to keep all
2823
+ # the default parameter values, pass an empty Hash as a request object (see above).
2824
+ #
2825
+ # @param parent [::String]
2826
+ # Required. The location within which to create the RestoreChannel.
2827
+ # Format: `projects/*/locations/*`
2828
+ # @param restore_channel [::Google::Cloud::GkeBackup::V1::RestoreChannel, ::Hash]
2829
+ # Required. The RestoreChannel resource object to create.
2830
+ # @param restore_channel_id [::String]
2831
+ # Optional. The client-provided short name for the RestoreChannel resource.
2832
+ # This name must:
2833
+ #
2834
+ # - be between 1 and 63 characters long (inclusive)
2835
+ # - consist of only lower-case ASCII letters, numbers, and dashes
2836
+ # - start with a lower-case letter
2837
+ # - end with a lower-case letter or number
2838
+ # - be unique within the set of RestoreChannels in this location
2839
+ # If the user does not provide a name, a uuid will be used as the name.
2840
+ #
2841
+ # @yield [response, operation] Access the result along with the RPC operation
2842
+ # @yieldparam response [::Gapic::Operation]
2843
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2844
+ #
2845
+ # @return [::Gapic::Operation]
2846
+ #
2847
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2848
+ #
2849
+ # @example Basic example
2850
+ # require "google/cloud/gke_backup/v1"
2851
+ #
2852
+ # # Create a client object. The client can be reused for multiple calls.
2853
+ # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new
2854
+ #
2855
+ # # Create a request. To set request fields, pass in keyword arguments.
2856
+ # request = Google::Cloud::GkeBackup::V1::CreateRestoreChannelRequest.new
2857
+ #
2858
+ # # Call the create_restore_channel method.
2859
+ # result = client.create_restore_channel request
2860
+ #
2861
+ # # The returned object is of type Gapic::Operation. You can use it to
2862
+ # # check the status of an operation, cancel it, or wait for results.
2863
+ # # Here is how to wait for a response.
2864
+ # result.wait_until_done! timeout: 60
2865
+ # if result.response?
2866
+ # p result.response
2867
+ # else
2868
+ # puts "No response received."
2869
+ # end
2870
+ #
2871
+ def create_restore_channel request, options = nil
2872
+ raise ::ArgumentError, "request must be provided" if request.nil?
2873
+
2874
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::CreateRestoreChannelRequest
2875
+
2876
+ # Converts hash and nil to an options object
2877
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2878
+
2879
+ # Customize the options with defaults
2880
+ metadata = @config.rpcs.create_restore_channel.metadata.to_h
2881
+
2882
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2883
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2884
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2885
+ gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION
2886
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2887
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2888
+
2889
+ header_params = {}
2890
+ if request.parent
2891
+ header_params["parent"] = request.parent
2892
+ end
2893
+
2894
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2895
+ metadata[:"x-goog-request-params"] ||= request_params_header
2896
+
2897
+ options.apply_defaults timeout: @config.rpcs.create_restore_channel.timeout,
2898
+ metadata: metadata,
2899
+ retry_policy: @config.rpcs.create_restore_channel.retry_policy
2900
+
2901
+ options.apply_defaults timeout: @config.timeout,
2902
+ metadata: @config.metadata,
2903
+ retry_policy: @config.retry_policy
2904
+
2905
+ @backup_for_gke_stub.call_rpc :create_restore_channel, request, options: options do |response, operation|
2906
+ response = ::Gapic::Operation.new response, @operations_client, options: options
2907
+ yield response, operation if block_given?
2908
+ throw :response, response
2909
+ end
2910
+ rescue ::GRPC::BadStatus => e
2911
+ raise ::Google::Cloud::Error.from_error(e)
2912
+ end
2913
+
2914
+ ##
2915
+ # Lists RestoreChannels in a given location.
2916
+ #
2917
+ # @overload list_restore_channels(request, options = nil)
2918
+ # Pass arguments to `list_restore_channels` via a request object, either of type
2919
+ # {::Google::Cloud::GkeBackup::V1::ListRestoreChannelsRequest} or an equivalent Hash.
2920
+ #
2921
+ # @param request [::Google::Cloud::GkeBackup::V1::ListRestoreChannelsRequest, ::Hash]
2922
+ # A request object representing the call parameters. Required. To specify no
2923
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2924
+ # @param options [::Gapic::CallOptions, ::Hash]
2925
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2926
+ #
2927
+ # @overload list_restore_channels(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
2928
+ # Pass arguments to `list_restore_channels` via keyword arguments. Note that at
2929
+ # least one keyword argument is required. To specify no parameters, or to keep all
2930
+ # the default parameter values, pass an empty Hash as a request object (see above).
2931
+ #
2932
+ # @param parent [::String]
2933
+ # Required. The location that contains the RestoreChannels to list.
2934
+ # Format: `projects/*/locations/*`
2935
+ # @param page_size [::Integer]
2936
+ # Optional. The target number of results to return in a single response.
2937
+ # If not specified, a default value will be chosen by the service.
2938
+ # Note that the response may include a partial list and a caller should
2939
+ # only rely on the response's
2940
+ # {::Google::Cloud::GkeBackup::V1::ListRestoreChannelsResponse#next_page_token next_page_token}
2941
+ # to determine if there are more instances left to be queried.
2942
+ # @param page_token [::String]
2943
+ # Optional. The value of
2944
+ # {::Google::Cloud::GkeBackup::V1::ListRestoreChannelsResponse#next_page_token next_page_token}
2945
+ # received from a previous `ListRestoreChannels` call.
2946
+ # Provide this to retrieve the subsequent page in a multi-page list of
2947
+ # results. When paginating, all other parameters provided to
2948
+ # `ListRestoreChannels` must match the call that provided the page
2949
+ # token.
2950
+ # @param filter [::String]
2951
+ # Optional. Field match expression used to filter the results.
2952
+ # @param order_by [::String]
2953
+ # Optional. Field by which to sort the results.
2954
+ #
2955
+ # @yield [response, operation] Access the result along with the RPC operation
2956
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::RestoreChannel>]
2957
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2958
+ #
2959
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::RestoreChannel>]
2960
+ #
2961
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2962
+ #
2963
+ # @example Basic example
2964
+ # require "google/cloud/gke_backup/v1"
2965
+ #
2966
+ # # Create a client object. The client can be reused for multiple calls.
2967
+ # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new
2968
+ #
2969
+ # # Create a request. To set request fields, pass in keyword arguments.
2970
+ # request = Google::Cloud::GkeBackup::V1::ListRestoreChannelsRequest.new
2971
+ #
2972
+ # # Call the list_restore_channels method.
2973
+ # result = client.list_restore_channels request
2974
+ #
2975
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
2976
+ # # over elements, and API calls will be issued to fetch pages as needed.
2977
+ # result.each do |item|
2978
+ # # Each element is of type ::Google::Cloud::GkeBackup::V1::RestoreChannel.
2979
+ # p item
2980
+ # end
2981
+ #
2982
+ def list_restore_channels request, options = nil
2983
+ raise ::ArgumentError, "request must be provided" if request.nil?
2984
+
2985
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::ListRestoreChannelsRequest
2986
+
2987
+ # Converts hash and nil to an options object
2988
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2989
+
2990
+ # Customize the options with defaults
2991
+ metadata = @config.rpcs.list_restore_channels.metadata.to_h
2992
+
2993
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2994
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2995
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2996
+ gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION
2997
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2998
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2999
+
3000
+ header_params = {}
3001
+ if request.parent
3002
+ header_params["parent"] = request.parent
3003
+ end
3004
+
3005
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
3006
+ metadata[:"x-goog-request-params"] ||= request_params_header
3007
+
3008
+ options.apply_defaults timeout: @config.rpcs.list_restore_channels.timeout,
3009
+ metadata: metadata,
3010
+ retry_policy: @config.rpcs.list_restore_channels.retry_policy
3011
+
3012
+ options.apply_defaults timeout: @config.timeout,
3013
+ metadata: @config.metadata,
3014
+ retry_policy: @config.retry_policy
3015
+
3016
+ @backup_for_gke_stub.call_rpc :list_restore_channels, request, options: options do |response, operation|
3017
+ response = ::Gapic::PagedEnumerable.new @backup_for_gke_stub, :list_restore_channels, request, response, operation, options
3018
+ yield response, operation if block_given?
3019
+ throw :response, response
3020
+ end
3021
+ rescue ::GRPC::BadStatus => e
3022
+ raise ::Google::Cloud::Error.from_error(e)
3023
+ end
3024
+
3025
+ ##
3026
+ # Retrieve the details of a single RestoreChannel.
3027
+ #
3028
+ # @overload get_restore_channel(request, options = nil)
3029
+ # Pass arguments to `get_restore_channel` via a request object, either of type
3030
+ # {::Google::Cloud::GkeBackup::V1::GetRestoreChannelRequest} or an equivalent Hash.
3031
+ #
3032
+ # @param request [::Google::Cloud::GkeBackup::V1::GetRestoreChannelRequest, ::Hash]
3033
+ # A request object representing the call parameters. Required. To specify no
3034
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3035
+ # @param options [::Gapic::CallOptions, ::Hash]
3036
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
3037
+ #
3038
+ # @overload get_restore_channel(name: nil)
3039
+ # Pass arguments to `get_restore_channel` via keyword arguments. Note that at
3040
+ # least one keyword argument is required. To specify no parameters, or to keep all
3041
+ # the default parameter values, pass an empty Hash as a request object (see above).
3042
+ #
3043
+ # @param name [::String]
3044
+ # Required. Fully qualified RestoreChannel name.
3045
+ # Format: `projects/*/locations/*/restoreChannels/*`
3046
+ #
3047
+ # @yield [response, operation] Access the result along with the RPC operation
3048
+ # @yieldparam response [::Google::Cloud::GkeBackup::V1::RestoreChannel]
3049
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
3050
+ #
3051
+ # @return [::Google::Cloud::GkeBackup::V1::RestoreChannel]
3052
+ #
3053
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
3054
+ #
3055
+ # @example Basic example
3056
+ # require "google/cloud/gke_backup/v1"
3057
+ #
3058
+ # # Create a client object. The client can be reused for multiple calls.
3059
+ # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new
3060
+ #
3061
+ # # Create a request. To set request fields, pass in keyword arguments.
3062
+ # request = Google::Cloud::GkeBackup::V1::GetRestoreChannelRequest.new
3063
+ #
3064
+ # # Call the get_restore_channel method.
3065
+ # result = client.get_restore_channel request
3066
+ #
3067
+ # # The returned object is of type Google::Cloud::GkeBackup::V1::RestoreChannel.
3068
+ # p result
3069
+ #
3070
+ def get_restore_channel request, options = nil
3071
+ raise ::ArgumentError, "request must be provided" if request.nil?
3072
+
3073
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::GetRestoreChannelRequest
3074
+
3075
+ # Converts hash and nil to an options object
3076
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3077
+
3078
+ # Customize the options with defaults
3079
+ metadata = @config.rpcs.get_restore_channel.metadata.to_h
3080
+
3081
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3082
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3083
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3084
+ gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION
3085
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
3086
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3087
+
3088
+ header_params = {}
3089
+ if request.name
3090
+ header_params["name"] = request.name
3091
+ end
3092
+
3093
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
3094
+ metadata[:"x-goog-request-params"] ||= request_params_header
3095
+
3096
+ options.apply_defaults timeout: @config.rpcs.get_restore_channel.timeout,
3097
+ metadata: metadata,
3098
+ retry_policy: @config.rpcs.get_restore_channel.retry_policy
3099
+
3100
+ options.apply_defaults timeout: @config.timeout,
3101
+ metadata: @config.metadata,
3102
+ retry_policy: @config.retry_policy
3103
+
3104
+ @backup_for_gke_stub.call_rpc :get_restore_channel, request, options: options do |response, operation|
3105
+ yield response, operation if block_given?
3106
+ end
3107
+ rescue ::GRPC::BadStatus => e
3108
+ raise ::Google::Cloud::Error.from_error(e)
3109
+ end
3110
+
3111
+ ##
3112
+ # Update a RestoreChannel.
3113
+ #
3114
+ # @overload update_restore_channel(request, options = nil)
3115
+ # Pass arguments to `update_restore_channel` via a request object, either of type
3116
+ # {::Google::Cloud::GkeBackup::V1::UpdateRestoreChannelRequest} or an equivalent Hash.
3117
+ #
3118
+ # @param request [::Google::Cloud::GkeBackup::V1::UpdateRestoreChannelRequest, ::Hash]
1647
3119
  # A request object representing the call parameters. Required. To specify no
1648
3120
  # parameters, or to keep all the default parameter values, pass an empty Hash.
1649
3121
  # @param options [::Gapic::CallOptions, ::Hash]
1650
3122
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1651
3123
  #
1652
- # @overload list_restore_plans(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
1653
- # Pass arguments to `list_restore_plans` via keyword arguments. Note that at
3124
+ # @overload update_restore_channel(restore_channel: nil, update_mask: nil)
3125
+ # Pass arguments to `update_restore_channel` via keyword arguments. Note that at
1654
3126
  # least one keyword argument is required. To specify no parameters, or to keep all
1655
3127
  # the default parameter values, pass an empty Hash as a request object (see above).
1656
3128
  #
1657
- # @param parent [::String]
1658
- # Required. The location that contains the RestorePlans to list.
1659
- # Format: `projects/*/locations/*`
1660
- # @param page_size [::Integer]
1661
- # Optional. The target number of results to return in a single response.
1662
- # If not specified, a default value will be chosen by the service.
1663
- # Note that the response may include a partial list and a caller should
1664
- # only rely on the response's
1665
- # {::Google::Cloud::GkeBackup::V1::ListRestorePlansResponse#next_page_token next_page_token}
1666
- # to determine if there are more instances left to be queried.
1667
- # @param page_token [::String]
1668
- # Optional. The value of
1669
- # {::Google::Cloud::GkeBackup::V1::ListRestorePlansResponse#next_page_token next_page_token}
1670
- # received from a previous `ListRestorePlans` call.
1671
- # Provide this to retrieve the subsequent page in a multi-page list of
1672
- # results. When paginating, all other parameters provided to
1673
- # `ListRestorePlans` must match the call that provided the page token.
1674
- # @param filter [::String]
1675
- # Optional. Field match expression used to filter the results.
1676
- # @param order_by [::String]
1677
- # Optional. Field by which to sort the results.
3129
+ # @param restore_channel [::Google::Cloud::GkeBackup::V1::RestoreChannel, ::Hash]
3130
+ # Required. A new version of the RestoreChannel resource that contains
3131
+ # updated fields. This may be sparsely populated if an `update_mask` is
3132
+ # provided.
3133
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
3134
+ # Optional. This is used to specify the fields to be overwritten in the
3135
+ # RestoreChannel targeted for update. The values for each of these
3136
+ # updated fields will be taken from the `restore_channel` provided
3137
+ # with this request. Field names are relative to the root of the resource
3138
+ # (e.g., `description`, `destination_project_id`, etc.)
3139
+ # If no `update_mask` is provided, all fields in `restore_channel` will
3140
+ # be written to the target RestoreChannel resource. Note that
3141
+ # OUTPUT_ONLY and IMMUTABLE fields in `restore_channel` are ignored and
3142
+ # are not used to update the target RestoreChannel.
1678
3143
  #
1679
3144
  # @yield [response, operation] Access the result along with the RPC operation
1680
- # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::RestorePlan>]
3145
+ # @yieldparam response [::Gapic::Operation]
1681
3146
  # @yieldparam operation [::GRPC::ActiveCall::Operation]
1682
3147
  #
1683
- # @return [::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::RestorePlan>]
3148
+ # @return [::Gapic::Operation]
1684
3149
  #
1685
3150
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1686
3151
  #
@@ -1691,28 +3156,31 @@ module Google
1691
3156
  # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new
1692
3157
  #
1693
3158
  # # Create a request. To set request fields, pass in keyword arguments.
1694
- # request = Google::Cloud::GkeBackup::V1::ListRestorePlansRequest.new
3159
+ # request = Google::Cloud::GkeBackup::V1::UpdateRestoreChannelRequest.new
1695
3160
  #
1696
- # # Call the list_restore_plans method.
1697
- # result = client.list_restore_plans request
3161
+ # # Call the update_restore_channel method.
3162
+ # result = client.update_restore_channel request
1698
3163
  #
1699
- # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1700
- # # over elements, and API calls will be issued to fetch pages as needed.
1701
- # result.each do |item|
1702
- # # Each element is of type ::Google::Cloud::GkeBackup::V1::RestorePlan.
1703
- # p item
3164
+ # # The returned object is of type Gapic::Operation. You can use it to
3165
+ # # check the status of an operation, cancel it, or wait for results.
3166
+ # # Here is how to wait for a response.
3167
+ # result.wait_until_done! timeout: 60
3168
+ # if result.response?
3169
+ # p result.response
3170
+ # else
3171
+ # puts "No response received."
1704
3172
  # end
1705
3173
  #
1706
- def list_restore_plans request, options = nil
3174
+ def update_restore_channel request, options = nil
1707
3175
  raise ::ArgumentError, "request must be provided" if request.nil?
1708
3176
 
1709
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::ListRestorePlansRequest
3177
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::UpdateRestoreChannelRequest
1710
3178
 
1711
3179
  # Converts hash and nil to an options object
1712
3180
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1713
3181
 
1714
3182
  # Customize the options with defaults
1715
- metadata = @config.rpcs.list_restore_plans.metadata.to_h
3183
+ metadata = @config.rpcs.update_restore_channel.metadata.to_h
1716
3184
 
1717
3185
  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1718
3186
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -1722,23 +3190,23 @@ module Google
1722
3190
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1723
3191
 
1724
3192
  header_params = {}
1725
- if request.parent
1726
- header_params["parent"] = request.parent
3193
+ if request.restore_channel&.name
3194
+ header_params["restore_channel.name"] = request.restore_channel.name
1727
3195
  end
1728
3196
 
1729
3197
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1730
3198
  metadata[:"x-goog-request-params"] ||= request_params_header
1731
3199
 
1732
- options.apply_defaults timeout: @config.rpcs.list_restore_plans.timeout,
3200
+ options.apply_defaults timeout: @config.rpcs.update_restore_channel.timeout,
1733
3201
  metadata: metadata,
1734
- retry_policy: @config.rpcs.list_restore_plans.retry_policy
3202
+ retry_policy: @config.rpcs.update_restore_channel.retry_policy
1735
3203
 
1736
3204
  options.apply_defaults timeout: @config.timeout,
1737
3205
  metadata: @config.metadata,
1738
3206
  retry_policy: @config.retry_policy
1739
3207
 
1740
- @backup_for_gke_stub.call_rpc :list_restore_plans, request, options: options do |response, operation|
1741
- response = ::Gapic::PagedEnumerable.new @backup_for_gke_stub, :list_restore_plans, request, response, operation, options
3208
+ @backup_for_gke_stub.call_rpc :update_restore_channel, request, options: options do |response, operation|
3209
+ response = ::Gapic::Operation.new response, @operations_client, options: options
1742
3210
  yield response, operation if block_given?
1743
3211
  throw :response, response
1744
3212
  end
@@ -1747,32 +3215,37 @@ module Google
1747
3215
  end
1748
3216
 
1749
3217
  ##
1750
- # Retrieve the details of a single RestorePlan.
3218
+ # Deletes an existing RestoreChannel.
1751
3219
  #
1752
- # @overload get_restore_plan(request, options = nil)
1753
- # Pass arguments to `get_restore_plan` via a request object, either of type
1754
- # {::Google::Cloud::GkeBackup::V1::GetRestorePlanRequest} or an equivalent Hash.
3220
+ # @overload delete_restore_channel(request, options = nil)
3221
+ # Pass arguments to `delete_restore_channel` via a request object, either of type
3222
+ # {::Google::Cloud::GkeBackup::V1::DeleteRestoreChannelRequest} or an equivalent Hash.
1755
3223
  #
1756
- # @param request [::Google::Cloud::GkeBackup::V1::GetRestorePlanRequest, ::Hash]
3224
+ # @param request [::Google::Cloud::GkeBackup::V1::DeleteRestoreChannelRequest, ::Hash]
1757
3225
  # A request object representing the call parameters. Required. To specify no
1758
3226
  # parameters, or to keep all the default parameter values, pass an empty Hash.
1759
3227
  # @param options [::Gapic::CallOptions, ::Hash]
1760
3228
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1761
3229
  #
1762
- # @overload get_restore_plan(name: nil)
1763
- # Pass arguments to `get_restore_plan` via keyword arguments. Note that at
3230
+ # @overload delete_restore_channel(name: nil, etag: nil)
3231
+ # Pass arguments to `delete_restore_channel` via keyword arguments. Note that at
1764
3232
  # least one keyword argument is required. To specify no parameters, or to keep all
1765
3233
  # the default parameter values, pass an empty Hash as a request object (see above).
1766
3234
  #
1767
3235
  # @param name [::String]
1768
- # Required. Fully qualified RestorePlan name.
1769
- # Format: `projects/*/locations/*/restorePlans/*`
3236
+ # Required. Fully qualified RestoreChannel name.
3237
+ # Format: `projects/*/locations/*/restoreChannels/*`
3238
+ # @param etag [::String]
3239
+ # Optional. If provided, this value must match the current value of the
3240
+ # target RestoreChannel's
3241
+ # {::Google::Cloud::GkeBackup::V1::RestoreChannel#etag etag} field or the request
3242
+ # is rejected.
1770
3243
  #
1771
3244
  # @yield [response, operation] Access the result along with the RPC operation
1772
- # @yieldparam response [::Google::Cloud::GkeBackup::V1::RestorePlan]
3245
+ # @yieldparam response [::Gapic::Operation]
1773
3246
  # @yieldparam operation [::GRPC::ActiveCall::Operation]
1774
3247
  #
1775
- # @return [::Google::Cloud::GkeBackup::V1::RestorePlan]
3248
+ # @return [::Gapic::Operation]
1776
3249
  #
1777
3250
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1778
3251
  #
@@ -1783,24 +3256,31 @@ module Google
1783
3256
  # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new
1784
3257
  #
1785
3258
  # # Create a request. To set request fields, pass in keyword arguments.
1786
- # request = Google::Cloud::GkeBackup::V1::GetRestorePlanRequest.new
3259
+ # request = Google::Cloud::GkeBackup::V1::DeleteRestoreChannelRequest.new
1787
3260
  #
1788
- # # Call the get_restore_plan method.
1789
- # result = client.get_restore_plan request
3261
+ # # Call the delete_restore_channel method.
3262
+ # result = client.delete_restore_channel request
1790
3263
  #
1791
- # # The returned object is of type Google::Cloud::GkeBackup::V1::RestorePlan.
1792
- # p result
3264
+ # # The returned object is of type Gapic::Operation. You can use it to
3265
+ # # check the status of an operation, cancel it, or wait for results.
3266
+ # # Here is how to wait for a response.
3267
+ # result.wait_until_done! timeout: 60
3268
+ # if result.response?
3269
+ # p result.response
3270
+ # else
3271
+ # puts "No response received."
3272
+ # end
1793
3273
  #
1794
- def get_restore_plan request, options = nil
3274
+ def delete_restore_channel request, options = nil
1795
3275
  raise ::ArgumentError, "request must be provided" if request.nil?
1796
3276
 
1797
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::GetRestorePlanRequest
3277
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::DeleteRestoreChannelRequest
1798
3278
 
1799
3279
  # Converts hash and nil to an options object
1800
3280
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1801
3281
 
1802
3282
  # Customize the options with defaults
1803
- metadata = @config.rpcs.get_restore_plan.metadata.to_h
3283
+ metadata = @config.rpcs.delete_restore_channel.metadata.to_h
1804
3284
 
1805
3285
  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1806
3286
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -1817,57 +3297,69 @@ module Google
1817
3297
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1818
3298
  metadata[:"x-goog-request-params"] ||= request_params_header
1819
3299
 
1820
- options.apply_defaults timeout: @config.rpcs.get_restore_plan.timeout,
3300
+ options.apply_defaults timeout: @config.rpcs.delete_restore_channel.timeout,
1821
3301
  metadata: metadata,
1822
- retry_policy: @config.rpcs.get_restore_plan.retry_policy
3302
+ retry_policy: @config.rpcs.delete_restore_channel.retry_policy
1823
3303
 
1824
3304
  options.apply_defaults timeout: @config.timeout,
1825
3305
  metadata: @config.metadata,
1826
3306
  retry_policy: @config.retry_policy
1827
3307
 
1828
- @backup_for_gke_stub.call_rpc :get_restore_plan, request, options: options do |response, operation|
3308
+ @backup_for_gke_stub.call_rpc :delete_restore_channel, request, options: options do |response, operation|
3309
+ response = ::Gapic::Operation.new response, @operations_client, options: options
1829
3310
  yield response, operation if block_given?
3311
+ throw :response, response
1830
3312
  end
1831
3313
  rescue ::GRPC::BadStatus => e
1832
3314
  raise ::Google::Cloud::Error.from_error(e)
1833
3315
  end
1834
3316
 
1835
3317
  ##
1836
- # Update a RestorePlan.
3318
+ # Lists RestorePlanBindings in a given location.
1837
3319
  #
1838
- # @overload update_restore_plan(request, options = nil)
1839
- # Pass arguments to `update_restore_plan` via a request object, either of type
1840
- # {::Google::Cloud::GkeBackup::V1::UpdateRestorePlanRequest} or an equivalent Hash.
3320
+ # @overload list_restore_plan_bindings(request, options = nil)
3321
+ # Pass arguments to `list_restore_plan_bindings` via a request object, either of type
3322
+ # {::Google::Cloud::GkeBackup::V1::ListRestorePlanBindingsRequest} or an equivalent Hash.
1841
3323
  #
1842
- # @param request [::Google::Cloud::GkeBackup::V1::UpdateRestorePlanRequest, ::Hash]
3324
+ # @param request [::Google::Cloud::GkeBackup::V1::ListRestorePlanBindingsRequest, ::Hash]
1843
3325
  # A request object representing the call parameters. Required. To specify no
1844
3326
  # parameters, or to keep all the default parameter values, pass an empty Hash.
1845
3327
  # @param options [::Gapic::CallOptions, ::Hash]
1846
3328
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1847
3329
  #
1848
- # @overload update_restore_plan(restore_plan: nil, update_mask: nil)
1849
- # Pass arguments to `update_restore_plan` via keyword arguments. Note that at
3330
+ # @overload list_restore_plan_bindings(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
3331
+ # Pass arguments to `list_restore_plan_bindings` via keyword arguments. Note that at
1850
3332
  # least one keyword argument is required. To specify no parameters, or to keep all
1851
3333
  # the default parameter values, pass an empty Hash as a request object (see above).
1852
3334
  #
1853
- # @param restore_plan [::Google::Cloud::GkeBackup::V1::RestorePlan, ::Hash]
1854
- # Required. A new version of the RestorePlan resource that contains updated
1855
- # fields. This may be sparsely populated if an `update_mask` is provided.
1856
- # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
1857
- # Optional. This is used to specify the fields to be overwritten in the
1858
- # RestorePlan targeted for update. The values for each of these
1859
- # updated fields will be taken from the `restore_plan` provided
1860
- # with this request. Field names are relative to the root of the resource.
1861
- # If no `update_mask` is provided, all fields in `restore_plan` will be
1862
- # written to the target RestorePlan resource.
1863
- # Note that OUTPUT_ONLY and IMMUTABLE fields in `restore_plan` are ignored
1864
- # and are not used to update the target RestorePlan.
3335
+ # @param parent [::String]
3336
+ # Required. The RestoreChannel that contains the ListRestorePlanBindings to
3337
+ # list. Format: `projects/*/locations/*/restoreChannels/*`
3338
+ # @param page_size [::Integer]
3339
+ # Optional. The target number of results to return in a single response.
3340
+ # If not specified, a default value will be chosen by the service.
3341
+ # Note that the response may include a partial list and a caller should
3342
+ # only rely on the response's
3343
+ # {::Google::Cloud::GkeBackup::V1::ListRestorePlanBindingsResponse#next_page_token next_page_token}
3344
+ # to determine if there are more instances left to be queried.
3345
+ # @param page_token [::String]
3346
+ # Optional. The value of
3347
+ # {::Google::Cloud::GkeBackup::V1::ListRestorePlanBindingsResponse#next_page_token next_page_token}
3348
+ # received from a previous `ListRestorePlanBindings` call.
3349
+ # Provide this to retrieve the subsequent page in a multi-page list of
3350
+ # results. When paginating, all other parameters provided to
3351
+ # `ListRestorePlanBindings` must match the call that provided the page
3352
+ # token.
3353
+ # @param filter [::String]
3354
+ # Optional. Field match expression used to filter the results.
3355
+ # @param order_by [::String]
3356
+ # Optional. Field by which to sort the results.
1865
3357
  #
1866
3358
  # @yield [response, operation] Access the result along with the RPC operation
1867
- # @yieldparam response [::Gapic::Operation]
3359
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::RestorePlanBinding>]
1868
3360
  # @yieldparam operation [::GRPC::ActiveCall::Operation]
1869
3361
  #
1870
- # @return [::Gapic::Operation]
3362
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::RestorePlanBinding>]
1871
3363
  #
1872
3364
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1873
3365
  #
@@ -1878,31 +3370,28 @@ module Google
1878
3370
  # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new
1879
3371
  #
1880
3372
  # # Create a request. To set request fields, pass in keyword arguments.
1881
- # request = Google::Cloud::GkeBackup::V1::UpdateRestorePlanRequest.new
3373
+ # request = Google::Cloud::GkeBackup::V1::ListRestorePlanBindingsRequest.new
1882
3374
  #
1883
- # # Call the update_restore_plan method.
1884
- # result = client.update_restore_plan request
3375
+ # # Call the list_restore_plan_bindings method.
3376
+ # result = client.list_restore_plan_bindings request
1885
3377
  #
1886
- # # The returned object is of type Gapic::Operation. You can use it to
1887
- # # check the status of an operation, cancel it, or wait for results.
1888
- # # Here is how to wait for a response.
1889
- # result.wait_until_done! timeout: 60
1890
- # if result.response?
1891
- # p result.response
1892
- # else
1893
- # puts "No response received."
3378
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
3379
+ # # over elements, and API calls will be issued to fetch pages as needed.
3380
+ # result.each do |item|
3381
+ # # Each element is of type ::Google::Cloud::GkeBackup::V1::RestorePlanBinding.
3382
+ # p item
1894
3383
  # end
1895
3384
  #
1896
- def update_restore_plan request, options = nil
3385
+ def list_restore_plan_bindings request, options = nil
1897
3386
  raise ::ArgumentError, "request must be provided" if request.nil?
1898
3387
 
1899
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::UpdateRestorePlanRequest
3388
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::ListRestorePlanBindingsRequest
1900
3389
 
1901
3390
  # Converts hash and nil to an options object
1902
3391
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1903
3392
 
1904
3393
  # Customize the options with defaults
1905
- metadata = @config.rpcs.update_restore_plan.metadata.to_h
3394
+ metadata = @config.rpcs.list_restore_plan_bindings.metadata.to_h
1906
3395
 
1907
3396
  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1908
3397
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -1912,23 +3401,23 @@ module Google
1912
3401
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1913
3402
 
1914
3403
  header_params = {}
1915
- if request.restore_plan&.name
1916
- header_params["restore_plan.name"] = request.restore_plan.name
3404
+ if request.parent
3405
+ header_params["parent"] = request.parent
1917
3406
  end
1918
3407
 
1919
3408
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1920
3409
  metadata[:"x-goog-request-params"] ||= request_params_header
1921
3410
 
1922
- options.apply_defaults timeout: @config.rpcs.update_restore_plan.timeout,
3411
+ options.apply_defaults timeout: @config.rpcs.list_restore_plan_bindings.timeout,
1923
3412
  metadata: metadata,
1924
- retry_policy: @config.rpcs.update_restore_plan.retry_policy
3413
+ retry_policy: @config.rpcs.list_restore_plan_bindings.retry_policy
1925
3414
 
1926
3415
  options.apply_defaults timeout: @config.timeout,
1927
3416
  metadata: @config.metadata,
1928
3417
  retry_policy: @config.retry_policy
1929
3418
 
1930
- @backup_for_gke_stub.call_rpc :update_restore_plan, request, options: options do |response, operation|
1931
- response = ::Gapic::Operation.new response, @operations_client, options: options
3419
+ @backup_for_gke_stub.call_rpc :list_restore_plan_bindings, request, options: options do |response, operation|
3420
+ response = ::Gapic::PagedEnumerable.new @backup_for_gke_stub, :list_restore_plan_bindings, request, response, operation, options
1932
3421
  yield response, operation if block_given?
1933
3422
  throw :response, response
1934
3423
  end
@@ -1937,40 +3426,33 @@ module Google
1937
3426
  end
1938
3427
 
1939
3428
  ##
1940
- # Deletes an existing RestorePlan.
3429
+ # Retrieve the details of a single RestorePlanBinding.
1941
3430
  #
1942
- # @overload delete_restore_plan(request, options = nil)
1943
- # Pass arguments to `delete_restore_plan` via a request object, either of type
1944
- # {::Google::Cloud::GkeBackup::V1::DeleteRestorePlanRequest} or an equivalent Hash.
3431
+ # @overload get_restore_plan_binding(request, options = nil)
3432
+ # Pass arguments to `get_restore_plan_binding` via a request object, either of type
3433
+ # {::Google::Cloud::GkeBackup::V1::GetRestorePlanBindingRequest} or an equivalent Hash.
1945
3434
  #
1946
- # @param request [::Google::Cloud::GkeBackup::V1::DeleteRestorePlanRequest, ::Hash]
3435
+ # @param request [::Google::Cloud::GkeBackup::V1::GetRestorePlanBindingRequest, ::Hash]
1947
3436
  # A request object representing the call parameters. Required. To specify no
1948
3437
  # parameters, or to keep all the default parameter values, pass an empty Hash.
1949
3438
  # @param options [::Gapic::CallOptions, ::Hash]
1950
3439
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1951
3440
  #
1952
- # @overload delete_restore_plan(name: nil, etag: nil, force: nil)
1953
- # Pass arguments to `delete_restore_plan` via keyword arguments. Note that at
3441
+ # @overload get_restore_plan_binding(name: nil)
3442
+ # Pass arguments to `get_restore_plan_binding` via keyword arguments. Note that at
1954
3443
  # least one keyword argument is required. To specify no parameters, or to keep all
1955
3444
  # the default parameter values, pass an empty Hash as a request object (see above).
1956
3445
  #
1957
3446
  # @param name [::String]
1958
- # Required. Fully qualified RestorePlan name.
1959
- # Format: `projects/*/locations/*/restorePlans/*`
1960
- # @param etag [::String]
1961
- # Optional. If provided, this value must match the current value of the
1962
- # target RestorePlan's {::Google::Cloud::GkeBackup::V1::RestorePlan#etag etag}
1963
- # field or the request is rejected.
1964
- # @param force [::Boolean]
1965
- # Optional. If set to true, any Restores below this RestorePlan will also be
1966
- # deleted. Otherwise, the request will only succeed if the RestorePlan has no
1967
- # Restores.
3447
+ # Required. Fully qualified RestorePlanBinding name.
3448
+ # Format:
3449
+ # `projects/*/locations/*/restoreChannels/*/restorePlanBindings/*`
1968
3450
  #
1969
3451
  # @yield [response, operation] Access the result along with the RPC operation
1970
- # @yieldparam response [::Gapic::Operation]
3452
+ # @yieldparam response [::Google::Cloud::GkeBackup::V1::RestorePlanBinding]
1971
3453
  # @yieldparam operation [::GRPC::ActiveCall::Operation]
1972
3454
  #
1973
- # @return [::Gapic::Operation]
3455
+ # @return [::Google::Cloud::GkeBackup::V1::RestorePlanBinding]
1974
3456
  #
1975
3457
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1976
3458
  #
@@ -1981,31 +3463,24 @@ module Google
1981
3463
  # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new
1982
3464
  #
1983
3465
  # # Create a request. To set request fields, pass in keyword arguments.
1984
- # request = Google::Cloud::GkeBackup::V1::DeleteRestorePlanRequest.new
3466
+ # request = Google::Cloud::GkeBackup::V1::GetRestorePlanBindingRequest.new
1985
3467
  #
1986
- # # Call the delete_restore_plan method.
1987
- # result = client.delete_restore_plan request
3468
+ # # Call the get_restore_plan_binding method.
3469
+ # result = client.get_restore_plan_binding request
1988
3470
  #
1989
- # # The returned object is of type Gapic::Operation. You can use it to
1990
- # # check the status of an operation, cancel it, or wait for results.
1991
- # # Here is how to wait for a response.
1992
- # result.wait_until_done! timeout: 60
1993
- # if result.response?
1994
- # p result.response
1995
- # else
1996
- # puts "No response received."
1997
- # end
3471
+ # # The returned object is of type Google::Cloud::GkeBackup::V1::RestorePlanBinding.
3472
+ # p result
1998
3473
  #
1999
- def delete_restore_plan request, options = nil
3474
+ def get_restore_plan_binding request, options = nil
2000
3475
  raise ::ArgumentError, "request must be provided" if request.nil?
2001
3476
 
2002
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::DeleteRestorePlanRequest
3477
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::GetRestorePlanBindingRequest
2003
3478
 
2004
3479
  # Converts hash and nil to an options object
2005
3480
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2006
3481
 
2007
3482
  # Customize the options with defaults
2008
- metadata = @config.rpcs.delete_restore_plan.metadata.to_h
3483
+ metadata = @config.rpcs.get_restore_plan_binding.metadata.to_h
2009
3484
 
2010
3485
  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2011
3486
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -2022,18 +3497,16 @@ module Google
2022
3497
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2023
3498
  metadata[:"x-goog-request-params"] ||= request_params_header
2024
3499
 
2025
- options.apply_defaults timeout: @config.rpcs.delete_restore_plan.timeout,
3500
+ options.apply_defaults timeout: @config.rpcs.get_restore_plan_binding.timeout,
2026
3501
  metadata: metadata,
2027
- retry_policy: @config.rpcs.delete_restore_plan.retry_policy
3502
+ retry_policy: @config.rpcs.get_restore_plan_binding.retry_policy
2028
3503
 
2029
3504
  options.apply_defaults timeout: @config.timeout,
2030
3505
  metadata: @config.metadata,
2031
3506
  retry_policy: @config.retry_policy
2032
3507
 
2033
- @backup_for_gke_stub.call_rpc :delete_restore_plan, request, options: options do |response, operation|
2034
- response = ::Gapic::Operation.new response, @operations_client, options: options
3508
+ @backup_for_gke_stub.call_rpc :get_restore_plan_binding, request, options: options do |response, operation|
2035
3509
  yield response, operation if block_given?
2036
- throw :response, response
2037
3510
  end
2038
3511
  rescue ::GRPC::BadStatus => e
2039
3512
  raise ::Google::Cloud::Error.from_error(e)
@@ -3023,6 +4496,41 @@ module Google
3023
4496
  #
3024
4497
  attr_reader :delete_backup_plan
3025
4498
  ##
4499
+ # RPC-specific configuration for `create_backup_channel`
4500
+ # @return [::Gapic::Config::Method]
4501
+ #
4502
+ attr_reader :create_backup_channel
4503
+ ##
4504
+ # RPC-specific configuration for `list_backup_channels`
4505
+ # @return [::Gapic::Config::Method]
4506
+ #
4507
+ attr_reader :list_backup_channels
4508
+ ##
4509
+ # RPC-specific configuration for `get_backup_channel`
4510
+ # @return [::Gapic::Config::Method]
4511
+ #
4512
+ attr_reader :get_backup_channel
4513
+ ##
4514
+ # RPC-specific configuration for `update_backup_channel`
4515
+ # @return [::Gapic::Config::Method]
4516
+ #
4517
+ attr_reader :update_backup_channel
4518
+ ##
4519
+ # RPC-specific configuration for `delete_backup_channel`
4520
+ # @return [::Gapic::Config::Method]
4521
+ #
4522
+ attr_reader :delete_backup_channel
4523
+ ##
4524
+ # RPC-specific configuration for `list_backup_plan_bindings`
4525
+ # @return [::Gapic::Config::Method]
4526
+ #
4527
+ attr_reader :list_backup_plan_bindings
4528
+ ##
4529
+ # RPC-specific configuration for `get_backup_plan_binding`
4530
+ # @return [::Gapic::Config::Method]
4531
+ #
4532
+ attr_reader :get_backup_plan_binding
4533
+ ##
3026
4534
  # RPC-specific configuration for `create_backup`
3027
4535
  # @return [::Gapic::Config::Method]
3028
4536
  #
@@ -3083,6 +4591,41 @@ module Google
3083
4591
  #
3084
4592
  attr_reader :delete_restore_plan
3085
4593
  ##
4594
+ # RPC-specific configuration for `create_restore_channel`
4595
+ # @return [::Gapic::Config::Method]
4596
+ #
4597
+ attr_reader :create_restore_channel
4598
+ ##
4599
+ # RPC-specific configuration for `list_restore_channels`
4600
+ # @return [::Gapic::Config::Method]
4601
+ #
4602
+ attr_reader :list_restore_channels
4603
+ ##
4604
+ # RPC-specific configuration for `get_restore_channel`
4605
+ # @return [::Gapic::Config::Method]
4606
+ #
4607
+ attr_reader :get_restore_channel
4608
+ ##
4609
+ # RPC-specific configuration for `update_restore_channel`
4610
+ # @return [::Gapic::Config::Method]
4611
+ #
4612
+ attr_reader :update_restore_channel
4613
+ ##
4614
+ # RPC-specific configuration for `delete_restore_channel`
4615
+ # @return [::Gapic::Config::Method]
4616
+ #
4617
+ attr_reader :delete_restore_channel
4618
+ ##
4619
+ # RPC-specific configuration for `list_restore_plan_bindings`
4620
+ # @return [::Gapic::Config::Method]
4621
+ #
4622
+ attr_reader :list_restore_plan_bindings
4623
+ ##
4624
+ # RPC-specific configuration for `get_restore_plan_binding`
4625
+ # @return [::Gapic::Config::Method]
4626
+ #
4627
+ attr_reader :get_restore_plan_binding
4628
+ ##
3086
4629
  # RPC-specific configuration for `create_restore`
3087
4630
  # @return [::Gapic::Config::Method]
3088
4631
  #
@@ -3135,6 +4678,20 @@ module Google
3135
4678
  @update_backup_plan = ::Gapic::Config::Method.new update_backup_plan_config
3136
4679
  delete_backup_plan_config = parent_rpcs.delete_backup_plan if parent_rpcs.respond_to? :delete_backup_plan
3137
4680
  @delete_backup_plan = ::Gapic::Config::Method.new delete_backup_plan_config
4681
+ create_backup_channel_config = parent_rpcs.create_backup_channel if parent_rpcs.respond_to? :create_backup_channel
4682
+ @create_backup_channel = ::Gapic::Config::Method.new create_backup_channel_config
4683
+ list_backup_channels_config = parent_rpcs.list_backup_channels if parent_rpcs.respond_to? :list_backup_channels
4684
+ @list_backup_channels = ::Gapic::Config::Method.new list_backup_channels_config
4685
+ get_backup_channel_config = parent_rpcs.get_backup_channel if parent_rpcs.respond_to? :get_backup_channel
4686
+ @get_backup_channel = ::Gapic::Config::Method.new get_backup_channel_config
4687
+ update_backup_channel_config = parent_rpcs.update_backup_channel if parent_rpcs.respond_to? :update_backup_channel
4688
+ @update_backup_channel = ::Gapic::Config::Method.new update_backup_channel_config
4689
+ delete_backup_channel_config = parent_rpcs.delete_backup_channel if parent_rpcs.respond_to? :delete_backup_channel
4690
+ @delete_backup_channel = ::Gapic::Config::Method.new delete_backup_channel_config
4691
+ list_backup_plan_bindings_config = parent_rpcs.list_backup_plan_bindings if parent_rpcs.respond_to? :list_backup_plan_bindings
4692
+ @list_backup_plan_bindings = ::Gapic::Config::Method.new list_backup_plan_bindings_config
4693
+ get_backup_plan_binding_config = parent_rpcs.get_backup_plan_binding if parent_rpcs.respond_to? :get_backup_plan_binding
4694
+ @get_backup_plan_binding = ::Gapic::Config::Method.new get_backup_plan_binding_config
3138
4695
  create_backup_config = parent_rpcs.create_backup if parent_rpcs.respond_to? :create_backup
3139
4696
  @create_backup = ::Gapic::Config::Method.new create_backup_config
3140
4697
  list_backups_config = parent_rpcs.list_backups if parent_rpcs.respond_to? :list_backups
@@ -3159,6 +4716,20 @@ module Google
3159
4716
  @update_restore_plan = ::Gapic::Config::Method.new update_restore_plan_config
3160
4717
  delete_restore_plan_config = parent_rpcs.delete_restore_plan if parent_rpcs.respond_to? :delete_restore_plan
3161
4718
  @delete_restore_plan = ::Gapic::Config::Method.new delete_restore_plan_config
4719
+ create_restore_channel_config = parent_rpcs.create_restore_channel if parent_rpcs.respond_to? :create_restore_channel
4720
+ @create_restore_channel = ::Gapic::Config::Method.new create_restore_channel_config
4721
+ list_restore_channels_config = parent_rpcs.list_restore_channels if parent_rpcs.respond_to? :list_restore_channels
4722
+ @list_restore_channels = ::Gapic::Config::Method.new list_restore_channels_config
4723
+ get_restore_channel_config = parent_rpcs.get_restore_channel if parent_rpcs.respond_to? :get_restore_channel
4724
+ @get_restore_channel = ::Gapic::Config::Method.new get_restore_channel_config
4725
+ update_restore_channel_config = parent_rpcs.update_restore_channel if parent_rpcs.respond_to? :update_restore_channel
4726
+ @update_restore_channel = ::Gapic::Config::Method.new update_restore_channel_config
4727
+ delete_restore_channel_config = parent_rpcs.delete_restore_channel if parent_rpcs.respond_to? :delete_restore_channel
4728
+ @delete_restore_channel = ::Gapic::Config::Method.new delete_restore_channel_config
4729
+ list_restore_plan_bindings_config = parent_rpcs.list_restore_plan_bindings if parent_rpcs.respond_to? :list_restore_plan_bindings
4730
+ @list_restore_plan_bindings = ::Gapic::Config::Method.new list_restore_plan_bindings_config
4731
+ get_restore_plan_binding_config = parent_rpcs.get_restore_plan_binding if parent_rpcs.respond_to? :get_restore_plan_binding
4732
+ @get_restore_plan_binding = ::Gapic::Config::Method.new get_restore_plan_binding_config
3162
4733
  create_restore_config = parent_rpcs.create_restore if parent_rpcs.respond_to? :create_restore
3163
4734
  @create_restore = ::Gapic::Config::Method.new create_restore_config
3164
4735
  list_restores_config = parent_rpcs.list_restores if parent_rpcs.respond_to? :list_restores