google-cloud-talent-v4beta1 0.1.0 → 0.2.3

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.
Files changed (66) hide show
  1. checksums.yaml +4 -4
  2. data/AUTHENTICATION.md +6 -6
  3. data/README.md +5 -1
  4. data/lib/google/cloud/talent/v4beta1.rb +1 -1
  5. data/lib/google/cloud/talent/v4beta1/application_service.rb +1 -1
  6. data/lib/google/cloud/talent/v4beta1/application_service/client.rb +133 -128
  7. data/lib/google/cloud/talent/v4beta1/application_service/credentials.rb +1 -1
  8. data/lib/google/cloud/talent/v4beta1/application_service/paths.rb +17 -17
  9. data/lib/google/cloud/talent/v4beta1/company_service.rb +1 -1
  10. data/lib/google/cloud/talent/v4beta1/company_service/client.rb +135 -130
  11. data/lib/google/cloud/talent/v4beta1/company_service/credentials.rb +1 -1
  12. data/lib/google/cloud/talent/v4beta1/company_service/paths.rb +8 -8
  13. data/lib/google/cloud/talent/v4beta1/completion.rb +1 -1
  14. data/lib/google/cloud/talent/v4beta1/completion/client.rb +69 -64
  15. data/lib/google/cloud/talent/v4beta1/completion/credentials.rb +1 -1
  16. data/lib/google/cloud/talent/v4beta1/completion/paths.rb +8 -8
  17. data/lib/google/cloud/talent/v4beta1/event_service.rb +1 -1
  18. data/lib/google/cloud/talent/v4beta1/event_service/client.rb +62 -57
  19. data/lib/google/cloud/talent/v4beta1/event_service/credentials.rb +1 -1
  20. data/lib/google/cloud/talent/v4beta1/event_service/paths.rb +3 -3
  21. data/lib/google/cloud/talent/v4beta1/job_service.rb +1 -1
  22. data/lib/google/cloud/talent/v4beta1/job_service/client.rb +329 -324
  23. data/lib/google/cloud/talent/v4beta1/job_service/credentials.rb +1 -1
  24. data/lib/google/cloud/talent/v4beta1/job_service/operations.rb +109 -103
  25. data/lib/google/cloud/talent/v4beta1/job_service/paths.rb +13 -13
  26. data/lib/google/cloud/talent/v4beta1/profile_service.rb +1 -1
  27. data/lib/google/cloud/talent/v4beta1/profile_service/client.rb +185 -180
  28. data/lib/google/cloud/talent/v4beta1/profile_service/credentials.rb +1 -1
  29. data/lib/google/cloud/talent/v4beta1/profile_service/paths.rb +5 -5
  30. data/lib/google/cloud/talent/v4beta1/tenant_service.rb +1 -1
  31. data/lib/google/cloud/talent/v4beta1/tenant_service/client.rb +133 -128
  32. data/lib/google/cloud/talent/v4beta1/tenant_service/credentials.rb +1 -1
  33. data/lib/google/cloud/talent/v4beta1/tenant_service/paths.rb +3 -3
  34. data/lib/google/cloud/talent/v4beta1/version.rb +1 -1
  35. data/proto_docs/google/api/resource.rb +12 -12
  36. data/proto_docs/google/cloud/talent/v4beta1/application.rb +18 -18
  37. data/proto_docs/google/cloud/talent/v4beta1/application_service.rb +27 -27
  38. data/proto_docs/google/cloud/talent/v4beta1/common.rb +167 -167
  39. data/proto_docs/google/cloud/talent/v4beta1/company.rb +21 -21
  40. data/proto_docs/google/cloud/talent/v4beta1/company_service.rb +29 -29
  41. data/proto_docs/google/cloud/talent/v4beta1/completion_service.rb +28 -28
  42. data/proto_docs/google/cloud/talent/v4beta1/event.rb +30 -30
  43. data/proto_docs/google/cloud/talent/v4beta1/event_service.rb +4 -4
  44. data/proto_docs/google/cloud/talent/v4beta1/filters.rb +198 -198
  45. data/proto_docs/google/cloud/talent/v4beta1/histogram.rb +14 -14
  46. data/proto_docs/google/cloud/talent/v4beta1/job.rb +83 -83
  47. data/proto_docs/google/cloud/talent/v4beta1/job_service.rb +163 -163
  48. data/proto_docs/google/cloud/talent/v4beta1/profile.rb +202 -202
  49. data/proto_docs/google/cloud/talent/v4beta1/profile_service.rb +82 -82
  50. data/proto_docs/google/cloud/talent/v4beta1/tenant.rb +8 -8
  51. data/proto_docs/google/cloud/talent/v4beta1/tenant_service.rb +27 -27
  52. data/proto_docs/google/longrunning/operations.rb +30 -30
  53. data/proto_docs/google/protobuf/any.rb +4 -4
  54. data/proto_docs/google/protobuf/duration.rb +4 -4
  55. data/proto_docs/google/protobuf/empty.rb +2 -2
  56. data/proto_docs/google/protobuf/field_mask.rb +3 -3
  57. data/proto_docs/google/protobuf/timestamp.rb +4 -4
  58. data/proto_docs/google/protobuf/wrappers.rb +27 -27
  59. data/proto_docs/google/rpc/status.rb +6 -6
  60. data/proto_docs/google/type/date.rb +6 -6
  61. data/proto_docs/google/type/latlng.rb +4 -4
  62. data/proto_docs/google/type/money.rb +5 -5
  63. data/proto_docs/google/type/postal_address.rb +13 -13
  64. data/proto_docs/google/type/timeofday.rb +7 -7
  65. metadata +33 -6
  66. data/lib/google/cloud/common_resources_pb.rb +0 -15
