google-cloud-dataplex-v1 1.0.1 → 1.2.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 (51) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +30 -20
  3. data/lib/google/cloud/dataplex/v1/bindings_override.rb +120 -0
  4. data/lib/google/cloud/dataplex/v1/catalog_pb.rb +17 -1
  5. data/lib/google/cloud/dataplex/v1/catalog_service/client.rb +626 -144
  6. data/lib/google/cloud/dataplex/v1/catalog_service/operations.rb +12 -15
  7. data/lib/google/cloud/dataplex/v1/catalog_service/paths.rb +19 -0
  8. data/lib/google/cloud/dataplex/v1/catalog_service/rest/client.rb +592 -144
  9. data/lib/google/cloud/dataplex/v1/catalog_service/rest/operations.rb +72 -38
  10. data/lib/google/cloud/dataplex/v1/catalog_service/rest/service_stub.rb +435 -133
  11. data/lib/google/cloud/dataplex/v1/catalog_service/rest.rb +4 -4
  12. data/lib/google/cloud/dataplex/v1/catalog_service.rb +4 -4
  13. data/lib/google/cloud/dataplex/v1/catalog_services_pb.rb +44 -20
  14. data/lib/google/cloud/dataplex/v1/content_service/client.rb +30 -9
  15. data/lib/google/cloud/dataplex/v1/content_service/rest/client.rb +30 -9
  16. data/lib/google/cloud/dataplex/v1/content_service/rest/service_stub.rb +78 -50
  17. data/lib/google/cloud/dataplex/v1/data_discovery_pb.rb +52 -0
  18. data/lib/google/cloud/dataplex/v1/data_quality_pb.rb +1 -1
  19. data/lib/google/cloud/dataplex/v1/data_scan_service/client.rb +34 -10
  20. data/lib/google/cloud/dataplex/v1/data_scan_service/operations.rb +12 -15
  21. data/lib/google/cloud/dataplex/v1/data_scan_service/paths.rb +36 -0
  22. data/lib/google/cloud/dataplex/v1/data_scan_service/rest/client.rb +33 -10
  23. data/lib/google/cloud/dataplex/v1/data_scan_service/rest/operations.rb +72 -38
  24. data/lib/google/cloud/dataplex/v1/data_scan_service/rest/service_stub.rb +86 -56
  25. data/lib/google/cloud/dataplex/v1/data_taxonomy_service/client.rb +41 -16
  26. data/lib/google/cloud/dataplex/v1/data_taxonomy_service/operations.rb +12 -15
  27. data/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest/client.rb +38 -16
  28. data/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest/operations.rb +72 -38
  29. data/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest/service_stub.rb +134 -92
  30. data/lib/google/cloud/dataplex/v1/dataplex_service/client.rb +54 -34
  31. data/lib/google/cloud/dataplex/v1/dataplex_service/operations.rb +12 -15
  32. data/lib/google/cloud/dataplex/v1/dataplex_service/rest/client.rb +52 -34
  33. data/lib/google/cloud/dataplex/v1/dataplex_service/rest/operations.rb +72 -38
  34. data/lib/google/cloud/dataplex/v1/dataplex_service/rest/service_stub.rb +278 -200
  35. data/lib/google/cloud/dataplex/v1/datascans_pb.rb +3 -1
  36. data/lib/google/cloud/dataplex/v1/logs_pb.rb +3 -1
  37. data/lib/google/cloud/dataplex/v1/metadata_service/client.rb +31 -10
  38. data/lib/google/cloud/dataplex/v1/metadata_service/rest/client.rb +31 -10
  39. data/lib/google/cloud/dataplex/v1/metadata_service/rest/service_stub.rb +86 -56
  40. data/lib/google/cloud/dataplex/v1/version.rb +1 -1
  41. data/proto_docs/google/api/client.rb +39 -0
  42. data/proto_docs/google/api/field_info.rb +88 -0
  43. data/proto_docs/google/cloud/dataplex/v1/catalog.rb +710 -234
  44. data/proto_docs/google/cloud/dataplex/v1/data_discovery.rb +156 -0
  45. data/proto_docs/google/cloud/dataplex/v1/data_profile.rb +4 -4
  46. data/proto_docs/google/cloud/dataplex/v1/data_quality.rb +7 -2
  47. data/proto_docs/google/cloud/dataplex/v1/datascans.rb +30 -12
  48. data/proto_docs/google/cloud/dataplex/v1/logs.rb +51 -1
  49. data/proto_docs/google/cloud/dataplex/v1/tasks.rb +3 -4
  50. data/proto_docs/google/longrunning/operations.rb +19 -14
  51. metadata +8 -5
@@ -32,10 +32,10 @@ module Google
32
32
  # REST client for the CatalogService service.
33
33
  #
34
34
  # The primary resources offered by this service are EntryGroups, EntryTypes,
35
- # AspectTypes, Entry and Aspect which collectively allow a data administrator
36
- # to organize, manage, secure and catalog data across their organization
37
- # located across cloud projects in a variety of storage systems including Cloud
38
- # Storage and BigQuery.
35
+ # AspectTypes, and Entries. They collectively let data administrators organize,
36
+ # manage, secure, and catalog data located across cloud projects in their
37
+ # organization in a variety of storage systems, including Cloud Storage and
38
+ # BigQuery.
39
39
  #
40
40
  class Client
41
41
  # @private
@@ -240,15 +240,27 @@ module Google
240
240
  endpoint: @config.endpoint,
241
241
  endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
242
242
  universe_domain: @config.universe_domain,
243
- credentials: credentials
243
+ credentials: credentials,
244
+ logger: @config.logger
244
245
  )
245
246
 
247
+ @catalog_service_stub.logger(stub: true)&.info do |entry|
248
+ entry.set_system_name
249
+ entry.set_service
250
+ entry.message = "Created client for #{entry.service}"
251
+ entry.set_credentials_fields credentials
252
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
253
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
254
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
255
+ end
256
+
246
257
  @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
247
258
  config.credentials = credentials
248
259
  config.quota_project = @quota_project_id
249
260
  config.endpoint = @catalog_service_stub.endpoint
250
261
  config.universe_domain = @catalog_service_stub.universe_domain
251
262
  config.bindings_override = @config.bindings_override
263
+ config.logger = @catalog_service_stub.logger if config.respond_to? :logger=
252
264
  end
253
265
 
254
266
  @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config|
@@ -257,6 +269,7 @@ module Google
257
269
  config.endpoint = @catalog_service_stub.endpoint
258
270
  config.universe_domain = @catalog_service_stub.universe_domain
259
271
  config.bindings_override = @config.bindings_override
272
+ config.logger = @catalog_service_stub.logger if config.respond_to? :logger=
260
273
  end
261
274
  end
262
275
 
@@ -281,10 +294,19 @@ module Google
281
294
  #
282
295
  attr_reader :iam_policy_client
283
296
 
297
+ ##
298
+ # The logger used for request/response debug logging.
299
+ #
300
+ # @return [Logger]
301
+ #
302
+ def logger
303
+ @catalog_service_stub.logger
304
+ end
305
+
284
306
  # Service calls
285
307
 
286
308
  ##
287
- # Creates an EntryType
309
+ # Creates an EntryType.
288
310
  #
289
311
  # @overload create_entry_type(request, options = nil)
290
312
  # Pass arguments to `create_entry_type` via a request object, either of type
@@ -304,14 +326,14 @@ module Google
304
326
  # @param parent [::String]
305
327
  # Required. The resource name of the EntryType, of the form:
306
328
  # projects/\\{project_number}/locations/\\{location_id}
307
- # where `location_id` refers to a GCP region.
329
+ # where `location_id` refers to a Google Cloud region.
308
330
  # @param entry_type_id [::String]
309
331
  # Required. EntryType identifier.
310
332
  # @param entry_type [::Google::Cloud::Dataplex::V1::EntryType, ::Hash]
311
- # Required. EntryType Resource
333
+ # Required. EntryType Resource.
312
334
  # @param validate_only [::Boolean]
