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