Skip to content

Commit d0fee2c

Browse files
feat: [google-cloud-talent] A new enum RelevanceThreshold is added (#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>
1 parent d2a6625 commit d0fee2c

File tree

4 files changed

+60
-20
lines changed

4 files changed

+60
-20
lines changed

packages/google-cloud-talent/google/cloud/talent_v4/types/filters.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ class LocationFilter(proto.Message):
331331
[Job.addresses][google.cloud.talent.v4.Job.addresses] may
332332
still be matched based on other location filters using
333333
[address][google.cloud.talent.v4.LocationFilter.address] or
334-
[latlng][].
334+
[lat_lng][google.cloud.talent.v4.LocationFilter.lat_lng].
335335
336336
This filter can be used by itself to search exclusively for
337337
telecommuting jobs, or it can be combined with another

packages/google-cloud-talent/google/cloud/talent_v4/types/job.py

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -116,15 +116,18 @@ class Job(proto.Message):
116116
experience.
117117
118118
Jobs with multiple addresses must have their addresses with
119-
the same [LocationType][] to allow location filtering to
120-
work properly. (For example, a Job with addresses "1600
121-
Amphitheatre Parkway, Mountain View, CA, USA" and "London,
122-
UK" may not have location filters applied correctly at
123-
search time since the first is a
124-
[LocationType.STREET_ADDRESS][] and the second is a
125-
[LocationType.LOCALITY][].) If a job needs to have multiple
126-
addresses, it is suggested to split it into multiple jobs
127-
with same LocationTypes.
119+
the same
120+
[LocationType][google.cloud.talent.v4.Location.LocationType]
121+
to allow location filtering to work properly. (For example,
122+
a Job with addresses "1600 Amphitheatre Parkway, Mountain
123+
View, CA, USA" and "London, UK" may not have location
124+
filters applied correctly at search time since the first is
125+
a
126+
[LocationType.STREET_ADDRESS][google.cloud.talent.v4.Location.LocationType.STREET_ADDRESS]
127+
and the second is a
128+
[LocationType.LOCALITY][google.cloud.talent.v4.Location.LocationType.LOCALITY].)
129+
If a job needs to have multiple addresses, it is suggested
130+
to split it into multiple jobs with same LocationTypes.
128131
129132
The maximum number of allowed characters is 500.
130133
application_info (google.cloud.talent_v4.types.Job.ApplicationInfo):
@@ -293,10 +296,11 @@ class Job(proto.Message):
293296
must be set before
294297
[posting_expire_time][google.cloud.talent.v4.Job.posting_expire_time].
295298
The purpose of this feature is to allow other objects, such
296-
as [Application][], to refer a job that didn't exist in the
297-
system prior to becoming expired. If you want to modify a
298-
job that was expired on creation, delete it and create a new
299-
one.
299+
as
300+
[ApplicationInfo][google.cloud.talent.v4.Job.ApplicationInfo],
301+
to refer a job that didn't exist in the system prior to
302+
becoming expired. If you want to modify a job that was
303+
expired on creation, delete it and create a new one.
300304
301305
If this value isn't provided at the time of job creation or
302306
is invalid, the job posting expires after 30 days from the

packages/google-cloud-talent/google/cloud/talent_v4/types/job_service.py

Lines changed: 40 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -600,6 +600,13 @@ class SearchJobsRequest(proto.Message):
600600
Defaults to
601601
[KeywordMatchMode.KEYWORD_MATCH_ALL][google.cloud.talent.v4.SearchJobsRequest.KeywordMatchMode.KEYWORD_MATCH_ALL]
602602
if no value is specified.
603+
relevance_threshold (google.cloud.talent_v4.types.SearchJobsRequest.RelevanceThreshold):
604+
Optional. The relevance threshold of the
605+
search results.
606+
Default to Google defined threshold, leveraging
607+
a balance of precision and recall to deliver
608+
both highly accurate results and comprehensive
609+
coverage of relevant information.
603610
"""
604611

605612
class SearchMode(proto.Enum):
@@ -730,6 +737,30 @@ class KeywordMatchMode(proto.Enum):
730737
KEYWORD_MATCH_ALL = 2
731738
KEYWORD_MATCH_TITLE_ONLY = 3
732739

740+
class RelevanceThreshold(proto.Enum):
741+
r"""The relevance threshold of the search results. The higher
742+
relevance threshold is, the higher relevant results are shown
743+
and the less number of results are returned.
744+
745+
Values:
746+
RELEVANCE_THRESHOLD_UNSPECIFIED (0):
747+
Default value. In this case, server behavior
748+
defaults to Google defined threshold.
749+
LOWEST (1):
750+
Lowest relevance threshold.
751+
LOW (2):
752+
Low relevance threshold.
753+
MEDIUM (3):
754+
Medium relevance threshold.
755+
HIGH (4):
756+
High relevance threshold.
757+
"""
758+
RELEVANCE_THRESHOLD_UNSPECIFIED = 0
759+
LOWEST = 1
760+
LOW = 2
761+
MEDIUM = 3
762+
HIGH = 4
763+
733764
class CustomRankingInfo(proto.Message):
734765
r"""Custom ranking information for
735766
[SearchJobsRequest][google.cloud.talent.v4.SearchJobsRequest].
@@ -896,6 +927,11 @@ class ImportanceLevel(proto.Enum):
896927
number=18,
897928
enum=KeywordMatchMode,
898929
)
930+
relevance_threshold: RelevanceThreshold = proto.Field(
931+
proto.ENUM,
932+
number=19,
933+
enum=RelevanceThreshold,
934+
)
899935

900936

901937
class SearchJobsResponse(proto.Message):
@@ -1122,10 +1158,10 @@ class BatchUpdateJobsRequest(proto.Message):
11221158
If
11231159
[update_mask][google.cloud.talent.v4.BatchUpdateJobsRequest.update_mask]
11241160
is provided, The [Job][google.cloud.talent.v4.Job] inside
1125-
[JobResult][JobOperationResult.JobResult] will only contains
1126-
fields that is updated, plus the Id of the Job. Otherwise,
1127-
[Job][google.cloud.talent.v4.Job] will include all fields,
1128-
which can yield a very large response.
1161+
[JobResult][google.cloud.talent.v4.JobResult] will only
1162+
contains fields that is updated, plus the Id of the Job.
1163+
Otherwise, [Job][google.cloud.talent.v4.Job] will include
1164+
all fields, which can yield a very large response.
11291165
"""
11301166

11311167
parent: str = proto.Field(

packages/google-cloud-talent/scripts/fixup_talent_v4_keywords.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ class talentCallTransformer(cst.CSTTransformer):
5656
'list_companies': ('parent', 'page_token', 'page_size', 'require_open_jobs', ),
5757
'list_jobs': ('parent', 'filter', 'page_token', 'page_size', 'job_view', ),
5858
'list_tenants': ('parent', 'page_token', 'page_size', ),
59-
'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', ),
60-
'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', ),
59+
'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', ),
60+
'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', ),
6161
'update_company': ('company', 'update_mask', ),
6262
'update_job': ('job', 'update_mask', ),
6363
'update_tenant': ('tenant', 'update_mask', ),

0 commit comments

Comments
 (0)