google-cloud-talent-v4beta1 0.9.0 → 0.10.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (26) hide show
  1. checksums.yaml +4 -4
  2. data/AUTHENTICATION.md +72 -101
  3. data/lib/google/cloud/talent/v4beta1/company_service/client.rb +31 -8
  4. data/lib/google/cloud/talent/v4beta1/company_service/rest/client.rb +33 -7
  5. data/lib/google/cloud/talent/v4beta1/company_service/rest/service_stub.rb +14 -2
  6. data/lib/google/cloud/talent/v4beta1/completion/client.rb +31 -8
  7. data/lib/google/cloud/talent/v4beta1/completion/rest/client.rb +33 -7
  8. data/lib/google/cloud/talent/v4beta1/completion/rest/service_stub.rb +14 -2
  9. data/lib/google/cloud/talent/v4beta1/event_service/client.rb +31 -8
  10. data/lib/google/cloud/talent/v4beta1/event_service/rest/client.rb +33 -7
  11. data/lib/google/cloud/talent/v4beta1/event_service/rest/service_stub.rb +14 -2
  12. data/lib/google/cloud/talent/v4beta1/job_service/client.rb +32 -8
  13. data/lib/google/cloud/talent/v4beta1/job_service/operations.rb +28 -6
  14. data/lib/google/cloud/talent/v4beta1/job_service/rest/client.rb +34 -7
  15. data/lib/google/cloud/talent/v4beta1/job_service/rest/operations.rb +33 -8
  16. data/lib/google/cloud/talent/v4beta1/job_service/rest/service_stub.rb +14 -2
  17. data/lib/google/cloud/talent/v4beta1/tenant_service/client.rb +31 -8
  18. data/lib/google/cloud/talent/v4beta1/tenant_service/rest/client.rb +33 -7
  19. data/lib/google/cloud/talent/v4beta1/tenant_service/rest/service_stub.rb +14 -2
  20. data/lib/google/cloud/talent/v4beta1/version.rb +1 -1
  21. data/proto_docs/google/api/client.rb +14 -0
  22. data/proto_docs/google/cloud/talent/v4beta1/common.rb +1 -0
  23. data/proto_docs/google/cloud/talent/v4beta1/company.rb +1 -0
  24. data/proto_docs/google/cloud/talent/v4beta1/job.rb +1 -0
  25. data/proto_docs/google/cloud/talent/v4beta1/job_service.rb +1 -0
  26. metadata +5 -5
@@ -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 complete_query REST call
45
57
  #
@@ -30,6 +30,9 @@ module Google
30
30
  # A service handles client event report.
31
31
  #
32
32
  class Client
33
+ # @private
34
+ DEFAULT_ENDPOINT_TEMPLATE = "jobs.$UNIVERSE_DOMAIN$"
35
+
33
36
  include Paths
34
37
 
35
38
  # @private
@@ -92,6 +95,15 @@ module Google
92
95
  @config
93
96
  end
94
97
 
98
+ ##
99
+ # The effective universe domain
100
+ #
101
+ # @return [String]
102
+ #
103
+ def universe_domain
104
+ @event_service_stub.universe_domain
105
+ end
106
+
95
107
  ##
96
108
  # Create a new EventService client object.
97
109
  #
@@ -125,8 +137,9 @@ module Google
125
137
  credentials = @config.credentials
126
138
  # Use self-signed JWT if the endpoint is unchanged from default,
127
139
  # but only if the default endpoint does not have a region prefix.
128
- enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
129
- !@config.endpoint.split(".").first.include?("-")
140
+ enable_self_signed_jwt = @config.endpoint.nil? ||
141
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
142
+ !@config.endpoint.split(".").first.include?("-"))
130
143
  credentials ||= Credentials.default scope: @config.scope,
131
144
  enable_self_signed_jwt: enable_self_signed_jwt
