Google Cloud Talent Solution V4 Client - Class JobQuery (1.2.2)

Reference documentation and code samples for the Google Cloud Talent Solution V4 Client class JobQuery.

The query required to perform a search query.

Generated from protobuf message google.cloud.talent.v4.JobQuery

Namespace

Google \ Cloud \ Talent \ V4

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ query string

The query string that matches against the job title, description, and location fields. The maximum number of allowed characters is 255.

↳ query_language_code string

The language code of query. For example, "en-US". This field helps to better interpret the query. If a value isn't specified, the query language code is automatically detected, which may not be accurate. Language code should be in BCP-47 format, such as "en-US" or "sr-Latn". For more information, see Tags for Identifying Languages.

↳ companies array

This filter specifies the company entities to search against. If a value isn't specified, jobs are searched for against all companies. If multiple values are specified, jobs are searched against the companies specified. The format is "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}". For example, "projects/foo/tenants/bar/companies/baz". At most 20 company filters are allowed.

↳ location_filters array<Google\Cloud\Talent\V4\LocationFilter>

The location filter specifies geo-regions containing the jobs to search against. See LocationFilter for more information. If a location value isn't specified, jobs fitting the other search criteria are retrieved regardless of where they're located. If multiple values are specified, jobs are retrieved from any of the specified locations. If different values are specified for the LocationFilter.distance_in_miles parameter, the maximum provided distance is used for all locations. At most 5 location filters are allowed.

↳ job_categories array

The category filter specifies the categories of jobs to search against. See JobCategory for more information. If a value isn't specified, jobs from any category are searched against. If multiple values are specified, jobs from any of the specified categories are searched against.

↳ commute_filter Google\Cloud\Talent\V4\CommuteFilter

Allows filtering jobs by commute time with different travel methods (for example, driving or public transit). Note: This only works when you specify a CommuteMethod. In this case, location_filters is ignored. Currently we don't support sorting by commute time.

↳ company_display_names array

This filter specifies the company Company.display_name of the jobs to search against. The company name must match the value exactly. Alternatively, the value being searched for can be wrapped in different match operators. SUBSTRING_MATCH([value]) The company name must contain a case insensitive substring match of the value. Using this function may increase latency. Sample Value: SUBSTRING_MATCH(google) MULTI_WORD_TOKEN_MATCH([value]) The value will be treated as a multi word token and the company name must contain a case insensitive match of the value. Using this function may increase latency. Sample Value: MULTI_WORD_TOKEN_MATCH(google) If a value isn't specified, jobs within the search results are associated with any company. If multiple values are specified, jobs within the search results may be associated with any of the specified companies. At most 20 company display name filters are allowed.

↳ compensation_filter Google\Cloud\Talent\V4\CompensationFilter

This search filter is applied only to Job.compensation_info. For example, if the filter is specified as "Hourly job with per-hour compensation > $15", only jobs meeting these criteria are searched. If a filter isn't defined, all open jobs are searched.

↳ custom_attribute_filter string

This filter specifies a structured syntax to match against the Job.custom_attributes marked as filterable. The syntax for this expression is a subset of SQL syntax. Supported operators are: =, !=, <, <=, >, and >= where the left of the operator is a custom field key and the right of the operator is a number or a quoted string. You must escape backslash (\) and quote (") characters. Supported functions are LOWER([field_name]) to perform a case insensitive match and EMPTY([field_name]) to filter on the existence of a key. 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 < 10000 bytes in length. Sample Query: (LOWER(driving_license)="class \"a\"" OR EMPTY(driving_license)) AND driving_years > 10

↳ disable_spell_check bool

This flag controls the spell-check feature. If false, the service attempts to correct a misspelled query, for example, "enginee" is corrected to "engineer". Defaults to false: a spell check is performed.

↳ employment_types array

The employment type filter specifies the employment type of jobs to search against, such as EmploymentType.FULL_TIME. If a value isn't specified, jobs in the search results includes any employment type. If multiple values are specified, jobs in the search results include any of the specified employment types.

↳ language_codes array

This filter specifies the locale of jobs to search against, for example, "en-US". If a value isn't specified, the search results can contain jobs in any locale. Language codes should be in BCP-47 format, such as "en-US" or "sr-Latn". For more information, see Tags for Identifying Languages. At most 10 language code filters are allowed.

↳ publish_time_range Google\Cloud\Talent\V4\TimestampRange

Jobs published within a range specified by this filter are searched against.

↳ excluded_jobs array

This filter specifies a list of job names to be excluded during search. At most 400 excluded job names are allowed.

getQuery

The query string that matches against the job title, description, and location fields.

The maximum number of allowed characters is 255.

Returns
TypeDescription
string

setQuery

