google-cloud-run-v2 0.5.0 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (58) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -2
  3. data/lib/google/cloud/run/v2/condition_pb.rb +1 -0
  4. data/lib/google/cloud/run/v2/execution_pb.rb +3 -0
  5. data/lib/google/cloud/run/v2/executions/client.rb +8 -10
  6. data/lib/google/cloud/run/v2/executions/operations.rb +20 -14
  7. data/lib/google/cloud/run/v2/executions/rest/client.rb +533 -0
  8. data/lib/google/cloud/run/v2/executions/rest/operations.rb +935 -0
  9. data/lib/google/cloud/run/v2/executions/rest/service_stub.rb +225 -0
  10. data/lib/google/cloud/run/v2/executions/rest.rb +53 -0
  11. data/lib/google/cloud/run/v2/executions.rb +7 -1
  12. data/lib/google/cloud/run/v2/job_pb.rb +1 -0
  13. data/lib/google/cloud/run/v2/jobs/client.rb +20 -22
  14. data/lib/google/cloud/run/v2/jobs/operations.rb +20 -14
  15. data/lib/google/cloud/run/v2/jobs/rest/client.rb +998 -0
  16. data/lib/google/cloud/run/v2/jobs/rest/operations.rb +935 -0
  17. data/lib/google/cloud/run/v2/jobs/rest/service_stub.rb +584 -0
  18. data/lib/google/cloud/run/v2/jobs/rest.rb +53 -0
  19. data/lib/google/cloud/run/v2/jobs.rb +7 -1
  20. data/lib/google/cloud/run/v2/rest.rb +41 -0
  21. data/lib/google/cloud/run/v2/revision_pb.rb +2 -0
  22. data/lib/google/cloud/run/v2/revisions/client.rb +8 -10
  23. data/lib/google/cloud/run/v2/revisions/operations.rb +20 -14
  24. data/lib/google/cloud/run/v2/revisions/rest/client.rb +531 -0
  25. data/lib/google/cloud/run/v2/revisions/rest/operations.rb +935 -0
  26. data/lib/google/cloud/run/v2/revisions/rest/service_stub.rb +225 -0
  27. data/lib/google/cloud/run/v2/revisions/rest.rb +53 -0
  28. data/lib/google/cloud/run/v2/revisions.rb +7 -1
  29. data/lib/google/cloud/run/v2/services/client.rb +19 -21
  30. data/lib/google/cloud/run/v2/services/operations.rb +20 -14
  31. data/lib/google/cloud/run/v2/services/rest/client.rb +940 -0
  32. data/lib/google/cloud/run/v2/services/rest/operations.rb +935 -0
  33. data/lib/google/cloud/run/v2/services/rest/service_stub.rb +524 -0
  34. data/lib/google/cloud/run/v2/services/rest.rb +53 -0
  35. data/lib/google/cloud/run/v2/services.rb +7 -1
  36. data/lib/google/cloud/run/v2/task_pb.rb +1 -0
  37. data/lib/google/cloud/run/v2/tasks/client.rb +4 -6
  38. data/lib/google/cloud/run/v2/tasks/rest/client.rb +440 -0
  39. data/lib/google/cloud/run/v2/tasks/rest/service_stub.rb +166 -0
  40. data/lib/google/cloud/run/v2/tasks/rest.rb +52 -0
  41. data/lib/google/cloud/run/v2/tasks.rb +7 -1
  42. data/lib/google/cloud/run/v2/vendor_settings_pb.rb +6 -0
  43. data/lib/google/cloud/run/v2/version.rb +1 -1
  44. data/lib/google/cloud/run/v2.rb +7 -2
  45. data/proto_docs/google/api/client.rb +318 -0
  46. data/proto_docs/google/api/launch_stage.rb +3 -3
  47. data/proto_docs/google/cloud/run/v2/condition.rb +4 -0
  48. data/proto_docs/google/cloud/run/v2/execution.rb +30 -20
  49. data/proto_docs/google/cloud/run/v2/execution_template.rb +12 -1
  50. data/proto_docs/google/cloud/run/v2/job.rb +29 -21
  51. data/proto_docs/google/cloud/run/v2/k8s.min.rb +13 -8
  52. data/proto_docs/google/cloud/run/v2/revision.rb +19 -13
  53. data/proto_docs/google/cloud/run/v2/revision_template.rb +10 -0
  54. data/proto_docs/google/cloud/run/v2/service.rb +44 -34
  55. data/proto_docs/google/cloud/run/v2/task.rb +21 -18
  56. data/proto_docs/google/cloud/run/v2/vendor_settings.rb +12 -0
  57. data/proto_docs/google/rpc/status.rb +4 -2
  58. metadata +34 -10