132
145
  if credentials.is_a?(::String) || credentials.is_a?(::Hash)
@@ -137,8 +150,10 @@ module Google
137
150
 
138
151
  @event_service_stub = ::Gapic::ServiceStub.new(
139
152
  ::Google::Cloud::Talent::V4beta1::EventService::Stub,
140
- credentials: credentials,
141
- endpoint: @config.endpoint,
153
+ credentials: credentials,
154
+ endpoint: @config.endpoint,
155
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
156
+ universe_domain: @config.universe_domain,
142
157
  channel_args: @config.channel_args,
143
158
  interceptors: @config.interceptors,
144
159
  channel_pool_config: @config.channel_pool
@@ -275,9 +290,9 @@ module Google
275
290
  # end
276
291
  #
277
292
  # @!attribute [rw] endpoint
278
- # The hostname or hostname:port of the service endpoint.
279
- # Defaults to `"jobs.googleapis.com"`.
280
- # @return [::String]
293
+ # A custom service endpoint, as a hostname or hostname:port. The default is
294
+ # nil, indicating to use the default endpoint in the current universe domain.
295
+ # @return [::String,nil]
281
296
  # @!attribute [rw] credentials
282
297
  # Credentials to send with calls. You may provide any of the following types:
283
298
  # * (`String`) The path to a service account key file in JSON format
@@ -323,13 +338,20 @@ module Google
323
338
  # @!attribute [rw] quota_project
324
339
  # A separate project against which to charge quota.
325
340
  # @return [::String]
341
+ # @!attribute [rw] universe_domain
342
+ # The universe domain within which to make requests. This determines the
343
+ # default endpoint URL. The default value of nil uses the environment
344
+ # universe (usually the default "googleapis.com" universe).
345
+ # @return [::String,nil]
326
346
  #
327
347
  class Configuration
328
348
  extend ::Gapic::Config
329
349
 
350
+ # @private
351
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
330
352
  DEFAULT_ENDPOINT = "jobs.googleapis.com"
331
353
 
332
- config_attr :endpoint, DEFAULT_ENDPOINT, ::String
354
+ config_attr :endpoint, nil, ::String, nil
333
355
  config_attr :credentials, nil do |value|
334
356
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
335
357
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
@@ -344,6 +366,7 @@ module Google
344
366
  config_attr :metadata, nil, ::Hash, nil
345
367
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
346
368
  config_attr :quota_project, nil, ::String, nil
369
+ config_attr :universe_domain, nil, ::String, nil
347
370
 
348
371
  # @private
349
372
  def initialize parent_config = nil
@@ -32,6 +32,9 @@ module Google
32
32
  # A service handles client event report.
33
33
  #
34
34
  class Client
35
+ # @private
36
+ DEFAULT_ENDPOINT_TEMPLATE = "jobs.$UNIVERSE_DOMAIN$"
37
+
35
38
  include Paths
36
39
 
37
40
  # @private
@@ -94,6 +97,15 @@ module Google
94
97
  @config
95
98
  end
96
99
 
100
+ ##
101
+ # The effective universe domain
102
+ #
103
+ # @return [String]
104
+ #
105
+ def universe_domain
106
+ @event_service_stub.universe_domain
107
+ end
108
+
97
109
  ##
98
110
  # Create a new EventService REST client object.
99
111
  #
@@ -121,8 +133,9 @@ module Google
121
133
  credentials = @config.credentials
122
134
  # Use self-signed JWT if the endpoint is unchanged from default,
123
135
  # but only if the default endpoint does not have a region prefix.
124
- enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
125
- !@config.endpoint.split(".").first.include?("-")
136
+ enable_self_signed_jwt = @config.endpoint.nil? ||
137
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
138
+ !@config.endpoint.split(".").first.include?("-"))
126
139
  credentials ||= Credentials.default scope: @config.scope,
127
140
  enable_self_signed_jwt: enable_self_signed_jwt
