google-cloud-parameter_manager-v1 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. checksums.yaml +7 -0
  2. data/.yardopts +12 -0
  3. data/AUTHENTICATION.md +122 -0
  4. data/LICENSE.md +201 -0
  5. data/README.md +154 -0
  6. data/lib/google/cloud/parameter_manager/v1/bindings_override.rb +102 -0
  7. data/lib/google/cloud/parameter_manager/v1/parameter_manager/client.rb +1578 -0
  8. data/lib/google/cloud/parameter_manager/v1/parameter_manager/credentials.rb +47 -0
  9. data/lib/google/cloud/parameter_manager/v1/parameter_manager/paths.rb +90 -0
  10. data/lib/google/cloud/parameter_manager/v1/parameter_manager/rest/client.rb +1483 -0
  11. data/lib/google/cloud/parameter_manager/v1/parameter_manager/rest/service_stub.rb +756 -0
  12. data/lib/google/cloud/parameter_manager/v1/parameter_manager/rest.rb +53 -0
  13. data/lib/google/cloud/parameter_manager/v1/parameter_manager.rb +55 -0
  14. data/lib/google/cloud/parameter_manager/v1/rest.rb +38 -0
  15. data/lib/google/cloud/parameter_manager/v1/version.rb +28 -0
  16. data/lib/google/cloud/parameter_manager/v1.rb +45 -0
  17. data/lib/google/cloud/parametermanager/v1/service_pb.rb +73 -0
  18. data/lib/google/cloud/parametermanager/v1/service_services_pb.rb +65 -0
  19. data/lib/google-cloud-parameter_manager-v1.rb +21 -0
  20. data/proto_docs/README.md +4 -0
  21. data/proto_docs/google/api/client.rb +473 -0
  22. data/proto_docs/google/api/field_behavior.rb +85 -0
  23. data/proto_docs/google/api/field_info.rb +88 -0
  24. data/proto_docs/google/api/launch_stage.rb +71 -0
  25. data/proto_docs/google/api/resource.rb +227 -0
  26. data/proto_docs/google/cloud/parametermanager/v1/service.rb +436 -0
  27. data/proto_docs/google/iam/v1/resource_policy_member.rb +49 -0
  28. data/proto_docs/google/protobuf/any.rb +145 -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/timestamp.rb +127 -0
  33. metadata +147 -0
