job_service.proto 42 KB

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