google-cloud-dataplex-v1 0.17.0 → 0.18.1

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 (28) hide show
  1. checksums.yaml +4 -4
  2. data/AUTHENTICATION.md +72 -99
  3. data/lib/google/cloud/dataplex/v1/content_service/client.rb +42 -17
  4. data/lib/google/cloud/dataplex/v1/content_service/rest/client.rb +38 -10
  5. data/lib/google/cloud/dataplex/v1/content_service/rest/service_stub.rb +23 -2
  6. data/lib/google/cloud/dataplex/v1/data_scan_service/client.rb +43 -17
  7. data/lib/google/cloud/dataplex/v1/data_scan_service/operations.rb +28 -6
  8. data/lib/google/cloud/dataplex/v1/data_scan_service/rest/client.rb +39 -10
  9. data/lib/google/cloud/dataplex/v1/data_scan_service/rest/operations.rb +33 -8
  10. data/lib/google/cloud/dataplex/v1/data_scan_service/rest/service_stub.rb +23 -2
  11. data/lib/google/cloud/dataplex/v1/data_taxonomy_service/client.rb +43 -17
  12. data/lib/google/cloud/dataplex/v1/data_taxonomy_service/operations.rb +28 -6
  13. data/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest/client.rb +39 -10
  14. data/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest/operations.rb +33 -8
  15. data/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest/service_stub.rb +23 -2
  16. data/lib/google/cloud/dataplex/v1/dataplex_service/client.rb +43 -17
  17. data/lib/google/cloud/dataplex/v1/dataplex_service/operations.rb +28 -6
  18. data/lib/google/cloud/dataplex/v1/dataplex_service/rest/client.rb +39 -10
  19. data/lib/google/cloud/dataplex/v1/dataplex_service/rest/operations.rb +33 -8
  20. data/lib/google/cloud/dataplex/v1/dataplex_service/rest/service_stub.rb +23 -2
  21. data/lib/google/cloud/dataplex/v1/metadata_service/client.rb +42 -17
  22. data/lib/google/cloud/dataplex/v1/metadata_service/rest/client.rb +38 -10
  23. data/lib/google/cloud/dataplex/v1/metadata_service/rest/service_stub.rb +23 -2
  24. data/lib/google/cloud/dataplex/v1/version.rb +1 -1
  25. data/proto_docs/google/api/client.rb +1 -0
  26. data/proto_docs/google/cloud/dataplex/v1/data_quality.rb +6 -1
  27. data/proto_docs/google/cloud/dataplex/v1/metadata.rb +2 -0
  28. metadata +8 -8
@@ -26,6 +26,9 @@ module Google
26
26
  module Rest
27
27
  # Service that implements Longrunning Operations API.
28
28
  class Operations
29
+ # @private
30
+ DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$"
31
+
29
32
  # @private
30
33
  attr_reader :operations_stub
31
34
 
@@ -60,6 +63,15 @@ module Google
60
63
  @config
61
64
  end
62
65
 
66
+ ##
67
+ # The effective universe domain
68
+ #
69
+ # @return [String]
70
+ #
71
+ def universe_domain
72
+ @operations_stub.universe_domain
73
+ end
74
+
63
75
  ##
64
76
  # Create a new Operations client object.
65
77
  #
@@ -84,8 +96,10 @@ module Google
84
96
  @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
85
97
 
86
98
  @operations_stub = OperationsServiceStub.new(
87
- endpoint: @config.endpoint,
88
- credentials: credentials
99
+ endpoint: @config.endpoint,
100
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
101
+ universe_domain: @config.universe_domain,
102
+ credentials: credentials
89
103
  )
90
104
 
91
105
  # Used by an LRO wrapper for some methods of this service
@@ -478,9 +492,9 @@ module Google
478
492
  # end
479
493
  #
480
494
  # @!attribute [rw] endpoint
481
- # The hostname or hostname:port of the service endpoint.
482
- # Defaults to `"dataplex.googleapis.com"`.
483
- # @return [::String]
495
+ # A custom service endpoint, as a hostname or hostname:port. The default is
496
+ # nil, indicating to use the default endpoint in the current universe domain.
497
+ # @return [::String,nil]
484
498
  # @!attribute [rw] credentials
485
499
  # Credentials to send with calls. You may provide any of the following types:
486
500
  # * (`String`) The path to a service account key file in JSON format
