google-cloud-talent-v4 0.11.0 → 0.12.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/v4/company_service/client.rb +31 -8
  4. data/lib/google/cloud/talent/v4/company_service/rest/client.rb +33 -7
  5. data/lib/google/cloud/talent/v4/company_service/rest/service_stub.rb +14 -2
  6. data/lib/google/cloud/talent/v4/completion/client.rb +31 -8
  7. data/lib/google/cloud/talent/v4/completion/rest/client.rb +33 -7
  8. data/lib/google/cloud/talent/v4/completion/rest/service_stub.rb +14 -2
  9. data/lib/google/cloud/talent/v4/event_service/client.rb +31 -8
  10. data/lib/google/cloud/talent/v4/event_service/rest/client.rb +33 -7
  11. data/lib/google/cloud/talent/v4/event_service/rest/service_stub.rb +14 -2
  12. data/lib/google/cloud/talent/v4/job_service/client.rb +32 -8
  13. data/lib/google/cloud/talent/v4/job_service/operations.rb +28 -6
  14. data/lib/google/cloud/talent/v4/job_service/rest/client.rb +34 -7
  15. data/lib/google/cloud/talent/v4/job_service/rest/operations.rb +33 -8
  16. data/lib/google/cloud/talent/v4/job_service/rest/service_stub.rb +14 -2
  17. data/lib/google/cloud/talent/v4/tenant_service/client.rb +31 -8
  18. data/lib/google/cloud/talent/v4/tenant_service/rest/client.rb +33 -7
  19. data/lib/google/cloud/talent/v4/tenant_service/rest/service_stub.rb +14 -2
  20. data/lib/google/cloud/talent/v4/version.rb +1 -1
  21. data/proto_docs/google/api/client.rb +14 -0
  22. data/proto_docs/google/cloud/talent/v4/common.rb +1 -0
  23. data/proto_docs/google/cloud/talent/v4/company.rb +1 -0
  24. data/proto_docs/google/cloud/talent/v4/job.rb +1 -0
  25. data/proto_docs/google/cloud/talent/v4/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::V4::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
@@ -274,9 +289,9 @@ module Google
274
289
  # end
275
290
  #
276
291
  # @!attribute [rw] endpoint
277
- # The hostname or hostname:port of the service endpoint.
278
- # Defaults to `"jobs.googleapis.com"`.
279
- # @return [::String]
292
+ # A custom service endpoint, as a hostname or hostname:port. The default is
293
+ # nil, indicating to use the default endpoint in the current universe domain.
294
+ # @return [::String,nil]
280
295
  # @!attribute [rw] credentials
281
296
  # Credentials to send with calls. You may provide any of the following types:
282
297
  # * (`String`) The path to a service account key file in JSON format
@@ -322,13 +337,20 @@ module Google
322
337
  # @!attribute [rw] quota_project
323
338
  # A separate project against which to charge quota.
324
339
  # @return [::String]
340
+ # @!attribute [rw] universe_domain
341
+ # The universe domain within which to make requests. This determines the
342
+ # default endpoint URL. The default value of nil uses the environment
343
+ # universe (usually the default "googleapis.com" universe).
344
+ # @return [::String,nil]
325
345
  #
326
346
  class Configuration
327
347
  extend ::Gapic::Config
328
348
 
349
+ # @private
350
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
329
351
  DEFAULT_ENDPOINT = "jobs.googleapis.com"
330
352
 
331
- config_attr :endpoint, DEFAULT_ENDPOINT, ::String
353
+ config_attr :endpoint, nil, ::String, nil
332
354
  config_attr :credentials, nil do |value|
333
355
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
334
356
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
@@ -343,6 +365,7 @@ module Google
343
365
  config_attr :metadata, nil, ::Hash, nil
344
366
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
345
367
  config_attr :quota_project, nil, ::String, nil
368
+ config_attr :universe_domain, nil, ::String, nil
346
369
 
347
370
  # @private
348
371
  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::V4::EventService::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
148
+ @event_service_stub = ::Google::Cloud::Talent::V4::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
@@ -257,9 +275,9 @@ module Google
257
275
  # end
258
276
  #
259
277
  # @!attribute [rw] endpoint
260
- # The hostname or hostname:port of the service endpoint.
261
- # Defaults to `"jobs.googleapis.com"`.
262
- # @return [::String]
278
+ # A custom service endpoint, as a hostname or hostname:port. The default is
279
+ # nil, indicating to use the default endpoint in the current universe domain.
280
+ # @return [::String,nil]
263
281
  # @!attribute [rw] credentials
