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