google-cloud-dataplex-v1 0.9.0 → 0.10.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.
- checksums.yaml +4 -4
- data/lib/google/cloud/dataplex/v1/bindings_override.rb +72 -0
- data/lib/google/cloud/dataplex/v1/data_profile_pb.rb +7 -1
- data/lib/google/cloud/dataplex/v1/data_quality_pb.rb +7 -1
- data/lib/google/cloud/dataplex/v1/data_scan_service/client.rb +19 -1
- data/lib/google/cloud/dataplex/v1/data_scan_service/rest/client.rb +19 -1
- data/lib/google/cloud/dataplex/v1/data_taxonomy_pb.rb +77 -0
- data/lib/google/cloud/dataplex/v1/data_taxonomy_service/client.rb +1931 -0
- data/lib/google/cloud/dataplex/v1/data_taxonomy_service/credentials.rb +47 -0
- data/lib/google/cloud/dataplex/v1/data_taxonomy_service/operations.rb +770 -0
- data/lib/google/cloud/dataplex/v1/data_taxonomy_service/paths.rb +109 -0
- data/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest/client.rb +1497 -0
- data/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest/operations.rb +795 -0
- data/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest/service_stub.rb +939 -0
- data/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest.rb +55 -0
- data/lib/google/cloud/dataplex/v1/data_taxonomy_service.rb +57 -0
- data/lib/google/cloud/dataplex/v1/data_taxonomy_services_pb.rb +77 -0
- data/lib/google/cloud/dataplex/v1/dataplex_service/client.rb +17 -1
- data/lib/google/cloud/dataplex/v1/dataplex_service/rest/client.rb +17 -1
- data/lib/google/cloud/dataplex/v1/datascans_pb.rb +1 -1
- data/lib/google/cloud/dataplex/v1/logs_pb.rb +11 -1
- data/lib/google/cloud/dataplex/v1/rest.rb +1 -0
- data/lib/google/cloud/dataplex/v1/security_pb.rb +45 -0
- data/lib/google/cloud/dataplex/v1/service_pb.rb +1 -1
- data/lib/google/cloud/dataplex/v1/tasks_pb.rb +2 -1
- data/lib/google/cloud/dataplex/v1/version.rb +1 -1
- data/lib/google/cloud/dataplex/v1.rb +1 -0
- data/proto_docs/google/cloud/dataplex/v1/data_profile.rb +118 -6
- data/proto_docs/google/cloud/dataplex/v1/data_quality.rb +130 -30
- data/proto_docs/google/cloud/dataplex/v1/data_taxonomy.rb +565 -0
- data/proto_docs/google/cloud/dataplex/v1/datascans.rb +19 -0
- data/proto_docs/google/cloud/dataplex/v1/logs.rb +214 -4
- data/proto_docs/google/cloud/dataplex/v1/security.rb +61 -0
- data/proto_docs/google/cloud/dataplex/v1/service.rb +36 -0
- data/proto_docs/google/cloud/dataplex/v1/tasks.rb +31 -0
- metadata +16 -2
@@ -0,0 +1,1931 @@
|
|
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/dataplex/v1/data_taxonomy_pb"
|
21
|
+
require "google/cloud/location"
|
22
|
+
require "google/iam/v1"
|
23
|
+
|
24
|
+
module Google
|
25
|
+
module Cloud
|
26
|
+
module Dataplex
|
27
|
+
module V1
|
28
|
+
module DataTaxonomyService
|
29
|
+
##
|
30
|
+
# Client for the DataTaxonomyService service.
|
31
|
+
#
|
32
|
+
# DataTaxonomyService enables attribute-based governance. The resources
|
33
|
+
# currently offered include DataTaxonomy and DataAttribute.
|
34
|
+
#
|
35
|
+
class Client
|
36
|
+
include Paths
|
37
|
+
|
38
|
+
# @private
|
39
|
+
attr_reader :data_taxonomy_service_stub
|
40
|
+
|
41
|
+
##
|
42
|
+
# Configure the DataTaxonomyService Client class.
|
43
|
+
#
|
44
|
+
# See {::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client::Configuration}
|
45
|
+
# for a description of the configuration fields.
|
46
|
+
#
|
47
|
+
# @example
|
48
|
+
#
|
49
|
+
# # Modify the configuration for all DataTaxonomyService clients
|
50
|
+
# ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.configure do |config|
|
51
|
+
# config.timeout = 10.0
|
52
|
+
# end
|
53
|
+
#
|
54
|
+
# @yield [config] Configure the Client client.
|
55
|
+
# @yieldparam config [Client::Configuration]
|
56
|
+
#
|
57
|
+
# @return [Client::Configuration]
|
58
|
+
#
|
59
|
+
def self.configure
|
60
|
+
@configure ||= begin
|
61
|
+
namespace = ["Google", "Cloud", "Dataplex", "V1"]
|
62
|
+
parent_config = while namespace.any?
|
63
|
+
parent_name = namespace.join "::"
|
64
|
+
parent_const = const_get parent_name
|
65
|
+
break parent_const.configure if parent_const.respond_to? :configure
|
66
|
+
namespace.pop
|
67
|
+
end
|
68
|
+
default_config = Client::Configuration.new parent_config
|
69
|
+
|
70
|
+
default_config
|
71
|
+
end
|
72
|
+
yield @configure if block_given?
|
73
|
+
@configure
|
74
|
+
end
|
75
|
+
|
76
|
+
##
|
77
|
+
# Configure the DataTaxonomyService Client instance.
|
78
|
+
#
|
79
|
+
# The configuration is set to the derived mode, meaning that values can be changed,
|
80
|
+
# but structural changes (adding new fields, etc.) are not allowed. Structural changes
|
81
|
+
# should be made on {Client.configure}.
|
82
|
+
#
|
83
|
+
# See {::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client::Configuration}
|
84
|
+
# for a description of the configuration fields.
|
85
|
+
#
|
86
|
+
# @yield [config] Configure the Client client.
|
87
|
+
# @yieldparam config [Client::Configuration]
|
88
|
+
#
|
89
|
+
# @return [Client::Configuration]
|
90
|
+
#
|
91
|
+
def configure
|
92
|
+
yield @config if block_given?
|
93
|
+
@config
|
94
|
+
end
|
95
|
+
|
96
|
+
##
|
97
|
+
# Create a new DataTaxonomyService client object.
|
98
|
+
#
|
99
|
+
# @example
|
100
|
+
#
|
101
|
+
# # Create a client using the default configuration
|
102
|
+
# client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new
|
103
|
+
#
|
104
|
+
# # Create a client using a custom configuration
|
105
|
+
# client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config|
|
106
|
+
# config.timeout = 10.0
|
107
|
+
# end
|
108
|
+
#
|
109
|
+
# @yield [config] Configure the DataTaxonomyService client.
|
110
|
+
# @yieldparam config [Client::Configuration]
|
111
|
+
#
|
112
|
+
def initialize
|
113
|
+
# These require statements are intentionally placed here to initialize
|
114
|
+
# the gRPC module only when it's required.
|
115
|
+
# See https://github.com/googleapis/toolkit/issues/446
|
116
|
+
require "gapic/grpc"
|
117
|
+
require "google/cloud/dataplex/v1/data_taxonomy_services_pb"
|
118
|
+
|
119
|
+
# Create the configuration object
|
120
|
+
@config = Configuration.new Client.configure
|
121
|
+
|
122
|
+
# Yield the configuration if needed
|
123
|
+
yield @config if block_given?
|
124
|
+
|
125
|
+
# Create credentials
|
126
|
+
credentials = @config.credentials
|
127
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
128
|
+
# but only if the default endpoint does not have a region prefix.
|
129
|
+
enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
130
|
+
!@config.endpoint.split(".").first.include?("-")
|
131
|
+
credentials ||= Credentials.default scope: @config.scope,
|
132
|
+
enable_self_signed_jwt: enable_self_signed_jwt
|
133
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
134
|
+
credentials = Credentials.new credentials, scope: @config.scope
|
135
|
+
end
|
136
|
+
@quota_project_id = @config.quota_project
|
137
|
+
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
138
|
+
|
139
|
+
@operations_client = Operations.new do |config|
|
140
|
+
config.credentials = credentials
|
141
|
+
config.quota_project = @quota_project_id
|
142
|
+
config.endpoint = @config.endpoint
|
143
|
+
end
|
144
|
+
|
145
|
+
@location_client = Google::Cloud::Location::Locations::Client.new do |config|
|
146
|
+
config.credentials = credentials
|
147
|
+
config.quota_project = @quota_project_id
|
148
|
+
config.endpoint = @config.endpoint
|
149
|
+
end
|
150
|
+
|
151
|
+
@iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config|
|
152
|
+
config.credentials = credentials
|
153
|
+
config.quota_project = @quota_project_id
|
154
|
+
config.endpoint = @config.endpoint
|
155
|
+
end
|
156
|
+
|
157
|
+
@data_taxonomy_service_stub = ::Gapic::ServiceStub.new(
|
158
|
+
::Google::Cloud::Dataplex::V1::DataTaxonomyService::Stub,
|
159
|
+
credentials: credentials,
|
160
|
+
endpoint: @config.endpoint,
|
161
|
+
channel_args: @config.channel_args,
|
162
|
+
interceptors: @config.interceptors
|
163
|
+
)
|
164
|
+
end
|
165
|
+
|
166
|
+
##
|
167
|
+
# Get the associated client for long-running operations.
|
168
|
+
#
|
169
|
+
# @return [::Google::Cloud::Dataplex::V1::DataTaxonomyService::Operations]
|
170
|
+
#
|
171
|
+
attr_reader :operations_client
|
172
|
+
|
173
|
+
##
|
174
|
+
# Get the associated client for mix-in of the Locations.
|
175
|
+
#
|
176
|
+
# @return [Google::Cloud::Location::Locations::Client]
|
177
|
+
#
|
178
|
+
attr_reader :location_client
|
179
|
+
|
180
|
+
##
|
181
|
+
# Get the associated client for mix-in of the IAMPolicy.
|
182
|
+
#
|
183
|
+
# @return [Google::Iam::V1::IAMPolicy::Client]
|
184
|
+
#
|
185
|
+
attr_reader :iam_policy_client
|
186
|
+
|
187
|
+
# Service calls
|
188
|
+
|
189
|
+
##
|
190
|
+
# Create a DataTaxonomy resource.
|
191
|
+
#
|
192
|
+
# @overload create_data_taxonomy(request, options = nil)
|
193
|
+
# Pass arguments to `create_data_taxonomy` via a request object, either of type
|
194
|
+
# {::Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest} or an equivalent Hash.
|
195
|
+
#
|
196
|
+
# @param request [::Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest, ::Hash]
|
197
|
+
# A request object representing the call parameters. Required. To specify no
|
198
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
199
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
200
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
201
|
+
#
|
202
|
+
# @overload create_data_taxonomy(parent: nil, data_taxonomy_id: nil, data_taxonomy: nil, validate_only: nil)
|
203
|
+
# Pass arguments to `create_data_taxonomy` via keyword arguments. Note that at
|
204
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
205
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
206
|
+
#
|
207
|
+
# @param parent [::String]
|
208
|
+
# Required. The resource name of the data taxonomy location, of the form:
|
209
|
+
# projects/\\{project_number}/locations/\\{location_id}
|
210
|
+
# where `location_id` refers to a GCP region.
|
211
|
+
# @param data_taxonomy_id [::String]
|
212
|
+
# Required. DataTaxonomy identifier.
|
213
|
+
# * Must contain only lowercase letters, numbers and hyphens.
|
214
|
+
# * Must start with a letter.
|
215
|
+
# * Must be between 1-63 characters.
|
216
|
+
# * Must end with a number or a letter.
|
217
|
+
# * Must be unique within the Project.
|
218
|
+
# @param data_taxonomy [::Google::Cloud::Dataplex::V1::DataTaxonomy, ::Hash]
|
219
|
+
# Required. DataTaxonomy resource.
|
220
|
+
# @param validate_only [::Boolean]
|
221
|
+
# Optional. Only validate the request, but do not perform mutations.
|
222
|
+
# The default is false.
|
223
|
+
#
|
224
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
225
|
+
# @yieldparam response [::Gapic::Operation]
|
226
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
227
|
+
#
|
228
|
+
# @return [::Gapic::Operation]
|
229
|
+
#
|
230
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
231
|
+
#
|
232
|
+
# @example Basic example
|
233
|
+
# require "google/cloud/dataplex/v1"
|
234
|
+
#
|
235
|
+
# # Create a client object. The client can be reused for multiple calls.
|
236
|
+
# client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new
|
237
|
+
#
|
238
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
239
|
+
# request = Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest.new
|
240
|
+
#
|
241
|
+
# # Call the create_data_taxonomy method.
|
242
|
+
# result = client.create_data_taxonomy request
|
243
|
+
#
|
244
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
245
|
+
# # check the status of an operation, cancel it, or wait for results.
|
246
|
+
# # Here is how to wait for a response.
|
247
|
+
# result.wait_until_done! timeout: 60
|
248
|
+
# if result.response?
|
249
|
+
# p result.response
|
250
|
+
# else
|
251
|
+
# puts "No response received."
|
252
|
+
# end
|
253
|
+
#
|
254
|
+
def create_data_taxonomy request, options = nil
|
255
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
256
|
+
|
257
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest
|
258
|
+
|
259
|
+
# Converts hash and nil to an options object
|
260
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
261
|
+
|
262
|
+
# Customize the options with defaults
|
263
|
+
metadata = @config.rpcs.create_data_taxonomy.metadata.to_h
|
264
|
+
|
265
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
266
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
267
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
268
|
+
gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
|
269
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
270
|
+
|
271
|
+
header_params = {}
|
272
|
+
if request.parent
|
273
|
+
header_params["parent"] = request.parent
|
274
|
+
end
|
275
|
+
|
276
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
277
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
278
|
+
|
279
|
+
options.apply_defaults timeout: @config.rpcs.create_data_taxonomy.timeout,
|
280
|
+
metadata: metadata,
|
281
|
+
retry_policy: @config.rpcs.create_data_taxonomy.retry_policy
|
282
|
+
|
283
|
+
options.apply_defaults timeout: @config.timeout,
|
284
|
+
metadata: @config.metadata,
|
285
|
+
retry_policy: @config.retry_policy
|
286
|
+
|
287
|
+
@data_taxonomy_service_stub.call_rpc :create_data_taxonomy, request, options: options do |response, operation|
|
288
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
289
|
+
yield response, operation if block_given?
|
290
|
+
return response
|
291
|
+
end
|
292
|
+
rescue ::GRPC::BadStatus => e
|
293
|
+
raise ::Google::Cloud::Error.from_error(e)
|
294
|
+
end
|
295
|
+
|
296
|
+
##
|
297
|
+
# Updates a DataTaxonomy resource.
|
298
|
+
#
|
299
|
+
# @overload update_data_taxonomy(request, options = nil)
|
300
|
+
# Pass arguments to `update_data_taxonomy` via a request object, either of type
|
301
|
+
# {::Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest} or an equivalent Hash.
|
302
|
+
#
|
303
|
+
# @param request [::Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest, ::Hash]
|
304
|
+
# A request object representing the call parameters. Required. To specify no
|
305
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
306
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
307
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
308
|
+
#
|
309
|
+
# @overload update_data_taxonomy(update_mask: nil, data_taxonomy: nil, validate_only: nil)
|
310
|
+
# Pass arguments to `update_data_taxonomy` via keyword arguments. Note that at
|
311
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
312
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
313
|
+
#
|
314
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
315
|
+
# Required. Mask of fields to update.
|
316
|
+
# @param data_taxonomy [::Google::Cloud::Dataplex::V1::DataTaxonomy, ::Hash]
|
317
|
+
# Required. Only fields specified in `update_mask` are updated.
|
318
|
+
# @param validate_only [::Boolean]
|
319
|
+
# Optional. Only validate the request, but do not perform mutations.
|
320
|
+
# The default is false.
|
321
|
+
#
|
322
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
323
|
+
# @yieldparam response [::Gapic::Operation]
|
324
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
325
|
+
#
|
326
|
+
# @return [::Gapic::Operation]
|
327
|
+
#
|
328
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
329
|
+
#
|
330
|
+
# @example Basic example
|
331
|
+
# require "google/cloud/dataplex/v1"
|
332
|
+
#
|
333
|
+
# # Create a client object. The client can be reused for multiple calls.
|
334
|
+
# client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new
|
335
|
+
#
|
336
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
337
|
+
# request = Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest.new
|
338
|
+
#
|
339
|
+
# # Call the update_data_taxonomy method.
|
340
|
+
# result = client.update_data_taxonomy request
|
341
|
+
#
|
342
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
343
|
+
# # check the status of an operation, cancel it, or wait for results.
|
344
|
+
# # Here is how to wait for a response.
|
345
|
+
# result.wait_until_done! timeout: 60
|
346
|
+
# if result.response?
|
347
|
+
# p result.response
|
348
|
+
# else
|
349
|
+
# puts "No response received."
|
350
|
+
# end
|
351
|
+
#
|
352
|
+
def update_data_taxonomy request, options = nil
|
353
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
354
|
+
|
355
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest
|
356
|
+
|
357
|
+
# Converts hash and nil to an options object
|
358
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
359
|
+
|
360
|
+
# Customize the options with defaults
|
361
|
+
metadata = @config.rpcs.update_data_taxonomy.metadata.to_h
|
362
|
+
|
363
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
364
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
365
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
366
|
+
gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
|
367
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
368
|
+
|
369
|
+
header_params = {}
|
370
|
+
if request.data_taxonomy&.name
|
371
|
+
header_params["data_taxonomy.name"] = request.data_taxonomy.name
|
372
|
+
end
|
373
|
+
|
374
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
375
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
376
|
+
|
377
|
+
options.apply_defaults timeout: @config.rpcs.update_data_taxonomy.timeout,
|
378
|
+
metadata: metadata,
|
379
|
+
retry_policy: @config.rpcs.update_data_taxonomy.retry_policy
|
380
|
+
|
381
|
+
options.apply_defaults timeout: @config.timeout,
|
382
|
+
metadata: @config.metadata,
|
383
|
+
retry_policy: @config.retry_policy
|
384
|
+
|
385
|
+
@data_taxonomy_service_stub.call_rpc :update_data_taxonomy, request, options: options do |response, operation|
|
386
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
387
|
+
yield response, operation if block_given?
|
388
|
+
return response
|
389
|
+
end
|
390
|
+
rescue ::GRPC::BadStatus => e
|
391
|
+
raise ::Google::Cloud::Error.from_error(e)
|
392
|
+
end
|
393
|
+
|
394
|
+
##
|
395
|
+
# Deletes a DataTaxonomy resource. All attributes within the DataTaxonomy
|
396
|
+
# must be deleted before the DataTaxonomy can be deleted.
|
397
|
+
#
|
398
|
+
# @overload delete_data_taxonomy(request, options = nil)
|
399
|
+
# Pass arguments to `delete_data_taxonomy` via a request object, either of type
|
400
|
+
# {::Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest} or an equivalent Hash.
|
401
|
+
#
|
402
|
+
# @param request [::Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest, ::Hash]
|
403
|
+
# A request object representing the call parameters. Required. To specify no
|
404
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
405
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
406
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
407
|
+
#
|
408
|
+
# @overload delete_data_taxonomy(name: nil, etag: nil)
|
409
|
+
# Pass arguments to `delete_data_taxonomy` via keyword arguments. Note that at
|
410
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
411
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
412
|
+
#
|
413
|
+
# @param name [::String]
|
414
|
+
# Required. The resource name of the DataTaxonomy:
|
415
|
+
# projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{data_taxonomy_id}
|
416
|
+
# @param etag [::String]
|
417
|
+
# Optional. If the client provided etag value does not match the current etag
|
418
|
+
# value,the DeleteDataTaxonomy method returns an ABORTED error.
|
419
|
+
#
|
420
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
421
|
+
# @yieldparam response [::Gapic::Operation]
|
422
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
423
|
+
#
|
424
|
+
# @return [::Gapic::Operation]
|
425
|
+
#
|
426
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
427
|
+
#
|
428
|
+
# @example Basic example
|
429
|
+
# require "google/cloud/dataplex/v1"
|
430
|
+
#
|
431
|
+
# # Create a client object. The client can be reused for multiple calls.
|
432
|
+
# client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new
|
433
|
+
#
|
434
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
435
|
+
# request = Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest.new
|
436
|
+
#
|
437
|
+
# # Call the delete_data_taxonomy method.
|
438
|
+
# result = client.delete_data_taxonomy request
|
439
|
+
#
|
440
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
441
|
+
# # check the status of an operation, cancel it, or wait for results.
|
442
|
+
# # Here is how to wait for a response.
|
443
|
+
# result.wait_until_done! timeout: 60
|
444
|
+
# if result.response?
|
445
|
+
# p result.response
|
446
|
+
# else
|
447
|
+
# puts "No response received."
|
448
|
+
# end
|
449
|
+
#
|
450
|
+
def delete_data_taxonomy request, options = nil
|
451
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
452
|
+
|
453
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest
|
454
|
+
|
455
|
+
# Converts hash and nil to an options object
|
456
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
457
|
+
|
458
|
+
# Customize the options with defaults
|
459
|
+
metadata = @config.rpcs.delete_data_taxonomy.metadata.to_h
|
460
|
+
|
461
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
462
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
463
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
464
|
+
gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
|
465
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
466
|
+
|
467
|
+
header_params = {}
|
468
|
+
if request.name
|
469
|
+
header_params["name"] = request.name
|
470
|
+
end
|
471
|
+
|
472
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
473
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
474
|
+
|
475
|
+
options.apply_defaults timeout: @config.rpcs.delete_data_taxonomy.timeout,
|
476
|
+
metadata: metadata,
|
477
|
+
retry_policy: @config.rpcs.delete_data_taxonomy.retry_policy
|
478
|
+
|
479
|
+
options.apply_defaults timeout: @config.timeout,
|
480
|
+
metadata: @config.metadata,
|
481
|
+
retry_policy: @config.retry_policy
|
482
|
+
|
483
|
+
@data_taxonomy_service_stub.call_rpc :delete_data_taxonomy, request, options: options do |response, operation|
|
484
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
485
|
+
yield response, operation if block_given?
|
486
|
+
return response
|
487
|
+
end
|
488
|
+
rescue ::GRPC::BadStatus => e
|
489
|
+
raise ::Google::Cloud::Error.from_error(e)
|
490
|
+
end
|
491
|
+
|
492
|
+
##
|
493
|
+
# Lists DataTaxonomy resources in a project and location.
|
494
|
+
#
|
495
|
+
# @overload list_data_taxonomies(request, options = nil)
|
496
|
+
# Pass arguments to `list_data_taxonomies` via a request object, either of type
|
497
|
+
# {::Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest} or an equivalent Hash.
|
498
|
+
#
|
499
|
+
# @param request [::Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest, ::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 list_data_taxonomies(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
|
506
|
+
# Pass arguments to `list_data_taxonomies` 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 parent [::String]
|
511
|
+
# Required. The resource name of the DataTaxonomy location, of the form:
|
512
|
+
# projects/\\{project_number}/locations/\\{location_id}
|
513
|
+
# where `location_id` refers to a GCP region.
|
514
|
+
# @param page_size [::Integer]
|
515
|
+
# Optional. Maximum number of DataTaxonomies to return. The service may
|
516
|
+
# return fewer than this value. If unspecified, at most 10 DataTaxonomies
|
517
|
+
# will be returned. The maximum value is 1000; values above 1000 will be
|
518
|
+
# coerced to 1000.
|
519
|
+
# @param page_token [::String]
|
520
|
+
# Optional. Page token received from a previous ` ListDataTaxonomies` call.
|
521
|
+
# Provide this to retrieve the subsequent page. When paginating, all other
|
522
|
+
# parameters provided to ` ListDataTaxonomies` must match the call that
|
523
|
+
# provided the page token.
|
524
|
+
# @param filter [::String]
|
525
|
+
# Optional. Filter request.
|
526
|
+
# @param order_by [::String]
|
527
|
+
# Optional. Order by fields for the result.
|
528
|
+
#
|
529
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
530
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataTaxonomy>]
|
531
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
532
|
+
#
|
533
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataTaxonomy>]
|
534
|
+
#
|
535
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
536
|
+
#
|
537
|
+
# @example Basic example
|
538
|
+
# require "google/cloud/dataplex/v1"
|
539
|
+
#
|
540
|
+
# # Create a client object. The client can be reused for multiple calls.
|
541
|
+
# client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new
|
542
|
+
#
|
543
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
544
|
+
# request = Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest.new
|
545
|
+
#
|
546
|
+
# # Call the list_data_taxonomies method.
|
547
|
+
# result = client.list_data_taxonomies request
|
548
|
+
#
|
549
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
550
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
551
|
+
# result.each do |item|
|
552
|
+
# # Each element is of type ::Google::Cloud::Dataplex::V1::DataTaxonomy.
|
553
|
+
# p item
|
554
|
+
# end
|
555
|
+
#
|
556
|
+
def list_data_taxonomies request, options = nil
|
557
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
558
|
+
|
559
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest
|
560
|
+
|
561
|
+
# Converts hash and nil to an options object
|
562
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
563
|
+
|
564
|
+
# Customize the options with defaults
|
565
|
+
metadata = @config.rpcs.list_data_taxonomies.metadata.to_h
|
566
|
+
|
567
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
568
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
569
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
570
|
+
gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
|
571
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
572
|
+
|
573
|
+
header_params = {}
|
574
|
+
if request.parent
|
575
|
+
header_params["parent"] = request.parent
|
576
|
+
end
|
577
|
+
|
578
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
579
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
580
|
+
|
581
|
+
options.apply_defaults timeout: @config.rpcs.list_data_taxonomies.timeout,
|
582
|
+
metadata: metadata,
|
583
|
+
retry_policy: @config.rpcs.list_data_taxonomies.retry_policy
|
584
|
+
|
585
|
+
options.apply_defaults timeout: @config.timeout,
|
586
|
+
metadata: @config.metadata,
|
587
|
+
retry_policy: @config.retry_policy
|
588
|
+
|
589
|
+
@data_taxonomy_service_stub.call_rpc :list_data_taxonomies, request, options: options do |response, operation|
|
590
|
+
response = ::Gapic::PagedEnumerable.new @data_taxonomy_service_stub, :list_data_taxonomies, request, response, operation, options
|
591
|
+
yield response, operation if block_given?
|
592
|
+
return response
|
593
|
+
end
|
594
|
+
rescue ::GRPC::BadStatus => e
|
595
|
+
raise ::Google::Cloud::Error.from_error(e)
|
596
|
+
end
|
597
|
+
|
598
|
+
##
|
599
|
+
# Retrieves a DataTaxonomy resource.
|
600
|
+
#
|
601
|
+
# @overload get_data_taxonomy(request, options = nil)
|
602
|
+
# Pass arguments to `get_data_taxonomy` via a request object, either of type
|
603
|
+
# {::Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest} or an equivalent Hash.
|
604
|
+
#
|
605
|
+
# @param request [::Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest, ::Hash]
|
606
|
+
# A request object representing the call parameters. Required. To specify no
|
607
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
608
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
609
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
610
|
+
#
|
611
|
+
# @overload get_data_taxonomy(name: nil)
|
612
|
+
# Pass arguments to `get_data_taxonomy` via keyword arguments. Note that at
|
613
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
614
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
615
|
+
#
|
616
|
+
# @param name [::String]
|
617
|
+
# Required. The resource name of the DataTaxonomy:
|
618
|
+
# projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{data_taxonomy_id}
|
619
|
+
#
|
620
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
621
|
+
# @yieldparam response [::Google::Cloud::Dataplex::V1::DataTaxonomy]
|
622
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
623
|
+
#
|
624
|
+
# @return [::Google::Cloud::Dataplex::V1::DataTaxonomy]
|
625
|
+
#
|
626
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
627
|
+
#
|
628
|
+
# @example Basic example
|
629
|
+
# require "google/cloud/dataplex/v1"
|
630
|
+
#
|
631
|
+
# # Create a client object. The client can be reused for multiple calls.
|
632
|
+
# client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new
|
633
|
+
#
|
634
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
635
|
+
# request = Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest.new
|
636
|
+
#
|
637
|
+
# # Call the get_data_taxonomy method.
|
638
|
+
# result = client.get_data_taxonomy request
|
639
|
+
#
|
640
|
+
# # The returned object is of type Google::Cloud::Dataplex::V1::DataTaxonomy.
|
641
|
+
# p result
|
642
|
+
#
|
643
|
+
def get_data_taxonomy request, options = nil
|
644
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
645
|
+
|
646
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest
|
647
|
+
|
648
|
+
# Converts hash and nil to an options object
|
649
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
650
|
+
|
651
|
+
# Customize the options with defaults
|
652
|
+
metadata = @config.rpcs.get_data_taxonomy.metadata.to_h
|
653
|
+
|
654
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
655
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
656
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
657
|
+
gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
|
658
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
659
|
+
|
660
|
+
header_params = {}
|
661
|
+
if request.name
|
662
|
+
header_params["name"] = request.name
|
663
|
+
end
|
664
|
+
|
665
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
666
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
667
|
+
|
668
|
+
options.apply_defaults timeout: @config.rpcs.get_data_taxonomy.timeout,
|
669
|
+
metadata: metadata,
|
670
|
+
retry_policy: @config.rpcs.get_data_taxonomy.retry_policy
|
671
|
+
|
672
|
+
options.apply_defaults timeout: @config.timeout,
|
673
|
+
metadata: @config.metadata,
|
674
|
+
retry_policy: @config.retry_policy
|
675
|
+
|
676
|
+
@data_taxonomy_service_stub.call_rpc :get_data_taxonomy, request, options: options do |response, operation|
|
677
|
+
yield response, operation if block_given?
|
678
|
+
return response
|
679
|
+
end
|
680
|
+
rescue ::GRPC::BadStatus => e
|
681
|
+
raise ::Google::Cloud::Error.from_error(e)
|
682
|
+
end
|
683
|
+
|
684
|
+
##
|
685
|
+
# Create a DataAttributeBinding resource.
|
686
|
+
#
|
687
|
+
# @overload create_data_attribute_binding(request, options = nil)
|
688
|
+
# Pass arguments to `create_data_attribute_binding` via a request object, either of type
|
689
|
+
# {::Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest} or an equivalent Hash.
|
690
|
+
#
|
691
|
+
# @param request [::Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest, ::Hash]
|
692
|
+
# A request object representing the call parameters. Required. To specify no
|
693
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
694
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
695
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
696
|
+
#
|
697
|
+
# @overload create_data_attribute_binding(parent: nil, data_attribute_binding_id: nil, data_attribute_binding: nil, validate_only: nil)
|
698
|
+
# Pass arguments to `create_data_attribute_binding` via keyword arguments. Note that at
|
699
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
700
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
701
|
+
#
|
702
|
+
# @param parent [::String]
|
703
|
+
# Required. The resource name of the parent data taxonomy
|
704
|
+
# projects/\\{project_number}/locations/\\{location_id}
|
705
|
+
# @param data_attribute_binding_id [::String]
|
706
|
+
# Required. DataAttributeBinding identifier.
|
707
|
+
# * Must contain only lowercase letters, numbers and hyphens.
|
708
|
+
# * Must start with a letter.
|
709
|
+
# * Must be between 1-63 characters.
|
710
|
+
# * Must end with a number or a letter.
|
711
|
+
# * Must be unique within the Location.
|
712
|
+
# @param data_attribute_binding [::Google::Cloud::Dataplex::V1::DataAttributeBinding, ::Hash]
|
713
|
+
# Required. DataAttributeBinding resource.
|
714
|
+
# @param validate_only [::Boolean]
|
715
|
+
# Optional. Only validate the request, but do not perform mutations.
|
716
|
+
# The default is false.
|
717
|
+
#
|
718
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
719
|
+
# @yieldparam response [::Gapic::Operation]
|
720
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
721
|
+
#
|
722
|
+
# @return [::Gapic::Operation]
|
723
|
+
#
|
724
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
725
|
+
#
|
726
|
+
# @example Basic example
|
727
|
+
# require "google/cloud/dataplex/v1"
|
728
|
+
#
|
729
|
+
# # Create a client object. The client can be reused for multiple calls.
|
730
|
+
# client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new
|
731
|
+
#
|
732
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
733
|
+
# request = Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest.new
|
734
|
+
#
|
735
|
+
# # Call the create_data_attribute_binding method.
|
736
|
+
# result = client.create_data_attribute_binding request
|
737
|
+
#
|
738
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
739
|
+
# # check the status of an operation, cancel it, or wait for results.
|
740
|
+
# # Here is how to wait for a response.
|
741
|
+
# result.wait_until_done! timeout: 60
|
742
|
+
# if result.response?
|
743
|
+
# p result.response
|
744
|
+
# else
|
745
|
+
# puts "No response received."
|
746
|
+
# end
|
747
|
+
#
|
748
|
+
def create_data_attribute_binding request, options = nil
|
749
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
750
|
+
|
751
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest
|
752
|
+
|
753
|
+
# Converts hash and nil to an options object
|
754
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
755
|
+
|
756
|
+
# Customize the options with defaults
|
757
|
+
metadata = @config.rpcs.create_data_attribute_binding.metadata.to_h
|
758
|
+
|
759
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
760
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
761
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
762
|
+
gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
|
763
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
764
|
+
|
765
|
+
header_params = {}
|
766
|
+
if request.parent
|
767
|
+
header_params["parent"] = request.parent
|
768
|
+
end
|
769
|
+
|
770
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
771
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
772
|
+
|
773
|
+
options.apply_defaults timeout: @config.rpcs.create_data_attribute_binding.timeout,
|
774
|
+
metadata: metadata,
|
775
|
+
retry_policy: @config.rpcs.create_data_attribute_binding.retry_policy
|
776
|
+
|
777
|
+
options.apply_defaults timeout: @config.timeout,
|
778
|
+
metadata: @config.metadata,
|
779
|
+
retry_policy: @config.retry_policy
|
780
|
+
|
781
|
+
@data_taxonomy_service_stub.call_rpc :create_data_attribute_binding, request, options: options do |response, operation|
|
782
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
783
|
+
yield response, operation if block_given?
|
784
|
+
return response
|
785
|
+
end
|
786
|
+
rescue ::GRPC::BadStatus => e
|
787
|
+
raise ::Google::Cloud::Error.from_error(e)
|
788
|
+
end
|
789
|
+
|
790
|
+
##
|
791
|
+
# Updates a DataAttributeBinding resource.
|
792
|
+
#
|
793
|
+
# @overload update_data_attribute_binding(request, options = nil)
|
794
|
+
# Pass arguments to `update_data_attribute_binding` via a request object, either of type
|
795
|
+
# {::Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest} or an equivalent Hash.
|
796
|
+
#
|
797
|
+
# @param request [::Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest, ::Hash]
|
798
|
+
# A request object representing the call parameters. Required. To specify no
|
799
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
800
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
801
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
802
|
+
#
|
803
|
+
# @overload update_data_attribute_binding(update_mask: nil, data_attribute_binding: nil, validate_only: nil)
|
804
|
+
# Pass arguments to `update_data_attribute_binding` via keyword arguments. Note that at
|
805
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
806
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
807
|
+
#
|
808
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
809
|
+
# Required. Mask of fields to update.
|
810
|
+
# @param data_attribute_binding [::Google::Cloud::Dataplex::V1::DataAttributeBinding, ::Hash]
|
811
|
+
# Required. Only fields specified in `update_mask` are updated.
|
812
|
+
# @param validate_only [::Boolean]
|
813
|
+
# Optional. Only validate the request, but do not perform mutations.
|
814
|
+
# The default is false.
|
815
|
+
#
|
816
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
817
|
+
# @yieldparam response [::Gapic::Operation]
|
818
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
819
|
+
#
|
820
|
+
# @return [::Gapic::Operation]
|
821
|
+
#
|
822
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
823
|
+
#
|
824
|
+
# @example Basic example
|
825
|
+
# require "google/cloud/dataplex/v1"
|
826
|
+
#
|
827
|
+
# # Create a client object. The client can be reused for multiple calls.
|
828
|
+
# client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new
|
829
|
+
#
|
830
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
831
|
+
# request = Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest.new
|
832
|
+
#
|
833
|
+
# # Call the update_data_attribute_binding method.
|
834
|
+
# result = client.update_data_attribute_binding request
|
835
|
+
#
|
836
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
837
|
+
# # check the status of an operation, cancel it, or wait for results.
|
838
|
+
# # Here is how to wait for a response.
|
839
|
+
# result.wait_until_done! timeout: 60
|
840
|
+
# if result.response?
|
841
|
+
# p result.response
|
842
|
+
# else
|
843
|
+
# puts "No response received."
|
844
|
+
# end
|
845
|
+
#
|
846
|
+
def update_data_attribute_binding request, options = nil
|
847
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
848
|
+
|
849
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest
|
850
|
+
|
851
|
+
# Converts hash and nil to an options object
|
852
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
853
|
+
|
854
|
+
# Customize the options with defaults
|
855
|
+
metadata = @config.rpcs.update_data_attribute_binding.metadata.to_h
|
856
|
+
|
857
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
858
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
859
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
860
|
+
gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
|
861
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
862
|
+
|
863
|
+
header_params = {}
|
864
|
+
if request.data_attribute_binding&.name
|
865
|
+
header_params["data_attribute_binding.name"] = request.data_attribute_binding.name
|
866
|
+
end
|
867
|
+
|
868
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
869
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
870
|
+
|
871
|
+
options.apply_defaults timeout: @config.rpcs.update_data_attribute_binding.timeout,
|
872
|
+
metadata: metadata,
|
873
|
+
retry_policy: @config.rpcs.update_data_attribute_binding.retry_policy
|
874
|
+
|
875
|
+
options.apply_defaults timeout: @config.timeout,
|
876
|
+
metadata: @config.metadata,
|
877
|
+
retry_policy: @config.retry_policy
|
878
|
+
|
879
|
+
@data_taxonomy_service_stub.call_rpc :update_data_attribute_binding, request, options: options do |response, operation|
|
880
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
881
|
+
yield response, operation if block_given?
|
882
|
+
return response
|
883
|
+
end
|
884
|
+
rescue ::GRPC::BadStatus => e
|
885
|
+
raise ::Google::Cloud::Error.from_error(e)
|
886
|
+
end
|
887
|
+
|
888
|
+
##
|
889
|
+
# Deletes a DataAttributeBinding resource. All attributes within the
|
890
|
+
# DataAttributeBinding must be deleted before the DataAttributeBinding can be
|
891
|
+
# deleted.
|
892
|
+
#
|
893
|
+
# @overload delete_data_attribute_binding(request, options = nil)
|
894
|
+
# Pass arguments to `delete_data_attribute_binding` via a request object, either of type
|
895
|
+
# {::Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest} or an equivalent Hash.
|
896
|
+
#
|
897
|
+
# @param request [::Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest, ::Hash]
|
898
|
+
# A request object representing the call parameters. Required. To specify no
|
899
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
900
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
901
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
902
|
+
#
|
903
|
+
# @overload delete_data_attribute_binding(name: nil, etag: nil)
|
904
|
+
# Pass arguments to `delete_data_attribute_binding` via keyword arguments. Note that at
|
905
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
906
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
907
|
+
#
|
908
|
+
# @param name [::String]
|
909
|
+
# Required. The resource name of the DataAttributeBinding:
|
910
|
+
# projects/\\{project_number}/locations/\\{location_id}/dataAttributeBindings/\\{data_attribute_binding_id}
|
911
|
+
# @param etag [::String]
|
912
|
+
# Required. If the client provided etag value does not match the current etag
|
913
|
+
# value, the DeleteDataAttributeBindingRequest method returns an ABORTED
|
914
|
+
# error response. Etags must be used when calling the
|
915
|
+
# DeleteDataAttributeBinding.
|
916
|
+
#
|
917
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
918
|
+
# @yieldparam response [::Gapic::Operation]
|
919
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
920
|
+
#
|
921
|
+
# @return [::Gapic::Operation]
|
922
|
+
#
|
923
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
924
|
+
#
|
925
|
+
# @example Basic example
|
926
|
+
# require "google/cloud/dataplex/v1"
|
927
|
+
#
|
928
|
+
# # Create a client object. The client can be reused for multiple calls.
|
929
|
+
# client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new
|
930
|
+
#
|
931
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
932
|
+
# request = Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest.new
|
933
|
+
#
|
934
|
+
# # Call the delete_data_attribute_binding method.
|
935
|
+
# result = client.delete_data_attribute_binding request
|
936
|
+
#
|
937
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
938
|
+
# # check the status of an operation, cancel it, or wait for results.
|
939
|
+
# # Here is how to wait for a response.
|
940
|
+
# result.wait_until_done! timeout: 60
|
941
|
+
# if result.response?
|
942
|
+
# p result.response
|
943
|
+
# else
|
944
|
+
# puts "No response received."
|
945
|
+
# end
|
946
|
+
#
|
947
|
+
def delete_data_attribute_binding request, options = nil
|
948
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
949
|
+
|
950
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest
|
951
|
+
|
952
|
+
# Converts hash and nil to an options object
|
953
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
954
|
+
|
955
|
+
# Customize the options with defaults
|
956
|
+
metadata = @config.rpcs.delete_data_attribute_binding.metadata.to_h
|
957
|
+
|
958
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
959
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
960
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
961
|
+
gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
|
962
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
963
|
+
|
964
|
+
header_params = {}
|
965
|
+
if request.name
|
966
|
+
header_params["name"] = request.name
|
967
|
+
end
|
968
|
+
|
969
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
970
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
971
|
+
|
972
|
+
options.apply_defaults timeout: @config.rpcs.delete_data_attribute_binding.timeout,
|
973
|
+
metadata: metadata,
|
974
|
+
retry_policy: @config.rpcs.delete_data_attribute_binding.retry_policy
|
975
|
+
|
976
|
+
options.apply_defaults timeout: @config.timeout,
|
977
|
+
metadata: @config.metadata,
|
978
|
+
retry_policy: @config.retry_policy
|
979
|
+
|
980
|
+
@data_taxonomy_service_stub.call_rpc :delete_data_attribute_binding, request, options: options do |response, operation|
|
981
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
982
|
+
yield response, operation if block_given?
|
983
|
+
return response
|
984
|
+
end
|
985
|
+
rescue ::GRPC::BadStatus => e
|
986
|
+
raise ::Google::Cloud::Error.from_error(e)
|
987
|
+
end
|
988
|
+
|
989
|
+
##
|
990
|
+
# Lists DataAttributeBinding resources in a project and location.
|
991
|
+
#
|
992
|
+
# @overload list_data_attribute_bindings(request, options = nil)
|
993
|
+
# Pass arguments to `list_data_attribute_bindings` via a request object, either of type
|
994
|
+
# {::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest} or an equivalent Hash.
|
995
|
+
#
|
996
|
+
# @param request [::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest, ::Hash]
|
997
|
+
# A request object representing the call parameters. Required. To specify no
|
998
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
999
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1000
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1001
|
+
#
|
1002
|
+
# @overload list_data_attribute_bindings(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
|
1003
|
+
# Pass arguments to `list_data_attribute_bindings` via keyword arguments. Note that at
|
1004
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1005
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1006
|
+
#
|
1007
|
+
# @param parent [::String]
|
1008
|
+
# Required. The resource name of the Location:
|
1009
|
+
# projects/\\{project_number}/locations/\\{location_id}
|
1010
|
+
# @param page_size [::Integer]
|
1011
|
+
# Optional. Maximum number of DataAttributeBindings to return. The service
|
1012
|
+
# may return fewer than this value. If unspecified, at most 10
|
1013
|
+
# DataAttributeBindings will be returned. The maximum value is 1000; values
|
1014
|
+
# above 1000 will be coerced to 1000.
|
1015
|
+
# @param page_token [::String]
|
1016
|
+
# Optional. Page token received from a previous `ListDataAttributeBindings`
|
1017
|
+
# call. Provide this to retrieve the subsequent page. When paginating, all
|
1018
|
+
# other parameters provided to `ListDataAttributeBindings` must match the
|
1019
|
+
# call that provided the page token.
|
1020
|
+
# @param filter [::String]
|
1021
|
+
# Optional. Filter request.
|
1022
|
+
# Filter using resource: filter=resource:"resource-name"
|
1023
|
+
# Filter using attribute: filter=attributes:"attribute-name"
|
1024
|
+
# Filter using attribute in paths list:
|
1025
|
+
# filter=paths.attributes:"attribute-name"
|
1026
|
+
# @param order_by [::String]
|
1027
|
+
# Optional. Order by fields for the result.
|
1028
|
+
#
|
1029
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1030
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataAttributeBinding>]
|
1031
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1032
|
+
#
|
1033
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataAttributeBinding>]
|
1034
|
+
#
|
1035
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1036
|
+
#
|
1037
|
+
# @example Basic example
|
1038
|
+
# require "google/cloud/dataplex/v1"
|
1039
|
+
#
|
1040
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1041
|
+
# client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new
|
1042
|
+
#
|
1043
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1044
|
+
# request = Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest.new
|
1045
|
+
#
|
1046
|
+
# # Call the list_data_attribute_bindings method.
|
1047
|
+
# result = client.list_data_attribute_bindings request
|
1048
|
+
#
|
1049
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
1050
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
1051
|
+
# result.each do |item|
|
1052
|
+
# # Each element is of type ::Google::Cloud::Dataplex::V1::DataAttributeBinding.
|
1053
|
+
# p item
|
1054
|
+
# end
|
1055
|
+
#
|
1056
|
+
def list_data_attribute_bindings request, options = nil
|
1057
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1058
|
+
|
1059
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest
|
1060
|
+
|
1061
|
+
# Converts hash and nil to an options object
|
1062
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1063
|
+
|
1064
|
+
# Customize the options with defaults
|
1065
|
+
metadata = @config.rpcs.list_data_attribute_bindings.metadata.to_h
|
1066
|
+
|
1067
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1068
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1069
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1070
|
+
gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
|
1071
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1072
|
+
|
1073
|
+
header_params = {}
|
1074
|
+
if request.parent
|
1075
|
+
header_params["parent"] = request.parent
|
1076
|
+
end
|
1077
|
+
|
1078
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1079
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1080
|
+
|
1081
|
+
options.apply_defaults timeout: @config.rpcs.list_data_attribute_bindings.timeout,
|
1082
|
+
metadata: metadata,
|
1083
|
+
retry_policy: @config.rpcs.list_data_attribute_bindings.retry_policy
|
1084
|
+
|
1085
|
+
options.apply_defaults timeout: @config.timeout,
|
1086
|
+
metadata: @config.metadata,
|
1087
|
+
retry_policy: @config.retry_policy
|
1088
|
+
|
1089
|
+
@data_taxonomy_service_stub.call_rpc :list_data_attribute_bindings, request, options: options do |response, operation|
|
1090
|
+
response = ::Gapic::PagedEnumerable.new @data_taxonomy_service_stub, :list_data_attribute_bindings, request, response, operation, options
|
1091
|
+
yield response, operation if block_given?
|
1092
|
+
return response
|
1093
|
+
end
|
1094
|
+
rescue ::GRPC::BadStatus => e
|
1095
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1096
|
+
end
|
1097
|
+
|
1098
|
+
##
|
1099
|
+
# Retrieves a DataAttributeBinding resource.
|
1100
|
+
#
|
1101
|
+
# @overload get_data_attribute_binding(request, options = nil)
|
1102
|
+
# Pass arguments to `get_data_attribute_binding` via a request object, either of type
|
1103
|
+
# {::Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest} or an equivalent Hash.
|
1104
|
+
#
|
1105
|
+
# @param request [::Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest, ::Hash]
|
1106
|
+
# A request object representing the call parameters. Required. To specify no
|
1107
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1108
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1109
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1110
|
+
#
|
1111
|
+
# @overload get_data_attribute_binding(name: nil)
|
1112
|
+
# Pass arguments to `get_data_attribute_binding` via keyword arguments. Note that at
|
1113
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1114
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1115
|
+
#
|
1116
|
+
# @param name [::String]
|
1117
|
+
# Required. The resource name of the DataAttributeBinding:
|
1118
|
+
# projects/\\{project_number}/locations/\\{location_id}/dataAttributeBindings/\\{data_attribute_binding_id}
|
1119
|
+
#
|
1120
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1121
|
+
# @yieldparam response [::Google::Cloud::Dataplex::V1::DataAttributeBinding]
|
1122
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1123
|
+
#
|
1124
|
+
# @return [::Google::Cloud::Dataplex::V1::DataAttributeBinding]
|
1125
|
+
#
|
1126
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1127
|
+
#
|
1128
|
+
# @example Basic example
|
1129
|
+
# require "google/cloud/dataplex/v1"
|
1130
|
+
#
|
1131
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1132
|
+
# client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new
|
1133
|
+
#
|
1134
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1135
|
+
# request = Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest.new
|
1136
|
+
#
|
1137
|
+
# # Call the get_data_attribute_binding method.
|
1138
|
+
# result = client.get_data_attribute_binding request
|
1139
|
+
#
|
1140
|
+
# # The returned object is of type Google::Cloud::Dataplex::V1::DataAttributeBinding.
|
1141
|
+
# p result
|
1142
|
+
#
|
1143
|
+
def get_data_attribute_binding request, options = nil
|
1144
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1145
|
+
|
1146
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest
|
1147
|
+
|
1148
|
+
# Converts hash and nil to an options object
|
1149
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1150
|
+
|
1151
|
+
# Customize the options with defaults
|
1152
|
+
metadata = @config.rpcs.get_data_attribute_binding.metadata.to_h
|
1153
|
+
|
1154
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1155
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1156
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1157
|
+
gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
|
1158
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1159
|
+
|
1160
|
+
header_params = {}
|
1161
|
+
if request.name
|
1162
|
+
header_params["name"] = request.name
|
1163
|
+
end
|
1164
|
+
|
1165
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1166
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1167
|
+
|
1168
|
+
options.apply_defaults timeout: @config.rpcs.get_data_attribute_binding.timeout,
|
1169
|
+
metadata: metadata,
|
1170
|
+
retry_policy: @config.rpcs.get_data_attribute_binding.retry_policy
|
1171
|
+
|
1172
|
+
options.apply_defaults timeout: @config.timeout,
|
1173
|
+
metadata: @config.metadata,
|
1174
|
+
retry_policy: @config.retry_policy
|
1175
|
+
|
1176
|
+
@data_taxonomy_service_stub.call_rpc :get_data_attribute_binding, request, options: options do |response, operation|
|
1177
|
+
yield response, operation if block_given?
|
1178
|
+
return response
|
1179
|
+
end
|
1180
|
+
rescue ::GRPC::BadStatus => e
|
1181
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1182
|
+
end
|
1183
|
+
|
1184
|
+
##
|
1185
|
+
# Create a DataAttribute resource.
|
1186
|
+
#
|
1187
|
+
# @overload create_data_attribute(request, options = nil)
|
1188
|
+
# Pass arguments to `create_data_attribute` via a request object, either of type
|
1189
|
+
# {::Google::Cloud::Dataplex::V1::CreateDataAttributeRequest} or an equivalent Hash.
|
1190
|
+
#
|
1191
|
+
# @param request [::Google::Cloud::Dataplex::V1::CreateDataAttributeRequest, ::Hash]
|
1192
|
+
# A request object representing the call parameters. Required. To specify no
|
1193
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1194
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1195
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1196
|
+
#
|
1197
|
+
# @overload create_data_attribute(parent: nil, data_attribute_id: nil, data_attribute: nil, validate_only: nil)
|
1198
|
+
# Pass arguments to `create_data_attribute` via keyword arguments. Note that at
|
1199
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1200
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1201
|
+
#
|
1202
|
+
# @param parent [::String]
|
1203
|
+
# Required. The resource name of the parent data taxonomy
|
1204
|
+
# projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{data_taxonomy_id}
|
1205
|
+
# @param data_attribute_id [::String]
|
1206
|
+
# Required. DataAttribute identifier.
|
1207
|
+
# * Must contain only lowercase letters, numbers and hyphens.
|
1208
|
+
# * Must start with a letter.
|
1209
|
+
# * Must be between 1-63 characters.
|
1210
|
+
# * Must end with a number or a letter.
|
1211
|
+
# * Must be unique within the DataTaxonomy.
|
1212
|
+
# @param data_attribute [::Google::Cloud::Dataplex::V1::DataAttribute, ::Hash]
|
1213
|
+
# Required. DataAttribute resource.
|
1214
|
+
# @param validate_only [::Boolean]
|
1215
|
+
# Optional. Only validate the request, but do not perform mutations.
|
1216
|
+
# The default is false.
|
1217
|
+
#
|
1218
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1219
|
+
# @yieldparam response [::Gapic::Operation]
|
1220
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1221
|
+
#
|
1222
|
+
# @return [::Gapic::Operation]
|
1223
|
+
#
|
1224
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1225
|
+
#
|
1226
|
+
# @example Basic example
|
1227
|
+
# require "google/cloud/dataplex/v1"
|
1228
|
+
#
|
1229
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1230
|
+
# client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new
|
1231
|
+
#
|
1232
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1233
|
+
# request = Google::Cloud::Dataplex::V1::CreateDataAttributeRequest.new
|
1234
|
+
#
|
1235
|
+
# # Call the create_data_attribute method.
|
1236
|
+
# result = client.create_data_attribute request
|
1237
|
+
#
|
1238
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1239
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1240
|
+
# # Here is how to wait for a response.
|
1241
|
+
# result.wait_until_done! timeout: 60
|
1242
|
+
# if result.response?
|
1243
|
+
# p result.response
|
1244
|
+
# else
|
1245
|
+
# puts "No response received."
|
1246
|
+
# end
|
1247
|
+
#
|
1248
|
+
def create_data_attribute request, options = nil
|
1249
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1250
|
+
|
1251
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateDataAttributeRequest
|
1252
|
+
|
1253
|
+
# Converts hash and nil to an options object
|
1254
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1255
|
+
|
1256
|
+
# Customize the options with defaults
|
1257
|
+
metadata = @config.rpcs.create_data_attribute.metadata.to_h
|
1258
|
+
|
1259
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1260
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1261
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1262
|
+
gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
|
1263
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1264
|
+
|
1265
|
+
header_params = {}
|
1266
|
+
if request.parent
|
1267
|
+
header_params["parent"] = request.parent
|
1268
|
+
end
|
1269
|
+
|
1270
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1271
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1272
|
+
|
1273
|
+
options.apply_defaults timeout: @config.rpcs.create_data_attribute.timeout,
|
1274
|
+
metadata: metadata,
|
1275
|
+
retry_policy: @config.rpcs.create_data_attribute.retry_policy
|
1276
|
+
|
1277
|
+
options.apply_defaults timeout: @config.timeout,
|
1278
|
+
metadata: @config.metadata,
|
1279
|
+
retry_policy: @config.retry_policy
|
1280
|
+
|
1281
|
+
@data_taxonomy_service_stub.call_rpc :create_data_attribute, request, options: options do |response, operation|
|
1282
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1283
|
+
yield response, operation if block_given?
|
1284
|
+
return response
|
1285
|
+
end
|
1286
|
+
rescue ::GRPC::BadStatus => e
|
1287
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1288
|
+
end
|
1289
|
+
|
1290
|
+
##
|
1291
|
+
# Updates a DataAttribute resource.
|
1292
|
+
#
|
1293
|
+
# @overload update_data_attribute(request, options = nil)
|
1294
|
+
# Pass arguments to `update_data_attribute` via a request object, either of type
|
1295
|
+
# {::Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest} or an equivalent Hash.
|
1296
|
+
#
|
1297
|
+
# @param request [::Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest, ::Hash]
|
1298
|
+
# A request object representing the call parameters. Required. To specify no
|
1299
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1300
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1301
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1302
|
+
#
|
1303
|
+
# @overload update_data_attribute(update_mask: nil, data_attribute: nil, validate_only: nil)
|
1304
|
+
# Pass arguments to `update_data_attribute` via keyword arguments. Note that at
|
1305
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1306
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1307
|
+
#
|
1308
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
1309
|
+
# Required. Mask of fields to update.
|
1310
|
+
# @param data_attribute [::Google::Cloud::Dataplex::V1::DataAttribute, ::Hash]
|
1311
|
+
# Required. Only fields specified in `update_mask` are updated.
|
1312
|
+
# @param validate_only [::Boolean]
|
1313
|
+
# Optional. Only validate the request, but do not perform mutations.
|
1314
|
+
# The default is false.
|
1315
|
+
#
|
1316
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1317
|
+
# @yieldparam response [::Gapic::Operation]
|
1318
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1319
|
+
#
|
1320
|
+
# @return [::Gapic::Operation]
|
1321
|
+
#
|
1322
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1323
|
+
#
|
1324
|
+
# @example Basic example
|
1325
|
+
# require "google/cloud/dataplex/v1"
|
1326
|
+
#
|
1327
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1328
|
+
# client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new
|
1329
|
+
#
|
1330
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1331
|
+
# request = Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest.new
|
1332
|
+
#
|
1333
|
+
# # Call the update_data_attribute method.
|
1334
|
+
# result = client.update_data_attribute request
|
1335
|
+
#
|
1336
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1337
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1338
|
+
# # Here is how to wait for a response.
|
1339
|
+
# result.wait_until_done! timeout: 60
|
1340
|
+
# if result.response?
|
1341
|
+
# p result.response
|
1342
|
+
# else
|
1343
|
+
# puts "No response received."
|
1344
|
+
# end
|
1345
|
+
#
|
1346
|
+
def update_data_attribute request, options = nil
|
1347
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1348
|
+
|
1349
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest
|
1350
|
+
|
1351
|
+
# Converts hash and nil to an options object
|
1352
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1353
|
+
|
1354
|
+
# Customize the options with defaults
|
1355
|
+
metadata = @config.rpcs.update_data_attribute.metadata.to_h
|
1356
|
+
|
1357
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1358
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1359
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1360
|
+
gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
|
1361
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1362
|
+
|
1363
|
+
header_params = {}
|
1364
|
+
if request.data_attribute&.name
|
1365
|
+
header_params["data_attribute.name"] = request.data_attribute.name
|
1366
|
+
end
|
1367
|
+
|
1368
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1369
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1370
|
+
|
1371
|
+
options.apply_defaults timeout: @config.rpcs.update_data_attribute.timeout,
|
1372
|
+
metadata: metadata,
|
1373
|
+
retry_policy: @config.rpcs.update_data_attribute.retry_policy
|
1374
|
+
|
1375
|
+
options.apply_defaults timeout: @config.timeout,
|
1376
|
+
metadata: @config.metadata,
|
1377
|
+
retry_policy: @config.retry_policy
|
1378
|
+
|
1379
|
+
@data_taxonomy_service_stub.call_rpc :update_data_attribute, request, options: options do |response, operation|
|
1380
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1381
|
+
yield response, operation if block_given?
|
1382
|
+
return response
|
1383
|
+
end
|
1384
|
+
rescue ::GRPC::BadStatus => e
|
1385
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1386
|
+
end
|
1387
|
+
|
1388
|
+
##
|
1389
|
+
# Deletes a Data Attribute resource.
|
1390
|
+
#
|
1391
|
+
# @overload delete_data_attribute(request, options = nil)
|
1392
|
+
# Pass arguments to `delete_data_attribute` via a request object, either of type
|
1393
|
+
# {::Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest} or an equivalent Hash.
|
1394
|
+
#
|
1395
|
+
# @param request [::Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest, ::Hash]
|
1396
|
+
# A request object representing the call parameters. Required. To specify no
|
1397
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1398
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1399
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1400
|
+
#
|
1401
|
+
# @overload delete_data_attribute(name: nil, etag: nil)
|
1402
|
+
# Pass arguments to `delete_data_attribute` via keyword arguments. Note that at
|
1403
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1404
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1405
|
+
#
|
1406
|
+
# @param name [::String]
|
1407
|
+
# Required. The resource name of the DataAttribute:
|
1408
|
+
# projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{dataTaxonomy}/attributes/\\{data_attribute_id}
|
1409
|
+
# @param etag [::String]
|
1410
|
+
# Optional. If the client provided etag value does not match the current etag
|
1411
|
+
# value, the DeleteDataAttribute method returns an ABORTED error response.
|
1412
|
+
#
|
1413
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1414
|
+
# @yieldparam response [::Gapic::Operation]
|
1415
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1416
|
+
#
|
1417
|
+
# @return [::Gapic::Operation]
|
1418
|
+
#
|
1419
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1420
|
+
#
|
1421
|
+
# @example Basic example
|
1422
|
+
# require "google/cloud/dataplex/v1"
|
1423
|
+
#
|
1424
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1425
|
+
# client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new
|
1426
|
+
#
|
1427
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1428
|
+
# request = Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest.new
|
1429
|
+
#
|
1430
|
+
# # Call the delete_data_attribute method.
|
1431
|
+
# result = client.delete_data_attribute request
|
1432
|
+
#
|
1433
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1434
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1435
|
+
# # Here is how to wait for a response.
|
1436
|
+
# result.wait_until_done! timeout: 60
|
1437
|
+
# if result.response?
|
1438
|
+
# p result.response
|
1439
|
+
# else
|
1440
|
+
# puts "No response received."
|
1441
|
+
# end
|
1442
|
+
#
|
1443
|
+
def delete_data_attribute request, options = nil
|
1444
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1445
|
+
|
1446
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest
|
1447
|
+
|
1448
|
+
# Converts hash and nil to an options object
|
1449
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1450
|
+
|
1451
|
+
# Customize the options with defaults
|
1452
|
+
metadata = @config.rpcs.delete_data_attribute.metadata.to_h
|
1453
|
+
|
1454
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1455
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1456
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1457
|
+
gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
|
1458
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1459
|
+
|
1460
|
+
header_params = {}
|
1461
|
+
if request.name
|
1462
|
+
header_params["name"] = request.name
|
1463
|
+
end
|
1464
|
+
|
1465
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1466
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1467
|
+
|
1468
|
+
options.apply_defaults timeout: @config.rpcs.delete_data_attribute.timeout,
|
1469
|
+
metadata: metadata,
|
1470
|
+
retry_policy: @config.rpcs.delete_data_attribute.retry_policy
|
1471
|
+
|
1472
|
+
options.apply_defaults timeout: @config.timeout,
|
1473
|
+
metadata: @config.metadata,
|
1474
|
+
retry_policy: @config.retry_policy
|
1475
|
+
|
1476
|
+
@data_taxonomy_service_stub.call_rpc :delete_data_attribute, request, options: options do |response, operation|
|
1477
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1478
|
+
yield response, operation if block_given?
|
1479
|
+
return response
|
1480
|
+
end
|
1481
|
+
rescue ::GRPC::BadStatus => e
|
1482
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1483
|
+
end
|
1484
|
+
|
1485
|
+
##
|
1486
|
+
# Lists Data Attribute resources in a DataTaxonomy.
|
1487
|
+
#
|
1488
|
+
# @overload list_data_attributes(request, options = nil)
|
1489
|
+
# Pass arguments to `list_data_attributes` via a request object, either of type
|
1490
|
+
# {::Google::Cloud::Dataplex::V1::ListDataAttributesRequest} or an equivalent Hash.
|
1491
|
+
#
|
1492
|
+
# @param request [::Google::Cloud::Dataplex::V1::ListDataAttributesRequest, ::Hash]
|
1493
|
+
# A request object representing the call parameters. Required. To specify no
|
1494
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1495
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1496
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1497
|
+
#
|
1498
|
+
# @overload list_data_attributes(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
|
1499
|
+
# Pass arguments to `list_data_attributes` via keyword arguments. Note that at
|
1500
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1501
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1502
|
+
#
|
1503
|
+
# @param parent [::String]
|
1504
|
+
# Required. The resource name of the DataTaxonomy:
|
1505
|
+
# projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{data_taxonomy_id}
|
1506
|
+
# @param page_size [::Integer]
|
1507
|
+
# Optional. Maximum number of DataAttributes to return. The service may
|
1508
|
+
# return fewer than this value. If unspecified, at most 10 dataAttributes
|
1509
|
+
# will be returned. The maximum value is 1000; values above 1000 will be
|
1510
|
+
# coerced to 1000.
|
1511
|
+
# @param page_token [::String]
|
1512
|
+
# Optional. Page token received from a previous `ListDataAttributes` call.
|
1513
|
+
# Provide this to retrieve the subsequent page. When paginating, all other
|
1514
|
+
# parameters provided to `ListDataAttributes` must match the call that
|
1515
|
+
# provided the page token.
|
1516
|
+
# @param filter [::String]
|
1517
|
+
# Optional. Filter request.
|
1518
|
+
# @param order_by [::String]
|
1519
|
+
# Optional. Order by fields for the result.
|
1520
|
+
#
|
1521
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1522
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataAttribute>]
|
1523
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1524
|
+
#
|
1525
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataAttribute>]
|
1526
|
+
#
|
1527
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1528
|
+
#
|
1529
|
+
# @example Basic example
|
1530
|
+
# require "google/cloud/dataplex/v1"
|
1531
|
+
#
|
1532
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1533
|
+
# client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new
|
1534
|
+
#
|
1535
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1536
|
+
# request = Google::Cloud::Dataplex::V1::ListDataAttributesRequest.new
|
1537
|
+
#
|
1538
|
+
# # Call the list_data_attributes method.
|
1539
|
+
# result = client.list_data_attributes request
|
1540
|
+
#
|
1541
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
1542
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
1543
|
+
# result.each do |item|
|
1544
|
+
# # Each element is of type ::Google::Cloud::Dataplex::V1::DataAttribute.
|
1545
|
+
# p item
|
1546
|
+
# end
|
1547
|
+
#
|
1548
|
+
def list_data_attributes request, options = nil
|
1549
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1550
|
+
|
1551
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListDataAttributesRequest
|
1552
|
+
|
1553
|
+
# Converts hash and nil to an options object
|
1554
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1555
|
+
|
1556
|
+
# Customize the options with defaults
|
1557
|
+
metadata = @config.rpcs.list_data_attributes.metadata.to_h
|
1558
|
+
|
1559
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1560
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1561
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1562
|
+
gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
|
1563
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1564
|
+
|
1565
|
+
header_params = {}
|
1566
|
+
if request.parent
|
1567
|
+
header_params["parent"] = request.parent
|
1568
|
+
end
|
1569
|
+
|
1570
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1571
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1572
|
+
|
1573
|
+
options.apply_defaults timeout: @config.rpcs.list_data_attributes.timeout,
|
1574
|
+
metadata: metadata,
|
1575
|
+
retry_policy: @config.rpcs.list_data_attributes.retry_policy
|
1576
|
+
|
1577
|
+
options.apply_defaults timeout: @config.timeout,
|
1578
|
+
metadata: @config.metadata,
|
1579
|
+
retry_policy: @config.retry_policy
|
1580
|
+
|
1581
|
+
@data_taxonomy_service_stub.call_rpc :list_data_attributes, request, options: options do |response, operation|
|
1582
|
+
response = ::Gapic::PagedEnumerable.new @data_taxonomy_service_stub, :list_data_attributes, request, response, operation, options
|
1583
|
+
yield response, operation if block_given?
|
1584
|
+
return response
|
1585
|
+
end
|
1586
|
+
rescue ::GRPC::BadStatus => e
|
1587
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1588
|
+
end
|
1589
|
+
|
1590
|
+
##
|
1591
|
+
# Retrieves a Data Attribute resource.
|
1592
|
+
#
|
1593
|
+
# @overload get_data_attribute(request, options = nil)
|
1594
|
+
# Pass arguments to `get_data_attribute` via a request object, either of type
|
1595
|
+
# {::Google::Cloud::Dataplex::V1::GetDataAttributeRequest} or an equivalent Hash.
|
1596
|
+
#
|
1597
|
+
# @param request [::Google::Cloud::Dataplex::V1::GetDataAttributeRequest, ::Hash]
|
1598
|
+
# A request object representing the call parameters. Required. To specify no
|
1599
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1600
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1601
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1602
|
+
#
|
1603
|
+
# @overload get_data_attribute(name: nil)
|
1604
|
+
# Pass arguments to `get_data_attribute` via keyword arguments. Note that at
|
1605
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1606
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1607
|
+
#
|
1608
|
+
# @param name [::String]
|
1609
|
+
# Required. The resource name of the dataAttribute:
|
1610
|
+
# projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{dataTaxonomy}/attributes/\\{data_attribute_id}
|
1611
|
+
#
|
1612
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1613
|
+
# @yieldparam response [::Google::Cloud::Dataplex::V1::DataAttribute]
|
1614
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1615
|
+
#
|
1616
|
+
# @return [::Google::Cloud::Dataplex::V1::DataAttribute]
|
1617
|
+
#
|
1618
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1619
|
+
#
|
1620
|
+
# @example Basic example
|
1621
|
+
# require "google/cloud/dataplex/v1"
|
1622
|
+
#
|
1623
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1624
|
+
# client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new
|
1625
|
+
#
|
1626
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1627
|
+
# request = Google::Cloud::Dataplex::V1::GetDataAttributeRequest.new
|
1628
|
+
#
|
1629
|
+
# # Call the get_data_attribute method.
|
1630
|
+
# result = client.get_data_attribute request
|
1631
|
+
#
|
1632
|
+
# # The returned object is of type Google::Cloud::Dataplex::V1::DataAttribute.
|
1633
|
+
# p result
|
1634
|
+
#
|
1635
|
+
def get_data_attribute request, options = nil
|
1636
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1637
|
+
|
1638
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetDataAttributeRequest
|
1639
|
+
|
1640
|
+
# Converts hash and nil to an options object
|
1641
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1642
|
+
|
1643
|
+
# Customize the options with defaults
|
1644
|
+
metadata = @config.rpcs.get_data_attribute.metadata.to_h
|
1645
|
+
|
1646
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1647
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1648
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1649
|
+
gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
|
1650
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1651
|
+
|
1652
|
+
header_params = {}
|
1653
|
+
if request.name
|
1654
|
+
header_params["name"] = request.name
|
1655
|
+
end
|
1656
|
+
|
1657
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1658
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1659
|
+
|
1660
|
+
options.apply_defaults timeout: @config.rpcs.get_data_attribute.timeout,
|
1661
|
+
metadata: metadata,
|
1662
|
+
retry_policy: @config.rpcs.get_data_attribute.retry_policy
|
1663
|
+
|
1664
|
+
options.apply_defaults timeout: @config.timeout,
|
1665
|
+
metadata: @config.metadata,
|
1666
|
+
retry_policy: @config.retry_policy
|
1667
|
+
|
1668
|
+
@data_taxonomy_service_stub.call_rpc :get_data_attribute, request, options: options do |response, operation|
|
1669
|
+
yield response, operation if block_given?
|
1670
|
+
return response
|
1671
|
+
end
|
1672
|
+
rescue ::GRPC::BadStatus => e
|
1673
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1674
|
+
end
|
1675
|
+
|
1676
|
+
##
|
1677
|
+
# Configuration class for the DataTaxonomyService API.
|
1678
|
+
#
|
1679
|
+
# This class represents the configuration for DataTaxonomyService,
|
1680
|
+
# providing control over timeouts, retry behavior, logging, transport
|
1681
|
+
# parameters, and other low-level controls. Certain parameters can also be
|
1682
|
+
# applied individually to specific RPCs. See
|
1683
|
+
# {::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client::Configuration::Rpcs}
|
1684
|
+
# for a list of RPCs that can be configured independently.
|
1685
|
+
#
|
1686
|
+
# Configuration can be applied globally to all clients, or to a single client
|
1687
|
+
# on construction.
|
1688
|
+
#
|
1689
|
+
# @example
|
1690
|
+
#
|
1691
|
+
# # Modify the global config, setting the timeout for
|
1692
|
+
# # create_data_taxonomy to 20 seconds,
|
1693
|
+
# # and all remaining timeouts to 10 seconds.
|
1694
|
+
# ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.configure do |config|
|
1695
|
+
# config.timeout = 10.0
|
1696
|
+
# config.rpcs.create_data_taxonomy.timeout = 20.0
|
1697
|
+
# end
|
1698
|
+
#
|
1699
|
+
# # Apply the above configuration only to a new client.
|
1700
|
+
# client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config|
|
1701
|
+
# config.timeout = 10.0
|
1702
|
+
# config.rpcs.create_data_taxonomy.timeout = 20.0
|
1703
|
+
# end
|
1704
|
+
#
|
1705
|
+
# @!attribute [rw] endpoint
|
1706
|
+
# The hostname or hostname:port of the service endpoint.
|
1707
|
+
# Defaults to `"dataplex.googleapis.com"`.
|
1708
|
+
# @return [::String]
|
1709
|
+
# @!attribute [rw] credentials
|
1710
|
+
# Credentials to send with calls. You may provide any of the following types:
|
1711
|
+
# * (`String`) The path to a service account key file in JSON format
|
1712
|
+
# * (`Hash`) A service account key as a Hash
|
1713
|
+
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
1714
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
1715
|
+
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
1716
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
1717
|
+
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
1718
|
+
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
1719
|
+
# * (`nil`) indicating no credentials
|
1720
|
+
# @return [::Object]
|
1721
|
+
# @!attribute [rw] scope
|
1722
|
+
# The OAuth scopes
|
1723
|
+
# @return [::Array<::String>]
|
1724
|
+
# @!attribute [rw] lib_name
|
1725
|
+
# The library name as recorded in instrumentation and logging
|
1726
|
+
# @return [::String]
|
1727
|
+
# @!attribute [rw] lib_version
|
1728
|
+
# The library version as recorded in instrumentation and logging
|
1729
|
+
# @return [::String]
|
1730
|
+
# @!attribute [rw] channel_args
|
1731
|
+
# Extra parameters passed to the gRPC channel. Note: this is ignored if a
|
1732
|
+
# `GRPC::Core::Channel` object is provided as the credential.
|
1733
|
+
# @return [::Hash]
|
1734
|
+
# @!attribute [rw] interceptors
|
1735
|
+
# An array of interceptors that are run before calls are executed.
|
1736
|
+
# @return [::Array<::GRPC::ClientInterceptor>]
|
1737
|
+
# @!attribute [rw] timeout
|
1738
|
+
# The call timeout in seconds.
|
1739
|
+
# @return [::Numeric]
|
1740
|
+
# @!attribute [rw] metadata
|
1741
|
+
# Additional gRPC headers to be sent with the call.
|
1742
|
+
# @return [::Hash{::Symbol=>::String}]
|
1743
|
+
# @!attribute [rw] retry_policy
|
1744
|
+
# The retry policy. The value is a hash with the following keys:
|
1745
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
1746
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
1747
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
1748
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
1749
|
+
# trigger a retry.
|
1750
|
+
# @return [::Hash]
|
1751
|
+
# @!attribute [rw] quota_project
|
1752
|
+
# A separate project against which to charge quota.
|
1753
|
+
# @return [::String]
|
1754
|
+
#
|
1755
|
+
class Configuration
|
1756
|
+
extend ::Gapic::Config
|
1757
|
+
|
1758
|
+
DEFAULT_ENDPOINT = "dataplex.googleapis.com"
|
1759
|
+
|
1760
|
+
config_attr :endpoint, DEFAULT_ENDPOINT, ::String
|
1761
|
+
config_attr :credentials, nil do |value|
|
1762
|
+
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
1763
|
+
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
1764
|
+
allowed.any? { |klass| klass === value }
|
1765
|
+
end
|
1766
|
+
config_attr :scope, nil, ::String, ::Array, nil
|
1767
|
+
config_attr :lib_name, nil, ::String, nil
|
1768
|
+
config_attr :lib_version, nil, ::String, nil
|
1769
|
+
config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
|
1770
|
+
config_attr :interceptors, nil, ::Array, nil
|
1771
|
+
config_attr :timeout, nil, ::Numeric, nil
|
1772
|
+
config_attr :metadata, nil, ::Hash, nil
|
1773
|
+
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
1774
|
+
config_attr :quota_project, nil, ::String, nil
|
1775
|
+
|
1776
|
+
# @private
|
1777
|
+
def initialize parent_config = nil
|
1778
|
+
@parent_config = parent_config unless parent_config.nil?
|
1779
|
+
|
1780
|
+
yield self if block_given?
|
1781
|
+
end
|
1782
|
+
|
1783
|
+
##
|
1784
|
+
# Configurations for individual RPCs
|
1785
|
+
# @return [Rpcs]
|
1786
|
+
#
|
1787
|
+
def rpcs
|
1788
|
+
@rpcs ||= begin
|
1789
|
+
parent_rpcs = nil
|
1790
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
|
1791
|
+
Rpcs.new parent_rpcs
|
1792
|
+
end
|
1793
|
+
end
|
1794
|
+
|
1795
|
+
##
|
1796
|
+
# Configuration RPC class for the DataTaxonomyService API.
|
1797
|
+
#
|
1798
|
+
# Includes fields providing the configuration for each RPC in this service.
|
1799
|
+
# Each configuration object is of type `Gapic::Config::Method` and includes
|
1800
|
+
# the following configuration fields:
|
1801
|
+
#
|
1802
|
+
# * `timeout` (*type:* `Numeric`) - The call timeout in seconds
|
1803
|
+
# * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
|
1804
|
+
# * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
|
1805
|
+
# include the following keys:
|
1806
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
1807
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
1808
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
1809
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
1810
|
+
# trigger a retry.
|
1811
|
+
#
|
1812
|
+
class Rpcs
|
1813
|
+
##
|
1814
|
+
# RPC-specific configuration for `create_data_taxonomy`
|
1815
|
+
# @return [::Gapic::Config::Method]
|
1816
|
+
#
|
1817
|
+
attr_reader :create_data_taxonomy
|
1818
|
+
##
|
1819
|
+
# RPC-specific configuration for `update_data_taxonomy`
|
1820
|
+
# @return [::Gapic::Config::Method]
|
1821
|
+
#
|
1822
|
+
attr_reader :update_data_taxonomy
|
1823
|
+
##
|
1824
|
+
# RPC-specific configuration for `delete_data_taxonomy`
|
1825
|
+
# @return [::Gapic::Config::Method]
|
1826
|
+
#
|
1827
|
+
attr_reader :delete_data_taxonomy
|
1828
|
+
##
|
1829
|
+
# RPC-specific configuration for `list_data_taxonomies`
|
1830
|
+
# @return [::Gapic::Config::Method]
|
1831
|
+
#
|
1832
|
+
attr_reader :list_data_taxonomies
|
1833
|
+
##
|
1834
|
+
# RPC-specific configuration for `get_data_taxonomy`
|
1835
|
+
# @return [::Gapic::Config::Method]
|
1836
|
+
#
|
1837
|
+
attr_reader :get_data_taxonomy
|
1838
|
+
##
|
1839
|
+
# RPC-specific configuration for `create_data_attribute_binding`
|
1840
|
+
# @return [::Gapic::Config::Method]
|
1841
|
+
#
|
1842
|
+
attr_reader :create_data_attribute_binding
|
1843
|
+
##
|
1844
|
+
# RPC-specific configuration for `update_data_attribute_binding`
|
1845
|
+
# @return [::Gapic::Config::Method]
|
1846
|
+
#
|
1847
|
+
attr_reader :update_data_attribute_binding
|
1848
|
+
##
|
1849
|
+
# RPC-specific configuration for `delete_data_attribute_binding`
|
1850
|
+
# @return [::Gapic::Config::Method]
|
1851
|
+
#
|
1852
|
+
attr_reader :delete_data_attribute_binding
|
1853
|
+
##
|
1854
|
+
# RPC-specific configuration for `list_data_attribute_bindings`
|
1855
|
+
# @return [::Gapic::Config::Method]
|
1856
|
+
#
|
1857
|
+
attr_reader :list_data_attribute_bindings
|
1858
|
+
##
|
1859
|
+
# RPC-specific configuration for `get_data_attribute_binding`
|
1860
|
+
# @return [::Gapic::Config::Method]
|
1861
|
+
#
|
1862
|
+
attr_reader :get_data_attribute_binding
|
1863
|
+
##
|
1864
|
+
# RPC-specific configuration for `create_data_attribute`
|
1865
|
+
# @return [::Gapic::Config::Method]
|
1866
|
+
#
|
1867
|
+
attr_reader :create_data_attribute
|
1868
|
+
##
|
1869
|
+
# RPC-specific configuration for `update_data_attribute`
|
1870
|
+
# @return [::Gapic::Config::Method]
|
1871
|
+
#
|
1872
|
+
attr_reader :update_data_attribute
|
1873
|
+
##
|
1874
|
+
# RPC-specific configuration for `delete_data_attribute`
|
1875
|
+
# @return [::Gapic::Config::Method]
|
1876
|
+
#
|
1877
|
+
attr_reader :delete_data_attribute
|
1878
|
+
##
|
1879
|
+
# RPC-specific configuration for `list_data_attributes`
|
1880
|
+
# @return [::Gapic::Config::Method]
|
1881
|
+
#
|
1882
|
+
attr_reader :list_data_attributes
|
1883
|
+
##
|
1884
|
+
# RPC-specific configuration for `get_data_attribute`
|
1885
|
+
# @return [::Gapic::Config::Method]
|
1886
|
+
#
|
1887
|
+
attr_reader :get_data_attribute
|
1888
|
+
|
1889
|
+
# @private
|
1890
|
+
def initialize parent_rpcs = nil
|
1891
|
+
create_data_taxonomy_config = parent_rpcs.create_data_taxonomy if parent_rpcs.respond_to? :create_data_taxonomy
|
1892
|
+
@create_data_taxonomy = ::Gapic::Config::Method.new create_data_taxonomy_config
|
1893
|
+
update_data_taxonomy_config = parent_rpcs.update_data_taxonomy if parent_rpcs.respond_to? :update_data_taxonomy
|
1894
|
+
@update_data_taxonomy = ::Gapic::Config::Method.new update_data_taxonomy_config
|
1895
|
+
delete_data_taxonomy_config = parent_rpcs.delete_data_taxonomy if parent_rpcs.respond_to? :delete_data_taxonomy
|
1896
|
+
@delete_data_taxonomy = ::Gapic::Config::Method.new delete_data_taxonomy_config
|
1897
|
+
list_data_taxonomies_config = parent_rpcs.list_data_taxonomies if parent_rpcs.respond_to? :list_data_taxonomies
|
1898
|
+
@list_data_taxonomies = ::Gapic::Config::Method.new list_data_taxonomies_config
|
1899
|
+
get_data_taxonomy_config = parent_rpcs.get_data_taxonomy if parent_rpcs.respond_to? :get_data_taxonomy
|
1900
|
+
@get_data_taxonomy = ::Gapic::Config::Method.new get_data_taxonomy_config
|
1901
|
+
create_data_attribute_binding_config = parent_rpcs.create_data_attribute_binding if parent_rpcs.respond_to? :create_data_attribute_binding
|
1902
|
+
@create_data_attribute_binding = ::Gapic::Config::Method.new create_data_attribute_binding_config
|
1903
|
+
update_data_attribute_binding_config = parent_rpcs.update_data_attribute_binding if parent_rpcs.respond_to? :update_data_attribute_binding
|
1904
|
+
@update_data_attribute_binding = ::Gapic::Config::Method.new update_data_attribute_binding_config
|
1905
|
+
delete_data_attribute_binding_config = parent_rpcs.delete_data_attribute_binding if parent_rpcs.respond_to? :delete_data_attribute_binding
|
1906
|
+
@delete_data_attribute_binding = ::Gapic::Config::Method.new delete_data_attribute_binding_config
|
1907
|
+
list_data_attribute_bindings_config = parent_rpcs.list_data_attribute_bindings if parent_rpcs.respond_to? :list_data_attribute_bindings
|
1908
|
+
@list_data_attribute_bindings = ::Gapic::Config::Method.new list_data_attribute_bindings_config
|
1909
|
+
get_data_attribute_binding_config = parent_rpcs.get_data_attribute_binding if parent_rpcs.respond_to? :get_data_attribute_binding
|
1910
|
+
@get_data_attribute_binding = ::Gapic::Config::Method.new get_data_attribute_binding_config
|
1911
|
+
create_data_attribute_config = parent_rpcs.create_data_attribute if parent_rpcs.respond_to? :create_data_attribute
|
1912
|
+
@create_data_attribute = ::Gapic::Config::Method.new create_data_attribute_config
|
1913
|
+
update_data_attribute_config = parent_rpcs.update_data_attribute if parent_rpcs.respond_to? :update_data_attribute
|
1914
|
+
@update_data_attribute = ::Gapic::Config::Method.new update_data_attribute_config
|
1915
|
+
delete_data_attribute_config = parent_rpcs.delete_data_attribute if parent_rpcs.respond_to? :delete_data_attribute
|
1916
|
+
@delete_data_attribute = ::Gapic::Config::Method.new delete_data_attribute_config
|
1917
|
+
list_data_attributes_config = parent_rpcs.list_data_attributes if parent_rpcs.respond_to? :list_data_attributes
|
1918
|
+
@list_data_attributes = ::Gapic::Config::Method.new list_data_attributes_config
|
1919
|
+
get_data_attribute_config = parent_rpcs.get_data_attribute if parent_rpcs.respond_to? :get_data_attribute
|
1920
|
+
@get_data_attribute = ::Gapic::Config::Method.new get_data_attribute_config
|
1921
|
+
|
1922
|
+
yield self if block_given?
|
1923
|
+
end
|
1924
|
+
end
|
1925
|
+
end
|
1926
|
+
end
|
1927
|
+
end
|
1928
|
+
end
|
1929
|
+
end
|
1930
|
+
end
|
1931
|
+
end
|