128
141
  if credentials.is_a?(::String) || credentials.is_a?(::Hash)
@@ -132,7 +145,12 @@ module Google
132
145
  @quota_project_id = @config.quota_project
133
146
  @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
134
147
 
135
- @event_service_stub = ::Google::Cloud::Talent::V4beta1::EventService::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
148
+ @event_service_stub = ::Google::Cloud::Talent::V4beta1::EventService::Rest::ServiceStub.new(
149
+ endpoint: @config.endpoint,
150
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
151
+ universe_domain: @config.universe_domain,
152
+ credentials: credentials
153
+ )
136
154
  end
137
155
 
138
156
  # Service calls
@@ -258,9 +276,9 @@ module Google
258
276
  # end
259
277
  #
260
278
  # @!attribute [rw] endpoint
261
- # The hostname or hostname:port of the service endpoint.
262
- # Defaults to `"jobs.googleapis.com"`.
263
- # @return [::String]
279
+ # A custom service endpoint, as a hostname or hostname:port. The default is
280
+ # nil, indicating to use the default endpoint in the current universe domain.
281
+ # @return [::String,nil]
264
282
  # @!attribute [rw] credentials
265
283
  # Credentials to send with calls. You may provide any of the following types:
266
284
  # * (`String`) The path to a service account key file in JSON format
@@ -297,13 +315,20 @@ module Google
297
315
  # @!attribute [rw] quota_project
298
316
  # A separate project against which to charge quota.
299
317
  # @return [::String]
318
+ # @!attribute [rw] universe_domain
319
+ # The universe domain within which to make requests. This determines the
320
+ # default endpoint URL. The default value of nil uses the environment
321
+ # universe (usually the default "googleapis.com" universe).
322
+ # @return [::String,nil]
300
323
  #
301
324
  class Configuration
302
325
  extend ::Gapic::Config
303
326
 
327
+ # @private
328
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
304
329
  DEFAULT_ENDPOINT = "jobs.googleapis.com"
305
330
 
306
- config_attr :endpoint, DEFAULT_ENDPOINT, ::String
331
+ config_attr :endpoint, nil, ::String, nil
307
332
  config_attr :credentials, nil do |value|
308
333
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
309
334
  allowed.any? { |klass| klass === value }
@@ -315,6 +340,7 @@ module Google
315
340
  config_attr :metadata, nil, ::Hash, nil
316
341
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
317
342
  config_attr :quota_project, nil, ::String, nil
343
+ config_attr :universe_domain, nil, ::String, nil
318
344
 
319
345
  # @private
320
346
  def initialize parent_config = nil
@@ -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_client_event REST call
45
57
  #
@@ -30,6 +30,9 @@ module Google
30
30
  # A service handles job management, including job CRUD, enumeration and search.
31
31
  #
32
32
  class Client
33
+ # @private
34
+ DEFAULT_ENDPOINT_TEMPLATE = "jobs.$UNIVERSE_DOMAIN$"
35
+
33
36
  include Paths
34
37
 
35
38
  # @private
@@ -119,6 +122,15 @@ module Google
119
122
  @config
120
123
  end
121
124
 
125
+ ##
126
+ # The effective universe domain
127
+ #
128
+ # @return [String]
129
+ #
130
+ def universe_domain
131
+ @job_service_stub.universe_domain
132
+ end
133
+
122
134
  ##
123
135
  # Create a new JobService client object.
124
136
  #
@@ -152,8 +164,9 @@ module Google
152
164
  credentials = @config.credentials
153
165
  # Use self-signed JWT if the endpoint is unchanged from default,
154
166
  # but only if the default endpoint does not have a region prefix.
155
- enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
156
- !@config.endpoint.split(".").first.include?("-")
167
+ enable_self_signed_jwt = @config.endpoint.nil? ||
168
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
169
+ !@config.endpoint.split(".").first.include?("-"))
157
170
  credentials ||= Credentials.default scope: @config.scope,