264
282
  # Credentials to send with calls. You may provide any of the following types:
265
283
  # * (`String`) The path to a service account key file in JSON format
@@ -296,13 +314,20 @@ module Google
296
314
  # @!attribute [rw] quota_project
297
315
  # A separate project against which to charge quota.
298
316
  # @return [::String]
317
+ # @!attribute [rw] universe_domain
318
+ # The universe domain within which to make requests. This determines the
319
+ # default endpoint URL. The default value of nil uses the environment
320
+ # universe (usually the default "googleapis.com" universe).
321
+ # @return [::String,nil]
299
322
  #
300
323
  class Configuration
301
324
  extend ::Gapic::Config
302
325
 
326
+ # @private
327
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
303
328
  DEFAULT_ENDPOINT = "jobs.googleapis.com"
304
329
 
305
- config_attr :endpoint, DEFAULT_ENDPOINT, ::String
330
+ config_attr :endpoint, nil, ::String, nil
306
331
  config_attr :credentials, nil do |value|
307
332
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
308
333
  allowed.any? { |klass| klass === value }
@@ -314,6 +339,7 @@ module Google
314
339
  config_attr :metadata, nil, ::Hash, nil
315
340
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
316
341
  config_attr :quota_project, nil, ::String, nil
342
+ config_attr :universe_domain, nil, ::String, nil
317
343
 
318
344
  # @private
319
345
  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
@@ -117,6 +120,15 @@ module Google
117
120
  @config
118
121
  end
119
122
 
123
+ ##
124
+ # The effective universe domain
125
+ #
126
+ # @return [String]
127
+ #
128
+ def universe_domain
129
+ @job_service_stub.universe_domain
130
+ end
131
+
120
132
  ##
121
133
  # Create a new JobService client object.
122
134
  #
@@ -150,8 +162,9 @@ module Google
150
162
  credentials = @config.credentials
151
163
  # Use self-signed JWT if the endpoint is unchanged from default,
152
164
  # but only if the default endpoint does not have a region prefix.
153
- enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
154
- !@config.endpoint.split(".").first.include?("-")
165
+ enable_self_signed_jwt = @config.endpoint.nil? ||
166
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
167
+ !@config.endpoint.split(".").first.include?("-"))
155
168
  credentials ||= Credentials.default scope: @config.scope,
156
169
  enable_self_signed_jwt: enable_self_signed_jwt
157
170
  if credentials.is_a?(::String) || credentials.is_a?(::Hash)
@@ -164,12 +177,15 @@ module Google
164
177
  config.credentials = credentials
165
178
  config.quota_project = @quota_project_id
166
179
  config.endpoint = @config.endpoint
180
+ config.universe_domain = @config.universe_domain
167
181
  end
168
182
 
169
183
  @job_service_stub = ::Gapic::ServiceStub.new(
170
184
  ::Google::Cloud::Talent::V4::JobService::Stub,
171
- credentials: credentials,
172
- endpoint: @config.endpoint,
185
+ credentials: credentials,
186
+ endpoint: @config.endpoint,
187
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
188
+ universe_domain: @config.universe_domain,
173
189
  channel_args: @config.channel_args,
174
190
  interceptors: @config.interceptors,
175
191
  channel_pool_config: @config.channel_pool
@@ -1768,9 +1784,9 @@ module Google
1768
1784
  # end
1769
1785
  #
1770
1786
  # @!attribute [rw] endpoint
1771
- # The hostname or hostname:port of the service endpoint.
1772
- # Defaults to `"jobs.googleapis.com"`.
1773
- # @return [::String]
1787
+ # A custom service endpoint, as a hostname or hostname:port. The default is
1788
+ # nil, indicating to use the default endpoint in the current universe domain.
1789
+ # @return [::String,nil]
1774
1790
  # @!attribute [rw] credentials
1775
1791
  # Credentials to send with calls. You may provide any of the following types:
1776
1792
  # * (`String`) The path to a service account key file in JSON format
@@ -1816,13 +1832,20 @@ module Google
1816
1832
  # @!attribute [rw] quota_project
1817
1833
  # A separate project against which to charge quota.
1818
1834
  # @return [::String]
1835
+ # @!attribute [rw] universe_domain
1836
+ # The universe domain within which to make requests. This determines the
1837
+ # default endpoint URL. The default value of nil uses the environment
1838
+ # universe (usually the default "googleapis.com" universe).
1839
+ # @return [::String,nil]
1819
1840
  #
1820
1841
  class Configuration
1821
1842
  extend ::Gapic::Config
1822
1843
 
1844
+ # @private
1845
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
1823
1846
  DEFAULT_ENDPOINT = "jobs.googleapis.com"
1824
1847
 
1825
- config_attr :endpoint, DEFAULT_ENDPOINT, ::String
1848
+ config_attr :endpoint, nil, ::String, nil
1826
1849
  config_attr :credentials, nil do |value|
1827
1850
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
1828
1851
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
@@ -1837,6 +1860,7 @@ module Google
1837
1860
  config_attr :metadata, nil, ::Hash, nil
1838
1861
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
1839
1862
  config_attr :quota_project, nil, ::String, nil
1863
+ config_attr :universe_domain, nil, ::String, nil
1840
1864
 
1841
1865
  # @private
1842
1866
  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
@@ -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 REST client object.
124
136
  #
@@ -146,8 +158,9 @@ module Google
146
158
  credentials = @config.credentials
147
159
  # Use self-signed JWT if the endpoint is unchanged from default,
148
160
  # but only if the default endpoint does not have a region prefix.
149
- enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
150
- !@config.endpoint.split(".").first.include?("-")
161
+ enable_self_signed_jwt = @config.endpoint.nil? ||
162
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
163
+ !@config.endpoint.split(".").first.include?("-"))
151
164
  credentials ||= Credentials.default scope: @config.scope,