The query string that matches against the job title, description, and location fields.

The maximum number of allowed characters is 255.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getQueryLanguageCode

The language code of query. For example, "en-US". This field helps to better interpret the query.

If a value isn't specified, the query language code is automatically detected, which may not be accurate. Language code should be in BCP-47 format, such as "en-US" or "sr-Latn". For more information, see Tags for Identifying Languages.

Returns
TypeDescription
string

setQueryLanguageCode

The language code of query. For example, "en-US". This field helps to better interpret the query.

If a value isn't specified, the query language code is automatically detected, which may not be accurate. Language code should be in BCP-47 format, such as "en-US" or "sr-Latn". For more information, see Tags for Identifying Languages.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getCompanies

This filter specifies the company entities to search against.

If a value isn't specified, jobs are searched for against all companies. If multiple values are specified, jobs are searched against the companies specified. The format is "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}". For example, "projects/foo/tenants/bar/companies/baz". At most 20 company filters are allowed.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setCompanies

This filter specifies the company entities to search against.

If a value isn't specified, jobs are searched for against all companies. If multiple values are specified, jobs are searched against the companies specified. The format is "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}". For example, "projects/foo/tenants/bar/companies/baz". At most 20 company filters are allowed.

Parameter
NameDescription
var string[]
Returns
TypeDescription
$this

getLocationFilters

The location filter specifies geo-regions containing the jobs to search against. See LocationFilter for more information.

If a location value isn't specified, jobs fitting the other search criteria are retrieved regardless of where they're located. If multiple values are specified, jobs are retrieved from any of the specified locations. If different values are specified for the LocationFilter.distance_in_miles parameter, the maximum provided distance is used for all locations. At most 5 location filters are allowed.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setLocationFilters

The location filter specifies geo-regions containing the jobs to search against. See LocationFilter for more information.

If a location value isn't specified, jobs fitting the other search criteria are retrieved regardless of where they're located. If multiple values are specified, jobs are retrieved from any of the specified locations. If different values are specified for the LocationFilter.distance_in_miles parameter, the maximum provided distance is used for all locations. At most 5 location filters are allowed.

Parameter
NameDescription
var array<Google\Cloud\Talent\V4\LocationFilter>
Returns
TypeDescription
$this

getJobCategories

The category filter specifies the categories of jobs to search against.

See JobCategory for more information. If a value isn't specified, jobs from any category are searched against. If multiple values are specified, jobs from any of the specified categories are searched against.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setJobCategories

The category filter specifies the categories of jobs to search against.

See JobCategory for more information. If a value isn't specified, jobs from any category are searched against. If multiple values are specified, jobs from any of the specified categories are searched against.

Parameter
NameDescription
var int[]
Returns
TypeDescription
$this

getCommuteFilter

Allows filtering jobs by commute time with different travel methods (for example, driving or public transit).

Note: This only works when you specify a CommuteMethod. In this case, location_filters is ignored. Currently we don't support sorting by commute time.

Returns
TypeDescription
Google\Cloud\Talent\V4\CommuteFilter|null

hasCommuteFilter

clearCommuteFilter

setCommuteFilter

Allows filtering jobs by commute time with different travel methods (for example, driving or public transit).

Note: This only works when you specify a CommuteMethod. In this case, location_filters is ignored. Currently we don't support sorting by commute time.

Parameter
NameDescription
var Google\Cloud\Talent\V4\CommuteFilter
Returns
TypeDescription
$this

getCompanyDisplayNames

This filter specifies the company Company.display_name of the jobs to search against. The company name must match the value exactly.

Alternatively, the value being searched for can be wrapped in different match operators. SUBSTRING_MATCH([value]) The company name must contain a case insensitive substring match of the value. Using this function may increase latency. Sample Value: SUBSTRING_MATCH(google) MULTI_WORD_TOKEN_MATCH([value]) The value will be treated as a multi word token and the company name must contain a case insensitive match of the value. Using this function may increase latency. Sample Value: MULTI_WORD_TOKEN_MATCH(google) If a value isn't specified, jobs within the search results are associated with any company. If multiple values are specified, jobs within the search results may be associated with any of the specified companies. At most 20 company display name filters are allowed.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setCompanyDisplayNames

This filter specifies the company Company.display_name of the jobs to search against. The company name must match the value exactly.

Alternatively, the value being searched for can be wrapped in different match operators. SUBSTRING_MATCH([value]) The company name must contain a case insensitive substring match of the value. Using this function may increase latency. Sample Value: SUBSTRING_MATCH(google) MULTI_WORD_TOKEN_MATCH([value]) The value will be treated as a multi word token and the company name must contain a case insensitive match of the value. Using this function may increase latency. Sample Value: MULTI_WORD_TOKEN_MATCH(google) If a value isn't specified, jobs within the search results are associated with any company. If multiple values are specified, jobs within the search results may be associated with any of the specified companies. At most 20 company display name filters are allowed.

