google-cloud-resource_manager-v3 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (70) hide show
  1. checksums.yaml +7 -0
  2. data/.yardopts +12 -0
  3. data/AUTHENTICATION.md +169 -0
  4. data/LICENSE.md +201 -0
  5. data/README.md +139 -0
  6. data/lib/google-cloud-resource_manager-v3.rb +21 -0
  7. data/lib/google/cloud/resource_manager/v3.rb +43 -0
  8. data/lib/google/cloud/resource_manager/v3/folders.rb +52 -0
  9. data/lib/google/cloud/resource_manager/v3/folders/client.rb +1328 -0
  10. data/lib/google/cloud/resource_manager/v3/folders/credentials.rb +52 -0
  11. data/lib/google/cloud/resource_manager/v3/folders/operations.rb +664 -0
  12. data/lib/google/cloud/resource_manager/v3/folders/paths.rb +47 -0
  13. data/lib/google/cloud/resource_manager/v3/organizations.rb +49 -0
  14. data/lib/google/cloud/resource_manager/v3/organizations/client.rb +739 -0
  15. data/lib/google/cloud/resource_manager/v3/organizations/credentials.rb +52 -0
  16. data/lib/google/cloud/resource_manager/v3/organizations/paths.rb +47 -0
  17. data/lib/google/cloud/resource_manager/v3/projects.rb +50 -0
  18. data/lib/google/cloud/resource_manager/v3/projects/client.rb +1356 -0
  19. data/lib/google/cloud/resource_manager/v3/projects/credentials.rb +52 -0
  20. data/lib/google/cloud/resource_manager/v3/projects/operations.rb +664 -0
  21. data/lib/google/cloud/resource_manager/v3/projects/paths.rb +47 -0
  22. data/lib/google/cloud/resource_manager/v3/tag_bindings.rb +51 -0
  23. data/lib/google/cloud/resource_manager/v3/tag_bindings/client.rb +552 -0
  24. data/lib/google/cloud/resource_manager/v3/tag_bindings/credentials.rb +52 -0
  25. data/lib/google/cloud/resource_manager/v3/tag_bindings/operations.rb +664 -0
  26. data/lib/google/cloud/resource_manager/v3/tag_bindings/paths.rb +47 -0
  27. data/lib/google/cloud/resource_manager/v3/tag_keys.rb +50 -0
  28. data/lib/google/cloud/resource_manager/v3/tag_keys/client.rb +987 -0
  29. data/lib/google/cloud/resource_manager/v3/tag_keys/credentials.rb +52 -0
  30. data/lib/google/cloud/resource_manager/v3/tag_keys/operations.rb +664 -0
  31. data/lib/google/cloud/resource_manager/v3/tag_keys/paths.rb +47 -0
  32. data/lib/google/cloud/resource_manager/v3/tag_values.rb +50 -0
  33. data/lib/google/cloud/resource_manager/v3/tag_values/client.rb +983 -0
  34. data/lib/google/cloud/resource_manager/v3/tag_values/credentials.rb +52 -0
  35. data/lib/google/cloud/resource_manager/v3/tag_values/operations.rb +664 -0
  36. data/lib/google/cloud/resource_manager/v3/tag_values/paths.rb +47 -0
  37. data/lib/google/cloud/resource_manager/v3/version.rb +28 -0
  38. data/lib/google/cloud/resourcemanager/v3/folders_pb.rb +113 -0
  39. data/lib/google/cloud/resourcemanager/v3/folders_services_pb.rb +166 -0
  40. data/lib/google/cloud/resourcemanager/v3/organizations_pb.rb +66 -0
  41. data/lib/google/cloud/resourcemanager/v3/organizations_services_pb.rb +73 -0
  42. data/lib/google/cloud/resourcemanager/v3/projects_pb.rb +113 -0
  43. data/lib/google/cloud/resourcemanager/v3/projects_services_pb.rb +187 -0
  44. data/lib/google/cloud/resourcemanager/v3/tag_bindings_pb.rb +55 -0
  45. data/lib/google/cloud/resourcemanager/v3/tag_bindings_services_pb.rb +55 -0
  46. data/lib/google/cloud/resourcemanager/v3/tag_keys_pb.rb +79 -0
  47. data/lib/google/cloud/resourcemanager/v3/tag_keys_services_pb.rb +77 -0
  48. data/lib/google/cloud/resourcemanager/v3/tag_values_pb.rb +79 -0
  49. data/lib/google/cloud/resourcemanager/v3/tag_values_services_pb.rb +78 -0
  50. data/proto_docs/README.md +4 -0
  51. data/proto_docs/google/api/field_behavior.rb +71 -0
  52. data/proto_docs/google/api/resource.rb +283 -0
  53. data/proto_docs/google/cloud/resourcemanager/v3/folders.rb +307 -0
  54. data/proto_docs/google/cloud/resourcemanager/v3/organizations.rb +152 -0
  55. data/proto_docs/google/cloud/resourcemanager/v3/projects.rb +395 -0
  56. data/proto_docs/google/cloud/resourcemanager/v3/tag_bindings.rb +127 -0
  57. data/proto_docs/google/cloud/resourcemanager/v3/tag_keys.rb +181 -0
  58. data/proto_docs/google/cloud/resourcemanager/v3/tag_values.rb +179 -0
  59. data/proto_docs/google/iam/v1/iam_policy.rb +80 -0
  60. data/proto_docs/google/iam/v1/options.rb +40 -0
  61. data/proto_docs/google/iam/v1/policy.rb +248 -0
  62. data/proto_docs/google/longrunning/operations.rb +164 -0
  63. data/proto_docs/google/protobuf/any.rb +141 -0
  64. data/proto_docs/google/protobuf/duration.rb +98 -0
  65. data/proto_docs/google/protobuf/empty.rb +36 -0
  66. data/proto_docs/google/protobuf/field_mask.rb +229 -0
  67. data/proto_docs/google/protobuf/timestamp.rb +129 -0
  68. data/proto_docs/google/rpc/status.rb +46 -0
  69. data/proto_docs/google/type/expr.rb +75 -0
  70. metadata +283 -0
