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
@@ -1,1261 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # Copyright 2022 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/content_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 ContentService
29
- ##
30
- # Client for the ContentService service.
31
- #
32
- # ContentService manages Notebook and SQL Scripts for Dataplex Universal
33
- # Catalog.
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 :content_service_stub
46
-
47
- ##
48
- # Configure the ContentService Client class.
49
- #
50
- # See {::Google::Cloud::Dataplex::V1::ContentService::Client::Configuration}
51
- # for a description of the configuration fields.
52
- #
53
- # @example
54
- #
55
- # # Modify the configuration for all ContentService clients
56
- # ::Google::Cloud::Dataplex::V1::ContentService::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.rpcs.create_content.timeout = 60.0
77
-
78
- default_config.rpcs.update_content.timeout = 60.0
79
-
80
- default_config.rpcs.delete_content.timeout = 60.0
81
-
82
- default_config.rpcs.get_content.timeout = 60.0
83
- default_config.rpcs.get_content.retry_policy = {
84
- initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
85
- }
86
-
87
- default_config.rpcs.get_iam_policy.timeout = 60.0
88
- default_config.rpcs.get_iam_policy.retry_policy = {
89
- initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
90
- }
91
-
92
- default_config.rpcs.set_iam_policy.timeout = 60.0
93
-
94
- default_config.rpcs.test_iam_permissions.timeout = 60.0
95
- default_config.rpcs.test_iam_permissions.retry_policy = {
96
- initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
97
- }
98
-
99
- default_config.rpcs.list_content.timeout = 60.0
100
- default_config.rpcs.list_content.retry_policy = {
101
- initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
102
- }
103
-
104
- default_config
105
- end
106
- yield @configure if block_given?
107
- @configure
108
- end
109
-
110
- ##
111
- # Configure the ContentService Client instance.
112
- #
113
- # The configuration is set to the derived mode, meaning that values can be changed,
114
- # but structural changes (adding new fields, etc.) are not allowed. Structural changes
115
- # should be made on {Client.configure}.
116
- #
117
- # See {::Google::Cloud::Dataplex::V1::ContentService::Client::Configuration}
118
- # for a description of the configuration fields.
119
- #
120
- # @yield [config] Configure the Client client.
121
- # @yieldparam config [Client::Configuration]
122
- #
123
- # @return [Client::Configuration]
124
- #
125
- def configure
126
- yield @config if block_given?
127
- @config
128
- end
129
-
130
- ##
131
- # The effective universe domain
132
- #
133
- # @return [String]
134
- #
135
- def universe_domain
136
- @content_service_stub.universe_domain
137
- end
138
-
139
- ##
140
- # Create a new ContentService client object.
141
- #
142
- # @example
143
- #
144
- # # Create a client using the default configuration
145
- # client = ::Google::Cloud::Dataplex::V1::ContentService::Client.new
146
- #
147
- # # Create a client using a custom configuration
148
- # client = ::Google::Cloud::Dataplex::V1::ContentService::Client.new do |config|
149
- # config.timeout = 10.0
150
- # end
151
- #
152
- # @yield [config] Configure the ContentService client.
153
- # @yieldparam config [Client::Configuration]
154
- #
155
- def initialize
156
- # These require statements are intentionally placed here to initialize
157
- # the gRPC module only when it's required.
158
- # See https://github.com/googleapis/toolkit/issues/446
159
- require "gapic/grpc"
160
- require "google/cloud/dataplex/v1/content_services_pb"
161
-
162
- # Create the configuration object
163
- @config = Configuration.new Client.configure
164
-
165
- # Yield the configuration if needed
166
- yield @config if block_given?
167
-
168
- # Create credentials
169
- credentials = @config.credentials
170
- # Use self-signed JWT if the endpoint is unchanged from default,
171
- # but only if the default endpoint does not have a region prefix.
172
- enable_self_signed_jwt = @config.endpoint.nil? ||
173
- (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
174
- !@config.endpoint.split(".").first.include?("-"))
175
- credentials ||= Credentials.default scope: @config.scope,
176
- enable_self_signed_jwt: enable_self_signed_jwt
177
- if credentials.is_a?(::String) || credentials.is_a?(::Hash)
178
- credentials = Credentials.new credentials, scope: @config.scope
179
- end
180
- @quota_project_id = @config.quota_project
181
- @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
182
-
183
- @content_service_stub = ::Gapic::ServiceStub.new(
184
- ::Google::Cloud::Dataplex::V1::ContentService::Stub,
185
- credentials: credentials,
186
- endpoint: @config.endpoint,
187
- endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
188
- universe_domain: @config.universe_domain,
189
- channel_args: @config.channel_args,
190
- interceptors: @config.interceptors,
191
- channel_pool_config: @config.channel_pool,
192
- logger: @config.logger
193
- )
194
-
195
- @content_service_stub.stub_logger&.info do |entry|
196
- entry.set_system_name
197
- entry.set_service
198
- entry.message = "Created client for #{entry.service}"
199
- entry.set_credentials_fields credentials
200
- entry.set "customEndpoint", @config.endpoint if @config.endpoint
201
- entry.set "defaultTimeout", @config.timeout if @config.timeout
202
- entry.set "quotaProject", @quota_project_id if @quota_project_id
203
- end
204
-
205
- @location_client = Google::Cloud::Location::Locations::Client.new do |config|
206
- config.credentials = credentials
207
- config.quota_project = @quota_project_id
208
- config.endpoint = @content_service_stub.endpoint
209
- config.universe_domain = @content_service_stub.universe_domain
210
- config.logger = @content_service_stub.logger if config.respond_to? :logger=
211
- end
212
-
213
- @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config|
214
- config.credentials = credentials
215
- config.quota_project = @quota_project_id
216
- config.endpoint = @content_service_stub.endpoint
217
- config.universe_domain = @content_service_stub.universe_domain
218
- config.logger = @content_service_stub.logger if config.respond_to? :logger=
219
- end
220
- end
221
-
222
- ##
223
- # Get the associated client for mix-in of the Locations.
224
- #
225
- # @return [Google::Cloud::Location::Locations::Client]
226
- #
227
- attr_reader :location_client
228
-
229
- ##
230
- # Get the associated client for mix-in of the IAMPolicy.
231
- #
232
- # @return [Google::Iam::V1::IAMPolicy::Client]
233
- #
234
- attr_reader :iam_policy_client
235
-
236
- ##
237
- # The logger used for request/response debug logging.
238
- #
239
- # @return [Logger]
240
- #
241
- def logger
242
- @content_service_stub.logger
243
- end
244
-
245
- # Service calls
246
-
247
- ##
248
- # Create a content.
249
- #
250
- # @overload create_content(request, options = nil)
251
- # Pass arguments to `create_content` via a request object, either of type
252
- # {::Google::Cloud::Dataplex::V1::CreateContentRequest} or an equivalent Hash.
253
- #
254
- # @param request [::Google::Cloud::Dataplex::V1::CreateContentRequest, ::Hash]
255
- # A request object representing the call parameters. Required. To specify no
256
- # parameters, or to keep all the default parameter values, pass an empty Hash.
257
- # @param options [::Gapic::CallOptions, ::Hash]
258
- # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
259
- #
260
- # @overload create_content(parent: nil, content: nil, validate_only: nil)
261
- # Pass arguments to `create_content` via keyword arguments. Note that at
262
- # least one keyword argument is required. To specify no parameters, or to keep all
263
- # the default parameter values, pass an empty Hash as a request object (see above).
264
- #
265
- # @param parent [::String]
266
- # Required. The resource name of the parent lake:
267
- # projects/\\{project_id}/locations/\\{location_id}/lakes/\\{lake_id}
268
- # @param content [::Google::Cloud::Dataplex::V1::Content, ::Hash]
269
- # Required. Content resource.
270
- # @param validate_only [::Boolean]
271
- # Optional. Only validate the request, but do not perform mutations.
272
- # The default is false.
273
- #
274
- # @yield [response, operation] Access the result along with the RPC operation
275
- # @yieldparam response [::Google::Cloud::Dataplex::V1::Content]
276
- # @yieldparam operation [::GRPC::ActiveCall::Operation]
277
- #
278
- # @return [::Google::Cloud::Dataplex::V1::Content]
279
- #
280
- # @raise [::Google::Cloud::Error] if the RPC is aborted.
281
- #
282
- # @example Basic example
283
- # require "google/cloud/dataplex/v1"
284
- #
285
- # # Create a client object. The client can be reused for multiple calls.
286
- # client = Google::Cloud::Dataplex::V1::ContentService::Client.new
287
- #
288
- # # Create a request. To set request fields, pass in keyword arguments.
289
- # request = Google::Cloud::Dataplex::V1::CreateContentRequest.new
290
- #
291
- # # Call the create_content method.
292
- # result = client.create_content request
293
- #
294
- # # The returned object is of type Google::Cloud::Dataplex::V1::Content.
295
- # p result
296
- #
297
- def create_content request, options = nil
298
- raise ::ArgumentError, "request must be provided" if request.nil?
299
-
300
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateContentRequest
301
-
302
- # Converts hash and nil to an options object
303
- options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
304
-
305
- # Customize the options with defaults
306
- metadata = @config.rpcs.create_content.metadata.to_h
307
-
308
- # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
309
- metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
310
- lib_name: @config.lib_name, lib_version: @config.lib_version,
311
- gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
312
- metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
313
- metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
314
-
315
- header_params = {}
316
- if request.parent
317
- header_params["parent"] = request.parent
318
- end
319
-
320
- request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
321
- metadata[:"x-goog-request-params"] ||= request_params_header
322
-
323
- options.apply_defaults timeout: @config.rpcs.create_content.timeout,
324
- metadata: metadata,
325
- retry_policy: @config.rpcs.create_content.retry_policy
326
-
327
- options.apply_defaults timeout: @config.timeout,
328
- metadata: @config.metadata,
329
- retry_policy: @config.retry_policy
330
-
331
- @content_service_stub.call_rpc :create_content, request, options: options do |response, operation|
332
- yield response, operation if block_given?
333
- end
334
- rescue ::GRPC::BadStatus => e
335
- raise ::Google::Cloud::Error.from_error(e)
336
- end
337
-
338
- ##
339
- # Update a content. Only supports full resource update.
340
- #
341
- # @overload update_content(request, options = nil)
342
- # Pass arguments to `update_content` via a request object, either of type
343
- # {::Google::Cloud::Dataplex::V1::UpdateContentRequest} or an equivalent Hash.
344
- #
345
- # @param request [::Google::Cloud::Dataplex::V1::UpdateContentRequest, ::Hash]
346
- # A request object representing the call parameters. Required. To specify no
347
- # parameters, or to keep all the default parameter values, pass an empty Hash.
348
- # @param options [::Gapic::CallOptions, ::Hash]
349
- # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
350
- #
351
- # @overload update_content(update_mask: nil, content: nil, validate_only: nil)
352
- # Pass arguments to `update_content` via keyword arguments. Note that at
353
- # least one keyword argument is required. To specify no parameters, or to keep all
354
- # the default parameter values, pass an empty Hash as a request object (see above).
355
- #
356
- # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
357
- # Required. Mask of fields to update.
358
- # @param content [::Google::Cloud::Dataplex::V1::Content, ::Hash]
359
- # Required. Update description.
360
- # Only fields specified in `update_mask` are updated.
361
- # @param validate_only [::Boolean]
362
- # Optional. Only validate the request, but do not perform mutations.
363
- # The default is false.
364
- #
365
- # @yield [response, operation] Access the result along with the RPC operation
366
- # @yieldparam response [::Google::Cloud::Dataplex::V1::Content]
367
- # @yieldparam operation [::GRPC::ActiveCall::Operation]
368
- #
369
- # @return [::Google::Cloud::Dataplex::V1::Content]
370
- #
371
- # @raise [::Google::Cloud::Error] if the RPC is aborted.
372
- #
373
- # @example Basic example
374
- # require "google/cloud/dataplex/v1"
375
- #
376
- # # Create a client object. The client can be reused for multiple calls.
377
- # client = Google::Cloud::Dataplex::V1::ContentService::Client.new
378
- #
379
- # # Create a request. To set request fields, pass in keyword arguments.
380
- # request = Google::Cloud::Dataplex::V1::UpdateContentRequest.new
381
- #
382
- # # Call the update_content method.
383
- # result = client.update_content request
384
- #
385
- # # The returned object is of type Google::Cloud::Dataplex::V1::Content.
386
- # p result
387
- #
388
- def update_content request, options = nil
389
- raise ::ArgumentError, "request must be provided" if request.nil?
390
-
391
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateContentRequest
392
-
393
- # Converts hash and nil to an options object
394
- options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
395
-
396
- # Customize the options with defaults
397
- metadata = @config.rpcs.update_content.metadata.to_h
398
-
399
- # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
400
- metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
401
- lib_name: @config.lib_name, lib_version: @config.lib_version,
402
- gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
403
- metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
404
- metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
405
-
406
- header_params = {}
407
- if request.content&.name
408
- header_params["content.name"] = request.content.name
409
- end
410
-
411
- request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
412
- metadata[:"x-goog-request-params"] ||= request_params_header
413
-
414
- options.apply_defaults timeout: @config.rpcs.update_content.timeout,
415
- metadata: metadata,
416
- retry_policy: @config.rpcs.update_content.retry_policy
417
-
418
- options.apply_defaults timeout: @config.timeout,
419
- metadata: @config.metadata,
420
- retry_policy: @config.retry_policy
421
-
422
- @content_service_stub.call_rpc :update_content, request, options: options do |response, operation|
423
- yield response, operation if block_given?
424
- end
425
- rescue ::GRPC::BadStatus => e
426
- raise ::Google::Cloud::Error.from_error(e)
427
- end
428
-
429
- ##
430
- # Delete a content.
431
- #
432
- # @overload delete_content(request, options = nil)
433
- # Pass arguments to `delete_content` via a request object, either of type
434
- # {::Google::Cloud::Dataplex::V1::DeleteContentRequest} or an equivalent Hash.
435
- #
436
- # @param request [::Google::Cloud::Dataplex::V1::DeleteContentRequest, ::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 delete_content(name: nil)
443
- # Pass arguments to `delete_content` 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 resource name of the content:
449
- # projects/\\{project_id}/locations/\\{location_id}/lakes/\\{lake_id}/content/\\{content_id}
450
- #
451
- # @yield [response, operation] Access the result along with the RPC operation
452
- # @yieldparam response [::Google::Protobuf::Empty]
453
- # @yieldparam operation [::GRPC::ActiveCall::Operation]
454
- #
455
- # @return [::Google::Protobuf::Empty]
456
- #
457
- # @raise [::Google::Cloud::Error] if the RPC 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::ContentService::Client.new
464
- #
465
- # # Create a request. To set request fields, pass in keyword arguments.
466
- # request = Google::Cloud::Dataplex::V1::DeleteContentRequest.new
467
- #
468
- # # Call the delete_content method.
469
- # result = client.delete_content request
470
- #
471
- # # The returned object is of type Google::Protobuf::Empty.
472
- # p result
473
- #
474
- def delete_content 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::DeleteContentRequest
478
-
479
- # Converts hash and nil to an options object
480
- options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
481
-
482
- # Customize the options with defaults
483
- metadata = @config.rpcs.delete_content.metadata.to_h
484
-
485
- # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
486
- metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
487
- lib_name: @config.lib_name, lib_version: @config.lib_version,
488
- gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
489
- metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
490
- metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
491
-
492
- header_params = {}
493
- if request.name
494
- header_params["name"] = request.name
495
- end
496
-
497
- request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
498
- metadata[:"x-goog-request-params"] ||= request_params_header
499
-
500
- options.apply_defaults timeout: @config.rpcs.delete_content.timeout,
501
- metadata: metadata,
502
- retry_policy: @config.rpcs.delete_content.retry_policy
503
-
504
- options.apply_defaults timeout: @config.timeout,
505
- metadata: @config.metadata,
506
- retry_policy: @config.retry_policy
507
-
508
- @content_service_stub.call_rpc :delete_content, request, options: options do |response, operation|
509
- yield response, operation if block_given?
510
- end
511
- rescue ::GRPC::BadStatus => e
512
- raise ::Google::Cloud::Error.from_error(e)
513
- end
514
-
515
- ##
516
- # Get a content resource.
517
- #
518
- # @overload get_content(request, options = nil)
519
- # Pass arguments to `get_content` via a request object, either of type
520
- # {::Google::Cloud::Dataplex::V1::GetContentRequest} or an equivalent Hash.
521
- #
522
- # @param request [::Google::Cloud::Dataplex::V1::GetContentRequest, ::Hash]
523
- # A request object representing the call parameters. Required. To specify no
524
- # parameters, or to keep all the default parameter values, pass an empty Hash.
525
- # @param options [::Gapic::CallOptions, ::Hash]
526
- # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
527
- #
528
- # @overload get_content(name: nil, view: nil)
529
- # Pass arguments to `get_content` via keyword arguments. Note that at
530
- # least one keyword argument is required. To specify no parameters, or to keep all
531
- # the default parameter values, pass an empty Hash as a request object (see above).
532
- #
533
- # @param name [::String]
534
- # Required. The resource name of the content:
535
- # projects/\\{project_id}/locations/\\{location_id}/lakes/\\{lake_id}/content/\\{content_id}
536
- # @param view [::Google::Cloud::Dataplex::V1::GetContentRequest::ContentView]
537
- # Optional. Specify content view to make a partial request.
538
- #
539
- # @yield [response, operation] Access the result along with the RPC operation
540
- # @yieldparam response [::Google::Cloud::Dataplex::V1::Content]
541
- # @yieldparam operation [::GRPC::ActiveCall::Operation]
542
- #
543
- # @return [::Google::Cloud::Dataplex::V1::Content]
544
- #
545
- # @raise [::Google::Cloud::Error] if the RPC is aborted.
546
- #
547
- # @example Basic example
548
- # require "google/cloud/dataplex/v1"
549
- #
550
- # # Create a client object. The client can be reused for multiple calls.
551
- # client = Google::Cloud::Dataplex::V1::ContentService::Client.new
552
- #
553
- # # Create a request. To set request fields, pass in keyword arguments.
554
- # request = Google::Cloud::Dataplex::V1::GetContentRequest.new
555
- #
556
- # # Call the get_content method.
557
- # result = client.get_content request
558
- #
559
- # # The returned object is of type Google::Cloud::Dataplex::V1::Content.
560
- # p result
561
- #
562
- def get_content request, options = nil
563
- raise ::ArgumentError, "request must be provided" if request.nil?
564
-
565
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetContentRequest
566
-
567
- # Converts hash and nil to an options object
568
- options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
569
-
570
- # Customize the options with defaults
571
- metadata = @config.rpcs.get_content.metadata.to_h
572
-
573
- # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
574
- metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
575
- lib_name: @config.lib_name, lib_version: @config.lib_version,
576
- gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
577
- metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
578
- metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
579
-
580
- header_params = {}
581
- if request.name
582
- header_params["name"] = request.name
583
- end
584
-
585
- request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
586
- metadata[:"x-goog-request-params"] ||= request_params_header
587
-
588
- options.apply_defaults timeout: @config.rpcs.get_content.timeout,
589
- metadata: metadata,
590
- retry_policy: @config.rpcs.get_content.retry_policy
591
-
592
- options.apply_defaults timeout: @config.timeout,
593
- metadata: @config.metadata,
594
- retry_policy: @config.retry_policy
595
-
596
- @content_service_stub.call_rpc :get_content, request, options: options do |response, operation|
597
- yield response, operation if block_given?
598
- end
599
- rescue ::GRPC::BadStatus => e
600
- raise ::Google::Cloud::Error.from_error(e)
601
- end
602
-
603
- ##
604
- # Gets the access control policy for a contentitem resource. A `NOT_FOUND`
605
- # error is returned if the resource does not exist. An empty policy is
606
- # returned if the resource exists but does not have a policy set on it.
607
- #
608
- # Caller must have Google IAM `dataplex.content.getIamPolicy` permission
609
- # on the resource.
610
- #
611
- # @overload get_iam_policy(request, options = nil)
612
- # Pass arguments to `get_iam_policy` via a request object, either of type
613
- # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash.
614
- #
615
- # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash]
616
- # A request object representing the call parameters. Required. To specify no
617
- # parameters, or to keep all the default parameter values, pass an empty Hash.
618
- # @param options [::Gapic::CallOptions, ::Hash]
619
- # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
620
- #
621
- # @overload get_iam_policy(resource: nil, options: nil)
622
- # Pass arguments to `get_iam_policy` via keyword arguments. Note that at
623
- # least one keyword argument is required. To specify no parameters, or to keep all
624
- # the default parameter values, pass an empty Hash as a request object (see above).
625
- #
626
- # @param resource [::String]
627
- # REQUIRED: The resource for which the policy is being requested.
628
- # See the operation documentation for the appropriate value for this field.
629
- # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash]
630
- # OPTIONAL: A `GetPolicyOptions` object for specifying options to
631
- # `GetIamPolicy`.
632
- #
633
- # @yield [response, operation] Access the result along with the RPC operation
634
- # @yieldparam response [::Google::Iam::V1::Policy]
635
- # @yieldparam operation [::GRPC::ActiveCall::Operation]
636
- #
637
- # @return [::Google::Iam::V1::Policy]
638
- #
639
- # @raise [::Google::Cloud::Error] if the RPC is aborted.
640
- #
641
- # @example Basic example
642
- # require "google/cloud/dataplex/v1"
643
- #
644
- # # Create a client object. The client can be reused for multiple calls.
645
- # client = Google::Cloud::Dataplex::V1::ContentService::Client.new
646
- #
647
- # # Create a request. To set request fields, pass in keyword arguments.
648
- # request = Google::Iam::V1::GetIamPolicyRequest.new
649
- #
650
- # # Call the get_iam_policy method.
651
- # result = client.get_iam_policy request
652
- #
653
- # # The returned object is of type Google::Iam::V1::Policy.
654
- # p result
655
- #
656
- def get_iam_policy request, options = nil
657
- raise ::ArgumentError, "request must be provided" if request.nil?
658
-
659
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest
660
-
661
- # Converts hash and nil to an options object
662
- options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
663
-
664
- # Customize the options with defaults
665
- metadata = @config.rpcs.get_iam_policy.metadata.to_h
666
-
667
- # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
668
- metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
669
- lib_name: @config.lib_name, lib_version: @config.lib_version,
670
- gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
671
- metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
672
- metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
673
-
674
- header_params = {}
675
- if request.resource
676
- header_params["resource"] = request.resource
677
- end
678
-
679
- request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
680
- metadata[:"x-goog-request-params"] ||= request_params_header
681
-
682
- options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout,
683
- metadata: metadata,
684
- retry_policy: @config.rpcs.get_iam_policy.retry_policy
685
-
686
- options.apply_defaults timeout: @config.timeout,
687
- metadata: @config.metadata,
688
- retry_policy: @config.retry_policy
689
-
690
- @content_service_stub.call_rpc :get_iam_policy, request, options: options do |response, operation|
691
- yield response, operation if block_given?
692
- end
693
- rescue ::GRPC::BadStatus => e
694
- raise ::Google::Cloud::Error.from_error(e)
695
- end
696
-
697
- ##
698
- # Sets the access control policy on the specified contentitem resource.
699
- # Replaces any existing policy.
700
- #
701
- # Caller must have Google IAM `dataplex.content.setIamPolicy` permission
702
- # on the resource.
703
- #
704
- # @overload set_iam_policy(request, options = nil)
705
- # Pass arguments to `set_iam_policy` via a request object, either of type
706
- # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash.
707
- #
708
- # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash]
709
- # A request object representing the call parameters. Required. To specify no
710
- # parameters, or to keep all the default parameter values, pass an empty Hash.
711
- # @param options [::Gapic::CallOptions, ::Hash]
712
- # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
713
- #
714
- # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil)
715
- # Pass arguments to `set_iam_policy` via keyword arguments. Note that at
716
- # least one keyword argument is required. To specify no parameters, or to keep all
717
- # the default parameter values, pass an empty Hash as a request object (see above).
718
- #
719
- # @param resource [::String]
720
- # REQUIRED: The resource for which the policy is being specified.
721
- # See the operation documentation for the appropriate value for this field.
722
- # @param policy [::Google::Iam::V1::Policy, ::Hash]
723
- # REQUIRED: The complete policy to be applied to the `resource`. The size of
724
- # the policy is limited to a few 10s of KB. An empty policy is a
725
- # valid policy but certain Cloud Platform services (such as Projects)
726
- # might reject them.
727
- # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
728
- # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
729
- # the fields in the mask will be modified. If no mask is provided, the
730
- # following default mask is used:
731
- #
732
- # `paths: "bindings, etag"`
733
- #
734
- # @yield [response, operation] Access the result along with the RPC operation
735
- # @yieldparam response [::Google::Iam::V1::Policy]
736
- # @yieldparam operation [::GRPC::ActiveCall::Operation]
737
- #
738
- # @return [::Google::Iam::V1::Policy]
739
- #
740
- # @raise [::Google::Cloud::Error] if the RPC is aborted.
741
- #
742
- # @example Basic example
743
- # require "google/cloud/dataplex/v1"
744
- #
745
- # # Create a client object. The client can be reused for multiple calls.
746
- # client = Google::Cloud::Dataplex::V1::ContentService::Client.new
747
- #
748
- # # Create a request. To set request fields, pass in keyword arguments.
749
- # request = Google::Iam::V1::SetIamPolicyRequest.new
750
- #
751
- # # Call the set_iam_policy method.
752
- # result = client.set_iam_policy request
753
- #
754
- # # The returned object is of type Google::Iam::V1::Policy.
755
- # p result
756
- #
757
- def set_iam_policy request, options = nil
758
- raise ::ArgumentError, "request must be provided" if request.nil?
759
-
760
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest
761
-
762
- # Converts hash and nil to an options object
763
- options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
764
-
765
- # Customize the options with defaults
766
- metadata = @config.rpcs.set_iam_policy.metadata.to_h
767
-
768
- # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
769
- metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
770
- lib_name: @config.lib_name, lib_version: @config.lib_version,
771
- gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
772
- metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
773
- metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
774
-
775
- header_params = {}
776
- if request.resource
777
- header_params["resource"] = request.resource
778
- end
779
-
780
- request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
781
- metadata[:"x-goog-request-params"] ||= request_params_header
782
-
783
- options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout,
784
- metadata: metadata,
785
- retry_policy: @config.rpcs.set_iam_policy.retry_policy
786
-
787
- options.apply_defaults timeout: @config.timeout,
788
- metadata: @config.metadata,
789
- retry_policy: @config.retry_policy
790
-
791
- @content_service_stub.call_rpc :set_iam_policy, request, options: options do |response, operation|
792
- yield response, operation if block_given?
793
- end
794
- rescue ::GRPC::BadStatus => e
795
- raise ::Google::Cloud::Error.from_error(e)
796
- end
797
-
798
- ##
799
- # Returns the caller's permissions on a resource.
800
- # If the resource does not exist, an empty set of
801
- # permissions is returned (a `NOT_FOUND` error is not returned).
802
- #
803
- # A caller is not required to have Google IAM permission to make this
804
- # request.
805
- #
806
- # Note: This operation is designed to be used for building permission-aware
807
- # UIs and command-line tools, not for authorization checking. This operation
808
- # may "fail open" without warning.
809
- #
810
- # @overload test_iam_permissions(request, options = nil)
811
- # Pass arguments to `test_iam_permissions` via a request object, either of type
812
- # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash.
813
- #
814
- # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash]
815
- # A request object representing the call parameters. Required. To specify no
816
- # parameters, or to keep all the default parameter values, pass an empty Hash.
817
- # @param options [::Gapic::CallOptions, ::Hash]
818
- # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
819
- #
820
- # @overload test_iam_permissions(resource: nil, permissions: nil)
821
- # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at
822
- # least one keyword argument is required. To specify no parameters, or to keep all
823
- # the default parameter values, pass an empty Hash as a request object (see above).
824
- #
825
- # @param resource [::String]
826
- # REQUIRED: The resource for which the policy detail is being requested.
827
- # See the operation documentation for the appropriate value for this field.
828
- # @param permissions [::Array<::String>]
829
- # The set of permissions to check for the `resource`. Permissions with
830
- # wildcards (such as '*' or 'storage.*') are not allowed. For more
831
- # information see
832
- # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
833
- #
834
- # @yield [response, operation] Access the result along with the RPC operation
835
- # @yieldparam response [::Google::Iam::V1::TestIamPermissionsResponse]
836
- # @yieldparam operation [::GRPC::ActiveCall::Operation]
837
- #
838
- # @return [::Google::Iam::V1::TestIamPermissionsResponse]
839
- #
840
- # @raise [::Google::Cloud::Error] if the RPC is aborted.
841
- #
842
- # @example Basic example
843
- # require "google/cloud/dataplex/v1"
844
- #
845
- # # Create a client object. The client can be reused for multiple calls.
846
- # client = Google::Cloud::Dataplex::V1::ContentService::Client.new
847
- #
848
- # # Create a request. To set request fields, pass in keyword arguments.
849
- # request = Google::Iam::V1::TestIamPermissionsRequest.new
850
- #
851
- # # Call the test_iam_permissions method.
852
- # result = client.test_iam_permissions request
853
- #
854
- # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse.
855
- # p result
856
- #
857
- def test_iam_permissions request, options = nil
858
- raise ::ArgumentError, "request must be provided" if request.nil?
859
-
860
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest
861
-
862
- # Converts hash and nil to an options object
863
- options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
864
-
865
- # Customize the options with defaults
866
- metadata = @config.rpcs.test_iam_permissions.metadata.to_h
867
-
868
- # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
869
- metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
870
- lib_name: @config.lib_name, lib_version: @config.lib_version,
871
- gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
872
- metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
873
- metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
874
-
875
- header_params = {}
876
- if request.resource
877
- header_params["resource"] = request.resource
878
- end
879
-
880
- request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
881
- metadata[:"x-goog-request-params"] ||= request_params_header
882
-
883
- options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout,
884
- metadata: metadata,
885
- retry_policy: @config.rpcs.test_iam_permissions.retry_policy
886
-
887
- options.apply_defaults timeout: @config.timeout,
888
- metadata: @config.metadata,
889
- retry_policy: @config.retry_policy
890
-
891
- @content_service_stub.call_rpc :test_iam_permissions, request, options: options do |response, operation|
892
- yield response, operation if block_given?
893
- end
894
- rescue ::GRPC::BadStatus => e
895
- raise ::Google::Cloud::Error.from_error(e)
896
- end
897
-
898
- ##
899
- # List content.
900
- #
901
- # @overload list_content(request, options = nil)
902
- # Pass arguments to `list_content` via a request object, either of type
903
- # {::Google::Cloud::Dataplex::V1::ListContentRequest} or an equivalent Hash.
904
- #
905
- # @param request [::Google::Cloud::Dataplex::V1::ListContentRequest, ::Hash]
906
- # A request object representing the call parameters. Required. To specify no
907
- # parameters, or to keep all the default parameter values, pass an empty Hash.
908
- # @param options [::Gapic::CallOptions, ::Hash]
909
- # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
910
- #
911
- # @overload list_content(parent: nil, page_size: nil, page_token: nil, filter: nil)
912
- # Pass arguments to `list_content` via keyword arguments. Note that at
913
- # least one keyword argument is required. To specify no parameters, or to keep all
914
- # the default parameter values, pass an empty Hash as a request object (see above).
915
- #
916
- # @param parent [::String]
917
- # Required. The resource name of the parent lake:
918
- # projects/\\{project_id}/locations/\\{location_id}/lakes/\\{lake_id}
919
- # @param page_size [::Integer]
920
- # Optional. Maximum number of content to return. The service may return fewer
921
- # than this value. If unspecified, at most 10 content will be returned. The
922
- # maximum value is 1000; values above 1000 will be coerced to 1000.
923
- # @param page_token [::String]
924
- # Optional. Page token received from a previous `ListContent` call. Provide
925
- # this to retrieve the subsequent page. When paginating, all other parameters
926
- # provided to `ListContent` must match the call that provided the page
927
- # token.
928
- # @param filter [::String]
929
- # Optional. Filter request. Filters are case-sensitive.
930
- # The following formats are supported:
931
- #
932
- # labels.key1 = "value1"
933
- # labels:key1
934
- # type = "NOTEBOOK"
935
- # type = "SQL_SCRIPT"
936
- #
937
- # These restrictions can be coinjoined with AND, OR and NOT conjunctions.
938
- #
939
- # @yield [response, operation] Access the result along with the RPC operation
940
- # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Content>]
941
- # @yieldparam operation [::GRPC::ActiveCall::Operation]
942
- #
943
- # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Content>]
944
- #
945
- # @raise [::Google::Cloud::Error] if the RPC is aborted.
946
- #
947
- # @example Basic example
948
- # require "google/cloud/dataplex/v1"
949
- #
950
- # # Create a client object. The client can be reused for multiple calls.
951
- # client = Google::Cloud::Dataplex::V1::ContentService::Client.new
952
- #
953
- # # Create a request. To set request fields, pass in keyword arguments.
954
- # request = Google::Cloud::Dataplex::V1::ListContentRequest.new
955
- #
956
- # # Call the list_content method.
957
- # result = client.list_content request
958
- #
959
- # # The returned object is of type Gapic::PagedEnumerable. You can iterate
960
- # # over elements, and API calls will be issued to fetch pages as needed.
961
- # result.each do |item|
962
- # # Each element is of type ::Google::Cloud::Dataplex::V1::Content.
963
- # p item
964
- # end
965
- #
966
- def list_content 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::ListContentRequest
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
- metadata = @config.rpcs.list_content.metadata.to_h
976
-
977
- # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
978
- 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
- metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
982
- metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
983
-
984
- header_params = {}
985
- if request.parent
986
- header_params["parent"] = request.parent
987
- end
988
-
989
- request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
990
- metadata[:"x-goog-request-params"] ||= request_params_header
991
-
992
- options.apply_defaults timeout: @config.rpcs.list_content.timeout,
993
- metadata: metadata,
994
- retry_policy: @config.rpcs.list_content.retry_policy
995
-
996
- options.apply_defaults timeout: @config.timeout,
997
- metadata: @config.metadata,
998
- retry_policy: @config.retry_policy
999
-
1000
- @content_service_stub.call_rpc :list_content, request, options: options do |response, operation|
1001
- response = ::Gapic::PagedEnumerable.new @content_service_stub, :list_content, request, response, operation, options
1002
- yield response, operation if block_given?
1003
- throw :response, response
1004
- end
1005
- rescue ::GRPC::BadStatus => e
1006
- raise ::Google::Cloud::Error.from_error(e)
1007
- end
1008
-
1009
- ##
1010
- # Configuration class for the ContentService API.
1011
- #
1012
- # This class represents the configuration for ContentService,
1013
- # providing control over timeouts, retry behavior, logging, transport
1014
- # parameters, and other low-level controls. Certain parameters can also be
1015
- # applied individually to specific RPCs. See
1016
- # {::Google::Cloud::Dataplex::V1::ContentService::Client::Configuration::Rpcs}
1017
- # for a list of RPCs that can be configured independently.
1018
- #
1019
- # Configuration can be applied globally to all clients, or to a single client
1020
- # on construction.
1021
- #
1022
- # @example
1023
- #
1024
- # # Modify the global config, setting the timeout for
1025
- # # create_content to 20 seconds,
1026
- # # and all remaining timeouts to 10 seconds.
1027
- # ::Google::Cloud::Dataplex::V1::ContentService::Client.configure do |config|
1028
- # config.timeout = 10.0
1029
- # config.rpcs.create_content.timeout = 20.0
1030
- # end
1031
- #
1032
- # # Apply the above configuration only to a new client.
1033
- # client = ::Google::Cloud::Dataplex::V1::ContentService::Client.new do |config|
1034
- # config.timeout = 10.0
1035
- # config.rpcs.create_content.timeout = 20.0
1036
- # end
1037
- #
1038
- # @!attribute [rw] endpoint
1039
- # A custom service endpoint, as a hostname or hostname:port. The default is
1040
- # nil, indicating to use the default endpoint in the current universe domain.
1041
- # @return [::String,nil]
1042
- # @!attribute [rw] credentials
1043
- # Credentials to send with calls. You may provide any of the following types:
1044
- # * (`Google::Auth::Credentials`) A googleauth credentials object
1045
- # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
1046
- # * (`Signet::OAuth2::Client`) A signet oauth2 client object
1047
- # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
1048
- # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
1049
- # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
1050
- # * (`nil`) indicating no credentials
1051
- #
1052
- # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials
1053
- # is deprecated. Providing an unvalidated credential configuration to
1054
- # Google APIs can compromise the security of your systems and data.
1055
- #
1056
- # @example
1057
- #
1058
- # # The recommended way to provide credentials is to use the `make_creds` method
1059
- # # on the appropriate credentials class for your environment.
1060
- #
1061
- # require "googleauth"
1062
- #
1063
- # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds(
1064
- # json_key_io: ::File.open("/path/to/keyfile.json")
1065
- # )
1066
- #
1067
- # client = ::Google::Cloud::Dataplex::V1::ContentService::Client.new do |config|
1068
- # config.credentials = credentials
1069
- # end
1070
- #
1071
- # @note Warning: If you accept a credential configuration (JSON file or Hash) from an
1072
- # external source for authentication to Google Cloud, you must validate it before
1073
- # providing it to a Google API client library. Providing an unvalidated credential
1074
- # configuration to Google APIs can compromise the security of your systems and data.
1075
- # For more information, refer to [Validate credential configurations from external
1076
- # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
1077
- # @return [::Object]
1078
- # @!attribute [rw] scope
1079
- # The OAuth scopes
1080
- # @return [::Array<::String>]
1081
- # @!attribute [rw] lib_name
1082
- # The library name as recorded in instrumentation and logging
1083
- # @return [::String]
1084
- # @!attribute [rw] lib_version
1085
- # The library version as recorded in instrumentation and logging
1086
- # @return [::String]
1087
- # @!attribute [rw] channel_args
1088
- # Extra parameters passed to the gRPC channel. Note: this is ignored if a
1089
- # `GRPC::Core::Channel` object is provided as the credential.
1090
- # @return [::Hash]
1091
- # @!attribute [rw] interceptors
1092
- # An array of interceptors that are run before calls are executed.
1093
- # @return [::Array<::GRPC::ClientInterceptor>]
1094
- # @!attribute [rw] timeout
1095
- # The call timeout in seconds.
1096
- # @return [::Numeric]
1097
- # @!attribute [rw] metadata
1098
- # Additional gRPC headers to be sent with the call.
1099
- # @return [::Hash{::Symbol=>::String}]
1100
- # @!attribute [rw] retry_policy
1101
- # The retry policy. The value is a hash with the following keys:
1102
- # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
1103
- # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
1104
- # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
1105
- # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
1106
- # trigger a retry.
1107
- # @return [::Hash]
1108
- # @!attribute [rw] quota_project
1109
- # A separate project against which to charge quota.
1110
- # @return [::String]
1111
- # @!attribute [rw] universe_domain
1112
- # The universe domain within which to make requests. This determines the
1113
- # default endpoint URL. The default value of nil uses the environment
1114
- # universe (usually the default "googleapis.com" universe).
1115
- # @return [::String,nil]
1116
- # @!attribute [rw] logger
1117
- # A custom logger to use for request/response debug logging, or the value
1118
- # `:default` (the default) to construct a default logger, or `nil` to
1119
- # explicitly disable logging.
1120
- # @return [::Logger,:default,nil]
1121
- #
1122
- class Configuration
1123
- extend ::Gapic::Config
1124
-
1125
- # @private
1126
- # The endpoint specific to the default "googleapis.com" universe. Deprecated.
1127
- DEFAULT_ENDPOINT = "dataplex.googleapis.com"
1128
-
1129
- config_attr :endpoint, nil, ::String, nil
1130
- config_attr :credentials, nil do |value|
1131
- allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil]
1132
- allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel
1133
- allowed.any? { |klass| klass === value }
1134
- end
1135
- config_attr :scope, nil, ::String, ::Array, nil
1136
- config_attr :lib_name, nil, ::String, nil
1137
- config_attr :lib_version, nil, ::String, nil
1138
- config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
1139
- config_attr :interceptors, nil, ::Array, nil
1140
- config_attr :timeout, nil, ::Numeric, nil
1141
- config_attr :metadata, nil, ::Hash, nil
1142
- config_attr :retry_policy, nil, ::Hash, ::Proc, nil
1143
- config_attr :quota_project, nil, ::String, nil
1144
- config_attr :universe_domain, nil, ::String, nil
1145
- config_attr :logger, :default, ::Logger, nil, :default
1146
-
1147
- # @private
1148
- def initialize parent_config = nil
1149
- @parent_config = parent_config unless parent_config.nil?
1150
-
1151
- yield self if block_given?
1152
- end
1153
-
1154
- ##
1155
- # Configurations for individual RPCs
1156
- # @return [Rpcs]
1157
- #
1158
- def rpcs
1159
- @rpcs ||= begin
1160
- parent_rpcs = nil
1161
- parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
1162
- Rpcs.new parent_rpcs
1163
- end
1164
- end
1165
-
1166
- ##
1167
- # Configuration for the channel pool
1168
- # @return [::Gapic::ServiceStub::ChannelPool::Configuration]
1169
- #
1170
- def channel_pool
1171
- @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
1172
- end
1173
-
1174
- ##
1175
- # Configuration RPC class for the ContentService API.
1176
- #
1177
- # Includes fields providing the configuration for each RPC in this service.
1178
- # Each configuration object is of type `Gapic::Config::Method` and includes
1179
- # the following configuration fields:
1180
- #
1181
- # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
1182
- # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
1183
- # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
1184
- # include the following keys:
1185
- # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
1186
- # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
1187
- # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
1188
- # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
1189
- # trigger a retry.
1190
- #
1191
- class Rpcs
1192
- ##
1193
- # RPC-specific configuration for `create_content`
1194
- # @return [::Gapic::Config::Method]
1195
- #
1196
- attr_reader :create_content
1197
- ##
1198
- # RPC-specific configuration for `update_content`
1199
- # @return [::Gapic::Config::Method]
1200
- #
1201
- attr_reader :update_content
1202
- ##
1203
- # RPC-specific configuration for `delete_content`
1204
- # @return [::Gapic::Config::Method]
1205
- #
1206
- attr_reader :delete_content
1207
- ##
1208
- # RPC-specific configuration for `get_content`
1209
- # @return [::Gapic::Config::Method]
1210
- #
1211
- attr_reader :get_content
1212
- ##
1213
- # RPC-specific configuration for `get_iam_policy`
1214
- # @return [::Gapic::Config::Method]
1215
- #
1216
- attr_reader :get_iam_policy
1217
- ##
1218
- # RPC-specific configuration for `set_iam_policy`
1219
- # @return [::Gapic::Config::Method]
1220
- #
1221
- attr_reader :set_iam_policy
1222
- ##
1223
- # RPC-specific configuration for `test_iam_permissions`
1224
- # @return [::Gapic::Config::Method]
1225
- #
1226
- attr_reader :test_iam_permissions
1227
- ##
1228
- # RPC-specific configuration for `list_content`
1229
- # @return [::Gapic::Config::Method]
1230
- #
1231
- attr_reader :list_content
1232
-
1233
- # @private
1234
- def initialize parent_rpcs = nil
1235
- create_content_config = parent_rpcs.create_content if parent_rpcs.respond_to? :create_content
1236
- @create_content = ::Gapic::Config::Method.new create_content_config
1237
- update_content_config = parent_rpcs.update_content if parent_rpcs.respond_to? :update_content
1238
- @update_content = ::Gapic::Config::Method.new update_content_config
1239
- delete_content_config = parent_rpcs.delete_content if parent_rpcs.respond_to? :delete_content
1240
- @delete_content = ::Gapic::Config::Method.new delete_content_config
1241
- get_content_config = parent_rpcs.get_content if parent_rpcs.respond_to? :get_content
1242
- @get_content = ::Gapic::Config::Method.new get_content_config
1243
- get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy
1244
- @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config
1245
- set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy
1246
- @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config
1247
- test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions
1248
- @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config
1249
- list_content_config = parent_rpcs.list_content if parent_rpcs.respond_to? :list_content
1250
- @list_content = ::Gapic::Config::Method.new list_content_config
1251
-
1252
- yield self if block_given?
1253
- end
1254
- end
1255
- end
1256
- end
1257
- end
1258
- end
1259
- end
1260
- end
1261
- end