@@ -24,7 +24,7 @@ module Google
24
24
  module V4beta1
25
25
  module ApplicationService
26
26
  # Credentials for the ApplicationService API.
27
- class Credentials < Google::Auth::Credentials
27
+ class Credentials < ::Google::Auth::Credentials
28
28
  self.scope = [
29
29
  "https://www.googleapis.com/auth/cloud-platform",
30
30
  "https://www.googleapis.com/auth/jobs"
@@ -36,11 +36,11 @@ module Google
36
36
  # @param profile [String]
37
37
  # @param application [String]
38
38
  #
39
- # @return [String]
39
+ # @return [::String]
40
40
  def application_path project:, tenant:, profile:, application:
41
- raise ArgumentError, "project cannot contain /" if project.to_s.include? "/"
42
- raise ArgumentError, "tenant cannot contain /" if tenant.to_s.include? "/"
43
- raise ArgumentError, "profile cannot contain /" if profile.to_s.include? "/"
41
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
42
+ raise ::ArgumentError, "tenant cannot contain /" if tenant.to_s.include? "/"
43
+ raise ::ArgumentError, "profile cannot contain /" if profile.to_s.include? "/"
44
44
 
45
45
  "projects/#{project}/tenants/#{tenant}/profiles/#{profile}/applications/#{application}"
46
46
  end
@@ -65,24 +65,24 @@ module Google
65
65
  # @param project [String]
66
66
  # @param company [String]
67
67
  #
68
- # @return [String]
68
+ # @return [::String]
69
69
  def company_path **args
70
70
  resources = {
71
71
  "company:project:tenant" => (proc do |project:, tenant:, company:|
72
- raise ArgumentError, "project cannot contain /" if project.to_s.include? "/"
73
- raise ArgumentError, "tenant cannot contain /" if tenant.to_s.include? "/"
72
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
73
+ raise ::ArgumentError, "tenant cannot contain /" if tenant.to_s.include? "/"
74
74
 
75
75
  "projects/#{project}/tenants/#{tenant}/companies/#{company}"
76
76
  end),
77
77
  "company:project" => (proc do |project:, company:|
78
- raise ArgumentError, "project cannot contain /" if project.to_s.include? "/"
78
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
79
79
 
80
80
  "projects/#{project}/companies/#{company}"
81
81
  end)
82
82
  }
83
83
 
84
84
  resource = resources[args.keys.sort.join(":")]
85
- raise ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
85
+ raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
86
86
  resource.call(**args)
87
87
  end
88
88
 
@@ -106,24 +106,24 @@ module Google
106
106
  # @param project [String]
107
107
  # @param job [String]
108
108
  #
109
- # @return [String]
109
+ # @return [::String]
110
110
  def job_path **args
111
111
  resources = {
112
112
  "job:project:tenant" => (proc do |project:, tenant:, job:|
113
- raise ArgumentError, "project cannot contain /" if project.to_s.include? "/"
114
- raise ArgumentError, "tenant cannot contain /" if tenant.to_s.include? "/"
113
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
114
+ raise ::ArgumentError, "tenant cannot contain /" if tenant.to_s.include? "/"
115
115
 
116
116
  "projects/#{project}/tenants/#{tenant}/jobs/#{job}"
117
117
  end),
118
118
  "job:project" => (proc do |project:, job:|
119
- raise ArgumentError, "project cannot contain /" if project.to_s.include? "/"
119
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
120
120
 
121
121
  "projects/#{project}/jobs/#{job}"
122
122
  end)
123
123
  }
124
124
 
125
125
  resource = resources[args.keys.sort.join(":")]
126
- raise ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
126
+ raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
127
127
  resource.call(**args)
128
128
  end
129
129
 
@@ -138,10 +138,10 @@ module Google
138
138
  # @param tenant [String]
139
139
  # @param profile [String]
140
140
  #
141
- # @return [String]
141
+ # @return [::String]
142
142
  def profile_path project:, tenant:, profile:
143
- raise ArgumentError, "project cannot contain /" if project.to_s.include? "/"
144
- raise ArgumentError, "tenant cannot contain /" if tenant.to_s.include? "/"
143
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
144
+ raise ::ArgumentError, "tenant cannot contain /" if tenant.to_s.include? "/"
145
145
 
146
146
  "projects/#{project}/tenants/#{tenant}/profiles/#{profile}"
147
147
  end
@@ -36,7 +36,7 @@ module Google
36
36
  # To load this service and instantiate a client:
37
37
  #
38
38
  # require "google/cloud/talent/v4beta1/company_service"
39
- # client = Google::Cloud::Talent::V4beta1::CompanyService::Client.new
39
+ # client = ::Google::Cloud::Talent::V4beta1::CompanyService::Client.new
40
40
  #
41
41
  module CompanyService
42
42
  end
@@ -38,15 +38,15 @@ module Google
38
38
  ##
39
39
  # Configure the CompanyService Client class.
40
40
  #
41
- # See {Google::Cloud::Talent::V4beta1::CompanyService::Client::Configuration}
41
+ # See {::Google::Cloud::Talent::V4beta1::CompanyService::Client::Configuration}
42
42
  # for a description of the configuration fields.
43
43
  #
44
44
  # ## Example
45
45
  #
46
46
  # To modify the configuration for all CompanyService clients:
47
47
  #
48
- # Google::Cloud::Talent::V4beta1::CompanyService::Client.configure do |config|
49
- # config.timeout = 10_000
48
+ # ::Google::Cloud::Talent::V4beta1::CompanyService::Client.configure do |config|
49
+ # config.timeout = 10.0
50
50
  # end
51
51
  #
52
52
  # @yield [config] Configure the Client client.
@@ -106,7 +106,7 @@ module Google
106
106
  # but structural changes (adding new fields, etc.) are not allowed. Structural changes
107
107
  # should be made on {Client.configure}.
108
108
  #
109
- # See {Google::Cloud::Talent::V4beta1::CompanyService::Client::Configuration}
109
+ # See {::Google::Cloud::Talent::V4beta1::CompanyService::Client::Configuration}
110
110
  # for a description of the configuration fields.
111
111
  #
112
112
  # @yield [config] Configure the Client client.
@@ -127,13 +127,13 @@ module Google
127
127
  # To create a new CompanyService client with the default
128
128
  # configuration:
129
129
  #
130
- # client = Google::Cloud::Talent::V4beta1::CompanyService::Client.new
130
+ # client = ::Google::Cloud::Talent::V4beta1::CompanyService::Client.new
131
131
  #
132
132
  # To create a new CompanyService client with a custom
133
133
  # configuration:
134
134
  #
135
- # client = Google::Cloud::Talent::V4beta1::CompanyService::Client.new do |config|
136
- # config.timeout = 10_000
135
+ # client = ::Google::Cloud::Talent::V4beta1::CompanyService::Client.new do |config|
136
+ # config.timeout = 10.0
137
137
  # end
138
138
  #
139
139
  # @yield [config] Configure the CompanyService client.
@@ -158,10 +158,11 @@ module Google
158
158
  if credentials.is_a?(String) || credentials.is_a?(Hash)
159
159
  credentials = Credentials.new credentials, scope: @config.scope
160
160
  end
161
- @quota_project_id = credentials.respond_to?(:quota_project_id) ? credentials.quota_project_id : nil
161
+ @quota_project_id = @config.quota_project
162
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
162
163
 
163
- @company_service_stub = Gapic::ServiceStub.new(
164
- Google::Cloud::Talent::V4beta1::CompanyService::Stub,
164
+ @company_service_stub = ::Gapic::ServiceStub.new(
165
+ ::Google::Cloud::Talent::V4beta1::CompanyService::Stub,
165
166
  credentials: credentials,
166
167
  endpoint: @config.endpoint,
167
168
  channel_args: @config.channel_args,
@@ -176,12 +177,12 @@ module Google
176
177
  #
177
178
  # @overload create_company(request, options = nil)
178
179
  # Pass arguments to `create_company` via a request object, either of type
179
- # {Google::Cloud::Talent::V4beta1::CreateCompanyRequest} or an equivalent Hash.
180
+ # {::Google::Cloud::Talent::V4beta1::CreateCompanyRequest} or an equivalent Hash.
180
181
  #
181
- # @param request [Google::Cloud::Talent::V4beta1::CreateCompanyRequest, Hash]
182
+ # @param request [::Google::Cloud::Talent::V4beta1::CreateCompanyRequest, ::Hash]
182
183
  # A request object representing the call parameters. Required. To specify no
183
184
  # parameters, or to keep all the default parameter values, pass an empty Hash.
184
- # @param options [Gapic::CallOptions, Hash]
185
+ # @param options [::Gapic::CallOptions, ::Hash]
185
186
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
186
187
  #
187
188
  # @overload create_company(parent: nil, company: nil)
@@ -189,36 +190,36 @@ module Google
189
190
  # least one keyword argument is required. To specify no parameters, or to keep all
190
191
  # the default parameter values, pass an empty Hash as a request object (see above).
191
192
  #
192
- # @param parent [String]
193
+ # @param parent [::String]
193
194
  # Required. Resource name of the tenant under which the company is created.
194
195
  #
195
196
  # The format is "projects/\\{project_id}/tenants/\\{tenant_id}", for example,
196
197
  # "projects/foo/tenant/bar". If tenant id is unspecified, a default tenant
197
198
  # is created, for example, "projects/foo".
198
- # @param company [Google::Cloud::Talent::V4beta1::Company, Hash]
199
+ # @param company [::Google::Cloud::Talent::V4beta1::Company, ::Hash]
199
200
  # Required. The company to be created.
200
201
  #
201
202
  # @yield [response, operation] Access the result along with the RPC operation
202
- # @yieldparam response [Google::Cloud::Talent::V4beta1::Company]
203
- # @yieldparam operation [GRPC::ActiveCall::Operation]
203
+ # @yieldparam response [::Google::Cloud::Talent::V4beta1::Company]
204
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
204
205
  #
205
- # @return [Google::Cloud::Talent::V4beta1::Company]
206
+ # @return [::Google::Cloud::Talent::V4beta1::Company]
206
207
  #
207
- # @raise [Google::Cloud::Error] if the RPC is aborted.
208
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
208
209
  #
209
210
  def create_company request, options = nil
210
- raise ArgumentError, "request must be provided" if request.nil?
211
+ raise ::ArgumentError, "request must be provided" if request.nil?
211
212
 
212
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::Talent::V4beta1::CreateCompanyRequest
213
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::CreateCompanyRequest
213
214
 
214
215
  # Converts hash and nil to an options object
215
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
216
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
216
217
 
217
218
  # Customize the options with defaults
218
219
  metadata = @config.rpcs.create_company.metadata.to_h
219
220
 
220
221
  # Set x-goog-api-client and x-goog-user-project headers
221
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
222
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
222
223
  lib_name: @config.lib_name, lib_version: @config.lib_version,
223
224
  gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION
224
225
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -239,8 +240,8 @@ module Google
239
240
  yield response, operation if block_given?
240
241
  return response
241
242
  end
242
- rescue GRPC::BadStatus => e
243
- raise Google::Cloud::Error.from_error(e)
243
+ rescue ::GRPC::BadStatus => e
244
+ raise ::Google::Cloud::Error.from_error(e)
244
245
  end
245
246
 
246
247
  ##
@@ -248,12 +249,12 @@ module Google
248
249
  #
249
250
  # @overload get_company(request, options = nil)
250
251
  # Pass arguments to `get_company` via a request object, either of type
251
- # {Google::Cloud::Talent::V4beta1::GetCompanyRequest} or an equivalent Hash.
252
+ # {::Google::Cloud::Talent::V4beta1::GetCompanyRequest} or an equivalent Hash.
252
253
  #
253
- # @param request [Google::Cloud::Talent::V4beta1::GetCompanyRequest, Hash]
254
+ # @param request [::Google::Cloud::Talent::V4beta1::GetCompanyRequest, ::Hash]
254
255
  # A request object representing the call parameters. Required. To specify no
255
256
  # parameters, or to keep all the default parameter values, pass an empty Hash.
256
- # @param options [Gapic::CallOptions, Hash]
257
+ # @param options [::Gapic::CallOptions, ::Hash]
257
258
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
258
259
  #
259
260
  # @overload get_company(name: nil)
@@ -261,7 +262,7 @@ module Google
261
262
  # least one keyword argument is required. To specify no parameters, or to keep all
262
263
  # the default parameter values, pass an empty Hash as a request object (see above).
263
264
  #
264
- # @param name [String]
265
+ # @param name [::String]
265
266
  # Required. The resource name of the company to be retrieved.
266
267
  #
267
268
  # The format is
@@ -272,26 +273,26 @@ module Google
272
273
  # example, "projects/api-test-project/companies/bar".
273
274
  #
274
275
  # @yield [response, operation] Access the result along with the RPC operation
275
- # @yieldparam response [Google::Cloud::Talent::V4beta1::Company]
276
- # @yieldparam operation [GRPC::ActiveCall::Operation]
276
+ # @yieldparam response [::Google::Cloud::Talent::V4beta1::Company]
277
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
277
278
  #
278
- # @return [Google::Cloud::Talent::V4beta1::Company]
279
+ # @return [::Google::Cloud::Talent::V4beta1::Company]
279
280
  #
280
- # @raise [Google::Cloud::Error] if the RPC is aborted.
281
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
281
282
  #
282
283
  def get_company request, options = nil
283
- raise ArgumentError, "request must be provided" if request.nil?
284
+ raise ::ArgumentError, "request must be provided" if request.nil?
284
285
 
285
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::Talent::V4beta1::GetCompanyRequest
286
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::GetCompanyRequest
286
287
 
287
288
  # Converts hash and nil to an options object
288
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
289
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
289
290
 
290
291
  # Customize the options with defaults
291
292
  metadata = @config.rpcs.get_company.metadata.to_h
292
293
 
293
294
  # Set x-goog-api-client and x-goog-user-project headers
294
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
295
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
295
296
  lib_name: @config.lib_name, lib_version: @config.lib_version,
296
297
  gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION
297
298
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -312,8 +313,8 @@ module Google
312
313
  yield response, operation if block_given?
313
314
  return response
314
315
  end
315
- rescue GRPC::BadStatus => e
316
- raise Google::Cloud::Error.from_error(e)
316
+ rescue ::GRPC::BadStatus => e
317
+ raise ::Google::Cloud::Error.from_error(e)
317
318
  end
318
319
 
319
320
  ##
@@ -321,12 +322,12 @@ module Google
321
322
  #
322
323
  # @overload update_company(request, options = nil)
323
324
  # Pass arguments to `update_company` via a request object, either of type
324
- # {Google::Cloud::Talent::V4beta1::UpdateCompanyRequest} or an equivalent Hash.
325
+ # {::Google::Cloud::Talent::V4beta1::UpdateCompanyRequest} or an equivalent Hash.
325
326
  #
326
- # @param request [Google::Cloud::Talent::V4beta1::UpdateCompanyRequest, Hash]
327
+ # @param request [::Google::Cloud::Talent::V4beta1::UpdateCompanyRequest, ::Hash]
327
328
  # A request object representing the call parameters. Required. To specify no
328
329
  # parameters, or to keep all the default parameter values, pass an empty Hash.
329
- # @param options [Gapic::CallOptions, Hash]
330
+ # @param options [::Gapic::CallOptions, ::Hash]
330
331
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
331
332
  #
332
333
  # @overload update_company(company: nil, update_mask: nil)
@@ -334,38 +335,38 @@ module Google
334
335
  # least one keyword argument is required. To specify no parameters, or to keep all
335
336
  # the default parameter values, pass an empty Hash as a request object (see above).
336
337
  #
337
- # @param company [Google::Cloud::Talent::V4beta1::Company, Hash]
338
+ # @param company [::Google::Cloud::Talent::V4beta1::Company, ::Hash]
338
339
  # Required. The company resource to replace the current resource in the system.
339
- # @param update_mask [Google::Protobuf::FieldMask, Hash]
340
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
340
341
  # Strongly recommended for the best service experience.
341
342
  #
342
- # If {Google::Cloud::Talent::V4beta1::UpdateCompanyRequest#update_mask update_mask} is provided, only the specified fields in
343
- # {Google::Cloud::Talent::V4beta1::UpdateCompanyRequest#company company} are updated. Otherwise all the fields are updated.
343
+ # If {::Google::Cloud::Talent::V4beta1::UpdateCompanyRequest#update_mask update_mask} is provided, only the specified fields in
344
+ # {::Google::Cloud::Talent::V4beta1::UpdateCompanyRequest#company company} are updated. Otherwise all the fields are updated.
344
345
  #
345
346
  # A field mask to specify the company fields to be updated. Only
346
- # top level fields of {Google::Cloud::Talent::V4beta1::Company Company} are supported.
347
+ # top level fields of {::Google::Cloud::Talent::V4beta1::Company Company} are supported.
347
348
  #
348
349
  # @yield [response, operation] Access the result along with the RPC operation
349
- # @yieldparam response [Google::Cloud::Talent::V4beta1::Company]
350
- # @yieldparam operation [GRPC::ActiveCall::Operation]
350
+ # @yieldparam response [::Google::Cloud::Talent::V4beta1::Company]
351
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
351
352
  #
352
- # @return [Google::Cloud::Talent::V4beta1::Company]
353
+ # @return [::Google::Cloud::Talent::V4beta1::Company]
353
354
  #
354
- # @raise [Google::Cloud::Error] if the RPC is aborted.
355
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
355
356
  #
356
357
  def update_company request, options = nil
357
- raise ArgumentError, "request must be provided" if request.nil?
358
+ raise ::ArgumentError, "request must be provided" if request.nil?
358
359
 
359
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::Talent::V4beta1::UpdateCompanyRequest
360
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::UpdateCompanyRequest
360
361
 
361
362
  # Converts hash and nil to an options object
362
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
363
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
363
364
 
364
365
  # Customize the options with defaults
365
366
  metadata = @config.rpcs.update_company.metadata.to_h
366
367
 
367
368
  # Set x-goog-api-client and x-goog-user-project headers
368
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
369
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
369
370
  lib_name: @config.lib_name, lib_version: @config.lib_version,
370
371
  gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION
371
372
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -386,8 +387,8 @@ module Google
386
387
  yield response, operation if block_given?
387
388
  return response
388
389
  end
389
- rescue GRPC::BadStatus => e
390
- raise Google::Cloud::Error.from_error(e)
390
+ rescue ::GRPC::BadStatus => e
391
+ raise ::Google::Cloud::Error.from_error(e)
391
392
  end
392
393
 
393
394
  ##
@@ -396,12 +397,12 @@ module Google
396
397
  #
397
398
  # @overload delete_company(request, options = nil)
398
399
  # Pass arguments to `delete_company` via a request object, either of type
399
- # {Google::Cloud::Talent::V4beta1::DeleteCompanyRequest} or an equivalent Hash.
400
+ # {::Google::Cloud::Talent::V4beta1::DeleteCompanyRequest} or an equivalent Hash.
400
401
  #
401
- # @param request [Google::Cloud::Talent::V4beta1::DeleteCompanyRequest, Hash]
402
+ # @param request [::Google::Cloud::Talent::V4beta1::DeleteCompanyRequest, ::Hash]
402
403
  # A request object representing the call parameters. Required. To specify no
403
404
  # parameters, or to keep all the default parameter values, pass an empty Hash.
404
- # @param options [Gapic::CallOptions, Hash]
405
+ # @param options [::Gapic::CallOptions, ::Hash]
405
406
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
406
407
  #
407
408
  # @overload delete_company(name: nil)
@@ -409,7 +410,7 @@ module Google
409
410
  # least one keyword argument is required. To specify no parameters, or to keep all
410
411
  # the default parameter values, pass an empty Hash as a request object (see above).
411
412
  #
412
- # @param name [String]
413
+ # @param name [::String]
413
414
  # Required. The resource name of the company to be deleted.
414
415
  #
415
416
  # The format is
@@ -420,26 +421,26 @@ module Google
420
421
  # example, "projects/foo/companies/bar".
421
422
  #
422
423
  # @yield [response, operation] Access the result along with the RPC operation
423
- # @yieldparam response [Google::Protobuf::Empty]
424
- # @yieldparam operation [GRPC::ActiveCall::Operation]
424
+ # @yieldparam response [::Google::Protobuf::Empty]
425
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
425
426
  #
426
- # @return [Google::Protobuf::Empty]
427
+ # @return [::Google::Protobuf::Empty]
427
428
  #
428
- # @raise [Google::Cloud::Error] if the RPC is aborted.
429
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
429
430
  #
430
431
  def delete_company request, options = nil
431
- raise ArgumentError, "request must be provided" if request.nil?
432
+ raise ::ArgumentError, "request must be provided" if request.nil?
432
433
 
433
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::Talent::V4beta1::DeleteCompanyRequest
434
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::DeleteCompanyRequest
434
435
 
435
436
  # Converts hash and nil to an options object
436
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
437
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
437
438
 
438
439
  # Customize the options with defaults
439
440
  metadata = @config.rpcs.delete_company.metadata.to_h
440
441
 
441
442
  # Set x-goog-api-client and x-goog-user-project headers
442
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
443
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
443
444
  lib_name: @config.lib_name, lib_version: @config.lib_version,
444
445
  gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION
445
446
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -460,8 +461,8 @@ module Google
460
461
  yield response, operation if block_given?
461
462
  return response
462
463
  end
463
- rescue GRPC::BadStatus => e
464
- raise Google::Cloud::Error.from_error(e)
464
+ rescue ::GRPC::BadStatus => e
465
+ raise ::Google::Cloud::Error.from_error(e)
465
466
  end
466
467
 
467
468
  ##
@@ -469,12 +470,12 @@ module Google
469
470
  #
470
471
  # @overload list_companies(request, options = nil)
471
472
  # Pass arguments to `list_companies` via a request object, either of type
472
- # {Google::Cloud::Talent::V4beta1::ListCompaniesRequest} or an equivalent Hash.
473
+ # {::Google::Cloud::Talent::V4beta1::ListCompaniesRequest} or an equivalent Hash.
473
474
  #
474
- # @param request [Google::Cloud::Talent::V4beta1::ListCompaniesRequest, Hash]
475
+ # @param request [::Google::Cloud::Talent::V4beta1::ListCompaniesRequest, ::Hash]
475
476
  # A request object representing the call parameters. Required. To specify no
476
477
  # parameters, or to keep all the default parameter values, pass an empty Hash.
477
- # @param options [Gapic::CallOptions, Hash]
478
+ # @param options [::Gapic::CallOptions, ::Hash]
478
479
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
479
480
  #
480
481
  # @overload list_companies(parent: nil, page_token: nil, page_size: nil, require_open_jobs: nil)
@@ -482,7 +483,7 @@ module Google
482
483
  # least one keyword argument is required. To specify no parameters, or to keep all
483
484
  # the default parameter values, pass an empty Hash as a request object (see above).
484
485
  #
485
- # @param parent [String]
486
+ # @param parent [::String]
486
487
  # Required. Resource name of the tenant under which the company is created.
487
488
  #
488
489
  # The format is "projects/\\{project_id}/tenants/\\{tenant_id}", for example,
@@ -490,40 +491,40 @@ module Google
490
491
  #
491
492
  # If tenant id is unspecified, the default tenant will be used, for
492
493
  # example, "projects/foo".
493
- # @param page_token [String]
494
+ # @param page_token [::String]
494
495
  # The starting indicator from which to return results.
495
- # @param page_size [Integer]
496
+ # @param page_size [::Integer]
496
497
  # The maximum number of companies to be returned, at most 100.
497
498
  # Default is 100 if a non-positive number is provided.
498
- # @param require_open_jobs [Boolean]
499
+ # @param require_open_jobs [::Boolean]
499
500
  # Set to true if the companies requested must have open jobs.
500
501
  #
501
502
  # Defaults to false.
502
503
  #
503
- # If true, at most {Google::Cloud::Talent::V4beta1::ListCompaniesRequest#page_size page_size} of companies are fetched, among which
504
+ # If true, at most {::Google::Cloud::Talent::V4beta1::ListCompaniesRequest#page_size page_size} of companies are fetched, among which
504
505
  # only those with open jobs are returned.
505
506
  #
506
507
  # @yield [response, operation] Access the result along with the RPC operation
507
- # @yieldparam response [Gapic::PagedEnumerable<Google::Cloud::Talent::V4beta1::Company>]
508
- # @yieldparam operation [GRPC::ActiveCall::Operation]
508
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Talent::V4beta1::Company>]
509
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
509
510
  #
510
- # @return [Gapic::PagedEnumerable<Google::Cloud::Talent::V4beta1::Company>]
511
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::Talent::V4beta1::Company>]
511
512
  #
512
- # @raise [Google::Cloud::Error] if the RPC is aborted.
513
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
513
514
  #
514
515
  def list_companies request, options = nil
515
- raise ArgumentError, "request must be provided" if request.nil?
516
+ raise ::ArgumentError, "request must be provided" if request.nil?
516
517
 
517
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::Talent::V4beta1::ListCompaniesRequest
518
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::ListCompaniesRequest
518
519
 
519
520
  # Converts hash and nil to an options object
520
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
521
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
521
522
 
522
523
  # Customize the options with defaults
523
524
  metadata = @config.rpcs.list_companies.metadata.to_h
524
525
 
525
526
  # Set x-goog-api-client and x-goog-user-project headers
526
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
527
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
527
528
  lib_name: @config.lib_name, lib_version: @config.lib_version,
528
529
  gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION
529
530
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -541,12 +542,12 @@ module Google
541
542
  retry_policy: @config.retry_policy
542
543
 
543
544
  @company_service_stub.call_rpc :list_companies, request, options: options do |response, operation|
544
- response = Gapic::PagedEnumerable.new @company_service_stub, :list_companies, request, response, operation, options
545
+ response = ::Gapic::PagedEnumerable.new @company_service_stub, :list_companies, request, response, operation, options
545
546
  yield response, operation if block_given?
546
547
  return response
547
548
  end
548
- rescue GRPC::BadStatus => e
549
- raise Google::Cloud::Error.from_error(e)
549
+ rescue ::GRPC::BadStatus => e
550
+ raise ::Google::Cloud::Error.from_error(e)
550
551
  end
551
552
 
552
553
  ##
@@ -556,7 +557,7 @@ module Google
556
557
  # providing control over timeouts, retry behavior, logging, transport
557
558
  # parameters, and other low-level controls. Certain parameters can also be
558
559
  # applied individually to specific RPCs. See
559
- # {Google::Cloud::Talent::V4beta1::CompanyService::Client::Configuration::Rpcs}
560
+ # {::Google::Cloud::Talent::V4beta1::CompanyService::Client::Configuration::Rpcs}
560
561
  # for a list of RPCs that can be configured independently.
561
562
  #
562
563
  # Configuration can be applied globally to all clients, or to a single client
@@ -567,22 +568,22 @@ module Google
567
568
  # To modify the global config, setting the timeout for create_company
568
569
  # to 20 seconds, and all remaining timeouts to 10 seconds:
569
570
  #
570
- # Google::Cloud::Talent::V4beta1::CompanyService::Client.configure do |config|
571
- # config.timeout = 10_000
572
- # config.rpcs.create_company.timeout = 20_000
571
+ # ::Google::Cloud::Talent::V4beta1::CompanyService::Client.configure do |config|
572
+ # config.timeout = 10.0
573
+ # config.rpcs.create_company.timeout = 20.0
573
574
  # end
574
575
  #
575
576
  # To apply the above configuration only to a new client:
576
577
  #
577
- # client = Google::Cloud::Talent::V4beta1::CompanyService::Client.new do |config|
578
- # config.timeout = 10_000
579
- # config.rpcs.create_company.timeout = 20_000
578
+ # client = ::Google::Cloud::Talent::V4beta1::CompanyService::Client.new do |config|
579
+ # config.timeout = 10.0
580
+ # config.rpcs.create_company.timeout = 20.0
580
581
  # end
581
582
  #
582
583
  # @!attribute [rw] endpoint
583
584
  # The hostname or hostname:port of the service endpoint.
584
585
  # Defaults to `"jobs.googleapis.com"`.
585
- # @return [String]
586
+ # @return [::String]
586
587
  # @!attribute [rw] credentials
587
588
  # Credentials to send with calls. You may provide any of the following types:
588
589
  # * (`String`) The path to a service account key file in JSON format
@@ -594,29 +595,29 @@ module Google
594
595
  # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
595
596
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
596
597
  # * (`nil`) indicating no credentials
597
- # @return [Object]
598
+ # @return [::Object]
598
599
  # @!attribute [rw] scope
599
600
  # The OAuth scopes
600
- # @return [Array<String>]
601
+ # @return [::Array<::String>]
601
602
  # @!attribute [rw] lib_name
602
603
  # The library name as recorded in instrumentation and logging
603
- # @return [String]
604
+ # @return [::String]
604
605
  # @!attribute [rw] lib_version
605
606
  # The library version as recorded in instrumentation and logging
606
- # @return [String]
607
+ # @return [::String]
607
608
  # @!attribute [rw] channel_args
608
609
  # Extra parameters passed to the gRPC channel. Note: this is ignored if a
609
610
  # `GRPC::Core::Channel` object is provided as the credential.
610
- # @return [Hash]
611
+ # @return [::Hash]
611
612
  # @!attribute [rw] interceptors
612
613
  # An array of interceptors that are run before calls are executed.
613
- # @return [Array<GRPC::ClientInterceptor>]
614
+ # @return [::Array<::GRPC::ClientInterceptor>]
614
615
  # @!attribute [rw] timeout
615
- # The call timeout in milliseconds.
616
- # @return [Numeric]
616
+ # The call timeout in seconds.
617
+ # @return [::Numeric]
617
618
  # @!attribute [rw] metadata
618
619
  # Additional gRPC headers to be sent with the call.
619
- # @return [Hash{Symbol=>String}]
620
+ # @return [::Hash{::Symbol=>::String}]
620
621
  # @!attribute [rw] retry_policy
621
622
  # The retry policy. The value is a hash with the following keys:
622
623
  # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
@@ -624,25 +625,29 @@ module Google
624
625
  # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
625
626
  # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
626
627
  # trigger a retry.
627
- # @return [Hash]
628
+ # @return [::Hash]
629
+ # @!attribute [rw] quota_project
630
+ # A separate project against which to charge quota.
631
+ # @return [::String]
628
632
  #
629
633
  class Configuration
630
- extend Gapic::Config
634
+ extend ::Gapic::Config
631
635
 
632
- config_attr :endpoint, "jobs.googleapis.com", String
633
- config_attr :credentials, nil do |value|
636
+ config_attr :endpoint, "jobs.googleapis.com", ::String
637
+ config_attr :credentials, nil do |value|
634
638
  allowed = [::String, ::Hash, ::Proc, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
635
639
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
636
640
  allowed.any? { |klass| klass === value }
637
641
  end
638
- config_attr :scope, nil, String, Array, nil
639
- config_attr :lib_name, nil, String, nil
640
- config_attr :lib_version, nil, String, nil
641
- config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, Hash, nil)
642
- config_attr :interceptors, nil, Array, nil
643
- config_attr :timeout, nil, Numeric, nil
644
- config_attr :metadata, nil, Hash, nil
645
- config_attr :retry_policy, nil, Hash, Proc, nil
642
+ config_attr :scope, nil, ::String, ::Array, nil
643
+ config_attr :lib_name, nil, ::String, nil
644
+ config_attr :lib_version, nil, ::String, nil
645
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
646
+ config_attr :interceptors, nil, ::Array, nil
647
+ config_attr :timeout, nil, ::Numeric, nil
648
+ config_attr :metadata, nil, ::Hash, nil
649
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
650
+ config_attr :quota_project, nil, ::String, nil
646
651
 
647
652
  # @private
648
653
  def initialize parent_config = nil
@@ -658,7 +663,7 @@ module Google
658
663
  def rpcs
659
664
  @rpcs ||= begin
660
665
  parent_rpcs = nil
661
- parent_rpcs = @parent_config.rpcs if @parent_config&.respond_to? :rpcs
666
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config&.respond_to?(:rpcs)
662
667
  Rpcs.new parent_rpcs
663
668
  end
664
669
  end
@@ -683,42 +688,42 @@ module Google
683
688
  class Rpcs
684
689
  ##
685
690
  # RPC-specific configuration for `create_company`
686
- # @return [Gapic::Config::Method]
691
+ # @return [::Gapic::Config::Method]
687
692
  #
688
693
  attr_reader :create_company
689
694
  ##
690
695
  # RPC-specific configuration for `get_company`
691
- # @return [Gapic::Config::Method]
696
+ # @return [::Gapic::Config::Method]
692
697
  #
693
698
  attr_reader :get_company
694
699
  ##
695
700
  # RPC-specific configuration for `update_company`
696
- # @return [Gapic::Config::Method]
701
+ # @return [::Gapic::Config::Method]
697
702
  #
698
703
  attr_reader :update_company
699
704
  ##
700
705
  # RPC-specific configuration for `delete_company`
701
- # @return [Gapic::Config::Method]
706
+ # @return [::Gapic::Config::Method]
702
707
  #
703
708
  attr_reader :delete_company
704
709
  ##
705
710
  # RPC-specific configuration for `list_companies`
706
- # @return [Gapic::Config::Method]
711
+ # @return [::Gapic::Config::Method]
707
712
  #
708
713
  attr_reader :list_companies
709
714
 
710
715
  # @private
711
716
  def initialize parent_rpcs = nil
712
717
  create_company_config = parent_rpcs&.create_company if parent_rpcs&.respond_to? :create_company
713
- @create_company = Gapic::Config::Method.new create_company_config
718
+ @create_company = ::Gapic::Config::Method.new create_company_config
714
719
  get_company_config = parent_rpcs&.get_company if parent_rpcs&.respond_to? :get_company
715
- @get_company = Gapic::Config::Method.new get_company_config
720
+ @get_company = ::Gapic::Config::Method.new get_company_config
716
721
  update_company_config = parent_rpcs&.update_company if parent_rpcs&.respond_to? :update_company
717
- @update_company = Gapic::Config::Method.new update_company_config
722
+ @update_company = ::Gapic::Config::Method.new update_company_config
718
723
  delete_company_config = parent_rpcs&.delete_company if parent_rpcs&.respond_to? :delete_company
719
- @delete_company = Gapic::Config::Method.new delete_company_config
724
+ @delete_company = ::Gapic::Config::Method.new delete_company_config
720
725
  list_companies_config = parent_rpcs&.list_companies if parent_rpcs&.respond_to? :list_companies
721
- @list_companies = Gapic::Config::Method.new list_companies_config
726
+ @list_companies = ::Gapic::Config::Method.new list_companies_config
722
727
 
723
728
  yield self if block_given?
724
729
  end