google-cloud-resource_manager-v3 0.4.0 → 0.5.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 (61) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/lib/google/cloud/resource_manager/v3/folders/client.rb +47 -35
  4. data/lib/google/cloud/resource_manager/v3/folders/operations.rb +2 -2
  5. data/lib/google/cloud/resource_manager/v3/folders/rest/client.rb +47 -35
  6. data/lib/google/cloud/resource_manager/v3/folders/rest/operations.rb +2 -2
  7. data/lib/google/cloud/resource_manager/v3/organizations/client.rb +12 -10
  8. data/lib/google/cloud/resource_manager/v3/organizations/rest/client.rb +12 -10
  9. data/lib/google/cloud/resource_manager/v3/projects/client.rb +44 -39
  10. data/lib/google/cloud/resource_manager/v3/projects/operations.rb +2 -2
  11. data/lib/google/cloud/resource_manager/v3/projects/rest/client.rb +44 -39
  12. data/lib/google/cloud/resource_manager/v3/projects/rest/operations.rb +2 -2
  13. data/lib/google/cloud/resource_manager/v3/rest.rb +1 -0
  14. data/lib/google/cloud/resource_manager/v3/tag_bindings/client.rb +115 -17
  15. data/lib/google/cloud/resource_manager/v3/tag_bindings/operations.rb +2 -2
  16. data/lib/google/cloud/resource_manager/v3/tag_bindings/rest/client.rb +96 -17
  17. data/lib/google/cloud/resource_manager/v3/tag_bindings/rest/operations.rb +2 -2
  18. data/lib/google/cloud/resource_manager/v3/tag_bindings/rest/service_stub.rb +57 -0
  19. data/lib/google/cloud/resource_manager/v3/tag_bindings/rest.rb +1 -1
  20. data/lib/google/cloud/resource_manager/v3/tag_bindings.rb +1 -1
  21. data/lib/google/cloud/resource_manager/v3/tag_holds/client.rb +640 -0
  22. data/lib/google/cloud/resource_manager/v3/tag_holds/credentials.rb +52 -0
  23. data/lib/google/cloud/resource_manager/v3/tag_holds/operations.rb +768 -0
  24. data/lib/google/cloud/resource_manager/v3/tag_holds/paths.rb +64 -0
  25. data/lib/google/cloud/resource_manager/v3/tag_holds/rest/client.rb +533 -0
  26. data/lib/google/cloud/resource_manager/v3/tag_holds/rest/operations.rb +793 -0
  27. data/lib/google/cloud/resource_manager/v3/tag_holds/rest/service_stub.rb +226 -0
  28. data/lib/google/cloud/resource_manager/v3/tag_holds/rest.rb +57 -0
  29. data/lib/google/cloud/resource_manager/v3/tag_holds.rb +60 -0
  30. data/lib/google/cloud/resource_manager/v3/tag_keys/client.rb +111 -22
  31. data/lib/google/cloud/resource_manager/v3/tag_keys/operations.rb +2 -2
  32. data/lib/google/cloud/resource_manager/v3/tag_keys/rest/client.rb +96 -22
  33. data/lib/google/cloud/resource_manager/v3/tag_keys/rest/operations.rb +2 -2
  34. data/lib/google/cloud/resource_manager/v3/tag_keys/rest/service_stub.rb +57 -0
  35. data/lib/google/cloud/resource_manager/v3/tag_values/client.rb +123 -29
  36. data/lib/google/cloud/resource_manager/v3/tag_values/operations.rb +2 -2
  37. data/lib/google/cloud/resource_manager/v3/tag_values/rest/client.rb +108 -29
  38. data/lib/google/cloud/resource_manager/v3/tag_values/rest/operations.rb +2 -2
  39. data/lib/google/cloud/resource_manager/v3/tag_values/rest/service_stub.rb +57 -0
  40. data/lib/google/cloud/resource_manager/v3/version.rb +1 -1
  41. data/lib/google/cloud/resource_manager/v3.rb +1 -0
  42. data/lib/google/cloud/resourcemanager/v3/folders_services_pb.rb +23 -17
  43. data/lib/google/cloud/resourcemanager/v3/projects_services_pb.rb +16 -13
  44. data/lib/google/cloud/resourcemanager/v3/tag_bindings_pb.rb +22 -0
  45. data/lib/google/cloud/resourcemanager/v3/tag_bindings_services_pb.rb +7 -5
  46. data/lib/google/cloud/resourcemanager/v3/tag_holds_pb.rb +63 -0
  47. data/lib/google/cloud/resourcemanager/v3/tag_holds_services_pb.rb +54 -0
  48. data/lib/google/cloud/resourcemanager/v3/tag_keys_pb.rb +11 -0
  49. data/lib/google/cloud/resourcemanager/v3/tag_keys_services_pb.rb +6 -2
  50. data/lib/google/cloud/resourcemanager/v3/tag_values_pb.rb +4 -0
  51. data/lib/google/cloud/resourcemanager/v3/tag_values_services_pb.rb +7 -4
  52. data/proto_docs/google/api/client.rb +57 -3
  53. data/proto_docs/google/cloud/resourcemanager/v3/folders.rb +25 -19
  54. data/proto_docs/google/cloud/resourcemanager/v3/organizations.rb +13 -11
  55. data/proto_docs/google/cloud/resourcemanager/v3/projects.rb +32 -30
  56. data/proto_docs/google/cloud/resourcemanager/v3/tag_bindings.rb +101 -15
  57. data/proto_docs/google/cloud/resourcemanager/v3/tag_holds.rb +161 -0
  58. data/proto_docs/google/cloud/resourcemanager/v3/tag_keys.rb +81 -23
  59. data/proto_docs/google/cloud/resourcemanager/v3/tag_values.rb +52 -29
  60. data/proto_docs/google/iam/v1/policy.rb +8 -4
  61. metadata +14 -2