313
- # Optional. Only validate the request, but do not perform mutations.
314
- # The default is false.
335
+ # Optional. The service validates the request without performing any
336
+ # mutations. The default is false.
315
337
  # @yield [result, operation] Access the result along with the TransportOperation object
316
338
  # @yieldparam result [::Gapic::Operation]
317
339
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -373,14 +395,14 @@ module Google
373
395
  @catalog_service_stub.create_entry_type request, options do |result, operation|
374
396
  result = ::Gapic::Operation.new result, @operations_client, options: options
375
397
  yield result, operation if block_given?
376
- return result
398
+ throw :response, result
377
399
  end
378
400
  rescue ::Gapic::Rest::Error => e
379
401
  raise ::Google::Cloud::Error.from_error(e)
380
402
  end
381
403
 
382
404
  ##
383
- # Updates a EntryType resource.
405
+ # Updates an EntryType.
384
406
  #
385
407
  # @overload update_entry_type(request, options = nil)
386
408
  # Pass arguments to `update_entry_type` via a request object, either of type
@@ -398,12 +420,12 @@ module Google
398
420
  # the default parameter values, pass an empty Hash as a request object (see above).
399
421
  #
400
422
  # @param entry_type [::Google::Cloud::Dataplex::V1::EntryType, ::Hash]
401
- # Required. EntryType Resource
423
+ # Required. EntryType Resource.
402
424
  # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
403
425
  # Required. Mask of fields to update.
404
426
  # @param validate_only [::Boolean]
405
- # Optional. Only validate the request, but do not perform mutations.
406
- # The default is false.
427
+ # Optional. The service validates the request without performing any
428
+ # mutations. The default is false.
407
429
  # @yield [result, operation] Access the result along with the TransportOperation object
408
430
  # @yieldparam result [::Gapic::Operation]
409
431
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -465,14 +487,14 @@ module Google
465
487
  @catalog_service_stub.update_entry_type request, options do |result, operation|
466
488
  result = ::Gapic::Operation.new result, @operations_client, options: options
467
489
  yield result, operation if block_given?
468
- return result
490
+ throw :response, result
469
491
  end
470
492
  rescue ::Gapic::Rest::Error => e
471
493
  raise ::Google::Cloud::Error.from_error(e)
472
494
  end
473
495
 
474
496
  ##
475
- # Deletes a EntryType resource.
497
+ # Deletes an EntryType.
476
498
  #
477
499
  # @overload delete_entry_type(request, options = nil)
478
500
  # Pass arguments to `delete_entry_type` via a request object, either of type
@@ -494,7 +516,7 @@ module Google
494
516
  # `projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id}`.
495
517
  # @param etag [::String]
496
518
  # Optional. If the client provided etag value does not match the current etag
497
- # value, the DeleteEntryTypeRequest method returns an ABORTED error response
519
+ # value, the DeleteEntryTypeRequest method returns an ABORTED error response.
498
520
  # @yield [result, operation] Access the result along with the TransportOperation object
499
521
  # @yieldparam result [::Gapic::Operation]
500
522
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -556,7 +578,7 @@ module Google
556
578
  @catalog_service_stub.delete_entry_type request, options do |result, operation|
557
579
  result = ::Gapic::Operation.new result, @operations_client, options: options
558
580
  yield result, operation if block_given?
559
- return result
581
+ throw :response, result
560
582
  end
561
583
  rescue ::Gapic::Rest::Error => e
562
584
  raise ::Google::Cloud::Error.from_error(e)
@@ -583,27 +605,28 @@ module Google
583
605
  # @param parent [::String]
584
606
  # Required. The resource name of the EntryType location, of the form:
585
607
  # `projects/{project_number}/locations/{location_id}`
586
- # where `location_id` refers to a GCP region.
608
+ # where `location_id` refers to a Google Cloud region.
587
609
  # @param page_size [::Integer]
588
610
  # Optional. Maximum number of EntryTypes to return. The service may return
589
- # fewer than this value. If unspecified, at most 10 EntryTypes will be
590
- # returned. The maximum value is 1000; values above 1000 will be coerced to
611
+ # fewer than this value. If unspecified, the service returns at most 10
612
+ # EntryTypes. The maximum value is 1000; values above 1000 will be coerced to
591
613
  # 1000.
592
614
  # @param page_token [::String]
593
615
  # Optional. Page token received from a previous `ListEntryTypes` call.
594
616
  # Provide this to retrieve the subsequent page. When paginating, all other
595
- # parameters provided to `ListEntryTypes` must match the call that provided
596
- # the page token.
617
+ # parameters you provided to `ListEntryTypes` must match the call that
618
+ # provided the page token.
597
619
  # @param filter [::String]
598
620
  # Optional. Filter request. Filters are case-sensitive.
599
- # The following formats are supported:
621
+ # The service supports the following formats:
600
622
  #
601
- # labels.key1 = "value1"
602
- # labels:key1
603
- # name = "value"
604
- # These restrictions can be coinjoined with AND, OR and NOT conjunctions.
623
+ # * labels.key1 = "value1"
624
+ # * labels:key1
625
+ # * name = "value"
626
+ #
627
+ # These restrictions can be conjoined with AND, OR, and NOT conjunctions.
605
628
  # @param order_by [::String]
606
- # Optional. Order by fields (`name` or `create_time`) for the result.
629
+ # Optional. Orders the result by `name` or `create_time` fields.
607
630
  # If not specified, the ordering is undefined.
608
631
  # @yield [result, operation] Access the result along with the TransportOperation object
609
632
  # @yieldparam result [::Google::Cloud::Dataplex::V1::ListEntryTypesResponse]
@@ -662,14 +685,13 @@ module Google
662
685
 
663
686
  @catalog_service_stub.list_entry_types request, options do |result, operation|
664
687
  yield result, operation if block_given?
665
- return result
666
688
  end
667
689
  rescue ::Gapic::Rest::Error => e
668
690
  raise ::Google::Cloud::Error.from_error(e)
669
691
  end
670
692
 
671
693
  ##
672
- # Retrieves a EntryType resource.
694
+ # Gets an EntryType.
673
695
  #
674
696
  # @overload get_entry_type(request, options = nil)
675
697
  # Pass arguments to `get_entry_type` via a request object, either of type
@@ -742,14 +764,13 @@ module Google
742
764
 
743
765
  @catalog_service_stub.get_entry_type request, options do |result, operation|
744
766
  yield result, operation if block_given?
745
- return result
746
767
  end
747
768
  rescue ::Gapic::Rest::Error => e
748
769
  raise ::Google::Cloud::Error.from_error(e)
749
770
  end
750
771
 
751
772
  ##
752
- # Creates an AspectType
773
+ # Creates an AspectType.
753
774
  #
754
775
  # @overload create_aspect_type(request, options = nil)
755
776
  # Pass arguments to `create_aspect_type` via a request object, either of type
@@ -769,14 +790,14 @@ module Google
769
790
  # @param parent [::String]
770
791
  # Required. The resource name of the AspectType, of the form:
771
792
  # projects/\\{project_number}/locations/\\{location_id}
772
- # where `location_id` refers to a GCP region.
793
+ # where `location_id` refers to a Google Cloud region.
773
794
  # @param aspect_type_id [::String]
774
795
  # Required. AspectType identifier.
775
796
  # @param aspect_type [::Google::Cloud::Dataplex::V1::AspectType, ::Hash]
776
- # Required. AspectType Resource
797
+ # Required. AspectType Resource.
777
798
  # @param validate_only [::Boolean]
778
- # Optional. Only validate the request, but do not perform mutations.
779
- # The default is false.
799
+ # Optional. The service validates the request without performing any
800
+ # mutations. The default is false.
780
801
  # @yield [result, operation] Access the result along with the TransportOperation object
781
802
  # @yieldparam result [::Gapic::Operation]
782
803
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -838,14 +859,14 @@ module Google
838
859
  @catalog_service_stub.create_aspect_type request, options do |result, operation|
839
860
  result = ::Gapic::Operation.new result, @operations_client, options: options
