google-cloud-data_catalog-v1 1.1.0 → 1.3.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 (33) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +30 -20
  3. data/lib/google/cloud/data_catalog/v1/data_catalog/client.rb +321 -35
  4. data/lib/google/cloud/data_catalog/v1/data_catalog/operations.rb +12 -15
  5. data/lib/google/cloud/data_catalog/v1/data_catalog/rest/client.rb +299 -35
  6. data/lib/google/cloud/data_catalog/v1/data_catalog/rest/operations.rb +43 -38
  7. data/lib/google/cloud/data_catalog/v1/data_catalog/rest/service_stub.rb +484 -205
  8. data/lib/google/cloud/data_catalog/v1/policy_tag_manager/client.rb +30 -14
  9. data/lib/google/cloud/data_catalog/v1/policy_tag_manager/rest/client.rb +30 -14
  10. data/lib/google/cloud/data_catalog/v1/policy_tag_manager/rest/service_stub.rb +118 -80
  11. data/lib/google/cloud/data_catalog/v1/policy_tag_manager_serialization/client.rb +28 -4
  12. data/lib/google/cloud/data_catalog/v1/policy_tag_manager_serialization/rest/client.rb +28 -4
  13. data/lib/google/cloud/data_catalog/v1/policy_tag_manager_serialization/rest/service_stub.rb +38 -20
  14. data/lib/google/cloud/data_catalog/v1/version.rb +1 -1
  15. data/lib/google/cloud/datacatalog/v1/bigquery_pb.rb +1 -1
  16. data/lib/google/cloud/datacatalog/v1/common_pb.rb +1 -1
  17. data/lib/google/cloud/datacatalog/v1/data_source_pb.rb +1 -1
  18. data/lib/google/cloud/datacatalog/v1/datacatalog_pb.rb +8 -1
  19. data/lib/google/cloud/datacatalog/v1/datacatalog_services_pb.rb +13 -0
  20. data/lib/google/cloud/datacatalog/v1/dataplex_spec_pb.rb +1 -1
  21. data/lib/google/cloud/datacatalog/v1/dump_content_pb.rb +1 -1
  22. data/lib/google/cloud/datacatalog/v1/gcs_fileset_spec_pb.rb +1 -1
  23. data/lib/google/cloud/datacatalog/v1/physical_schema_pb.rb +1 -1
  24. data/lib/google/cloud/datacatalog/v1/policytagmanager_pb.rb +1 -1
  25. data/lib/google/cloud/datacatalog/v1/policytagmanagerserialization_pb.rb +1 -1
  26. data/lib/google/cloud/datacatalog/v1/search_pb.rb +1 -1
  27. data/lib/google/cloud/datacatalog/v1/tags_pb.rb +1 -1
  28. data/lib/google/cloud/datacatalog/v1/timestamps_pb.rb +1 -1
  29. data/proto_docs/google/api/client.rb +19 -0
  30. data/proto_docs/google/cloud/datacatalog/v1/datacatalog.rb +110 -2
  31. data/proto_docs/google/cloud/datacatalog/v1/tags.rb +7 -0
  32. data/proto_docs/google/longrunning/operations.rb +19 -14
  33. metadata +5 -5
@@ -171,14 +171,26 @@ module Google
171
171
  universe_domain: @config.universe_domain,
172
172
  channel_args: @config.channel_args,
173
173
  interceptors: @config.interceptors,
174
- channel_pool_config: @config.channel_pool
174
+ channel_pool_config: @config.channel_pool,
175
+ logger: @config.logger
175
176
  )
176
177
 
178
+ @data_catalog_stub.stub_logger&.info do |entry|
179
+ entry.set_system_name
180
+ entry.set_service
181
+ entry.message = "Created client for #{entry.service}"
182
+ entry.set_credentials_fields credentials
183
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
184
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
185
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
186
+ end
187
+
177
188
  @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config|
178
189
  config.credentials = credentials
179
190
  config.quota_project = @quota_project_id
180
191
  config.endpoint = @data_catalog_stub.endpoint
181
192
  config.universe_domain = @data_catalog_stub.universe_domain
193
+ config.logger = @data_catalog_stub.logger if config.respond_to? :logger=
182
194
  end
183
195
  end
184
196
 
