google-cloud-talent-v4 0.4.2 → 0.6.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (30) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/talent/v4/common_pb.rb +5 -2
  3. data/lib/google/cloud/talent/v4/company_pb.rb +2 -2
  4. data/lib/google/cloud/talent/v4/company_service/client.rb +69 -56
  5. data/lib/google/cloud/talent/v4/company_service_pb.rb +2 -2
  6. data/lib/google/cloud/talent/v4/company_service_services_pb.rb +1 -1
  7. data/lib/google/cloud/talent/v4/completion/client.rb +37 -40
  8. data/lib/google/cloud/talent/v4/completion_service_pb.rb +2 -2
  9. data/lib/google/cloud/talent/v4/completion_service_services_pb.rb +1 -1
  10. data/lib/google/cloud/talent/v4/event_pb.rb +2 -2
  11. data/lib/google/cloud/talent/v4/event_service/client.rb +37 -40
  12. data/lib/google/cloud/talent/v4/event_service_pb.rb +2 -2
  13. data/lib/google/cloud/talent/v4/event_service_services_pb.rb +1 -1
  14. data/lib/google/cloud/talent/v4/filters_pb.rb +2 -2
  15. data/lib/google/cloud/talent/v4/histogram_pb.rb +1 -1
  16. data/lib/google/cloud/talent/v4/job_pb.rb +2 -2
  17. data/lib/google/cloud/talent/v4/job_service/client.rb +155 -83
  18. data/lib/google/cloud/talent/v4/job_service/operations.rb +50 -33
  19. data/lib/google/cloud/talent/v4/job_service_pb.rb +13 -2
  20. data/lib/google/cloud/talent/v4/job_service_services_pb.rb +1 -1
  21. data/lib/google/cloud/talent/v4/tenant_pb.rb +2 -2
  22. data/lib/google/cloud/talent/v4/tenant_service/client.rb +69 -56
  23. data/lib/google/cloud/talent/v4/tenant_service_pb.rb +2 -2
  24. data/lib/google/cloud/talent/v4/tenant_service_services_pb.rb +1 -1
  25. data/lib/google/cloud/talent/v4/version.rb +1 -1
  26. data/proto_docs/google/cloud/talent/v4/common.rb +12 -1
  27. data/proto_docs/google/cloud/talent/v4/filters.rb +12 -8
  28. data/proto_docs/google/cloud/talent/v4/job.rb +10 -1
  29. data/proto_docs/google/cloud/talent/v4/job_service.rb +82 -8
  30. metadata +4 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a6bd0a9027f17423bd8d8f98dc6fcd887c066d3e3760d457009a9cf82c34bc0e
4
- data.tar.gz: 1cbab753039fb59587484b39997029c618fa454fbf6fdbd850a6098ea8735959
3
+ metadata.gz: 246b16c311818a59439f61ab07656266df07b894f898d8d4eafd0a0e0c87335d
4
+ data.tar.gz: d677d5cc0ed79bf56af5dcaa7e43fa48e670e8443fbe10a9f1ff7f9d20305580
5
5
  SHA512:
6
- metadata.gz: db2cb47d24427e73287507fc512f7de67cea2dbe54c31acc8c9926f9b32ba53722ab31e3b400f52356029bd61470b2caebdbf276413f313f1fe4675c0ea76e11
7
- data.tar.gz: 1f9c9d811488d009e91d2b82e7d5f0caa8a10fdcb30ef4182107ee8ceb9cf42dee1b7eebbd40d4f4a131acd9757baae2bbe5d45078b701e54c90d5bc77baeda3
6
+ metadata.gz: 7cebcfa3c35c2bfed012bd9f6f28df78275458cbcb5a73e158f5b98ad4252e3a3929e931b563e2d04ffa437c86595580e29e02a67318839fcf0f5458378a0af8
7
+ data.tar.gz: ec66127bff9db28d47ec6da67596657e7d0cc29be912626b2699a81ac3f4cc804678636dd65d9f053dc60d96b76bcfa4a9a1f9547db5021041dbcbed75e93668
@@ -1,8 +1,6 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/talent/v4/common.proto
3
3
 
4
- require 'google/protobuf'
5
-
6
4
  require 'google/api/field_behavior_pb'
