google-cloud-deploy-v1 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2001 @@
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/deploy/v1/cloud_deploy_pb"
21
+
22
+ module Google
23
+ module Cloud
24
+ module Deploy
25
+ module V1
26
+ module CloudDeploy
27
+ ##
28
+ # Client for the CloudDeploy service.
29
+ #
30
+ # CloudDeploy service creates and manages Continuous Delivery operations
31
+ # on Google Cloud Platform via Skaffold (https://skaffold.dev).
32
+ #
33
+ class Client
34
+ include Paths
35
+
36
+ # @private
37
+ attr_reader :cloud_deploy_stub
38
+
39
+ ##
40
+ # Configure the CloudDeploy Client class.
41
+ #
42
+ # See {::Google::Cloud::Deploy::V1::CloudDeploy::Client::Configuration}
43
+ # for a description of the configuration fields.
44
+ #
45
+ # @example
46
+ #
47
+ # # Modify the configuration for all CloudDeploy clients
48
+ # ::Google::Cloud::Deploy::V1::CloudDeploy::Client.configure do |config|
49
+ # config.timeout = 10.0
50
+ # end
51
+ #
52
+ # @yield [config] Configure the Client client.
53
+ # @yieldparam config [Client::Configuration]
54
+ #
55
+ # @return [Client::Configuration]
56
+ #
57
+ def self.configure
58
+ @configure ||= begin
59
+ namespace = ["Google", "Cloud", "Deploy", "V1"]
60
+ parent_config = while namespace.any?
61
+ parent_name = namespace.join "::"
62
+ parent_const = const_get parent_name
63
+ break parent_const.configure if parent_const.respond_to? :configure
64
+ namespace.pop
65
+ end
66
+ default_config = Client::Configuration.new parent_config
67
+
68
+ default_config.rpcs.list_delivery_pipelines.timeout = 60.0
69
+ default_config.rpcs.list_delivery_pipelines.retry_policy = {
70
+ initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
71
+ }
72
+
73
+ default_config.rpcs.get_delivery_pipeline.timeout = 60.0
74
+ default_config.rpcs.get_delivery_pipeline.retry_policy = {
75
+ initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
76
+ }
77
+
78
+ default_config.rpcs.create_delivery_pipeline.timeout = 60.0
79
+
80
+ default_config.rpcs.update_delivery_pipeline.timeout = 60.0
81
+
82
+ default_config.rpcs.delete_delivery_pipeline.timeout = 60.0
83
+
84
+ default_config.rpcs.list_targets.timeout = 60.0
85
+ default_config.rpcs.list_targets.retry_policy = {
86
+ initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
87
+ }
88
+
89
+ default_config.rpcs.get_target.timeout = 60.0
90
+ default_config.rpcs.get_target.retry_policy = {
91
+ initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
92
+ }
93
+
94
+ default_config.rpcs.create_target.timeout = 60.0
95
+
96
+ default_config.rpcs.update_target.timeout = 60.0
97
+
98
+ default_config.rpcs.delete_target.timeout = 60.0
99
+
100
+ default_config.rpcs.list_releases.timeout = 60.0
101
+ default_config.rpcs.list_releases.retry_policy = {
102
+ initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
103
+ }
104
+
105
+ default_config.rpcs.get_release.timeout = 60.0
106
+ default_config.rpcs.get_release.retry_policy = {
107
+ initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
108
+ }
109
+
110
+ default_config.rpcs.create_release.timeout = 60.0
111
+
112
+ default_config.rpcs.approve_rollout.timeout = 60.0
113
+
114
+ default_config.rpcs.list_rollouts.timeout = 60.0
115
+ default_config.rpcs.list_rollouts.retry_policy = {
116
+ initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
117
+ }
118
+
119
+ default_config.rpcs.get_rollout.timeout = 60.0
120
+ default_config.rpcs.get_rollout.retry_policy = {
121
+ initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
122
+ }
123
+
124
+ default_config.rpcs.create_rollout.timeout = 60.0
125
+
126
+ default_config.rpcs.get_config.timeout = 60.0
127
+ default_config.rpcs.get_config.retry_policy = {
128
+ initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
129
+ }
130
+
131
+ default_config
132
+ end
133
+ yield @configure if block_given?
134
+ @configure
135
+ end
136
+
137
+ ##
138
+ # Configure the CloudDeploy Client instance.
139
+ #
140
+ # The configuration is set to the derived mode, meaning that values can be changed,
141
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
142
+ # should be made on {Client.configure}.
143
+ #
144
+ # See {::Google::Cloud::Deploy::V1::CloudDeploy::Client::Configuration}
145
+ # for a description of the configuration fields.
146
+ #
147
+ # @yield [config] Configure the Client client.
148
+ # @yieldparam config [Client::Configuration]
149
+ #
150
+ # @return [Client::Configuration]
151
+ #
152
+ def configure
153
+ yield @config if block_given?
154
+ @config
155
+ end
156
+
157
+ ##
158
+ # Create a new CloudDeploy client object.
159
+ #
160
+ # @example
161
+ #
162
+ # # Create a client using the default configuration
163
+ # client = ::Google::Cloud::Deploy::V1::CloudDeploy::Client.new
164
+ #
165
+ # # Create a client using a custom configuration
166
+ # client = ::Google::Cloud::Deploy::V1::CloudDeploy::Client.new do |config|
167
+ # config.timeout = 10.0
168
+ # end
169
+ #
170
+ # @yield [config] Configure the CloudDeploy client.
171
+ # @yieldparam config [Client::Configuration]
172
+ #
173
+ def initialize
174
+ # These require statements are intentionally placed here to initialize
175
+ # the gRPC module only when it's required.
176
+ # See https://github.com/googleapis/toolkit/issues/446
177
+ require "gapic/grpc"
178
+ require "google/cloud/deploy/v1/cloud_deploy_services_pb"
179
+
180
+ # Create the configuration object
181
+ @config = Configuration.new Client.configure
182
+
183
+ # Yield the configuration if needed
184
+ yield @config if block_given?
185
+
186
+ # Create credentials
187
+ credentials = @config.credentials
188
+ # Use self-signed JWT if the endpoint is unchanged from default,
189
+ # but only if the default endpoint does not have a region prefix.
190
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
191
+ !@config.endpoint.split(".").first.include?("-")
192
+ credentials ||= Credentials.default scope: @config.scope,
193
+ enable_self_signed_jwt: enable_self_signed_jwt
194
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
195
+ credentials = Credentials.new credentials, scope: @config.scope
196
+ end
197
+ @quota_project_id = @config.quota_project
198
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
199
+
200
+ @operations_client = Operations.new do |config|
201
+ config.credentials = credentials
202
+ config.endpoint = @config.endpoint
203
+ end
204
+
205
+ @cloud_deploy_stub = ::Gapic::ServiceStub.new(
206
+ ::Google::Cloud::Deploy::V1::CloudDeploy::Stub,
207
+ credentials: credentials,
208
+ endpoint: @config.endpoint,
209
+ channel_args: @config.channel_args,
210
+ interceptors: @config.interceptors
211
+ )
212
+ end
213
+
214
+ ##
215
+ # Get the associated client for long-running operations.
216
+ #
217
+ # @return [::Google::Cloud::Deploy::V1::CloudDeploy::Operations]
218
+ #
219
+ attr_reader :operations_client
220
+
221
+ # Service calls
222
+
223
+ ##
224
+ # Lists DeliveryPipelines in a given project and location.
225
+ #
226
+ # @overload list_delivery_pipelines(request, options = nil)
227
+ # Pass arguments to `list_delivery_pipelines` via a request object, either of type
228
+ # {::Google::Cloud::Deploy::V1::ListDeliveryPipelinesRequest} or an equivalent Hash.
229
+ #
230
+ # @param request [::Google::Cloud::Deploy::V1::ListDeliveryPipelinesRequest, ::Hash]
231
+ # A request object representing the call parameters. Required. To specify no
232
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
233
+ # @param options [::Gapic::CallOptions, ::Hash]
234
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
235
+ #
236
+ # @overload list_delivery_pipelines(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
237
+ # Pass arguments to `list_delivery_pipelines` via keyword arguments. Note that at
238
+ # least one keyword argument is required. To specify no parameters, or to keep all
239
+ # the default parameter values, pass an empty Hash as a request object (see above).
240
+ #
241
+ # @param parent [::String]
242
+ # Required. The parent, which owns this collection of pipelines. Format must be
243
+ # projects/\\{project_id}/locations/\\{location_name}.
244
+ # @param page_size [::Integer]
245
+ # The maximum number of pipelines to return. The service may return
246
+ # fewer than this value. If unspecified, at most 50 pipelines will
247
+ # be returned. The maximum value is 1000; values above 1000 will be set
248
+ # to 1000.
249
+ # @param page_token [::String]
250
+ # A page token, received from a previous `ListDeliveryPipelines` call.
251
+ # Provide this to retrieve the subsequent page.
252
+ #
253
+ # When paginating, all other provided parameters match
254
+ # the call that provided the page token.
255
+ # @param filter [::String]
256
+ # Filter builds to be returned. See https://google.aip.dev/160 for more
257
+ # details.
258
+ # @param order_by [::String]
259
+ # Field to sort by. See https://google.aip.dev/132#ordering for more details.
260
+ #
261
+ # @yield [response, operation] Access the result along with the RPC operation
262
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Deploy::V1::DeliveryPipeline>]
263
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
264
+ #
265
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::Deploy::V1::DeliveryPipeline>]
266
+ #
267
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
268
+ #
269
+ def list_delivery_pipelines request, options = nil
270
+ raise ::ArgumentError, "request must be provided" if request.nil?
271
+
272
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Deploy::V1::ListDeliveryPipelinesRequest
273
+
274
+ # Converts hash and nil to an options object
275
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
276
+
277
+ # Customize the options with defaults
278
+ metadata = @config.rpcs.list_delivery_pipelines.metadata.to_h
279
+
280
+ # Set x-goog-api-client and x-goog-user-project headers
281
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
282
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
283
+ gapic_version: ::Google::Cloud::Deploy::V1::VERSION
284
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
285
+
286
+ header_params = {
287
+ "parent" => request.parent
288
+ }
289
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
290
+ metadata[:"x-goog-request-params"] ||= request_params_header
291
+
292
+ options.apply_defaults timeout: @config.rpcs.list_delivery_pipelines.timeout,
293
+ metadata: metadata,
294
+ retry_policy: @config.rpcs.list_delivery_pipelines.retry_policy
295
+
296
+ options.apply_defaults timeout: @config.timeout,
297
+ metadata: @config.metadata,
298
+ retry_policy: @config.retry_policy
299
+
300
+ @cloud_deploy_stub.call_rpc :list_delivery_pipelines, request, options: options do |response, operation|
301
+ response = ::Gapic::PagedEnumerable.new @cloud_deploy_stub, :list_delivery_pipelines, request, response, operation, options
302
+ yield response, operation if block_given?
303
+ return response
304
+ end
305
+ rescue ::GRPC::BadStatus => e
306
+ raise ::Google::Cloud::Error.from_error(e)
307
+ end
308
+
309
+ ##
310
+ # Gets details of a single DeliveryPipeline.
311
+ #
312
+ # @overload get_delivery_pipeline(request, options = nil)
313
+ # Pass arguments to `get_delivery_pipeline` via a request object, either of type
314
+ # {::Google::Cloud::Deploy::V1::GetDeliveryPipelineRequest} or an equivalent Hash.
315
+ #
316
+ # @param request [::Google::Cloud::Deploy::V1::GetDeliveryPipelineRequest, ::Hash]
317
+ # A request object representing the call parameters. Required. To specify no
318
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
319
+ # @param options [::Gapic::CallOptions, ::Hash]
320
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
321
+ #
322
+ # @overload get_delivery_pipeline(name: nil)
323
+ # Pass arguments to `get_delivery_pipeline` via keyword arguments. Note that at
324
+ # least one keyword argument is required. To specify no parameters, or to keep all
325
+ # the default parameter values, pass an empty Hash as a request object (see above).
326
+ #
327
+ # @param name [::String]
328
+ # Required. Name of the `DeliveryPipeline`. Format must be
329
+ # projects/\\{project_id}/locations/\\{location_name}/deliveryPipelines/\\{pipeline_name}.
330
+ #
331
+ # @yield [response, operation] Access the result along with the RPC operation
332
+ # @yieldparam response [::Google::Cloud::Deploy::V1::DeliveryPipeline]
333
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
334
+ #
335
+ # @return [::Google::Cloud::Deploy::V1::DeliveryPipeline]
336
+ #
337
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
338
+ #
339
+ def get_delivery_pipeline request, options = nil
340
+ raise ::ArgumentError, "request must be provided" if request.nil?
341
+
342
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Deploy::V1::GetDeliveryPipelineRequest
343
+
344
+ # Converts hash and nil to an options object
345
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
346
+
347
+ # Customize the options with defaults
348
+ metadata = @config.rpcs.get_delivery_pipeline.metadata.to_h
349
+
350
+ # Set x-goog-api-client and x-goog-user-project headers
351
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
352
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
353
+ gapic_version: ::Google::Cloud::Deploy::V1::VERSION
354
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
355
+
356
+ header_params = {
357
+ "name" => request.name
358
+ }
359
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
360
+ metadata[:"x-goog-request-params"] ||= request_params_header
361
+
362
+ options.apply_defaults timeout: @config.rpcs.get_delivery_pipeline.timeout,
363
+ metadata: metadata,
364
+ retry_policy: @config.rpcs.get_delivery_pipeline.retry_policy
365
+
366
+ options.apply_defaults timeout: @config.timeout,
367
+ metadata: @config.metadata,
368
+ retry_policy: @config.retry_policy
369
+
370
+ @cloud_deploy_stub.call_rpc :get_delivery_pipeline, request, options: options do |response, operation|
371
+ yield response, operation if block_given?
372
+ return response
373
+ end
374
+ rescue ::GRPC::BadStatus => e
375
+ raise ::Google::Cloud::Error.from_error(e)
376
+ end
377
+
378
+ ##
379
+ # Creates a new DeliveryPipeline in a given project and location.
380
+ #
381
+ # @overload create_delivery_pipeline(request, options = nil)
382
+ # Pass arguments to `create_delivery_pipeline` via a request object, either of type
383
+ # {::Google::Cloud::Deploy::V1::CreateDeliveryPipelineRequest} or an equivalent Hash.
384
+ #
385
+ # @param request [::Google::Cloud::Deploy::V1::CreateDeliveryPipelineRequest, ::Hash]
386
+ # A request object representing the call parameters. Required. To specify no
387
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
388
+ # @param options [::Gapic::CallOptions, ::Hash]
389
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
390
+ #
391
+ # @overload create_delivery_pipeline(parent: nil, delivery_pipeline_id: nil, delivery_pipeline: nil, request_id: nil, validate_only: nil)
392
+ # Pass arguments to `create_delivery_pipeline` via keyword arguments. Note that at
393
+ # least one keyword argument is required. To specify no parameters, or to keep all
394
+ # the default parameter values, pass an empty Hash as a request object (see above).
395
+ #
396
+ # @param parent [::String]
397
+ # Required. The parent collection in which the `DeliveryPipeline` should be created.
398
+ # Format should be projects/\\{project_id}/locations/\\{location_name}.
399
+ # @param delivery_pipeline_id [::String]
400
+ # Required. ID of the `DeliveryPipeline`.
401
+ # @param delivery_pipeline [::Google::Cloud::Deploy::V1::DeliveryPipeline, ::Hash]
402
+ # Required. The `DeliveryPipeline` to create.
403
+ # @param request_id [::String]
404
+ # Optional. A request ID to identify requests. Specify a unique request ID
405
+ # so that if you must retry your request, the server will know to ignore
406
+ # the request if it has already been completed. The server will guarantee
407
+ # that for at least 60 minutes since the first request.
408
+ #
409
+ # For example, consider a situation where you make an initial request and the
410
+ # request times out. If you make the request again with the same request ID,
411
+ # the server can check if original operation with the same request ID was
412
+ # received, and if so, will ignore the second request. This prevents clients
413
+ # from accidentally creating duplicate commitments.
414
+ #
415
+ # The request ID must be a valid UUID with the exception that zero UUID is
416
+ # not supported (00000000-0000-0000-0000-000000000000).
417
+ # @param validate_only [::Boolean]
418
+ # Optional. If set to true, the request is validated and the user is provided with
419
+ # an expected result, but no actual change is made.
420
+ #
421
+ # @yield [response, operation] Access the result along with the RPC operation
422
+ # @yieldparam response [::Gapic::Operation]
423
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
424
+ #
425
+ # @return [::Gapic::Operation]
426
+ #
427
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
428
+ #
429
+ def create_delivery_pipeline request, options = nil
430
+ raise ::ArgumentError, "request must be provided" if request.nil?
431
+
432
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Deploy::V1::CreateDeliveryPipelineRequest
433
+
434
+ # Converts hash and nil to an options object
435
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
436
+
437
+ # Customize the options with defaults
438
+ metadata = @config.rpcs.create_delivery_pipeline.metadata.to_h
439
+
440
+ # Set x-goog-api-client and x-goog-user-project headers
441
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
442
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
443
+ gapic_version: ::Google::Cloud::Deploy::V1::VERSION
444
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
445
+
446
+ header_params = {
447
+ "parent" => request.parent
448
+ }
449
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
450
+ metadata[:"x-goog-request-params"] ||= request_params_header
451
+
452
+ options.apply_defaults timeout: @config.rpcs.create_delivery_pipeline.timeout,
453
+ metadata: metadata,
454
+ retry_policy: @config.rpcs.create_delivery_pipeline.retry_policy
455
+
456
+ options.apply_defaults timeout: @config.timeout,
457
+ metadata: @config.metadata,
458
+ retry_policy: @config.retry_policy
459
+
460
+ @cloud_deploy_stub.call_rpc :create_delivery_pipeline, request, options: options do |response, operation|
461
+ response = ::Gapic::Operation.new response, @operations_client, options: options
462
+ yield response, operation if block_given?
463
+ return response
464
+ end
465
+ rescue ::GRPC::BadStatus => e
466
+ raise ::Google::Cloud::Error.from_error(e)
467
+ end
468
+
469
+ ##
470
+ # Updates the parameters of a single DeliveryPipeline.
471
+ #
472
+ # @overload update_delivery_pipeline(request, options = nil)
473
+ # Pass arguments to `update_delivery_pipeline` via a request object, either of type
474
+ # {::Google::Cloud::Deploy::V1::UpdateDeliveryPipelineRequest} or an equivalent Hash.
475
+ #
476
+ # @param request [::Google::Cloud::Deploy::V1::UpdateDeliveryPipelineRequest, ::Hash]
477
+ # A request object representing the call parameters. Required. To specify no
478
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
479
+ # @param options [::Gapic::CallOptions, ::Hash]
480
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
481
+ #
482
+ # @overload update_delivery_pipeline(update_mask: nil, delivery_pipeline: nil, request_id: nil, allow_missing: nil, validate_only: nil)
483
+ # Pass arguments to `update_delivery_pipeline` via keyword arguments. Note that at
484
+ # least one keyword argument is required. To specify no parameters, or to keep all
485
+ # the default parameter values, pass an empty Hash as a request object (see above).
486
+ #
487
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
488
+ # Required. Field mask is used to specify the fields to be overwritten in the
489
+ # `DeliveryPipeline` resource by the update.
490
+ # The fields specified in the update_mask are relative to the resource, not
491
+ # the full request. A field will be overwritten if it is in the mask. If the
492
+ # user does not provide a mask then all fields will be overwritten.
493
+ # @param delivery_pipeline [::Google::Cloud::Deploy::V1::DeliveryPipeline, ::Hash]
494
+ # Required. The `DeliveryPipeline` to update.
495
+ # @param request_id [::String]
496
+ # Optional. A request ID to identify requests. Specify a unique request ID
497
+ # so that if you must retry your request, the server will know to ignore
498
+ # the request if it has already been completed. The server will guarantee
499
+ # that for at least 60 minutes since the first request.
500
+ #
501
+ # For example, consider a situation where you make an initial request and the
502
+ # request times out. If you make the request again with the same request ID,
503
+ # the server can check if original operation with the same request ID was
504
+ # received, and if so, will ignore the second request. This prevents clients
505
+ # from accidentally creating duplicate commitments.
506
+ #
507
+ # The request ID must be a valid UUID with the exception that zero UUID is
508
+ # not supported (00000000-0000-0000-0000-000000000000).
509
+ # @param allow_missing [::Boolean]
510
+ # Optional. If set to true, updating a `DeliveryPipeline` that does not exist will
511
+ # result in the creation of a new `DeliveryPipeline`.
512
+ # @param validate_only [::Boolean]
513
+ # Optional. If set to true, the request is validated and the user is provided with
514
+ # an expected result, but no actual change is made.
515
+ #
516
+ # @yield [response, operation] Access the result along with the RPC operation
517
+ # @yieldparam response [::Gapic::Operation]
518
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
519
+ #
520
+ # @return [::Gapic::Operation]
521
+ #
522
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
523
+ #
524
+ def update_delivery_pipeline request, options = nil
525
+ raise ::ArgumentError, "request must be provided" if request.nil?
526
+
527
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Deploy::V1::UpdateDeliveryPipelineRequest
528
+
529
+ # Converts hash and nil to an options object
530
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
531
+
532
+ # Customize the options with defaults
533
+ metadata = @config.rpcs.update_delivery_pipeline.metadata.to_h
534
+
535
+ # Set x-goog-api-client and x-goog-user-project headers
536
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
537
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
538
+ gapic_version: ::Google::Cloud::Deploy::V1::VERSION
539
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
540
+
541
+ header_params = {
542
+ "delivery_pipeline.name" => request.delivery_pipeline.name
543
+ }
544
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
545
+ metadata[:"x-goog-request-params"] ||= request_params_header
546
+
547
+ options.apply_defaults timeout: @config.rpcs.update_delivery_pipeline.timeout,
548
+ metadata: metadata,
549
+ retry_policy: @config.rpcs.update_delivery_pipeline.retry_policy
550
+
551
+ options.apply_defaults timeout: @config.timeout,
552
+ metadata: @config.metadata,
553
+ retry_policy: @config.retry_policy
554
+
555
+ @cloud_deploy_stub.call_rpc :update_delivery_pipeline, request, options: options do |response, operation|
556
+ response = ::Gapic::Operation.new response, @operations_client, options: options
557
+ yield response, operation if block_given?
558
+ return response
559
+ end
560
+ rescue ::GRPC::BadStatus => e
561
+ raise ::Google::Cloud::Error.from_error(e)
562
+ end
563
+
564
+ ##
565
+ # Deletes a single DeliveryPipeline.
566
+ #
567
+ # @overload delete_delivery_pipeline(request, options = nil)
568
+ # Pass arguments to `delete_delivery_pipeline` via a request object, either of type
569
+ # {::Google::Cloud::Deploy::V1::DeleteDeliveryPipelineRequest} or an equivalent Hash.
570
+ #
571
+ # @param request [::Google::Cloud::Deploy::V1::DeleteDeliveryPipelineRequest, ::Hash]
572
+ # A request object representing the call parameters. Required. To specify no
573
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
574
+ # @param options [::Gapic::CallOptions, ::Hash]
575
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
576
+ #
577
+ # @overload delete_delivery_pipeline(name: nil, request_id: nil, allow_missing: nil, validate_only: nil, force: nil, etag: nil)
578
+ # Pass arguments to `delete_delivery_pipeline` via keyword arguments. Note that at
579
+ # least one keyword argument is required. To specify no parameters, or to keep all
580
+ # the default parameter values, pass an empty Hash as a request object (see above).
581
+ #
582
+ # @param name [::String]
583
+ # Required. The name of the `DeliveryPipeline` to delete. Format should be
584
+ # projects/\\{project_id}/locations/\\{location_name}/deliveryPipelines/\\{pipeline_name}.
585
+ # @param request_id [::String]
586
+ # Optional. A request ID to identify requests. Specify a unique request ID
587
+ # so that if you must retry your request, the server will know to ignore
588
+ # the request if it has already been completed. The server will guarantee
589
+ # that for at least 60 minutes after the first request.
590
+ #
591
+ # For example, consider a situation where you make an initial request and the
592
+ # request times out. If you make the request again with the same request ID,
593
+ # the server can check if original operation with the same request ID was
594
+ # received, and if so, will ignore the second request. This prevents clients
595
+ # from accidentally creating duplicate commitments.
596
+ #
597
+ # The request ID must be a valid UUID with the exception that zero UUID is
598
+ # not supported (00000000-0000-0000-0000-000000000000).
599
+ # @param allow_missing [::Boolean]
600
+ # Optional. If set to true, then deleting an already deleted or non-existing
601
+ # `DeliveryPipeline` will succeed.
602
+ # @param validate_only [::Boolean]
603
+ # Optional. If set, validate the request and preview the review, but do not actually
604
+ # post it.
605
+ # @param force [::Boolean]
606
+ # Optional. If set to true, all child resources under this pipeline will also be
607
+ # deleted. Otherwise, the request will only work if the pipeline has
608
+ # no child resources.
609
+ # @param etag [::String]
610
+ # Optional. This checksum is computed by the server based on the value of other
611
+ # fields, and may be sent on update and delete requests to ensure the
612
+ # client has an up-to-date value before proceeding.
613
+ #
614
+ # @yield [response, operation] Access the result along with the RPC operation
615
+ # @yieldparam response [::Gapic::Operation]
616
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
617
+ #
618
+ # @return [::Gapic::Operation]
619
+ #
620
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
621
+ #
622
+ def delete_delivery_pipeline request, options = nil
623
+ raise ::ArgumentError, "request must be provided" if request.nil?
624
+
625
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Deploy::V1::DeleteDeliveryPipelineRequest
626
+
627
+ # Converts hash and nil to an options object
628
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
629
+
630
+ # Customize the options with defaults
631
+ metadata = @config.rpcs.delete_delivery_pipeline.metadata.to_h
632
+
633
+ # Set x-goog-api-client and x-goog-user-project headers
634
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
635
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
636
+ gapic_version: ::Google::Cloud::Deploy::V1::VERSION
637
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
638
+
639
+ header_params = {
640
+ "name" => request.name
641
+ }
642
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
643
+ metadata[:"x-goog-request-params"] ||= request_params_header
644
+
645
+ options.apply_defaults timeout: @config.rpcs.delete_delivery_pipeline.timeout,
646
+ metadata: metadata,
647
+ retry_policy: @config.rpcs.delete_delivery_pipeline.retry_policy
648
+
649
+ options.apply_defaults timeout: @config.timeout,
650
+ metadata: @config.metadata,
651
+ retry_policy: @config.retry_policy
652
+
653
+ @cloud_deploy_stub.call_rpc :delete_delivery_pipeline, request, options: options do |response, operation|
654
+ response = ::Gapic::Operation.new response, @operations_client, options: options
655
+ yield response, operation if block_given?
656
+ return response
657
+ end
658
+ rescue ::GRPC::BadStatus => e
659
+ raise ::Google::Cloud::Error.from_error(e)
660
+ end
661
+
662
+ ##
663
+ # Lists Targets in a given project and location.
664
+ #
665
+ # @overload list_targets(request, options = nil)
666
+ # Pass arguments to `list_targets` via a request object, either of type
667
+ # {::Google::Cloud::Deploy::V1::ListTargetsRequest} or an equivalent Hash.
668
+ #
669
+ # @param request [::Google::Cloud::Deploy::V1::ListTargetsRequest, ::Hash]
670
+ # A request object representing the call parameters. Required. To specify no
671
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
672
+ # @param options [::Gapic::CallOptions, ::Hash]
673
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
674
+ #
675
+ # @overload list_targets(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
676
+ # Pass arguments to `list_targets` via keyword arguments. Note that at
677
+ # least one keyword argument is required. To specify no parameters, or to keep all
678
+ # the default parameter values, pass an empty Hash as a request object (see above).
679
+ #
680
+ # @param parent [::String]
681
+ # Required. The parent, which owns this collection of targets. Format must be
682
+ # projects/\\{project_id}/locations/\\{location_name}.
683
+ # @param page_size [::Integer]
684
+ # Optional. The maximum number of `Target` objects to return. The service may return
685
+ # fewer than this value. If unspecified, at most 50 `Target` objects will be
686
+ # returned. The maximum value is 1000; values above 1000 will be set to 1000.
687
+ # @param page_token [::String]
688
+ # Optional. A page token, received from a previous `ListTargets` call.
689
+ # Provide this to retrieve the subsequent page.
690
+ #
691
+ # When paginating, all other provided parameters match
692
+ # the call that provided the page token.
693
+ # @param filter [::String]
694
+ # Optional. Filter builds to be returned. See https://google.aip.dev/160 for more
695
+ # details.
696
+ # @param order_by [::String]
697
+ # Optional. Field to sort by. See https://google.aip.dev/132#ordering for more details.
698
+ #
699
+ # @yield [response, operation] Access the result along with the RPC operation
700
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Deploy::V1::Target>]
701
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
702
+ #
703
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::Deploy::V1::Target>]
704
+ #
705
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
706
+ #
707
+ def list_targets request, options = nil
708
+ raise ::ArgumentError, "request must be provided" if request.nil?
709
+
710
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Deploy::V1::ListTargetsRequest
711
+
712
+ # Converts hash and nil to an options object
713
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
714
+
715
+ # Customize the options with defaults
716
+ metadata = @config.rpcs.list_targets.metadata.to_h
717
+
718
+ # Set x-goog-api-client and x-goog-user-project headers
719
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
720
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
721
+ gapic_version: ::Google::Cloud::Deploy::V1::VERSION
722
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
723
+
724
+ header_params = {
725
+ "parent" => request.parent
726
+ }
727
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
728
+ metadata[:"x-goog-request-params"] ||= request_params_header
729
+
730
+ options.apply_defaults timeout: @config.rpcs.list_targets.timeout,
731
+ metadata: metadata,
732
+ retry_policy: @config.rpcs.list_targets.retry_policy
733
+
734
+ options.apply_defaults timeout: @config.timeout,
735
+ metadata: @config.metadata,
736
+ retry_policy: @config.retry_policy
737
+
738
+ @cloud_deploy_stub.call_rpc :list_targets, request, options: options do |response, operation|
739
+ response = ::Gapic::PagedEnumerable.new @cloud_deploy_stub, :list_targets, request, response, operation, options
740
+ yield response, operation if block_given?
741
+ return response
742
+ end
743
+ rescue ::GRPC::BadStatus => e
744
+ raise ::Google::Cloud::Error.from_error(e)
745
+ end
746
+
747
+ ##
748
+ # Gets details of a single Target.
749
+ #
750
+ # @overload get_target(request, options = nil)
751
+ # Pass arguments to `get_target` via a request object, either of type
752
+ # {::Google::Cloud::Deploy::V1::GetTargetRequest} or an equivalent Hash.
753
+ #
754
+ # @param request [::Google::Cloud::Deploy::V1::GetTargetRequest, ::Hash]
755
+ # A request object representing the call parameters. Required. To specify no
756
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
757
+ # @param options [::Gapic::CallOptions, ::Hash]
758
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
759
+ #
760
+ # @overload get_target(name: nil)
761
+ # Pass arguments to `get_target` via keyword arguments. Note that at
762
+ # least one keyword argument is required. To specify no parameters, or to keep all
763
+ # the default parameter values, pass an empty Hash as a request object (see above).
764
+ #
765
+ # @param name [::String]
766
+ # Required. Name of the `Target`. Format must be
767
+ # projects/\\{project_id}/locations/\\{location_name}/targets/\\{target_name}.
768
+ #
769
+ # @yield [response, operation] Access the result along with the RPC operation
770
+ # @yieldparam response [::Google::Cloud::Deploy::V1::Target]
771
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
772
+ #
773
+ # @return [::Google::Cloud::Deploy::V1::Target]
774
+ #
775
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
776
+ #
777
+ def get_target request, options = nil
778
+ raise ::ArgumentError, "request must be provided" if request.nil?
779
+
780
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Deploy::V1::GetTargetRequest
781
+
782
+ # Converts hash and nil to an options object
783
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
784
+
785
+ # Customize the options with defaults
786
+ metadata = @config.rpcs.get_target.metadata.to_h
787
+
788
+ # Set x-goog-api-client and x-goog-user-project headers
789
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
790
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
791
+ gapic_version: ::Google::Cloud::Deploy::V1::VERSION
792
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
793
+
794
+ header_params = {
795
+ "name" => request.name
796
+ }
797
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
798
+ metadata[:"x-goog-request-params"] ||= request_params_header
799
+
800
+ options.apply_defaults timeout: @config.rpcs.get_target.timeout,
801
+ metadata: metadata,
802
+ retry_policy: @config.rpcs.get_target.retry_policy
803
+
804
+ options.apply_defaults timeout: @config.timeout,
805
+ metadata: @config.metadata,
806
+ retry_policy: @config.retry_policy
807
+
808
+ @cloud_deploy_stub.call_rpc :get_target, request, options: options do |response, operation|
809
+ yield response, operation if block_given?
810
+ return response
811
+ end
812
+ rescue ::GRPC::BadStatus => e
813
+ raise ::Google::Cloud::Error.from_error(e)
814
+ end
815
+
816
+ ##
817
+ # Creates a new Target in a given project and location.
818
+ #
819
+ # @overload create_target(request, options = nil)
820
+ # Pass arguments to `create_target` via a request object, either of type
821
+ # {::Google::Cloud::Deploy::V1::CreateTargetRequest} or an equivalent Hash.
822
+ #
823
+ # @param request [::Google::Cloud::Deploy::V1::CreateTargetRequest, ::Hash]
824
+ # A request object representing the call parameters. Required. To specify no
825
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
826
+ # @param options [::Gapic::CallOptions, ::Hash]
827
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
828
+ #
829
+ # @overload create_target(parent: nil, target_id: nil, target: nil, request_id: nil, validate_only: nil)
830
+ # Pass arguments to `create_target` via keyword arguments. Note that at
831
+ # least one keyword argument is required. To specify no parameters, or to keep all
832
+ # the default parameter values, pass an empty Hash as a request object (see above).
833
+ #
834
+ # @param parent [::String]
835
+ # Required. The parent collection in which the `Target` should be created.
836
+ # Format should be
837
+ # projects/\\{project_id}/locations/\\{location_name}.
838
+ # @param target_id [::String]
839
+ # Required. ID of the `Target`.
840
+ # @param target [::Google::Cloud::Deploy::V1::Target, ::Hash]
841
+ # Required. The `Target` to create.
842
+ # @param request_id [::String]
843
+ # Optional. A request ID to identify requests. Specify a unique request ID
844
+ # so that if you must retry your request, the server will know to ignore
845
+ # the request if it has already been completed. The server will guarantee
846
+ # that for at least 60 minutes since the first request.
847
+ #
848
+ # For example, consider a situation where you make an initial request and the
849
+ # request times out. If you make the request again with the same request ID,
850
+ # the server can check if original operation with the same request ID was
851
+ # received, and if so, will ignore the second request. This prevents clients
852
+ # from accidentally creating duplicate commitments.
853
+ #
854
+ # The request ID must be a valid UUID with the exception that zero UUID is
855
+ # not supported (00000000-0000-0000-0000-000000000000).
856
+ # @param validate_only [::Boolean]
857
+ # Optional. If set to true, the request is validated and the user is provided with
858
+ # an expected result, but no actual change is made.
859
+ #
860
+ # @yield [response, operation] Access the result along with the RPC operation
861
+ # @yieldparam response [::Gapic::Operation]
862
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
863
+ #
864
+ # @return [::Gapic::Operation]
865
+ #
866
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
867
+ #
868
+ def create_target request, options = nil
869
+ raise ::ArgumentError, "request must be provided" if request.nil?
870
+
871
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Deploy::V1::CreateTargetRequest
872
+
873
+ # Converts hash and nil to an options object
874
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
875
+
876
+ # Customize the options with defaults
877
+ metadata = @config.rpcs.create_target.metadata.to_h
878
+
879
+ # Set x-goog-api-client and x-goog-user-project headers
880
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
881
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
882
+ gapic_version: ::Google::Cloud::Deploy::V1::VERSION
883
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
884
+
885
+ header_params = {
886
+ "parent" => request.parent
887
+ }
888
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
889
+ metadata[:"x-goog-request-params"] ||= request_params_header
890
+
891
+ options.apply_defaults timeout: @config.rpcs.create_target.timeout,
892
+ metadata: metadata,
893
+ retry_policy: @config.rpcs.create_target.retry_policy
894
+
895
+ options.apply_defaults timeout: @config.timeout,
896
+ metadata: @config.metadata,
897
+ retry_policy: @config.retry_policy
898
+
899
+ @cloud_deploy_stub.call_rpc :create_target, request, options: options do |response, operation|
900
+ response = ::Gapic::Operation.new response, @operations_client, options: options
901
+ yield response, operation if block_given?
902
+ return response
903
+ end
904
+ rescue ::GRPC::BadStatus => e
905
+ raise ::Google::Cloud::Error.from_error(e)
906
+ end
907
+
908
+ ##
909
+ # Updates the parameters of a single Target.
910
+ #
911
+ # @overload update_target(request, options = nil)
912
+ # Pass arguments to `update_target` via a request object, either of type
913
+ # {::Google::Cloud::Deploy::V1::UpdateTargetRequest} or an equivalent Hash.
914
+ #
915
+ # @param request [::Google::Cloud::Deploy::V1::UpdateTargetRequest, ::Hash]
916
+ # A request object representing the call parameters. Required. To specify no
917
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
918
+ # @param options [::Gapic::CallOptions, ::Hash]
919
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
920
+ #
921
+ # @overload update_target(update_mask: nil, target: nil, request_id: nil, allow_missing: nil, validate_only: nil)
922
+ # Pass arguments to `update_target` via keyword arguments. Note that at
923
+ # least one keyword argument is required. To specify no parameters, or to keep all
924
+ # the default parameter values, pass an empty Hash as a request object (see above).
925
+ #
926
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
927
+ # Required. Field mask is used to specify the fields to be overwritten in the
928
+ # Target resource by the update.
929
+ # The fields specified in the update_mask are relative to the resource, not
930
+ # the full request. A field will be overwritten if it is in the mask. If the
931
+ # user does not provide a mask then all fields will be overwritten.
932
+ # @param target [::Google::Cloud::Deploy::V1::Target, ::Hash]
933
+ # Required. The `Target` to update.
934
+ # @param request_id [::String]
935
+ # Optional. A request ID to identify requests. Specify a unique request ID
936
+ # so that if you must retry your request, the server will know to ignore
937
+ # the request if it has already been completed. The server will guarantee
938
+ # that for at least 60 minutes since the first request.
939
+ #
940
+ # For example, consider a situation where you make an initial request and the
941
+ # request times out. If you make the request again with the same request ID,
942
+ # the server can check if original operation with the same request ID was
943
+ # received, and if so, will ignore the second request. This prevents clients
944
+ # from accidentally creating duplicate commitments.
945
+ #
946
+ # The request ID must be a valid UUID with the exception that zero UUID is
947
+ # not supported (00000000-0000-0000-0000-000000000000).
948
+ # @param allow_missing [::Boolean]
949
+ # Optional. If set to true, updating a `Target` that does not exist will
950
+ # result in the creation of a new `Target`.
951
+ # @param validate_only [::Boolean]
952
+ # Optional. If set to true, the request is validated and the user is provided with
953
+ # an expected result, but no actual change is made.
954
+ #
955
+ # @yield [response, operation] Access the result along with the RPC operation
956
+ # @yieldparam response [::Gapic::Operation]
957
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
958
+ #
959
+ # @return [::Gapic::Operation]
960
+ #
961
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
962
+ #
963
+ def update_target request, options = nil
964
+ raise ::ArgumentError, "request must be provided" if request.nil?
965
+
966
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Deploy::V1::UpdateTargetRequest
967
+
968
+ # Converts hash and nil to an options object
969
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
970
+
971
+ # Customize the options with defaults
972
+ metadata = @config.rpcs.update_target.metadata.to_h
973
+
974
+ # Set x-goog-api-client and x-goog-user-project headers
975
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
976
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
977
+ gapic_version: ::Google::Cloud::Deploy::V1::VERSION
978
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
979
+
980
+ header_params = {
981
+ "target.name" => request.target.name
982
+ }
983
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
984
+ metadata[:"x-goog-request-params"] ||= request_params_header
985
+
986
+ options.apply_defaults timeout: @config.rpcs.update_target.timeout,
987
+ metadata: metadata,
988
+ retry_policy: @config.rpcs.update_target.retry_policy
989
+
990
+ options.apply_defaults timeout: @config.timeout,
991
+ metadata: @config.metadata,
992
+ retry_policy: @config.retry_policy
993
+
994
+ @cloud_deploy_stub.call_rpc :update_target, request, options: options do |response, operation|
995
+ response = ::Gapic::Operation.new response, @operations_client, options: options
996
+ yield response, operation if block_given?
997
+ return response
998
+ end
999
+ rescue ::GRPC::BadStatus => e
1000
+ raise ::Google::Cloud::Error.from_error(e)
1001
+ end
1002
+
1003
+ ##
1004
+ # Deletes a single Target.
1005
+ #
1006
+ # @overload delete_target(request, options = nil)
1007
+ # Pass arguments to `delete_target` via a request object, either of type
1008
+ # {::Google::Cloud::Deploy::V1::DeleteTargetRequest} or an equivalent Hash.
1009
+ #
1010
+ # @param request [::Google::Cloud::Deploy::V1::DeleteTargetRequest, ::Hash]
1011
+ # A request object representing the call parameters. Required. To specify no
1012
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1013
+ # @param options [::Gapic::CallOptions, ::Hash]
1014
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1015
+ #
1016
+ # @overload delete_target(name: nil, request_id: nil, allow_missing: nil, validate_only: nil, etag: nil)
1017
+ # Pass arguments to `delete_target` via keyword arguments. Note that at
1018
+ # least one keyword argument is required. To specify no parameters, or to keep all
1019
+ # the default parameter values, pass an empty Hash as a request object (see above).
1020
+ #
1021
+ # @param name [::String]
1022
+ # Required. The name of the `Target` to delete. Format should be
1023
+ # projects/\\{project_id}/locations/\\{location_name}/targets/\\{target_name}.
1024
+ # @param request_id [::String]
1025
+ # Optional. A request ID to identify requests. Specify a unique request ID
1026
+ # so that if you must retry your request, the server will know to ignore
1027
+ # the request if it has already been completed. The server will guarantee
1028
+ # that for at least 60 minutes after the first request.
1029
+ #
1030
+ # For example, consider a situation where you make an initial request and the
1031
+ # request times out. If you make the request again with the same request ID,
1032
+ # the server can check if original operation with the same request ID was
1033
+ # received, and if so, will ignore the second request. This prevents clients
1034
+ # from accidentally creating duplicate commitments.
1035
+ #
1036
+ # The request ID must be a valid UUID with the exception that zero UUID is
1037
+ # not supported (00000000-0000-0000-0000-000000000000).
1038
+ # @param allow_missing [::Boolean]
1039
+ # Optional. If set to true, then deleting an already deleted or non-existing
1040
+ # DeliveryPipeline will succeed.
1041
+ # @param validate_only [::Boolean]
1042
+ # Optional. If set, validate the request and preview the review, but do not actually
1043
+ # post it.
1044
+ # @param etag [::String]
1045
+ # Optional. This checksum is computed by the server based on the value of other
1046
+ # fields, and may be sent on update and delete requests to ensure the
1047
+ # client has an up-to-date value before proceeding.
1048
+ #
1049
+ # @yield [response, operation] Access the result along with the RPC operation
1050
+ # @yieldparam response [::Gapic::Operation]
1051
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1052
+ #
1053
+ # @return [::Gapic::Operation]
1054
+ #
1055
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1056
+ #
1057
+ def delete_target request, options = nil
1058
+ raise ::ArgumentError, "request must be provided" if request.nil?
1059
+
1060
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Deploy::V1::DeleteTargetRequest
1061
+
1062
+ # Converts hash and nil to an options object
1063
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1064
+
1065
+ # Customize the options with defaults
1066
+ metadata = @config.rpcs.delete_target.metadata.to_h
1067
+
1068
+ # Set x-goog-api-client and x-goog-user-project headers
1069
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1070
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1071
+ gapic_version: ::Google::Cloud::Deploy::V1::VERSION
1072
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1073
+
1074
+ header_params = {
1075
+ "name" => request.name
1076
+ }
1077
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1078
+ metadata[:"x-goog-request-params"] ||= request_params_header
1079
+
1080
+ options.apply_defaults timeout: @config.rpcs.delete_target.timeout,
1081
+ metadata: metadata,
1082
+ retry_policy: @config.rpcs.delete_target.retry_policy
1083
+
1084
+ options.apply_defaults timeout: @config.timeout,
1085
+ metadata: @config.metadata,
1086
+ retry_policy: @config.retry_policy
1087
+
1088
+ @cloud_deploy_stub.call_rpc :delete_target, request, options: options do |response, operation|
1089
+ response = ::Gapic::Operation.new response, @operations_client, options: options
1090
+ yield response, operation if block_given?
1091
+ return response
1092
+ end
1093
+ rescue ::GRPC::BadStatus => e
1094
+ raise ::Google::Cloud::Error.from_error(e)
1095
+ end
1096
+
1097
+ ##
1098
+ # Lists Releases in a given project and location.
1099
+ #
1100
+ # @overload list_releases(request, options = nil)
1101
+ # Pass arguments to `list_releases` via a request object, either of type
1102
+ # {::Google::Cloud::Deploy::V1::ListReleasesRequest} or an equivalent Hash.
1103
+ #
1104
+ # @param request [::Google::Cloud::Deploy::V1::ListReleasesRequest, ::Hash]
1105
+ # A request object representing the call parameters. Required. To specify no
1106
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1107
+ # @param options [::Gapic::CallOptions, ::Hash]
1108
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1109
+ #
1110
+ # @overload list_releases(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
1111
+ # Pass arguments to `list_releases` via keyword arguments. Note that at
1112
+ # least one keyword argument is required. To specify no parameters, or to keep all
1113
+ # the default parameter values, pass an empty Hash as a request object (see above).
1114
+ #
1115
+ # @param parent [::String]
1116
+ # Required. The `DeliveryPipeline` which owns this collection of `Release` objects.
1117
+ # @param page_size [::Integer]
1118
+ # Optional. The maximum number of `Release` objects to return. The service may return
1119
+ # fewer than this value. If unspecified, at most 50 `Release` objects will be
1120
+ # returned. The maximum value is 1000; values above 1000 will be set to 1000.
1121
+ # @param page_token [::String]
1122
+ # Optional. A page token, received from a previous `ListReleases` call.
1123
+ # Provide this to retrieve the subsequent page.
1124
+ #
1125
+ # When paginating, all other provided parameters match
1126
+ # the call that provided the page token.
1127
+ # @param filter [::String]
1128
+ # Optional. Filter builds to be returned. See https://google.aip.dev/160 for more
1129
+ # details.
1130
+ # @param order_by [::String]
1131
+ # Optional. Field to sort by. See https://google.aip.dev/132#ordering for more details.
1132
+ #
1133
+ # @yield [response, operation] Access the result along with the RPC operation
1134
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Deploy::V1::Release>]
1135
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1136
+ #
1137
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::Deploy::V1::Release>]
1138
+ #
1139
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1140
+ #
1141
+ def list_releases request, options = nil
1142
+ raise ::ArgumentError, "request must be provided" if request.nil?
1143
+
1144
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Deploy::V1::ListReleasesRequest
1145
+
1146
+ # Converts hash and nil to an options object
1147
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1148
+
1149
+ # Customize the options with defaults
1150
+ metadata = @config.rpcs.list_releases.metadata.to_h
1151
+
1152
+ # Set x-goog-api-client and x-goog-user-project headers
1153
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1154
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1155
+ gapic_version: ::Google::Cloud::Deploy::V1::VERSION
1156
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1157
+
1158
+ header_params = {
1159
+ "parent" => request.parent
1160
+ }
1161
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1162
+ metadata[:"x-goog-request-params"] ||= request_params_header
1163
+
1164
+ options.apply_defaults timeout: @config.rpcs.list_releases.timeout,
1165
+ metadata: metadata,
1166
+ retry_policy: @config.rpcs.list_releases.retry_policy
1167
+
1168
+ options.apply_defaults timeout: @config.timeout,
1169
+ metadata: @config.metadata,
1170
+ retry_policy: @config.retry_policy
1171
+
1172
+ @cloud_deploy_stub.call_rpc :list_releases, request, options: options do |response, operation|
1173
+ response = ::Gapic::PagedEnumerable.new @cloud_deploy_stub, :list_releases, request, response, operation, options
1174
+ yield response, operation if block_given?
1175
+ return response
1176
+ end
1177
+ rescue ::GRPC::BadStatus => e
1178
+ raise ::Google::Cloud::Error.from_error(e)
1179
+ end
1180
+
1181
+ ##
1182
+ # Gets details of a single Release.
1183
+ #
1184
+ # @overload get_release(request, options = nil)
1185
+ # Pass arguments to `get_release` via a request object, either of type
1186
+ # {::Google::Cloud::Deploy::V1::GetReleaseRequest} or an equivalent Hash.
1187
+ #
1188
+ # @param request [::Google::Cloud::Deploy::V1::GetReleaseRequest, ::Hash]
1189
+ # A request object representing the call parameters. Required. To specify no
1190
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1191
+ # @param options [::Gapic::CallOptions, ::Hash]
1192
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1193
+ #
1194
+ # @overload get_release(name: nil)
1195
+ # Pass arguments to `get_release` via keyword arguments. Note that at
1196
+ # least one keyword argument is required. To specify no parameters, or to keep all
1197
+ # the default parameter values, pass an empty Hash as a request object (see above).
1198
+ #
1199
+ # @param name [::String]
1200
+ # Required. Name of the `Release`. Format must be
1201
+ # projects/\\{project_id}/locations/\\{location_name}/deliveryPipelines/\\{pipeline_name}/releases/\\{release_name}.
1202
+ #
1203
+ # @yield [response, operation] Access the result along with the RPC operation
1204
+ # @yieldparam response [::Google::Cloud::Deploy::V1::Release]
1205
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1206
+ #
1207
+ # @return [::Google::Cloud::Deploy::V1::Release]
1208
+ #
1209
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1210
+ #
1211
+ def get_release request, options = nil
1212
+ raise ::ArgumentError, "request must be provided" if request.nil?
1213
+
1214
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Deploy::V1::GetReleaseRequest
1215
+
1216
+ # Converts hash and nil to an options object
1217
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1218
+
1219
+ # Customize the options with defaults
1220
+ metadata = @config.rpcs.get_release.metadata.to_h
1221
+
1222
+ # Set x-goog-api-client and x-goog-user-project headers
1223
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1224
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1225
+ gapic_version: ::Google::Cloud::Deploy::V1::VERSION
1226
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1227
+
1228
+ header_params = {
1229
+ "name" => request.name
1230
+ }
1231
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1232
+ metadata[:"x-goog-request-params"] ||= request_params_header
1233
+
1234
+ options.apply_defaults timeout: @config.rpcs.get_release.timeout,
1235
+ metadata: metadata,
1236
+ retry_policy: @config.rpcs.get_release.retry_policy
1237
+
1238
+ options.apply_defaults timeout: @config.timeout,
1239
+ metadata: @config.metadata,
1240
+ retry_policy: @config.retry_policy
1241
+
1242
+ @cloud_deploy_stub.call_rpc :get_release, request, options: options do |response, operation|
1243
+ yield response, operation if block_given?
1244
+ return response
1245
+ end
1246
+ rescue ::GRPC::BadStatus => e
1247
+ raise ::Google::Cloud::Error.from_error(e)
1248
+ end
1249
+
1250
+ ##
1251
+ # Creates a new Release in a given project and location.
1252
+ #
1253
+ # @overload create_release(request, options = nil)
1254
+ # Pass arguments to `create_release` via a request object, either of type
1255
+ # {::Google::Cloud::Deploy::V1::CreateReleaseRequest} or an equivalent Hash.
1256
+ #
1257
+ # @param request [::Google::Cloud::Deploy::V1::CreateReleaseRequest, ::Hash]
1258
+ # A request object representing the call parameters. Required. To specify no
1259
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1260
+ # @param options [::Gapic::CallOptions, ::Hash]
1261
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1262
+ #
1263
+ # @overload create_release(parent: nil, release_id: nil, release: nil, request_id: nil, validate_only: nil)
1264
+ # Pass arguments to `create_release` via keyword arguments. Note that at
1265
+ # least one keyword argument is required. To specify no parameters, or to keep all
1266
+ # the default parameter values, pass an empty Hash as a request object (see above).
1267
+ #
1268
+ # @param parent [::String]
1269
+ # Required. The parent collection in which the `Release` should be created.
1270
+ # Format should be
1271
+ # projects/\\{project_id}/locations/\\{location_name}/deliveryPipelines/\\{pipeline_name}.
1272
+ # @param release_id [::String]
1273
+ # Required. ID of the `Release`.
1274
+ # @param release [::Google::Cloud::Deploy::V1::Release, ::Hash]
1275
+ # Required. The `Release` to create.
1276
+ # @param request_id [::String]
1277
+ # Optional. A request ID to identify requests. Specify a unique request ID
1278
+ # so that if you must retry your request, the server will know to ignore
1279
+ # the request if it has already been completed. The server will guarantee
1280
+ # that for at least 60 minutes since the first request.
1281
+ #
1282
+ # For example, consider a situation where you make an initial request and the
1283
+ # request times out. If you make the request again with the same request ID,
1284
+ # the server can check if original operation with the same request ID was
1285
+ # received, and if so, will ignore the second request. This prevents clients
1286
+ # from accidentally creating duplicate commitments.
1287
+ #
1288
+ # The request ID must be a valid UUID with the exception that zero UUID is
1289
+ # not supported (00000000-0000-0000-0000-000000000000).
1290
+ # @param validate_only [::Boolean]
1291
+ # Optional. If set to true, the request is validated and the user is provided with
1292
+ # an expected result, but no actual change is made.
1293
+ #
1294
+ # @yield [response, operation] Access the result along with the RPC operation
1295
+ # @yieldparam response [::Gapic::Operation]
1296
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1297
+ #
1298
+ # @return [::Gapic::Operation]
1299
+ #
1300
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1301
+ #
1302
+ def create_release request, options = nil
1303
+ raise ::ArgumentError, "request must be provided" if request.nil?
1304
+
1305
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Deploy::V1::CreateReleaseRequest
1306
+
1307
+ # Converts hash and nil to an options object
1308
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1309
+
1310
+ # Customize the options with defaults
1311
+ metadata = @config.rpcs.create_release.metadata.to_h
1312
+
1313
+ # Set x-goog-api-client and x-goog-user-project headers
1314
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1315
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1316
+ gapic_version: ::Google::Cloud::Deploy::V1::VERSION
1317
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1318
+
1319
+ header_params = {
1320
+ "parent" => request.parent
1321
+ }
1322
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1323
+ metadata[:"x-goog-request-params"] ||= request_params_header
1324
+
1325
+ options.apply_defaults timeout: @config.rpcs.create_release.timeout,
1326
+ metadata: metadata,
1327
+ retry_policy: @config.rpcs.create_release.retry_policy
1328
+
1329
+ options.apply_defaults timeout: @config.timeout,
1330
+ metadata: @config.metadata,
1331
+ retry_policy: @config.retry_policy
1332
+
1333
+ @cloud_deploy_stub.call_rpc :create_release, request, options: options do |response, operation|
1334
+ response = ::Gapic::Operation.new response, @operations_client, options: options
1335
+ yield response, operation if block_given?
1336
+ return response
1337
+ end
1338
+ rescue ::GRPC::BadStatus => e
1339
+ raise ::Google::Cloud::Error.from_error(e)
1340
+ end
1341
+
1342
+ ##
1343
+ # Approves a Rollout.
1344
+ #
1345
+ # @overload approve_rollout(request, options = nil)
1346
+ # Pass arguments to `approve_rollout` via a request object, either of type
1347
+ # {::Google::Cloud::Deploy::V1::ApproveRolloutRequest} or an equivalent Hash.
1348
+ #
1349
+ # @param request [::Google::Cloud::Deploy::V1::ApproveRolloutRequest, ::Hash]
1350
+ # A request object representing the call parameters. Required. To specify no
1351
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1352
+ # @param options [::Gapic::CallOptions, ::Hash]
1353
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1354
+ #
1355
+ # @overload approve_rollout(name: nil, approved: nil)
1356
+ # Pass arguments to `approve_rollout` via keyword arguments. Note that at
1357
+ # least one keyword argument is required. To specify no parameters, or to keep all
1358
+ # the default parameter values, pass an empty Hash as a request object (see above).
1359
+ #
1360
+ # @param name [::String]
1361
+ # Required. Name of the Rollout. Format is
1362
+ # projects/\\{project}/locations/\\{location}/deliveryPipelines/\\{deliveryPipeline}/
1363
+ # releases/\\{release}/rollouts/\\{rollout}.
1364
+ # @param approved [::Boolean]
1365
+ # Required. True = approve; false = reject
1366
+ #
1367
+ # @yield [response, operation] Access the result along with the RPC operation
1368
+ # @yieldparam response [::Google::Cloud::Deploy::V1::ApproveRolloutResponse]
1369
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1370
+ #
1371
+ # @return [::Google::Cloud::Deploy::V1::ApproveRolloutResponse]
1372
+ #
1373
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1374
+ #
1375
+ def approve_rollout request, options = nil
1376
+ raise ::ArgumentError, "request must be provided" if request.nil?
1377
+
1378
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Deploy::V1::ApproveRolloutRequest
1379
+
1380
+ # Converts hash and nil to an options object
1381
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1382
+
1383
+ # Customize the options with defaults
1384
+ metadata = @config.rpcs.approve_rollout.metadata.to_h
1385
+
1386
+ # Set x-goog-api-client and x-goog-user-project headers
1387
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1388
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1389
+ gapic_version: ::Google::Cloud::Deploy::V1::VERSION
1390
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1391
+
1392
+ header_params = {
1393
+ "name" => request.name
1394
+ }
1395
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1396
+ metadata[:"x-goog-request-params"] ||= request_params_header
1397
+
1398
+ options.apply_defaults timeout: @config.rpcs.approve_rollout.timeout,
1399
+ metadata: metadata,
1400
+ retry_policy: @config.rpcs.approve_rollout.retry_policy
1401
+
1402
+ options.apply_defaults timeout: @config.timeout,
1403
+ metadata: @config.metadata,
1404
+ retry_policy: @config.retry_policy
1405
+
1406
+ @cloud_deploy_stub.call_rpc :approve_rollout, request, options: options do |response, operation|
1407
+ yield response, operation if block_given?
1408
+ return response
1409
+ end
1410
+ rescue ::GRPC::BadStatus => e
1411
+ raise ::Google::Cloud::Error.from_error(e)
1412
+ end
1413
+
1414
+ ##
1415
+ # Lists Rollouts in a given project and location.
1416
+ #
1417
+ # @overload list_rollouts(request, options = nil)
1418
+ # Pass arguments to `list_rollouts` via a request object, either of type
1419
+ # {::Google::Cloud::Deploy::V1::ListRolloutsRequest} or an equivalent Hash.
1420
+ #
1421
+ # @param request [::Google::Cloud::Deploy::V1::ListRolloutsRequest, ::Hash]
1422
+ # A request object representing the call parameters. Required. To specify no
1423
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1424
+ # @param options [::Gapic::CallOptions, ::Hash]
1425
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1426
+ #
1427
+ # @overload list_rollouts(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
1428
+ # Pass arguments to `list_rollouts` via keyword arguments. Note that at
1429
+ # least one keyword argument is required. To specify no parameters, or to keep all
1430
+ # the default parameter values, pass an empty Hash as a request object (see above).
1431
+ #
1432
+ # @param parent [::String]
1433
+ # Required. The `Release` which owns this collection of `Rollout` objects.
1434
+ # @param page_size [::Integer]
1435
+ # Optional. The maximum number of `Rollout` objects to return. The service may return
1436
+ # fewer than this value. If unspecified, at most 50 `Rollout` objects will be
1437
+ # returned. The maximum value is 1000; values above 1000 will be set to 1000.
1438
+ # @param page_token [::String]
1439
+ # Optional. A page token, received from a previous `ListRollouts` call.
1440
+ # Provide this to retrieve the subsequent page.
1441
+ #
1442
+ # When paginating, all other provided parameters match
1443
+ # the call that provided the page token.
1444
+ # @param filter [::String]
1445
+ # Optional. Filter builds to be returned. See https://google.aip.dev/160 for more
1446
+ # details.
1447
+ # @param order_by [::String]
1448
+ # Optional. Field to sort by. See https://google.aip.dev/132#ordering for more details.
1449
+ #
1450
+ # @yield [response, operation] Access the result along with the RPC operation
1451
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Deploy::V1::Rollout>]
1452
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1453
+ #
1454
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::Deploy::V1::Rollout>]
1455
+ #
1456
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1457
+ #
1458
+ def list_rollouts request, options = nil
1459
+ raise ::ArgumentError, "request must be provided" if request.nil?
1460
+
1461
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Deploy::V1::ListRolloutsRequest
1462
+
1463
+ # Converts hash and nil to an options object
1464
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1465
+
1466
+ # Customize the options with defaults
1467
+ metadata = @config.rpcs.list_rollouts.metadata.to_h
1468
+
1469
+ # Set x-goog-api-client and x-goog-user-project headers
1470
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1471
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1472
+ gapic_version: ::Google::Cloud::Deploy::V1::VERSION
1473
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1474
+
1475
+ header_params = {
1476
+ "parent" => request.parent
1477
+ }
1478
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1479
+ metadata[:"x-goog-request-params"] ||= request_params_header
1480
+
1481
+ options.apply_defaults timeout: @config.rpcs.list_rollouts.timeout,
1482
+ metadata: metadata,
1483
+ retry_policy: @config.rpcs.list_rollouts.retry_policy
1484
+
1485
+ options.apply_defaults timeout: @config.timeout,
1486
+ metadata: @config.metadata,
1487
+ retry_policy: @config.retry_policy
1488
+
1489
+ @cloud_deploy_stub.call_rpc :list_rollouts, request, options: options do |response, operation|
1490
+ response = ::Gapic::PagedEnumerable.new @cloud_deploy_stub, :list_rollouts, request, response, operation, options
1491
+ yield response, operation if block_given?
1492
+ return response
1493
+ end
1494
+ rescue ::GRPC::BadStatus => e
1495
+ raise ::Google::Cloud::Error.from_error(e)
1496
+ end
1497
+
1498
+ ##
1499
+ # Gets details of a single Rollout.
1500
+ #
1501
+ # @overload get_rollout(request, options = nil)
1502
+ # Pass arguments to `get_rollout` via a request object, either of type
1503
+ # {::Google::Cloud::Deploy::V1::GetRolloutRequest} or an equivalent Hash.
1504
+ #
1505
+ # @param request [::Google::Cloud::Deploy::V1::GetRolloutRequest, ::Hash]
1506
+ # A request object representing the call parameters. Required. To specify no
1507
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1508
+ # @param options [::Gapic::CallOptions, ::Hash]
1509
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1510
+ #
1511
+ # @overload get_rollout(name: nil)
1512
+ # Pass arguments to `get_rollout` via keyword arguments. Note that at
1513
+ # least one keyword argument is required. To specify no parameters, or to keep all
1514
+ # the default parameter values, pass an empty Hash as a request object (see above).
1515
+ #
1516
+ # @param name [::String]
1517
+ # Required. Name of the `Rollout`. Format must be
1518
+ # projects/\\{project_id}/locations/\\{location_name}/deliveryPipelines/\\{pipeline_name}/releases/\\{release_name}/rollouts/\\{rollout_name}.
1519
+ #
1520
+ # @yield [response, operation] Access the result along with the RPC operation
1521
+ # @yieldparam response [::Google::Cloud::Deploy::V1::Rollout]
1522
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1523
+ #
1524
+ # @return [::Google::Cloud::Deploy::V1::Rollout]
1525
+ #
1526
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1527
+ #
1528
+ def get_rollout request, options = nil
1529
+ raise ::ArgumentError, "request must be provided" if request.nil?
1530
+
1531
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Deploy::V1::GetRolloutRequest
1532
+
1533
+ # Converts hash and nil to an options object
1534
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1535
+
1536
+ # Customize the options with defaults
1537
+ metadata = @config.rpcs.get_rollout.metadata.to_h
1538
+
1539
+ # Set x-goog-api-client and x-goog-user-project headers
1540
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1541
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1542
+ gapic_version: ::Google::Cloud::Deploy::V1::VERSION
1543
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1544
+
1545
+ header_params = {
1546
+ "name" => request.name
1547
+ }
1548
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1549
+ metadata[:"x-goog-request-params"] ||= request_params_header
1550
+
1551
+ options.apply_defaults timeout: @config.rpcs.get_rollout.timeout,
1552
+ metadata: metadata,
1553
+ retry_policy: @config.rpcs.get_rollout.retry_policy
1554
+
1555
+ options.apply_defaults timeout: @config.timeout,
1556
+ metadata: @config.metadata,
1557
+ retry_policy: @config.retry_policy
1558
+
1559
+ @cloud_deploy_stub.call_rpc :get_rollout, request, options: options do |response, operation|
1560
+ yield response, operation if block_given?
1561
+ return response
1562
+ end
1563
+ rescue ::GRPC::BadStatus => e
1564
+ raise ::Google::Cloud::Error.from_error(e)
1565
+ end
1566
+
1567
+ ##
1568
+ # Creates a new Rollout in a given project and location.
1569
+ #
1570
+ # @overload create_rollout(request, options = nil)
1571
+ # Pass arguments to `create_rollout` via a request object, either of type
1572
+ # {::Google::Cloud::Deploy::V1::CreateRolloutRequest} or an equivalent Hash.
1573
+ #
1574
+ # @param request [::Google::Cloud::Deploy::V1::CreateRolloutRequest, ::Hash]
1575
+ # A request object representing the call parameters. Required. To specify no
1576
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1577
+ # @param options [::Gapic::CallOptions, ::Hash]
1578
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1579
+ #
1580
+ # @overload create_rollout(parent: nil, rollout_id: nil, rollout: nil, request_id: nil, validate_only: nil)
1581
+ # Pass arguments to `create_rollout` via keyword arguments. Note that at
1582
+ # least one keyword argument is required. To specify no parameters, or to keep all
1583
+ # the default parameter values, pass an empty Hash as a request object (see above).
1584
+ #
1585
+ # @param parent [::String]
1586
+ # Required. The parent collection in which the `Rollout` should be created.
1587
+ # Format should be
1588
+ # projects/\\{project_id}/locations/\\{location_name}/deliveryPipelines/\\{pipeline_name}/releases/\\{release_name}.
1589
+ # @param rollout_id [::String]
1590
+ # Required. ID of the `Rollout`.
1591
+ # @param rollout [::Google::Cloud::Deploy::V1::Rollout, ::Hash]
1592
+ # Required. The `Rollout` to create.
1593
+ # @param request_id [::String]
1594
+ # Optional. A request ID to identify requests. Specify a unique request ID
1595
+ # so that if you must retry your request, the server will know to ignore
1596
+ # the request if it has already been completed. The server will guarantee
1597
+ # that for at least 60 minutes since the first request.
1598
+ #
1599
+ # For example, consider a situation where you make an initial request and the
1600
+ # request times out. If you make the request again with the same request ID,
1601
+ # the server can check if original operation with the same request ID was
1602
+ # received, and if so, will ignore the second request. This prevents clients
1603
+ # from accidentally creating duplicate commitments.
1604
+ #
1605
+ # The request ID must be a valid UUID with the exception that zero UUID is
1606
+ # not supported (00000000-0000-0000-0000-000000000000).
1607
+ # @param validate_only [::Boolean]
1608
+ # Optional. If set to true, the request is validated and the user is provided with
1609
+ # an expected result, but no actual change is made.
1610
+ #
1611
+ # @yield [response, operation] Access the result along with the RPC operation
1612
+ # @yieldparam response [::Gapic::Operation]
1613
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1614
+ #
1615
+ # @return [::Gapic::Operation]
1616
+ #
1617
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1618
+ #
1619
+ def create_rollout request, options = nil
1620
+ raise ::ArgumentError, "request must be provided" if request.nil?
1621
+
1622
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Deploy::V1::CreateRolloutRequest
1623
+
1624
+ # Converts hash and nil to an options object
1625
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1626
+
1627
+ # Customize the options with defaults
1628
+ metadata = @config.rpcs.create_rollout.metadata.to_h
1629
+
1630
+ # Set x-goog-api-client and x-goog-user-project headers
1631
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1632
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1633
+ gapic_version: ::Google::Cloud::Deploy::V1::VERSION
1634
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1635
+
1636
+ header_params = {
1637
+ "parent" => request.parent
1638
+ }
1639
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1640
+ metadata[:"x-goog-request-params"] ||= request_params_header
1641
+
1642
+ options.apply_defaults timeout: @config.rpcs.create_rollout.timeout,
1643
+ metadata: metadata,
1644
+ retry_policy: @config.rpcs.create_rollout.retry_policy
1645
+
1646
+ options.apply_defaults timeout: @config.timeout,
1647
+ metadata: @config.metadata,
1648
+ retry_policy: @config.retry_policy
1649
+
1650
+ @cloud_deploy_stub.call_rpc :create_rollout, request, options: options do |response, operation|
1651
+ response = ::Gapic::Operation.new response, @operations_client, options: options
1652
+ yield response, operation if block_given?
1653
+ return response
1654
+ end
1655
+ rescue ::GRPC::BadStatus => e
1656
+ raise ::Google::Cloud::Error.from_error(e)
1657
+ end
1658
+
1659
+ ##
1660
+ # Gets the configuration for a location.
1661
+ #
1662
+ # @overload get_config(request, options = nil)
1663
+ # Pass arguments to `get_config` via a request object, either of type
1664
+ # {::Google::Cloud::Deploy::V1::GetConfigRequest} or an equivalent Hash.
1665
+ #
1666
+ # @param request [::Google::Cloud::Deploy::V1::GetConfigRequest, ::Hash]
1667
+ # A request object representing the call parameters. Required. To specify no
1668
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1669
+ # @param options [::Gapic::CallOptions, ::Hash]
1670
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1671
+ #
1672
+ # @overload get_config(name: nil)
1673
+ # Pass arguments to `get_config` via keyword arguments. Note that at
1674
+ # least one keyword argument is required. To specify no parameters, or to keep all
1675
+ # the default parameter values, pass an empty Hash as a request object (see above).
1676
+ #
1677
+ # @param name [::String]
1678
+ # Required. Name of requested configuration.
1679
+ #
1680
+ # @yield [response, operation] Access the result along with the RPC operation
1681
+ # @yieldparam response [::Google::Cloud::Deploy::V1::Config]
1682
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1683
+ #
1684
+ # @return [::Google::Cloud::Deploy::V1::Config]
1685
+ #
1686
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1687
+ #
1688
+ def get_config request, options = nil
1689
+ raise ::ArgumentError, "request must be provided" if request.nil?
1690
+
1691
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Deploy::V1::GetConfigRequest
1692
+
1693
+ # Converts hash and nil to an options object
1694
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1695
+
1696
+ # Customize the options with defaults
1697
+ metadata = @config.rpcs.get_config.metadata.to_h
1698
+
1699
+ # Set x-goog-api-client and x-goog-user-project headers
1700
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1701
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1702
+ gapic_version: ::Google::Cloud::Deploy::V1::VERSION
1703
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1704
+
1705
+ header_params = {
1706
+ "name" => request.name
1707
+ }
1708
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1709
+ metadata[:"x-goog-request-params"] ||= request_params_header
1710
+
1711
+ options.apply_defaults timeout: @config.rpcs.get_config.timeout,
1712
+ metadata: metadata,
1713
+ retry_policy: @config.rpcs.get_config.retry_policy
1714
+
1715
+ options.apply_defaults timeout: @config.timeout,
1716
+ metadata: @config.metadata,
1717
+ retry_policy: @config.retry_policy
1718
+
1719
+ @cloud_deploy_stub.call_rpc :get_config, request, options: options do |response, operation|
1720
+ yield response, operation if block_given?
1721
+ return response
1722
+ end
1723
+ rescue ::GRPC::BadStatus => e
1724
+ raise ::Google::Cloud::Error.from_error(e)
1725
+ end
1726
+
1727
+ ##
1728
+ # Configuration class for the CloudDeploy API.
1729
+ #
1730
+ # This class represents the configuration for CloudDeploy,
1731
+ # providing control over timeouts, retry behavior, logging, transport
1732
+ # parameters, and other low-level controls. Certain parameters can also be
1733
+ # applied individually to specific RPCs. See
1734
+ # {::Google::Cloud::Deploy::V1::CloudDeploy::Client::Configuration::Rpcs}
1735
+ # for a list of RPCs that can be configured independently.
1736
+ #
1737
+ # Configuration can be applied globally to all clients, or to a single client
1738
+ # on construction.
1739
+ #
1740
+ # @example
1741
+ #
1742
+ # # Modify the global config, setting the timeout for
1743
+ # # list_delivery_pipelines to 20 seconds,
1744
+ # # and all remaining timeouts to 10 seconds.
1745
+ # ::Google::Cloud::Deploy::V1::CloudDeploy::Client.configure do |config|
1746
+ # config.timeout = 10.0
1747
+ # config.rpcs.list_delivery_pipelines.timeout = 20.0
1748
+ # end
1749
+ #
1750
+ # # Apply the above configuration only to a new client.
1751
+ # client = ::Google::Cloud::Deploy::V1::CloudDeploy::Client.new do |config|
1752
+ # config.timeout = 10.0
1753
+ # config.rpcs.list_delivery_pipelines.timeout = 20.0
1754
+ # end
1755
+ #
1756
+ # @!attribute [rw] endpoint
1757
+ # The hostname or hostname:port of the service endpoint.
1758
+ # Defaults to `"clouddeploy.googleapis.com"`.
1759
+ # @return [::String]
1760
+ # @!attribute [rw] credentials
1761
+ # Credentials to send with calls. You may provide any of the following types:
1762
+ # * (`String`) The path to a service account key file in JSON format
1763
+ # * (`Hash`) A service account key as a Hash
1764
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
1765
+ # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
1766
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
1767
+ # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
1768
+ # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
1769
+ # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
1770
+ # * (`nil`) indicating no credentials
1771
+ # @return [::Object]
1772
+ # @!attribute [rw] scope
1773
+ # The OAuth scopes
1774
+ # @return [::Array<::String>]
1775
+ # @!attribute [rw] lib_name
1776
+ # The library name as recorded in instrumentation and logging
1777
+ # @return [::String]
1778
+ # @!attribute [rw] lib_version
1779
+ # The library version as recorded in instrumentation and logging
1780
+ # @return [::String]
1781
+ # @!attribute [rw] channel_args
1782
+ # Extra parameters passed to the gRPC channel. Note: this is ignored if a
1783
+ # `GRPC::Core::Channel` object is provided as the credential.
1784
+ # @return [::Hash]
1785
+ # @!attribute [rw] interceptors
1786
+ # An array of interceptors that are run before calls are executed.
1787
+ # @return [::Array<::GRPC::ClientInterceptor>]
1788
+ # @!attribute [rw] timeout
1789
+ # The call timeout in seconds.
1790
+ # @return [::Numeric]
1791
+ # @!attribute [rw] metadata
1792
+ # Additional gRPC headers to be sent with the call.
1793
+ # @return [::Hash{::Symbol=>::String}]
1794
+ # @!attribute [rw] retry_policy
1795
+ # The retry policy. The value is a hash with the following keys:
1796
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
1797
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
1798
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
1799
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
1800
+ # trigger a retry.
1801
+ # @return [::Hash]
1802
+ # @!attribute [rw] quota_project
1803
+ # A separate project against which to charge quota.
1804
+ # @return [::String]
1805
+ #
1806
+ class Configuration
1807
+ extend ::Gapic::Config
1808
+
1809
+ config_attr :endpoint, "clouddeploy.googleapis.com", ::String
1810
+ config_attr :credentials, nil do |value|
1811
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
1812
+ allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
1813
+ allowed.any? { |klass| klass === value }
1814
+ end
1815
+ config_attr :scope, nil, ::String, ::Array, nil
1816
+ config_attr :lib_name, nil, ::String, nil
1817
+ config_attr :lib_version, nil, ::String, nil
1818
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
1819
+ config_attr :interceptors, nil, ::Array, nil
1820
+ config_attr :timeout, nil, ::Numeric, nil
1821
+ config_attr :metadata, nil, ::Hash, nil
1822
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
1823
+ config_attr :quota_project, nil, ::String, nil
1824
+
1825
+ # @private
1826
+ def initialize parent_config = nil
1827
+ @parent_config = parent_config unless parent_config.nil?
1828
+
1829
+ yield self if block_given?
1830
+ end
1831
+
1832
+ ##
1833
+ # Configurations for individual RPCs
1834
+ # @return [Rpcs]
1835
+ #
1836
+ def rpcs
1837
+ @rpcs ||= begin
1838
+ parent_rpcs = nil
1839
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
1840
+ Rpcs.new parent_rpcs
1841
+ end
1842
+ end
1843
+
1844
+ ##
1845
+ # Configuration RPC class for the CloudDeploy API.
1846
+ #
1847
+ # Includes fields providing the configuration for each RPC in this service.
1848
+ # Each configuration object is of type `Gapic::Config::Method` and includes
1849
+ # the following configuration fields:
1850
+ #
1851
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
1852
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
1853
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
1854
+ # include the following keys:
1855
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
1856
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
1857
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
1858
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
1859
+ # trigger a retry.
1860
+ #
1861
+ class Rpcs
1862
+ ##
1863
+ # RPC-specific configuration for `list_delivery_pipelines`
1864
+ # @return [::Gapic::Config::Method]
1865
+ #
1866
+ attr_reader :list_delivery_pipelines
1867
+ ##
1868
+ # RPC-specific configuration for `get_delivery_pipeline`
1869
+ # @return [::Gapic::Config::Method]
1870
+ #
1871
+ attr_reader :get_delivery_pipeline
1872
+ ##
1873
+ # RPC-specific configuration for `create_delivery_pipeline`
1874
+ # @return [::Gapic::Config::Method]
1875
+ #
1876
+ attr_reader :create_delivery_pipeline
1877
+ ##
1878
+ # RPC-specific configuration for `update_delivery_pipeline`
1879
+ # @return [::Gapic::Config::Method]
1880
+ #
1881
+ attr_reader :update_delivery_pipeline
1882
+ ##
1883
+ # RPC-specific configuration for `delete_delivery_pipeline`
1884
+ # @return [::Gapic::Config::Method]
1885
+ #
1886
+ attr_reader :delete_delivery_pipeline
1887
+ ##
1888
+ # RPC-specific configuration for `list_targets`
1889
+ # @return [::Gapic::Config::Method]
1890
+ #
1891
+ attr_reader :list_targets
1892
+ ##
1893
+ # RPC-specific configuration for `get_target`
1894
+ # @return [::Gapic::Config::Method]
1895
+ #
1896
+ attr_reader :get_target
1897
+ ##
1898
+ # RPC-specific configuration for `create_target`
1899
+ # @return [::Gapic::Config::Method]
1900
+ #
1901
+ attr_reader :create_target
1902
+ ##
1903
+ # RPC-specific configuration for `update_target`
1904
+ # @return [::Gapic::Config::Method]
1905
+ #
1906
+ attr_reader :update_target
1907
+ ##
1908
+ # RPC-specific configuration for `delete_target`
1909
+ # @return [::Gapic::Config::Method]
1910
+ #
1911
+ attr_reader :delete_target
1912
+ ##
1913
+ # RPC-specific configuration for `list_releases`
1914
+ # @return [::Gapic::Config::Method]
1915
+ #
1916
+ attr_reader :list_releases
1917
+ ##
1918
+ # RPC-specific configuration for `get_release`
1919
+ # @return [::Gapic::Config::Method]
1920
+ #
1921
+ attr_reader :get_release
1922
+ ##
1923
+ # RPC-specific configuration for `create_release`
1924
+ # @return [::Gapic::Config::Method]
1925
+ #
1926
+ attr_reader :create_release
1927
+ ##
1928
+ # RPC-specific configuration for `approve_rollout`
1929
+ # @return [::Gapic::Config::Method]
1930
+ #
1931
+ attr_reader :approve_rollout
1932
+ ##
1933
+ # RPC-specific configuration for `list_rollouts`
1934
+ # @return [::Gapic::Config::Method]
1935
+ #
1936
+ attr_reader :list_rollouts
1937
+ ##
1938
+ # RPC-specific configuration for `get_rollout`
1939
+ # @return [::Gapic::Config::Method]
1940
+ #
1941
+ attr_reader :get_rollout
1942
+ ##
1943
+ # RPC-specific configuration for `create_rollout`
1944
+ # @return [::Gapic::Config::Method]
1945
+ #
1946
+ attr_reader :create_rollout
1947
+ ##
1948
+ # RPC-specific configuration for `get_config`
1949
+ # @return [::Gapic::Config::Method]
1950
+ #
1951
+ attr_reader :get_config
1952
+
1953
+ # @private
1954
+ def initialize parent_rpcs = nil
1955
+ list_delivery_pipelines_config = parent_rpcs.list_delivery_pipelines if parent_rpcs.respond_to? :list_delivery_pipelines
1956
+ @list_delivery_pipelines = ::Gapic::Config::Method.new list_delivery_pipelines_config
1957
+ get_delivery_pipeline_config = parent_rpcs.get_delivery_pipeline if parent_rpcs.respond_to? :get_delivery_pipeline
1958
+ @get_delivery_pipeline = ::Gapic::Config::Method.new get_delivery_pipeline_config
1959
+ create_delivery_pipeline_config = parent_rpcs.create_delivery_pipeline if parent_rpcs.respond_to? :create_delivery_pipeline
1960
+ @create_delivery_pipeline = ::Gapic::Config::Method.new create_delivery_pipeline_config
1961
+ update_delivery_pipeline_config = parent_rpcs.update_delivery_pipeline if parent_rpcs.respond_to? :update_delivery_pipeline
1962
+ @update_delivery_pipeline = ::Gapic::Config::Method.new update_delivery_pipeline_config
1963
+ delete_delivery_pipeline_config = parent_rpcs.delete_delivery_pipeline if parent_rpcs.respond_to? :delete_delivery_pipeline
1964
+ @delete_delivery_pipeline = ::Gapic::Config::Method.new delete_delivery_pipeline_config
1965
+ list_targets_config = parent_rpcs.list_targets if parent_rpcs.respond_to? :list_targets
1966
+ @list_targets = ::Gapic::Config::Method.new list_targets_config
1967
+ get_target_config = parent_rpcs.get_target if parent_rpcs.respond_to? :get_target
1968
+ @get_target = ::Gapic::Config::Method.new get_target_config
1969
+ create_target_config = parent_rpcs.create_target if parent_rpcs.respond_to? :create_target
1970
+ @create_target = ::Gapic::Config::Method.new create_target_config
1971
+ update_target_config = parent_rpcs.update_target if parent_rpcs.respond_to? :update_target
1972
+ @update_target = ::Gapic::Config::Method.new update_target_config
1973
+ delete_target_config = parent_rpcs.delete_target if parent_rpcs.respond_to? :delete_target
1974
+ @delete_target = ::Gapic::Config::Method.new delete_target_config
1975
+ list_releases_config = parent_rpcs.list_releases if parent_rpcs.respond_to? :list_releases
1976
+ @list_releases = ::Gapic::Config::Method.new list_releases_config
1977
+ get_release_config = parent_rpcs.get_release if parent_rpcs.respond_to? :get_release
1978
+ @get_release = ::Gapic::Config::Method.new get_release_config
1979
+ create_release_config = parent_rpcs.create_release if parent_rpcs.respond_to? :create_release
1980
+ @create_release = ::Gapic::Config::Method.new create_release_config
1981
+ approve_rollout_config = parent_rpcs.approve_rollout if parent_rpcs.respond_to? :approve_rollout
1982
+ @approve_rollout = ::Gapic::Config::Method.new approve_rollout_config
1983
+ list_rollouts_config = parent_rpcs.list_rollouts if parent_rpcs.respond_to? :list_rollouts
1984
+ @list_rollouts = ::Gapic::Config::Method.new list_rollouts_config
1985
+ get_rollout_config = parent_rpcs.get_rollout if parent_rpcs.respond_to? :get_rollout
1986
+ @get_rollout = ::Gapic::Config::Method.new get_rollout_config
1987
+ create_rollout_config = parent_rpcs.create_rollout if parent_rpcs.respond_to? :create_rollout
1988
+ @create_rollout = ::Gapic::Config::Method.new create_rollout_config
1989
+ get_config_config = parent_rpcs.get_config if parent_rpcs.respond_to? :get_config
1990
+ @get_config = ::Gapic::Config::Method.new get_config_config
1991
+
1992
+ yield self if block_given?
1993
+ end
1994
+ end
1995
+ end
1996
+ end
1997
+ end
1998
+ end
1999
+ end
2000
+ end
2001
+ end