@@ -193,9 +193,9 @@ module Google
193
193
  # Required. The resource name of the new TagKey's parent.
194
194
  # Must be of the form `folders/{folder_id}` or `organizations/{org_id}`.
195
195
  # @param page_size [::Integer]
196
- # Optional. The maximum number of TagKeys to return in the response. The server allows
197
- # a maximum of 300 TagKeys to return. If unspecified, the server will use 100
198
- # as the default.
196
+ # Optional. The maximum number of TagKeys to return in the response. The
197
+ # server allows a maximum of 300 TagKeys to return. If unspecified, the
198
+ # server will use 100 as the default.
199
199
  # @param page_token [::String]
200
200
  # Optional. A pagination token returned from a previous call to `ListTagKey`
201
201
  # that indicates where this listing should continue from.
@@ -306,11 +306,78 @@ module Google
306
306
  raise ::Google::Cloud::Error.from_error(e)
307
307
  end
308
308
 
309
+ ##
310
+ # Retrieves a TagKey by its namespaced name.
311
+ # This method will return `PERMISSION_DENIED` if the key does not exist
312
+ # or the user does not have permission to view it.
313
+ #
314
+ # @overload get_namespaced_tag_key(request, options = nil)
315
+ # Pass arguments to `get_namespaced_tag_key` via a request object, either of type
316
+ # {::Google::Cloud::ResourceManager::V3::GetNamespacedTagKeyRequest} or an equivalent Hash.
317
+ #
318
+ # @param request [::Google::Cloud::ResourceManager::V3::GetNamespacedTagKeyRequest, ::Hash]
319
+ # A request object representing the call parameters. Required. To specify no
320
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
321
+ # @param options [::Gapic::CallOptions, ::Hash]
322
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
323
+ #
324
+ # @overload get_namespaced_tag_key(name: nil)
325
+ # Pass arguments to `get_namespaced_tag_key` via keyword arguments. Note that at
326
+ # least one keyword argument is required. To specify no parameters, or to keep all
327
+ # the default parameter values, pass an empty Hash as a request object (see above).
328
+ #
329
+ # @param name [::String]
330
+ # Required. A namespaced tag key name in the format
331
+ # `{parentId}/{tagKeyShort}`, such as `42/foo` for a key with short name
332
+ # "foo" under the organization with ID 42 or `r2-d2/bar` for a key with short
333
+ # name "bar" under the project `r2-d2`.
334
+ # @yield [result, operation] Access the result along with the TransportOperation object
335
+ # @yieldparam result [::Google::Cloud::ResourceManager::V3::TagKey]
336
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
337
+ #
338
+ # @return [::Google::Cloud::ResourceManager::V3::TagKey]
339
+ #
340
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
341
+ def get_namespaced_tag_key request, options = nil
342
+ raise ::ArgumentError, "request must be provided" if request.nil?
343
+
344
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ResourceManager::V3::GetNamespacedTagKeyRequest
345
+
346
+ # Converts hash and nil to an options object
347
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
348
+
349
+ # Customize the options with defaults
350
+ call_metadata = @config.rpcs.get_namespaced_tag_key.metadata.to_h
351
+
352
+ # Set x-goog-api-client and x-goog-user-project headers
353
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
354
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
355
+ gapic_version: ::Google::Cloud::ResourceManager::V3::VERSION,
356
+ transports_version_send: [:rest]
357
+
358
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
359
+
360
+ options.apply_defaults timeout: @config.rpcs.get_namespaced_tag_key.timeout,
361
+ metadata: call_metadata,
362
+ retry_policy: @config.rpcs.get_namespaced_tag_key.retry_policy
363
+
364
+ options.apply_defaults timeout: @config.timeout,
365
+ metadata: @config.metadata,
366
+ retry_policy: @config.retry_policy
367
+
368
+ @tag_keys_stub.get_namespaced_tag_key request, options do |result, operation|
369
+ yield result, operation if block_given?
370
+ return result
371
+ end
372
+ rescue ::Gapic::Rest::Error => e
373
+ raise ::Google::Cloud::Error.from_error(e)
374
+ end
375
+
309
376
  ##