7
5
  require 'google/protobuf/timestamp_pb'
8
6
  require 'google/protobuf/wrappers_pb'
@@ -10,6 +8,8 @@ require 'google/type/latlng_pb'
10
8
  require 'google/type/money_pb'
11
9
  require 'google/type/postal_address_pb'
12
10
  require 'google/api/annotations_pb'
11
+ require 'google/protobuf'
12
+
13
13
  Google::Protobuf::DescriptorPool.generated_pool.build do
14
14
  add_file("google/cloud/talent/v4/common.proto", :syntax => :proto3) do
15
15
  add_message "google.cloud.talent.v4.TimestampRange" do
@@ -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
@@ -1,12 +1,12 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/talent/v4/company.proto
3
3
 
4
- require 'google/protobuf'
5
-
6
4
  require 'google/api/field_behavior_pb'
7
5
  require 'google/api/resource_pb'
8
6
  require 'google/cloud/talent/v4/common_pb'
9
7
  require 'google/api/annotations_pb'
8
+ require 'google/protobuf'
9
+
10
10
  Google::Protobuf::DescriptorPool.generated_pool.build do
11
11
  add_file("google/cloud/talent/v4/company.proto", :syntax => :proto3) do
12
12
  add_message "google.cloud.talent.v4.Company" do
@@ -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]
@@ -113,19 +112,15 @@ module Google
113
112
  ##
114
113
  # Create a new CompanyService client object.
115
114
  #
116
- # ## Examples
117
- #
118
- # To create a new CompanyService client with the default
119
- # configuration:
120
- #
121
- # client = ::Google::Cloud::Talent::V4::CompanyService::Client.new
115
+ # @example
122
116
  #
123
- # To create a new CompanyService client with a custom
124
- # configuration:
117
+ # # Create a client using the default configuration
118
+ # client = ::Google::Cloud::Talent::V4::CompanyService::Client.new
125
119
  #
126
- # client = ::Google::Cloud::Talent::V4::CompanyService::Client.new do |config|
127
- # config.timeout = 10.0
128
- # 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
129
124
  #
130
125
  # @yield [config] Configure the CompanyService client.
131
126
  # @yieldparam config [Client::Configuration]
@@ -145,10 +140,9 @@ module Google
145
140
 
146
141
  # Create credentials
147
142
  credentials = @config.credentials
148
- # 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,
149
144
  # but only if the default endpoint does not have a region prefix.
150
- enable_self_signed_jwt = @config.scope == Client.configure.scope &&
151
- @config.endpoint == Client.configure.endpoint &&
145
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
152
146
  !@config.endpoint.split(".").first.include?("-")
153
147
  credentials ||= Credentials.default scope: @config.scope,
154
148
  enable_self_signed_jwt: enable_self_signed_jwt
@@ -220,16 +214,20 @@ module Google
220
214
  gapic_version: ::Google::Cloud::Talent::V4::VERSION
221
215
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
222
216
 
223
- header_params = {
224
- "parent" => request.parent
225
- }
217
+ header_params = {}
218
+ if request.parent
219
+ header_params["parent"] = request.parent
220
+ end
221
+
226
222
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
227
223
  metadata[:"x-goog-request-params"] ||= request_params_header
228
224
 
229
225
  options.apply_defaults timeout: @config.rpcs.create_company.timeout,
230
226
  metadata: metadata,
231
227
  retry_policy: @config.rpcs.create_company.retry_policy
232
- options.apply_defaults metadata: @config.metadata,
228
+
229
+ options.apply_defaults timeout: @config.timeout,
230
+ metadata: @config.metadata,
233
231
  retry_policy: @config.retry_policy
234
232
 
235
233
  @company_service_stub.call_rpc :create_company, request, options: options do |response, operation|
@@ -290,16 +288,20 @@ module Google
290
288
  gapic_version: ::Google::Cloud::Talent::V4::VERSION
291
289
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
292
290
 
293
- header_params = {
294
- "name" => request.name
295
- }
291
+ header_params = {}
292
+ if request.name
293
+ header_params["name"] = request.name
294
+ end
295
+
296
296
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
297
297
  metadata[:"x-goog-request-params"] ||= request_params_header
