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