google-cloud-config-v1 0.a → 0.1.0

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