@@ -517,13 +531,20 @@ module Google
517
531
  # @!attribute [rw] quota_project
518
532
  # A separate project against which to charge quota.
519
533
  # @return [::String]
534
+ # @!attribute [rw] universe_domain
535
+ # The universe domain within which to make requests. This determines the
536
+ # default endpoint URL. The default value of nil uses the environment
537
+ # universe (usually the default "googleapis.com" universe).
538
+ # @return [::String,nil]
520
539
  #
521
540
  class Configuration
522
541
  extend ::Gapic::Config
523
542
 
543
+ # @private
544
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
524
545
  DEFAULT_ENDPOINT = "dataplex.googleapis.com"
525
546
 
526
- config_attr :endpoint, DEFAULT_ENDPOINT, ::String
547
+ config_attr :endpoint, nil, ::String, nil
527
548
  config_attr :credentials, nil do |value|
528
549
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
529
550
  allowed.any? { |klass| klass === value }
@@ -535,6 +556,7 @@ module Google
535
556
  config_attr :metadata, nil, ::Hash, nil
536
557
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
537
558
  config_attr :quota_project, nil, ::String, nil
559
+ config_attr :universe_domain, nil, ::String, nil
538
560
 
539
561
  # @private
540
562
  def initialize parent_config = nil
@@ -617,12 +639,15 @@ module Google
617
639
  # Service stub contains baseline method implementations
618
640
  # including transcoding, making the REST call, and deserialing the response.
619
641
  class OperationsServiceStub
620
- def initialize endpoint:, credentials:
642
+ def initialize endpoint:, endpoint_template:, universe_domain:, credentials:
621
643
  # These require statements are intentionally placed here to initialize
622
644
  # the REST modules only when it's required.
623
645
  require "gapic/rest"
624
646
 
625
- @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, credentials: credentials
647
+ @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint,
648
+ endpoint_template: endpoint_template,
649
+ universe_domain: universe_domain,
650
+ credentials: credentials
626
651
  end
627
652
 
628
653
  ##
@@ -30,16 +30,37 @@ module Google
30
30
  # including transcoding, making the REST call, and deserialing the response.
31
31
  #
32
32
  class ServiceStub
33
- def initialize endpoint:, credentials:
33
+ def initialize endpoint:, endpoint_template:, universe_domain:, credentials:
34
34
  # These require statements are intentionally placed here to initialize
35
35
  # the REST modules only when it's required.
36
36
  require "gapic/rest"
37
37
 
38
- @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, credentials: credentials,
38
+ @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint,
39
+ endpoint_template: endpoint_template,
40
+ universe_domain: universe_domain,
41
+ credentials: credentials,
39
42
  numeric_enums: true,
40
43
  raise_faraday_errors: false
41
44
  end
42
45
 
46
+ ##
47
+ # The effective universe domain
48
+ #
49
+ # @return [String]
50
+ #
51
+ def universe_domain
52
+ @client_stub.universe_domain
53
+ end
54
+
55
+ ##
56
+ # The effective endpoint
57
+ #
58
+ # @return [String]
59
+ #
60
+ def endpoint
61
+ @client_stub.endpoint
62
+ end
63
+
43
64
  ##
44
65
  # Baseline implementation for the create_data_taxonomy REST call
45
66
  #
@@ -36,6 +36,9 @@ module Google
36
36
  # systems including Cloud Storage and BigQuery.
37
37
  #
38
38
  class Client
39
+ # @private
40
+ DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$"
41
+
39
42
  include Paths
40
43
 
41
44
  # @private
@@ -203,6 +206,15 @@ module Google
203
206
  @config
204
207
  end
205
208
 
209
+ ##
210
+ # The effective universe domain
211
+ #
212
+ # @return [String]
213
+ #
214
+ def universe_domain
215
+ @dataplex_service_stub.universe_domain
216
+ end
217
+
206
218
  ##
207
219
  # Create a new DataplexService client object.
208
220
  #
@@ -236,8 +248,9 @@ module Google
236
248
  credentials = @config.credentials
237
249
  # Use self-signed JWT if the endpoint is unchanged from default,
238
250
  # but only if the default endpoint does not have a region prefix.