@@ -196,6 +208,15 @@ module Google
196
208
  #
197
209
  attr_reader :iam_policy_client
198
210
 
211
+ ##
212
+ # The logger used for request/response debug logging.
213
+ #
214
+ # @return [Logger]
215
+ #
216
+ def logger
217
+ @data_catalog_stub.logger
218
+ end
219
+
199
220
  # Service calls
200
221
 
201
222
  ##
@@ -344,7 +365,7 @@ module Google
344
365
  @data_catalog_stub.call_rpc :search_catalog, request, options: options do |response, operation|
345
366
  response = ::Gapic::PagedEnumerable.new @data_catalog_stub, :search_catalog, request, response, operation, options
346
367
  yield response, operation if block_given?
347
- return response
368
+ throw :response, response
348
369
  end
349
370
  rescue ::GRPC::BadStatus => e
350
371
  raise ::Google::Cloud::Error.from_error(e)
@@ -468,7 +489,6 @@ module Google
468
489
 
469
490
  @data_catalog_stub.call_rpc :create_entry_group, request, options: options do |response, operation|
470
491
  yield response, operation if block_given?
471
- return response
472
492
  end
473
493
  rescue ::GRPC::BadStatus => e
474
494
  raise ::Google::Cloud::Error.from_error(e)
@@ -556,7 +576,6 @@ module Google
556
576
 
557
577
  @data_catalog_stub.call_rpc :get_entry_group, request, options: options do |response, operation|
558
578
  yield response, operation if block_given?
559
- return response
560
579
  end
561
580
  rescue ::GRPC::BadStatus => e
562
581
  raise ::Google::Cloud::Error.from_error(e)
@@ -653,7 +672,6 @@ module Google
653
672
 
654
673
  @data_catalog_stub.call_rpc :update_entry_group, request, options: options do |response, operation|
655
674
  yield response, operation if block_given?
656
- return response
657
675
  end
658
676
  rescue ::GRPC::BadStatus => e
659
677
  raise ::Google::Cloud::Error.from_error(e)
@@ -746,7 +764,6 @@ module Google
746
764
 
747
765
  @data_catalog_stub.call_rpc :delete_entry_group, request, options: options do |response, operation|
748
766
  yield response, operation if block_given?
749
- return response
750
767
  end
751
768
  rescue ::GRPC::BadStatus => e
752
769
  raise ::Google::Cloud::Error.from_error(e)
@@ -847,7 +864,7 @@ module Google
847
864
  @data_catalog_stub.call_rpc :list_entry_groups, request, options: options do |response, operation|
848
865
  response = ::Gapic::PagedEnumerable.new @data_catalog_stub, :list_entry_groups, request, response, operation, options
849
866
  yield response, operation if block_given?
850
- return response
867
+ throw :response, response
851
868
  end
852
869
  rescue ::GRPC::BadStatus => e
853
870
  raise ::Google::Cloud::Error.from_error(e)
@@ -954,7 +971,6 @@ module Google
954
971
 
955
972
  @data_catalog_stub.call_rpc :create_entry, request, options: options do |response, operation|
956
973
  yield response, operation if block_given?
957
- return response
958
974
  end
959
975
  rescue ::GRPC::BadStatus => e
960
976
  raise ::Google::Cloud::Error.from_error(e)
@@ -1075,7 +1091,6 @@ module Google
1075
1091
 
1076
1092
  @data_catalog_stub.call_rpc :update_entry, request, options: options do |response, operation|
1077
1093
  yield response, operation if block_given?
1078
- return response
1079
1094
  end
1080
1095
  rescue ::GRPC::BadStatus => e
1081
1096
  raise ::Google::Cloud::Error.from_error(e)
@@ -1170,7 +1185,6 @@ module Google
1170
1185
 
1171
1186
  @data_catalog_stub.call_rpc :delete_entry, request, options: options do |response, operation|
1172
1187
  yield response, operation if block_given?
1173
- return response
1174
1188
  end
1175
1189
  rescue ::GRPC::BadStatus => e
1176
1190
  raise ::Google::Cloud::Error.from_error(e)
@@ -1256,7 +1270,6 @@ module Google
1256
1270
 
1257
1271
  @data_catalog_stub.call_rpc :get_entry, request, options: options do |response, operation|
