google-cloud-dataplex-v1 0.17.0 → 0.18.0

Sign up to get free protection for your applications and to get access to all the features.
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 +33 -8
  4. data/lib/google/cloud/dataplex/v1/content_service/rest/client.rb +35 -7
  5. data/lib/google/cloud/dataplex/v1/content_service/rest/service_stub.rb +14 -2
  6. data/lib/google/cloud/dataplex/v1/data_scan_service/client.rb +34 -8
  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 +36 -7
  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 +14 -2
  11. data/lib/google/cloud/dataplex/v1/data_taxonomy_service/client.rb +34 -8
  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 +36 -7
  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 +14 -2
  16. data/lib/google/cloud/dataplex/v1/dataplex_service/client.rb +34 -8
  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 +36 -7
  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 +14 -2
  21. data/lib/google/cloud/dataplex/v1/metadata_service/client.rb +33 -8
  22. data/lib/google/cloud/dataplex/v1/metadata_service/rest/client.rb +35 -7
  23. data/lib/google/cloud/dataplex/v1/metadata_service/rest/service_stub.rb +14 -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,28 @@ 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
+
43
55
  ##
44
56
  # Baseline implementation for the create_data_taxonomy REST call
45
57
  #
@@ -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,24 +263,29 @@ 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
 
255
269
  @location_client = Google::Cloud::Location::Locations::Client.new do |config|
256
270
  config.credentials = credentials
257
271
  config.quota_project = @quota_project_id
258
272
  config.endpoint = @config.endpoint
273
+ config.universe_domain = @config.universe_domain
259
274
  end
260
275
 
261
276
  @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config|
262
277
  config.credentials = credentials
263
278
  config.quota_project = @quota_project_id
264
279
  config.endpoint = @config.endpoint
280
+ config.universe_domain = @config.universe_domain
265
281
  end
266
282
 
267
283
  @dataplex_service_stub = ::Gapic::ServiceStub.new(
268
284
  ::Google::Cloud::Dataplex::V1::DataplexService::Stub,
269
- credentials: credentials,
270
- endpoint: @config.endpoint,
285
+ credentials: credentials,
286
+ endpoint: @config.endpoint,
287
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
288
+ universe_domain: @config.universe_domain,
271
289
  channel_args: @config.channel_args,
272
290
  interceptors: @config.interceptors,
273
291
  channel_pool_config: @config.channel_pool
@@ -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,12 +260,14 @@ 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
 
252
266
  @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
253
267
  config.credentials = credentials
254
268
  config.quota_project = @quota_project_id
255
269
  config.endpoint = @config.endpoint
270
+ config.universe_domain = @config.universe_domain
256
271
  config.bindings_override = @config.bindings_override
257
272
  end
258
273
 
@@ -260,10 +275,16 @@ module Google
260
275
  config.credentials = credentials
261
276
  config.quota_project = @quota_project_id
262
277
  config.endpoint = @config.endpoint
278
+ config.universe_domain = @config.universe_domain
263
279
  config.bindings_override = @config.bindings_override
264
280
  end
265
281
 
266
- @dataplex_service_stub = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
282
+ @dataplex_service_stub = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.new(
283
+ endpoint: @config.endpoint,
284
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
285
+ universe_domain: @config.universe_domain,
286
+ credentials: credentials
287
+ )
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,28 @@ 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
+
43
55
  ##
44
56
  # Baseline implementation for the create_lake REST call
45
57
  #
@@ -33,6 +33,9 @@ module Google
33
33
  # partitions.
34
34
  #
35
35
  class Client
36
+ # @private
37
+ DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$"
38
+
36
39
  include Paths
37
40
 
38
41
  # @private
@@ -123,6 +126,15 @@ module Google
123
126
  @config
124
127
  end
125
128
 
129
+ ##
130
+ # The effective universe domain
131
+ #
132
+ # @return [String]
133
+ #
134
+ def universe_domain
135
+ @metadata_service_stub.universe_domain
136
+ end
137
+
126
138
  ##
127
139
  # Create a new MetadataService client object.
128
140
  #
@@ -156,8 +168,9 @@ module Google
156
168
  credentials = @config.credentials
157
169
  # Use self-signed JWT if the endpoint is unchanged from default,
158
170
  # but only if the default endpoint does not have a region prefix.
159
- enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
160
- !@config.endpoint.split(".").first.include?("-")
171
+ enable_self_signed_jwt = @config.endpoint.nil? ||
172
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
173
+ !@config.endpoint.split(".").first.include?("-"))
161
174
  credentials ||= Credentials.default scope: @config.scope,