310
377
  # Creates a new TagKey. If another request with the same parameters is
311
378
  # sent while the original request is in process, the second request
312
- # will receive an error. A maximum of 300 TagKeys can exist under a parent at
313
- # any given time.
379
+ # will receive an error. A maximum of 1000 TagKeys can exist under a parent
380
+ # at any given time.
314
381
  #
315
382
  # @overload create_tag_key(request, options = nil)
316
383
  # Pass arguments to `create_tag_key` via a request object, either of type
@@ -328,11 +395,11 @@ module Google
328
395
  # the default parameter values, pass an empty Hash as a request object (see above).
329
396
  #
330
397
  # @param tag_key [::Google::Cloud::ResourceManager::V3::TagKey, ::Hash]
331
- # Required. The TagKey to be created. Only fields `short_name`, `description`,
332
- # and `parent` are considered during the creation request.
398
+ # Required. The TagKey to be created. Only fields `short_name`,
399
+ # `description`, and `parent` are considered during the creation request.
333
400
  # @param validate_only [::Boolean]
334
- # Optional. Set to true to perform validations necessary for creating the resource, but
335
- # not actually perform the action.
401
+ # Optional. Set to true to perform validations necessary for creating the
402
+ # resource, but not actually perform the action.
336
403
  # @yield [result, operation] Access the result along with the TransportOperation object
337
404
  # @yieldparam result [::Gapic::Operation]
338
405
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -395,10 +462,10 @@ module Google
395
462
  # the default parameter values, pass an empty Hash as a request object (see above).
396
463
  #
397
464
  # @param tag_key [::Google::Cloud::ResourceManager::V3::TagKey, ::Hash]