Parameter
NameDescription
var string[]
Returns
TypeDescription
$this

getCompensationFilter

This search filter is applied only to Job.compensation_info. For example, if the filter is specified as "Hourly job with per-hour compensation > $15", only jobs meeting these criteria are searched. If a filter isn't defined, all open jobs are searched.

Returns
TypeDescription
Google\Cloud\Talent\V4\CompensationFilter|null

hasCompensationFilter

clearCompensationFilter

setCompensationFilter

This search filter is applied only to Job.compensation_info. For example, if the filter is specified as "Hourly job with per-hour compensation > $15", only jobs meeting these criteria are searched. If a filter isn't defined, all open jobs are searched.

Parameter
NameDescription
var Google\Cloud\Talent\V4\CompensationFilter
Returns
TypeDescription
$this

getCustomAttributeFilter

This filter specifies a structured syntax to match against the Job.custom_attributes marked as filterable.

The syntax for this expression is a subset of SQL syntax. Supported operators are: =, !=, <, <=, >, and >= where the left of the operator is a custom field key and the right of the operator is a number or a quoted string. You must escape backslash (\) and quote (") characters. Supported functions are LOWER([field_name]) to perform a case insensitive match and EMPTY([field_name]) to filter on the existence of a key. 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 < 10000 bytes in length. Sample Query: (LOWER(driving_license)="class \"a\"" OR EMPTY(driving_license)) AND driving_years > 10

Returns
TypeDescription
string

setCustomAttributeFilter

This filter specifies a structured syntax to match against the Job.custom_attributes marked as filterable.

The syntax for this expression is a subset of SQL syntax. Supported operators are: =, !=, <, <=, >, and >= where the left of the operator is a custom field key and the right of the operator is a number or a quoted string. You must escape backslash (\) and quote (") characters. Supported functions are LOWER([field_name]) to perform a case insensitive match and EMPTY([field_name]) to filter on the existence of a key. 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 < 10000 bytes in length. Sample Query: (LOWER(driving_license)="class \"a\"" OR EMPTY(driving_license)) AND driving_years > 10

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getDisableSpellCheck

This flag controls the spell-check feature. If false, the service attempts to correct a misspelled query, for example, "enginee" is corrected to "engineer".

Defaults to false: a spell check is performed.

Returns
TypeDescription
bool

setDisableSpellCheck

This flag controls the spell-check feature. If false, the service attempts to correct a misspelled query, for example, "enginee" is corrected to "engineer".

Defaults to false: a spell check is performed.

Parameter
NameDescription
var bool
Returns
TypeDescription
$this

getEmploymentTypes

The employment type filter specifies the employment type of jobs to search against, such as EmploymentType.FULL_TIME.

If a value isn't specified, jobs in the search results includes any employment type. If multiple values are specified, jobs in the search results include any of the specified employment types.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setEmploymentTypes

The employment type filter specifies the employment type of jobs to search against, such as EmploymentType.FULL_TIME.

If a value isn't specified, jobs in the search results includes any employment type. If multiple values are specified, jobs in the search results include any of the specified employment types.

Parameter
NameDescription
var int[]
Returns
TypeDescription
$this

getLanguageCodes

This filter specifies the locale of jobs to search against, for example, "en-US".

If a value isn't specified, the search results can contain jobs in any locale. Language codes should be in BCP-47 format, such as "en-US" or "sr-Latn". For more information, see Tags for Identifying Languages. At most 10 language code filters are allowed.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setLanguageCodes

This filter specifies the locale of jobs to search against, for example, "en-US".

If a value isn't specified, the search results can contain jobs in any locale. Language codes should be in BCP-47 format, such as "en-US" or "sr-Latn". For more information, see Tags for Identifying Languages. At most 10 language code filters are allowed.

Parameter
NameDescription
var string[]
Returns
TypeDescription
$this

getPublishTimeRange

Jobs published within a range specified by this filter are searched against.

Returns
TypeDescription
Google\Cloud\Talent\V4\TimestampRange|null

hasPublishTimeRange

clearPublishTimeRange

setPublishTimeRange

Jobs published within a range specified by this filter are searched against.

Parameter
NameDescription
var Google\Cloud\Talent\V4\TimestampRange
Returns
TypeDescription
$this

getExcludedJobs

This filter specifies a list of job names to be excluded during search.

At most 400 excluded job names are allowed.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setExcludedJobs

This filter specifies a list of job names to be excluded during search.

At most 400 excluded job names are allowed.

Parameter
NameDescription
var string[]
Returns
TypeDescription
$this