google-cloud-config_delivery-v1 0.a → 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.
Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +12 -0
  3. data/AUTHENTICATION.md +122 -0
  4. data/README.md +154 -8
  5. data/lib/google/cloud/config_delivery/v1/bindings_override.rb +102 -0
  6. data/lib/google/cloud/config_delivery/v1/config_delivery/client.rb +3222 -0
  7. data/lib/google/cloud/config_delivery/v1/config_delivery/credentials.rb +47 -0
  8. data/lib/google/cloud/config_delivery/v1/config_delivery/operations.rb +813 -0
  9. data/lib/google/cloud/config_delivery/v1/config_delivery/paths.rb +188 -0
  10. data/lib/google/cloud/config_delivery/v1/config_delivery/rest/client.rb +3029 -0
  11. data/lib/google/cloud/config_delivery/v1/config_delivery/rest/operations.rb +914 -0
  12. data/lib/google/cloud/config_delivery/v1/config_delivery/rest/service_stub.rb +1617 -0
  13. data/lib/google/cloud/config_delivery/v1/config_delivery/rest.rb +55 -0
  14. data/lib/google/cloud/config_delivery/v1/config_delivery.rb +57 -0
  15. data/lib/google/cloud/config_delivery/v1/rest.rb +38 -0
  16. data/lib/google/cloud/config_delivery/v1/version.rb +7 -2
  17. data/lib/google/cloud/config_delivery/v1.rb +45 -0
  18. data/lib/google/cloud/configdelivery/v1/config_delivery_pb.rb +115 -0
  19. data/lib/google/cloud/configdelivery/v1/config_delivery_services_pb.rb +95 -0
  20. data/lib/google-cloud-config_delivery-v1.rb +21 -0
  21. data/proto_docs/README.md +4 -0
  22. data/proto_docs/google/api/client.rb +473 -0
  23. data/proto_docs/google/api/field_behavior.rb +85 -0
  24. data/proto_docs/google/api/field_info.rb +88 -0
  25. data/proto_docs/google/api/launch_stage.rb +71 -0
  26. data/proto_docs/google/api/resource.rb +227 -0
  27. data/proto_docs/google/cloud/configdelivery/v1/config_delivery.rb +1384 -0
  28. data/proto_docs/google/longrunning/operations.rb +173 -0
  29. data/proto_docs/google/protobuf/any.rb +145 -0
  30. data/proto_docs/google/protobuf/duration.rb +98 -0
  31. data/proto_docs/google/protobuf/empty.rb +34 -0
  32. data/proto_docs/google/protobuf/field_mask.rb +229 -0
  33. data/proto_docs/google/protobuf/timestamp.rb +127 -0
  34. data/proto_docs/google/rpc/status.rb +48 -0
  35. metadata +82 -9