239
- enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
240
- !@config.endpoint.split(".").first.include?("-")
251
+ enable_self_signed_jwt = @config.endpoint.nil? ||
252
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
253
+ !@config.endpoint.split(".").first.include?("-"))
241
254
  credentials ||= Credentials.default scope: @config.scope,
242
255
  enable_self_signed_jwt: enable_self_signed_jwt
243
256
  if credentials.is_a?(::String) || credentials.is_a?(::Hash)
@@ -250,28 +263,33 @@ module Google
250
263
  config.credentials = credentials
251
264
  config.quota_project = @quota_project_id
252
265
  config.endpoint = @config.endpoint
266
+ config.universe_domain = @config.universe_domain
253
267
  end
254
268
 
269
+ @dataplex_service_stub = ::Gapic::ServiceStub.new(
270
+ ::Google::Cloud::Dataplex::V1::DataplexService::Stub,
271
+ credentials: credentials,
272
+ endpoint: @config.endpoint,
273
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
274
+ universe_domain: @config.universe_domain,
275
+ channel_args: @config.channel_args,
276
+ interceptors: @config.interceptors,
277
+ channel_pool_config: @config.channel_pool
278
+ )
279
+
255
280
  @location_client = Google::Cloud::Location::Locations::Client.new do |config|
256
281
  config.credentials = credentials
257
282
  config.quota_project = @quota_project_id
258
- config.endpoint = @config.endpoint
283
+ config.endpoint = @dataplex_service_stub.endpoint
284
+ config.universe_domain = @dataplex_service_stub.universe_domain
259
285
  end
260
286
 
261
287
  @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config|
262
288
  config.credentials = credentials
263
289
  config.quota_project = @quota_project_id
264
- config.endpoint = @config.endpoint
290
+ config.endpoint = @dataplex_service_stub.endpoint
291
+ config.universe_domain = @dataplex_service_stub.universe_domain
265
292
  end
266
-
267
- @dataplex_service_stub = ::Gapic::ServiceStub.new(
268
- ::Google::Cloud::Dataplex::V1::DataplexService::Stub,
269
- credentials: credentials,
270
- endpoint: @config.endpoint,
271
- channel_args: @config.channel_args,
272
- interceptors: @config.interceptors,
273
- channel_pool_config: @config.channel_pool
274
- )
275
293
  end
276
294
 
277
295
  ##
@@ -3562,9 +3580,9 @@ module Google
3562
3580
  # end
3563
3581
  #
3564
3582
  # @!attribute [rw] endpoint
3565
- # The hostname or hostname:port of the service endpoint.
3566
- # Defaults to `"dataplex.googleapis.com"`.
3567
- # @return [::String]
3583
+ # A custom service endpoint, as a hostname or hostname:port. The default is
3584
+ # nil, indicating to use the default endpoint in the current universe domain.
3585
+ # @return [::String,nil]
3568
3586
  # @!attribute [rw] credentials
3569
3587
  # Credentials to send with calls. You may provide any of the following types:
3570
3588
  # * (`String`) The path to a service account key file in JSON format
@@ -3610,13 +3628,20 @@ module Google
3610
3628
  # @!attribute [rw] quota_project
3611
3629
  # A separate project against which to charge quota.
3612
3630
  # @return [::String]
3631
+ # @!attribute [rw] universe_domain
3632
+ # The universe domain within which to make requests. This determines the
3633
+ # default endpoint URL. The default value of nil uses the environment
3634
+ # universe (usually the default "googleapis.com" universe).
3635
+ # @return [::String,nil]
3613
3636
  #
3614
3637
  class Configuration
3615
3638
  extend ::Gapic::Config
3616
3639
 
3640
+ # @private
3641
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
3617
3642
  DEFAULT_ENDPOINT = "dataplex.googleapis.com"
3618
3643
 
3619
- config_attr :endpoint, DEFAULT_ENDPOINT, ::String
3644
+ config_attr :endpoint, nil, ::String, nil
3620
3645
  config_attr :credentials, nil do |value|
3621
3646
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
3622
3647
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
@@ -3631,6 +3656,7 @@ module Google
3631
3656
  config_attr :metadata, nil, ::Hash, nil
3632
3657
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
3633
3658
  config_attr :quota_project, nil, ::String, nil
3659
+ config_attr :universe_domain, nil, ::String, nil
3634
3660
 
3635
3661
  # @private
3636
3662
  def initialize parent_config = nil