1258
1272
  yield response, operation if block_given?
1259
- return response
1260
1273
  end
1261
1274
  rescue ::GRPC::BadStatus => e
1262
1275
  raise ::Google::Cloud::Error.from_error(e)
@@ -1383,7 +1396,6 @@ module Google
1383
1396
 
1384
1397
  @data_catalog_stub.call_rpc :lookup_entry, request, options: options do |response, operation|
1385
1398
  yield response, operation if block_given?
1386
- return response
1387
1399
  end
1388
1400
  rescue ::GRPC::BadStatus => e
1389
1401
  raise ::Google::Cloud::Error.from_error(e)
@@ -1492,7 +1504,7 @@ module Google
1492
1504
  @data_catalog_stub.call_rpc :list_entries, request, options: options do |response, operation|
1493
1505
  response = ::Gapic::PagedEnumerable.new @data_catalog_stub, :list_entries, request, response, operation, options
1494
1506
  yield response, operation if block_given?
1495
- return response
1507
+ throw :response, response
1496
1508
  end
1497
1509
  rescue ::GRPC::BadStatus => e
1498
1510
  raise ::Google::Cloud::Error.from_error(e)
@@ -1584,7 +1596,6 @@ module Google
1584
1596
 
1585
1597
  @data_catalog_stub.call_rpc :modify_entry_overview, request, options: options do |response, operation|
1586
1598
  yield response, operation if block_given?
1587
- return response
1588
1599
  end
1589
1600
  rescue ::GRPC::BadStatus => e
1590
1601
  raise ::Google::Cloud::Error.from_error(e)
@@ -1676,7 +1687,6 @@ module Google
1676
1687
 
1677
1688
  @data_catalog_stub.call_rpc :modify_entry_contacts, request, options: options do |response, operation|
1678
1689
  yield response, operation if block_given?
1679
- return response
1680
1690
  end
1681
1691
  rescue ::GRPC::BadStatus => e
1682
1692
  raise ::Google::Cloud::Error.from_error(e)
@@ -1776,7 +1786,6 @@ module Google
1776
1786
 
1777
1787
  @data_catalog_stub.call_rpc :create_tag_template, request, options: options do |response, operation|
1778
1788
  yield response, operation if block_given?
1779
- return response
1780
1789
  end
1781
1790
  rescue ::GRPC::BadStatus => e
1782
1791
  raise ::Google::Cloud::Error.from_error(e)
@@ -1862,7 +1871,6 @@ module Google
1862
1871
 
1863
1872
  @data_catalog_stub.call_rpc :get_tag_template, request, options: options do |response, operation|
1864
1873
  yield response, operation if block_given?
1865
- return response
1866
1874
  end
1867
1875
  rescue ::GRPC::BadStatus => e
1868
1876
  raise ::Google::Cloud::Error.from_error(e)
@@ -1966,7 +1974,6 @@ module Google
1966
1974
 
1967
1975
  @data_catalog_stub.call_rpc :update_tag_template, request, options: options do |response, operation|
1968
1976
  yield response, operation if block_given?
1969
- return response
1970
1977
  end
1971
1978
  rescue ::GRPC::BadStatus => e
1972
1979
  raise ::Google::Cloud::Error.from_error(e)
@@ -2060,7 +2067,6 @@ module Google
2060
2067
 
2061
2068
  @data_catalog_stub.call_rpc :delete_tag_template, request, options: options do |response, operation|
2062
2069
  yield response, operation if block_given?
2063
- return response
2064
2070
  end
2065
2071
  rescue ::GRPC::BadStatus => e
2066
2072
  raise ::Google::Cloud::Error.from_error(e)
@@ -2162,7 +2168,6 @@ module Google
2162
2168
 
2163
2169
  @data_catalog_stub.call_rpc :create_tag_template_field, request, options: options do |response, operation|
2164
2170
  yield response, operation if block_given?
2165
- return response
2166
2171
  end
2167
2172
  rescue ::GRPC::BadStatus => e
2168
2173
  raise ::Google::Cloud::Error.from_error(e)
@@ -2274,7 +2279,6 @@ module Google
2274
2279
 
2275
2280
  @data_catalog_stub.call_rpc :update_tag_template_field, request, options: options do |response, operation|
