job_service.proto 38 KB

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