google-apis-jobs_v3 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,648 @@
1
+ # Copyright 2020 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'google/apis/core/base_service'
16
+ require 'google/apis/core/json_representation'
17
+ require 'google/apis/core/hashable'
18
+ require 'google/apis/errors'
19
+
20
+ module Google
21
+ module Apis
22
+ module JobsV3
23
+ # Cloud Talent Solution API
24
+ #
25
+ # Cloud Talent Solution provides the capability to create, read, update, and
26
+ # delete job postings, as well as search jobs based on keywords and filters.
27
+ #
28
+ # @example
29
+ # require 'google/apis/jobs_v3'
30
+ #
31
+ # Jobs = Google::Apis::JobsV3 # Alias the module
32
+ # service = Jobs::CloudTalentSolutionService.new
33
+ #
34
+ # @see https://cloud.google.com/talent-solution/job-search/docs/
35
+ class CloudTalentSolutionService < Google::Apis::Core::BaseService
36
+ # @return [String]
37
+ # API key. Your API key identifies your project and provides you with API access,
38
+ # quota, and reports. Required unless you provide an OAuth 2.0 token.
39
+ attr_accessor :key
40
+
41
+ # @return [String]
42
+ # Available to use for quota purposes for server-side applications. Can be any
43
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
44
+ attr_accessor :quota_user
45
+
46
+ def initialize
47
+ super('https://jobs.googleapis.com/', '',
48
+ client_name: 'google-apis-jobs_v3',
49
+ client_version: Google::Apis::JobsV3::GEM_VERSION)
50
+ @batch_path = 'batch'
51
+ end
52
+
53
+ # Completes the specified prefix with keyword suggestions. Intended for use by a
54
+ # job search auto-complete search box.
55
+ # @param [String] name
56
+ # Required. Resource name of project the completion is performed within. The
57
+ # format is "projects/`project_id`", for example, "projects/api-test-project".
58
+ # @param [String] company_name
59
+ # Optional. If provided, restricts completion to specified company. The format
60
+ # is "projects/`project_id`/companies/`company_id`", for example, "projects/api-
61
+ # test-project/companies/foo".
62
+ # @param [String] language_code
63
+ # Deprecated. Use language_codes instead. Optional. The language of the query.
64
+ # This is the BCP-47 language code, such as "en-US" or "sr-Latn". For more
65
+ # information, see [Tags for Identifying Languages](https://tools.ietf.org/html/
66
+ # bcp47). For CompletionType.JOB_TITLE type, only open jobs with the same
67
+ # language_code are returned. For CompletionType.COMPANY_NAME type, only
68
+ # companies having open jobs with the same language_code are returned. For
69
+ # CompletionType.COMBINED type, only open jobs with the same language_code or
70
+ # companies having open jobs with the same language_code are returned. The
71
+ # maximum number of allowed characters is 255.
72
+ # @param [Array<String>, String] language_codes
73
+ # Optional. The list of languages of the query. This is the BCP-47 language code,
74
+ # such as "en-US" or "sr-Latn". For more information, see [Tags for Identifying
75
+ # Languages](https://tools.ietf.org/html/bcp47). For CompletionType.JOB_TITLE
76
+ # type, only open jobs with the same language_codes are returned. For
77
+ # CompletionType.COMPANY_NAME type, only companies having open jobs with the
78
+ # same language_codes are returned. For CompletionType.COMBINED type, only open
79
+ # jobs with the same language_codes or companies having open jobs with the same
80
+ # language_codes are returned. The maximum number of allowed characters is 255.
81
+ # @param [Fixnum] page_size
82
+ # Required. Completion result count. The maximum allowed page size is 10.
83
+ # @param [String] query
84
+ # Required. The query used to generate suggestions. The maximum number of
85
+ # allowed characters is 255.
86
+ # @param [String] scope
87
+ # Optional. The scope of the completion. The defaults is CompletionScope.PUBLIC.
88
+ # @param [String] type
89
+ # Optional. The completion topic. The default is CompletionType.COMBINED.
90
+ # @param [String] fields
91
+ # Selector specifying which fields to include in a partial response.
92
+ # @param [String] quota_user
93
+ # Available to use for quota purposes for server-side applications. Can be any
94
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
95
+ # @param [Google::Apis::RequestOptions] options
96
+ # Request-specific options
97
+ #
98
+ # @yield [result, err] Result & error if block supplied
99
+ # @yieldparam result [Google::Apis::JobsV3::CompleteQueryResponse] parsed result object
100
+ # @yieldparam err [StandardError] error object if request failed
101
+ #
102
+ # @return [Google::Apis::JobsV3::CompleteQueryResponse]
103
+ #
104
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
105
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
106
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
107
+ def complete_project(name, company_name: nil, language_code: nil, language_codes: nil, page_size: nil, query: nil, scope: nil, type: nil, fields: nil, quota_user: nil, options: nil, &block)
108
+ command = make_simple_command(:get, 'v3/{+name}:complete', options)
109
+ command.response_representation = Google::Apis::JobsV3::CompleteQueryResponse::Representation
110
+ command.response_class = Google::Apis::JobsV3::CompleteQueryResponse
111
+ command.params['name'] = name unless name.nil?
112
+ command.query['companyName'] = company_name unless company_name.nil?
113
+ command.query['languageCode'] = language_code unless language_code.nil?
114
+ command.query['languageCodes'] = language_codes unless language_codes.nil?
115
+ command.query['pageSize'] = page_size unless page_size.nil?
116
+ command.query['query'] = query unless query.nil?
117
+ command.query['scope'] = scope unless scope.nil?
118
+ command.query['type'] = type unless type.nil?
119
+ command.query['fields'] = fields unless fields.nil?
120
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
121
+ execute_or_queue_command(command, &block)
122
+ end
123
+
124
+ # Report events issued when end user interacts with customer's application that
125
+ # uses Cloud Talent Solution. You may inspect the created events in [self
126
+ # service tools](https://console.cloud.google.com/talent-solution/overview). [
127
+ # Learn more](https://cloud.google.com/talent-solution/docs/management-tools)
128
+ # about self service tools.
129
+ # @param [String] parent
130
+ # Parent project name.
131
+ # @param [Google::Apis::JobsV3::CreateClientEventRequest] create_client_event_request_object
132
+ # @param [String] fields
133
+ # Selector specifying which fields to include in a partial response.
134
+ # @param [String] quota_user
135
+ # Available to use for quota purposes for server-side applications. Can be any
136
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
137
+ # @param [Google::Apis::RequestOptions] options
138
+ # Request-specific options
139
+ #
140
+ # @yield [result, err] Result & error if block supplied
141
+ # @yieldparam result [Google::Apis::JobsV3::ClientEvent] parsed result object
142
+ # @yieldparam err [StandardError] error object if request failed
143
+ #
144
+ # @return [Google::Apis::JobsV3::ClientEvent]
145
+ #
146
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
147
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
148
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
149
+ def create_client_event(parent, create_client_event_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
150
+ command = make_simple_command(:post, 'v3/{+parent}/clientEvents', options)
151
+ command.request_representation = Google::Apis::JobsV3::CreateClientEventRequest::Representation
152
+ command.request_object = create_client_event_request_object
153
+ command.response_representation = Google::Apis::JobsV3::ClientEvent::Representation
154
+ command.response_class = Google::Apis::JobsV3::ClientEvent
155
+ command.params['parent'] = parent unless parent.nil?
156
+ command.query['fields'] = fields unless fields.nil?
157
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
158
+ execute_or_queue_command(command, &block)
159
+ end
160
+
161
+ # Creates a new company entity.
162
+ # @param [String] parent
163
+ # Required. Resource name of the project under which the company is created. The
164
+ # format is "projects/`project_id`", for example, "projects/api-test-project".
165
+ # @param [Google::Apis::JobsV3::CreateCompanyRequest] create_company_request_object
166
+ # @param [String] fields
167
+ # Selector specifying which fields to include in a partial response.
168
+ # @param [String] quota_user
169
+ # Available to use for quota purposes for server-side applications. Can be any
170
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
171
+ # @param [Google::Apis::RequestOptions] options
172
+ # Request-specific options
173
+ #
174
+ # @yield [result, err] Result & error if block supplied
175
+ # @yieldparam result [Google::Apis::JobsV3::Company] parsed result object
176
+ # @yieldparam err [StandardError] error object if request failed
177
+ #
178
+ # @return [Google::Apis::JobsV3::Company]
179
+ #
180
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
181
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
182
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
183
+ def create_company(parent, create_company_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
184
+ command = make_simple_command(:post, 'v3/{+parent}/companies', options)
185
+ command.request_representation = Google::Apis::JobsV3::CreateCompanyRequest::Representation
186
+ command.request_object = create_company_request_object
187
+ command.response_representation = Google::Apis::JobsV3::Company::Representation
188
+ command.response_class = Google::Apis::JobsV3::Company
189
+ command.params['parent'] = parent unless parent.nil?
190
+ command.query['fields'] = fields unless fields.nil?
191
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
192
+ execute_or_queue_command(command, &block)
193
+ end
194
+
195
+ # Deletes specified company. Prerequisite: The company has no jobs associated
196
+ # with it.
197
+ # @param [String] name
198
+ # Required. The resource name of the company to be deleted. The format is "
199
+ # projects/`project_id`/companies/`company_id`", for example, "projects/api-test-
200
+ # project/companies/foo".
201
+ # @param [String] fields
202
+ # Selector specifying which fields to include in a partial response.
203
+ # @param [String] quota_user
204
+ # Available to use for quota purposes for server-side applications. Can be any
205
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
206
+ # @param [Google::Apis::RequestOptions] options
207
+ # Request-specific options
208
+ #
209
+ # @yield [result, err] Result & error if block supplied
210
+ # @yieldparam result [Google::Apis::JobsV3::Empty] parsed result object
211
+ # @yieldparam err [StandardError] error object if request failed
212
+ #
213
+ # @return [Google::Apis::JobsV3::Empty]
214
+ #
215
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
216
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
217
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
218
+ def delete_project_company(name, fields: nil, quota_user: nil, options: nil, &block)
219
+ command = make_simple_command(:delete, 'v3/{+name}', options)
220
+ command.response_representation = Google::Apis::JobsV3::Empty::Representation
221
+ command.response_class = Google::Apis::JobsV3::Empty
222
+ command.params['name'] = name unless name.nil?
223
+ command.query['fields'] = fields unless fields.nil?
224
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
225
+ execute_or_queue_command(command, &block)
226
+ end
227
+
228
+ # Retrieves specified company.
229
+ # @param [String] name
230
+ # Required. The resource name of the company to be retrieved. The format is "
231
+ # projects/`project_id`/companies/`company_id`", for example, "projects/api-test-
232
+ # project/companies/foo".
233
+ # @param [String] fields
234
+ # Selector specifying which fields to include in a partial response.
235
+ # @param [String] quota_user
236
+ # Available to use for quota purposes for server-side applications. Can be any
237
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
238
+ # @param [Google::Apis::RequestOptions] options
239
+ # Request-specific options
240
+ #
241
+ # @yield [result, err] Result & error if block supplied
242
+ # @yieldparam result [Google::Apis::JobsV3::Company] parsed result object
243
+ # @yieldparam err [StandardError] error object if request failed
244
+ #
245
+ # @return [Google::Apis::JobsV3::Company]
246
+ #
247
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
248
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
249
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
250
+ def get_project_company(name, fields: nil, quota_user: nil, options: nil, &block)
251
+ command = make_simple_command(:get, 'v3/{+name}', options)
252
+ command.response_representation = Google::Apis::JobsV3::Company::Representation
253
+ command.response_class = Google::Apis::JobsV3::Company
254
+ command.params['name'] = name unless name.nil?
255
+ command.query['fields'] = fields unless fields.nil?
256
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
257
+ execute_or_queue_command(command, &block)
258
+ end
259
+
260
+ # Lists all companies associated with the service account.
261
+ # @param [String] parent
262
+ # Required. Resource name of the project under which the company is created. The
263
+ # format is "projects/`project_id`", for example, "projects/api-test-project".
264
+ # @param [Fixnum] page_size
265
+ # Optional. The maximum number of companies to be returned, at most 100. Default
266
+ # is 100 if a non-positive number is provided.
267
+ # @param [String] page_token
268
+ # Optional. The starting indicator from which to return results.
269
+ # @param [Boolean] require_open_jobs
270
+ # Optional. Set to true if the companies requested must have open jobs. Defaults
271
+ # to false. If true, at most page_size of companies are fetched, among which
272
+ # only those with open jobs are returned.
273
+ # @param [String] fields
274
+ # Selector specifying which fields to include in a partial response.
275
+ # @param [String] quota_user
276
+ # Available to use for quota purposes for server-side applications. Can be any
277
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
278
+ # @param [Google::Apis::RequestOptions] options
279
+ # Request-specific options
280
+ #
281
+ # @yield [result, err] Result & error if block supplied
282
+ # @yieldparam result [Google::Apis::JobsV3::ListCompaniesResponse] parsed result object
283
+ # @yieldparam err [StandardError] error object if request failed
284
+ #
285
+ # @return [Google::Apis::JobsV3::ListCompaniesResponse]
286
+ #
287
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
288
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
289
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
290
+ def list_project_companies(parent, page_size: nil, page_token: nil, require_open_jobs: nil, fields: nil, quota_user: nil, options: nil, &block)
291
+ command = make_simple_command(:get, 'v3/{+parent}/companies', options)
292
+ command.response_representation = Google::Apis::JobsV3::ListCompaniesResponse::Representation
293
+ command.response_class = Google::Apis::JobsV3::ListCompaniesResponse
294
+ command.params['parent'] = parent unless parent.nil?
295
+ command.query['pageSize'] = page_size unless page_size.nil?
296
+ command.query['pageToken'] = page_token unless page_token.nil?
297
+ command.query['requireOpenJobs'] = require_open_jobs unless require_open_jobs.nil?
298
+ command.query['fields'] = fields unless fields.nil?
299
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
300
+ execute_or_queue_command(command, &block)
301
+ end
302
+
303
+ # Updates specified company. Company names can't be updated. To update a company
304
+ # name, delete the company and all jobs associated with it, and only then re-
305
+ # create them.
306
+ # @param [String] name
307
+ # Required during company update. The resource name for a company. This is
308
+ # generated by the service when a company is created. The format is "projects/`
309
+ # project_id`/companies/`company_id`", for example, "projects/api-test-project/
310
+ # companies/foo".
311
+ # @param [Google::Apis::JobsV3::UpdateCompanyRequest] update_company_request_object
312
+ # @param [String] fields
313
+ # Selector specifying which fields to include in a partial response.
314
+ # @param [String] quota_user
315
+ # Available to use for quota purposes for server-side applications. Can be any
316
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
317
+ # @param [Google::Apis::RequestOptions] options
318
+ # Request-specific options
319
+ #
320
+ # @yield [result, err] Result & error if block supplied
321
+ # @yieldparam result [Google::Apis::JobsV3::Company] parsed result object
322
+ # @yieldparam err [StandardError] error object if request failed
323
+ #
324
+ # @return [Google::Apis::JobsV3::Company]
325
+ #
326
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
327
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
328
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
329
+ def patch_project_company(name, update_company_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
330
+ command = make_simple_command(:patch, 'v3/{+name}', options)
331
+ command.request_representation = Google::Apis::JobsV3::UpdateCompanyRequest::Representation
332
+ command.request_object = update_company_request_object
333
+ command.response_representation = Google::Apis::JobsV3::Company::Representation
334
+ command.response_class = Google::Apis::JobsV3::Company
335
+ command.params['name'] = name unless name.nil?
336
+ command.query['fields'] = fields unless fields.nil?
337
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
338
+ execute_or_queue_command(command, &block)
339
+ end
340
+
341
+ # Deletes a list of Jobs by filter.
342
+ # @param [String] parent
343
+ # Required. The resource name of the project under which the job is created. The
344
+ # format is "projects/`project_id`", for example, "projects/api-test-project".
345
+ # @param [Google::Apis::JobsV3::BatchDeleteJobsRequest] batch_delete_jobs_request_object
346
+ # @param [String] fields
347
+ # Selector specifying which fields to include in a partial response.
348
+ # @param [String] quota_user
349
+ # Available to use for quota purposes for server-side applications. Can be any
350
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
351
+ # @param [Google::Apis::RequestOptions] options
352
+ # Request-specific options
353
+ #
354
+ # @yield [result, err] Result & error if block supplied
355
+ # @yieldparam result [Google::Apis::JobsV3::Empty] parsed result object
356
+ # @yieldparam err [StandardError] error object if request failed
357
+ #
358
+ # @return [Google::Apis::JobsV3::Empty]
359
+ #
360
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
361
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
362
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
363
+ def batch_delete_jobs(parent, batch_delete_jobs_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
364
+ command = make_simple_command(:post, 'v3/{+parent}/jobs:batchDelete', options)
365
+ command.request_representation = Google::Apis::JobsV3::BatchDeleteJobsRequest::Representation
366
+ command.request_object = batch_delete_jobs_request_object
367
+ command.response_representation = Google::Apis::JobsV3::Empty::Representation
368
+ command.response_class = Google::Apis::JobsV3::Empty
369
+ command.params['parent'] = parent unless parent.nil?
370
+ command.query['fields'] = fields unless fields.nil?
371
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
372
+ execute_or_queue_command(command, &block)
373
+ end
374
+
375
+ # Creates a new job. Typically, the job becomes searchable within 10 seconds,
376
+ # but it may take up to 5 minutes.
377
+ # @param [String] parent
378
+ # Required. The resource name of the project under which the job is created. The
379
+ # format is "projects/`project_id`", for example, "projects/api-test-project".
380
+ # @param [Google::Apis::JobsV3::CreateJobRequest] create_job_request_object
381
+ # @param [String] fields
382
+ # Selector specifying which fields to include in a partial response.
383
+ # @param [String] quota_user
384
+ # Available to use for quota purposes for server-side applications. Can be any
385
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
386
+ # @param [Google::Apis::RequestOptions] options
387
+ # Request-specific options
388
+ #
389
+ # @yield [result, err] Result & error if block supplied
390
+ # @yieldparam result [Google::Apis::JobsV3::Job] parsed result object
391
+ # @yieldparam err [StandardError] error object if request failed
392
+ #
393
+ # @return [Google::Apis::JobsV3::Job]
394
+ #
395
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
396
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
397
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
398
+ def create_job(parent, create_job_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
399
+ command = make_simple_command(:post, 'v3/{+parent}/jobs', options)
400
+ command.request_representation = Google::Apis::JobsV3::CreateJobRequest::Representation
401
+ command.request_object = create_job_request_object
402
+ command.response_representation = Google::Apis::JobsV3::Job::Representation
403
+ command.response_class = Google::Apis::JobsV3::Job
404
+ command.params['parent'] = parent unless parent.nil?
405
+ command.query['fields'] = fields unless fields.nil?
406
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
407
+ execute_or_queue_command(command, &block)
408
+ end
409
+
410
+ # Deletes the specified job. Typically, the job becomes unsearchable within 10
411
+ # seconds, but it may take up to 5 minutes.
412
+ # @param [String] name
413
+ # Required. The resource name of the job to be deleted. The format is "projects/`
414
+ # project_id`/jobs/`job_id`", for example, "projects/api-test-project/jobs/1234".
415
+ # @param [String] fields
416
+ # Selector specifying which fields to include in a partial response.
417
+ # @param [String] quota_user
418
+ # Available to use for quota purposes for server-side applications. Can be any
419
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
420
+ # @param [Google::Apis::RequestOptions] options
421
+ # Request-specific options
422
+ #
423
+ # @yield [result, err] Result & error if block supplied
424
+ # @yieldparam result [Google::Apis::JobsV3::Empty] parsed result object
425
+ # @yieldparam err [StandardError] error object if request failed
426
+ #
427
+ # @return [Google::Apis::JobsV3::Empty]
428
+ #
429
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
430
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
431
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
432
+ def delete_project_job(name, fields: nil, quota_user: nil, options: nil, &block)
433
+ command = make_simple_command(:delete, 'v3/{+name}', options)
434
+ command.response_representation = Google::Apis::JobsV3::Empty::Representation
435
+ command.response_class = Google::Apis::JobsV3::Empty
436
+ command.params['name'] = name unless name.nil?
437
+ command.query['fields'] = fields unless fields.nil?
438
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
439
+ execute_or_queue_command(command, &block)
440
+ end
441
+
442
+ # Retrieves the specified job, whose status is OPEN or recently EXPIRED within
443
+ # the last 90 days.
444
+ # @param [String] name
445
+ # Required. The resource name of the job to retrieve. The format is "projects/`
446
+ # project_id`/jobs/`job_id`", for example, "projects/api-test-project/jobs/1234".
447
+ # @param [String] fields
448
+ # Selector specifying which fields to include in a partial response.
449
+ # @param [String] quota_user
450
+ # Available to use for quota purposes for server-side applications. Can be any
451
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
452
+ # @param [Google::Apis::RequestOptions] options
453
+ # Request-specific options
454
+ #
455
+ # @yield [result, err] Result & error if block supplied
456
+ # @yieldparam result [Google::Apis::JobsV3::Job] parsed result object
457
+ # @yieldparam err [StandardError] error object if request failed
458
+ #
459
+ # @return [Google::Apis::JobsV3::Job]
460
+ #
461
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
462
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
463
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
464
+ def get_project_job(name, fields: nil, quota_user: nil, options: nil, &block)
465
+ command = make_simple_command(:get, 'v3/{+name}', options)
466
+ command.response_representation = Google::Apis::JobsV3::Job::Representation
467
+ command.response_class = Google::Apis::JobsV3::Job
468
+ command.params['name'] = name unless name.nil?
469
+ command.query['fields'] = fields unless fields.nil?
470
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
471
+ execute_or_queue_command(command, &block)
472
+ end
473
+
474
+ # Lists jobs by filter.
475
+ # @param [String] parent
476
+ # Required. The resource name of the project under which the job is created. The
477
+ # format is "projects/`project_id`", for example, "projects/api-test-project".
478
+ # @param [String] filter
479
+ # Required. The filter string specifies the jobs to be enumerated. Supported
480
+ # operator: =, AND The fields eligible for filtering are: * `companyName` (
481
+ # Required) * `requisitionId` (Optional) Sample Query: * companyName = "projects/
482
+ # api-test-project/companies/123" * companyName = "projects/api-test-project/
483
+ # companies/123" AND requisitionId = "req-1"
484
+ # @param [String] job_view
485
+ # Optional. The desired job attributes returned for jobs in the search response.
486
+ # Defaults to JobView.JOB_VIEW_FULL if no value is specified.
487
+ # @param [Fixnum] page_size
488
+ # Optional. The maximum number of jobs to be returned per page of results. If
489
+ # job_view is set to JobView.JOB_VIEW_ID_ONLY, the maximum allowed page size is
490
+ # 1000. Otherwise, the maximum allowed page size is 100. Default is 100 if empty
491
+ # or a number < 1 is specified.
492
+ # @param [String] page_token
493
+ # Optional. The starting point of a query result.
494
+ # @param [String] fields
495
+ # Selector specifying which fields to include in a partial response.
496
+ # @param [String] quota_user
497
+ # Available to use for quota purposes for server-side applications. Can be any
498
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
499
+ # @param [Google::Apis::RequestOptions] options
500
+ # Request-specific options
501
+ #
502
+ # @yield [result, err] Result & error if block supplied
503
+ # @yieldparam result [Google::Apis::JobsV3::ListJobsResponse] parsed result object
504
+ # @yieldparam err [StandardError] error object if request failed
505
+ #
506
+ # @return [Google::Apis::JobsV3::ListJobsResponse]
507
+ #
508
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
509
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
510
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
511
+ def list_project_jobs(parent, filter: nil, job_view: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
512
+ command = make_simple_command(:get, 'v3/{+parent}/jobs', options)
513
+ command.response_representation = Google::Apis::JobsV3::ListJobsResponse::Representation
514
+ command.response_class = Google::Apis::JobsV3::ListJobsResponse
515
+ command.params['parent'] = parent unless parent.nil?
516
+ command.query['filter'] = filter unless filter.nil?
517
+ command.query['jobView'] = job_view unless job_view.nil?
518
+ command.query['pageSize'] = page_size unless page_size.nil?
519
+ command.query['pageToken'] = page_token unless page_token.nil?
520
+ command.query['fields'] = fields unless fields.nil?
521
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
522
+ execute_or_queue_command(command, &block)
523
+ end
524
+
525
+ # Updates specified job. Typically, updated contents become visible in search
526
+ # results within 10 seconds, but it may take up to 5 minutes.
527
+ # @param [String] name
528
+ # Required during job update. The resource name for the job. This is generated
529
+ # by the service when a job is created. The format is "projects/`project_id`/
530
+ # jobs/`job_id`", for example, "projects/api-test-project/jobs/1234". Use of
531
+ # this field in job queries and API calls is preferred over the use of
532
+ # requisition_id since this value is unique.
533
+ # @param [Google::Apis::JobsV3::UpdateJobRequest] update_job_request_object
534
+ # @param [String] fields
535
+ # Selector specifying which fields to include in a partial response.
536
+ # @param [String] quota_user
537
+ # Available to use for quota purposes for server-side applications. Can be any
538
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
539
+ # @param [Google::Apis::RequestOptions] options
540
+ # Request-specific options
541
+ #
542
+ # @yield [result, err] Result & error if block supplied
543
+ # @yieldparam result [Google::Apis::JobsV3::Job] parsed result object
544
+ # @yieldparam err [StandardError] error object if request failed
545
+ #
546
+ # @return [Google::Apis::JobsV3::Job]
547
+ #
548
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
549
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
550
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
551
+ def patch_project_job(name, update_job_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
552
+ command = make_simple_command(:patch, 'v3/{+name}', options)
553
+ command.request_representation = Google::Apis::JobsV3::UpdateJobRequest::Representation
554
+ command.request_object = update_job_request_object
555
+ command.response_representation = Google::Apis::JobsV3::Job::Representation
556
+ command.response_class = Google::Apis::JobsV3::Job
557
+ command.params['name'] = name unless name.nil?
558
+ command.query['fields'] = fields unless fields.nil?
559
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
560
+ execute_or_queue_command(command, &block)
561
+ end
562
+
563
+ # Searches for jobs using the provided SearchJobsRequest. This call constrains
564
+ # the visibility of jobs present in the database, and only returns jobs that the
565
+ # caller has permission to search against.
566
+ # @param [String] parent
567
+ # Required. The resource name of the project to search within. The format is "
568
+ # projects/`project_id`", for example, "projects/api-test-project".
569
+ # @param [Google::Apis::JobsV3::SearchJobsRequest] search_jobs_request_object
570
+ # @param [String] fields
571
+ # Selector specifying which fields to include in a partial response.
572
+ # @param [String] quota_user
573
+ # Available to use for quota purposes for server-side applications. Can be any
574
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
575
+ # @param [Google::Apis::RequestOptions] options
576
+ # Request-specific options
577
+ #
578
+ # @yield [result, err] Result & error if block supplied
579
+ # @yieldparam result [Google::Apis::JobsV3::SearchJobsResponse] parsed result object
580
+ # @yieldparam err [StandardError] error object if request failed
581
+ #
582
+ # @return [Google::Apis::JobsV3::SearchJobsResponse]
583
+ #
584
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
585
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
586
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
587
+ def search_jobs(parent, search_jobs_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
588
+ command = make_simple_command(:post, 'v3/{+parent}/jobs:search', options)
589
+ command.request_representation = Google::Apis::JobsV3::SearchJobsRequest::Representation
590
+ command.request_object = search_jobs_request_object
591
+ command.response_representation = Google::Apis::JobsV3::SearchJobsResponse::Representation
592
+ command.response_class = Google::Apis::JobsV3::SearchJobsResponse
593
+ command.params['parent'] = parent unless parent.nil?
594
+ command.query['fields'] = fields unless fields.nil?
595
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
596
+ execute_or_queue_command(command, &block)
597
+ end
598
+
599
+ # Searches for jobs using the provided SearchJobsRequest. This API call is
600
+ # intended for the use case of targeting passive job seekers (for example, job
601
+ # seekers who have signed up to receive email alerts about potential job
602
+ # opportunities), and has different algorithmic adjustments that are targeted to
603
+ # passive job seekers. This call constrains the visibility of jobs present in
604
+ # the database, and only returns jobs the caller has permission to search
605
+ # against.
606
+ # @param [String] parent
607
+ # Required. The resource name of the project to search within. The format is "
608
+ # projects/`project_id`", for example, "projects/api-test-project".
609
+ # @param [Google::Apis::JobsV3::SearchJobsRequest] search_jobs_request_object
610
+ # @param [String] fields
611
+ # Selector specifying which fields to include in a partial response.
612
+ # @param [String] quota_user
613
+ # Available to use for quota purposes for server-side applications. Can be any
614
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
615
+ # @param [Google::Apis::RequestOptions] options
616
+ # Request-specific options
617
+ #
618
+ # @yield [result, err] Result & error if block supplied
619
+ # @yieldparam result [Google::Apis::JobsV3::SearchJobsResponse] parsed result object
620
+ # @yieldparam err [StandardError] error object if request failed
621
+ #
622
+ # @return [Google::Apis::JobsV3::SearchJobsResponse]
623
+ #
624
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
625
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
626
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
627
+ def search_project_job_for_alert(parent, search_jobs_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
628
+ command = make_simple_command(:post, 'v3/{+parent}/jobs:searchForAlert', options)
629
+ command.request_representation = Google::Apis::JobsV3::SearchJobsRequest::Representation
630
+ command.request_object = search_jobs_request_object
631
+ command.response_representation = Google::Apis::JobsV3::SearchJobsResponse::Representation
632
+ command.response_class = Google::Apis::JobsV3::SearchJobsResponse
633
+ command.params['parent'] = parent unless parent.nil?
634
+ command.query['fields'] = fields unless fields.nil?
635
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
636
+ execute_or_queue_command(command, &block)
637
+ end
638
+
639
+ protected
640
+
641
+ def apply_command_defaults(command)
642
+ command.query['key'] = key unless key.nil?
643
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
644
+ end
645
+ end
646
+ end
647
+ end
648
+ end