2276
2281
  yield response, operation if block_given?
2277
- return response
2278
2282
  end
2279
2283
  rescue ::GRPC::BadStatus => e
2280
2284
  raise ::Google::Cloud::Error.from_error(e)
@@ -2367,7 +2371,6 @@ module Google
2367
2371
 
2368
2372
  @data_catalog_stub.call_rpc :rename_tag_template_field, request, options: options do |response, operation|
2369
2373
  yield response, operation if block_given?
2370
- return response
2371
2374
  end
2372
2375
  rescue ::GRPC::BadStatus => e
2373
2376
  raise ::Google::Cloud::Error.from_error(e)
@@ -2458,7 +2461,6 @@ module Google
2458
2461
 
2459
2462
  @data_catalog_stub.call_rpc :rename_tag_template_field_enum_value, request, options: options do |response, operation|
2460
2463
  yield response, operation if block_given?
2461
- return response
2462
2464
  end
2463
2465
  rescue ::GRPC::BadStatus => e
2464
2466
  raise ::Google::Cloud::Error.from_error(e)
@@ -2553,7 +2555,6 @@ module Google
2553
2555
 
2554
2556
  @data_catalog_stub.call_rpc :delete_tag_template_field, request, options: options do |response, operation|
2555
2557
  yield response, operation if block_given?
2556
- return response
2557
2558
  end
2558
2559
  rescue ::GRPC::BadStatus => e
2559
2560
  raise ::Google::Cloud::Error.from_error(e)
@@ -2658,7 +2659,6 @@ module Google
2658
2659
 
2659
2660
  @data_catalog_stub.call_rpc :create_tag, request, options: options do |response, operation|
2660
2661
  yield response, operation if block_given?
2661
- return response
2662
2662
  end
2663
2663
  rescue ::GRPC::BadStatus => e
2664
2664
  raise ::Google::Cloud::Error.from_error(e)
@@ -2751,7 +2751,6 @@ module Google
2751
2751
 
2752
2752
  @data_catalog_stub.call_rpc :update_tag, request, options: options do |response, operation|
2753
2753
  yield response, operation if block_given?
2754
- return response
2755
2754
  end
2756
2755
  rescue ::GRPC::BadStatus => e
2757
2756
  raise ::Google::Cloud::Error.from_error(e)
@@ -2837,7 +2836,6 @@ module Google
2837
2836
 
2838
2837
  @data_catalog_stub.call_rpc :delete_tag, request, options: options do |response, operation|
2839
2838
  yield response, operation if block_given?
2840
- return response
2841
2839
  end
2842
2840
  rescue ::GRPC::BadStatus => e
2843
2841
  raise ::Google::Cloud::Error.from_error(e)
@@ -2939,7 +2937,7 @@ module Google
2939
2937
  @data_catalog_stub.call_rpc :list_tags, request, options: options do |response, operation|
2940
2938
  response = ::Gapic::PagedEnumerable.new @data_catalog_stub, :list_tags, request, response, operation, options
2941
2939
  yield response, operation if block_given?
2942
- return response
2940
+ throw :response, response
2943
2941
  end
2944
2942
  rescue ::GRPC::BadStatus => e
2945
2943
  raise ::Google::Cloud::Error.from_error(e)
@@ -3056,7 +3054,7 @@ module Google
3056
3054
  @data_catalog_stub.call_rpc :reconcile_tags, request, options: options do |response, operation|
3057
3055
  response = ::Gapic::Operation.new response, @operations_client, options: options
3058
3056
  yield response, operation if block_given?
3059
- return response
3057
+ throw :response, response
3060
3058
  end
3061
3059
  rescue ::GRPC::BadStatus => e
3062
3060
  raise ::Google::Cloud::Error.from_error(e)
@@ -3143,7 +3141,6 @@ module Google
3143
3141
 
3144
3142
  @data_catalog_stub.call_rpc :star_entry, request, options: options do |response, operation|
3145
3143
  yield response, operation if block_given?
3146
- return response
3147
3144
  end
3148
3145
  rescue ::GRPC::BadStatus => e
3149
3146
  raise ::Google::Cloud::Error.from_error(e)
@@ -3230,7 +3227,6 @@ module Google
3230
3227
 
