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 TagBindings
25
+ # Path helper methods for the TagBindings API.
26
+ module Paths
27
+ ##
28
+ # Create a fully-qualified TagBinding resource string.
29
+ #
30
+ # The resource will be in the following format:
31
+ #
32
+ # `tagBindings/{tag_binding}`
33
+ #
34
+ # @param tag_binding [String]
35
+ #
36
+ # @return [::String]
37
+ def tag_binding_path tag_binding:
38
+ "tagBindings/#{tag_binding}"
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_keys/credentials"
26
+ require "google/cloud/resource_manager/v3/tag_keys/paths"
27
+ require "google/cloud/resource_manager/v3/tag_keys/operations"
28
+ require "google/cloud/resource_manager/v3/tag_keys/client"
29
+
30
+ module Google
31
+ module Cloud
32
+ module ResourceManager
33
+ module V3
34
+ ##
35
+ # Allow users to create and manage tag keys.
36
+ #
37
+ # To load this service and instantiate a client:
38
+ #
39
+ # require "google/cloud/resource_manager/v3/tag_keys"
40
+ # client = ::Google::Cloud::ResourceManager::V3::TagKeys::Client.new
41
+ #
42
+ module TagKeys
43
+ end
44
+ end
45
+ end
46
+ end
47
+ end
48
+
49
+ helper_path = ::File.join __dir__, "tag_keys", "helpers.rb"
50
+ require "google/cloud/resource_manager/v3/tag_keys/helpers" if ::File.file? helper_path
@@ -0,0 +1,987 @@
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_keys_pb"
21
+
22
+ module Google
23
+ module Cloud
24
+ module ResourceManager
25
+ module V3
26
+ module TagKeys
27
+ ##
28
+ # Client for the TagKeys service.
29
+ #
30
+ # Allow users to create and manage tag keys.
31
+ #
32
+ class Client
33
+ include Paths
34
+
35
+ # @private
36
+ attr_reader :tag_keys_stub
37
+
38
+ ##
39
+ # Configure the TagKeys Client class.
40
+ #
41
+ # See {::Google::Cloud::ResourceManager::V3::TagKeys::Client::Configuration}
42
+ # for a description of the configuration fields.
43
+ #
44
+ # @example
45
+ #
46
+ # # Modify the configuration for all TagKeys clients
47
+ # ::Google::Cloud::ResourceManager::V3::TagKeys::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_keys.timeout = 60.0
68
+ default_config.rpcs.list_tag_keys.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_key.timeout = 60.0
73
+ default_config.rpcs.get_tag_key.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_key.timeout = 60.0
78
+
79
+ default_config.rpcs.update_tag_key.timeout = 60.0
80
+
81
+ default_config.rpcs.delete_tag_key.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 TagKeys 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::TagKeys::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 TagKeys client object.
118
+ #
119
+ # @example
120
+ #
121
+ # # Create a client using the default configuration
122
+ # client = ::Google::Cloud::ResourceManager::V3::TagKeys::Client.new
123
+ #
124
+ # # Create a client using a custom configuration
125
+ # client = ::Google::Cloud::ResourceManager::V3::TagKeys::Client.new do |config|
126
+ # config.timeout = 10.0
127
+ # end
128
+ #
129
+ # @yield [config] Configure the TagKeys 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_keys_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_keys_stub = ::Gapic::ServiceStub.new(
165
+ ::Google::Cloud::ResourceManager::V3::TagKeys::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::TagKeys::Operations]
177
+ #
178
+ attr_reader :operations_client
179
+
180
+ # Service calls
181
+
182
+ ##
183
+ # Lists all TagKeys for a parent resource.
184
+ #
185
+ # @overload list_tag_keys(request, options = nil)
186
+ # Pass arguments to `list_tag_keys` via a request object, either of type
187
+ # {::Google::Cloud::ResourceManager::V3::ListTagKeysRequest} or an equivalent Hash.
188
+ #
189
+ # @param request [::Google::Cloud::ResourceManager::V3::ListTagKeysRequest, ::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_keys(parent: nil, page_size: nil, page_token: nil)
196
+ # Pass arguments to `list_tag_keys` 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. The resource name of the new TagKey's parent.
202
+ # Must be of the form `folders/{folder_id}` or `organizations/{org_id}`.
203
+ # @param page_size [::Integer]
204
+ # Optional. The maximum number of TagKeys to return in the response. The server allows
205
+ # a maximum of 300 TagKeys to return. If unspecified, the server will use 100
206
+ # as the default.
207
+ # @param page_token [::String]
208
+ # Optional. A pagination token returned from a previous call to `ListTagKey`
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::TagKey>]
213
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
214
+ #
215
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::ResourceManager::V3::TagKey>]
216
+ #
217
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
218
+ #
219
+ def list_tag_keys 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::ListTagKeysRequest
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_keys.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_keys.timeout,
237
+ metadata: metadata,
238
+ retry_policy: @config.rpcs.list_tag_keys.retry_policy
239
+
240
+ options.apply_defaults timeout: @config.timeout,
241
+ metadata: @config.metadata,
242
+ retry_policy: @config.retry_policy
243
+
244
+ @tag_keys_stub.call_rpc :list_tag_keys, request, options: options do |response, operation|
245
+ response = ::Gapic::PagedEnumerable.new @tag_keys_stub, :list_tag_keys, 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 a TagKey. This method will return `PERMISSION_DENIED` if the
255
+ # key does not exist or the user does not have permission to view it.
256
+ #
257
+ # @overload get_tag_key(request, options = nil)
258
+ # Pass arguments to `get_tag_key` via a request object, either of type
259
+ # {::Google::Cloud::ResourceManager::V3::GetTagKeyRequest} or an equivalent Hash.
260
+ #
261
+ # @param request [::Google::Cloud::ResourceManager::V3::GetTagKeyRequest, ::Hash]
262
+ # A request object representing the call parameters. Required. To specify no
263
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
264
+ # @param options [::Gapic::CallOptions, ::Hash]
265
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
266
+ #
267
+ # @overload get_tag_key(name: nil)
268
+ # Pass arguments to `get_tag_key` via keyword arguments. Note that at
269
+ # least one keyword argument is required. To specify no parameters, or to keep all
270
+ # the default parameter values, pass an empty Hash as a request object (see above).
271
+ #
272
+ # @param name [::String]
273
+ # Required. A resource name in the format `tagKeys/{id}`, such as
274
+ # `tagKeys/123`.
275
+ #
276
+ # @yield [response, operation] Access the result along with the RPC operation
277
+ # @yieldparam response [::Google::Cloud::ResourceManager::V3::TagKey]
278
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
279
+ #
280
+ # @return [::Google::Cloud::ResourceManager::V3::TagKey]
281
+ #
282
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
283
+ #
284
+ def get_tag_key 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::GetTagKeyRequest
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_key.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_key.timeout,
308
+ metadata: metadata,
309
+ retry_policy: @config.rpcs.get_tag_key.retry_policy
310
+
311
+ options.apply_defaults timeout: @config.timeout,
312
+ metadata: @config.metadata,
313
+ retry_policy: @config.retry_policy
314
+
315
+ @tag_keys_stub.call_rpc :get_tag_key, 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 new TagKey. If another request with the same parameters is
325
+ # sent while the original request is in process, the second request
326
+ # will receive an error. A maximum of 300 TagKeys can exist under a parent at
327
+ # any given time.
328
+ #
329
+ # @overload create_tag_key(request, options = nil)
330
+ # Pass arguments to `create_tag_key` via a request object, either of type
331
+ # {::Google::Cloud::ResourceManager::V3::CreateTagKeyRequest} or an equivalent Hash.
332
+ #
333
+ # @param request [::Google::Cloud::ResourceManager::V3::CreateTagKeyRequest, ::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_key(tag_key: nil, validate_only: nil)
340
+ # Pass arguments to `create_tag_key` 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_key [::Google::Cloud::ResourceManager::V3::TagKey, ::Hash]
345
+ # Required. The TagKey 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 to true to perform validations necessary for creating the resource, but
349
+ # 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_key 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::CreateTagKeyRequest
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_key.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_key.timeout,
377
+ metadata: metadata,
378
+ retry_policy: @config.rpcs.create_tag_key.retry_policy
379
+
380
+ options.apply_defaults timeout: @config.timeout,
381
+ metadata: @config.metadata,
382
+ retry_policy: @config.retry_policy
383
+
384
+ @tag_keys_stub.call_rpc :create_tag_key, 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 TagKey resource.
395
+ #
396
+ # @overload update_tag_key(request, options = nil)
397
+ # Pass arguments to `update_tag_key` via a request object, either of type
398
+ # {::Google::Cloud::ResourceManager::V3::UpdateTagKeyRequest} or an equivalent Hash.
399
+ #
400
+ # @param request [::Google::Cloud::ResourceManager::V3::UpdateTagKeyRequest, ::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_key(tag_key: nil, update_mask: nil, validate_only: nil)
407
+ # Pass arguments to `update_tag_key` 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_key [::Google::Cloud::ResourceManager::V3::TagKey, ::Hash]
412
+ # Required. The new definition of the TagKey. Only the `description` and `etag` fields
413
+ # can be updated by this request. If the `etag` field is not empty, it
414
+ # must match the `etag` field of the existing tag key. Otherwise,
415
+ # `FAILED_PRECONDITION` will be returned.
416
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
417
+ # Fields to be updated. The mask may only contain `description` or
418
+ # `etag`. If omitted entirely, both `description` and `etag` are assumed to
419
+ # be significant.
420
+ # @param validate_only [::Boolean]
421
+ # Set as true to perform validations necessary for updating the resource, but
422
+ # not actually perform the action.
423
+ #
424
+ # @yield [response, operation] Access the result along with the RPC operation
425
+ # @yieldparam response [::Gapic::Operation]
426
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
427
+ #
428
+ # @return [::Gapic::Operation]
429
+ #
430
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
431
+ #
432
+ def update_tag_key request, options = nil
433
+ raise ::ArgumentError, "request must be provided" if request.nil?
434
+
435
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ResourceManager::V3::UpdateTagKeyRequest
436
+
437
+ # Converts hash and nil to an options object
438
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
439
+
440
+ # Customize the options with defaults
441
+ metadata = @config.rpcs.update_tag_key.metadata.to_h
442
+
443
+ # Set x-goog-api-client and x-goog-user-project headers
444
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
445
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
446
+ gapic_version: ::Google::Cloud::ResourceManager::V3::VERSION
447
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
448
+
449
+ header_params = {
450
+ "tag_key.name" => request.tag_key.name
451
+ }
452
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
453
+ metadata[:"x-goog-request-params"] ||= request_params_header
454
+
455
+ options.apply_defaults timeout: @config.rpcs.update_tag_key.timeout,
456
+ metadata: metadata,
457
+ retry_policy: @config.rpcs.update_tag_key.retry_policy
458
+
459
+ options.apply_defaults timeout: @config.timeout,
460
+ metadata: @config.metadata,
461
+ retry_policy: @config.retry_policy
462
+
463
+ @tag_keys_stub.call_rpc :update_tag_key, request, options: options do |response, operation|
464
+ response = ::Gapic::Operation.new response, @operations_client, options: options
465
+ yield response, operation if block_given?
466
+ return response
467
+ end
468
+ rescue ::GRPC::BadStatus => e
469
+ raise ::Google::Cloud::Error.from_error(e)
470
+ end
471
+
472
+ ##
473
+ # Deletes a TagKey. The TagKey cannot be deleted if it has any child
474
+ # TagValues.
475
+ #
476
+ # @overload delete_tag_key(request, options = nil)
477
+ # Pass arguments to `delete_tag_key` via a request object, either of type
478
+ # {::Google::Cloud::ResourceManager::V3::DeleteTagKeyRequest} or an equivalent Hash.
479
+ #
480
+ # @param request [::Google::Cloud::ResourceManager::V3::DeleteTagKeyRequest, ::Hash]
481
+ # A request object representing the call parameters. Required. To specify no
482
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
483
+ # @param options [::Gapic::CallOptions, ::Hash]
484
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
485
+ #
486
+ # @overload delete_tag_key(name: nil, validate_only: nil, etag: nil)
487
+ # Pass arguments to `delete_tag_key` via keyword arguments. Note that at
488
+ # least one keyword argument is required. To specify no parameters, or to keep all
489
+ # the default parameter values, pass an empty Hash as a request object (see above).
490
+ #
491
+ # @param name [::String]
492
+ # Required. The resource name of a TagKey to be deleted in the format `tagKeys/123`.
493
+ # The TagKey cannot be a parent of any existing TagValues or it will not be
494
+ # deleted successfully.
495
+ # @param validate_only [::Boolean]
496
+ # Optional. Set as true to perform validations necessary for deletion, but not actually
497
+ # perform the action.
498
+ # @param etag [::String]
499
+ # Optional. The etag known to the client for the expected state of the TagKey. This is
500
+ # to be used for optimistic concurrency.
501
+ #
502
+ # @yield [response, operation] Access the result along with the RPC operation
503
+ # @yieldparam response [::Gapic::Operation]
504
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
505
+ #
506
+ # @return [::Gapic::Operation]
507
+ #
508
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
509
+ #
510
+ def delete_tag_key request, options = nil
511
+ raise ::ArgumentError, "request must be provided" if request.nil?
512
+
513
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ResourceManager::V3::DeleteTagKeyRequest
514
+
515
+ # Converts hash and nil to an options object
516
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
517
+
518
+ # Customize the options with defaults
519
+ metadata = @config.rpcs.delete_tag_key.metadata.to_h
520
+
521
+ # Set x-goog-api-client and x-goog-user-project headers
522
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
523
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
524
+ gapic_version: ::Google::Cloud::ResourceManager::V3::VERSION
525
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
526
+
527
+ header_params = {
528
+ "name" => request.name
529
+ }
530
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
531
+ metadata[:"x-goog-request-params"] ||= request_params_header
532
+
533
+ options.apply_defaults timeout: @config.rpcs.delete_tag_key.timeout,
534
+ metadata: metadata,
535
+ retry_policy: @config.rpcs.delete_tag_key.retry_policy
536
+
537
+ options.apply_defaults timeout: @config.timeout,
538
+ metadata: @config.metadata,
539
+ retry_policy: @config.retry_policy
540
+
541
+ @tag_keys_stub.call_rpc :delete_tag_key, request, options: options do |response, operation|
542
+ response = ::Gapic::Operation.new response, @operations_client, options: options
543
+ yield response, operation if block_given?
544
+ return response
545
+ end
546
+ rescue ::GRPC::BadStatus => e
547
+ raise ::Google::Cloud::Error.from_error(e)
548
+ end
549
+
550
+ ##
551
+ # Gets the access control policy for a TagKey. The returned policy may be
552
+ # empty if no such policy or resource exists. The `resource` field should
553
+ # be the TagKey's resource name. For example, "tagKeys/1234".
554
+ # The caller must have
555
+ # `cloudresourcemanager.googleapis.com/tagKeys.getIamPolicy` permission on
556
+ # the specified TagKey.
557
+ #
558
+ # @overload get_iam_policy(request, options = nil)
559
+ # Pass arguments to `get_iam_policy` via a request object, either of type
560
+ # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash.
561
+ #
562
+ # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash]
563
+ # A request object representing the call parameters. Required. To specify no
564
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
565
+ # @param options [::Gapic::CallOptions, ::Hash]
566
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
567
+ #
568
+ # @overload get_iam_policy(resource: nil, options: nil)
569
+ # Pass arguments to `get_iam_policy` via keyword arguments. Note that at
570
+ # least one keyword argument is required. To specify no parameters, or to keep all
571
+ # the default parameter values, pass an empty Hash as a request object (see above).
572
+ #
573
+ # @param resource [::String]
574
+ # REQUIRED: The resource for which the policy is being requested.
575
+ # See the operation documentation for the appropriate value for this field.
576
+ # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash]
577
+ # OPTIONAL: A `GetPolicyOptions` object for specifying options to
578
+ # `GetIamPolicy`. This field is only used by Cloud IAM.
579
+ #
580
+ # @yield [response, operation] Access the result along with the RPC operation
581
+ # @yieldparam response [::Google::Iam::V1::Policy]
582
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
583
+ #
584
+ # @return [::Google::Iam::V1::Policy]
585
+ #
586
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
587
+ #
588
+ def get_iam_policy request, options = nil
589
+ raise ::ArgumentError, "request must be provided" if request.nil?
590
+
591
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest
592
+
593
+ # Converts hash and nil to an options object
594
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
595
+
596
+ # Customize the options with defaults
597
+ metadata = @config.rpcs.get_iam_policy.metadata.to_h
598
+
599
+ # Set x-goog-api-client and x-goog-user-project headers
600
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
601
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
602
+ gapic_version: ::Google::Cloud::ResourceManager::V3::VERSION
603
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
604
+
605
+ header_params = {
606
+ "resource" => request.resource
607
+ }
608
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
609
+ metadata[:"x-goog-request-params"] ||= request_params_header
610
+
611
+ options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout,
612
+ metadata: metadata,
613
+ retry_policy: @config.rpcs.get_iam_policy.retry_policy
614
+
615
+ options.apply_defaults timeout: @config.timeout,
616
+ metadata: @config.metadata,
617
+ retry_policy: @config.retry_policy
618
+
619
+ @tag_keys_stub.call_rpc :get_iam_policy, request, options: options do |response, operation|
620
+ yield response, operation if block_given?
621
+ return response
622
+ end
623
+ rescue ::GRPC::BadStatus => e
624
+ raise ::Google::Cloud::Error.from_error(e)
625
+ end
626
+
627
+ ##
628
+ # Sets the access control policy on a TagKey, replacing any existing
629
+ # policy. The `resource` field should be the TagKey's resource name.
630
+ # For example, "tagKeys/1234".
631
+ # The caller must have `resourcemanager.tagKeys.setIamPolicy` permission
632
+ # on the identified tagValue.
633
+ #
634
+ # @overload set_iam_policy(request, options = nil)
635
+ # Pass arguments to `set_iam_policy` via a request object, either of type
636
+ # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash.
637
+ #
638
+ # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash]
639
+ # A request object representing the call parameters. Required. To specify no
640
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
641
+ # @param options [::Gapic::CallOptions, ::Hash]
642
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
643
+ #
644
+ # @overload set_iam_policy(resource: nil, policy: nil)
645
+ # Pass arguments to `set_iam_policy` via keyword arguments. Note that at
646
+ # least one keyword argument is required. To specify no parameters, or to keep all
647
+ # the default parameter values, pass an empty Hash as a request object (see above).
648
+ #
649
+ # @param resource [::String]
650
+ # REQUIRED: The resource for which the policy is being specified.
651
+ # See the operation documentation for the appropriate value for this field.
652
+ # @param policy [::Google::Iam::V1::Policy, ::Hash]
653
+ # REQUIRED: The complete policy to be applied to the `resource`. The size of
654
+ # the policy is limited to a few 10s of KB. An empty policy is a
655
+ # valid policy but certain Cloud Platform services (such as Projects)
656
+ # might reject them.
657
+ #
658
+ # @yield [response, operation] Access the result along with the RPC operation
659
+ # @yieldparam response [::Google::Iam::V1::Policy]
660
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
661
+ #
662
+ # @return [::Google::Iam::V1::Policy]
663
+ #
664
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
665
+ #
666
+ def set_iam_policy request, options = nil
667
+ raise ::ArgumentError, "request must be provided" if request.nil?
668
+
669
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest
670
+
671
+ # Converts hash and nil to an options object
672
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
673
+
674
+ # Customize the options with defaults
675
+ metadata = @config.rpcs.set_iam_policy.metadata.to_h
676
+
677
+ # Set x-goog-api-client and x-goog-user-project headers
678
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
679
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
680
+ gapic_version: ::Google::Cloud::ResourceManager::V3::VERSION
681
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
682
+
683
+ header_params = {
684
+ "resource" => request.resource
685
+ }
686
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
687
+ metadata[:"x-goog-request-params"] ||= request_params_header
688
+
689
+ options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout,
690
+ metadata: metadata,
691
+ retry_policy: @config.rpcs.set_iam_policy.retry_policy
692
+
693
+ options.apply_defaults timeout: @config.timeout,
694
+ metadata: @config.metadata,
695
+ retry_policy: @config.retry_policy
696
+
697
+ @tag_keys_stub.call_rpc :set_iam_policy, request, options: options do |response, operation|
698
+ yield response, operation if block_given?
699
+ return response
700
+ end
701
+ rescue ::GRPC::BadStatus => e
702
+ raise ::Google::Cloud::Error.from_error(e)
703
+ end
704
+
705
+ ##
706
+ # Returns permissions that a caller has on the specified TagKey.
707
+ # The `resource` field should be the TagKey's resource name.
708
+ # For example, "tagKeys/1234".
709
+ #
710
+ # There are no permissions required for making this API call.
711
+ #
712
+ # @overload test_iam_permissions(request, options = nil)
713
+ # Pass arguments to `test_iam_permissions` via a request object, either of type
714
+ # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash.
715
+ #
716
+ # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash]
717
+ # A request object representing the call parameters. Required. To specify no
718
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
719
+ # @param options [::Gapic::CallOptions, ::Hash]
720
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
721
+ #
722
+ # @overload test_iam_permissions(resource: nil, permissions: nil)
723
+ # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at
724
+ # least one keyword argument is required. To specify no parameters, or to keep all
725
+ # the default parameter values, pass an empty Hash as a request object (see above).
726
+ #
727
+ # @param resource [::String]
728
+ # REQUIRED: The resource for which the policy detail is being requested.
729
+ # See the operation documentation for the appropriate value for this field.
730
+ # @param permissions [::Array<::String>]
731
+ # The set of permissions to check for the `resource`. Permissions with
732
+ # wildcards (such as '*' or 'storage.*') are not allowed. For more
733
+ # information see
734
+ # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
735
+ #
736
+ # @yield [response, operation] Access the result along with the RPC operation
737
+ # @yieldparam response [::Google::Iam::V1::TestIamPermissionsResponse]
738
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
739
+ #
740
+ # @return [::Google::Iam::V1::TestIamPermissionsResponse]
741
+ #
742
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
743
+ #
744
+ def test_iam_permissions request, options = nil
745
+ raise ::ArgumentError, "request must be provided" if request.nil?
746
+
747
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest
748
+
749
+ # Converts hash and nil to an options object
750
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
751
+
752
+ # Customize the options with defaults
753
+ metadata = @config.rpcs.test_iam_permissions.metadata.to_h
754
+
755
+ # Set x-goog-api-client and x-goog-user-project headers
756
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
757
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
758
+ gapic_version: ::Google::Cloud::ResourceManager::V3::VERSION
759
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
760
+
761
+ header_params = {
762
+ "resource" => request.resource
763
+ }
764
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
765
+ metadata[:"x-goog-request-params"] ||= request_params_header
766
+
767
+ options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout,
768
+ metadata: metadata,
769
+ retry_policy: @config.rpcs.test_iam_permissions.retry_policy
770
+
771
+ options.apply_defaults timeout: @config.timeout,
772
+ metadata: @config.metadata,
773
+ retry_policy: @config.retry_policy
774
+
775
+ @tag_keys_stub.call_rpc :test_iam_permissions, request, options: options do |response, operation|
776
+ yield response, operation if block_given?
777
+ return response
778
+ end
779
+ rescue ::GRPC::BadStatus => e
780
+ raise ::Google::Cloud::Error.from_error(e)
781
+ end
782
+
783
+ ##
784
+ # Configuration class for the TagKeys API.
785
+ #
786
+ # This class represents the configuration for TagKeys,
787
+ # providing control over timeouts, retry behavior, logging, transport
788
+ # parameters, and other low-level controls. Certain parameters can also be
789
+ # applied individually to specific RPCs. See
790
+ # {::Google::Cloud::ResourceManager::V3::TagKeys::Client::Configuration::Rpcs}
791
+ # for a list of RPCs that can be configured independently.
792
+ #
793
+ # Configuration can be applied globally to all clients, or to a single client
794
+ # on construction.
795
+ #
796
+ # @example
797
+ #
798
+ # # Modify the global config, setting the timeout for
799
+ # # list_tag_keys to 20 seconds,
800
+ # # and all remaining timeouts to 10 seconds.
801
+ # ::Google::Cloud::ResourceManager::V3::TagKeys::Client.configure do |config|
802
+ # config.timeout = 10.0
803
+ # config.rpcs.list_tag_keys.timeout = 20.0
804
+ # end
805
+ #
806
+ # # Apply the above configuration only to a new client.
807
+ # client = ::Google::Cloud::ResourceManager::V3::TagKeys::Client.new do |config|
808
+ # config.timeout = 10.0
809
+ # config.rpcs.list_tag_keys.timeout = 20.0
810
+ # end
811
+ #
812
+ # @!attribute [rw] endpoint
813
+ # The hostname or hostname:port of the service endpoint.
814
+ # Defaults to `"cloudresourcemanager.googleapis.com"`.
815
+ # @return [::String]
816
+ # @!attribute [rw] credentials
817
+ # Credentials to send with calls. You may provide any of the following types:
818
+ # * (`String`) The path to a service account key file in JSON format
819
+ # * (`Hash`) A service account key as a Hash
820
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
821
+ # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
822
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
823
+ # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
824
+ # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
825
+ # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
826
+ # * (`nil`) indicating no credentials
827
+ # @return [::Object]
828
+ # @!attribute [rw] scope
829
+ # The OAuth scopes
830
+ # @return [::Array<::String>]
831
+ # @!attribute [rw] lib_name
832
+ # The library name as recorded in instrumentation and logging
833
+ # @return [::String]
834
+ # @!attribute [rw] lib_version
835
+ # The library version as recorded in instrumentation and logging
836
+ # @return [::String]
837
+ # @!attribute [rw] channel_args
838
+ # Extra parameters passed to the gRPC channel. Note: this is ignored if a
839
+ # `GRPC::Core::Channel` object is provided as the credential.
840
+ # @return [::Hash]
841
+ # @!attribute [rw] interceptors
842
+ # An array of interceptors that are run before calls are executed.
843
+ # @return [::Array<::GRPC::ClientInterceptor>]
844
+ # @!attribute [rw] timeout
845
+ # The call timeout in seconds.
846
+ # @return [::Numeric]
847
+ # @!attribute [rw] metadata
848
+ # Additional gRPC headers to be sent with the call.
849
+ # @return [::Hash{::Symbol=>::String}]
850
+ # @!attribute [rw] retry_policy
851
+ # The retry policy. The value is a hash with the following keys:
852
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
853
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
854
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
855
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
856
+ # trigger a retry.
857
+ # @return [::Hash]
858
+ # @!attribute [rw] quota_project
859
+ # A separate project against which to charge quota.
860
+ # @return [::String]
861
+ #
862
+ class Configuration
863
+ extend ::Gapic::Config
864
+
865
+ config_attr :endpoint, "cloudresourcemanager.googleapis.com", ::String
866
+ config_attr :credentials, nil do |value|
867
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
868
+ allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
869
+ allowed.any? { |klass| klass === value }
870
+ end
871
+ config_attr :scope, nil, ::String, ::Array, nil
872
+ config_attr :lib_name, nil, ::String, nil
873
+ config_attr :lib_version, nil, ::String, nil
874
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
875
+ config_attr :interceptors, nil, ::Array, nil
876
+ config_attr :timeout, nil, ::Numeric, nil
877
+ config_attr :metadata, nil, ::Hash, nil
878
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
879
+ config_attr :quota_project, nil, ::String, nil
880
+
881
+ # @private
882
+ def initialize parent_config = nil
883
+ @parent_config = parent_config unless parent_config.nil?
884
+
885
+ yield self if block_given?
886
+ end
887
+
888
+ ##
889
+ # Configurations for individual RPCs
890
+ # @return [Rpcs]
891
+ #
892
+ def rpcs
893
+ @rpcs ||= begin
894
+ parent_rpcs = nil
895
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
896
+ Rpcs.new parent_rpcs
897
+ end
898
+ end
899
+
900
+ ##
901
+ # Configuration RPC class for the TagKeys API.
902
+ #
903
+ # Includes fields providing the configuration for each RPC in this service.
904
+ # Each configuration object is of type `Gapic::Config::Method` and includes
905
+ # the following configuration fields:
906
+ #
907
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
908
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
909
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
910
+ # include the following keys:
911
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
912
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
913
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
914
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
915
+ # trigger a retry.
916
+ #
917
+ class Rpcs
918
+ ##
919
+ # RPC-specific configuration for `list_tag_keys`
920
+ # @return [::Gapic::Config::Method]
921
+ #
922
+ attr_reader :list_tag_keys
923
+ ##
924
+ # RPC-specific configuration for `get_tag_key`
925
+ # @return [::Gapic::Config::Method]
926
+ #
927
+ attr_reader :get_tag_key
928
+ ##
929
+ # RPC-specific configuration for `create_tag_key`
930
+ # @return [::Gapic::Config::Method]
931
+ #
932
+ attr_reader :create_tag_key
933
+ ##
934
+ # RPC-specific configuration for `update_tag_key`
935
+ # @return [::Gapic::Config::Method]
936
+ #
937
+ attr_reader :update_tag_key
938
+ ##
939
+ # RPC-specific configuration for `delete_tag_key`
940
+ # @return [::Gapic::Config::Method]
941
+ #
942
+ attr_reader :delete_tag_key
943
+ ##
944
+ # RPC-specific configuration for `get_iam_policy`
945
+ # @return [::Gapic::Config::Method]
946
+ #
947
+ attr_reader :get_iam_policy
948
+ ##
949
+ # RPC-specific configuration for `set_iam_policy`
950
+ # @return [::Gapic::Config::Method]
951
+ #
952
+ attr_reader :set_iam_policy
953
+ ##
954
+ # RPC-specific configuration for `test_iam_permissions`
955
+ # @return [::Gapic::Config::Method]
956
+ #
957
+ attr_reader :test_iam_permissions
958
+
959
+ # @private
960
+ def initialize parent_rpcs = nil
961
+ list_tag_keys_config = parent_rpcs.list_tag_keys if parent_rpcs.respond_to? :list_tag_keys
962
+ @list_tag_keys = ::Gapic::Config::Method.new list_tag_keys_config
963
+ get_tag_key_config = parent_rpcs.get_tag_key if parent_rpcs.respond_to? :get_tag_key
964
+ @get_tag_key = ::Gapic::Config::Method.new get_tag_key_config
965
+ create_tag_key_config = parent_rpcs.create_tag_key if parent_rpcs.respond_to? :create_tag_key
966
+ @create_tag_key = ::Gapic::Config::Method.new create_tag_key_config
967
+ update_tag_key_config = parent_rpcs.update_tag_key if parent_rpcs.respond_to? :update_tag_key
968
+ @update_tag_key = ::Gapic::Config::Method.new update_tag_key_config
969
+ delete_tag_key_config = parent_rpcs.delete_tag_key if parent_rpcs.respond_to? :delete_tag_key
970
+ @delete_tag_key = ::Gapic::Config::Method.new delete_tag_key_config
971
+ get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy
972
+ @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config
973
+ set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy
974
+ @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config
975
+ test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions
976
+ @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config
977
+
978
+ yield self if block_given?
979
+ end
980
+ end
981
+ end
982
+ end
983
+ end
984
+ end
985
+ end
986
+ end
987
+ end