398
- # Required. The new definition of the TagKey. Only the `description` and `etag` fields
399
- # can be updated by this request. If the `etag` field is not empty, it
400
- # must match the `etag` field of the existing tag key. Otherwise,
401
- # `FAILED_PRECONDITION` will be returned.
465
+ # Required. The new definition of the TagKey. Only the `description` and
466
+ # `etag` fields can be updated by this request. If the `etag` field is not
467
+ # empty, it must match the `etag` field of the existing tag key. Otherwise,
468
+ # `ABORTED` will be returned.
402
469
  # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
403
470
  # Fields to be updated. The mask may only contain `description` or
404
471
  # `etag`. If omitted entirely, both `description` and `etag` are assumed to
@@ -469,15 +536,15 @@ module Google
469
536
  # the default parameter values, pass an empty Hash as a request object (see above).
470
537
  #
471
538
  # @param name [::String]
472
- # Required. The resource name of a TagKey to be deleted in the format `tagKeys/123`.
473
- # The TagKey cannot be a parent of any existing TagValues or it will not be
474
- # deleted successfully.
539
+ # Required. The resource name of a TagKey to be deleted in the format
540
+ # `tagKeys/123`. The TagKey cannot be a parent of any existing TagValues or
541
+ # it will not be deleted successfully.
475
542
  # @param validate_only [::Boolean]
476
- # Optional. Set as true to perform validations necessary for deletion, but not actually
477
- # perform the action.
543
+ # Optional. Set as true to perform validations necessary for deletion, but
544
+ # not actually perform the action.
478
545
  # @param etag [::String]
479
- # Optional. The etag known to the client for the expected state of the TagKey. This is
480
- # to be used for optimistic concurrency.
546
+ # Optional. The etag known to the client for the expected state of the
547
+ # TagKey. This is to be used for optimistic concurrency.
481
548
  # @yield [result, operation] Access the result along with the TransportOperation object
482
549
  # @yieldparam result [::Gapic::Operation]
483
550
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -780,9 +847,9 @@ module Google
780
847
  # * (`String`) The path to a service account key file in JSON format
781
848
  # * (`Hash`) A service account key as a Hash
782
849
  # * (`Google::Auth::Credentials`) A googleauth credentials object
783
- # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
850
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
784
851
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
785
- # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
852
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
786
853
  # * (`nil`) indicating no credentials
787
854
  # @return [::Object]
788
855
  # @!attribute [rw] scope
@@ -876,6 +943,11 @@ module Google
876
943
  #
877
944
  attr_reader :get_tag_key
878
945
  ##
946
+ # RPC-specific configuration for `get_namespaced_tag_key`
947
+ # @return [::Gapic::Config::Method]
948
+ #
949
+ attr_reader :get_namespaced_tag_key
950
+ ##
879
951
  # RPC-specific configuration for `create_tag_key`
880
952
  # @return [::Gapic::Config::Method]
881
953
  #
@@ -912,6 +984,8 @@ module Google
912
984
  @list_tag_keys = ::Gapic::Config::Method.new list_tag_keys_config
913
985
  get_tag_key_config = parent_rpcs.get_tag_key if parent_rpcs.respond_to? :get_tag_key
914
986
  @get_tag_key = ::Gapic::Config::Method.new get_tag_key_config
987
+ get_namespaced_tag_key_config = parent_rpcs.get_namespaced_tag_key if parent_rpcs.respond_to? :get_namespaced_tag_key
988
+ @get_namespaced_tag_key = ::Gapic::Config::Method.new get_namespaced_tag_key_config
915
989
  create_tag_key_config = parent_rpcs.create_tag_key if parent_rpcs.respond_to? :create_tag_key
916
990
  @create_tag_key = ::Gapic::Config::Method.new create_tag_key_config
917
991
  update_tag_key_config = parent_rpcs.update_tag_key if parent_rpcs.respond_to? :update_tag_key
@@ -411,9 +411,9 @@ module Google
411
411
  # * (`String`) The path to a service account key file in JSON format
