job_service.proto 40 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910
  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. syntax = "proto3";
  15. package google.cloud.talent.v4beta1;
  16. import "google/api/annotations.proto";
  17. import "google/api/client.proto";
  18. import "google/api/field_behavior.proto";
  19. import "google/api/resource.proto";
  20. import "google/cloud/talent/v4beta1/common.proto";
  21. import "google/cloud/talent/v4beta1/filters.proto";
  22. import "google/cloud/talent/v4beta1/histogram.proto";
  23. import "google/cloud/talent/v4beta1/job.proto";
  24. import "google/longrunning/operations.proto";
  25. import "google/protobuf/any.proto";
  26. import "google/protobuf/duration.proto";
  27. import "google/protobuf/empty.proto";
  28. import "google/protobuf/field_mask.proto";
  29. import "google/rpc/status.proto";
  30. option go_package = "google.golang.org/genproto/googleapis/cloud/talent/v4beta1;talent";
  31. option java_multiple_files = true;
  32. option java_outer_classname = "JobServiceProto";
  33. option java_package = "com.google.cloud.talent.v4beta1";
  34. option objc_class_prefix = "CTS";
  35. // A service handles job management, including job CRUD, enumeration and search.
  36. service JobService {
  37. option (google.api.default_host) = "jobs.googleapis.com";
  38. option (google.api.oauth_scopes) =
  39. "https://www.googleapis.com/auth/cloud-platform,"
  40. "https://www.googleapis.com/auth/jobs";
  41. // Creates a new job.
  42. //
  43. // Typically, the job becomes searchable within 10 seconds, but it may take
  44. // up to 5 minutes.
  45. rpc CreateJob(CreateJobRequest) returns (Job) {
  46. option (google.api.http) = {
  47. post: "/v4beta1/{parent=projects/*/tenants/*}/jobs"
  48. body: "*"
  49. additional_bindings {
  50. post: "/v4beta1/{parent=projects/*}/jobs"
  51. body: "*"
  52. }
  53. };
  54. option (google.api.method_signature) = "parent,job";
  55. }
  56. // Begins executing a batch create jobs operation.
  57. rpc BatchCreateJobs(BatchCreateJobsRequest) returns (google.longrunning.Operation) {
  58. option (google.api.http) = {
  59. post: "/v4beta1/{parent=projects/*/tenants/*}/jobs:batchCreate"
  60. body: "*"
  61. additional_bindings {
  62. post: "/v4beta1/{parent=projects/*}/jobs:batchCreate"
  63. body: "*"
  64. }
  65. };
  66. option (google.api.method_signature) = "parent,jobs";
  67. option (google.longrunning.operation_info) = {
  68. response_type: "JobOperationResult"
  69. metadata_type: "BatchOperationMetadata"
  70. };
  71. }
  72. // Retrieves the specified job, whose status is OPEN or recently EXPIRED
  73. // within the last 90 days.
  74. rpc GetJob(GetJobRequest) returns (Job) {
  75. option (google.api.http) = {
  76. get: "/v4beta1/{name=projects/*/tenants/*/jobs/*}"
  77. additional_bindings {
  78. get: "/v4beta1/{name=projects/*/jobs/*}"
  79. }
  80. };
  81. option (google.api.method_signature) = "name";
  82. }
  83. // Updates specified job.
  84. //
  85. // Typically, updated contents become visible in search results within 10
  86. // seconds, but it may take up to 5 minutes.
  87. rpc UpdateJob(UpdateJobRequest) returns (Job) {
  88. option (google.api.http) = {
  89. patch: "/v4beta1/{job.name=projects/*/tenants/*/jobs/*}"
  90. body: "*"
  91. additional_bindings {
  92. patch: "/v4beta1/{job.name=projects/*/jobs/*}"
  93. body: "*"
  94. }
  95. };
  96. option (google.api.method_signature) = "job";
  97. }
  98. // Begins executing a batch update jobs operation.
  99. rpc BatchUpdateJobs(BatchUpdateJobsRequest) returns (google.longrunning.Operation) {
  100. option (google.api.http) = {
  101. post: "/v4beta1/{parent=projects/*/tenants/*}/jobs:batchUpdate"
  102. body: "*"
  103. additional_bindings {
  104. post: "/v4beta1/{parent=projects/*}/jobs:batchUpdate"
  105. body: "*"
  106. }
  107. };
  108. option (google.api.method_signature) = "parent,jobs";
  109. option (google.longrunning.operation_info) = {
  110. response_type: "JobOperationResult"
  111. metadata_type: "BatchOperationMetadata"
  112. };
  113. }
  114. // Deletes the specified job.
  115. //
  116. // Typically, the job becomes unsearchable within 10 seconds, but it may take
  117. // up to 5 minutes.
  118. rpc DeleteJob(DeleteJobRequest) returns (google.protobuf.Empty) {
  119. option (google.api.http) = {
  120. delete: "/v4beta1/{name=projects/*/tenants/*/jobs/*}"
  121. additional_bindings {
  122. delete: "/v4beta1/{name=projects/*/jobs/*}"
  123. }
  124. };
  125. option (google.api.method_signature) = "name";
  126. }
  127. // Deletes a list of [Job][google.cloud.talent.v4beta1.Job]s by filter.
  128. rpc BatchDeleteJobs(BatchDeleteJobsRequest) returns (google.protobuf.Empty) {
  129. option (google.api.http) = {
  130. post: "/v4beta1/{parent=projects/*/tenants/*}/jobs:batchDelete"
  131. body: "*"
  132. additional_bindings {
  133. post: "/v4beta1/{parent=projects/*}/jobs:batchDelete"
  134. }
  135. };
  136. option (google.api.method_signature) = "parent,filter";
  137. }
  138. // Lists jobs by filter.
  139. rpc ListJobs(ListJobsRequest) returns (ListJobsResponse) {
  140. option (google.api.http) = {
  141. get: "/v4beta1/{parent=projects/*/tenants/*}/jobs"
  142. additional_bindings {
  143. get: "/v4beta1/{parent=projects/*}/jobs"
  144. }
  145. };
  146. option (google.api.method_signature) = "parent,filter";
  147. }
  148. // Searches for jobs using the provided [SearchJobsRequest][google.cloud.talent.v4beta1.SearchJobsRequest].
  149. //
  150. // This call constrains the [visibility][google.cloud.talent.v4beta1.Job.visibility] of jobs
  151. // present in the database, and only returns jobs that the caller has
  152. // permission to search against.
  153. rpc SearchJobs(SearchJobsRequest) returns (SearchJobsResponse) {
  154. option (google.api.http) = {
  155. post: "/v4beta1/{parent=projects/*/tenants/*}/jobs:search"
  156. body: "*"
  157. additional_bindings {
  158. post: "/v4beta1/{parent=projects/*}/jobs:search"
  159. body: "*"
  160. }
  161. };
  162. }
  163. // Searches for jobs using the provided [SearchJobsRequest][google.cloud.talent.v4beta1.SearchJobsRequest].
  164. //
  165. // This API call is intended for the use case of targeting passive job
  166. // seekers (for example, job seekers who have signed up to receive email
  167. // alerts about potential job opportunities), and has different algorithmic
  168. // adjustments that are targeted to passive job seekers.
  169. //
  170. // This call constrains the [visibility][google.cloud.talent.v4beta1.Job.visibility] of jobs
  171. // present in the database, and only returns jobs the caller has
  172. // permission to search against.
  173. rpc SearchJobsForAlert(SearchJobsRequest) returns (SearchJobsResponse) {
  174. option (google.api.http) = {
  175. post: "/v4beta1/{parent=projects/*/tenants/*}/jobs:searchForAlert"
  176. body: "*"
  177. additional_bindings {
  178. post: "/v4beta1/{parent=projects/*}/jobs:searchForAlert"
  179. body: "*"
  180. }
  181. };
  182. }
  183. }
  184. // Create job request.
  185. message CreateJobRequest {
  186. // Required. The resource name of the tenant under which the job is created.
  187. //
  188. // The format is "projects/{project_id}/tenants/{tenant_id}". For example,
  189. // "projects/foo/tenant/bar". If tenant id is unspecified a default tenant
  190. // is created. For example, "projects/foo".
  191. string parent = 1 [
  192. (google.api.field_behavior) = REQUIRED,
  193. (google.api.resource_reference) = {
  194. child_type: "jobs.googleapis.com/Job"
  195. }
  196. ];
  197. // Required. The Job to be created.
  198. Job job = 2 [(google.api.field_behavior) = REQUIRED];
  199. }
  200. // Get job request.
  201. message GetJobRequest {
  202. // Required. The resource name of the job to retrieve.
  203. //
  204. // The format is
  205. // "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". For
  206. // example, "projects/foo/tenants/bar/jobs/baz".
  207. //
  208. // If tenant id is unspecified, the default tenant is used. For
  209. // example, "projects/foo/jobs/bar".
  210. string name = 1 [
  211. (google.api.field_behavior) = REQUIRED,
  212. (google.api.resource_reference) = {
  213. type: "jobs.googleapis.com/Job"
  214. }
  215. ];
  216. }
  217. // Update job request.
  218. message UpdateJobRequest {
  219. // Required. The Job to be updated.
  220. Job job = 1 [(google.api.field_behavior) = REQUIRED];
  221. // Strongly recommended for the best service experience.
  222. //
  223. // If [update_mask][google.cloud.talent.v4beta1.UpdateJobRequest.update_mask] is provided, only the specified fields in
  224. // [job][google.cloud.talent.v4beta1.UpdateJobRequest.job] are updated. Otherwise all the fields are updated.
  225. //
  226. // A field mask to restrict the fields that are updated. Only
  227. // top level fields of [Job][google.cloud.talent.v4beta1.Job] are supported.
  228. google.protobuf.FieldMask update_mask = 2;
  229. }
  230. // Delete job request.
  231. message DeleteJobRequest {
  232. // Required. The resource name of the job to be deleted.
  233. //
  234. // The format is
  235. // "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". For
  236. // example, "projects/foo/tenants/bar/jobs/baz".
  237. //
  238. // If tenant id is unspecified, the default tenant is used. For
  239. // example, "projects/foo/jobs/bar".
  240. string name = 1 [
  241. (google.api.field_behavior) = REQUIRED,
  242. (google.api.resource_reference) = {
  243. type: "jobs.googleapis.com/Job"
  244. }
  245. ];
  246. }
  247. // Batch delete jobs request.
  248. message BatchDeleteJobsRequest {
  249. // Required. The resource name of the tenant under which the job is created.
  250. //
  251. // The format is "projects/{project_id}/tenants/{tenant_id}". For example,
  252. // "projects/foo/tenant/bar". If tenant id is unspecified, a default tenant
  253. // is created. For example, "projects/foo".
  254. string parent = 1 [
  255. (google.api.field_behavior) = REQUIRED,
  256. (google.api.resource_reference) = {
  257. child_type: "jobs.googleapis.com/Job"
  258. }
  259. ];
  260. // Required. The filter string specifies the jobs to be deleted.
  261. //
  262. // Supported operator: =, AND
  263. //
  264. // The fields eligible for filtering are:
  265. //
  266. // * `companyName` (Required)
  267. // * `requisitionId` (Required)
  268. //
  269. // Sample Query: companyName = "projects/foo/companies/bar" AND
  270. // requisitionId = "req-1"
  271. string filter = 2 [(google.api.field_behavior) = REQUIRED];
  272. }
  273. // List jobs request.
  274. message ListJobsRequest {
  275. // Required. The resource name of the tenant under which the job is created.
  276. //
  277. // The format is "projects/{project_id}/tenants/{tenant_id}". For example,
  278. // "projects/foo/tenant/bar". If tenant id is unspecified, a default tenant
  279. // is created. For example, "projects/foo".
  280. string parent = 1 [
  281. (google.api.field_behavior) = REQUIRED,
  282. (google.api.resource_reference) = {
  283. child_type: "jobs.googleapis.com/Job"
  284. }
  285. ];
  286. // Required. The filter string specifies the jobs to be enumerated.
  287. //
  288. // Supported operator: =, AND
  289. //
  290. // The fields eligible for filtering are:
  291. //
  292. // * `companyName` (Required)
  293. // * `requisitionId`
  294. // * `status` Available values: OPEN, EXPIRED, ALL. Defaults to
  295. // OPEN if no value is specified.
  296. //
  297. // Sample Query:
  298. //
  299. // * companyName = "projects/foo/tenants/bar/companies/baz"
  300. // * companyName = "projects/foo/tenants/bar/companies/baz" AND
  301. // requisitionId = "req-1"
  302. // * companyName = "projects/foo/tenants/bar/companies/baz" AND
  303. // status = "EXPIRED"
  304. string filter = 2 [(google.api.field_behavior) = REQUIRED];
  305. // The starting point of a query result.
  306. string page_token = 3;
  307. // The maximum number of jobs to be returned per page of results.
  308. //
  309. // If [job_view][google.cloud.talent.v4beta1.ListJobsRequest.job_view] is set to [JobView.JOB_VIEW_ID_ONLY][google.cloud.talent.v4beta1.JobView.JOB_VIEW_ID_ONLY], the maximum allowed
  310. // page size is 1000. Otherwise, the maximum allowed page size is 100.
  311. //
  312. // Default is 100 if empty or a number < 1 is specified.
  313. int32 page_size = 4;
  314. // The desired job attributes returned for jobs in the
  315. // search response. Defaults to [JobView.JOB_VIEW_FULL][google.cloud.talent.v4beta1.JobView.JOB_VIEW_FULL] if no value is
  316. // specified.
  317. JobView job_view = 5;
  318. }
  319. // An enum that specifies the job attributes that are returned in the
  320. // [MatchingJob.job][google.cloud.talent.v4beta1.SearchJobsResponse.MatchingJob.job] or
  321. // [ListJobsResponse.jobs][google.cloud.talent.v4beta1.ListJobsResponse.jobs] fields.
  322. enum JobView {
  323. // Default value.
  324. JOB_VIEW_UNSPECIFIED = 0;
  325. // A ID only view of job, with following attributes:
  326. // [Job.name][google.cloud.talent.v4beta1.Job.name], [Job.requisition_id][google.cloud.talent.v4beta1.Job.requisition_id], [Job.language_code][google.cloud.talent.v4beta1.Job.language_code].
  327. JOB_VIEW_ID_ONLY = 1;
  328. // A minimal view of the job, with the following attributes:
  329. // [Job.name][google.cloud.talent.v4beta1.Job.name], [Job.requisition_id][google.cloud.talent.v4beta1.Job.requisition_id], [Job.title][google.cloud.talent.v4beta1.Job.title],
  330. // [Job.company][google.cloud.talent.v4beta1.Job.company], [Job.DerivedInfo.locations][google.cloud.talent.v4beta1.Job.DerivedInfo.locations], [Job.language_code][google.cloud.talent.v4beta1.Job.language_code].
  331. JOB_VIEW_MINIMAL = 2;
  332. // A small view of the job, with the following attributes in the search
  333. // results: [Job.name][google.cloud.talent.v4beta1.Job.name], [Job.requisition_id][google.cloud.talent.v4beta1.Job.requisition_id], [Job.title][google.cloud.talent.v4beta1.Job.title],
  334. // [Job.company][google.cloud.talent.v4beta1.Job.company], [Job.DerivedInfo.locations][google.cloud.talent.v4beta1.Job.DerivedInfo.locations], [Job.visibility][google.cloud.talent.v4beta1.Job.visibility],
  335. // [Job.language_code][google.cloud.talent.v4beta1.Job.language_code], [Job.description][google.cloud.talent.v4beta1.Job.description].
  336. JOB_VIEW_SMALL = 3;
  337. // All available attributes are included in the search results.
  338. JOB_VIEW_FULL = 4;
  339. }
  340. // List jobs response.
  341. message ListJobsResponse {
  342. // The Jobs for a given company.
  343. //
  344. // The maximum number of items returned is based on the limit field
  345. // provided in the request.
  346. repeated Job jobs = 1;
  347. // A token to retrieve the next page of results.
  348. string next_page_token = 2;
  349. // Additional information for the API invocation, such as the request
  350. // tracking id.
  351. ResponseMetadata metadata = 3;
  352. }
  353. // The Request body of the `SearchJobs` call.
  354. message SearchJobsRequest {
  355. // Custom ranking information for [SearchJobsRequest][google.cloud.talent.v4beta1.SearchJobsRequest].
  356. message CustomRankingInfo {
  357. // The importance level for [CustomRankingInfo.ranking_expression][google.cloud.talent.v4beta1.SearchJobsRequest.CustomRankingInfo.ranking_expression].
  358. enum ImportanceLevel {
  359. // Default value if the importance level isn't specified.
  360. IMPORTANCE_LEVEL_UNSPECIFIED = 0;
  361. // The given ranking expression is of None importance, existing relevance
  362. // score (determined by API algorithm) dominates job's final ranking
  363. // position.
  364. NONE = 1;
  365. // The given ranking expression is of Low importance in terms of job's
  366. // final ranking position compared to existing relevance
  367. // score (determined by API algorithm).
  368. LOW = 2;
  369. // The given ranking expression is of Mild importance in terms of job's
  370. // final ranking position compared to existing relevance
  371. // score (determined by API algorithm).
  372. MILD = 3;
  373. // The given ranking expression is of Medium importance in terms of job's
  374. // final ranking position compared to existing relevance
  375. // score (determined by API algorithm).
  376. MEDIUM = 4;
  377. // The given ranking expression is of High importance in terms of job's
  378. // final ranking position compared to existing relevance
  379. // score (determined by API algorithm).
  380. HIGH = 5;
  381. // The given ranking expression is of Extreme importance, and dominates
  382. // job's final ranking position with existing relevance
  383. // score (determined by API algorithm) ignored.
  384. EXTREME = 6;
  385. }
  386. // Required. Controls over how important the score of
  387. // [CustomRankingInfo.ranking_expression][google.cloud.talent.v4beta1.SearchJobsRequest.CustomRankingInfo.ranking_expression] gets applied to job's final
  388. // ranking position.
  389. //
  390. // An error is thrown if not specified.
  391. ImportanceLevel importance_level = 1 [(google.api.field_behavior) = REQUIRED];
  392. // Required. Controls over how job documents get ranked on top of existing relevance
  393. // score (determined by API algorithm). A combination of the ranking
  394. // expression and relevance score is used to determine job's final ranking
  395. // position.
  396. //
  397. // The syntax for this expression is a subset of Google SQL syntax.
  398. //
  399. // Supported operators are: +, -, *, /, where the left and right side of
  400. // the operator is either a numeric [Job.custom_attributes][google.cloud.talent.v4beta1.Job.custom_attributes] key,
  401. // integer/double value or an expression that can be evaluated to a number.
  402. //
  403. // Parenthesis are supported to adjust calculation precedence. The
  404. // expression must be < 100 characters in length.
  405. //
  406. // The expression is considered invalid for a job if the expression
  407. // references custom attributes that are not populated on the job or if the
  408. // expression results in a divide by zero. If an expression is invalid for a
  409. // job, that job is demoted to the end of the results.
  410. //
  411. // Sample ranking expression
  412. // (year + 25) * 0.25 - (freshness / 0.5)
  413. string ranking_expression = 2 [(google.api.field_behavior) = REQUIRED];
  414. }
  415. // A string-represented enumeration of the job search mode. The service
  416. // operate differently for different modes of service.
  417. enum SearchMode {
  418. // The mode of the search method isn't specified. The default search
  419. // behavior is identical to JOB_SEARCH search behavior.
  420. SEARCH_MODE_UNSPECIFIED = 0;
  421. // The job search matches against all jobs, and featured jobs
  422. // (jobs with promotionValue > 0) are not specially handled.
  423. JOB_SEARCH = 1;
  424. // The job search matches only against featured jobs (jobs with a
  425. // promotionValue > 0). This method doesn't return any jobs having a
  426. // promotionValue <= 0. The search results order is determined by the
  427. // promotionValue (jobs with a higher promotionValue are returned higher up
  428. // in the search results), with relevance being used as a tiebreaker.
  429. FEATURED_JOB_SEARCH = 2;
  430. }
  431. // Controls whether highly similar jobs are returned next to each other in
  432. // the search results. Jobs are identified as highly similar based on
  433. // their titles, job categories, and locations. Highly similar results are
  434. // clustered so that only one representative job of the cluster is
  435. // displayed to the job seeker higher up in the results, with the other jobs
  436. // being displayed lower down in the results.
  437. enum DiversificationLevel {
  438. // The diversification level isn't specified.
  439. DIVERSIFICATION_LEVEL_UNSPECIFIED = 0;
  440. // Disables diversification. Jobs that would normally be pushed to the last
  441. // page would not have their positions altered. This may result in highly
  442. // similar jobs appearing in sequence in the search results.
  443. DISABLED = 1;
  444. // Default diversifying behavior. The result list is ordered so that
  445. // highly similar results are pushed to the end of the last page of search
  446. // results. If you are using pageToken to page through the result set,
  447. // latency might be lower but we can't guarantee that all results are
  448. // returned. If you are using page offset, latency might be higher but all
  449. // results are returned.
  450. SIMPLE = 2;
  451. }
  452. // Required. The resource name of the tenant to search within.
  453. //
  454. // The format is "projects/{project_id}/tenants/{tenant_id}". For example,
  455. // "projects/foo/tenant/bar". If tenant id is unspecified, a default tenant
  456. // is created. For example, "projects/foo".
  457. string parent = 1 [
  458. (google.api.field_behavior) = REQUIRED,
  459. (google.api.resource_reference) = {
  460. child_type: "jobs.googleapis.com/Job"
  461. }
  462. ];
  463. // Mode of a search.
  464. //
  465. // Defaults to [SearchMode.JOB_SEARCH][google.cloud.talent.v4beta1.SearchJobsRequest.SearchMode.JOB_SEARCH].
  466. SearchMode search_mode = 2;
  467. // Required. The meta information collected about the job searcher, used to improve the
  468. // search quality of the service. The identifiers (such as `user_id`) are
  469. // provided by users, and must be unique and consistent.
  470. RequestMetadata request_metadata = 3 [(google.api.field_behavior) = REQUIRED];
  471. // Query used to search against jobs, such as keyword, location filters, etc.
  472. JobQuery job_query = 4;
  473. // Controls whether to broaden the search when it produces sparse results.
  474. // Broadened queries append results to the end of the matching results
  475. // list.
  476. //
  477. // Defaults to false.
  478. bool enable_broadening = 5;
  479. // Controls if the search job request requires the return of a precise
  480. // count of the first 300 results. Setting this to `true` ensures
  481. // consistency in the number of results per page. Best practice is to set this
  482. // value to true if a client allows users to jump directly to a
  483. // non-sequential search results page.
  484. //
  485. // Enabling this flag may adversely impact performance.
  486. //
  487. // Defaults to false.
  488. bool require_precise_result_size = 6;
  489. // An expression specifies a histogram request against matching jobs.
  490. //
  491. // Expression syntax is an aggregation function call with histogram facets and
  492. // other options.
  493. //
  494. // Available aggregation function calls are:
  495. // * `count(string_histogram_facet)`: Count the number of matching entities,
  496. // for each distinct attribute value.
  497. // * `count(numeric_histogram_facet, list of buckets)`: Count the number of
  498. // matching entities within each bucket.
  499. //
  500. // Data types:
  501. //
  502. // * Histogram facet: facet names with format [a-zA-Z][a-zA-Z0-9_]+.
  503. // * String: string like "any string with backslash escape for quote(\")."
  504. // * Number: whole number and floating point number like 10, -1 and -0.01.
  505. // * List: list of elements with comma(,) separator surrounded by square
  506. // brackets, for example, [1, 2, 3] and ["one", "two", "three"].
  507. //
  508. // Built-in constants:
  509. //
  510. // * MIN (minimum number similar to java Double.MIN_VALUE)
  511. // * MAX (maximum number similar to java Double.MAX_VALUE)
  512. //
  513. // Built-in functions:
  514. //
  515. // * bucket(start, end[, label]): bucket built-in function creates a bucket
  516. // with range of [start, end). Note that the end is exclusive, for example,
  517. // bucket(1, MAX, "positive number") or bucket(1, 10).
  518. //
  519. // Job histogram facets:
  520. //
  521. // * company_display_name: histogram by [Job.company_display_name][google.cloud.talent.v4beta1.Job.company_display_name].
  522. // * employment_type: histogram by [Job.employment_types][google.cloud.talent.v4beta1.Job.employment_types], for example,
  523. // "FULL_TIME", "PART_TIME".
  524. // * company_size: histogram by [CompanySize][google.cloud.talent.v4beta1.CompanySize], for example, "SMALL",
  525. // "MEDIUM", "BIG".
  526. // * publish_time_in_month: histogram by the [Job.posting_publish_time][google.cloud.talent.v4beta1.Job.posting_publish_time]
  527. // in months.
  528. // Must specify list of numeric buckets in spec.
  529. // * publish_time_in_year: histogram by the [Job.posting_publish_time][google.cloud.talent.v4beta1.Job.posting_publish_time]
  530. // in years.
  531. // Must specify list of numeric buckets in spec.
  532. // * degree_types: histogram by the [Job.degree_types][google.cloud.talent.v4beta1.Job.degree_types], for example,
  533. // "Bachelors", "Masters".
  534. // * job_level: histogram by the [Job.job_level][google.cloud.talent.v4beta1.Job.job_level], for example, "Entry
  535. // Level".
  536. // * country: histogram by the country code of jobs, for example, "US", "FR".
  537. // * admin1: histogram by the admin1 code of jobs, which is a global
  538. // placeholder referring to the state, province, or the particular term a
  539. // country uses to define the geographic structure below the country level,
  540. // for example, "CA", "IL".
  541. // * city: histogram by a combination of the "city name, admin1 code". For
  542. // example, "Mountain View, CA", "New York, NY".
  543. // * admin1_country: histogram by a combination of the "admin1 code, country",
  544. // for example, "CA, US", "IL, US".
  545. // * city_coordinate: histogram by the city center's GPS coordinates (latitude
  546. // and longitude), for example, 37.4038522,-122.0987765. Since the
  547. // coordinates of a city center can change, customers may need to refresh
  548. // them periodically.
  549. // * locale: histogram by the [Job.language_code][google.cloud.talent.v4beta1.Job.language_code], for example, "en-US",
  550. // "fr-FR".
  551. // * language: histogram by the language subtag of the [Job.language_code][google.cloud.talent.v4beta1.Job.language_code],
  552. // for example, "en", "fr".
  553. // * category: histogram by the [JobCategory][google.cloud.talent.v4beta1.JobCategory], for example,
  554. // "COMPUTER_AND_IT", "HEALTHCARE".
  555. // * base_compensation_unit: histogram by the
  556. // [CompensationInfo.CompensationUnit][google.cloud.talent.v4beta1.CompensationInfo.CompensationUnit] of base
  557. // salary, for example, "WEEKLY", "MONTHLY".
  558. // * base_compensation: histogram by the base salary. Must specify list of
  559. // numeric buckets to group results by.
  560. // * annualized_base_compensation: histogram by the base annualized salary.
  561. // Must specify list of numeric buckets to group results by.
  562. // * annualized_total_compensation: histogram by the total annualized salary.
  563. // Must specify list of numeric buckets to group results by.
  564. // * string_custom_attribute: histogram by string [Job.custom_attributes][google.cloud.talent.v4beta1.Job.custom_attributes].
  565. // Values can be accessed via square bracket notations like
  566. // string_custom_attribute["key1"].
  567. // * numeric_custom_attribute: histogram by numeric [Job.custom_attributes][google.cloud.talent.v4beta1.Job.custom_attributes].
  568. // Values can be accessed via square bracket notations like
  569. // numeric_custom_attribute["key1"]. Must specify list of numeric buckets to
  570. // group results by.
  571. //
  572. // Example expressions:
  573. //
  574. // * `count(admin1)`
  575. // * `count(base_compensation, [bucket(1000, 10000), bucket(10000, 100000),
  576. // bucket(100000, MAX)])`
  577. // * `count(string_custom_attribute["some-string-custom-attribute"])`
  578. // * `count(numeric_custom_attribute["some-numeric-custom-attribute"],
  579. // [bucket(MIN, 0, "negative"), bucket(0, MAX, "non-negative"])`
  580. repeated HistogramQuery histogram_queries = 7;
  581. // The desired job attributes returned for jobs in the search response.
  582. // Defaults to [JobView.JOB_VIEW_SMALL][google.cloud.talent.v4beta1.JobView.JOB_VIEW_SMALL] if no value is specified.
  583. JobView job_view = 8;
  584. // An integer that specifies the current offset (that is, starting result
  585. // location, amongst the jobs deemed by the API as relevant) in search
  586. // results. This field is only considered if [page_token][google.cloud.talent.v4beta1.SearchJobsRequest.page_token] is unset.
  587. //
  588. // The maximum allowed value is 5000. Otherwise an error is thrown.
  589. //
  590. // For example, 0 means to return results starting from the first matching
  591. // job, and 10 means to return from the 11th job. This can be used for
  592. // pagination, (for example, pageSize = 10 and offset = 10 means to return
  593. // from the second page).
  594. int32 offset = 9;
  595. // A limit on the number of jobs returned in the search results.
  596. // Increasing this value above the default value of 10 can increase search
  597. // response time. The value can be between 1 and 100.
  598. int32 page_size = 10;
  599. // The token specifying the current offset within
  600. // search results. See [SearchJobsResponse.next_page_token][google.cloud.talent.v4beta1.SearchJobsResponse.next_page_token] for
  601. // an explanation of how to obtain the next set of query results.
  602. string page_token = 11;
  603. // The criteria determining how search results are sorted. Default is
  604. // `"relevance desc"`.
  605. //
  606. // Supported options are:
  607. //
  608. // * `"relevance desc"`: By relevance descending, as determined by the API
  609. // algorithms. Relevance thresholding of query results is only available
  610. // with this ordering.
  611. // * `"posting_publish_time desc"`: By [Job.posting_publish_time][google.cloud.talent.v4beta1.Job.posting_publish_time]
  612. // descending.
  613. // * `"posting_update_time desc"`: By [Job.posting_update_time][google.cloud.talent.v4beta1.Job.posting_update_time]
  614. // descending.
  615. // * `"title"`: By [Job.title][google.cloud.talent.v4beta1.Job.title] ascending.
  616. // * `"title desc"`: By [Job.title][google.cloud.talent.v4beta1.Job.title] descending.
  617. // * `"annualized_base_compensation"`: By job's
  618. // [CompensationInfo.annualized_base_compensation_range][google.cloud.talent.v4beta1.CompensationInfo.annualized_base_compensation_range] ascending. Jobs
  619. // whose annualized base compensation is unspecified are put at the end of
  620. // search results.
  621. // * `"annualized_base_compensation desc"`: By job's
  622. // [CompensationInfo.annualized_base_compensation_range][google.cloud.talent.v4beta1.CompensationInfo.annualized_base_compensation_range] descending. Jobs
  623. // whose annualized base compensation is unspecified are put at the end of
  624. // search results.
  625. // * `"annualized_total_compensation"`: By job's
  626. // [CompensationInfo.annualized_total_compensation_range][google.cloud.talent.v4beta1.CompensationInfo.annualized_total_compensation_range] ascending. Jobs
  627. // whose annualized base compensation is unspecified are put at the end of
  628. // search results.
  629. // * `"annualized_total_compensation desc"`: By job's
  630. // [CompensationInfo.annualized_total_compensation_range][google.cloud.talent.v4beta1.CompensationInfo.annualized_total_compensation_range] descending. Jobs
  631. // whose annualized base compensation is unspecified are put at the end of
  632. // search results.
  633. // * `"custom_ranking desc"`: By the relevance score adjusted to the
  634. // [SearchJobsRequest.CustomRankingInfo.ranking_expression][google.cloud.talent.v4beta1.SearchJobsRequest.CustomRankingInfo.ranking_expression] with weight
  635. // factor assigned by
  636. // [SearchJobsRequest.CustomRankingInfo.importance_level][google.cloud.talent.v4beta1.SearchJobsRequest.CustomRankingInfo.importance_level] in descending
  637. // order.
  638. // * Location sorting: Use the special syntax to order jobs by distance:<br>
  639. // `"distance_from('Hawaii')"`: Order by distance from Hawaii.<br>
  640. // `"distance_from(19.89, 155.5)"`: Order by distance from a coordinate.<br>
  641. // `"distance_from('Hawaii'), distance_from('Puerto Rico')"`: Order by
  642. // multiple locations. See details below.<br>
  643. // `"distance_from('Hawaii'), distance_from(19.89, 155.5)"`: Order by
  644. // multiple locations. See details below.<br>
  645. // The string can have a maximum of 256 characters. When multiple distance
  646. // centers are provided, a job that is close to any of the distance centers
  647. // would have a high rank. When a job has multiple locations, the job
  648. // location closest to one of the distance centers will be used. Jobs that
  649. // don't have locations will be ranked at the bottom. Distance is calculated
  650. // with a precision of 11.3 meters (37.4 feet). Diversification strategy is
  651. // still applied unless explicitly disabled in
  652. // [diversification_level][google.cloud.talent.v4beta1.SearchJobsRequest.diversification_level].
  653. string order_by = 12;
  654. // Controls whether highly similar jobs are returned next to each other in
  655. // the search results. Jobs are identified as highly similar based on
  656. // their titles, job categories, and locations. Highly similar results are
  657. // clustered so that only one representative job of the cluster is
  658. // displayed to the job seeker higher up in the results, with the other jobs
  659. // being displayed lower down in the results.
  660. //
  661. // Defaults to [DiversificationLevel.SIMPLE][google.cloud.talent.v4beta1.SearchJobsRequest.DiversificationLevel.SIMPLE] if no value
  662. // is specified.
  663. DiversificationLevel diversification_level = 13;
  664. // Controls over how job documents get ranked on top of existing relevance
  665. // score (determined by API algorithm).
  666. CustomRankingInfo custom_ranking_info = 14;
  667. // Controls whether to disable exact keyword match on [Job.title][google.cloud.talent.v4beta1.Job.title],
  668. // [Job.description][google.cloud.talent.v4beta1.Job.description], [Job.company_display_name][google.cloud.talent.v4beta1.Job.company_display_name], [Job.addresses][google.cloud.talent.v4beta1.Job.addresses],
  669. // [Job.qualifications][google.cloud.talent.v4beta1.Job.qualifications]. When disable keyword match is turned off, a
  670. // keyword match returns jobs that do not match given category filters when
  671. // there are matching keywords. For example, for the query "program manager,"
  672. // a result is returned even if the job posting has the title "software
  673. // developer," which doesn't fall into "program manager" ontology, but does
  674. // have "program manager" appearing in its description.
  675. //
  676. // For queries like "cloud" that don't contain title or
  677. // location specific ontology, jobs with "cloud" keyword matches are returned
  678. // regardless of this flag's value.
  679. //
  680. // Use [Company.keyword_searchable_job_custom_attributes][google.cloud.talent.v4beta1.Company.keyword_searchable_job_custom_attributes] if
  681. // company-specific globally matched custom field/attribute string values are
  682. // needed. Enabling keyword match improves recall of subsequent search
  683. // requests.
  684. //
  685. // Defaults to false.
  686. bool disable_keyword_match = 16;
  687. }
  688. // Response for SearchJob method.
  689. message SearchJobsResponse {
  690. // Job entry with metadata inside [SearchJobsResponse][google.cloud.talent.v4beta1.SearchJobsResponse].
  691. message MatchingJob {
  692. // Job resource that matches the specified [SearchJobsRequest][google.cloud.talent.v4beta1.SearchJobsRequest].
  693. Job job = 1;
  694. // A summary of the job with core information that's displayed on the search
  695. // results listing page.
  696. string job_summary = 2;
  697. // Contains snippets of text from the [Job.title][google.cloud.talent.v4beta1.Job.title] field most
  698. // closely matching a search query's keywords, if available. The matching
  699. // query keywords are enclosed in HTML bold tags.
  700. string job_title_snippet = 3;
  701. // Contains snippets of text from the [Job.description][google.cloud.talent.v4beta1.Job.description] and similar
  702. // fields that most closely match a search query's keywords, if available.
  703. // All HTML tags in the original fields are stripped when returned in this
  704. // field, and matching query keywords are enclosed in HTML bold tags.
  705. string search_text_snippet = 4;
  706. // Commute information which is generated based on specified
  707. // [CommuteFilter][google.cloud.talent.v4beta1.CommuteFilter].
  708. CommuteInfo commute_info = 5;
  709. }
  710. // Commute details related to this job.
  711. message CommuteInfo {
  712. // Location used as the destination in the commute calculation.
  713. Location job_location = 1;
  714. // The number of seconds required to travel to the job location from the
  715. // query location. A duration of 0 seconds indicates that the job isn't
  716. // reachable within the requested duration, but was returned as part of an
  717. // expanded query.
  718. google.protobuf.Duration travel_duration = 2;
  719. }
  720. // The Job entities that match the specified [SearchJobsRequest][google.cloud.talent.v4beta1.SearchJobsRequest].
  721. repeated MatchingJob matching_jobs = 1;
  722. // The histogram results that match with specified
  723. // [SearchJobsRequest.histogram_queries][google.cloud.talent.v4beta1.SearchJobsRequest.histogram_queries].
  724. repeated HistogramQueryResult histogram_query_results = 2;
  725. // The token that specifies the starting position of the next page of results.
  726. // This field is empty if there are no more results.
  727. string next_page_token = 3;
  728. // The location filters that the service applied to the specified query. If
  729. // any filters are lat-lng based, the [Location.location_type][google.cloud.talent.v4beta1.Location.location_type] is
  730. // [Location.LocationType.LOCATION_TYPE_UNSPECIFIED][google.cloud.talent.v4beta1.Location.LocationType.LOCATION_TYPE_UNSPECIFIED].
  731. repeated Location location_filters = 4;
  732. // An estimation of the number of jobs that match the specified query.
  733. //
  734. // This number isn't guaranteed to be accurate. For accurate results,
  735. // see [SearchJobsRequest.require_precise_result_size][google.cloud.talent.v4beta1.SearchJobsRequest.require_precise_result_size].
  736. int32 estimated_total_size = 5;
  737. // The precise result count, which is available only if the client set
  738. // [SearchJobsRequest.require_precise_result_size][google.cloud.talent.v4beta1.SearchJobsRequest.require_precise_result_size] to `true`, or if the
  739. // response is the last page of results. Otherwise, the value is `-1`.
  740. int32 total_size = 6;
  741. // Additional information for the API invocation, such as the request
  742. // tracking id.
  743. ResponseMetadata metadata = 7;
  744. // If query broadening is enabled, we may append additional results from the
  745. // broadened query. This number indicates how many of the jobs returned in the
  746. // jobs field are from the broadened query. These results are always at the
  747. // end of the jobs list. In particular, a value of 0, or if the field isn't
  748. // set, all the jobs in the jobs list are from the original
  749. // (without broadening) query. If this field is non-zero, subsequent requests
  750. // with offset after this result set should contain all broadened results.
  751. int32 broadened_query_jobs_count = 8;
  752. // The spell checking result, and correction.
  753. SpellingCorrection spell_correction = 9;
  754. }
  755. // Request to create a batch of jobs.
  756. message BatchCreateJobsRequest {
  757. // Required. The resource name of the tenant under which the job is created.
  758. //
  759. // The format is "projects/{project_id}/tenants/{tenant_id}". For example,
  760. // "projects/foo/tenant/bar". If tenant id is unspecified, a default tenant
  761. // is created. For example, "projects/foo".
  762. string parent = 1 [
  763. (google.api.field_behavior) = REQUIRED,
  764. (google.api.resource_reference) = {
  765. child_type: "jobs.googleapis.com/Job"
  766. }
  767. ];
  768. // Required. The jobs to be created.
  769. repeated Job jobs = 2 [(google.api.field_behavior) = REQUIRED];
  770. }
  771. // Request to update a batch of jobs.
  772. message BatchUpdateJobsRequest {
  773. // Required. The resource name of the tenant under which the job is created.
  774. //
  775. // The format is "projects/{project_id}/tenants/{tenant_id}". For example,
  776. // "projects/foo/tenant/bar". If tenant id is unspecified, a default tenant
  777. // is created. For example, "projects/foo".
  778. string parent = 1 [
  779. (google.api.field_behavior) = REQUIRED,
  780. (google.api.resource_reference) = {
  781. child_type: "jobs.googleapis.com/Job"
  782. }
  783. ];
  784. // Required. The jobs to be updated.
  785. repeated Job jobs = 2 [(google.api.field_behavior) = REQUIRED];
  786. // Strongly recommended for the best service experience. Be aware that it will
  787. // also increase latency when checking the status of a batch operation.
  788. //
  789. // If [update_mask][google.cloud.talent.v4beta1.BatchUpdateJobsRequest.update_mask] is provided, only the specified fields in
  790. // [Job][google.cloud.talent.v4beta1.Job] are updated. Otherwise all the fields are updated.
  791. //
  792. // A field mask to restrict the fields that are updated. Only
  793. // top level fields of [Job][google.cloud.talent.v4beta1.Job] are supported.
  794. //
  795. // If [update_mask][google.cloud.talent.v4beta1.BatchUpdateJobsRequest.update_mask] is provided, The [Job][google.cloud.talent.v4beta1.Job] inside
  796. // [JobResult][google.cloud.talent.v4beta1.JobOperationResult.JobResult]
  797. // will only contains fields that is updated, plus the Id of the Job.
  798. // Otherwise, [Job][google.cloud.talent.v4beta1.Job] will include all fields, which can yield a very
  799. // large response.
  800. google.protobuf.FieldMask update_mask = 3;
  801. }
  802. // The result of [JobService.BatchCreateJobs][google.cloud.talent.v4beta1.JobService.BatchCreateJobs] or
  803. // [JobService.BatchUpdateJobs][google.cloud.talent.v4beta1.JobService.BatchUpdateJobs] APIs. It's used to
  804. // replace [google.longrunning.Operation.response][google.longrunning.Operation.response] in case of success.
  805. message JobOperationResult {
  806. // Mutation result of a job.
  807. message JobResult {
  808. // Here [Job][google.cloud.talent.v4beta1.Job] only contains basic information including [name][google.cloud.talent.v4beta1.Job.name],
  809. // [company][google.cloud.talent.v4beta1.Job.company], [language_code][google.cloud.talent.v4beta1.Job.language_code]
  810. // and [requisition_id][google.cloud.talent.v4beta1.Job.requisition_id], use getJob method to retrieve
  811. // detailed information of the created/updated job.
  812. Job job = 1;
  813. // The status of the job processed. This field is populated if the
  814. // processing of the [job][google.cloud.talent.v4beta1.JobOperationResult.JobResult.job] fails.
  815. google.rpc.Status status = 2;
  816. }
  817. // List of job mutation results from a batch mutate operation. It can change
  818. // until operation status is FINISHED, FAILED or CANCELLED.
  819. repeated JobResult job_results = 1;
  820. }