3231
3228
  @data_catalog_stub.call_rpc :unstar_entry, request, options: options do |response, operation|
3232
3229
  yield response, operation if block_given?
3233
- return response
3234
3230
  end
3235
3231
  rescue ::GRPC::BadStatus => e
3236
3232
  raise ::Google::Cloud::Error.from_error(e)
@@ -3344,7 +3340,6 @@ module Google
3344
3340
 
3345
3341
  @data_catalog_stub.call_rpc :set_iam_policy, request, options: options do |response, operation|
3346
3342
  yield response, operation if block_given?
3347
- return response
3348
3343
  end
3349
3344
  rescue ::GRPC::BadStatus => e
3350
3345
  raise ::Google::Cloud::Error.from_error(e)
@@ -3454,7 +3449,6 @@ module Google
3454
3449
 
3455
3450
  @data_catalog_stub.call_rpc :get_iam_policy, request, options: options do |response, operation|
3456
3451
  yield response, operation if block_given?
3457
- return response
3458
3452
  end
3459
3453
  rescue ::GRPC::BadStatus => e
3460
3454
  raise ::Google::Cloud::Error.from_error(e)
@@ -3559,7 +3553,6 @@ module Google
3559
3553
 
3560
3554
  @data_catalog_stub.call_rpc :test_iam_permissions, request, options: options do |response, operation|
3561
3555
  yield response, operation if block_given?
3562
- return response
3563
3556
  end
3564
3557
  rescue ::GRPC::BadStatus => e
3565
3558
  raise ::Google::Cloud::Error.from_error(e)
@@ -3675,7 +3668,273 @@ module Google
3675
3668
  @data_catalog_stub.call_rpc :import_entries, request, options: options do |response, operation|
3676
3669
  response = ::Gapic::Operation.new response, @operations_client, options: options
3677
3670
  yield response, operation if block_given?