840
861
  yield result, operation if block_given?
841
- return result
862
+ throw :response, result
842
863
  end
843
864
  rescue ::Gapic::Rest::Error => e
844
865
  raise ::Google::Cloud::Error.from_error(e)
845
866
  end
846
867
 
847
868
  ##
848
- # Updates a AspectType resource.
869
+ # Updates an AspectType.
849
870
  #
850
871
  # @overload update_aspect_type(request, options = nil)
851
872
  # Pass arguments to `update_aspect_type` via a request object, either of type
@@ -930,14 +951,14 @@ module Google
930
951
  @catalog_service_stub.update_aspect_type request, options do |result, operation|
931
952
  result = ::Gapic::Operation.new result, @operations_client, options: options
932
953
  yield result, operation if block_given?
933
- return result
954
+ throw :response, result
934
955
  end
935
956
  rescue ::Gapic::Rest::Error => e
936
957
  raise ::Google::Cloud::Error.from_error(e)
937
958
  end
938
959
 
939
960
  ##
940
- # Deletes a AspectType resource.
961
+ # Deletes an AspectType.
941
962
  #
942
963
  # @overload delete_aspect_type(request, options = nil)
943
964
  # Pass arguments to `delete_aspect_type` via a request object, either of type
@@ -959,7 +980,8 @@ module Google
959
980
  # `projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_id}`.
960
981
  # @param etag [::String]
961
982
  # Optional. If the client provided etag value does not match the current etag
962
- # value, the DeleteAspectTypeRequest method returns an ABORTED error response
983
+ # value, the DeleteAspectTypeRequest method returns an ABORTED error
984
+ # response.
963
985
  # @yield [result, operation] Access the result along with the TransportOperation object
964
986
  # @yieldparam result [::Gapic::Operation]
965
987
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -1021,7 +1043,7 @@ module Google
1021
1043
  @catalog_service_stub.delete_aspect_type request, options do |result, operation|
1022
1044
  result = ::Gapic::Operation.new result, @operations_client, options: options
1023
1045
  yield result, operation if block_given?
1024
- return result
1046
+ throw :response, result
1025
1047
  end
1026
1048
  rescue ::Gapic::Rest::Error => e
1027
1049
  raise ::Google::Cloud::Error.from_error(e)
@@ -1048,27 +1070,28 @@ module Google
1048
1070
  # @param parent [::String]
1049
1071
  # Required. The resource name of the AspectType location, of the form:
1050
1072
  # `projects/{project_number}/locations/{location_id}`
1051
- # where `location_id` refers to a GCP region.
1073
+ # where `location_id` refers to a Google Cloud region.
1052
1074
  # @param page_size [::Integer]
1053
1075
  # Optional. Maximum number of AspectTypes to return. The service may return
1054
- # fewer than this value. If unspecified, at most 10 AspectTypes will be
1055
- # returned. The maximum value is 1000; values above 1000 will be coerced to
1056
- # 1000.
1076
+ # fewer than this value. If unspecified, the service returns at most 10
1077
+ # AspectTypes. The maximum value is 1000; values above 1000 will be coerced
1078
+ # to 1000.
1057
1079
  # @param page_token [::String]
1058
1080
  # Optional. Page token received from a previous `ListAspectTypes` call.
1059
1081
  # Provide this to retrieve the subsequent page. When paginating, all other
1060
- # parameters provided to `ListAspectTypes` must match the call that provided
1061
- # the page token.
1082
+ # parameters you provide to `ListAspectTypes` must match the call that
1083
+ # provided the page token.
1062
1084
  # @param filter [::String]
1063
1085
  # Optional. Filter request. Filters are case-sensitive.
1064
- # The following formats are supported:
1086
+ # The service supports the following formats:
1087
+ #
1088
+ # * labels.key1 = "value1"
1089
+ # * labels:key1
1090
+ # * name = "value"
1065
1091
  #
1066
- # labels.key1 = "value1"
1067
- # labels:key1
1068
- # name = "value"
1069
- # These restrictions can be coinjoined with AND, OR and NOT conjunctions.
1092
+ # These restrictions can be conjoined with AND, OR, and NOT conjunctions.
1070
1093
  # @param order_by [::String]
1071
- # Optional. Order by fields (`name` or `create_time`) for the result.
1094
+ # Optional. Orders the result by `name` or `create_time` fields.
1072
1095
  # If not specified, the ordering is undefined.
1073
1096
  # @yield [result, operation] Access the result along with the TransportOperation object
1074
1097
  # @yieldparam result [::Google::Cloud::Dataplex::V1::ListAspectTypesResponse]
@@ -1127,14 +1150,13 @@ module Google
1127
1150
 
1128
1151
  @catalog_service_stub.list_aspect_types request, options do |result, operation|
1129
1152
  yield result, operation if block_given?
1130
- return result
1131
1153
  end
1132
1154
  rescue ::Gapic::Rest::Error => e
1133
1155
  raise ::Google::Cloud::Error.from_error(e)
1134
1156
  end
1135
1157
 
1136
1158
  ##
1137
- # Retrieves a AspectType resource.
1159
+ # Gets an AspectType.
1138
1160
  #
1139
1161
  # @overload get_aspect_type(request, options = nil)
1140
1162
  # Pass arguments to `get_aspect_type` via a request object, either of type
@@ -1207,14 +1229,13 @@ module Google
1207
1229
 
1208
1230
  @catalog_service_stub.get_aspect_type request, options do |result, operation|
1209
1231
  yield result, operation if block_given?
1210
- return result
1211
1232
  end
1212
1233
  rescue ::Gapic::Rest::Error => e
1213
1234
  raise ::Google::Cloud::Error.from_error(e)
1214
1235
  end
1215
1236
 
1216
1237
  ##
1217
- # Creates an EntryGroup
1238
+ # Creates an EntryGroup.
1218
1239
  #
1219
1240
  # @overload create_entry_group(request, options = nil)
1220
1241
  # Pass arguments to `create_entry_group` via a request object, either of type
@@ -1238,10 +1259,10 @@ module Google
1238
1259
  # @param entry_group_id [::String]
1239
1260
  # Required. EntryGroup identifier.
1240
1261
  # @param entry_group [::Google::Cloud::Dataplex::V1::EntryGroup, ::Hash]
1241
- # Required. EntryGroup Resource
1262
+ # Required. EntryGroup Resource.
1242
1263
  # @param validate_only [::Boolean]
1243
- # Optional. Only validate the request, but do not perform mutations.
1244
- # The default is false.
1264
+ # Optional. The service validates the request without performing any
1265
+ # mutations. The default is false.
1245
1266
  # @yield [result, operation] Access the result along with the TransportOperation object
1246
1267
  # @yieldparam result [::Gapic::Operation]
1247
1268
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -1303,14 +1324,14 @@ module Google
1303
1324
  @catalog_service_stub.create_entry_group request, options do |result, operation|
1304
1325
  result = ::Gapic::Operation.new result, @operations_client, options: options
1305
1326
  yield result, operation if block_given?
1306
- return result
1327
+ throw :response, result
1307
1328
  end
1308
1329
  rescue ::Gapic::Rest::Error => e
1309
1330
  raise ::Google::Cloud::Error.from_error(e)
1310
1331
  end
1311
1332
 
1312
1333
  ##
1313
- # Updates a EntryGroup resource.
1334
+ # Updates an EntryGroup.
1314
1335
  #
1315
1336
  # @overload update_entry_group(request, options = nil)
1316
1337
  # Pass arguments to `update_entry_group` via a request object, either of type
@@ -1328,12 +1349,12 @@ module Google
1328
1349
  # the default parameter values, pass an empty Hash as a request object (see above).
1329
1350
  #
1330
1351
  # @param entry_group [::Google::Cloud::Dataplex::V1::EntryGroup, ::Hash]
1331
- # Required. EntryGroup Resource
1352
+ # Required. EntryGroup Resource.
1332
1353
  # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
1333
1354
  # Required. Mask of fields to update.
1334
1355
  # @param validate_only [::Boolean]