@@ -0,0 +1,3029 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2025 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/configdelivery/v1/config_delivery_pb"
21
+ require "google/cloud/config_delivery/v1/config_delivery/rest/service_stub"
22
+ require "google/cloud/location/rest"
23
+
24
+ module Google
25
+ module Cloud
26
+ module ConfigDelivery
27
+ module V1
28
+ module ConfigDelivery
29
+ module Rest
30
+ ##
31
+ # REST client for the ConfigDelivery service.
32
+ #
33
+ # ConfigDelivery service manages the deployment of kubernetes configuration to
34
+ # a fleet of kubernetes clusters.
35
+ #
36
+ class Client
37
+ # @private
38
+ API_VERSION = ""
39
+
40
+ # @private
41
+ DEFAULT_ENDPOINT_TEMPLATE = "configdelivery.$UNIVERSE_DOMAIN$"
42
+
43
+ include Paths
44
+
45
+ # @private
46
+ attr_reader :config_delivery_stub
47
+
48
+ ##
49
+ # Configure the ConfigDelivery Client class.
50
+ #
51
+ # See {::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Rest::Client::Configuration}
52
+ # for a description of the configuration fields.
53
+ #
54
+ # @example
55
+ #
56
+ # # Modify the configuration for all ConfigDelivery clients
57
+ # ::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Rest::Client.configure do |config|
58
+ # config.timeout = 10.0
59
+ # end
60
+ #
61
+ # @yield [config] Configure the Client client.
62
+ # @yieldparam config [Client::Configuration]
63
+ #
64
+ # @return [Client::Configuration]
65
+ #
66
+ def self.configure
67
+ @configure ||= begin
68
+ namespace = ["Google", "Cloud", "ConfigDelivery", "V1"]
69
+ parent_config = while namespace.any?
70
+ parent_name = namespace.join "::"
71
+ parent_const = const_get parent_name
72
+ break parent_const.configure if parent_const.respond_to? :configure
73
+ namespace.pop
74
+ end
75
+ default_config = Client::Configuration.new parent_config
76
+
77
+ default_config.rpcs.list_resource_bundles.timeout = 60.0
78
+ default_config.rpcs.list_resource_bundles.retry_policy = {
79
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
80
+ }
81
+
82
+ default_config.rpcs.get_resource_bundle.timeout = 60.0
83
+ default_config.rpcs.get_resource_bundle.retry_policy = {
84
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
85
+ }
86
+
87
+ default_config.rpcs.create_resource_bundle.timeout = 60.0
88
+
89
+ default_config.rpcs.update_resource_bundle.timeout = 60.0
90
+
91
+ default_config.rpcs.delete_resource_bundle.timeout = 60.0
92
+
93
+ default_config.rpcs.list_fleet_packages.timeout = 60.0
94
+ default_config.rpcs.list_fleet_packages.retry_policy = {
95
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
96
+ }
97
+
98
+ default_config.rpcs.get_fleet_package.timeout = 60.0
99
+ default_config.rpcs.get_fleet_package.retry_policy = {
100
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
101
+ }
102
+
103
+ default_config.rpcs.create_fleet_package.timeout = 60.0
104
+
105
+ default_config.rpcs.update_fleet_package.timeout = 60.0
106
+
107
+ default_config.rpcs.delete_fleet_package.timeout = 60.0
108
+
109
+ default_config.rpcs.list_releases.timeout = 60.0
110
+ default_config.rpcs.list_releases.retry_policy = {
111
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
112
+ }
113
+
114
+ default_config.rpcs.get_release.timeout = 60.0
115
+ default_config.rpcs.get_release.retry_policy = {
116
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
117
+ }
118
+
119
+ default_config.rpcs.create_release.timeout = 60.0
120
+
121
+ default_config.rpcs.update_release.timeout = 60.0
122
+
123
+ default_config.rpcs.delete_release.timeout = 60.0
124
+
125
+ default_config.rpcs.list_variants.timeout = 60.0
126
+ default_config.rpcs.list_variants.retry_policy = {
127
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
128
+ }
129
+
130
+ default_config.rpcs.get_variant.timeout = 60.0
131
+ default_config.rpcs.get_variant.retry_policy = {
132
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
133
+ }
134
+
135
+ default_config.rpcs.create_variant.timeout = 60.0
136
+
137
+ default_config.rpcs.update_variant.timeout = 60.0
138
+
139
+ default_config.rpcs.delete_variant.timeout = 60.0
140
+
141
+ default_config.rpcs.list_rollouts.timeout = 60.0
142
+ default_config.rpcs.list_rollouts.retry_policy = {
143
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
144
+ }
145
+
146
+ default_config.rpcs.get_rollout.timeout = 60.0
147
+ default_config.rpcs.get_rollout.retry_policy = {
148
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
149
+ }
150
+
151
+ default_config.rpcs.suspend_rollout.timeout = 60.0
152
+
153
+ default_config.rpcs.resume_rollout.timeout = 60.0
154
+
155
+ default_config.rpcs.abort_rollout.timeout = 60.0
156
+
157
+ default_config
158
+ end
159
+ yield @configure if block_given?
160
+ @configure
161
+ end
162
+
163
+ ##
164
+ # Configure the ConfigDelivery Client instance.
165
+ #
166
+ # The configuration is set to the derived mode, meaning that values can be changed,
167
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
168
+ # should be made on {Client.configure}.
169
+ #
170
+ # See {::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Rest::Client::Configuration}
171
+ # for a description of the configuration fields.
172
+ #
173
+ # @yield [config] Configure the Client client.
174
+ # @yieldparam config [Client::Configuration]
175
+ #
176
+ # @return [Client::Configuration]
177
+ #
178
+ def configure
179
+ yield @config if block_given?
180
+ @config
181
+ end
182
+
183
+ ##
184
+ # The effective universe domain
185
+ #
186
+ # @return [String]
187
+ #
188
+ def universe_domain
189
+ @config_delivery_stub.universe_domain
190
+ end
191
+
192
+ ##
193
+ # Create a new ConfigDelivery REST client object.
194
+ #
195
+ # @example
196
+ #
197
+ # # Create a client using the default configuration
198
+ # client = ::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Rest::Client.new
199
+ #
200
+ # # Create a client using a custom configuration
201
+ # client = ::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Rest::Client.new do |config|
202
+ # config.timeout = 10.0
203
+ # end
204
+ #
205
+ # @yield [config] Configure the ConfigDelivery client.
206
+ # @yieldparam config [Client::Configuration]
207
+ #
208
+ def initialize
209
+ # Create the configuration object
210
+ @config = Configuration.new Client.configure
211
+
212
+ # Yield the configuration if needed
213
+ yield @config if block_given?
214
+
215
+ # Create credentials
216
+ credentials = @config.credentials
217
+ # Use self-signed JWT if the endpoint is unchanged from default,
218
+ # but only if the default endpoint does not have a region prefix.
219
+ enable_self_signed_jwt = @config.endpoint.nil? ||
220
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
221
+ !@config.endpoint.split(".").first.include?("-"))
222
+ credentials ||= Credentials.default scope: @config.scope,
223
+ enable_self_signed_jwt: enable_self_signed_jwt
224
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
225
+ credentials = Credentials.new credentials, scope: @config.scope
226
+ end
227
+
228
+ @quota_project_id = @config.quota_project
229
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
230
+
231
+ @operations_client = ::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Rest::Operations.new do |config|
232
+ config.credentials = credentials
233
+ config.quota_project = @quota_project_id
234
+ config.endpoint = @config.endpoint
235
+ config.universe_domain = @config.universe_domain
236
+ end
237
+
238
+ @config_delivery_stub = ::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Rest::ServiceStub.new(
239
+ endpoint: @config.endpoint,
240
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
241
+ universe_domain: @config.universe_domain,
242
+ credentials: credentials,
243
+ logger: @config.logger
244
+ )
245
+
246
+ @config_delivery_stub.logger(stub: true)&.info do |entry|
247
+ entry.set_system_name
248
+ entry.set_service
249
+ entry.message = "Created client for #{entry.service}"
250
+ entry.set_credentials_fields credentials
251
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
252
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
253
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
254
+ end
255
+
256
+ @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
257
+ config.credentials = credentials
258
+ config.quota_project = @quota_project_id
259
+ config.endpoint = @config_delivery_stub.endpoint
260
+ config.universe_domain = @config_delivery_stub.universe_domain
261
+ config.bindings_override = @config.bindings_override
262
+ config.logger = @config_delivery_stub.logger if config.respond_to? :logger=
263
+ end
264
+ end
265
+
266
+ ##
267
+ # Get the associated client for long-running operations.
268
+ #
269
+ # @return [::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Rest::Operations]
270
+ #
271
+ attr_reader :operations_client
272
+
273
+ ##
274
+ # Get the associated client for mix-in of the Locations.
275
+ #
276
+ # @return [Google::Cloud::Location::Locations::Rest::Client]
277
+ #
278
+ attr_reader :location_client
279
+
280
+ ##
281
+ # The logger used for request/response debug logging.
282
+ #
283
+ # @return [Logger]
284
+ #
285
+ def logger
286
+ @config_delivery_stub.logger
287
+ end
288
+
289
+ # Service calls
290
+
291
+ ##
292
+ # Lists ResourceBundles in a given project and location.
293
+ #
294
+ # @overload list_resource_bundles(request, options = nil)
295
+ # Pass arguments to `list_resource_bundles` via a request object, either of type
296
+ # {::Google::Cloud::ConfigDelivery::V1::ListResourceBundlesRequest} or an equivalent Hash.
297
+ #
298
+ # @param request [::Google::Cloud::ConfigDelivery::V1::ListResourceBundlesRequest, ::Hash]
299
+ # A request object representing the call parameters. Required. To specify no
300
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
301
+ # @param options [::Gapic::CallOptions, ::Hash]
302
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
303
+ #
304
+ # @overload list_resource_bundles(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
305
+ # Pass arguments to `list_resource_bundles` via keyword arguments. Note that at
306
+ # least one keyword argument is required. To specify no parameters, or to keep all
307
+ # the default parameter values, pass an empty Hash as a request object (see above).
308
+ #
309
+ # @param parent [::String]
310
+ # Required. Parent value for ListResourceBundlesRequest.
311
+ # @param page_size [::Integer]
312
+ # Optional. Requested page size. Server may return fewer items than
313
+ # requested. If unspecified, server will pick an appropriate default.
314
+ # @param page_token [::String]
315
+ # Optional. A token identifying a page of results the server should return.
316
+ # @param filter [::String]
317
+ # Optional. Filtering results.
318
+ # @param order_by [::String]
319
+ # Optional. Hint for how to order the results.
320
+ # @yield [result, operation] Access the result along with the TransportOperation object
321
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ConfigDelivery::V1::ResourceBundle>]
322
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
323
+ #
324
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ConfigDelivery::V1::ResourceBundle>]
325
+ #
326
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
327
+ #
328
+ # @example Basic example
329
+ # require "google/cloud/config_delivery/v1"
330
+ #
331
+ # # Create a client object. The client can be reused for multiple calls.
332
+ # client = Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Rest::Client.new
333
+ #
334
+ # # Create a request. To set request fields, pass in keyword arguments.
335
+ # request = Google::Cloud::ConfigDelivery::V1::ListResourceBundlesRequest.new
336
+ #
337
+ # # Call the list_resource_bundles method.
338
+ # result = client.list_resource_bundles request
339
+ #
340
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
341
+ # # over elements, and API calls will be issued to fetch pages as needed.
342
+ # result.each do |item|
343
+ # # Each element is of type ::Google::Cloud::ConfigDelivery::V1::ResourceBundle.
344
+ # p item
345
+ # end
346
+ #
347
+ def list_resource_bundles request, options = nil
348
+ raise ::ArgumentError, "request must be provided" if request.nil?
349
+
350
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigDelivery::V1::ListResourceBundlesRequest
351
+
352
+ # Converts hash and nil to an options object
353
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
354
+
355
+ # Customize the options with defaults
356
+ call_metadata = @config.rpcs.list_resource_bundles.metadata.to_h
357
+
358
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
359
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
360
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
361
+ gapic_version: ::Google::Cloud::ConfigDelivery::V1::VERSION,
362
+ transports_version_send: [:rest]
363
+
364
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
365
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
366
+
367
+ options.apply_defaults timeout: @config.rpcs.list_resource_bundles.timeout,
368
+ metadata: call_metadata,
369
+ retry_policy: @config.rpcs.list_resource_bundles.retry_policy
370
+
371
+ options.apply_defaults timeout: @config.timeout,
372
+ metadata: @config.metadata,
373
+ retry_policy: @config.retry_policy
374
+
375
+ @config_delivery_stub.list_resource_bundles request, options do |result, operation|
376
+ result = ::Gapic::Rest::PagedEnumerable.new @config_delivery_stub, :list_resource_bundles, "resource_bundles", request, result, options
377
+ yield result, operation if block_given?
378
+ throw :response, result
379
+ end
380
+ rescue ::Gapic::Rest::Error => e
381
+ raise ::Google::Cloud::Error.from_error(e)
382
+ end
383
+
384
+ ##
385
+ # Gets details of a single ResourceBundle.
386
+ #
387
+ # @overload get_resource_bundle(request, options = nil)
388
+ # Pass arguments to `get_resource_bundle` via a request object, either of type
389
+ # {::Google::Cloud::ConfigDelivery::V1::GetResourceBundleRequest} or an equivalent Hash.
390
+ #
391
+ # @param request [::Google::Cloud::ConfigDelivery::V1::GetResourceBundleRequest, ::Hash]
392
+ # A request object representing the call parameters. Required. To specify no
393
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
394
+ # @param options [::Gapic::CallOptions, ::Hash]
395
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
396
+ #
397
+ # @overload get_resource_bundle(name: nil)
398
+ # Pass arguments to `get_resource_bundle` via keyword arguments. Note that at
399
+ # least one keyword argument is required. To specify no parameters, or to keep all
400
+ # the default parameter values, pass an empty Hash as a request object (see above).
401
+ #
402
+ # @param name [::String]
403
+ # Required. Name of the resource.
404
+ # @yield [result, operation] Access the result along with the TransportOperation object
405
+ # @yieldparam result [::Google::Cloud::ConfigDelivery::V1::ResourceBundle]
406
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
407
+ #
408
+ # @return [::Google::Cloud::ConfigDelivery::V1::ResourceBundle]
409
+ #
410
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
411
+ #
412
+ # @example Basic example
413
+ # require "google/cloud/config_delivery/v1"
414
+ #
415
+ # # Create a client object. The client can be reused for multiple calls.
416
+ # client = Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Rest::Client.new
417
+ #
418
+ # # Create a request. To set request fields, pass in keyword arguments.
419
+ # request = Google::Cloud::ConfigDelivery::V1::GetResourceBundleRequest.new
420
+ #
421
+ # # Call the get_resource_bundle method.
422
+ # result = client.get_resource_bundle request
423
+ #
424
+ # # The returned object is of type Google::Cloud::ConfigDelivery::V1::ResourceBundle.
425
+ # p result
426
+ #
427
+ def get_resource_bundle request, options = nil
428
+ raise ::ArgumentError, "request must be provided" if request.nil?
429
+
430
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigDelivery::V1::GetResourceBundleRequest
431
+
432
+ # Converts hash and nil to an options object
433
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
434
+
435
+ # Customize the options with defaults
436
+ call_metadata = @config.rpcs.get_resource_bundle.metadata.to_h
437
+
438
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
439
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
440
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
441
+ gapic_version: ::Google::Cloud::ConfigDelivery::V1::VERSION,
442
+ transports_version_send: [:rest]
443
+
444
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
445
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
446
+
447
+ options.apply_defaults timeout: @config.rpcs.get_resource_bundle.timeout,
448
+ metadata: call_metadata,
449
+ retry_policy: @config.rpcs.get_resource_bundle.retry_policy
450
+
451
+ options.apply_defaults timeout: @config.timeout,
452
+ metadata: @config.metadata,
453
+ retry_policy: @config.retry_policy
454
+
455
+ @config_delivery_stub.get_resource_bundle request, options do |result, operation|
456
+ yield result, operation if block_given?
457
+ end
458
+ rescue ::Gapic::Rest::Error => e
459
+ raise ::Google::Cloud::Error.from_error(e)
460
+ end
461
+
462
+ ##
463
+ # Creates a new ResourceBundle in a given project and location.
464
+ #
465
+ # @overload create_resource_bundle(request, options = nil)
466
+ # Pass arguments to `create_resource_bundle` via a request object, either of type
467
+ # {::Google::Cloud::ConfigDelivery::V1::CreateResourceBundleRequest} or an equivalent Hash.
468
+ #
469
+ # @param request [::Google::Cloud::ConfigDelivery::V1::CreateResourceBundleRequest, ::Hash]
470
+ # A request object representing the call parameters. Required. To specify no
471
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
472
+ # @param options [::Gapic::CallOptions, ::Hash]
473
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
474
+ #
475
+ # @overload create_resource_bundle(parent: nil, resource_bundle_id: nil, resource_bundle: nil, request_id: nil)
476
+ # Pass arguments to `create_resource_bundle` via keyword arguments. Note that at
477
+ # least one keyword argument is required. To specify no parameters, or to keep all
478
+ # the default parameter values, pass an empty Hash as a request object (see above).
479
+ #
480
+ # @param parent [::String]
481
+ # Required. Value for parent.
482
+ # @param resource_bundle_id [::String]
483
+ # Required. Id of the requesting object
484
+ # If auto-generating Id server-side, remove this field and
485
+ # resource_bundle_id from the method_signature of Create RPC
486
+ # @param resource_bundle [::Google::Cloud::ConfigDelivery::V1::ResourceBundle, ::Hash]
487
+ # Required. The resource being created
488
+ # @param request_id [::String]
489
+ # Optional. An optional request ID to identify requests. Specify a unique
490
+ # request ID so that if you must retry your request, the server will know to
491
+ # ignore the request if it has already been completed. The server will
492
+ # guarantee that for at least 60 minutes since the first request.
493
+ #
494
+ # For example, consider a situation where you make an initial request and the
495
+ # request times out. If you make the request again with the same request
496
+ # ID, the server can check if original operation with the same request ID
497
+ # was received, and if so, will ignore the second request. This prevents
498
+ # clients from accidentally creating duplicate commitments.
499
+ #
500
+ # The request ID must be a valid UUID with the exception that zero UUID is
501
+ # not supported (00000000-0000-0000-0000-000000000000).
502
+ # @yield [result, operation] Access the result along with the TransportOperation object
503
+ # @yieldparam result [::Gapic::Operation]
504
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
505
+ #
506
+ # @return [::Gapic::Operation]
507
+ #
508
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
509
+ #
510
+ # @example Basic example
511
+ # require "google/cloud/config_delivery/v1"
512
+ #
513
+ # # Create a client object. The client can be reused for multiple calls.
514
+ # client = Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Rest::Client.new
515
+ #
516
+ # # Create a request. To set request fields, pass in keyword arguments.
517
+ # request = Google::Cloud::ConfigDelivery::V1::CreateResourceBundleRequest.new
518
+ #
519
+ # # Call the create_resource_bundle method.
520
+ # result = client.create_resource_bundle request
521
+ #
522
+ # # The returned object is of type Gapic::Operation. You can use it to
523
+ # # check the status of an operation, cancel it, or wait for results.
524
+ # # Here is how to wait for a response.
525
+ # result.wait_until_done! timeout: 60
526
+ # if result.response?
527
+ # p result.response
528
+ # else
529
+ # puts "No response received."
530
+ # end
531
+ #
532
+ def create_resource_bundle request, options = nil
533
+ raise ::ArgumentError, "request must be provided" if request.nil?
534
+
535
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigDelivery::V1::CreateResourceBundleRequest
536
+
537
+ # Converts hash and nil to an options object
538
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
539
+
540
+ # Customize the options with defaults
541
+ call_metadata = @config.rpcs.create_resource_bundle.metadata.to_h
542
+
543
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
544
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
545
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
546
+ gapic_version: ::Google::Cloud::ConfigDelivery::V1::VERSION,
547
+ transports_version_send: [:rest]
548
+
549
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
550
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
551
+
552
+ options.apply_defaults timeout: @config.rpcs.create_resource_bundle.timeout,
553
+ metadata: call_metadata,
554
+ retry_policy: @config.rpcs.create_resource_bundle.retry_policy
555
+
556
+ options.apply_defaults timeout: @config.timeout,
557
+ metadata: @config.metadata,
558
+ retry_policy: @config.retry_policy
559
+
560
+ @config_delivery_stub.create_resource_bundle request, options do |result, operation|
561
+ result = ::Gapic::Operation.new result, @operations_client, options: options
562
+ yield result, operation if block_given?
563
+ throw :response, result
564
+ end
565
+ rescue ::Gapic::Rest::Error => e
566
+ raise ::Google::Cloud::Error.from_error(e)
567
+ end
568
+
569
+ ##
570
+ # Updates the parameters of a single ResourceBundle.
571
+ #
572
+ # @overload update_resource_bundle(request, options = nil)
573
+ # Pass arguments to `update_resource_bundle` via a request object, either of type
574
+ # {::Google::Cloud::ConfigDelivery::V1::UpdateResourceBundleRequest} or an equivalent Hash.
575
+ #
576
+ # @param request [::Google::Cloud::ConfigDelivery::V1::UpdateResourceBundleRequest, ::Hash]
577
+ # A request object representing the call parameters. Required. To specify no
578
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
579
+ # @param options [::Gapic::CallOptions, ::Hash]
580
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
581
+ #
582
+ # @overload update_resource_bundle(update_mask: nil, resource_bundle: nil, request_id: nil)
583
+ # Pass arguments to `update_resource_bundle` via keyword arguments. Note that at
584
+ # least one keyword argument is required. To specify no parameters, or to keep all
585
+ # the default parameter values, pass an empty Hash as a request object (see above).
586
+ #
587
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
588
+ # Required. Field mask is used to specify the fields to be overwritten in the
589
+ # ResourceBundle resource by the update.
590
+ # The fields specified in the update_mask are relative to the resource, not
591
+ # the full request. A field will be overwritten if it is in the mask. If the
592
+ # user does not provide a mask then all fields will be overwritten.
593
+ # @param resource_bundle [::Google::Cloud::ConfigDelivery::V1::ResourceBundle, ::Hash]
594
+ # Required. The resource being updated
595
+ # @param request_id [::String]
596
+ # Optional. An optional request ID to identify requests. Specify a unique
597
+ # request ID so that if you must retry your request, the server will know to
598
+ # ignore the request if it has already been completed. The server will
599
+ # guarantee that for at least 60 minutes since the first request.
600
+ #
601
+ # For example, consider a situation where you make an initial request and the
602
+ # request times out. If you make the request again with the same request
603
+ # ID, the server can check if original operation with the same request ID
604
+ # was received, and if so, will ignore the second request. This prevents
605
+ # clients from accidentally creating duplicate commitments.
606
+ #
607
+ # The request ID must be a valid UUID with the exception that zero UUID is
608
+ # not supported (00000000-0000-0000-0000-000000000000).
609
+ # @yield [result, operation] Access the result along with the TransportOperation object
610
+ # @yieldparam result [::Gapic::Operation]
611
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
612
+ #
613
+ # @return [::Gapic::Operation]
614
+ #
615
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
616
+ #
617
+ # @example Basic example
618
+ # require "google/cloud/config_delivery/v1"
619
+ #
620
+ # # Create a client object. The client can be reused for multiple calls.
621
+ # client = Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Rest::Client.new
622
+ #
623
+ # # Create a request. To set request fields, pass in keyword arguments.
624
+ # request = Google::Cloud::ConfigDelivery::V1::UpdateResourceBundleRequest.new
625
+ #
626
+ # # Call the update_resource_bundle method.
627
+ # result = client.update_resource_bundle request
628
+ #
629
+ # # The returned object is of type Gapic::Operation. You can use it to
630
+ # # check the status of an operation, cancel it, or wait for results.
631
+ # # Here is how to wait for a response.
632
+ # result.wait_until_done! timeout: 60
633
+ # if result.response?
634
+ # p result.response
635
+ # else
636
+ # puts "No response received."
637
+ # end
638
+ #
639
+ def update_resource_bundle request, options = nil
640
+ raise ::ArgumentError, "request must be provided" if request.nil?
641
+
642
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigDelivery::V1::UpdateResourceBundleRequest
643
+
644
+ # Converts hash and nil to an options object
645
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
646
+
647
+ # Customize the options with defaults
648
+ call_metadata = @config.rpcs.update_resource_bundle.metadata.to_h
649
+
650
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
651
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
652
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
653
+ gapic_version: ::Google::Cloud::ConfigDelivery::V1::VERSION,
654
+ transports_version_send: [:rest]
655
+
656
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
657
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
658
+
659
+ options.apply_defaults timeout: @config.rpcs.update_resource_bundle.timeout,
660
+ metadata: call_metadata,
661
+ retry_policy: @config.rpcs.update_resource_bundle.retry_policy
662
+
663
+ options.apply_defaults timeout: @config.timeout,
664
+ metadata: @config.metadata,
665
+ retry_policy: @config.retry_policy
666
+
667
+ @config_delivery_stub.update_resource_bundle request, options do |result, operation|
668
+ result = ::Gapic::Operation.new result, @operations_client, options: options
669
+ yield result, operation if block_given?
670
+ throw :response, result
671
+ end
672
+ rescue ::Gapic::Rest::Error => e
673
+ raise ::Google::Cloud::Error.from_error(e)
674
+ end
675
+
676
+ ##
677
+ # Deletes a single ResourceBundle.
678
+ #
679
+ # @overload delete_resource_bundle(request, options = nil)
680
+ # Pass arguments to `delete_resource_bundle` via a request object, either of type
681
+ # {::Google::Cloud::ConfigDelivery::V1::DeleteResourceBundleRequest} or an equivalent Hash.
682
+ #
683
+ # @param request [::Google::Cloud::ConfigDelivery::V1::DeleteResourceBundleRequest, ::Hash]
684
+ # A request object representing the call parameters. Required. To specify no
685
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
686
+ # @param options [::Gapic::CallOptions, ::Hash]
687
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
688
+ #
689
+ # @overload delete_resource_bundle(name: nil, request_id: nil, force: nil)
690
+ # Pass arguments to `delete_resource_bundle` via keyword arguments. Note that at
691
+ # least one keyword argument is required. To specify no parameters, or to keep all
692
+ # the default parameter values, pass an empty Hash as a request object (see above).
693
+ #
694
+ # @param name [::String]
695
+ # Required. Name of the resource
696
+ # @param request_id [::String]
697
+ # Optional. An optional request ID to identify requests. Specify a unique
698
+ # request ID so that if you must retry your request, the server will know to
699
+ # ignore the request if it has already been completed. The server will
700
+ # guarantee that for at least 60 minutes after the first request.
701
+ #
702
+ # For example, consider a situation where you make an initial request and the
703
+ # request times out. If you make the request again with the same request
704
+ # ID, the server can check if original operation with the same request ID
705
+ # was received, and if so, will ignore the second request. This prevents
706
+ # clients from accidentally creating duplicate commitments.
707
+ #
708
+ # The request ID must be a valid UUID with the exception that zero UUID is
709
+ # not supported (00000000-0000-0000-0000-000000000000).
710
+ # @param force [::Boolean]
711
+ # Optional. If set to true, any releases of this resource bundle will also be
712
+ # deleted. (Otherwise, the request will only work if the resource bundle has
713
+ # no releases.)
714
+ # @yield [result, operation] Access the result along with the TransportOperation object
715
+ # @yieldparam result [::Gapic::Operation]
716
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
717
+ #
718
+ # @return [::Gapic::Operation]
719
+ #
720
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
721
+ #
722
+ # @example Basic example
723
+ # require "google/cloud/config_delivery/v1"
724
+ #
725
+ # # Create a client object. The client can be reused for multiple calls.
726
+ # client = Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Rest::Client.new
727
+ #
728
+ # # Create a request. To set request fields, pass in keyword arguments.
729
+ # request = Google::Cloud::ConfigDelivery::V1::DeleteResourceBundleRequest.new
730
+ #
731
+ # # Call the delete_resource_bundle method.
732
+ # result = client.delete_resource_bundle request
733
+ #
734
+ # # The returned object is of type Gapic::Operation. You can use it to
735
+ # # check the status of an operation, cancel it, or wait for results.
736
+ # # Here is how to wait for a response.
737
+ # result.wait_until_done! timeout: 60
738
+ # if result.response?
739
+ # p result.response
740
+ # else
741
+ # puts "No response received."
742
+ # end
743
+ #
744
+ def delete_resource_bundle request, options = nil
745
+ raise ::ArgumentError, "request must be provided" if request.nil?
746
+
747
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigDelivery::V1::DeleteResourceBundleRequest
748
+
749
+ # Converts hash and nil to an options object
750
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
751
+
752
+ # Customize the options with defaults
753
+ call_metadata = @config.rpcs.delete_resource_bundle.metadata.to_h
754
+
755
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
756
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
757
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
758
+ gapic_version: ::Google::Cloud::ConfigDelivery::V1::VERSION,
759
+ transports_version_send: [:rest]
760
+
761
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
762
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
763
+
764
+ options.apply_defaults timeout: @config.rpcs.delete_resource_bundle.timeout,
765
+ metadata: call_metadata,
766
+ retry_policy: @config.rpcs.delete_resource_bundle.retry_policy
767
+
768
+ options.apply_defaults timeout: @config.timeout,
769
+ metadata: @config.metadata,
770
+ retry_policy: @config.retry_policy
771
+
772
+ @config_delivery_stub.delete_resource_bundle request, options do |result, operation|
773
+ result = ::Gapic::Operation.new result, @operations_client, options: options
774
+ yield result, operation if block_given?
775
+ throw :response, result
776
+ end
777
+ rescue ::Gapic::Rest::Error => e
778
+ raise ::Google::Cloud::Error.from_error(e)
779
+ end
780
+
781
+ ##
782
+ # Lists FleetPackages in a given project and location.
783
+ #
784
+ # @overload list_fleet_packages(request, options = nil)
785
+ # Pass arguments to `list_fleet_packages` via a request object, either of type
786
+ # {::Google::Cloud::ConfigDelivery::V1::ListFleetPackagesRequest} or an equivalent Hash.
787
+ #
788
+ # @param request [::Google::Cloud::ConfigDelivery::V1::ListFleetPackagesRequest, ::Hash]
789
+ # A request object representing the call parameters. Required. To specify no
790
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
791
+ # @param options [::Gapic::CallOptions, ::Hash]
792
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
793
+ #
794
+ # @overload list_fleet_packages(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
795
+ # Pass arguments to `list_fleet_packages` via keyword arguments. Note that at
796
+ # least one keyword argument is required. To specify no parameters, or to keep all
797
+ # the default parameter values, pass an empty Hash as a request object (see above).
798
+ #
799
+ # @param parent [::String]
800
+ # Required. Parent value for ListFleetPackagesRequest.
801
+ # @param page_size [::Integer]
802
+ # Optional. Requested page size. Server may return fewer items than
803
+ # requested. If unspecified, server will pick an appropriate default.
804
+ # @param page_token [::String]
805
+ # Optional. A token identifying a page of results the server should return.
806
+ # @param filter [::String]
807
+ # Optional. Filtering results
808
+ # @param order_by [::String]
809
+ # Optional. Hint for how to order the results
810
+ # @yield [result, operation] Access the result along with the TransportOperation object
811
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ConfigDelivery::V1::FleetPackage>]
812
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
813
+ #
814
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ConfigDelivery::V1::FleetPackage>]
815
+ #
816
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
817
+ #
818
+ # @example Basic example
819
+ # require "google/cloud/config_delivery/v1"
820
+ #
821
+ # # Create a client object. The client can be reused for multiple calls.
822
+ # client = Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Rest::Client.new
823
+ #
824
+ # # Create a request. To set request fields, pass in keyword arguments.
825
+ # request = Google::Cloud::ConfigDelivery::V1::ListFleetPackagesRequest.new
826
+ #
827
+ # # Call the list_fleet_packages method.
828
+ # result = client.list_fleet_packages request
829
+ #
830
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
831
+ # # over elements, and API calls will be issued to fetch pages as needed.
832
+ # result.each do |item|
833
+ # # Each element is of type ::Google::Cloud::ConfigDelivery::V1::FleetPackage.
834
+ # p item
835
+ # end
836
+ #
837
+ def list_fleet_packages request, options = nil
838
+ raise ::ArgumentError, "request must be provided" if request.nil?
839
+
840
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigDelivery::V1::ListFleetPackagesRequest
841
+
842
+ # Converts hash and nil to an options object
843
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
844
+
845
+ # Customize the options with defaults
846
+ call_metadata = @config.rpcs.list_fleet_packages.metadata.to_h
847
+
848
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
849
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
850
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
851
+ gapic_version: ::Google::Cloud::ConfigDelivery::V1::VERSION,
852
+ transports_version_send: [:rest]
853
+
854
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
855
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
856
+
857
+ options.apply_defaults timeout: @config.rpcs.list_fleet_packages.timeout,
858
+ metadata: call_metadata,
859
+ retry_policy: @config.rpcs.list_fleet_packages.retry_policy
860
+
861
+ options.apply_defaults timeout: @config.timeout,
862
+ metadata: @config.metadata,
863
+ retry_policy: @config.retry_policy
864
+
865
+ @config_delivery_stub.list_fleet_packages request, options do |result, operation|
866
+ result = ::Gapic::Rest::PagedEnumerable.new @config_delivery_stub, :list_fleet_packages, "fleet_packages", request, result, options
867
+ yield result, operation if block_given?
868
+ throw :response, result
869
+ end
870
+ rescue ::Gapic::Rest::Error => e
871
+ raise ::Google::Cloud::Error.from_error(e)
872
+ end
873
+
874
+ ##
875
+ # Gets details of a single FleetPackage.
876
+ #
877
+ # @overload get_fleet_package(request, options = nil)
878
+ # Pass arguments to `get_fleet_package` via a request object, either of type
879
+ # {::Google::Cloud::ConfigDelivery::V1::GetFleetPackageRequest} or an equivalent Hash.
880
+ #
881
+ # @param request [::Google::Cloud::ConfigDelivery::V1::GetFleetPackageRequest, ::Hash]
882
+ # A request object representing the call parameters. Required. To specify no
883
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
884
+ # @param options [::Gapic::CallOptions, ::Hash]
885
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
886
+ #
887
+ # @overload get_fleet_package(name: nil)
888
+ # Pass arguments to `get_fleet_package` via keyword arguments. Note that at
889
+ # least one keyword argument is required. To specify no parameters, or to keep all
890
+ # the default parameter values, pass an empty Hash as a request object (see above).
891
+ #
892
+ # @param name [::String]
893
+ # Required. Name of the resource
894
+ # @yield [result, operation] Access the result along with the TransportOperation object
895
+ # @yieldparam result [::Google::Cloud::ConfigDelivery::V1::FleetPackage]
896
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
897
+ #
898
+ # @return [::Google::Cloud::ConfigDelivery::V1::FleetPackage]
899
+ #
900
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
901
+ #
902
+ # @example Basic example
903
+ # require "google/cloud/config_delivery/v1"
904
+ #
905
+ # # Create a client object. The client can be reused for multiple calls.
906
+ # client = Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Rest::Client.new
907
+ #
908
+ # # Create a request. To set request fields, pass in keyword arguments.
909
+ # request = Google::Cloud::ConfigDelivery::V1::GetFleetPackageRequest.new
910
+ #
911
+ # # Call the get_fleet_package method.
912
+ # result = client.get_fleet_package request
913
+ #
914
+ # # The returned object is of type Google::Cloud::ConfigDelivery::V1::FleetPackage.
915
+ # p result
916
+ #
917
+ def get_fleet_package request, options = nil
918
+ raise ::ArgumentError, "request must be provided" if request.nil?
919
+
920
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigDelivery::V1::GetFleetPackageRequest
921
+
922
+ # Converts hash and nil to an options object
923
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
924
+
925
+ # Customize the options with defaults
926
+ call_metadata = @config.rpcs.get_fleet_package.metadata.to_h
927
+
928
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
929
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
930
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
931
+ gapic_version: ::Google::Cloud::ConfigDelivery::V1::VERSION,
932
+ transports_version_send: [:rest]
933
+
934
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
935
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
936
+
937
+ options.apply_defaults timeout: @config.rpcs.get_fleet_package.timeout,
938
+ metadata: call_metadata,
939
+ retry_policy: @config.rpcs.get_fleet_package.retry_policy
940
+
941
+ options.apply_defaults timeout: @config.timeout,
942
+ metadata: @config.metadata,
943
+ retry_policy: @config.retry_policy
944
+
945
+ @config_delivery_stub.get_fleet_package request, options do |result, operation|
946
+ yield result, operation if block_given?
947
+ end
948
+ rescue ::Gapic::Rest::Error => e
949
+ raise ::Google::Cloud::Error.from_error(e)
950
+ end
951
+
952
+ ##
953
+ # Creates a new FleetPackage in a given project and location.
954
+ #
955
+ # @overload create_fleet_package(request, options = nil)
956
+ # Pass arguments to `create_fleet_package` via a request object, either of type
957
+ # {::Google::Cloud::ConfigDelivery::V1::CreateFleetPackageRequest} or an equivalent Hash.
958
+ #
959
+ # @param request [::Google::Cloud::ConfigDelivery::V1::CreateFleetPackageRequest, ::Hash]
960
+ # A request object representing the call parameters. Required. To specify no
961
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
962
+ # @param options [::Gapic::CallOptions, ::Hash]
963
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
964
+ #
965
+ # @overload create_fleet_package(parent: nil, fleet_package_id: nil, fleet_package: nil, request_id: nil)
966
+ # Pass arguments to `create_fleet_package` via keyword arguments. Note that at
967
+ # least one keyword argument is required. To specify no parameters, or to keep all
968
+ # the default parameter values, pass an empty Hash as a request object (see above).
969
+ #
970
+ # @param parent [::String]
971
+ # Required. Value for parent.
972
+ # @param fleet_package_id [::String]
973
+ # Required. Id of the requesting object
974
+ # If auto-generating Id server-side, remove this field and
975
+ # fleet_package_id from the method_signature of Create RPC
976
+ # @param fleet_package [::Google::Cloud::ConfigDelivery::V1::FleetPackage, ::Hash]
977
+ # Required. The resource being created.
978
+ # @param request_id [::String]
979
+ # Optional. An optional request ID to identify requests. Specify a unique
980
+ # request ID so that if you must retry your request, the server will know to
981
+ # ignore the request if it has already been completed. The server will
982
+ # guarantee that for at least 60 minutes since the first request.
983
+ #
984
+ # For example, consider a situation where you make an initial request and the
985
+ # request times out. If you make the request again with the same request
986
+ # ID, the server can check if original operation with the same request ID
987
+ # was received, and if so, will ignore the second request. This prevents
988
+ # clients from accidentally creating duplicate commitments.
989
+ #
990
+ # The request ID must be a valid UUID with the exception that zero UUID is
991
+ # not supported (00000000-0000-0000-0000-000000000000).
992
+ # @yield [result, operation] Access the result along with the TransportOperation object
993
+ # @yieldparam result [::Gapic::Operation]
994
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
995
+ #
996
+ # @return [::Gapic::Operation]
997
+ #
998
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
999
+ #
1000
+ # @example Basic example
1001
+ # require "google/cloud/config_delivery/v1"
1002
+ #
1003
+ # # Create a client object. The client can be reused for multiple calls.
1004
+ # client = Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Rest::Client.new
1005
+ #
1006
+ # # Create a request. To set request fields, pass in keyword arguments.
1007
+ # request = Google::Cloud::ConfigDelivery::V1::CreateFleetPackageRequest.new
1008
+ #
1009
+ # # Call the create_fleet_package method.
1010
+ # result = client.create_fleet_package request
1011
+ #
1012
+ # # The returned object is of type Gapic::Operation. You can use it to
1013
+ # # check the status of an operation, cancel it, or wait for results.
1014
+ # # Here is how to wait for a response.
1015
+ # result.wait_until_done! timeout: 60
1016
+ # if result.response?
1017
+ # p result.response
1018
+ # else
1019
+ # puts "No response received."
1020
+ # end
1021
+ #
1022
+ def create_fleet_package request, options = nil
1023
+ raise ::ArgumentError, "request must be provided" if request.nil?
1024
+
1025
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigDelivery::V1::CreateFleetPackageRequest
1026
+
1027
+ # Converts hash and nil to an options object
1028
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1029
+
1030
+ # Customize the options with defaults
1031
+ call_metadata = @config.rpcs.create_fleet_package.metadata.to_h
1032
+
1033
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1034
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1035
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1036
+ gapic_version: ::Google::Cloud::ConfigDelivery::V1::VERSION,
1037
+ transports_version_send: [:rest]
1038
+
1039
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1040
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1041
+
1042
+ options.apply_defaults timeout: @config.rpcs.create_fleet_package.timeout,
1043
+ metadata: call_metadata,
1044
+ retry_policy: @config.rpcs.create_fleet_package.retry_policy
1045
+
1046
+ options.apply_defaults timeout: @config.timeout,
1047
+ metadata: @config.metadata,
1048
+ retry_policy: @config.retry_policy
1049
+
1050
+ @config_delivery_stub.create_fleet_package request, options do |result, operation|
1051
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1052
+ yield result, operation if block_given?
1053
+ throw :response, result
1054
+ end
1055
+ rescue ::Gapic::Rest::Error => e
1056
+ raise ::Google::Cloud::Error.from_error(e)
1057
+ end
1058
+
1059
+ ##
1060
+ # Updates the parameters of a single FleetPackage.
1061
+ #
1062
+ # @overload update_fleet_package(request, options = nil)
1063
+ # Pass arguments to `update_fleet_package` via a request object, either of type
1064
+ # {::Google::Cloud::ConfigDelivery::V1::UpdateFleetPackageRequest} or an equivalent Hash.
1065
+ #
1066
+ # @param request [::Google::Cloud::ConfigDelivery::V1::UpdateFleetPackageRequest, ::Hash]
1067
+ # A request object representing the call parameters. Required. To specify no
1068
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1069
+ # @param options [::Gapic::CallOptions, ::Hash]
1070
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1071
+ #
1072
+ # @overload update_fleet_package(update_mask: nil, fleet_package: nil, request_id: nil)
1073
+ # Pass arguments to `update_fleet_package` via keyword arguments. Note that at
1074
+ # least one keyword argument is required. To specify no parameters, or to keep all
1075
+ # the default parameter values, pass an empty Hash as a request object (see above).
1076
+ #
1077
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
1078
+ # Required. Field mask is used to specify the fields to be overwritten in the
1079
+ # FleetPackage resource by the update.
1080
+ # The fields specified in the update_mask are relative to the resource, not
1081
+ # the full request. A field will be overwritten if it is in the mask. If the
1082
+ # user does not provide a mask then all fields will be overwritten.
1083
+ # @param fleet_package [::Google::Cloud::ConfigDelivery::V1::FleetPackage, ::Hash]
1084
+ # Required. The resource being updated
1085
+ # @param request_id [::String]
1086
+ # Optional. An optional request ID to identify requests. Specify a unique
1087
+ # request ID so that if you must retry your request, the server will know to
1088
+ # ignore the request if it has already been completed. The server will
1089
+ # guarantee that for at least 60 minutes since the first request.
1090
+ #
1091
+ # For example, consider a situation where you make an initial request and the
1092
+ # request times out. If you make the request again with the same request
1093
+ # ID, the server can check if original operation with the same request ID
1094
+ # was received, and if so, will ignore the second request. This prevents
1095
+ # clients from accidentally creating duplicate commitments.
1096
+ #
1097
+ # The request ID must be a valid UUID with the exception that zero UUID is
1098
+ # not supported (00000000-0000-0000-0000-000000000000).
1099
+ # @yield [result, operation] Access the result along with the TransportOperation object
1100
+ # @yieldparam result [::Gapic::Operation]
1101
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1102
+ #
1103
+ # @return [::Gapic::Operation]
1104
+ #
1105
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1106
+ #
1107
+ # @example Basic example
1108
+ # require "google/cloud/config_delivery/v1"
1109
+ #
1110
+ # # Create a client object. The client can be reused for multiple calls.
1111
+ # client = Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Rest::Client.new
1112
+ #
1113
+ # # Create a request. To set request fields, pass in keyword arguments.
1114
+ # request = Google::Cloud::ConfigDelivery::V1::UpdateFleetPackageRequest.new
1115
+ #
1116
+ # # Call the update_fleet_package method.
1117
+ # result = client.update_fleet_package request
1118
+ #
1119
+ # # The returned object is of type Gapic::Operation. You can use it to
1120
+ # # check the status of an operation, cancel it, or wait for results.
1121
+ # # Here is how to wait for a response.
1122
+ # result.wait_until_done! timeout: 60
1123
+ # if result.response?
1124
+ # p result.response
1125
+ # else
1126
+ # puts "No response received."
1127
+ # end
1128
+ #
1129
+ def update_fleet_package request, options = nil
1130
+ raise ::ArgumentError, "request must be provided" if request.nil?
1131
+
1132
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigDelivery::V1::UpdateFleetPackageRequest
1133
+
1134
+ # Converts hash and nil to an options object
1135
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1136
+
1137
+ # Customize the options with defaults
1138
+ call_metadata = @config.rpcs.update_fleet_package.metadata.to_h
1139
+
1140
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1141
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1142
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1143
+ gapic_version: ::Google::Cloud::ConfigDelivery::V1::VERSION,
1144
+ transports_version_send: [:rest]
1145
+
1146
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1147
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1148
+
1149
+ options.apply_defaults timeout: @config.rpcs.update_fleet_package.timeout,
1150
+ metadata: call_metadata,
1151
+ retry_policy: @config.rpcs.update_fleet_package.retry_policy
1152
+
1153
+ options.apply_defaults timeout: @config.timeout,
1154
+ metadata: @config.metadata,
1155
+ retry_policy: @config.retry_policy
1156
+
1157
+ @config_delivery_stub.update_fleet_package request, options do |result, operation|
1158
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1159
+ yield result, operation if block_given?
1160
+ throw :response, result
1161
+ end
1162
+ rescue ::Gapic::Rest::Error => e
1163
+ raise ::Google::Cloud::Error.from_error(e)
1164
+ end
1165
+
1166
+ ##
1167
+ # Deletes a single FleetPackage.
1168
+ #
1169
+ # @overload delete_fleet_package(request, options = nil)
1170
+ # Pass arguments to `delete_fleet_package` via a request object, either of type
1171
+ # {::Google::Cloud::ConfigDelivery::V1::DeleteFleetPackageRequest} or an equivalent Hash.
1172
+ #
1173
+ # @param request [::Google::Cloud::ConfigDelivery::V1::DeleteFleetPackageRequest, ::Hash]
1174
+ # A request object representing the call parameters. Required. To specify no
1175
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1176
+ # @param options [::Gapic::CallOptions, ::Hash]
1177
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1178
+ #
1179
+ # @overload delete_fleet_package(name: nil, request_id: nil, force: nil, allow_missing: nil)
1180
+ # Pass arguments to `delete_fleet_package` via keyword arguments. Note that at
1181
+ # least one keyword argument is required. To specify no parameters, or to keep all
1182
+ # the default parameter values, pass an empty Hash as a request object (see above).
1183
+ #
1184
+ # @param name [::String]
1185
+ # Required. Name of the resource
1186
+ # @param request_id [::String]
1187
+ # Optional. An optional request ID to identify requests. Specify a unique
1188
+ # request ID so that if you must retry your request, the server will know to
1189
+ # ignore the request if it has already been completed. The server will
1190
+ # guarantee that for at least 60 minutes after the first request.
1191
+ #
1192
+ # For example, consider a situation where you make an initial request and the
1193
+ # request times out. If you make the request again with the same request
1194
+ # ID, the server can check if original operation with the same request ID
1195
+ # was received, and if so, will ignore the second request. This prevents
1196
+ # clients from accidentally creating duplicate commitments.
1197
+ #
1198
+ # The request ID must be a valid UUID with the exception that zero UUID is
1199
+ # not supported (00000000-0000-0000-0000-000000000000).
1200
+ # @param force [::Boolean]
1201
+ # Optional. If set to true, any rollouts for this FleetPackage will also be
1202
+ # deleted. (Otherwise, the request will only work if the fleet package has no
1203
+ # rollouts.)
1204
+ # @param allow_missing [::Boolean]
1205
+ # Optional. If set to true, then deleting an already deleted or non existing
1206
+ # FleetPackage will succeed.
1207
+ # @yield [result, operation] Access the result along with the TransportOperation object
1208
+ # @yieldparam result [::Gapic::Operation]
1209
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1210
+ #
1211
+ # @return [::Gapic::Operation]
1212
+ #
1213
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1214
+ #
1215
+ # @example Basic example
1216
+ # require "google/cloud/config_delivery/v1"
1217
+ #
1218
+ # # Create a client object. The client can be reused for multiple calls.
1219
+ # client = Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Rest::Client.new
1220
+ #
1221
+ # # Create a request. To set request fields, pass in keyword arguments.
1222
+ # request = Google::Cloud::ConfigDelivery::V1::DeleteFleetPackageRequest.new
1223
+ #
1224
+ # # Call the delete_fleet_package method.
1225
+ # result = client.delete_fleet_package request
1226
+ #
1227
+ # # The returned object is of type Gapic::Operation. You can use it to
1228
+ # # check the status of an operation, cancel it, or wait for results.
1229
+ # # Here is how to wait for a response.
1230
+ # result.wait_until_done! timeout: 60
1231
+ # if result.response?
1232
+ # p result.response
1233
+ # else
1234
+ # puts "No response received."
1235
+ # end
1236
+ #
1237
+ def delete_fleet_package request, options = nil
1238
+ raise ::ArgumentError, "request must be provided" if request.nil?
1239
+
1240
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigDelivery::V1::DeleteFleetPackageRequest
1241
+
1242
+ # Converts hash and nil to an options object
1243
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1244
+
1245
+ # Customize the options with defaults
1246
+ call_metadata = @config.rpcs.delete_fleet_package.metadata.to_h
1247
+
1248
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1249
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1250
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1251
+ gapic_version: ::Google::Cloud::ConfigDelivery::V1::VERSION,
1252
+ transports_version_send: [:rest]
1253
+
1254
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1255
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1256
+
1257
+ options.apply_defaults timeout: @config.rpcs.delete_fleet_package.timeout,
1258
+ metadata: call_metadata,
1259
+ retry_policy: @config.rpcs.delete_fleet_package.retry_policy
1260
+
1261
+ options.apply_defaults timeout: @config.timeout,
1262
+ metadata: @config.metadata,
1263
+ retry_policy: @config.retry_policy
1264
+
1265
+ @config_delivery_stub.delete_fleet_package request, options do |result, operation|
1266
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1267
+ yield result, operation if block_given?
1268
+ throw :response, result
1269
+ end
1270
+ rescue ::Gapic::Rest::Error => e
1271
+ raise ::Google::Cloud::Error.from_error(e)
1272
+ end
1273
+
1274
+ ##
1275
+ # Lists Releases in a given project and location.
1276
+ #
1277
+ # @overload list_releases(request, options = nil)
1278
+ # Pass arguments to `list_releases` via a request object, either of type
1279
+ # {::Google::Cloud::ConfigDelivery::V1::ListReleasesRequest} or an equivalent Hash.
1280
+ #
1281
+ # @param request [::Google::Cloud::ConfigDelivery::V1::ListReleasesRequest, ::Hash]
1282
+ # A request object representing the call parameters. Required. To specify no
1283
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1284
+ # @param options [::Gapic::CallOptions, ::Hash]
1285
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1286
+ #
1287
+ # @overload list_releases(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
1288
+ # Pass arguments to `list_releases` via keyword arguments. Note that at
1289
+ # least one keyword argument is required. To specify no parameters, or to keep all
1290
+ # the default parameter values, pass an empty Hash as a request object (see above).
1291
+ #
1292
+ # @param parent [::String]
1293
+ # Required. Parent value for ListReleasesRequest.
1294
+ # @param page_size [::Integer]
1295
+ # Optional. Requested page size. Server may return fewer items than
1296
+ # requested. If unspecified, server will pick an appropriate default.
1297
+ # @param page_token [::String]
1298
+ # Optional. A token identifying a page of results the server should return.
1299
+ # @param filter [::String]
1300
+ # Optional. Filtering results.
1301
+ # @param order_by [::String]
1302
+ # Optional. Hint for how to order the results.
1303
+ # @yield [result, operation] Access the result along with the TransportOperation object
1304
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ConfigDelivery::V1::Release>]
1305
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1306
+ #
1307
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ConfigDelivery::V1::Release>]
1308
+ #
1309
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1310
+ #
1311
+ # @example Basic example
1312
+ # require "google/cloud/config_delivery/v1"
1313
+ #
1314
+ # # Create a client object. The client can be reused for multiple calls.
1315
+ # client = Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Rest::Client.new
1316
+ #
1317
+ # # Create a request. To set request fields, pass in keyword arguments.
1318
+ # request = Google::Cloud::ConfigDelivery::V1::ListReleasesRequest.new
1319
+ #
1320
+ # # Call the list_releases method.
1321
+ # result = client.list_releases request
1322
+ #
1323
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1324
+ # # over elements, and API calls will be issued to fetch pages as needed.
1325
+ # result.each do |item|
1326
+ # # Each element is of type ::Google::Cloud::ConfigDelivery::V1::Release.
1327
+ # p item
1328
+ # end
1329
+ #
1330
+ def list_releases request, options = nil
1331
+ raise ::ArgumentError, "request must be provided" if request.nil?
1332
+
1333
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigDelivery::V1::ListReleasesRequest
1334
+
1335
+ # Converts hash and nil to an options object
1336
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1337
+
1338
+ # Customize the options with defaults
1339
+ call_metadata = @config.rpcs.list_releases.metadata.to_h
1340
+
1341
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1342
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1343
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1344
+ gapic_version: ::Google::Cloud::ConfigDelivery::V1::VERSION,
1345
+ transports_version_send: [:rest]
1346
+
1347
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1348
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1349
+
1350
+ options.apply_defaults timeout: @config.rpcs.list_releases.timeout,
1351
+ metadata: call_metadata,
1352
+ retry_policy: @config.rpcs.list_releases.retry_policy
1353
+
1354
+ options.apply_defaults timeout: @config.timeout,
1355
+ metadata: @config.metadata,
1356
+ retry_policy: @config.retry_policy
1357
+
1358
+ @config_delivery_stub.list_releases request, options do |result, operation|
1359
+ result = ::Gapic::Rest::PagedEnumerable.new @config_delivery_stub, :list_releases, "releases", request, result, options
1360
+ yield result, operation if block_given?
1361
+ throw :response, result
1362
+ end
1363
+ rescue ::Gapic::Rest::Error => e
1364
+ raise ::Google::Cloud::Error.from_error(e)
1365
+ end
1366
+
1367
+ ##
1368
+ # Gets details of a single Release.
1369
+ #
1370
+ # @overload get_release(request, options = nil)
1371
+ # Pass arguments to `get_release` via a request object, either of type
1372
+ # {::Google::Cloud::ConfigDelivery::V1::GetReleaseRequest} or an equivalent Hash.
1373
+ #
1374
+ # @param request [::Google::Cloud::ConfigDelivery::V1::GetReleaseRequest, ::Hash]
1375
+ # A request object representing the call parameters. Required. To specify no
1376
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1377
+ # @param options [::Gapic::CallOptions, ::Hash]
1378
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1379
+ #
1380
+ # @overload get_release(name: nil)
1381
+ # Pass arguments to `get_release` via keyword arguments. Note that at
1382
+ # least one keyword argument is required. To specify no parameters, or to keep all
1383
+ # the default parameter values, pass an empty Hash as a request object (see above).
1384
+ #
1385
+ # @param name [::String]
1386
+ # Required. Name of the resource
1387
+ # @yield [result, operation] Access the result along with the TransportOperation object
1388
+ # @yieldparam result [::Google::Cloud::ConfigDelivery::V1::Release]
1389
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1390
+ #
1391
+ # @return [::Google::Cloud::ConfigDelivery::V1::Release]
1392
+ #
1393
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1394
+ #
1395
+ # @example Basic example
1396
+ # require "google/cloud/config_delivery/v1"
1397
+ #
1398
+ # # Create a client object. The client can be reused for multiple calls.
1399
+ # client = Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Rest::Client.new
1400
+ #
1401
+ # # Create a request. To set request fields, pass in keyword arguments.
1402
+ # request = Google::Cloud::ConfigDelivery::V1::GetReleaseRequest.new
1403
+ #
1404
+ # # Call the get_release method.
1405
+ # result = client.get_release request
1406
+ #
1407
+ # # The returned object is of type Google::Cloud::ConfigDelivery::V1::Release.
1408
+ # p result
1409
+ #
1410
+ def get_release request, options = nil
1411
+ raise ::ArgumentError, "request must be provided" if request.nil?
1412
+
1413
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigDelivery::V1::GetReleaseRequest
1414
+
1415
+ # Converts hash and nil to an options object
1416
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1417
+
1418
+ # Customize the options with defaults
1419
+ call_metadata = @config.rpcs.get_release.metadata.to_h
1420
+
1421
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1422
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1423
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1424
+ gapic_version: ::Google::Cloud::ConfigDelivery::V1::VERSION,
1425
+ transports_version_send: [:rest]
1426
+
1427
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1428
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1429
+
1430
+ options.apply_defaults timeout: @config.rpcs.get_release.timeout,
1431
+ metadata: call_metadata,
1432
+ retry_policy: @config.rpcs.get_release.retry_policy
1433
+
1434
+ options.apply_defaults timeout: @config.timeout,
1435
+ metadata: @config.metadata,
1436
+ retry_policy: @config.retry_policy
1437
+
1438
+ @config_delivery_stub.get_release request, options do |result, operation|
1439
+ yield result, operation if block_given?
1440
+ end
1441
+ rescue ::Gapic::Rest::Error => e
1442
+ raise ::Google::Cloud::Error.from_error(e)
1443
+ end
1444
+
1445
+ ##
1446
+ # Creates a new Release in a given project, location and resource bundle.
1447
+ #
1448
+ # @overload create_release(request, options = nil)
1449
+ # Pass arguments to `create_release` via a request object, either of type
1450
+ # {::Google::Cloud::ConfigDelivery::V1::CreateReleaseRequest} or an equivalent Hash.
1451
+ #
1452
+ # @param request [::Google::Cloud::ConfigDelivery::V1::CreateReleaseRequest, ::Hash]
1453
+ # A request object representing the call parameters. Required. To specify no
1454
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1455
+ # @param options [::Gapic::CallOptions, ::Hash]
1456
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1457
+ #
1458
+ # @overload create_release(parent: nil, release_id: nil, release: nil, request_id: nil)
1459
+ # Pass arguments to `create_release` via keyword arguments. Note that at
1460
+ # least one keyword argument is required. To specify no parameters, or to keep all
1461
+ # the default parameter values, pass an empty Hash as a request object (see above).
1462
+ #
1463
+ # @param parent [::String]
1464
+ # Required. Value for parent.
1465
+ # @param release_id [::String]
1466
+ # Required. Id of the requesting object
1467
+ # If auto-generating Id server-side, remove this field and
1468
+ # release_id from the method_signature of Create RPC
1469
+ # @param release [::Google::Cloud::ConfigDelivery::V1::Release, ::Hash]
1470
+ # Required. The resource being created
1471
+ # @param request_id [::String]
1472
+ # Optional. An optional request ID to identify requests. Specify a unique
1473
+ # request ID so that if you must retry your request, the server will know to
1474
+ # ignore the request if it has already been completed. The server will
1475
+ # guarantee that for at least 60 minutes since the first request.
1476
+ #
1477
+ # For example, consider a situation where you make an initial request and the
1478
+ # request times out. If you make the request again with the same request
1479
+ # ID, the server can check if original operation with the same request ID
1480
+ # was received, and if so, will ignore the second request. This prevents
1481
+ # clients from accidentally creating duplicate commitments.
1482
+ #
1483
+ # The request ID must be a valid UUID with the exception that zero UUID is
1484
+ # not supported (00000000-0000-0000-0000-000000000000).
1485
+ # @yield [result, operation] Access the result along with the TransportOperation object
1486
+ # @yieldparam result [::Gapic::Operation]
1487
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1488
+ #
1489
+ # @return [::Gapic::Operation]
1490
+ #
1491
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1492
+ #
1493
+ # @example Basic example
1494
+ # require "google/cloud/config_delivery/v1"
1495
+ #
1496
+ # # Create a client object. The client can be reused for multiple calls.
1497
+ # client = Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Rest::Client.new
1498
+ #
1499
+ # # Create a request. To set request fields, pass in keyword arguments.
1500
+ # request = Google::Cloud::ConfigDelivery::V1::CreateReleaseRequest.new
1501
+ #
1502
+ # # Call the create_release method.
1503
+ # result = client.create_release request
1504
+ #
1505
+ # # The returned object is of type Gapic::Operation. You can use it to
1506
+ # # check the status of an operation, cancel it, or wait for results.
1507
+ # # Here is how to wait for a response.
1508
+ # result.wait_until_done! timeout: 60
1509
+ # if result.response?
1510
+ # p result.response
1511
+ # else
1512
+ # puts "No response received."
1513
+ # end
1514
+ #
1515
+ def create_release request, options = nil
1516
+ raise ::ArgumentError, "request must be provided" if request.nil?
1517
+
1518
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigDelivery::V1::CreateReleaseRequest
1519
+
1520
+ # Converts hash and nil to an options object
1521
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1522
+
1523
+ # Customize the options with defaults
1524
+ call_metadata = @config.rpcs.create_release.metadata.to_h
1525
+
1526
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1527
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1528
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1529
+ gapic_version: ::Google::Cloud::ConfigDelivery::V1::VERSION,
1530
+ transports_version_send: [:rest]
1531
+
1532
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1533
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1534
+
1535
+ options.apply_defaults timeout: @config.rpcs.create_release.timeout,
1536
+ metadata: call_metadata,
1537
+ retry_policy: @config.rpcs.create_release.retry_policy
1538
+
1539
+ options.apply_defaults timeout: @config.timeout,
1540
+ metadata: @config.metadata,
1541
+ retry_policy: @config.retry_policy
1542
+
1543
+ @config_delivery_stub.create_release request, options do |result, operation|
1544
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1545
+ yield result, operation if block_given?
1546
+ throw :response, result
1547
+ end
1548
+ rescue ::Gapic::Rest::Error => e
1549
+ raise ::Google::Cloud::Error.from_error(e)
1550
+ end
1551
+
1552
+ ##
1553
+ # Updates the parameters of a single Release.
1554
+ #
1555
+ # @overload update_release(request, options = nil)
1556
+ # Pass arguments to `update_release` via a request object, either of type
1557
+ # {::Google::Cloud::ConfigDelivery::V1::UpdateReleaseRequest} or an equivalent Hash.
1558
+ #
1559
+ # @param request [::Google::Cloud::ConfigDelivery::V1::UpdateReleaseRequest, ::Hash]
1560
+ # A request object representing the call parameters. Required. To specify no
1561
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1562
+ # @param options [::Gapic::CallOptions, ::Hash]
1563
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1564
+ #
1565
+ # @overload update_release(update_mask: nil, release: nil, request_id: nil)
1566
+ # Pass arguments to `update_release` via keyword arguments. Note that at
1567
+ # least one keyword argument is required. To specify no parameters, or to keep all
1568
+ # the default parameter values, pass an empty Hash as a request object (see above).
1569
+ #
1570
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
1571
+ # Required. Field mask is used to specify the fields to be overwritten in the
1572
+ # Release resource by the update.
1573
+ # The fields specified in the update_mask are relative to the resource, not
1574
+ # the full request. A field will be overwritten if it is in the mask. If the
1575
+ # user does not provide a mask then all fields will be overwritten.
1576
+ # @param release [::Google::Cloud::ConfigDelivery::V1::Release, ::Hash]
1577
+ # Required. The resource being updated
1578
+ # @param request_id [::String]
1579
+ # Optional. An optional request ID to identify requests. Specify a unique
1580
+ # request ID so that if you must retry your request, the server will know to
1581
+ # ignore the request if it has already been completed. The server will
1582
+ # guarantee that for at least 60 minutes since the first request.
1583
+ #
1584
+ # For example, consider a situation where you make an initial request and the
1585
+ # request times out. If you make the request again with the same request
1586
+ # ID, the server can check if original operation with the same request ID
1587
+ # was received, and if so, will ignore the second request. This prevents
1588
+ # clients from accidentally creating duplicate commitments.
1589
+ #
1590
+ # The request ID must be a valid UUID with the exception that zero UUID is
1591
+ # not supported (00000000-0000-0000-0000-000000000000).
1592
+ # @yield [result, operation] Access the result along with the TransportOperation object
1593
+ # @yieldparam result [::Gapic::Operation]
1594
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1595
+ #
1596
+ # @return [::Gapic::Operation]
1597
+ #
1598
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1599
+ #
1600
+ # @example Basic example
1601
+ # require "google/cloud/config_delivery/v1"
1602
+ #
1603
+ # # Create a client object. The client can be reused for multiple calls.
1604
+ # client = Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Rest::Client.new
1605
+ #
1606
+ # # Create a request. To set request fields, pass in keyword arguments.
1607
+ # request = Google::Cloud::ConfigDelivery::V1::UpdateReleaseRequest.new
1608
+ #
1609
+ # # Call the update_release method.
1610
+ # result = client.update_release request
1611
+ #
1612
+ # # The returned object is of type Gapic::Operation. You can use it to
1613
+ # # check the status of an operation, cancel it, or wait for results.
1614
+ # # Here is how to wait for a response.
1615
+ # result.wait_until_done! timeout: 60
1616
+ # if result.response?
1617
+ # p result.response
1618
+ # else
1619
+ # puts "No response received."
1620
+ # end
1621
+ #
1622
+ def update_release request, options = nil
1623
+ raise ::ArgumentError, "request must be provided" if request.nil?
1624
+
1625
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigDelivery::V1::UpdateReleaseRequest
1626
+
1627
+ # Converts hash and nil to an options object
1628
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1629
+
1630
+ # Customize the options with defaults
1631
+ call_metadata = @config.rpcs.update_release.metadata.to_h
1632
+
1633
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1634
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1635
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1636
+ gapic_version: ::Google::Cloud::ConfigDelivery::V1::VERSION,
1637
+ transports_version_send: [:rest]
1638
+
1639
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1640
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1641
+
1642
+ options.apply_defaults timeout: @config.rpcs.update_release.timeout,
1643
+ metadata: call_metadata,
1644
+ retry_policy: @config.rpcs.update_release.retry_policy
1645
+
1646
+ options.apply_defaults timeout: @config.timeout,
1647
+ metadata: @config.metadata,
1648
+ retry_policy: @config.retry_policy
1649
+
1650
+ @config_delivery_stub.update_release request, options do |result, operation|
1651
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1652
+ yield result, operation if block_given?
1653
+ throw :response, result
1654
+ end
1655
+ rescue ::Gapic::Rest::Error => e
1656
+ raise ::Google::Cloud::Error.from_error(e)
1657
+ end
1658
+
1659
+ ##
1660
+ # Deletes a single Release.
1661
+ #
1662
+ # @overload delete_release(request, options = nil)
1663
+ # Pass arguments to `delete_release` via a request object, either of type
1664
+ # {::Google::Cloud::ConfigDelivery::V1::DeleteReleaseRequest} or an equivalent Hash.
1665
+ #
1666
+ # @param request [::Google::Cloud::ConfigDelivery::V1::DeleteReleaseRequest, ::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 delete_release(name: nil, request_id: nil, force: nil)
1673
+ # Pass arguments to `delete_release` 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 the resource
1679
+ # @param request_id [::String]
1680
+ # Optional. An optional request ID to identify requests. Specify a unique
1681
+ # request ID so that if you must retry your request, the server will know to
1682
+ # ignore the request if it has already been completed. The server will
1683
+ # guarantee that for at least 60 minutes after the first request.
1684
+ #
1685
+ # For example, consider a situation where you make an initial request and the
1686
+ # request times out. If you make the request again with the same request
1687
+ # ID, the server can check if original operation with the same request ID
1688
+ # was received, and if so, will ignore the second request. This prevents
1689
+ # clients from accidentally creating duplicate commitments.
1690
+ #
1691
+ # The request ID must be a valid UUID with the exception that zero UUID is
1692
+ # not supported (00000000-0000-0000-0000-000000000000).
1693
+ # @param force [::Boolean]
1694
+ # Optional. If set to true, any variants of this release will also be
1695
+ # deleted. (Otherwise, the request will only work if the release has no
1696
+ # variants.)
1697
+ # @yield [result, operation] Access the result along with the TransportOperation object
1698
+ # @yieldparam result [::Gapic::Operation]
1699
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1700
+ #
1701
+ # @return [::Gapic::Operation]
1702
+ #
1703
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1704
+ #
1705
+ # @example Basic example
1706
+ # require "google/cloud/config_delivery/v1"
1707
+ #
1708
+ # # Create a client object. The client can be reused for multiple calls.
1709
+ # client = Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Rest::Client.new
1710
+ #
1711
+ # # Create a request. To set request fields, pass in keyword arguments.
1712
+ # request = Google::Cloud::ConfigDelivery::V1::DeleteReleaseRequest.new
1713
+ #
1714
+ # # Call the delete_release method.
1715
+ # result = client.delete_release request
1716
+ #
1717
+ # # The returned object is of type Gapic::Operation. You can use it to
1718
+ # # check the status of an operation, cancel it, or wait for results.
1719
+ # # Here is how to wait for a response.
1720
+ # result.wait_until_done! timeout: 60
1721
+ # if result.response?
1722
+ # p result.response
1723
+ # else
1724
+ # puts "No response received."
1725
+ # end
1726
+ #
1727
+ def delete_release request, options = nil
1728
+ raise ::ArgumentError, "request must be provided" if request.nil?
1729
+
1730
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigDelivery::V1::DeleteReleaseRequest
1731
+
1732
+ # Converts hash and nil to an options object
1733
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1734
+
1735
+ # Customize the options with defaults
1736
+ call_metadata = @config.rpcs.delete_release.metadata.to_h
1737
+
1738
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1739
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1740
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1741
+ gapic_version: ::Google::Cloud::ConfigDelivery::V1::VERSION,
1742
+ transports_version_send: [:rest]
1743
+
1744
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1745
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1746
+
1747
+ options.apply_defaults timeout: @config.rpcs.delete_release.timeout,
1748
+ metadata: call_metadata,
1749
+ retry_policy: @config.rpcs.delete_release.retry_policy
1750
+
1751
+ options.apply_defaults timeout: @config.timeout,
1752
+ metadata: @config.metadata,
1753
+ retry_policy: @config.retry_policy
1754
+
1755
+ @config_delivery_stub.delete_release request, options do |result, operation|
1756
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1757
+ yield result, operation if block_given?
1758
+ throw :response, result
1759
+ end
1760
+ rescue ::Gapic::Rest::Error => e
1761
+ raise ::Google::Cloud::Error.from_error(e)
1762
+ end
1763
+
1764
+ ##
1765
+ # Lists Variants in a given project and location.
1766
+ #
1767
+ # @overload list_variants(request, options = nil)
1768
+ # Pass arguments to `list_variants` via a request object, either of type
1769
+ # {::Google::Cloud::ConfigDelivery::V1::ListVariantsRequest} or an equivalent Hash.
1770
+ #
1771
+ # @param request [::Google::Cloud::ConfigDelivery::V1::ListVariantsRequest, ::Hash]
1772
+ # A request object representing the call parameters. Required. To specify no
1773
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1774
+ # @param options [::Gapic::CallOptions, ::Hash]
1775
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1776
+ #
1777
+ # @overload list_variants(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
1778
+ # Pass arguments to `list_variants` via keyword arguments. Note that at
1779
+ # least one keyword argument is required. To specify no parameters, or to keep all
1780
+ # the default parameter values, pass an empty Hash as a request object (see above).
1781
+ #
1782
+ # @param parent [::String]
1783
+ # Required. Parent value for ListVariantsRequest.
1784
+ # @param page_size [::Integer]
1785
+ # Optional. Requested page size. Server may return fewer items than
1786
+ # requested. If unspecified, server will pick an appropriate default.
1787
+ # @param page_token [::String]
1788
+ # Optional. A token identifying a page of results the server should return.
1789
+ # @param filter [::String]
1790
+ # Optional. Filtering results.
1791
+ # @param order_by [::String]
1792
+ # Optional. Hint for how to order the results.
1793
+ # @yield [result, operation] Access the result along with the TransportOperation object
1794
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ConfigDelivery::V1::Variant>]
1795
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1796
+ #
1797
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ConfigDelivery::V1::Variant>]
1798
+ #
1799
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1800
+ #
1801
+ # @example Basic example
1802
+ # require "google/cloud/config_delivery/v1"
1803
+ #
1804
+ # # Create a client object. The client can be reused for multiple calls.
1805
+ # client = Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Rest::Client.new
1806
+ #
1807
+ # # Create a request. To set request fields, pass in keyword arguments.
1808
+ # request = Google::Cloud::ConfigDelivery::V1::ListVariantsRequest.new
1809
+ #
1810
+ # # Call the list_variants method.
1811
+ # result = client.list_variants request
1812
+ #
1813
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1814
+ # # over elements, and API calls will be issued to fetch pages as needed.
1815
+ # result.each do |item|
1816
+ # # Each element is of type ::Google::Cloud::ConfigDelivery::V1::Variant.
1817
+ # p item
1818
+ # end
1819
+ #
1820
+ def list_variants request, options = nil
1821
+ raise ::ArgumentError, "request must be provided" if request.nil?
1822
+
1823
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigDelivery::V1::ListVariantsRequest
1824
+
1825
+ # Converts hash and nil to an options object
1826
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1827
+
1828
+ # Customize the options with defaults
1829
+ call_metadata = @config.rpcs.list_variants.metadata.to_h
1830
+
1831
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1832
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1833
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1834
+ gapic_version: ::Google::Cloud::ConfigDelivery::V1::VERSION,
1835
+ transports_version_send: [:rest]
1836
+
1837
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1838
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1839
+
1840
+ options.apply_defaults timeout: @config.rpcs.list_variants.timeout,
1841
+ metadata: call_metadata,
1842
+ retry_policy: @config.rpcs.list_variants.retry_policy
1843
+
1844
+ options.apply_defaults timeout: @config.timeout,
1845
+ metadata: @config.metadata,
1846
+ retry_policy: @config.retry_policy
1847
+
1848
+ @config_delivery_stub.list_variants request, options do |result, operation|
1849
+ result = ::Gapic::Rest::PagedEnumerable.new @config_delivery_stub, :list_variants, "variants", request, result, options
1850
+ yield result, operation if block_given?
1851
+ throw :response, result
1852
+ end
1853
+ rescue ::Gapic::Rest::Error => e
1854
+ raise ::Google::Cloud::Error.from_error(e)
1855
+ end
1856
+
1857
+ ##
1858
+ # Gets details of a single Variant.
1859
+ #
1860
+ # @overload get_variant(request, options = nil)
1861
+ # Pass arguments to `get_variant` via a request object, either of type
1862
+ # {::Google::Cloud::ConfigDelivery::V1::GetVariantRequest} or an equivalent Hash.
1863
+ #
1864
+ # @param request [::Google::Cloud::ConfigDelivery::V1::GetVariantRequest, ::Hash]
1865
+ # A request object representing the call parameters. Required. To specify no
1866
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1867
+ # @param options [::Gapic::CallOptions, ::Hash]
1868
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1869
+ #
1870
+ # @overload get_variant(name: nil)
1871
+ # Pass arguments to `get_variant` via keyword arguments. Note that at
1872
+ # least one keyword argument is required. To specify no parameters, or to keep all
1873
+ # the default parameter values, pass an empty Hash as a request object (see above).
1874
+ #
1875
+ # @param name [::String]
1876
+ # Required. Name of the resource
1877
+ # @yield [result, operation] Access the result along with the TransportOperation object
1878
+ # @yieldparam result [::Google::Cloud::ConfigDelivery::V1::Variant]
1879
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1880
+ #
1881
+ # @return [::Google::Cloud::ConfigDelivery::V1::Variant]
1882
+ #
1883
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1884
+ #
1885
+ # @example Basic example
1886
+ # require "google/cloud/config_delivery/v1"
1887
+ #
1888
+ # # Create a client object. The client can be reused for multiple calls.
1889
+ # client = Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Rest::Client.new
1890
+ #
1891
+ # # Create a request. To set request fields, pass in keyword arguments.
1892
+ # request = Google::Cloud::ConfigDelivery::V1::GetVariantRequest.new
1893
+ #
1894
+ # # Call the get_variant method.
1895
+ # result = client.get_variant request
1896
+ #
1897
+ # # The returned object is of type Google::Cloud::ConfigDelivery::V1::Variant.
1898
+ # p result
1899
+ #
1900
+ def get_variant request, options = nil
1901
+ raise ::ArgumentError, "request must be provided" if request.nil?
1902
+
1903
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigDelivery::V1::GetVariantRequest
1904
+
1905
+ # Converts hash and nil to an options object
1906
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1907
+
1908
+ # Customize the options with defaults
1909
+ call_metadata = @config.rpcs.get_variant.metadata.to_h
1910
+
1911
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1912
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1913
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1914
+ gapic_version: ::Google::Cloud::ConfigDelivery::V1::VERSION,
1915
+ transports_version_send: [:rest]
1916
+
1917
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1918
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1919
+
1920
+ options.apply_defaults timeout: @config.rpcs.get_variant.timeout,
1921
+ metadata: call_metadata,
1922
+ retry_policy: @config.rpcs.get_variant.retry_policy
1923
+
1924
+ options.apply_defaults timeout: @config.timeout,
1925
+ metadata: @config.metadata,
1926
+ retry_policy: @config.retry_policy
1927
+
1928
+ @config_delivery_stub.get_variant request, options do |result, operation|
1929
+ yield result, operation if block_given?
1930
+ end
1931
+ rescue ::Gapic::Rest::Error => e
1932
+ raise ::Google::Cloud::Error.from_error(e)
1933
+ end
1934
+
1935
+ ##
1936
+ # Creates a new Variant in a given project, location, resource bundle, and
1937
+ # release.
1938
+ #
1939
+ # @overload create_variant(request, options = nil)
1940
+ # Pass arguments to `create_variant` via a request object, either of type
1941
+ # {::Google::Cloud::ConfigDelivery::V1::CreateVariantRequest} or an equivalent Hash.
1942
+ #
1943
+ # @param request [::Google::Cloud::ConfigDelivery::V1::CreateVariantRequest, ::Hash]
1944
+ # A request object representing the call parameters. Required. To specify no
1945
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1946
+ # @param options [::Gapic::CallOptions, ::Hash]
1947
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1948
+ #
1949
+ # @overload create_variant(parent: nil, variant_id: nil, variant: nil, request_id: nil)
1950
+ # Pass arguments to `create_variant` via keyword arguments. Note that at
1951
+ # least one keyword argument is required. To specify no parameters, or to keep all
1952
+ # the default parameter values, pass an empty Hash as a request object (see above).
1953
+ #
1954
+ # @param parent [::String]
1955
+ # Required. Value for parent.
1956
+ # @param variant_id [::String]
1957
+ # Required. Id of the requesting object
1958
+ # @param variant [::Google::Cloud::ConfigDelivery::V1::Variant, ::Hash]
1959
+ # Required. The resource being created
1960
+ # @param request_id [::String]
1961
+ # Optional. An optional request ID to identify requests. Specify a unique
1962
+ # request ID so that if you must retry your request, the server will know to
1963
+ # ignore the request if it has already been completed. The server will
1964
+ # guarantee that for at least 60 minutes since the first request.
1965
+ #
1966
+ # For example, consider a situation where you make an initial request and the
1967
+ # request times out. If you make the request again with the same request
1968
+ # ID, the server can check if original operation with the same request ID
1969
+ # was received, and if so, will ignore the second request. This prevents
1970
+ # clients from accidentally creating duplicate commitments.
1971
+ #
1972
+ # The request ID must be a valid UUID with the exception that zero UUID is
1973
+ # not supported (00000000-0000-0000-0000-000000000000).
1974
+ # @yield [result, operation] Access the result along with the TransportOperation object
1975
+ # @yieldparam result [::Gapic::Operation]
1976
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1977
+ #
1978
+ # @return [::Gapic::Operation]
1979
+ #
1980
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1981
+ #
1982
+ # @example Basic example
1983
+ # require "google/cloud/config_delivery/v1"
1984
+ #
1985
+ # # Create a client object. The client can be reused for multiple calls.
1986
+ # client = Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Rest::Client.new
1987
+ #
1988
+ # # Create a request. To set request fields, pass in keyword arguments.
1989
+ # request = Google::Cloud::ConfigDelivery::V1::CreateVariantRequest.new
1990
+ #
1991
+ # # Call the create_variant method.
1992
+ # result = client.create_variant request
1993
+ #
1994
+ # # The returned object is of type Gapic::Operation. You can use it to
1995
+ # # check the status of an operation, cancel it, or wait for results.
1996
+ # # Here is how to wait for a response.
1997
+ # result.wait_until_done! timeout: 60
1998
+ # if result.response?
1999
+ # p result.response
2000
+ # else
2001
+ # puts "No response received."
2002
+ # end
2003
+ #
2004
+ def create_variant request, options = nil
2005
+ raise ::ArgumentError, "request must be provided" if request.nil?
2006
+
2007
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigDelivery::V1::CreateVariantRequest
2008
+
2009
+ # Converts hash and nil to an options object
2010
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2011
+
2012
+ # Customize the options with defaults
2013
+ call_metadata = @config.rpcs.create_variant.metadata.to_h
2014
+
2015
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2016
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2017
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2018
+ gapic_version: ::Google::Cloud::ConfigDelivery::V1::VERSION,
2019
+ transports_version_send: [:rest]
2020
+
2021
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2022
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2023
+
2024
+ options.apply_defaults timeout: @config.rpcs.create_variant.timeout,
2025
+ metadata: call_metadata,
2026
+ retry_policy: @config.rpcs.create_variant.retry_policy
2027
+
2028
+ options.apply_defaults timeout: @config.timeout,
2029
+ metadata: @config.metadata,
2030
+ retry_policy: @config.retry_policy
2031
+
2032
+ @config_delivery_stub.create_variant request, options do |result, operation|
2033
+ result = ::Gapic::Operation.new result, @operations_client, options: options
2034
+ yield result, operation if block_given?
2035
+ throw :response, result
2036
+ end
2037
+ rescue ::Gapic::Rest::Error => e
2038
+ raise ::Google::Cloud::Error.from_error(e)
2039
+ end
2040
+
2041
+ ##
2042
+ # Updates the parameters of a single Variant.
2043
+ #
2044
+ # @overload update_variant(request, options = nil)
2045
+ # Pass arguments to `update_variant` via a request object, either of type
2046
+ # {::Google::Cloud::ConfigDelivery::V1::UpdateVariantRequest} or an equivalent Hash.
2047
+ #
2048
+ # @param request [::Google::Cloud::ConfigDelivery::V1::UpdateVariantRequest, ::Hash]
2049
+ # A request object representing the call parameters. Required. To specify no
2050
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2051
+ # @param options [::Gapic::CallOptions, ::Hash]
2052
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2053
+ #
2054
+ # @overload update_variant(update_mask: nil, variant: nil, request_id: nil)
2055
+ # Pass arguments to `update_variant` via keyword arguments. Note that at
2056
+ # least one keyword argument is required. To specify no parameters, or to keep all
2057
+ # the default parameter values, pass an empty Hash as a request object (see above).
2058
+ #
2059
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
2060
+ # Optional. Field mask is used to specify the fields to be overwritten in the
2061
+ # Variant resource by the update.
2062
+ # The fields specified in the update_mask are relative to the resource, not
2063
+ # the full request. A field will be overwritten if it is in the mask. If the
2064
+ # user does not provide a mask then all fields will be overwritten.
2065
+ # @param variant [::Google::Cloud::ConfigDelivery::V1::Variant, ::Hash]
2066
+ # Required. The resource being updated
2067
+ # @param request_id [::String]
2068
+ # Optional. An optional request ID to identify requests. Specify a unique
2069
+ # request ID so that if you must retry your request, the server will know to
2070
+ # ignore the request if it has already been completed. The server will
2071
+ # guarantee that for at least 60 minutes since the first request.
2072
+ #
2073
+ # For example, consider a situation where you make an initial request and the
2074
+ # request times out. If you make the request again with the same request
2075
+ # ID, the server can check if original operation with the same request ID
2076
+ # was received, and if so, will ignore the second request. This prevents
2077
+ # clients from accidentally creating duplicate commitments.
2078
+ #
2079
+ # The request ID must be a valid UUID with the exception that zero UUID is
2080
+ # not supported (00000000-0000-0000-0000-000000000000).
2081
+ # @yield [result, operation] Access the result along with the TransportOperation object
2082
+ # @yieldparam result [::Gapic::Operation]
2083
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2084
+ #
2085
+ # @return [::Gapic::Operation]
2086
+ #
2087
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2088
+ #
2089
+ # @example Basic example
2090
+ # require "google/cloud/config_delivery/v1"
2091
+ #
2092
+ # # Create a client object. The client can be reused for multiple calls.
2093
+ # client = Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Rest::Client.new
2094
+ #
2095
+ # # Create a request. To set request fields, pass in keyword arguments.
2096
+ # request = Google::Cloud::ConfigDelivery::V1::UpdateVariantRequest.new
2097
+ #
2098
+ # # Call the update_variant method.
2099
+ # result = client.update_variant request
2100
+ #
2101
+ # # The returned object is of type Gapic::Operation. You can use it to
2102
+ # # check the status of an operation, cancel it, or wait for results.
2103
+ # # Here is how to wait for a response.
2104
+ # result.wait_until_done! timeout: 60
2105
+ # if result.response?
2106
+ # p result.response
2107
+ # else
2108
+ # puts "No response received."
2109
+ # end
2110
+ #
2111
+ def update_variant request, options = nil
2112
+ raise ::ArgumentError, "request must be provided" if request.nil?
2113
+
2114
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigDelivery::V1::UpdateVariantRequest
2115
+
2116
+ # Converts hash and nil to an options object
2117
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2118
+
2119
+ # Customize the options with defaults
2120
+ call_metadata = @config.rpcs.update_variant.metadata.to_h
2121
+
2122
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2123
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2124
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2125
+ gapic_version: ::Google::Cloud::ConfigDelivery::V1::VERSION,
2126
+ transports_version_send: [:rest]
2127
+
2128
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2129
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2130
+
2131
+ options.apply_defaults timeout: @config.rpcs.update_variant.timeout,
2132
+ metadata: call_metadata,
2133
+ retry_policy: @config.rpcs.update_variant.retry_policy
2134
+
2135
+ options.apply_defaults timeout: @config.timeout,
2136
+ metadata: @config.metadata,
2137
+ retry_policy: @config.retry_policy
2138
+
2139
+ @config_delivery_stub.update_variant request, options do |result, operation|
2140
+ result = ::Gapic::Operation.new result, @operations_client, options: options
2141
+ yield result, operation if block_given?
2142
+ throw :response, result
2143
+ end
2144
+ rescue ::Gapic::Rest::Error => e
2145
+ raise ::Google::Cloud::Error.from_error(e)
2146
+ end
2147
+
2148
+ ##
2149
+ # Deletes a single Variant.
2150
+ #
2151
+ # @overload delete_variant(request, options = nil)
2152
+ # Pass arguments to `delete_variant` via a request object, either of type
2153
+ # {::Google::Cloud::ConfigDelivery::V1::DeleteVariantRequest} or an equivalent Hash.
2154
+ #
2155
+ # @param request [::Google::Cloud::ConfigDelivery::V1::DeleteVariantRequest, ::Hash]
2156
+ # A request object representing the call parameters. Required. To specify no
2157
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2158
+ # @param options [::Gapic::CallOptions, ::Hash]
2159
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2160
+ #
2161
+ # @overload delete_variant(name: nil, request_id: nil)
2162
+ # Pass arguments to `delete_variant` via keyword arguments. Note that at
2163
+ # least one keyword argument is required. To specify no parameters, or to keep all
2164
+ # the default parameter values, pass an empty Hash as a request object (see above).
2165
+ #
2166
+ # @param name [::String]
2167
+ # Required. Name of the resource
2168
+ # @param request_id [::String]
2169
+ # Optional. An optional request ID to identify requests. Specify a unique
2170
+ # request ID so that if you must retry your request, the server will know to
2171
+ # ignore the request if it has already been completed. The server will
2172
+ # guarantee that for at least 60 minutes after the first request.
2173
+ #
2174
+ # For example, consider a situation where you make an initial request and the
2175
+ # request times out. If you make the request again with the same request
2176
+ # ID, the server can check if original operation with the same request ID
2177
+ # was received, and if so, will ignore the second request. This prevents
2178
+ # clients from accidentally creating duplicate commitments.
2179
+ #
2180
+ # The request ID must be a valid UUID with the exception that zero UUID is
2181
+ # not supported (00000000-0000-0000-0000-000000000000).
2182
+ # @yield [result, operation] Access the result along with the TransportOperation object
2183
+ # @yieldparam result [::Gapic::Operation]
2184
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2185
+ #
2186
+ # @return [::Gapic::Operation]
2187
+ #
2188
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2189
+ #
2190
+ # @example Basic example
2191
+ # require "google/cloud/config_delivery/v1"
2192
+ #
2193
+ # # Create a client object. The client can be reused for multiple calls.
2194
+ # client = Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Rest::Client.new
2195
+ #
2196
+ # # Create a request. To set request fields, pass in keyword arguments.
2197
+ # request = Google::Cloud::ConfigDelivery::V1::DeleteVariantRequest.new
2198
+ #
2199
+ # # Call the delete_variant method.
2200
+ # result = client.delete_variant request
2201
+ #
2202
+ # # The returned object is of type Gapic::Operation. You can use it to
2203
+ # # check the status of an operation, cancel it, or wait for results.
2204
+ # # Here is how to wait for a response.
2205
+ # result.wait_until_done! timeout: 60
2206
+ # if result.response?
2207
+ # p result.response
2208
+ # else
2209
+ # puts "No response received."
2210
+ # end
2211
+ #
2212
+ def delete_variant request, options = nil
2213
+ raise ::ArgumentError, "request must be provided" if request.nil?
2214
+
2215
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigDelivery::V1::DeleteVariantRequest
2216
+
2217
+ # Converts hash and nil to an options object
2218
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2219
+
2220
+ # Customize the options with defaults
2221
+ call_metadata = @config.rpcs.delete_variant.metadata.to_h
2222
+
2223
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2224
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2225
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2226
+ gapic_version: ::Google::Cloud::ConfigDelivery::V1::VERSION,
2227
+ transports_version_send: [:rest]
2228
+
2229
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2230
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2231
+
2232
+ options.apply_defaults timeout: @config.rpcs.delete_variant.timeout,
2233
+ metadata: call_metadata,
2234
+ retry_policy: @config.rpcs.delete_variant.retry_policy
2235
+
2236
+ options.apply_defaults timeout: @config.timeout,
2237
+ metadata: @config.metadata,
2238
+ retry_policy: @config.retry_policy
2239
+
2240
+ @config_delivery_stub.delete_variant request, options do |result, operation|
2241
+ result = ::Gapic::Operation.new result, @operations_client, options: options
2242
+ yield result, operation if block_given?
2243
+ throw :response, result
2244
+ end
2245
+ rescue ::Gapic::Rest::Error => e
2246
+ raise ::Google::Cloud::Error.from_error(e)
2247
+ end
2248
+
2249
+ ##
2250
+ # Lists Rollouts in a given project, location, and Fleet Package.
2251
+ #
2252
+ # @overload list_rollouts(request, options = nil)
2253
+ # Pass arguments to `list_rollouts` via a request object, either of type
2254
+ # {::Google::Cloud::ConfigDelivery::V1::ListRolloutsRequest} or an equivalent Hash.
2255
+ #
2256
+ # @param request [::Google::Cloud::ConfigDelivery::V1::ListRolloutsRequest, ::Hash]
2257
+ # A request object representing the call parameters. Required. To specify no
2258
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2259
+ # @param options [::Gapic::CallOptions, ::Hash]
2260
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2261
+ #
2262
+ # @overload list_rollouts(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
2263
+ # Pass arguments to `list_rollouts` via keyword arguments. Note that at
2264
+ # least one keyword argument is required. To specify no parameters, or to keep all
2265
+ # the default parameter values, pass an empty Hash as a request object (see above).
2266
+ #
2267
+ # @param parent [::String]
2268
+ # Required. Parent value for ListRolloutsRequest
2269
+ # @param page_size [::Integer]
2270
+ # Optional. Requested page size. Server may return fewer items than
2271
+ # requested. If unspecified, server will pick an appropriate default.
2272
+ # @param page_token [::String]
2273
+ # Optional. A token identifying a page of results the server should return.
2274
+ # @param filter [::String]
2275
+ # Optional. Filtering results
2276
+ # @param order_by [::String]
2277
+ # Optional. Hint for how to order the results
2278
+ # @yield [result, operation] Access the result along with the TransportOperation object
2279
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ConfigDelivery::V1::Rollout>]
2280
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2281
+ #
2282
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ConfigDelivery::V1::Rollout>]
2283
+ #
2284
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2285
+ #
2286
+ # @example Basic example
2287
+ # require "google/cloud/config_delivery/v1"
2288
+ #
2289
+ # # Create a client object. The client can be reused for multiple calls.
2290
+ # client = Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Rest::Client.new
2291
+ #
2292
+ # # Create a request. To set request fields, pass in keyword arguments.
2293
+ # request = Google::Cloud::ConfigDelivery::V1::ListRolloutsRequest.new
2294
+ #
2295
+ # # Call the list_rollouts method.
2296
+ # result = client.list_rollouts request
2297
+ #
2298
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
2299
+ # # over elements, and API calls will be issued to fetch pages as needed.
2300
+ # result.each do |item|
2301
+ # # Each element is of type ::Google::Cloud::ConfigDelivery::V1::Rollout.
2302
+ # p item
2303
+ # end
2304
+ #
2305
+ def list_rollouts request, options = nil
2306
+ raise ::ArgumentError, "request must be provided" if request.nil?
2307
+
2308
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigDelivery::V1::ListRolloutsRequest
2309
+
2310
+ # Converts hash and nil to an options object
2311
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2312
+
2313
+ # Customize the options with defaults
2314
+ call_metadata = @config.rpcs.list_rollouts.metadata.to_h
2315
+
2316
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2317
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2318
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2319
+ gapic_version: ::Google::Cloud::ConfigDelivery::V1::VERSION,
2320
+ transports_version_send: [:rest]
2321
+
2322
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2323
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2324
+
2325
+ options.apply_defaults timeout: @config.rpcs.list_rollouts.timeout,
2326
+ metadata: call_metadata,
2327
+ retry_policy: @config.rpcs.list_rollouts.retry_policy
2328
+
2329
+ options.apply_defaults timeout: @config.timeout,
2330
+ metadata: @config.metadata,
2331
+ retry_policy: @config.retry_policy
2332
+
2333
+ @config_delivery_stub.list_rollouts request, options do |result, operation|
2334
+ result = ::Gapic::Rest::PagedEnumerable.new @config_delivery_stub, :list_rollouts, "rollouts", request, result, options
2335
+ yield result, operation if block_given?
2336
+ throw :response, result
2337
+ end
2338
+ rescue ::Gapic::Rest::Error => e
2339
+ raise ::Google::Cloud::Error.from_error(e)
2340
+ end
2341
+
2342
+ ##
2343
+ # Gets details of a single Rollout.
2344
+ #
2345
+ # @overload get_rollout(request, options = nil)
2346
+ # Pass arguments to `get_rollout` via a request object, either of type
2347
+ # {::Google::Cloud::ConfigDelivery::V1::GetRolloutRequest} or an equivalent Hash.
2348
+ #
2349
+ # @param request [::Google::Cloud::ConfigDelivery::V1::GetRolloutRequest, ::Hash]
2350
+ # A request object representing the call parameters. Required. To specify no
2351
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2352
+ # @param options [::Gapic::CallOptions, ::Hash]
2353
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2354
+ #
2355
+ # @overload get_rollout(name: nil)
2356
+ # Pass arguments to `get_rollout` via keyword arguments. Note that at
2357
+ # least one keyword argument is required. To specify no parameters, or to keep all
2358
+ # the default parameter values, pass an empty Hash as a request object (see above).
2359
+ #
2360
+ # @param name [::String]
2361
+ # Required. Name of the resource
2362
+ # @yield [result, operation] Access the result along with the TransportOperation object
2363
+ # @yieldparam result [::Google::Cloud::ConfigDelivery::V1::Rollout]
2364
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2365
+ #
2366
+ # @return [::Google::Cloud::ConfigDelivery::V1::Rollout]
2367
+ #
2368
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2369
+ #
2370
+ # @example Basic example
2371
+ # require "google/cloud/config_delivery/v1"
2372
+ #
2373
+ # # Create a client object. The client can be reused for multiple calls.
2374
+ # client = Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Rest::Client.new
2375
+ #
2376
+ # # Create a request. To set request fields, pass in keyword arguments.
2377
+ # request = Google::Cloud::ConfigDelivery::V1::GetRolloutRequest.new
2378
+ #
2379
+ # # Call the get_rollout method.
2380
+ # result = client.get_rollout request
2381
+ #
2382
+ # # The returned object is of type Google::Cloud::ConfigDelivery::V1::Rollout.
2383
+ # p result
2384
+ #
2385
+ def get_rollout request, options = nil
2386
+ raise ::ArgumentError, "request must be provided" if request.nil?
2387
+
2388
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigDelivery::V1::GetRolloutRequest
2389
+
2390
+ # Converts hash and nil to an options object
2391
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2392
+
2393
+ # Customize the options with defaults
2394
+ call_metadata = @config.rpcs.get_rollout.metadata.to_h
2395
+
2396
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2397
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2398
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2399
+ gapic_version: ::Google::Cloud::ConfigDelivery::V1::VERSION,
2400
+ transports_version_send: [:rest]
2401
+
2402
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2403
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2404
+
2405
+ options.apply_defaults timeout: @config.rpcs.get_rollout.timeout,
2406
+ metadata: call_metadata,
2407
+ retry_policy: @config.rpcs.get_rollout.retry_policy
2408
+
2409
+ options.apply_defaults timeout: @config.timeout,
2410
+ metadata: @config.metadata,
2411
+ retry_policy: @config.retry_policy
2412
+
2413
+ @config_delivery_stub.get_rollout request, options do |result, operation|
2414
+ yield result, operation if block_given?
2415
+ end
2416
+ rescue ::Gapic::Rest::Error => e
2417
+ raise ::Google::Cloud::Error.from_error(e)
2418
+ end
2419
+
2420
+ ##
2421
+ # Suspend a Rollout.
2422
+ #
2423
+ # @overload suspend_rollout(request, options = nil)
2424
+ # Pass arguments to `suspend_rollout` via a request object, either of type
2425
+ # {::Google::Cloud::ConfigDelivery::V1::SuspendRolloutRequest} or an equivalent Hash.
2426
+ #
2427
+ # @param request [::Google::Cloud::ConfigDelivery::V1::SuspendRolloutRequest, ::Hash]
2428
+ # A request object representing the call parameters. Required. To specify no
2429
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2430
+ # @param options [::Gapic::CallOptions, ::Hash]
2431
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2432
+ #
2433
+ # @overload suspend_rollout(name: nil, reason: nil)
2434
+ # Pass arguments to `suspend_rollout` via keyword arguments. Note that at
2435
+ # least one keyword argument is required. To specify no parameters, or to keep all
2436
+ # the default parameter values, pass an empty Hash as a request object (see above).
2437
+ #
2438
+ # @param name [::String]
2439
+ # Required. Name of the Rollout.
2440
+ # @param reason [::String]
2441
+ # Optional. Reason for suspension.
2442
+ # @yield [result, operation] Access the result along with the TransportOperation object
2443
+ # @yieldparam result [::Gapic::Operation]
2444
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2445
+ #
2446
+ # @return [::Gapic::Operation]
2447
+ #
2448
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2449
+ #
2450
+ # @example Basic example
2451
+ # require "google/cloud/config_delivery/v1"
2452
+ #
2453
+ # # Create a client object. The client can be reused for multiple calls.
2454
+ # client = Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Rest::Client.new
2455
+ #
2456
+ # # Create a request. To set request fields, pass in keyword arguments.
2457
+ # request = Google::Cloud::ConfigDelivery::V1::SuspendRolloutRequest.new
2458
+ #
2459
+ # # Call the suspend_rollout method.
2460
+ # result = client.suspend_rollout request
2461
+ #
2462
+ # # The returned object is of type Gapic::Operation. You can use it to
2463
+ # # check the status of an operation, cancel it, or wait for results.
2464
+ # # Here is how to wait for a response.
2465
+ # result.wait_until_done! timeout: 60
2466
+ # if result.response?
2467
+ # p result.response
2468
+ # else
2469
+ # puts "No response received."
2470
+ # end
2471
+ #
2472
+ def suspend_rollout request, options = nil
2473
+ raise ::ArgumentError, "request must be provided" if request.nil?
2474
+
2475
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigDelivery::V1::SuspendRolloutRequest
2476
+
2477
+ # Converts hash and nil to an options object
2478
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2479
+
2480
+ # Customize the options with defaults
2481
+ call_metadata = @config.rpcs.suspend_rollout.metadata.to_h
2482
+
2483
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2484
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2485
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2486
+ gapic_version: ::Google::Cloud::ConfigDelivery::V1::VERSION,
2487
+ transports_version_send: [:rest]
2488
+
2489
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2490
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2491
+
2492
+ options.apply_defaults timeout: @config.rpcs.suspend_rollout.timeout,
2493
+ metadata: call_metadata,
2494
+ retry_policy: @config.rpcs.suspend_rollout.retry_policy
2495
+
2496
+ options.apply_defaults timeout: @config.timeout,
2497
+ metadata: @config.metadata,
2498
+ retry_policy: @config.retry_policy
2499
+
2500
+ @config_delivery_stub.suspend_rollout request, options do |result, operation|
2501
+ result = ::Gapic::Operation.new result, @operations_client, options: options
2502
+ yield result, operation if block_given?
2503
+ throw :response, result
2504
+ end
2505
+ rescue ::Gapic::Rest::Error => e
2506
+ raise ::Google::Cloud::Error.from_error(e)
2507
+ end
2508
+
2509
+ ##
2510
+ # Resume a Rollout.
2511
+ #
2512
+ # @overload resume_rollout(request, options = nil)
2513
+ # Pass arguments to `resume_rollout` via a request object, either of type
2514
+ # {::Google::Cloud::ConfigDelivery::V1::ResumeRolloutRequest} or an equivalent Hash.
2515
+ #
2516
+ # @param request [::Google::Cloud::ConfigDelivery::V1::ResumeRolloutRequest, ::Hash]
2517
+ # A request object representing the call parameters. Required. To specify no
2518
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2519
+ # @param options [::Gapic::CallOptions, ::Hash]
2520
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2521
+ #
2522
+ # @overload resume_rollout(name: nil, reason: nil)
2523
+ # Pass arguments to `resume_rollout` via keyword arguments. Note that at
2524
+ # least one keyword argument is required. To specify no parameters, or to keep all
2525
+ # the default parameter values, pass an empty Hash as a request object (see above).
2526
+ #
2527
+ # @param name [::String]
2528
+ # Required. Name of the Rollout.
2529
+ # @param reason [::String]
2530
+ # Optional. Reason for resuming the rollout.
2531
+ # @yield [result, operation] Access the result along with the TransportOperation object
2532
+ # @yieldparam result [::Gapic::Operation]
2533
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2534
+ #
2535
+ # @return [::Gapic::Operation]
2536
+ #
2537
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2538
+ #
2539
+ # @example Basic example
2540
+ # require "google/cloud/config_delivery/v1"
2541
+ #
2542
+ # # Create a client object. The client can be reused for multiple calls.
2543
+ # client = Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Rest::Client.new
2544
+ #
2545
+ # # Create a request. To set request fields, pass in keyword arguments.
2546
+ # request = Google::Cloud::ConfigDelivery::V1::ResumeRolloutRequest.new
2547
+ #
2548
+ # # Call the resume_rollout method.
2549
+ # result = client.resume_rollout request
2550
+ #
2551
+ # # The returned object is of type Gapic::Operation. You can use it to
2552
+ # # check the status of an operation, cancel it, or wait for results.
2553
+ # # Here is how to wait for a response.
2554
+ # result.wait_until_done! timeout: 60
2555
+ # if result.response?
2556
+ # p result.response
2557
+ # else
2558
+ # puts "No response received."
2559
+ # end
2560
+ #
2561
+ def resume_rollout request, options = nil
2562
+ raise ::ArgumentError, "request must be provided" if request.nil?
2563
+
2564
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigDelivery::V1::ResumeRolloutRequest
2565
+
2566
+ # Converts hash and nil to an options object
2567
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2568
+
2569
+ # Customize the options with defaults
2570
+ call_metadata = @config.rpcs.resume_rollout.metadata.to_h
2571
+
2572
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2573
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2574
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2575
+ gapic_version: ::Google::Cloud::ConfigDelivery::V1::VERSION,
2576
+ transports_version_send: [:rest]
2577
+
2578
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2579
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2580
+
2581
+ options.apply_defaults timeout: @config.rpcs.resume_rollout.timeout,
2582
+ metadata: call_metadata,
2583
+ retry_policy: @config.rpcs.resume_rollout.retry_policy
2584
+
2585
+ options.apply_defaults timeout: @config.timeout,
2586
+ metadata: @config.metadata,
2587
+ retry_policy: @config.retry_policy
2588
+
2589
+ @config_delivery_stub.resume_rollout request, options do |result, operation|
2590
+ result = ::Gapic::Operation.new result, @operations_client, options: options
2591
+ yield result, operation if block_given?
2592
+ throw :response, result
2593
+ end
2594
+ rescue ::Gapic::Rest::Error => e
2595
+ raise ::Google::Cloud::Error.from_error(e)
2596
+ end
2597
+
2598
+ ##
2599
+ # Abort a Rollout.
2600
+ #
2601
+ # @overload abort_rollout(request, options = nil)
2602
+ # Pass arguments to `abort_rollout` via a request object, either of type
2603
+ # {::Google::Cloud::ConfigDelivery::V1::AbortRolloutRequest} or an equivalent Hash.
2604
+ #
2605
+ # @param request [::Google::Cloud::ConfigDelivery::V1::AbortRolloutRequest, ::Hash]
2606
+ # A request object representing the call parameters. Required. To specify no
2607
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2608
+ # @param options [::Gapic::CallOptions, ::Hash]
2609
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2610
+ #
2611
+ # @overload abort_rollout(name: nil, reason: nil)
2612
+ # Pass arguments to `abort_rollout` via keyword arguments. Note that at
2613
+ # least one keyword argument is required. To specify no parameters, or to keep all
2614
+ # the default parameter values, pass an empty Hash as a request object (see above).
2615
+ #
2616
+ # @param name [::String]
2617
+ # Required. Name of the Rollout.
2618
+ # @param reason [::String]
2619
+ # Optional. Reason for aborting.
2620
+ # @yield [result, operation] Access the result along with the TransportOperation object
2621
+ # @yieldparam result [::Gapic::Operation]
2622
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2623
+ #
2624
+ # @return [::Gapic::Operation]
2625
+ #
2626
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2627
+ #
2628
+ # @example Basic example
2629
+ # require "google/cloud/config_delivery/v1"
2630
+ #
2631
+ # # Create a client object. The client can be reused for multiple calls.
2632
+ # client = Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Rest::Client.new
2633
+ #
2634
+ # # Create a request. To set request fields, pass in keyword arguments.
2635
+ # request = Google::Cloud::ConfigDelivery::V1::AbortRolloutRequest.new
2636
+ #
2637
+ # # Call the abort_rollout method.
2638
+ # result = client.abort_rollout request
2639
+ #
2640
+ # # The returned object is of type Gapic::Operation. You can use it to
2641
+ # # check the status of an operation, cancel it, or wait for results.
2642
+ # # Here is how to wait for a response.
2643
+ # result.wait_until_done! timeout: 60
2644
+ # if result.response?
2645
+ # p result.response
2646
+ # else
2647
+ # puts "No response received."
2648
+ # end
2649
+ #
2650
+ def abort_rollout request, options = nil
2651
+ raise ::ArgumentError, "request must be provided" if request.nil?
2652
+
2653
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigDelivery::V1::AbortRolloutRequest
2654
+
2655
+ # Converts hash and nil to an options object
2656
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2657
+
2658
+ # Customize the options with defaults
2659
+ call_metadata = @config.rpcs.abort_rollout.metadata.to_h
2660
+
2661
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2662
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2663
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2664
+ gapic_version: ::Google::Cloud::ConfigDelivery::V1::VERSION,
2665
+ transports_version_send: [:rest]
2666
+
2667
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2668
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2669
+
2670
+ options.apply_defaults timeout: @config.rpcs.abort_rollout.timeout,
2671
+ metadata: call_metadata,
2672
+ retry_policy: @config.rpcs.abort_rollout.retry_policy
2673
+
2674
+ options.apply_defaults timeout: @config.timeout,
2675
+ metadata: @config.metadata,
2676
+ retry_policy: @config.retry_policy
2677
+
2678
+ @config_delivery_stub.abort_rollout request, options do |result, operation|
2679
+ result = ::Gapic::Operation.new result, @operations_client, options: options
2680
+ yield result, operation if block_given?
2681
+ throw :response, result
2682
+ end
2683
+ rescue ::Gapic::Rest::Error => e
2684
+ raise ::Google::Cloud::Error.from_error(e)
2685
+ end
2686
+
2687
+ ##
2688
+ # Configuration class for the ConfigDelivery REST API.
2689
+ #
2690
+ # This class represents the configuration for ConfigDelivery REST,
2691
+ # providing control over timeouts, retry behavior, logging, transport
2692
+ # parameters, and other low-level controls. Certain parameters can also be
2693
+ # applied individually to specific RPCs. See
2694
+ # {::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Rest::Client::Configuration::Rpcs}
2695
+ # for a list of RPCs that can be configured independently.
2696
+ #
2697
+ # Configuration can be applied globally to all clients, or to a single client
2698
+ # on construction.
2699
+ #
2700
+ # @example
2701
+ #
2702
+ # # Modify the global config, setting the timeout for
2703
+ # # list_resource_bundles to 20 seconds,
2704
+ # # and all remaining timeouts to 10 seconds.
2705
+ # ::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Rest::Client.configure do |config|
2706
+ # config.timeout = 10.0
2707
+ # config.rpcs.list_resource_bundles.timeout = 20.0
2708
+ # end
2709
+ #
2710
+ # # Apply the above configuration only to a new client.
2711
+ # client = ::Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Rest::Client.new do |config|
2712
+ # config.timeout = 10.0
2713
+ # config.rpcs.list_resource_bundles.timeout = 20.0
2714
+ # end
2715
+ #
2716
+ # @!attribute [rw] endpoint
2717
+ # A custom service endpoint, as a hostname or hostname:port. The default is
2718
+ # nil, indicating to use the default endpoint in the current universe domain.
2719
+ # @return [::String,nil]
2720
+ # @!attribute [rw] credentials
2721
+ # Credentials to send with calls. You may provide any of the following types:
2722
+ # * (`String`) The path to a service account key file in JSON format
2723
+ # * (`Hash`) A service account key as a Hash
2724
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
2725
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
2726
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
2727
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
2728
+ # * (`nil`) indicating no credentials
2729
+ #
2730
+ # Warning: If you accept a credential configuration (JSON file or Hash) from an
2731
+ # external source for authentication to Google Cloud, you must validate it before
2732
+ # providing it to a Google API client library. Providing an unvalidated credential
2733
+ # configuration to Google APIs can compromise the security of your systems and data.
2734
+ # For more information, refer to [Validate credential configurations from external
2735
+ # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
2736
+ # @return [::Object]
2737
+ # @!attribute [rw] scope
2738
+ # The OAuth scopes
2739
+ # @return [::Array<::String>]
2740
+ # @!attribute [rw] lib_name
2741
+ # The library name as recorded in instrumentation and logging
2742
+ # @return [::String]
2743
+ # @!attribute [rw] lib_version
2744
+ # The library version as recorded in instrumentation and logging
2745
+ # @return [::String]
2746
+ # @!attribute [rw] timeout
2747
+ # The call timeout in seconds.
2748
+ # @return [::Numeric]
2749
+ # @!attribute [rw] metadata
2750
+ # Additional headers to be sent with the call.
2751
+ # @return [::Hash{::Symbol=>::String}]
2752
+ # @!attribute [rw] retry_policy
2753
+ # The retry policy. The value is a hash with the following keys:
2754
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
2755
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
2756
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
2757
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
2758
+ # trigger a retry.
2759
+ # @return [::Hash]
2760
+ # @!attribute [rw] quota_project
2761
+ # A separate project against which to charge quota.
2762
+ # @return [::String]
2763
+ # @!attribute [rw] universe_domain
2764
+ # The universe domain within which to make requests. This determines the
2765
+ # default endpoint URL. The default value of nil uses the environment
2766
+ # universe (usually the default "googleapis.com" universe).
2767
+ # @return [::String,nil]
2768
+ # @!attribute [rw] logger
2769
+ # A custom logger to use for request/response debug logging, or the value
2770
+ # `:default` (the default) to construct a default logger, or `nil` to
2771
+ # explicitly disable logging.
2772
+ # @return [::Logger,:default,nil]
2773
+ #
2774
+ class Configuration
2775
+ extend ::Gapic::Config
2776
+
2777
+ # @private
2778
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
2779
+ DEFAULT_ENDPOINT = "configdelivery.googleapis.com"
2780
+
2781
+ config_attr :endpoint, nil, ::String, nil
2782
+ config_attr :credentials, nil do |value|
2783
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil]
2784
+ allowed.any? { |klass| klass === value }
2785
+ end
2786
+ config_attr :scope, nil, ::String, ::Array, nil
2787
+ config_attr :lib_name, nil, ::String, nil
2788
+ config_attr :lib_version, nil, ::String, nil
2789
+ config_attr :timeout, nil, ::Numeric, nil
2790
+ config_attr :metadata, nil, ::Hash, nil
2791
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
2792
+ config_attr :quota_project, nil, ::String, nil
2793
+ config_attr :universe_domain, nil, ::String, nil
2794
+
2795
+ # @private
2796
+ # Overrides for http bindings for the RPCs of this service
2797
+ # are only used when this service is used as mixin, and only
2798
+ # by the host service.
2799
+ # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
2800
+ config_attr :bindings_override, {}, ::Hash, nil
2801
+ config_attr :logger, :default, ::Logger, nil, :default
2802
+
2803
+ # @private
2804
+ def initialize parent_config = nil
2805
+ @parent_config = parent_config unless parent_config.nil?
2806
+
2807
+ yield self if block_given?
2808
+ end
2809
+
2810
+ ##
2811
+ # Configurations for individual RPCs
2812
+ # @return [Rpcs]
2813
+ #
2814
+ def rpcs
2815
+ @rpcs ||= begin
2816
+ parent_rpcs = nil
2817
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
2818
+ Rpcs.new parent_rpcs
2819
+ end
2820
+ end
2821
+
2822
+ ##
2823
+ # Configuration RPC class for the ConfigDelivery API.
2824
+ #
2825
+ # Includes fields providing the configuration for each RPC in this service.
2826
+ # Each configuration object is of type `Gapic::Config::Method` and includes
2827
+ # the following configuration fields:
2828
+ #
2829
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
2830
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
2831
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
2832
+ # include the following keys:
2833
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
2834
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
2835
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
2836
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
2837
+ # trigger a retry.
2838
+ #
2839
+ class Rpcs
2840
+ ##
2841
+ # RPC-specific configuration for `list_resource_bundles`
2842
+ # @return [::Gapic::Config::Method]
2843
+ #
2844
+ attr_reader :list_resource_bundles
2845
+ ##
2846
+ # RPC-specific configuration for `get_resource_bundle`
2847
+ # @return [::Gapic::Config::Method]
2848
+ #
2849
+ attr_reader :get_resource_bundle
2850
+ ##
2851
+ # RPC-specific configuration for `create_resource_bundle`
2852
+ # @return [::Gapic::Config::Method]
2853
+ #
2854
+ attr_reader :create_resource_bundle
2855
+ ##
2856
+ # RPC-specific configuration for `update_resource_bundle`
2857
+ # @return [::Gapic::Config::Method]
2858
+ #
2859
+ attr_reader :update_resource_bundle
2860
+ ##
2861
+ # RPC-specific configuration for `delete_resource_bundle`
2862
+ # @return [::Gapic::Config::Method]
2863
+ #
2864
+ attr_reader :delete_resource_bundle
2865
+ ##
2866
+ # RPC-specific configuration for `list_fleet_packages`
2867
+ # @return [::Gapic::Config::Method]
2868
+ #
2869
+ attr_reader :list_fleet_packages
2870
+ ##
2871
+ # RPC-specific configuration for `get_fleet_package`
2872
+ # @return [::Gapic::Config::Method]
2873
+ #
2874
+ attr_reader :get_fleet_package
2875
+ ##
2876
+ # RPC-specific configuration for `create_fleet_package`
2877
+ # @return [::Gapic::Config::Method]
2878
+ #
2879
+ attr_reader :create_fleet_package
2880
+ ##
2881
+ # RPC-specific configuration for `update_fleet_package`
2882
+ # @return [::Gapic::Config::Method]
2883
+ #
2884
+ attr_reader :update_fleet_package
2885
+ ##
2886
+ # RPC-specific configuration for `delete_fleet_package`
2887
+ # @return [::Gapic::Config::Method]
2888
+ #
2889
+ attr_reader :delete_fleet_package
2890
+ ##
2891
+ # RPC-specific configuration for `list_releases`
2892
+ # @return [::Gapic::Config::Method]
2893
+ #
2894
+ attr_reader :list_releases
2895
+ ##
2896
+ # RPC-specific configuration for `get_release`
2897
+ # @return [::Gapic::Config::Method]
2898
+ #
2899
+ attr_reader :get_release
2900
+ ##
2901
+ # RPC-specific configuration for `create_release`
2902
+ # @return [::Gapic::Config::Method]
2903
+ #
2904
+ attr_reader :create_release
2905
+ ##
2906
+ # RPC-specific configuration for `update_release`
2907
+ # @return [::Gapic::Config::Method]
2908
+ #
2909
+ attr_reader :update_release
2910
+ ##
2911
+ # RPC-specific configuration for `delete_release`
2912
+ # @return [::Gapic::Config::Method]
2913
+ #
2914
+ attr_reader :delete_release
2915
+ ##
2916
+ # RPC-specific configuration for `list_variants`
2917
+ # @return [::Gapic::Config::Method]
2918
+ #
2919
+ attr_reader :list_variants
2920
+ ##
2921
+ # RPC-specific configuration for `get_variant`
2922
+ # @return [::Gapic::Config::Method]
2923
+ #
2924
+ attr_reader :get_variant
2925
+ ##
2926
+ # RPC-specific configuration for `create_variant`
2927
+ # @return [::Gapic::Config::Method]
2928
+ #
2929
+ attr_reader :create_variant
2930
+ ##
2931
+ # RPC-specific configuration for `update_variant`
2932
+ # @return [::Gapic::Config::Method]
2933
+ #
2934
+ attr_reader :update_variant
2935
+ ##
2936
+ # RPC-specific configuration for `delete_variant`
2937
+ # @return [::Gapic::Config::Method]
2938
+ #
2939
+ attr_reader :delete_variant
2940
+ ##
2941
+ # RPC-specific configuration for `list_rollouts`
2942
+ # @return [::Gapic::Config::Method]
2943
+ #
2944
+ attr_reader :list_rollouts
2945
+ ##
2946
+ # RPC-specific configuration for `get_rollout`
2947
+ # @return [::Gapic::Config::Method]
2948
+ #
2949
+ attr_reader :get_rollout
2950
+ ##
2951
+ # RPC-specific configuration for `suspend_rollout`
2952
+ # @return [::Gapic::Config::Method]
2953
+ #
2954
+ attr_reader :suspend_rollout
2955
+ ##
2956
+ # RPC-specific configuration for `resume_rollout`
2957
+ # @return [::Gapic::Config::Method]
2958
+ #
2959
+ attr_reader :resume_rollout
2960
+ ##
2961
+ # RPC-specific configuration for `abort_rollout`
2962
+ # @return [::Gapic::Config::Method]
2963
+ #
2964
+ attr_reader :abort_rollout
2965
+
2966
+ # @private
2967
+ def initialize parent_rpcs = nil
2968
+ list_resource_bundles_config = parent_rpcs.list_resource_bundles if parent_rpcs.respond_to? :list_resource_bundles
2969
+ @list_resource_bundles = ::Gapic::Config::Method.new list_resource_bundles_config
2970
+ get_resource_bundle_config = parent_rpcs.get_resource_bundle if parent_rpcs.respond_to? :get_resource_bundle
2971
+ @get_resource_bundle = ::Gapic::Config::Method.new get_resource_bundle_config
2972
+ create_resource_bundle_config = parent_rpcs.create_resource_bundle if parent_rpcs.respond_to? :create_resource_bundle
2973
+ @create_resource_bundle = ::Gapic::Config::Method.new create_resource_bundle_config
2974
+ update_resource_bundle_config = parent_rpcs.update_resource_bundle if parent_rpcs.respond_to? :update_resource_bundle
2975
+ @update_resource_bundle = ::Gapic::Config::Method.new update_resource_bundle_config
2976
+ delete_resource_bundle_config = parent_rpcs.delete_resource_bundle if parent_rpcs.respond_to? :delete_resource_bundle
2977
+ @delete_resource_bundle = ::Gapic::Config::Method.new delete_resource_bundle_config
2978
+ list_fleet_packages_config = parent_rpcs.list_fleet_packages if parent_rpcs.respond_to? :list_fleet_packages
2979
+ @list_fleet_packages = ::Gapic::Config::Method.new list_fleet_packages_config
2980
+ get_fleet_package_config = parent_rpcs.get_fleet_package if parent_rpcs.respond_to? :get_fleet_package
2981
+ @get_fleet_package = ::Gapic::Config::Method.new get_fleet_package_config
2982
+ create_fleet_package_config = parent_rpcs.create_fleet_package if parent_rpcs.respond_to? :create_fleet_package
2983
+ @create_fleet_package = ::Gapic::Config::Method.new create_fleet_package_config
2984
+ update_fleet_package_config = parent_rpcs.update_fleet_package if parent_rpcs.respond_to? :update_fleet_package
2985
+ @update_fleet_package = ::Gapic::Config::Method.new update_fleet_package_config
2986
+ delete_fleet_package_config = parent_rpcs.delete_fleet_package if parent_rpcs.respond_to? :delete_fleet_package
2987
+ @delete_fleet_package = ::Gapic::Config::Method.new delete_fleet_package_config
2988
+ list_releases_config = parent_rpcs.list_releases if parent_rpcs.respond_to? :list_releases
2989
+ @list_releases = ::Gapic::Config::Method.new list_releases_config
2990
+ get_release_config = parent_rpcs.get_release if parent_rpcs.respond_to? :get_release
2991
+ @get_release = ::Gapic::Config::Method.new get_release_config
2992
+ create_release_config = parent_rpcs.create_release if parent_rpcs.respond_to? :create_release
2993
+ @create_release = ::Gapic::Config::Method.new create_release_config
2994
+ update_release_config = parent_rpcs.update_release if parent_rpcs.respond_to? :update_release
2995
+ @update_release = ::Gapic::Config::Method.new update_release_config
2996
+ delete_release_config = parent_rpcs.delete_release if parent_rpcs.respond_to? :delete_release
2997
+ @delete_release = ::Gapic::Config::Method.new delete_release_config
2998
+ list_variants_config = parent_rpcs.list_variants if parent_rpcs.respond_to? :list_variants
2999
+ @list_variants = ::Gapic::Config::Method.new list_variants_config
3000
+ get_variant_config = parent_rpcs.get_variant if parent_rpcs.respond_to? :get_variant
3001
+ @get_variant = ::Gapic::Config::Method.new get_variant_config
3002
+ create_variant_config = parent_rpcs.create_variant if parent_rpcs.respond_to? :create_variant
3003
+ @create_variant = ::Gapic::Config::Method.new create_variant_config
3004
+ update_variant_config = parent_rpcs.update_variant if parent_rpcs.respond_to? :update_variant
3005
+ @update_variant = ::Gapic::Config::Method.new update_variant_config
3006
+ delete_variant_config = parent_rpcs.delete_variant if parent_rpcs.respond_to? :delete_variant
3007
+ @delete_variant = ::Gapic::Config::Method.new delete_variant_config
3008
+ list_rollouts_config = parent_rpcs.list_rollouts if parent_rpcs.respond_to? :list_rollouts
3009
+ @list_rollouts = ::Gapic::Config::Method.new list_rollouts_config
3010
+ get_rollout_config = parent_rpcs.get_rollout if parent_rpcs.respond_to? :get_rollout
3011
+ @get_rollout = ::Gapic::Config::Method.new get_rollout_config
3012
+ suspend_rollout_config = parent_rpcs.suspend_rollout if parent_rpcs.respond_to? :suspend_rollout
3013
+ @suspend_rollout = ::Gapic::Config::Method.new suspend_rollout_config
3014
+ resume_rollout_config = parent_rpcs.resume_rollout if parent_rpcs.respond_to? :resume_rollout
3015
+ @resume_rollout = ::Gapic::Config::Method.new resume_rollout_config
3016
+ abort_rollout_config = parent_rpcs.abort_rollout if parent_rpcs.respond_to? :abort_rollout
3017
+ @abort_rollout = ::Gapic::Config::Method.new abort_rollout_config
3018
+
3019
+ yield self if block_given?
3020
+ end
3021
+ end
3022
+ end
3023
+ end
3024
+ end
3025
+ end
3026
+ end
3027
+ end
3028
+ end
3029
+ end