412
412
  # * (`Hash`) A service account key as a Hash
413
413
  # * (`Google::Auth::Credentials`) A googleauth credentials object
414
- # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
414
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
415
415
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
416
- # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
416
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
417
417
  # * (`nil`) indicating no credentials
418
418
  # @return [::Object]
419
419
  # @!attribute [rw] scope
@@ -116,6 +116,44 @@ module Google
116
116
  result
117
117
  end
118
118
 
119
+ ##
120
+ # Baseline implementation for the get_namespaced_tag_key REST call
121
+ #
122
+ # @param request_pb [::Google::Cloud::ResourceManager::V3::GetNamespacedTagKeyRequest]
123
+ # A request object representing the call parameters. Required.
124
+ # @param options [::Gapic::CallOptions]
125
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
126
+ #
127
+ # @yield [result, operation] Access the result along with the TransportOperation object
128
+ # @yieldparam result [::Google::Cloud::ResourceManager::V3::TagKey]
129
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
130
+ #
131
+ # @return [::Google::Cloud::ResourceManager::V3::TagKey]
132
+ # A result object deserialized from the server's reply
133
+ def get_namespaced_tag_key request_pb, options = nil
134
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
135
+
136
+ verb, uri, query_string_params, body = ServiceStub.transcode_get_namespaced_tag_key_request request_pb
137
+ query_string_params = if query_string_params.any?
138
+ query_string_params.to_h { |p| p.split("=", 2) }
139
+ else
140
+ {}
141
+ end
142
+
143
+ response = @client_stub.make_http_request(
144
+ verb,
145
+ uri: uri,
146
+ body: body || "",
147
+ params: query_string_params,
148
+ options: options
149
+ )
150
+ operation = ::Gapic::Rest::TransportOperation.new response
151
+ result = ::Google::Cloud::ResourceManager::V3::TagKey.decode_json response.body, ignore_unknown_fields: true
152
+
153
+ yield result, operation if block_given?
154
+ result
155
+ end
156
+
119
157
  ##
120
158
  # Baseline implementation for the create_tag_key REST call
121
159
  #
@@ -384,6 +422,25 @@ module Google
384
422
  transcoder.transcode request_pb
385
423
  end
386
424
 
425
+ ##
426
+ # @private
427
+ #
428
+ # GRPC transcoding helper method for the get_namespaced_tag_key REST call
429
+ #
430
+ # @param request_pb [::Google::Cloud::ResourceManager::V3::GetNamespacedTagKeyRequest]
431
+ # A request object representing the call parameters. Required.
432
+ # @return [Array(String, [String, nil], Hash{String => String})]
433
+ # Uri, Body, Query string parameters
434
+ def self.transcode_get_namespaced_tag_key_request request_pb
435
+ transcoder = Gapic::Rest::GrpcTranscoder.new
436
+ .with_bindings(
437
+ uri_method: :get,
438
+ uri_template: "/v3/tagKeys/namespaced",
439
+ matches: []
440
+ )
441
+ transcoder.transcode request_pb
442
+ end
443
+
387
444
  ##
388
445
  # @private
389
446
  #
@@ -199,15 +199,14 @@ module Google
199
199
  # the default parameter values, pass an empty Hash as a request object (see above).
200
200
  #
201
201
  # @param parent [::String]
202
- # Required. Resource name for TagKey, parent of the TagValues to be listed,
203
- # in the format `tagKeys/123`.
202
+ # Required.
204
203
  # @param page_size [::Integer]
205
- # Optional. The maximum number of TagValues to return in the response. The server
206
- # allows a maximum of 300 TagValues to return. If unspecified, the server
207
- # will use 100 as the default.
204
+ # Optional. The maximum number of TagValues to return in the response. The
205
+ # server allows a maximum of 300 TagValues to return. If unspecified, the
206
+ # server will use 100 as the default.
208
207
  # @param page_token [::String]
