google-cloud-video-transcoder-v1 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,66 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # Source: google/cloud/video/transcoder/v1/services.proto for package 'Google.Cloud.Video.Transcoder.V1'
3
+ # Original file comments:
4
+ # Copyright 2021 Google LLC
5
+ #
6
+ # Licensed under the Apache License, Version 2.0 (the "License");
7
+ # you may not use this file except in compliance with the License.
8
+ # You may obtain a copy of the License at
9
+ #
10
+ # http://www.apache.org/licenses/LICENSE-2.0
11
+ #
12
+ # Unless required by applicable law or agreed to in writing, software
13
+ # distributed under the License is distributed on an "AS IS" BASIS,
14
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ # See the License for the specific language governing permissions and
16
+ # limitations under the License.
17
+ #
18
+
19
+ require 'grpc'
20
+ require 'google/cloud/video/transcoder/v1/services_pb'
21
+
22
+ module Google
23
+ module Cloud
24
+ module Video
25
+ module Transcoder
26
+ module V1
27
+ module TranscoderService
28
+ # Using the Transcoder API, you can queue asynchronous jobs for transcoding
29
+ # media into various output formats. Output formats may include different
30
+ # streaming standards such as HTTP Live Streaming (HLS) and Dynamic Adaptive
31
+ # Streaming over HTTP (DASH). You can also customize jobs using advanced
32
+ # features such as Digital Rights Management (DRM), audio equalization, content
33
+ # concatenation, and digital ad-stitch ready content generation.
34
+ class Service
35
+
36
+ include GRPC::GenericService
37
+
38
+ self.marshal_class_method = :encode
39
+ self.unmarshal_class_method = :decode
40
+ self.service_name = 'google.cloud.video.transcoder.v1.TranscoderService'
41
+
42
+ # Creates a job in the specified region.
43
+ rpc :CreateJob, ::Google::Cloud::Video::Transcoder::V1::CreateJobRequest, ::Google::Cloud::Video::Transcoder::V1::Job
44
+ # Lists jobs in the specified region.
45
+ rpc :ListJobs, ::Google::Cloud::Video::Transcoder::V1::ListJobsRequest, ::Google::Cloud::Video::Transcoder::V1::ListJobsResponse
46
+ # Returns the job data.
47
+ rpc :GetJob, ::Google::Cloud::Video::Transcoder::V1::GetJobRequest, ::Google::Cloud::Video::Transcoder::V1::Job
48
+ # Deletes a job.
49
+ rpc :DeleteJob, ::Google::Cloud::Video::Transcoder::V1::DeleteJobRequest, ::Google::Protobuf::Empty
50
+ # Creates a job template in the specified region.
51
+ rpc :CreateJobTemplate, ::Google::Cloud::Video::Transcoder::V1::CreateJobTemplateRequest, ::Google::Cloud::Video::Transcoder::V1::JobTemplate
52
+ # Lists job templates in the specified region.
53
+ rpc :ListJobTemplates, ::Google::Cloud::Video::Transcoder::V1::ListJobTemplatesRequest, ::Google::Cloud::Video::Transcoder::V1::ListJobTemplatesResponse
54
+ # Returns the job template data.
55
+ rpc :GetJobTemplate, ::Google::Cloud::Video::Transcoder::V1::GetJobTemplateRequest, ::Google::Cloud::Video::Transcoder::V1::JobTemplate
56
+ # Deletes a job template.
57
+ rpc :DeleteJobTemplate, ::Google::Cloud::Video::Transcoder::V1::DeleteJobTemplateRequest, ::Google::Protobuf::Empty
58
+ end
59
+
60
+ Stub = Service.rpc_stub_class
61
+ end
62
+ end
63
+ end
64
+ end
65
+ end
66
+ end
@@ -0,0 +1,56 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2021 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 "gapic/common"
20
+ require "gapic/config"
21
+ require "gapic/config/method"
22
+
23
+ require "google/cloud/video/transcoder/v1/version"
24
+
25
+ require "google/cloud/video/transcoder/v1/transcoder_service/credentials"
26
+ require "google/cloud/video/transcoder/v1/transcoder_service/paths"
27
+ require "google/cloud/video/transcoder/v1/transcoder_service/client"
28
+
29
+ module Google
30
+ module Cloud
31
+ module Video
32
+ module Transcoder
33
+ module V1
34
+ ##
35
+ # Using the Transcoder API, you can queue asynchronous jobs for transcoding
36
+ # media into various output formats. Output formats may include different
37
+ # streaming standards such as HTTP Live Streaming (HLS) and Dynamic Adaptive
38
+ # Streaming over HTTP (DASH). You can also customize jobs using advanced
39
+ # features such as Digital Rights Management (DRM), audio equalization, content
40
+ # concatenation, and digital ad-stitch ready content generation.
41
+ #
42
+ # To load this service and instantiate a client:
43
+ #
44
+ # require "google/cloud/video/transcoder/v1/transcoder_service"
45
+ # client = ::Google::Cloud::Video::Transcoder::V1::TranscoderService::Client.new
46
+ #
47
+ module TranscoderService
48
+ end
49
+ end
50
+ end
51
+ end
52
+ end
53
+ end
54
+
55
+ helper_path = ::File.join __dir__, "transcoder_service", "helpers.rb"
56
+ require "google/cloud/video/transcoder/v1/transcoder_service/helpers" if ::File.file? helper_path
@@ -0,0 +1,965 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2021 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/video/transcoder/v1/services_pb"
21
+
22
+ module Google
23
+ module Cloud
24
+ module Video
25
+ module Transcoder
26
+ module V1
27
+ module TranscoderService
28
+ ##
29
+ # Client for the TranscoderService service.
30
+ #
31
+ # Using the Transcoder API, you can queue asynchronous jobs for transcoding
32
+ # media into various output formats. Output formats may include different
33
+ # streaming standards such as HTTP Live Streaming (HLS) and Dynamic Adaptive
34
+ # Streaming over HTTP (DASH). You can also customize jobs using advanced
35
+ # features such as Digital Rights Management (DRM), audio equalization, content
36
+ # concatenation, and digital ad-stitch ready content generation.
37
+ #
38
+ class Client
39
+ include Paths
40
+
41
+ # @private
42
+ attr_reader :transcoder_service_stub
43
+
44
+ ##
45
+ # Configure the TranscoderService Client class.
46
+ #
47
+ # See {::Google::Cloud::Video::Transcoder::V1::TranscoderService::Client::Configuration}
48
+ # for a description of the configuration fields.
49
+ #
50
+ # @example
51
+ #
52
+ # # Modify the configuration for all TranscoderService clients
53
+ # ::Google::Cloud::Video::Transcoder::V1::TranscoderService::Client.configure do |config|
54
+ # config.timeout = 10.0
55
+ # end
56
+ #
57
+ # @yield [config] Configure the Client client.
58
+ # @yieldparam config [Client::Configuration]
59
+ #
60
+ # @return [Client::Configuration]
61
+ #
62
+ def self.configure
63
+ @configure ||= begin
64
+ namespace = ["Google", "Cloud", "Video", "Transcoder", "V1"]
65
+ parent_config = while namespace.any?
66
+ parent_name = namespace.join "::"
67
+ parent_const = const_get parent_name
68
+ break parent_const.configure if parent_const.respond_to? :configure
69
+ namespace.pop
70
+ end
71
+ default_config = Client::Configuration.new parent_config
72
+
73
+ default_config.timeout = 60.0
74
+ default_config.retry_policy = {
75
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
76
+ }
77
+
78
+ default_config.rpcs.create_job.timeout = 60.0
79
+
80
+ default_config.rpcs.list_jobs.timeout = 60.0
81
+
82
+ default_config.rpcs.get_job.timeout = 60.0
83
+
84
+ default_config.rpcs.delete_job.timeout = 60.0
85
+
86
+ default_config.rpcs.create_job_template.timeout = 60.0
87
+
88
+ default_config.rpcs.list_job_templates.timeout = 60.0
89
+
90
+ default_config.rpcs.get_job_template.timeout = 60.0
91
+
92
+ default_config.rpcs.delete_job_template.timeout = 60.0
93
+
94
+ default_config
95
+ end
96
+ yield @configure if block_given?
97
+ @configure
98
+ end
99
+
100
+ ##
101
+ # Configure the TranscoderService Client instance.
102
+ #
103
+ # The configuration is set to the derived mode, meaning that values can be changed,
104
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
105
+ # should be made on {Client.configure}.
106
+ #
107
+ # See {::Google::Cloud::Video::Transcoder::V1::TranscoderService::Client::Configuration}
108
+ # for a description of the configuration fields.
109
+ #
110
+ # @yield [config] Configure the Client client.
111
+ # @yieldparam config [Client::Configuration]
112
+ #
113
+ # @return [Client::Configuration]
114
+ #
115
+ def configure
116
+ yield @config if block_given?
117
+ @config
118
+ end
119
+
120
+ ##
121
+ # Create a new TranscoderService client object.
122
+ #
123
+ # @example
124
+ #
125
+ # # Create a client using the default configuration
126
+ # client = ::Google::Cloud::Video::Transcoder::V1::TranscoderService::Client.new
127
+ #
128
+ # # Create a client using a custom configuration
129
+ # client = ::Google::Cloud::Video::Transcoder::V1::TranscoderService::Client.new do |config|
130
+ # config.timeout = 10.0
131
+ # end
132
+ #
133
+ # @yield [config] Configure the TranscoderService client.
134
+ # @yieldparam config [Client::Configuration]
135
+ #
136
+ def initialize
137
+ # These require statements are intentionally placed here to initialize
138
+ # the gRPC module only when it's required.
139
+ # See https://github.com/googleapis/toolkit/issues/446
140
+ require "gapic/grpc"
141
+ require "google/cloud/video/transcoder/v1/services_services_pb"
142
+
143
+ # Create the configuration object
144
+ @config = Configuration.new Client.configure
145
+
146
+ # Yield the configuration if needed
147
+ yield @config if block_given?
148
+
149
+ # Create credentials
150
+ credentials = @config.credentials
151
+ # Use self-signed JWT if the endpoint is unchanged from default,
152
+ # but only if the default endpoint does not have a region prefix.
153
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
154
+ !@config.endpoint.split(".").first.include?("-")
155
+ credentials ||= Credentials.default scope: @config.scope,
156
+ enable_self_signed_jwt: enable_self_signed_jwt
157
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
158
+ credentials = Credentials.new credentials, scope: @config.scope
159
+ end
160
+ @quota_project_id = @config.quota_project
161
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
162
+
163
+ @transcoder_service_stub = ::Gapic::ServiceStub.new(
164
+ ::Google::Cloud::Video::Transcoder::V1::TranscoderService::Stub,
165
+ credentials: credentials,
166
+ endpoint: @config.endpoint,
167
+ channel_args: @config.channel_args,
168
+ interceptors: @config.interceptors
169
+ )
170
+ end
171
+
172
+ # Service calls
173
+
174
+ ##
175
+ # Creates a job in the specified region.
176
+ #
177
+ # @overload create_job(request, options = nil)
178
+ # Pass arguments to `create_job` via a request object, either of type
179
+ # {::Google::Cloud::Video::Transcoder::V1::CreateJobRequest} or an equivalent Hash.
180
+ #
181
+ # @param request [::Google::Cloud::Video::Transcoder::V1::CreateJobRequest, ::Hash]
182
+ # A request object representing the call parameters. Required. To specify no
183
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
184
+ # @param options [::Gapic::CallOptions, ::Hash]
185
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
186
+ #
187
+ # @overload create_job(parent: nil, job: nil)
188
+ # Pass arguments to `create_job` via keyword arguments. Note that at
189
+ # least one keyword argument is required. To specify no parameters, or to keep all
190
+ # the default parameter values, pass an empty Hash as a request object (see above).
191
+ #
192
+ # @param parent [::String]
193
+ # Required. The parent location to create and process this job.
194
+ # Format: `projects/{project}/locations/{location}`
195
+ # @param job [::Google::Cloud::Video::Transcoder::V1::Job, ::Hash]
196
+ # Required. Parameters for creating transcoding job.
197
+ #
198
+ # @yield [response, operation] Access the result along with the RPC operation
199
+ # @yieldparam response [::Google::Cloud::Video::Transcoder::V1::Job]
200
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
201
+ #
202
+ # @return [::Google::Cloud::Video::Transcoder::V1::Job]
203
+ #
204
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
205
+ #
206
+ def create_job request, options = nil
207
+ raise ::ArgumentError, "request must be provided" if request.nil?
208
+
209
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Transcoder::V1::CreateJobRequest
210
+
211
+ # Converts hash and nil to an options object
212
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
213
+
214
+ # Customize the options with defaults
215
+ metadata = @config.rpcs.create_job.metadata.to_h
216
+
217
+ # Set x-goog-api-client and x-goog-user-project headers
218
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
219
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
220
+ gapic_version: ::Google::Cloud::Video::Transcoder::V1::VERSION
221
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
222
+
223
+ header_params = {
224
+ "parent" => request.parent
225
+ }
226
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
227
+ metadata[:"x-goog-request-params"] ||= request_params_header
228
+
229
+ options.apply_defaults timeout: @config.rpcs.create_job.timeout,
230
+ metadata: metadata,
231
+ retry_policy: @config.rpcs.create_job.retry_policy
232
+
233
+ options.apply_defaults timeout: @config.timeout,
234
+ metadata: @config.metadata,
235
+ retry_policy: @config.retry_policy
236
+
237
+ @transcoder_service_stub.call_rpc :create_job, request, options: options do |response, operation|
238
+ yield response, operation if block_given?
239
+ return response
240
+ end
241
+ rescue ::GRPC::BadStatus => e
242
+ raise ::Google::Cloud::Error.from_error(e)
243
+ end
244
+
245
+ ##
246
+ # Lists jobs in the specified region.
247
+ #
248
+ # @overload list_jobs(request, options = nil)
249
+ # Pass arguments to `list_jobs` via a request object, either of type
250
+ # {::Google::Cloud::Video::Transcoder::V1::ListJobsRequest} or an equivalent Hash.
251
+ #
252
+ # @param request [::Google::Cloud::Video::Transcoder::V1::ListJobsRequest, ::Hash]
253
+ # A request object representing the call parameters. Required. To specify no
254
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
255
+ # @param options [::Gapic::CallOptions, ::Hash]
256
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
257
+ #
258
+ # @overload list_jobs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
259
+ # Pass arguments to `list_jobs` via keyword arguments. Note that at
260
+ # least one keyword argument is required. To specify no parameters, or to keep all
261
+ # the default parameter values, pass an empty Hash as a request object (see above).
262
+ #
263
+ # @param parent [::String]
264
+ # Required. Format: `projects/{project}/locations/{location}`
265
+ # @param page_size [::Integer]
266
+ # The maximum number of items to return.
267
+ # @param page_token [::String]
268
+ # The `next_page_token` value returned from a previous List request, if
269
+ # any.
270
+ # @param filter [::String]
271
+ # The filter expression, following the syntax outlined in
272
+ # https://google.aip.dev/160.
273
+ # @param order_by [::String]
274
+ # One or more fields to compare and use to sort the output.
275
+ # See https://google.aip.dev/132#ordering.
276
+ #
277
+ # @yield [response, operation] Access the result along with the RPC operation
278
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Video::Transcoder::V1::Job>]
279
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
280
+ #
281
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::Video::Transcoder::V1::Job>]
282
+ #
283
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
284
+ #
285
+ def list_jobs request, options = nil
286
+ raise ::ArgumentError, "request must be provided" if request.nil?
287
+
288
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Transcoder::V1::ListJobsRequest
289
+
290
+ # Converts hash and nil to an options object
291
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
292
+
293
+ # Customize the options with defaults
294
+ metadata = @config.rpcs.list_jobs.metadata.to_h
295
+
296
+ # Set x-goog-api-client and x-goog-user-project headers
297
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
298
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
299
+ gapic_version: ::Google::Cloud::Video::Transcoder::V1::VERSION
300
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
301
+
302
+ header_params = {
303
+ "parent" => request.parent
304
+ }
305
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
306
+ metadata[:"x-goog-request-params"] ||= request_params_header
307
+
308
+ options.apply_defaults timeout: @config.rpcs.list_jobs.timeout,
309
+ metadata: metadata,
310
+ retry_policy: @config.rpcs.list_jobs.retry_policy
311
+
312
+ options.apply_defaults timeout: @config.timeout,
313
+ metadata: @config.metadata,
314
+ retry_policy: @config.retry_policy
315
+
316
+ @transcoder_service_stub.call_rpc :list_jobs, request, options: options do |response, operation|
317
+ response = ::Gapic::PagedEnumerable.new @transcoder_service_stub, :list_jobs, request, response, operation, options
318
+ yield response, operation if block_given?
319
+ return response
320
+ end
321
+ rescue ::GRPC::BadStatus => e
322
+ raise ::Google::Cloud::Error.from_error(e)
323
+ end
324
+
325
+ ##
326
+ # Returns the job data.
327
+ #
328
+ # @overload get_job(request, options = nil)
329
+ # Pass arguments to `get_job` via a request object, either of type
330
+ # {::Google::Cloud::Video::Transcoder::V1::GetJobRequest} or an equivalent Hash.
331
+ #
332
+ # @param request [::Google::Cloud::Video::Transcoder::V1::GetJobRequest, ::Hash]
333
+ # A request object representing the call parameters. Required. To specify no
334
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
335
+ # @param options [::Gapic::CallOptions, ::Hash]
336
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
337
+ #
338
+ # @overload get_job(name: nil)
339
+ # Pass arguments to `get_job` via keyword arguments. Note that at
340
+ # least one keyword argument is required. To specify no parameters, or to keep all
341
+ # the default parameter values, pass an empty Hash as a request object (see above).
342
+ #
343
+ # @param name [::String]
344
+ # Required. The name of the job to retrieve.
345
+ # Format: `projects/{project}/locations/{location}/jobs/{job}`
346
+ #
347
+ # @yield [response, operation] Access the result along with the RPC operation
348
+ # @yieldparam response [::Google::Cloud::Video::Transcoder::V1::Job]
349
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
350
+ #
351
+ # @return [::Google::Cloud::Video::Transcoder::V1::Job]
352
+ #
353
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
354
+ #
355
+ def get_job request, options = nil
356
+ raise ::ArgumentError, "request must be provided" if request.nil?
357
+
358
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Transcoder::V1::GetJobRequest
359
+
360
+ # Converts hash and nil to an options object
361
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
362
+
363
+ # Customize the options with defaults
364
+ metadata = @config.rpcs.get_job.metadata.to_h
365
+
366
+ # Set x-goog-api-client and x-goog-user-project headers
367
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
368
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
369
+ gapic_version: ::Google::Cloud::Video::Transcoder::V1::VERSION
370
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
371
+
372
+ header_params = {
373
+ "name" => request.name
374
+ }
375
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
376
+ metadata[:"x-goog-request-params"] ||= request_params_header
377
+
378
+ options.apply_defaults timeout: @config.rpcs.get_job.timeout,
379
+ metadata: metadata,
380
+ retry_policy: @config.rpcs.get_job.retry_policy
381
+
382
+ options.apply_defaults timeout: @config.timeout,
383
+ metadata: @config.metadata,
384
+ retry_policy: @config.retry_policy
385
+
386
+ @transcoder_service_stub.call_rpc :get_job, request, options: options do |response, operation|
387
+ yield response, operation if block_given?
388
+ return response
389
+ end
390
+ rescue ::GRPC::BadStatus => e
391
+ raise ::Google::Cloud::Error.from_error(e)
392
+ end
393
+
394
+ ##
395
+ # Deletes a job.
396
+ #
397
+ # @overload delete_job(request, options = nil)
398
+ # Pass arguments to `delete_job` via a request object, either of type
399
+ # {::Google::Cloud::Video::Transcoder::V1::DeleteJobRequest} or an equivalent Hash.
400
+ #
401
+ # @param request [::Google::Cloud::Video::Transcoder::V1::DeleteJobRequest, ::Hash]
402
+ # A request object representing the call parameters. Required. To specify no
403
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
404
+ # @param options [::Gapic::CallOptions, ::Hash]
405
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
406
+ #
407
+ # @overload delete_job(name: nil)
408
+ # Pass arguments to `delete_job` via keyword arguments. Note that at
409
+ # least one keyword argument is required. To specify no parameters, or to keep all
410
+ # the default parameter values, pass an empty Hash as a request object (see above).
411
+ #
412
+ # @param name [::String]
413
+ # Required. The name of the job to delete.
414
+ # Format: `projects/{project}/locations/{location}/jobs/{job}`
415
+ #
416
+ # @yield [response, operation] Access the result along with the RPC operation
417
+ # @yieldparam response [::Google::Protobuf::Empty]
418
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
419
+ #
420
+ # @return [::Google::Protobuf::Empty]
421
+ #
422
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
423
+ #
424
+ def delete_job request, options = nil
425
+ raise ::ArgumentError, "request must be provided" if request.nil?
426
+
427
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Transcoder::V1::DeleteJobRequest
428
+
429
+ # Converts hash and nil to an options object
430
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
431
+
432
+ # Customize the options with defaults
433
+ metadata = @config.rpcs.delete_job.metadata.to_h
434
+
435
+ # Set x-goog-api-client and x-goog-user-project headers
436
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
437
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
438
+ gapic_version: ::Google::Cloud::Video::Transcoder::V1::VERSION
439
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
440
+
441
+ header_params = {
442
+ "name" => request.name
443
+ }
444
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
445
+ metadata[:"x-goog-request-params"] ||= request_params_header
446
+
447
+ options.apply_defaults timeout: @config.rpcs.delete_job.timeout,
448
+ metadata: metadata,
449
+ retry_policy: @config.rpcs.delete_job.retry_policy
450
+
451
+ options.apply_defaults timeout: @config.timeout,
452
+ metadata: @config.metadata,
453
+ retry_policy: @config.retry_policy
454
+
455
+ @transcoder_service_stub.call_rpc :delete_job, request, options: options do |response, operation|
456
+ yield response, operation if block_given?
457
+ return response
458
+ end
459
+ rescue ::GRPC::BadStatus => e
460
+ raise ::Google::Cloud::Error.from_error(e)
461
+ end
462
+
463
+ ##
464
+ # Creates a job template in the specified region.
465
+ #
466
+ # @overload create_job_template(request, options = nil)
467
+ # Pass arguments to `create_job_template` via a request object, either of type
468
+ # {::Google::Cloud::Video::Transcoder::V1::CreateJobTemplateRequest} or an equivalent Hash.
469
+ #
470
+ # @param request [::Google::Cloud::Video::Transcoder::V1::CreateJobTemplateRequest, ::Hash]
471
+ # A request object representing the call parameters. Required. To specify no
472
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
473
+ # @param options [::Gapic::CallOptions, ::Hash]
474
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
475
+ #
476
+ # @overload create_job_template(parent: nil, job_template: nil, job_template_id: nil)
477
+ # Pass arguments to `create_job_template` via keyword arguments. Note that at
478
+ # least one keyword argument is required. To specify no parameters, or to keep all
479
+ # the default parameter values, pass an empty Hash as a request object (see above).
480
+ #
481
+ # @param parent [::String]
482
+ # Required. The parent location to create this job template.
483
+ # Format: `projects/{project}/locations/{location}`
484
+ # @param job_template [::Google::Cloud::Video::Transcoder::V1::JobTemplate, ::Hash]
485
+ # Required. Parameters for creating job template.
486
+ # @param job_template_id [::String]
487
+ # Required. The ID to use for the job template, which will become the final component
488
+ # of the job template's resource name.
489
+ #
490
+ # This value should be 4-63 characters, and valid characters must match the
491
+ # regular expression `[a-zA-Z][a-zA-Z0-9_-]*`.
492
+ #
493
+ # @yield [response, operation] Access the result along with the RPC operation
494
+ # @yieldparam response [::Google::Cloud::Video::Transcoder::V1::JobTemplate]
495
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
496
+ #
497
+ # @return [::Google::Cloud::Video::Transcoder::V1::JobTemplate]
498
+ #
499
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
500
+ #
501
+ def create_job_template request, options = nil
502
+ raise ::ArgumentError, "request must be provided" if request.nil?
503
+
504
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Transcoder::V1::CreateJobTemplateRequest
505
+
506
+ # Converts hash and nil to an options object
507
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
508
+
509
+ # Customize the options with defaults
510
+ metadata = @config.rpcs.create_job_template.metadata.to_h
511
+
512
+ # Set x-goog-api-client and x-goog-user-project headers
513
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
514
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
515
+ gapic_version: ::Google::Cloud::Video::Transcoder::V1::VERSION
516
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
517
+
518
+ header_params = {
519
+ "parent" => request.parent
520
+ }
521
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
522
+ metadata[:"x-goog-request-params"] ||= request_params_header
523
+
524
+ options.apply_defaults timeout: @config.rpcs.create_job_template.timeout,
525
+ metadata: metadata,
526
+ retry_policy: @config.rpcs.create_job_template.retry_policy
527
+
528
+ options.apply_defaults timeout: @config.timeout,
529
+ metadata: @config.metadata,
530
+ retry_policy: @config.retry_policy
531
+
532
+ @transcoder_service_stub.call_rpc :create_job_template, request, options: options do |response, operation|
533
+ yield response, operation if block_given?
534
+ return response
535
+ end
536
+ rescue ::GRPC::BadStatus => e
537
+ raise ::Google::Cloud::Error.from_error(e)
538
+ end
539
+
540
+ ##
541
+ # Lists job templates in the specified region.
542
+ #
543
+ # @overload list_job_templates(request, options = nil)
544
+ # Pass arguments to `list_job_templates` via a request object, either of type
545
+ # {::Google::Cloud::Video::Transcoder::V1::ListJobTemplatesRequest} or an equivalent Hash.
546
+ #
547
+ # @param request [::Google::Cloud::Video::Transcoder::V1::ListJobTemplatesRequest, ::Hash]
548
+ # A request object representing the call parameters. Required. To specify no
549
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
550
+ # @param options [::Gapic::CallOptions, ::Hash]
551
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
552
+ #
553
+ # @overload list_job_templates(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
554
+ # Pass arguments to `list_job_templates` via keyword arguments. Note that at
555
+ # least one keyword argument is required. To specify no parameters, or to keep all
556
+ # the default parameter values, pass an empty Hash as a request object (see above).
557
+ #
558
+ # @param parent [::String]
559
+ # Required. The parent location from which to retrieve the collection of job templates.
560
+ # Format: `projects/{project}/locations/{location}`
561
+ # @param page_size [::Integer]
562
+ # The maximum number of items to return.
563
+ # @param page_token [::String]
564
+ # The `next_page_token` value returned from a previous List request, if
565
+ # any.
566
+ # @param filter [::String]
567
+ # The filter expression, following the syntax outlined in
568
+ # https://google.aip.dev/160.
569
+ # @param order_by [::String]
570
+ # One or more fields to compare and use to sort the output.
571
+ # See https://google.aip.dev/132#ordering.
572
+ #
573
+ # @yield [response, operation] Access the result along with the RPC operation
574
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Video::Transcoder::V1::JobTemplate>]
575
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
576
+ #
577
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::Video::Transcoder::V1::JobTemplate>]
578
+ #
579
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
580
+ #
581
+ def list_job_templates request, options = nil
582
+ raise ::ArgumentError, "request must be provided" if request.nil?
583
+
584
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Transcoder::V1::ListJobTemplatesRequest
585
+
586
+ # Converts hash and nil to an options object
587
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
588
+
589
+ # Customize the options with defaults
590
+ metadata = @config.rpcs.list_job_templates.metadata.to_h
591
+
592
+ # Set x-goog-api-client and x-goog-user-project headers
593
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
594
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
595
+ gapic_version: ::Google::Cloud::Video::Transcoder::V1::VERSION
596
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
597
+
598
+ header_params = {
599
+ "parent" => request.parent
600
+ }
601
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
602
+ metadata[:"x-goog-request-params"] ||= request_params_header
603
+
604
+ options.apply_defaults timeout: @config.rpcs.list_job_templates.timeout,
605
+ metadata: metadata,
606
+ retry_policy: @config.rpcs.list_job_templates.retry_policy
607
+
608
+ options.apply_defaults timeout: @config.timeout,
609
+ metadata: @config.metadata,
610
+ retry_policy: @config.retry_policy
611
+
612
+ @transcoder_service_stub.call_rpc :list_job_templates, request, options: options do |response, operation|
613
+ response = ::Gapic::PagedEnumerable.new @transcoder_service_stub, :list_job_templates, request, response, operation, options
614
+ yield response, operation if block_given?
615
+ return response
616
+ end
617
+ rescue ::GRPC::BadStatus => e
618
+ raise ::Google::Cloud::Error.from_error(e)
619
+ end
620
+
621
+ ##
622
+ # Returns the job template data.
623
+ #
624
+ # @overload get_job_template(request, options = nil)
625
+ # Pass arguments to `get_job_template` via a request object, either of type
626
+ # {::Google::Cloud::Video::Transcoder::V1::GetJobTemplateRequest} or an equivalent Hash.
627
+ #
628
+ # @param request [::Google::Cloud::Video::Transcoder::V1::GetJobTemplateRequest, ::Hash]
629
+ # A request object representing the call parameters. Required. To specify no
630
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
631
+ # @param options [::Gapic::CallOptions, ::Hash]
632
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
633
+ #
634
+ # @overload get_job_template(name: nil)
635
+ # Pass arguments to `get_job_template` via keyword arguments. Note that at
636
+ # least one keyword argument is required. To specify no parameters, or to keep all
637
+ # the default parameter values, pass an empty Hash as a request object (see above).
638
+ #
639
+ # @param name [::String]
640
+ # Required. The name of the job template to retrieve.
641
+ # Format:
642
+ # `projects/{project}/locations/{location}/jobTemplates/{job_template}`
643
+ #
644
+ # @yield [response, operation] Access the result along with the RPC operation
645
+ # @yieldparam response [::Google::Cloud::Video::Transcoder::V1::JobTemplate]
646
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
647
+ #
648
+ # @return [::Google::Cloud::Video::Transcoder::V1::JobTemplate]
649
+ #
650
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
651
+ #
652
+ def get_job_template request, options = nil
653
+ raise ::ArgumentError, "request must be provided" if request.nil?
654
+
655
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Transcoder::V1::GetJobTemplateRequest
656
+
657
+ # Converts hash and nil to an options object
658
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
659
+
660
+ # Customize the options with defaults
661
+ metadata = @config.rpcs.get_job_template.metadata.to_h
662
+
663
+ # Set x-goog-api-client and x-goog-user-project headers
664
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
665
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
666
+ gapic_version: ::Google::Cloud::Video::Transcoder::V1::VERSION
667
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
668
+
669
+ header_params = {
670
+ "name" => request.name
671
+ }
672
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
673
+ metadata[:"x-goog-request-params"] ||= request_params_header
674
+
675
+ options.apply_defaults timeout: @config.rpcs.get_job_template.timeout,
676
+ metadata: metadata,
677
+ retry_policy: @config.rpcs.get_job_template.retry_policy
678
+
679
+ options.apply_defaults timeout: @config.timeout,
680
+ metadata: @config.metadata,
681
+ retry_policy: @config.retry_policy
682
+
683
+ @transcoder_service_stub.call_rpc :get_job_template, request, options: options do |response, operation|
684
+ yield response, operation if block_given?
685
+ return response
686
+ end
687
+ rescue ::GRPC::BadStatus => e
688
+ raise ::Google::Cloud::Error.from_error(e)
689
+ end
690
+
691
+ ##
692
+ # Deletes a job template.
693
+ #
694
+ # @overload delete_job_template(request, options = nil)
695
+ # Pass arguments to `delete_job_template` via a request object, either of type
696
+ # {::Google::Cloud::Video::Transcoder::V1::DeleteJobTemplateRequest} or an equivalent Hash.
697
+ #
698
+ # @param request [::Google::Cloud::Video::Transcoder::V1::DeleteJobTemplateRequest, ::Hash]
699
+ # A request object representing the call parameters. Required. To specify no
700
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
701
+ # @param options [::Gapic::CallOptions, ::Hash]
702
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
703
+ #
704
+ # @overload delete_job_template(name: nil)
705
+ # Pass arguments to `delete_job_template` via keyword arguments. Note that at
706
+ # least one keyword argument is required. To specify no parameters, or to keep all
707
+ # the default parameter values, pass an empty Hash as a request object (see above).
708
+ #
709
+ # @param name [::String]
710
+ # Required. The name of the job template to delete.
711
+ # `projects/{project}/locations/{location}/jobTemplates/{job_template}`
712
+ #
713
+ # @yield [response, operation] Access the result along with the RPC operation
714
+ # @yieldparam response [::Google::Protobuf::Empty]
715
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
716
+ #
717
+ # @return [::Google::Protobuf::Empty]
718
+ #
719
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
720
+ #
721
+ def delete_job_template request, options = nil
722
+ raise ::ArgumentError, "request must be provided" if request.nil?
723
+
724
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Transcoder::V1::DeleteJobTemplateRequest
725
+
726
+ # Converts hash and nil to an options object
727
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
728
+
729
+ # Customize the options with defaults
730
+ metadata = @config.rpcs.delete_job_template.metadata.to_h
731
+
732
+ # Set x-goog-api-client and x-goog-user-project headers
733
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
734
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
735
+ gapic_version: ::Google::Cloud::Video::Transcoder::V1::VERSION
736
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
737
+
738
+ header_params = {
739
+ "name" => request.name
740
+ }
741
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
742
+ metadata[:"x-goog-request-params"] ||= request_params_header
743
+
744
+ options.apply_defaults timeout: @config.rpcs.delete_job_template.timeout,
745
+ metadata: metadata,
746
+ retry_policy: @config.rpcs.delete_job_template.retry_policy
747
+
748
+ options.apply_defaults timeout: @config.timeout,
749
+ metadata: @config.metadata,
750
+ retry_policy: @config.retry_policy
751
+
752
+ @transcoder_service_stub.call_rpc :delete_job_template, request, options: options do |response, operation|
753
+ yield response, operation if block_given?
754
+ return response
755
+ end
756
+ rescue ::GRPC::BadStatus => e
757
+ raise ::Google::Cloud::Error.from_error(e)
758
+ end
759
+
760
+ ##
761
+ # Configuration class for the TranscoderService API.
762
+ #
763
+ # This class represents the configuration for TranscoderService,
764
+ # providing control over timeouts, retry behavior, logging, transport
765
+ # parameters, and other low-level controls. Certain parameters can also be
766
+ # applied individually to specific RPCs. See
767
+ # {::Google::Cloud::Video::Transcoder::V1::TranscoderService::Client::Configuration::Rpcs}
768
+ # for a list of RPCs that can be configured independently.
769
+ #
770
+ # Configuration can be applied globally to all clients, or to a single client
771
+ # on construction.
772
+ #
773
+ # @example
774
+ #
775
+ # # Modify the global config, setting the timeout for
776
+ # # create_job to 20 seconds,
777
+ # # and all remaining timeouts to 10 seconds.
778
+ # ::Google::Cloud::Video::Transcoder::V1::TranscoderService::Client.configure do |config|
779
+ # config.timeout = 10.0
780
+ # config.rpcs.create_job.timeout = 20.0
781
+ # end
782
+ #
783
+ # # Apply the above configuration only to a new client.
784
+ # client = ::Google::Cloud::Video::Transcoder::V1::TranscoderService::Client.new do |config|
785
+ # config.timeout = 10.0
786
+ # config.rpcs.create_job.timeout = 20.0
787
+ # end
788
+ #
789
+ # @!attribute [rw] endpoint
790
+ # The hostname or hostname:port of the service endpoint.
791
+ # Defaults to `"transcoder.googleapis.com"`.
792
+ # @return [::String]
793
+ # @!attribute [rw] credentials
794
+ # Credentials to send with calls. You may provide any of the following types:
795
+ # * (`String`) The path to a service account key file in JSON format
796
+ # * (`Hash`) A service account key as a Hash
797
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
798
+ # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
799
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
800
+ # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
801
+ # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
802
+ # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
803
+ # * (`nil`) indicating no credentials
804
+ # @return [::Object]
805
+ # @!attribute [rw] scope
806
+ # The OAuth scopes
807
+ # @return [::Array<::String>]
808
+ # @!attribute [rw] lib_name
809
+ # The library name as recorded in instrumentation and logging
810
+ # @return [::String]
811
+ # @!attribute [rw] lib_version
812
+ # The library version as recorded in instrumentation and logging
813
+ # @return [::String]
814
+ # @!attribute [rw] channel_args
815
+ # Extra parameters passed to the gRPC channel. Note: this is ignored if a
816
+ # `GRPC::Core::Channel` object is provided as the credential.
817
+ # @return [::Hash]
818
+ # @!attribute [rw] interceptors
819
+ # An array of interceptors that are run before calls are executed.
820
+ # @return [::Array<::GRPC::ClientInterceptor>]
821
+ # @!attribute [rw] timeout
822
+ # The call timeout in seconds.
823
+ # @return [::Numeric]
824
+ # @!attribute [rw] metadata
825
+ # Additional gRPC headers to be sent with the call.
826
+ # @return [::Hash{::Symbol=>::String}]
827
+ # @!attribute [rw] retry_policy
828
+ # The retry policy. The value is a hash with the following keys:
829
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
830
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
831
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
832
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
833
+ # trigger a retry.
834
+ # @return [::Hash]
835
+ # @!attribute [rw] quota_project
836
+ # A separate project against which to charge quota.
837
+ # @return [::String]
838
+ #
839
+ class Configuration
840
+ extend ::Gapic::Config
841
+
842
+ config_attr :endpoint, "transcoder.googleapis.com", ::String
843
+ config_attr :credentials, nil do |value|
844
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
845
+ allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
846
+ allowed.any? { |klass| klass === value }
847
+ end
848
+ config_attr :scope, nil, ::String, ::Array, nil
849
+ config_attr :lib_name, nil, ::String, nil
850
+ config_attr :lib_version, nil, ::String, nil
851
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
852
+ config_attr :interceptors, nil, ::Array, nil
853
+ config_attr :timeout, nil, ::Numeric, nil
854
+ config_attr :metadata, nil, ::Hash, nil
855
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
856
+ config_attr :quota_project, nil, ::String, nil
857
+
858
+ # @private
859
+ def initialize parent_config = nil
860
+ @parent_config = parent_config unless parent_config.nil?
861
+
862
+ yield self if block_given?
863
+ end
864
+
865
+ ##
866
+ # Configurations for individual RPCs
867
+ # @return [Rpcs]
868
+ #
869
+ def rpcs
870
+ @rpcs ||= begin
871
+ parent_rpcs = nil
872
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
873
+ Rpcs.new parent_rpcs
874
+ end
875
+ end
876
+
877
+ ##
878
+ # Configuration RPC class for the TranscoderService API.
879
+ #
880
+ # Includes fields providing the configuration for each RPC in this service.
881
+ # Each configuration object is of type `Gapic::Config::Method` and includes
882
+ # the following configuration fields:
883
+ #
884
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
885
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
886
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
887
+ # include the following keys:
888
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
889
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
890
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
891
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
892
+ # trigger a retry.
893
+ #
894
+ class Rpcs
895
+ ##
896
+ # RPC-specific configuration for `create_job`
897
+ # @return [::Gapic::Config::Method]
898
+ #
899
+ attr_reader :create_job
900
+ ##
901
+ # RPC-specific configuration for `list_jobs`
902
+ # @return [::Gapic::Config::Method]
903
+ #
904
+ attr_reader :list_jobs
905
+ ##
906
+ # RPC-specific configuration for `get_job`
907
+ # @return [::Gapic::Config::Method]
908
+ #
909
+ attr_reader :get_job
910
+ ##
911
+ # RPC-specific configuration for `delete_job`
912
+ # @return [::Gapic::Config::Method]
913
+ #
914
+ attr_reader :delete_job
915
+ ##
916
+ # RPC-specific configuration for `create_job_template`
917
+ # @return [::Gapic::Config::Method]
918
+ #
919
+ attr_reader :create_job_template
920
+ ##
921
+ # RPC-specific configuration for `list_job_templates`
922
+ # @return [::Gapic::Config::Method]
923
+ #
924
+ attr_reader :list_job_templates
925
+ ##
926
+ # RPC-specific configuration for `get_job_template`
927
+ # @return [::Gapic::Config::Method]
928
+ #
929
+ attr_reader :get_job_template
930
+ ##
931
+ # RPC-specific configuration for `delete_job_template`
932
+ # @return [::Gapic::Config::Method]
933
+ #
934
+ attr_reader :delete_job_template
935
+
936
+ # @private
937
+ def initialize parent_rpcs = nil
938
+ create_job_config = parent_rpcs.create_job if parent_rpcs.respond_to? :create_job
939
+ @create_job = ::Gapic::Config::Method.new create_job_config
940
+ list_jobs_config = parent_rpcs.list_jobs if parent_rpcs.respond_to? :list_jobs
941
+ @list_jobs = ::Gapic::Config::Method.new list_jobs_config
942
+ get_job_config = parent_rpcs.get_job if parent_rpcs.respond_to? :get_job
943
+ @get_job = ::Gapic::Config::Method.new get_job_config
944
+ delete_job_config = parent_rpcs.delete_job if parent_rpcs.respond_to? :delete_job
945
+ @delete_job = ::Gapic::Config::Method.new delete_job_config
946
+ create_job_template_config = parent_rpcs.create_job_template if parent_rpcs.respond_to? :create_job_template
947
+ @create_job_template = ::Gapic::Config::Method.new create_job_template_config
948
+ list_job_templates_config = parent_rpcs.list_job_templates if parent_rpcs.respond_to? :list_job_templates
949
+ @list_job_templates = ::Gapic::Config::Method.new list_job_templates_config
950
+ get_job_template_config = parent_rpcs.get_job_template if parent_rpcs.respond_to? :get_job_template
951
+ @get_job_template = ::Gapic::Config::Method.new get_job_template_config
952
+ delete_job_template_config = parent_rpcs.delete_job_template if parent_rpcs.respond_to? :delete_job_template
953
+ @delete_job_template = ::Gapic::Config::Method.new delete_job_template_config
954
+
955
+ yield self if block_given?
956
+ end
957
+ end
958
+ end
959
+ end
960
+ end
961
+ end
962
+ end
963
+ end
964
+ end
965
+ end