google-cloud-dataplex-v1 2.9.0 → 2.10.0
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/README.md +1 -1
- data/lib/google/cloud/dataplex/v1/analyze_pb.rb +2 -25
- data/lib/google/cloud/dataplex/v1/approval_workflow_pb.rb +33 -0
- data/lib/google/cloud/dataplex/v1/bindings_override.rb +24 -24
- data/lib/google/cloud/dataplex/v1/business_glossary_pb.rb +3 -26
- data/lib/google/cloud/dataplex/v1/business_glossary_service/client.rb +2 -0
- data/lib/google/cloud/dataplex/v1/business_glossary_service/credentials.rb +4 -1
- data/lib/google/cloud/dataplex/v1/business_glossary_service/operations.rb +2 -0
- data/lib/google/cloud/dataplex/v1/business_glossary_service/rest/client.rb +2 -0
- data/lib/google/cloud/dataplex/v1/business_glossary_service/rest/operations.rb +2 -0
- data/lib/google/cloud/dataplex/v1/catalog_pb.rb +20 -27
- data/lib/google/cloud/dataplex/v1/catalog_service/client.rb +1074 -73
- data/lib/google/cloud/dataplex/v1/catalog_service/credentials.rb +4 -1
- data/lib/google/cloud/dataplex/v1/catalog_service/operations.rb +2 -0
- data/lib/google/cloud/dataplex/v1/catalog_service/paths.rb +19 -0
- data/lib/google/cloud/dataplex/v1/catalog_service/rest/client.rb +1020 -82
- data/lib/google/cloud/dataplex/v1/catalog_service/rest/operations.rb +2 -0
- data/lib/google/cloud/dataplex/v1/catalog_service/rest/service_stub.rb +554 -0
- data/lib/google/cloud/dataplex/v1/catalog_services_pb.rb +18 -15
- data/lib/google/cloud/dataplex/v1/cmek_pb.rb +3 -26
- data/lib/google/cloud/dataplex/v1/cmek_service/client.rb +2 -0
- data/lib/google/cloud/dataplex/v1/cmek_service/credentials.rb +2 -1
- data/lib/google/cloud/dataplex/v1/cmek_service/operations.rb +2 -0
- data/lib/google/cloud/dataplex/v1/cmek_service/rest/client.rb +2 -0
- data/lib/google/cloud/dataplex/v1/cmek_service/rest/operations.rb +2 -0
- data/lib/google/cloud/dataplex/v1/content_pb.rb +3 -38
- data/lib/google/cloud/dataplex/v1/content_services_pb.rb +0 -49
- data/lib/google/cloud/dataplex/v1/data_discovery_pb.rb +4 -24
- data/lib/google/cloud/dataplex/v1/data_documentation_pb.rb +10 -24
- data/lib/google/cloud/dataplex/v1/data_product_service/client.rb +1644 -0
- data/lib/google/cloud/dataplex/v1/{content_service → data_product_service}/credentials.rb +7 -4
- data/lib/google/cloud/dataplex/v1/data_product_service/operations.rb +843 -0
- data/lib/google/cloud/dataplex/v1/data_product_service/paths.rb +231 -0
- data/lib/google/cloud/dataplex/v1/data_product_service/rest/client.rb +1533 -0
- data/lib/google/cloud/dataplex/v1/data_product_service/rest/operations.rb +956 -0
- data/lib/google/cloud/dataplex/v1/{content_service → data_product_service}/rest/service_stub.rb +284 -160
- data/lib/google/cloud/dataplex/v1/{content_service → data_product_service}/rest.rb +11 -10
- data/lib/google/cloud/dataplex/v1/{content_service.rb → data_product_service.rb} +15 -14
- data/lib/google/cloud/dataplex/v1/data_products_pb.rb +52 -0
- data/lib/google/cloud/dataplex/v1/data_products_services_pb.rb +69 -0
- data/lib/google/cloud/dataplex/v1/data_profile_pb.rb +4 -26
- data/lib/google/cloud/dataplex/v1/data_quality_pb.rb +13 -26
- data/lib/google/cloud/dataplex/v1/data_quality_rule_template_pb.rb +25 -0
- data/lib/google/cloud/dataplex/v1/data_scan_service/client.rb +99 -1
- data/lib/google/cloud/dataplex/v1/data_scan_service/credentials.rb +4 -1
- data/lib/google/cloud/dataplex/v1/data_scan_service/operations.rb +2 -0
- data/lib/google/cloud/dataplex/v1/data_scan_service/paths.rb +21 -0
- data/lib/google/cloud/dataplex/v1/data_scan_service/rest/client.rb +92 -1
- data/lib/google/cloud/dataplex/v1/data_scan_service/rest/operations.rb +2 -0
- data/lib/google/cloud/dataplex/v1/data_scan_service/rest/service_stub.rb +62 -0
- data/lib/google/cloud/dataplex/v1/data_taxonomy_pb.rb +3 -27
- data/lib/google/cloud/dataplex/v1/data_taxonomy_service/client.rb +2 -0
- data/lib/google/cloud/dataplex/v1/data_taxonomy_service/credentials.rb +2 -1
- data/lib/google/cloud/dataplex/v1/data_taxonomy_service/operations.rb +2 -0
- data/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest/client.rb +2 -0
- data/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest/operations.rb +2 -0
- data/lib/google/cloud/dataplex/v1/dataplex_service/client.rb +2 -664
- data/lib/google/cloud/dataplex/v1/dataplex_service/credentials.rb +4 -1
- data/lib/google/cloud/dataplex/v1/dataplex_service/operations.rb +2 -0
- data/lib/google/cloud/dataplex/v1/dataplex_service/paths.rb +0 -21
- data/lib/google/cloud/dataplex/v1/dataplex_service/rest/client.rb +2 -622
- data/lib/google/cloud/dataplex/v1/dataplex_service/rest/operations.rb +2 -0
- data/lib/google/cloud/dataplex/v1/dataplex_service/rest/service_stub.rb +0 -368
- data/lib/google/cloud/dataplex/v1/datascans_common_pb.rb +3 -24
- data/lib/google/cloud/dataplex/v1/datascans_pb.rb +9 -31
- data/lib/google/cloud/dataplex/v1/datascans_services_pb.rb +2 -0
- data/lib/google/cloud/dataplex/v1/logs_pb.rb +3 -27
- data/lib/google/cloud/dataplex/v1/metadata_pb.rb +3 -25
- data/lib/google/cloud/dataplex/v1/metadata_service/client.rb +2 -0
- data/lib/google/cloud/dataplex/v1/metadata_service/credentials.rb +2 -1
- data/lib/google/cloud/dataplex/v1/metadata_service/rest/client.rb +2 -0
- data/lib/google/cloud/dataplex/v1/processing_pb.rb +5 -24
- data/lib/google/cloud/dataplex/v1/resources_pb.rb +2 -25
- data/lib/google/cloud/dataplex/v1/rest.rb +1 -1
- data/lib/google/cloud/dataplex/v1/security_pb.rb +2 -23
- data/lib/google/cloud/dataplex/v1/service_pb.rb +3 -38
- data/lib/google/cloud/dataplex/v1/service_services_pb.rb +0 -13
- data/lib/google/cloud/dataplex/v1/tasks_pb.rb +2 -25
- data/lib/google/cloud/dataplex/v1/version.rb +1 -1
- data/lib/google/cloud/dataplex/v1.rb +1 -0
- data/proto_docs/google/api/client.rb +149 -29
- data/proto_docs/google/cloud/dataplex/v1/approval_workflow.rb +263 -0
- data/proto_docs/google/cloud/dataplex/v1/catalog.rb +427 -3
- data/proto_docs/google/cloud/dataplex/v1/data_discovery.rb +13 -0
- data/proto_docs/google/cloud/dataplex/v1/data_documentation.rb +118 -2
- data/proto_docs/google/cloud/dataplex/v1/data_products.rb +567 -0
- data/proto_docs/google/cloud/dataplex/v1/data_profile.rb +21 -0
- data/proto_docs/google/cloud/dataplex/v1/data_quality.rb +240 -10
- data/proto_docs/google/cloud/dataplex/v1/data_quality_rule_template.rb +88 -0
- data/proto_docs/google/cloud/dataplex/v1/datascans.rb +82 -5
- data/proto_docs/google/cloud/dataplex/v1/datascans_common.rb +7 -3
- data/proto_docs/google/cloud/dataplex/v1/logs.rb +7 -0
- data/proto_docs/google/cloud/dataplex/v1/processing.rb +27 -3
- data/proto_docs/google/cloud/dataplex/v1/service.rb +0 -148
- metadata +20 -12
- data/lib/google/cloud/dataplex/v1/content_service/client.rb +0 -1261
- data/lib/google/cloud/dataplex/v1/content_service/paths.rb +0 -73
- data/lib/google/cloud/dataplex/v1/content_service/rest/client.rb +0 -1171
- data/proto_docs/google/cloud/dataplex/v1/content.rb +0 -142
|
@@ -0,0 +1,1644 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Copyright 2026 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_products_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 DataProductService
|
|
29
|
+
##
|
|
30
|
+
# Client for the DataProductService service.
|
|
31
|
+
#
|
|
32
|
+
# `DataProductService` provides APIs for managing data products and
|
|
33
|
+
# the underlying data assets.
|
|
34
|
+
#
|
|
35
|
+
class Client
|
|
36
|
+
# @private
|
|
37
|
+
API_VERSION = ""
|
|
38
|
+
|
|
39
|
+
# @private
|
|
40
|
+
DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$"
|
|
41
|
+
|
|
42
|
+
include Paths
|
|
43
|
+
|
|
44
|
+
# @private
|
|
45
|
+
attr_reader :data_product_service_stub
|
|
46
|
+
|
|
47
|
+
##
|
|
48
|
+
# Configure the DataProductService Client class.
|
|
49
|
+
#
|
|
50
|
+
# See {::Google::Cloud::Dataplex::V1::DataProductService::Client::Configuration}
|
|
51
|
+
# for a description of the configuration fields.
|
|
52
|
+
#
|
|
53
|
+
# @example
|
|
54
|
+
#
|
|
55
|
+
# # Modify the configuration for all DataProductService clients
|
|
56
|
+
# ::Google::Cloud::Dataplex::V1::DataProductService::Client.configure do |config|
|
|
57
|
+
# config.timeout = 10.0
|
|
58
|
+
# end
|
|
59
|
+
#
|
|
60
|
+
# @yield [config] Configure the Client client.
|
|
61
|
+
# @yieldparam config [Client::Configuration]
|
|
62
|
+
#
|
|
63
|
+
# @return [Client::Configuration]
|
|
64
|
+
#
|
|
65
|
+
def self.configure
|
|
66
|
+
@configure ||= begin
|
|
67
|
+
namespace = ["Google", "Cloud", "Dataplex", "V1"]
|
|
68
|
+
parent_config = while namespace.any?
|
|
69
|
+
parent_name = namespace.join "::"
|
|
70
|
+
parent_const = const_get parent_name
|
|
71
|
+
break parent_const.configure if parent_const.respond_to? :configure
|
|
72
|
+
namespace.pop
|
|
73
|
+
end
|
|
74
|
+
default_config = Client::Configuration.new parent_config
|
|
75
|
+
|
|
76
|
+
default_config
|
|
77
|
+
end
|
|
78
|
+
yield @configure if block_given?
|
|
79
|
+
@configure
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
##
|
|
83
|
+
# Configure the DataProductService Client instance.
|
|
84
|
+
#
|
|
85
|
+
# The configuration is set to the derived mode, meaning that values can be changed,
|
|
86
|
+
# but structural changes (adding new fields, etc.) are not allowed. Structural changes
|
|
87
|
+
# should be made on {Client.configure}.
|
|
88
|
+
#
|
|
89
|
+
# See {::Google::Cloud::Dataplex::V1::DataProductService::Client::Configuration}
|
|
90
|
+
# for a description of the configuration fields.
|
|
91
|
+
#
|
|
92
|
+
# @yield [config] Configure the Client client.
|
|
93
|
+
# @yieldparam config [Client::Configuration]
|
|
94
|
+
#
|
|
95
|
+
# @return [Client::Configuration]
|
|
96
|
+
#
|
|
97
|
+
def configure
|
|
98
|
+
yield @config if block_given?
|
|
99
|
+
@config
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
##
|
|
103
|
+
# The effective universe domain
|
|
104
|
+
#
|
|
105
|
+
# @return [String]
|
|
106
|
+
#
|
|
107
|
+
def universe_domain
|
|
108
|
+
@data_product_service_stub.universe_domain
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
##
|
|
112
|
+
# Create a new DataProductService client object.
|
|
113
|
+
#
|
|
114
|
+
# @example
|
|
115
|
+
#
|
|
116
|
+
# # Create a client using the default configuration
|
|
117
|
+
# client = ::Google::Cloud::Dataplex::V1::DataProductService::Client.new
|
|
118
|
+
#
|
|
119
|
+
# # Create a client using a custom configuration
|
|
120
|
+
# client = ::Google::Cloud::Dataplex::V1::DataProductService::Client.new do |config|
|
|
121
|
+
# config.timeout = 10.0
|
|
122
|
+
# end
|
|
123
|
+
#
|
|
124
|
+
# @yield [config] Configure the DataProductService client.
|
|
125
|
+
# @yieldparam config [Client::Configuration]
|
|
126
|
+
#
|
|
127
|
+
def initialize
|
|
128
|
+
# These require statements are intentionally placed here to initialize
|
|
129
|
+
# the gRPC module only when it's required.
|
|
130
|
+
# See https://github.com/googleapis/toolkit/issues/446
|
|
131
|
+
require "gapic/grpc"
|
|
132
|
+
require "google/cloud/dataplex/v1/data_products_services_pb"
|
|
133
|
+
|
|
134
|
+
# Create the configuration object
|
|
135
|
+
@config = Configuration.new Client.configure
|
|
136
|
+
|
|
137
|
+
# Yield the configuration if needed
|
|
138
|
+
yield @config if block_given?
|
|
139
|
+
|
|
140
|
+
# Create credentials
|
|
141
|
+
credentials = @config.credentials
|
|
142
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
|
143
|
+
# but only if the default endpoint does not have a region prefix.
|
|
144
|
+
enable_self_signed_jwt = @config.endpoint.nil? ||
|
|
145
|
+
(@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
|
146
|
+
!@config.endpoint.split(".").first.include?("-"))
|
|
147
|
+
credentials ||= Credentials.default scope: @config.scope,
|
|
148
|
+
enable_self_signed_jwt: enable_self_signed_jwt
|
|
149
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
|
150
|
+
credentials = Credentials.new credentials, scope: @config.scope
|
|
151
|
+
end
|
|
152
|
+
@quota_project_id = @config.quota_project
|
|
153
|
+
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
|
154
|
+
|
|
155
|
+
@operations_client = Operations.new do |config|
|
|
156
|
+
config.credentials = credentials
|
|
157
|
+
config.quota_project = @quota_project_id
|
|
158
|
+
config.endpoint = @config.endpoint
|
|
159
|
+
config.universe_domain = @config.universe_domain
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
@data_product_service_stub = ::Gapic::ServiceStub.new(
|
|
163
|
+
::Google::Cloud::Dataplex::V1::DataProductService::Stub,
|
|
164
|
+
credentials: credentials,
|
|
165
|
+
endpoint: @config.endpoint,
|
|
166
|
+
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
|
167
|
+
universe_domain: @config.universe_domain,
|
|
168
|
+
channel_args: @config.channel_args,
|
|
169
|
+
interceptors: @config.interceptors,
|
|
170
|
+
channel_pool_config: @config.channel_pool,
|
|
171
|
+
logger: @config.logger
|
|
172
|
+
)
|
|
173
|
+
|
|
174
|
+
@data_product_service_stub.stub_logger&.info do |entry|
|
|
175
|
+
entry.set_system_name
|
|
176
|
+
entry.set_service
|
|
177
|
+
entry.message = "Created client for #{entry.service}"
|
|
178
|
+
entry.set_credentials_fields credentials
|
|
179
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
|
180
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
|
181
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
@location_client = Google::Cloud::Location::Locations::Client.new do |config|
|
|
185
|
+
config.credentials = credentials
|
|
186
|
+
config.quota_project = @quota_project_id
|
|
187
|
+
config.endpoint = @data_product_service_stub.endpoint
|
|
188
|
+
config.universe_domain = @data_product_service_stub.universe_domain
|
|
189
|
+
config.logger = @data_product_service_stub.logger if config.respond_to? :logger=
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
@iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config|
|
|
193
|
+
config.credentials = credentials
|
|
194
|
+
config.quota_project = @quota_project_id
|
|
195
|
+
config.endpoint = @data_product_service_stub.endpoint
|
|
196
|
+
config.universe_domain = @data_product_service_stub.universe_domain
|
|
197
|
+
config.logger = @data_product_service_stub.logger if config.respond_to? :logger=
|
|
198
|
+
end
|
|
199
|
+
end
|
|
200
|
+
|
|
201
|
+
##
|
|
202
|
+
# Get the associated client for long-running operations.
|
|
203
|
+
#
|
|
204
|
+
# @return [::Google::Cloud::Dataplex::V1::DataProductService::Operations]
|
|
205
|
+
#
|
|
206
|
+
attr_reader :operations_client
|
|
207
|
+
|
|
208
|
+
##
|
|
209
|
+
# Get the associated client for mix-in of the Locations.
|
|
210
|
+
#
|
|
211
|
+
# @return [Google::Cloud::Location::Locations::Client]
|
|
212
|
+
#
|
|
213
|
+
attr_reader :location_client
|
|
214
|
+
|
|
215
|
+
##
|
|
216
|
+
# Get the associated client for mix-in of the IAMPolicy.
|
|
217
|
+
#
|
|
218
|
+
# @return [Google::Iam::V1::IAMPolicy::Client]
|
|
219
|
+
#
|
|
220
|
+
attr_reader :iam_policy_client
|
|
221
|
+
|
|
222
|
+
##
|
|
223
|
+
# The logger used for request/response debug logging.
|
|
224
|
+
#
|
|
225
|
+
# @return [Logger]
|
|
226
|
+
#
|
|
227
|
+
def logger
|
|
228
|
+
@data_product_service_stub.logger
|
|
229
|
+
end
|
|
230
|
+
|
|
231
|
+
# Service calls
|
|
232
|
+
|
|
233
|
+
##
|
|
234
|
+
# Creates a data product.
|
|
235
|
+
#
|
|
236
|
+
# @overload create_data_product(request, options = nil)
|
|
237
|
+
# Pass arguments to `create_data_product` via a request object, either of type
|
|
238
|
+
# {::Google::Cloud::Dataplex::V1::CreateDataProductRequest} or an equivalent Hash.
|
|
239
|
+
#
|
|
240
|
+
# @param request [::Google::Cloud::Dataplex::V1::CreateDataProductRequest, ::Hash]
|
|
241
|
+
# A request object representing the call parameters. Required. To specify no
|
|
242
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
243
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
244
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
245
|
+
#
|
|
246
|
+
# @overload create_data_product(parent: nil, data_product_id: nil, data_product: nil, validate_only: nil)
|
|
247
|
+
# Pass arguments to `create_data_product` via keyword arguments. Note that at
|
|
248
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
249
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
250
|
+
#
|
|
251
|
+
# @param parent [::String]
|
|
252
|
+
# Required. The parent resource where this data product will be created.
|
|
253
|
+
# Format: projects/\\{project_id_or_number}/locations/\\{location_id}
|
|
254
|
+
# @param data_product_id [::String]
|
|
255
|
+
# Optional. The ID of the data product to create.
|
|
256
|
+
#
|
|
257
|
+
# The ID must conform to RFC-1034 and contain only lower-case letters (a-z),
|
|
258
|
+
# numbers (0-9), or hyphens, with the first character a letter, the last a
|
|
259
|
+
# letter or a number, and a 63 character maximum. Characters outside of
|
|
260
|
+
# ASCII are not permitted.
|
|
261
|
+
# Valid format regex: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`
|
|
262
|
+
# If not provided, a system generated ID will be used.
|
|
263
|
+
# @param data_product [::Google::Cloud::Dataplex::V1::DataProduct, ::Hash]
|
|
264
|
+
# Required. The data product to create.
|
|
265
|
+
# @param validate_only [::Boolean]
|
|
266
|
+
# Optional. Validates the request without actually creating the data product.
|
|
267
|
+
# Default: false.
|
|
268
|
+
#
|
|
269
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
270
|
+
# @yieldparam response [::Gapic::Operation]
|
|
271
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
272
|
+
#
|
|
273
|
+
# @return [::Gapic::Operation]
|
|
274
|
+
#
|
|
275
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
276
|
+
#
|
|
277
|
+
# @example Basic example
|
|
278
|
+
# require "google/cloud/dataplex/v1"
|
|
279
|
+
#
|
|
280
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
281
|
+
# client = Google::Cloud::Dataplex::V1::DataProductService::Client.new
|
|
282
|
+
#
|
|
283
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
284
|
+
# request = Google::Cloud::Dataplex::V1::CreateDataProductRequest.new
|
|
285
|
+
#
|
|
286
|
+
# # Call the create_data_product method.
|
|
287
|
+
# result = client.create_data_product request
|
|
288
|
+
#
|
|
289
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
|
290
|
+
# # check the status of an operation, cancel it, or wait for results.
|
|
291
|
+
# # Here is how to wait for a response.
|
|
292
|
+
# result.wait_until_done! timeout: 60
|
|
293
|
+
# if result.response?
|
|
294
|
+
# p result.response
|
|
295
|
+
# else
|
|
296
|
+
# puts "No response received."
|
|
297
|
+
# end
|
|
298
|
+
#
|
|
299
|
+
def create_data_product request, options = nil
|
|
300
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
301
|
+
|
|
302
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateDataProductRequest
|
|
303
|
+
|
|
304
|
+
# Converts hash and nil to an options object
|
|
305
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
306
|
+
|
|
307
|
+
# Customize the options with defaults
|
|
308
|
+
metadata = @config.rpcs.create_data_product.metadata.to_h
|
|
309
|
+
|
|
310
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
311
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
312
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
313
|
+
gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
|
|
314
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
315
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
316
|
+
|
|
317
|
+
header_params = {}
|
|
318
|
+
if request.parent
|
|
319
|
+
header_params["parent"] = request.parent
|
|
320
|
+
end
|
|
321
|
+
|
|
322
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
323
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
324
|
+
|
|
325
|
+
options.apply_defaults timeout: @config.rpcs.create_data_product.timeout,
|
|
326
|
+
metadata: metadata,
|
|
327
|
+
retry_policy: @config.rpcs.create_data_product.retry_policy
|
|
328
|
+
|
|
329
|
+
options.apply_defaults timeout: @config.timeout,
|
|
330
|
+
metadata: @config.metadata,
|
|
331
|
+
retry_policy: @config.retry_policy
|
|
332
|
+
|
|
333
|
+
@data_product_service_stub.call_rpc :create_data_product, request, options: options do |response, operation|
|
|
334
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
|
335
|
+
yield response, operation if block_given?
|
|
336
|
+
throw :response, response
|
|
337
|
+
end
|
|
338
|
+
rescue ::GRPC::BadStatus => e
|
|
339
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
340
|
+
end
|
|
341
|
+
|
|
342
|
+
##
|
|
343
|
+
# Deletes a data product. The deletion will fail if the data product is not
|
|
344
|
+
# empty (i.e. contains at least one data asset).
|
|
345
|
+
#
|
|
346
|
+
# @overload delete_data_product(request, options = nil)
|
|
347
|
+
# Pass arguments to `delete_data_product` via a request object, either of type
|
|
348
|
+
# {::Google::Cloud::Dataplex::V1::DeleteDataProductRequest} or an equivalent Hash.
|
|
349
|
+
#
|
|
350
|
+
# @param request [::Google::Cloud::Dataplex::V1::DeleteDataProductRequest, ::Hash]
|
|
351
|
+
# A request object representing the call parameters. Required. To specify no
|
|
352
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
353
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
354
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
355
|
+
#
|
|
356
|
+
# @overload delete_data_product(name: nil, etag: nil, validate_only: nil)
|
|
357
|
+
# Pass arguments to `delete_data_product` via keyword arguments. Note that at
|
|
358
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
359
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
360
|
+
#
|
|
361
|
+
# @param name [::String]
|
|
362
|
+
# Required. The name of the data product to delete.
|
|
363
|
+
# Format:
|
|
364
|
+
# projects/\\{project_id_or_number}/locations/\\{location_id}/dataProducts/\\{data_product_id}
|
|
365
|
+
# @param etag [::String]
|
|
366
|
+
# Optional. The etag of the data product.
|
|
367
|
+
#
|
|
368
|
+
# If an etag is provided and does not match the current etag of the data
|
|
369
|
+
# product, then the deletion will be blocked and an ABORTED error will be
|
|
370
|
+
# returned.
|
|
371
|
+
# @param validate_only [::Boolean]
|
|
372
|
+
# Optional. Validates the request without actually deleting the data product.
|
|
373
|
+
# Default: false.
|
|
374
|
+
#
|
|
375
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
376
|
+
# @yieldparam response [::Gapic::Operation]
|
|
377
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
378
|
+
#
|
|
379
|
+
# @return [::Gapic::Operation]
|
|
380
|
+
#
|
|
381
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
382
|
+
#
|
|
383
|
+
# @example Basic example
|
|
384
|
+
# require "google/cloud/dataplex/v1"
|
|
385
|
+
#
|
|
386
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
387
|
+
# client = Google::Cloud::Dataplex::V1::DataProductService::Client.new
|
|
388
|
+
#
|
|
389
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
390
|
+
# request = Google::Cloud::Dataplex::V1::DeleteDataProductRequest.new
|
|
391
|
+
#
|
|
392
|
+
# # Call the delete_data_product method.
|
|
393
|
+
# result = client.delete_data_product request
|
|
394
|
+
#
|
|
395
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
|
396
|
+
# # check the status of an operation, cancel it, or wait for results.
|
|
397
|
+
# # Here is how to wait for a response.
|
|
398
|
+
# result.wait_until_done! timeout: 60
|
|
399
|
+
# if result.response?
|
|
400
|
+
# p result.response
|
|
401
|
+
# else
|
|
402
|
+
# puts "No response received."
|
|
403
|
+
# end
|
|
404
|
+
#
|
|
405
|
+
def delete_data_product request, options = nil
|
|
406
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
407
|
+
|
|
408
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteDataProductRequest
|
|
409
|
+
|
|
410
|
+
# Converts hash and nil to an options object
|
|
411
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
412
|
+
|
|
413
|
+
# Customize the options with defaults
|
|
414
|
+
metadata = @config.rpcs.delete_data_product.metadata.to_h
|
|
415
|
+
|
|
416
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
417
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
418
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
419
|
+
gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
|
|
420
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
421
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
422
|
+
|
|
423
|
+
header_params = {}
|
|
424
|
+
if request.name
|
|
425
|
+
header_params["name"] = request.name
|
|
426
|
+
end
|
|
427
|
+
|
|
428
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
429
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
430
|
+
|
|
431
|
+
options.apply_defaults timeout: @config.rpcs.delete_data_product.timeout,
|
|
432
|
+
metadata: metadata,
|
|
433
|
+
retry_policy: @config.rpcs.delete_data_product.retry_policy
|
|
434
|
+
|
|
435
|
+
options.apply_defaults timeout: @config.timeout,
|
|
436
|
+
metadata: @config.metadata,
|
|
437
|
+
retry_policy: @config.retry_policy
|
|
438
|
+
|
|
439
|
+
@data_product_service_stub.call_rpc :delete_data_product, request, options: options do |response, operation|
|
|
440
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
|
441
|
+
yield response, operation if block_given?
|
|
442
|
+
throw :response, response
|
|
443
|
+
end
|
|
444
|
+
rescue ::GRPC::BadStatus => e
|
|
445
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
446
|
+
end
|
|
447
|
+
|
|
448
|
+
##
|
|
449
|
+
# Gets a data product.
|
|
450
|
+
#
|
|
451
|
+
# @overload get_data_product(request, options = nil)
|
|
452
|
+
# Pass arguments to `get_data_product` via a request object, either of type
|
|
453
|
+
# {::Google::Cloud::Dataplex::V1::GetDataProductRequest} or an equivalent Hash.
|
|
454
|
+
#
|
|
455
|
+
# @param request [::Google::Cloud::Dataplex::V1::GetDataProductRequest, ::Hash]
|
|
456
|
+
# A request object representing the call parameters. Required. To specify no
|
|
457
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
458
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
459
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
460
|
+
#
|
|
461
|
+
# @overload get_data_product(name: nil)
|
|
462
|
+
# Pass arguments to `get_data_product` via keyword arguments. Note that at
|
|
463
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
464
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
465
|
+
#
|
|
466
|
+
# @param name [::String]
|
|
467
|
+
# Required. The name of the data product to retrieve.
|
|
468
|
+
# Format:
|
|
469
|
+
# projects/\\{project_id_or_number}/locations/\\{location_id}/dataProducts/\\{data_product_id}
|
|
470
|
+
#
|
|
471
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
472
|
+
# @yieldparam response [::Google::Cloud::Dataplex::V1::DataProduct]
|
|
473
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
474
|
+
#
|
|
475
|
+
# @return [::Google::Cloud::Dataplex::V1::DataProduct]
|
|
476
|
+
#
|
|
477
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
478
|
+
#
|
|
479
|
+
# @example Basic example
|
|
480
|
+
# require "google/cloud/dataplex/v1"
|
|
481
|
+
#
|
|
482
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
483
|
+
# client = Google::Cloud::Dataplex::V1::DataProductService::Client.new
|
|
484
|
+
#
|
|
485
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
486
|
+
# request = Google::Cloud::Dataplex::V1::GetDataProductRequest.new
|
|
487
|
+
#
|
|
488
|
+
# # Call the get_data_product method.
|
|
489
|
+
# result = client.get_data_product request
|
|
490
|
+
#
|
|
491
|
+
# # The returned object is of type Google::Cloud::Dataplex::V1::DataProduct.
|
|
492
|
+
# p result
|
|
493
|
+
#
|
|
494
|
+
def get_data_product request, options = nil
|
|
495
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
496
|
+
|
|
497
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetDataProductRequest
|
|
498
|
+
|
|
499
|
+
# Converts hash and nil to an options object
|
|
500
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
501
|
+
|
|
502
|
+
# Customize the options with defaults
|
|
503
|
+
metadata = @config.rpcs.get_data_product.metadata.to_h
|
|
504
|
+
|
|
505
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
506
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
507
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
508
|
+
gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
|
|
509
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
510
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
511
|
+
|
|
512
|
+
header_params = {}
|
|
513
|
+
if request.name
|
|
514
|
+
header_params["name"] = request.name
|
|
515
|
+
end
|
|
516
|
+
|
|
517
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
518
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
519
|
+
|
|
520
|
+
options.apply_defaults timeout: @config.rpcs.get_data_product.timeout,
|
|
521
|
+
metadata: metadata,
|
|
522
|
+
retry_policy: @config.rpcs.get_data_product.retry_policy
|
|
523
|
+
|
|
524
|
+
options.apply_defaults timeout: @config.timeout,
|
|
525
|
+
metadata: @config.metadata,
|
|
526
|
+
retry_policy: @config.retry_policy
|
|
527
|
+
|
|
528
|
+
@data_product_service_stub.call_rpc :get_data_product, request, options: options do |response, operation|
|
|
529
|
+
yield response, operation if block_given?
|
|
530
|
+
end
|
|
531
|
+
rescue ::GRPC::BadStatus => e
|
|
532
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
533
|
+
end
|
|
534
|
+
|
|
535
|
+
##
|
|
536
|
+
# Lists data products for a given project.
|
|
537
|
+
#
|
|
538
|
+
# @overload list_data_products(request, options = nil)
|
|
539
|
+
# Pass arguments to `list_data_products` via a request object, either of type
|
|
540
|
+
# {::Google::Cloud::Dataplex::V1::ListDataProductsRequest} or an equivalent Hash.
|
|
541
|
+
#
|
|
542
|
+
# @param request [::Google::Cloud::Dataplex::V1::ListDataProductsRequest, ::Hash]
|
|
543
|
+
# A request object representing the call parameters. Required. To specify no
|
|
544
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
545
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
546
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
547
|
+
#
|
|
548
|
+
# @overload list_data_products(parent: nil, filter: nil, page_size: nil, page_token: nil, order_by: nil)
|
|
549
|
+
# Pass arguments to `list_data_products` via keyword arguments. Note that at
|
|
550
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
551
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
552
|
+
#
|
|
553
|
+
# @param parent [::String]
|
|
554
|
+
# Required. The parent, which has this collection of data products.
|
|
555
|
+
#
|
|
556
|
+
# Format: `projects/{project_id_or_number}/locations/{location_id}`.
|
|
557
|
+
#
|
|
558
|
+
# Supports listing across all locations with the wildcard `-` (hyphen)
|
|
559
|
+
# character. Example: `projects/{project_id_or_number}/locations/-`
|
|
560
|
+
# @param filter [::String]
|
|
561
|
+
# Optional. Filter expression that filters data products listed in the
|
|
562
|
+
# response.
|
|
563
|
+
#
|
|
564
|
+
# Example of using this filter is: `display_name="my-data-product"`
|
|
565
|
+
# @param page_size [::Integer]
|
|
566
|
+
# Optional. The maximum number of data products to return. The service may
|
|
567
|
+
# return fewer than this value. If unspecified, at most 50 data products will
|
|
568
|
+
# be returned. The maximum value is 1000; values above 1000 will be coerced
|
|
569
|
+
# to 1000.
|
|
570
|
+
# @param page_token [::String]
|
|
571
|
+
# Optional. A page token, received from a previous `ListDataProducts` call.
|
|
572
|
+
# Provide this to retrieve the subsequent page.
|
|
573
|
+
#
|
|
574
|
+
# When paginating, all other parameters provided to `ListDataProducts` must
|
|
575
|
+
# match the call that provided the page token.
|
|
576
|
+
# @param order_by [::String]
|
|
577
|
+
# Optional. Order by expression that orders data products listed in the
|
|
578
|
+
# response.
|
|
579
|
+
#
|
|
580
|
+
# Supported Order by fields are: `name` or `create_time`.
|
|
581
|
+
#
|
|
582
|
+
# If not specified, the ordering is undefined.
|
|
583
|
+
#
|
|
584
|
+
# Ordering by `create_time` is not supported when listing resources across
|
|
585
|
+
# locations (i.e. when request contains `/locations/-`).
|
|
586
|
+
#
|
|
587
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
588
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataProduct>]
|
|
589
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
590
|
+
#
|
|
591
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataProduct>]
|
|
592
|
+
#
|
|
593
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
594
|
+
#
|
|
595
|
+
# @example Basic example
|
|
596
|
+
# require "google/cloud/dataplex/v1"
|
|
597
|
+
#
|
|
598
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
599
|
+
# client = Google::Cloud::Dataplex::V1::DataProductService::Client.new
|
|
600
|
+
#
|
|
601
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
602
|
+
# request = Google::Cloud::Dataplex::V1::ListDataProductsRequest.new
|
|
603
|
+
#
|
|
604
|
+
# # Call the list_data_products method.
|
|
605
|
+
# result = client.list_data_products request
|
|
606
|
+
#
|
|
607
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
|
608
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
|
609
|
+
# result.each do |item|
|
|
610
|
+
# # Each element is of type ::Google::Cloud::Dataplex::V1::DataProduct.
|
|
611
|
+
# p item
|
|
612
|
+
# end
|
|
613
|
+
#
|
|
614
|
+
def list_data_products request, options = nil
|
|
615
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
616
|
+
|
|
617
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListDataProductsRequest
|
|
618
|
+
|
|
619
|
+
# Converts hash and nil to an options object
|
|
620
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
621
|
+
|
|
622
|
+
# Customize the options with defaults
|
|
623
|
+
metadata = @config.rpcs.list_data_products.metadata.to_h
|
|
624
|
+
|
|
625
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
626
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
627
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
628
|
+
gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
|
|
629
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
630
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
631
|
+
|
|
632
|
+
header_params = {}
|
|
633
|
+
if request.parent
|
|
634
|
+
header_params["parent"] = request.parent
|
|
635
|
+
end
|
|
636
|
+
|
|
637
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
638
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
639
|
+
|
|
640
|
+
options.apply_defaults timeout: @config.rpcs.list_data_products.timeout,
|
|
641
|
+
metadata: metadata,
|
|
642
|
+
retry_policy: @config.rpcs.list_data_products.retry_policy
|
|
643
|
+
|
|
644
|
+
options.apply_defaults timeout: @config.timeout,
|
|
645
|
+
metadata: @config.metadata,
|
|
646
|
+
retry_policy: @config.retry_policy
|
|
647
|
+
|
|
648
|
+
@data_product_service_stub.call_rpc :list_data_products, request, options: options do |response, operation|
|
|
649
|
+
response = ::Gapic::PagedEnumerable.new @data_product_service_stub, :list_data_products, request, response, operation, options
|
|
650
|
+
yield response, operation if block_given?
|
|
651
|
+
throw :response, response
|
|
652
|
+
end
|
|
653
|
+
rescue ::GRPC::BadStatus => e
|
|
654
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
655
|
+
end
|
|
656
|
+
|
|
657
|
+
##
|
|
658
|
+
# Updates a data product.
|
|
659
|
+
#
|
|
660
|
+
# @overload update_data_product(request, options = nil)
|
|
661
|
+
# Pass arguments to `update_data_product` via a request object, either of type
|
|
662
|
+
# {::Google::Cloud::Dataplex::V1::UpdateDataProductRequest} or an equivalent Hash.
|
|
663
|
+
#
|
|
664
|
+
# @param request [::Google::Cloud::Dataplex::V1::UpdateDataProductRequest, ::Hash]
|
|
665
|
+
# A request object representing the call parameters. Required. To specify no
|
|
666
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
667
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
668
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
669
|
+
#
|
|
670
|
+
# @overload update_data_product(data_product: nil, update_mask: nil, validate_only: nil)
|
|
671
|
+
# Pass arguments to `update_data_product` via keyword arguments. Note that at
|
|
672
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
673
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
674
|
+
#
|
|
675
|
+
# @param data_product [::Google::Cloud::Dataplex::V1::DataProduct, ::Hash]
|
|
676
|
+
# Required. The data product to update.
|
|
677
|
+
# The data product's `name` field is used to identify the data product to
|
|
678
|
+
# update.
|
|
679
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
|
680
|
+
# Optional. The list of fields to update.
|
|
681
|
+
# If this is empty or not set, then all the fields will be updated.
|
|
682
|
+
# @param validate_only [::Boolean]
|
|
683
|
+
# Optional. Validates the request without actually updating the data product.
|
|
684
|
+
# Default: false.
|
|
685
|
+
#
|
|
686
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
687
|
+
# @yieldparam response [::Gapic::Operation]
|
|
688
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
689
|
+
#
|
|
690
|
+
# @return [::Gapic::Operation]
|
|
691
|
+
#
|
|
692
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
693
|
+
#
|
|
694
|
+
# @example Basic example
|
|
695
|
+
# require "google/cloud/dataplex/v1"
|
|
696
|
+
#
|
|
697
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
698
|
+
# client = Google::Cloud::Dataplex::V1::DataProductService::Client.new
|
|
699
|
+
#
|
|
700
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
701
|
+
# request = Google::Cloud::Dataplex::V1::UpdateDataProductRequest.new
|
|
702
|
+
#
|
|
703
|
+
# # Call the update_data_product method.
|
|
704
|
+
# result = client.update_data_product request
|
|
705
|
+
#
|
|
706
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
|
707
|
+
# # check the status of an operation, cancel it, or wait for results.
|
|
708
|
+
# # Here is how to wait for a response.
|
|
709
|
+
# result.wait_until_done! timeout: 60
|
|
710
|
+
# if result.response?
|
|
711
|
+
# p result.response
|
|
712
|
+
# else
|
|
713
|
+
# puts "No response received."
|
|
714
|
+
# end
|
|
715
|
+
#
|
|
716
|
+
def update_data_product request, options = nil
|
|
717
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
718
|
+
|
|
719
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateDataProductRequest
|
|
720
|
+
|
|
721
|
+
# Converts hash and nil to an options object
|
|
722
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
723
|
+
|
|
724
|
+
# Customize the options with defaults
|
|
725
|
+
metadata = @config.rpcs.update_data_product.metadata.to_h
|
|
726
|
+
|
|
727
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
728
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
729
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
730
|
+
gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
|
|
731
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
732
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
733
|
+
|
|
734
|
+
header_params = {}
|
|
735
|
+
if request.data_product&.name
|
|
736
|
+
header_params["data_product.name"] = request.data_product.name
|
|
737
|
+
end
|
|
738
|
+
|
|
739
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
740
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
741
|
+
|
|
742
|
+
options.apply_defaults timeout: @config.rpcs.update_data_product.timeout,
|
|
743
|
+
metadata: metadata,
|
|
744
|
+
retry_policy: @config.rpcs.update_data_product.retry_policy
|
|
745
|
+
|
|
746
|
+
options.apply_defaults timeout: @config.timeout,
|
|
747
|
+
metadata: @config.metadata,
|
|
748
|
+
retry_policy: @config.retry_policy
|
|
749
|
+
|
|
750
|
+
@data_product_service_stub.call_rpc :update_data_product, request, options: options do |response, operation|
|
|
751
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
|
752
|
+
yield response, operation if block_given?
|
|
753
|
+
throw :response, response
|
|
754
|
+
end
|
|
755
|
+
rescue ::GRPC::BadStatus => e
|
|
756
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
757
|
+
end
|
|
758
|
+
|
|
759
|
+
##
|
|
760
|
+
# Requests access to a data product. This will trigger an access approval
|
|
761
|
+
# workflow, and the requester will need to wait for the approval to be
|
|
762
|
+
# granted before they will be able to access the data product assets.
|
|
763
|
+
#
|
|
764
|
+
# @overload request_data_product_access(request, options = nil)
|
|
765
|
+
# Pass arguments to `request_data_product_access` via a request object, either of type
|
|
766
|
+
# {::Google::Cloud::Dataplex::V1::RequestDataProductAccessRequest} or an equivalent Hash.
|
|
767
|
+
#
|
|
768
|
+
# @param request [::Google::Cloud::Dataplex::V1::RequestDataProductAccessRequest, ::Hash]
|
|
769
|
+
# A request object representing the call parameters. Required. To specify no
|
|
770
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
771
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
772
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
773
|
+
#
|
|
774
|
+
# @overload request_data_product_access(parent: nil, change_request: nil, validate_only: nil)
|
|
775
|
+
# Pass arguments to `request_data_product_access` via keyword arguments. Note that at
|
|
776
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
777
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
778
|
+
#
|
|
779
|
+
# @param parent [::String]
|
|
780
|
+
# Required. The resource name of the data product.
|
|
781
|
+
# Format:
|
|
782
|
+
# projects/\\{project_number}/locations/\\{location_id}/dataProducts/\\{data_product_id}
|
|
783
|
+
# @param change_request [::Google::Cloud::Dataplex::V1::ChangeRequest, ::Hash]
|
|
784
|
+
# Required. The change request for the data product access request.
|
|
785
|
+
# @param validate_only [::Boolean]
|
|
786
|
+
# Optional. Validates the request without actually creating the access change
|
|
787
|
+
# request. Defaults to false.
|
|
788
|
+
#
|
|
789
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
790
|
+
# @yieldparam response [::Google::Cloud::Dataplex::V1::RequestDataProductAccessResponse]
|
|
791
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
792
|
+
#
|
|
793
|
+
# @return [::Google::Cloud::Dataplex::V1::RequestDataProductAccessResponse]
|
|
794
|
+
#
|
|
795
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
796
|
+
#
|
|
797
|
+
# @example Basic example
|
|
798
|
+
# require "google/cloud/dataplex/v1"
|
|
799
|
+
#
|
|
800
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
801
|
+
# client = Google::Cloud::Dataplex::V1::DataProductService::Client.new
|
|
802
|
+
#
|
|
803
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
804
|
+
# request = Google::Cloud::Dataplex::V1::RequestDataProductAccessRequest.new
|
|
805
|
+
#
|
|
806
|
+
# # Call the request_data_product_access method.
|
|
807
|
+
# result = client.request_data_product_access request
|
|
808
|
+
#
|
|
809
|
+
# # The returned object is of type Google::Cloud::Dataplex::V1::RequestDataProductAccessResponse.
|
|
810
|
+
# p result
|
|
811
|
+
#
|
|
812
|
+
def request_data_product_access request, options = nil
|
|
813
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
814
|
+
|
|
815
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::RequestDataProductAccessRequest
|
|
816
|
+
|
|
817
|
+
# Converts hash and nil to an options object
|
|
818
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
819
|
+
|
|
820
|
+
# Customize the options with defaults
|
|
821
|
+
metadata = @config.rpcs.request_data_product_access.metadata.to_h
|
|
822
|
+
|
|
823
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
824
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
825
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
826
|
+
gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
|
|
827
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
828
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
829
|
+
|
|
830
|
+
header_params = {}
|
|
831
|
+
if request.parent
|
|
832
|
+
header_params["parent"] = request.parent
|
|
833
|
+
end
|
|
834
|
+
|
|
835
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
836
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
837
|
+
|
|
838
|
+
options.apply_defaults timeout: @config.rpcs.request_data_product_access.timeout,
|
|
839
|
+
metadata: metadata,
|
|
840
|
+
retry_policy: @config.rpcs.request_data_product_access.retry_policy
|
|
841
|
+
|
|
842
|
+
options.apply_defaults timeout: @config.timeout,
|
|
843
|
+
metadata: @config.metadata,
|
|
844
|
+
retry_policy: @config.retry_policy
|
|
845
|
+
|
|
846
|
+
@data_product_service_stub.call_rpc :request_data_product_access, request, options: options do |response, operation|
|
|
847
|
+
yield response, operation if block_given?
|
|
848
|
+
end
|
|
849
|
+
rescue ::GRPC::BadStatus => e
|
|
850
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
851
|
+
end
|
|
852
|
+
|
|
853
|
+
##
|
|
854
|
+
# Creates a data asset.
|
|
855
|
+
#
|
|
856
|
+
# @overload create_data_asset(request, options = nil)
|
|
857
|
+
# Pass arguments to `create_data_asset` via a request object, either of type
|
|
858
|
+
# {::Google::Cloud::Dataplex::V1::CreateDataAssetRequest} or an equivalent Hash.
|
|
859
|
+
#
|
|
860
|
+
# @param request [::Google::Cloud::Dataplex::V1::CreateDataAssetRequest, ::Hash]
|
|
861
|
+
# A request object representing the call parameters. Required. To specify no
|
|
862
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
863
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
864
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
865
|
+
#
|
|
866
|
+
# @overload create_data_asset(parent: nil, data_asset_id: nil, data_asset: nil, validate_only: nil)
|
|
867
|
+
# Pass arguments to `create_data_asset` via keyword arguments. Note that at
|
|
868
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
869
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
870
|
+
#
|
|
871
|
+
# @param parent [::String]
|
|
872
|
+
# Required. The parent resource where this data asset will be created.
|
|
873
|
+
# Format:
|
|
874
|
+
# projects/\\{project_id_or_number}/locations/\\{location_id}/dataProducts/\\{data_product_id}
|
|
875
|
+
# @param data_asset_id [::String]
|
|
876
|
+
# Optional. The ID of the data asset to create.
|
|
877
|
+
#
|
|
878
|
+
# The ID must conform to RFC-1034 and contain only lower-case letters (a-z),
|
|
879
|
+
# numbers (0-9), or hyphens, with the first character a letter, the last a
|
|
880
|
+
# letter or a number, and a 63 character maximum. Characters outside of
|
|
881
|
+
# ASCII are not permitted.
|
|
882
|
+
# Valid format regex: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`
|
|
883
|
+
# If not provided, a system generated ID will be used.
|
|
884
|
+
# @param data_asset [::Google::Cloud::Dataplex::V1::DataAsset, ::Hash]
|
|
885
|
+
# Required. The data asset to create.
|
|
886
|
+
# @param validate_only [::Boolean]
|
|
887
|
+
# Optional. Validates the request without actually creating the data asset.
|
|
888
|
+
# Defaults to false.
|
|
889
|
+
#
|
|
890
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
891
|
+
# @yieldparam response [::Gapic::Operation]
|
|
892
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
893
|
+
#
|
|
894
|
+
# @return [::Gapic::Operation]
|
|
895
|
+
#
|
|
896
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
897
|
+
#
|
|
898
|
+
# @example Basic example
|
|
899
|
+
# require "google/cloud/dataplex/v1"
|
|
900
|
+
#
|
|
901
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
902
|
+
# client = Google::Cloud::Dataplex::V1::DataProductService::Client.new
|
|
903
|
+
#
|
|
904
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
905
|
+
# request = Google::Cloud::Dataplex::V1::CreateDataAssetRequest.new
|
|
906
|
+
#
|
|
907
|
+
# # Call the create_data_asset method.
|
|
908
|
+
# result = client.create_data_asset request
|
|
909
|
+
#
|
|
910
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
|
911
|
+
# # check the status of an operation, cancel it, or wait for results.
|
|
912
|
+
# # Here is how to wait for a response.
|
|
913
|
+
# result.wait_until_done! timeout: 60
|
|
914
|
+
# if result.response?
|
|
915
|
+
# p result.response
|
|
916
|
+
# else
|
|
917
|
+
# puts "No response received."
|
|
918
|
+
# end
|
|
919
|
+
#
|
|
920
|
+
def create_data_asset request, options = nil
|
|
921
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
922
|
+
|
|
923
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateDataAssetRequest
|
|
924
|
+
|
|
925
|
+
# Converts hash and nil to an options object
|
|
926
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
927
|
+
|
|
928
|
+
# Customize the options with defaults
|
|
929
|
+
metadata = @config.rpcs.create_data_asset.metadata.to_h
|
|
930
|
+
|
|
931
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
932
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
933
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
934
|
+
gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
|
|
935
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
936
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
937
|
+
|
|
938
|
+
header_params = {}
|
|
939
|
+
if request.parent
|
|
940
|
+
header_params["parent"] = request.parent
|
|
941
|
+
end
|
|
942
|
+
|
|
943
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
944
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
945
|
+
|
|
946
|
+
options.apply_defaults timeout: @config.rpcs.create_data_asset.timeout,
|
|
947
|
+
metadata: metadata,
|
|
948
|
+
retry_policy: @config.rpcs.create_data_asset.retry_policy
|
|
949
|
+
|
|
950
|
+
options.apply_defaults timeout: @config.timeout,
|
|
951
|
+
metadata: @config.metadata,
|
|
952
|
+
retry_policy: @config.retry_policy
|
|
953
|
+
|
|
954
|
+
@data_product_service_stub.call_rpc :create_data_asset, request, options: options do |response, operation|
|
|
955
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
|
956
|
+
yield response, operation if block_given?
|
|
957
|
+
throw :response, response
|
|
958
|
+
end
|
|
959
|
+
rescue ::GRPC::BadStatus => e
|
|
960
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
961
|
+
end
|
|
962
|
+
|
|
963
|
+
##
|
|
964
|
+
# Updates a data asset.
|
|
965
|
+
#
|
|
966
|
+
# @overload update_data_asset(request, options = nil)
|
|
967
|
+
# Pass arguments to `update_data_asset` via a request object, either of type
|
|
968
|
+
# {::Google::Cloud::Dataplex::V1::UpdateDataAssetRequest} or an equivalent Hash.
|
|
969
|
+
#
|
|
970
|
+
# @param request [::Google::Cloud::Dataplex::V1::UpdateDataAssetRequest, ::Hash]
|
|
971
|
+
# A request object representing the call parameters. Required. To specify no
|
|
972
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
973
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
974
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
975
|
+
#
|
|
976
|
+
# @overload update_data_asset(data_asset: nil, update_mask: nil, validate_only: nil)
|
|
977
|
+
# Pass arguments to `update_data_asset` via keyword arguments. Note that at
|
|
978
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
979
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
980
|
+
#
|
|
981
|
+
# @param data_asset [::Google::Cloud::Dataplex::V1::DataAsset, ::Hash]
|
|
982
|
+
# Required. The data asset to update.
|
|
983
|
+
# The data asset's `name` field is used to identify the data asset to update.
|
|
984
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
|
985
|
+
# Optional. The list of fields to update.
|
|
986
|
+
# If this is empty or not set, then all the fields will be updated.
|
|
987
|
+
# @param validate_only [::Boolean]
|
|
988
|
+
# Optional. Validates the request without actually updating the data asset.
|
|
989
|
+
# Defaults to false.
|
|
990
|
+
#
|
|
991
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
992
|
+
# @yieldparam response [::Gapic::Operation]
|
|
993
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
994
|
+
#
|
|
995
|
+
# @return [::Gapic::Operation]
|
|
996
|
+
#
|
|
997
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
998
|
+
#
|
|
999
|
+
# @example Basic example
|
|
1000
|
+
# require "google/cloud/dataplex/v1"
|
|
1001
|
+
#
|
|
1002
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
1003
|
+
# client = Google::Cloud::Dataplex::V1::DataProductService::Client.new
|
|
1004
|
+
#
|
|
1005
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
1006
|
+
# request = Google::Cloud::Dataplex::V1::UpdateDataAssetRequest.new
|
|
1007
|
+
#
|
|
1008
|
+
# # Call the update_data_asset method.
|
|
1009
|
+
# result = client.update_data_asset request
|
|
1010
|
+
#
|
|
1011
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
|
1012
|
+
# # check the status of an operation, cancel it, or wait for results.
|
|
1013
|
+
# # Here is how to wait for a response.
|
|
1014
|
+
# result.wait_until_done! timeout: 60
|
|
1015
|
+
# if result.response?
|
|
1016
|
+
# p result.response
|
|
1017
|
+
# else
|
|
1018
|
+
# puts "No response received."
|
|
1019
|
+
# end
|
|
1020
|
+
#
|
|
1021
|
+
def update_data_asset request, options = nil
|
|
1022
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
1023
|
+
|
|
1024
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateDataAssetRequest
|
|
1025
|
+
|
|
1026
|
+
# Converts hash and nil to an options object
|
|
1027
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
1028
|
+
|
|
1029
|
+
# Customize the options with defaults
|
|
1030
|
+
metadata = @config.rpcs.update_data_asset.metadata.to_h
|
|
1031
|
+
|
|
1032
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
1033
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
1034
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
1035
|
+
gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
|
|
1036
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
1037
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
1038
|
+
|
|
1039
|
+
header_params = {}
|
|
1040
|
+
if request.data_asset&.name
|
|
1041
|
+
header_params["data_asset.name"] = request.data_asset.name
|
|
1042
|
+
end
|
|
1043
|
+
|
|
1044
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
1045
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
1046
|
+
|
|
1047
|
+
options.apply_defaults timeout: @config.rpcs.update_data_asset.timeout,
|
|
1048
|
+
metadata: metadata,
|
|
1049
|
+
retry_policy: @config.rpcs.update_data_asset.retry_policy
|
|
1050
|
+
|
|
1051
|
+
options.apply_defaults timeout: @config.timeout,
|
|
1052
|
+
metadata: @config.metadata,
|
|
1053
|
+
retry_policy: @config.retry_policy
|
|
1054
|
+
|
|
1055
|
+
@data_product_service_stub.call_rpc :update_data_asset, request, options: options do |response, operation|
|
|
1056
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
|
1057
|
+
yield response, operation if block_given?
|
|
1058
|
+
throw :response, response
|
|
1059
|
+
end
|
|
1060
|
+
rescue ::GRPC::BadStatus => e
|
|
1061
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
1062
|
+
end
|
|
1063
|
+
|
|
1064
|
+
##
|
|
1065
|
+
# Deletes a data asset.
|
|
1066
|
+
#
|
|
1067
|
+
# @overload delete_data_asset(request, options = nil)
|
|
1068
|
+
# Pass arguments to `delete_data_asset` via a request object, either of type
|
|
1069
|
+
# {::Google::Cloud::Dataplex::V1::DeleteDataAssetRequest} or an equivalent Hash.
|
|
1070
|
+
#
|
|
1071
|
+
# @param request [::Google::Cloud::Dataplex::V1::DeleteDataAssetRequest, ::Hash]
|
|
1072
|
+
# A request object representing the call parameters. Required. To specify no
|
|
1073
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
1074
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
1075
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
1076
|
+
#
|
|
1077
|
+
# @overload delete_data_asset(name: nil, etag: nil, validate_only: nil)
|
|
1078
|
+
# Pass arguments to `delete_data_asset` via keyword arguments. Note that at
|
|
1079
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
1080
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
1081
|
+
#
|
|
1082
|
+
# @param name [::String]
|
|
1083
|
+
# Required. The name of the data asset to delete.
|
|
1084
|
+
# Format:
|
|
1085
|
+
# projects/\\{project_id_or_number}/locations/\\{location_id}/dataProducts/\\{data_product_id}/dataAssets/\\{data_asset_id}
|
|
1086
|
+
# @param etag [::String]
|
|
1087
|
+
# Optional. The etag of the data asset.
|
|
1088
|
+
# If this is provided, it must match the server's etag.
|
|
1089
|
+
# If the etag is provided and does not match the server-computed etag,
|
|
1090
|
+
# the request must fail with a ABORTED error code.
|
|
1091
|
+
# @param validate_only [::Boolean]
|
|
1092
|
+
# Optional. Validates the request without actually deleting the data asset.
|
|
1093
|
+
# Defaults to false.
|
|
1094
|
+
#
|
|
1095
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
1096
|
+
# @yieldparam response [::Gapic::Operation]
|
|
1097
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
1098
|
+
#
|
|
1099
|
+
# @return [::Gapic::Operation]
|
|
1100
|
+
#
|
|
1101
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
1102
|
+
#
|
|
1103
|
+
# @example Basic example
|
|
1104
|
+
# require "google/cloud/dataplex/v1"
|
|
1105
|
+
#
|
|
1106
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
1107
|
+
# client = Google::Cloud::Dataplex::V1::DataProductService::Client.new
|
|
1108
|
+
#
|
|
1109
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
1110
|
+
# request = Google::Cloud::Dataplex::V1::DeleteDataAssetRequest.new
|
|
1111
|
+
#
|
|
1112
|
+
# # Call the delete_data_asset method.
|
|
1113
|
+
# result = client.delete_data_asset request
|
|
1114
|
+
#
|
|
1115
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
|
1116
|
+
# # check the status of an operation, cancel it, or wait for results.
|
|
1117
|
+
# # Here is how to wait for a response.
|
|
1118
|
+
# result.wait_until_done! timeout: 60
|
|
1119
|
+
# if result.response?
|
|
1120
|
+
# p result.response
|
|
1121
|
+
# else
|
|
1122
|
+
# puts "No response received."
|
|
1123
|
+
# end
|
|
1124
|
+
#
|
|
1125
|
+
def delete_data_asset request, options = nil
|
|
1126
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
1127
|
+
|
|
1128
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteDataAssetRequest
|
|
1129
|
+
|
|
1130
|
+
# Converts hash and nil to an options object
|
|
1131
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
1132
|
+
|
|
1133
|
+
# Customize the options with defaults
|
|
1134
|
+
metadata = @config.rpcs.delete_data_asset.metadata.to_h
|
|
1135
|
+
|
|
1136
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
1137
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
1138
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
1139
|
+
gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
|
|
1140
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
1141
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
1142
|
+
|
|
1143
|
+
header_params = {}
|
|
1144
|
+
if request.name
|
|
1145
|
+
header_params["name"] = request.name
|
|
1146
|
+
end
|
|
1147
|
+
|
|
1148
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
1149
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
1150
|
+
|
|
1151
|
+
options.apply_defaults timeout: @config.rpcs.delete_data_asset.timeout,
|
|
1152
|
+
metadata: metadata,
|
|
1153
|
+
retry_policy: @config.rpcs.delete_data_asset.retry_policy
|
|
1154
|
+
|
|
1155
|
+
options.apply_defaults timeout: @config.timeout,
|
|
1156
|
+
metadata: @config.metadata,
|
|
1157
|
+
retry_policy: @config.retry_policy
|
|
1158
|
+
|
|
1159
|
+
@data_product_service_stub.call_rpc :delete_data_asset, request, options: options do |response, operation|
|
|
1160
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
|
1161
|
+
yield response, operation if block_given?
|
|
1162
|
+
throw :response, response
|
|
1163
|
+
end
|
|
1164
|
+
rescue ::GRPC::BadStatus => e
|
|
1165
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
1166
|
+
end
|
|
1167
|
+
|
|
1168
|
+
##
|
|
1169
|
+
# Gets a data asset.
|
|
1170
|
+
#
|
|
1171
|
+
# @overload get_data_asset(request, options = nil)
|
|
1172
|
+
# Pass arguments to `get_data_asset` via a request object, either of type
|
|
1173
|
+
# {::Google::Cloud::Dataplex::V1::GetDataAssetRequest} or an equivalent Hash.
|
|
1174
|
+
#
|
|
1175
|
+
# @param request [::Google::Cloud::Dataplex::V1::GetDataAssetRequest, ::Hash]
|
|
1176
|
+
# A request object representing the call parameters. Required. To specify no
|
|
1177
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
1178
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
1179
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
1180
|
+
#
|
|
1181
|
+
# @overload get_data_asset(name: nil)
|
|
1182
|
+
# Pass arguments to `get_data_asset` via keyword arguments. Note that at
|
|
1183
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
1184
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
1185
|
+
#
|
|
1186
|
+
# @param name [::String]
|
|
1187
|
+
# Required. The name of the data asset to retrieve.
|
|
1188
|
+
# Format:
|
|
1189
|
+
# projects/\\{project_id_or_number}/locations/\\{location_id}/dataProducts/\\{data_product_id}/dataAssets/\\{data_asset_id}
|
|
1190
|
+
#
|
|
1191
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
1192
|
+
# @yieldparam response [::Google::Cloud::Dataplex::V1::DataAsset]
|
|
1193
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
1194
|
+
#
|
|
1195
|
+
# @return [::Google::Cloud::Dataplex::V1::DataAsset]
|
|
1196
|
+
#
|
|
1197
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
1198
|
+
#
|
|
1199
|
+
# @example Basic example
|
|
1200
|
+
# require "google/cloud/dataplex/v1"
|
|
1201
|
+
#
|
|
1202
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
1203
|
+
# client = Google::Cloud::Dataplex::V1::DataProductService::Client.new
|
|
1204
|
+
#
|
|
1205
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
1206
|
+
# request = Google::Cloud::Dataplex::V1::GetDataAssetRequest.new
|
|
1207
|
+
#
|
|
1208
|
+
# # Call the get_data_asset method.
|
|
1209
|
+
# result = client.get_data_asset request
|
|
1210
|
+
#
|
|
1211
|
+
# # The returned object is of type Google::Cloud::Dataplex::V1::DataAsset.
|
|
1212
|
+
# p result
|
|
1213
|
+
#
|
|
1214
|
+
def get_data_asset request, options = nil
|
|
1215
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
1216
|
+
|
|
1217
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetDataAssetRequest
|
|
1218
|
+
|
|
1219
|
+
# Converts hash and nil to an options object
|
|
1220
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
1221
|
+
|
|
1222
|
+
# Customize the options with defaults
|
|
1223
|
+
metadata = @config.rpcs.get_data_asset.metadata.to_h
|
|
1224
|
+
|
|
1225
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
1226
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
1227
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
1228
|
+
gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
|
|
1229
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
1230
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
1231
|
+
|
|
1232
|
+
header_params = {}
|
|
1233
|
+
if request.name
|
|
1234
|
+
header_params["name"] = request.name
|
|
1235
|
+
end
|
|
1236
|
+
|
|
1237
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
1238
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
1239
|
+
|
|
1240
|
+
options.apply_defaults timeout: @config.rpcs.get_data_asset.timeout,
|
|
1241
|
+
metadata: metadata,
|
|
1242
|
+
retry_policy: @config.rpcs.get_data_asset.retry_policy
|
|
1243
|
+
|
|
1244
|
+
options.apply_defaults timeout: @config.timeout,
|
|
1245
|
+
metadata: @config.metadata,
|
|
1246
|
+
retry_policy: @config.retry_policy
|
|
1247
|
+
|
|
1248
|
+
@data_product_service_stub.call_rpc :get_data_asset, request, options: options do |response, operation|
|
|
1249
|
+
yield response, operation if block_given?
|
|
1250
|
+
end
|
|
1251
|
+
rescue ::GRPC::BadStatus => e
|
|
1252
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
1253
|
+
end
|
|
1254
|
+
|
|
1255
|
+
##
|
|
1256
|
+
# Lists data assets for a given data product.
|
|
1257
|
+
#
|
|
1258
|
+
# @overload list_data_assets(request, options = nil)
|
|
1259
|
+
# Pass arguments to `list_data_assets` via a request object, either of type
|
|
1260
|
+
# {::Google::Cloud::Dataplex::V1::ListDataAssetsRequest} or an equivalent Hash.
|
|
1261
|
+
#
|
|
1262
|
+
# @param request [::Google::Cloud::Dataplex::V1::ListDataAssetsRequest, ::Hash]
|
|
1263
|
+
# A request object representing the call parameters. Required. To specify no
|
|
1264
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
1265
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
1266
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
1267
|
+
#
|
|
1268
|
+
# @overload list_data_assets(parent: nil, filter: nil, order_by: nil, page_size: nil, page_token: nil)
|
|
1269
|
+
# Pass arguments to `list_data_assets` via keyword arguments. Note that at
|
|
1270
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
1271
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
1272
|
+
#
|
|
1273
|
+
# @param parent [::String]
|
|
1274
|
+
# Required. The parent, which has this collection of data assets.
|
|
1275
|
+
# Format:
|
|
1276
|
+
# projects/\\{project_id_or_number}/locations/\\{location_id}/dataProducts/\\{data_product_id}
|
|
1277
|
+
# @param filter [::String]
|
|
1278
|
+
# Optional. Filter expression that filters data assets listed in the
|
|
1279
|
+
# response.
|
|
1280
|
+
# @param order_by [::String]
|
|
1281
|
+
# Optional. Order by expression that orders data assets listed in the
|
|
1282
|
+
# response.
|
|
1283
|
+
#
|
|
1284
|
+
# Supported `order_by` fields are: `name` or `create_time`.
|
|
1285
|
+
#
|
|
1286
|
+
# If not specified, the ordering is undefined.
|
|
1287
|
+
# @param page_size [::Integer]
|
|
1288
|
+
# Optional. The maximum number of data assets to return. The service may
|
|
1289
|
+
# return fewer than this value. If unspecified, at most 50 data assets will
|
|
1290
|
+
# be returned. The maximum value is 1000; values above 1000 will be coerced
|
|
1291
|
+
# to 1000.
|
|
1292
|
+
# @param page_token [::String]
|
|
1293
|
+
# Optional. A page token, received from a previous `ListDataAssets` call.
|
|
1294
|
+
# Provide this to retrieve the subsequent page.
|
|
1295
|
+
#
|
|
1296
|
+
# When paginating, all other parameters provided to `ListDataAssets` must
|
|
1297
|
+
# match the call that provided the page token.
|
|
1298
|
+
#
|
|
1299
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
1300
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataAsset>]
|
|
1301
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
1302
|
+
#
|
|
1303
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataAsset>]
|
|
1304
|
+
#
|
|
1305
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
1306
|
+
#
|
|
1307
|
+
# @example Basic example
|
|
1308
|
+
# require "google/cloud/dataplex/v1"
|
|
1309
|
+
#
|
|
1310
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
1311
|
+
# client = Google::Cloud::Dataplex::V1::DataProductService::Client.new
|
|
1312
|
+
#
|
|
1313
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
1314
|
+
# request = Google::Cloud::Dataplex::V1::ListDataAssetsRequest.new
|
|
1315
|
+
#
|
|
1316
|
+
# # Call the list_data_assets method.
|
|
1317
|
+
# result = client.list_data_assets request
|
|
1318
|
+
#
|
|
1319
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
|
1320
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
|
1321
|
+
# result.each do |item|
|
|
1322
|
+
# # Each element is of type ::Google::Cloud::Dataplex::V1::DataAsset.
|
|
1323
|
+
# p item
|
|
1324
|
+
# end
|
|
1325
|
+
#
|
|
1326
|
+
def list_data_assets request, options = nil
|
|
1327
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
1328
|
+
|
|
1329
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListDataAssetsRequest
|
|
1330
|
+
|
|
1331
|
+
# Converts hash and nil to an options object
|
|
1332
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
1333
|
+
|
|
1334
|
+
# Customize the options with defaults
|
|
1335
|
+
metadata = @config.rpcs.list_data_assets.metadata.to_h
|
|
1336
|
+
|
|
1337
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
1338
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
1339
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
1340
|
+
gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
|
|
1341
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
1342
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
1343
|
+
|
|
1344
|
+
header_params = {}
|
|
1345
|
+
if request.parent
|
|
1346
|
+
header_params["parent"] = request.parent
|
|
1347
|
+
end
|
|
1348
|
+
|
|
1349
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
1350
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
1351
|
+
|
|
1352
|
+
options.apply_defaults timeout: @config.rpcs.list_data_assets.timeout,
|
|
1353
|
+
metadata: metadata,
|
|
1354
|
+
retry_policy: @config.rpcs.list_data_assets.retry_policy
|
|
1355
|
+
|
|
1356
|
+
options.apply_defaults timeout: @config.timeout,
|
|
1357
|
+
metadata: @config.metadata,
|
|
1358
|
+
retry_policy: @config.retry_policy
|
|
1359
|
+
|
|
1360
|
+
@data_product_service_stub.call_rpc :list_data_assets, request, options: options do |response, operation|
|
|
1361
|
+
response = ::Gapic::PagedEnumerable.new @data_product_service_stub, :list_data_assets, request, response, operation, options
|
|
1362
|
+
yield response, operation if block_given?
|
|
1363
|
+
throw :response, response
|
|
1364
|
+
end
|
|
1365
|
+
rescue ::GRPC::BadStatus => e
|
|
1366
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
1367
|
+
end
|
|
1368
|
+
|
|
1369
|
+
##
|
|
1370
|
+
# Configuration class for the DataProductService API.
|
|
1371
|
+
#
|
|
1372
|
+
# This class represents the configuration for DataProductService,
|
|
1373
|
+
# providing control over timeouts, retry behavior, logging, transport
|
|
1374
|
+
# parameters, and other low-level controls. Certain parameters can also be
|
|
1375
|
+
# applied individually to specific RPCs. See
|
|
1376
|
+
# {::Google::Cloud::Dataplex::V1::DataProductService::Client::Configuration::Rpcs}
|
|
1377
|
+
# for a list of RPCs that can be configured independently.
|
|
1378
|
+
#
|
|
1379
|
+
# Configuration can be applied globally to all clients, or to a single client
|
|
1380
|
+
# on construction.
|
|
1381
|
+
#
|
|
1382
|
+
# @example
|
|
1383
|
+
#
|
|
1384
|
+
# # Modify the global config, setting the timeout for
|
|
1385
|
+
# # create_data_product to 20 seconds,
|
|
1386
|
+
# # and all remaining timeouts to 10 seconds.
|
|
1387
|
+
# ::Google::Cloud::Dataplex::V1::DataProductService::Client.configure do |config|
|
|
1388
|
+
# config.timeout = 10.0
|
|
1389
|
+
# config.rpcs.create_data_product.timeout = 20.0
|
|
1390
|
+
# end
|
|
1391
|
+
#
|
|
1392
|
+
# # Apply the above configuration only to a new client.
|
|
1393
|
+
# client = ::Google::Cloud::Dataplex::V1::DataProductService::Client.new do |config|
|
|
1394
|
+
# config.timeout = 10.0
|
|
1395
|
+
# config.rpcs.create_data_product.timeout = 20.0
|
|
1396
|
+
# end
|
|
1397
|
+
#
|
|
1398
|
+
# @!attribute [rw] endpoint
|
|
1399
|
+
# A custom service endpoint, as a hostname or hostname:port. The default is
|
|
1400
|
+
# nil, indicating to use the default endpoint in the current universe domain.
|
|
1401
|
+
# @return [::String,nil]
|
|
1402
|
+
# @!attribute [rw] credentials
|
|
1403
|
+
# Credentials to send with calls. You may provide any of the following types:
|
|
1404
|
+
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
|
1405
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
|
1406
|
+
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
|
1407
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
|
1408
|
+
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
|
1409
|
+
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
|
1410
|
+
# * (`nil`) indicating no credentials
|
|
1411
|
+
#
|
|
1412
|
+
# @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials
|
|
1413
|
+
# is deprecated. Providing an unvalidated credential configuration to
|
|
1414
|
+
# Google APIs can compromise the security of your systems and data.
|
|
1415
|
+
#
|
|
1416
|
+
# @example
|
|
1417
|
+
#
|
|
1418
|
+
# # The recommended way to provide credentials is to use the `make_creds` method
|
|
1419
|
+
# # on the appropriate credentials class for your environment.
|
|
1420
|
+
#
|
|
1421
|
+
# require "googleauth"
|
|
1422
|
+
#
|
|
1423
|
+
# credentials = ::Google::Auth::ServiceAccountCredentials.make_creds(
|
|
1424
|
+
# json_key_io: ::File.open("/path/to/keyfile.json")
|
|
1425
|
+
# )
|
|
1426
|
+
#
|
|
1427
|
+
# client = ::Google::Cloud::Dataplex::V1::DataProductService::Client.new do |config|
|
|
1428
|
+
# config.credentials = credentials
|
|
1429
|
+
# end
|
|
1430
|
+
#
|
|
1431
|
+
# @note Warning: If you accept a credential configuration (JSON file or Hash) from an
|
|
1432
|
+
# external source for authentication to Google Cloud, you must validate it before
|
|
1433
|
+
# providing it to a Google API client library. Providing an unvalidated credential
|
|
1434
|
+
# configuration to Google APIs can compromise the security of your systems and data.
|
|
1435
|
+
# For more information, refer to [Validate credential configurations from external
|
|
1436
|
+
# sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
|
|
1437
|
+
# @return [::Object]
|
|
1438
|
+
# @!attribute [rw] scope
|
|
1439
|
+
# The OAuth scopes
|
|
1440
|
+
# @return [::Array<::String>]
|
|
1441
|
+
# @!attribute [rw] lib_name
|
|
1442
|
+
# The library name as recorded in instrumentation and logging
|
|
1443
|
+
# @return [::String]
|
|
1444
|
+
# @!attribute [rw] lib_version
|
|
1445
|
+
# The library version as recorded in instrumentation and logging
|
|
1446
|
+
# @return [::String]
|
|
1447
|
+
# @!attribute [rw] channel_args
|
|
1448
|
+
# Extra parameters passed to the gRPC channel. Note: this is ignored if a
|
|
1449
|
+
# `GRPC::Core::Channel` object is provided as the credential.
|
|
1450
|
+
# @return [::Hash]
|
|
1451
|
+
# @!attribute [rw] interceptors
|
|
1452
|
+
# An array of interceptors that are run before calls are executed.
|
|
1453
|
+
# @return [::Array<::GRPC::ClientInterceptor>]
|
|
1454
|
+
# @!attribute [rw] timeout
|
|
1455
|
+
# The call timeout in seconds.
|
|
1456
|
+
# @return [::Numeric]
|
|
1457
|
+
# @!attribute [rw] metadata
|
|
1458
|
+
# Additional gRPC headers to be sent with the call.
|
|
1459
|
+
# @return [::Hash{::Symbol=>::String}]
|
|
1460
|
+
# @!attribute [rw] retry_policy
|
|
1461
|
+
# The retry policy. The value is a hash with the following keys:
|
|
1462
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
|
1463
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
|
1464
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
|
1465
|
+
# * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0.
|
|
1466
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
|
1467
|
+
# trigger a retry.
|
|
1468
|
+
# @return [::Hash]
|
|
1469
|
+
# @!attribute [rw] quota_project
|
|
1470
|
+
# A separate project against which to charge quota.
|
|
1471
|
+
# @return [::String]
|
|
1472
|
+
# @!attribute [rw] universe_domain
|
|
1473
|
+
# The universe domain within which to make requests. This determines the
|
|
1474
|
+
# default endpoint URL. The default value of nil uses the environment
|
|
1475
|
+
# universe (usually the default "googleapis.com" universe).
|
|
1476
|
+
# @return [::String,nil]
|
|
1477
|
+
# @!attribute [rw] logger
|
|
1478
|
+
# A custom logger to use for request/response debug logging, or the value
|
|
1479
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
|
1480
|
+
# explicitly disable logging.
|
|
1481
|
+
# @return [::Logger,:default,nil]
|
|
1482
|
+
#
|
|
1483
|
+
class Configuration
|
|
1484
|
+
extend ::Gapic::Config
|
|
1485
|
+
|
|
1486
|
+
# @private
|
|
1487
|
+
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
|
1488
|
+
DEFAULT_ENDPOINT = "dataplex.googleapis.com"
|
|
1489
|
+
|
|
1490
|
+
config_attr :endpoint, nil, ::String, nil
|
|
1491
|
+
config_attr :credentials, nil do |value|
|
|
1492
|
+
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil]
|
|
1493
|
+
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel
|
|
1494
|
+
allowed.any? { |klass| klass === value }
|
|
1495
|
+
end
|
|
1496
|
+
config_attr :scope, nil, ::String, ::Array, nil
|
|
1497
|
+
config_attr :lib_name, nil, ::String, nil
|
|
1498
|
+
config_attr :lib_version, nil, ::String, nil
|
|
1499
|
+
config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
|
|
1500
|
+
config_attr :interceptors, nil, ::Array, nil
|
|
1501
|
+
config_attr :timeout, nil, ::Numeric, nil
|
|
1502
|
+
config_attr :metadata, nil, ::Hash, nil
|
|
1503
|
+
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
|
1504
|
+
config_attr :quota_project, nil, ::String, nil
|
|
1505
|
+
config_attr :universe_domain, nil, ::String, nil
|
|
1506
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
|
1507
|
+
|
|
1508
|
+
# @private
|
|
1509
|
+
def initialize parent_config = nil
|
|
1510
|
+
@parent_config = parent_config unless parent_config.nil?
|
|
1511
|
+
|
|
1512
|
+
yield self if block_given?
|
|
1513
|
+
end
|
|
1514
|
+
|
|
1515
|
+
##
|
|
1516
|
+
# Configurations for individual RPCs
|
|
1517
|
+
# @return [Rpcs]
|
|
1518
|
+
#
|
|
1519
|
+
def rpcs
|
|
1520
|
+
@rpcs ||= begin
|
|
1521
|
+
parent_rpcs = nil
|
|
1522
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
|
|
1523
|
+
Rpcs.new parent_rpcs
|
|
1524
|
+
end
|
|
1525
|
+
end
|
|
1526
|
+
|
|
1527
|
+
##
|
|
1528
|
+
# Configuration for the channel pool
|
|
1529
|
+
# @return [::Gapic::ServiceStub::ChannelPool::Configuration]
|
|
1530
|
+
#
|
|
1531
|
+
def channel_pool
|
|
1532
|
+
@channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
|
|
1533
|
+
end
|
|
1534
|
+
|
|
1535
|
+
##
|
|
1536
|
+
# Configuration RPC class for the DataProductService API.
|
|
1537
|
+
#
|
|
1538
|
+
# Includes fields providing the configuration for each RPC in this service.
|
|
1539
|
+
# Each configuration object is of type `Gapic::Config::Method` and includes
|
|
1540
|
+
# the following configuration fields:
|
|
1541
|
+
#
|
|
1542
|
+
# * `timeout` (*type:* `Numeric`) - The call timeout in seconds
|
|
1543
|
+
# * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
|
|
1544
|
+
# * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
|
|
1545
|
+
# include the following keys:
|
|
1546
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
|
1547
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
|
1548
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
|
1549
|
+
# * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0.
|
|
1550
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
|
1551
|
+
# trigger a retry.
|
|
1552
|
+
#
|
|
1553
|
+
class Rpcs
|
|
1554
|
+
##
|
|
1555
|
+
# RPC-specific configuration for `create_data_product`
|
|
1556
|
+
# @return [::Gapic::Config::Method]
|
|
1557
|
+
#
|
|
1558
|
+
attr_reader :create_data_product
|
|
1559
|
+
##
|
|
1560
|
+
# RPC-specific configuration for `delete_data_product`
|
|
1561
|
+
# @return [::Gapic::Config::Method]
|
|
1562
|
+
#
|
|
1563
|
+
attr_reader :delete_data_product
|
|
1564
|
+
##
|
|
1565
|
+
# RPC-specific configuration for `get_data_product`
|
|
1566
|
+
# @return [::Gapic::Config::Method]
|
|
1567
|
+
#
|
|
1568
|
+
attr_reader :get_data_product
|
|
1569
|
+
##
|
|
1570
|
+
# RPC-specific configuration for `list_data_products`
|
|
1571
|
+
# @return [::Gapic::Config::Method]
|
|
1572
|
+
#
|
|
1573
|
+
attr_reader :list_data_products
|
|
1574
|
+
##
|
|
1575
|
+
# RPC-specific configuration for `update_data_product`
|
|
1576
|
+
# @return [::Gapic::Config::Method]
|
|
1577
|
+
#
|
|
1578
|
+
attr_reader :update_data_product
|
|
1579
|
+
##
|
|
1580
|
+
# RPC-specific configuration for `request_data_product_access`
|
|
1581
|
+
# @return [::Gapic::Config::Method]
|
|
1582
|
+
#
|
|
1583
|
+
attr_reader :request_data_product_access
|
|
1584
|
+
##
|
|
1585
|
+
# RPC-specific configuration for `create_data_asset`
|
|
1586
|
+
# @return [::Gapic::Config::Method]
|
|
1587
|
+
#
|
|
1588
|
+
attr_reader :create_data_asset
|
|
1589
|
+
##
|
|
1590
|
+
# RPC-specific configuration for `update_data_asset`
|
|
1591
|
+
# @return [::Gapic::Config::Method]
|
|
1592
|
+
#
|
|
1593
|
+
attr_reader :update_data_asset
|
|
1594
|
+
##
|
|
1595
|
+
# RPC-specific configuration for `delete_data_asset`
|
|
1596
|
+
# @return [::Gapic::Config::Method]
|
|
1597
|
+
#
|
|
1598
|
+
attr_reader :delete_data_asset
|
|
1599
|
+
##
|
|
1600
|
+
# RPC-specific configuration for `get_data_asset`
|
|
1601
|
+
# @return [::Gapic::Config::Method]
|
|
1602
|
+
#
|
|
1603
|
+
attr_reader :get_data_asset
|
|
1604
|
+
##
|
|
1605
|
+
# RPC-specific configuration for `list_data_assets`
|
|
1606
|
+
# @return [::Gapic::Config::Method]
|
|
1607
|
+
#
|
|
1608
|
+
attr_reader :list_data_assets
|
|
1609
|
+
|
|
1610
|
+
# @private
|
|
1611
|
+
def initialize parent_rpcs = nil
|
|
1612
|
+
create_data_product_config = parent_rpcs.create_data_product if parent_rpcs.respond_to? :create_data_product
|
|
1613
|
+
@create_data_product = ::Gapic::Config::Method.new create_data_product_config
|
|
1614
|
+
delete_data_product_config = parent_rpcs.delete_data_product if parent_rpcs.respond_to? :delete_data_product
|
|
1615
|
+
@delete_data_product = ::Gapic::Config::Method.new delete_data_product_config
|
|
1616
|
+
get_data_product_config = parent_rpcs.get_data_product if parent_rpcs.respond_to? :get_data_product
|
|
1617
|
+
@get_data_product = ::Gapic::Config::Method.new get_data_product_config
|
|
1618
|
+
list_data_products_config = parent_rpcs.list_data_products if parent_rpcs.respond_to? :list_data_products
|
|
1619
|
+
@list_data_products = ::Gapic::Config::Method.new list_data_products_config
|
|
1620
|
+
update_data_product_config = parent_rpcs.update_data_product if parent_rpcs.respond_to? :update_data_product
|
|
1621
|
+
@update_data_product = ::Gapic::Config::Method.new update_data_product_config
|
|
1622
|
+
request_data_product_access_config = parent_rpcs.request_data_product_access if parent_rpcs.respond_to? :request_data_product_access
|
|
1623
|
+
@request_data_product_access = ::Gapic::Config::Method.new request_data_product_access_config
|
|
1624
|
+
create_data_asset_config = parent_rpcs.create_data_asset if parent_rpcs.respond_to? :create_data_asset
|
|
1625
|
+
@create_data_asset = ::Gapic::Config::Method.new create_data_asset_config
|
|
1626
|
+
update_data_asset_config = parent_rpcs.update_data_asset if parent_rpcs.respond_to? :update_data_asset
|
|
1627
|
+
@update_data_asset = ::Gapic::Config::Method.new update_data_asset_config
|
|
1628
|
+
delete_data_asset_config = parent_rpcs.delete_data_asset if parent_rpcs.respond_to? :delete_data_asset
|
|
1629
|
+
@delete_data_asset = ::Gapic::Config::Method.new delete_data_asset_config
|
|
1630
|
+
get_data_asset_config = parent_rpcs.get_data_asset if parent_rpcs.respond_to? :get_data_asset
|
|
1631
|
+
@get_data_asset = ::Gapic::Config::Method.new get_data_asset_config
|
|
1632
|
+
list_data_assets_config = parent_rpcs.list_data_assets if parent_rpcs.respond_to? :list_data_assets
|
|
1633
|
+
@list_data_assets = ::Gapic::Config::Method.new list_data_assets_config
|
|
1634
|
+
|
|
1635
|
+
yield self if block_given?
|
|
1636
|
+
end
|
|
1637
|
+
end
|
|
1638
|
+
end
|
|
1639
|
+
end
|
|
1640
|
+
end
|
|
1641
|
+
end
|
|
1642
|
+
end
|
|
1643
|
+
end
|
|
1644
|
+
end
|