209
- # Optional. A pagination token returned from a previous call to `ListTagValues`
210
- # that indicates where this listing should continue from.
208
+ # Optional. A pagination token returned from a previous call to
209
+ # `ListTagValues` that indicates where this listing should continue from.
211
210
  #
212
211
  # @yield [response, operation] Access the result along with the RPC operation
213
212
  # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ResourceManager::V3::TagValue>]
@@ -271,9 +270,8 @@ module Google
271
270
  end
272
271
 
273
272
  ##
274
- # Retrieves TagValue. If the TagValue or namespaced name does not exist, or
275
- # if the user does not have permission to view it, this method will return
276
- # `PERMISSION_DENIED`.
273
+ # Retrieves a TagValue. This method will return `PERMISSION_DENIED` if the
274
+ # value does not exist or the user does not have permission to view it.
277
275
  #
278
276
  # @overload get_tag_value(request, options = nil)
279
277
  # Pass arguments to `get_tag_value` via a request object, either of type
@@ -291,7 +289,8 @@ module Google
291
289
  # the default parameter values, pass an empty Hash as a request object (see above).
292
290
  #
293
291
  # @param name [::String]
294
- # Required. Resource name for TagValue to be fetched in the format `tagValues/456`.
292
+ # Required. Resource name for TagValue to be fetched in the format
293
+ # `tagValues/456`.
295
294
  #
296
295
  # @yield [response, operation] Access the result along with the RPC operation
297
296
  # @yieldparam response [::Google::Cloud::ResourceManager::V3::TagValue]
@@ -357,10 +356,97 @@ module Google
357
356
  raise ::Google::Cloud::Error.from_error(e)
358
357
  end
359
358
 
359
+ ##
360
+ # Retrieves a TagValue by its namespaced name.
361
+ # This method will return `PERMISSION_DENIED` if the value does not exist
362
+ # or the user does not have permission to view it.
363
+ #
364
+ # @overload get_namespaced_tag_value(request, options = nil)
365
+ # Pass arguments to `get_namespaced_tag_value` via a request object, either of type
366
+ # {::Google::Cloud::ResourceManager::V3::GetNamespacedTagValueRequest} or an equivalent Hash.
367
+ #
368
+ # @param request [::Google::Cloud::ResourceManager::V3::GetNamespacedTagValueRequest, ::Hash]
369
+ # A request object representing the call parameters. Required. To specify no
370
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
371
+ # @param options [::Gapic::CallOptions, ::Hash]
372
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
373
+ #
374
+ # @overload get_namespaced_tag_value(name: nil)
375
+ # Pass arguments to `get_namespaced_tag_value` via keyword arguments. Note that at
376
+ # least one keyword argument is required. To specify no parameters, or to keep all
377
+ # the default parameter values, pass an empty Hash as a request object (see above).
378
+ #
379
+ # @param name [::String]
380
+ # Required. A namespaced tag value name in the following format:
381
+ #
382
+ # `{parentId}/{tagKeyShort}/{tagValueShort}`
383
+ #
384
+ # Examples:
385
+ # - `42/foo/abc` for a value with short name "abc" under the key with short
386
+ # name "foo" under the organization with ID 42
387
+ # - `r2-d2/bar/xyz` for a value with short name "xyz" under the key with
388
+ # short name "bar" under the project with ID "r2-d2"
389
+ #
390
+ # @yield [response, operation] Access the result along with the RPC operation
391
+ # @yieldparam response [::Google::Cloud::ResourceManager::V3::TagValue]
392
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
393
+ #
394
+ # @return [::Google::Cloud::ResourceManager::V3::TagValue]
395
+ #
396
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
397
+ #
398
+ # @example Basic example
399
+ # require "google/cloud/resource_manager/v3"
400
+ #
401
+ # # Create a client object. The client can be reused for multiple calls.
402
+ # client = Google::Cloud::ResourceManager::V3::TagValues::Client.new
403
+ #
404
+ # # Create a request. To set request fields, pass in keyword arguments.
405
+ # request = Google::Cloud::ResourceManager::V3::GetNamespacedTagValueRequest.new
406
+ #
407
+ # # Call the get_namespaced_tag_value method.
408
+ # result = client.get_namespaced_tag_value request
409
+ #
410
+ # # The returned object is of type Google::Cloud::ResourceManager::V3::TagValue.
411
+ # p result
412
+ #
413
+ def get_namespaced_tag_value request, options = nil
414
+ raise ::ArgumentError, "request must be provided" if request.nil?
415
+
416
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ResourceManager::V3::GetNamespacedTagValueRequest
417
+
418
+ # Converts hash and nil to an options object
419
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
420
+
421
+ # Customize the options with defaults
422
+ metadata = @config.rpcs.get_namespaced_tag_value.metadata.to_h
423
+
424
+ # Set x-goog-api-client and x-goog-user-project headers
425
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
426
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
427
+ gapic_version: ::Google::Cloud::ResourceManager::V3::VERSION
428
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
429
+
430
+ options.apply_defaults timeout: @config.rpcs.get_namespaced_tag_value.timeout,
431
+ metadata: metadata,
432
+ retry_policy: @config.rpcs.get_namespaced_tag_value.retry_policy
433
+
434
+ options.apply_defaults timeout: @config.timeout,
435
+ metadata: @config.metadata,
436
+ retry_policy: @config.retry_policy
437
+
438
+ @tag_values_stub.call_rpc :get_namespaced_tag_value, request, options: options do |response, operation|
439
+ yield response, operation if block_given?
440
+ return response
441
+ end
442
+ rescue ::GRPC::BadStatus => e
443
+ raise ::Google::Cloud::Error.from_error(e)
444
+ end
445
+
360
446
  ##
