google-cloud-talent 0.9.0 → 0.10.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.
@@ -20,53 +20,53 @@
20
20
  }
21
21
  },
22
22
  "methods": {
23
- "CreateJob": {
24
- "timeout_millis": 30000,
25
- "retry_codes_name": "non_idempotent",
26
- "retry_params_name": "default"
27
- },
28
- "GetJob": {
29
- "timeout_millis": 30000,
23
+ "DeleteJob": {
24
+ "timeout_millis": 60000,
30
25
  "retry_codes_name": "idempotent",
31
26
  "retry_params_name": "default"
32
27
  },
33
- "UpdateJob": {
34
- "timeout_millis": 30000,
28
+ "CreateJob": {
29
+ "timeout_millis": 60000,
35
30
  "retry_codes_name": "non_idempotent",
36
31
  "retry_params_name": "default"
37
32
  },
38
- "DeleteJob": {
39
- "timeout_millis": 30000,
40
- "retry_codes_name": "idempotent",
33
+ "BatchCreateJobs": {
34
+ "timeout_millis": 60000,
35
+ "retry_codes_name": "non_idempotent",
41
36
  "retry_params_name": "default"
42
37
  },
43
- "ListJobs": {
44
- "timeout_millis": 30000,
38
+ "GetJob": {
39
+ "timeout_millis": 60000,
45
40
  "retry_codes_name": "idempotent",
46
41
  "retry_params_name": "default"
47
42
  },
48
- "BatchDeleteJobs": {
49
- "timeout_millis": 30000,
43
+ "UpdateJob": {
44
+ "timeout_millis": 60000,
50
45
  "retry_codes_name": "non_idempotent",
51
46
  "retry_params_name": "default"
52
47
  },
53
- "SearchJobs": {
54
- "timeout_millis": 30000,
48
+ "BatchUpdateJobs": {
49
+ "timeout_millis": 60000,
55
50
  "retry_codes_name": "non_idempotent",
56
51
  "retry_params_name": "default"
57
52
  },
58
- "SearchJobsForAlert": {
59
- "timeout_millis": 30000,
53
+ "BatchDeleteJobs": {
54
+ "timeout_millis": 60000,
60
55
  "retry_codes_name": "non_idempotent",
61
56
  "retry_params_name": "default"
62
57
  },
63
- "BatchCreateJobs": {
64
- "timeout_millis": 30000,
58
+ "ListJobs": {
59
+ "timeout_millis": 60000,
60
+ "retry_codes_name": "idempotent",
61
+ "retry_params_name": "default"
62
+ },
63
+ "SearchJobs": {
64
+ "timeout_millis": 60000,
65
65
  "retry_codes_name": "non_idempotent",
66
66
  "retry_params_name": "default"
67
67
  },
68
- "BatchUpdateJobs": {
69
- "timeout_millis": 30000,
68
+ "SearchJobsForAlert": {
69
+ "timeout_millis": 60000,
70
70
  "retry_codes_name": "non_idempotent",
71
71
  "retry_params_name": "default"
72
72
  }
@@ -54,14 +54,14 @@ module Google
54
54
  DEFAULT_TIMEOUT = 30
55
55
 
56
56
  PAGE_DESCRIPTORS = {
57
- "list_profiles" => Google::Gax::PageDescriptor.new(
57
+ "search_profiles" => Google::Gax::PageDescriptor.new(
58
58
  "page_token",
59
59
  "next_page_token",
60
- "profiles"),
61
- "search_profiles" => Google::Gax::PageDescriptor.new(
60
+ "summarized_profiles"),
61
+ "list_profiles" => Google::Gax::PageDescriptor.new(
62
62
  "page_token",
63
63
  "next_page_token",
64
- "summarized_profiles")
64
+ "profiles")
65
65
  }.freeze
66
66
 
67
67
  private_constant :PAGE_DESCRIPTORS
@@ -222,6 +222,22 @@ module Google
222
222
  &Google::Cloud::Talent::V4beta1::ProfileService::Stub.method(:new)
223
223
  )
224
224
 
225
+ @delete_profile = Google::Gax.create_api_call(
226
+ @profile_service_stub.method(:delete_profile),
227
+ defaults["delete_profile"],
228
+ exception_transformer: exception_transformer,
229
+ params_extractor: proc do |request|
230
+ {'name' => request.name}
231
+ end
232
+ )
233
+ @search_profiles = Google::Gax.create_api_call(
234
+ @profile_service_stub.method(:search_profiles),
235
+ defaults["search_profiles"],
236
+ exception_transformer: exception_transformer,
237
+ params_extractor: proc do |request|
238
+ {'parent' => request.parent}
239
+ end
240
+ )
225
241
  @list_profiles = Google::Gax.create_api_call(
226
242
  @profile_service_stub.method(:list_profiles),
227
243
  defaults["list_profiles"],
@@ -254,232 +270,10 @@ module Google
254
270
  {'profile.name' => request.profile.name}
255
271
  end
256
272
  )
257
- @delete_profile = Google::Gax.create_api_call(
258
- @profile_service_stub.method(:delete_profile),
259
- defaults["delete_profile"],
260
- exception_transformer: exception_transformer,
261
- params_extractor: proc do |request|
262
- {'name' => request.name}
263
- end
264
- )
265
- @search_profiles = Google::Gax.create_api_call(
266
- @profile_service_stub.method(:search_profiles),
267
- defaults["search_profiles"],
268
- exception_transformer: exception_transformer,
269
- params_extractor: proc do |request|
270
- {'parent' => request.parent}
271
- end
272
- )
273
273
  end
274
274
 
275
275
  # Service calls
276
276
 
277
- # Lists profiles by filter. The order is unspecified.
278
- #
279
- # @param parent [String]
280
- # Required. The resource name of the tenant under which the profile is created.
281
- #
282
- # The format is "projects/{project_id}/tenants/{tenant_id}". For example,
283
- # "projects/foo/tenants/bar".
284
- # @param filter [String]
285
- # The filter string specifies the profiles to be enumerated.
286
- #
287
- # Supported operator: =, AND
288
- #
289
- # The field(s) eligible for filtering are:
290
- #
291
- # * `externalId`
292
- # * `groupId`
293
- #
294
- # externalId and groupId cannot be specified at the same time. If both
295
- # externalId and groupId are provided, the API will return a bad request
296
- # error.
297
- #
298
- # Sample Query:
299
- #
300
- # * externalId = "externalId-1"
301
- # * groupId = "groupId-1"
302
- # @param page_size [Integer]
303
- # The maximum number of resources contained in the underlying API
304
- # response. If page streaming is performed per-resource, this
305
- # parameter does not affect the return value. If page streaming is
306
- # performed per-page, this determines the maximum number of
307
- # resources in a page.
308
- # @param read_mask [Google::Protobuf::FieldMask | Hash]
309
- # A field mask to specify the profile fields to be listed in response.
310
- # All fields are listed if it is unset.
311
- #
312
- # Valid values are:
313
- #
314
- # * name
315
- # A hash of the same form as `Google::Protobuf::FieldMask`
316
- # can also be provided.
317
- # @param options [Google::Gax::CallOptions]
318
- # Overrides the default settings for this call, e.g, timeout,
319
- # retries, etc.
320
- # @yield [result, operation] Access the result along with the RPC operation
321
- # @yieldparam result [Google::Gax::PagedEnumerable<Google::Cloud::Talent::V4beta1::Profile>]
322
- # @yieldparam operation [GRPC::ActiveCall::Operation]
323
- # @return [Google::Gax::PagedEnumerable<Google::Cloud::Talent::V4beta1::Profile>]
324
- # An enumerable of Google::Cloud::Talent::V4beta1::Profile instances.
325
- # See Google::Gax::PagedEnumerable documentation for other
326
- # operations such as per-page iteration or access to the response
327
- # object.
328
- # @raise [Google::Gax::GaxError] if the RPC is aborted.
329
- # @example
330
- # require "google/cloud/talent"
331
- #
332
- # profile_client = Google::Cloud::Talent::ProfileService.new(version: :v4beta1)
333
- # formatted_parent = Google::Cloud::Talent::V4beta1::ProfileServiceClient.tenant_path("[PROJECT]", "[TENANT]")
334
- #
335
- # # Iterate over all results.
336
- # profile_client.list_profiles(formatted_parent).each do |element|
337
- # # Process element.
338
- # end
339
- #
340
- # # Or iterate over results one page at a time.
341
- # profile_client.list_profiles(formatted_parent).each_page do |page|
342
- # # Process each page at a time.
343
- # page.each do |element|
344
- # # Process element.
345
- # end
346
- # end
347
-
348
- def list_profiles \
349
- parent,
350
- filter: nil,
351
- page_size: nil,
352
- read_mask: nil,
353
- options: nil,
354
- &block
355
- req = {
356
- parent: parent,
357
- filter: filter,
358
- page_size: page_size,
359
- read_mask: read_mask
360
- }.delete_if { |_, v| v.nil? }
361
- req = Google::Gax::to_proto(req, Google::Cloud::Talent::V4beta1::ListProfilesRequest)
362
- @list_profiles.call(req, options, &block)
363
- end
364
-
365
- # Creates and returns a new profile.
366
- #
367
- # @param parent [String]
368
- # Required. The name of the tenant this profile belongs to.
369
- #
370
- # The format is "projects/{project_id}/tenants/{tenant_id}". For example,
371
- # "projects/foo/tenants/bar".
372
- # @param profile [Google::Cloud::Talent::V4beta1::Profile | Hash]
373
- # Required. The profile to be created.
374
- # A hash of the same form as `Google::Cloud::Talent::V4beta1::Profile`
375
- # can also be provided.
376
- # @param options [Google::Gax::CallOptions]
377
- # Overrides the default settings for this call, e.g, timeout,
378
- # retries, etc.
379
- # @yield [result, operation] Access the result along with the RPC operation
380
- # @yieldparam result [Google::Cloud::Talent::V4beta1::Profile]
381
- # @yieldparam operation [GRPC::ActiveCall::Operation]
382
- # @return [Google::Cloud::Talent::V4beta1::Profile]
383
- # @raise [Google::Gax::GaxError] if the RPC is aborted.
384
- # @example
385
- # require "google/cloud/talent"
386
- #
387
- # profile_client = Google::Cloud::Talent::ProfileService.new(version: :v4beta1)
388
- # formatted_parent = Google::Cloud::Talent::V4beta1::ProfileServiceClient.tenant_path("[PROJECT]", "[TENANT]")
389
- #
390
- # # TODO: Initialize `profile`:
391
- # profile = {}
392
- # response = profile_client.create_profile(formatted_parent, profile)
393
-
394
- def create_profile \
395
- parent,
396
- profile,
397
- options: nil,
398
- &block
399
- req = {
400
- parent: parent,
401
- profile: profile
402
- }.delete_if { |_, v| v.nil? }
403
- req = Google::Gax::to_proto(req, Google::Cloud::Talent::V4beta1::CreateProfileRequest)
404
- @create_profile.call(req, options, &block)
405
- end
406
-
407
- # Gets the specified profile.
408
- #
409
- # @param name [String]
410
- # Required. Resource name of the profile to get.
411
- #
412
- # The format is
413
- # "projects/{project_id}/tenants/{tenant_id}/profiles/{profile_id}". For
414
- # example, "projects/foo/tenants/bar/profiles/baz".
415
- # @param options [Google::Gax::CallOptions]
416
- # Overrides the default settings for this call, e.g, timeout,
417
- # retries, etc.
418
- # @yield [result, operation] Access the result along with the RPC operation
419
- # @yieldparam result [Google::Cloud::Talent::V4beta1::Profile]
420
- # @yieldparam operation [GRPC::ActiveCall::Operation]
421
- # @return [Google::Cloud::Talent::V4beta1::Profile]
422
- # @raise [Google::Gax::GaxError] if the RPC is aborted.
423
- # @example
424
- # require "google/cloud/talent"
425
- #
426
- # profile_client = Google::Cloud::Talent::ProfileService.new(version: :v4beta1)
427
- # formatted_name = Google::Cloud::Talent::V4beta1::ProfileServiceClient.profile_path("[PROJECT]", "[TENANT]", "[PROFILE]")
428
- # response = profile_client.get_profile(formatted_name)
429
-
430
- def get_profile \
431
- name,
432
- options: nil,
433
- &block
434
- req = {
435
- name: name
436
- }.delete_if { |_, v| v.nil? }
437
- req = Google::Gax::to_proto(req, Google::Cloud::Talent::V4beta1::GetProfileRequest)
438
- @get_profile.call(req, options, &block)
439
- end
440
-
441
- # Updates the specified profile and returns the updated result.
442
- #
443
- # @param profile [Google::Cloud::Talent::V4beta1::Profile | Hash]
444
- # Required. Profile to be updated.
445
- # A hash of the same form as `Google::Cloud::Talent::V4beta1::Profile`
446
- # can also be provided.
447
- # @param update_mask [Google::Protobuf::FieldMask | Hash]
448
- # A field mask to specify the profile fields to update.
449
- #
450
- # A full update is performed if it is unset.
451
- # A hash of the same form as `Google::Protobuf::FieldMask`
452
- # can also be provided.
453
- # @param options [Google::Gax::CallOptions]
454
- # Overrides the default settings for this call, e.g, timeout,
455
- # retries, etc.
456
- # @yield [result, operation] Access the result along with the RPC operation
457
- # @yieldparam result [Google::Cloud::Talent::V4beta1::Profile]
458
- # @yieldparam operation [GRPC::ActiveCall::Operation]
459
- # @return [Google::Cloud::Talent::V4beta1::Profile]
460
- # @raise [Google::Gax::GaxError] if the RPC is aborted.
461
- # @example
462
- # require "google/cloud/talent"
463
- #
464
- # profile_client = Google::Cloud::Talent::ProfileService.new(version: :v4beta1)
465
- #
466
- # # TODO: Initialize `profile`:
467
- # profile = {}
468
- # response = profile_client.update_profile(profile)
469
-
470
- def update_profile \
471
- profile,
472
- update_mask: nil,
473
- options: nil,
474
- &block
475
- req = {
476
- profile: profile,
477
- update_mask: update_mask
478
- }.delete_if { |_, v| v.nil? }
479
- req = Google::Gax::to_proto(req, Google::Cloud::Talent::V4beta1::UpdateProfileRequest)
480
- @update_profile.call(req, options, &block)
481
- end
482
-
483
277
  # Deletes the specified profile.
484
278
  # Prerequisite: The profile has no associated applications or assignments
485
279
  # associated.
@@ -758,6 +552,212 @@ module Google
758
552
  req = Google::Gax::to_proto(req, Google::Cloud::Talent::V4beta1::SearchProfilesRequest)
759
553
  @search_profiles.call(req, options, &block)
760
554
  end
555
+
556
+ # Lists profiles by filter. The order is unspecified.
557
+ #
558
+ # @param parent [String]
559
+ # Required. The resource name of the tenant under which the profile is created.
560
+ #
561
+ # The format is "projects/{project_id}/tenants/{tenant_id}". For example,
562
+ # "projects/foo/tenants/bar".
563
+ # @param filter [String]
564
+ # The filter string specifies the profiles to be enumerated.
565
+ #
566
+ # Supported operator: =, AND
567
+ #
568
+ # The field(s) eligible for filtering are:
569
+ #
570
+ # * `externalId`
571
+ # * `groupId`
572
+ #
573
+ # externalId and groupId cannot be specified at the same time. If both
574
+ # externalId and groupId are provided, the API will return a bad request
575
+ # error.
576
+ #
577
+ # Sample Query:
578
+ #
579
+ # * externalId = "externalId-1"
580
+ # * groupId = "groupId-1"
581
+ # @param page_size [Integer]
582
+ # The maximum number of resources contained in the underlying API
583
+ # response. If page streaming is performed per-resource, this
584
+ # parameter does not affect the return value. If page streaming is
585
+ # performed per-page, this determines the maximum number of
586
+ # resources in a page.
587
+ # @param read_mask [Google::Protobuf::FieldMask | Hash]
588
+ # A field mask to specify the profile fields to be listed in response.
589
+ # All fields are listed if it is unset.
590
+ #
591
+ # Valid values are:
592
+ #
593
+ # * name
594
+ # A hash of the same form as `Google::Protobuf::FieldMask`
595
+ # can also be provided.
596
+ # @param options [Google::Gax::CallOptions]
597
+ # Overrides the default settings for this call, e.g, timeout,
598
+ # retries, etc.
599
+ # @yield [result, operation] Access the result along with the RPC operation
600
+ # @yieldparam result [Google::Gax::PagedEnumerable<Google::Cloud::Talent::V4beta1::Profile>]
601
+ # @yieldparam operation [GRPC::ActiveCall::Operation]
602
+ # @return [Google::Gax::PagedEnumerable<Google::Cloud::Talent::V4beta1::Profile>]
603
+ # An enumerable of Google::Cloud::Talent::V4beta1::Profile instances.
604
+ # See Google::Gax::PagedEnumerable documentation for other
605
+ # operations such as per-page iteration or access to the response
606
+ # object.
607
+ # @raise [Google::Gax::GaxError] if the RPC is aborted.
608
+ # @example
609
+ # require "google/cloud/talent"
610
+ #
611
+ # profile_client = Google::Cloud::Talent::ProfileService.new(version: :v4beta1)
612
+ # formatted_parent = Google::Cloud::Talent::V4beta1::ProfileServiceClient.tenant_path("[PROJECT]", "[TENANT]")
613
+ #
614
+ # # Iterate over all results.
615
+ # profile_client.list_profiles(formatted_parent).each do |element|
616
+ # # Process element.
617
+ # end
618
+ #
619
+ # # Or iterate over results one page at a time.
620
+ # profile_client.list_profiles(formatted_parent).each_page do |page|
621
+ # # Process each page at a time.
622
+ # page.each do |element|
623
+ # # Process element.
624
+ # end
625
+ # end
626
+
627
+ def list_profiles \
628
+ parent,
629
+ filter: nil,
630
+ page_size: nil,
631
+ read_mask: nil,
632
+ options: nil,
633
+ &block
634
+ req = {
635
+ parent: parent,
636
+ filter: filter,
637
+ page_size: page_size,
638
+ read_mask: read_mask
639
+ }.delete_if { |_, v| v.nil? }
640
+ req = Google::Gax::to_proto(req, Google::Cloud::Talent::V4beta1::ListProfilesRequest)
641
+ @list_profiles.call(req, options, &block)
642
+ end
643
+
644
+ # Creates and returns a new profile.
645
+ #
646
+ # @param parent [String]
647
+ # Required. The name of the tenant this profile belongs to.
648
+ #
649
+ # The format is "projects/{project_id}/tenants/{tenant_id}". For example,
650
+ # "projects/foo/tenants/bar".
651
+ # @param profile [Google::Cloud::Talent::V4beta1::Profile | Hash]
652
+ # Required. The profile to be created.
653
+ # A hash of the same form as `Google::Cloud::Talent::V4beta1::Profile`
654
+ # can also be provided.
655
+ # @param options [Google::Gax::CallOptions]
656
+ # Overrides the default settings for this call, e.g, timeout,
657
+ # retries, etc.
658
+ # @yield [result, operation] Access the result along with the RPC operation
659
+ # @yieldparam result [Google::Cloud::Talent::V4beta1::Profile]
660
+ # @yieldparam operation [GRPC::ActiveCall::Operation]
661
+ # @return [Google::Cloud::Talent::V4beta1::Profile]
662
+ # @raise [Google::Gax::GaxError] if the RPC is aborted.
663
+ # @example
664
+ # require "google/cloud/talent"
665
+ #
666
+ # profile_client = Google::Cloud::Talent::ProfileService.new(version: :v4beta1)
667
+ # formatted_parent = Google::Cloud::Talent::V4beta1::ProfileServiceClient.tenant_path("[PROJECT]", "[TENANT]")
668
+ #
669
+ # # TODO: Initialize `profile`:
670
+ # profile = {}
671
+ # response = profile_client.create_profile(formatted_parent, profile)
672
+
673
+ def create_profile \
674
+ parent,
675
+ profile,
676
+ options: nil,
677
+ &block
678
+ req = {
679
+ parent: parent,
680
+ profile: profile
681
+ }.delete_if { |_, v| v.nil? }
682
+ req = Google::Gax::to_proto(req, Google::Cloud::Talent::V4beta1::CreateProfileRequest)
683
+ @create_profile.call(req, options, &block)
684
+ end
685
+
686
+ # Gets the specified profile.
687
+ #
688
+ # @param name [String]
689
+ # Required. Resource name of the profile to get.
690
+ #
691
+ # The format is
692
+ # "projects/{project_id}/tenants/{tenant_id}/profiles/{profile_id}". For
693
+ # example, "projects/foo/tenants/bar/profiles/baz".
694
+ # @param options [Google::Gax::CallOptions]
695
+ # Overrides the default settings for this call, e.g, timeout,
696
+ # retries, etc.
697
+ # @yield [result, operation] Access the result along with the RPC operation
698
+ # @yieldparam result [Google::Cloud::Talent::V4beta1::Profile]
699
+ # @yieldparam operation [GRPC::ActiveCall::Operation]
700
+ # @return [Google::Cloud::Talent::V4beta1::Profile]
701
+ # @raise [Google::Gax::GaxError] if the RPC is aborted.
702
+ # @example
703
+ # require "google/cloud/talent"
704
+ #
705
+ # profile_client = Google::Cloud::Talent::ProfileService.new(version: :v4beta1)
706
+ # formatted_name = Google::Cloud::Talent::V4beta1::ProfileServiceClient.profile_path("[PROJECT]", "[TENANT]", "[PROFILE]")
707
+ # response = profile_client.get_profile(formatted_name)
708
+
709
+ def get_profile \
710
+ name,
711
+ options: nil,
712
+ &block
713
+ req = {
714
+ name: name
715
+ }.delete_if { |_, v| v.nil? }
716
+ req = Google::Gax::to_proto(req, Google::Cloud::Talent::V4beta1::GetProfileRequest)
717
+ @get_profile.call(req, options, &block)
718
+ end
719
+
720
+ # Updates the specified profile and returns the updated result.
721
+ #
722
+ # @param profile [Google::Cloud::Talent::V4beta1::Profile | Hash]
723
+ # Required. Profile to be updated.
724
+ # A hash of the same form as `Google::Cloud::Talent::V4beta1::Profile`
725
+ # can also be provided.
726
+ # @param update_mask [Google::Protobuf::FieldMask | Hash]
727
+ # A field mask to specify the profile fields to update.
728
+ #
729
+ # A full update is performed if it is unset.
730
+ # A hash of the same form as `Google::Protobuf::FieldMask`
731
+ # can also be provided.
732
+ # @param options [Google::Gax::CallOptions]
733
+ # Overrides the default settings for this call, e.g, timeout,
734
+ # retries, etc.
735
+ # @yield [result, operation] Access the result along with the RPC operation
736
+ # @yieldparam result [Google::Cloud::Talent::V4beta1::Profile]
737
+ # @yieldparam operation [GRPC::ActiveCall::Operation]
738
+ # @return [Google::Cloud::Talent::V4beta1::Profile]
739
+ # @raise [Google::Gax::GaxError] if the RPC is aborted.
740
+ # @example
741
+ # require "google/cloud/talent"
742
+ #
743
+ # profile_client = Google::Cloud::Talent::ProfileService.new(version: :v4beta1)
744
+ #
745
+ # # TODO: Initialize `profile`:
746
+ # profile = {}
747
+ # response = profile_client.update_profile(profile)
748
+
749
+ def update_profile \
750
+ profile,
751
+ update_mask: nil,
752
+ options: nil,
753
+ &block
754
+ req = {
755
+ profile: profile,
756
+ update_mask: update_mask
757
+ }.delete_if { |_, v| v.nil? }
758
+ req = Google::Gax::to_proto(req, Google::Cloud::Talent::V4beta1::UpdateProfileRequest)
759
+ @update_profile.call(req, options, &block)
760
+ end
761
761
  end
762
762
  end
763
763
  end