158
171
  enable_self_signed_jwt: enable_self_signed_jwt
159
172
  if credentials.is_a?(::String) || credentials.is_a?(::Hash)
@@ -166,12 +179,15 @@ module Google
166
179
  config.credentials = credentials
167
180
  config.quota_project = @quota_project_id
168
181
  config.endpoint = @config.endpoint
182
+ config.universe_domain = @config.universe_domain
169
183
  end
170
184
 
171
185
  @job_service_stub = ::Gapic::ServiceStub.new(
172
186
  ::Google::Cloud::Talent::V4beta1::JobService::Stub,
173
- credentials: credentials,
174
- endpoint: @config.endpoint,
187
+ credentials: credentials,
188
+ endpoint: @config.endpoint,
189
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
190
+ universe_domain: @config.universe_domain,
175
191
  channel_args: @config.channel_args,
176
192
  interceptors: @config.interceptors,
177
193
  channel_pool_config: @config.channel_pool
@@ -1790,9 +1806,9 @@ module Google
1790
1806
  # end
1791
1807
  #
1792
1808
  # @!attribute [rw] endpoint
1793
- # The hostname or hostname:port of the service endpoint.
1794
- # Defaults to `"jobs.googleapis.com"`.
1795
- # @return [::String]
1809
+ # A custom service endpoint, as a hostname or hostname:port. The default is
1810
+ # nil, indicating to use the default endpoint in the current universe domain.
1811
+ # @return [::String,nil]
1796
1812
  # @!attribute [rw] credentials
1797
1813
  # Credentials to send with calls. You may provide any of the following types:
1798
1814
  # * (`String`) The path to a service account key file in JSON format
@@ -1838,13 +1854,20 @@ module Google
1838
1854
  # @!attribute [rw] quota_project
1839
1855
  # A separate project against which to charge quota.
1840
1856
  # @return [::String]
1857
+ # @!attribute [rw] universe_domain
1858
+ # The universe domain within which to make requests. This determines the
1859
+ # default endpoint URL. The default value of nil uses the environment
1860
+ # universe (usually the default "googleapis.com" universe).
1861
+ # @return [::String,nil]
1841
1862
  #
1842
1863
  class Configuration
1843
1864
  extend ::Gapic::Config
1844
1865
 
1866
+ # @private
1867
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
1845
1868
  DEFAULT_ENDPOINT = "jobs.googleapis.com"
1846
1869
 
1847
- config_attr :endpoint, DEFAULT_ENDPOINT, ::String
1870
+ config_attr :endpoint, nil, ::String, nil
1848
1871
  config_attr :credentials, nil do |value|
1849
1872
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
1850
1873
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
@@ -1859,6 +1882,7 @@ module Google
1859
1882
  config_attr :metadata, nil, ::Hash, nil
1860
1883
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
1861
1884
  config_attr :quota_project, nil, ::String, nil
1885
+ config_attr :universe_domain, nil, ::String, nil
1862
1886
 
1863
1887
  # @private
1864
1888
  def initialize parent_config = nil
@@ -26,6 +26,9 @@ module Google
26
26
  module JobService
27
27
  # Service that implements Longrunning Operations API.
28
28
  class Operations
29
+ # @private
30
+ DEFAULT_ENDPOINT_TEMPLATE = "jobs.$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 `"jobs.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 = "jobs.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
@@ -32,6 +32,9 @@ module Google
32
32
  # A service handles job management, including job CRUD, enumeration and search.
33
33
  #
34
34
  class Client
35
+ # @private
36
+ DEFAULT_ENDPOINT_TEMPLATE = "jobs.$UNIVERSE_DOMAIN$"
37
+
35
38
  include Paths
36
39
 
37
40
  # @private
@@ -121,6 +124,15 @@ module Google
121
124
  @config
122
125
  end
123
126
 
127
+ ##
128
+ # The effective universe domain
129
+ #
130
+ # @return [String]
131
+ #
132
+ def universe_domain
133
+ @job_service_stub.universe_domain
134
+ end
135
+
124
136
  ##
125
137
  # Create a new JobService REST client object.
126
138
  #
@@ -148,8 +160,9 @@ module Google
148
160
  credentials = @config.credentials
149
161
  # Use self-signed JWT if the endpoint is unchanged from default,
150
162
  # but only if the default endpoint does not have a region prefix.
151
- enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
152
- !@config.endpoint.split(".").first.include?("-")
163
+ enable_self_signed_jwt = @config.endpoint.nil? ||
164
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
165
+ !@config.endpoint.split(".").first.include?("-"))
153
166
  credentials ||= Credentials.default scope: @config.scope,
