google-cloud-config_service-v1 0.a → 0.2.0

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