google-cloud-resource_manager-v3 0.2.0 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (58) hide show
  1. checksums.yaml +4 -4
  2. data/AUTHENTICATION.md +1 -1
  3. data/README.md +12 -7
  4. data/lib/google/cloud/resource_manager/v3/folders/client.rb +28 -32
  5. data/lib/google/cloud/resource_manager/v3/folders/operations.rb +15 -14
  6. data/lib/google/cloud/resource_manager/v3/folders/rest/client.rb +1269 -0
  7. data/lib/google/cloud/resource_manager/v3/folders/rest/operations.rb +793 -0
  8. data/lib/google/cloud/resource_manager/v3/folders/rest/service_stub.rb +698 -0
  9. data/lib/google/cloud/resource_manager/v3/folders/rest.rb +55 -0
  10. data/lib/google/cloud/resource_manager/v3/folders.rb +7 -1
  11. data/lib/google/cloud/resource_manager/v3/organizations/client.rb +4 -6
  12. data/lib/google/cloud/resource_manager/v3/organizations/rest/client.rb +702 -0
  13. data/lib/google/cloud/resource_manager/v3/organizations/rest/service_stub.rb +344 -0
  14. data/lib/google/cloud/resource_manager/v3/organizations/rest.rb +52 -0
  15. data/lib/google/cloud/resource_manager/v3/organizations.rb +7 -1
  16. data/lib/google/cloud/resource_manager/v3/projects/client.rb +28 -32
  17. data/lib/google/cloud/resource_manager/v3/projects/operations.rb +15 -14
  18. data/lib/google/cloud/resource_manager/v3/projects/rest/client.rb +1299 -0
  19. data/lib/google/cloud/resource_manager/v3/projects/rest/operations.rb +793 -0
  20. data/lib/google/cloud/resource_manager/v3/projects/rest/service_stub.rb +698 -0
  21. data/lib/google/cloud/resource_manager/v3/projects/rest.rb +53 -0
  22. data/lib/google/cloud/resource_manager/v3/projects.rb +7 -1
  23. data/lib/google/cloud/resource_manager/v3/rest.rb +42 -0
  24. data/lib/google/cloud/resource_manager/v3/tag_bindings/client.rb +12 -14
  25. data/lib/google/cloud/resource_manager/v3/tag_bindings/operations.rb +15 -14
  26. data/lib/google/cloud/resource_manager/v3/tag_bindings/rest/client.rb +527 -0
  27. data/lib/google/cloud/resource_manager/v3/tag_bindings/rest/operations.rb +793 -0
  28. data/lib/google/cloud/resource_manager/v3/tag_bindings/rest/service_stub.rb +222 -0
  29. data/lib/google/cloud/resource_manager/v3/tag_bindings/rest.rb +54 -0
  30. data/lib/google/cloud/resource_manager/v3/tag_bindings.rb +7 -1
  31. data/lib/google/cloud/resource_manager/v3/tag_keys/client.rb +16 -18
  32. data/lib/google/cloud/resource_manager/v3/tag_keys/operations.rb +15 -14
  33. data/lib/google/cloud/resource_manager/v3/tag_keys/rest/client.rb +938 -0
  34. data/lib/google/cloud/resource_manager/v3/tag_keys/rest/operations.rb +793 -0
  35. data/lib/google/cloud/resource_manager/v3/tag_keys/rest/service_stub.rb +521 -0
  36. data/lib/google/cloud/resource_manager/v3/tag_keys/rest.rb +53 -0
  37. data/lib/google/cloud/resource_manager/v3/tag_keys.rb +7 -1
  38. data/lib/google/cloud/resource_manager/v3/tag_values/client.rb +16 -18
  39. data/lib/google/cloud/resource_manager/v3/tag_values/operations.rb +15 -14
  40. data/lib/google/cloud/resource_manager/v3/tag_values/rest/client.rb +934 -0
  41. data/lib/google/cloud/resource_manager/v3/tag_values/rest/operations.rb +793 -0
  42. data/lib/google/cloud/resource_manager/v3/tag_values/rest/service_stub.rb +521 -0
  43. data/lib/google/cloud/resource_manager/v3/tag_values/rest.rb +53 -0
  44. data/lib/google/cloud/resource_manager/v3/tag_values.rb +7 -1
  45. data/lib/google/cloud/resource_manager/v3/version.rb +1 -1
  46. data/lib/google/cloud/resource_manager/v3.rb +7 -2
  47. data/lib/google/cloud/resourcemanager/v3/folders_pb.rb +2 -1
  48. data/lib/google/cloud/resourcemanager/v3/organizations_pb.rb +2 -2
  49. data/lib/google/cloud/resourcemanager/v3/projects_pb.rb +2 -1
  50. data/lib/google/cloud/resourcemanager/v3/tag_bindings_pb.rb +2 -1
  51. data/lib/google/cloud/resourcemanager/v3/tag_keys_pb.rb +2 -1
  52. data/lib/google/cloud/resourcemanager/v3/tag_values_pb.rb +2 -1
  53. data/proto_docs/google/api/client.rb +318 -0
  54. data/proto_docs/google/api/launch_stage.rb +71 -0
  55. data/proto_docs/google/protobuf/any.rb +3 -3
  56. data/proto_docs/google/protobuf/empty.rb +0 -2
  57. data/proto_docs/google/rpc/status.rb +4 -2
  58. metadata +39 -13