3678
- return response
3671
+ throw :response, response
3672
+ end
3673
+ rescue ::GRPC::BadStatus => e
3674
+ raise ::Google::Cloud::Error.from_error(e)
3675
+ end
3676
+
3677
+ ##
3678
+ # Sets the configuration related to the migration to Dataplex for an
3679
+ # organization or project.
3680
+ #
3681
+ # @overload set_config(request, options = nil)
3682
+ # Pass arguments to `set_config` via a request object, either of type
3683
+ # {::Google::Cloud::DataCatalog::V1::SetConfigRequest} or an equivalent Hash.
3684
+ #
3685
+ # @param request [::Google::Cloud::DataCatalog::V1::SetConfigRequest, ::Hash]
3686
+ # A request object representing the call parameters. Required. To specify no
3687
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3688
+ # @param options [::Gapic::CallOptions, ::Hash]
3689
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
3690
+ #
3691
+ # @overload set_config(name: nil, tag_template_migration: nil, catalog_ui_experience: nil)
3692
+ # Pass arguments to `set_config` via keyword arguments. Note that at
3693
+ # least one keyword argument is required. To specify no parameters, or to keep all
3694
+ # the default parameter values, pass an empty Hash as a request object (see above).
3695
+ #
3696
+ # @param name [::String]
3697
+ # Required. The organization or project whose config is being specified.
3698
+ # @param tag_template_migration [::Google::Cloud::DataCatalog::V1::TagTemplateMigration]
3699
+ # Opt-in status for the migration of Tag Templates to Dataplex.
3700
+ # @param catalog_ui_experience [::Google::Cloud::DataCatalog::V1::CatalogUIExperience]
3701
+ # Opt-in status for the UI switch to Dataplex.
3702
+ #
3703
+ # @yield [response, operation] Access the result along with the RPC operation
3704
+ # @yieldparam response [::Google::Cloud::DataCatalog::V1::MigrationConfig]
3705
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
3706
+ #
3707
+ # @return [::Google::Cloud::DataCatalog::V1::MigrationConfig]
3708
+ #
3709
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
3710
+ #
3711
+ # @example Basic example
3712
+ # require "google/cloud/data_catalog/v1"
3713
+ #
3714
+ # # Create a client object. The client can be reused for multiple calls.
3715
+ # client = Google::Cloud::DataCatalog::V1::DataCatalog::Client.new
3716
+ #
3717
+ # # Create a request. To set request fields, pass in keyword arguments.
3718
+ # request = Google::Cloud::DataCatalog::V1::SetConfigRequest.new
3719
+ #
3720
+ # # Call the set_config method.
3721
+ # result = client.set_config request
3722
+ #
3723
+ # # The returned object is of type Google::Cloud::DataCatalog::V1::MigrationConfig.
3724
+ # p result
3725
+ #
3726
+ def set_config request, options = nil
3727
+ raise ::ArgumentError, "request must be provided" if request.nil?
3728
+
3729
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataCatalog::V1::SetConfigRequest
3730
+
3731
+ # Converts hash and nil to an options object
3732
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3733
+
3734
+ # Customize the options with defaults
3735
+ metadata = @config.rpcs.set_config.metadata.to_h
3736
+
3737
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3738
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3739
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3740
+ gapic_version: ::Google::Cloud::DataCatalog::V1::VERSION
3741
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
3742
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3743
+
3744
+ header_params = {}
3745
+ if request.name
3746
+ header_params["name"] = request.name
3747
+ end
3748
+
3749
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
3750
+ metadata[:"x-goog-request-params"] ||= request_params_header
3751
+
3752
+ options.apply_defaults timeout: @config.rpcs.set_config.timeout,
3753
+ metadata: metadata,
3754
+ retry_policy: @config.rpcs.set_config.retry_policy
3755
+
3756
+ options.apply_defaults timeout: @config.timeout,
3757
+ metadata: @config.metadata,
3758
+ retry_policy: @config.retry_policy
3759
+
3760
+ @data_catalog_stub.call_rpc :set_config, request, options: options do |response, operation|
3761
+ yield response, operation if block_given?
3762
+ end
3763
+ rescue ::GRPC::BadStatus => e
3764
+ raise ::Google::Cloud::Error.from_error(e)
3765
+ end
3766
+
3767
+ ##
3768
+ # Retrieves the configuration related to the migration from Data Catalog to
3769
+ # Dataplex for a specific organization, including all the projects under it
3770
+ # which have a separate configuration set.
3771
+ #
3772
+ # @overload retrieve_config(request, options = nil)
3773
+ # Pass arguments to `retrieve_config` via a request object, either of type
3774
+ # {::Google::Cloud::DataCatalog::V1::RetrieveConfigRequest} or an equivalent Hash.
3775
+ #
3776
+ # @param request [::Google::Cloud::DataCatalog::V1::RetrieveConfigRequest, ::Hash]
3777
+ # A request object representing the call parameters. Required. To specify no
3778
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3779
+ # @param options [::Gapic::CallOptions, ::Hash]
3780
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
3781
+ #
3782
+ # @overload retrieve_config(name: nil)
3783
+ # Pass arguments to `retrieve_config` via keyword arguments. Note that at
3784
+ # least one keyword argument is required. To specify no parameters, or to keep all
3785
+ # the default parameter values, pass an empty Hash as a request object (see above).
3786
+ #
3787
+ # @param name [::String]
3788
+ # Required. The organization whose config is being retrieved.
3789
+ #
3790
+ # @yield [response, operation] Access the result along with the RPC operation
3791
+ # @yieldparam response [::Google::Cloud::DataCatalog::V1::OrganizationConfig]
3792
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
3793
+ #
3794
+ # @return [::Google::Cloud::DataCatalog::V1::OrganizationConfig]
3795
+ #
3796
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
3797
+ #
3798
+ # @example Basic example
3799
+ # require "google/cloud/data_catalog/v1"
3800
+ #
3801
+ # # Create a client object. The client can be reused for multiple calls.
3802
+ # client = Google::Cloud::DataCatalog::V1::DataCatalog::Client.new
3803
+ #
3804
+ # # Create a request. To set request fields, pass in keyword arguments.
3805
+ # request = Google::Cloud::DataCatalog::V1::RetrieveConfigRequest.new
3806
+ #
3807
+ # # Call the retrieve_config method.
3808
+ # result = client.retrieve_config request
3809
+ #
3810
+ # # The returned object is of type Google::Cloud::DataCatalog::V1::OrganizationConfig.
3811
+ # p result
3812
+ #
3813
+ def retrieve_config request, options = nil
3814
+ raise ::ArgumentError, "request must be provided" if request.nil?
3815
+
3816
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataCatalog::V1::RetrieveConfigRequest
3817
+
3818
+ # Converts hash and nil to an options object
3819
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3820
+
3821
+ # Customize the options with defaults
3822
+ metadata = @config.rpcs.retrieve_config.metadata.to_h
3823
+
3824
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3825
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3826
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3827
+ gapic_version: ::Google::Cloud::DataCatalog::V1::VERSION
3828
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
3829
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3830
+
3831
+ header_params = {}
3832
+ if request.name
3833
+ header_params["name"] = request.name
3834
+ end
3835
+
3836
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
3837
+ metadata[:"x-goog-request-params"] ||= request_params_header
3838
+
3839
+ options.apply_defaults timeout: @config.rpcs.retrieve_config.timeout,
3840
+ metadata: metadata,
3841
+ retry_policy: @config.rpcs.retrieve_config.retry_policy
3842
+
3843
+ options.apply_defaults timeout: @config.timeout,
3844
+ metadata: @config.metadata,
3845
+ retry_policy: @config.retry_policy
3846
+
3847
+ @data_catalog_stub.call_rpc :retrieve_config, request, options: options do |response, operation|
3848
+ yield response, operation if block_given?
3849
+ end
3850
+ rescue ::GRPC::BadStatus => e
3851
+ raise ::Google::Cloud::Error.from_error(e)
3852
+ end
3853
+
3854
+ ##
3855
+ # Retrieves the effective configuration related to the migration from Data
3856
+ # Catalog to Dataplex for a specific organization or project. If there is no
3857
+ # specific configuration set for the resource, the setting is checked
3858
+ # hierarchicahlly through the ancestors of the resource, starting from the
3859
+ # resource itself.
3860
+ #
3861
+ # @overload retrieve_effective_config(request, options = nil)
3862
+ # Pass arguments to `retrieve_effective_config` via a request object, either of type
3863
+ # {::Google::Cloud::DataCatalog::V1::RetrieveEffectiveConfigRequest} or an equivalent Hash.
3864
+ #
3865
+ # @param request [::Google::Cloud::DataCatalog::V1::RetrieveEffectiveConfigRequest, ::Hash]
3866
+ # A request object representing the call parameters. Required. To specify no
3867
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3868
+ # @param options [::Gapic::CallOptions, ::Hash]
3869
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
3870
+ #
3871
+ # @overload retrieve_effective_config(name: nil)
3872
+ # Pass arguments to `retrieve_effective_config` via keyword arguments. Note that at
3873
+ # least one keyword argument is required. To specify no parameters, or to keep all
3874
+ # the default parameter values, pass an empty Hash as a request object (see above).
3875
+ #
3876
+ # @param name [::String]
3877
+ # Required. The resource whose effective config is being retrieved.
3878
+ #
3879
+ # @yield [response, operation] Access the result along with the RPC operation
3880
+ # @yieldparam response [::Google::Cloud::DataCatalog::V1::MigrationConfig]
3881
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
3882
+ #
3883
+ # @return [::Google::Cloud::DataCatalog::V1::MigrationConfig]
3884
+ #
3885
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
3886
+ #
3887
+ # @example Basic example
3888
+ # require "google/cloud/data_catalog/v1"
3889
+ #
3890
+ # # Create a client object. The client can be reused for multiple calls.
3891
+ # client = Google::Cloud::DataCatalog::V1::DataCatalog::Client.new
3892
+ #
3893
+ # # Create a request. To set request fields, pass in keyword arguments.
3894
+ # request = Google::Cloud::DataCatalog::V1::RetrieveEffectiveConfigRequest.new
3895
+ #
3896
+ # # Call the retrieve_effective_config method.
3897
+ # result = client.retrieve_effective_config request
3898
+ #
3899
+ # # The returned object is of type Google::Cloud::DataCatalog::V1::MigrationConfig.
3900
+ # p result
3901
+ #
3902
+ def retrieve_effective_config request, options = nil
3903
+ raise ::ArgumentError, "request must be provided" if request.nil?
3904
+
3905
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataCatalog::V1::RetrieveEffectiveConfigRequest
3906
+
3907
+ # Converts hash and nil to an options object
3908
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3909
+
3910
+ # Customize the options with defaults
3911
+ metadata = @config.rpcs.retrieve_effective_config.metadata.to_h
3912
+
3913
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3914
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3915
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3916
+ gapic_version: ::Google::Cloud::DataCatalog::V1::VERSION
3917
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
3918
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3919
+
3920
+ header_params = {}
3921
+ if request.name
3922
+ header_params["name"] = request.name
3923
+ end
3924
+
3925
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
3926
+ metadata[:"x-goog-request-params"] ||= request_params_header
3927
+
3928
+ options.apply_defaults timeout: @config.rpcs.retrieve_effective_config.timeout,
3929
+ metadata: metadata,
3930
+ retry_policy: @config.rpcs.retrieve_effective_config.retry_policy
3931
+
3932
+ options.apply_defaults timeout: @config.timeout,
3933
+ metadata: @config.metadata,
3934
+ retry_policy: @config.retry_policy
3935
+
3936
+ @data_catalog_stub.call_rpc :retrieve_effective_config, request, options: options do |response, operation|
3937
+ yield response, operation if block_given?
3679
3938
  end