152
165
  enable_self_signed_jwt: enable_self_signed_jwt
153
166
  if credentials.is_a?(::String) || credentials.is_a?(::Hash)
@@ -161,9 +174,15 @@ module Google
161
174
  config.credentials = credentials
162
175
  config.quota_project = @quota_project_id
163
176
  config.endpoint = @config.endpoint
177
+ config.universe_domain = @config.universe_domain
164
178
  end
165
179
 
166
- @job_service_stub = ::Google::Cloud::Talent::V4::JobService::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
180
+ @job_service_stub = ::Google::Cloud::Talent::V4::JobService::Rest::ServiceStub.new(
181
+ endpoint: @config.endpoint,
182
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
183
+ universe_domain: @config.universe_domain,
184
+ credentials: credentials
185
+ )
167
186
  end
168
187
 
169
188
  ##
@@ -1688,9 +1707,9 @@ module Google
1688
1707
  # end
1689
1708
  #
1690
1709
  # @!attribute [rw] endpoint
1691
- # The hostname or hostname:port of the service endpoint.
1692
- # Defaults to `"jobs.googleapis.com"`.
1693
- # @return [::String]
1710
+ # A custom service endpoint, as a hostname or hostname:port. The default is
1711
+ # nil, indicating to use the default endpoint in the current universe domain.
1712
+ # @return [::String,nil]
1694
1713
  # @!attribute [rw] credentials
1695
1714
  # Credentials to send with calls. You may provide any of the following types:
1696
1715
  # * (`String`) The path to a service account key file in JSON format
@@ -1727,13 +1746,20 @@ module Google
1727
1746
  # @!attribute [rw] quota_project
1728
1747
  # A separate project against which to charge quota.
1729
1748
  # @return [::String]
1749
+ # @!attribute [rw] universe_domain
1750
+ # The universe domain within which to make requests. This determines the
1751
+ # default endpoint URL. The default value of nil uses the environment
1752
+ # universe (usually the default "googleapis.com" universe).
1753
+ # @return [::String,nil]
1730
1754
  #
1731
1755
  class Configuration
1732
1756
  extend ::Gapic::Config
1733
1757
 
1758
+ # @private
1759
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
1734
1760
  DEFAULT_ENDPOINT = "jobs.googleapis.com"
1735
1761
 
1736
- config_attr :endpoint, DEFAULT_ENDPOINT, ::String
1762
+ config_attr :endpoint, nil, ::String, nil
1737
1763
  config_attr :credentials, nil do |value|
1738
1764
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
1739
1765
  allowed.any? { |klass| klass === value }
@@ -1745,6 +1771,7 @@ module Google
1745
1771
  config_attr :metadata, nil, ::Hash, nil
1746
1772
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
1747
1773
  config_attr :quota_project, nil, ::String, nil
1774
+ config_attr :universe_domain, nil, ::String, nil
1748
1775
 
1749
1776
  # @private
1750
1777
  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
  #