1335
- # Optional. Only validate the request, but do not perform mutations.
1336
- # The default is false.
1356
+ # Optional. The service validates the request, without performing any
1357
+ # mutations. The default is false.
1337
1358
  # @yield [result, operation] Access the result along with the TransportOperation object
1338
1359
  # @yieldparam result [::Gapic::Operation]
1339
1360
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -1395,14 +1416,14 @@ module Google
1395
1416
  @catalog_service_stub.update_entry_group request, options do |result, operation|
1396
1417
  result = ::Gapic::Operation.new result, @operations_client, options: options
1397
1418
  yield result, operation if block_given?
1398
- return result
1419
+ throw :response, result
1399
1420
  end
1400
1421
  rescue ::Gapic::Rest::Error => e
1401
1422
  raise ::Google::Cloud::Error.from_error(e)
1402
1423
  end
1403
1424
 
1404
1425
  ##
1405
- # Deletes a EntryGroup resource.
1426
+ # Deletes an EntryGroup.
1406
1427
  #
1407
1428
  # @overload delete_entry_group(request, options = nil)
1408
1429
  # Pass arguments to `delete_entry_group` via a request object, either of type
@@ -1424,7 +1445,8 @@ module Google
1424
1445
  # `projects/{project_number}/locations/{location_id}/entryGroups/{entry_group_id}`.
1425
1446
  # @param etag [::String]
1426
1447
  # Optional. If the client provided etag value does not match the current etag
1427
- # value, the DeleteEntryGroupRequest method returns an ABORTED error response
1448
+ # value, the DeleteEntryGroupRequest method returns an ABORTED error
1449
+ # response.
1428
1450
  # @yield [result, operation] Access the result along with the TransportOperation object
1429
1451
  # @yieldparam result [::Gapic::Operation]
1430
1452
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -1486,7 +1508,7 @@ module Google
1486
1508
  @catalog_service_stub.delete_entry_group request, options do |result, operation|
1487
1509
  result = ::Gapic::Operation.new result, @operations_client, options: options
1488
1510
  yield result, operation if block_given?
1489
- return result
1511
+ throw :response, result
1490
1512
  end
1491
1513
  rescue ::Gapic::Rest::Error => e
1492
1514
  raise ::Google::Cloud::Error.from_error(e)
@@ -1513,17 +1535,17 @@ module Google
1513
1535
  # @param parent [::String]
1514
1536
  # Required. The resource name of the entryGroup location, of the form:
1515
1537
  # `projects/{project_number}/locations/{location_id}`
1516
- # where `location_id` refers to a GCP region.
1538
+ # where `location_id` refers to a Google Cloud region.
1517
1539
  # @param page_size [::Integer]
1518
1540
  # Optional. Maximum number of EntryGroups to return. The service may return
1519
- # fewer than this value. If unspecified, at most 10 EntryGroups will be
1520
- # returned. The maximum value is 1000; values above 1000 will be coerced to
1521
- # 1000.
1541
+ # fewer than this value. If unspecified, the service returns at most 10
1542
+ # EntryGroups. The maximum value is 1000; values above 1000 will be coerced
1543
+ # to 1000.
1522
1544
  # @param page_token [::String]
1523
1545
  # Optional. Page token received from a previous `ListEntryGroups` call.
1524
1546
  # Provide this to retrieve the subsequent page. When paginating, all other
1525
- # parameters provided to `ListEntryGroups` must match the call that provided
1526
- # the page token.
1547
+ # parameters you provide to `ListEntryGroups` must match the call that
1548
+ # provided the page token.
1527
1549
  # @param filter [::String]
1528
1550
  # Optional. Filter request.
1529
1551
  # @param order_by [::String]
@@ -1585,14 +1607,13 @@ module Google
1585
1607
 
1586
1608
  @catalog_service_stub.list_entry_groups request, options do |result, operation|
1587
1609
  yield result, operation if block_given?
1588
- return result
1589
1610
  end
1590
1611
  rescue ::Gapic::Rest::Error => e
1591
1612
  raise ::Google::Cloud::Error.from_error(e)
1592
1613
  end
1593
1614
 
1594
1615
  ##
1595
- # Retrieves a EntryGroup resource.
1616
+ # Gets an EntryGroup.
1596
1617
  #
1597
1618
  # @overload get_entry_group(request, options = nil)
1598
1619
  # Pass arguments to `get_entry_group` via a request object, either of type
@@ -1665,7 +1686,6 @@ module Google
1665
1686
 
1666
1687
  @catalog_service_stub.get_entry_group request, options do |result, operation|
1667
1688
  yield result, operation if block_given?
1668
- return result
1669
1689
  end
1670
1690
  rescue ::Gapic::Rest::Error => e
1671
1691
  raise ::Google::Cloud::Error.from_error(e)
@@ -1695,20 +1715,21 @@ module Google
1695
1715
  # @param entry_id [::String]
1696
1716
  # Required. Entry identifier. It has to be unique within an Entry Group.
1697
1717
  #
1698
- # Entries corresponding to Google Cloud resources use Entry ID format based
1699
- # on Full Resource Names
1700
- # (https://cloud.google.com/apis/design/resource_names#full_resource_name).
1701
- # The format is a Full Resource Name of the resource without the
1702
- # prefix double slashes in the API Service Name part of Full Resource Name.
1703
- # This allows retrieval of entries using their associated resource name.
1718
+ # Entries corresponding to Google Cloud resources use an Entry ID format
1719
+ # based on [full resource
1720
+ # names](https://cloud.google.com/apis/design/resource_names#full_resource_name).
1721
+ # The format is a full resource name of the resource without the
1722
+ # prefix double slashes in the API service name part of the full resource
1723
+ # name. This allows retrieval of entries using their associated resource
1724
+ # name.
1704
1725
  #
1705
- # For example if the Full Resource Name of a resource is
1726
+ # For example, if the full resource name of a resource is
1706
1727
  # `//library.googleapis.com/shelves/shelf1/books/book2`,
1707
1728
  # then the suggested entry_id is
1708
1729
  # `library.googleapis.com/shelves/shelf1/books/book2`.
1709
1730
  #
1710
1731
  # It is also suggested to follow the same convention for entries
1711
- # corresponding to resources from other providers or systems than Google
1732
+ # corresponding to resources from providers or systems other than Google
1712
1733
  # Cloud.
1713
1734
  #
1714
1735
  # The maximum size of the field is 4000 characters.
@@ -1767,7 +1788,6 @@ module Google
1767
1788
 
1768
1789
  @catalog_service_stub.create_entry request, options do |result, operation|
1769
1790
  yield result, operation if block_given?
1770
- return result
1771
1791
  end
1772
1792
  rescue ::Gapic::Rest::Error => e
1773
1793
  raise ::Google::Cloud::Error.from_error(e)
@@ -1797,28 +1817,34 @@ module Google
1797
1817
  # Optional. Mask of fields to update. To update Aspects, the update_mask must
1798
1818
  # contain the value "aspects".
1799
1819
  #
1800
- # If the update_mask is empty, all modifiable fields present in the request
1801
- # will be updated.
1820
+ # If the update_mask is empty, the service will update all modifiable fields
1821
+ # present in the request.
1802
1822
  # @param allow_missing [::Boolean]
1803
- # Optional. If set to true and the entry does not exist, it will be created.
1823
+ # Optional. If set to true and the entry doesn't exist, the service will
1824
+ # create it.
1804
1825
  # @param delete_missing_aspects [::Boolean]
1805
- # Optional. If set to true and the aspect_keys specify aspect ranges, any
1806
- # existing aspects from that range not provided in the request will be
1807
- # deleted.
1826
+ # Optional. If set to true and the aspect_keys specify aspect ranges, the
1827
+ # service deletes any existing aspects from that range that weren't provided
1828
+ # in the request.
1808
1829
  # @param aspect_keys [::Array<::String>]
