Skip to content

Commit

Permalink
feat: [google-cloud-talent] A new enum RelevanceThreshold is added (#…
Browse files Browse the repository at this point in the history
…13400)

- [ ] Regenerate this pull request now.

BEGIN_COMMIT_OVERRIDE
feat(v4): A new enum `RelevanceThreshold` is added
feat(v4): A new field `relevance_threshold` is added to message
`.google.cloud.talent.v4.SearchJobsRequest`
docs(v4): multiple fixes for links in documentation
END_COMMIT_OVERRIDE



PiperOrigin-RevId: 711534942

Source-Link:
googleapis/googleapis@c72d738

Source-Link:
googleapis/googleapis-gen@19d73c3
Copy-Tag:
eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXRhbGVudC8uT3dsQm90LnlhbWwiLCJoIjoiMTlkNzNjMzgxZjg3N2FhODYwNjRiYTNmOWI2NGEyNmRjM2EzMGNhYyJ9

---------

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] authored Jan 3, 2025
1 parent d2a6625 commit d0fee2c
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ class LocationFilter(proto.Message):
[Job.addresses][google.cloud.talent.v4.Job.addresses] may
still be matched based on other location filters using
[address][google.cloud.talent.v4.LocationFilter.address] or
[latlng][].
[lat_lng][google.cloud.talent.v4.LocationFilter.lat_lng].
This filter can be used by itself to search exclusively for
telecommuting jobs, or it can be combined with another
Expand Down
30 changes: 17 additions & 13 deletions packages/google-cloud-talent/google/cloud/talent_v4/types/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,15 +116,18 @@ class Job(proto.Message):
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 same
[LocationType][google.cloud.talent.v4.Location.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][google.cloud.talent.v4.Location.LocationType.STREET_ADDRESS]
and the second is a
[LocationType.LOCALITY][google.cloud.talent.v4.Location.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):
Expand Down Expand Up @@ -293,10 +296,11 @@ class Job(proto.Message):
must be set before
[posting_expire_time][google.cloud.talent.v4.Job.posting_expire_time].
The purpose of this feature is to allow other objects, such
as [Application][], to refer a job that didn't exist in the
system prior to becoming expired. If you want to modify a
job that was expired on creation, delete it and create a new
one.
as
[ApplicationInfo][google.cloud.talent.v4.Job.ApplicationInfo],
to refer a job that didn't exist in the system prior to
becoming expired. If you want to modify a job that was
expired on creation, delete it and create a new one.
If this value isn't provided at the time of job creation or
is invalid, the job posting expires after 30 days from the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -600,6 +600,13 @@ class SearchJobsRequest(proto.Message):
Defaults to
[KeywordMatchMode.KEYWORD_MATCH_ALL][google.cloud.talent.v4.SearchJobsRequest.KeywordMatchMode.KEYWORD_MATCH_ALL]
if no value is specified.
relevance_threshold (google.cloud.talent_v4.types.SearchJobsRequest.RelevanceThreshold):
Optional. The relevance threshold of the
search results.
Default to Google defined threshold, leveraging
a balance of precision and recall to deliver
both highly accurate results and comprehensive
coverage of relevant information.
"""

class SearchMode(proto.Enum):
Expand Down Expand Up @@ -730,6 +737,30 @@ class KeywordMatchMode(proto.Enum):
KEYWORD_MATCH_ALL = 2
KEYWORD_MATCH_TITLE_ONLY = 3

class RelevanceThreshold(proto.Enum):
r"""The relevance threshold of the search results. The higher
relevance threshold is, the higher relevant results are shown
and the less number of results are returned.
Values:
RELEVANCE_THRESHOLD_UNSPECIFIED (0):
Default value. In this case, server behavior
defaults to Google defined threshold.
LOWEST (1):
Lowest relevance threshold.
LOW (2):
Low relevance threshold.
MEDIUM (3):
Medium relevance threshold.
HIGH (4):
High relevance threshold.
"""
RELEVANCE_THRESHOLD_UNSPECIFIED = 0
LOWEST = 1
LOW = 2
MEDIUM = 3
HIGH = 4

class CustomRankingInfo(proto.Message):
r"""Custom ranking information for
[SearchJobsRequest][google.cloud.talent.v4.SearchJobsRequest].
Expand Down Expand Up @@ -896,6 +927,11 @@ class ImportanceLevel(proto.Enum):
number=18,
enum=KeywordMatchMode,
)
relevance_threshold: RelevanceThreshold = proto.Field(
proto.ENUM,
number=19,
enum=RelevanceThreshold,
)


class SearchJobsResponse(proto.Message):
Expand Down Expand Up @@ -1122,10 +1158,10 @@ class BatchUpdateJobsRequest(proto.Message):
If
[update_mask][google.cloud.talent.v4.BatchUpdateJobsRequest.update_mask]
is provided, The [Job][google.cloud.talent.v4.Job] inside
[JobResult][JobOperationResult.JobResult] will only contains
fields that is updated, plus the Id of the Job. Otherwise,
[Job][google.cloud.talent.v4.Job] will include all fields,
which can yield a very large response.
[JobResult][google.cloud.talent.v4.JobResult] will only
contains fields that is updated, plus the Id of the Job.
Otherwise, [Job][google.cloud.talent.v4.Job] will include
all fields, which can yield a very large response.
"""

parent: str = proto.Field(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ class talentCallTransformer(cst.CSTTransformer):
'list_companies': ('parent', 'page_token', 'page_size', 'require_open_jobs', ),
'list_jobs': ('parent', 'filter', 'page_token', 'page_size', 'job_view', ),
'list_tenants': ('parent', 'page_token', 'page_size', ),
'search_jobs': ('parent', 'request_metadata', 'search_mode', 'job_query', 'enable_broadening', 'histogram_queries', 'job_view', 'offset', 'max_page_size', 'page_token', 'order_by', 'diversification_level', 'custom_ranking_info', 'disable_keyword_match', 'keyword_match_mode', ),
'search_jobs_for_alert': ('parent', 'request_metadata', 'search_mode', 'job_query', 'enable_broadening', 'histogram_queries', 'job_view', 'offset', 'max_page_size', 'page_token', 'order_by', 'diversification_level', 'custom_ranking_info', 'disable_keyword_match', 'keyword_match_mode', ),
'search_jobs': ('parent', 'request_metadata', 'search_mode', 'job_query', 'enable_broadening', 'histogram_queries', 'job_view', 'offset', 'max_page_size', 'page_token', 'order_by', 'diversification_level', 'custom_ranking_info', 'disable_keyword_match', 'keyword_match_mode', 'relevance_threshold', ),
'search_jobs_for_alert': ('parent', 'request_metadata', 'search_mode', 'job_query', 'enable_broadening', 'histogram_queries', 'job_view', 'offset', 'max_page_size', 'page_token', 'order_by', 'diversification_level', 'custom_ranking_info', 'disable_keyword_match', 'keyword_match_mode', 'relevance_threshold', ),
'update_company': ('company', 'update_mask', ),
'update_job': ('job', 'update_mask', ),
'update_tenant': ('tenant', 'update_mask', ),
Expand Down

0 comments on commit d0fee2c

Please sign in to comment.