298
298
 
299
299
  options.apply_defaults timeout: @config.rpcs.get_company.timeout,
300
300
  metadata: metadata,
301
301
  retry_policy: @config.rpcs.get_company.retry_policy
302
- options.apply_defaults metadata: @config.metadata,
302
+
303
+ options.apply_defaults timeout: @config.timeout,
304
+ metadata: @config.metadata,
303
305
  retry_policy: @config.retry_policy
304
306
 
305
307
  @company_service_stub.call_rpc :get_company, request, options: options do |response, operation|
@@ -364,16 +366,20 @@ module Google
364
366
  gapic_version: ::Google::Cloud::Talent::V4::VERSION
365
367
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
366
368
 
367
- header_params = {
368
- "company.name" => request.company.name
369
- }
369
+ header_params = {}
370
+ if request.company&.name
371
+ header_params["company.name"] = request.company.name
372
+ end
373
+
370
374
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
371
375
  metadata[:"x-goog-request-params"] ||= request_params_header
372
376
 
373
377
  options.apply_defaults timeout: @config.rpcs.update_company.timeout,
374
378
  metadata: metadata,
375
379
  retry_policy: @config.rpcs.update_company.retry_policy
376
- options.apply_defaults metadata: @config.metadata,
380
+
381
+ options.apply_defaults timeout: @config.timeout,
382
+ metadata: @config.metadata,
377
383
  retry_policy: @config.retry_policy
378
384
 
379
385
  @company_service_stub.call_rpc :update_company, request, options: options do |response, operation|
@@ -435,16 +441,20 @@ module Google
435
441
  gapic_version: ::Google::Cloud::Talent::V4::VERSION
436
442
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
437
443
 
438
- header_params = {
439
- "name" => request.name
440
- }
444
+ header_params = {}
445
+ if request.name
446
+ header_params["name"] = request.name
447
+ end
448
+
441
449
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
442
450
  metadata[:"x-goog-request-params"] ||= request_params_header
443
451
 
444
452
  options.apply_defaults timeout: @config.rpcs.delete_company.timeout,
445
453
  metadata: metadata,
446
454
  retry_policy: @config.rpcs.delete_company.retry_policy
447
- options.apply_defaults metadata: @config.metadata,
455
+
456
+ options.apply_defaults timeout: @config.timeout,
457
+ metadata: @config.metadata,
448
458
  retry_policy: @config.retry_policy
449
459
 
450
460
  @company_service_stub.call_rpc :delete_company, request, options: options do |response, operation|
@@ -516,16 +526,20 @@ module Google
516
526
  gapic_version: ::Google::Cloud::Talent::V4::VERSION
517
527
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
518
528
 
519
- header_params = {
520
- "parent" => request.parent
521
- }
529
+ header_params = {}
530
+ if request.parent
531
+ header_params["parent"] = request.parent
532
+ end
533
+
522
534
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
523
535
  metadata[:"x-goog-request-params"] ||= request_params_header
524
536
 
525
537
  options.apply_defaults timeout: @config.rpcs.list_companies.timeout,
526
538
  metadata: metadata,
527
539
  retry_policy: @config.rpcs.list_companies.retry_policy
528
- options.apply_defaults metadata: @config.metadata,
540
+
541
+ options.apply_defaults timeout: @config.timeout,
542
+ metadata: @config.metadata,
529
543
  retry_policy: @config.retry_policy
530
544
 
531
545
  @company_service_stub.call_rpc :list_companies, request, options: options do |response, operation|
@@ -550,22 +564,21 @@ module Google
550
564
  # Configuration can be applied globally to all clients, or to a single client
551
565
  # on construction.
552
566
  #
