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.v4;
18
19import "google/api/field_behavior.proto";
20import "google/api/resource.proto";
21import "google/cloud/talent/v4/common.proto";
22import "google/protobuf/timestamp.proto";
23
24option go_package = "cloud.google.com/go/talent/apiv4/talentpb;talentpb";
25option java_multiple_files = true;
26option java_outer_classname = "JobProto";
27option java_package = "com.google.cloud.talent.v4";
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.v4.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  };
39
40  // Application related details of a job posting.
41  message ApplicationInfo {
42    // Use this field to specify email address(es) to which resumes or
43    // applications can be sent.
44    //
45    // The maximum number of allowed characters for each entry is 255.
46    repeated string emails = 1;
47
48    // Use this field to provide instructions, such as "Mail your application
49    // to ...", that a candidate can follow to apply for the job.
50    //
51    // This field accepts and sanitizes HTML input, and also accepts
52    // bold, italic, ordered list, and unordered list markup tags.
53    //
54    // The maximum number of allowed characters is 3,000.
55    string instruction = 2;
56
57    // Use this URI field to direct an applicant to a website, for example to
58    // link to an online application form.
59    //
60    // The maximum number of allowed characters for each entry is 2,000.
61    repeated string uris = 3;
62  }
63
64  // Derived details about the job posting.
65  message DerivedInfo {
66    // Structured locations of the job, resolved from
67    // [Job.addresses][google.cloud.talent.v4.Job.addresses].
68    //
69    // [locations][google.cloud.talent.v4.Job.DerivedInfo.locations] are exactly
70    // matched to [Job.addresses][google.cloud.talent.v4.Job.addresses] in the
71    // same order.
72    repeated Location locations = 1;
73
74    // Job categories derived from [Job.title][google.cloud.talent.v4.Job.title]
75    // and [Job.description][google.cloud.talent.v4.Job.description].
76    repeated JobCategory job_categories = 3;
77  }
78
79  // Options for job processing.
80  message ProcessingOptions {
81    // If set to `true`, the service does not attempt to resolve a
82    // more precise address for the job.
83    bool disable_street_address_resolution = 1;
84
85    // Option for job HTML content sanitization. Applied fields are:
86    //
87    // * description
88    // * applicationInfo.instruction
89    // * incentives
90    // * qualifications
91    // * responsibilities
92    //
93    // HTML tags in these fields may be stripped if sanitiazation isn't
94    // disabled.
95    //
96    // Defaults to
97    // [HtmlSanitization.SIMPLE_FORMATTING_ONLY][google.cloud.talent.v4.HtmlSanitization.SIMPLE_FORMATTING_ONLY].
98    HtmlSanitization html_sanitization = 2;
99  }
100
101  // Required during job update.
102  //
103  // The resource name for the job. This is generated by the service when a
104  // job is created.
105  //
106  // The format is
107  // "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". For
108  // example, "projects/foo/tenants/bar/jobs/baz".
109  //
110  // Use of this field in job queries and API calls is preferred over the use of
111  // [requisition_id][google.cloud.talent.v4.Job.requisition_id] since this
112  // value is unique.
113  string name = 1;
114
115  // Required. The resource name of the company listing the job.
116  //
117  // The format is
118  // "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}". For
119  // example, "projects/foo/tenants/bar/companies/baz".
120  string company = 2 [
121    (google.api.field_behavior) = REQUIRED,
122    (google.api.resource_reference) = { type: "jobs.googleapis.com/Company" }
123  ];
124
125  // Required. The requisition ID, also referred to as the posting ID, is
126  // assigned by the client to identify a job. This field is intended to be used
127  // by clients for client identification and tracking of postings. A job isn't
128  // allowed to be created if there is another job with the same
129  // [company][google.cloud.talent.v4.Job.name],
130  // [language_code][google.cloud.talent.v4.Job.language_code] and
131  // [requisition_id][google.cloud.talent.v4.Job.requisition_id].
132  //
133  // The maximum number of allowed characters is 255.
134  string requisition_id = 3 [(google.api.field_behavior) = REQUIRED];
135
136  // Required. The title of the job, such as "Software Engineer"
137  //
138  // The maximum number of allowed characters is 500.
139  string title = 4 [(google.api.field_behavior) = REQUIRED];
140
141  // Required. The description of the job, which typically includes a
142  // multi-paragraph description of the company and related information.
143  // Separate fields are provided on the job object for
144  // [responsibilities][google.cloud.talent.v4.Job.responsibilities],
145  // [qualifications][google.cloud.talent.v4.Job.qualifications], and other job
146  // characteristics. Use of these separate job fields is recommended.
147  //
148  // This field accepts and sanitizes HTML input, and also accepts
149  // bold, italic, ordered list, and unordered list markup tags.
150  //
151  // The maximum number of allowed characters is 100,000.
152  string description = 5 [(google.api.field_behavior) = REQUIRED];
153
154  // Strongly recommended for the best service experience.
155  //
156  // Location(s) where the employer is looking to hire for this job posting.
157  //
158  // Specifying the full street address(es) of the hiring location enables
159  // better API results, especially job searches by commute time.
160  //
161  // At most 50 locations are allowed for best search performance. If a job has
162  // more locations, it is suggested to split it into multiple jobs with unique
163  // [requisition_id][google.cloud.talent.v4.Job.requisition_id]s (e.g. 'ReqA'
164  // becomes 'ReqA-1', 'ReqA-2', and so on.) as multiple jobs with the same
165  // [company][google.cloud.talent.v4.Job.company],
166  // [language_code][google.cloud.talent.v4.Job.language_code] and
167  // [requisition_id][google.cloud.talent.v4.Job.requisition_id] are not
168  // allowed. If the original
169  // [requisition_id][google.cloud.talent.v4.Job.requisition_id] must be
170  // preserved, a custom field should be used for storage. It is also suggested
171  // to group the locations that close to each other in the same job for better
172  // search experience.
173  //
174  // Jobs with multiple addresses must have their addresses with the same
175  // [LocationType][] to allow location filtering to work properly. (For
176  // example, a Job with addresses "1600 Amphitheatre Parkway, Mountain View,
177  // CA, USA" and "London, UK" may not have location filters applied correctly
178  // at search time since the first is a [LocationType.STREET_ADDRESS][] and the
179  // second is a [LocationType.LOCALITY][].) If a job needs to have multiple
180  // addresses, it is suggested to split it into multiple jobs with same
181  // LocationTypes.
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.v4.EmploymentType.FULL_TIME] or
221  // [part time][google.cloud.talent.v4.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.v4.Job.description] is present,
240  // detected language code based on
241  // [Job.description][google.cloud.talent.v4.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.v4.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.v4.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.v4.PostingRegion] (for example,
279  // state, country) throughout which the job is available. If this field is
280  // set, a [LocationFilter][google.cloud.talent.v4.LocationFilter] in a search
281  // query within the job region finds this job posting if an exact location
282  // match isn't specified. If this field is set to
283  // [PostingRegion.NATION][google.cloud.talent.v4.PostingRegion.NATION] or
284  // [PostingRegion.ADMINISTRATIVE_AREA][google.cloud.talent.v4.PostingRegion.ADMINISTRATIVE_AREA],
285  // setting job [Job.addresses][google.cloud.talent.v4.Job.addresses] to the
286  // same location level as this field is strongly recommended.
287  PostingRegion posting_region = 20;
288
289  // Deprecated. The job is only visible to the owner.
290  //
291  // The visibility of the job.
292  //
293  // Defaults to
294  // [Visibility.ACCOUNT_ONLY][google.cloud.talent.v4.Visibility.ACCOUNT_ONLY]
295  // if not specified.
296  Visibility visibility = 21 [deprecated = true];
297
298  // The start timestamp of the job in UTC time zone. Typically this field
299  // is used for contracting engagements. Invalid timestamps are ignored.
300  google.protobuf.Timestamp job_start_time = 22;
301
302  // The end timestamp of the job. Typically this field is used for contracting
303  // engagements. Invalid timestamps are ignored.
304  google.protobuf.Timestamp job_end_time = 23;
305
306  // The timestamp this job posting was most recently published. The default
307  // value is the time the request arrives at the server. Invalid timestamps are
308  // ignored.
309  google.protobuf.Timestamp posting_publish_time = 24;
310
311  // Strongly recommended for the best service experience.
312  //
313  // The expiration timestamp of the job. After this timestamp, the
314  // job is marked as expired, and it no longer appears in search results. The
315  // expired job can't be listed by the
316  // [ListJobs][google.cloud.talent.v4.JobService.ListJobs] API, but it can be
317  // retrieved with the [GetJob][google.cloud.talent.v4.JobService.GetJob] API
318  // or updated with the
319  // [UpdateJob][google.cloud.talent.v4.JobService.UpdateJob] API or deleted
320  // with the [DeleteJob][google.cloud.talent.v4.JobService.DeleteJob] API. An
321  // expired job can be updated and opened again by using a future expiration
322  // timestamp. Updating an expired job fails if there is another existing open
323  // job with same [company][google.cloud.talent.v4.Job.company],
324  // [language_code][google.cloud.talent.v4.Job.language_code] and
325  // [requisition_id][google.cloud.talent.v4.Job.requisition_id].
326  //
327  // The expired jobs are retained in our system for 90 days. However, the
328  // overall expired job count cannot exceed 3 times the maximum number of
329  // open jobs over previous 7 days. If this threshold is exceeded,
330  // expired jobs are cleaned out in order of earliest expire time.
331  // Expired jobs are no longer accessible after they are cleaned
332  // out.
333  //
334  // Invalid timestamps are ignored, and treated as expire time not provided.
335  //
336  // If the timestamp is before the instant request is made, the job
337  // is treated as expired immediately on creation. This kind of job can
338  // not be updated. And when creating a job with past timestamp, the
339  // [posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time]
340  // must be set before
341  // [posting_expire_time][google.cloud.talent.v4.Job.posting_expire_time]. The
342  // purpose of this feature is to allow other objects, such as [Application][],
343  // to refer a job that didn't exist in the system prior to becoming expired.
344  // If you want to modify a job that was expired on creation, delete it and
345  // create a new one.
346  //
347  // If this value isn't provided at the time of job creation or is invalid,
348  // the job posting expires after 30 days from the job's creation time. For
349  // example, if the job was created on 2017/01/01 13:00AM UTC with an
350  // unspecified expiration date, the job expires after 2017/01/31 13:00AM UTC.
351  //
352  // If this value isn't provided on job update, it depends on the field masks
353  // set by
354  // [UpdateJobRequest.update_mask][google.cloud.talent.v4.UpdateJobRequest.update_mask].
355  // If the field masks include
356  // [job_end_time][google.cloud.talent.v4.Job.job_end_time], or the masks are
357  // empty meaning that every field is updated, the job posting expires after 30
358  // days from the job's last update time. Otherwise the expiration date isn't
359  // updated.
360  google.protobuf.Timestamp posting_expire_time = 25;
361
362  // Output only. The timestamp when this job posting was created.
363  google.protobuf.Timestamp posting_create_time = 26
364      [(google.api.field_behavior) = OUTPUT_ONLY];
365
366  // Output only. The timestamp when this job posting was last updated.
367  google.protobuf.Timestamp posting_update_time = 27
368      [(google.api.field_behavior) = OUTPUT_ONLY];
369
370  // Output only. Display name of the company listing the job.
371  string company_display_name = 28 [(google.api.field_behavior) = OUTPUT_ONLY];
372
373  // Output only. Derived details about the job posting.
374  DerivedInfo derived_info = 29 [(google.api.field_behavior) = OUTPUT_ONLY];
375
376  // Options for job processing.
377  ProcessingOptions processing_options = 30;
378}
379