google-cloud-talent 0.10.0 → 0.20.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (80) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +2 -1
  3. data/AUTHENTICATION.md +51 -59
  4. data/LICENSE.md +203 -0
  5. data/MIGRATING.md +347 -0
  6. data/README.md +35 -25
  7. data/lib/{google/cloud/talent/v4beta1/doc/google/protobuf/empty.rb → google-cloud-talent.rb} +4 -14
  8. data/lib/google/cloud/talent.rb +253 -441
  9. data/lib/google/cloud/talent/version.rb +6 -2
  10. metadata +62 -111
  11. data/LICENSE +0 -201
  12. data/lib/google/cloud/talent/v4beta1.rb +0 -543
  13. data/lib/google/cloud/talent/v4beta1/application_pb.rb +0 -63
  14. data/lib/google/cloud/talent/v4beta1/application_service_client.rb +0 -527
  15. data/lib/google/cloud/talent/v4beta1/application_service_client_config.json +0 -51
  16. data/lib/google/cloud/talent/v4beta1/application_service_pb.rb +0 -55
  17. data/lib/google/cloud/talent/v4beta1/application_service_services_pb.rb +0 -55
  18. data/lib/google/cloud/talent/v4beta1/batch_pb.rb +0 -18
  19. data/lib/google/cloud/talent/v4beta1/common_pb.rb +0 -341
  20. data/lib/google/cloud/talent/v4beta1/company_pb.rb +0 -41
  21. data/lib/google/cloud/talent/v4beta1/company_service_client.rb +0 -536
  22. data/lib/google/cloud/talent/v4beta1/company_service_client_config.json +0 -51
  23. data/lib/google/cloud/talent/v4beta1/company_service_pb.rb +0 -56
  24. data/lib/google/cloud/talent/v4beta1/company_service_services_pb.rb +0 -55
  25. data/lib/google/cloud/talent/v4beta1/completion_client.rb +0 -344
  26. data/lib/google/cloud/talent/v4beta1/completion_client_config.json +0 -31
  27. data/lib/google/cloud/talent/v4beta1/completion_service_pb.rb +0 -56
  28. data/lib/google/cloud/talent/v4beta1/completion_service_services_pb.rb +0 -47
  29. data/lib/google/cloud/talent/v4beta1/credentials.rb +0 -42
  30. data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/application.rb +0 -162
  31. data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/application_service.rb +0 -100
  32. data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/common.rb +0 -1057
  33. data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/company.rb +0 -107
  34. data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/company_service.rb +0 -116
  35. data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/completion_service.rb +0 -130
  36. data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/event.rb +0 -224
  37. data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/event_service.rb +0 -36
  38. data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/filters.rb +0 -763
  39. data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/histogram.rb +0 -50
  40. data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/job.rb +0 -331
  41. data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/job_service.rb +0 -694
  42. data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/profile.rb +0 -750
  43. data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/profile_service.rb +0 -361
  44. data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/tenant.rb +0 -70
  45. data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/tenant_service.rb +0 -96
  46. data/lib/google/cloud/talent/v4beta1/doc/google/longrunning/operations.rb +0 -51
  47. data/lib/google/cloud/talent/v4beta1/doc/google/protobuf/any.rb +0 -131
  48. data/lib/google/cloud/talent/v4beta1/doc/google/protobuf/duration.rb +0 -91
  49. data/lib/google/cloud/talent/v4beta1/doc/google/protobuf/field_mask.rb +0 -222
  50. data/lib/google/cloud/talent/v4beta1/doc/google/protobuf/timestamp.rb +0 -113
  51. data/lib/google/cloud/talent/v4beta1/doc/google/protobuf/wrappers.rb +0 -34
  52. data/lib/google/cloud/talent/v4beta1/doc/google/rpc/status.rb +0 -39
  53. data/lib/google/cloud/talent/v4beta1/doc/google/type/date.rb +0 -43
  54. data/lib/google/cloud/talent/v4beta1/doc/google/type/latlng.rb +0 -31
  55. data/lib/google/cloud/talent/v4beta1/doc/google/type/money.rb +0 -36
  56. data/lib/google/cloud/talent/v4beta1/doc/google/type/postal_address.rb +0 -128
  57. data/lib/google/cloud/talent/v4beta1/doc/google/type/timeofday.rb +0 -37
  58. data/lib/google/cloud/talent/v4beta1/event_pb.rb +0 -69
  59. data/lib/google/cloud/talent/v4beta1/event_service_client.rb +0 -271
  60. data/lib/google/cloud/talent/v4beta1/event_service_client_config.json +0 -31
  61. data/lib/google/cloud/talent/v4beta1/event_service_pb.rb +0 -27
  62. data/lib/google/cloud/talent/v4beta1/event_service_services_pb.rb +0 -52
  63. data/lib/google/cloud/talent/v4beta1/filters_pb.rb +0 -187
  64. data/lib/google/cloud/talent/v4beta1/helpers.rb +0 -179
  65. data/lib/google/cloud/talent/v4beta1/histogram_pb.rb +0 -27
  66. data/lib/google/cloud/talent/v4beta1/job_pb.rb +0 -72
  67. data/lib/google/cloud/talent/v4beta1/job_service_client.rb +0 -1521
  68. data/lib/google/cloud/talent/v4beta1/job_service_client_config.json +0 -76
  69. data/lib/google/cloud/talent/v4beta1/job_service_pb.rb +0 -166
  70. data/lib/google/cloud/talent/v4beta1/job_service_services_pb.rb +0 -87
  71. data/lib/google/cloud/talent/v4beta1/profile_pb.rb +0 -213
  72. data/lib/google/cloud/talent/v4beta1/profile_service_client.rb +0 -765
  73. data/lib/google/cloud/talent/v4beta1/profile_service_client_config.json +0 -56
  74. data/lib/google/cloud/talent/v4beta1/profile_service_pb.rb +0 -91
  75. data/lib/google/cloud/talent/v4beta1/profile_service_services_pb.rb +0 -64
  76. data/lib/google/cloud/talent/v4beta1/tenant_pb.rb +0 -34
  77. data/lib/google/cloud/talent/v4beta1/tenant_service_client.rb +0 -474
  78. data/lib/google/cloud/talent/v4beta1/tenant_service_client_config.json +0 -51
  79. data/lib/google/cloud/talent/v4beta1/tenant_service_pb.rb +0 -55
  80. data/lib/google/cloud/talent/v4beta1/tenant_service_services_pb.rb +0 -54