@@ -0,0 +1,998 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "google/cloud/errors"
20
+ require "google/cloud/run/v2/job_pb"
21
+ require "google/cloud/run/v2/jobs/rest/service_stub"
22
+ require "google/cloud/location/rest"
23
+
24
+ module Google
25
+ module Cloud
26
+ module Run
27
+ module V2
28
+ module Jobs
29
+ module Rest
30
+ ##
31
+ # REST client for the Jobs service.
32
+ #
33
+ # Cloud Run Job Control Plane API.
34
+ #
35
+ class Client
36
+ include Paths
37
+
38
+ # @private
39
+ attr_reader :jobs_stub
40
+
41
+ ##
42
+ # Configure the Jobs Client class.
43
+ #
44
+ # See {::Google::Cloud::Run::V2::Jobs::Rest::Client::Configuration}
45
+ # for a description of the configuration fields.
46
+ #
47
+ # @example
48
+ #
49
+ # # Modify the configuration for all Jobs clients
50
+ # ::Google::Cloud::Run::V2::Jobs::Rest::Client.configure do |config|
51
+ # config.timeout = 10.0
52
+ # end
53
+ #
54
+ # @yield [config] Configure the Client client.
55
+ # @yieldparam config [Client::Configuration]
56
+ #
57
+ # @return [Client::Configuration]
58
+ #
59
+ def self.configure
60
+ @configure ||= begin
61
+ namespace = ["Google", "Cloud", "Run", "V2"]
62
+ parent_config = while namespace.any?
63
+ parent_name = namespace.join "::"
64
+ parent_const = const_get parent_name
65
+ break parent_const.configure if parent_const.respond_to? :configure
66
+ namespace.pop
67
+ end
68
+ default_config = Client::Configuration.new parent_config
69
+
70
+ default_config
71
+ end
72
+ yield @configure if block_given?
73
+ @configure
74
+ end
75
+
76
+ ##
77
+ # Configure the Jobs Client instance.
78
+ #
79
+ # The configuration is set to the derived mode, meaning that values can be changed,
80
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
81
+ # should be made on {Client.configure}.
82
+ #
83
+ # See {::Google::Cloud::Run::V2::Jobs::Rest::Client::Configuration}
84
+ # for a description of the configuration fields.
85
+ #
86
+ # @yield [config] Configure the Client client.
87
+ # @yieldparam config [Client::Configuration]
88
+ #
89
+ # @return [Client::Configuration]
90
+ #
91
+ def configure
92
+ yield @config if block_given?
93
+ @config
94
+ end
95
+
96
+ ##
97
+ # Create a new Jobs REST client object.
98
+ #
99
+ # @example
100
+ #
101
+ # # Create a client using the default configuration
102
+ # client = ::Google::Cloud::Run::V2::Jobs::Rest::Client.new
103
+ #
104
+ # # Create a client using a custom configuration
105
+ # client = ::Google::Cloud::Run::V2::Jobs::Rest::Client.new do |config|
106
+ # config.timeout = 10.0
107
+ # end
108
+ #
109
+ # @yield [config] Configure the Jobs client.
110
+ # @yieldparam config [Client::Configuration]
111
+ #
112
+ def initialize
113
+ # Create the configuration object
114
+ @config = Configuration.new Client.configure
115
+
116
+ # Yield the configuration if needed
117
+ yield @config if block_given?
118
+
119
+ # Create credentials
120
+ credentials = @config.credentials
121
+ # Use self-signed JWT if the endpoint is unchanged from default,
122
+ # but only if the default endpoint does not have a region prefix.
123
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
124
+ !@config.endpoint.split(".").first.include?("-")
125
+ credentials ||= Credentials.default scope: @config.scope,
126
+ enable_self_signed_jwt: enable_self_signed_jwt
127
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
128
+ credentials = Credentials.new credentials, scope: @config.scope
129
+ end
130
+
131
+ @quota_project_id = @config.quota_project
132
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
133
+
134
+ @operations_client = ::Google::Cloud::Run::V2::Jobs::Rest::Operations.new do |config|
135
+ config.credentials = credentials
136
+ config.quota_project = @quota_project_id
137
+ config.endpoint = @config.endpoint
138
+ end
139
+
140
+ @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
141
+ config.credentials = credentials
142
+ config.quota_project = @quota_project_id
143
+ config.endpoint = @config.endpoint
144
+ end
145
+
146
+ @jobs_stub = ::Google::Cloud::Run::V2::Jobs::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
147
+ end
148
+
149
+ ##
150
+ # Get the associated client for long-running operations.
151
+ #
152
+ # @return [::Google::Cloud::Run::V2::Jobs::Rest::Operations]
153
+ #
154
+ attr_reader :operations_client
155
+
156
+ ##
157
+ # Get the associated client for mix-in of the Locations.
158
+ #
159
+ # @return [Google::Cloud::Location::Locations::Rest::Client]
160
+ #
161
+ attr_reader :location_client
162
+
163
+ # Service calls
164
+
165
+ ##
166
+ # Creates a Job.
167
+ #
168
+ # @overload create_job(request, options = nil)
169
+ # Pass arguments to `create_job` via a request object, either of type
170
+ # {::Google::Cloud::Run::V2::CreateJobRequest} or an equivalent Hash.
171
+ #
172
+ # @param request [::Google::Cloud::Run::V2::CreateJobRequest, ::Hash]
173
+ # A request object representing the call parameters. Required. To specify no
174
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
175
+ # @param options [::Gapic::CallOptions, ::Hash]
176
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
177
+ #
178
+ # @overload create_job(parent: nil, job: nil, job_id: nil, validate_only: nil)
179
+ # Pass arguments to `create_job` via keyword arguments. Note that at
180
+ # least one keyword argument is required. To specify no parameters, or to keep all
181
+ # the default parameter values, pass an empty Hash as a request object (see above).
182
+ #
183
+ # @param parent [::String]
184
+ # Required. The location and project in which this Job should be created.
185
+ # Format: projects/\\{project}/locations/\\{location}, where \\{project} can be
186
+ # project id or number.
187
+ # @param job [::Google::Cloud::Run::V2::Job, ::Hash]
188
+ # Required. The Job instance to create.
189
+ # @param job_id [::String]
190
+ # Required. The unique identifier for the Job. The name of the job becomes
191
+ # \\{parent}/jobs/\\{job_id}.
192
+ # @param validate_only [::Boolean]
193
+ # Indicates that the request should be validated and default values
194
+ # populated, without persisting the request or creating any resources.
195
+ # @yield [result, operation] Access the result along with the TransportOperation object
196
+ # @yieldparam result [::Gapic::Operation]
197
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
198
+ #
199
+ # @return [::Gapic::Operation]
200
+ #
201
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
202
+ def create_job request, options = nil
203
+ raise ::ArgumentError, "request must be provided" if request.nil?
204
+
205
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Run::V2::CreateJobRequest
206
+
207
+ # Converts hash and nil to an options object
208
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
209
+
210
+ # Customize the options with defaults
211
+ call_metadata = @config.rpcs.create_job.metadata.to_h
212
+
213
+ # Set x-goog-api-client and x-goog-user-project headers
214
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
215
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
216
+ gapic_version: ::Google::Cloud::Run::V2::VERSION,
217
+ transports_version_send: [:rest]
218
+
219
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
220
+
221
+ options.apply_defaults timeout: @config.rpcs.create_job.timeout,
222
+ metadata: call_metadata,
223
+ retry_policy: @config.rpcs.create_job.retry_policy
224
+
225
+ options.apply_defaults timeout: @config.timeout,
226
+ metadata: @config.metadata,
227
+ retry_policy: @config.retry_policy
228
+
229
+ @jobs_stub.create_job request, options do |result, operation|
230
+ result = ::Gapic::Operation.new result, @operations_client, options: options
231
+ yield result, operation if block_given?
232
+ return result
233
+ end
234
+ rescue ::Gapic::Rest::Error => e
235
+ raise ::Google::Cloud::Error.from_error(e)
236
+ end
237
+
238
+ ##
239
+ # Gets information about a Job.
240
+ #
241
+ # @overload get_job(request, options = nil)
242
+ # Pass arguments to `get_job` via a request object, either of type
243
+ # {::Google::Cloud::Run::V2::GetJobRequest} or an equivalent Hash.
244
+ #
245
+ # @param request [::Google::Cloud::Run::V2::GetJobRequest, ::Hash]
246
+ # A request object representing the call parameters. Required. To specify no
247
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
248
+ # @param options [::Gapic::CallOptions, ::Hash]
249
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
250
+ #
251
+ # @overload get_job(name: nil)
252
+ # Pass arguments to `get_job` via keyword arguments. Note that at
253
+ # least one keyword argument is required. To specify no parameters, or to keep all
254
+ # the default parameter values, pass an empty Hash as a request object (see above).
255
+ #
256
+ # @param name [::String]
257
+ # Required. The full name of the Job.
258
+ # Format: projects/\\{project}/locations/\\{location}/jobs/\\{job}, where \\{project}
259
+ # can be project id or number.
260
+ # @yield [result, operation] Access the result along with the TransportOperation object
261
+ # @yieldparam result [::Google::Cloud::Run::V2::Job]
262
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
263
+ #
264
+ # @return [::Google::Cloud::Run::V2::Job]
265
+ #
266
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
267
+ def get_job request, options = nil
268
+ raise ::ArgumentError, "request must be provided" if request.nil?
269
+
270
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Run::V2::GetJobRequest
271
+
272
+ # Converts hash and nil to an options object
273
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
274
+
275
+ # Customize the options with defaults
276
+ call_metadata = @config.rpcs.get_job.metadata.to_h
277
+
278
+ # Set x-goog-api-client and x-goog-user-project headers
279
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
280
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
281
+ gapic_version: ::Google::Cloud::Run::V2::VERSION,
282
+ transports_version_send: [:rest]
283
+
284
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
285
+
286
+ options.apply_defaults timeout: @config.rpcs.get_job.timeout,
287
+ metadata: call_metadata,
288
+ retry_policy: @config.rpcs.get_job.retry_policy
289
+
290
+ options.apply_defaults timeout: @config.timeout,
291
+ metadata: @config.metadata,
292
+ retry_policy: @config.retry_policy
293
+
294
+ @jobs_stub.get_job request, options do |result, operation|
295
+ yield result, operation if block_given?
296
+ return result
297
+ end
298
+ rescue ::Gapic::Rest::Error => e
299
+ raise ::Google::Cloud::Error.from_error(e)
300
+ end
301
+
302
+ ##
303
+ # Lists Jobs.
304
+ #
305
+ # @overload list_jobs(request, options = nil)
306
+ # Pass arguments to `list_jobs` via a request object, either of type
307
+ # {::Google::Cloud::Run::V2::ListJobsRequest} or an equivalent Hash.
308
+ #
309
+ # @param request [::Google::Cloud::Run::V2::ListJobsRequest, ::Hash]
310
+ # A request object representing the call parameters. Required. To specify no
311
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
312
+ # @param options [::Gapic::CallOptions, ::Hash]
313
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
314
+ #
315
+ # @overload list_jobs(parent: nil, page_size: nil, page_token: nil, show_deleted: nil)
316
+ # Pass arguments to `list_jobs` via keyword arguments. Note that at
317
+ # least one keyword argument is required. To specify no parameters, or to keep all
318
+ # the default parameter values, pass an empty Hash as a request object (see above).
319
+ #
320
+ # @param parent [::String]
321
+ # Required. The location and project to list resources on.
322
+ # Format: projects/\\{project}/locations/\\{location}, where \\{project} can be
323
+ # project id or number.
324
+ # @param page_size [::Integer]
325
+ # Maximum number of Jobs to return in this call.
326
+ # @param page_token [::String]
327
+ # A page token received from a previous call to ListJobs.
328
+ # All other parameters must match.
329
+ # @param show_deleted [::Boolean]
330
+ # If true, returns deleted (but unexpired) resources along with active ones.
331
+ # @yield [result, operation] Access the result along with the TransportOperation object
332
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Run::V2::Job>]
333
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
334
+ #
335
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Run::V2::Job>]
336
+ #
337
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
338
+ def list_jobs request, options = nil
339
+ raise ::ArgumentError, "request must be provided" if request.nil?
340
+
341
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Run::V2::ListJobsRequest
342
+
343
+ # Converts hash and nil to an options object
344
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
345
+
346
+ # Customize the options with defaults
347
+ call_metadata = @config.rpcs.list_jobs.metadata.to_h
348
+
349
+ # Set x-goog-api-client and x-goog-user-project headers
350
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
351
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
352
+ gapic_version: ::Google::Cloud::Run::V2::VERSION,
353
+ transports_version_send: [:rest]
354
+
355
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
356
+
357
+ options.apply_defaults timeout: @config.rpcs.list_jobs.timeout,
358
+ metadata: call_metadata,
359
+ retry_policy: @config.rpcs.list_jobs.retry_policy
360
+
361
+ options.apply_defaults timeout: @config.timeout,
362
+ metadata: @config.metadata,
363
+ retry_policy: @config.retry_policy
364
+
365
+ @jobs_stub.list_jobs request, options do |result, operation|
366
+ result = ::Gapic::Rest::PagedEnumerable.new @jobs_stub, :list_jobs, "jobs", request, result, options
367
+ yield result, operation if block_given?
368
+ return result
369
+ end
370
+ rescue ::Gapic::Rest::Error => e
371
+ raise ::Google::Cloud::Error.from_error(e)
372
+ end
373
+
374
+ ##
375
+ # Updates a Job.
376
+ #
377
+ # @overload update_job(request, options = nil)
378
+ # Pass arguments to `update_job` via a request object, either of type
379
+ # {::Google::Cloud::Run::V2::UpdateJobRequest} or an equivalent Hash.
380
+ #
381
+ # @param request [::Google::Cloud::Run::V2::UpdateJobRequest, ::Hash]
382
+ # A request object representing the call parameters. Required. To specify no
383
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
384
+ # @param options [::Gapic::CallOptions, ::Hash]
385
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
386
+ #
387
+ # @overload update_job(job: nil, validate_only: nil, allow_missing: nil)
388
+ # Pass arguments to `update_job` via keyword arguments. Note that at
389
+ # least one keyword argument is required. To specify no parameters, or to keep all
390
+ # the default parameter values, pass an empty Hash as a request object (see above).
391
+ #
392
+ # @param job [::Google::Cloud::Run::V2::Job, ::Hash]
393
+ # Required. The Job to be updated.
394
+ # @param validate_only [::Boolean]
395
+ # Indicates that the request should be validated and default values
396
+ # populated, without persisting the request or updating any resources.
397
+ # @param allow_missing [::Boolean]
398
+ # If set to true, and if the Job does not exist, it will create a new
399
+ # one. Caller must have both create and update permissions for this call if
400
+ # this is set to true.
401
+ # @yield [result, operation] Access the result along with the TransportOperation object
402
+ # @yieldparam result [::Gapic::Operation]
403
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
404
+ #
405
+ # @return [::Gapic::Operation]
406
+ #
407
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
408
+ def update_job request, options = nil
409
+ raise ::ArgumentError, "request must be provided" if request.nil?
410
+
411
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Run::V2::UpdateJobRequest
412
+
413
+ # Converts hash and nil to an options object
414
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
415
+
416
+ # Customize the options with defaults
417
+ call_metadata = @config.rpcs.update_job.metadata.to_h
418
+
419
+ # Set x-goog-api-client and x-goog-user-project headers
420
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
421
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
422
+ gapic_version: ::Google::Cloud::Run::V2::VERSION,
423
+ transports_version_send: [:rest]
424
+
425
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
426
+
427
+ options.apply_defaults timeout: @config.rpcs.update_job.timeout,
428
+ metadata: call_metadata,
429
+ retry_policy: @config.rpcs.update_job.retry_policy
430
+
431
+ options.apply_defaults timeout: @config.timeout,
432
+ metadata: @config.metadata,
433
+ retry_policy: @config.retry_policy
434
+
435
+ @jobs_stub.update_job request, options do |result, operation|
436
+ result = ::Gapic::Operation.new result, @operations_client, options: options
437
+ yield result, operation if block_given?
438
+ return result
439
+ end
440
+ rescue ::Gapic::Rest::Error => e
441
+ raise ::Google::Cloud::Error.from_error(e)
442
+ end
443
+
444
+ ##
445
+ # Deletes a Job.
446
+ #
447
+ # @overload delete_job(request, options = nil)
448
+ # Pass arguments to `delete_job` via a request object, either of type
449
+ # {::Google::Cloud::Run::V2::DeleteJobRequest} or an equivalent Hash.
450
+ #
451
+ # @param request [::Google::Cloud::Run::V2::DeleteJobRequest, ::Hash]
452
+ # A request object representing the call parameters. Required. To specify no
453
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
454
+ # @param options [::Gapic::CallOptions, ::Hash]
455
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
456
+ #
457
+ # @overload delete_job(name: nil, validate_only: nil, etag: nil)
458
+ # Pass arguments to `delete_job` via keyword arguments. Note that at
459
+ # least one keyword argument is required. To specify no parameters, or to keep all
460
+ # the default parameter values, pass an empty Hash as a request object (see above).
461
+ #
462
+ # @param name [::String]
463
+ # Required. The full name of the Job.
464
+ # Format: projects/\\{project}/locations/\\{location}/jobs/\\{job}, where \\{project}
465
+ # can be project id or number.
466
+ # @param validate_only [::Boolean]
467
+ # Indicates that the request should be validated without actually
468
+ # deleting any resources.
469
+ # @param etag [::String]
470
+ # A system-generated fingerprint for this version of the
471
+ # resource. May be used to detect modification conflict during updates.
472
+ # @yield [result, operation] Access the result along with the TransportOperation object
473
+ # @yieldparam result [::Gapic::Operation]
474
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
475
+ #
476
+ # @return [::Gapic::Operation]
477
+ #
478
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
479
+ def delete_job request, options = nil
480
+ raise ::ArgumentError, "request must be provided" if request.nil?
481
+
482
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Run::V2::DeleteJobRequest
483
+
484
+ # Converts hash and nil to an options object
485
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
486
+
487
+ # Customize the options with defaults
488
+ call_metadata = @config.rpcs.delete_job.metadata.to_h
489
+
490
+ # Set x-goog-api-client and x-goog-user-project headers
491
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
492
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
493
+ gapic_version: ::Google::Cloud::Run::V2::VERSION,
494
+ transports_version_send: [:rest]
495
+
496
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
497
+
498
+ options.apply_defaults timeout: @config.rpcs.delete_job.timeout,
499
+ metadata: call_metadata,
500
+ retry_policy: @config.rpcs.delete_job.retry_policy
501
+
502
+ options.apply_defaults timeout: @config.timeout,
503
+ metadata: @config.metadata,
504
+ retry_policy: @config.retry_policy
505
+
506
+ @jobs_stub.delete_job request, options do |result, operation|
507
+ result = ::Gapic::Operation.new result, @operations_client, options: options
508
+ yield result, operation if block_given?
509
+ return result
510
+ end
511
+ rescue ::Gapic::Rest::Error => e
512
+ raise ::Google::Cloud::Error.from_error(e)
513
+ end
514
+
515
+ ##
516
+ # Triggers creation of a new Execution of this Job.
517
+ #
518
+ # @overload run_job(request, options = nil)
519
+ # Pass arguments to `run_job` via a request object, either of type
520
+ # {::Google::Cloud::Run::V2::RunJobRequest} or an equivalent Hash.
521
+ #
522
+ # @param request [::Google::Cloud::Run::V2::RunJobRequest, ::Hash]
523
+ # A request object representing the call parameters. Required. To specify no
524
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
525
+ # @param options [::Gapic::CallOptions, ::Hash]
526
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
527
+ #
528
+ # @overload run_job(name: nil, validate_only: nil, etag: nil)
529
+ # Pass arguments to `run_job` via keyword arguments. Note that at
530
+ # least one keyword argument is required. To specify no parameters, or to keep all
531
+ # the default parameter values, pass an empty Hash as a request object (see above).
532
+ #
533
+ # @param name [::String]
534
+ # Required. The full name of the Job.
535
+ # Format: projects/\\{project}/locations/\\{location}/jobs/\\{job}, where \\{project}
536
+ # can be project id or number.
537
+ # @param validate_only [::Boolean]
538
+ # Indicates that the request should be validated without actually
539
+ # deleting any resources.
540
+ # @param etag [::String]
541
+ # A system-generated fingerprint for this version of the
542
+ # resource. May be used to detect modification conflict during updates.
543
+ # @yield [result, operation] Access the result along with the TransportOperation object
544
+ # @yieldparam result [::Gapic::Operation]
545
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
546
+ #
547
+ # @return [::Gapic::Operation]
548
+ #
549
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
550
+ def run_job request, options = nil
551
+ raise ::ArgumentError, "request must be provided" if request.nil?
552
+
553
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Run::V2::RunJobRequest
554
+
555
+ # Converts hash and nil to an options object
556
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
557
+
558
+ # Customize the options with defaults
559
+ call_metadata = @config.rpcs.run_job.metadata.to_h
560
+
561
+ # Set x-goog-api-client and x-goog-user-project headers
562
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
563
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
564
+ gapic_version: ::Google::Cloud::Run::V2::VERSION,
565
+ transports_version_send: [:rest]
566
+
567
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
568
+
569
+ options.apply_defaults timeout: @config.rpcs.run_job.timeout,
570
+ metadata: call_metadata,
571
+ retry_policy: @config.rpcs.run_job.retry_policy
572
+
573
+ options.apply_defaults timeout: @config.timeout,
574
+ metadata: @config.metadata,
575
+ retry_policy: @config.retry_policy
576
+
577
+ @jobs_stub.run_job request, options do |result, operation|
578
+ result = ::Gapic::Operation.new result, @operations_client, options: options
579
+ yield result, operation if block_given?
580
+ return result
581
+ end
582
+ rescue ::Gapic::Rest::Error => e
583
+ raise ::Google::Cloud::Error.from_error(e)
584
+ end
585
+
586
+ ##
587
+ # Gets the IAM Access Control policy currently in effect for the given Job.
588
+ # This result does not include any inherited policies.
589
+ #
590
+ # @overload get_iam_policy(request, options = nil)
591
+ # Pass arguments to `get_iam_policy` via a request object, either of type
592
+ # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash.
593
+ #
594
+ # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash]
595
+ # A request object representing the call parameters. Required. To specify no
596
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
597
+ # @param options [::Gapic::CallOptions, ::Hash]
598
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
599
+ #
600
+ # @overload get_iam_policy(resource: nil, options: nil)
601
+ # Pass arguments to `get_iam_policy` via keyword arguments. Note that at
602
+ # least one keyword argument is required. To specify no parameters, or to keep all
603
+ # the default parameter values, pass an empty Hash as a request object (see above).
604
+ #
605
+ # @param resource [::String]
606
+ # REQUIRED: The resource for which the policy is being requested.
607
+ # See the operation documentation for the appropriate value for this field.
608
+ # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash]
609
+ # OPTIONAL: A `GetPolicyOptions` object for specifying options to
610
+ # `GetIamPolicy`.
611
+ # @yield [result, operation] Access the result along with the TransportOperation object
612
+ # @yieldparam result [::Google::Iam::V1::Policy]
613
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
614
+ #
615
+ # @return [::Google::Iam::V1::Policy]
616
+ #
617
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
618
+ def get_iam_policy request, options = nil
619
+ raise ::ArgumentError, "request must be provided" if request.nil?
620
+
621
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest
622
+
623
+ # Converts hash and nil to an options object
624
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
625
+
626
+ # Customize the options with defaults
627
+ call_metadata = @config.rpcs.get_iam_policy.metadata.to_h
628
+
629
+ # Set x-goog-api-client and x-goog-user-project headers
630
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
631
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
632
+ gapic_version: ::Google::Cloud::Run::V2::VERSION,
633
+ transports_version_send: [:rest]
634
+
635
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
636
+
637
+ options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout,
638
+ metadata: call_metadata,
639
+ retry_policy: @config.rpcs.get_iam_policy.retry_policy
640
+
641
+ options.apply_defaults timeout: @config.timeout,
642
+ metadata: @config.metadata,
643
+ retry_policy: @config.retry_policy
644
+
645
+ @jobs_stub.get_iam_policy request, options do |result, operation|
646
+ yield result, operation if block_given?
647
+ return result
648
+ end
649
+ rescue ::Gapic::Rest::Error => e
650
+ raise ::Google::Cloud::Error.from_error(e)
651
+ end
652
+
653
+ ##
654
+ # Sets the IAM Access control policy for the specified Job. Overwrites
655
+ # any existing policy.
656
+ #
657
+ # @overload set_iam_policy(request, options = nil)
658
+ # Pass arguments to `set_iam_policy` via a request object, either of type
659
+ # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash.
660
+ #
661
+ # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash]
662
+ # A request object representing the call parameters. Required. To specify no
663
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
664
+ # @param options [::Gapic::CallOptions, ::Hash]
665
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
666
+ #
667
+ # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil)
668
+ # Pass arguments to `set_iam_policy` via keyword arguments. Note that at
669
+ # least one keyword argument is required. To specify no parameters, or to keep all
670
+ # the default parameter values, pass an empty Hash as a request object (see above).
671
+ #
672
+ # @param resource [::String]
673
+ # REQUIRED: The resource for which the policy is being specified.
674
+ # See the operation documentation for the appropriate value for this field.
675
+ # @param policy [::Google::Iam::V1::Policy, ::Hash]
676
+ # REQUIRED: The complete policy to be applied to the `resource`. The size of
677
+ # the policy is limited to a few 10s of KB. An empty policy is a
678
+ # valid policy but certain Cloud Platform services (such as Projects)
679
+ # might reject them.
680
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
681
+ # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
682
+ # the fields in the mask will be modified. If no mask is provided, the
683
+ # following default mask is used:
684
+ #
685
+ # `paths: "bindings, etag"`
686
+ # @yield [result, operation] Access the result along with the TransportOperation object
687
+ # @yieldparam result [::Google::Iam::V1::Policy]
688
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
689
+ #
690
+ # @return [::Google::Iam::V1::Policy]
691
+ #
692
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
693
+ def set_iam_policy request, options = nil
694
+ raise ::ArgumentError, "request must be provided" if request.nil?
695
+
696
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest
697
+
698
+ # Converts hash and nil to an options object
699
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
700
+
701
+ # Customize the options with defaults
702
+ call_metadata = @config.rpcs.set_iam_policy.metadata.to_h
703
+
704
+ # Set x-goog-api-client and x-goog-user-project headers
705
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
706
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
707
+ gapic_version: ::Google::Cloud::Run::V2::VERSION,
708
+ transports_version_send: [:rest]
709
+
710
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
711
+
712
+ options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout,
713
+ metadata: call_metadata,
714
+ retry_policy: @config.rpcs.set_iam_policy.retry_policy
715
+
716
+ options.apply_defaults timeout: @config.timeout,
717
+ metadata: @config.metadata,
718
+ retry_policy: @config.retry_policy
719
+
720
+ @jobs_stub.set_iam_policy request, options do |result, operation|
721
+ yield result, operation if block_given?
722
+ return result
723
+ end
724
+ rescue ::Gapic::Rest::Error => e
725
+ raise ::Google::Cloud::Error.from_error(e)
726
+ end
727
+
728
+ ##
729
+ # Returns permissions that a caller has on the specified Project.
730
+ #
731
+ # There are no permissions required for making this API call.
732
+ #
733
+ # @overload test_iam_permissions(request, options = nil)
734
+ # Pass arguments to `test_iam_permissions` via a request object, either of type
735
+ # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash.
736
+ #
737
+ # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash]
738
+ # A request object representing the call parameters. Required. To specify no
739
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
740
+ # @param options [::Gapic::CallOptions, ::Hash]
741
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
742
+ #
743
+ # @overload test_iam_permissions(resource: nil, permissions: nil)
744
+ # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at
745
+ # least one keyword argument is required. To specify no parameters, or to keep all
746
+ # the default parameter values, pass an empty Hash as a request object (see above).
747
+ #
748
+ # @param resource [::String]
749
+ # REQUIRED: The resource for which the policy detail is being requested.
750
+ # See the operation documentation for the appropriate value for this field.
751
+ # @param permissions [::Array<::String>]
752
+ # The set of permissions to check for the `resource`. Permissions with
753
+ # wildcards (such as '*' or 'storage.*') are not allowed. For more
754
+ # information see
755
+ # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
756
+ # @yield [result, operation] Access the result along with the TransportOperation object
757
+ # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse]
758
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
759
+ #
760
+ # @return [::Google::Iam::V1::TestIamPermissionsResponse]
761
+ #
762
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
763
+ def test_iam_permissions request, options = nil
764
+ raise ::ArgumentError, "request must be provided" if request.nil?
765
+
766
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest
767
+
768
+ # Converts hash and nil to an options object
769
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
770
+
771
+ # Customize the options with defaults
772
+ call_metadata = @config.rpcs.test_iam_permissions.metadata.to_h
773
+
774
+ # Set x-goog-api-client and x-goog-user-project headers
775
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
776
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
777
+ gapic_version: ::Google::Cloud::Run::V2::VERSION,
778
+ transports_version_send: [:rest]
779
+
780
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
781
+
782
+ options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout,
783
+ metadata: call_metadata,
784
+ retry_policy: @config.rpcs.test_iam_permissions.retry_policy
785
+
786
+ options.apply_defaults timeout: @config.timeout,
787
+ metadata: @config.metadata,
788
+ retry_policy: @config.retry_policy
789
+
790
+ @jobs_stub.test_iam_permissions request, options do |result, operation|
791
+ yield result, operation if block_given?
792
+ return result
793
+ end
794
+ rescue ::Gapic::Rest::Error => e
795
+ raise ::Google::Cloud::Error.from_error(e)
796
+ end
797
+
798
+ ##
799
+ # Configuration class for the Jobs REST API.
800
+ #
801
+ # This class represents the configuration for Jobs REST,
802
+ # providing control over timeouts, retry behavior, logging, transport
803
+ # parameters, and other low-level controls. Certain parameters can also be
804
+ # applied individually to specific RPCs. See
805
+ # {::Google::Cloud::Run::V2::Jobs::Rest::Client::Configuration::Rpcs}
806
+ # for a list of RPCs that can be configured independently.
807
+ #
808
+ # Configuration can be applied globally to all clients, or to a single client
809
+ # on construction.
810
+ #
811
+ # @example
812
+ #
813
+ # # Modify the global config, setting the timeout for
814
+ # # create_job to 20 seconds,
815
+ # # and all remaining timeouts to 10 seconds.
816
+ # ::Google::Cloud::Run::V2::Jobs::Rest::Client.configure do |config|
817
+ # config.timeout = 10.0
818
+ # config.rpcs.create_job.timeout = 20.0
819
+ # end
820
+ #
821
+ # # Apply the above configuration only to a new client.
822
+ # client = ::Google::Cloud::Run::V2::Jobs::Rest::Client.new do |config|
823
+ # config.timeout = 10.0
824
+ # config.rpcs.create_job.timeout = 20.0
825
+ # end
826
+ #
827
+ # @!attribute [rw] endpoint
828
+ # The hostname or hostname:port of the service endpoint.
829
+ # Defaults to `"run.googleapis.com"`.
830
+ # @return [::String]
831
+ # @!attribute [rw] credentials
832
+ # Credentials to send with calls. You may provide any of the following types:
833
+ # * (`String`) The path to a service account key file in JSON format
834
+ # * (`Hash`) A service account key as a Hash
835
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
836
+ # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
837
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
838
+ # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
839
+ # * (`nil`) indicating no credentials
840
+ # @return [::Object]
841
+ # @!attribute [rw] scope
842
+ # The OAuth scopes
843
+ # @return [::Array<::String>]
844
+ # @!attribute [rw] lib_name
845
+ # The library name as recorded in instrumentation and logging
846
+ # @return [::String]
847
+ # @!attribute [rw] lib_version
848
+ # The library version as recorded in instrumentation and logging
849
+ # @return [::String]
850
+ # @!attribute [rw] timeout
851
+ # The call timeout in seconds.
852
+ # @return [::Numeric]
853
+ # @!attribute [rw] metadata
854
+ # Additional headers to be sent with the call.
855
+ # @return [::Hash{::Symbol=>::String}]
856
+ # @!attribute [rw] retry_policy
857
+ # The retry policy. The value is a hash with the following keys:
858
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
859
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
860
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
861
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
862
+ # trigger a retry.
863
+ # @return [::Hash]
864
+ # @!attribute [rw] quota_project
865
+ # A separate project against which to charge quota.
866
+ # @return [::String]
867
+ #
868
+ class Configuration
869
+ extend ::Gapic::Config
870
+
871
+ config_attr :endpoint, "run.googleapis.com", ::String
872
+ config_attr :credentials, nil do |value|
873
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
874
+ allowed.any? { |klass| klass === value }
875
+ end
876
+ config_attr :scope, nil, ::String, ::Array, nil
877
+ config_attr :lib_name, nil, ::String, nil
878
+ config_attr :lib_version, nil, ::String, nil
879
+ config_attr :timeout, nil, ::Numeric, nil
880
+ config_attr :metadata, nil, ::Hash, nil
881
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
882
+ config_attr :quota_project, nil, ::String, nil
883
+
884
+ # @private
885
+ def initialize parent_config = nil
886
+ @parent_config = parent_config unless parent_config.nil?
887
+
888
+ yield self if block_given?
889
+ end
890
+
891
+ ##
892
+ # Configurations for individual RPCs
893
+ # @return [Rpcs]
894
+ #
895
+ def rpcs
896
+ @rpcs ||= begin
897
+ parent_rpcs = nil
898
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
899
+ Rpcs.new parent_rpcs
900
+ end
901
+ end
902
+
903
+ ##
904
+ # Configuration RPC class for the Jobs API.
905
+ #
906
+ # Includes fields providing the configuration for each RPC in this service.
907
+ # Each configuration object is of type `Gapic::Config::Method` and includes
908
+ # the following configuration fields:
909
+ #
910
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
911
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
912
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
913
+ # include the following keys:
914
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
915
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
916
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
917
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
918
+ # trigger a retry.
919
+ #
920
+ class Rpcs
921
+ ##
922
+ # RPC-specific configuration for `create_job`
923
+ # @return [::Gapic::Config::Method]
924
+ #
925
+ attr_reader :create_job
926
+ ##
927
+ # RPC-specific configuration for `get_job`
928
+ # @return [::Gapic::Config::Method]
929
+ #
930
+ attr_reader :get_job
931
+ ##
932
+ # RPC-specific configuration for `list_jobs`
933
+ # @return [::Gapic::Config::Method]
934
+ #
935
+ attr_reader :list_jobs
936
+ ##
937
+ # RPC-specific configuration for `update_job`
938
+ # @return [::Gapic::Config::Method]
939
+ #
940
+ attr_reader :update_job
941
+ ##
942
+ # RPC-specific configuration for `delete_job`
943
+ # @return [::Gapic::Config::Method]
944
+ #
945
+ attr_reader :delete_job
946
+ ##
947
+ # RPC-specific configuration for `run_job`
948
+ # @return [::Gapic::Config::Method]
949
+ #
950
+ attr_reader :run_job
951
+ ##
952
+ # RPC-specific configuration for `get_iam_policy`
953
+ # @return [::Gapic::Config::Method]
954
+ #
955
+ attr_reader :get_iam_policy
956
+ ##
957
+ # RPC-specific configuration for `set_iam_policy`
958
+ # @return [::Gapic::Config::Method]
959
+ #
960
+ attr_reader :set_iam_policy
961
+ ##
962
+ # RPC-specific configuration for `test_iam_permissions`
963
+ # @return [::Gapic::Config::Method]
964
+ #
965
+ attr_reader :test_iam_permissions
966
+
967
+ # @private
968
+ def initialize parent_rpcs = nil
969
+ create_job_config = parent_rpcs.create_job if parent_rpcs.respond_to? :create_job
970
+ @create_job = ::Gapic::Config::Method.new create_job_config
971
+ get_job_config = parent_rpcs.get_job if parent_rpcs.respond_to? :get_job
972
+ @get_job = ::Gapic::Config::Method.new get_job_config
973
+ list_jobs_config = parent_rpcs.list_jobs if parent_rpcs.respond_to? :list_jobs
974
+ @list_jobs = ::Gapic::Config::Method.new list_jobs_config
975
+ update_job_config = parent_rpcs.update_job if parent_rpcs.respond_to? :update_job
976
+ @update_job = ::Gapic::Config::Method.new update_job_config
977
+ delete_job_config = parent_rpcs.delete_job if parent_rpcs.respond_to? :delete_job
978
+ @delete_job = ::Gapic::Config::Method.new delete_job_config
979
+ run_job_config = parent_rpcs.run_job if parent_rpcs.respond_to? :run_job
980
+ @run_job = ::Gapic::Config::Method.new run_job_config
981
+ get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy
982
+ @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config
983
+ set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy
984
+ @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config
985
+ test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions
986
+ @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config
987
+
988
+ yield self if block_given?
989
+ end
990
+ end
991
+ end
992
+ end
993
+ end
994
+ end
995
+ end
996
+ end
997
+ end
998
+ end