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