google-cloud-talent-v4 0.4.0 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 74cdfebbc012a648332422182cd33946bc03aaa2aa2b7be6631d3fb1454dd3d0
4
- data.tar.gz: d65accc79c4ad517405ea9b306ac5931f71dc02c644a5a284aa5272e271b9718
3
+ metadata.gz: 8e537942ec731fc39aeafa4159281e74d0d0446a4a1d6b5529c22d98c320fdfb
4
+ data.tar.gz: 11aed772767ea9711909cf20de1cddecc675ed3f859518da7a9695d62eec3568
5
5
  SHA512:
6
- metadata.gz: 8309cbecb944763bedec168bdb0a336f045da1153c765e2bd19ffe3cc6db007b0b58c7b62da5496eed22112a99e2444546d49fe300ffef91e678d963882e71ff
7
- data.tar.gz: e7b6eb2079a302eb2fd16b153fbdc4894f8b3d5e9349bfd570dbda24a938c2093dd245ff1f20d8a90acdb6d38ebba9f380d93b5f06f42e0a513f6edeb600eaec
6
+ metadata.gz: 64ad3a81914c31b2ec67fb0c0c06ce1ef58e6f36b8299105e9c9c719cc960a3d05bb850ab7642323eefd306cfb511f725d3636f50ec46424dcf5cb631f1c3759
7
+ data.tar.gz: 42f0debe5dc26d2c08b7a0dcf597591ba9198a2b8f19854b1c005c674aafed6b5034febba974f0517326d443a9ba0d16fd61a91ca2e5fc69b3540f94a69e7918
data/AUTHENTICATION.md CHANGED
@@ -66,11 +66,11 @@ The environment variables that google-cloud-talent-v4
66
66
  checks for credentials are configured on the service Credentials class (such as
67
67
  {::Google::Cloud::Talent::V4::CompanyService::Credentials}):
68
68
 
69
- 1. `TALENT_CREDENTIALS` - Path to JSON file, or JSON contents
70
- 2. `TALENT_KEYFILE` - Path to JSON file, or JSON contents
71
- 3. `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents
72
- 4. `GOOGLE_CLOUD_KEYFILE` - Path to JSON file, or JSON contents
73
- 5. `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file
69
+ * `TALENT_CREDENTIALS` - Path to JSON file, or JSON contents
70
+ * `TALENT_KEYFILE` - Path to JSON file, or JSON contents
71
+ * `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents
72
+ * `GOOGLE_CLOUD_KEYFILE` - Path to JSON file, or JSON contents
73
+ * `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file
74
74
 
75
75
  ```ruby
76
76
  require "google/cloud/talent/v4"
@@ -82,8 +82,8 @@ client = ::Google::Cloud::Talent::V4::CompanyService::Client.new
82
82
 
83
83
  ### Configuration
84
84
 
85
- The **Credentials JSON** can be configured instead of placing them in
86
- environment variables. Either on an individual client initialization:
85
+ The path to the **Credentials JSON** file can be configured instead of storing
86
+ it in an environment variable. Either on an individual client initialization:
87
87
 
88
88
  ```ruby
89
89
  require "google/cloud/talent/v4"
@@ -93,7 +93,7 @@ client = ::Google::Cloud::Talent::V4::CompanyService::Client.new do |config|
93
93
  end
94
94
  ```
95
95
 
96
- Or configured globally for all clients:
96
+ Or globally for all clients:
97
97
 
98
98
  ```ruby
99
99
  require "google/cloud/talent/v4"
data/README.md CHANGED
@@ -33,7 +33,7 @@ In order to use this library, you first need to go through the following steps:
33
33
  require "google/cloud/talent/v4"
34
34
 
35
35
  client = ::Google::Cloud::Talent::V4::CompanyService::Client.new
36
- request = my_create_request
36
+ request = ::Google::Cloud::Talent::V4::CreateCompanyRequest.new # (request fields as keyword arguments...)
37
37
  response = client.create_company request
