google-cloud-data_catalog-v1beta1 0.a → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (65) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +12 -0
  3. data/AUTHENTICATION.md +149 -0
  4. data/README.md +144 -8
  5. data/lib/google/cloud/data_catalog/v1beta1/data_catalog/client.rb +3303 -0
  6. data/lib/google/cloud/data_catalog/v1beta1/data_catalog/credentials.rb +47 -0
  7. data/lib/google/cloud/data_catalog/v1beta1/data_catalog/paths.rb +176 -0
  8. data/lib/google/cloud/data_catalog/v1beta1/data_catalog/rest/client.rb +3093 -0
  9. data/lib/google/cloud/data_catalog/v1beta1/data_catalog/rest/service_stub.rb +1782 -0
  10. data/lib/google/cloud/data_catalog/v1beta1/data_catalog/rest.rb +53 -0
  11. data/lib/google/cloud/data_catalog/v1beta1/data_catalog.rb +56 -0
  12. data/lib/google/cloud/data_catalog/v1beta1/policy_tag_manager/client.rb +1590 -0
  13. data/lib/google/cloud/data_catalog/v1beta1/policy_tag_manager/credentials.rb +47 -0
  14. data/lib/google/cloud/data_catalog/v1beta1/policy_tag_manager/paths.rb +90 -0
  15. data/lib/google/cloud/data_catalog/v1beta1/policy_tag_manager/rest/client.rb +1470 -0
  16. data/lib/google/cloud/data_catalog/v1beta1/policy_tag_manager/rest/service_stub.rb +846 -0
  17. data/lib/google/cloud/data_catalog/v1beta1/policy_tag_manager/rest.rb +53 -0
  18. data/lib/google/cloud/data_catalog/v1beta1/policy_tag_manager.rb +56 -0
  19. data/lib/google/cloud/data_catalog/v1beta1/policy_tag_manager_serialization/client.rb +522 -0
  20. data/lib/google/cloud/data_catalog/v1beta1/policy_tag_manager_serialization/credentials.rb +47 -0
  21. data/lib/google/cloud/data_catalog/v1beta1/policy_tag_manager_serialization/paths.rb +69 -0
  22. data/lib/google/cloud/data_catalog/v1beta1/policy_tag_manager_serialization/rest/client.rb +479 -0
  23. data/lib/google/cloud/data_catalog/v1beta1/policy_tag_manager_serialization/rest/service_stub.rb +167 -0
  24. data/lib/google/cloud/data_catalog/v1beta1/policy_tag_manager_serialization/rest.rb +53 -0
  25. data/lib/google/cloud/data_catalog/v1beta1/policy_tag_manager_serialization.rb +56 -0
  26. data/lib/google/cloud/data_catalog/v1beta1/rest.rb +39 -0
  27. data/lib/google/cloud/data_catalog/v1beta1/version.rb +7 -2
  28. data/lib/google/cloud/data_catalog/v1beta1.rb +47 -0
  29. data/lib/google/cloud/datacatalog/v1beta1/common_pb.rb +43 -0
  30. data/lib/google/cloud/datacatalog/v1beta1/datacatalog_pb.rb +99 -0
  31. data/lib/google/cloud/datacatalog/v1beta1/datacatalog_services_pb.rb +229 -0
  32. data/lib/google/cloud/datacatalog/v1beta1/gcs_fileset_spec_pb.rb +47 -0
  33. data/lib/google/cloud/datacatalog/v1beta1/policytagmanager_pb.rb +70 -0
  34. data/lib/google/cloud/datacatalog/v1beta1/policytagmanager_services_pb.rb +73 -0
  35. data/lib/google/cloud/datacatalog/v1beta1/policytagmanagerserialization_pb.rb +55 -0
  36. data/lib/google/cloud/datacatalog/v1beta1/policytagmanagerserialization_services_pb.rb +55 -0
  37. data/lib/google/cloud/datacatalog/v1beta1/schema_pb.rb +45 -0
  38. data/lib/google/cloud/datacatalog/v1beta1/search_pb.rb +47 -0
  39. data/lib/google/cloud/datacatalog/v1beta1/table_spec_pb.rb +49 -0
  40. data/lib/google/cloud/datacatalog/v1beta1/tags_pb.rb +55 -0
  41. data/lib/google/cloud/datacatalog/v1beta1/timestamps_pb.rb +46 -0
  42. data/lib/google/cloud/datacatalog/v1beta1/usage_pb.rb +46 -0
  43. data/lib/google-cloud-data_catalog-v1beta1.rb +21 -0
  44. data/proto_docs/README.md +4 -0
  45. data/proto_docs/google/api/client.rb +381 -0
  46. data/proto_docs/google/api/field_behavior.rb +85 -0
  47. data/proto_docs/google/api/launch_stage.rb +71 -0
  48. data/proto_docs/google/api/resource.rb +222 -0
  49. data/proto_docs/google/cloud/datacatalog/v1beta1/common.rb +52 -0
  50. data/proto_docs/google/cloud/datacatalog/v1beta1/datacatalog.rb +830 -0
  51. data/proto_docs/google/cloud/datacatalog/v1beta1/gcs_fileset_spec.rb +81 -0
  52. data/proto_docs/google/cloud/datacatalog/v1beta1/policytagmanager.rb +300 -0
  53. data/proto_docs/google/cloud/datacatalog/v1beta1/policytagmanagerserialization.rb +131 -0
  54. data/proto_docs/google/cloud/datacatalog/v1beta1/schema.rb +61 -0
  55. data/proto_docs/google/cloud/datacatalog/v1beta1/search.rb +75 -0
  56. data/proto_docs/google/cloud/datacatalog/v1beta1/table_spec.rb +102 -0
  57. data/proto_docs/google/cloud/datacatalog/v1beta1/tags.rb +242 -0
  58. data/proto_docs/google/cloud/datacatalog/v1beta1/timestamps.rb +42 -0
  59. data/proto_docs/google/cloud/datacatalog/v1beta1/usage.rb +74 -0
  60. data/proto_docs/google/protobuf/duration.rb +98 -0
  61. data/proto_docs/google/protobuf/empty.rb +34 -0
  62. data/proto_docs/google/protobuf/field_mask.rb +229 -0
  63. data/proto_docs/google/protobuf/timestamp.rb +127 -0
  64. data/proto_docs/google/type/expr.rb +75 -0
  65. metadata +242 -13
