google-cloud-data_catalog-v1 1.1.0 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +30 -20
- data/lib/google/cloud/data_catalog/v1/data_catalog/client.rb +321 -35
- data/lib/google/cloud/data_catalog/v1/data_catalog/operations.rb +12 -15
- data/lib/google/cloud/data_catalog/v1/data_catalog/rest/client.rb +299 -35
- data/lib/google/cloud/data_catalog/v1/data_catalog/rest/operations.rb +43 -38
- data/lib/google/cloud/data_catalog/v1/data_catalog/rest/service_stub.rb +484 -205
- data/lib/google/cloud/data_catalog/v1/policy_tag_manager/client.rb +30 -14
- data/lib/google/cloud/data_catalog/v1/policy_tag_manager/rest/client.rb +30 -14
- data/lib/google/cloud/data_catalog/v1/policy_tag_manager/rest/service_stub.rb +118 -80
- data/lib/google/cloud/data_catalog/v1/policy_tag_manager_serialization/client.rb +28 -4
- data/lib/google/cloud/data_catalog/v1/policy_tag_manager_serialization/rest/client.rb +28 -4
- data/lib/google/cloud/data_catalog/v1/policy_tag_manager_serialization/rest/service_stub.rb +38 -20
- data/lib/google/cloud/data_catalog/v1/version.rb +1 -1
- data/lib/google/cloud/datacatalog/v1/bigquery_pb.rb +1 -1
- data/lib/google/cloud/datacatalog/v1/common_pb.rb +1 -1
- data/lib/google/cloud/datacatalog/v1/data_source_pb.rb +1 -1
- data/lib/google/cloud/datacatalog/v1/datacatalog_pb.rb +8 -1
- data/lib/google/cloud/datacatalog/v1/datacatalog_services_pb.rb +13 -0
- data/lib/google/cloud/datacatalog/v1/dataplex_spec_pb.rb +1 -1
- data/lib/google/cloud/datacatalog/v1/dump_content_pb.rb +1 -1
- data/lib/google/cloud/datacatalog/v1/gcs_fileset_spec_pb.rb +1 -1
- data/lib/google/cloud/datacatalog/v1/physical_schema_pb.rb +1 -1
- data/lib/google/cloud/datacatalog/v1/policytagmanager_pb.rb +1 -1
- data/lib/google/cloud/datacatalog/v1/policytagmanagerserialization_pb.rb +1 -1
- data/lib/google/cloud/datacatalog/v1/search_pb.rb +1 -1
- data/lib/google/cloud/datacatalog/v1/tags_pb.rb +1 -1
- data/lib/google/cloud/datacatalog/v1/timestamps_pb.rb +1 -1
- data/proto_docs/google/api/client.rb +19 -0
- data/proto_docs/google/cloud/datacatalog/v1/datacatalog.rb +110 -2
- data/proto_docs/google/cloud/datacatalog/v1/tags.rb +7 -0
- data/proto_docs/google/longrunning/operations.rb +19 -14
- metadata +5 -5
@@ -164,14 +164,26 @@ module Google
|
|
164
164
|
endpoint: @config.endpoint,
|
165
165
|
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
166
166
|
universe_domain: @config.universe_domain,
|
167
|
-
credentials: credentials
|
167
|
+
credentials: credentials,
|
168
|
+
logger: @config.logger
|
168
169
|
)
|
169
170
|
|
171
|
+
@data_catalog_stub.logger(stub: true)&.info do |entry|
|
172
|
+
entry.set_system_name
|
173
|
+
entry.set_service
|
174
|
+
entry.message = "Created client for #{entry.service}"
|
175
|
+
entry.set_credentials_fields credentials
|
176
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
177
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
178
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
179
|
+
end
|
180
|
+
|
170
181
|
@iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config|
|
171
182
|
config.credentials = credentials
|
172
183
|
config.quota_project = @quota_project_id
|
173
184
|
config.endpoint = @data_catalog_stub.endpoint
|
174
185
|
config.universe_domain = @data_catalog_stub.universe_domain
|
186
|
+
config.logger = @data_catalog_stub.logger if config.respond_to? :logger=
|
175
187
|
end
|
176
188
|
end
|
177
189
|
|
@@ -189,6 +201,15 @@ module Google
|
|
189
201
|
#
|
190
202
|
attr_reader :iam_policy_client
|
191
203
|
|
204
|
+
##
|
205
|
+
# The logger used for request/response debug logging.
|
206
|
+
#
|
207
|
+
# @return [Logger]
|
208
|
+
#
|
209
|
+
def logger
|
210
|
+
@data_catalog_stub.logger
|
211
|
+
end
|
212
|
+
|
192
213
|
# Service calls
|
193
214
|
|
194
215
|
##
|
@@ -337,7 +358,6 @@ module Google
|
|
337
358
|
|
338
359
|
@data_catalog_stub.search_catalog request, options do |result, operation|
|
339
360
|
yield result, operation if block_given?
|
340
|
-
return result
|
341
361
|
end
|
342
362
|
rescue ::Gapic::Rest::Error => e
|
343
363
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -454,7 +474,6 @@ module Google
|
|
454
474
|
|
455
475
|
@data_catalog_stub.create_entry_group request, options do |result, operation|
|
456
476
|
yield result, operation if block_given?
|
457
|
-
return result
|
458
477
|
end
|
459
478
|
rescue ::Gapic::Rest::Error => e
|
460
479
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -535,7 +554,6 @@ module Google
|
|
535
554
|
|
536
555
|
@data_catalog_stub.get_entry_group request, options do |result, operation|
|
537
556
|
yield result, operation if block_given?
|
538
|
-
return result
|
539
557
|
end
|
540
558
|
rescue ::Gapic::Rest::Error => e
|
541
559
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -625,7 +643,6 @@ module Google
|
|
625
643
|
|
626
644
|
@data_catalog_stub.update_entry_group request, options do |result, operation|
|
627
645
|
yield result, operation if block_given?
|
628
|
-
return result
|
629
646
|
end
|
630
647
|
rescue ::Gapic::Rest::Error => e
|
631
648
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -711,7 +728,6 @@ module Google
|
|
711
728
|
|
712
729
|
@data_catalog_stub.delete_entry_group request, options do |result, operation|
|
713
730
|
yield result, operation if block_given?
|
714
|
-
return result
|
715
731
|
end
|
716
732
|
rescue ::Gapic::Rest::Error => e
|
717
733
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -805,7 +821,7 @@ module Google
|
|
805
821
|
@data_catalog_stub.list_entry_groups request, options do |result, operation|
|
806
822
|
result = ::Gapic::Rest::PagedEnumerable.new @data_catalog_stub, :list_entry_groups, "entry_groups", request, result, options
|
807
823
|
yield result, operation if block_given?
|
808
|
-
|
824
|
+
throw :response, result
|
809
825
|
end
|
810
826
|
rescue ::Gapic::Rest::Error => e
|
811
827
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -905,7 +921,6 @@ module Google
|
|
905
921
|
|
906
922
|
@data_catalog_stub.create_entry request, options do |result, operation|
|
907
923
|
yield result, operation if block_given?
|
908
|
-
return result
|
909
924
|
end
|
910
925
|
rescue ::Gapic::Rest::Error => e
|
911
926
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1019,7 +1034,6 @@ module Google
|
|
1019
1034
|
|
1020
1035
|
@data_catalog_stub.update_entry request, options do |result, operation|
|
1021
1036
|
yield result, operation if block_given?
|
1022
|
-
return result
|
1023
1037
|
end
|
1024
1038
|
rescue ::Gapic::Rest::Error => e
|
1025
1039
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1107,7 +1121,6 @@ module Google
|
|
1107
1121
|
|
1108
1122
|
@data_catalog_stub.delete_entry request, options do |result, operation|
|
1109
1123
|
yield result, operation if block_given?
|
1110
|
-
return result
|
1111
1124
|
end
|
1112
1125
|
rescue ::Gapic::Rest::Error => e
|
1113
1126
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1186,7 +1199,6 @@ module Google
|
|
1186
1199
|
|
1187
1200
|
@data_catalog_stub.get_entry request, options do |result, operation|
|
1188
1201
|
yield result, operation if block_given?
|
1189
|
-
return result
|
1190
1202
|
end
|
1191
1203
|
rescue ::Gapic::Rest::Error => e
|
1192
1204
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1314,7 +1326,6 @@ module Google
|
|
1314
1326
|
|
1315
1327
|
@data_catalog_stub.lookup_entry request, options do |result, operation|
|
1316
1328
|
yield result, operation if block_given?
|
1317
|
-
return result
|
1318
1329
|
end
|
1319
1330
|
rescue ::Gapic::Rest::Error => e
|
1320
1331
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1416,7 +1427,7 @@ module Google
|
|
1416
1427
|
@data_catalog_stub.list_entries request, options do |result, operation|
|
1417
1428
|
result = ::Gapic::Rest::PagedEnumerable.new @data_catalog_stub, :list_entries, "entries", request, result, options
|
1418
1429
|
yield result, operation if block_given?
|
1419
|
-
|
1430
|
+
throw :response, result
|
1420
1431
|
end
|
1421
1432
|
rescue ::Gapic::Rest::Error => e
|
1422
1433
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1501,7 +1512,6 @@ module Google
|
|
1501
1512
|
|
1502
1513
|
@data_catalog_stub.modify_entry_overview request, options do |result, operation|
|
1503
1514
|
yield result, operation if block_given?
|
1504
|
-
return result
|
1505
1515
|
end
|
1506
1516
|
rescue ::Gapic::Rest::Error => e
|
1507
1517
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1586,7 +1596,6 @@ module Google
|
|
1586
1596
|
|
1587
1597
|
@data_catalog_stub.modify_entry_contacts request, options do |result, operation|
|
1588
1598
|
yield result, operation if block_given?
|
1589
|
-
return result
|
1590
1599
|
end
|
1591
1600
|
rescue ::Gapic::Rest::Error => e
|
1592
1601
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1679,7 +1688,6 @@ module Google
|
|
1679
1688
|
|
1680
1689
|
@data_catalog_stub.create_tag_template request, options do |result, operation|
|
1681
1690
|
yield result, operation if block_given?
|
1682
|
-
return result
|
1683
1691
|
end
|
1684
1692
|
rescue ::Gapic::Rest::Error => e
|
1685
1693
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1758,7 +1766,6 @@ module Google
|
|
1758
1766
|
|
1759
1767
|
@data_catalog_stub.get_tag_template request, options do |result, operation|
|
1760
1768
|
yield result, operation if block_given?
|
1761
|
-
return result
|
1762
1769
|
end
|
1763
1770
|
rescue ::Gapic::Rest::Error => e
|
1764
1771
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1855,7 +1862,6 @@ module Google
|
|
1855
1862
|
|
1856
1863
|
@data_catalog_stub.update_tag_template request, options do |result, operation|
|
1857
1864
|
yield result, operation if block_given?
|
1858
|
-
return result
|
1859
1865
|
end
|
1860
1866
|
rescue ::Gapic::Rest::Error => e
|
1861
1867
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1942,7 +1948,6 @@ module Google
|
|
1942
1948
|
|
1943
1949
|
@data_catalog_stub.delete_tag_template request, options do |result, operation|
|
1944
1950
|
yield result, operation if block_given?
|
1945
|
-
return result
|
1946
1951
|
end
|
1947
1952
|
rescue ::Gapic::Rest::Error => e
|
1948
1953
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2037,7 +2042,6 @@ module Google
|
|
2037
2042
|
|
2038
2043
|
@data_catalog_stub.create_tag_template_field request, options do |result, operation|
|
2039
2044
|
yield result, operation if block_given?
|
2040
|
-
return result
|
2041
2045
|
end
|
2042
2046
|
rescue ::Gapic::Rest::Error => e
|
2043
2047
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2142,7 +2146,6 @@ module Google
|
|
2142
2146
|
|
2143
2147
|
@data_catalog_stub.update_tag_template_field request, options do |result, operation|
|
2144
2148
|
yield result, operation if block_given?
|
2145
|
-
return result
|
2146
2149
|
end
|
2147
2150
|
rescue ::Gapic::Rest::Error => e
|
2148
2151
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2228,7 +2231,6 @@ module Google
|
|
2228
2231
|
|
2229
2232
|
@data_catalog_stub.rename_tag_template_field request, options do |result, operation|
|
2230
2233
|
yield result, operation if block_given?
|
2231
|
-
return result
|
2232
2234
|
end
|
2233
2235
|
rescue ::Gapic::Rest::Error => e
|
2234
2236
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2312,7 +2314,6 @@ module Google
|
|
2312
2314
|
|
2313
2315
|
@data_catalog_stub.rename_tag_template_field_enum_value request, options do |result, operation|
|
2314
2316
|
yield result, operation if block_given?
|
2315
|
-
return result
|
2316
2317
|
end
|
2317
2318
|
rescue ::Gapic::Rest::Error => e
|
2318
2319
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2400,7 +2401,6 @@ module Google
|
|
2400
2401
|
|
2401
2402
|
@data_catalog_stub.delete_tag_template_field request, options do |result, operation|
|
2402
2403
|
yield result, operation if block_given?
|
2403
|
-
return result
|
2404
2404
|
end
|
2405
2405
|
rescue ::Gapic::Rest::Error => e
|
2406
2406
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2498,7 +2498,6 @@ module Google
|
|
2498
2498
|
|
2499
2499
|
@data_catalog_stub.create_tag request, options do |result, operation|
|
2500
2500
|
yield result, operation if block_given?
|
2501
|
-
return result
|
2502
2501
|
end
|
2503
2502
|
rescue ::Gapic::Rest::Error => e
|
2504
2503
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2584,7 +2583,6 @@ module Google
|
|
2584
2583
|
|
2585
2584
|
@data_catalog_stub.update_tag request, options do |result, operation|
|
2586
2585
|
yield result, operation if block_given?
|
2587
|
-
return result
|
2588
2586
|
end
|
2589
2587
|
rescue ::Gapic::Rest::Error => e
|
2590
2588
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2663,7 +2661,6 @@ module Google
|
|
2663
2661
|
|
2664
2662
|
@data_catalog_stub.delete_tag request, options do |result, operation|
|
2665
2663
|
yield result, operation if block_given?
|
2666
|
-
return result
|
2667
2664
|
end
|
2668
2665
|
rescue ::Gapic::Rest::Error => e
|
2669
2666
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2758,7 +2755,7 @@ module Google
|
|
2758
2755
|
@data_catalog_stub.list_tags request, options do |result, operation|
|
2759
2756
|
result = ::Gapic::Rest::PagedEnumerable.new @data_catalog_stub, :list_tags, "tags", request, result, options
|
2760
2757
|
yield result, operation if block_given?
|
2761
|
-
|
2758
|
+
throw :response, result
|
2762
2759
|
end
|
2763
2760
|
rescue ::Gapic::Rest::Error => e
|
2764
2761
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2868,7 +2865,7 @@ module Google
|
|
2868
2865
|
@data_catalog_stub.reconcile_tags request, options do |result, operation|
|
2869
2866
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
2870
2867
|
yield result, operation if block_given?
|
2871
|
-
|
2868
|
+
throw :response, result
|
2872
2869
|
end
|
2873
2870
|
rescue ::Gapic::Rest::Error => e
|
2874
2871
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2948,7 +2945,6 @@ module Google
|
|
2948
2945
|
|
2949
2946
|
@data_catalog_stub.star_entry request, options do |result, operation|
|
2950
2947
|
yield result, operation if block_given?
|
2951
|
-
return result
|
2952
2948
|
end
|
2953
2949
|
rescue ::Gapic::Rest::Error => e
|
2954
2950
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3028,7 +3024,6 @@ module Google
|
|
3028
3024
|
|
3029
3025
|
@data_catalog_stub.unstar_entry request, options do |result, operation|
|
3030
3026
|
yield result, operation if block_given?
|
3031
|
-
return result
|
3032
3027
|
end
|
3033
3028
|
rescue ::Gapic::Rest::Error => e
|
3034
3029
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3135,7 +3130,6 @@ module Google
|
|
3135
3130
|
|
3136
3131
|
@data_catalog_stub.set_iam_policy request, options do |result, operation|
|
3137
3132
|
yield result, operation if block_given?
|
3138
|
-
return result
|
3139
3133
|
end
|
3140
3134
|
rescue ::Gapic::Rest::Error => e
|
3141
3135
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3238,7 +3232,6 @@ module Google
|
|
3238
3232
|
|
3239
3233
|
@data_catalog_stub.get_iam_policy request, options do |result, operation|
|
3240
3234
|
yield result, operation if block_given?
|
3241
|
-
return result
|
3242
3235
|
end
|
3243
3236
|
rescue ::Gapic::Rest::Error => e
|
3244
3237
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3336,7 +3329,6 @@ module Google
|
|
3336
3329
|
|
3337
3330
|
@data_catalog_stub.test_iam_permissions request, options do |result, operation|
|
3338
3331
|
yield result, operation if block_given?
|
3339
|
-
return result
|
3340
3332
|
end
|
3341
3333
|
rescue ::Gapic::Rest::Error => e
|
3342
3334
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3445,7 +3437,252 @@ module Google
|
|
3445
3437
|
@data_catalog_stub.import_entries request, options do |result, operation|
|
3446
3438
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
3447
3439
|
yield result, operation if block_given?
|
3448
|
-
|
3440
|
+
throw :response, result
|
3441
|
+
end
|
3442
|
+
rescue ::Gapic::Rest::Error => e
|
3443
|
+
raise ::Google::Cloud::Error.from_error(e)
|
3444
|
+
end
|
3445
|
+
|
3446
|
+
##
|
3447
|
+
# Sets the configuration related to the migration to Dataplex for an
|
3448
|
+
# organization or project.
|
3449
|
+
#
|
3450
|
+
# @overload set_config(request, options = nil)
|
3451
|
+
# Pass arguments to `set_config` via a request object, either of type
|
3452
|
+
# {::Google::Cloud::DataCatalog::V1::SetConfigRequest} or an equivalent Hash.
|
3453
|
+
#
|
3454
|
+
# @param request [::Google::Cloud::DataCatalog::V1::SetConfigRequest, ::Hash]
|
3455
|
+
# A request object representing the call parameters. Required. To specify no
|
3456
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
3457
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
3458
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
3459
|
+
#
|
3460
|
+
# @overload set_config(name: nil, tag_template_migration: nil, catalog_ui_experience: nil)
|
3461
|
+
# Pass arguments to `set_config` via keyword arguments. Note that at
|
3462
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
3463
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
3464
|
+
#
|
3465
|
+
# @param name [::String]
|
3466
|
+
# Required. The organization or project whose config is being specified.
|
3467
|
+
# @param tag_template_migration [::Google::Cloud::DataCatalog::V1::TagTemplateMigration]
|
3468
|
+
# Opt-in status for the migration of Tag Templates to Dataplex.
|
3469
|
+
# @param catalog_ui_experience [::Google::Cloud::DataCatalog::V1::CatalogUIExperience]
|
3470
|
+
# Opt-in status for the UI switch to Dataplex.
|
3471
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
3472
|
+
# @yieldparam result [::Google::Cloud::DataCatalog::V1::MigrationConfig]
|
3473
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
3474
|
+
#
|
3475
|
+
# @return [::Google::Cloud::DataCatalog::V1::MigrationConfig]
|
3476
|
+
#
|
3477
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
3478
|
+
#
|
3479
|
+
# @example Basic example
|
3480
|
+
# require "google/cloud/data_catalog/v1"
|
3481
|
+
#
|
3482
|
+
# # Create a client object. The client can be reused for multiple calls.
|
3483
|
+
# client = Google::Cloud::DataCatalog::V1::DataCatalog::Rest::Client.new
|
3484
|
+
#
|
3485
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
3486
|
+
# request = Google::Cloud::DataCatalog::V1::SetConfigRequest.new
|
3487
|
+
#
|
3488
|
+
# # Call the set_config method.
|
3489
|
+
# result = client.set_config request
|
3490
|
+
#
|
3491
|
+
# # The returned object is of type Google::Cloud::DataCatalog::V1::MigrationConfig.
|
3492
|
+
# p result
|
3493
|
+
#
|
3494
|
+
def set_config request, options = nil
|
3495
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
3496
|
+
|
3497
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataCatalog::V1::SetConfigRequest
|
3498
|
+
|
3499
|
+
# Converts hash and nil to an options object
|
3500
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
3501
|
+
|
3502
|
+
# Customize the options with defaults
|
3503
|
+
call_metadata = @config.rpcs.set_config.metadata.to_h
|
3504
|
+
|
3505
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
3506
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
3507
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
3508
|
+
gapic_version: ::Google::Cloud::DataCatalog::V1::VERSION,
|
3509
|
+
transports_version_send: [:rest]
|
3510
|
+
|
3511
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
3512
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3513
|
+
|
3514
|
+
options.apply_defaults timeout: @config.rpcs.set_config.timeout,
|
3515
|
+
metadata: call_metadata,
|
3516
|
+
retry_policy: @config.rpcs.set_config.retry_policy
|
3517
|
+
|
3518
|
+
options.apply_defaults timeout: @config.timeout,
|
3519
|
+
metadata: @config.metadata,
|
3520
|
+
retry_policy: @config.retry_policy
|
3521
|
+
|
3522
|
+
@data_catalog_stub.set_config request, options do |result, operation|
|
3523
|
+
yield result, operation if block_given?
|
3524
|
+
end
|
3525
|
+
rescue ::Gapic::Rest::Error => e
|
3526
|
+
raise ::Google::Cloud::Error.from_error(e)
|
3527
|
+
end
|
3528
|
+
|
3529
|
+
##
|
3530
|
+
# Retrieves the configuration related to the migration from Data Catalog to
|
3531
|
+
# Dataplex for a specific organization, including all the projects under it
|
3532
|
+
# which have a separate configuration set.
|
3533
|
+
#
|
3534
|
+
# @overload retrieve_config(request, options = nil)
|
3535
|
+
# Pass arguments to `retrieve_config` via a request object, either of type
|
3536
|
+
# {::Google::Cloud::DataCatalog::V1::RetrieveConfigRequest} or an equivalent Hash.
|
3537
|
+
#
|
3538
|
+
# @param request [::Google::Cloud::DataCatalog::V1::RetrieveConfigRequest, ::Hash]
|
3539
|
+
# A request object representing the call parameters. Required. To specify no
|
3540
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
3541
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
3542
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
3543
|
+
#
|
3544
|
+
# @overload retrieve_config(name: nil)
|
3545
|
+
# Pass arguments to `retrieve_config` via keyword arguments. Note that at
|
3546
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
3547
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
3548
|
+
#
|
3549
|
+
# @param name [::String]
|
3550
|
+
# Required. The organization whose config is being retrieved.
|
3551
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
3552
|
+
# @yieldparam result [::Google::Cloud::DataCatalog::V1::OrganizationConfig]
|
3553
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
3554
|
+
#
|
3555
|
+
# @return [::Google::Cloud::DataCatalog::V1::OrganizationConfig]
|
3556
|
+
#
|
3557
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
3558
|
+
#
|
3559
|
+
# @example Basic example
|
3560
|
+
# require "google/cloud/data_catalog/v1"
|
3561
|
+
#
|
3562
|
+
# # Create a client object. The client can be reused for multiple calls.
|
3563
|
+
# client = Google::Cloud::DataCatalog::V1::DataCatalog::Rest::Client.new
|
3564
|
+
#
|
3565
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
3566
|
+
# request = Google::Cloud::DataCatalog::V1::RetrieveConfigRequest.new
|
3567
|
+
#
|
3568
|
+
# # Call the retrieve_config method.
|
3569
|
+
# result = client.retrieve_config request
|
3570
|
+
#
|
3571
|
+
# # The returned object is of type Google::Cloud::DataCatalog::V1::OrganizationConfig.
|
3572
|
+
# p result
|
3573
|
+
#
|
3574
|
+
def retrieve_config request, options = nil
|
3575
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
3576
|
+
|
3577
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataCatalog::V1::RetrieveConfigRequest
|
3578
|
+
|
3579
|
+
# Converts hash and nil to an options object
|
3580
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
3581
|
+
|
3582
|
+
# Customize the options with defaults
|
3583
|
+
call_metadata = @config.rpcs.retrieve_config.metadata.to_h
|
3584
|
+
|
3585
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
3586
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
3587
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
3588
|
+
gapic_version: ::Google::Cloud::DataCatalog::V1::VERSION,
|
3589
|
+
transports_version_send: [:rest]
|
3590
|
+
|
3591
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
3592
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3593
|
+
|
3594
|
+
options.apply_defaults timeout: @config.rpcs.retrieve_config.timeout,
|
3595
|
+
metadata: call_metadata,
|
3596
|
+
retry_policy: @config.rpcs.retrieve_config.retry_policy
|
3597
|
+
|
3598
|
+
options.apply_defaults timeout: @config.timeout,
|
3599
|
+
metadata: @config.metadata,
|
3600
|
+
retry_policy: @config.retry_policy
|
3601
|
+
|
3602
|
+
@data_catalog_stub.retrieve_config request, options do |result, operation|
|
3603
|
+
yield result, operation if block_given?
|
3604
|
+
end
|
3605
|
+
rescue ::Gapic::Rest::Error => e
|
3606
|
+
raise ::Google::Cloud::Error.from_error(e)
|
3607
|
+
end
|
3608
|
+
|
3609
|
+
##
|
3610
|
+
# Retrieves the effective configuration related to the migration from Data
|
3611
|
+
# Catalog to Dataplex for a specific organization or project. If there is no
|
3612
|
+
# specific configuration set for the resource, the setting is checked
|
3613
|
+
# hierarchicahlly through the ancestors of the resource, starting from the
|
3614
|
+
# resource itself.
|
3615
|
+
#
|
3616
|
+
# @overload retrieve_effective_config(request, options = nil)
|
3617
|
+
# Pass arguments to `retrieve_effective_config` via a request object, either of type
|
3618
|
+
# {::Google::Cloud::DataCatalog::V1::RetrieveEffectiveConfigRequest} or an equivalent Hash.
|
3619
|
+
#
|
3620
|
+
# @param request [::Google::Cloud::DataCatalog::V1::RetrieveEffectiveConfigRequest, ::Hash]
|
3621
|
+
# A request object representing the call parameters. Required. To specify no
|
3622
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
3623
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
3624
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
3625
|
+
#
|
3626
|
+
# @overload retrieve_effective_config(name: nil)
|
3627
|
+
# Pass arguments to `retrieve_effective_config` via keyword arguments. Note that at
|
3628
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
3629
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
3630
|
+
#
|
3631
|
+
# @param name [::String]
|
3632
|
+
# Required. The resource whose effective config is being retrieved.
|
3633
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
3634
|
+
# @yieldparam result [::Google::Cloud::DataCatalog::V1::MigrationConfig]
|
3635
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
3636
|
+
#
|
3637
|
+
# @return [::Google::Cloud::DataCatalog::V1::MigrationConfig]
|
3638
|
+
#
|
3639
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
3640
|
+
#
|
3641
|
+
# @example Basic example
|
3642
|
+
# require "google/cloud/data_catalog/v1"
|
3643
|
+
#
|
3644
|
+
# # Create a client object. The client can be reused for multiple calls.
|
3645
|
+
# client = Google::Cloud::DataCatalog::V1::DataCatalog::Rest::Client.new
|
3646
|
+
#
|
3647
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
3648
|
+
# request = Google::Cloud::DataCatalog::V1::RetrieveEffectiveConfigRequest.new
|
3649
|
+
#
|
3650
|
+
# # Call the retrieve_effective_config method.
|
3651
|
+
# result = client.retrieve_effective_config request
|
3652
|
+
#
|
3653
|
+
# # The returned object is of type Google::Cloud::DataCatalog::V1::MigrationConfig.
|
3654
|
+
# p result
|
3655
|
+
#
|
3656
|
+
def retrieve_effective_config request, options = nil
|
3657
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
3658
|
+
|
3659
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataCatalog::V1::RetrieveEffectiveConfigRequest
|
3660
|
+
|
3661
|
+
# Converts hash and nil to an options object
|
3662
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
3663
|
+
|
3664
|
+
# Customize the options with defaults
|
3665
|
+
call_metadata = @config.rpcs.retrieve_effective_config.metadata.to_h
|
3666
|
+
|
3667
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
3668
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
3669
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
3670
|
+
gapic_version: ::Google::Cloud::DataCatalog::V1::VERSION,
|
3671
|
+
transports_version_send: [:rest]
|
3672
|
+
|
3673
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
3674
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3675
|
+
|
3676
|
+
options.apply_defaults timeout: @config.rpcs.retrieve_effective_config.timeout,
|
3677
|
+
metadata: call_metadata,
|
3678
|
+
retry_policy: @config.rpcs.retrieve_effective_config.retry_policy
|
3679
|
+
|
3680
|
+
options.apply_defaults timeout: @config.timeout,
|
3681
|
+
metadata: @config.metadata,
|
3682
|
+
retry_policy: @config.retry_policy
|
3683
|
+
|
3684
|
+
@data_catalog_stub.retrieve_effective_config request, options do |result, operation|
|
3685
|
+
yield result, operation if block_given?
|
3449
3686
|
end
|
3450
3687
|
rescue ::Gapic::Rest::Error => e
|
3451
3688
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3525,6 +3762,11 @@ module Google
|
|
3525
3762
|
# default endpoint URL. The default value of nil uses the environment
|
3526
3763
|
# universe (usually the default "googleapis.com" universe).
|
3527
3764
|
# @return [::String,nil]
|
3765
|
+
# @!attribute [rw] logger
|
3766
|
+
# A custom logger to use for request/response debug logging, or the value
|
3767
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
3768
|
+
# explicitly disable logging.
|
3769
|
+
# @return [::Logger,:default,nil]
|
3528
3770
|
#
|
3529
3771
|
class Configuration
|
3530
3772
|
extend ::Gapic::Config
|
@@ -3546,6 +3788,7 @@ module Google
|
|
3546
3788
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
3547
3789
|
config_attr :quota_project, nil, ::String, nil
|
3548
3790
|
config_attr :universe_domain, nil, ::String, nil
|
3791
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
3549
3792
|
|
3550
3793
|
# @private
|
3551
3794
|
def initialize parent_config = nil
|
@@ -3754,6 +3997,21 @@ module Google
|
|
3754
3997
|
# @return [::Gapic::Config::Method]
|
3755
3998
|
#
|
3756
3999
|
attr_reader :import_entries
|
4000
|
+
##
|
4001
|
+
# RPC-specific configuration for `set_config`
|
4002
|
+
# @return [::Gapic::Config::Method]
|
4003
|
+
#
|
4004
|
+
attr_reader :set_config
|
4005
|
+
##
|
4006
|
+
# RPC-specific configuration for `retrieve_config`
|
4007
|
+
# @return [::Gapic::Config::Method]
|
4008
|
+
#
|
4009
|
+
attr_reader :retrieve_config
|
4010
|
+
##
|
4011
|
+
# RPC-specific configuration for `retrieve_effective_config`
|
4012
|
+
# @return [::Gapic::Config::Method]
|
4013
|
+
#
|
4014
|
+
attr_reader :retrieve_effective_config
|
3757
4015
|
|
3758
4016
|
# @private
|
3759
4017
|
def initialize parent_rpcs = nil
|
@@ -3825,6 +4083,12 @@ module Google
|
|
3825
4083
|
@test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config
|
3826
4084
|
import_entries_config = parent_rpcs.import_entries if parent_rpcs.respond_to? :import_entries
|
3827
4085
|
@import_entries = ::Gapic::Config::Method.new import_entries_config
|
4086
|
+
set_config_config = parent_rpcs.set_config if parent_rpcs.respond_to? :set_config
|
4087
|
+
@set_config = ::Gapic::Config::Method.new set_config_config
|
4088
|
+
retrieve_config_config = parent_rpcs.retrieve_config if parent_rpcs.respond_to? :retrieve_config
|
4089
|
+
@retrieve_config = ::Gapic::Config::Method.new retrieve_config_config
|
4090
|
+
retrieve_effective_config_config = parent_rpcs.retrieve_effective_config if parent_rpcs.respond_to? :retrieve_effective_config
|
4091
|
+
@retrieve_effective_config = ::Gapic::Config::Method.new retrieve_effective_config_config
|
3828
4092
|
|
3829
4093
|
yield self if block_given?
|
3830
4094
|
end
|