3680
3939
  rescue ::GRPC::BadStatus => e
3681
3940
  raise ::Google::Cloud::Error.from_error(e)
@@ -3764,6 +4023,11 @@ module Google
3764
4023
  # default endpoint URL. The default value of nil uses the environment
3765
4024
  # universe (usually the default "googleapis.com" universe).
3766
4025
  # @return [::String,nil]
4026
+ # @!attribute [rw] logger
4027
+ # A custom logger to use for request/response debug logging, or the value
4028
+ # `:default` (the default) to construct a default logger, or `nil` to
4029
+ # explicitly disable logging.
4030
+ # @return [::Logger,:default,nil]
3767
4031
  #
3768
4032
  class Configuration
3769
4033
  extend ::Gapic::Config
@@ -3788,6 +4052,7 @@ module Google
3788
4052
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
3789
4053
  config_attr :quota_project, nil, ::String, nil
3790
4054
  config_attr :universe_domain, nil, ::String, nil
4055
+ config_attr :logger, :default, ::Logger, nil, :default
3791
4056
 
3792
4057
  # @private
3793
4058
  def initialize parent_config = nil
@@ -4004,6 +4269,21 @@ module Google
4004
4269
  # @return [::Gapic::Config::Method]
4005
4270
  #
4006
4271
  attr_reader :import_entries