@@ -0,0 +1,527 @@
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/resourcemanager/v3/tag_bindings_pb"
21
+ require "google/cloud/resource_manager/v3/tag_bindings/rest/service_stub"
22
+
23
+ module Google
24
+ module Cloud
25
+ module ResourceManager
26
+ module V3
27
+ module TagBindings
28
+ module Rest
29
+ ##
30
+ # REST client for the TagBindings service.
31
+ #
32
+ # Allow users to create and manage TagBindings between TagValues and
33
+ # different cloud resources throughout the GCP resource hierarchy.
34
+ #
35
+ class Client
36
+ include Paths
37
+
38
+ # @private
39
+ attr_reader :tag_bindings_stub
40
+
41
+ ##
42
+ # Configure the TagBindings Client class.
43
+ #
44
+ # See {::Google::Cloud::ResourceManager::V3::TagBindings::Rest::Client::Configuration}
45
+ # for a description of the configuration fields.
46
+ #
47
+ # @example
48
+ #
49
+ # # Modify the configuration for all TagBindings clients
50
+ # ::Google::Cloud::ResourceManager::V3::TagBindings::Rest::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", "ResourceManager", "V3"]
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.rpcs.list_tag_bindings.timeout = 60.0
71
+ default_config.rpcs.list_tag_bindings.retry_policy = {
72
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
73
+ }
74
+
75
+ default_config.rpcs.create_tag_binding.timeout = 60.0
76
+
77
+ default_config.rpcs.delete_tag_binding.timeout = 60.0
78
+
79
+ default_config
80
+ end
81
+ yield @configure if block_given?
82
+ @configure
83
+ end
84
+
85
+ ##
86
+ # Configure the TagBindings Client instance.
87
+ #
88
+ # The configuration is set to the derived mode, meaning that values can be changed,
89
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
90
+ # should be made on {Client.configure}.
91
+ #
92
+ # See {::Google::Cloud::ResourceManager::V3::TagBindings::Rest::Client::Configuration}
93
+ # for a description of the configuration fields.
94
+ #
95
+ # @yield [config] Configure the Client client.
96
+ # @yieldparam config [Client::Configuration]
97
+ #
98
+ # @return [Client::Configuration]
99
+ #
100
+ def configure
101
+ yield @config if block_given?
102
+ @config
103
+ end
104
+
105
+ ##
106
+ # Create a new TagBindings REST client object.
107
+ #
108
+ # @example
109
+ #
110
+ # # Create a client using the default configuration
111
+ # client = ::Google::Cloud::ResourceManager::V3::TagBindings::Rest::Client.new
112
+ #
113
+ # # Create a client using a custom configuration
114
+ # client = ::Google::Cloud::ResourceManager::V3::TagBindings::Rest::Client.new do |config|
115
+ # config.timeout = 10.0
116
+ # end
117
+ #
118
+ # @yield [config] Configure the TagBindings client.
119
+ # @yieldparam config [Client::Configuration]
120
+ #
121
+ def initialize
122
+ # Create the configuration object
123
+ @config = Configuration.new Client.configure
124
+
125
+ # Yield the configuration if needed
126
+ yield @config if block_given?
127
+
128
+ # Create credentials
129
+ credentials = @config.credentials
130
+ # Use self-signed JWT if the endpoint is unchanged from default,
131
+ # but only if the default endpoint does not have a region prefix.
132
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
133
+ !@config.endpoint.split(".").first.include?("-")
134
+ credentials ||= Credentials.default scope: @config.scope,
135
+ enable_self_signed_jwt: enable_self_signed_jwt
136
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
137
+ credentials = Credentials.new credentials, scope: @config.scope
138
+ end
139
+
140
+ @quota_project_id = @config.quota_project
141
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
142
+
143
+ @operations_client = ::Google::Cloud::ResourceManager::V3::TagBindings::Rest::Operations.new do |config|
144
+ config.credentials = credentials
145
+ config.quota_project = @quota_project_id
146
+ config.endpoint = @config.endpoint
147
+ end
148
+
149
+ @tag_bindings_stub = ::Google::Cloud::ResourceManager::V3::TagBindings::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
150
+ end
151
+
152
+ ##
153
+ # Get the associated client for long-running operations.
154
+ #
155
+ # @return [::Google::Cloud::ResourceManager::V3::TagBindings::Rest::Operations]
156
+ #
157
+ attr_reader :operations_client
158
+
159
+ # Service calls
160
+
161
+ ##
162
+ # Lists the TagBindings for the given cloud resource, as specified with
163
+ # `parent`.
164
+ #
165
+ # NOTE: The `parent` field is expected to be a full resource name:
166
+ # https://cloud.google.com/apis/design/resource_names#full_resource_name
167
+ #
168
+ # @overload list_tag_bindings(request, options = nil)
169
+ # Pass arguments to `list_tag_bindings` via a request object, either of type
170
+ # {::Google::Cloud::ResourceManager::V3::ListTagBindingsRequest} or an equivalent Hash.
171
+ #
172
+ # @param request [::Google::Cloud::ResourceManager::V3::ListTagBindingsRequest, ::Hash]
173
+ # A request object representing the call parameters. Required. To specify no
174
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
175
+ # @param options [::Gapic::CallOptions, ::Hash]
176
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
177
+ #
178
+ # @overload list_tag_bindings(parent: nil, page_size: nil, page_token: nil)
179
+ # Pass arguments to `list_tag_bindings` via keyword arguments. Note that at
180
+ # least one keyword argument is required. To specify no parameters, or to keep all
181
+ # the default parameter values, pass an empty Hash as a request object (see above).
182
+ #
183
+ # @param parent [::String]
184
+ # Required. The full resource name of a resource for which you want to list existing
185
+ # TagBindings.
186
+ # E.g. "//cloudresourcemanager.googleapis.com/projects/123"
187
+ # @param page_size [::Integer]
188
+ # Optional. The maximum number of TagBindings to return in the response. The server
189
+ # allows a maximum of 300 TagBindings to return. If unspecified, the server
190
+ # will use 100 as the default.
191
+ # @param page_token [::String]
192
+ # Optional. A pagination token returned from a previous call to `ListTagBindings`
193
+ # that indicates where this listing should continue from.
194
+ # @yield [result, operation] Access the result along with the TransportOperation object
195
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ResourceManager::V3::TagBinding>]
196
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
197
+ #
198
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ResourceManager::V3::TagBinding>]
199
+ #
200
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
201
+ def list_tag_bindings request, options = nil
202
+ raise ::ArgumentError, "request must be provided" if request.nil?
203
+
204
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ResourceManager::V3::ListTagBindingsRequest
205
+
206
+ # Converts hash and nil to an options object
207
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
208
+
209
+ # Customize the options with defaults
210
+ call_metadata = @config.rpcs.list_tag_bindings.metadata.to_h
211
+
212
+ # Set x-goog-api-client and x-goog-user-project headers
213
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
214
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
215
+ gapic_version: ::Google::Cloud::ResourceManager::V3::VERSION,
216
+ transports_version_send: [:rest]
217
+
218
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
219
+
220
+ options.apply_defaults timeout: @config.rpcs.list_tag_bindings.timeout,
221
+ metadata: call_metadata,
222
+ retry_policy: @config.rpcs.list_tag_bindings.retry_policy
223
+
224
+ options.apply_defaults timeout: @config.timeout,
225
+ metadata: @config.metadata,
226
+ retry_policy: @config.retry_policy
227
+
228
+ @tag_bindings_stub.list_tag_bindings request, options do |result, operation|
229
+ result = ::Gapic::Rest::PagedEnumerable.new @tag_bindings_stub, :list_tag_bindings, "tag_bindings", request, result, options
230
+ yield result, operation if block_given?
231
+ return result
232
+ end
233
+ rescue ::Gapic::Rest::Error => e
234
+ raise ::Google::Cloud::Error.from_error(e)
235
+ end
236
+
237
+ ##
238
+ # Creates a TagBinding between a TagValue and a cloud resource
239
+ # (currently project, folder, or organization).
240
+ #
241
+ # @overload create_tag_binding(request, options = nil)
242
+ # Pass arguments to `create_tag_binding` via a request object, either of type
243
+ # {::Google::Cloud::ResourceManager::V3::CreateTagBindingRequest} or an equivalent Hash.
244
+ #
245
+ # @param request [::Google::Cloud::ResourceManager::V3::CreateTagBindingRequest, ::Hash]
246
+ # A request object representing the call parameters. Required. To specify no
247
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
248
+ # @param options [::Gapic::CallOptions, ::Hash]
249
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
250
+ #
251
+ # @overload create_tag_binding(tag_binding: nil, validate_only: nil)
252
+ # Pass arguments to `create_tag_binding` via keyword arguments. Note that at
253
+ # least one keyword argument is required. To specify no parameters, or to keep all
254
+ # the default parameter values, pass an empty Hash as a request object (see above).
255
+ #
256
+ # @param tag_binding [::Google::Cloud::ResourceManager::V3::TagBinding, ::Hash]
257
+ # Required. The TagBinding to be created.
258
+ # @param validate_only [::Boolean]
259
+ # Optional. Set to true to perform the validations necessary for creating the resource,
260
+ # but not actually perform the action.
261
+ # @yield [result, operation] Access the result along with the TransportOperation object
262
+ # @yieldparam result [::Gapic::Operation]
263
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
264
+ #
265
+ # @return [::Gapic::Operation]
266
+ #
267
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
268
+ def create_tag_binding request, options = nil
269
+ raise ::ArgumentError, "request must be provided" if request.nil?
270
+
271
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ResourceManager::V3::CreateTagBindingRequest
272
+
273
+ # Converts hash and nil to an options object
274
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
275
+
276
+ # Customize the options with defaults
277
+ call_metadata = @config.rpcs.create_tag_binding.metadata.to_h
278
+
279
+ # Set x-goog-api-client and x-goog-user-project headers
280
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
281
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
282
+ gapic_version: ::Google::Cloud::ResourceManager::V3::VERSION,
283
+ transports_version_send: [:rest]
284
+
285
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
286
+
287
+ options.apply_defaults timeout: @config.rpcs.create_tag_binding.timeout,
288
+ metadata: call_metadata,
289
+ retry_policy: @config.rpcs.create_tag_binding.retry_policy
290
+
291
+ options.apply_defaults timeout: @config.timeout,
292
+ metadata: @config.metadata,
293
+ retry_policy: @config.retry_policy
294
+
295
+ @tag_bindings_stub.create_tag_binding request, options do |result, operation|
296
+ result = ::Gapic::Operation.new result, @operations_client, options: options
297
+ yield result, operation if block_given?
298
+ return result
299
+ end
300
+ rescue ::Gapic::Rest::Error => e
301
+ raise ::Google::Cloud::Error.from_error(e)
302
+ end
303
+
304
+ ##
305
+ # Deletes a TagBinding.
306
+ #
307
+ # @overload delete_tag_binding(request, options = nil)
308
+ # Pass arguments to `delete_tag_binding` via a request object, either of type
309
+ # {::Google::Cloud::ResourceManager::V3::DeleteTagBindingRequest} or an equivalent Hash.
310
+ #
311
+ # @param request [::Google::Cloud::ResourceManager::V3::DeleteTagBindingRequest, ::Hash]
312
+ # A request object representing the call parameters. Required. To specify no
313
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
314
+ # @param options [::Gapic::CallOptions, ::Hash]
315
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
316
+ #
317
+ # @overload delete_tag_binding(name: nil)
318
+ # Pass arguments to `delete_tag_binding` via keyword arguments. Note that at
319
+ # least one keyword argument is required. To specify no parameters, or to keep all
320
+ # the default parameter values, pass an empty Hash as a request object (see above).
321
+ #
322
+ # @param name [::String]
323
+ # Required. The name of the TagBinding. This is a String of the form:
324
+ # `tagBindings/{id}` (e.g.
325
+ # `tagBindings/%2F%2Fcloudresourcemanager.googleapis.com%2Fprojects%2F123/tagValues/456`).
326
+ # @yield [result, operation] Access the result along with the TransportOperation object
327
+ # @yieldparam result [::Gapic::Operation]
328
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
329
+ #
330
+ # @return [::Gapic::Operation]
331
+ #
332
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
333
+ def delete_tag_binding request, options = nil
334
+ raise ::ArgumentError, "request must be provided" if request.nil?
335
+
336
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ResourceManager::V3::DeleteTagBindingRequest
337
+
338
+ # Converts hash and nil to an options object
339
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
340
+
341
+ # Customize the options with defaults
342
+ call_metadata = @config.rpcs.delete_tag_binding.metadata.to_h
343
+
344
+ # Set x-goog-api-client and x-goog-user-project headers
345
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
346
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
347
+ gapic_version: ::Google::Cloud::ResourceManager::V3::VERSION,
348
+ transports_version_send: [:rest]
349
+
350
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
351
+
352
+ options.apply_defaults timeout: @config.rpcs.delete_tag_binding.timeout,
353
+ metadata: call_metadata,
354
+ retry_policy: @config.rpcs.delete_tag_binding.retry_policy
355
+
356
+ options.apply_defaults timeout: @config.timeout,
357
+ metadata: @config.metadata,
358
+ retry_policy: @config.retry_policy
359
+
360
+ @tag_bindings_stub.delete_tag_binding request, options do |result, operation|
361
+ result = ::Gapic::Operation.new result, @operations_client, options: options
362
+ yield result, operation if block_given?
363
+ return result
364
+ end
365
+ rescue ::Gapic::Rest::Error => e
366
+ raise ::Google::Cloud::Error.from_error(e)
367
+ end
368
+
369
+ ##
370
+ # Configuration class for the TagBindings REST API.
371
+ #
372
+ # This class represents the configuration for TagBindings REST,
373
+ # providing control over timeouts, retry behavior, logging, transport
374
+ # parameters, and other low-level controls. Certain parameters can also be
375
+ # applied individually to specific RPCs. See
376
+ # {::Google::Cloud::ResourceManager::V3::TagBindings::Rest::Client::Configuration::Rpcs}
377
+ # for a list of RPCs that can be configured independently.
378
+ #
379
+ # Configuration can be applied globally to all clients, or to a single client
380
+ # on construction.
381
+ #
382
+ # @example
383
+ #
384
+ # # Modify the global config, setting the timeout for
385
+ # # list_tag_bindings to 20 seconds,
386
+ # # and all remaining timeouts to 10 seconds.
387
+ # ::Google::Cloud::ResourceManager::V3::TagBindings::Rest::Client.configure do |config|
388
+ # config.timeout = 10.0
389
+ # config.rpcs.list_tag_bindings.timeout = 20.0
390
+ # end
391
+ #
392
+ # # Apply the above configuration only to a new client.
393
+ # client = ::Google::Cloud::ResourceManager::V3::TagBindings::Rest::Client.new do |config|
394
+ # config.timeout = 10.0
395
+ # config.rpcs.list_tag_bindings.timeout = 20.0
396
+ # end
397
+ #
398
+ # @!attribute [rw] endpoint
399
+ # The hostname or hostname:port of the service endpoint.
400
+ # Defaults to `"cloudresourcemanager.googleapis.com"`.
401
+ # @return [::String]
402
+ # @!attribute [rw] credentials
403
+ # Credentials to send with calls. You may provide any of the following types:
404
+ # * (`String`) The path to a service account key file in JSON format
405
+ # * (`Hash`) A service account key as a Hash
406
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
407
+ # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
408
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
409
+ # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
410
+ # * (`nil`) indicating no credentials
411
+ # @return [::Object]
412
+ # @!attribute [rw] scope
413
+ # The OAuth scopes
414
+ # @return [::Array<::String>]
415
+ # @!attribute [rw] lib_name
416
+ # The library name as recorded in instrumentation and logging
417
+ # @return [::String]
418
+ # @!attribute [rw] lib_version
419
+ # The library version as recorded in instrumentation and logging
420
+ # @return [::String]
421
+ # @!attribute [rw] timeout
422
+ # The call timeout in seconds.
423
+ # @return [::Numeric]
424
+ # @!attribute [rw] metadata
425
+ # Additional headers to be sent with the call.
426
+ # @return [::Hash{::Symbol=>::String}]
427
+ # @!attribute [rw] retry_policy
428
+ # The retry policy. The value is a hash with the following keys:
429
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
430
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
431
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
432
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
433
+ # trigger a retry.
434
+ # @return [::Hash]
435
+ # @!attribute [rw] quota_project
436
+ # A separate project against which to charge quota.
437
+ # @return [::String]
438
+ #
439
+ class Configuration
440
+ extend ::Gapic::Config
441
+
442
+ config_attr :endpoint, "cloudresourcemanager.googleapis.com", ::String
443
+ config_attr :credentials, nil do |value|
444
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
445
+ allowed.any? { |klass| klass === value }
446
+ end
447
+ config_attr :scope, nil, ::String, ::Array, nil
448
+ config_attr :lib_name, nil, ::String, nil
449
+ config_attr :lib_version, nil, ::String, nil
450
+ config_attr :timeout, nil, ::Numeric, nil
451
+ config_attr :metadata, nil, ::Hash, nil
452
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
453
+ config_attr :quota_project, nil, ::String, nil
454
+
455
+ # @private
456
+ def initialize parent_config = nil
457
+ @parent_config = parent_config unless parent_config.nil?
458
+
459
+ yield self if block_given?
460
+ end
461
+
462
+ ##
463
+ # Configurations for individual RPCs
464
+ # @return [Rpcs]
465
+ #
466
+ def rpcs
467
+ @rpcs ||= begin
468
+ parent_rpcs = nil
469
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
470
+ Rpcs.new parent_rpcs
471
+ end
472
+ end
473
+
474
+ ##
475
+ # Configuration RPC class for the TagBindings API.
476
+ #
477
+ # Includes fields providing the configuration for each RPC in this service.
478
+ # Each configuration object is of type `Gapic::Config::Method` and includes
479
+ # the following configuration fields:
480
+ #
481
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
482
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
483
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
484
+ # include the following keys:
485
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
486
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
487
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
488
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
489
+ # trigger a retry.
490
+ #
491
+ class Rpcs
492
+ ##
493
+ # RPC-specific configuration for `list_tag_bindings`
494
+ # @return [::Gapic::Config::Method]
495
+ #
496
+ attr_reader :list_tag_bindings
497
+ ##
498
+ # RPC-specific configuration for `create_tag_binding`
499
+ # @return [::Gapic::Config::Method]
500
+ #
501
+ attr_reader :create_tag_binding
502
+ ##
503
+ # RPC-specific configuration for `delete_tag_binding`
504
+ # @return [::Gapic::Config::Method]
505
+ #
506
+ attr_reader :delete_tag_binding
507
+
508
+ # @private
509
+ def initialize parent_rpcs = nil
510
+ list_tag_bindings_config = parent_rpcs.list_tag_bindings if parent_rpcs.respond_to? :list_tag_bindings
511
+ @list_tag_bindings = ::Gapic::Config::Method.new list_tag_bindings_config
512
+ create_tag_binding_config = parent_rpcs.create_tag_binding if parent_rpcs.respond_to? :create_tag_binding
513
+ @create_tag_binding = ::Gapic::Config::Method.new create_tag_binding_config
514
+ delete_tag_binding_config = parent_rpcs.delete_tag_binding if parent_rpcs.respond_to? :delete_tag_binding
515
+ @delete_tag_binding = ::Gapic::Config::Method.new delete_tag_binding_config
516
+
517
+ yield self if block_given?
518
+ end
519
+ end
520
+ end
521
+ end
522
+ end
523
+ end
524
+ end
525
+ end
526
+ end
527
+ end