1809
- # Optional. The map keys of the Aspects which should be modified. Supports
1810
- # the following syntaxes:
1811
- # * <aspect_type_reference> - matches aspect on given type and empty path
1812
- # * <aspect_type_reference>@path - matches aspect on given type and specified
1813
- # path
1814
- # * <aspect_type_reference>* - matches aspects on given type for all paths
1815
- # * *@path - matches aspects of all types on the given path
1816
- #
1817
- # Existing aspects matching the syntax will not be removed unless
1830
+ # Optional. The map keys of the Aspects which the service should modify. It
1831
+ # supports the following syntaxes:
1832
+ #
1833
+ # * `<aspect_type_reference>` - matches an aspect of the given type and empty
1834
+ # path.
1835
+ # * `<aspect_type_reference>@path` - matches an aspect of the given type and
1836
+ # specified path. For example, to attach an aspect to a field that is
1837
+ # specified by the `schema` aspect, the path should have the format
1838
+ # `Schema.<field_name>`.
1839
+ # * `<aspect_type_reference>*` - matches aspects of the given type for all
1840
+ # paths.
1841
+ # * `*@path` - matches aspects of all types on the given path.
1842
+ #
1843
+ # The service will not remove existing aspects matching the syntax unless
1818
1844
  # `delete_missing_aspects` is set to true.
1819
1845
  #
1820
- # If this field is left empty, it will be treated as specifying exactly those
1821
- # Aspects present in the request.
1846
+ # If this field is left empty, the service treats it as specifying
1847
+ # exactly those Aspects present in the request.
1822
1848
  # @yield [result, operation] Access the result along with the TransportOperation object
1823
1849
  # @yieldparam result [::Google::Cloud::Dataplex::V1::Entry]
1824
1850
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -1872,7 +1898,6 @@ module Google
1872
1898
 
1873
1899
  @catalog_service_stub.update_entry request, options do |result, operation|
1874
1900
  yield result, operation if block_given?
1875
- return result
1876
1901
  end
1877
1902
  rescue ::Gapic::Rest::Error => e
1878
1903
  raise ::Google::Cloud::Error.from_error(e)
@@ -1952,14 +1977,13 @@ module Google
1952
1977
 
1953
1978
  @catalog_service_stub.delete_entry request, options do |result, operation|
1954
1979
  yield result, operation if block_given?
1955
- return result
1956
1980
  end
1957
1981
  rescue ::Gapic::Rest::Error => e
1958
1982
  raise ::Google::Cloud::Error.from_error(e)
1959
1983
  end
1960
1984
 
1961
1985
  ##
1962
- # Lists entries within an entry group.
1986
+ # Lists Entries within an EntryGroup.
1963
1987
  #
1964
1988
  # @overload list_entries(request, options = nil)
1965
1989
  # Pass arguments to `list_entries` via a request object, either of type
@@ -1980,23 +2004,35 @@ module Google
1980
2004
  # Required. The resource name of the parent Entry Group:
1981
2005
  # `projects/{project}/locations/{location}/entryGroups/{entry_group}`.
1982
2006
  # @param page_size [::Integer]
2007
+ # Optional. Number of items to return per page. If there are remaining
2008
+ # results, the service returns a next_page_token. If unspecified, the service
2009
+ # returns at most 10 Entries. The maximum value is 100; values above 100 will
2010
+ # be coerced to 100.
1983
2011
  # @param page_token [::String]
1984
- # Optional. The pagination token returned by a previous request.
2012
+ # Optional. Page token received from a previous `ListEntries` call. Provide
2013
+ # this to retrieve the subsequent page.
1985
2014
  # @param filter [::String]
1986
- # Optional. A filter on the entries to return.
1987
- # Filters are case-sensitive.
1988
- # The request can be filtered by the following fields:
1989
- # entry_type, entry_source.display_name.
1990
- # The comparison operators are =, !=, <, >, <=, >= (strings are compared
1991
- # according to lexical order)
1992
- # The logical operators AND, OR, NOT can be used
1993
- # in the filter. Wildcard "*" can be used, but for entry_type the full
1994
- # project id or number needs to be provided. Example filter expressions:
1995
- # "entry_source.display_name=AnExampleDisplayName"
1996
- # "entry_type=projects/example-project/locations/global/entryTypes/example-entry_type"
1997
- # "entry_type=projects/example-project/locations/us/entryTypes/a* OR
1998
- # entry_type=projects/another-project/locations/*"
1999
- # "NOT entry_source.display_name=AnotherExampleDisplayName"
2015
+ # Optional. A filter on the entries to return. Filters are case-sensitive.
2016
+ # You can filter the request by the following fields:
2017
+ #
2018
+ # * entry_type
2019
+ # * entry_source.display_name
2020
+ #
2021
+ # The comparison operators are =, !=, <, >, <=, >=. The service compares
2022
+ # strings according to lexical order.
2023
+ #
2024
+ # You can use the logical operators AND, OR, NOT in the filter.
2025
+ #
2026
+ # You can use Wildcard "*", but for entry_type you need to provide the
2027
+ # full project id or number.
2028
+ #
2029
+ # Example filter expressions:
2030
+ #
2031
+ # * "entry_source.display_name=AnExampleDisplayName"
2032
+ # * "entry_type=projects/example-project/locations/global/entryTypes/example-entry_type"
2033
+ # * "entry_type=projects/example-project/locations/us/entryTypes/a* OR
2034
+ # entry_type=projects/another-project/locations/*"
2035
+ # * "NOT entry_source.display_name=AnotherExampleDisplayName"
2000
2036
  # @yield [result, operation] Access the result along with the TransportOperation object
2001
2037
  # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Entry>]
2002
2038
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -2055,14 +2091,19 @@ module Google
2055
2091
  @catalog_service_stub.list_entries request, options do |result, operation|
2056
2092
  result = ::Gapic::Rest::PagedEnumerable.new @catalog_service_stub, :list_entries, "entries", request, result, options
2057
2093
  yield result, operation if block_given?
2058
- return result
2094
+ throw :response, result
2059
2095
  end
2060
2096
  rescue ::Gapic::Rest::Error => e
2061
2097
  raise ::Google::Cloud::Error.from_error(e)
2062
2098
  end
2063
2099
 
2064
2100
  ##
2065
- # Gets a single entry.
2101
+ # Gets an Entry.
2102
+ #
2103
+ # **Caution**: The BigQuery metadata that is stored in Dataplex Catalog is
2104
+ # changing. For more information, see [Changes to BigQuery metadata stored in
2105
+ # Dataplex
2106
+ # Catalog](https://cloud.google.com/dataplex/docs/biqquery-metadata-changes).
2066
2107
  #
2067
2108
  # @overload get_entry(request, options = nil)
2068
2109
  # Pass arguments to `get_entry` via a request object, either of type
@@ -2083,13 +2124,14 @@ module Google
2083
2124
  # Required. The resource name of the Entry:
2084
2125
  # `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`.
2085
2126
  # @param view [::Google::Cloud::Dataplex::V1::EntryView]
2086
- # Optional. View for controlling which parts of an entry are to be returned.
2127
+ # Optional. View to control which parts of an entry the service should
2128
+ # return.
2087
2129
  # @param aspect_types [::Array<::String>]
2088
2130
  # Optional. Limits the aspects returned to the provided aspect types.
2089
- # Only works if the CUSTOM view is selected.
2131
+ # It only works for CUSTOM view.
2090
2132
  # @param paths [::Array<::String>]
2091
2133
  # Optional. Limits the aspects returned to those associated with the provided
2092
- # paths within the Entry. Only works if the CUSTOM view is selected.
2134
+ # paths within the Entry. It only works for CUSTOM view.
2093
2135
  # @yield [result, operation] Access the result along with the TransportOperation object
2094
2136
  # @yieldparam result [::Google::Cloud::Dataplex::V1::Entry]
2095
2137
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -2143,14 +2185,18 @@ module Google
2143
2185
 
2144
2186
  @catalog_service_stub.get_entry request, options do |result, operation|
2145
2187
  yield result, operation if block_given?
2146
- return result
2147
2188
  end
2148
2189
  rescue ::Gapic::Rest::Error => e
2149
2190
  raise ::Google::Cloud::Error.from_error(e)