553
- # # Examples
554
- #
555
- # To modify the global config, setting the timeout for create_company
556
- # to 20 seconds, and all remaining timeouts to 10 seconds:
557
- #
558
- # ::Google::Cloud::Talent::V4::CompanyService::Client.configure do |config|
559
- # config.timeout = 10.0
560
- # config.rpcs.create_company.timeout = 20.0
561
- # end
562
- #
563
- # To apply the above configuration only to a new client:
564
- #
565
- # client = ::Google::Cloud::Talent::V4::CompanyService::Client.new do |config|
566
- # config.timeout = 10.0
567
- # config.rpcs.create_company.timeout = 20.0
568
- # end
567
+ # @example
568
+ #
569
+ # # Modify the global config, setting the timeout for
570
+ # # create_company to 20 seconds,
571
+ # # and all remaining timeouts to 10 seconds.
572
+ # ::Google::Cloud::Talent::V4::CompanyService::Client.configure do |config|
573
+ # config.timeout = 10.0
574
+ # config.rpcs.create_company.timeout = 20.0
575
+ # end
576
+ #
577
+ # # Apply the above configuration only to a new client.
578
+ # client = ::Google::Cloud::Talent::V4::CompanyService::Client.new do |config|
579
+ # config.timeout = 10.0
580
+ # config.rpcs.create_company.timeout = 20.0
581
+ # end
569
582
  #
570
583
  # @!attribute [rw] endpoint
571
584
  # The hostname or hostname:port of the service endpoint.
@@ -1,8 +1,6 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/talent/v4/company_service.proto
3
3
 
4
- require 'google/protobuf'
5
-
6
4
  require 'google/api/annotations_pb'
7
5
  require 'google/api/client_pb'
8
6
  require 'google/api/field_behavior_pb'
@@ -11,6 +9,8 @@ require 'google/cloud/talent/v4/common_pb'
11
9
  require 'google/cloud/talent/v4/company_pb'
12
10
  require 'google/protobuf/empty_pb'
13
11
  require 'google/protobuf/field_mask_pb'
12
+ require 'google/protobuf'
13
+
14
14
  Google::Protobuf::DescriptorPool.generated_pool.build do
15
15
  add_file("google/cloud/talent/v4/company_service.proto", :syntax => :proto3) do
16
16
  add_message "google.cloud.talent.v4.CreateCompanyRequest" do
@@ -27,7 +27,7 @@ module Google
27
27
  # A service that handles company management, including CRUD and enumeration.
28
28
  class Service
29
29
 
30
- include GRPC::GenericService
30
+ include ::GRPC::GenericService
31
31
 
32
32
  self.marshal_class_method = :encode
33
33
  self.unmarshal_class_method = :decode
@@ -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]
@@ -99,19 +98,15 @@ module Google
99
98
  ##
100
99
  # Create a new Completion client object.
101
100
  #
102
- # ## Examples
103
- #
104
- # To create a new Completion client with the default
105
- # configuration:
106
- #
107
- # client = ::Google::Cloud::Talent::V4::Completion::Client.new
101
+ # @example
108
102
  #
109
- # To create a new Completion client with a custom
110
- # configuration:
103
+ # # Create a client using the default configuration
104
+ # client = ::Google::Cloud::Talent::V4::Completion::Client.new
111
105
  #
112
- # client = ::Google::Cloud::Talent::V4::Completion::Client.new do |config|
113
- # config.timeout = 10.0
114
- # 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
115
110
  #
116
111
  # @yield [config] Configure the Completion client.
117
112
  # @yieldparam config [Client::Configuration]
@@ -131,10 +126,9 @@ module Google
131
126
 
132
127
  # Create credentials
133
128
  credentials = @config.credentials
134
- # 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,
135
130
  # but only if the default endpoint does not have a region prefix.
136
- enable_self_signed_jwt = @config.scope == Client.configure.scope &&
137
- @config.endpoint == Client.configure.endpoint &&
131
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
138
132
  !@config.endpoint.split(".").first.include?("-")
139
133
  credentials ||= Credentials.default scope: @config.scope,
140
134
  enable_self_signed_jwt: enable_self_signed_jwt
@@ -230,16 +224,20 @@ module Google
230
224
  gapic_version: ::Google::Cloud::Talent::V4::VERSION
231
225
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
232
226
 
233
- header_params = {
234
- "tenant" => request.tenant
235
- }
227
+ header_params = {}
228
+ if request.tenant
229
+ header_params["tenant"] = request.tenant
230
+ end
231
+
236
232
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
237
233
  metadata[:"x-goog-request-params"] ||= request_params_header
238
234
 
239
235
  options.apply_defaults timeout: @config.rpcs.complete_query.timeout,
