1// Copyright 2023 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
15syntax = "proto3";
16
17package google.cloud.talent.v4beta1;
18
19import "google/api/field_behavior.proto";
20import "google/api/resource.proto";
21import "google/cloud/talent/v4beta1/common.proto";
22import "google/protobuf/timestamp.proto";
23
24option go_package = "cloud.google.com/go/talent/apiv4beta1/talentpb;talentpb";
25option java_multiple_files = true;
26option java_outer_classname = "JobResourceProto";
27option java_package = "com.google.cloud.talent.v4beta1";
28option objc_class_prefix = "CTS";
29
30// A Job resource represents a job posting (also referred to as a "job listing"
31// or "job requisition"). A job belongs to a
32// [Company][google.cloud.talent.v4beta1.Company], which is the hiring entity
33// responsible for the job.
34message Job {
35  option (google.api.resource) = {
36    type: "jobs.googleapis.com/Job"
37    pattern: "projects/{project}/tenants/{tenant}/jobs/{job}"
38    pattern: "projects/{project}/jobs/{job}"
39  };
40
41  // Application related details of a job posting.
42  message ApplicationInfo {
43    // Use this field to specify email address(es) to which resumes or
44    // applications can be sent.
45    //
46    // The maximum number of allowed characters for each entry is 255.
47    repeated string emails = 1;
48
49    // Use this field to provide instructions, such as "Mail your application
50    // to ...", that a candidate can follow to apply for the job.
51    //
52    // This field accepts and sanitizes HTML input, and also accepts
53    // bold, italic, ordered list, and unordered list markup tags.
54    //
55    // The maximum number of allowed characters is 3,000.
56    string instruction = 2;
57
58    // Use this URI field to direct an applicant to a website, for example to
59    // link to an online application form.
60    //
61    // The maximum number of allowed characters for each entry is 2,000.
62    repeated string uris = 3;
63  }
64
65  // Derived details about the job posting.
66  message DerivedInfo {
67    // Structured locations of the job, resolved from
68    // [Job.addresses][google.cloud.talent.v4beta1.Job.addresses].
69    //
70    // [locations][google.cloud.talent.v4beta1.Job.DerivedInfo.locations] are
71    // exactly matched to
72    // [Job.addresses][google.cloud.talent.v4beta1.Job.addresses] in the same
73    // order.
74    repeated Location locations = 1;
75
76    // Job categories derived from
77    // [Job.title][google.cloud.talent.v4beta1.Job.title] and
78    // [Job.description][google.cloud.talent.v4beta1.Job.description].
79    repeated JobCategory job_categories = 3;
80  }
81
82  // Options for job processing.
83  message ProcessingOptions {
84    // If set to `true`, the service does not attempt to resolve a
85    // more precise address for the job.
86    bool disable_street_address_resolution = 1;
87
88    // Option for job HTML content sanitization. Applied fields are:
89    //
90    // * description
91    // * applicationInfo.instruction
92    // * incentives
93    // * qualifications
94    // * responsibilities
95    //
96    // HTML tags in these fields may be stripped if sanitiazation isn't
97    // disabled.
98    //
99    // Defaults to
100    // [HtmlSanitization.SIMPLE_FORMATTING_ONLY][google.cloud.talent.v4beta1.HtmlSanitization.SIMPLE_FORMATTING_ONLY].
101    HtmlSanitization html_sanitization = 2;
102  }
103
104  // Required during job update.
105  //
106  // The resource name for the job. This is generated by the service when a
107  // job is created.
108  //
109  // The format is
110  // "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". For
111  // example, "projects/foo/tenants/bar/jobs/baz".
112  //
113  // If tenant id is unspecified, the default tenant is used. For
114  // example, "projects/foo/jobs/bar".
115  //
116  // Use of this field in job queries and API calls is preferred over the use of
117  // [requisition_id][google.cloud.talent.v4beta1.Job.requisition_id] since this
118  // value is unique.
119  string name = 1;
120
121  // Required. The resource name of the company listing the job.
122  //
123  // The format is
124  // "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}". For
125  // example, "projects/foo/tenants/bar/companies/baz".
126  //
127  // If tenant id is unspecified, the default tenant is used. For
128  // example, "projects/foo/companies/bar".
129  string company = 2 [
130    (google.api.field_behavior) = REQUIRED,
131    (google.api.resource_reference) = { type: "jobs.googleapis.com/Company" }
132  ];
133
134  // Required. The requisition ID, also referred to as the posting ID, is
135  // assigned by the client to identify a job. This field is intended to be used
136  // by clients for client identification and tracking of postings. A job isn't
137  // allowed to be created if there is another job with the same
138  // [company][google.cloud.talent.v4beta1.Job.name],
139  // [language_code][google.cloud.talent.v4beta1.Job.language_code] and
140  // [requisition_id][google.cloud.talent.v4beta1.Job.requisition_id].
141  //
142  // The maximum number of allowed characters is 255.
143  string requisition_id = 3 [(google.api.field_behavior) = REQUIRED];
144
145  // Required. The title of the job, such as "Software Engineer"
146  //
147  // The maximum number of allowed characters is 500.
148  string title = 4 [(google.api.field_behavior) = REQUIRED];
149
150  // Required. The description of the job, which typically includes a
151  // multi-paragraph description of the company and related information.
152  // Separate fields are provided on the job object for
153  // [responsibilities][google.cloud.talent.v4beta1.Job.responsibilities],
154  // [qualifications][google.cloud.talent.v4beta1.Job.qualifications], and other
155  // job characteristics. Use of these separate job fields is recommended.
156  //
157  // This field accepts and sanitizes HTML input, and also accepts
158  // bold, italic, ordered list, and unordered list markup tags.
159  //
160  // The maximum number of allowed characters is 100,000.
161  string description = 5 [(google.api.field_behavior) = REQUIRED];
162
163  // Strongly recommended for the best service experience.
164  //
165  // Location(s) where the employer is looking to hire for this job posting.
166  //
167  // Specifying the full street address(es) of the hiring location enables
168  // better API results, especially job searches by commute time.
169  //
170  // At most 50 locations are allowed for best search performance. If a job has
171  // more locations, it is suggested to split it into multiple jobs with unique
172  // [requisition_id][google.cloud.talent.v4beta1.Job.requisition_id]s (e.g.
173  // 'ReqA' becomes 'ReqA-1', 'ReqA-2', and so on.) as multiple jobs with the
174  // same [company][google.cloud.talent.v4beta1.Job.company],
175  // [language_code][google.cloud.talent.v4beta1.Job.language_code] and
176  // [requisition_id][google.cloud.talent.v4beta1.Job.requisition_id] are not
177  // allowed. If the original
178  // [requisition_id][google.cloud.talent.v4beta1.Job.requisition_id] must be
179  // preserved, a custom field should be used for storage. It is also suggested
180  // to group the locations that close to each other in the same job for better
181  // search experience.
182  //
183  // The maximum number of allowed characters is 500.
184  repeated string addresses = 6;
185
186  // Job application information.
187  ApplicationInfo application_info = 7;
188
189  // The benefits included with the job.
190  repeated JobBenefit job_benefits = 8;
191
192  // Job compensation information (a.k.a. "pay rate") i.e., the compensation
193  // that will paid to the employee.
194  CompensationInfo compensation_info = 9;
195
196  // A map of fields to hold both filterable and non-filterable custom job
197  // attributes that are not covered by the provided structured fields.
198  //
199  // The keys of the map are strings up to 64 bytes and must match the
200  // pattern: `[a-zA-Z][a-zA-Z0-9_]*`. For example, key0LikeThis or
201  // KEY_1_LIKE_THIS.
202  //
203  // At most 100 filterable and at most 100 unfilterable keys are supported.
204  // For filterable `string_values`, across all keys at most 200 values are
205  // allowed, with each string no more than 255 characters. For unfilterable
206  // `string_values`, the maximum total size of `string_values` across all keys
207  // is 50KB.
208  map<string, CustomAttribute> custom_attributes = 10;
209
210  // The desired education degrees for the job, such as Bachelors, Masters.
211  repeated DegreeType degree_types = 11;
212
213  // The department or functional area within the company with the open
214  // position.
215  //
216  // The maximum number of allowed characters is 255.
217  string department = 12;
218
219  // The employment type(s) of a job, for example,
220  // [full time][google.cloud.talent.v4beta1.EmploymentType.FULL_TIME] or
221  // [part time][google.cloud.talent.v4beta1.EmploymentType.PART_TIME].
222  repeated EmploymentType employment_types = 13;
223
224  // A description of bonus, commission, and other compensation
225  // incentives associated with the job not including salary or pay.
226  //
227  // The maximum number of allowed characters is 10,000.
228  string incentives = 14;
229
230  // The language of the posting. This field is distinct from
231  // any requirements for fluency that are associated with the job.
232  //
233  // Language codes must be in BCP-47 format, such as "en-US" or "sr-Latn".
234  // For more information, see
235  // [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47){:
236  // class="external" target="_blank" }.
237  //
238  // If this field is unspecified and
239  // [Job.description][google.cloud.talent.v4beta1.Job.description] is present,
240  // detected language code based on
241  // [Job.description][google.cloud.talent.v4beta1.Job.description] is assigned,
242  // otherwise defaults to 'en_US'.
243  string language_code = 15;
244
245  // The experience level associated with the job, such as "Entry Level".
246  JobLevel job_level = 16;
247
248  // A promotion value of the job, as determined by the client.
249  // The value determines the sort order of the jobs returned when searching for
250  // jobs using the featured jobs search call, with higher promotional values
251  // being returned first and ties being resolved by relevance sort. Only the
252  // jobs with a promotionValue >0 are returned in a FEATURED_JOB_SEARCH.
253  //
254  // Default value is 0, and negative values are treated as 0.
255  int32 promotion_value = 17;
256
257  // A description of the qualifications required to perform the
258  // job. The use of this field is recommended
259  // as an alternative to using the more general
260  // [description][google.cloud.talent.v4beta1.Job.description] field.
261  //
262  // This field accepts and sanitizes HTML input, and also accepts
263  // bold, italic, ordered list, and unordered list markup tags.
264  //
265  // The maximum number of allowed characters is 10,000.
266  string qualifications = 18;
267
268  // A description of job responsibilities. The use of this field is
269  // recommended as an alternative to using the more general
270  // [description][google.cloud.talent.v4beta1.Job.description] field.
271  //
272  // This field accepts and sanitizes HTML input, and also accepts
273  // bold, italic, ordered list, and unordered list markup tags.
274  //
275  // The maximum number of allowed characters is 10,000.
276  string responsibilities = 19;
277
278  // The job [PostingRegion][google.cloud.talent.v4beta1.PostingRegion] (for
279  // example, state, country) throughout which the job is available. If this
280  // field is set, a
281  // [LocationFilter][google.cloud.talent.v4beta1.LocationFilter] in a search
282  // query within the job region finds this job posting if an exact location
283  // match isn't specified. If this field is set to
284  // [PostingRegion.NATION][google.cloud.talent.v4beta1.PostingRegion.NATION] or
285  // [PostingRegion.ADMINISTRATIVE_AREA][google.cloud.talent.v4beta1.PostingRegion.ADMINISTRATIVE_AREA],
286  // setting job [Job.addresses][google.cloud.talent.v4beta1.Job.addresses] to
287  // the same location level as this field is strongly recommended.
288  PostingRegion posting_region = 20;
289
290  // Deprecated. The job is only visible to the owner.
291  //
292  // The visibility of the job.
293  //
294  // Defaults to
295  // [Visibility.ACCOUNT_ONLY][google.cloud.talent.v4beta1.Visibility.ACCOUNT_ONLY]
296  // if not specified.
297  Visibility visibility = 21 [deprecated = true];
298
299  // The start timestamp of the job in UTC time zone. Typically this field
300  // is used for contracting engagements. Invalid timestamps are ignored.
301  google.protobuf.Timestamp job_start_time = 22;
302
303  // The end timestamp of the job. Typically this field is used for contracting
304  // engagements. Invalid timestamps are ignored.
305  google.protobuf.Timestamp job_end_time = 23;
306
307  // The timestamp this job posting was most recently published. The default
308  // value is the time the request arrives at the server. Invalid timestamps are
309  // ignored.
310  google.protobuf.Timestamp posting_publish_time = 24;
311
312  // Strongly recommended for the best service experience.
313  //
314  // The expiration timestamp of the job. After this timestamp, the
315  // job is marked as expired, and it no longer appears in search results. The
316  // expired job can't be listed by the
317  // [ListJobs][google.cloud.talent.v4beta1.JobService.ListJobs] API, but it can
318  // be retrieved with the
319  // [GetJob][google.cloud.talent.v4beta1.JobService.GetJob] API or updated with
320  // the [UpdateJob][google.cloud.talent.v4beta1.JobService.UpdateJob] API or
321  // deleted with the
322  // [DeleteJob][google.cloud.talent.v4beta1.JobService.DeleteJob] API. An
323  // expired job can be updated and opened again by using a future expiration
324  // timestamp. Updating an expired job fails if there is another existing open
325  // job with same [company][google.cloud.talent.v4beta1.Job.company],
326  // [language_code][google.cloud.talent.v4beta1.Job.language_code] and
327  // [requisition_id][google.cloud.talent.v4beta1.Job.requisition_id].
328  //
329  // The expired jobs are retained in our system for 90 days. However, the
330  // overall expired job count cannot exceed 3 times the maximum number of
331  // open jobs over previous 7 days. If this threshold is exceeded,
332  // expired jobs are cleaned out in order of earliest expire time.
333  // Expired jobs are no longer accessible after they are cleaned
334  // out.
335  //
336  // Invalid timestamps are ignored, and treated as expire time not provided.
337  //
338  // If the timestamp is before the instant request is made, the job
339  // is treated as expired immediately on creation. This kind of job can
340  // not be updated. And when creating a job with past timestamp, the
341  // [posting_publish_time][google.cloud.talent.v4beta1.Job.posting_publish_time]
342  // must be set before
343  // [posting_expire_time][google.cloud.talent.v4beta1.Job.posting_expire_time].
344  // The purpose of this feature is to allow other objects, such as
345  // [Application][google.cloud.talent.v4beta1.Application], to refer a job that
346  // didn't exist in the system prior to becoming expired. If you want to modify
347  // a job that was expired on creation, delete it and create a new one.
348  //
349  // If this value isn't provided at the time of job creation or is invalid,
350  // the job posting expires after 30 days from the job's creation time. For
351  // example, if the job was created on 2017/01/01 13:00AM UTC with an
352  // unspecified expiration date, the job expires after 2017/01/31 13:00AM UTC.
353  //
354  // If this value isn't provided on job update, it depends on the field masks
355  // set by
356  // [UpdateJobRequest.update_mask][google.cloud.talent.v4beta1.UpdateJobRequest.update_mask].
357  // If the field masks include
358  // [job_end_time][google.cloud.talent.v4beta1.Job.job_end_time], or the masks
359  // are empty meaning that every field is updated, the job posting expires
360  // after 30 days from the job's last update time. Otherwise the expiration
361  // date isn't updated.
362  google.protobuf.Timestamp posting_expire_time = 25;
363
364  // Output only. The timestamp when this job posting was created.
365  google.protobuf.Timestamp posting_create_time = 26
366      [(google.api.field_behavior) = OUTPUT_ONLY];
367
368  // Output only. The timestamp when this job posting was last updated.
369  google.protobuf.Timestamp posting_update_time = 27
370      [(google.api.field_behavior) = OUTPUT_ONLY];
371
372  // Output only. Display name of the company listing the job.
373  string company_display_name = 28 [(google.api.field_behavior) = OUTPUT_ONLY];
374
375  // Output only. Derived details about the job posting.
376  DerivedInfo derived_info = 29 [(google.api.field_behavior) = OUTPUT_ONLY];
377
378  // Options for job processing.
379  ProcessingOptions processing_options = 30;
380}
381