2150
2191
  end
2151
2192
 
2152
2193
  ##
2153
- # Looks up a single entry.
2194
+ # Looks up a single Entry by name using the permission on the source system.
2195
+ #
2196
+ # **Caution**: The BigQuery metadata that is stored in Dataplex Catalog is
2197
+ # changing. For more information, see [Changes to BigQuery metadata stored in
2198
+ # Dataplex
2199
+ # Catalog](https://cloud.google.com/dataplex/docs/biqquery-metadata-changes).
2154
2200
  #
2155
2201
  # @overload lookup_entry(request, options = nil)
2156
2202
  # Pass arguments to `lookup_entry` via a request object, either of type
@@ -2171,13 +2217,14 @@ module Google
2171
2217
  # Required. The project to which the request should be attributed in the
2172
2218
  # following form: `projects/{project}/locations/{location}`.
2173
2219
  # @param view [::Google::Cloud::Dataplex::V1::EntryView]
2174
- # Optional. View for controlling which parts of an entry are to be returned.
2220
+ # Optional. View to control which parts of an entry the service should
2221
+ # return.
2175
2222
  # @param aspect_types [::Array<::String>]
2176
2223
  # Optional. Limits the aspects returned to the provided aspect types.
2177
- # Only works if the CUSTOM view is selected.
2224
+ # It only works for CUSTOM view.
2178
2225
  # @param paths [::Array<::String>]
2179
2226
  # Optional. Limits the aspects returned to those associated with the provided
2180
- # paths within the Entry. Only works if the CUSTOM view is selected.
2227
+ # paths within the Entry. It only works for CUSTOM view.
2181
2228
  # @param entry [::String]
2182
2229
  # Required. The resource name of the Entry:
2183
2230
  # `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`.
@@ -2234,14 +2281,13 @@ module Google
2234
2281
 
2235
2282
  @catalog_service_stub.lookup_entry request, options do |result, operation|
2236
2283
  yield result, operation if block_given?
2237
- return result
2238
2284
  end
2239
2285
  rescue ::Gapic::Rest::Error => e
2240
2286
  raise ::Google::Cloud::Error.from_error(e)
2241
2287
  end
2242
2288
 
2243
2289
  ##
2244
- # Searches for entries matching given query and scope.
2290
+ # Searches for Entries matching the given query and scope.
2245
2291
  #
2246
2292
  # @overload search_entries(request, options = nil)
2247
2293
  # Pass arguments to `search_entries` via a request object, either of type
@@ -2264,15 +2310,19 @@ module Google
2264
2310
  # @param query [::String]
2265
2311
  # Required. The query against which entries in scope should be matched.
2266
2312
  # @param page_size [::Integer]
2267
- # Optional. Pagination.
2313
+ # Optional. Number of results in the search page. If <=0, then defaults
2314
+ # to 10. Max limit for page_size is 1000. Throws an invalid argument for
2315
+ # page_size > 1000.
2268
2316
  # @param page_token [::String]
2317
+ # Optional. Page token received from a previous `SearchEntries` call. Provide
2318
+ # this to retrieve the subsequent page.
2269
2319
  # @param order_by [::String]
2270
- # Optional. Ordering of the results. Supported options to be added later.
2320
+ # Optional. Specifies the ordering of results.
2271
2321
  # @param scope [::String]
2272
- # Optional. The scope under which the search should be operating. Should
2273
- # either be organizations/<org_id> or projects/<project_ref>. If left
2274
- # unspecified, it will default to the organization where the project provided
2275
- # in `name` is located.
2322
+ # Optional. The scope under which the search should be operating. It must
2323
+ # either be `organizations/<org_id>` or `projects/<project_ref>`. If it is
2324
+ # unspecified, it defaults to the organization where the project provided in
2325
+ # `name` is located.
2276
2326
  # @yield [result, operation] Access the result along with the TransportOperation object
2277
2327
  # @yieldparam result [::Google::Cloud::Dataplex::V1::SearchEntriesResponse]
2278
2328
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -2330,7 +2380,371 @@ module Google
2330
2380
 
2331
2381
  @catalog_service_stub.search_entries request, options do |result, operation|
2332
2382
  yield result, operation if block_given?
