1 // Copyright 2019 Google LLC.
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
7 // http://www.apache.org/licenses/LICENSE-2.0
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.
18 package google.cloud.talent.v4beta1;
20 import "google/api/annotations.proto";
21 import "google/cloud/talent/v4beta1/common.proto";
22 import "google/cloud/talent/v4beta1/job.proto";
23 import "google/cloud/talent/v4beta1/profile.proto";
24 import "google/protobuf/duration.proto";
25 import "google/protobuf/timestamp.proto";
26 import "google/protobuf/wrappers.proto";
27 import "google/type/date.proto";
28 import "google/type/latlng.proto";
29 import "google/type/timeofday.proto";
31 option go_package = "google.golang.org/genproto/googleapis/cloud/talent/v4beta1;talent";
32 option java_multiple_files = true;
33 option java_outer_classname = "FiltersProto";
34 option java_package = "com.google.cloud.talent.v4beta1";
35 option objc_class_prefix = "CTS";
39 // The query required to perform a search query.
43 // The query string that matches against the job title, description, and
46 // The maximum number of allowed characters is 255.
51 // This filter specifies the company entities to search against.
53 // If a value isn't specified, jobs are searched for against all
56 // If multiple values are specified, jobs are searched against the
57 // companies specified.
59 // The format is "projects/{project_id}/companies/{company_id}", for example,
60 // "projects/api-test-project/companies/foo".
62 // At most 20 company filters are allowed.
63 repeated string company_names = 2;
67 // The location filter specifies geo-regions containing the jobs to
68 // search against. See
69 // [LocationFilter][google.cloud.talent.v4beta1.LocationFilter] for more
72 // If a location value isn't specified, jobs fitting the other search
73 // criteria are retrieved regardless of where they're located.
75 // If multiple values are specified, jobs are retrieved from any of the
76 // specified locations. If different values are specified for the
77 // [LocationFilter.distance_in_miles][google.cloud.talent.v4beta1.LocationFilter.distance_in_miles]
78 // parameter, the maximum provided distance is used for all locations.
80 // At most 5 location filters are allowed.
81 repeated LocationFilter location_filters = 3;
85 // The category filter specifies the categories of jobs to search against.
86 // See [Category][] for more information.
88 // If a value isn't specified, jobs from any category are searched against.
90 // If multiple values are specified, jobs from any of the specified
91 // categories are searched against.
92 repeated JobCategory job_categories = 4;
96 // Allows filtering jobs by commute time with different travel methods (for
97 // example, driving or public transit). Note: This only works with [COMMUTE
98 // MODE][Mode#COMMUTE]. When specified, [JobQuery.location_filters] is
101 // Currently we don't support sorting by commute time.
102 CommuteFilter commute_filter = 5;
106 // This filter specifies the exact [company display
107 // name][Company.display_name] of the jobs to search against.
109 // If a value isn't specified, jobs within the search results are
110 // associated with any company.
112 // If multiple values are specified, jobs within the search results may be
113 // associated with any of the specified companies.
115 // At most 20 company display name filters are allowed.
116 repeated string company_display_names = 6;
120 // This search filter is applied only to
121 // [Job.compensation_info][google.cloud.talent.v4beta1.Job.compensation_info].
122 // For example, if the filter is specified as "Hourly job with per-hour
123 // compensation > $15", only jobs meeting these criteria are searched. If a
124 // filter isn't defined, all open jobs are searched.
125 CompensationFilter compensation_filter = 7;
129 // This filter specifies a structured syntax to match against the
130 // [Job.custom_attributes][google.cloud.talent.v4beta1.Job.custom_attributes]
131 // marked as `filterable`.
133 // The syntax for this expression is a subset of SQL syntax.
135 // Supported operators are: `=`, `!=`, `<`, `<=`, `>`, and `>=` where the
136 // left of the operator is a custom field key and the right of the operator
137 // is a number or a quoted string. You must escape backslash (\\) and
138 // quote (\") characters.
140 // Supported functions are `LOWER([field_name])` to
141 // perform a case insensitive match and `EMPTY([field_name])` to filter on the
142 // existence of a key.
144 // Boolean expressions (AND/OR/NOT) are supported up to 3 levels of
145 // nesting (for example, "((A AND B AND C) OR NOT D) AND E"), a maximum of 100
146 // comparisons or functions are allowed in the expression. The expression
147 // must be < 3000 bytes in length.
150 // `(LOWER(driving_license)="class \"a\"" OR EMPTY(driving_license)) AND
151 // driving_years > 10`
152 string custom_attribute_filter = 8;
156 // This flag controls the spell-check feature. If false, the
157 // service attempts to correct a misspelled query,
158 // for example, "enginee" is corrected to "engineer".
160 // Defaults to false: a spell check is performed.
161 bool disable_spell_check = 9;
165 // The employment type filter specifies the employment type of jobs to
166 // search against, such as
167 // [EmploymentType.FULL_TIME][google.cloud.talent.v4beta1.EmploymentType.FULL_TIME].
169 // If a value isn't specified, jobs in the search results includes any
172 // If multiple values are specified, jobs in the search results include
173 // any of the specified employment types.
174 repeated EmploymentType employment_types = 10;
178 // This filter specifies the locale of jobs to search against,
179 // for example, "en-US".
181 // If a value isn't specified, the search results can contain jobs in any
185 // Language codes should be in BCP-47 format, such as "en-US" or "sr-Latn".
186 // For more information, see
187 // [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47).
189 // At most 10 language code filters are allowed.
190 repeated string language_codes = 11;
194 // Jobs published within a range specified by this filter are searched
196 TimestampRange publish_time_range = 12;
200 // This filter specifies a list of job names to be excluded during search.
202 // At most 200 excluded job names are allowed.
203 repeated string excluded_jobs = 13;
206 // Filters to apply when performing the search query.
207 message ProfileQuery {
210 // Keywords to match any text fields of profiles.
212 // For example, "software engineer in Palo Alto".
217 // The location filter specifies geo-regions containing the profiles to
220 // If a location filter isn't specified, profiles fitting the other search
221 // criteria are retrieved regardless of where they're located.
224 // [LocationFilter.negated][google.cloud.talent.v4beta1.LocationFilter.negated]
225 // is specified, the result doesn't contain profiles from that location.
227 // For example, search for profiles with addresses in "New York City".
228 repeated LocationFilter location_filters = 2;
232 // Job title filter specifies job titles of profiles to match on.
234 // If a job title isn't specified, profiles with any titles are retrieved.
236 // If multiple values are specified, profiles are retrieved with any of the
237 // specified job titles.
240 // [JobTitleFilter.negated][google.cloud.talent.v4beta1.JobTitleFilter.negated]
241 // is specified, the result won't contain profiles with the job titles.
243 // For example, search for profiles with a job title "Product Manager".
244 repeated JobTitleFilter job_title_filters = 3;
248 // Employer filter specifies employers of profiles to match on.
250 // If an employer filter isn't specified, profiles with any employers are
253 // If multiple employer filters are specified, profiles with any matching
254 // employers are retrieved.
257 // [EmployerFilter.negated][google.cloud.talent.v4beta1.EmployerFilter.negated]
258 // is specified, the result won't contain profiles that match the employers.
260 // For example, search for profiles that have working experience at "Google
262 repeated EmployerFilter employer_filters = 4;
266 // Education filter specifies education of profiles to match on.
268 // If an education filter isn't specified, profiles with any education are
271 // If multiple education filters are specified, profiles that match any
272 // education filters are retrieved.
275 // [EducationFilter.negated][google.cloud.talent.v4beta1.EducationFilter.negated]
276 // is specified, the result won't contain profiles that match the educations.
278 // For example, search for profiles with a master degree.
279 repeated EducationFilter education_filters = 5;
283 // Skill filter specifies skill of profiles to match on.
285 // If a skill filter isn't specified, profiles with any skills are retrieved.
287 // If multiple skill filters are specified, profiles that match any skill
288 // filters are retrieved.
290 // If [SkillFilter.negated][google.cloud.talent.v4beta1.SkillFilter.negated]
291 // is specified, the result won't contain profiles that match the skills.
293 // For example, search for profiles that have "Java" and "Python" in skill
295 repeated SkillFilter skill_filters = 6;
299 // Work experience filter specifies the total working experience of profiles
302 // If a work experience filter isn't specified, profiles with any
303 // professional experience are retrieved.
305 // If multiple work experience filters are specified, profiles that match any
306 // work experience filters are retrieved.
308 // For example, search for profiles with 10 years of work experience.
309 repeated WorkExperienceFilter work_experience_filter = 7;
313 // Time filter specifies the create/update timestamp of the profiles to match
316 // For example, search for profiles created since "2018-1-1".
317 repeated TimeFilter time_filters = 8;
321 // The hirable filter specifies the profile's hirable status to match on.
322 google.protobuf.BoolValue hirable_filter = 9;
326 // The application date filters specify application date ranges to match on.
327 repeated ApplicationDateFilter application_date_filters = 10;
331 // The application outcome reason filters specify the reasons for outcome of
332 // the job application.
333 repeated ApplicationOutcomeReasonFilter application_outcome_reason_filters =
338 // The application last stage filters specify the last stage of job
340 repeated ApplicationLastStageFilter application_last_stage_filters = 12;
344 // The application job filters specify the job applied for in the application.
345 repeated ApplicationJobFilter application_job_filters = 13;
349 // The application status filters specify the status of job application.
350 repeated ApplicationStatusFilter application_status_filters = 14;
354 // This filter specifies a structured syntax to match against the
355 // [Profile.custom_attributes][google.cloud.talent.v4beta1.Profile.custom_attributes]
356 // that are marked as `filterable`.
358 // The syntax for this expression is a subset of Google SQL syntax.
360 // Supported operators are: =, != where the left of the operator is a custom
361 // field key and the right of the operator is a string (surrounded by quotes)
364 // Supported functions are LOWER(<field_name>) to
365 // perform case insensitive match and EMPTY(<field_name>) to filter on the
366 // existence of a key.
368 // Boolean expressions (AND/OR/NOT) are supported up to 3 levels of
369 // nesting (for example "((A AND B AND C) OR NOT D) AND E"), and there can be
370 // a maximum of 50 comparisons/functions in the expression. The expression
371 // must be < 2000 characters in length.
374 // (key1 = "TEST" OR LOWER(key1)="test" OR NOT EMPTY(key1))
375 string custom_field_filter = 15;
380 // Geographic region of the search.
381 message LocationFilter {
382 // Specify whether including telecommute jobs.
383 enum TelecommutePreference {
384 // Default value if the telecommute preference isn't specified.
385 TELECOMMUTE_PREFERENCE_UNSPECIFIED = 0;
387 // Exclude telecommute jobs.
388 TELECOMMUTE_EXCLUDED = 1;
390 // Allow telecommute jobs.
391 TELECOMMUTE_ALLOWED = 2;
396 // The address name, such as "Mountain View" or "Bay Area".
401 // CLDR region code of the country/region of the address. This is used
402 // to address ambiguity of the user-input location, for example, "Liverpool"
403 // against "Liverpool, NY, US" or "Liverpool, UK".
405 // Set this field if all the jobs to search against are from a same region,
406 // or jobs are world-wide, but the job seeker is from a specific region.
408 // See http://cldr.unicode.org/ and
409 // http://www.unicode.org/cldr/charts/30/supplemental/territory_information.html
410 // for details. Example: "CH" for Switzerland.
411 string region_code = 2;
415 // The latitude and longitude of the geographic center from which to
416 // search. This field's ignored if `address` is provided.
417 google.type.LatLng lat_lng = 3;
422 // The distance_in_miles is applied when the location being searched for is
423 // identified as a city or smaller. When the location being searched for is a
424 // state or larger, this field is ignored.
425 double distance_in_miles = 4;
429 // Allows the client to return jobs without a
430 // set location, specifically, telecommuting jobs (telecomuting is considered
431 // by the service as a special location.
432 // [Job.posting_region][google.cloud.talent.v4beta1.Job.posting_region]
433 // indicates if a job permits telecommuting. If this field is set to
434 // [TelecommutePreference.TELECOMMUTE_ALLOWED][google.cloud.talent.v4beta1.LocationFilter.TelecommutePreference.TELECOMMUTE_ALLOWED],
435 // telecommuting jobs are searched, and
436 // [address][google.cloud.talent.v4beta1.LocationFilter.address] and
437 // [lat_lng][google.cloud.talent.v4beta1.LocationFilter.lat_lng] are ignored.
438 // If not set or set to
439 // [TelecommutePreference.TELECOMMUTE_EXCLUDED][google.cloud.talent.v4beta1.LocationFilter.TelecommutePreference.TELECOMMUTE_EXCLUDED],
440 // telecommute job are not searched.
442 // This filter can be used by itself to search exclusively for telecommuting
443 // jobs, or it can be combined with another location
444 // filter to search for a combination of job locations,
445 // such as "Mountain View" or "telecommuting" jobs. However, when used in
446 // combination with other location filters, telecommuting jobs can be
447 // treated as less relevant than other jobs in the search response.
448 TelecommutePreference telecommute_preference = 5;
452 // Whether to apply negation to the filter so profiles matching the filter
455 // Currently only supported in profile search.
461 // Filter on job compensation type and amount.
462 message CompensationFilter {
463 // Specify the type of filtering.
465 // Filter type unspecified. Position holder, INVALID, should never be used.
466 FILTER_TYPE_UNSPECIFIED = 0;
468 // Filter by `base compensation entry's` unit. A job is a match if and
469 // only if the job contains a base CompensationEntry and the base
470 // CompensationEntry's unit matches provided
471 // [units][google.cloud.talent.v4beta1.CompensationFilter.units]. Populate
473 // [units][google.cloud.talent.v4beta1.CompensationFilter.units].
476 // [CompensationInfo.CompensationEntry][google.cloud.talent.v4beta1.CompensationInfo.CompensationEntry]
477 // for definition of base compensation entry.
480 // Filter by `base compensation entry's` unit and amount / range. A job
481 // is a match if and only if the job contains a base CompensationEntry, and
482 // the base entry's unit matches provided [compensation_units][] and amount
483 // or range overlaps with provided [compensation_range][].
486 // [CompensationInfo.CompensationEntry][google.cloud.talent.v4beta1.CompensationInfo.CompensationEntry]
487 // for definition of base compensation entry.
490 // [units][google.cloud.talent.v4beta1.CompensationFilter.units] and
491 // populate [range][google.cloud.talent.v4beta1.CompensationFilter.range].
494 // Filter by annualized base compensation amount and `base compensation
495 // entry's` unit. Populate
496 // [range][google.cloud.talent.v4beta1.CompensationFilter.range] and zero or
497 // more [units][google.cloud.talent.v4beta1.CompensationFilter.units].
498 ANNUALIZED_BASE_AMOUNT = 3;
500 // Filter by annualized total compensation amount and `base compensation
501 // entry's` unit . Populate
502 // [range][google.cloud.talent.v4beta1.CompensationFilter.range] and zero or
503 // more [units][google.cloud.talent.v4beta1.CompensationFilter.units].
504 ANNUALIZED_TOTAL_AMOUNT = 4;
514 // Specify desired `base compensation entry's`
515 // [CompensationInfo.CompensationUnit][google.cloud.talent.v4beta1.CompensationInfo.CompensationUnit].
516 repeated CompensationInfo.CompensationUnit units = 2;
520 // Compensation range.
521 CompensationInfo.CompensationRange range = 3;
525 // Whether to include jobs whose compensation range is unspecified.
526 bool include_jobs_with_unspecified_compensation_range = 4;
531 // Parameters needed for commute search.
532 message CommuteFilter {
533 // The traffic density to use when calculating commute time.
535 // Road traffic situation isn't specified.
536 ROAD_TRAFFIC_UNSPECIFIED = 0;
538 // Optimal commute time without considering any traffic impact.
541 // Commute time calculation takes in account the peak traffic impact.
547 // The method of transportation for which to calculate the commute time.
548 CommuteMethod commute_method = 1;
552 // The latitude and longitude of the location from which to calculate the
554 google.type.LatLng start_coordinates = 2;
558 // The maximum travel time in seconds. The maximum allowed value is `3600s`
559 // (one hour). Format is `123s`.
560 google.protobuf.Duration travel_duration = 3;
563 // If `true`, jobs without street level addresses may also be returned.
564 // For city level addresses, the city center is used. For state and coarser
565 // level addresses, text matching is used.
566 // If this field is set to `false` or isn't specified, only jobs that include
567 // street level addresses will be returned by commute search.
568 bool allow_imprecise_addresses = 4;
572 // Traffic factor to take into account while searching by commute.
573 oneof traffic_option {
576 // Specifies the traffic density to use when calculating commute time.
577 RoadTraffic road_traffic = 5;
581 // The departure time used to calculate traffic impact, represented as
582 // [google.type.TimeOfDay][google.type.TimeOfDay] in local time zone.
584 // Currently traffic model is restricted to hour level resolution.
585 google.type.TimeOfDay departure_time = 6;
591 // Job title of the search.
592 message JobTitleFilter {
595 // The job title, for example, "Software engineer", or "Product manager".
596 string job_title = 1;
600 // Whether to apply negation to the filter so profiles matching the filter
607 // Skill filter of the search.
608 message SkillFilter {
611 // The skill name. For example, "java", "j2ee", etc.
616 // Whether to apply negation to the filter so profiles matching the filter
623 // Employer filter of the search.
624 message EmployerFilter {
625 // Enum indicating which set of
626 // [Profile.employment_records][google.cloud.talent.v4beta1.Profile.employment_records]
627 // to search against.
628 enum EmployerFilterMode {
630 EMPLOYER_FILTER_MODE_UNSPECIFIED = 0;
632 // Apply to all employers in
633 // [Profile.employment_records][google.cloud.talent.v4beta1.Profile.employment_records].
634 ALL_EMPLOYMENT_RECORDS = 1;
636 // Apply only to current employer in
637 // [Profile.employment_records][google.cloud.talent.v4beta1.Profile.employment_records].
638 CURRENT_EMPLOYMENT_RECORDS_ONLY = 2;
640 // Apply only to past (not current) employers in
641 // [Profile.employment_records][google.cloud.talent.v4beta1.Profile.employment_records].
642 PAST_EMPLOYMENT_RECORDS_ONLY = 3;
647 // The name of the employer, for example "Google", "Alphabet".
653 // [EmploymentRecord][google.cloud.talent.v4beta1.EmploymentRecord]s to search
657 // [EmployerFilterMode.ALL_EMPLOYMENT_RECORDS][google.cloud.talent.v4beta1.EmployerFilter.EmployerFilterMode.ALL_EMPLOYMENT_RECORDS].
658 EmployerFilterMode mode = 2;
662 // Whether to apply negation to the filter so profiles matching the filter
669 // Education filter of the search.
670 message EducationFilter {
673 // The school name. For example "MIT", "University of California, Berkeley".
678 // The field of study. This is to search against value provided in
679 // [Degree.fields_of_study][google.cloud.talent.v4beta1.Degree.fields_of_study].
680 // For example "Computer Science", "Mathematics".
681 string field_of_study = 2;
685 // Education degree in ISCED code. Each value in degree covers a specific
686 // level of education, without any expansion to upper nor lower levels of
688 DegreeType degree_type = 3;
692 // Whether to apply negation to the filter so profiles matching the filter
699 // Work experience filter.
701 // This filter is used to search for profiles with working experience length
703 // [min_experience][google.cloud.talent.v4beta1.WorkExperienceFilter.min_experience]
705 // [max_experience][google.cloud.talent.v4beta1.WorkExperienceFilter.max_experience].
706 message WorkExperienceFilter {
709 // The minimum duration of the work experience (inclusive).
710 google.protobuf.Duration min_experience = 1;
714 // The maximum duration of the work experience (exclusive).
715 google.protobuf.Duration max_experience = 2;
720 // Application Date Range Filter.
722 // The API matches profiles with
723 // [JobApplication.application_date][google.cloud.talent.v4beta1.JobApplication.application_date]
724 // between start date and end date (both boundaries are inclusive). The filter
725 // is ignored if both
726 // [start_date][google.cloud.talent.v4beta1.ApplicationDateFilter.start_date]
727 // and [end_date][google.cloud.talent.v4beta1.ApplicationDateFilter.end_date]
729 message ApplicationDateFilter {
732 // Start date. If it's missing, The API matches profiles with application date
733 // not after the end date.
734 google.type.Date start_date = 1;
738 // End date. If it's missing, The API matches profiles with application date
739 // not before the start date.
740 google.type.Date end_date = 2;
745 // Outcome Reason Filter.
746 message ApplicationOutcomeReasonFilter {
749 // User entered or selected outcome reason. The API does an exact match on the
750 // [JobApplication.outcome_reason][google.cloud.talent.v4beta1.JobApplication.outcome_reason]
752 string outcome_reason = 1;
756 // If true, The API excludes all candidates with any
757 // [JobApplication.outcome_reason][google.cloud.talent.v4beta1.JobApplication.outcome_reason]
758 // matching the outcome reason specified in the filter.
764 // Filter on Last Stage of Application.
765 message ApplicationLastStageFilter {
768 // User entered or selected last stage the candidate reached in the
769 // application. The API does an exact match on the
770 // [JobApplication.last_stage][google.cloud.talent.v4beta1.JobApplication.last_stage]
772 string last_stage = 1;
775 // If true, The API excludes all candidates with any
776 // [JobApplication.last_stage][google.cloud.talent.v4beta1.JobApplication.last_stage]
777 // matching the last stage specified in the filter.
783 // Filter on the job information of Application.
784 message ApplicationJobFilter {
787 // The job resource name in the application. The API does an exact match on
788 // the [Job.name][google.cloud.talent.v4beta1.Job.name] of
789 // [JobApplication.job][google.cloud.talent.v4beta1.JobApplication.job] in
795 // The job requisition id in the application. The API does an exact match on
796 // the [Job.requisistion_id][] of
797 // [JobApplication.job][google.cloud.talent.v4beta1.JobApplication.job] in
799 string job_requisition_id = 2;
803 // The job title in the application. The API does an exact match on the
804 // [Job.title][google.cloud.talent.v4beta1.Job.title] of
805 // [JobApplication.job][google.cloud.talent.v4beta1.JobApplication.job] in
807 string job_title = 3;
811 // If true, the API excludes all profiles with any
812 // [JobApplication.job][google.cloud.talent.v4beta1.JobApplication.job]
813 // matching the filters.
819 // Filter on status of Application.
820 message ApplicationStatusFilter {
823 // User entered or selected application status. The API does an exact match
824 // between the application status specified in this filter and the
825 // [JobApplication.status][] in profiles.
826 JobApplication.ApplicationStatus application_status = 1;
830 // If true, The API excludes all candidates with any [JobApplication.status][]
831 // matching the status specified in the filter.
837 // Filter on create timestamp or update timestamp of profiles.
839 // Time fields can be used in TimeFilter.
842 TIME_FIELD_UNSPECIFIED = 0;
844 // Earliest profile create time.
847 // Latest profile update time.
853 // Start timestamp, matching profiles with the start time. If this field
854 // missing, The API matches profiles with create / update timestamp before the
856 google.protobuf.Timestamp start_time = 1;
860 // End timestamp, matching profiles with the end time. If this field
861 // missing, The API matches profiles with create / update timestamp after the
863 google.protobuf.Timestamp end_time = 2;
867 // Specifies which time field to filter profiles.
870 // [TimeField.CREATE_TIME][google.cloud.talent.v4beta1.TimeFilter.TimeField.CREATE_TIME].
871 TimeField time_field = 3;