240
236
  metadata: metadata,
241
237
  retry_policy: @config.rpcs.complete_query.retry_policy
242
- options.apply_defaults metadata: @config.metadata,
238
+
239
+ options.apply_defaults timeout: @config.timeout,
240
+ metadata: @config.metadata,
243
241
  retry_policy: @config.retry_policy
244
242
 
245
243
  @completion_stub.call_rpc :complete_query, request, options: options do |response, operation|
@@ -263,22 +261,21 @@ module Google
263
261
  # Configuration can be applied globally to all clients, or to a single client
264
262
  # on construction.
265
263
  #
266
- # # Examples
267
- #
268
- # To modify the global config, setting the timeout for complete_query
269
- # to 20 seconds, and all remaining timeouts to 10 seconds:
270
- #
271
- # ::Google::Cloud::Talent::V4::Completion::Client.configure do |config|
272
- # config.timeout = 10.0
273
- # config.rpcs.complete_query.timeout = 20.0
274
- # end
275
- #
276
- # To apply the above configuration only to a new client:
277
- #
278
- # client = ::Google::Cloud::Talent::V4::Completion::Client.new do |config|
279
- # config.timeout = 10.0
280
- # config.rpcs.complete_query.timeout = 20.0
281
- # end
264
+ # @example
265
+ #
266
+ # # Modify the global config, setting the timeout for
267
+ # # complete_query to 20 seconds,
268
+ # # and all remaining timeouts to 10 seconds.
269
+ # ::Google::Cloud::Talent::V4::Completion::Client.configure do |config|
270
+ # config.timeout = 10.0
271
+ # config.rpcs.complete_query.timeout = 20.0
272
+ # end
273
+ #
274
+ # # Apply the above configuration only to a new client.
275
+ # client = ::Google::Cloud::Talent::V4::Completion::Client.new do |config|
276
+ # config.timeout = 10.0
277
+ # config.rpcs.complete_query.timeout = 20.0
278
+ # end
282
279
  #
283
280
  # @!attribute [rw] endpoint
284
281
  # The hostname or hostname:port of the service endpoint.
@@ -1,13 +1,13 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/talent/v4/completion_service.proto
3
3
 
4
- require 'google/protobuf'
5
-
6
4
  require 'google/api/annotations_pb'
7
5
  require 'google/api/field_behavior_pb'
8
6
  require 'google/api/resource_pb'
9
7
  require 'google/cloud/talent/v4/common_pb'
10
8
  require 'google/api/client_pb'
9
+ require 'google/protobuf'
10
+
11
11
  Google::Protobuf::DescriptorPool.generated_pool.build do
12
12
  add_file("google/cloud/talent/v4/completion_service.proto", :syntax => :proto3) do
13
13
  add_message "google.cloud.talent.v4.CompleteQueryRequest" do
@@ -27,7 +27,7 @@ module Google
27
27
  # A service handles auto completion.
28
28
  class Service
29
29
 
30
- include GRPC::GenericService
30
+ include ::GRPC::GenericService
31
31
 
32
32
  self.marshal_class_method = :encode
33
33
  self.unmarshal_class_method = :decode
@@ -1,11 +1,11 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/talent/v4/event.proto
3
3
 
4
- require 'google/protobuf'
5
-
6
4
  require 'google/api/field_behavior_pb'
7
5
  require 'google/protobuf/timestamp_pb'
8
6
  require 'google/api/annotations_pb'
7
+ require 'google/protobuf'
8
+
9
9
  Google::Protobuf::DescriptorPool.generated_pool.build do
10
10
  add_file("google/cloud/talent/v4/event.proto", :syntax => :proto3) do
11
11
  add_message "google.cloud.talent.v4.ClientEvent" do
@@ -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:
103
- #
104
- # client = ::Google::Cloud::Talent::V4::EventService::Client.new
98
+ # @example
105
99
  #
106
- # To create a new EventService client with a custom
107
- # configuration:
100
+ # # Create a client using the default configuration
101
+ # client = ::Google::Cloud::Talent::V4::EventService::Client.new
108
102
  #
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,10 +123,9 @@ 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
@@ -210,16 +204,20 @@ module Google
210
204
  gapic_version: ::Google::Cloud::Talent::V4::VERSION