154
167
  enable_self_signed_jwt: enable_self_signed_jwt
155
168
  if credentials.is_a?(::String) || credentials.is_a?(::Hash)
@@ -163,9 +176,15 @@ module Google
163
176
  config.credentials = credentials
164
177
  config.quota_project = @quota_project_id
165
178
  config.endpoint = @config.endpoint
179
+ config.universe_domain = @config.universe_domain
166
180
  end
167
181
 
168
- @job_service_stub = ::Google::Cloud::Talent::V4beta1::JobService::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
182
+ @job_service_stub = ::Google::Cloud::Talent::V4beta1::JobService::Rest::ServiceStub.new(
183
+ endpoint: @config.endpoint,
184
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
185
+ universe_domain: @config.universe_domain,
186
+ credentials: credentials
187
+ )
169
188
  end
170
189
 
171
190
  ##
@@ -1710,9 +1729,9 @@ module Google
1710
1729
  # end
1711
1730
  #
1712
1731
  # @!attribute [rw] endpoint
1713
- # The hostname or hostname:port of the service endpoint.
1714
- # Defaults to `"jobs.googleapis.com"`.
1715
- # @return [::String]
1732
+ # A custom service endpoint, as a hostname or hostname:port. The default is
1733
+ # nil, indicating to use the default endpoint in the current universe domain.
1734
+ # @return [::String,nil]
1716
1735
  # @!attribute [rw] credentials
1717
1736
  # Credentials to send with calls. You may provide any of the following types:
1718
1737
  # * (`String`) The path to a service account key file in JSON format
@@ -1749,13 +1768,20 @@ module Google
1749
1768
  # @!attribute [rw] quota_project
1750
1769
  # A separate project against which to charge quota.
1751
1770
  # @return [::String]
1771
+ # @!attribute [rw] universe_domain
1772
+ # The universe domain within which to make requests. This determines the
1773
+ # default endpoint URL. The default value of nil uses the environment
1774
+ # universe (usually the default "googleapis.com" universe).
1775
+ # @return [::String,nil]
1752
1776
  #
1753
1777
  class Configuration
1754
1778
  extend ::Gapic::Config
1755
1779
 
1780
+ # @private
1781
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
1756
1782
  DEFAULT_ENDPOINT = "jobs.googleapis.com"
1757
1783
 
1758
- config_attr :endpoint, DEFAULT_ENDPOINT, ::String
1784
+ config_attr :endpoint, nil, ::String, nil
1759
1785
  config_attr :credentials, nil do |value|
1760
1786
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
1761
1787
  allowed.any? { |klass| klass === value }
@@ -1767,6 +1793,7 @@ module Google
1767
1793
  config_attr :metadata, nil, ::Hash, nil
1768
1794
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
1769
1795
  config_attr :quota_project, nil, ::String, nil
1796
+ config_attr :universe_domain, nil, ::String, nil
1770
1797
 
1771
1798
  # @private
1772
1799
  def initialize parent_config = nil
@@ -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 = "jobs.$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 `"jobs.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 = "jobs.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_job REST call
45
57
  #