2333
- return result
2383
+ end
2384
+ rescue ::Gapic::Rest::Error => e
2385
+ raise ::Google::Cloud::Error.from_error(e)
2386
+ end
2387
+
2388
+ ##
2389
+ # Creates a metadata job. For example, use a metadata job to import Dataplex
2390
+ # Catalog entries and aspects from a third-party system into Dataplex.
2391
+ #
2392
+ # @overload create_metadata_job(request, options = nil)
2393
+ # Pass arguments to `create_metadata_job` via a request object, either of type
2394
+ # {::Google::Cloud::Dataplex::V1::CreateMetadataJobRequest} or an equivalent Hash.
2395
+ #
2396
+ # @param request [::Google::Cloud::Dataplex::V1::CreateMetadataJobRequest, ::Hash]
2397
+ # A request object representing the call parameters. Required. To specify no
2398
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2399
+ # @param options [::Gapic::CallOptions, ::Hash]
2400
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2401
+ #
2402
+ # @overload create_metadata_job(parent: nil, metadata_job: nil, metadata_job_id: nil, validate_only: nil)
2403
+ # Pass arguments to `create_metadata_job` via keyword arguments. Note that at
2404
+ # least one keyword argument is required. To specify no parameters, or to keep all
2405
+ # the default parameter values, pass an empty Hash as a request object (see above).
2406
+ #
2407
+ # @param parent [::String]
2408
+ # Required. The resource name of the parent location, in the format
2409
+ # `projects/{project_id_or_number}/locations/{location_id}`
2410
+ # @param metadata_job [::Google::Cloud::Dataplex::V1::MetadataJob, ::Hash]
2411
+ # Required. The metadata job resource.
2412
+ # @param metadata_job_id [::String]
2413
+ # Optional. The metadata job ID. If not provided, a unique ID is generated
2414
+ # with the prefix `metadata-job-`.
2415
+ # @param validate_only [::Boolean]
2416
+ # Optional. The service validates the request without performing any
2417
+ # mutations. The default is false.
2418
+ # @yield [result, operation] Access the result along with the TransportOperation object
2419
+ # @yieldparam result [::Gapic::Operation]
2420
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2421
+ #
2422
+ # @return [::Gapic::Operation]
2423
+ #
2424
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2425
+ #
2426
+ # @example Basic example
2427
+ # require "google/cloud/dataplex/v1"
2428
+ #
2429
+ # # Create a client object. The client can be reused for multiple calls.
2430
+ # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new
2431
+ #
2432
+ # # Create a request. To set request fields, pass in keyword arguments.
2433
+ # request = Google::Cloud::Dataplex::V1::CreateMetadataJobRequest.new
2434
+ #
2435
+ # # Call the create_metadata_job method.
2436
+ # result = client.create_metadata_job request
2437
+ #
2438
+ # # The returned object is of type Gapic::Operation. You can use it to
2439
+ # # check the status of an operation, cancel it, or wait for results.
2440
+ # # Here is how to wait for a response.
2441
+ # result.wait_until_done! timeout: 60
2442
+ # if result.response?
2443
+ # p result.response
2444
+ # else
2445
+ # puts "No response received."
2446
+ # end
2447
+ #
2448
+ def create_metadata_job request, options = nil
2449
+ raise ::ArgumentError, "request must be provided" if request.nil?
2450
+
2451
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateMetadataJobRequest
2452
+
2453
+ # Converts hash and nil to an options object
2454
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2455
+
2456
+ # Customize the options with defaults
2457
+ call_metadata = @config.rpcs.create_metadata_job.metadata.to_h
2458
+
2459
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2460
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2461
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2462
+ gapic_version: ::Google::Cloud::Dataplex::V1::VERSION,
2463
+ transports_version_send: [:rest]
2464
+
2465
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2466
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2467
+
2468
+ options.apply_defaults timeout: @config.rpcs.create_metadata_job.timeout,
2469
+ metadata: call_metadata,
2470
+ retry_policy: @config.rpcs.create_metadata_job.retry_policy
2471
+
2472
+ options.apply_defaults timeout: @config.timeout,
2473
+ metadata: @config.metadata,
2474
+ retry_policy: @config.retry_policy
2475
+
2476
+ @catalog_service_stub.create_metadata_job request, options do |result, operation|
2477
+ result = ::Gapic::Operation.new result, @operations_client, options: options
2478
+ yield result, operation if block_given?
2479
+ throw :response, result
2480
+ end
2481
+ rescue ::Gapic::Rest::Error => e
2482
+ raise ::Google::Cloud::Error.from_error(e)
2483
+ end
2484
+
2485
+ ##
2486
+ # Gets a metadata job.
2487
+ #
2488
+ # @overload get_metadata_job(request, options = nil)
2489
+ # Pass arguments to `get_metadata_job` via a request object, either of type
2490
+ # {::Google::Cloud::Dataplex::V1::GetMetadataJobRequest} or an equivalent Hash.
2491
+ #
2492
+ # @param request [::Google::Cloud::Dataplex::V1::GetMetadataJobRequest, ::Hash]
2493
+ # A request object representing the call parameters. Required. To specify no
2494
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2495
+ # @param options [::Gapic::CallOptions, ::Hash]
2496
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2497
+ #
2498
+ # @overload get_metadata_job(name: nil)
2499
+ # Pass arguments to `get_metadata_job` via keyword arguments. Note that at
2500
+ # least one keyword argument is required. To specify no parameters, or to keep all
2501
+ # the default parameter values, pass an empty Hash as a request object (see above).
2502
+ #
2503
+ # @param name [::String]
2504
+ # Required. The resource name of the metadata job, in the format
2505
+ # `projects/{project_id_or_number}/locations/{location_id}/metadataJobs/{metadata_job_id}`.
2506
+ # @yield [result, operation] Access the result along with the TransportOperation object
2507
+ # @yieldparam result [::Google::Cloud::Dataplex::V1::MetadataJob]
2508
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2509
+ #
2510
+ # @return [::Google::Cloud::Dataplex::V1::MetadataJob]
2511
+ #
2512
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2513
+ #
2514
+ # @example Basic example
2515
+ # require "google/cloud/dataplex/v1"
2516
+ #
2517
+ # # Create a client object. The client can be reused for multiple calls.
2518
+ # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new
2519
+ #
2520
+ # # Create a request. To set request fields, pass in keyword arguments.
2521
+ # request = Google::Cloud::Dataplex::V1::GetMetadataJobRequest.new
2522
+ #
2523
+ # # Call the get_metadata_job method.
2524
+ # result = client.get_metadata_job request
2525
+ #
2526
+ # # The returned object is of type Google::Cloud::Dataplex::V1::MetadataJob.
2527
+ # p result
2528
+ #
2529
+ def get_metadata_job request, options = nil
2530
+ raise ::ArgumentError, "request must be provided" if request.nil?
2531
+
2532
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetMetadataJobRequest
2533
+
2534
+ # Converts hash and nil to an options object
2535
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2536
+
2537
+ # Customize the options with defaults
2538
+ call_metadata = @config.rpcs.get_metadata_job.metadata.to_h
2539
+
2540
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2541
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2542
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2543
+ gapic_version: ::Google::Cloud::Dataplex::V1::VERSION,
2544
+ transports_version_send: [:rest]
2545
+
2546
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2547
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2548
+
2549
+ options.apply_defaults timeout: @config.rpcs.get_metadata_job.timeout,
2550
+ metadata: call_metadata,
2551
+ retry_policy: @config.rpcs.get_metadata_job.retry_policy
2552
+
2553
+ options.apply_defaults timeout: @config.timeout,
2554
+ metadata: @config.metadata,
2555
+ retry_policy: @config.retry_policy
2556
+
2557
+ @catalog_service_stub.get_metadata_job request, options do |result, operation|
2558
+ yield result, operation if block_given?
2559
+ end
2560
+ rescue ::Gapic::Rest::Error => e
2561
+ raise ::Google::Cloud::Error.from_error(e)
2562
+ end
2563
+
2564
+ ##
2565
+ # Lists metadata jobs.
2566
+ #
2567
+ # @overload list_metadata_jobs(request, options = nil)
2568
+ # Pass arguments to `list_metadata_jobs` via a request object, either of type
2569
+ # {::Google::Cloud::Dataplex::V1::ListMetadataJobsRequest} or an equivalent Hash.
2570
+ #
2571
+ # @param request [::Google::Cloud::Dataplex::V1::ListMetadataJobsRequest, ::Hash]
2572
+ # A request object representing the call parameters. Required. To specify no
2573
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2574
+ # @param options [::Gapic::CallOptions, ::Hash]
2575
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2576
+ #
2577
+ # @overload list_metadata_jobs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
2578
+ # Pass arguments to `list_metadata_jobs` via keyword arguments. Note that at
2579
+ # least one keyword argument is required. To specify no parameters, or to keep all
2580
+ # the default parameter values, pass an empty Hash as a request object (see above).
2581
+ #
2582
+ # @param parent [::String]
2583
+ # Required. The resource name of the parent location, in the format
2584
+ # `projects/{project_id_or_number}/locations/{location_id}`
2585
+ # @param page_size [::Integer]
2586
+ # Optional. The maximum number of metadata jobs to return. The service might
2587
+ # return fewer jobs than this value. If unspecified, at most 10 jobs are
2588
+ # returned. The maximum value is 1,000.
2589
+ # @param page_token [::String]
2590
+ # Optional. The page token received from a previous `ListMetadataJobs` call.
2591
+ # Provide this token to retrieve the subsequent page of results. When
2592
+ # paginating, all other parameters that are provided to the
2593
+ # `ListMetadataJobs` request must match the call that provided the page
2594
+ # token.
2595
+ # @param filter [::String]
2596
+ # Optional. Filter request. Filters are case-sensitive.
2597
+ # The service supports the following formats:
2598
+ #
2599
+ # * `labels.key1 = "value1"`
2600
+ # * `labels:key1`
2601
+ # * `name = "value"`
2602
+ #
2603
+ # You can combine filters with `AND`, `OR`, and `NOT` operators.
2604
+ # @param order_by [::String]
2605
+ # Optional. The field to sort the results by, either `name` or `create_time`.
2606
+ # If not specified, the ordering is undefined.
2607
+ # @yield [result, operation] Access the result along with the TransportOperation object
2608
+ # @yieldparam result [::Google::Cloud::Dataplex::V1::ListMetadataJobsResponse]
2609
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2610
+ #
2611
+ # @return [::Google::Cloud::Dataplex::V1::ListMetadataJobsResponse]
2612
+ #
2613
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2614
+ #
2615
+ # @example Basic example
2616
+ # require "google/cloud/dataplex/v1"
2617
+ #
2618
+ # # Create a client object. The client can be reused for multiple calls.
2619
+ # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new
2620
+ #
2621
+ # # Create a request. To set request fields, pass in keyword arguments.
2622
+ # request = Google::Cloud::Dataplex::V1::ListMetadataJobsRequest.new
2623
+ #
2624
+ # # Call the list_metadata_jobs method.
2625
+ # result = client.list_metadata_jobs request
2626
+ #
2627
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
2628
+ # # over elements, and API calls will be issued to fetch pages as needed.
2629
+ # result.each do |item|
2630
+ # # Each element is of type ::Google::Cloud::Dataplex::V1::MetadataJob.
2631
+ # p item
2632
+ # end
2633
+ #
2634
+ def list_metadata_jobs request, options = nil
2635
+ raise ::ArgumentError, "request must be provided" if request.nil?
2636
+
2637
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListMetadataJobsRequest
2638
+
2639
+ # Converts hash and nil to an options object
2640
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2641
+
2642
+ # Customize the options with defaults
2643
+ call_metadata = @config.rpcs.list_metadata_jobs.metadata.to_h
2644
+
2645
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2646
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2647
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2648
+ gapic_version: ::Google::Cloud::Dataplex::V1::VERSION,
2649
+ transports_version_send: [:rest]
2650
+
2651
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2652
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2653
+
2654
+ options.apply_defaults timeout: @config.rpcs.list_metadata_jobs.timeout,
2655
+ metadata: call_metadata,
2656
+ retry_policy: @config.rpcs.list_metadata_jobs.retry_policy
2657
+
2658
+ options.apply_defaults timeout: @config.timeout,
2659
+ metadata: @config.metadata,
2660
+ retry_policy: @config.retry_policy
2661
+
2662
+ @catalog_service_stub.list_metadata_jobs request, options do |result, operation|
2663
+ yield result, operation if block_given?
2664
+ end
2665
+ rescue ::Gapic::Rest::Error => e
2666
+ raise ::Google::Cloud::Error.from_error(e)
2667
+ end
2668
+
2669
+ ##
2670
+ # Cancels a metadata job.
2671
+ #
2672
+ # If you cancel a metadata import job that is in progress, the changes in the
2673
+ # job might be partially applied. We recommend that you reset the state of
2674
+ # the entry groups in your project by running another metadata job that
2675
+ # reverts the changes from the canceled job.
2676
+ #
2677
+ # @overload cancel_metadata_job(request, options = nil)
2678
+ # Pass arguments to `cancel_metadata_job` via a request object, either of type
2679
+ # {::Google::Cloud::Dataplex::V1::CancelMetadataJobRequest} or an equivalent Hash.
2680
+ #
2681
+ # @param request [::Google::Cloud::Dataplex::V1::CancelMetadataJobRequest, ::Hash]
2682
+ # A request object representing the call parameters. Required. To specify no
2683
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2684
+ # @param options [::Gapic::CallOptions, ::Hash]
2685
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2686
+ #
2687
+ # @overload cancel_metadata_job(name: nil)
2688
+ # Pass arguments to `cancel_metadata_job` via keyword arguments. Note that at
2689
+ # least one keyword argument is required. To specify no parameters, or to keep all
2690
+ # the default parameter values, pass an empty Hash as a request object (see above).
2691
+ #
2692
+ # @param name [::String]
2693
+ # Required. The resource name of the job, in the format
2694
+ # `projects/{project_id_or_number}/locations/{location_id}/metadataJobs/{metadata_job_id}`
2695
+ # @yield [result, operation] Access the result along with the TransportOperation object
2696
+ # @yieldparam result [::Google::Protobuf::Empty]
2697
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2698
+ #
2699
+ # @return [::Google::Protobuf::Empty]
2700
+ #
2701
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2702
+ #
2703
+ # @example Basic example
2704
+ # require "google/cloud/dataplex/v1"
2705
+ #
2706
+ # # Create a client object. The client can be reused for multiple calls.
2707
+ # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new
2708
+ #
2709
+ # # Create a request. To set request fields, pass in keyword arguments.
2710
+ # request = Google::Cloud::Dataplex::V1::CancelMetadataJobRequest.new
2711
+ #
2712
+ # # Call the cancel_metadata_job method.
2713
+ # result = client.cancel_metadata_job request
2714
+ #
2715
+ # # The returned object is of type Google::Protobuf::Empty.
2716
+ # p result
2717
+ #
2718
+ def cancel_metadata_job request, options = nil
2719
+ raise ::ArgumentError, "request must be provided" if request.nil?
2720
+
2721
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CancelMetadataJobRequest
2722
+
2723
+ # Converts hash and nil to an options object
2724
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2725
+
2726
+ # Customize the options with defaults
2727
+ call_metadata = @config.rpcs.cancel_metadata_job.metadata.to_h
2728
+
2729
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2730
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2731
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2732
+ gapic_version: ::Google::Cloud::Dataplex::V1::VERSION,
2733
+ transports_version_send: [:rest]
2734
+
2735
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2736
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2737
+
2738
+ options.apply_defaults timeout: @config.rpcs.cancel_metadata_job.timeout,
2739
+ metadata: call_metadata,
2740
+ retry_policy: @config.rpcs.cancel_metadata_job.retry_policy
2741
+
2742
+ options.apply_defaults timeout: @config.timeout,
2743
+ metadata: @config.metadata,
2744
+ retry_policy: @config.retry_policy
2745
+
2746
+ @catalog_service_stub.cancel_metadata_job request, options do |result, operation|
2747
+ yield result, operation if block_given?
2334
2748
  end