4272
+ ##
4273
+ # RPC-specific configuration for `set_config`
4274
+ # @return [::Gapic::Config::Method]
4275
+ #
4276
+ attr_reader :set_config
4277
+ ##
4278
+ # RPC-specific configuration for `retrieve_config`
4279
+ # @return [::Gapic::Config::Method]
4280
+ #
4281
+ attr_reader :retrieve_config
4282
+ ##
4283
+ # RPC-specific configuration for `retrieve_effective_config`
4284
+ # @return [::Gapic::Config::Method]
4285
+ #
4286
+ attr_reader :retrieve_effective_config
4007
4287
 
4008
4288
  # @private
4009
4289
  def initialize parent_rpcs = nil
@@ -4075,6 +4355,12 @@ module Google
4075
4355
  @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config
4076
4356
  import_entries_config = parent_rpcs.import_entries if parent_rpcs.respond_to? :import_entries
4077
4357
  @import_entries = ::Gapic::Config::Method.new import_entries_config
4358
+ set_config_config = parent_rpcs.set_config if parent_rpcs.respond_to? :set_config
4359
+ @set_config = ::Gapic::Config::Method.new set_config_config
4360
+ retrieve_config_config = parent_rpcs.retrieve_config if parent_rpcs.respond_to? :retrieve_config
4361
+ @retrieve_config = ::Gapic::Config::Method.new retrieve_config_config
4362
+ retrieve_effective_config_config = parent_rpcs.retrieve_effective_config if parent_rpcs.respond_to? :retrieve_effective_config
4363
+ @retrieve_effective_config = ::Gapic::Config::Method.new retrieve_effective_config_config
4078
4364
 
4079
4365
  yield self if block_given?
4080
4366
  end