@@ -0,0 +1,1578 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2025 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/parametermanager/v1/service_pb"
21
+ require "google/cloud/location"
22
+
23
+ module Google
24
+ module Cloud
25
+ module ParameterManager
26
+ module V1
27
+ module ParameterManager
28
+ ##
29
+ # Client for the ParameterManager service.
30
+ #
31
+ # Service describing handlers for resources
32
+ #
33
+ class Client
34
+ # @private
35
+ API_VERSION = ""
36
+
37
+ # @private
38
+ DEFAULT_ENDPOINT_TEMPLATE = "parametermanager.$UNIVERSE_DOMAIN$"
39
+
40
+ include Paths
41
+
42
+ # @private
43
+ attr_reader :parameter_manager_stub
44
+
45
+ ##
46
+ # Configure the ParameterManager Client class.
47
+ #
48
+ # See {::Google::Cloud::ParameterManager::V1::ParameterManager::Client::Configuration}
49
+ # for a description of the configuration fields.
50
+ #
51
+ # @example
52
+ #
53
+ # # Modify the configuration for all ParameterManager clients
54
+ # ::Google::Cloud::ParameterManager::V1::ParameterManager::Client.configure do |config|
55
+ # config.timeout = 10.0
56
+ # end
57
+ #
58
+ # @yield [config] Configure the Client client.
59
+ # @yieldparam config [Client::Configuration]
60
+ #
61
+ # @return [Client::Configuration]
62
+ #
63
+ def self.configure
64
+ @configure ||= begin
65
+ namespace = ["Google", "Cloud", "ParameterManager", "V1"]
66
+ parent_config = while namespace.any?
67
+ parent_name = namespace.join "::"
68
+ parent_const = const_get parent_name
69
+ break parent_const.configure if parent_const.respond_to? :configure
70
+ namespace.pop
71
+ end
72
+ default_config = Client::Configuration.new parent_config
73
+
74
+ default_config.rpcs.list_parameters.timeout = 60.0
75
+ default_config.rpcs.list_parameters.retry_policy = {
76
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
77
+ }
78
+
79
+ default_config.rpcs.get_parameter.timeout = 60.0
80
+ default_config.rpcs.get_parameter.retry_policy = {
81
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
82
+ }
83
+
84
+ default_config.rpcs.create_parameter.timeout = 60.0
85
+
86
+ default_config.rpcs.update_parameter.timeout = 60.0
87
+
88
+ default_config.rpcs.delete_parameter.timeout = 60.0
89
+
90
+ default_config.rpcs.list_parameter_versions.timeout = 60.0
91
+ default_config.rpcs.list_parameter_versions.retry_policy = {
92
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
93
+ }
94
+
95
+ default_config.rpcs.get_parameter_version.timeout = 60.0
96
+ default_config.rpcs.get_parameter_version.retry_policy = {
97
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
98
+ }
99
+
100
+ default_config.rpcs.render_parameter_version.timeout = 60.0
101
+ default_config.rpcs.render_parameter_version.retry_policy = {
102
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
103
+ }
104
+
105
+ default_config.rpcs.create_parameter_version.timeout = 60.0
106
+
107
+ default_config.rpcs.update_parameter_version.timeout = 60.0
108
+
109
+ default_config.rpcs.delete_parameter_version.timeout = 60.0
110
+
111
+ default_config
112
+ end
113
+ yield @configure if block_given?
114
+ @configure
115
+ end
116
+
117
+ ##
118
+ # Configure the ParameterManager Client instance.
119
+ #
120
+ # The configuration is set to the derived mode, meaning that values can be changed,
121
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
122
+ # should be made on {Client.configure}.
123
+ #
124
+ # See {::Google::Cloud::ParameterManager::V1::ParameterManager::Client::Configuration}
125
+ # for a description of the configuration fields.
126
+ #
127
+ # @yield [config] Configure the Client client.
128
+ # @yieldparam config [Client::Configuration]
129
+ #
130
+ # @return [Client::Configuration]
131
+ #
132
+ def configure
133
+ yield @config if block_given?
134
+ @config
135
+ end
136
+
137
+ ##
138
+ # The effective universe domain
139
+ #
140
+ # @return [String]
141
+ #
142
+ def universe_domain
143
+ @parameter_manager_stub.universe_domain
144
+ end
145
+
146
+ ##
147
+ # Create a new ParameterManager client object.
148
+ #
149
+ # @example
150
+ #
151
+ # # Create a client using the default configuration
152
+ # client = ::Google::Cloud::ParameterManager::V1::ParameterManager::Client.new
153
+ #
154
+ # # Create a client using a custom configuration
155
+ # client = ::Google::Cloud::ParameterManager::V1::ParameterManager::Client.new do |config|
156
+ # config.timeout = 10.0
157
+ # end
158
+ #
159
+ # @yield [config] Configure the ParameterManager client.
160
+ # @yieldparam config [Client::Configuration]
161
+ #
162
+ def initialize
163
+ # These require statements are intentionally placed here to initialize
164
+ # the gRPC module only when it's required.
165
+ # See https://github.com/googleapis/toolkit/issues/446
166
+ require "gapic/grpc"
167
+ require "google/cloud/parametermanager/v1/service_services_pb"
168
+
169
+ # Create the configuration object
170
+ @config = Configuration.new Client.configure
171
+
172
+ # Yield the configuration if needed
173
+ yield @config if block_given?
174
+
175
+ # Create credentials
176
+ credentials = @config.credentials
177
+ # Use self-signed JWT if the endpoint is unchanged from default,
178
+ # but only if the default endpoint does not have a region prefix.
179
+ enable_self_signed_jwt = @config.endpoint.nil? ||
180
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
181
+ !@config.endpoint.split(".").first.include?("-"))
182
+ credentials ||= Credentials.default scope: @config.scope,
183
+ enable_self_signed_jwt: enable_self_signed_jwt
184
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
185
+ credentials = Credentials.new credentials, scope: @config.scope
186
+ end
187
+ @quota_project_id = @config.quota_project
188
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
189
+
190
+ @parameter_manager_stub = ::Gapic::ServiceStub.new(
191
+ ::Google::Cloud::ParameterManager::V1::ParameterManager::Stub,
192
+ credentials: credentials,
193
+ endpoint: @config.endpoint,
194
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
195
+ universe_domain: @config.universe_domain,
196
+ channel_args: @config.channel_args,
197
+ interceptors: @config.interceptors,
198
+ channel_pool_config: @config.channel_pool,
199
+ logger: @config.logger
200
+ )
201
+
202
+ @parameter_manager_stub.stub_logger&.info do |entry|
203
+ entry.set_system_name
204
+ entry.set_service
205
+ entry.message = "Created client for #{entry.service}"
206
+ entry.set_credentials_fields credentials
207
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
208
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
209
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
210
+ end
211
+
212
+ @location_client = Google::Cloud::Location::Locations::Client.new do |config|
213
+ config.credentials = credentials
214
+ config.quota_project = @quota_project_id
215
+ config.endpoint = @parameter_manager_stub.endpoint
216
+ config.universe_domain = @parameter_manager_stub.universe_domain
217
+ config.logger = @parameter_manager_stub.logger if config.respond_to? :logger=
218
+ end
219
+ end
220
+
221
+ ##
222
+ # Get the associated client for mix-in of the Locations.
223
+ #
224
+ # @return [Google::Cloud::Location::Locations::Client]
225
+ #
226
+ attr_reader :location_client
227
+
228
+ ##
229
+ # The logger used for request/response debug logging.
230
+ #
231
+ # @return [Logger]
232
+ #
233
+ def logger
234
+ @parameter_manager_stub.logger
235
+ end
236
+
237
+ # Service calls
238
+
239
+ ##
240
+ # Lists Parameters in a given project and location.
241
+ #
242
+ # @overload list_parameters(request, options = nil)
243
+ # Pass arguments to `list_parameters` via a request object, either of type
244
+ # {::Google::Cloud::ParameterManager::V1::ListParametersRequest} or an equivalent Hash.
245
+ #
246
+ # @param request [::Google::Cloud::ParameterManager::V1::ListParametersRequest, ::Hash]
247
+ # A request object representing the call parameters. Required. To specify no
248
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
249
+ # @param options [::Gapic::CallOptions, ::Hash]
250
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
251
+ #
252
+ # @overload list_parameters(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
253
+ # Pass arguments to `list_parameters` via keyword arguments. Note that at
254
+ # least one keyword argument is required. To specify no parameters, or to keep all
255
+ # the default parameter values, pass an empty Hash as a request object (see above).
256
+ #
257
+ # @param parent [::String]
258
+ # Required. Parent value for ListParametersRequest in the format
259
+ # `projects/*/locations/*`.
260
+ # @param page_size [::Integer]
261
+ # Optional. Requested page size. Server may return fewer items than
262
+ # requested. If unspecified, server will pick an appropriate default.
263
+ # @param page_token [::String]
264
+ # Optional. A token identifying a page of results the server should return.
265
+ # @param filter [::String]
266
+ # Optional. Filtering results
267
+ # @param order_by [::String]
268
+ # Optional. Hint for how to order the results
269
+ #
270
+ # @yield [response, operation] Access the result along with the RPC operation
271
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ParameterManager::V1::Parameter>]
272
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
273
+ #
274
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::ParameterManager::V1::Parameter>]
275
+ #
276
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
277
+ #
278
+ # @example Basic example
279
+ # require "google/cloud/parameter_manager/v1"
280
+ #
281
+ # # Create a client object. The client can be reused for multiple calls.
282
+ # client = Google::Cloud::ParameterManager::V1::ParameterManager::Client.new
283
+ #
284
+ # # Create a request. To set request fields, pass in keyword arguments.
285
+ # request = Google::Cloud::ParameterManager::V1::ListParametersRequest.new
286
+ #
287
+ # # Call the list_parameters method.
288
+ # result = client.list_parameters request
289
+ #
290
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
291
+ # # over elements, and API calls will be issued to fetch pages as needed.
292
+ # result.each do |item|
293
+ # # Each element is of type ::Google::Cloud::ParameterManager::V1::Parameter.
294
+ # p item
295
+ # end
296
+ #
297
+ def list_parameters request, options = nil
298
+ raise ::ArgumentError, "request must be provided" if request.nil?
299
+
300
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ParameterManager::V1::ListParametersRequest
301
+
302
+ # Converts hash and nil to an options object
303
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
304
+
305
+ # Customize the options with defaults
306
+ metadata = @config.rpcs.list_parameters.metadata.to_h
307
+
308
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
309
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
310
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
311
+ gapic_version: ::Google::Cloud::ParameterManager::V1::VERSION
312
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
313
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
314
+
315
+ header_params = {}
316
+ if request.parent
317
+ header_params["parent"] = request.parent
318
+ end
319
+
320
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
321
+ metadata[:"x-goog-request-params"] ||= request_params_header
322
+
323
+ options.apply_defaults timeout: @config.rpcs.list_parameters.timeout,
324
+ metadata: metadata,
325
+ retry_policy: @config.rpcs.list_parameters.retry_policy
326
+
327
+ options.apply_defaults timeout: @config.timeout,
328
+ metadata: @config.metadata,
329
+ retry_policy: @config.retry_policy
330
+
331
+ @parameter_manager_stub.call_rpc :list_parameters, request, options: options do |response, operation|
332
+ response = ::Gapic::PagedEnumerable.new @parameter_manager_stub, :list_parameters, request, response, operation, options
333
+ yield response, operation if block_given?
334
+ throw :response, response
335
+ end
336
+ rescue ::GRPC::BadStatus => e
337
+ raise ::Google::Cloud::Error.from_error(e)
338
+ end
339
+
340
+ ##
341
+ # Gets details of a single Parameter.
342
+ #
343
+ # @overload get_parameter(request, options = nil)
344
+ # Pass arguments to `get_parameter` via a request object, either of type
345
+ # {::Google::Cloud::ParameterManager::V1::GetParameterRequest} or an equivalent Hash.
346
+ #
347
+ # @param request [::Google::Cloud::ParameterManager::V1::GetParameterRequest, ::Hash]
348
+ # A request object representing the call parameters. Required. To specify no
349
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
350
+ # @param options [::Gapic::CallOptions, ::Hash]
351
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
352
+ #
353
+ # @overload get_parameter(name: nil)
354
+ # Pass arguments to `get_parameter` via keyword arguments. Note that at
355
+ # least one keyword argument is required. To specify no parameters, or to keep all
356
+ # the default parameter values, pass an empty Hash as a request object (see above).
357
+ #
358
+ # @param name [::String]
359
+ # Required. Name of the resource in the format
360
+ # `projects/*/locations/*/parameters/*`.
361
+ #
362
+ # @yield [response, operation] Access the result along with the RPC operation
363
+ # @yieldparam response [::Google::Cloud::ParameterManager::V1::Parameter]
364
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
365
+ #
366
+ # @return [::Google::Cloud::ParameterManager::V1::Parameter]
367
+ #
368
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
369
+ #
370
+ # @example Basic example
371
+ # require "google/cloud/parameter_manager/v1"
372
+ #
373
+ # # Create a client object. The client can be reused for multiple calls.
374
+ # client = Google::Cloud::ParameterManager::V1::ParameterManager::Client.new
375
+ #
376
+ # # Create a request. To set request fields, pass in keyword arguments.
377
+ # request = Google::Cloud::ParameterManager::V1::GetParameterRequest.new
378
+ #
379
+ # # Call the get_parameter method.
380
+ # result = client.get_parameter request
381
+ #
382
+ # # The returned object is of type Google::Cloud::ParameterManager::V1::Parameter.
383
+ # p result
384
+ #
385
+ def get_parameter request, options = nil
386
+ raise ::ArgumentError, "request must be provided" if request.nil?
387
+
388
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ParameterManager::V1::GetParameterRequest
389
+
390
+ # Converts hash and nil to an options object
391
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
392
+
393
+ # Customize the options with defaults
394
+ metadata = @config.rpcs.get_parameter.metadata.to_h
395
+
396
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
397
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
398
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
399
+ gapic_version: ::Google::Cloud::ParameterManager::V1::VERSION
400
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
401
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
402
+
403
+ header_params = {}
404
+ if request.name
405
+ header_params["name"] = request.name
406
+ end
407
+
408
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
409
+ metadata[:"x-goog-request-params"] ||= request_params_header
410
+
411
+ options.apply_defaults timeout: @config.rpcs.get_parameter.timeout,
412
+ metadata: metadata,
413
+ retry_policy: @config.rpcs.get_parameter.retry_policy
414
+
415
+ options.apply_defaults timeout: @config.timeout,
416
+ metadata: @config.metadata,
417
+ retry_policy: @config.retry_policy
418
+
419
+ @parameter_manager_stub.call_rpc :get_parameter, request, options: options do |response, operation|
420
+ yield response, operation if block_given?
421
+ end
422
+ rescue ::GRPC::BadStatus => e
423
+ raise ::Google::Cloud::Error.from_error(e)
424
+ end
425
+
426
+ ##
427
+ # Creates a new Parameter in a given project and location.
428
+ #
429
+ # @overload create_parameter(request, options = nil)
430
+ # Pass arguments to `create_parameter` via a request object, either of type
431
+ # {::Google::Cloud::ParameterManager::V1::CreateParameterRequest} or an equivalent Hash.
432
+ #
433
+ # @param request [::Google::Cloud::ParameterManager::V1::CreateParameterRequest, ::Hash]
434
+ # A request object representing the call parameters. Required. To specify no
435
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
436
+ # @param options [::Gapic::CallOptions, ::Hash]
437
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
438
+ #
439
+ # @overload create_parameter(parent: nil, parameter_id: nil, parameter: nil, request_id: nil)
440
+ # Pass arguments to `create_parameter` via keyword arguments. Note that at
441
+ # least one keyword argument is required. To specify no parameters, or to keep all
442
+ # the default parameter values, pass an empty Hash as a request object (see above).
443
+ #
444
+ # @param parent [::String]
445
+ # Required. Value for parent in the format
446
+ # `projects/*/locations/*`.
447
+ # @param parameter_id [::String]
448
+ # Required. Id of the Parameter resource
449
+ # @param parameter [::Google::Cloud::ParameterManager::V1::Parameter, ::Hash]
450
+ # Required. The Parameter resource being created
451
+ # @param request_id [::String]
452
+ # Optional. An optional request ID to identify requests. Specify a unique
453
+ # request ID so that if you must retry your request, the server will know to
454
+ # ignore the request if it has already been completed. The server will
455
+ # guarantee that for at least 60 minutes since the first request.
456
+ #
457
+ # For example, consider a situation where you make an initial request and the
458
+ # request times out. If you make the request again with the same request
459
+ # ID, the server can check if original operation with the same request ID
460
+ # was received, and if so, will ignore the second request. This prevents
461
+ # clients from accidentally creating duplicate commitments.
462
+ #
463
+ # The request ID must be a valid UUID with the exception that zero UUID is
464
+ # not supported (00000000-0000-0000-0000-000000000000).
465
+ #
466
+ # @yield [response, operation] Access the result along with the RPC operation
467
+ # @yieldparam response [::Google::Cloud::ParameterManager::V1::Parameter]
468
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
469
+ #
470
+ # @return [::Google::Cloud::ParameterManager::V1::Parameter]
471
+ #
472
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
473
+ #
474
+ # @example Basic example
475
+ # require "google/cloud/parameter_manager/v1"
476
+ #
477
+ # # Create a client object. The client can be reused for multiple calls.
478
+ # client = Google::Cloud::ParameterManager::V1::ParameterManager::Client.new
479
+ #
480
+ # # Create a request. To set request fields, pass in keyword arguments.
481
+ # request = Google::Cloud::ParameterManager::V1::CreateParameterRequest.new
482
+ #
483
+ # # Call the create_parameter method.
484
+ # result = client.create_parameter request
485
+ #
486
+ # # The returned object is of type Google::Cloud::ParameterManager::V1::Parameter.
487
+ # p result
488
+ #
489
+ def create_parameter request, options = nil
490
+ raise ::ArgumentError, "request must be provided" if request.nil?
491
+
492
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ParameterManager::V1::CreateParameterRequest
493
+
494
+ # Converts hash and nil to an options object
495
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
496
+
497
+ # Customize the options with defaults
498
+ metadata = @config.rpcs.create_parameter.metadata.to_h
499
+
500
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
501
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
502
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
503
+ gapic_version: ::Google::Cloud::ParameterManager::V1::VERSION
504
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
505
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
506
+
507
+ header_params = {}
508
+ if request.parent
509
+ header_params["parent"] = request.parent
510
+ end
511
+
512
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
513
+ metadata[:"x-goog-request-params"] ||= request_params_header
514
+
515
+ options.apply_defaults timeout: @config.rpcs.create_parameter.timeout,
516
+ metadata: metadata,
517
+ retry_policy: @config.rpcs.create_parameter.retry_policy
518
+
519
+ options.apply_defaults timeout: @config.timeout,
520
+ metadata: @config.metadata,
521
+ retry_policy: @config.retry_policy
522
+
523
+ @parameter_manager_stub.call_rpc :create_parameter, request, options: options do |response, operation|
524
+ yield response, operation if block_given?
525
+ end
526
+ rescue ::GRPC::BadStatus => e
527
+ raise ::Google::Cloud::Error.from_error(e)
528
+ end
529
+
530
+ ##
531
+ # Updates a single Parameter.
532
+ #
533
+ # @overload update_parameter(request, options = nil)
534
+ # Pass arguments to `update_parameter` via a request object, either of type
535
+ # {::Google::Cloud::ParameterManager::V1::UpdateParameterRequest} or an equivalent Hash.
536
+ #
537
+ # @param request [::Google::Cloud::ParameterManager::V1::UpdateParameterRequest, ::Hash]
538
+ # A request object representing the call parameters. Required. To specify no
539
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
540
+ # @param options [::Gapic::CallOptions, ::Hash]
541
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
542
+ #
543
+ # @overload update_parameter(update_mask: nil, parameter: nil, request_id: nil)
544
+ # Pass arguments to `update_parameter` via keyword arguments. Note that at
545
+ # least one keyword argument is required. To specify no parameters, or to keep all
546
+ # the default parameter values, pass an empty Hash as a request object (see above).
547
+ #
548
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
549
+ # Optional. Field mask is used to specify the fields to be overwritten in the
550
+ # Parameter resource by the update.
551
+ # The fields specified in the update_mask are relative to the resource, not
552
+ # the full request. A mutable field will be overwritten if it is in the
553
+ # mask. If the user does not provide a mask then all mutable fields present
554
+ # in the request will be overwritten.
555
+ # @param parameter [::Google::Cloud::ParameterManager::V1::Parameter, ::Hash]
556
+ # Required. The Parameter resource being updated
557
+ # @param request_id [::String]
558
+ # Optional. An optional request ID to identify requests. Specify a unique
559
+ # request ID so that if you must retry your request, the server will know to
560
+ # ignore the request if it has already been completed. The server will
561
+ # guarantee that for at least 60 minutes since the first request.
562
+ #
563
+ # For example, consider a situation where you make an initial request and the
564
+ # request times out. If you make the request again with the same request
565
+ # ID, the server can check if original operation with the same request ID
566
+ # was received, and if so, will ignore the second request. This prevents
567
+ # clients from accidentally creating duplicate commitments.
568
+ #
569
+ # The request ID must be a valid UUID with the exception that zero UUID is
570
+ # not supported (00000000-0000-0000-0000-000000000000).
571
+ #
572
+ # @yield [response, operation] Access the result along with the RPC operation
573
+ # @yieldparam response [::Google::Cloud::ParameterManager::V1::Parameter]
574
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
575
+ #
576
+ # @return [::Google::Cloud::ParameterManager::V1::Parameter]
577
+ #
578
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
579
+ #
580
+ # @example Basic example
581
+ # require "google/cloud/parameter_manager/v1"
582
+ #
583
+ # # Create a client object. The client can be reused for multiple calls.
584
+ # client = Google::Cloud::ParameterManager::V1::ParameterManager::Client.new
585
+ #
586
+ # # Create a request. To set request fields, pass in keyword arguments.
587
+ # request = Google::Cloud::ParameterManager::V1::UpdateParameterRequest.new
588
+ #
589
+ # # Call the update_parameter method.
590
+ # result = client.update_parameter request
591
+ #
592
+ # # The returned object is of type Google::Cloud::ParameterManager::V1::Parameter.
593
+ # p result
594
+ #
595
+ def update_parameter request, options = nil
596
+ raise ::ArgumentError, "request must be provided" if request.nil?
597
+
598
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ParameterManager::V1::UpdateParameterRequest
599
+
600
+ # Converts hash and nil to an options object
601
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
602
+
603
+ # Customize the options with defaults
604
+ metadata = @config.rpcs.update_parameter.metadata.to_h
605
+
606
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
607
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
608
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
609
+ gapic_version: ::Google::Cloud::ParameterManager::V1::VERSION
610
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
611
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
612
+
613
+ header_params = {}
614
+ if request.parameter&.name
615
+ header_params["parameter.name"] = request.parameter.name
616
+ end
617
+
618
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
619
+ metadata[:"x-goog-request-params"] ||= request_params_header
620
+
621
+ options.apply_defaults timeout: @config.rpcs.update_parameter.timeout,
622
+ metadata: metadata,
623
+ retry_policy: @config.rpcs.update_parameter.retry_policy
624
+
625
+ options.apply_defaults timeout: @config.timeout,
626
+ metadata: @config.metadata,
627
+ retry_policy: @config.retry_policy
628
+
629
+ @parameter_manager_stub.call_rpc :update_parameter, request, options: options do |response, operation|
630
+ yield response, operation if block_given?
631
+ end
632
+ rescue ::GRPC::BadStatus => e
633
+ raise ::Google::Cloud::Error.from_error(e)
634
+ end
635
+
636
+ ##
637
+ # Deletes a single Parameter.
638
+ #
639
+ # @overload delete_parameter(request, options = nil)
640
+ # Pass arguments to `delete_parameter` via a request object, either of type
641
+ # {::Google::Cloud::ParameterManager::V1::DeleteParameterRequest} or an equivalent Hash.
642
+ #
643
+ # @param request [::Google::Cloud::ParameterManager::V1::DeleteParameterRequest, ::Hash]
644
+ # A request object representing the call parameters. Required. To specify no
645
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
646
+ # @param options [::Gapic::CallOptions, ::Hash]
647
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
648
+ #
649
+ # @overload delete_parameter(name: nil, request_id: nil)
650
+ # Pass arguments to `delete_parameter` via keyword arguments. Note that at
651
+ # least one keyword argument is required. To specify no parameters, or to keep all
652
+ # the default parameter values, pass an empty Hash as a request object (see above).
653
+ #
654
+ # @param name [::String]
655
+ # Required. Name of the resource in the format
656
+ # `projects/*/locations/*/parameters/*`.
657
+ # @param request_id [::String]
658
+ # Optional. An optional request ID to identify requests. Specify a unique
659
+ # request ID so that if you must retry your request, the server will know to
660
+ # ignore the request if it has already been completed. The server will
661
+ # guarantee that for at least 60 minutes after the first request.
662
+ #
663
+ # For example, consider a situation where you make an initial request and the
664
+ # request times out. If you make the request again with the same request
665
+ # ID, the server can check if original operation with the same request ID
666
+ # was received, and if so, will ignore the second request. This prevents
667
+ # clients from accidentally creating duplicate commitments.
668
+ #
669
+ # The request ID must be a valid UUID with the exception that zero UUID is
670
+ # not supported (00000000-0000-0000-0000-000000000000).
671
+ #
672
+ # @yield [response, operation] Access the result along with the RPC operation
673
+ # @yieldparam response [::Google::Protobuf::Empty]
674
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
675
+ #
676
+ # @return [::Google::Protobuf::Empty]
677
+ #
678
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
679
+ #
680
+ # @example Basic example
681
+ # require "google/cloud/parameter_manager/v1"
682
+ #
683
+ # # Create a client object. The client can be reused for multiple calls.
684
+ # client = Google::Cloud::ParameterManager::V1::ParameterManager::Client.new
685
+ #
686
+ # # Create a request. To set request fields, pass in keyword arguments.
687
+ # request = Google::Cloud::ParameterManager::V1::DeleteParameterRequest.new
688
+ #
689
+ # # Call the delete_parameter method.
690
+ # result = client.delete_parameter request
691
+ #
692
+ # # The returned object is of type Google::Protobuf::Empty.
693
+ # p result
694
+ #
695
+ def delete_parameter request, options = nil
696
+ raise ::ArgumentError, "request must be provided" if request.nil?
697
+
698
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ParameterManager::V1::DeleteParameterRequest
699
+
700
+ # Converts hash and nil to an options object
701
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
702
+
703
+ # Customize the options with defaults
704
+ metadata = @config.rpcs.delete_parameter.metadata.to_h
705
+
706
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
707
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
708
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
709
+ gapic_version: ::Google::Cloud::ParameterManager::V1::VERSION
710
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
711
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
712
+
713
+ header_params = {}
714
+ if request.name
715
+ header_params["name"] = request.name
716
+ end
717
+
718
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
719
+ metadata[:"x-goog-request-params"] ||= request_params_header
720
+
721
+ options.apply_defaults timeout: @config.rpcs.delete_parameter.timeout,
722
+ metadata: metadata,
723
+ retry_policy: @config.rpcs.delete_parameter.retry_policy
724
+
725
+ options.apply_defaults timeout: @config.timeout,
726
+ metadata: @config.metadata,
727
+ retry_policy: @config.retry_policy
728
+
729
+ @parameter_manager_stub.call_rpc :delete_parameter, request, options: options do |response, operation|
730
+ yield response, operation if block_given?
731
+ end
732
+ rescue ::GRPC::BadStatus => e
733
+ raise ::Google::Cloud::Error.from_error(e)
734
+ end
735
+
736
+ ##
737
+ # Lists ParameterVersions in a given project, location, and parameter.
738
+ #
739
+ # @overload list_parameter_versions(request, options = nil)
740
+ # Pass arguments to `list_parameter_versions` via a request object, either of type
741
+ # {::Google::Cloud::ParameterManager::V1::ListParameterVersionsRequest} or an equivalent Hash.
742
+ #
743
+ # @param request [::Google::Cloud::ParameterManager::V1::ListParameterVersionsRequest, ::Hash]
744
+ # A request object representing the call parameters. Required. To specify no
745
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
746
+ # @param options [::Gapic::CallOptions, ::Hash]
747
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
748
+ #
749
+ # @overload list_parameter_versions(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
750
+ # Pass arguments to `list_parameter_versions` via keyword arguments. Note that at
751
+ # least one keyword argument is required. To specify no parameters, or to keep all
752
+ # the default parameter values, pass an empty Hash as a request object (see above).
753
+ #
754
+ # @param parent [::String]
755
+ # Required. Parent value for ListParameterVersionsRequest in the format
756
+ # `projects/*/locations/*/parameters/*`.
757
+ # @param page_size [::Integer]
758
+ # Optional. Requested page size. Server may return fewer items than
759
+ # requested. If unspecified, server will pick an appropriate default.
760
+ # @param page_token [::String]
761
+ # Optional. A token identifying a page of results the server should return.
762
+ # @param filter [::String]
763
+ # Optional. Filtering results
764
+ # @param order_by [::String]
765
+ # Optional. Hint for how to order the results
766
+ #
767
+ # @yield [response, operation] Access the result along with the RPC operation
768
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ParameterManager::V1::ParameterVersion>]
769
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
770
+ #
771
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::ParameterManager::V1::ParameterVersion>]
772
+ #
773
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
774
+ #
775
+ # @example Basic example
776
+ # require "google/cloud/parameter_manager/v1"
777
+ #
778
+ # # Create a client object. The client can be reused for multiple calls.
779
+ # client = Google::Cloud::ParameterManager::V1::ParameterManager::Client.new
780
+ #
781
+ # # Create a request. To set request fields, pass in keyword arguments.
782
+ # request = Google::Cloud::ParameterManager::V1::ListParameterVersionsRequest.new
783
+ #
784
+ # # Call the list_parameter_versions method.
785
+ # result = client.list_parameter_versions request
786
+ #
787
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
788
+ # # over elements, and API calls will be issued to fetch pages as needed.
789
+ # result.each do |item|
790
+ # # Each element is of type ::Google::Cloud::ParameterManager::V1::ParameterVersion.
791
+ # p item
792
+ # end
793
+ #
794
+ def list_parameter_versions request, options = nil
795
+ raise ::ArgumentError, "request must be provided" if request.nil?
796
+
797
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ParameterManager::V1::ListParameterVersionsRequest
798
+
799
+ # Converts hash and nil to an options object
800
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
801
+
802
+ # Customize the options with defaults
803
+ metadata = @config.rpcs.list_parameter_versions.metadata.to_h
804
+
805
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
806
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
807
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
808
+ gapic_version: ::Google::Cloud::ParameterManager::V1::VERSION
809
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
810
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
811
+
812
+ header_params = {}
813
+ if request.parent
814
+ header_params["parent"] = request.parent
815
+ end
816
+
817
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
818
+ metadata[:"x-goog-request-params"] ||= request_params_header
819
+
820
+ options.apply_defaults timeout: @config.rpcs.list_parameter_versions.timeout,
821
+ metadata: metadata,
822
+ retry_policy: @config.rpcs.list_parameter_versions.retry_policy
823
+
824
+ options.apply_defaults timeout: @config.timeout,
825
+ metadata: @config.metadata,
826
+ retry_policy: @config.retry_policy
827
+
828
+ @parameter_manager_stub.call_rpc :list_parameter_versions, request, options: options do |response, operation|
829
+ response = ::Gapic::PagedEnumerable.new @parameter_manager_stub, :list_parameter_versions, request, response, operation, options
830
+ yield response, operation if block_given?
831
+ throw :response, response
832
+ end
833
+ rescue ::GRPC::BadStatus => e
834
+ raise ::Google::Cloud::Error.from_error(e)
835
+ end
836
+
837
+ ##
838
+ # Gets details of a single ParameterVersion.
839
+ #
840
+ # @overload get_parameter_version(request, options = nil)
841
+ # Pass arguments to `get_parameter_version` via a request object, either of type
842
+ # {::Google::Cloud::ParameterManager::V1::GetParameterVersionRequest} or an equivalent Hash.
843
+ #
844
+ # @param request [::Google::Cloud::ParameterManager::V1::GetParameterVersionRequest, ::Hash]
845
+ # A request object representing the call parameters. Required. To specify no
846
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
847
+ # @param options [::Gapic::CallOptions, ::Hash]
848
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
849
+ #
850
+ # @overload get_parameter_version(name: nil, view: nil)
851
+ # Pass arguments to `get_parameter_version` via keyword arguments. Note that at
852
+ # least one keyword argument is required. To specify no parameters, or to keep all
853
+ # the default parameter values, pass an empty Hash as a request object (see above).
854
+ #
855
+ # @param name [::String]
856
+ # Required. Name of the resource in the format
857
+ # `projects/*/locations/*/parameters/*/versions/*`.
858
+ # @param view [::Google::Cloud::ParameterManager::V1::View]
859
+ # Optional. View of the ParameterVersion.
860
+ # In the default FULL view, all metadata & payload associated with the
861
+ # ParameterVersion will be returned.
862
+ #
863
+ # @yield [response, operation] Access the result along with the RPC operation
864
+ # @yieldparam response [::Google::Cloud::ParameterManager::V1::ParameterVersion]
865
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
866
+ #
867
+ # @return [::Google::Cloud::ParameterManager::V1::ParameterVersion]
868
+ #
869
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
870
+ #
871
+ # @example Basic example
872
+ # require "google/cloud/parameter_manager/v1"
873
+ #
874
+ # # Create a client object. The client can be reused for multiple calls.
875
+ # client = Google::Cloud::ParameterManager::V1::ParameterManager::Client.new
876
+ #
877
+ # # Create a request. To set request fields, pass in keyword arguments.
878
+ # request = Google::Cloud::ParameterManager::V1::GetParameterVersionRequest.new
879
+ #
880
+ # # Call the get_parameter_version method.
881
+ # result = client.get_parameter_version request
882
+ #
883
+ # # The returned object is of type Google::Cloud::ParameterManager::V1::ParameterVersion.
884
+ # p result
885
+ #
886
+ def get_parameter_version request, options = nil
887
+ raise ::ArgumentError, "request must be provided" if request.nil?
888
+
889
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ParameterManager::V1::GetParameterVersionRequest
890
+
891
+ # Converts hash and nil to an options object
892
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
893
+
894
+ # Customize the options with defaults
895
+ metadata = @config.rpcs.get_parameter_version.metadata.to_h
896
+
897
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
898
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
899
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
900
+ gapic_version: ::Google::Cloud::ParameterManager::V1::VERSION
901
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
902
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
903
+
904
+ header_params = {}
905
+ if request.name
906
+ header_params["name"] = request.name
907
+ end
908
+
909
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
910
+ metadata[:"x-goog-request-params"] ||= request_params_header
911
+
912
+ options.apply_defaults timeout: @config.rpcs.get_parameter_version.timeout,
913
+ metadata: metadata,
914
+ retry_policy: @config.rpcs.get_parameter_version.retry_policy
915
+
916
+ options.apply_defaults timeout: @config.timeout,
917
+ metadata: @config.metadata,
918
+ retry_policy: @config.retry_policy
919
+
920
+ @parameter_manager_stub.call_rpc :get_parameter_version, request, options: options do |response, operation|
921
+ yield response, operation if block_given?
922
+ end
923
+ rescue ::GRPC::BadStatus => e
924
+ raise ::Google::Cloud::Error.from_error(e)
925
+ end
926
+
927
+ ##
928
+ # Gets rendered version of a ParameterVersion.
929
+ #
930
+ # @overload render_parameter_version(request, options = nil)
931
+ # Pass arguments to `render_parameter_version` via a request object, either of type
932
+ # {::Google::Cloud::ParameterManager::V1::RenderParameterVersionRequest} or an equivalent Hash.
933
+ #
934
+ # @param request [::Google::Cloud::ParameterManager::V1::RenderParameterVersionRequest, ::Hash]
935
+ # A request object representing the call parameters. Required. To specify no
936
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
937
+ # @param options [::Gapic::CallOptions, ::Hash]
938
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
939
+ #
940
+ # @overload render_parameter_version(name: nil)
941
+ # Pass arguments to `render_parameter_version` via keyword arguments. Note that at
942
+ # least one keyword argument is required. To specify no parameters, or to keep all
943
+ # the default parameter values, pass an empty Hash as a request object (see above).
944
+ #
945
+ # @param name [::String]
946
+ # Required. Name of the resource
947
+ #
948
+ # @yield [response, operation] Access the result along with the RPC operation
949
+ # @yieldparam response [::Google::Cloud::ParameterManager::V1::RenderParameterVersionResponse]
950
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
951
+ #
952
+ # @return [::Google::Cloud::ParameterManager::V1::RenderParameterVersionResponse]
953
+ #
954
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
955
+ #
956
+ # @example Basic example
957
+ # require "google/cloud/parameter_manager/v1"
958
+ #
959
+ # # Create a client object. The client can be reused for multiple calls.
960
+ # client = Google::Cloud::ParameterManager::V1::ParameterManager::Client.new
961
+ #
962
+ # # Create a request. To set request fields, pass in keyword arguments.
963
+ # request = Google::Cloud::ParameterManager::V1::RenderParameterVersionRequest.new
964
+ #
965
+ # # Call the render_parameter_version method.
966
+ # result = client.render_parameter_version request
967
+ #
968
+ # # The returned object is of type Google::Cloud::ParameterManager::V1::RenderParameterVersionResponse.
969
+ # p result
970
+ #
971
+ def render_parameter_version request, options = nil
972
+ raise ::ArgumentError, "request must be provided" if request.nil?
973
+
974
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ParameterManager::V1::RenderParameterVersionRequest
975
+
976
+ # Converts hash and nil to an options object
977
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
978
+
979
+ # Customize the options with defaults
980
+ metadata = @config.rpcs.render_parameter_version.metadata.to_h
981
+
982
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
983
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
984
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
985
+ gapic_version: ::Google::Cloud::ParameterManager::V1::VERSION
986
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
987
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
988
+
989
+ header_params = {}
990
+ if request.name
991
+ header_params["name"] = request.name
992
+ end
993
+
994
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
995
+ metadata[:"x-goog-request-params"] ||= request_params_header
996
+
997
+ options.apply_defaults timeout: @config.rpcs.render_parameter_version.timeout,
998
+ metadata: metadata,
999
+ retry_policy: @config.rpcs.render_parameter_version.retry_policy
1000
+
1001
+ options.apply_defaults timeout: @config.timeout,
1002
+ metadata: @config.metadata,
1003
+ retry_policy: @config.retry_policy
1004
+
1005
+ @parameter_manager_stub.call_rpc :render_parameter_version, request, options: options do |response, operation|
1006
+ yield response, operation if block_given?
1007
+ end
1008
+ rescue ::GRPC::BadStatus => e
1009
+ raise ::Google::Cloud::Error.from_error(e)
1010
+ end
1011
+
1012
+ ##
1013
+ # Creates a new ParameterVersion in a given project, location, and parameter.
1014
+ #
1015
+ # @overload create_parameter_version(request, options = nil)
1016
+ # Pass arguments to `create_parameter_version` via a request object, either of type
1017
+ # {::Google::Cloud::ParameterManager::V1::CreateParameterVersionRequest} or an equivalent Hash.
1018
+ #
1019
+ # @param request [::Google::Cloud::ParameterManager::V1::CreateParameterVersionRequest, ::Hash]
1020
+ # A request object representing the call parameters. Required. To specify no
1021
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1022
+ # @param options [::Gapic::CallOptions, ::Hash]
1023
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1024
+ #
1025
+ # @overload create_parameter_version(parent: nil, parameter_version_id: nil, parameter_version: nil, request_id: nil)
1026
+ # Pass arguments to `create_parameter_version` via keyword arguments. Note that at
1027
+ # least one keyword argument is required. To specify no parameters, or to keep all
1028
+ # the default parameter values, pass an empty Hash as a request object (see above).
1029
+ #
1030
+ # @param parent [::String]
1031
+ # Required. Value for parent in the format
1032
+ # `projects/*/locations/*/parameters/*`.
1033
+ # @param parameter_version_id [::String]
1034
+ # Required. Id of the ParameterVersion resource
1035
+ # @param parameter_version [::Google::Cloud::ParameterManager::V1::ParameterVersion, ::Hash]
1036
+ # Required. The ParameterVersion resource being created
1037
+ # @param request_id [::String]
1038
+ # Optional. An optional request ID to identify requests. Specify a unique
1039
+ # request ID so that if you must retry your request, the server will know to
1040
+ # ignore the request if it has already been completed. The server will
1041
+ # guarantee that for at least 60 minutes since the first request.
1042
+ #
1043
+ # For example, consider a situation where you make an initial request and the
1044
+ # request times out. If you make the request again with the same request
1045
+ # ID, the server can check if original operation with the same request ID
1046
+ # was received, and if so, will ignore the second request. This prevents
1047
+ # clients from accidentally creating duplicate commitments.
1048
+ #
1049
+ # The request ID must be a valid UUID with the exception that zero UUID is
1050
+ # not supported (00000000-0000-0000-0000-000000000000).
1051
+ #
1052
+ # @yield [response, operation] Access the result along with the RPC operation
1053
+ # @yieldparam response [::Google::Cloud::ParameterManager::V1::ParameterVersion]
1054
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1055
+ #
1056
+ # @return [::Google::Cloud::ParameterManager::V1::ParameterVersion]
1057
+ #
1058
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1059
+ #
1060
+ # @example Basic example
1061
+ # require "google/cloud/parameter_manager/v1"
1062
+ #
1063
+ # # Create a client object. The client can be reused for multiple calls.
1064
+ # client = Google::Cloud::ParameterManager::V1::ParameterManager::Client.new
1065
+ #
1066
+ # # Create a request. To set request fields, pass in keyword arguments.
1067
+ # request = Google::Cloud::ParameterManager::V1::CreateParameterVersionRequest.new
1068
+ #
1069
+ # # Call the create_parameter_version method.
1070
+ # result = client.create_parameter_version request
1071
+ #
1072
+ # # The returned object is of type Google::Cloud::ParameterManager::V1::ParameterVersion.
1073
+ # p result
1074
+ #
1075
+ def create_parameter_version request, options = nil
1076
+ raise ::ArgumentError, "request must be provided" if request.nil?
1077
+
1078
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ParameterManager::V1::CreateParameterVersionRequest
1079
+
1080
+ # Converts hash and nil to an options object
1081
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1082
+
1083
+ # Customize the options with defaults
1084
+ metadata = @config.rpcs.create_parameter_version.metadata.to_h
1085
+
1086
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1087
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1088
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1089
+ gapic_version: ::Google::Cloud::ParameterManager::V1::VERSION
1090
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1091
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1092
+
1093
+ header_params = {}
1094
+ if request.parent
1095
+ header_params["parent"] = request.parent
1096
+ end
1097
+
1098
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1099
+ metadata[:"x-goog-request-params"] ||= request_params_header
1100
+
1101
+ options.apply_defaults timeout: @config.rpcs.create_parameter_version.timeout,
1102
+ metadata: metadata,
1103
+ retry_policy: @config.rpcs.create_parameter_version.retry_policy
1104
+
1105
+ options.apply_defaults timeout: @config.timeout,
1106
+ metadata: @config.metadata,
1107
+ retry_policy: @config.retry_policy
1108
+
1109
+ @parameter_manager_stub.call_rpc :create_parameter_version, request, options: options do |response, operation|
1110
+ yield response, operation if block_given?
1111
+ end
1112
+ rescue ::GRPC::BadStatus => e
1113
+ raise ::Google::Cloud::Error.from_error(e)
1114
+ end
1115
+
1116
+ ##
1117
+ # Updates a single ParameterVersion.
1118
+ #
1119
+ # @overload update_parameter_version(request, options = nil)
1120
+ # Pass arguments to `update_parameter_version` via a request object, either of type
1121
+ # {::Google::Cloud::ParameterManager::V1::UpdateParameterVersionRequest} or an equivalent Hash.
1122
+ #
1123
+ # @param request [::Google::Cloud::ParameterManager::V1::UpdateParameterVersionRequest, ::Hash]
1124
+ # A request object representing the call parameters. Required. To specify no
1125
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1126
+ # @param options [::Gapic::CallOptions, ::Hash]
1127
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1128
+ #
1129
+ # @overload update_parameter_version(update_mask: nil, parameter_version: nil, request_id: nil)
1130
+ # Pass arguments to `update_parameter_version` via keyword arguments. Note that at
1131
+ # least one keyword argument is required. To specify no parameters, or to keep all
1132
+ # the default parameter values, pass an empty Hash as a request object (see above).
1133
+ #
1134
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
1135
+ # Optional. Field mask is used to specify the fields to be overwritten in the
1136
+ # ParameterVersion resource by the update.
1137
+ # The fields specified in the update_mask are relative to the resource, not
1138
+ # the full request. A mutable field will be overwritten if it is in the
1139
+ # mask. If the user does not provide a mask then all mutable fields present
1140
+ # in the request will be overwritten.
1141
+ # @param parameter_version [::Google::Cloud::ParameterManager::V1::ParameterVersion, ::Hash]
1142
+ # Required. The ParameterVersion resource being updated
1143
+ # @param request_id [::String]
1144
+ # Optional. An optional request ID to identify requests. Specify a unique
1145
+ # request ID so that if you must retry your request, the server will know to
1146
+ # ignore the request if it has already been completed. The server will
1147
+ # guarantee that for at least 60 minutes since the first request.
1148
+ #
1149
+ # For example, consider a situation where you make an initial request and the
1150
+ # request times out. If you make the request again with the same request
1151
+ # ID, the server can check if original operation with the same request ID
1152
+ # was received, and if so, will ignore the second request. This prevents
1153
+ # clients from accidentally creating duplicate commitments.
1154
+ #
1155
+ # The request ID must be a valid UUID with the exception that zero UUID is
1156
+ # not supported (00000000-0000-0000-0000-000000000000).
1157
+ #
1158
+ # @yield [response, operation] Access the result along with the RPC operation
1159
+ # @yieldparam response [::Google::Cloud::ParameterManager::V1::ParameterVersion]
1160
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1161
+ #
1162
+ # @return [::Google::Cloud::ParameterManager::V1::ParameterVersion]
1163
+ #
1164
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1165
+ #
1166
+ # @example Basic example
1167
+ # require "google/cloud/parameter_manager/v1"
1168
+ #
1169
+ # # Create a client object. The client can be reused for multiple calls.
1170
+ # client = Google::Cloud::ParameterManager::V1::ParameterManager::Client.new
1171
+ #
1172
+ # # Create a request. To set request fields, pass in keyword arguments.
1173
+ # request = Google::Cloud::ParameterManager::V1::UpdateParameterVersionRequest.new
1174
+ #
1175
+ # # Call the update_parameter_version method.
1176
+ # result = client.update_parameter_version request
1177
+ #
1178
+ # # The returned object is of type Google::Cloud::ParameterManager::V1::ParameterVersion.
1179
+ # p result
1180
+ #
1181
+ def update_parameter_version request, options = nil
1182
+ raise ::ArgumentError, "request must be provided" if request.nil?
1183
+
1184
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ParameterManager::V1::UpdateParameterVersionRequest
1185
+
1186
+ # Converts hash and nil to an options object
1187
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1188
+
1189
+ # Customize the options with defaults
1190
+ metadata = @config.rpcs.update_parameter_version.metadata.to_h
1191
+
1192
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1193
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1194
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1195
+ gapic_version: ::Google::Cloud::ParameterManager::V1::VERSION
1196
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1197
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1198
+
1199
+ header_params = {}
1200
+ if request.parameter_version&.name
1201
+ header_params["parameter_version.name"] = request.parameter_version.name
1202
+ end
1203
+
1204
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1205
+ metadata[:"x-goog-request-params"] ||= request_params_header
1206
+
1207
+ options.apply_defaults timeout: @config.rpcs.update_parameter_version.timeout,
1208
+ metadata: metadata,
1209
+ retry_policy: @config.rpcs.update_parameter_version.retry_policy
1210
+
1211
+ options.apply_defaults timeout: @config.timeout,
1212
+ metadata: @config.metadata,
1213
+ retry_policy: @config.retry_policy
1214
+
1215
+ @parameter_manager_stub.call_rpc :update_parameter_version, request, options: options do |response, operation|
1216
+ yield response, operation if block_given?
1217
+ end
1218
+ rescue ::GRPC::BadStatus => e
1219
+ raise ::Google::Cloud::Error.from_error(e)
1220
+ end
1221
+
1222
+ ##
1223
+ # Deletes a single ParameterVersion.
1224
+ #
1225
+ # @overload delete_parameter_version(request, options = nil)
1226
+ # Pass arguments to `delete_parameter_version` via a request object, either of type
1227
+ # {::Google::Cloud::ParameterManager::V1::DeleteParameterVersionRequest} or an equivalent Hash.
1228
+ #
1229
+ # @param request [::Google::Cloud::ParameterManager::V1::DeleteParameterVersionRequest, ::Hash]
1230
+ # A request object representing the call parameters. Required. To specify no
1231
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1232
+ # @param options [::Gapic::CallOptions, ::Hash]
1233
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1234
+ #
1235
+ # @overload delete_parameter_version(name: nil, request_id: nil)
1236
+ # Pass arguments to `delete_parameter_version` via keyword arguments. Note that at
1237
+ # least one keyword argument is required. To specify no parameters, or to keep all
1238
+ # the default parameter values, pass an empty Hash as a request object (see above).
1239
+ #
1240
+ # @param name [::String]
1241
+ # Required. Name of the resource in the format
1242
+ # `projects/*/locations/*/parameters/*/versions/*`.
1243
+ # @param request_id [::String]
1244
+ # Optional. An optional request ID to identify requests. Specify a unique
1245
+ # request ID so that if you must retry your request, the server will know to
1246
+ # ignore the request if it has already been completed. The server will
1247
+ # guarantee that for at least 60 minutes after the first request.
1248
+ #
1249
+ # For example, consider a situation where you make an initial request and the
1250
+ # request times out. If you make the request again with the same request
1251
+ # ID, the server can check if original operation with the same request ID
1252
+ # was received, and if so, will ignore the second request. This prevents
1253
+ # clients from accidentally creating duplicate commitments.
1254
+ #
1255
+ # The request ID must be a valid UUID with the exception that zero UUID is
1256
+ # not supported (00000000-0000-0000-0000-000000000000).
1257
+ #
1258
+ # @yield [response, operation] Access the result along with the RPC operation
1259
+ # @yieldparam response [::Google::Protobuf::Empty]
1260
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1261
+ #
1262
+ # @return [::Google::Protobuf::Empty]
1263
+ #
1264
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1265
+ #
1266
+ # @example Basic example
1267
+ # require "google/cloud/parameter_manager/v1"
1268
+ #
1269
+ # # Create a client object. The client can be reused for multiple calls.
1270
+ # client = Google::Cloud::ParameterManager::V1::ParameterManager::Client.new
1271
+ #
1272
+ # # Create a request. To set request fields, pass in keyword arguments.
1273
+ # request = Google::Cloud::ParameterManager::V1::DeleteParameterVersionRequest.new
1274
+ #
1275
+ # # Call the delete_parameter_version method.
1276
+ # result = client.delete_parameter_version request
1277
+ #
1278
+ # # The returned object is of type Google::Protobuf::Empty.
1279
+ # p result
1280
+ #
1281
+ def delete_parameter_version request, options = nil
1282
+ raise ::ArgumentError, "request must be provided" if request.nil?
1283
+
1284
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ParameterManager::V1::DeleteParameterVersionRequest
1285
+
1286
+ # Converts hash and nil to an options object
1287
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1288
+
1289
+ # Customize the options with defaults
1290
+ metadata = @config.rpcs.delete_parameter_version.metadata.to_h
1291
+
1292
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1293
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1294
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1295
+ gapic_version: ::Google::Cloud::ParameterManager::V1::VERSION
1296
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1297
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1298
+
1299
+ header_params = {}
1300
+ if request.name
1301
+ header_params["name"] = request.name
1302
+ end
1303
+
1304
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1305
+ metadata[:"x-goog-request-params"] ||= request_params_header
1306
+
1307
+ options.apply_defaults timeout: @config.rpcs.delete_parameter_version.timeout,
1308
+ metadata: metadata,
1309
+ retry_policy: @config.rpcs.delete_parameter_version.retry_policy
1310
+
1311
+ options.apply_defaults timeout: @config.timeout,
1312
+ metadata: @config.metadata,
1313
+ retry_policy: @config.retry_policy
1314
+
1315
+ @parameter_manager_stub.call_rpc :delete_parameter_version, request, options: options do |response, operation|
1316
+ yield response, operation if block_given?
1317
+ end
1318
+ rescue ::GRPC::BadStatus => e
1319
+ raise ::Google::Cloud::Error.from_error(e)
1320
+ end
1321
+
1322
+ ##
1323
+ # Configuration class for the ParameterManager API.
1324
+ #
1325
+ # This class represents the configuration for ParameterManager,
1326
+ # providing control over timeouts, retry behavior, logging, transport
1327
+ # parameters, and other low-level controls. Certain parameters can also be
1328
+ # applied individually to specific RPCs. See
1329
+ # {::Google::Cloud::ParameterManager::V1::ParameterManager::Client::Configuration::Rpcs}
1330
+ # for a list of RPCs that can be configured independently.
1331
+ #
1332
+ # Configuration can be applied globally to all clients, or to a single client
1333
+ # on construction.
1334
+ #
1335
+ # @example
1336
+ #
1337
+ # # Modify the global config, setting the timeout for
1338
+ # # list_parameters to 20 seconds,
1339
+ # # and all remaining timeouts to 10 seconds.
1340
+ # ::Google::Cloud::ParameterManager::V1::ParameterManager::Client.configure do |config|
1341
+ # config.timeout = 10.0
1342
+ # config.rpcs.list_parameters.timeout = 20.0
1343
+ # end
1344
+ #
1345
+ # # Apply the above configuration only to a new client.
1346
+ # client = ::Google::Cloud::ParameterManager::V1::ParameterManager::Client.new do |config|
1347
+ # config.timeout = 10.0
1348
+ # config.rpcs.list_parameters.timeout = 20.0
1349
+ # end
1350
+ #
1351
+ # @!attribute [rw] endpoint
1352
+ # A custom service endpoint, as a hostname or hostname:port. The default is
1353
+ # nil, indicating to use the default endpoint in the current universe domain.
1354
+ # @return [::String,nil]
1355
+ # @!attribute [rw] credentials
1356
+ # Credentials to send with calls. You may provide any of the following types:
1357
+ # * (`String`) The path to a service account key file in JSON format
1358
+ # * (`Hash`) A service account key as a Hash
1359
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
1360
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
1361
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
1362
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
1363
+ # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
1364
+ # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
1365
+ # * (`nil`) indicating no credentials
1366
+ #
1367
+ # Warning: If you accept a credential configuration (JSON file or Hash) from an
1368
+ # external source for authentication to Google Cloud, you must validate it before
1369
+ # providing it to a Google API client library. Providing an unvalidated credential
1370
+ # configuration to Google APIs can compromise the security of your systems and data.
1371
+ # For more information, refer to [Validate credential configurations from external
1372
+ # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
1373
+ # @return [::Object]
1374
+ # @!attribute [rw] scope
1375
+ # The OAuth scopes
1376
+ # @return [::Array<::String>]
1377
+ # @!attribute [rw] lib_name
1378
+ # The library name as recorded in instrumentation and logging
1379
+ # @return [::String]
1380
+ # @!attribute [rw] lib_version
1381
+ # The library version as recorded in instrumentation and logging
1382
+ # @return [::String]
1383
+ # @!attribute [rw] channel_args
1384
+ # Extra parameters passed to the gRPC channel. Note: this is ignored if a
1385
+ # `GRPC::Core::Channel` object is provided as the credential.
1386
+ # @return [::Hash]
1387
+ # @!attribute [rw] interceptors
1388
+ # An array of interceptors that are run before calls are executed.
1389
+ # @return [::Array<::GRPC::ClientInterceptor>]
1390
+ # @!attribute [rw] timeout
1391
+ # The call timeout in seconds.
1392
+ # @return [::Numeric]
1393
+ # @!attribute [rw] metadata
1394
+ # Additional gRPC headers to be sent with the call.
1395
+ # @return [::Hash{::Symbol=>::String}]
1396
+ # @!attribute [rw] retry_policy
1397
+ # The retry policy. The value is a hash with the following keys:
1398
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
1399
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
1400
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
1401
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
1402
+ # trigger a retry.
1403
+ # @return [::Hash]
1404
+ # @!attribute [rw] quota_project
1405
+ # A separate project against which to charge quota.
1406
+ # @return [::String]
1407
+ # @!attribute [rw] universe_domain
1408
+ # The universe domain within which to make requests. This determines the
1409
+ # default endpoint URL. The default value of nil uses the environment
1410
+ # universe (usually the default "googleapis.com" universe).
1411
+ # @return [::String,nil]
1412
+ # @!attribute [rw] logger
1413
+ # A custom logger to use for request/response debug logging, or the value
1414
+ # `:default` (the default) to construct a default logger, or `nil` to
1415
+ # explicitly disable logging.
1416
+ # @return [::Logger,:default,nil]
1417
+ #
1418
+ class Configuration
1419
+ extend ::Gapic::Config
1420
+
1421
+ # @private
1422
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
1423
+ DEFAULT_ENDPOINT = "parametermanager.googleapis.com"
1424
+
1425
+ config_attr :endpoint, nil, ::String, nil
1426
+ config_attr :credentials, nil do |value|
1427
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
1428
+ allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
1429
+ allowed.any? { |klass| klass === value }
1430
+ end
1431
+ config_attr :scope, nil, ::String, ::Array, nil
1432
+ config_attr :lib_name, nil, ::String, nil
1433
+ config_attr :lib_version, nil, ::String, nil
1434
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
1435
+ config_attr :interceptors, nil, ::Array, nil
1436
+ config_attr :timeout, nil, ::Numeric, nil
1437
+ config_attr :metadata, nil, ::Hash, nil
1438
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
1439
+ config_attr :quota_project, nil, ::String, nil
1440
+ config_attr :universe_domain, nil, ::String, nil
1441
+ config_attr :logger, :default, ::Logger, nil, :default
1442
+
1443
+ # @private
1444
+ def initialize parent_config = nil
1445
+ @parent_config = parent_config unless parent_config.nil?
1446
+
1447
+ yield self if block_given?
1448
+ end
1449
+
1450
+ ##
1451
+ # Configurations for individual RPCs
1452
+ # @return [Rpcs]
1453
+ #
1454
+ def rpcs
1455
+ @rpcs ||= begin
1456
+ parent_rpcs = nil
1457
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
1458
+ Rpcs.new parent_rpcs
1459
+ end
1460
+ end
1461
+
1462
+ ##
1463
+ # Configuration for the channel pool
1464
+ # @return [::Gapic::ServiceStub::ChannelPool::Configuration]
1465
+ #
1466
+ def channel_pool
1467
+ @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
1468
+ end
1469
+
1470
+ ##
1471
+ # Configuration RPC class for the ParameterManager API.
1472
+ #
1473
+ # Includes fields providing the configuration for each RPC in this service.
1474
+ # Each configuration object is of type `Gapic::Config::Method` and includes
1475
+ # the following configuration fields:
1476
+ #
1477
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
1478
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
1479
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
1480
+ # include the following keys:
1481
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
1482
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
1483
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
1484
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
1485
+ # trigger a retry.
1486
+ #
1487
+ class Rpcs
1488
+ ##
1489
+ # RPC-specific configuration for `list_parameters`
1490
+ # @return [::Gapic::Config::Method]
1491
+ #
1492
+ attr_reader :list_parameters
1493
+ ##
1494
+ # RPC-specific configuration for `get_parameter`
1495
+ # @return [::Gapic::Config::Method]
1496
+ #
1497
+ attr_reader :get_parameter
1498
+ ##
1499
+ # RPC-specific configuration for `create_parameter`
1500
+ # @return [::Gapic::Config::Method]
1501
+ #
1502
+ attr_reader :create_parameter
1503
+ ##
1504
+ # RPC-specific configuration for `update_parameter`
1505
+ # @return [::Gapic::Config::Method]
1506
+ #
1507
+ attr_reader :update_parameter
1508
+ ##
1509
+ # RPC-specific configuration for `delete_parameter`
1510
+ # @return [::Gapic::Config::Method]
1511
+ #
1512
+ attr_reader :delete_parameter
1513
+ ##
1514
+ # RPC-specific configuration for `list_parameter_versions`
1515
+ # @return [::Gapic::Config::Method]
1516
+ #
1517
+ attr_reader :list_parameter_versions
1518
+ ##
1519
+ # RPC-specific configuration for `get_parameter_version`
1520
+ # @return [::Gapic::Config::Method]
1521
+ #
1522
+ attr_reader :get_parameter_version
1523
+ ##
1524
+ # RPC-specific configuration for `render_parameter_version`
1525
+ # @return [::Gapic::Config::Method]
1526
+ #
1527
+ attr_reader :render_parameter_version
1528
+ ##
1529
+ # RPC-specific configuration for `create_parameter_version`
1530
+ # @return [::Gapic::Config::Method]
1531
+ #
1532
+ attr_reader :create_parameter_version
1533
+ ##
1534
+ # RPC-specific configuration for `update_parameter_version`
1535
+ # @return [::Gapic::Config::Method]
1536
+ #
1537
+ attr_reader :update_parameter_version
1538
+ ##
1539
+ # RPC-specific configuration for `delete_parameter_version`
1540
+ # @return [::Gapic::Config::Method]
1541
+ #
1542
+ attr_reader :delete_parameter_version
1543
+
1544
+ # @private
1545
+ def initialize parent_rpcs = nil
1546
+ list_parameters_config = parent_rpcs.list_parameters if parent_rpcs.respond_to? :list_parameters
1547
+ @list_parameters = ::Gapic::Config::Method.new list_parameters_config
1548
+ get_parameter_config = parent_rpcs.get_parameter if parent_rpcs.respond_to? :get_parameter
1549
+ @get_parameter = ::Gapic::Config::Method.new get_parameter_config
1550
+ create_parameter_config = parent_rpcs.create_parameter if parent_rpcs.respond_to? :create_parameter
1551
+ @create_parameter = ::Gapic::Config::Method.new create_parameter_config
1552
+ update_parameter_config = parent_rpcs.update_parameter if parent_rpcs.respond_to? :update_parameter
1553
+ @update_parameter = ::Gapic::Config::Method.new update_parameter_config
1554
+ delete_parameter_config = parent_rpcs.delete_parameter if parent_rpcs.respond_to? :delete_parameter
1555
+ @delete_parameter = ::Gapic::Config::Method.new delete_parameter_config
1556
+ list_parameter_versions_config = parent_rpcs.list_parameter_versions if parent_rpcs.respond_to? :list_parameter_versions
1557
+ @list_parameter_versions = ::Gapic::Config::Method.new list_parameter_versions_config
1558
+ get_parameter_version_config = parent_rpcs.get_parameter_version if parent_rpcs.respond_to? :get_parameter_version
1559
+ @get_parameter_version = ::Gapic::Config::Method.new get_parameter_version_config
1560
+ render_parameter_version_config = parent_rpcs.render_parameter_version if parent_rpcs.respond_to? :render_parameter_version
1561
+ @render_parameter_version = ::Gapic::Config::Method.new render_parameter_version_config
1562
+ create_parameter_version_config = parent_rpcs.create_parameter_version if parent_rpcs.respond_to? :create_parameter_version
1563
+ @create_parameter_version = ::Gapic::Config::Method.new create_parameter_version_config
1564
+ update_parameter_version_config = parent_rpcs.update_parameter_version if parent_rpcs.respond_to? :update_parameter_version
1565
+ @update_parameter_version = ::Gapic::Config::Method.new update_parameter_version_config
1566
+ delete_parameter_version_config = parent_rpcs.delete_parameter_version if parent_rpcs.respond_to? :delete_parameter_version
1567
+ @delete_parameter_version = ::Gapic::Config::Method.new delete_parameter_version_config
1568
+
1569
+ yield self if block_given?
1570
+ end
1571
+ end
1572
+ end
1573
+ end
1574
+ end
1575
+ end
1576
+ end
1577
+ end
1578
+ end