361
447
  # Creates a TagValue as a child of the specified TagKey. If a another
362
448
  # request with the same parameters is sent while the original request is in
363
- # process the second request will receive an error. A maximum of 300
449
+ # process the second request will receive an error. A maximum of 1000
364
450
  # TagValues can exist under a TagKey at any given time.
365
451
  #
366
452
  # @overload create_tag_value(request, options = nil)
@@ -379,11 +465,11 @@ module Google
379
465
  # the default parameter values, pass an empty Hash as a request object (see above).
380
466
  #
381
467
  # @param tag_value [::Google::Cloud::ResourceManager::V3::TagValue, ::Hash]
382
- # Required. The TagValue to be created. Only fields `short_name`, `description`,
383
- # and `parent` are considered during the creation request.
468
+ # Required. The TagValue to be created. Only fields `short_name`,
469
+ # `description`, and `parent` are considered during the creation request.
384
470
  # @param validate_only [::Boolean]
385
- # Optional. Set as true to perform the validations necessary for creating the resource,
386
- # but not actually perform the action.
471
+ # Optional. Set as true to perform the validations necessary for creating the
472
+ # resource, but not actually perform the action.
387
473
  #
388
474
  # @yield [response, operation] Access the result along with the RPC operation
389
475
  # @yieldparam response [::Gapic::Operation]
@@ -468,15 +554,15 @@ module Google
468
554
  # the default parameter values, pass an empty Hash as a request object (see above).
469
555
  #
470
556
  # @param tag_value [::Google::Cloud::ResourceManager::V3::TagValue, ::Hash]
471
- # Required. The new definition of the TagValue. Only fields `description` and `etag`
472
- # fields can be updated by this request. If the `etag` field is nonempty, it
473
- # must match the `etag` field of the existing ControlGroup. Otherwise,
474
- # `FAILED_PRECONDITION` will be returned.
557
+ # Required. The new definition of the TagValue. Only fields `description` and
558
+ # `etag` fields can be updated by this request. If the `etag` field is
559
+ # nonempty, it must match the `etag` field of the existing ControlGroup.
560
+ # Otherwise, `ABORTED` will be returned.
475
561
  # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
