Skip to content

Commit

Permalink
feat: Add new commute methods in Search APIs feat: Add new histogram …
Browse files Browse the repository at this point in the history
…type 'publish_time_in_day' feat: Support filtering by requisitionId is ListJobs API (#356)

- [x] Regenerate this pull request now.

PiperOrigin-RevId: 391131412

Source-Link: googleapis/googleapis@a6c8dc7

Source-Link: googleapis/googleapis-gen@2a2d7da
  • Loading branch information
gcf-owl-bot[bot] committed Aug 17, 2021
1 parent 4ce8922 commit b8c83e0
Show file tree
Hide file tree
Showing 8 changed files with 98 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,8 @@ enum HtmlSanitization {
SIMPLE_FORMATTING_ONLY = 2;
}

// Method for commute.
// Method for commute. Walking, biking and wheelchair accessible transit is
// still in the Preview stage.
enum CommuteMethod {
// Commute method isn't specified.
COMMUTE_METHOD_UNSPECIFIED = 0;
Expand All @@ -415,6 +416,16 @@ enum CommuteMethod {
// Commute time is calculated based on public transit including bus, metro,
// subway, and so on.
TRANSIT = 2;

// Commute time is calculated based on walking time.
WALKING = 3;

// Commute time is calculated based on biking time.
CYCLING = 4;

// Commute time is calculated based on public transit that is wheelchair
// accessible.
TRANSIT_ACCESSIBLE = 5;
}

// A resource that represents a location with full geographic information.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ message JobQuery {
// Boolean expressions (AND/OR/NOT) are supported up to 3 levels of
// nesting (for example, "((A AND B AND C) OR NOT D) AND E"), a maximum of 100
// comparisons or functions are allowed in the expression. The expression
// must be < 6000 bytes in length.
// must be < 10000 bytes in length.
//
// Sample Query:
// `(LOWER(driving_license)="class \"a\"" OR EMPTY(driving_license)) AND
Expand Down Expand Up @@ -196,16 +196,20 @@ message LocationFilter {
// The address name, such as "Mountain View" or "Bay Area".
string address = 1;

// CLDR region code of the country/region of the address. This is used
// to address ambiguity of the user-input location, for example, "Liverpool"
// against "Liverpool, NY, US" or "Liverpool, UK".
// CLDR region code of the country/region. This field may be used in two ways:
//
// Set this field to bias location resolution toward a specific country
// or territory. If this field is not set, application behavior is biased
// toward the United States by default.
// 1) If telecommute preference is not set, this field is used address
// ambiguity of the user-input address. For example, "Liverpool" may refer to
// "Liverpool, NY, US" or "Liverpool, UK". This region code biases the
// address resolution toward a specific country or territory. If this field is
// not set, address resolution is biased toward the United States by default.
//
// 2) If telecommute preference is set to TELECOMMUTE_ALLOWED, the
// telecommute location filter will be limited to the region specified in this
// field. If this field is not set, the telecommute job locations will not be
//
// See
// https://www.unicode.org/cldr/charts/30/supplemental/territory_information.html
// https://unicode-org.github.io/cldr-staging/charts/latest/supplemental/territory_information.html
// for details. Example: "CH" for Switzerland.
string region_code = 2;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,15 @@ message Job {
// suggested to group the locations that close to each other in the same job
// for better search experience.
//
// Jobs with multiple addresses must have their addresses with the same
// [LocationType][] to allow location filtering to work properly. (For
// example, a Job with addresses "1600 Amphitheatre Parkway, Mountain View,
// CA, USA" and "London, UK" may not have location filters applied correctly
// at search time since the first is a [LocationType.STREET_ADDRESS][] and the
// second is a [LocationType.LOCALITY][].) If a job needs to have multiple
// addresses, it is suggested to split it into multiple jobs with same
// LocationTypes.
//
// The maximum number of allowed characters is 500.
repeated string addresses = 6;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,18 +246,23 @@ message ListJobsRequest {
//
// The fields eligible for filtering are:
//
// * `companyName` (Required)
// * `companyName`
// * `requisitionId`
// * `status` Available values: OPEN, EXPIRED, ALL. Defaults to
// OPEN if no value is specified.
//
// At least one of `companyName` and `requisitionId` must present or an
// INVALID_ARGUMENT error is thrown.
//
// Sample Query:
//
// * companyName = "projects/foo/tenants/bar/companies/baz"
// * companyName = "projects/foo/tenants/bar/companies/baz" AND
// requisitionId = "req-1"
// * companyName = "projects/foo/tenants/bar/companies/baz" AND
// status = "EXPIRED"
// * requisitionId = "req-1"
// * requisitionId = "req-1" AND status = "EXPIRED"
string filter = 2 [(google.api.field_behavior) = REQUIRED];

// The starting point of a query result.
Expand Down Expand Up @@ -501,6 +506,9 @@ message SearchJobsRequest {
// "FULL_TIME", "PART_TIME".
// * company_size: histogram by [CompanySize][google.cloud.talent.v4.CompanySize], for example, "SMALL",
// "MEDIUM", "BIG".
// * publish_time_in_day: histogram by the [Job.posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time]
// in days.
// Must specify list of numeric buckets in spec.
// * publish_time_in_month: histogram by the [Job.posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time]
// in months.
// Must specify list of numeric buckets in spec.
Expand Down Expand Up @@ -554,7 +562,7 @@ message SearchJobsRequest {
// bucket(100000, MAX)])`
// * `count(string_custom_attribute["some-string-custom-attribute"])`
// * `count(numeric_custom_attribute["some-numeric-custom-attribute"],
// [bucket(MIN, 0, "negative"), bucket(0, MAX, "non-negative"])`
// [bucket(MIN, 0, "negative"), bucket(0, MAX, "non-negative")])`
repeated HistogramQuery histogram_queries = 7;

// The desired job attributes returned for jobs in the search response.
Expand Down
5 changes: 4 additions & 1 deletion packages/google-cloud-talent/protos/protos.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 21 additions & 0 deletions packages/google-cloud-talent/protos/protos.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion packages/google-cloud-talent/protos/protos.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

31 changes: 26 additions & 5 deletions packages/google-cloud-talent/src/v4/job_service_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -840,6 +840,9 @@ export class JobServiceClient {
* "FULL_TIME", "PART_TIME".
* * company_size: histogram by {@link google.cloud.talent.v4.CompanySize|CompanySize}, for example, "SMALL",
* "MEDIUM", "BIG".
* * publish_time_in_day: histogram by the {@link google.cloud.talent.v4.Job.posting_publish_time|Job.posting_publish_time}
* in days.
* Must specify list of numeric buckets in spec.
* * publish_time_in_month: histogram by the {@link google.cloud.talent.v4.Job.posting_publish_time|Job.posting_publish_time}
* in months.
* Must specify list of numeric buckets in spec.
Expand Down Expand Up @@ -893,7 +896,7 @@ export class JobServiceClient {
* bucket(100000, MAX)])`
* * `count(string_custom_attribute["some-string-custom-attribute"])`
* * `count(numeric_custom_attribute["some-numeric-custom-attribute"],
* [bucket(MIN, 0, "negative"), bucket(0, MAX, "non-negative"])`
* [bucket(MIN, 0, "negative"), bucket(0, MAX, "non-negative")])`
* @param {google.cloud.talent.v4.JobView} request.jobView
* The desired job attributes returned for jobs in the search response.
* Defaults to {@link google.cloud.talent.v4.JobView.JOB_VIEW_SMALL|JobView.JOB_VIEW_SMALL} if no value is specified.
Expand Down Expand Up @@ -1149,6 +1152,9 @@ export class JobServiceClient {
* "FULL_TIME", "PART_TIME".
* * company_size: histogram by {@link google.cloud.talent.v4.CompanySize|CompanySize}, for example, "SMALL",
* "MEDIUM", "BIG".
* * publish_time_in_day: histogram by the {@link google.cloud.talent.v4.Job.posting_publish_time|Job.posting_publish_time}
* in days.
* Must specify list of numeric buckets in spec.
* * publish_time_in_month: histogram by the {@link google.cloud.talent.v4.Job.posting_publish_time|Job.posting_publish_time}
* in months.
* Must specify list of numeric buckets in spec.
Expand Down Expand Up @@ -1202,7 +1208,7 @@ export class JobServiceClient {
* bucket(100000, MAX)])`
* * `count(string_custom_attribute["some-string-custom-attribute"])`
* * `count(numeric_custom_attribute["some-numeric-custom-attribute"],
* [bucket(MIN, 0, "negative"), bucket(0, MAX, "non-negative"])`
* [bucket(MIN, 0, "negative"), bucket(0, MAX, "non-negative")])`
* @param {google.cloud.talent.v4.JobView} request.jobView
* The desired job attributes returned for jobs in the search response.
* Defaults to {@link google.cloud.talent.v4.JobView.JOB_VIEW_SMALL|JobView.JOB_VIEW_SMALL} if no value is specified.
Expand Down Expand Up @@ -1865,18 +1871,23 @@ export class JobServiceClient {
*
* The fields eligible for filtering are:
*
* * `companyName` (Required)
* * `companyName`
* * `requisitionId`
* * `status` Available values: OPEN, EXPIRED, ALL. Defaults to
* OPEN if no value is specified.
*
* At least one of `companyName` and `requisitionId` must present or an
* INVALID_ARGUMENT error is thrown.
*
* Sample Query:
*
* * companyName = "projects/foo/tenants/bar/companies/baz"
* * companyName = "projects/foo/tenants/bar/companies/baz" AND
* requisitionId = "req-1"
* * companyName = "projects/foo/tenants/bar/companies/baz" AND
* status = "EXPIRED"
* * requisitionId = "req-1"
* * requisitionId = "req-1" AND status = "EXPIRED"
* @param {string} request.pageToken
* The starting point of a query result.
* @param {number} request.pageSize
Expand Down Expand Up @@ -1959,18 +1970,23 @@ export class JobServiceClient {
*
* The fields eligible for filtering are:
*
* * `companyName` (Required)
* * `companyName`
* * `requisitionId`
* * `status` Available values: OPEN, EXPIRED, ALL. Defaults to
* OPEN if no value is specified.
*
* At least one of `companyName` and `requisitionId` must present or an
* INVALID_ARGUMENT error is thrown.
*
* Sample Query:
*
* * companyName = "projects/foo/tenants/bar/companies/baz"
* * companyName = "projects/foo/tenants/bar/companies/baz" AND
* requisitionId = "req-1"
* * companyName = "projects/foo/tenants/bar/companies/baz" AND
* status = "EXPIRED"
* * requisitionId = "req-1"
* * requisitionId = "req-1" AND status = "EXPIRED"
* @param {string} request.pageToken
* The starting point of a query result.
* @param {number} request.pageSize
Expand Down Expand Up @@ -2035,18 +2051,23 @@ export class JobServiceClient {
*
* The fields eligible for filtering are:
*
* * `companyName` (Required)
* * `companyName`
* * `requisitionId`
* * `status` Available values: OPEN, EXPIRED, ALL. Defaults to
* OPEN if no value is specified.
*
* At least one of `companyName` and `requisitionId` must present or an
* INVALID_ARGUMENT error is thrown.
*
* Sample Query:
*
* * companyName = "projects/foo/tenants/bar/companies/baz"
* * companyName = "projects/foo/tenants/bar/companies/baz" AND
* requisitionId = "req-1"
* * companyName = "projects/foo/tenants/bar/companies/baz" AND
* status = "EXPIRED"
* * requisitionId = "req-1"
* * requisitionId = "req-1" AND status = "EXPIRED"
* @param {string} request.pageToken
* The starting point of a query result.
* @param {number} request.pageSize
Expand Down

0 comments on commit b8c83e0

Please sign in to comment.