211
205
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
212
206
 
213
- header_params = {
214
- "parent" => request.parent
215
- }
207
+ header_params = {}
208
+ if request.parent
209
+ header_params["parent"] = request.parent
210
+ end
211
+
216
212
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
217
213
  metadata[:"x-goog-request-params"] ||= request_params_header
218
214
 
219
215
  options.apply_defaults timeout: @config.rpcs.create_client_event.timeout,
220
216
  metadata: metadata,
221
217
  retry_policy: @config.rpcs.create_client_event.retry_policy
222
- options.apply_defaults metadata: @config.metadata,
218
+
219
+ options.apply_defaults timeout: @config.timeout,
220
+ metadata: @config.metadata,
223
221
  retry_policy: @config.retry_policy
224
222
 
225
223
  @event_service_stub.call_rpc :create_client_event, request, options: options do |response, operation|
@@ -243,22 +241,21 @@ module Google
243
241
  # Configuration can be applied globally to all clients, or to a single client
244
242
  # on construction.
245
243
  #
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
244
+ # @example
245
+ #
246
+ # # Modify the global config, setting the timeout for
247
+ # # create_client_event to 20 seconds,
248
+ # # and all remaining timeouts to 10 seconds.
249
+ # ::Google::Cloud::Talent::V4::EventService::Client.configure do |config|
250
+ # config.timeout = 10.0
251
+ # config.rpcs.create_client_event.timeout = 20.0
252
+ # end
253
+ #
254
+ # # Apply the above configuration only to a new client.
255
+ # client = ::Google::Cloud::Talent::V4::EventService::Client.new do |config|
256
+ # config.timeout = 10.0
257
+ # config.rpcs.create_client_event.timeout = 20.0
258
+ # end
262
259
  #
263
260
  # @!attribute [rw] endpoint
264
261
  # The hostname or hostname:port of the service endpoint.
@@ -1,13 +1,13 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/talent/v4/event_service.proto
3
3
 
4
- require 'google/protobuf'
5
-
6
4
  require 'google/api/annotations_pb'
7
5
  require 'google/api/client_pb'
8
6
  require 'google/api/field_behavior_pb'
9
7
  require 'google/api/resource_pb'
10
8
  require 'google/cloud/talent/v4/event_pb'
9
+ require 'google/protobuf'
10
+
11
11
  Google::Protobuf::DescriptorPool.generated_pool.build do
12
12
  add_file("google/cloud/talent/v4/event_service.proto", :syntax => :proto3) do
13
13
  add_message "google.cloud.talent.v4.CreateClientEventRequest" do
@@ -27,7 +27,7 @@ module Google
27
27
  # A service handles client event report.
28
28
  class Service
29
29
 
30
- include GRPC::GenericService
30
+ include ::GRPC::GenericService
31
31
 
32
32
  self.marshal_class_method = :encode
33
33
  self.unmarshal_class_method = :decode
@@ -1,14 +1,14 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/talent/v4/filters.proto
3
3
 
4
- require 'google/protobuf'
5
-
6
4
  require 'google/api/field_behavior_pb'
7
5
  require 'google/cloud/talent/v4/common_pb'
8
6
  require 'google/protobuf/duration_pb'
9
7
  require 'google/type/latlng_pb'
10
8
  require 'google/type/timeofday_pb'
11
9
  require 'google/api/annotations_pb'
10
+ require 'google/protobuf'
11
+
12
12
  Google::Protobuf::DescriptorPool.generated_pool.build do
13
13
  add_file("google/cloud/talent/v4/filters.proto", :syntax => :proto3) do
14
14
  add_message "google.cloud.talent.v4.JobQuery" do
@@ -1,9 +1,9 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/talent/v4/histogram.proto
3
3
 
4
+ require 'google/api/annotations_pb'
4
5
  require 'google/protobuf'
5
6
 
6
- require 'google/api/annotations_pb'
7
7
  Google::Protobuf::DescriptorPool.generated_pool.build do
8
8
  add_file("google/cloud/talent/v4/histogram.proto", :syntax => :proto3) do
9
9
  add_message "google.cloud.talent.v4.HistogramQuery" do