google-cloud-data_catalog-v1 0.4.5 → 0.7.1

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