476
562
  # Optional. Fields to be updated.
477
563
  # @param validate_only [::Boolean]
478
- # Optional. True to perform validations necessary for updating the resource, but not
479
- # actually perform the action.
564
+ # Optional. True to perform validations necessary for updating the resource,
565
+ # but not actually perform the action.
480
566
  #
481
567
  # @yield [response, operation] Access the result along with the RPC operation
482
568
  # @yieldparam response [::Gapic::Operation]
@@ -570,13 +656,14 @@ module Google
570
656
  # the default parameter values, pass an empty Hash as a request object (see above).
571
657
  #
572
658
  # @param name [::String]
573
- # Required. Resource name for TagValue to be deleted in the format tagValues/456.
659
+ # Required. Resource name for TagValue to be deleted in the format
660
+ # tagValues/456.
574
661
  # @param validate_only [::Boolean]
575
- # Optional. Set as true to perform the validations necessary for deletion, but not
576
- # actually perform the action.
662
+ # Optional. Set as true to perform the validations necessary for deletion,
663
+ # but not actually perform the action.
577
664
  # @param etag [::String]
578
- # Optional. The etag known to the client for the expected state of the TagValue. This
579
- # is to be used for optimistic concurrency.
665
+ # Optional. The etag known to the client for the expected state of the
666
+ # TagValue. This is to be used for optimistic concurrency.
580
667
  #
581
668
  # @yield [response, operation] Access the result along with the RPC operation
582
669
  # @yieldparam response [::Gapic::Operation]
@@ -978,9 +1065,9 @@ module Google
978
1065
  # * (`String`) The path to a service account key file in JSON format
979
1066
  # * (`Hash`) A service account key as a Hash
980
1067
  # * (`Google::Auth::Credentials`) A googleauth credentials object
981
- # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
1068
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
982
1069
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
983
- # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
1070
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
984
1071
  # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
985
1072
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
986
1073
  # * (`nil`) indicating no credentials
@@ -1086,6 +1173,11 @@ module Google
1086
1173
  #
1087
1174
  attr_reader :get_tag_value
1088
1175
  ##
1176
+ # RPC-specific configuration for `get_namespaced_tag_value`
1177
+ # @return [::Gapic::Config::Method]
1178
+ #
1179
+ attr_reader :get_namespaced_tag_value
1180
+ ##
1089
1181
  # RPC-specific configuration for `create_tag_value`
1090
1182
  # @return [::Gapic::Config::Method]
1091
1183
  #
@@ -1122,6 +1214,8 @@ module Google
1122
1214
  @list_tag_values = ::Gapic::Config::Method.new list_tag_values_config
1123
1215
  get_tag_value_config = parent_rpcs.get_tag_value if parent_rpcs.respond_to? :get_tag_value
1124
1216
  @get_tag_value = ::Gapic::Config::Method.new get_tag_value_config
1217
+ get_namespaced_tag_value_config = parent_rpcs.get_namespaced_tag_value if parent_rpcs.respond_to? :get_namespaced_tag_value
1218
+ @get_namespaced_tag_value = ::Gapic::Config::Method.new get_namespaced_tag_value_config
1125
1219
  create_tag_value_config = parent_rpcs.create_tag_value if parent_rpcs.respond_to? :create_tag_value
1126
1220
  @create_tag_value = ::Gapic::Config::Method.new create_tag_value_config
1127
1221
  update_tag_value_config = parent_rpcs.update_tag_value if parent_rpcs.respond_to? :update_tag_value
@@ -620,9 +620,9 @@ module Google
620
620
  # * (`String`) The path to a service account key file in JSON format
621
621
  # * (`Hash`) A service account key as a Hash
622
622
  # * (`Google::Auth::Credentials`) A googleauth credentials object
623
- # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
623
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
624
624
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
625
- # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
625
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
626
626
  # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
627
627
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
628
628
  # * (`nil`) indicating no credentials