data/README.md CHANGED
@@ -1,42 +1,52 @@
1
- # Ruby Client for Cloud Talent Solution API
1
+ # Ruby Client for the Cloud Talent Solution API
2
2
 
3
- [Cloud Talent Solution API][Product Documentation]:
4
- Cloud Talent Solution provides the capability to create, read, update, and
5
- delete job postings, as well as search jobs based on keywords and filters.
6
- - [Client Library Documentation][]
7
- - [Product Documentation][]
3
+ API Client library for the Cloud Talent Solution API
8
4
 
9
- ## Quick Start
10
- In order to use this library, you first need to go through the following
11
- steps:
5
+ Transform your job search and candidate matching capabilities with Cloud Talent Solution, designed to support enterprise talent acquisition technology and evolve with your growing needs. This AI solution includes features such as Job Search and Profile Search (Beta) to provide candidates and employers with an enhanced talent acquisition experience.
12
6
 
13
- 1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)
14
- 2. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project)
15
- 3. [Enable the Cloud Talent Solution API.](https://console.cloud.google.com/apis/library/talent.googleapis.com)
16
- 4. [Setup Authentication.](https://googleapis.dev/ruby/google-cloud-talent/latest/file.AUTHENTICATION.html)
7
+ Actual client classes for the various versions of this API are defined in
8
+ _versioned_ client gems, with names of the form `google-cloud-talent-v*`.
9
+ The gem `google-cloud-talent` is a convenience wrapper library that brings the
10
+ verisoned gems in as dependencies, and provides high-level methods for
11
+ constructing clients.
12
+
13
+ View the [Client Library Documentation](https://googleapis.dev/ruby/google-cloud-talent/latest)
14
+ for this library, google-cloud-talent, to see the convenience methods for
15
+ constructing client objects. Reference documentation for the client objects
16
+ themselves can be found in the client library documentation for the versioned
17
+ client gems:
18
+ [google-cloud-talent-v4beta1](https://googleapis.dev/ruby/google-cloud-talent-v4beta1/latest).
19
+
20
+ See also the [Product Documentation](https://cloud.google.com/solutions/talent-solution)
21
+ for more usage information.
22
+
23
+ ## Quick Start
17
24
 
18
- ### Installation
19
25
  ```
20
26
  $ gem install google-cloud-talent
21
27
  ```
22
28
 
23
- ### Next Steps
24
- - Read the [Client Library Documentation][] for Cloud Talent Solution API
25
- to see other available methods on the client.
26
- - Read the [Cloud Talent Solution API Product documentation][Product Documentation]
27
- to learn more about the product and see How-to Guides.
28
- - View this [repository's main README](https://github.com/googleapis/google-cloud-ruby/blob/master/README.md)
29
- to see the full list of Cloud APIs that we cover.
29
+ In order to use this library, you first need to go through the following steps:
30
+
31
+ 1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)
32
+ 1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project)
33
+ 1. [Enable the API.](https://console.cloud.google.com/apis/library/jobs.googleapis.com)
34
+ 1. {file:AUTHENTICATION.md Set up authentication.}
35
+
36
+ ## Migrating from pre-0.20 versions
30
37
 
31
- [Client Library Documentation]: https://googleapis.dev/ruby/google-cloud-talent/latest
32
- [Product Documentation]: https://cloud.google.com/talent-solution
38
+ The 0.20 release of the google-cloud-talent client is a significant upgrade
39
+ based on a [next-gen code generator](https://github.com/googleapis/gapic-generator-ruby),
40
+ and includes substantial interface changes. Existing code written for earlier
41
+ versions of this library will likely require updates to use this version.
42
+ See the {file:MIGRATING.md MIGRATING.md} document for more information.
33
43
 
34
44
  ## Enabling Logging
35
45
 
36
46
  To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
37
- The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib-2.5.0/libdoc/logger/rdoc/Logger.html) as shown below,
47
+ The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib/libdoc/logger/rdoc/Logger.html) as shown below,
38
48
  or a [`Google::Cloud::Logging::Logger`](https://googleapis.dev/ruby/google-cloud-logging/latest)
39
- that will write logs to [Stackdriver Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
49
+ that will write logs to [Cloud Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
40
50
  and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
41
51
 
42
52
  Configuring a Ruby stdlib logger:
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Copyright 2020 Google LLC
2
4
  #
3
5
  # Licensed under the Apache License, Version 2.0 (the "License");
@@ -12,18 +14,6 @@
12
14
  # See the License for the specific language governing permissions and
13
15
  # limitations under the License.
14
16
 
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
15
18
 
16
- module Google
17
- module Protobuf
18
- # A generic empty message that you can re-use to avoid defining duplicated
19
- # empty messages in your APIs. A typical example is to use it as the request
20
- # or the response type of an API method. For instance:
21
- #
22
- # service Foo {
23
- # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
24
- # }
25
- #
26
- # The JSON representation for `Empty` is empty JSON object `{}`.
27
- class Empty; end
28
- end
29
- end
19
+ require "google/cloud/talent" unless defined? Google::Cloud::Talent::VERSION
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Copyright 2020 Google LLC
2
4
  #
3
5
  # Licensed under the Apache License, Version 2.0 (the "License");
@@ -12,474 +14,284 @@
12
14
  # See the License for the specific language governing permissions and
13
15
  # limitations under the License.
14
16
 
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ # Require this file early so that the version constant gets defined before
20
+ # requiring "google/cloud". This is because google-cloud-core will load the
21
+ # entrypoint (gem name) file, which in turn re-requires this file (hence
22
+ # causing a require cycle) unless the version constant is already defined.
23
+ require "google/cloud/talent/version"
15
24
 
16
- require "google/gax"
17
- require "pathname"
25
+ require "googleauth"
26
+ gem "google-cloud-core"
27
+ require "google/cloud" unless defined? ::Google::Cloud.new
28
+ require "google/cloud/config"
29
+
30
+ # Set the default configuration
31
+ ::Google::Cloud.configure.add_config! :talent do |config|
32
+ config.add_field! :endpoint, "jobs.googleapis.com", match: ::String
33
+ config.add_field! :credentials, nil, match: [::String, ::Hash, ::Google::Auth::Credentials]
34
+ config.add_field! :scope, nil, match: [::Array, ::String]
35
+ config.add_field! :lib_name, nil, match: ::String
36
+ config.add_field! :lib_version, nil, match: ::String
37
+ config.add_field! :interceptors, nil, match: ::Array
38
+ config.add_field! :timeout, nil, match: ::Numeric
39
+ config.add_field! :metadata, nil, match: ::Hash
40
+ config.add_field! :retry_policy, nil, match: [::Hash, ::Proc]
41
+ config.add_field! :quota_project, nil, match: ::String
42
+ end
18
43
 
19
44
  module Google
20
45
  module Cloud
21
- # rubocop:disable LineLength
22
-
23
- ##
24
- # # Ruby Client for Cloud Talent Solution API
25
- #
26
- # [Cloud Talent Solution API][Product Documentation]:
27
- # Cloud Talent Solution provides the capability to create, read, update, and
28
- # delete job postings, as well as search jobs based on keywords and filters.
29
- # - [Product Documentation][]
30
- #
31
- # ## Quick Start
32
- # In order to use this library, you first need to go through the following
33
- # steps:
34
- #
35
- # 1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)
36
- # 2. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project)
37
- # 3. [Enable the Cloud Talent Solution API.](https://console.cloud.google.com/apis/library/talent.googleapis.com)
38
- # 4. [Setup Authentication.](https://googleapis.dev/ruby/google-cloud-talent/latest/file.AUTHENTICATION.html)
39
- #
40
- # ### Installation
41
- # ```
42
- # $ gem install google-cloud-talent
43
- # ```
44
- #
45
- # ### Next Steps
46
- # - Read the [Cloud Talent Solution API Product documentation][Product Documentation]
47
- # to learn more about the product and see How-to Guides.
48
- # - View this [repository's main README](https://github.com/googleapis/google-cloud-ruby/blob/master/README.md)
49
- # to see the full list of Cloud APIs that we cover.
50
- #
51
- # [Product Documentation]: https://cloud.google.com/talent
52
- #
53
- # ## Enabling Logging
54
- #
55
- # To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
56
- # The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib-2.5.0/libdoc/logger/rdoc/Logger.html) as shown below,
57
- # or a [`Google::Cloud::Logging::Logger`](https://googleapis.dev/ruby/google-cloud-logging/latest)
58
- # that will write logs to [Stackdriver Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
59
- # and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
60
- #
61
- # Configuring a Ruby stdlib logger:
62
- #
63
- # ```ruby
64
- # require "logger"
65
- #
66
- # module MyLogger
67
- # LOGGER = Logger.new $stderr, level: Logger::WARN
68
- # def logger
69
- # LOGGER
70
- # end
71
- # end
72
- #
73
- # # Define a gRPC module-level logger method before grpc/logconfig.rb loads.
74
- # module GRPC
75
- # extend MyLogger
76
- # end
77
- # ```
78
- #
79
46
  module Talent
80
- # rubocop:enable LineLength
81
-
82
- FILE_DIR = File.realdirpath(Pathname.new(__FILE__).join("..").join("talent"))
47
+ ##
48
+ # Create a new client object for ApplicationService.
49
+ #
50
+ # By default, this returns an instance of
51
+ # [Google::Cloud::Talent::V4beta1::ApplicationService::Client](https://googleapis.dev/ruby/google-cloud-talent-v4beta1/latest/Google/Cloud/Talent/V4beta1/ApplicationService/Client.html)
52
+ # for version V4beta1 of the API.
53
+ # However, you can specify specify a different API version by passing it in the
54
+ # `version` parameter. If the ApplicationService service is
55
+ # supported by that API version, and the corresponding gem is available, the
56
+ # appropriate versioned client will be returned.
57
+ #
58
+ # ## About ApplicationService
59
+ #
60
+ # A service that handles application management, including CRUD and
61
+ # enumeration.
62
+ #
63
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
64
+ # Defaults to `:v4beta1`.
65
+ # @return [ApplicationService::Client] A client object for the specified version.
66
+ #
67
+ def self.application_service version: :v4beta1, &block
68
+ require "google/cloud/talent/#{version.to_s.downcase}"
83
69
 
84
- AVAILABLE_VERSIONS = Dir["#{FILE_DIR}/*"]
85
- .select { |file| File.directory?(file) }
86
- .select { |dir| Google::Gax::VERSION_MATCHER.match(File.basename(dir)) }
87
- .select { |dir| File.exist?(dir + ".rb") }
88
- .map { |dir| File.basename(dir) }
70
+ package_name = Google::Cloud::Talent
71
+ .constants
72
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
73
+ .first
74
+ package_module = Google::Cloud::Talent.const_get package_name
75
+ package_module.const_get(:ApplicationService).const_get(:Client).new(&block)
76
+ end
89
77
 
90
- module TenantService
91
- ##
92
- # A service that handles tenant management, including CRUD and enumeration.
93
- #
94
- # @param version [Symbol, String]
95
- # The major version of the service to be used. By default :v4beta1
96
- # is used.
97
- # @overload new(version:, credentials:, scopes:, client_config:, timeout:)
98
- # @param credentials [Google::Auth::Credentials, String, Hash, GRPC::Core::Channel, GRPC::Core::ChannelCredentials, Proc]
99
- # Provides the means for authenticating requests made by the client. This parameter can
100
- # be many types.
101
- # A `Google::Auth::Credentials` uses a the properties of its represented keyfile for
102
- # authenticating requests made by this client.
103
- # A `String` will be treated as the path to the keyfile to be used for the construction of
104
- # credentials for this client.
105
- # A `Hash` will be treated as the contents of a keyfile to be used for the construction of
106
- # credentials for this client.
107
- # A `GRPC::Core::Channel` will be used to make calls through.
108
- # A `GRPC::Core::ChannelCredentials` for the setting up the RPC client. The channel credentials
109
- # should already be composed with a `GRPC::Core::CallCredentials` object.
110
- # A `Proc` will be used as an updater_proc for the Grpc channel. The proc transforms the
111
- # metadata for requests, generally, to give OAuth credentials.
112
- # @param scopes [Array<String>]
113
- # The OAuth scopes for this service. This parameter is ignored if
114
- # an updater_proc is supplied.
115
- # @param client_config [Hash]
116
- # A Hash for call options for each method. See
117
- # Google::Gax#construct_settings for the structure of
118
- # this data. Falls back to the default config if not specified
119
- # or the specified config is missing data points.
120
- # @param timeout [Numeric]
121
- # The default timeout, in seconds, for calls made through this client.
122
- # @param metadata [Hash]
123
- # Default metadata to be sent with each request. This can be overridden on a per call basis.
124
- # @param service_address [String]
125
- # Override for the service hostname, or `nil` to leave as the default.
126
- # @param service_port [Integer]
127
- # Override for the service port, or `nil` to leave as the default.
128
- # @param exception_transformer [Proc]
129
- # An optional proc that intercepts any exceptions raised during an API call to inject
130
- # custom error handling.
131
- def self.new(*args, version: :v4beta1, **kwargs)
132
- unless AVAILABLE_VERSIONS.include?(version.to_s.downcase)
133
- raise "The version: #{version} is not available. The available versions " \
134
- "are: [#{AVAILABLE_VERSIONS.join(", ")}]"
135
- end
78
+ ##
79
+ # Create a new client object for CompanyService.
80
+ #
81
+ # By default, this returns an instance of
82
+ # [Google::Cloud::Talent::V4beta1::CompanyService::Client](https://googleapis.dev/ruby/google-cloud-talent-v4beta1/latest/Google/Cloud/Talent/V4beta1/CompanyService/Client.html)
83
+ # for version V4beta1 of the API.
84
+ # However, you can specify specify a different API version by passing it in the
85
+ # `version` parameter. If the CompanyService service is
86
+ # supported by that API version, and the corresponding gem is available, the
87
+ # appropriate versioned client will be returned.
88
+ #
89
+ # ## About CompanyService
90
+ #
91
+ # A service that handles company management, including CRUD and enumeration.
92
+ #
93
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
94
+ # Defaults to `:v4beta1`.
95
+ # @return [CompanyService::Client] A client object for the specified version.
96
+ #
97
+ def self.company_service version: :v4beta1, &block
98
+ require "google/cloud/talent/#{version.to_s.downcase}"
136
99
 
137
- require "#{FILE_DIR}/#{version.to_s.downcase}"
138
- version_module = Google::Cloud::Talent
139
- .constants
140
- .select {|sym| sym.to_s.downcase == version.to_s.downcase}
141
- .first
142
- Google::Cloud::Talent.const_get(version_module)::TenantService.new(*args, **kwargs)
143
- end
100
+ package_name = Google::Cloud::Talent
101
+ .constants
102
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
103
+ .first
104
+ package_module = Google::Cloud::Talent.const_get package_name
105
+ package_module.const_get(:CompanyService).const_get(:Client).new(&block)
144
106
  end
145
107
 
146
- module ProfileService
147
- ##
148
- # A service that handles profile management, including profile CRUD,
149
- # enumeration and search.
150
- #
151
- # @param version [Symbol, String]
152
- # The major version of the service to be used. By default :v4beta1
153
- # is used.
154
- # @overload new(version:, credentials:, scopes:, client_config:, timeout:)
155
- # @param credentials [Google::Auth::Credentials, String, Hash, GRPC::Core::Channel, GRPC::Core::ChannelCredentials, Proc]
156
- # Provides the means for authenticating requests made by the client. This parameter can
157
- # be many types.
158
- # A `Google::Auth::Credentials` uses a the properties of its represented keyfile for
159
- # authenticating requests made by this client.
160
- # A `String` will be treated as the path to the keyfile to be used for the construction of
161
- # credentials for this client.
162
- # A `Hash` will be treated as the contents of a keyfile to be used for the construction of
163
- # credentials for this client.
164
- # A `GRPC::Core::Channel` will be used to make calls through.
165
- # A `GRPC::Core::ChannelCredentials` for the setting up the RPC client. The channel credentials
166
- # should already be composed with a `GRPC::Core::CallCredentials` object.
167
- # A `Proc` will be used as an updater_proc for the Grpc channel. The proc transforms the
168
- # metadata for requests, generally, to give OAuth credentials.
169
- # @param scopes [Array<String>]
170
- # The OAuth scopes for this service. This parameter is ignored if
171
- # an updater_proc is supplied.
172
- # @param client_config [Hash]
173
- # A Hash for call options for each method. See
174
- # Google::Gax#construct_settings for the structure of
175
- # this data. Falls back to the default config if not specified
176
- # or the specified config is missing data points.
177
- # @param timeout [Numeric]
178
- # The default timeout, in seconds, for calls made through this client.
179
- # @param metadata [Hash]
180
- # Default metadata to be sent with each request. This can be overridden on a per call basis.
181
- # @param service_address [String]
182
- # Override for the service hostname, or `nil` to leave as the default.
183
- # @param service_port [Integer]
184
- # Override for the service port, or `nil` to leave as the default.
185
- # @param exception_transformer [Proc]
186
- # An optional proc that intercepts any exceptions raised during an API call to inject
187
- # custom error handling.
188
- def self.new(*args, version: :v4beta1, **kwargs)
189
- unless AVAILABLE_VERSIONS.include?(version.to_s.downcase)
190
- raise "The version: #{version} is not available. The available versions " \
191
- "are: [#{AVAILABLE_VERSIONS.join(", ")}]"
192
- end
108
+ ##
109
+ # Create a new client object for Completion.
110
+ #
111
+ # By default, this returns an instance of
112
+ # [Google::Cloud::Talent::V4beta1::Completion::Client](https://googleapis.dev/ruby/google-cloud-talent-v4beta1/latest/Google/Cloud/Talent/V4beta1/Completion/Client.html)
113
+ # for version V4beta1 of the API.
114
+ # However, you can specify specify a different API version by passing it in the
115
+ # `version` parameter. If the Completion service is
116
+ # supported by that API version, and the corresponding gem is available, the
117
+ # appropriate versioned client will be returned.
118
+ #
119
+ # ## About Completion
120
+ #
121
+ # A service handles auto completion.
122
+ #
123
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
124
+ # Defaults to `:v4beta1`.
125
+ # @return [Completion::Client] A client object for the specified version.
126
+ #
127
+ def self.completion version: :v4beta1, &block
128
+ require "google/cloud/talent/#{version.to_s.downcase}"
193
129
 
194
- require "#{FILE_DIR}/#{version.to_s.downcase}"
195
- version_module = Google::Cloud::Talent
196
- .constants
197
- .select {|sym| sym.to_s.downcase == version.to_s.downcase}
198
- .first
199
- Google::Cloud::Talent.const_get(version_module)::ProfileService.new(*args, **kwargs)
200
- end
130
+ package_name = Google::Cloud::Talent
131
+ .constants
132
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
133
+ .first
134
+ package_module = Google::Cloud::Talent.const_get package_name
135
+ package_module.const_get(:Completion).const_get(:Client).new(&block)
201
136
  end
202
137
 
203
- module Event
204
- ##
205
- # A service handles client event report.
206
- #
207
- # @param version [Symbol, String]
208
- # The major version of the service to be used. By default :v4beta1
209
- # is used.
210
- # @overload new(version:, credentials:, scopes:, client_config:, timeout:)
211
- # @param credentials [Google::Auth::Credentials, String, Hash, GRPC::Core::Channel, GRPC::Core::ChannelCredentials, Proc]
212
- # Provides the means for authenticating requests made by the client. This parameter can
213
- # be many types.
214
- # A `Google::Auth::Credentials` uses a the properties of its represented keyfile for
215
- # authenticating requests made by this client.
216
- # A `String` will be treated as the path to the keyfile to be used for the construction of
217
- # credentials for this client.
218
- # A `Hash` will be treated as the contents of a keyfile to be used for the construction of
219
- # credentials for this client.
220
- # A `GRPC::Core::Channel` will be used to make calls through.
221
- # A `GRPC::Core::ChannelCredentials` for the setting up the RPC client. The channel credentials
222
- # should already be composed with a `GRPC::Core::CallCredentials` object.
223
- # A `Proc` will be used as an updater_proc for the Grpc channel. The proc transforms the
224
- # metadata for requests, generally, to give OAuth credentials.
225
- # @param scopes [Array<String>]
226
- # The OAuth scopes for this service. This parameter is ignored if
227
- # an updater_proc is supplied.
228
- # @param client_config [Hash]
229
- # A Hash for call options for each method. See
230
- # Google::Gax#construct_settings for the structure of
231
- # this data. Falls back to the default config if not specified
232
- # or the specified config is missing data points.
233
- # @param timeout [Numeric]
234
- # The default timeout, in seconds, for calls made through this client.
235
- # @param metadata [Hash]
236
- # Default metadata to be sent with each request. This can be overridden on a per call basis.
237
- # @param service_address [String]
238
- # Override for the service hostname, or `nil` to leave as the default.
239
- # @param service_port [Integer]
240
- # Override for the service port, or `nil` to leave as the default.
241
- # @param exception_transformer [Proc]
242
- # An optional proc that intercepts any exceptions raised during an API call to inject
243
- # custom error handling.
244
- def self.new(*args, version: :v4beta1, **kwargs)
245
- unless AVAILABLE_VERSIONS.include?(version.to_s.downcase)
246
- raise "The version: #{version} is not available. The available versions " \
247
- "are: [#{AVAILABLE_VERSIONS.join(", ")}]"
248
- end
138
+ ##
139
+ # Create a new client object for EventService.
140
+ #
141
+ # By default, this returns an instance of
142
+ # [Google::Cloud::Talent::V4beta1::EventService::Client](https://googleapis.dev/ruby/google-cloud-talent-v4beta1/latest/Google/Cloud/Talent/V4beta1/EventService/Client.html)
143
+ # for version V4beta1 of the API.
144
+ # However, you can specify specify a different API version by passing it in the
145
+ # `version` parameter. If the EventService service is
146
+ # supported by that API version, and the corresponding gem is available, the
147
+ # appropriate versioned client will be returned.
148
+ #
149
+ # ## About EventService
150
+ #
151
+ # A service handles client event report.
152
+ #
153
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
154
+ # Defaults to `:v4beta1`.
155
+ # @return [EventService::Client] A client object for the specified version.
156
+ #
157
+ def self.event_service version: :v4beta1, &block
158
+ require "google/cloud/talent/#{version.to_s.downcase}"
249
159
 
250
- require "#{FILE_DIR}/#{version.to_s.downcase}"
251
- version_module = Google::Cloud::Talent
252
- .constants
253
- .select {|sym| sym.to_s.downcase == version.to_s.downcase}
254
- .first
255
- Google::Cloud::Talent.const_get(version_module)::Event.new(*args, **kwargs)
256
- end
160
+ package_name = Google::Cloud::Talent
161
+ .constants
162
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
163
+ .first
164
+ package_module = Google::Cloud::Talent.const_get package_name
165
+ package_module.const_get(:EventService).const_get(:Client).new(&block)
257
166
  end
258
167
 
259
- module ApplicationService
260
- ##
261
- # A service that handles application management, including CRUD and
262
- # enumeration.
263
- #
264
- # @param version [Symbol, String]
265
- # The major version of the service to be used. By default :v4beta1
266
- # is used.
267
- # @overload new(version:, credentials:, scopes:, client_config:, timeout:)
268
- # @param credentials [Google::Auth::Credentials, String, Hash, GRPC::Core::Channel, GRPC::Core::ChannelCredentials, Proc]
269
- # Provides the means for authenticating requests made by the client. This parameter can
270
- # be many types.
271
- # A `Google::Auth::Credentials` uses a the properties of its represented keyfile for
272
- # authenticating requests made by this client.
273
- # A `String` will be treated as the path to the keyfile to be used for the construction of
274
- # credentials for this client.
275
- # A `Hash` will be treated as the contents of a keyfile to be used for the construction of
276
- # credentials for this client.
277
- # A `GRPC::Core::Channel` will be used to make calls through.
278
- # A `GRPC::Core::ChannelCredentials` for the setting up the RPC client. The channel credentials
279
- # should already be composed with a `GRPC::Core::CallCredentials` object.
280
- # A `Proc` will be used as an updater_proc for the Grpc channel. The proc transforms the
281
- # metadata for requests, generally, to give OAuth credentials.
282
- # @param scopes [Array<String>]
283
- # The OAuth scopes for this service. This parameter is ignored if
284
- # an updater_proc is supplied.
285
- # @param client_config [Hash]
286
- # A Hash for call options for each method. See
287
- # Google::Gax#construct_settings for the structure of
288
- # this data. Falls back to the default config if not specified
289
- # or the specified config is missing data points.
290
- # @param timeout [Numeric]
291
- # The default timeout, in seconds, for calls made through this client.
292
- # @param metadata [Hash]
293
- # Default metadata to be sent with each request. This can be overridden on a per call basis.
294
- # @param service_address [String]
295
- # Override for the service hostname, or `nil` to leave as the default.
296
- # @param service_port [Integer]
297
- # Override for the service port, or `nil` to leave as the default.
298
- # @param exception_transformer [Proc]
299
- # An optional proc that intercepts any exceptions raised during an API call to inject
300
- # custom error handling.
301
- def self.new(*args, version: :v4beta1, **kwargs)
302
- unless AVAILABLE_VERSIONS.include?(version.to_s.downcase)
303
- raise "The version: #{version} is not available. The available versions " \
304
- "are: [#{AVAILABLE_VERSIONS.join(", ")}]"
305
- end
168
+ ##
169
+ # Create a new client object for JobService.
170
+ #
171
+ # By default, this returns an instance of
172
+ # [Google::Cloud::Talent::V4beta1::JobService::Client](https://googleapis.dev/ruby/google-cloud-talent-v4beta1/latest/Google/Cloud/Talent/V4beta1/JobService/Client.html)
173
+ # for version V4beta1 of the API.
174
+ # However, you can specify specify a different API version by passing it in the
175
+ # `version` parameter. If the JobService service is
176
+ # supported by that API version, and the corresponding gem is available, the
177
+ # appropriate versioned client will be returned.
178
+ #
179
+ # ## About JobService
180
+ #
181
+ # A service handles job management, including job CRUD, enumeration and search.
182
+ #
183
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
184
+ # Defaults to `:v4beta1`.
185
+ # @return [JobService::Client] A client object for the specified version.
186
+ #
187
+ def self.job_service version: :v4beta1, &block
188
+ require "google/cloud/talent/#{version.to_s.downcase}"
306
189
 
307
- require "#{FILE_DIR}/#{version.to_s.downcase}"
308
- version_module = Google::Cloud::Talent
309
- .constants
310
- .select {|sym| sym.to_s.downcase == version.to_s.downcase}
311
- .first
312
- Google::Cloud::Talent.const_get(version_module)::ApplicationService.new(*args, **kwargs)
313
- end
190
+ package_name = Google::Cloud::Talent
191
+ .constants
192
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
193
+ .first
194
+ package_module = Google::Cloud::Talent.const_get package_name
195
+ package_module.const_get(:JobService).const_get(:Client).new(&block)
314
196
  end
315
197
 
316
- module CompanyService
317
- ##
318
- # A service that handles company management, including CRUD and enumeration.
319
- #
320
- # @param version [Symbol, String]
321
- # The major version of the service to be used. By default :v4beta1
322
- # is used.
323
- # @overload new(version:, credentials:, scopes:, client_config:, timeout:)
324
- # @param credentials [Google::Auth::Credentials, String, Hash, GRPC::Core::Channel, GRPC::Core::ChannelCredentials, Proc]
325
- # Provides the means for authenticating requests made by the client. This parameter can
326
- # be many types.
327
- # A `Google::Auth::Credentials` uses a the properties of its represented keyfile for
328
- # authenticating requests made by this client.
329
- # A `String` will be treated as the path to the keyfile to be used for the construction of
330
- # credentials for this client.
331
- # A `Hash` will be treated as the contents of a keyfile to be used for the construction of
332
- # credentials for this client.
333
- # A `GRPC::Core::Channel` will be used to make calls through.
334
- # A `GRPC::Core::ChannelCredentials` for the setting up the RPC client. The channel credentials
335
- # should already be composed with a `GRPC::Core::CallCredentials` object.
336
- # A `Proc` will be used as an updater_proc for the Grpc channel. The proc transforms the
337
- # metadata for requests, generally, to give OAuth credentials.
338
- # @param scopes [Array<String>]
339
- # The OAuth scopes for this service. This parameter is ignored if
340
- # an updater_proc is supplied.
341
- # @param client_config [Hash]
342
- # A Hash for call options for each method. See
343
- # Google::Gax#construct_settings for the structure of
344
- # this data. Falls back to the default config if not specified
345
- # or the specified config is missing data points.
346
- # @param timeout [Numeric]
347
- # The default timeout, in seconds, for calls made through this client.
348
- # @param metadata [Hash]
349
- # Default metadata to be sent with each request. This can be overridden on a per call basis.
350
- # @param service_address [String]
351
- # Override for the service hostname, or `nil` to leave as the default.
352
- # @param service_port [Integer]
353
- # Override for the service port, or `nil` to leave as the default.
354
- # @param exception_transformer [Proc]
355
- # An optional proc that intercepts any exceptions raised during an API call to inject
356
- # custom error handling.
357
- def self.new(*args, version: :v4beta1, **kwargs)
358
- unless AVAILABLE_VERSIONS.include?(version.to_s.downcase)
359
- raise "The version: #{version} is not available. The available versions " \
360
- "are: [#{AVAILABLE_VERSIONS.join(", ")}]"
361
- end
198
+ ##
199
+ # Create a new client object for ProfileService.
200
+ #
201
+ # By default, this returns an instance of
202
+ # [Google::Cloud::Talent::V4beta1::ProfileService::Client](https://googleapis.dev/ruby/google-cloud-talent-v4beta1/latest/Google/Cloud/Talent/V4beta1/ProfileService/Client.html)
203
+ # for version V4beta1 of the API.
204
+ # However, you can specify specify a different API version by passing it in the
205
+ # `version` parameter. If the ProfileService service is
206
+ # supported by that API version, and the corresponding gem is available, the
207
+ # appropriate versioned client will be returned.
208
+ #
209
+ # ## About ProfileService
210
+ #
211
+ # A service that handles profile management, including profile CRUD,
212
+ # enumeration and search.
213
+ #
214
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
215
+ # Defaults to `:v4beta1`.
216
+ # @return [ProfileService::Client] A client object for the specified version.
217
+ #
218
+ def self.profile_service version: :v4beta1, &block
219
+ require "google/cloud/talent/#{version.to_s.downcase}"
362
220
 
363
- require "#{FILE_DIR}/#{version.to_s.downcase}"
364
- version_module = Google::Cloud::Talent
365
- .constants
366
- .select {|sym| sym.to_s.downcase == version.to_s.downcase}
367
- .first
368
- Google::Cloud::Talent.const_get(version_module)::CompanyService.new(*args, **kwargs)
369
- end
221
+ package_name = Google::Cloud::Talent
222
+ .constants
223
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
224
+ .first
225
+ package_module = Google::Cloud::Talent.const_get package_name
226
+ package_module.const_get(:ProfileService).const_get(:Client).new(&block)
370
227
  end
371
228
 
372
- module JobService
373
- ##
374
- # A service handles job management, including job CRUD, enumeration and search.
375
- #
376
- # @param version [Symbol, String]
377
- # The major version of the service to be used. By default :v4beta1
378
- # is used.
379
- # @overload new(version:, credentials:, scopes:, client_config:, timeout:)
380
- # @param credentials [Google::Auth::Credentials, String, Hash, GRPC::Core::Channel, GRPC::Core::ChannelCredentials, Proc]
381
- # Provides the means for authenticating requests made by the client. This parameter can
382
- # be many types.
383
- # A `Google::Auth::Credentials` uses a the properties of its represented keyfile for
384
- # authenticating requests made by this client.
385
- # A `String` will be treated as the path to the keyfile to be used for the construction of
386
- # credentials for this client.
387
- # A `Hash` will be treated as the contents of a keyfile to be used for the construction of
388
- # credentials for this client.
389
- # A `GRPC::Core::Channel` will be used to make calls through.
390
- # A `GRPC::Core::ChannelCredentials` for the setting up the RPC client. The channel credentials
391
- # should already be composed with a `GRPC::Core::CallCredentials` object.
392
- # A `Proc` will be used as an updater_proc for the Grpc channel. The proc transforms the
393
- # metadata for requests, generally, to give OAuth credentials.
394
- # @param scopes [Array<String>]
395
- # The OAuth scopes for this service. This parameter is ignored if
396
- # an updater_proc is supplied.
397
- # @param client_config [Hash]
398
- # A Hash for call options for each method. See
399
- # Google::Gax#construct_settings for the structure of
400
- # this data. Falls back to the default config if not specified
401
- # or the specified config is missing data points.
402
- # @param timeout [Numeric]
403
- # The default timeout, in seconds, for calls made through this client.
404
- # @param metadata [Hash]
405
- # Default metadata to be sent with each request. This can be overridden on a per call basis.
406
- # @param service_address [String]
407
- # Override for the service hostname, or `nil` to leave as the default.
408
- # @param service_port [Integer]
409
- # Override for the service port, or `nil` to leave as the default.
410
- # @param exception_transformer [Proc]
411
- # An optional proc that intercepts any exceptions raised during an API call to inject
412
- # custom error handling.
413
- def self.new(*args, version: :v4beta1, **kwargs)
414
- unless AVAILABLE_VERSIONS.include?(version.to_s.downcase)
415
- raise "The version: #{version} is not available. The available versions " \
416
- "are: [#{AVAILABLE_VERSIONS.join(", ")}]"
417
- end
229
+ ##
230
+ # Create a new client object for TenantService.
231
+ #
232
+ # By default, this returns an instance of
233
+ # [Google::Cloud::Talent::V4beta1::TenantService::Client](https://googleapis.dev/ruby/google-cloud-talent-v4beta1/latest/Google/Cloud/Talent/V4beta1/TenantService/Client.html)
234
+ # for version V4beta1 of the API.
235
+ # However, you can specify specify a different API version by passing it in the
236
+ # `version` parameter. If the TenantService service is
237
+ # supported by that API version, and the corresponding gem is available, the
238
+ # appropriate versioned client will be returned.
239
+ #
240
+ # ## About TenantService
241
+ #
242
+ # A service that handles tenant management, including CRUD and enumeration.
243
+ #
244
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
245
+ # Defaults to `:v4beta1`.
246
+ # @return [TenantService::Client] A client object for the specified version.
247
+ #
248
+ def self.tenant_service version: :v4beta1, &block
249
+ require "google/cloud/talent/#{version.to_s.downcase}"
418
250
 
419
- require "#{FILE_DIR}/#{version.to_s.downcase}"
420
- version_module = Google::Cloud::Talent
421
- .constants
422
- .select {|sym| sym.to_s.downcase == version.to_s.downcase}
423
- .first
424
- Google::Cloud::Talent.const_get(version_module)::JobService.new(*args, **kwargs)
425
- end
251
+ package_name = Google::Cloud::Talent
252
+ .constants
253
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
254
+ .first
255
+ package_module = Google::Cloud::Talent.const_get package_name
256
+ package_module.const_get(:TenantService).const_get(:Client).new(&block)
426
257
  end
427
258
 
428
- module Completion
429
- ##
430
- # A service handles auto completion.
431
- #
432
- # @param version [Symbol, String]
433
- # The major version of the service to be used. By default :v4beta1
434
- # is used.
435
- # @overload new(version:, credentials:, scopes:, client_config:, timeout:)
436
- # @param credentials [Google::Auth::Credentials, String, Hash, GRPC::Core::Channel, GRPC::Core::ChannelCredentials, Proc]
437
- # Provides the means for authenticating requests made by the client. This parameter can
438
- # be many types.
439
- # A `Google::Auth::Credentials` uses a the properties of its represented keyfile for
440
- # authenticating requests made by this client.
441
- # A `String` will be treated as the path to the keyfile to be used for the construction of
442
- # credentials for this client.
443
- # A `Hash` will be treated as the contents of a keyfile to be used for the construction of
444
- # credentials for this client.
445
- # A `GRPC::Core::Channel` will be used to make calls through.
446
- # A `GRPC::Core::ChannelCredentials` for the setting up the RPC client. The channel credentials
447
- # should already be composed with a `GRPC::Core::CallCredentials` object.
448
- # A `Proc` will be used as an updater_proc for the Grpc channel. The proc transforms the
449
- # metadata for requests, generally, to give OAuth credentials.
450
- # @param scopes [Array<String>]
451
- # The OAuth scopes for this service. This parameter is ignored if
452
- # an updater_proc is supplied.
453
- # @param client_config [Hash]
454
- # A Hash for call options for each method. See
455
- # Google::Gax#construct_settings for the structure of
456
- # this data. Falls back to the default config if not specified
457
- # or the specified config is missing data points.
458
- # @param timeout [Numeric]
459
- # The default timeout, in seconds, for calls made through this client.
460
- # @param metadata [Hash]
461
- # Default metadata to be sent with each request. This can be overridden on a per call basis.
462
- # @param service_address [String]
463
- # Override for the service hostname, or `nil` to leave as the default.
464
- # @param service_port [Integer]
465
- # Override for the service port, or `nil` to leave as the default.
466
- # @param exception_transformer [Proc]
467
- # An optional proc that intercepts any exceptions raised during an API call to inject
468
- # custom error handling.
469
- def self.new(*args, version: :v4beta1, **kwargs)
470
- unless AVAILABLE_VERSIONS.include?(version.to_s.downcase)
471
- raise "The version: #{version} is not available. The available versions " \
472
- "are: [#{AVAILABLE_VERSIONS.join(", ")}]"
473
- end
259
+ ##
260
+ # Configure the google-cloud-talent library.
261
+ #
262
+ # The following configuration parameters are supported:
263
+ #
264
+ # * `credentials` (*type:* `String, Hash, Google::Auth::Credentials`) -
265
+ # The path to the keyfile as a String, the contents of the keyfile as a
266
+ # Hash, or a Google::Auth::Credentials object.
267
+ # * `lib_name` (*type:* `String`) -
268
+ # The library name as recorded in instrumentation and logging.
269
+ # * `lib_version` (*type:* `String`) -
270
+ # The library version as recorded in instrumentation and logging.
271
+ # * `interceptors` (*type:* `Array<GRPC::ClientInterceptor>`) -
272
+ # An array of interceptors that are run before calls are executed.
273
+ # * `timeout` (*type:* `Integer`) -
274
+ # Default timeout in milliseconds.
275
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) -
276
+ # Additional gRPC headers to be sent with the call.
277
+ # * `retry_policy` (*type:* `Hash`) -
278
+ # The retry policy. The value is a hash with the following keys:
279
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
280
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
281
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
282
+ # * `:retry_codes` (*type:* `Array<String>`) -
283
+ # The error codes that should trigger a retry.
284
+ #
285
+ # @return [::Google::Cloud::Config] The default configuration used by this library
286
+ #
287
+ def self.configure
288
+ yield ::Google::Cloud.configure.talent if block_given?
474
289
 
475
- require "#{FILE_DIR}/#{version.to_s.downcase}"
476
- version_module = Google::Cloud::Talent
477
- .constants
478
- .select {|sym| sym.to_s.downcase == version.to_s.downcase}
479
- .first
480
- Google::Cloud::Talent.const_get(version_module)::Completion.new(*args, **kwargs)
481
- end
290
+ ::Google::Cloud.configure.talent
482
291
  end
483
292
  end
484
293
  end
485
294
  end
295
+
296
+ helper_path = ::File.join __dir__, "talent", "helpers.rb"
297
+ require "google/cloud/talent/helpers" if ::File.file? helper_path