google-cloud-talent-v4 0.4.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +8 -8
- data/README.md +1 -1
- data/lib/google/cloud/talent/v4/common_pb.rb +3 -0
- data/lib/google/cloud/talent/v4/company_service/client.rb +48 -54
- data/lib/google/cloud/talent/v4/completion/client.rb +34 -42
- data/lib/google/cloud/talent/v4/event_service/client.rb +33 -38
- data/lib/google/cloud/talent/v4/job_service/client.rb +77 -62
- data/lib/google/cloud/talent/v4/job_service/operations.rb +34 -25
- data/lib/google/cloud/talent/v4/tenant_service/client.rb +48 -54
- data/lib/google/cloud/talent/v4/version.rb +1 -1
- data/proto_docs/google/api/field_behavior.rb +7 -1
- data/proto_docs/google/cloud/talent/v4/common.rb +12 -1
- data/proto_docs/google/cloud/talent/v4/filters.rb +12 -8
- data/proto_docs/google/cloud/talent/v4/job.rb +9 -0
- data/proto_docs/google/cloud/talent/v4/job_service.rb +10 -2
- data/proto_docs/google/type/money.rb +1 -1
- data/proto_docs/google/type/timeofday.rb +2 -1
- metadata +13 -7
@@ -41,13 +41,12 @@ module Google
|
|
41
41
|
# See {::Google::Cloud::Talent::V4::JobService::Client::Configuration}
|
42
42
|
# for a description of the configuration fields.
|
43
43
|
#
|
44
|
-
#
|
44
|
+
# @example
|
45
45
|
#
|
46
|
-
#
|
47
|
-
#
|
48
|
-
#
|
49
|
-
#
|
50
|
-
# end
|
46
|
+
# # Modify the configuration for all JobService clients
|
47
|
+
# ::Google::Cloud::Talent::V4::JobService::Client.configure do |config|
|
48
|
+
# config.timeout = 10.0
|
49
|
+
# end
|
51
50
|
#
|
52
51
|
# @yield [config] Configure the Client client.
|
53
52
|
# @yieldparam config [Client::Configuration]
|
@@ -71,10 +70,7 @@ module Google
|
|
71
70
|
|
72
71
|
default_config.rpcs.get_job.timeout = 30.0
|
73
72
|
default_config.rpcs.get_job.retry_policy = {
|
74
|
-
initial_delay: 0.1,
|
75
|
-
max_delay: 60.0,
|
76
|
-
multiplier: 1.3,
|
77
|
-
retry_codes: [4, 14]
|
73
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
78
74
|
}
|
79
75
|
|
80
76
|
default_config.rpcs.update_job.timeout = 30.0
|
@@ -83,20 +79,14 @@ module Google
|
|
83
79
|
|
84
80
|
default_config.rpcs.delete_job.timeout = 30.0
|
85
81
|
default_config.rpcs.delete_job.retry_policy = {
|
86
|
-
initial_delay: 0.1,
|
87
|
-
max_delay: 60.0,
|
88
|
-
multiplier: 1.3,
|
89
|
-
retry_codes: [4, 14]
|
82
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
90
83
|
}
|
91
84
|
|
92
85
|
default_config.rpcs.batch_delete_jobs.timeout = 30.0
|
93
86
|
|
94
87
|
default_config.rpcs.list_jobs.timeout = 30.0
|
95
88
|
default_config.rpcs.list_jobs.retry_policy = {
|
96
|
-
initial_delay: 0.1,
|
97
|
-
max_delay: 60.0,
|
98
|
-
multiplier: 1.3,
|
99
|
-
retry_codes: [4, 14]
|
89
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
100
90
|
}
|
101
91
|
|
102
92
|
default_config.rpcs.search_jobs.timeout = 30.0
|
@@ -132,19 +122,15 @@ module Google
|
|
132
122
|
##
|
133
123
|
# Create a new JobService client object.
|
134
124
|
#
|
135
|
-
#
|
136
|
-
#
|
137
|
-
# To create a new JobService client with the default
|
138
|
-
# configuration:
|
139
|
-
#
|
140
|
-
# client = ::Google::Cloud::Talent::V4::JobService::Client.new
|
125
|
+
# @example
|
141
126
|
#
|
142
|
-
#
|
143
|
-
#
|
127
|
+
# # Create a client using the default configuration
|
128
|
+
# client = ::Google::Cloud::Talent::V4::JobService::Client.new
|
144
129
|
#
|
145
|
-
#
|
146
|
-
#
|
147
|
-
#
|
130
|
+
# # Create a client using a custom configuration
|
131
|
+
# client = ::Google::Cloud::Talent::V4::JobService::Client.new do |config|
|
132
|
+
# config.timeout = 10.0
|
133
|
+
# end
|
148
134
|
#
|
149
135
|
# @yield [config] Configure the JobService client.
|
150
136
|
# @yieldparam config [Client::Configuration]
|
@@ -164,14 +150,13 @@ module Google
|
|
164
150
|
|
165
151
|
# Create credentials
|
166
152
|
credentials = @config.credentials
|
167
|
-
# Use self-signed JWT if the
|
153
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
168
154
|
# but only if the default endpoint does not have a region prefix.
|
169
|
-
enable_self_signed_jwt = @config.
|
170
|
-
@config.endpoint == Client.configure.endpoint &&
|
155
|
+
enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
|
171
156
|
!@config.endpoint.split(".").first.include?("-")
|
172
157
|
credentials ||= Credentials.default scope: @config.scope,
|
173
158
|
enable_self_signed_jwt: enable_self_signed_jwt
|
174
|
-
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
159
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
175
160
|
credentials = Credentials.new credentials, scope: @config.scope
|
176
161
|
end
|
177
162
|
@quota_project_id = @config.quota_project
|
@@ -263,7 +248,9 @@ module Google
|
|
263
248
|
options.apply_defaults timeout: @config.rpcs.create_job.timeout,
|
264
249
|
metadata: metadata,
|
265
250
|
retry_policy: @config.rpcs.create_job.retry_policy
|
266
|
-
|
251
|
+
|
252
|
+
options.apply_defaults timeout: @config.timeout,
|
253
|
+
metadata: @config.metadata,
|
267
254
|
retry_policy: @config.retry_policy
|
268
255
|
|
269
256
|
@job_service_stub.call_rpc :create_job, request, options: options do |response, operation|
|
@@ -335,7 +322,9 @@ module Google
|
|
335
322
|
options.apply_defaults timeout: @config.rpcs.batch_create_jobs.timeout,
|
336
323
|
metadata: metadata,
|
337
324
|
retry_policy: @config.rpcs.batch_create_jobs.retry_policy
|
338
|
-
|
325
|
+
|
326
|
+
options.apply_defaults timeout: @config.timeout,
|
327
|
+
metadata: @config.metadata,
|
339
328
|
retry_policy: @config.retry_policy
|
340
329
|
|
341
330
|
@job_service_stub.call_rpc :batch_create_jobs, request, options: options do |response, operation|
|
@@ -407,7 +396,9 @@ module Google
|
|
407
396
|
options.apply_defaults timeout: @config.rpcs.get_job.timeout,
|
408
397
|
metadata: metadata,
|
409
398
|
retry_policy: @config.rpcs.get_job.retry_policy
|
410
|
-
|
399
|
+
|
400
|
+
options.apply_defaults timeout: @config.timeout,
|
401
|
+
metadata: @config.metadata,
|
411
402
|
retry_policy: @config.retry_policy
|
412
403
|
|
413
404
|
@job_service_stub.call_rpc :get_job, request, options: options do |response, operation|
|
@@ -484,7 +475,9 @@ module Google
|
|
484
475
|
options.apply_defaults timeout: @config.rpcs.update_job.timeout,
|
485
476
|
metadata: metadata,
|
486
477
|
retry_policy: @config.rpcs.update_job.retry_policy
|
487
|
-
|
478
|
+
|
479
|
+
options.apply_defaults timeout: @config.timeout,
|
480
|
+
metadata: @config.metadata,
|
488
481
|
retry_policy: @config.retry_policy
|
489
482
|
|
490
483
|
@job_service_stub.call_rpc :update_job, request, options: options do |response, operation|
|
@@ -571,7 +564,9 @@ module Google
|
|
571
564
|
options.apply_defaults timeout: @config.rpcs.batch_update_jobs.timeout,
|
572
565
|
metadata: metadata,
|
573
566
|
retry_policy: @config.rpcs.batch_update_jobs.retry_policy
|
574
|
-
|
567
|
+
|
568
|
+
options.apply_defaults timeout: @config.timeout,
|
569
|
+
metadata: @config.metadata,
|
575
570
|
retry_policy: @config.retry_policy
|
576
571
|
|
577
572
|
@job_service_stub.call_rpc :batch_update_jobs, request, options: options do |response, operation|
|
@@ -645,7 +640,9 @@ module Google
|
|
645
640
|
options.apply_defaults timeout: @config.rpcs.delete_job.timeout,
|
646
641
|
metadata: metadata,
|
647
642
|
retry_policy: @config.rpcs.delete_job.retry_policy
|
648
|
-
|
643
|
+
|
644
|
+
options.apply_defaults timeout: @config.timeout,
|
645
|
+
metadata: @config.metadata,
|
649
646
|
retry_policy: @config.retry_policy
|
650
647
|
|
651
648
|
@job_service_stub.call_rpc :delete_job, request, options: options do |response, operation|
|
@@ -723,7 +720,9 @@ module Google
|
|
723
720
|
options.apply_defaults timeout: @config.rpcs.batch_delete_jobs.timeout,
|
724
721
|
metadata: metadata,
|
725
722
|
retry_policy: @config.rpcs.batch_delete_jobs.retry_policy
|
726
|
-
|
723
|
+
|
724
|
+
options.apply_defaults timeout: @config.timeout,
|
725
|
+
metadata: @config.metadata,
|
727
726
|
retry_policy: @config.retry_policy
|
728
727
|
|
729
728
|
@job_service_stub.call_rpc :batch_delete_jobs, request, options: options do |response, operation|
|
@@ -765,11 +764,14 @@ module Google
|
|
765
764
|
#
|
766
765
|
# The fields eligible for filtering are:
|
767
766
|
#
|
768
|
-
# * `companyName`
|
767
|
+
# * `companyName`
|
769
768
|
# * `requisitionId`
|
770
769
|
# * `status` Available values: OPEN, EXPIRED, ALL. Defaults to
|
771
770
|
# OPEN if no value is specified.
|
772
771
|
#
|
772
|
+
# At least one of `companyName` and `requisitionId` must present or an
|
773
|
+
# INVALID_ARGUMENT error is thrown.
|
774
|
+
#
|
773
775
|
# Sample Query:
|
774
776
|
#
|
775
777
|
# * companyName = "projects/foo/tenants/bar/companies/baz"
|
@@ -777,6 +779,8 @@ module Google
|
|
777
779
|
# requisitionId = "req-1"
|
778
780
|
# * companyName = "projects/foo/tenants/bar/companies/baz" AND
|
779
781
|
# status = "EXPIRED"
|
782
|
+
# * requisitionId = "req-1"
|
783
|
+
# * requisitionId = "req-1" AND status = "EXPIRED"
|
780
784
|
# @param page_token [::String]
|
781
785
|
# The starting point of a query result.
|
782
786
|
# @param page_size [::Integer]
|
@@ -825,7 +829,9 @@ module Google
|
|
825
829
|
options.apply_defaults timeout: @config.rpcs.list_jobs.timeout,
|
826
830
|
metadata: metadata,
|
827
831
|
retry_policy: @config.rpcs.list_jobs.retry_policy
|
828
|
-
|
832
|
+
|
833
|
+
options.apply_defaults timeout: @config.timeout,
|
834
|
+
metadata: @config.metadata,
|
829
835
|
retry_policy: @config.retry_policy
|
830
836
|
|
831
837
|
@job_service_stub.call_rpc :list_jobs, request, options: options do |response, operation|
|
@@ -918,6 +924,9 @@ module Google
|
|
918
924
|
# "FULL_TIME", "PART_TIME".
|
919
925
|
# * company_size: histogram by {::Google::Cloud::Talent::V4::CompanySize CompanySize}, for example, "SMALL",
|
920
926
|
# "MEDIUM", "BIG".
|
927
|
+
# * publish_time_in_day: histogram by the {::Google::Cloud::Talent::V4::Job#posting_publish_time Job.posting_publish_time}
|
928
|
+
# in days.
|
929
|
+
# Must specify list of numeric buckets in spec.
|
921
930
|
# * publish_time_in_month: histogram by the {::Google::Cloud::Talent::V4::Job#posting_publish_time Job.posting_publish_time}
|
922
931
|
# in months.
|
923
932
|
# Must specify list of numeric buckets in spec.
|
@@ -971,7 +980,7 @@ module Google
|
|
971
980
|
# bucket(100000, MAX)])`
|
972
981
|
# * `count(string_custom_attribute["some-string-custom-attribute"])`
|
973
982
|
# * `count(numeric_custom_attribute["some-numeric-custom-attribute"],
|
974
|
-
# [bucket(MIN, 0, "negative"), bucket(0, MAX, "non-negative"])`
|
983
|
+
# [bucket(MIN, 0, "negative"), bucket(0, MAX, "non-negative")])`
|
975
984
|
# @param job_view [::Google::Cloud::Talent::V4::JobView]
|
976
985
|
# The desired job attributes returned for jobs in the search response.
|
977
986
|
# Defaults to {::Google::Cloud::Talent::V4::JobView::JOB_VIEW_SMALL JobView.JOB_VIEW_SMALL} if no value is specified.
|
@@ -1113,7 +1122,9 @@ module Google
|
|
1113
1122
|
options.apply_defaults timeout: @config.rpcs.search_jobs.timeout,
|
1114
1123
|
metadata: metadata,
|
1115
1124
|
retry_policy: @config.rpcs.search_jobs.retry_policy
|
1116
|
-
|
1125
|
+
|
1126
|
+
options.apply_defaults timeout: @config.timeout,
|
1127
|
+
metadata: @config.metadata,
|
1117
1128
|
retry_policy: @config.retry_policy
|
1118
1129
|
|
1119
1130
|
@job_service_stub.call_rpc :search_jobs, request, options: options do |response, operation|
|
@@ -1210,6 +1221,9 @@ module Google
|
|
1210
1221
|
# "FULL_TIME", "PART_TIME".
|
1211
1222
|
# * company_size: histogram by {::Google::Cloud::Talent::V4::CompanySize CompanySize}, for example, "SMALL",
|
1212
1223
|
# "MEDIUM", "BIG".
|
1224
|
+
# * publish_time_in_day: histogram by the {::Google::Cloud::Talent::V4::Job#posting_publish_time Job.posting_publish_time}
|
1225
|
+
# in days.
|
1226
|
+
# Must specify list of numeric buckets in spec.
|
1213
1227
|
# * publish_time_in_month: histogram by the {::Google::Cloud::Talent::V4::Job#posting_publish_time Job.posting_publish_time}
|
1214
1228
|
# in months.
|
1215
1229
|
# Must specify list of numeric buckets in spec.
|
@@ -1263,7 +1277,7 @@ module Google
|
|
1263
1277
|
# bucket(100000, MAX)])`
|
1264
1278
|
# * `count(string_custom_attribute["some-string-custom-attribute"])`
|
1265
1279
|
# * `count(numeric_custom_attribute["some-numeric-custom-attribute"],
|
1266
|
-
# [bucket(MIN, 0, "negative"), bucket(0, MAX, "non-negative"])`
|
1280
|
+
# [bucket(MIN, 0, "negative"), bucket(0, MAX, "non-negative")])`
|
1267
1281
|
# @param job_view [::Google::Cloud::Talent::V4::JobView]
|
1268
1282
|
# The desired job attributes returned for jobs in the search response.
|
1269
1283
|
# Defaults to {::Google::Cloud::Talent::V4::JobView::JOB_VIEW_SMALL JobView.JOB_VIEW_SMALL} if no value is specified.
|
@@ -1405,7 +1419,9 @@ module Google
|
|
1405
1419
|
options.apply_defaults timeout: @config.rpcs.search_jobs_for_alert.timeout,
|
1406
1420
|
metadata: metadata,
|
1407
1421
|
retry_policy: @config.rpcs.search_jobs_for_alert.retry_policy
|
1408
|
-
|
1422
|
+
|
1423
|
+
options.apply_defaults timeout: @config.timeout,
|
1424
|
+
metadata: @config.metadata,
|
1409
1425
|
retry_policy: @config.retry_policy
|
1410
1426
|
|
1411
1427
|
@job_service_stub.call_rpc :search_jobs_for_alert, request, options: options do |response, operation|
|
@@ -1429,22 +1445,21 @@ module Google
|
|
1429
1445
|
# Configuration can be applied globally to all clients, or to a single client
|
1430
1446
|
# on construction.
|
1431
1447
|
#
|
1432
|
-
#
|
1433
|
-
#
|
1434
|
-
#
|
1435
|
-
# to 20 seconds,
|
1436
|
-
#
|
1437
|
-
#
|
1438
|
-
#
|
1439
|
-
#
|
1440
|
-
#
|
1441
|
-
#
|
1442
|
-
#
|
1443
|
-
#
|
1444
|
-
#
|
1445
|
-
#
|
1446
|
-
#
|
1447
|
-
# end
|
1448
|
+
# @example
|
1449
|
+
#
|
1450
|
+
# # Modify the global config, setting the timeout for
|
1451
|
+
# # create_job to 20 seconds,
|
1452
|
+
# # and all remaining timeouts to 10 seconds.
|
1453
|
+
# ::Google::Cloud::Talent::V4::JobService::Client.configure do |config|
|
1454
|
+
# config.timeout = 10.0
|
1455
|
+
# config.rpcs.create_job.timeout = 20.0
|
1456
|
+
# end
|
1457
|
+
#
|
1458
|
+
# # Apply the above configuration only to a new client.
|
1459
|
+
# client = ::Google::Cloud::Talent::V4::JobService::Client.new do |config|
|
1460
|
+
# config.timeout = 10.0
|
1461
|
+
# config.rpcs.create_job.timeout = 20.0
|
1462
|
+
# end
|
1448
1463
|
#
|
1449
1464
|
# @!attribute [rw] endpoint
|
1450
1465
|
# The hostname or hostname:port of the service endpoint.
|
@@ -82,7 +82,7 @@ module Google
|
|
82
82
|
# Create credentials
|
83
83
|
credentials = @config.credentials
|
84
84
|
credentials ||= Credentials.default scope: @config.scope
|
85
|
-
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
85
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
86
86
|
credentials = Credentials.new credentials, scope: @config.scope
|
87
87
|
end
|
88
88
|
@quota_project_id = @config.quota_project
|
@@ -169,7 +169,9 @@ module Google
|
|
169
169
|
options.apply_defaults timeout: @config.rpcs.list_operations.timeout,
|
170
170
|
metadata: metadata,
|
171
171
|
retry_policy: @config.rpcs.list_operations.retry_policy
|
172
|
-
|
172
|
+
|
173
|
+
options.apply_defaults timeout: @config.timeout,
|
174
|
+
metadata: @config.metadata,
|
173
175
|
retry_policy: @config.retry_policy
|
174
176
|
|
175
177
|
@operations_stub.call_rpc :list_operations, request, options: options do |response, operation|
|
@@ -239,7 +241,9 @@ module Google
|
|
239
241
|
options.apply_defaults timeout: @config.rpcs.get_operation.timeout,
|
240
242
|
metadata: metadata,
|
241
243
|
retry_policy: @config.rpcs.get_operation.retry_policy
|
242
|
-
|
244
|
+
|
245
|
+
options.apply_defaults timeout: @config.timeout,
|
246
|
+
metadata: @config.metadata,
|
243
247
|
retry_policy: @config.retry_policy
|
244
248
|
|
245
249
|
@operations_stub.call_rpc :get_operation, request, options: options do |response, operation|
|
@@ -309,7 +313,9 @@ module Google
|
|
309
313
|
options.apply_defaults timeout: @config.rpcs.delete_operation.timeout,
|
310
314
|
metadata: metadata,
|
311
315
|
retry_policy: @config.rpcs.delete_operation.retry_policy
|
312
|
-
|
316
|
+
|
317
|
+
options.apply_defaults timeout: @config.timeout,
|
318
|
+
metadata: @config.metadata,
|
313
319
|
retry_policy: @config.retry_policy
|
314
320
|
|
315
321
|
@operations_stub.call_rpc :delete_operation, request, options: options do |response, operation|
|
@@ -384,7 +390,9 @@ module Google
|
|
384
390
|
options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout,
|
385
391
|
metadata: metadata,
|
386
392
|
retry_policy: @config.rpcs.cancel_operation.retry_policy
|
387
|
-
|
393
|
+
|
394
|
+
options.apply_defaults timeout: @config.timeout,
|
395
|
+
metadata: @config.metadata,
|
388
396
|
retry_policy: @config.retry_policy
|
389
397
|
|
390
398
|
@operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation|
|
@@ -396,9 +404,9 @@ module Google
|
|
396
404
|
end
|
397
405
|
|
398
406
|
##
|
399
|
-
# Waits
|
400
|
-
#
|
401
|
-
#
|
407
|
+
# Waits until the specified long-running operation is done or reaches at most
|
408
|
+
# a specified timeout, returning the latest state. If the operation is
|
409
|
+
# already done, the latest state is immediately returned. If the timeout
|
402
410
|
# specified is greater than the default HTTP/RPC timeout, the HTTP/RPC
|
403
411
|
# timeout is used. If the server does not support this method, it returns
|
404
412
|
# `google.rpc.Code.UNIMPLEMENTED`.
|
@@ -456,7 +464,9 @@ module Google
|
|
456
464
|
options.apply_defaults timeout: @config.rpcs.wait_operation.timeout,
|
457
465
|
metadata: metadata,
|
458
466
|
retry_policy: @config.rpcs.wait_operation.retry_policy
|
459
|
-
|
467
|
+
|
468
|
+
options.apply_defaults timeout: @config.timeout,
|
469
|
+
metadata: @config.metadata,
|
460
470
|
retry_policy: @config.retry_policy
|
461
471
|
|
462
472
|
@operations_stub.call_rpc :wait_operation, request, options: options do |response, operation|
|
@@ -481,22 +491,21 @@ module Google
|
|
481
491
|
# Configuration can be applied globally to all clients, or to a single client
|
482
492
|
# on construction.
|
483
493
|
#
|
484
|
-
#
|
485
|
-
#
|
486
|
-
#
|
487
|
-
# to 20 seconds,
|
488
|
-
#
|
489
|
-
#
|
490
|
-
#
|
491
|
-
#
|
492
|
-
#
|
493
|
-
#
|
494
|
-
#
|
495
|
-
#
|
496
|
-
#
|
497
|
-
#
|
498
|
-
#
|
499
|
-
# end
|
494
|
+
# @example
|
495
|
+
#
|
496
|
+
# # Modify the global config, setting the timeout for
|
497
|
+
# # list_operations to 20 seconds,
|
498
|
+
# # and all remaining timeouts to 10 seconds.
|
499
|
+
# ::Google::Longrunning::Operations::Client.configure do |config|
|
500
|
+
# config.timeout = 10.0
|
501
|
+
# config.rpcs.list_operations.timeout = 20.0
|
502
|
+
# end
|
503
|
+
#
|
504
|
+
# # Apply the above configuration only to a new client.
|
505
|
+
# client = ::Google::Longrunning::Operations::Client.new do |config|
|
506
|
+
# config.timeout = 10.0
|
507
|
+
# config.rpcs.list_operations.timeout = 20.0
|
508
|
+
# end
|
500
509
|
#
|
501
510
|
# @!attribute [rw] endpoint
|
502
511
|
# The hostname or hostname:port of the service endpoint.
|
@@ -41,13 +41,12 @@ module Google
|
|
41
41
|
# See {::Google::Cloud::Talent::V4::TenantService::Client::Configuration}
|
42
42
|
# for a description of the configuration fields.
|
43
43
|
#
|
44
|
-
#
|
44
|
+
# @example
|
45
45
|
#
|
46
|
-
#
|
47
|
-
#
|
48
|
-
#
|
49
|
-
#
|
50
|
-
# end
|
46
|
+
# # Modify the configuration for all TenantService clients
|
47
|
+
# ::Google::Cloud::Talent::V4::TenantService::Client.configure do |config|
|
48
|
+
# config.timeout = 10.0
|
49
|
+
# end
|
51
50
|
#
|
52
51
|
# @yield [config] Configure the Client client.
|
53
52
|
# @yieldparam config [Client::Configuration]
|
@@ -69,28 +68,19 @@ module Google
|
|
69
68
|
|
70
69
|
default_config.rpcs.get_tenant.timeout = 30.0
|
71
70
|
default_config.rpcs.get_tenant.retry_policy = {
|
72
|
-
initial_delay: 0.1,
|
73
|
-
max_delay: 60.0,
|
74
|
-
multiplier: 1.3,
|
75
|
-
retry_codes: [4, 14]
|
71
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
76
72
|
}
|
77
73
|
|
78
74
|
default_config.rpcs.update_tenant.timeout = 30.0
|
79
75
|
|
80
76
|
default_config.rpcs.delete_tenant.timeout = 30.0
|
81
77
|
default_config.rpcs.delete_tenant.retry_policy = {
|
82
|
-
initial_delay: 0.1,
|
83
|
-
max_delay: 60.0,
|
84
|
-
multiplier: 1.3,
|
85
|
-
retry_codes: [4, 14]
|
78
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
86
79
|
}
|
87
80
|
|
88
81
|
default_config.rpcs.list_tenants.timeout = 30.0
|
89
82
|
default_config.rpcs.list_tenants.retry_policy = {
|
90
|
-
initial_delay: 0.1,
|
91
|
-
max_delay: 60.0,
|
92
|
-
multiplier: 1.3,
|
93
|
-
retry_codes: [4, 14]
|
83
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
94
84
|
}
|
95
85
|
|
96
86
|
default_config
|
@@ -122,19 +112,15 @@ module Google
|
|
122
112
|
##
|
123
113
|
# Create a new TenantService client object.
|
124
114
|
#
|
125
|
-
#
|
126
|
-
#
|
127
|
-
# To create a new TenantService client with the default
|
128
|
-
# configuration:
|
129
|
-
#
|
130
|
-
# client = ::Google::Cloud::Talent::V4::TenantService::Client.new
|
115
|
+
# @example
|
131
116
|
#
|
132
|
-
#
|
133
|
-
#
|
117
|
+
# # Create a client using the default configuration
|
118
|
+
# client = ::Google::Cloud::Talent::V4::TenantService::Client.new
|
134
119
|
#
|
135
|
-
#
|
136
|
-
#
|
137
|
-
#
|
120
|
+
# # Create a client using a custom configuration
|
121
|
+
# client = ::Google::Cloud::Talent::V4::TenantService::Client.new do |config|
|
122
|
+
# config.timeout = 10.0
|
123
|
+
# end
|
138
124
|
#
|
139
125
|
# @yield [config] Configure the TenantService client.
|
140
126
|
# @yieldparam config [Client::Configuration]
|
@@ -154,14 +140,13 @@ module Google
|
|
154
140
|
|
155
141
|
# Create credentials
|
156
142
|
credentials = @config.credentials
|
157
|
-
# Use self-signed JWT if the
|
143
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
158
144
|
# but only if the default endpoint does not have a region prefix.
|
159
|
-
enable_self_signed_jwt = @config.
|
160
|
-
@config.endpoint == Client.configure.endpoint &&
|
145
|
+
enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
|
161
146
|
!@config.endpoint.split(".").first.include?("-")
|
162
147
|
credentials ||= Credentials.default scope: @config.scope,
|
163
148
|
enable_self_signed_jwt: enable_self_signed_jwt
|
164
|
-
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
149
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
165
150
|
credentials = Credentials.new credentials, scope: @config.scope
|
166
151
|
end
|
167
152
|
@quota_project_id = @config.quota_project
|
@@ -238,7 +223,9 @@ module Google
|
|
238
223
|
options.apply_defaults timeout: @config.rpcs.create_tenant.timeout,
|
239
224
|
metadata: metadata,
|
240
225
|
retry_policy: @config.rpcs.create_tenant.retry_policy
|
241
|
-
|
226
|
+
|
227
|
+
options.apply_defaults timeout: @config.timeout,
|
228
|
+
metadata: @config.metadata,
|
242
229
|
retry_policy: @config.retry_policy
|
243
230
|
|
244
231
|
@tenant_service_stub.call_rpc :create_tenant, request, options: options do |response, operation|
|
@@ -307,7 +294,9 @@ module Google
|
|
307
294
|
options.apply_defaults timeout: @config.rpcs.get_tenant.timeout,
|
308
295
|
metadata: metadata,
|
309
296
|
retry_policy: @config.rpcs.get_tenant.retry_policy
|
310
|
-
|
297
|
+
|
298
|
+
options.apply_defaults timeout: @config.timeout,
|
299
|
+
metadata: @config.metadata,
|
311
300
|
retry_policy: @config.retry_policy
|
312
301
|
|
313
302
|
@tenant_service_stub.call_rpc :get_tenant, request, options: options do |response, operation|
|
@@ -381,7 +370,9 @@ module Google
|
|
381
370
|
options.apply_defaults timeout: @config.rpcs.update_tenant.timeout,
|
382
371
|
metadata: metadata,
|
383
372
|
retry_policy: @config.rpcs.update_tenant.retry_policy
|
384
|
-
|
373
|
+
|
374
|
+
options.apply_defaults timeout: @config.timeout,
|
375
|
+
metadata: @config.metadata,
|
385
376
|
retry_policy: @config.retry_policy
|
386
377
|
|
387
378
|
@tenant_service_stub.call_rpc :update_tenant, request, options: options do |response, operation|
|
@@ -450,7 +441,9 @@ module Google
|
|
450
441
|
options.apply_defaults timeout: @config.rpcs.delete_tenant.timeout,
|
451
442
|
metadata: metadata,
|
452
443
|
retry_policy: @config.rpcs.delete_tenant.retry_policy
|
453
|
-
|
444
|
+
|
445
|
+
options.apply_defaults timeout: @config.timeout,
|
446
|
+
metadata: @config.metadata,
|
454
447
|
retry_policy: @config.retry_policy
|
455
448
|
|
456
449
|
@tenant_service_stub.call_rpc :delete_tenant, request, options: options do |response, operation|
|
@@ -524,7 +517,9 @@ module Google
|
|
524
517
|
options.apply_defaults timeout: @config.rpcs.list_tenants.timeout,
|
525
518
|
metadata: metadata,
|
526
519
|
retry_policy: @config.rpcs.list_tenants.retry_policy
|
527
|
-
|
520
|
+
|
521
|
+
options.apply_defaults timeout: @config.timeout,
|
522
|
+
metadata: @config.metadata,
|
528
523
|
retry_policy: @config.retry_policy
|
529
524
|
|
530
525
|
@tenant_service_stub.call_rpc :list_tenants, request, options: options do |response, operation|
|
@@ -549,22 +544,21 @@ module Google
|
|
549
544
|
# Configuration can be applied globally to all clients, or to a single client
|
550
545
|
# on construction.
|
551
546
|
#
|
552
|
-
#
|
553
|
-
#
|
554
|
-
#
|
555
|
-
# to 20 seconds,
|
556
|
-
#
|
557
|
-
#
|
558
|
-
#
|
559
|
-
#
|
560
|
-
#
|
561
|
-
#
|
562
|
-
#
|
563
|
-
#
|
564
|
-
#
|
565
|
-
#
|
566
|
-
#
|
567
|
-
# end
|
547
|
+
# @example
|
548
|
+
#
|
549
|
+
# # Modify the global config, setting the timeout for
|
550
|
+
# # create_tenant to 20 seconds,
|
551
|
+
# # and all remaining timeouts to 10 seconds.
|
552
|
+
# ::Google::Cloud::Talent::V4::TenantService::Client.configure do |config|
|
553
|
+
# config.timeout = 10.0
|
554
|
+
# config.rpcs.create_tenant.timeout = 20.0
|
555
|
+
# end
|
556
|
+
#
|
557
|
+
# # Apply the above configuration only to a new client.
|
558
|
+
# client = ::Google::Cloud::Talent::V4::TenantService::Client.new do |config|
|
559
|
+
# config.timeout = 10.0
|
560
|
+
# config.rpcs.create_tenant.timeout = 20.0
|
561
|
+
# end
|
568
562
|
#
|
569
563
|
# @!attribute [rw] endpoint
|
570
564
|
# The hostname or hostname:port of the service endpoint.
|