2335
2749
  rescue ::Gapic::Rest::Error => e
2336
2750
  raise ::Google::Cloud::Error.from_error(e)
@@ -2410,6 +2824,11 @@ module Google
2410
2824
  # default endpoint URL. The default value of nil uses the environment
2411
2825
  # universe (usually the default "googleapis.com" universe).
2412
2826
  # @return [::String,nil]
2827
+ # @!attribute [rw] logger
2828
+ # A custom logger to use for request/response debug logging, or the value
2829
+ # `:default` (the default) to construct a default logger, or `nil` to
2830
+ # explicitly disable logging.
2831
+ # @return [::Logger,:default,nil]
2413
2832
  #
2414
2833
  class Configuration
2415
2834
  extend ::Gapic::Config
@@ -2438,6 +2857,7 @@ module Google
2438
2857
  # by the host service.
2439
2858
  # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
2440
2859
  config_attr :bindings_override, {}, ::Hash, nil
2860
+ config_attr :logger, :default, ::Logger, nil, :default
2441
2861
 
2442
2862
  # @private
2443
2863
  def initialize parent_config = nil
@@ -2586,6 +3006,26 @@ module Google
2586
3006
  # @return [::Gapic::Config::Method]
2587
3007
  #
2588
3008
  attr_reader :search_entries
3009
+ ##
3010
+ # RPC-specific configuration for `create_metadata_job`
3011
+ # @return [::Gapic::Config::Method]
3012
+ #
3013
+ attr_reader :create_metadata_job
3014
+ ##
3015
+ # RPC-specific configuration for `get_metadata_job`
3016
+ # @return [::Gapic::Config::Method]
3017
+ #
3018
+ attr_reader :get_metadata_job
3019
+ ##
3020
+ # RPC-specific configuration for `list_metadata_jobs`
3021
+ # @return [::Gapic::Config::Method]
3022
+ #
3023
+ attr_reader :list_metadata_jobs
3024
+ ##
3025
+ # RPC-specific configuration for `cancel_metadata_job`
3026
+ # @return [::Gapic::Config::Method]
3027
+ #
3028
+ attr_reader :cancel_metadata_job
2589
3029
 
2590
3030
  # @private
2591
3031
  def initialize parent_rpcs = nil
@@ -2633,6 +3073,14 @@ module Google
2633
3073
  @lookup_entry = ::Gapic::Config::Method.new lookup_entry_config
2634
3074
  search_entries_config = parent_rpcs.search_entries if parent_rpcs.respond_to? :search_entries
2635
3075
  @search_entries = ::Gapic::Config::Method.new search_entries_config
3076
+ create_metadata_job_config = parent_rpcs.create_metadata_job if parent_rpcs.respond_to? :create_metadata_job
3077
+ @create_metadata_job = ::Gapic::Config::Method.new create_metadata_job_config
3078
+ get_metadata_job_config = parent_rpcs.get_metadata_job if parent_rpcs.respond_to? :get_metadata_job
3079
+ @get_metadata_job = ::Gapic::Config::Method.new get_metadata_job_config
3080
+ list_metadata_jobs_config = parent_rpcs.list_metadata_jobs if parent_rpcs.respond_to? :list_metadata_jobs
3081
+ @list_metadata_jobs = ::Gapic::Config::Method.new list_metadata_jobs_config
3082
+ cancel_metadata_job_config = parent_rpcs.cancel_metadata_job if parent_rpcs.respond_to? :cancel_metadata_job
3083
+ @cancel_metadata_job = ::Gapic::Config::Method.new cancel_metadata_job_config
2636
3084
 
2637
3085
  yield self if block_given?
2638
3086
  end