162
175
  enable_self_signed_jwt: enable_self_signed_jwt
163
176
  if credentials.is_a?(::String) || credentials.is_a?(::Hash)
@@ -170,18 +183,22 @@ module Google
170
183
  config.credentials = credentials
171
184
  config.quota_project = @quota_project_id
172
185
  config.endpoint = @config.endpoint
186
+ config.universe_domain = @config.universe_domain
173
187
  end
174
188
 
175
189
  @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config|
176
190
  config.credentials = credentials
177
191
  config.quota_project = @quota_project_id
178
192
  config.endpoint = @config.endpoint
193
+ config.universe_domain = @config.universe_domain
179
194
  end
180
195
 
181
196
  @metadata_service_stub = ::Gapic::ServiceStub.new(
182
197
  ::Google::Cloud::Dataplex::V1::MetadataService::Stub,
183
- credentials: credentials,
184
- endpoint: @config.endpoint,
198
+ credentials: credentials,
199
+ endpoint: @config.endpoint,
200
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
201
+ universe_domain: @config.universe_domain,
185
202
  channel_args: @config.channel_args,
186
203
  interceptors: @config.interceptors,
187
204
  channel_pool_config: @config.channel_pool
@@ -1094,9 +1111,9 @@ module Google
1094
1111
  # end
1095
1112
  #
1096
1113
  # @!attribute [rw] endpoint
1097
- # The hostname or hostname:port of the service endpoint.
1098
- # Defaults to `"dataplex.googleapis.com"`.
1099
- # @return [::String]
1114
+ # A custom service endpoint, as a hostname or hostname:port. The default is
1115
+ # nil, indicating to use the default endpoint in the current universe domain.
1116
+ # @return [::String,nil]
1100
1117
  # @!attribute [rw] credentials
1101
1118
  # Credentials to send with calls. You may provide any of the following types:
1102
1119
  # * (`String`) The path to a service account key file in JSON format
@@ -1142,13 +1159,20 @@ module Google
1142
1159
  # @!attribute [rw] quota_project
1143
1160
  # A separate project against which to charge quota.
1144
1161
  # @return [::String]
1162
+ # @!attribute [rw] universe_domain
1163
+ # The universe domain within which to make requests. This determines the
1164
+ # default endpoint URL. The default value of nil uses the environment
1165
+ # universe (usually the default "googleapis.com" universe).
1166
+ # @return [::String,nil]
1145
1167
  #
1146
1168
  class Configuration
1147
1169
  extend ::Gapic::Config
1148
1170
 
1171
+ # @private
1172
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
1149
1173
  DEFAULT_ENDPOINT = "dataplex.googleapis.com"
1150
1174
 
1151
- config_attr :endpoint, DEFAULT_ENDPOINT, ::String
1175
+ config_attr :endpoint, nil, ::String, nil
1152
1176
  config_attr :credentials, nil do |value|
1153
1177
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
1154
1178
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
@@ -1163,6 +1187,7 @@ module Google
1163
1187
  config_attr :metadata, nil, ::Hash, nil
1164
1188
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
1165
1189
  config_attr :quota_project, nil, ::String, nil
1190
+ config_attr :universe_domain, nil, ::String, nil
1166
1191
 
1167
1192
  # @private
1168
1193
  def initialize parent_config = nil