job_service.proto 43 KB

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