@@ -0,0 +1,1470 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "google/cloud/errors"
20
+ require "google/cloud/datacatalog/v1beta1/policytagmanager_pb"
21
+ require "google/cloud/data_catalog/v1beta1/policy_tag_manager/rest/service_stub"
22
+ require "google/iam/v1/rest"
23
+
24
+ module Google
25
+ module Cloud
26
+ module DataCatalog
27
+ module V1beta1
28
+ module PolicyTagManager
29
+ module Rest
30
+ ##
31
+ # REST client for the PolicyTagManager service.
32
+ #
33
+ # The policy tag manager API service allows clients to manage their taxonomies
34
+ # and policy tags.
35
+ #
36
+ class Client
37
+ include Paths
38
+
39
+ # @private
40
+ attr_reader :policy_tag_manager_stub
41
+
42
+ ##
43
+ # Configure the PolicyTagManager Client class.
44
+ #
45
+ # See {::Google::Cloud::DataCatalog::V1beta1::PolicyTagManager::Rest::Client::Configuration}
46
+ # for a description of the configuration fields.
47
+ #
48
+ # @example
49
+ #
50
+ # # Modify the configuration for all PolicyTagManager clients
51
+ # ::Google::Cloud::DataCatalog::V1beta1::PolicyTagManager::Rest::Client.configure do |config|
52
+ # config.timeout = 10.0
53
+ # end
54
+ #
55
+ # @yield [config] Configure the Client client.
56
+ # @yieldparam config [Client::Configuration]
57
+ #
58
+ # @return [Client::Configuration]
59
+ #
60
+ def self.configure
61
+ @configure ||= begin
62
+ namespace = ["Google", "Cloud", "DataCatalog", "V1beta1"]
63
+ parent_config = while namespace.any?
64
+ parent_name = namespace.join "::"
65
+ parent_const = const_get parent_name
66
+ break parent_const.configure if parent_const.respond_to? :configure
67
+ namespace.pop
68
+ end
69
+ default_config = Client::Configuration.new parent_config
70
+
71
+ default_config.timeout = 60.0
72
+
73
+ default_config
74
+ end
75
+ yield @configure if block_given?
76
+ @configure
77
+ end
78
+
79
+ ##
80
+ # Configure the PolicyTagManager Client instance.
81
+ #
82
+ # The configuration is set to the derived mode, meaning that values can be changed,
83
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
84
+ # should be made on {Client.configure}.
85
+ #
86
+ # See {::Google::Cloud::DataCatalog::V1beta1::PolicyTagManager::Rest::Client::Configuration}
87
+ # for a description of the configuration fields.
88
+ #
89
+ # @yield [config] Configure the Client client.
90
+ # @yieldparam config [Client::Configuration]
91
+ #
92
+ # @return [Client::Configuration]
93
+ #
94
+ def configure
95
+ yield @config if block_given?
96
+ @config
97
+ end
98
+
99
+ ##
100
+ # Create a new PolicyTagManager REST client object.
101
+ #
102
+ # @example
103
+ #
104
+ # # Create a client using the default configuration
105
+ # client = ::Google::Cloud::DataCatalog::V1beta1::PolicyTagManager::Rest::Client.new
106
+ #
107
+ # # Create a client using a custom configuration
108
+ # client = ::Google::Cloud::DataCatalog::V1beta1::PolicyTagManager::Rest::Client.new do |config|
109
+ # config.timeout = 10.0
110
+ # end
111
+ #
112
+ # @yield [config] Configure the PolicyTagManager client.
113
+ # @yieldparam config [Client::Configuration]
114
+ #
115
+ def initialize
116
+ # Create the configuration object
117
+ @config = Configuration.new Client.configure
118
+
119
+ # Yield the configuration if needed
120
+ yield @config if block_given?
121
+
122
+ # Create credentials
123
+ credentials = @config.credentials
124
+ # Use self-signed JWT if the endpoint is unchanged from default,
125
+ # but only if the default endpoint does not have a region prefix.
126
+ enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
127
+ !@config.endpoint.split(".").first.include?("-")
128
+ credentials ||= Credentials.default scope: @config.scope,
129
+ enable_self_signed_jwt: enable_self_signed_jwt
130
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
131
+ credentials = Credentials.new credentials, scope: @config.scope
132
+ end
133
+
134
+ @quota_project_id = @config.quota_project
135
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
136
+
137
+ @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config|
138
+ config.credentials = credentials
139
+ config.quota_project = @quota_project_id
140
+ config.endpoint = @config.endpoint
141
+ end
142
+
143
+ @policy_tag_manager_stub = ::Google::Cloud::DataCatalog::V1beta1::PolicyTagManager::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
144
+ end
145
+
146
+ ##
147
+ # Get the associated client for mix-in of the IAMPolicy.
148
+ #
149
+ # @return [Google::Iam::V1::IAMPolicy::Rest::Client]
150
+ #
151
+ attr_reader :iam_policy_client
152
+
153
+ # Service calls
154
+
155
+ ##
156
+ # Creates a taxonomy in the specified project.
157
+ #
158
+ # @overload create_taxonomy(request, options = nil)
159
+ # Pass arguments to `create_taxonomy` via a request object, either of type
160
+ # {::Google::Cloud::DataCatalog::V1beta1::CreateTaxonomyRequest} or an equivalent Hash.
161
+ #
162
+ # @param request [::Google::Cloud::DataCatalog::V1beta1::CreateTaxonomyRequest, ::Hash]
163
+ # A request object representing the call parameters. Required. To specify no
164
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
165
+ # @param options [::Gapic::CallOptions, ::Hash]
166
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
167
+ #
168
+ # @overload create_taxonomy(parent: nil, taxonomy: nil)
169
+ # Pass arguments to `create_taxonomy` via keyword arguments. Note that at
170
+ # least one keyword argument is required. To specify no parameters, or to keep all
171
+ # the default parameter values, pass an empty Hash as a request object (see above).
172
+ #
173
+ # @param parent [::String]
174
+ # Required. Resource name of the project that the taxonomy will belong to.
175
+ # @param taxonomy [::Google::Cloud::DataCatalog::V1beta1::Taxonomy, ::Hash]
176
+ # The taxonomy to be created.
177
+ # @yield [result, operation] Access the result along with the TransportOperation object
178
+ # @yieldparam result [::Google::Cloud::DataCatalog::V1beta1::Taxonomy]
179
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
180
+ #
181
+ # @return [::Google::Cloud::DataCatalog::V1beta1::Taxonomy]
182
+ #
183
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
184
+ #
185
+ # @example Basic example
186
+ # require "google/cloud/data_catalog/v1beta1"
187
+ #
188
+ # # Create a client object. The client can be reused for multiple calls.
189
+ # client = Google::Cloud::DataCatalog::V1beta1::PolicyTagManager::Rest::Client.new
190
+ #
191
+ # # Create a request. To set request fields, pass in keyword arguments.
192
+ # request = Google::Cloud::DataCatalog::V1beta1::CreateTaxonomyRequest.new
193
+ #
194
+ # # Call the create_taxonomy method.
195
+ # result = client.create_taxonomy request
196
+ #
197
+ # # The returned object is of type Google::Cloud::DataCatalog::V1beta1::Taxonomy.
198
+ # p result
199
+ #
200
+ def create_taxonomy request, options = nil
201
+ raise ::ArgumentError, "request must be provided" if request.nil?
202
+
203
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataCatalog::V1beta1::CreateTaxonomyRequest
204
+
205
+ # Converts hash and nil to an options object
206
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
207
+
208
+ # Customize the options with defaults
209
+ call_metadata = @config.rpcs.create_taxonomy.metadata.to_h
210
+
211
+ # Set x-goog-api-client and x-goog-user-project headers
212
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
213
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
214
+ gapic_version: ::Google::Cloud::DataCatalog::V1beta1::VERSION,
215
+ transports_version_send: [:rest]
216
+
217
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
218
+
219
+ options.apply_defaults timeout: @config.rpcs.create_taxonomy.timeout,
220
+ metadata: call_metadata,
221
+ retry_policy: @config.rpcs.create_taxonomy.retry_policy
222
+
223
+ options.apply_defaults timeout: @config.timeout,
224
+ metadata: @config.metadata,
225
+ retry_policy: @config.retry_policy
226
+
227
+ @policy_tag_manager_stub.create_taxonomy request, options do |result, operation|
228
+ yield result, operation if block_given?
229
+ return result
230
+ end
231
+ rescue ::Gapic::Rest::Error => e
232
+ raise ::Google::Cloud::Error.from_error(e)
233
+ end
234
+
235
+ ##
236
+ # Deletes a taxonomy. This operation will also delete all
237
+ # policy tags in this taxonomy along with their associated policies.
238
+ #
239
+ # @overload delete_taxonomy(request, options = nil)
240
+ # Pass arguments to `delete_taxonomy` via a request object, either of type
241
+ # {::Google::Cloud::DataCatalog::V1beta1::DeleteTaxonomyRequest} or an equivalent Hash.
242
+ #
243
+ # @param request [::Google::Cloud::DataCatalog::V1beta1::DeleteTaxonomyRequest, ::Hash]
244
+ # A request object representing the call parameters. Required. To specify no
245
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
246
+ # @param options [::Gapic::CallOptions, ::Hash]
247
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
248
+ #
249
+ # @overload delete_taxonomy(name: nil)
250
+ # Pass arguments to `delete_taxonomy` via keyword arguments. Note that at
251
+ # least one keyword argument is required. To specify no parameters, or to keep all
252
+ # the default parameter values, pass an empty Hash as a request object (see above).
253
+ #
254
+ # @param name [::String]
255
+ # Required. Resource name of the taxonomy to be deleted. All policy tags in
256
+ # this taxonomy will also be deleted.
257
+ # @yield [result, operation] Access the result along with the TransportOperation object
258
+ # @yieldparam result [::Google::Protobuf::Empty]
259
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
260
+ #
261
+ # @return [::Google::Protobuf::Empty]
262
+ #
263
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
264
+ #
265
+ # @example Basic example
266
+ # require "google/cloud/data_catalog/v1beta1"
267
+ #
268
+ # # Create a client object. The client can be reused for multiple calls.
269
+ # client = Google::Cloud::DataCatalog::V1beta1::PolicyTagManager::Rest::Client.new
270
+ #
271
+ # # Create a request. To set request fields, pass in keyword arguments.
272
+ # request = Google::Cloud::DataCatalog::V1beta1::DeleteTaxonomyRequest.new
273
+ #
274
+ # # Call the delete_taxonomy method.
275
+ # result = client.delete_taxonomy request
276
+ #
277
+ # # The returned object is of type Google::Protobuf::Empty.
278
+ # p result
279
+ #
280
+ def delete_taxonomy request, options = nil
281
+ raise ::ArgumentError, "request must be provided" if request.nil?
282
+
283
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataCatalog::V1beta1::DeleteTaxonomyRequest
284
+
285
+ # Converts hash and nil to an options object
286
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
287
+
288
+ # Customize the options with defaults
289
+ call_metadata = @config.rpcs.delete_taxonomy.metadata.to_h
290
+
291
+ # Set x-goog-api-client and x-goog-user-project headers
292
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
293
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
294
+ gapic_version: ::Google::Cloud::DataCatalog::V1beta1::VERSION,
295
+ transports_version_send: [:rest]
296
+
297
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
298
+
299
+ options.apply_defaults timeout: @config.rpcs.delete_taxonomy.timeout,
300
+ metadata: call_metadata,
301
+ retry_policy: @config.rpcs.delete_taxonomy.retry_policy
302
+
303
+ options.apply_defaults timeout: @config.timeout,
304
+ metadata: @config.metadata,
305
+ retry_policy: @config.retry_policy
306
+
307
+ @policy_tag_manager_stub.delete_taxonomy request, options do |result, operation|
308
+ yield result, operation if block_given?
309
+ return result
310
+ end
311
+ rescue ::Gapic::Rest::Error => e
312
+ raise ::Google::Cloud::Error.from_error(e)
313
+ end
314
+
315
+ ##
316
+ # Updates a taxonomy.
317
+ #
318
+ # @overload update_taxonomy(request, options = nil)
319
+ # Pass arguments to `update_taxonomy` via a request object, either of type
320
+ # {::Google::Cloud::DataCatalog::V1beta1::UpdateTaxonomyRequest} or an equivalent Hash.
321
+ #
322
+ # @param request [::Google::Cloud::DataCatalog::V1beta1::UpdateTaxonomyRequest, ::Hash]
323
+ # A request object representing the call parameters. Required. To specify no
324
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
325
+ # @param options [::Gapic::CallOptions, ::Hash]
326
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
327
+ #
328
+ # @overload update_taxonomy(taxonomy: nil, update_mask: nil)
329
+ # Pass arguments to `update_taxonomy` via keyword arguments. Note that at
330
+ # least one keyword argument is required. To specify no parameters, or to keep all
331
+ # the default parameter values, pass an empty Hash as a request object (see above).
332
+ #
333
+ # @param taxonomy [::Google::Cloud::DataCatalog::V1beta1::Taxonomy, ::Hash]
334
+ # The taxonomy to update. Only description, display_name, and activated
335
+ # policy types can be updated.
336
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
337
+ # The update mask applies to the resource. For the `FieldMask` definition,
338
+ # see
339
+ # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
340
+ # If not set, defaults to all of the fields that are allowed to update.
341
+ # @yield [result, operation] Access the result along with the TransportOperation object
342
+ # @yieldparam result [::Google::Cloud::DataCatalog::V1beta1::Taxonomy]
343
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
344
+ #
345
+ # @return [::Google::Cloud::DataCatalog::V1beta1::Taxonomy]
346
+ #
347
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
348
+ #
349
+ # @example Basic example
350
+ # require "google/cloud/data_catalog/v1beta1"
351
+ #
352
+ # # Create a client object. The client can be reused for multiple calls.
353
+ # client = Google::Cloud::DataCatalog::V1beta1::PolicyTagManager::Rest::Client.new
354
+ #
355
+ # # Create a request. To set request fields, pass in keyword arguments.
356
+ # request = Google::Cloud::DataCatalog::V1beta1::UpdateTaxonomyRequest.new
357
+ #
358
+ # # Call the update_taxonomy method.
359
+ # result = client.update_taxonomy request
360
+ #
361
+ # # The returned object is of type Google::Cloud::DataCatalog::V1beta1::Taxonomy.
362
+ # p result
363
+ #
364
+ def update_taxonomy request, options = nil
365
+ raise ::ArgumentError, "request must be provided" if request.nil?
366
+
367
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataCatalog::V1beta1::UpdateTaxonomyRequest
368
+
369
+ # Converts hash and nil to an options object
370
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
371
+
372
+ # Customize the options with defaults
373
+ call_metadata = @config.rpcs.update_taxonomy.metadata.to_h
374
+
375
+ # Set x-goog-api-client and x-goog-user-project headers
376
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
377
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
378
+ gapic_version: ::Google::Cloud::DataCatalog::V1beta1::VERSION,
379
+ transports_version_send: [:rest]
380
+
381
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
382
+
383
+ options.apply_defaults timeout: @config.rpcs.update_taxonomy.timeout,
384
+ metadata: call_metadata,
385
+ retry_policy: @config.rpcs.update_taxonomy.retry_policy
386
+
387
+ options.apply_defaults timeout: @config.timeout,
388
+ metadata: @config.metadata,
389
+ retry_policy: @config.retry_policy
390
+
391
+ @policy_tag_manager_stub.update_taxonomy request, options do |result, operation|
392
+ yield result, operation if block_given?
393
+ return result
394
+ end
395
+ rescue ::Gapic::Rest::Error => e
396
+ raise ::Google::Cloud::Error.from_error(e)
397
+ end
398
+
399
+ ##
400
+ # Lists all taxonomies in a project in a particular location that the caller
401
+ # has permission to view.
402
+ #
403
+ # @overload list_taxonomies(request, options = nil)
404
+ # Pass arguments to `list_taxonomies` via a request object, either of type
405
+ # {::Google::Cloud::DataCatalog::V1beta1::ListTaxonomiesRequest} or an equivalent Hash.
406
+ #
407
+ # @param request [::Google::Cloud::DataCatalog::V1beta1::ListTaxonomiesRequest, ::Hash]
408
+ # A request object representing the call parameters. Required. To specify no
409
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
410
+ # @param options [::Gapic::CallOptions, ::Hash]
411
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
412
+ #
413
+ # @overload list_taxonomies(parent: nil, page_size: nil, page_token: nil, filter: nil)
414
+ # Pass arguments to `list_taxonomies` via keyword arguments. Note that at
415
+ # least one keyword argument is required. To specify no parameters, or to keep all
416
+ # the default parameter values, pass an empty Hash as a request object (see above).
417
+ #
418
+ # @param parent [::String]
419
+ # Required. Resource name of the project to list the taxonomies of.
420
+ # @param page_size [::Integer]
421
+ # The maximum number of items to return. Must be a value between 1 and 1000.
422
+ # If not set, defaults to 50.
423
+ # @param page_token [::String]
424
+ # The next_page_token value returned from a previous list request, if any. If
425
+ # not set, defaults to an empty string.
426
+ # @param filter [::String]
427
+ # Supported field for filter is 'service' and value is 'dataplex'.
428
+ # Eg: service=dataplex.
429
+ # @yield [result, operation] Access the result along with the TransportOperation object
430
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::DataCatalog::V1beta1::Taxonomy>]
431
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
432
+ #
433
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::DataCatalog::V1beta1::Taxonomy>]
434
+ #
435
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
436
+ #
437
+ # @example Basic example
438
+ # require "google/cloud/data_catalog/v1beta1"
439
+ #
440
+ # # Create a client object. The client can be reused for multiple calls.
441
+ # client = Google::Cloud::DataCatalog::V1beta1::PolicyTagManager::Rest::Client.new
442
+ #
443
+ # # Create a request. To set request fields, pass in keyword arguments.
444
+ # request = Google::Cloud::DataCatalog::V1beta1::ListTaxonomiesRequest.new
445
+ #
446
+ # # Call the list_taxonomies method.
447
+ # result = client.list_taxonomies request
448
+ #
449
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
450
+ # # over elements, and API calls will be issued to fetch pages as needed.
451
+ # result.each do |item|
452
+ # # Each element is of type ::Google::Cloud::DataCatalog::V1beta1::Taxonomy.
453
+ # p item
454
+ # end
455
+ #
456
+ def list_taxonomies request, options = nil
457
+ raise ::ArgumentError, "request must be provided" if request.nil?
458
+
459
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataCatalog::V1beta1::ListTaxonomiesRequest
460
+
461
+ # Converts hash and nil to an options object
462
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
463
+
464
+ # Customize the options with defaults
465
+ call_metadata = @config.rpcs.list_taxonomies.metadata.to_h
466
+
467
+ # Set x-goog-api-client and x-goog-user-project headers
468
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
469
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
470
+ gapic_version: ::Google::Cloud::DataCatalog::V1beta1::VERSION,
471
+ transports_version_send: [:rest]
472
+
473
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
474
+
475
+ options.apply_defaults timeout: @config.rpcs.list_taxonomies.timeout,
476
+ metadata: call_metadata,
477
+ retry_policy: @config.rpcs.list_taxonomies.retry_policy
478
+
479
+ options.apply_defaults timeout: @config.timeout,
480
+ metadata: @config.metadata,
481
+ retry_policy: @config.retry_policy
482
+
483
+ @policy_tag_manager_stub.list_taxonomies request, options do |result, operation|
484
+ result = ::Gapic::Rest::PagedEnumerable.new @policy_tag_manager_stub, :list_taxonomies, "taxonomies", request, result, options
485
+ yield result, operation if block_given?
486
+ return result
487
+ end
488
+ rescue ::Gapic::Rest::Error => e
489
+ raise ::Google::Cloud::Error.from_error(e)
490
+ end
491
+
492
+ ##
493
+ # Gets a taxonomy.
494
+ #
495
+ # @overload get_taxonomy(request, options = nil)
496
+ # Pass arguments to `get_taxonomy` via a request object, either of type
497
+ # {::Google::Cloud::DataCatalog::V1beta1::GetTaxonomyRequest} or an equivalent Hash.
498
+ #
499
+ # @param request [::Google::Cloud::DataCatalog::V1beta1::GetTaxonomyRequest, ::Hash]
500
+ # A request object representing the call parameters. Required. To specify no
501
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
502
+ # @param options [::Gapic::CallOptions, ::Hash]
503
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
504
+ #
505
+ # @overload get_taxonomy(name: nil)
506
+ # Pass arguments to `get_taxonomy` via keyword arguments. Note that at
507
+ # least one keyword argument is required. To specify no parameters, or to keep all
508
+ # the default parameter values, pass an empty Hash as a request object (see above).
509
+ #
510
+ # @param name [::String]
511
+ # Required. Resource name of the requested taxonomy.
512
+ # @yield [result, operation] Access the result along with the TransportOperation object
513
+ # @yieldparam result [::Google::Cloud::DataCatalog::V1beta1::Taxonomy]
514
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
515
+ #
516
+ # @return [::Google::Cloud::DataCatalog::V1beta1::Taxonomy]
517
+ #
518
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
519
+ #
520
+ # @example Basic example
521
+ # require "google/cloud/data_catalog/v1beta1"
522
+ #
523
+ # # Create a client object. The client can be reused for multiple calls.
524
+ # client = Google::Cloud::DataCatalog::V1beta1::PolicyTagManager::Rest::Client.new
525
+ #
526
+ # # Create a request. To set request fields, pass in keyword arguments.
527
+ # request = Google::Cloud::DataCatalog::V1beta1::GetTaxonomyRequest.new
528
+ #
529
+ # # Call the get_taxonomy method.
530
+ # result = client.get_taxonomy request
531
+ #
532
+ # # The returned object is of type Google::Cloud::DataCatalog::V1beta1::Taxonomy.
533
+ # p result
534
+ #
535
+ def get_taxonomy request, options = nil
536
+ raise ::ArgumentError, "request must be provided" if request.nil?
537
+
538
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataCatalog::V1beta1::GetTaxonomyRequest
539
+
540
+ # Converts hash and nil to an options object
541
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
542
+
543
+ # Customize the options with defaults
544
+ call_metadata = @config.rpcs.get_taxonomy.metadata.to_h
545
+
546
+ # Set x-goog-api-client and x-goog-user-project headers
547
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
548
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
549
+ gapic_version: ::Google::Cloud::DataCatalog::V1beta1::VERSION,
550
+ transports_version_send: [:rest]
551
+
552
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
553
+
554
+ options.apply_defaults timeout: @config.rpcs.get_taxonomy.timeout,
555
+ metadata: call_metadata,
556
+ retry_policy: @config.rpcs.get_taxonomy.retry_policy
557
+
558
+ options.apply_defaults timeout: @config.timeout,
559
+ metadata: @config.metadata,
560
+ retry_policy: @config.retry_policy
561
+
562
+ @policy_tag_manager_stub.get_taxonomy request, options do |result, operation|
563
+ yield result, operation if block_given?
564
+ return result
565
+ end
566
+ rescue ::Gapic::Rest::Error => e
567
+ raise ::Google::Cloud::Error.from_error(e)
568
+ end
569
+
570
+ ##
571
+ # Creates a policy tag in the specified taxonomy.
572
+ #
573
+ # @overload create_policy_tag(request, options = nil)
574
+ # Pass arguments to `create_policy_tag` via a request object, either of type
575
+ # {::Google::Cloud::DataCatalog::V1beta1::CreatePolicyTagRequest} or an equivalent Hash.
576
+ #
577
+ # @param request [::Google::Cloud::DataCatalog::V1beta1::CreatePolicyTagRequest, ::Hash]
578
+ # A request object representing the call parameters. Required. To specify no
579
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
580
+ # @param options [::Gapic::CallOptions, ::Hash]
581
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
582
+ #
583
+ # @overload create_policy_tag(parent: nil, policy_tag: nil)
584
+ # Pass arguments to `create_policy_tag` via keyword arguments. Note that at
585
+ # least one keyword argument is required. To specify no parameters, or to keep all
586
+ # the default parameter values, pass an empty Hash as a request object (see above).
587
+ #
588
+ # @param parent [::String]
589
+ # Required. Resource name of the taxonomy that the policy tag will belong to.
590
+ # @param policy_tag [::Google::Cloud::DataCatalog::V1beta1::PolicyTag, ::Hash]
591
+ # The policy tag to be created.
592
+ # @yield [result, operation] Access the result along with the TransportOperation object
593
+ # @yieldparam result [::Google::Cloud::DataCatalog::V1beta1::PolicyTag]
594
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
595
+ #
596
+ # @return [::Google::Cloud::DataCatalog::V1beta1::PolicyTag]
597
+ #
598
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
599
+ #
600
+ # @example Basic example
601
+ # require "google/cloud/data_catalog/v1beta1"
602
+ #
603
+ # # Create a client object. The client can be reused for multiple calls.
604
+ # client = Google::Cloud::DataCatalog::V1beta1::PolicyTagManager::Rest::Client.new
605
+ #
606
+ # # Create a request. To set request fields, pass in keyword arguments.
607
+ # request = Google::Cloud::DataCatalog::V1beta1::CreatePolicyTagRequest.new
608
+ #
609
+ # # Call the create_policy_tag method.
610
+ # result = client.create_policy_tag request
611
+ #
612
+ # # The returned object is of type Google::Cloud::DataCatalog::V1beta1::PolicyTag.
613
+ # p result
614
+ #
615
+ def create_policy_tag request, options = nil
616
+ raise ::ArgumentError, "request must be provided" if request.nil?
617
+
618
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataCatalog::V1beta1::CreatePolicyTagRequest
619
+
620
+ # Converts hash and nil to an options object
621
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
622
+
623
+ # Customize the options with defaults
624
+ call_metadata = @config.rpcs.create_policy_tag.metadata.to_h
625
+
626
+ # Set x-goog-api-client and x-goog-user-project headers
627
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
628
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
629
+ gapic_version: ::Google::Cloud::DataCatalog::V1beta1::VERSION,
630
+ transports_version_send: [:rest]
631
+
632
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
633
+
634
+ options.apply_defaults timeout: @config.rpcs.create_policy_tag.timeout,
635
+ metadata: call_metadata,
636
+ retry_policy: @config.rpcs.create_policy_tag.retry_policy
637
+
638
+ options.apply_defaults timeout: @config.timeout,
639
+ metadata: @config.metadata,
640
+ retry_policy: @config.retry_policy
641
+
642
+ @policy_tag_manager_stub.create_policy_tag request, options do |result, operation|
643
+ yield result, operation if block_given?
644
+ return result
645
+ end
646
+ rescue ::Gapic::Rest::Error => e
647
+ raise ::Google::Cloud::Error.from_error(e)
648
+ end
649
+
650
+ ##
651
+ # Deletes a policy tag. Also deletes all of its descendant policy tags.
652
+ #
653
+ # @overload delete_policy_tag(request, options = nil)
654
+ # Pass arguments to `delete_policy_tag` via a request object, either of type
655
+ # {::Google::Cloud::DataCatalog::V1beta1::DeletePolicyTagRequest} or an equivalent Hash.
656
+ #
657
+ # @param request [::Google::Cloud::DataCatalog::V1beta1::DeletePolicyTagRequest, ::Hash]
658
+ # A request object representing the call parameters. Required. To specify no
659
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
660
+ # @param options [::Gapic::CallOptions, ::Hash]
661
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
662
+ #
663
+ # @overload delete_policy_tag(name: nil)
664
+ # Pass arguments to `delete_policy_tag` via keyword arguments. Note that at
665
+ # least one keyword argument is required. To specify no parameters, or to keep all
666
+ # the default parameter values, pass an empty Hash as a request object (see above).
667
+ #
668
+ # @param name [::String]
669
+ # Required. Resource name of the policy tag to be deleted. All of its
670
+ # descendant policy tags will also be deleted.
671
+ # @yield [result, operation] Access the result along with the TransportOperation object
672
+ # @yieldparam result [::Google::Protobuf::Empty]
673
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
674
+ #
675
+ # @return [::Google::Protobuf::Empty]
676
+ #
677
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
678
+ #
679
+ # @example Basic example
680
+ # require "google/cloud/data_catalog/v1beta1"
681
+ #
682
+ # # Create a client object. The client can be reused for multiple calls.
683
+ # client = Google::Cloud::DataCatalog::V1beta1::PolicyTagManager::Rest::Client.new
684
+ #
685
+ # # Create a request. To set request fields, pass in keyword arguments.
686
+ # request = Google::Cloud::DataCatalog::V1beta1::DeletePolicyTagRequest.new
687
+ #
688
+ # # Call the delete_policy_tag method.
689
+ # result = client.delete_policy_tag request
690
+ #
691
+ # # The returned object is of type Google::Protobuf::Empty.
692
+ # p result
693
+ #
694
+ def delete_policy_tag request, options = nil
695
+ raise ::ArgumentError, "request must be provided" if request.nil?
696
+
697
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataCatalog::V1beta1::DeletePolicyTagRequest
698
+
699
+ # Converts hash and nil to an options object
700
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
701
+
702
+ # Customize the options with defaults
703
+ call_metadata = @config.rpcs.delete_policy_tag.metadata.to_h
704
+
705
+ # Set x-goog-api-client and x-goog-user-project headers
706
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
707
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
708
+ gapic_version: ::Google::Cloud::DataCatalog::V1beta1::VERSION,
709
+ transports_version_send: [:rest]
710
+
711
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
712
+
713
+ options.apply_defaults timeout: @config.rpcs.delete_policy_tag.timeout,
714
+ metadata: call_metadata,
715
+ retry_policy: @config.rpcs.delete_policy_tag.retry_policy
716
+
717
+ options.apply_defaults timeout: @config.timeout,
718
+ metadata: @config.metadata,
719
+ retry_policy: @config.retry_policy
720
+
721
+ @policy_tag_manager_stub.delete_policy_tag request, options do |result, operation|
722
+ yield result, operation if block_given?
723
+ return result
724
+ end
725
+ rescue ::Gapic::Rest::Error => e
726
+ raise ::Google::Cloud::Error.from_error(e)
727
+ end
728
+
729
+ ##
730
+ # Updates a policy tag.
731
+ #
732
+ # @overload update_policy_tag(request, options = nil)
733
+ # Pass arguments to `update_policy_tag` via a request object, either of type
734
+ # {::Google::Cloud::DataCatalog::V1beta1::UpdatePolicyTagRequest} or an equivalent Hash.
735
+ #
736
+ # @param request [::Google::Cloud::DataCatalog::V1beta1::UpdatePolicyTagRequest, ::Hash]
737
+ # A request object representing the call parameters. Required. To specify no
738
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
739
+ # @param options [::Gapic::CallOptions, ::Hash]
740
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
741
+ #
742
+ # @overload update_policy_tag(policy_tag: nil, update_mask: nil)
743
+ # Pass arguments to `update_policy_tag` via keyword arguments. Note that at
744
+ # least one keyword argument is required. To specify no parameters, or to keep all
745
+ # the default parameter values, pass an empty Hash as a request object (see above).
746
+ #
747
+ # @param policy_tag [::Google::Cloud::DataCatalog::V1beta1::PolicyTag, ::Hash]
748
+ # The policy tag to update. Only the description, display_name, and
749
+ # parent_policy_tag fields can be updated.
750
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
751
+ # The update mask applies to the resource. Only display_name, description and
752
+ # parent_policy_tag can be updated and thus can be listed in the mask. If
753
+ # update_mask is not provided, all allowed fields (i.e. display_name,
754
+ # description and parent) will be updated. For more information including the
755
+ # `FieldMask` definition, see
756
+ # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
757
+ # If not set, defaults to all of the fields that are allowed to update.
758
+ # @yield [result, operation] Access the result along with the TransportOperation object
759
+ # @yieldparam result [::Google::Cloud::DataCatalog::V1beta1::PolicyTag]
760
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
761
+ #
762
+ # @return [::Google::Cloud::DataCatalog::V1beta1::PolicyTag]
763
+ #
764
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
765
+ #
766
+ # @example Basic example
767
+ # require "google/cloud/data_catalog/v1beta1"
768
+ #
769
+ # # Create a client object. The client can be reused for multiple calls.
770
+ # client = Google::Cloud::DataCatalog::V1beta1::PolicyTagManager::Rest::Client.new
771
+ #
772
+ # # Create a request. To set request fields, pass in keyword arguments.
773
+ # request = Google::Cloud::DataCatalog::V1beta1::UpdatePolicyTagRequest.new
774
+ #
775
+ # # Call the update_policy_tag method.
776
+ # result = client.update_policy_tag request
777
+ #
778
+ # # The returned object is of type Google::Cloud::DataCatalog::V1beta1::PolicyTag.
779
+ # p result
780
+ #
781
+ def update_policy_tag request, options = nil
782
+ raise ::ArgumentError, "request must be provided" if request.nil?
783
+
784
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataCatalog::V1beta1::UpdatePolicyTagRequest
785
+
786
+ # Converts hash and nil to an options object
787
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
788
+
789
+ # Customize the options with defaults
790
+ call_metadata = @config.rpcs.update_policy_tag.metadata.to_h
791
+
792
+ # Set x-goog-api-client and x-goog-user-project headers
793
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
794
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
795
+ gapic_version: ::Google::Cloud::DataCatalog::V1beta1::VERSION,
796
+ transports_version_send: [:rest]
797
+
798
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
799
+
800
+ options.apply_defaults timeout: @config.rpcs.update_policy_tag.timeout,
801
+ metadata: call_metadata,
802
+ retry_policy: @config.rpcs.update_policy_tag.retry_policy
803
+
804
+ options.apply_defaults timeout: @config.timeout,
805
+ metadata: @config.metadata,
806
+ retry_policy: @config.retry_policy
807
+
808
+ @policy_tag_manager_stub.update_policy_tag request, options do |result, operation|
809
+ yield result, operation if block_given?
810
+ return result
811
+ end
812
+ rescue ::Gapic::Rest::Error => e
813
+ raise ::Google::Cloud::Error.from_error(e)
814
+ end
815
+
816
+ ##
817
+ # Lists all policy tags in a taxonomy.
818
+ #
819
+ # @overload list_policy_tags(request, options = nil)
820
+ # Pass arguments to `list_policy_tags` via a request object, either of type
821
+ # {::Google::Cloud::DataCatalog::V1beta1::ListPolicyTagsRequest} or an equivalent Hash.
822
+ #
823
+ # @param request [::Google::Cloud::DataCatalog::V1beta1::ListPolicyTagsRequest, ::Hash]
824
+ # A request object representing the call parameters. Required. To specify no
825
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
826
+ # @param options [::Gapic::CallOptions, ::Hash]
827
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
828
+ #
829
+ # @overload list_policy_tags(parent: nil, page_size: nil, page_token: nil)
830
+ # Pass arguments to `list_policy_tags` via keyword arguments. Note that at
831
+ # least one keyword argument is required. To specify no parameters, or to keep all
832
+ # the default parameter values, pass an empty Hash as a request object (see above).
833
+ #
834
+ # @param parent [::String]
835
+ # Required. Resource name of the taxonomy to list the policy tags of.
836
+ # @param page_size [::Integer]
837
+ # The maximum number of items to return. Must be a value between 1 and 1000.
838
+ # If not set, defaults to 50.
839
+ # @param page_token [::String]
840
+ # The next_page_token value returned from a previous List request, if any. If
841
+ # not set, defaults to an empty string.
842
+ # @yield [result, operation] Access the result along with the TransportOperation object
843
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::DataCatalog::V1beta1::PolicyTag>]
844
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
845
+ #
846
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::DataCatalog::V1beta1::PolicyTag>]
847
+ #
848
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
849
+ #
850
+ # @example Basic example
851
+ # require "google/cloud/data_catalog/v1beta1"
852
+ #
853
+ # # Create a client object. The client can be reused for multiple calls.
854
+ # client = Google::Cloud::DataCatalog::V1beta1::PolicyTagManager::Rest::Client.new
855
+ #
856
+ # # Create a request. To set request fields, pass in keyword arguments.
857
+ # request = Google::Cloud::DataCatalog::V1beta1::ListPolicyTagsRequest.new
858
+ #
859
+ # # Call the list_policy_tags method.
860
+ # result = client.list_policy_tags request
861
+ #
862
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
863
+ # # over elements, and API calls will be issued to fetch pages as needed.
864
+ # result.each do |item|
865
+ # # Each element is of type ::Google::Cloud::DataCatalog::V1beta1::PolicyTag.
866
+ # p item
867
+ # end
868
+ #
869
+ def list_policy_tags request, options = nil
870
+ raise ::ArgumentError, "request must be provided" if request.nil?
871
+
872
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataCatalog::V1beta1::ListPolicyTagsRequest
873
+
874
+ # Converts hash and nil to an options object
875
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
876
+
877
+ # Customize the options with defaults
878
+ call_metadata = @config.rpcs.list_policy_tags.metadata.to_h
879
+
880
+ # Set x-goog-api-client and x-goog-user-project headers
881
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
882
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
883
+ gapic_version: ::Google::Cloud::DataCatalog::V1beta1::VERSION,
884
+ transports_version_send: [:rest]
885
+
886
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
887
+
888
+ options.apply_defaults timeout: @config.rpcs.list_policy_tags.timeout,
889
+ metadata: call_metadata,
890
+ retry_policy: @config.rpcs.list_policy_tags.retry_policy
891
+
892
+ options.apply_defaults timeout: @config.timeout,
893
+ metadata: @config.metadata,
894
+ retry_policy: @config.retry_policy
895
+
896
+ @policy_tag_manager_stub.list_policy_tags request, options do |result, operation|
897
+ result = ::Gapic::Rest::PagedEnumerable.new @policy_tag_manager_stub, :list_policy_tags, "policy_tags", request, result, options
898
+ yield result, operation if block_given?
899
+ return result
900
+ end
901
+ rescue ::Gapic::Rest::Error => e
902
+ raise ::Google::Cloud::Error.from_error(e)
903
+ end
904
+
905
+ ##
906
+ # Gets a policy tag.
907
+ #
908
+ # @overload get_policy_tag(request, options = nil)
909
+ # Pass arguments to `get_policy_tag` via a request object, either of type
910
+ # {::Google::Cloud::DataCatalog::V1beta1::GetPolicyTagRequest} or an equivalent Hash.
911
+ #
912
+ # @param request [::Google::Cloud::DataCatalog::V1beta1::GetPolicyTagRequest, ::Hash]
913
+ # A request object representing the call parameters. Required. To specify no
914
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
915
+ # @param options [::Gapic::CallOptions, ::Hash]
916
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
917
+ #
918
+ # @overload get_policy_tag(name: nil)
919
+ # Pass arguments to `get_policy_tag` via keyword arguments. Note that at
920
+ # least one keyword argument is required. To specify no parameters, or to keep all
921
+ # the default parameter values, pass an empty Hash as a request object (see above).
922
+ #
923
+ # @param name [::String]
924
+ # Required. Resource name of the requested policy tag.
925
+ # @yield [result, operation] Access the result along with the TransportOperation object
926
+ # @yieldparam result [::Google::Cloud::DataCatalog::V1beta1::PolicyTag]
927
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
928
+ #
929
+ # @return [::Google::Cloud::DataCatalog::V1beta1::PolicyTag]
930
+ #
931
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
932
+ #
933
+ # @example Basic example
934
+ # require "google/cloud/data_catalog/v1beta1"
935
+ #
936
+ # # Create a client object. The client can be reused for multiple calls.
937
+ # client = Google::Cloud::DataCatalog::V1beta1::PolicyTagManager::Rest::Client.new
938
+ #
939
+ # # Create a request. To set request fields, pass in keyword arguments.
940
+ # request = Google::Cloud::DataCatalog::V1beta1::GetPolicyTagRequest.new
941
+ #
942
+ # # Call the get_policy_tag method.
943
+ # result = client.get_policy_tag request
944
+ #
945
+ # # The returned object is of type Google::Cloud::DataCatalog::V1beta1::PolicyTag.
946
+ # p result
947
+ #
948
+ def get_policy_tag request, options = nil
949
+ raise ::ArgumentError, "request must be provided" if request.nil?
950
+
951
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataCatalog::V1beta1::GetPolicyTagRequest
952
+
953
+ # Converts hash and nil to an options object
954
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
955
+
956
+ # Customize the options with defaults
957
+ call_metadata = @config.rpcs.get_policy_tag.metadata.to_h
958
+
959
+ # Set x-goog-api-client and x-goog-user-project headers
960
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
961
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
962
+ gapic_version: ::Google::Cloud::DataCatalog::V1beta1::VERSION,
963
+ transports_version_send: [:rest]
964
+
965
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
966
+
967
+ options.apply_defaults timeout: @config.rpcs.get_policy_tag.timeout,
968
+ metadata: call_metadata,
969
+ retry_policy: @config.rpcs.get_policy_tag.retry_policy
970
+
971
+ options.apply_defaults timeout: @config.timeout,
972
+ metadata: @config.metadata,
973
+ retry_policy: @config.retry_policy
974
+
975
+ @policy_tag_manager_stub.get_policy_tag request, options do |result, operation|
976
+ yield result, operation if block_given?
977
+ return result
978
+ end
979
+ rescue ::Gapic::Rest::Error => e
980
+ raise ::Google::Cloud::Error.from_error(e)
981
+ end
982
+
983
+ ##
984
+ # Gets the IAM policy for a taxonomy or a policy tag.
985
+ #
986
+ # @overload get_iam_policy(request, options = nil)
987
+ # Pass arguments to `get_iam_policy` via a request object, either of type
988
+ # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash.
989
+ #
990
+ # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash]
991
+ # A request object representing the call parameters. Required. To specify no
992
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
993
+ # @param options [::Gapic::CallOptions, ::Hash]
994
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
995
+ #
996
+ # @overload get_iam_policy(resource: nil, options: nil)
997
+ # Pass arguments to `get_iam_policy` via keyword arguments. Note that at
998
+ # least one keyword argument is required. To specify no parameters, or to keep all
999
+ # the default parameter values, pass an empty Hash as a request object (see above).
1000
+ #
1001
+ # @param resource [::String]
1002
+ # REQUIRED: The resource for which the policy is being requested.
1003
+ # See the operation documentation for the appropriate value for this field.
1004
+ # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash]
1005
+ # OPTIONAL: A `GetPolicyOptions` object for specifying options to
1006
+ # `GetIamPolicy`.
1007
+ # @yield [result, operation] Access the result along with the TransportOperation object
1008
+ # @yieldparam result [::Google::Iam::V1::Policy]
1009
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1010
+ #
1011
+ # @return [::Google::Iam::V1::Policy]
1012
+ #
1013
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1014
+ #
1015
+ # @example Basic example
1016
+ # require "google/cloud/data_catalog/v1beta1"
1017
+ #
1018
+ # # Create a client object. The client can be reused for multiple calls.
1019
+ # client = Google::Cloud::DataCatalog::V1beta1::PolicyTagManager::Rest::Client.new
1020
+ #
1021
+ # # Create a request. To set request fields, pass in keyword arguments.
1022
+ # request = Google::Iam::V1::GetIamPolicyRequest.new
1023
+ #
1024
+ # # Call the get_iam_policy method.
1025
+ # result = client.get_iam_policy request
1026
+ #
1027
+ # # The returned object is of type Google::Iam::V1::Policy.
1028
+ # p result
1029
+ #
1030
+ def get_iam_policy request, options = nil
1031
+ raise ::ArgumentError, "request must be provided" if request.nil?
1032
+
1033
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest
1034
+
1035
+ # Converts hash and nil to an options object
1036
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1037
+
1038
+ # Customize the options with defaults
1039
+ call_metadata = @config.rpcs.get_iam_policy.metadata.to_h
1040
+
1041
+ # Set x-goog-api-client and x-goog-user-project headers
1042
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1043
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1044
+ gapic_version: ::Google::Cloud::DataCatalog::V1beta1::VERSION,
1045
+ transports_version_send: [:rest]
1046
+
1047
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1048
+
1049
+ options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout,
1050
+ metadata: call_metadata,
1051
+ retry_policy: @config.rpcs.get_iam_policy.retry_policy
1052
+
1053
+ options.apply_defaults timeout: @config.timeout,
1054
+ metadata: @config.metadata,
1055
+ retry_policy: @config.retry_policy
1056
+
1057
+ @policy_tag_manager_stub.get_iam_policy request, options do |result, operation|
1058
+ yield result, operation if block_given?
1059
+ return result
1060
+ end
1061
+ rescue ::Gapic::Rest::Error => e
1062
+ raise ::Google::Cloud::Error.from_error(e)
1063
+ end
1064
+
1065
+ ##
1066
+ # Sets the IAM policy for a taxonomy or a policy tag.
1067
+ #
1068
+ # @overload set_iam_policy(request, options = nil)
1069
+ # Pass arguments to `set_iam_policy` via a request object, either of type
1070
+ # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash.
1071
+ #
1072
+ # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash]
1073
+ # A request object representing the call parameters. Required. To specify no
1074
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1075
+ # @param options [::Gapic::CallOptions, ::Hash]
1076
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1077
+ #
1078
+ # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil)
1079
+ # Pass arguments to `set_iam_policy` via keyword arguments. Note that at
1080
+ # least one keyword argument is required. To specify no parameters, or to keep all
1081
+ # the default parameter values, pass an empty Hash as a request object (see above).
1082
+ #
1083
+ # @param resource [::String]
1084
+ # REQUIRED: The resource for which the policy is being specified.
1085
+ # See the operation documentation for the appropriate value for this field.
1086
+ # @param policy [::Google::Iam::V1::Policy, ::Hash]
1087
+ # REQUIRED: The complete policy to be applied to the `resource`. The size of
1088
+ # the policy is limited to a few 10s of KB. An empty policy is a
1089
+ # valid policy but certain Cloud Platform services (such as Projects)
1090
+ # might reject them.
1091
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
1092
+ # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
1093
+ # the fields in the mask will be modified. If no mask is provided, the
1094
+ # following default mask is used:
1095
+ #
1096
+ # `paths: "bindings, etag"`
1097
+ # @yield [result, operation] Access the result along with the TransportOperation object
1098
+ # @yieldparam result [::Google::Iam::V1::Policy]
1099
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1100
+ #
1101
+ # @return [::Google::Iam::V1::Policy]
1102
+ #
1103
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1104
+ #
1105
+ # @example Basic example
1106
+ # require "google/cloud/data_catalog/v1beta1"
1107
+ #
1108
+ # # Create a client object. The client can be reused for multiple calls.
1109
+ # client = Google::Cloud::DataCatalog::V1beta1::PolicyTagManager::Rest::Client.new
1110
+ #
1111
+ # # Create a request. To set request fields, pass in keyword arguments.
1112
+ # request = Google::Iam::V1::SetIamPolicyRequest.new
1113
+ #
1114
+ # # Call the set_iam_policy method.
1115
+ # result = client.set_iam_policy request
1116
+ #
1117
+ # # The returned object is of type Google::Iam::V1::Policy.
1118
+ # p result
1119
+ #
1120
+ def set_iam_policy request, options = nil
1121
+ raise ::ArgumentError, "request must be provided" if request.nil?
1122
+
1123
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest
1124
+
1125
+ # Converts hash and nil to an options object
1126
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1127
+
1128
+ # Customize the options with defaults
1129
+ call_metadata = @config.rpcs.set_iam_policy.metadata.to_h
1130
+
1131
+ # Set x-goog-api-client and x-goog-user-project headers
1132
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1133
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1134
+ gapic_version: ::Google::Cloud::DataCatalog::V1beta1::VERSION,
1135
+ transports_version_send: [:rest]
1136
+
1137
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1138
+
1139
+ options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout,
1140
+ metadata: call_metadata,
1141
+ retry_policy: @config.rpcs.set_iam_policy.retry_policy
1142
+
1143
+ options.apply_defaults timeout: @config.timeout,
1144
+ metadata: @config.metadata,
1145
+ retry_policy: @config.retry_policy
1146
+
1147
+ @policy_tag_manager_stub.set_iam_policy request, options do |result, operation|
1148
+ yield result, operation if block_given?
1149
+ return result
1150
+ end
1151
+ rescue ::Gapic::Rest::Error => e
1152
+ raise ::Google::Cloud::Error.from_error(e)
1153
+ end
1154
+
1155
+ ##
1156
+ # Returns the permissions that a caller has on the specified taxonomy or
1157
+ # policy tag.
1158
+ #
1159
+ # @overload test_iam_permissions(request, options = nil)
1160
+ # Pass arguments to `test_iam_permissions` via a request object, either of type
1161
+ # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash.
1162
+ #
1163
+ # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash]
1164
+ # A request object representing the call parameters. Required. To specify no
1165
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1166
+ # @param options [::Gapic::CallOptions, ::Hash]
1167
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1168
+ #
1169
+ # @overload test_iam_permissions(resource: nil, permissions: nil)
1170
+ # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at
1171
+ # least one keyword argument is required. To specify no parameters, or to keep all
1172
+ # the default parameter values, pass an empty Hash as a request object (see above).
1173
+ #
1174
+ # @param resource [::String]
1175
+ # REQUIRED: The resource for which the policy detail is being requested.
1176
+ # See the operation documentation for the appropriate value for this field.
1177
+ # @param permissions [::Array<::String>]
1178
+ # The set of permissions to check for the `resource`. Permissions with
1179
+ # wildcards (such as '*' or 'storage.*') are not allowed. For more
1180
+ # information see
1181
+ # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
1182
+ # @yield [result, operation] Access the result along with the TransportOperation object
1183
+ # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse]
1184
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1185
+ #
1186
+ # @return [::Google::Iam::V1::TestIamPermissionsResponse]
1187
+ #
1188
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1189
+ #
1190
+ # @example Basic example
1191
+ # require "google/cloud/data_catalog/v1beta1"
1192
+ #
1193
+ # # Create a client object. The client can be reused for multiple calls.
1194
+ # client = Google::Cloud::DataCatalog::V1beta1::PolicyTagManager::Rest::Client.new
1195
+ #
1196
+ # # Create a request. To set request fields, pass in keyword arguments.
1197
+ # request = Google::Iam::V1::TestIamPermissionsRequest.new
1198
+ #
1199
+ # # Call the test_iam_permissions method.
1200
+ # result = client.test_iam_permissions request
1201
+ #
1202
+ # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse.
1203
+ # p result
1204
+ #
1205
+ def test_iam_permissions request, options = nil
1206
+ raise ::ArgumentError, "request must be provided" if request.nil?
1207
+
1208
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest
1209
+
1210
+ # Converts hash and nil to an options object
1211
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1212
+
1213
+ # Customize the options with defaults
1214
+ call_metadata = @config.rpcs.test_iam_permissions.metadata.to_h
1215
+
1216
+ # Set x-goog-api-client and x-goog-user-project headers
1217
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1218
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1219
+ gapic_version: ::Google::Cloud::DataCatalog::V1beta1::VERSION,
1220
+ transports_version_send: [:rest]
1221
+
1222
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1223
+
1224
+ options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout,
1225
+ metadata: call_metadata,
1226
+ retry_policy: @config.rpcs.test_iam_permissions.retry_policy
1227
+
1228
+ options.apply_defaults timeout: @config.timeout,
1229
+ metadata: @config.metadata,
1230
+ retry_policy: @config.retry_policy
1231
+
1232
+ @policy_tag_manager_stub.test_iam_permissions request, options do |result, operation|
1233
+ yield result, operation if block_given?
1234
+ return result
1235
+ end
1236
+ rescue ::Gapic::Rest::Error => e
1237
+ raise ::Google::Cloud::Error.from_error(e)
1238
+ end
1239
+
1240
+ ##
1241
+ # Configuration class for the PolicyTagManager REST API.
1242
+ #
1243
+ # This class represents the configuration for PolicyTagManager REST,
1244
+ # providing control over timeouts, retry behavior, logging, transport
1245
+ # parameters, and other low-level controls. Certain parameters can also be
1246
+ # applied individually to specific RPCs. See
1247
+ # {::Google::Cloud::DataCatalog::V1beta1::PolicyTagManager::Rest::Client::Configuration::Rpcs}
1248
+ # for a list of RPCs that can be configured independently.
1249
+ #
1250
+ # Configuration can be applied globally to all clients, or to a single client
1251
+ # on construction.
1252
+ #
1253
+ # @example
1254
+ #
1255
+ # # Modify the global config, setting the timeout for
1256
+ # # create_taxonomy to 20 seconds,
1257
+ # # and all remaining timeouts to 10 seconds.
1258
+ # ::Google::Cloud::DataCatalog::V1beta1::PolicyTagManager::Rest::Client.configure do |config|
1259
+ # config.timeout = 10.0
1260
+ # config.rpcs.create_taxonomy.timeout = 20.0
1261
+ # end
1262
+ #
1263
+ # # Apply the above configuration only to a new client.
1264
+ # client = ::Google::Cloud::DataCatalog::V1beta1::PolicyTagManager::Rest::Client.new do |config|
1265
+ # config.timeout = 10.0
1266
+ # config.rpcs.create_taxonomy.timeout = 20.0
1267
+ # end
1268
+ #
1269
+ # @!attribute [rw] endpoint
1270
+ # The hostname or hostname:port of the service endpoint.
1271
+ # Defaults to `"datacatalog.googleapis.com"`.
1272
+ # @return [::String]
1273
+ # @!attribute [rw] credentials
1274
+ # Credentials to send with calls. You may provide any of the following types:
1275
+ # * (`String`) The path to a service account key file in JSON format
1276
+ # * (`Hash`) A service account key as a Hash
1277
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
1278
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
1279
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
1280
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
1281
+ # * (`nil`) indicating no credentials
1282
+ # @return [::Object]
1283
+ # @!attribute [rw] scope
1284
+ # The OAuth scopes
1285
+ # @return [::Array<::String>]
1286
+ # @!attribute [rw] lib_name
1287
+ # The library name as recorded in instrumentation and logging
1288
+ # @return [::String]
1289
+ # @!attribute [rw] lib_version
1290
+ # The library version as recorded in instrumentation and logging
1291
+ # @return [::String]
1292
+ # @!attribute [rw] timeout
1293
+ # The call timeout in seconds.
1294
+ # @return [::Numeric]
1295
+ # @!attribute [rw] metadata
1296
+ # Additional headers to be sent with the call.
1297
+ # @return [::Hash{::Symbol=>::String}]
1298
+ # @!attribute [rw] retry_policy
1299
+ # The retry policy. The value is a hash with the following keys:
1300
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
1301
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
1302
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
1303
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
1304
+ # trigger a retry.
1305
+ # @return [::Hash]
1306
+ # @!attribute [rw] quota_project
1307
+ # A separate project against which to charge quota.
1308
+ # @return [::String]
1309
+ #
1310
+ class Configuration
1311
+ extend ::Gapic::Config
1312
+
1313
+ DEFAULT_ENDPOINT = "datacatalog.googleapis.com"
1314
+
1315
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
1316
+ config_attr :credentials, nil do |value|
1317
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
1318
+ allowed.any? { |klass| klass === value }
1319
+ end
1320
+ config_attr :scope, nil, ::String, ::Array, nil
1321
+ config_attr :lib_name, nil, ::String, nil
1322
+ config_attr :lib_version, nil, ::String, nil
1323
+ config_attr :timeout, nil, ::Numeric, nil
1324
+ config_attr :metadata, nil, ::Hash, nil
1325
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
1326
+ config_attr :quota_project, nil, ::String, nil
1327
+
1328
+ # @private
1329
+ def initialize parent_config = nil
1330
+ @parent_config = parent_config unless parent_config.nil?
1331
+
1332
+ yield self if block_given?
1333
+ end
1334
+
1335
+ ##
1336
+ # Configurations for individual RPCs
1337
+ # @return [Rpcs]
1338
+ #
1339
+ def rpcs
1340
+ @rpcs ||= begin
1341
+ parent_rpcs = nil
1342
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
1343
+ Rpcs.new parent_rpcs
1344
+ end
1345
+ end
1346
+
1347
+ ##
1348
+ # Configuration RPC class for the PolicyTagManager API.
1349
+ #
1350
+ # Includes fields providing the configuration for each RPC in this service.
1351
+ # Each configuration object is of type `Gapic::Config::Method` and includes
1352
+ # the following configuration fields:
1353
+ #
1354
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
1355
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
1356
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
1357
+ # include the following keys:
1358
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
1359
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
1360
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
1361
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
1362
+ # trigger a retry.
1363
+ #
1364
+ class Rpcs
1365
+ ##
1366
+ # RPC-specific configuration for `create_taxonomy`
1367
+ # @return [::Gapic::Config::Method]
1368
+ #
1369
+ attr_reader :create_taxonomy
1370
+ ##
1371
+ # RPC-specific configuration for `delete_taxonomy`
1372
+ # @return [::Gapic::Config::Method]
1373
+ #
1374
+ attr_reader :delete_taxonomy
1375
+ ##
1376
+ # RPC-specific configuration for `update_taxonomy`
1377
+ # @return [::Gapic::Config::Method]
1378
+ #
1379
+ attr_reader :update_taxonomy
1380
+ ##
1381
+ # RPC-specific configuration for `list_taxonomies`
1382
+ # @return [::Gapic::Config::Method]
1383
+ #
1384
+ attr_reader :list_taxonomies
1385
+ ##
1386
+ # RPC-specific configuration for `get_taxonomy`
1387
+ # @return [::Gapic::Config::Method]
1388
+ #
1389
+ attr_reader :get_taxonomy
1390
+ ##
1391
+ # RPC-specific configuration for `create_policy_tag`
1392
+ # @return [::Gapic::Config::Method]
1393
+ #
1394
+ attr_reader :create_policy_tag
1395
+ ##
1396
+ # RPC-specific configuration for `delete_policy_tag`
1397
+ # @return [::Gapic::Config::Method]
1398
+ #
1399
+ attr_reader :delete_policy_tag
1400
+ ##
1401
+ # RPC-specific configuration for `update_policy_tag`
1402
+ # @return [::Gapic::Config::Method]
1403
+ #
1404
+ attr_reader :update_policy_tag
1405
+ ##
1406
+ # RPC-specific configuration for `list_policy_tags`
1407
+ # @return [::Gapic::Config::Method]
1408
+ #
1409
+ attr_reader :list_policy_tags
1410
+ ##
1411
+ # RPC-specific configuration for `get_policy_tag`
1412
+ # @return [::Gapic::Config::Method]
1413
+ #
1414
+ attr_reader :get_policy_tag
1415
+ ##
1416
+ # RPC-specific configuration for `get_iam_policy`
1417
+ # @return [::Gapic::Config::Method]
1418
+ #
1419
+ attr_reader :get_iam_policy
1420
+ ##
1421
+ # RPC-specific configuration for `set_iam_policy`
1422
+ # @return [::Gapic::Config::Method]
1423
+ #
1424
+ attr_reader :set_iam_policy
1425
+ ##
1426
+ # RPC-specific configuration for `test_iam_permissions`
1427
+ # @return [::Gapic::Config::Method]
1428
+ #
1429
+ attr_reader :test_iam_permissions
1430
+
1431
+ # @private
1432
+ def initialize parent_rpcs = nil
1433
+ create_taxonomy_config = parent_rpcs.create_taxonomy if parent_rpcs.respond_to? :create_taxonomy
1434
+ @create_taxonomy = ::Gapic::Config::Method.new create_taxonomy_config
1435
+ delete_taxonomy_config = parent_rpcs.delete_taxonomy if parent_rpcs.respond_to? :delete_taxonomy
1436
+ @delete_taxonomy = ::Gapic::Config::Method.new delete_taxonomy_config
1437
+ update_taxonomy_config = parent_rpcs.update_taxonomy if parent_rpcs.respond_to? :update_taxonomy
1438
+ @update_taxonomy = ::Gapic::Config::Method.new update_taxonomy_config
1439
+ list_taxonomies_config = parent_rpcs.list_taxonomies if parent_rpcs.respond_to? :list_taxonomies
1440
+ @list_taxonomies = ::Gapic::Config::Method.new list_taxonomies_config
1441
+ get_taxonomy_config = parent_rpcs.get_taxonomy if parent_rpcs.respond_to? :get_taxonomy
1442
+ @get_taxonomy = ::Gapic::Config::Method.new get_taxonomy_config
1443
+ create_policy_tag_config = parent_rpcs.create_policy_tag if parent_rpcs.respond_to? :create_policy_tag
1444
+ @create_policy_tag = ::Gapic::Config::Method.new create_policy_tag_config
1445
+ delete_policy_tag_config = parent_rpcs.delete_policy_tag if parent_rpcs.respond_to? :delete_policy_tag
1446
+ @delete_policy_tag = ::Gapic::Config::Method.new delete_policy_tag_config
1447
+ update_policy_tag_config = parent_rpcs.update_policy_tag if parent_rpcs.respond_to? :update_policy_tag
1448
+ @update_policy_tag = ::Gapic::Config::Method.new update_policy_tag_config
1449
+ list_policy_tags_config = parent_rpcs.list_policy_tags if parent_rpcs.respond_to? :list_policy_tags
1450
+ @list_policy_tags = ::Gapic::Config::Method.new list_policy_tags_config
1451
+ get_policy_tag_config = parent_rpcs.get_policy_tag if parent_rpcs.respond_to? :get_policy_tag
1452
+ @get_policy_tag = ::Gapic::Config::Method.new get_policy_tag_config
1453
+ get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy
1454
+ @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config
1455
+ set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy
1456
+ @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config
1457
+ test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions
1458
+ @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config
1459
+
1460
+ yield self if block_given?
1461
+ end
1462
+ end
1463
+ end
1464
+ end
1465
+ end
1466
+ end
1467
+ end
1468
+ end
1469
+ end
1470
+ end