@@ -0,0 +1,47 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2021 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
+
20
+ module Google
21
+ module Cloud
22
+ module ResourceManager
23
+ module V3
24
+ module TagKeys
25
+ # Path helper methods for the TagKeys API.
26
+ module Paths
27
+ ##
28
+ # Create a fully-qualified TagKey resource string.
29
+ #
30
+ # The resource will be in the following format:
31
+ #
32
+ # `tagKeys/{tag_key}`
33
+ #
34
+ # @param tag_key [String]
35
+ #
36
+ # @return [::String]
37
+ def tag_key_path tag_key:
38
+ "tagKeys/#{tag_key}"
39
+ end
40
+
41
+ extend self
42
+ end
43
+ end
44
+ end
45
+ end
46
+ end
47
+ end
@@ -0,0 +1,50 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2021 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 "gapic/common"
20
+ require "gapic/config"
21
+ require "gapic/config/method"
22
+
23
+ require "google/cloud/resource_manager/v3/version"
24
+
25
+ require "google/cloud/resource_manager/v3/tag_values/credentials"
26
+ require "google/cloud/resource_manager/v3/tag_values/paths"
27
+ require "google/cloud/resource_manager/v3/tag_values/operations"
28
+ require "google/cloud/resource_manager/v3/tag_values/client"
29
+
30
+ module Google
31
+ module Cloud
32
+ module ResourceManager
33
+ module V3
34
+ ##
35
+ # Allow users to create and manage tag values.
36
+ #
37
+ # To load this service and instantiate a client:
38
+ #
39
+ # require "google/cloud/resource_manager/v3/tag_values"
40
+ # client = ::Google::Cloud::ResourceManager::V3::TagValues::Client.new
41
+ #
42
+ module TagValues
43
+ end
44
+ end
45
+ end
46
+ end
47
+ end
48
+
49
+ helper_path = ::File.join __dir__, "tag_values", "helpers.rb"
50
+ require "google/cloud/resource_manager/v3/tag_values/helpers" if ::File.file? helper_path
@@ -0,0 +1,983 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2021 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_values_pb"
21
+
22
+ module Google
23
+ module Cloud
24
+ module ResourceManager
25
+ module V3
26
+ module TagValues
27
+ ##
28
+ # Client for the TagValues service.
29
+ #
30
+ # Allow users to create and manage tag values.
31
+ #
32
+ class Client
33
+ include Paths
34
+
35
+ # @private
36
+ attr_reader :tag_values_stub
37
+
38
+ ##
39
+ # Configure the TagValues Client class.
40
+ #
41
+ # See {::Google::Cloud::ResourceManager::V3::TagValues::Client::Configuration}
42
+ # for a description of the configuration fields.
43
+ #
44
+ # @example
45
+ #
46
+ # # Modify the configuration for all TagValues clients
47
+ # ::Google::Cloud::ResourceManager::V3::TagValues::Client.configure do |config|
48
+ # config.timeout = 10.0
49
+ # end
50
+ #
51
+ # @yield [config] Configure the Client client.
52
+ # @yieldparam config [Client::Configuration]
53
+ #
54
+ # @return [Client::Configuration]
55
+ #
56
+ def self.configure
57
+ @configure ||= begin
58
+ namespace = ["Google", "Cloud", "ResourceManager", "V3"]
59
+ parent_config = while namespace.any?
60
+ parent_name = namespace.join "::"
61
+ parent_const = const_get parent_name
62
+ break parent_const.configure if parent_const.respond_to? :configure
63
+ namespace.pop
64
+ end
65
+ default_config = Client::Configuration.new parent_config
66
+
67
+ default_config.rpcs.list_tag_values.timeout = 60.0
68
+ default_config.rpcs.list_tag_values.retry_policy = {
69
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
70
+ }
71
+
72
+ default_config.rpcs.get_tag_value.timeout = 60.0
73
+ default_config.rpcs.get_tag_value.retry_policy = {
74
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
75
+ }
76
+
77
+ default_config.rpcs.create_tag_value.timeout = 60.0
78
+
79
+ default_config.rpcs.update_tag_value.timeout = 60.0
80
+
81
+ default_config.rpcs.delete_tag_value.timeout = 60.0
82
+
83
+ default_config.rpcs.get_iam_policy.timeout = 60.0
84
+ default_config.rpcs.get_iam_policy.retry_policy = {
85
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
86
+ }
87
+
88
+ default_config.rpcs.set_iam_policy.timeout = 60.0
89
+
90
+ default_config
91
+ end
92
+ yield @configure if block_given?
93
+ @configure
94
+ end
95
+
96
+ ##
97
+ # Configure the TagValues Client instance.
98
+ #
99
+ # The configuration is set to the derived mode, meaning that values can be changed,
100
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
101
+ # should be made on {Client.configure}.
102
+ #
103
+ # See {::Google::Cloud::ResourceManager::V3::TagValues::Client::Configuration}
104
+ # for a description of the configuration fields.
105
+ #
106
+ # @yield [config] Configure the Client client.
107
+ # @yieldparam config [Client::Configuration]
108
+ #
109
+ # @return [Client::Configuration]
110
+ #
111
+ def configure
112
+ yield @config if block_given?
113
+ @config
114
+ end
115
+
116
+ ##
117
+ # Create a new TagValues client object.
118
+ #
119
+ # @example
120
+ #
121
+ # # Create a client using the default configuration
122
+ # client = ::Google::Cloud::ResourceManager::V3::TagValues::Client.new
123
+ #
124
+ # # Create a client using a custom configuration
125
+ # client = ::Google::Cloud::ResourceManager::V3::TagValues::Client.new do |config|
126
+ # config.timeout = 10.0
127
+ # end
128
+ #
129
+ # @yield [config] Configure the TagValues client.
130
+ # @yieldparam config [Client::Configuration]
131
+ #
132
+ def initialize
133
+ # These require statements are intentionally placed here to initialize
134
+ # the gRPC module only when it's required.
135
+ # See https://github.com/googleapis/toolkit/issues/446
136
+ require "gapic/grpc"
137
+ require "google/cloud/resourcemanager/v3/tag_values_services_pb"
138
+
139
+ # Create the configuration object
140
+ @config = Configuration.new Client.configure
141
+
142
+ # Yield the configuration if needed
143
+ yield @config if block_given?
144
+
145
+ # Create credentials
146
+ credentials = @config.credentials
147
+ # Use self-signed JWT if the endpoint is unchanged from default,
148
+ # but only if the default endpoint does not have a region prefix.
149
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
150
+ !@config.endpoint.split(".").first.include?("-")
151
+ credentials ||= Credentials.default scope: @config.scope,
152
+ enable_self_signed_jwt: enable_self_signed_jwt
153
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
154
+ credentials = Credentials.new credentials, scope: @config.scope
155
+ end
156
+ @quota_project_id = @config.quota_project
157
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
158
+
159
+ @operations_client = Operations.new do |config|
160
+ config.credentials = credentials
161
+ config.endpoint = @config.endpoint
162
+ end
163
+
164
+ @tag_values_stub = ::Gapic::ServiceStub.new(
165
+ ::Google::Cloud::ResourceManager::V3::TagValues::Stub,
166
+ credentials: credentials,
167
+ endpoint: @config.endpoint,
168
+ channel_args: @config.channel_args,
169
+ interceptors: @config.interceptors
170
+ )
171
+ end
172
+
173
+ ##
174
+ # Get the associated client for long-running operations.
175
+ #
176
+ # @return [::Google::Cloud::ResourceManager::V3::TagValues::Operations]
177
+ #
178
+ attr_reader :operations_client
179
+
180
+ # Service calls
181
+
182
+ ##
183
+ # Lists all TagValues for a specific TagKey.
184
+ #
185
+ # @overload list_tag_values(request, options = nil)
186
+ # Pass arguments to `list_tag_values` via a request object, either of type
187
+ # {::Google::Cloud::ResourceManager::V3::ListTagValuesRequest} or an equivalent Hash.
188
+ #
189
+ # @param request [::Google::Cloud::ResourceManager::V3::ListTagValuesRequest, ::Hash]
190
+ # A request object representing the call parameters. Required. To specify no
191
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
192
+ # @param options [::Gapic::CallOptions, ::Hash]
193
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
194
+ #
195
+ # @overload list_tag_values(parent: nil, page_size: nil, page_token: nil)
196
+ # Pass arguments to `list_tag_values` via keyword arguments. Note that at
197
+ # least one keyword argument is required. To specify no parameters, or to keep all
198
+ # the default parameter values, pass an empty Hash as a request object (see above).
199
+ #
200
+ # @param parent [::String]
201
+ # Required. Resource name for TagKey, parent of the TagValues to be listed,
202
+ # in the format `tagKeys/123`.
203
+ # @param page_size [::Integer]
204
+ # Optional. The maximum number of TagValues to return in the response. The server
205
+ # allows a maximum of 300 TagValues to return. If unspecified, the server
206
+ # will use 100 as the default.
207
+ # @param page_token [::String]
208
+ # Optional. A pagination token returned from a previous call to `ListTagValues`
209
+ # that indicates where this listing should continue from.
210
+ #
211
+ # @yield [response, operation] Access the result along with the RPC operation
212
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ResourceManager::V3::TagValue>]
213
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
214
+ #
215
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::ResourceManager::V3::TagValue>]
216
+ #
217
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
218
+ #
219
+ def list_tag_values request, options = nil
220
+ raise ::ArgumentError, "request must be provided" if request.nil?
221
+
222
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ResourceManager::V3::ListTagValuesRequest
223
+
224
+ # Converts hash and nil to an options object
225
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
226
+
227
+ # Customize the options with defaults
228
+ metadata = @config.rpcs.list_tag_values.metadata.to_h
229
+
230
+ # Set x-goog-api-client and x-goog-user-project headers
231
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
232
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
233
+ gapic_version: ::Google::Cloud::ResourceManager::V3::VERSION
234
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
235
+
236
+ options.apply_defaults timeout: @config.rpcs.list_tag_values.timeout,
237
+ metadata: metadata,
238
+ retry_policy: @config.rpcs.list_tag_values.retry_policy
239
+
240
+ options.apply_defaults timeout: @config.timeout,
241
+ metadata: @config.metadata,
242
+ retry_policy: @config.retry_policy
243
+
244
+ @tag_values_stub.call_rpc :list_tag_values, request, options: options do |response, operation|
245
+ response = ::Gapic::PagedEnumerable.new @tag_values_stub, :list_tag_values, request, response, operation, options
246
+ yield response, operation if block_given?
247
+ return response
248
+ end
249
+ rescue ::GRPC::BadStatus => e
250
+ raise ::Google::Cloud::Error.from_error(e)
251
+ end
252
+
253
+ ##
254
+ # Retrieves TagValue. If the TagValue or namespaced name does not exist, or
255
+ # if the user does not have permission to view it, this method will return
256
+ # `PERMISSION_DENIED`.
257
+ #
258
+ # @overload get_tag_value(request, options = nil)
259
+ # Pass arguments to `get_tag_value` via a request object, either of type
260
+ # {::Google::Cloud::ResourceManager::V3::GetTagValueRequest} or an equivalent Hash.
261
+ #
262
+ # @param request [::Google::Cloud::ResourceManager::V3::GetTagValueRequest, ::Hash]
263
+ # A request object representing the call parameters. Required. To specify no
264
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
265
+ # @param options [::Gapic::CallOptions, ::Hash]
266
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
267
+ #
268
+ # @overload get_tag_value(name: nil)
269
+ # Pass arguments to `get_tag_value` via keyword arguments. Note that at
270
+ # least one keyword argument is required. To specify no parameters, or to keep all
271
+ # the default parameter values, pass an empty Hash as a request object (see above).
272
+ #
273
+ # @param name [::String]
274
+ # Required. Resource name for TagValue to be fetched in the format `tagValues/456`.
275
+ #
276
+ # @yield [response, operation] Access the result along with the RPC operation
277
+ # @yieldparam response [::Google::Cloud::ResourceManager::V3::TagValue]
278
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
279
+ #
280
+ # @return [::Google::Cloud::ResourceManager::V3::TagValue]
281
+ #
282
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
283
+ #
284
+ def get_tag_value request, options = nil
285
+ raise ::ArgumentError, "request must be provided" if request.nil?
286
+
287
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ResourceManager::V3::GetTagValueRequest
288
+
289
+ # Converts hash and nil to an options object
290
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
291
+
292
+ # Customize the options with defaults
293
+ metadata = @config.rpcs.get_tag_value.metadata.to_h
294
+
295
+ # Set x-goog-api-client and x-goog-user-project headers
296
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
297
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
298
+ gapic_version: ::Google::Cloud::ResourceManager::V3::VERSION
299
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
300
+
301
+ header_params = {
302
+ "name" => request.name
303
+ }
304
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
305
+ metadata[:"x-goog-request-params"] ||= request_params_header
306
+
307
+ options.apply_defaults timeout: @config.rpcs.get_tag_value.timeout,
308
+ metadata: metadata,
309
+ retry_policy: @config.rpcs.get_tag_value.retry_policy
310
+
311
+ options.apply_defaults timeout: @config.timeout,
312
+ metadata: @config.metadata,
313
+ retry_policy: @config.retry_policy
314
+
315
+ @tag_values_stub.call_rpc :get_tag_value, request, options: options do |response, operation|
316
+ yield response, operation if block_given?
317
+ return response
318
+ end
319
+ rescue ::GRPC::BadStatus => e
320
+ raise ::Google::Cloud::Error.from_error(e)
321
+ end
322
+
323
+ ##
324
+ # Creates a TagValue as a child of the specified TagKey. If a another
325
+ # request with the same parameters is sent while the original request is in
326
+ # process the second request will receive an error. A maximum of 300
327
+ # TagValues can exist under a TagKey at any given time.
328
+ #
329
+ # @overload create_tag_value(request, options = nil)
330
+ # Pass arguments to `create_tag_value` via a request object, either of type
331
+ # {::Google::Cloud::ResourceManager::V3::CreateTagValueRequest} or an equivalent Hash.
332
+ #
333
+ # @param request [::Google::Cloud::ResourceManager::V3::CreateTagValueRequest, ::Hash]
334
+ # A request object representing the call parameters. Required. To specify no
335
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
336
+ # @param options [::Gapic::CallOptions, ::Hash]
337
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
338
+ #
339
+ # @overload create_tag_value(tag_value: nil, validate_only: nil)
340
+ # Pass arguments to `create_tag_value` via keyword arguments. Note that at
341
+ # least one keyword argument is required. To specify no parameters, or to keep all
342
+ # the default parameter values, pass an empty Hash as a request object (see above).
343
+ #
344
+ # @param tag_value [::Google::Cloud::ResourceManager::V3::TagValue, ::Hash]
345
+ # Required. The TagValue to be created. Only fields `short_name`, `description`,
346
+ # and `parent` are considered during the creation request.
347
+ # @param validate_only [::Boolean]
348
+ # Optional. Set as true to perform the validations necessary for creating the resource,
349
+ # but not actually perform the action.
350
+ #
351
+ # @yield [response, operation] Access the result along with the RPC operation
352
+ # @yieldparam response [::Gapic::Operation]
353
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
354
+ #
355
+ # @return [::Gapic::Operation]
356
+ #
357
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
358
+ #
359
+ def create_tag_value request, options = nil
360
+ raise ::ArgumentError, "request must be provided" if request.nil?
361
+
362
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ResourceManager::V3::CreateTagValueRequest
363
+
364
+ # Converts hash and nil to an options object
365
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
366
+
367
+ # Customize the options with defaults
368
+ metadata = @config.rpcs.create_tag_value.metadata.to_h
369
+
370
+ # Set x-goog-api-client and x-goog-user-project headers
371
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
372
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
373
+ gapic_version: ::Google::Cloud::ResourceManager::V3::VERSION
374
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
375
+
376
+ options.apply_defaults timeout: @config.rpcs.create_tag_value.timeout,
377
+ metadata: metadata,
378
+ retry_policy: @config.rpcs.create_tag_value.retry_policy
379
+
380
+ options.apply_defaults timeout: @config.timeout,
381
+ metadata: @config.metadata,
382
+ retry_policy: @config.retry_policy
383
+
384
+ @tag_values_stub.call_rpc :create_tag_value, request, options: options do |response, operation|
385
+ response = ::Gapic::Operation.new response, @operations_client, options: options
386
+ yield response, operation if block_given?
387
+ return response
388
+ end
389
+ rescue ::GRPC::BadStatus => e
390
+ raise ::Google::Cloud::Error.from_error(e)
391
+ end
392
+
393
+ ##
394
+ # Updates the attributes of the TagValue resource.
395
+ #
396
+ # @overload update_tag_value(request, options = nil)
397
+ # Pass arguments to `update_tag_value` via a request object, either of type
398
+ # {::Google::Cloud::ResourceManager::V3::UpdateTagValueRequest} or an equivalent Hash.
399
+ #
400
+ # @param request [::Google::Cloud::ResourceManager::V3::UpdateTagValueRequest, ::Hash]
401
+ # A request object representing the call parameters. Required. To specify no
402
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
403
+ # @param options [::Gapic::CallOptions, ::Hash]
404
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
405
+ #
406
+ # @overload update_tag_value(tag_value: nil, update_mask: nil, validate_only: nil)
407
+ # Pass arguments to `update_tag_value` via keyword arguments. Note that at
408
+ # least one keyword argument is required. To specify no parameters, or to keep all
409
+ # the default parameter values, pass an empty Hash as a request object (see above).
410
+ #
411
+ # @param tag_value [::Google::Cloud::ResourceManager::V3::TagValue, ::Hash]
412
+ # Required. The new definition of the TagValue. Only fields `description` and `etag`
413
+ # fields can be updated by this request. If the `etag` field is nonempty, it
414
+ # must match the `etag` field of the existing ControlGroup. Otherwise,
415
+ # `FAILED_PRECONDITION` will be returned.
416
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
417
+ # Optional. Fields to be updated.
418
+ # @param validate_only [::Boolean]
419
+ # Optional. True to perform validations necessary for updating the resource, but not
420
+ # actually perform the action.
421
+ #
422
+ # @yield [response, operation] Access the result along with the RPC operation
423
+ # @yieldparam response [::Gapic::Operation]
424
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
425
+ #
426
+ # @return [::Gapic::Operation]
427
+ #
428
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
429
+ #
430
+ def update_tag_value request, options = nil
431
+ raise ::ArgumentError, "request must be provided" if request.nil?
432
+
433
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ResourceManager::V3::UpdateTagValueRequest
434
+
435
+ # Converts hash and nil to an options object
436
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
437
+
438
+ # Customize the options with defaults
439
+ metadata = @config.rpcs.update_tag_value.metadata.to_h
440
+
441
+ # Set x-goog-api-client and x-goog-user-project headers
442
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
443
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
444
+ gapic_version: ::Google::Cloud::ResourceManager::V3::VERSION
445
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
446
+
447
+ header_params = {
448
+ "tag_value.name" => request.tag_value.name
449
+ }
450
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
451
+ metadata[:"x-goog-request-params"] ||= request_params_header
452
+
453
+ options.apply_defaults timeout: @config.rpcs.update_tag_value.timeout,
454
+ metadata: metadata,
455
+ retry_policy: @config.rpcs.update_tag_value.retry_policy
456
+
457
+ options.apply_defaults timeout: @config.timeout,
458
+ metadata: @config.metadata,
459
+ retry_policy: @config.retry_policy
460
+
461
+ @tag_values_stub.call_rpc :update_tag_value, request, options: options do |response, operation|
462
+ response = ::Gapic::Operation.new response, @operations_client, options: options
463
+ yield response, operation if block_given?
464
+ return response
465
+ end
466
+ rescue ::GRPC::BadStatus => e
467
+ raise ::Google::Cloud::Error.from_error(e)
468
+ end
469
+
470
+ ##
471
+ # Deletes a TagValue. The TagValue cannot have any bindings when it is
472
+ # deleted.
473
+ #
474
+ # @overload delete_tag_value(request, options = nil)
475
+ # Pass arguments to `delete_tag_value` via a request object, either of type
476
+ # {::Google::Cloud::ResourceManager::V3::DeleteTagValueRequest} or an equivalent Hash.
477
+ #
478
+ # @param request [::Google::Cloud::ResourceManager::V3::DeleteTagValueRequest, ::Hash]
479
+ # A request object representing the call parameters. Required. To specify no
480
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
481
+ # @param options [::Gapic::CallOptions, ::Hash]
482
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
483
+ #
484
+ # @overload delete_tag_value(name: nil, validate_only: nil, etag: nil)
485
+ # Pass arguments to `delete_tag_value` via keyword arguments. Note that at
486
+ # least one keyword argument is required. To specify no parameters, or to keep all
487
+ # the default parameter values, pass an empty Hash as a request object (see above).
488
+ #
489
+ # @param name [::String]
490
+ # Required. Resource name for TagValue to be deleted in the format tagValues/456.
491
+ # @param validate_only [::Boolean]
492
+ # Optional. Set as true to perform the validations necessary for deletion, but not
493
+ # actually perform the action.
494
+ # @param etag [::String]
495
+ # Optional. The etag known to the client for the expected state of the TagValue. This
496
+ # is to be used for optimistic concurrency.
497
+ #
498
+ # @yield [response, operation] Access the result along with the RPC operation
499
+ # @yieldparam response [::Gapic::Operation]
500
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
501
+ #
502
+ # @return [::Gapic::Operation]
503
+ #
504
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
505
+ #
506
+ def delete_tag_value request, options = nil
507
+ raise ::ArgumentError, "request must be provided" if request.nil?
508
+
509
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ResourceManager::V3::DeleteTagValueRequest
510
+
511
+ # Converts hash and nil to an options object
512
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
513
+
514
+ # Customize the options with defaults
515
+ metadata = @config.rpcs.delete_tag_value.metadata.to_h
516
+
517
+ # Set x-goog-api-client and x-goog-user-project headers
518
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
519
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
520
+ gapic_version: ::Google::Cloud::ResourceManager::V3::VERSION
521
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
522
+
523
+ header_params = {
524
+ "name" => request.name
525
+ }
526
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
527
+ metadata[:"x-goog-request-params"] ||= request_params_header
528
+
529
+ options.apply_defaults timeout: @config.rpcs.delete_tag_value.timeout,
530
+ metadata: metadata,
531
+ retry_policy: @config.rpcs.delete_tag_value.retry_policy
532
+
533
+ options.apply_defaults timeout: @config.timeout,
534
+ metadata: @config.metadata,
535
+ retry_policy: @config.retry_policy
536
+
537
+ @tag_values_stub.call_rpc :delete_tag_value, request, options: options do |response, operation|
538
+ response = ::Gapic::Operation.new response, @operations_client, options: options
539
+ yield response, operation if block_given?
540
+ return response
541
+ end
542
+ rescue ::GRPC::BadStatus => e
543
+ raise ::Google::Cloud::Error.from_error(e)
544
+ end
545
+
546
+ ##
547
+ # Gets the access control policy for a TagValue. The returned policy may be
548
+ # empty if no such policy or resource exists. The `resource` field should
549
+ # be the TagValue's resource name. For example: `tagValues/1234`.
550
+ # The caller must have the
551
+ # `cloudresourcemanager.googleapis.com/tagValues.getIamPolicy` permission on
552
+ # the identified TagValue to get the access control policy.
553
+ #
554
+ # @overload get_iam_policy(request, options = nil)
555
+ # Pass arguments to `get_iam_policy` via a request object, either of type
556
+ # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash.
557
+ #
558
+ # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash]
559
+ # A request object representing the call parameters. Required. To specify no
560
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
561
+ # @param options [::Gapic::CallOptions, ::Hash]
562
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
563
+ #
564
+ # @overload get_iam_policy(resource: nil, options: nil)
565
+ # Pass arguments to `get_iam_policy` via keyword arguments. Note that at
566
+ # least one keyword argument is required. To specify no parameters, or to keep all
567
+ # the default parameter values, pass an empty Hash as a request object (see above).
568
+ #
569
+ # @param resource [::String]
570
+ # REQUIRED: The resource for which the policy is being requested.
571
+ # See the operation documentation for the appropriate value for this field.
572
+ # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash]
573
+ # OPTIONAL: A `GetPolicyOptions` object for specifying options to
574
+ # `GetIamPolicy`. This field is only used by Cloud IAM.
575
+ #
576
+ # @yield [response, operation] Access the result along with the RPC operation
577
+ # @yieldparam response [::Google::Iam::V1::Policy]
578
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
579
+ #
580
+ # @return [::Google::Iam::V1::Policy]
581
+ #
582
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
583
+ #
584
+ def get_iam_policy request, options = nil
585
+ raise ::ArgumentError, "request must be provided" if request.nil?
586
+
587
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest
588
+
589
+ # Converts hash and nil to an options object
590
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
591
+
592
+ # Customize the options with defaults
593
+ metadata = @config.rpcs.get_iam_policy.metadata.to_h
594
+
595
+ # Set x-goog-api-client and x-goog-user-project headers
596
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
597
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
598
+ gapic_version: ::Google::Cloud::ResourceManager::V3::VERSION
599
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
600
+
601
+ header_params = {
602
+ "resource" => request.resource
603
+ }
604
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
605
+ metadata[:"x-goog-request-params"] ||= request_params_header
606
+
607
+ options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout,
608
+ metadata: metadata,
609
+ retry_policy: @config.rpcs.get_iam_policy.retry_policy
610
+
611
+ options.apply_defaults timeout: @config.timeout,
612
+ metadata: @config.metadata,
613
+ retry_policy: @config.retry_policy
614
+
615
+ @tag_values_stub.call_rpc :get_iam_policy, request, options: options do |response, operation|
616
+ yield response, operation if block_given?
617
+ return response
618
+ end
619
+ rescue ::GRPC::BadStatus => e
620
+ raise ::Google::Cloud::Error.from_error(e)
621
+ end
622
+
623
+ ##
624
+ # Sets the access control policy on a TagValue, replacing any existing
625
+ # policy. The `resource` field should be the TagValue's resource name.
626
+ # For example: `tagValues/1234`.
627
+ # The caller must have `resourcemanager.tagValues.setIamPolicy` permission
628
+ # on the identified tagValue.
629
+ #
630
+ # @overload set_iam_policy(request, options = nil)
631
+ # Pass arguments to `set_iam_policy` via a request object, either of type
632
+ # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash.
633
+ #
634
+ # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash]
635
+ # A request object representing the call parameters. Required. To specify no
636
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
637
+ # @param options [::Gapic::CallOptions, ::Hash]
638
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
639
+ #
640
+ # @overload set_iam_policy(resource: nil, policy: nil)
641
+ # Pass arguments to `set_iam_policy` via keyword arguments. Note that at
642
+ # least one keyword argument is required. To specify no parameters, or to keep all
643
+ # the default parameter values, pass an empty Hash as a request object (see above).
644
+ #
645
+ # @param resource [::String]
646
+ # REQUIRED: The resource for which the policy is being specified.
647
+ # See the operation documentation for the appropriate value for this field.
648
+ # @param policy [::Google::Iam::V1::Policy, ::Hash]
649
+ # REQUIRED: The complete policy to be applied to the `resource`. The size of
650
+ # the policy is limited to a few 10s of KB. An empty policy is a
651
+ # valid policy but certain Cloud Platform services (such as Projects)
652
+ # might reject them.
653
+ #
654
+ # @yield [response, operation] Access the result along with the RPC operation
655
+ # @yieldparam response [::Google::Iam::V1::Policy]
656
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
657
+ #
658
+ # @return [::Google::Iam::V1::Policy]
659
+ #
660
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
661
+ #
662
+ def set_iam_policy request, options = nil
663
+ raise ::ArgumentError, "request must be provided" if request.nil?
664
+
665
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest
666
+
667
+ # Converts hash and nil to an options object
668
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
669
+
670
+ # Customize the options with defaults
671
+ metadata = @config.rpcs.set_iam_policy.metadata.to_h
672
+
673
+ # Set x-goog-api-client and x-goog-user-project headers
674
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
675
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
676
+ gapic_version: ::Google::Cloud::ResourceManager::V3::VERSION
677
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
678
+
679
+ header_params = {
680
+ "resource" => request.resource
681
+ }
682
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
683
+ metadata[:"x-goog-request-params"] ||= request_params_header
684
+
685
+ options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout,
686
+ metadata: metadata,
687
+ retry_policy: @config.rpcs.set_iam_policy.retry_policy
688
+
689
+ options.apply_defaults timeout: @config.timeout,
690
+ metadata: @config.metadata,
691
+ retry_policy: @config.retry_policy
692
+
693
+ @tag_values_stub.call_rpc :set_iam_policy, request, options: options do |response, operation|
694
+ yield response, operation if block_given?
695
+ return response
696
+ end
697
+ rescue ::GRPC::BadStatus => e
698
+ raise ::Google::Cloud::Error.from_error(e)
699
+ end
700
+
701
+ ##
702
+ # Returns permissions that a caller has on the specified TagValue.
703
+ # The `resource` field should be the TagValue's resource name. For example:
704
+ # `tagValues/1234`.
705
+ #
706
+ # There are no permissions required for making this API call.
707
+ #
708
+ # @overload test_iam_permissions(request, options = nil)
709
+ # Pass arguments to `test_iam_permissions` via a request object, either of type
710
+ # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash.
711
+ #
712
+ # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash]
713
+ # A request object representing the call parameters. Required. To specify no
714
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
715
+ # @param options [::Gapic::CallOptions, ::Hash]
716
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
717
+ #
718
+ # @overload test_iam_permissions(resource: nil, permissions: nil)
719
+ # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at
720
+ # least one keyword argument is required. To specify no parameters, or to keep all
721
+ # the default parameter values, pass an empty Hash as a request object (see above).
722
+ #
723
+ # @param resource [::String]
724
+ # REQUIRED: The resource for which the policy detail is being requested.
725
+ # See the operation documentation for the appropriate value for this field.
726
+ # @param permissions [::Array<::String>]
727
+ # The set of permissions to check for the `resource`. Permissions with
728
+ # wildcards (such as '*' or 'storage.*') are not allowed. For more
729
+ # information see
730
+ # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
731
+ #
732
+ # @yield [response, operation] Access the result along with the RPC operation
733
+ # @yieldparam response [::Google::Iam::V1::TestIamPermissionsResponse]
734
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
735
+ #
736
+ # @return [::Google::Iam::V1::TestIamPermissionsResponse]
737
+ #
738
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
739
+ #
740
+ def test_iam_permissions request, options = nil
741
+ raise ::ArgumentError, "request must be provided" if request.nil?
742
+
743
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest
744
+
745
+ # Converts hash and nil to an options object
746
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
747
+
748
+ # Customize the options with defaults
749
+ metadata = @config.rpcs.test_iam_permissions.metadata.to_h
750
+
751
+ # Set x-goog-api-client and x-goog-user-project headers
752
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
753
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
754
+ gapic_version: ::Google::Cloud::ResourceManager::V3::VERSION
755
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
756
+
757
+ header_params = {
758
+ "resource" => request.resource
759
+ }
760
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
761
+ metadata[:"x-goog-request-params"] ||= request_params_header
762
+
763
+ options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout,
764
+ metadata: metadata,
765
+ retry_policy: @config.rpcs.test_iam_permissions.retry_policy
766
+
767
+ options.apply_defaults timeout: @config.timeout,
768
+ metadata: @config.metadata,
769
+ retry_policy: @config.retry_policy
770
+
771
+ @tag_values_stub.call_rpc :test_iam_permissions, request, options: options do |response, operation|
772
+ yield response, operation if block_given?
773
+ return response
774
+ end
775
+ rescue ::GRPC::BadStatus => e
776
+ raise ::Google::Cloud::Error.from_error(e)
777
+ end
778
+
779
+ ##
780
+ # Configuration class for the TagValues API.
781
+ #
782
+ # This class represents the configuration for TagValues,
783
+ # providing control over timeouts, retry behavior, logging, transport
784
+ # parameters, and other low-level controls. Certain parameters can also be
785
+ # applied individually to specific RPCs. See
786
+ # {::Google::Cloud::ResourceManager::V3::TagValues::Client::Configuration::Rpcs}
787
+ # for a list of RPCs that can be configured independently.
788
+ #
789
+ # Configuration can be applied globally to all clients, or to a single client
790
+ # on construction.
791
+ #
792
+ # @example
793
+ #
794
+ # # Modify the global config, setting the timeout for
795
+ # # list_tag_values to 20 seconds,
796
+ # # and all remaining timeouts to 10 seconds.
797
+ # ::Google::Cloud::ResourceManager::V3::TagValues::Client.configure do |config|
798
+ # config.timeout = 10.0
799
+ # config.rpcs.list_tag_values.timeout = 20.0
800
+ # end
801
+ #
802
+ # # Apply the above configuration only to a new client.
803
+ # client = ::Google::Cloud::ResourceManager::V3::TagValues::Client.new do |config|
804
+ # config.timeout = 10.0
805
+ # config.rpcs.list_tag_values.timeout = 20.0
806
+ # end
807
+ #
808
+ # @!attribute [rw] endpoint
809
+ # The hostname or hostname:port of the service endpoint.
810
+ # Defaults to `"cloudresourcemanager.googleapis.com"`.
811
+ # @return [::String]
812
+ # @!attribute [rw] credentials
813
+ # Credentials to send with calls. You may provide any of the following types:
814
+ # * (`String`) The path to a service account key file in JSON format
815
+ # * (`Hash`) A service account key as a Hash
816
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
817
+ # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
818
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
819
+ # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
820
+ # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
821
+ # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
822
+ # * (`nil`) indicating no credentials
823
+ # @return [::Object]
824
+ # @!attribute [rw] scope
825
+ # The OAuth scopes
826
+ # @return [::Array<::String>]
827
+ # @!attribute [rw] lib_name
828
+ # The library name as recorded in instrumentation and logging
829
+ # @return [::String]
830
+ # @!attribute [rw] lib_version
831
+ # The library version as recorded in instrumentation and logging
832
+ # @return [::String]
833
+ # @!attribute [rw] channel_args
834
+ # Extra parameters passed to the gRPC channel. Note: this is ignored if a
835
+ # `GRPC::Core::Channel` object is provided as the credential.
836
+ # @return [::Hash]
837
+ # @!attribute [rw] interceptors
838
+ # An array of interceptors that are run before calls are executed.
839
+ # @return [::Array<::GRPC::ClientInterceptor>]
840
+ # @!attribute [rw] timeout
841
+ # The call timeout in seconds.
842
+ # @return [::Numeric]
843
+ # @!attribute [rw] metadata
844
+ # Additional gRPC headers to be sent with the call.
845
+ # @return [::Hash{::Symbol=>::String}]
846
+ # @!attribute [rw] retry_policy
847
+ # The retry policy. The value is a hash with the following keys:
848
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
849
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
850
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
851
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
852
+ # trigger a retry.
853
+ # @return [::Hash]
854
+ # @!attribute [rw] quota_project
855
+ # A separate project against which to charge quota.
856
+ # @return [::String]
857
+ #
858
+ class Configuration
859
+ extend ::Gapic::Config
860
+
861
+ config_attr :endpoint, "cloudresourcemanager.googleapis.com", ::String
862
+ config_attr :credentials, nil do |value|
863
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
864
+ allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
865
+ allowed.any? { |klass| klass === value }
866
+ end
867
+ config_attr :scope, nil, ::String, ::Array, nil
868
+ config_attr :lib_name, nil, ::String, nil
869
+ config_attr :lib_version, nil, ::String, nil
870
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
871
+ config_attr :interceptors, nil, ::Array, nil
872
+ config_attr :timeout, nil, ::Numeric, nil
873
+ config_attr :metadata, nil, ::Hash, nil
874
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
875
+ config_attr :quota_project, nil, ::String, nil
876
+
877
+ # @private
878
+ def initialize parent_config = nil
879
+ @parent_config = parent_config unless parent_config.nil?
880
+
881
+ yield self if block_given?
882
+ end
883
+
884
+ ##
885
+ # Configurations for individual RPCs
886
+ # @return [Rpcs]
887
+ #
888
+ def rpcs
889
+ @rpcs ||= begin
890
+ parent_rpcs = nil
891
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
892
+ Rpcs.new parent_rpcs
893
+ end
894
+ end
895
+
896
+ ##
897
+ # Configuration RPC class for the TagValues API.
898
+ #
899
+ # Includes fields providing the configuration for each RPC in this service.
900
+ # Each configuration object is of type `Gapic::Config::Method` and includes
901
+ # the following configuration fields:
902
+ #
903
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
904
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
905
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
906
+ # include the following keys:
907
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
908
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
909
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
910
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
911
+ # trigger a retry.
912
+ #
913
+ class Rpcs
914
+ ##
915
+ # RPC-specific configuration for `list_tag_values`
916
+ # @return [::Gapic::Config::Method]
917
+ #
918
+ attr_reader :list_tag_values
919
+ ##
920
+ # RPC-specific configuration for `get_tag_value`
921
+ # @return [::Gapic::Config::Method]
922
+ #
923
+ attr_reader :get_tag_value
924
+ ##
925
+ # RPC-specific configuration for `create_tag_value`
926
+ # @return [::Gapic::Config::Method]
927
+ #
928
+ attr_reader :create_tag_value
929
+ ##
930
+ # RPC-specific configuration for `update_tag_value`
931
+ # @return [::Gapic::Config::Method]
932
+ #
933
+ attr_reader :update_tag_value
934
+ ##
935
+ # RPC-specific configuration for `delete_tag_value`
936
+ # @return [::Gapic::Config::Method]
937
+ #
938
+ attr_reader :delete_tag_value
939
+ ##
940
+ # RPC-specific configuration for `get_iam_policy`
941
+ # @return [::Gapic::Config::Method]
942
+ #
943
+ attr_reader :get_iam_policy
944
+ ##
945
+ # RPC-specific configuration for `set_iam_policy`
946
+ # @return [::Gapic::Config::Method]
947
+ #
948
+ attr_reader :set_iam_policy
949
+ ##
950
+ # RPC-specific configuration for `test_iam_permissions`
951
+ # @return [::Gapic::Config::Method]
952
+ #
953
+ attr_reader :test_iam_permissions
954
+
955
+ # @private
956
+ def initialize parent_rpcs = nil
957
+ list_tag_values_config = parent_rpcs.list_tag_values if parent_rpcs.respond_to? :list_tag_values
958
+ @list_tag_values = ::Gapic::Config::Method.new list_tag_values_config
959
+ get_tag_value_config = parent_rpcs.get_tag_value if parent_rpcs.respond_to? :get_tag_value
960
+ @get_tag_value = ::Gapic::Config::Method.new get_tag_value_config
961
+ create_tag_value_config = parent_rpcs.create_tag_value if parent_rpcs.respond_to? :create_tag_value
962
+ @create_tag_value = ::Gapic::Config::Method.new create_tag_value_config
963
+ update_tag_value_config = parent_rpcs.update_tag_value if parent_rpcs.respond_to? :update_tag_value
964
+ @update_tag_value = ::Gapic::Config::Method.new update_tag_value_config
965
+ delete_tag_value_config = parent_rpcs.delete_tag_value if parent_rpcs.respond_to? :delete_tag_value
966
+ @delete_tag_value = ::Gapic::Config::Method.new delete_tag_value_config
967
+ get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy
968
+ @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config
969
+ set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy
970
+ @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config
971
+ test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions
972
+ @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config
973
+
974
+ yield self if block_given?
975
+ end
976
+ end
977
+ end
978
+ end
979
+ end
980
+ end
981
+ end
982
+ end
983
+ end