@@ -26,6 +26,9 @@ module Google
26
26
  module DataplexService
27
27
  # Service that implements Longrunning Operations API.
28
28
  class Operations
29
+ # @private
30
+ DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$"
31
+
29
32
  # @private
30
33
  attr_reader :operations_stub
31
34
 
@@ -60,6 +63,15 @@ module Google
60
63
  @config
61
64
  end
62
65
 
66
+ ##
67
+ # The effective universe domain
68
+ #
69
+ # @return [String]
70
+ #
71
+ def universe_domain
72
+ @operations_stub.universe_domain
73
+ end
74
+
63
75
  ##
64
76
  # Create a new Operations client object.
65
77
  #
@@ -90,8 +102,10 @@ module Google
90
102
 
91
103
  @operations_stub = ::Gapic::ServiceStub.new(
92
104
  ::Google::Longrunning::Operations::Stub,
93
- credentials: credentials,
94
- endpoint: @config.endpoint,
105
+ credentials: credentials,
106
+ endpoint: @config.endpoint,
107
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
108
+ universe_domain: @config.universe_domain,
95
109
  channel_args: @config.channel_args,
96
110
  interceptors: @config.interceptors,
97
111
  channel_pool_config: @config.channel_pool
@@ -613,9 +627,9 @@ module Google
613
627
  # end
614
628
  #
615
629
  # @!attribute [rw] endpoint
616
- # The hostname or hostname:port of the service endpoint.
617
- # Defaults to `"dataplex.googleapis.com"`.
618
- # @return [::String]
630
+ # A custom service endpoint, as a hostname or hostname:port. The default is
631
+ # nil, indicating to use the default endpoint in the current universe domain.
632
+ # @return [::String,nil]
619
633
  # @!attribute [rw] credentials
620
634
  # Credentials to send with calls. You may provide any of the following types:
621
635
  # * (`String`) The path to a service account key file in JSON format
@@ -661,13 +675,20 @@ module Google
661
675
  # @!attribute [rw] quota_project
662
676
  # A separate project against which to charge quota.
663
677
  # @return [::String]
678
+ # @!attribute [rw] universe_domain
679
+ # The universe domain within which to make requests. This determines the
680
+ # default endpoint URL. The default value of nil uses the environment
681
+ # universe (usually the default "googleapis.com" universe).
682
+ # @return [::String,nil]
664
683
  #
665
684
  class Configuration
666
685
  extend ::Gapic::Config
667
686
 
687
+ # @private
688
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
668
689
  DEFAULT_ENDPOINT = "dataplex.googleapis.com"
669
690
 
670
- config_attr :endpoint, DEFAULT_ENDPOINT, ::String
691
+ config_attr :endpoint, nil, ::String, nil
671
692
  config_attr :credentials, nil do |value|
672
693
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
673
694
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
@@ -682,6 +703,7 @@ module Google
682
703
  config_attr :metadata, nil, ::Hash, nil
683
704
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
684
705
  config_attr :quota_project, nil, ::String, nil
706
+ config_attr :universe_domain, nil, ::String, nil
685
707
 
686
708
  # @private
687
709
  def initialize parent_config = nil
@@ -38,6 +38,9 @@ module Google
38
38
  # systems including Cloud Storage and BigQuery.
39
39
  #
40
40
  class Client
41
+ # @private
42
+ DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$"
43
+
41
44
  include Paths
42
45
 
43
46
  # @private
@@ -205,6 +208,15 @@ module Google
205
208
  @config
206
209
  end
207
210
 
211
+ ##
212
+ # The effective universe domain
213
+ #
214
+ # @return [String]
215
+ #
216
+ def universe_domain
217
+ @dataplex_service_stub.universe_domain
218
+ end
219
+
208
220
  ##
209
221
  # Create a new DataplexService REST client object.
210
222
  #
@@ -232,8 +244,9 @@ module Google
232
244
  credentials = @config.credentials
233
245
  # Use self-signed JWT if the endpoint is unchanged from default,
234
246
  # but only if the default endpoint does not have a region prefix.
235
- enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
236
- !@config.endpoint.split(".").first.include?("-")
247
+ enable_self_signed_jwt = @config.endpoint.nil? ||
248
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
249
+ !@config.endpoint.split(".").first.include?("-"))
237
250
  credentials ||= Credentials.default scope: @config.scope,