38
38
  ```
39
39
 
@@ -238,6 +238,9 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
238
238
  value :COMMUTE_METHOD_UNSPECIFIED, 0
239
239
  value :DRIVING, 1
240
240
  value :TRANSIT, 2
241
+ value :WALKING, 3
242
+ value :CYCLING, 4
243
+ value :TRANSIT_ACCESSIBLE, 5
241
244
  end
242
245
  end
243
246
  end
@@ -41,13 +41,12 @@ module Google
41
41
  # See {::Google::Cloud::Talent::V4::CompanyService::Client::Configuration}
42
42
  # for a description of the configuration fields.
43
43
  #
44
- # ## Example
44
+ # @example
45
45
  #
46
- # To modify the configuration for all CompanyService clients:
47
- #
48
- # ::Google::Cloud::Talent::V4::CompanyService::Client.configure do |config|
49
- # config.timeout = 10.0
50
- # end
46
+ # # Modify the configuration for all CompanyService clients
47
+ # ::Google::Cloud::Talent::V4::CompanyService::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_company.timeout = 30.0
71
70
  default_config.rpcs.get_company.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_company.timeout = 30.0
79
75
 
80
76
  default_config.rpcs.delete_company.timeout = 30.0
81
77
  default_config.rpcs.delete_company.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_companies.timeout = 30.0
89
82
  default_config.rpcs.list_companies.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 CompanyService client object.
124
114
  #
125
- # ## Examples
126
- #
127
- # To create a new CompanyService client with the default
128
- # configuration:
129
- #
130
- # client = ::Google::Cloud::Talent::V4::CompanyService::Client.new
115
+ # @example
131
116
  #
132
- # To create a new CompanyService client with a custom
133
- # configuration:
117
+ # # Create a client using the default configuration
118
+ # client = ::Google::Cloud::Talent::V4::CompanyService::Client.new
134
119
  #
135
- # client = ::Google::Cloud::Talent::V4::CompanyService::Client.new do |config|
136
- # config.timeout = 10.0
137
- # end
120
+ # # Create a client using a custom configuration
121
+ # client = ::Google::Cloud::Talent::V4::CompanyService::Client.new do |config|
122
+ # config.timeout = 10.0
123
+ # end
138
124
  #
139
125
  # @yield [config] Configure the CompanyService 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 scope and endpoint are unchanged from default,
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.scope == Client.configure.scope &&
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_company.timeout,
239
224
  metadata: metadata,
240
225
  retry_policy: @config.rpcs.create_company.retry_policy
241
- options.apply_defaults metadata: @config.metadata,
226
+
227
+ options.apply_defaults timeout: @config.timeout,
228
+ metadata: @config.metadata,
242
229
  retry_policy: @config.retry_policy
243
230
 
244
231
  @company_service_stub.call_rpc :create_company, request, options: options do |response, operation|
@@ -308,7 +295,9 @@ module Google
308
295
  options.apply_defaults timeout: @config.rpcs.get_company.timeout,
309
296
  metadata: metadata,
310
297
  retry_policy: @config.rpcs.get_company.retry_policy
311
- options.apply_defaults metadata: @config.metadata,
298
+
299
+ options.apply_defaults timeout: @config.timeout,
300
+ metadata: @config.metadata,
312
301
  retry_policy: @config.retry_policy
313
302
 
314
303
  @company_service_stub.call_rpc :get_company, request, options: options do |response, operation|
@@ -382,7 +371,9 @@ module Google
382
371
  options.apply_defaults timeout: @config.rpcs.update_company.timeout,
383
372
  metadata: metadata,
384
373
  retry_policy: @config.rpcs.update_company.retry_policy
385
- options.apply_defaults metadata: @config.metadata,
374
+
375
+ options.apply_defaults timeout: @config.timeout,
376
+ metadata: @config.metadata,
386
377
  retry_policy: @config.retry_policy
387
378
 
388
379
  @company_service_stub.call_rpc :update_company, request, options: options do |response, operation|
@@ -453,7 +444,9 @@ module Google
453
444
  options.apply_defaults timeout: @config.rpcs.delete_company.timeout,
454
445
  metadata: metadata,
455
446
  retry_policy: @config.rpcs.delete_company.retry_policy
456
- options.apply_defaults metadata: @config.metadata,
447
+
448
+ options.apply_defaults timeout: @config.timeout,
449
+ metadata: @config.metadata,
457
450
  retry_policy: @config.retry_policy
458
451
 
459
452
  @company_service_stub.call_rpc :delete_company, request, options: options do |response, operation|
@@ -534,7 +527,9 @@ module Google
534
527
  options.apply_defaults timeout: @config.rpcs.list_companies.timeout,
535
528
  metadata: metadata,
536
529
  retry_policy: @config.rpcs.list_companies.retry_policy
537
- options.apply_defaults metadata: @config.metadata,
530
+
531
+ options.apply_defaults timeout: @config.timeout,
532
+ metadata: @config.metadata,
538
533
  retry_policy: @config.retry_policy
539
534
 
540
535
  @company_service_stub.call_rpc :list_companies, request, options: options do |response, operation|
@@ -559,22 +554,21 @@ module Google
559
554
  # Configuration can be applied globally to all clients, or to a single client
560
555
  # on construction.
561
556
  #
562
- # # Examples
563
- #
564
- # To modify the global config, setting the timeout for create_company
565
- # to 20 seconds, and all remaining timeouts to 10 seconds:
566
- #
567
- # ::Google::Cloud::Talent::V4::CompanyService::Client.configure do |config|
568
- # config.timeout = 10.0
569
- # config.rpcs.create_company.timeout = 20.0
570
- # end
571
- #
572
- # To apply the above configuration only to a new client:
573
- #
574
- # client = ::Google::Cloud::Talent::V4::CompanyService::Client.new do |config|
575
- # config.timeout = 10.0
576
- # config.rpcs.create_company.timeout = 20.0
577
- # end
557
+ # @example
558
+ #
559
+ # # Modify the global config, setting the timeout for
560
+ # # create_company to 20 seconds,
561
+ # # and all remaining timeouts to 10 seconds.
562
+ # ::Google::Cloud::Talent::V4::CompanyService::Client.configure do |config|
563
+ # config.timeout = 10.0
564
+ # config.rpcs.create_company.timeout = 20.0
565
+ # end
566
+ #
567
+ # # Apply the above configuration only to a new client.
568
+ # client = ::Google::Cloud::Talent::V4::CompanyService::Client.new do |config|
569
+ # config.timeout = 10.0
570
+ # config.rpcs.create_company.timeout = 20.0
571
+ # end
578
572
  #
579
573
  # @!attribute [rw] endpoint
580
574
  # The hostname or hostname:port of the service endpoint.
@@ -41,13 +41,12 @@ module Google
41
41
  # See {::Google::Cloud::Talent::V4::Completion::Client::Configuration}
42
42
  # for a description of the configuration fields.
43
43
  #
44
- # ## Example
44
+ # @example
45
45
  #
46
- # To modify the configuration for all Completion clients:
47
- #
48
- # ::Google::Cloud::Talent::V4::Completion::Client.configure do |config|
49
- # config.timeout = 10.0
50
- # end
46
+ # # Modify the configuration for all Completion clients
47
+ # ::Google::Cloud::Talent::V4::Completion::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]
@@ -67,10 +66,7 @@ module Google
67
66
 
68
67
  default_config.rpcs.complete_query.timeout = 30.0
69
68
  default_config.rpcs.complete_query.retry_policy = {
70
- initial_delay: 0.1,
71
- max_delay: 60.0,
72
- multiplier: 1.3,
73
- retry_codes: [4, 14]
69
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
74
70
  }
75
71
 
76
72
  default_config
@@ -102,19 +98,15 @@ module Google
102
98
  ##
103
99
  # Create a new Completion client object.
104
100
  #
105
- # ## Examples
106
- #
107
- # To create a new Completion client with the default
108
- # configuration:
101
+ # @example
109
102
  #
110
- # client = ::Google::Cloud::Talent::V4::Completion::Client.new
103
+ # # Create a client using the default configuration
104
+ # client = ::Google::Cloud::Talent::V4::Completion::Client.new
111
105
  #
112
- # To create a new Completion client with a custom
113
- # configuration:
114
- #
115
- # client = ::Google::Cloud::Talent::V4::Completion::Client.new do |config|
116
- # config.timeout = 10.0
117
- # end
106
+ # # Create a client using a custom configuration
107
+ # client = ::Google::Cloud::Talent::V4::Completion::Client.new do |config|
108
+ # config.timeout = 10.0
109
+ # end
118
110
  #
119
111
  # @yield [config] Configure the Completion client.
120
112
  # @yieldparam config [Client::Configuration]
@@ -134,14 +126,13 @@ module Google
134
126
 
135
127
  # Create credentials
136
128
  credentials = @config.credentials
137
- # Use self-signed JWT if the scope and endpoint are unchanged from default,
129
+ # Use self-signed JWT if the endpoint is unchanged from default,
138
130
  # but only if the default endpoint does not have a region prefix.
139
- enable_self_signed_jwt = @config.scope == Client.configure.scope &&
140
- @config.endpoint == Client.configure.endpoint &&
131
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
141
132
  !@config.endpoint.split(".").first.include?("-")
142
133
  credentials ||= Credentials.default scope: @config.scope,
143
134
  enable_self_signed_jwt: enable_self_signed_jwt
144
- if credentials.is_a?(String) || credentials.is_a?(Hash)
135
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
145
136
  credentials = Credentials.new credentials, scope: @config.scope
146
137
  end
147
138
  @quota_project_id = @config.quota_project
@@ -242,7 +233,9 @@ module Google
242
233
  options.apply_defaults timeout: @config.rpcs.complete_query.timeout,
243
234
  metadata: metadata,
244
235
  retry_policy: @config.rpcs.complete_query.retry_policy
245
- options.apply_defaults metadata: @config.metadata,
236
+
237
+ options.apply_defaults timeout: @config.timeout,
238
+ metadata: @config.metadata,
246
239
  retry_policy: @config.retry_policy
247
240
 
248
241
  @completion_stub.call_rpc :complete_query, request, options: options do |response, operation|
@@ -266,22 +259,21 @@ module Google
266
259
  # Configuration can be applied globally to all clients, or to a single client
267
260
  # on construction.
268
261
  #
269
- # # Examples
270
- #
271
- # To modify the global config, setting the timeout for complete_query
272
- # to 20 seconds, and all remaining timeouts to 10 seconds:
273
- #
274
- # ::Google::Cloud::Talent::V4::Completion::Client.configure do |config|
275
- # config.timeout = 10.0
276
- # config.rpcs.complete_query.timeout = 20.0
277
- # end
278
- #
279
- # To apply the above configuration only to a new client:
280
- #
281
- # client = ::Google::Cloud::Talent::V4::Completion::Client.new do |config|
282
- # config.timeout = 10.0
283
- # config.rpcs.complete_query.timeout = 20.0
284
- # end
262
+ # @example
263
+ #
264
+ # # Modify the global config, setting the timeout for
265
+ # # complete_query to 20 seconds,
266
+ # # and all remaining timeouts to 10 seconds.
267
+ # ::Google::Cloud::Talent::V4::Completion::Client.configure do |config|
268
+ # config.timeout = 10.0
269
+ # config.rpcs.complete_query.timeout = 20.0
270
+ # end
271
+ #
272
+ # # Apply the above configuration only to a new client.
273
+ # client = ::Google::Cloud::Talent::V4::Completion::Client.new do |config|
274
+ # config.timeout = 10.0
275
+ # config.rpcs.complete_query.timeout = 20.0
276
+ # end
285
277
  #
286
278
  # @!attribute [rw] endpoint
287
279
  # The hostname or hostname:port of the service endpoint.
@@ -41,13 +41,12 @@ module Google
41
41
  # See {::Google::Cloud::Talent::V4::EventService::Client::Configuration}
42
42
  # for a description of the configuration fields.
43
43
  #
44
- # ## Example
44
+ # @example
45
45
  #
46
- # To modify the configuration for all EventService clients:
47
- #
48
- # ::Google::Cloud::Talent::V4::EventService::Client.configure do |config|
49
- # config.timeout = 10.0
50
- # end
46
+ # # Modify the configuration for all EventService clients
47
+ # ::Google::Cloud::Talent::V4::EventService::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]
@@ -96,19 +95,15 @@ module Google
96
95
  ##
97
96
  # Create a new EventService client object.
98
97
  #
99
- # ## Examples
100
- #
101
- # To create a new EventService client with the default
102
- # configuration:
98
+ # @example
103
99
  #
104
- # client = ::Google::Cloud::Talent::V4::EventService::Client.new
100
+ # # Create a client using the default configuration
101
+ # client = ::Google::Cloud::Talent::V4::EventService::Client.new
105
102
  #
106
- # To create a new EventService client with a custom
107
- # configuration:
108
- #
109
- # client = ::Google::Cloud::Talent::V4::EventService::Client.new do |config|
110
- # config.timeout = 10.0
111
- # end
103
+ # # Create a client using a custom configuration
104
+ # client = ::Google::Cloud::Talent::V4::EventService::Client.new do |config|
105
+ # config.timeout = 10.0
106
+ # end
112
107
  #
113
108
  # @yield [config] Configure the EventService client.
114
109
  # @yieldparam config [Client::Configuration]
@@ -128,14 +123,13 @@ module Google
128
123
 
129
124
  # Create credentials
130
125
  credentials = @config.credentials
131
- # Use self-signed JWT if the scope and endpoint are unchanged from default,
126
+ # Use self-signed JWT if the endpoint is unchanged from default,
132
127
  # but only if the default endpoint does not have a region prefix.
133
- enable_self_signed_jwt = @config.scope == Client.configure.scope &&
134
- @config.endpoint == Client.configure.endpoint &&
128
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
135
129
  !@config.endpoint.split(".").first.include?("-")
136
130
  credentials ||= Credentials.default scope: @config.scope,
137
131
  enable_self_signed_jwt: enable_self_signed_jwt
138
- if credentials.is_a?(String) || credentials.is_a?(Hash)
132
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
139
133
  credentials = Credentials.new credentials, scope: @config.scope
140
134
  end
141
135
  @quota_project_id = @config.quota_project
@@ -219,7 +213,9 @@ module Google
219
213
  options.apply_defaults timeout: @config.rpcs.create_client_event.timeout,
220
214
  metadata: metadata,
221
215
  retry_policy: @config.rpcs.create_client_event.retry_policy
222
- options.apply_defaults metadata: @config.metadata,
216
+
217
+ options.apply_defaults timeout: @config.timeout,
218
+ metadata: @config.metadata,
223
219
  retry_policy: @config.retry_policy
224
220
 
225
221
  @event_service_stub.call_rpc :create_client_event, request, options: options do |response, operation|
@@ -243,22 +239,21 @@ module Google
243
239
  # Configuration can be applied globally to all clients, or to a single client
244
240
  # on construction.
245
241
  #
246
- # # Examples
247
- #
248
- # To modify the global config, setting the timeout for create_client_event
249
- # to 20 seconds, and all remaining timeouts to 10 seconds:
250
- #
251
- # ::Google::Cloud::Talent::V4::EventService::Client.configure do |config|
252
- # config.timeout = 10.0
253
- # config.rpcs.create_client_event.timeout = 20.0
254
- # end
255
- #
256
- # To apply the above configuration only to a new client:
257
- #
258
- # client = ::Google::Cloud::Talent::V4::EventService::Client.new do |config|
259
- # config.timeout = 10.0
260
- # config.rpcs.create_client_event.timeout = 20.0
261
- # end
242
+ # @example
243
+ #
244
+ # # Modify the global config, setting the timeout for
245
+ # # create_client_event to 20 seconds,
246
+ # # and all remaining timeouts to 10 seconds.
247
+ # ::Google::Cloud::Talent::V4::EventService::Client.configure do |config|
248
+ # config.timeout = 10.0
249
+ # config.rpcs.create_client_event.timeout = 20.0
250
+ # end
251
+ #
252
+ # # Apply the above configuration only to a new client.
253
+ # client = ::Google::Cloud::Talent::V4::EventService::Client.new do |config|
254
+ # config.timeout = 10.0
255
+ # config.rpcs.create_client_event.timeout = 20.0
256
+ # end
262
257
  #
263
258
  # @!attribute [rw] endpoint
264
259
  # The hostname or hostname:port of the service endpoint.