Skip to content
This repository has been archived by the owner on Sep 5, 2023. It is now read-only.

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 (#148)

feat: Add new commute methods in Search APIs 

feat: Add new histogram type 'publish_time_in_day' 

feat: Support filtering by requisitionId is ListJobs API

PiperOrigin-RevId: 391131412

Source-Link: googleapis/googleapis@a6c8dc7

Source-Link: googleapis/googleapis-gen@2a2d7da

* 🦉 Updates from OwlBot

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] committed Aug 17, 2021
1 parent 5bdb07b commit 3e72647
Show file tree
Hide file tree
Showing 6 changed files with 57 additions and 16 deletions.
7 changes: 6 additions & 1 deletion google/cloud/talent_v4/services/job_service/async_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -843,11 +843,14 @@ async def list_jobs(
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 =
Expand All @@ -858,6 +861,8 @@ async def list_jobs(
- companyName =
"projects/foo/tenants/bar/companies/baz" AND status =
"EXPIRED"
- requisitionId = "req-1"
- requisitionId = "req-1" AND status = "EXPIRED"
This corresponds to the ``filter`` field
on the ``request`` instance; if ``request`` is provided, this
Expand Down
7 changes: 6 additions & 1 deletion google/cloud/talent_v4/services/job_service/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1041,11 +1041,14 @@ def list_jobs(
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 =
Expand All @@ -1056,6 +1059,8 @@ def list_jobs(
- companyName =
"projects/foo/tenants/bar/companies/baz" AND status =
"EXPIRED"
- requisitionId = "req-1"
- requisitionId = "req-1" AND status = "EXPIRED"
This corresponds to the ``filter`` field
on the ``request`` instance; if ``request`` is provided, this
Expand Down
7 changes: 6 additions & 1 deletion google/cloud/talent_v4/types/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,10 +194,15 @@ class HtmlSanitization(proto.Enum):


class CommuteMethod(proto.Enum):
r"""Method for commute."""
r"""Method for commute. Walking, biking and wheelchair accessible
transit is still in the Preview stage.
"""
COMMUTE_METHOD_UNSPECIFIED = 0
DRIVING = 1
TRANSIT = 2
WALKING = 3
CYCLING = 4
TRANSIT_ACCESSIBLE = 5


class TimestampRange(proto.Message):
Expand Down
27 changes: 17 additions & 10 deletions google/cloud/talent_v4/types/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ class JobQuery(proto.Message):
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
allowed in the expression. The expression must be < 10000
bytes in length.
Sample Query:
Expand Down Expand Up @@ -216,17 +216,24 @@ class LocationFilter(proto.Message):
The address name, such as "Mountain View" or
"Bay Area".
region_code (str):
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".
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.
CLDR region code of the country/region. This field may be
used in two ways:
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.
lat_lng (google.type.latlng_pb2.LatLng):
The latitude and longitude of the geographic center to
Expand Down
11 changes: 11 additions & 0 deletions google/cloud/talent_v4/types/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,17 @@ class Job(proto.Message):
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.
application_info (google.cloud.talent_v4.types.Job.ApplicationInfo):
Job application information.
Expand Down
14 changes: 11 additions & 3 deletions google/cloud/talent_v4/types/job_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,18 +148,23 @@ class ListJobsRequest(proto.Message):
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".
AND status = "EXPIRED"
- requisitionId = "req-1"
- requisitionId = "req-1" AND status = "EXPIRED".
page_token (str):
The starting point of a query result.
page_size (int):
Expand Down Expand Up @@ -287,6 +292,9 @@ class SearchJobsRequest(proto.Message):
- 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 @@ -351,7 +359,7 @@ class SearchJobsRequest(proto.Message):
- ``count(admin1)``
- ``count(base_compensation, [bucket(1000, 10000), bucket(10000, 100000), 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"])``
- ``count(numeric_custom_attribute["some-numeric-custom-attribute"], [bucket(MIN, 0, "negative"), bucket(0, MAX, "non-negative")])``
job_view (google.cloud.talent_v4.types.JobView):
The desired job attributes returned for jobs in the search
response. Defaults to
Expand Down

0 comments on commit 3e72647

Please sign in to comment.