238
251
  enable_self_signed_jwt: enable_self_signed_jwt
239
252
  if credentials.is_a?(::String) || credentials.is_a?(::Hash)
@@ -247,23 +260,31 @@ module Google
247
260
  config.credentials = credentials
248
261
  config.quota_project = @quota_project_id
249
262
  config.endpoint = @config.endpoint
263
+ config.universe_domain = @config.universe_domain
250
264
  end
251
265
 
266
+ @dataplex_service_stub = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.new(
267
+ endpoint: @config.endpoint,
268
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
269
+ universe_domain: @config.universe_domain,
270
+ credentials: credentials
271
+ )
272
+
252
273
  @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
253
274
  config.credentials = credentials
254
275
  config.quota_project = @quota_project_id
255
- config.endpoint = @config.endpoint
276
+ config.endpoint = @dataplex_service_stub.endpoint
277
+ config.universe_domain = @dataplex_service_stub.universe_domain
256
278
  config.bindings_override = @config.bindings_override
257
279
  end
258
280
 
259
281
  @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config|
260
282
  config.credentials = credentials
261
283
  config.quota_project = @quota_project_id
262
- config.endpoint = @config.endpoint
284
+ config.endpoint = @dataplex_service_stub.endpoint
285
+ config.universe_domain = @dataplex_service_stub.universe_domain
263
286
  config.bindings_override = @config.bindings_override
264
287
  end
265
-
266
- @dataplex_service_stub = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
267
288
  end
268
289
 
269
290
  ##
@@ -3321,9 +3342,9 @@ module Google
3321
3342
  # end
3322
3343
  #
3323
3344
  # @!attribute [rw] endpoint
3324
- # The hostname or hostname:port of the service endpoint.
3325
- # Defaults to `"dataplex.googleapis.com"`.
3326
- # @return [::String]
3345
+ # A custom service endpoint, as a hostname or hostname:port. The default is
3346
+ # nil, indicating to use the default endpoint in the current universe domain.
3347
+ # @return [::String,nil]
3327
3348
  # @!attribute [rw] credentials
3328
3349
  # Credentials to send with calls. You may provide any of the following types:
3329
3350
  # * (`String`) The path to a service account key file in JSON format
@@ -3360,13 +3381,20 @@ module Google
3360
3381
  # @!attribute [rw] quota_project
3361
3382
  # A separate project against which to charge quota.
3362
3383
  # @return [::String]
3384
+ # @!attribute [rw] universe_domain
3385
+ # The universe domain within which to make requests. This determines the
3386
+ # default endpoint URL. The default value of nil uses the environment
3387
+ # universe (usually the default "googleapis.com" universe).
3388
+ # @return [::String,nil]
3363
3389
  #
3364
3390
  class Configuration
3365
3391
  extend ::Gapic::Config
3366
3392
 
3393
+ # @private
3394
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
3367
3395
  DEFAULT_ENDPOINT = "dataplex.googleapis.com"
3368
3396
 
3369
- config_attr :endpoint, DEFAULT_ENDPOINT, ::String
3397
+ config_attr :endpoint, nil, ::String, nil
3370
3398
  config_attr :credentials, nil do |value|
3371
3399
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
3372
3400
  allowed.any? { |klass| klass === value }
@@ -3378,6 +3406,7 @@ module Google
3378
3406
  config_attr :metadata, nil, ::Hash, nil
3379
3407
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
3380
3408
  config_attr :quota_project, nil, ::String, nil
3409
+ config_attr :universe_domain, nil, ::String, nil
3381
3410
 
3382
3411
  # @private
3383
3412
  # Overrides for http bindings for the RPCs of this service
@@ -26,6 +26,9 @@ module Google
26
26
  module Rest
27
27
  # Service that implements Longrunning Operations API.
28
28
  class Operations
29
+ # @private
30
+ DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$"
31
+
29
32
  # @private
30
33
  attr_reader :operations_stub
31
34
 
@@ -60,6 +63,15 @@ module Google
60
63
  @config
61
64
  end
62
65
 
66
+ ##
67
+ # The effective universe domain
68
+ #
69
+ # @return [String]
70
+ #
71
+ def universe_domain
72
+ @operations_stub.universe_domain
73
+ end
74
+
63
75
  ##
64
76
  # Create a new Operations client object.
65
77
  #
@@ -84,8 +96,10 @@ module Google
84
96
  @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
85
97
 
86
98
  @operations_stub = OperationsServiceStub.new(
87
- endpoint: @config.endpoint,
88
- credentials: credentials
99
+ endpoint: @config.endpoint,
100
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
101
+ universe_domain: @config.universe_domain,
102
+ credentials: credentials
89
103
  )
90
104
 
91
105
  # Used by an LRO wrapper for some methods of this service
@@ -478,9 +492,9 @@ module Google
478
492
  # end
479
493
  #
480
494
  # @!attribute [rw] endpoint
481
- # The hostname or hostname:port of the service endpoint.
482
- # Defaults to `"dataplex.googleapis.com"`.
483
- # @return [::String]
495
+ # A custom service endpoint, as a hostname or hostname:port. The default is
496
+ # nil, indicating to use the default endpoint in the current universe domain.
497
+ # @return [::String,nil]
484
498
  # @!attribute [rw] credentials
485
499
  # Credentials to send with calls. You may provide any of the following types:
486
500
  # * (`String`) The path to a service account key file in JSON format
@@ -517,13 +531,20 @@ module Google
517
531
  # @!attribute [rw] quota_project
518
532
  # A separate project against which to charge quota.
519
533
  # @return [::String]
534
+ # @!attribute [rw] universe_domain
535
+ # The universe domain within which to make requests. This determines the
536
+ # default endpoint URL. The default value of nil uses the environment
537
+ # universe (usually the default "googleapis.com" universe).
538
+ # @return [::String,nil]
520
539
  #
521
540
  class Configuration
522
541
  extend ::Gapic::Config
523
542
 
543
+ # @private
544
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
524
545
  DEFAULT_ENDPOINT = "dataplex.googleapis.com"
525
546
 
526
- config_attr :endpoint, DEFAULT_ENDPOINT, ::String
547
+ config_attr :endpoint, nil, ::String, nil
527
548
  config_attr :credentials, nil do |value|
528
549
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
529
550
  allowed.any? { |klass| klass === value }
@@ -535,6 +556,7 @@ module Google
535
556
  config_attr :metadata, nil, ::Hash, nil
536
557
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
537
558
  config_attr :quota_project, nil, ::String, nil
559
+ config_attr :universe_domain, nil, ::String, nil
538
560
 
539
561
  # @private
540
562
  def initialize parent_config = nil
@@ -617,12 +639,15 @@ module Google
617
639
  # Service stub contains baseline method implementations
618
640
  # including transcoding, making the REST call, and deserialing the response.
619
641
  class OperationsServiceStub
620
- def initialize endpoint:, credentials:
642
+ def initialize endpoint:, endpoint_template:, universe_domain:, credentials:
621
643
  # These require statements are intentionally placed here to initialize
622
644
  # the REST modules only when it's required.
623
645
  require "gapic/rest"
624
646
 
625
- @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, credentials: credentials
647
+ @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint,
648
+ endpoint_template: endpoint_template,
649
+ universe_domain: universe_domain,
650
+ credentials: credentials
626
651
  end
627
652
 
628
653
  ##
@@ -30,16 +30,37 @@ module Google
30
30
  # including transcoding, making the REST call, and deserialing the response.
31
31
  #
32
32
  class ServiceStub
33
- def initialize endpoint:, credentials:
33
+ def initialize endpoint:, endpoint_template:, universe_domain:, credentials:
34
34
  # These require statements are intentionally placed here to initialize
35
35
  # the REST modules only when it's required.
36
36
  require "gapic/rest"
37
37
 
38
- @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, credentials: credentials,
38
+ @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint,
39
+ endpoint_template: endpoint_template,
40
+ universe_domain: universe_domain,
41
+ credentials: credentials,
39
42
  numeric_enums: true,
40
43
  raise_faraday_errors: false
41
44
  end
42
45
 
46
+ ##
47
+ # The effective universe domain
48
+ #
49
+ # @return [String]
50
+ #
51
+ def universe_domain
52
+ @client_stub.universe_domain
53
+ end
54
+
55
+ ##
56
+ # The effective endpoint
57
+ #
58
+ # @return [String]
59
+ #
60
+ def endpoint
61
+ @client_stub.endpoint
62
+ end
63
+
43
64
  ##
44
65
  # Baseline implementation for the create_lake REST call
45
66
  #