Client for Cloud Talent Solution API#
-
class
google.cloud.talent_v4beta1.
ApplicationServiceClient
(transport=None, channel=None, credentials=None, client_config=None, client_info=None, client_options=None)[source]# A service that handles application management, including CRUD and enumeration.
Constructor.
- Parameters
(Union[ApplicationServiceGrpcTransport, (transport) – Callable[[~.Credentials, type], ~.ApplicationServiceGrpcTransport]): A transport instance, responsible for actually making the API calls. The default transport uses the gRPC protocol. This argument may also be a callable which returns a transport instance. Callables will be sent the credentials as the first argument and the default transport class as the second argument.
channel (grpc.Channel) – DEPRECATED. A
Channel
instance through which to make calls. This argument is mutually exclusive withcredentials
; providing both will raise an exception.credentials (google.auth.credentials.Credentials) – The authorization credentials to attach to requests. These credentials identify this application to the service. If none are specified, the client will attempt to ascertain the credentials from the environment. This argument is mutually exclusive with providing a transport instance to
transport
; doing so will raise an exception.client_config (dict) – DEPRECATED. A dictionary of call options for each method. If not specified, the default configuration is used.
client_info (google.api_core.gapic_v1.client_info.ClientInfo) – The client info used to send a user-agent string along with API requests. If
None
, then default info will be used. Generally, you only need to set this if you’re developing your own client library.client_options (Union[dict, google.api_core.client_options.ClientOptions]) – Client options used to set user options on the client. API Endpoint should be set through client_options.
-
classmethod
application_path
(project, tenant, profile, application)[source]# Return a fully-qualified application string.
-
create_application
(parent, application, retry=<object object>, timeout=<object object>, metadata=None)[source]# Creates a new application entity.
Example
>>> from google.cloud import talent_v4beta1 >>> >>> client = talent_v4beta1.ApplicationServiceClient() >>> >>> parent = client.profile_path('[PROJECT]', '[TENANT]', '[PROFILE]') >>> >>> # TODO: Initialize `application`: >>> application = {} >>> >>> response = client.create_application(parent, application)
- Parameters
parent (str) –
Required. Resource name of the profile under which the application is created.
The format is “projects/{project_id}/tenants/{tenant_id}/profiles/{profile_id}”. For example, “projects/foo/tenants/bar/profiles/baz”.
application (Union[dict, Application]) –
Required. The application to be created.
If a dict is provided, it must be of the same form as the protobuf message
Application
retry (Optional[google.api_core.retry.Retry]) – A retry object used to retry requests. If
None
is specified, requests will be retried using a default configuration.timeout (Optional[float]) – The amount of time, in seconds, to wait for the request to complete. Note that if
retry
is specified, the timeout applies to each individual attempt.metadata (Optional[Sequence[Tuple[str, str]]]) – Additional metadata that is provided to the method.
- Returns
A
Application
instance.- Raises
google.api_core.exceptions.GoogleAPICallError – If the request failed for any reason.
google.api_core.exceptions.RetryError – If the request failed due to a retryable error and retry attempts failed.
ValueError – If the parameters are invalid.
-
delete_application
(name, retry=<object object>, timeout=<object object>, metadata=None)[source]# Deletes specified application.
Example
>>> from google.cloud import talent_v4beta1 >>> >>> client = talent_v4beta1.ApplicationServiceClient() >>> >>> name = client.application_path('[PROJECT]', '[TENANT]', '[PROFILE]', '[APPLICATION]') >>> >>> client.delete_application(name)
- Parameters
name (str) –
Required. The resource name of the application to be deleted.
The format is “projects/{project_id}/tenants/{tenant_id}/profiles/{profile_id}/applications/{application_id}”. For example, “projects/foo/tenants/bar/profiles/baz/applications/qux”.
retry (Optional[google.api_core.retry.Retry]) – A retry object used to retry requests. If
None
is specified, requests will be retried using a default configuration.timeout (Optional[float]) – The amount of time, in seconds, to wait for the request to complete. Note that if
retry
is specified, the timeout applies to each individual attempt.metadata (Optional[Sequence[Tuple[str, str]]]) – Additional metadata that is provided to the method.
- Raises
google.api_core.exceptions.GoogleAPICallError – If the request failed for any reason.
google.api_core.exceptions.RetryError – If the request failed due to a retryable error and retry attempts failed.
ValueError – If the parameters are invalid.
-
enums
= <module 'google.cloud.talent_v4beta1.gapic.enums' from '/usr/local/lib/python3.7/site-packages/google/cloud/talent_v4beta1/gapic/enums.py'>#
-
classmethod
from_service_account_file
(filename, *args, **kwargs)[source]# Creates an instance of this client using the provided credentials file.
- Parameters
filename (str) – The path to the service account private key json file.
args – Additional arguments to pass to the constructor.
kwargs – Additional arguments to pass to the constructor.
- Returns
The constructed client.
- Return type
-
classmethod
from_service_account_json
(filename, *args, **kwargs)# Creates an instance of this client using the provided credentials file.
- Parameters
filename (str) – The path to the service account private key json file.
args – Additional arguments to pass to the constructor.
kwargs – Additional arguments to pass to the constructor.
- Returns
The constructed client.
- Return type
-
get_application
(name, retry=<object object>, timeout=<object object>, metadata=None)[source]# Retrieves specified application.
Example
>>> from google.cloud import talent_v4beta1 >>> >>> client = talent_v4beta1.ApplicationServiceClient() >>> >>> name = client.application_path('[PROJECT]', '[TENANT]', '[PROFILE]', '[APPLICATION]') >>> >>> response = client.get_application(name)
- Parameters
name (str) –
Required. The resource name of the application to be retrieved.
The format is “projects/{project_id}/tenants/{tenant_id}/profiles/{profile_id}/applications/{application_id}”. For example, “projects/foo/tenants/bar/profiles/baz/applications/qux”.
retry (Optional[google.api_core.retry.Retry]) – A retry object used to retry requests. If
None
is specified, requests will be retried using a default configuration.timeout (Optional[float]) – The amount of time, in seconds, to wait for the request to complete. Note that if
retry
is specified, the timeout applies to each individual attempt.metadata (Optional[Sequence[Tuple[str, str]]]) – Additional metadata that is provided to the method.
- Returns
A
Application
instance.- Raises
google.api_core.exceptions.GoogleAPICallError – If the request failed for any reason.
google.api_core.exceptions.RetryError – If the request failed due to a retryable error and retry attempts failed.
ValueError – If the parameters are invalid.
-
list_applications
(parent, page_size=None, retry=<object object>, timeout=<object object>, metadata=None)[source]# Lists all applications associated with the profile.
Example
>>> from google.cloud import talent_v4beta1 >>> >>> client = talent_v4beta1.ApplicationServiceClient() >>> >>> parent = client.profile_path('[PROJECT]', '[TENANT]', '[PROFILE]') >>> >>> # Iterate over all results >>> for element in client.list_applications(parent): ... # process element ... pass >>> >>> >>> # Alternatively: >>> >>> # Iterate over results one page at a time >>> for page in client.list_applications(parent).pages: ... for element in page: ... # process element ... pass
- Parameters
parent (str) –
Required. Resource name of the profile under which the application is created.
The format is “projects/{project_id}/tenants/{tenant_id}/profiles/{profile_id}”, for example, “projects/foo/tenants/bar/profiles/baz”.
page_size (int) – The maximum number of resources contained in the underlying API response. If page streaming is performed per- resource, this parameter does not affect the return value. If page streaming is performed per-page, this determines the maximum number of resources in a page.
retry (Optional[google.api_core.retry.Retry]) – A retry object used to retry requests. If
None
is specified, requests will be retried using a default configuration.timeout (Optional[float]) – The amount of time, in seconds, to wait for the request to complete. Note that if
retry
is specified, the timeout applies to each individual attempt.metadata (Optional[Sequence[Tuple[str, str]]]) – Additional metadata that is provided to the method.
- Returns
A
PageIterator
instance. An iterable ofApplication
instances. You can also iterate over the pages of the response using its pages property.- Raises
google.api_core.exceptions.GoogleAPICallError – If the request failed for any reason.
google.api_core.exceptions.RetryError – If the request failed due to a retryable error and retry attempts failed.
ValueError – If the parameters are invalid.
-
classmethod
profile_path
(project, tenant, profile)[source]# Return a fully-qualified profile string.
-
update_application
(application, update_mask=None, retry=<object object>, timeout=<object object>, metadata=None)[source]# Updates specified application.
Example
>>> from google.cloud import talent_v4beta1 >>> >>> client = talent_v4beta1.ApplicationServiceClient() >>> >>> # TODO: Initialize `application`: >>> application = {} >>> >>> response = client.update_application(application)
- Parameters
application (Union[dict, Application]) –
Required. The application resource to replace the current resource in the system.
If a dict is provided, it must be of the same form as the protobuf message
Application
update_mask (Union[dict, FieldMask]) –
Strongly recommended for the best service experience.
If
update_mask
is provided, only the specified fields inapplication
are updated. Otherwise all the fields are updated.A field mask to specify the application fields to be updated. Only top level fields of
Application
are supported.If a dict is provided, it must be of the same form as the protobuf message
FieldMask
retry (Optional[google.api_core.retry.Retry]) – A retry object used to retry requests. If
None
is specified, requests will be retried using a default configuration.timeout (Optional[float]) – The amount of time, in seconds, to wait for the request to complete. Note that if
retry
is specified, the timeout applies to each individual attempt.metadata (Optional[Sequence[Tuple[str, str]]]) – Additional metadata that is provided to the method.
- Returns
A
Application
instance.- Raises
google.api_core.exceptions.GoogleAPICallError – If the request failed for any reason.
google.api_core.exceptions.RetryError – If the request failed due to a retryable error and retry attempts failed.
ValueError – If the parameters are invalid.
-
class
google.cloud.talent_v4beta1.
CompanyServiceClient
(transport=None, channel=None, credentials=None, client_config=None, client_info=None, client_options=None)[source]# A service that handles company management, including CRUD and enumeration.
Constructor.
- Parameters
(Union[CompanyServiceGrpcTransport, (transport) – Callable[[~.Credentials, type], ~.CompanyServiceGrpcTransport]): A transport instance, responsible for actually making the API calls. The default transport uses the gRPC protocol. This argument may also be a callable which returns a transport instance. Callables will be sent the credentials as the first argument and the default transport class as the second argument.
channel (grpc.Channel) – DEPRECATED. A
Channel
instance through which to make calls. This argument is mutually exclusive withcredentials
; providing both will raise an exception.credentials (google.auth.credentials.Credentials) – The authorization credentials to attach to requests. These credentials identify this application to the service. If none are specified, the client will attempt to ascertain the credentials from the environment. This argument is mutually exclusive with providing a transport instance to
transport
; doing so will raise an exception.client_config (dict) – DEPRECATED. A dictionary of call options for each method. If not specified, the default configuration is used.
client_info (google.api_core.gapic_v1.client_info.ClientInfo) – The client info used to send a user-agent string along with API requests. If
None
, then default info will be used. Generally, you only need to set this if you’re developing your own client library.client_options (Union[dict, google.api_core.client_options.ClientOptions]) – Client options used to set user options on the client. API Endpoint should be set through client_options.
-
classmethod
company_path
(project, tenant, company)[source]# Return a fully-qualified company string.
-
classmethod
company_without_tenant_path
(project, company)[source]# Return a fully-qualified company_without_tenant string.
-
create_company
(parent, company, retry=<object object>, timeout=<object object>, metadata=None)[source]# Creates a new company entity.
Example
>>> from google.cloud import talent_v4beta1 >>> >>> client = talent_v4beta1.CompanyServiceClient() >>> >>> parent = client.tenant_path('[PROJECT]', '[TENANT]') >>> >>> # TODO: Initialize `company`: >>> company = {} >>> >>> response = client.create_company(parent, company)
- Parameters
parent (str) –
Required. Resource name of the tenant under which the company is created.
The format is “projects/{project_id}/tenants/{tenant_id}”, for example, “projects/foo/tenant/bar”. If tenant id is unspecified, a default tenant is created, for example, “projects/foo”.
company (Union[dict, Company]) –
Required. The company to be created.
If a dict is provided, it must be of the same form as the protobuf message
Company
retry (Optional[google.api_core.retry.Retry]) – A retry object used to retry requests. If
None
is specified, requests will be retried using a default configuration.timeout (Optional[float]) – The amount of time, in seconds, to wait for the request to complete. Note that if
retry
is specified, the timeout applies to each individual attempt.metadata (Optional[Sequence[Tuple[str, str]]]) – Additional metadata that is provided to the method.
- Returns
A
Company
instance.- Raises
google.api_core.exceptions.GoogleAPICallError – If the request failed for any reason.
google.api_core.exceptions.RetryError – If the request failed due to a retryable error and retry attempts failed.
ValueError – If the parameters are invalid.
-
delete_company
(name, retry=<object object>, timeout=<object object>, metadata=None)[source]# Deletes specified company. Prerequisite: The company has no jobs associated with it.
Example
>>> from google.cloud import talent_v4beta1 >>> >>> client = talent_v4beta1.CompanyServiceClient() >>> >>> name = client.company_path('[PROJECT]', '[TENANT]', '[COMPANY]') >>> >>> client.delete_company(name)
- Parameters
name (str) –
Required. The resource name of the company to be deleted.
The format is “projects/{project_id}/tenants/{tenant_id}/companies/{company_id}”, for example, “projects/foo/tenants/bar/companies/baz”.
If tenant id is unspecified, the default tenant is used, for example, “projects/foo/companies/bar”.
retry (Optional[google.api_core.retry.Retry]) – A retry object used to retry requests. If
None
is specified, requests will be retried using a default configuration.timeout (Optional[float]) – The amount of time, in seconds, to wait for the request to complete. Note that if
retry
is specified, the timeout applies to each individual attempt.metadata (Optional[Sequence[Tuple[str, str]]]) – Additional metadata that is provided to the method.
- Raises
google.api_core.exceptions.GoogleAPICallError – If the request failed for any reason.
google.api_core.exceptions.RetryError – If the request failed due to a retryable error and retry attempts failed.
ValueError – If the parameters are invalid.
-
enums
= <module 'google.cloud.talent_v4beta1.gapic.enums' from '/usr/local/lib/python3.7/site-packages/google/cloud/talent_v4beta1/gapic/enums.py'>#
-
classmethod
from_service_account_file
(filename, *args, **kwargs)[source]# Creates an instance of this client using the provided credentials file.
- Parameters
filename (str) – The path to the service account private key json file.
args – Additional arguments to pass to the constructor.
kwargs – Additional arguments to pass to the constructor.
- Returns
The constructed client.
- Return type
-
classmethod
from_service_account_json
(filename, *args, **kwargs)# Creates an instance of this client using the provided credentials file.
- Parameters
filename (str) – The path to the service account private key json file.
args – Additional arguments to pass to the constructor.
kwargs – Additional arguments to pass to the constructor.
- Returns
The constructed client.
- Return type
-
get_company
(name, retry=<object object>, timeout=<object object>, metadata=None)[source]# Retrieves specified company.
Example
>>> from google.cloud import talent_v4beta1 >>> >>> client = talent_v4beta1.CompanyServiceClient() >>> >>> name = client.company_path('[PROJECT]', '[TENANT]', '[COMPANY]') >>> >>> response = client.get_company(name)
- Parameters
name (str) –
Required. The resource name of the company to be retrieved.
The format is “projects/{project_id}/tenants/{tenant_id}/companies/{company_id}”, for example, “projects/api-test-project/tenants/foo/companies/bar”.
If tenant id is unspecified, the default tenant is used, for example, “projects/api-test-project/companies/bar”.
retry (Optional[google.api_core.retry.Retry]) – A retry object used to retry requests. If
None
is specified, requests will be retried using a default configuration.timeout (Optional[float]) – The amount of time, in seconds, to wait for the request to complete. Note that if
retry
is specified, the timeout applies to each individual attempt.metadata (Optional[Sequence[Tuple[str, str]]]) – Additional metadata that is provided to the method.
- Returns
A
Company
instance.- Raises
google.api_core.exceptions.GoogleAPICallError – If the request failed for any reason.
google.api_core.exceptions.RetryError – If the request failed due to a retryable error and retry attempts failed.
ValueError – If the parameters are invalid.
-
list_companies
(parent, page_size=None, require_open_jobs=None, retry=<object object>, timeout=<object object>, metadata=None)[source]# Lists all companies associated with the project.
Example
>>> from google.cloud import talent_v4beta1 >>> >>> client = talent_v4beta1.CompanyServiceClient() >>> >>> parent = client.tenant_path('[PROJECT]', '[TENANT]') >>> >>> # Iterate over all results >>> for element in client.list_companies(parent): ... # process element ... pass >>> >>> >>> # Alternatively: >>> >>> # Iterate over results one page at a time >>> for page in client.list_companies(parent).pages: ... for element in page: ... # process element ... pass
- Parameters
parent (str) –
Required. Resource name of the tenant under which the company is created.
The format is “projects/{project_id}/tenants/{tenant_id}”, for example, “projects/foo/tenant/bar”.
If tenant id is unspecified, the default tenant will be used, for example, “projects/foo”.
page_size (int) – The maximum number of resources contained in the underlying API response. If page streaming is performed per- resource, this parameter does not affect the return value. If page streaming is performed per-page, this determines the maximum number of resources in a page.
require_open_jobs (bool) –
Set to true if the companies requested must have open jobs.
Defaults to false.
If true, at most
page_size
of companies are fetched, among which only those with open jobs are returned.retry (Optional[google.api_core.retry.Retry]) – A retry object used to retry requests. If
None
is specified, requests will be retried using a default configuration.timeout (Optional[float]) – The amount of time, in seconds, to wait for the request to complete. Note that if
retry
is specified, the timeout applies to each individual attempt.metadata (Optional[Sequence[Tuple[str, str]]]) – Additional metadata that is provided to the method.
- Returns
A
PageIterator
instance. An iterable ofCompany
instances. You can also iterate over the pages of the response using its pages property.- Raises
google.api_core.exceptions.GoogleAPICallError – If the request failed for any reason.
google.api_core.exceptions.RetryError – If the request failed due to a retryable error and retry attempts failed.
ValueError – If the parameters are invalid.
-
update_company
(company, update_mask=None, retry=<object object>, timeout=<object object>, metadata=None)[source]# Updates specified company.
Example
>>> from google.cloud import talent_v4beta1 >>> >>> client = talent_v4beta1.CompanyServiceClient() >>> >>> # TODO: Initialize `company`: >>> company = {} >>> >>> response = client.update_company(company)
- Parameters
company (Union[dict, Company]) –
Required. The company resource to replace the current resource in the system.
If a dict is provided, it must be of the same form as the protobuf message
Company
update_mask (Union[dict, FieldMask]) –
Strongly recommended for the best service experience.
If
update_mask
is provided, only the specified fields incompany
are updated. Otherwise all the fields are updated.A field mask to specify the company fields to be updated. Only top level fields of
Company
are supported.If a dict is provided, it must be of the same form as the protobuf message
FieldMask
retry (Optional[google.api_core.retry.Retry]) – A retry object used to retry requests. If
None
is specified, requests will be retried using a default configuration.timeout (Optional[float]) – The amount of time, in seconds, to wait for the request to complete. Note that if
retry
is specified, the timeout applies to each individual attempt.metadata (Optional[Sequence[Tuple[str, str]]]) – Additional metadata that is provided to the method.
- Returns
A
Company
instance.- Raises
google.api_core.exceptions.GoogleAPICallError – If the request failed for any reason.
google.api_core.exceptions.RetryError – If the request failed due to a retryable error and retry attempts failed.
ValueError – If the parameters are invalid.
-
class
google.cloud.talent_v4beta1.
CompletionClient
(transport=None, channel=None, credentials=None, client_config=None, client_info=None, client_options=None)[source]# A service handles auto completion.
Constructor.
- Parameters
(Union[CompletionGrpcTransport, (transport) – Callable[[~.Credentials, type], ~.CompletionGrpcTransport]): A transport instance, responsible for actually making the API calls. The default transport uses the gRPC protocol. This argument may also be a callable which returns a transport instance. Callables will be sent the credentials as the first argument and the default transport class as the second argument.
channel (grpc.Channel) – DEPRECATED. A
Channel
instance through which to make calls. This argument is mutually exclusive withcredentials
; providing both will raise an exception.credentials (google.auth.credentials.Credentials) – The authorization credentials to attach to requests. These credentials identify this application to the service. If none are specified, the client will attempt to ascertain the credentials from the environment. This argument is mutually exclusive with providing a transport instance to
transport
; doing so will raise an exception.client_config (dict) – DEPRECATED. A dictionary of call options for each method. If not specified, the default configuration is used.
client_info (google.api_core.gapic_v1.client_info.ClientInfo) – The client info used to send a user-agent string along with API requests. If
None
, then default info will be used. Generally, you only need to set this if you’re developing your own client library.client_options (Union[dict, google.api_core.client_options.ClientOptions]) – Client options used to set user options on the client. API Endpoint should be set through client_options.
-
classmethod
company_path
(project, tenant, company)[source]# Return a fully-qualified company string.
-
classmethod
company_without_tenant_path
(project, company)[source]# Return a fully-qualified company_without_tenant string.
-
complete_query
(parent, query, page_size, language_codes=None, company=None, scope=None, type_=None, retry=<object object>, timeout=<object object>, metadata=None)[source]# Completes the specified prefix with keyword suggestions. Intended for use by a job search auto-complete search box.
Example
>>> from google.cloud import talent_v4beta1 >>> >>> client = talent_v4beta1.CompletionClient() >>> >>> parent = client.tenant_path('[PROJECT]', '[TENANT]') >>> >>> # TODO: Initialize `query`: >>> query = '' >>> >>> # TODO: Initialize `page_size`: >>> page_size = 0 >>> >>> response = client.complete_query(parent, query, page_size)
- Parameters
parent (str) –
Required. Resource name of tenant the completion is performed within.
The format is “projects/{project_id}/tenants/{tenant_id}”, for example, “projects/foo/tenant/bar”.
If tenant id is unspecified, the default tenant is used, for example, “projects/foo”.
query (str) –
Required. The query used to generate suggestions.
The maximum number of allowed characters is 255.
page_size (int) –
Required. Completion result count.
The maximum allowed page size is 10.
The list of languages of the query. This is the BCP-47 language code, such as “en-US” or “sr-Latn”. For more information, see Tags for Identifying Languages.
For
CompletionType.JOB_TITLE
type, only open jobs with the samelanguage_codes
are returned.For
CompletionType.COMPANY_NAME
type, only companies having open jobs with the samelanguage_codes
are returned.For
CompletionType.COMBINED
type, only open jobs with the samelanguage_codes
or companies having open jobs with the samelanguage_codes
are returned.The maximum number of allowed characters is 255.
company (str) –
If provided, restricts completion to specified company.
The format is “projects/{project_id}/tenants/{tenant_id}/companies/{company_id}”, for example, “projects/foo/tenants/bar/companies/baz”.
If tenant id is unspecified, the default tenant is used, for example, “projects/foo”.
scope (CompletionScope) – The scope of the completion. The defaults is
CompletionScope.PUBLIC
.type_ (CompletionType) – The completion topic. The default is
CompletionType.COMBINED
.retry (Optional[google.api_core.retry.Retry]) – A retry object used to retry requests. If
None
is specified, requests will be retried using a default configuration.timeout (Optional[float]) – The amount of time, in seconds, to wait for the request to complete. Note that if
retry
is specified, the timeout applies to each individual attempt.metadata (Optional[Sequence[Tuple[str, str]]]) – Additional metadata that is provided to the method.
- Returns
A
CompleteQueryResponse
instance.- Raises
google.api_core.exceptions.GoogleAPICallError – If the request failed for any reason.
google.api_core.exceptions.RetryError – If the request failed due to a retryable error and retry attempts failed.
ValueError – If the parameters are invalid.
-
enums
= <module 'google.cloud.talent_v4beta1.gapic.enums' from '/usr/local/lib/python3.7/site-packages/google/cloud/talent_v4beta1/gapic/enums.py'>#
-
classmethod
from_service_account_file
(filename, *args, **kwargs)[source]# Creates an instance of this client using the provided credentials file.
- Parameters
filename (str) – The path to the service account private key json file.
args – Additional arguments to pass to the constructor.
kwargs – Additional arguments to pass to the constructor.
- Returns
The constructed client.
- Return type
-
classmethod
from_service_account_json
(filename, *args, **kwargs)# Creates an instance of this client using the provided credentials file.
- Parameters
filename (str) – The path to the service account private key json file.
args – Additional arguments to pass to the constructor.
kwargs – Additional arguments to pass to the constructor.
- Returns
The constructed client.
- Return type
-
class
google.cloud.talent_v4beta1.
EventServiceClient
(transport=None, channel=None, credentials=None, client_config=None, client_info=None, client_options=None)[source]# A service handles client event report.
Constructor.
- Parameters
(Union[EventServiceGrpcTransport, (transport) – Callable[[~.Credentials, type], ~.EventServiceGrpcTransport]): A transport instance, responsible for actually making the API calls. The default transport uses the gRPC protocol. This argument may also be a callable which returns a transport instance. Callables will be sent the credentials as the first argument and the default transport class as the second argument.
channel (grpc.Channel) – DEPRECATED. A
Channel
instance through which to make calls. This argument is mutually exclusive withcredentials
; providing both will raise an exception.credentials (google.auth.credentials.Credentials) – The authorization credentials to attach to requests. These credentials identify this application to the service. If none are specified, the client will attempt to ascertain the credentials from the environment. This argument is mutually exclusive with providing a transport instance to
transport
; doing so will raise an exception.client_config (dict) – DEPRECATED. A dictionary of call options for each method. If not specified, the default configuration is used.
client_info (google.api_core.gapic_v1.client_info.ClientInfo) – The client info used to send a user-agent string along with API requests. If
None
, then default info will be used. Generally, you only need to set this if you’re developing your own client library.client_options (Union[dict, google.api_core.client_options.ClientOptions]) – Client options used to set user options on the client. API Endpoint should be set through client_options.
-
create_client_event
(parent, client_event, retry=<object object>, timeout=<object object>, metadata=None)[source]# Report events issued when end user interacts with customer’s application that uses Cloud Talent Solution. You may inspect the created events in self service tools. Learn more about self service tools.
Example
>>> from google.cloud import talent_v4beta1 >>> >>> client = talent_v4beta1.EventServiceClient() >>> >>> parent = client.tenant_path('[PROJECT]', '[TENANT]') >>> >>> # TODO: Initialize `client_event`: >>> client_event = {} >>> >>> response = client.create_client_event(parent, client_event)
- Parameters
parent (str) –
Required. Resource name of the tenant under which the event is created.
The format is “projects/{project_id}/tenants/{tenant_id}”, for example, “projects/foo/tenant/bar”. If tenant id is unspecified, a default tenant is created, for example, “projects/foo”.
client_event (Union[dict, ClientEvent]) –
Required. Events issued when end user interacts with customer’s application that uses Cloud Talent Solution.
If a dict is provided, it must be of the same form as the protobuf message
ClientEvent
retry (Optional[google.api_core.retry.Retry]) – A retry object used to retry requests. If
None
is specified, requests will be retried using a default configuration.timeout (Optional[float]) – The amount of time, in seconds, to wait for the request to complete. Note that if
retry
is specified, the timeout applies to each individual attempt.metadata (Optional[Sequence[Tuple[str, str]]]) – Additional metadata that is provided to the method.
- Returns
A
ClientEvent
instance.- Raises
google.api_core.exceptions.GoogleAPICallError – If the request failed for any reason.
google.api_core.exceptions.RetryError – If the request failed due to a retryable error and retry attempts failed.
ValueError – If the parameters are invalid.
-
enums
= <module 'google.cloud.talent_v4beta1.gapic.enums' from '/usr/local/lib/python3.7/site-packages/google/cloud/talent_v4beta1/gapic/enums.py'>#
-
classmethod
from_service_account_file
(filename, *args, **kwargs)[source]# Creates an instance of this client using the provided credentials file.
- Parameters
filename (str) – The path to the service account private key json file.
args – Additional arguments to pass to the constructor.
kwargs – Additional arguments to pass to the constructor.
- Returns
The constructed client.
- Return type
-
classmethod
from_service_account_json
(filename, *args, **kwargs)# Creates an instance of this client using the provided credentials file.
- Parameters
filename (str) – The path to the service account private key json file.
args – Additional arguments to pass to the constructor.
kwargs – Additional arguments to pass to the constructor.
- Returns
The constructed client.
- Return type
-
class
google.cloud.talent_v4beta1.
JobServiceClient
(transport=None, channel=None, credentials=None, client_config=None, client_info=None, client_options=None)[source]# A service handles job management, including job CRUD, enumeration and search.
Constructor.
- Parameters
(Union[JobServiceGrpcTransport, (transport) – Callable[[~.Credentials, type], ~.JobServiceGrpcTransport]): A transport instance, responsible for actually making the API calls. The default transport uses the gRPC protocol. This argument may also be a callable which returns a transport instance. Callables will be sent the credentials as the first argument and the default transport class as the second argument.
channel (grpc.Channel) – DEPRECATED. A
Channel
instance through which to make calls. This argument is mutually exclusive withcredentials
; providing both will raise an exception.credentials (google.auth.credentials.Credentials) – The authorization credentials to attach to requests. These credentials identify this application to the service. If none are specified, the client will attempt to ascertain the credentials from the environment. This argument is mutually exclusive with providing a transport instance to
transport
; doing so will raise an exception.client_config (dict) – DEPRECATED. A dictionary of call options for each method. If not specified, the default configuration is used.
client_info (google.api_core.gapic_v1.client_info.ClientInfo) – The client info used to send a user-agent string along with API requests. If
None
, then default info will be used. Generally, you only need to set this if you’re developing your own client library.client_options (Union[dict, google.api_core.client_options.ClientOptions]) – Client options used to set user options on the client. API Endpoint should be set through client_options.
-
batch_create_jobs
(parent, jobs, retry=<object object>, timeout=<object object>, metadata=None)[source]# Begins executing a batch create jobs operation.
Example
>>> from google.cloud import talent_v4beta1 >>> >>> client = talent_v4beta1.JobServiceClient() >>> >>> parent = client.tenant_path('[PROJECT]', '[TENANT]') >>> >>> # TODO: Initialize `jobs`: >>> jobs = [] >>> >>> response = client.batch_create_jobs(parent, jobs) >>> >>> def callback(operation_future): ... # Handle result. ... result = operation_future.result() >>> >>> response.add_done_callback(callback) >>> >>> # Handle metadata. >>> metadata = response.metadata()
- Parameters
parent (str) –
Required. The resource name of the tenant under which the job is created.
The format is “projects/{project_id}/tenants/{tenant_id}”. For example, “projects/foo/tenant/bar”. If tenant id is unspecified, a default tenant is created. For example, “projects/foo”.
jobs (list[Union[dict, Job]]) –
Required. The jobs to be created.
If a dict is provided, it must be of the same form as the protobuf message
Job
retry (Optional[google.api_core.retry.Retry]) – A retry object used to retry requests. If
None
is specified, requests will be retried using a default configuration.timeout (Optional[float]) – The amount of time, in seconds, to wait for the request to complete. Note that if
retry
is specified, the timeout applies to each individual attempt.metadata (Optional[Sequence[Tuple[str, str]]]) – Additional metadata that is provided to the method.
- Returns
A
_OperationFuture
instance.- Raises
google.api_core.exceptions.GoogleAPICallError – If the request failed for any reason.
google.api_core.exceptions.RetryError – If the request failed due to a retryable error and retry attempts failed.
ValueError – If the parameters are invalid.
-
batch_delete_jobs
(parent, filter_, retry=<object object>, timeout=<object object>, metadata=None)[source]# Deletes a list of
Job
s by filter.Example
>>> from google.cloud import talent_v4beta1 >>> >>> client = talent_v4beta1.JobServiceClient() >>> >>> parent = client.tenant_path('[PROJECT]', '[TENANT]') >>> >>> # TODO: Initialize `filter_`: >>> filter_ = '' >>> >>> client.batch_delete_jobs(parent, filter_)
- Parameters
parent (str) –
Required. The resource name of the tenant under which the job is created.
The format is “projects/{project_id}/tenants/{tenant_id}”. For example, “projects/foo/tenant/bar”. If tenant id is unspecified, a default tenant is created. For example, “projects/foo”.
filter_ (str) –
Required. The filter string specifies the jobs to be deleted.
Supported operator: =, AND
The fields eligible for filtering are:
companyName
(Required)requisitionId
(Required)
Sample Query: companyName = “projects/foo/companies/bar” AND requisitionId = “req-1”
retry (Optional[google.api_core.retry.Retry]) – A retry object used to retry requests. If
None
is specified, requests will be retried using a default configuration.timeout (Optional[float]) – The amount of time, in seconds, to wait for the request to complete. Note that if
retry
is specified, the timeout applies to each individual attempt.metadata (Optional[Sequence[Tuple[str, str]]]) – Additional metadata that is provided to the method.
- Raises
google.api_core.exceptions.GoogleAPICallError – If the request failed for any reason.
google.api_core.exceptions.RetryError – If the request failed due to a retryable error and retry attempts failed.
ValueError – If the parameters are invalid.
-
batch_update_jobs
(parent, jobs, update_mask=None, retry=<object object>, timeout=<object object>, metadata=None)[source]# Begins executing a batch update jobs operation.
Example
>>> from google.cloud import talent_v4beta1 >>> >>> client = talent_v4beta1.JobServiceClient() >>> >>> parent = client.tenant_path('[PROJECT]', '[TENANT]') >>> >>> # TODO: Initialize `jobs`: >>> jobs = [] >>> >>> response = client.batch_update_jobs(parent, jobs) >>> >>> def callback(operation_future): ... # Handle result. ... result = operation_future.result() >>> >>> response.add_done_callback(callback) >>> >>> # Handle metadata. >>> metadata = response.metadata()
- Parameters
parent (str) –
Required. The resource name of the tenant under which the job is created.
The format is “projects/{project_id}/tenants/{tenant_id}”. For example, “projects/foo/tenant/bar”. If tenant id is unspecified, a default tenant is created. For example, “projects/foo”.
jobs (list[Union[dict, Job]]) –
The jobs to be updated.
If a dict is provided, it must be of the same form as the protobuf message
Job
update_mask (Union[dict, FieldMask]) –
Strongly recommended for the best service experience. Be aware that it will also increase latency when checking the status of a batch operation.
If
update_mask
is provided, only the specified fields inJob
are updated. Otherwise all the fields are updated.A field mask to restrict the fields that are updated. Only top level fields of
Job
are supported.If
update_mask
is provided, TheJob
insideJobResult
will only contains fields that is updated, plus the Id of the Job. Otherwise,Job
will include all fields, which can yield a very large response.If a dict is provided, it must be of the same form as the protobuf message
FieldMask
retry (Optional[google.api_core.retry.Retry]) – A retry object used to retry requests. If
None
is specified, requests will be retried using a default configuration.timeout (Optional[float]) – The amount of time, in seconds, to wait for the request to complete. Note that if
retry
is specified, the timeout applies to each individual attempt.metadata (Optional[Sequence[Tuple[str, str]]]) – Additional metadata that is provided to the method.
- Returns
A
_OperationFuture
instance.- Raises
google.api_core.exceptions.GoogleAPICallError – If the request failed for any reason.
google.api_core.exceptions.RetryError – If the request failed due to a retryable error and retry attempts failed.
ValueError – If the parameters are invalid.
-
classmethod
company_path
(project, tenant, company)[source]# Return a fully-qualified company string.
-
classmethod
company_without_tenant_path
(project, company)[source]# Return a fully-qualified company_without_tenant string.
-
create_job
(parent, job, retry=<object object>, timeout=<object object>, metadata=None)[source]# Creates a new job.
Typically, the job becomes searchable within 10 seconds, but it may take up to 5 minutes.
Example
>>> from google.cloud import talent_v4beta1 >>> >>> client = talent_v4beta1.JobServiceClient() >>> >>> parent = client.tenant_path('[PROJECT]', '[TENANT]') >>> >>> # TODO: Initialize `job`: >>> job = {} >>> >>> response = client.create_job(parent, job)
- Parameters
parent (str) –
Required. The resource name of the tenant under which the job is created.
The format is “projects/{project_id}/tenants/{tenant_id}”. For example, “projects/foo/tenant/bar”. If tenant id is unspecified a default tenant is created. For example, “projects/foo”.
Required. The Job to be created.
If a dict is provided, it must be of the same form as the protobuf message
Job
retry (Optional[google.api_core.retry.Retry]) – A retry object used to retry requests. If
None
is specified, requests will be retried using a default configuration.timeout (Optional[float]) – The amount of time, in seconds, to wait for the request to complete. Note that if
retry
is specified, the timeout applies to each individual attempt.metadata (Optional[Sequence[Tuple[str, str]]]) – Additional metadata that is provided to the method.
- Returns
A
Job
instance.- Raises
google.api_core.exceptions.GoogleAPICallError – If the request failed for any reason.
google.api_core.exceptions.RetryError – If the request failed due to a retryable error and retry attempts failed.
ValueError – If the parameters are invalid.
-
delete_job
(name, retry=<object object>, timeout=<object object>, metadata=None)[source]# Deletes the specified job.
Typically, the job becomes unsearchable within 10 seconds, but it may take up to 5 minutes.
Example
>>> from google.cloud import talent_v4beta1 >>> >>> client = talent_v4beta1.JobServiceClient() >>> >>> name = client.job_path('[PROJECT]', '[TENANT]', '[JOBS]') >>> >>> client.delete_job(name)
- Parameters
name (str) –
Required. The resource name of the job to be deleted.
The format is “projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}”. For example, “projects/foo/tenants/bar/jobs/baz”.
If tenant id is unspecified, the default tenant is used. For example, “projects/foo/jobs/bar”.
retry (Optional[google.api_core.retry.Retry]) – A retry object used to retry requests. If
None
is specified, requests will be retried using a default configuration.timeout (Optional[float]) – The amount of time, in seconds, to wait for the request to complete. Note that if
retry
is specified, the timeout applies to each individual attempt.metadata (Optional[Sequence[Tuple[str, str]]]) – Additional metadata that is provided to the method.
- Raises
google.api_core.exceptions.GoogleAPICallError – If the request failed for any reason.
google.api_core.exceptions.RetryError – If the request failed due to a retryable error and retry attempts failed.
ValueError – If the parameters are invalid.
-
enums
= <module 'google.cloud.talent_v4beta1.gapic.enums' from '/usr/local/lib/python3.7/site-packages/google/cloud/talent_v4beta1/gapic/enums.py'>#
-
classmethod
from_service_account_file
(filename, *args, **kwargs)[source]# Creates an instance of this client using the provided credentials file.
- Parameters
filename (str) – The path to the service account private key json file.
args – Additional arguments to pass to the constructor.
kwargs – Additional arguments to pass to the constructor.
- Returns
The constructed client.
- Return type
-
classmethod
from_service_account_json
(filename, *args, **kwargs)# Creates an instance of this client using the provided credentials file.
- Parameters
filename (str) – The path to the service account private key json file.
args – Additional arguments to pass to the constructor.
kwargs – Additional arguments to pass to the constructor.
- Returns
The constructed client.
- Return type
-
get_job
(name, retry=<object object>, timeout=<object object>, metadata=None)[source]# Retrieves the specified job, whose status is OPEN or recently EXPIRED within the last 90 days.
Example
>>> from google.cloud import talent_v4beta1 >>> >>> client = talent_v4beta1.JobServiceClient() >>> >>> name = client.job_path('[PROJECT]', '[TENANT]', '[JOBS]') >>> >>> response = client.get_job(name)
- Parameters
name (str) –
Required. The resource name of the job to retrieve.
The format is “projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}”. For example, “projects/foo/tenants/bar/jobs/baz”.
If tenant id is unspecified, the default tenant is used. For example, “projects/foo/jobs/bar”.
retry (Optional[google.api_core.retry.Retry]) – A retry object used to retry requests. If
None
is specified, requests will be retried using a default configuration.timeout (Optional[float]) – The amount of time, in seconds, to wait for the request to complete. Note that if
retry
is specified, the timeout applies to each individual attempt.metadata (Optional[Sequence[Tuple[str, str]]]) – Additional metadata that is provided to the method.
- Returns
A
Job
instance.- Raises
google.api_core.exceptions.GoogleAPICallError – If the request failed for any reason.
google.api_core.exceptions.RetryError – If the request failed due to a retryable error and retry attempts failed.
ValueError – If the parameters are invalid.
-
classmethod
job_without_tenant_path
(project, jobs)[source]# Return a fully-qualified job_without_tenant string.
-
list_jobs
(parent, filter_, page_size=None, job_view=None, retry=<object object>, timeout=<object object>, metadata=None)[source]# Lists jobs by filter.
Example
>>> from google.cloud import talent_v4beta1 >>> >>> client = talent_v4beta1.JobServiceClient() >>> >>> parent = client.tenant_path('[PROJECT]', '[TENANT]') >>> >>> # TODO: Initialize `filter_`: >>> filter_ = '' >>> >>> # Iterate over all results >>> for element in client.list_jobs(parent, filter_): ... # process element ... pass >>> >>> >>> # Alternatively: >>> >>> # Iterate over results one page at a time >>> for page in client.list_jobs(parent, filter_).pages: ... for element in page: ... # process element ... pass
- Parameters
parent (str) –
Required. The resource name of the tenant under which the job is created.
The format is “projects/{project_id}/tenants/{tenant_id}”. For example, “projects/foo/tenant/bar”. If tenant id is unspecified, a default tenant is created. For example, “projects/foo”.
filter_ (str) –
Required. The filter string specifies the jobs to be enumerated.
Supported operator: =, AND
The fields eligible for filtering are:
companyName
(Required)requisitionId
status
Available values: OPEN, EXPIRED, ALL. Defaults to OPEN if no value is specified.
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”
page_size (int) – The maximum number of resources contained in the underlying API response. If page streaming is performed per- resource, this parameter does not affect the return value. If page streaming is performed per-page, this determines the maximum number of resources in a page.
job_view (JobView) – The desired job attributes returned for jobs in the search response. Defaults to
JobView.JOB_VIEW_FULL
if no value is specified.retry (Optional[google.api_core.retry.Retry]) – A retry object used to retry requests. If
None
is specified, requests will be retried using a default configuration.timeout (Optional[float]) – The amount of time, in seconds, to wait for the request to complete. Note that if
retry
is specified, the timeout applies to each individual attempt.metadata (Optional[Sequence[Tuple[str, str]]]) – Additional metadata that is provided to the method.
- Returns
A
PageIterator
instance. An iterable ofJob
instances. You can also iterate over the pages of the response using its pages property.- Raises
google.api_core.exceptions.GoogleAPICallError – If the request failed for any reason.
google.api_core.exceptions.RetryError – If the request failed due to a retryable error and retry attempts failed.
ValueError – If the parameters are invalid.
-
search_jobs
(parent, request_metadata, search_mode=None, job_query=None, enable_broadening=None, require_precise_result_size=None, histogram_queries=None, job_view=None, offset=None, page_size=None, order_by=None, diversification_level=None, custom_ranking_info=None, disable_keyword_match=None, retry=<object object>, timeout=<object object>, metadata=None)[source]# Searches for jobs using the provided
SearchJobsRequest
.This call constrains the
visibility
of jobs present in the database, and only returns jobs that the caller has permission to search against.Example
>>> from google.cloud import talent_v4beta1 >>> >>> client = talent_v4beta1.JobServiceClient() >>> >>> parent = client.tenant_path('[PROJECT]', '[TENANT]') >>> >>> # TODO: Initialize `request_metadata`: >>> request_metadata = {} >>> >>> # Iterate over all results >>> for element in client.search_jobs(parent, request_metadata): ... # process element ... pass >>> >>> >>> # Alternatively: >>> >>> # Iterate over results one page at a time >>> for page in client.search_jobs(parent, request_metadata).pages: ... for element in page: ... # process element ... pass
- Parameters
parent (str) –
Required. The resource name of the tenant to search within.
The format is “projects/{project_id}/tenants/{tenant_id}”. For example, “projects/foo/tenant/bar”. If tenant id is unspecified, a default tenant is created. For example, “projects/foo”.
request_metadata (Union[dict, RequestMetadata]) –
Required. The meta information collected about the job searcher, used to improve the search quality of the service. The identifiers (such as
user_id
) are provided by users, and must be unique and consistent.If a dict is provided, it must be of the same form as the protobuf message
RequestMetadata
search_mode (SearchMode) –
Mode of a search.
Defaults to
SearchMode.JOB_SEARCH
.job_query (Union[dict, JobQuery]) –
Query used to search against jobs, such as keyword, location filters, etc.
If a dict is provided, it must be of the same form as the protobuf message
JobQuery
enable_broadening (bool) –
Controls whether to broaden the search when it produces sparse results. Broadened queries append results to the end of the matching results list.
Defaults to false.
require_precise_result_size (bool) –
Controls if the search job request requires the return of a precise count of the first 300 results. Setting this to
true
ensures consistency in the number of results per page. Best practice is to set this value to true if a client allows users to jump directly to a non-sequential search results page.Enabling this flag may adversely impact performance.
Defaults to false.
histogram_queries (list[Union[dict, HistogramQuery]]) –
An expression specifies a histogram request against matching jobs.
Expression syntax is an aggregation function call with histogram facets and other options.
Available aggregation function calls are:
count(string_histogram_facet)
: Count the number of matching entities, for each distinct attribute value.count(numeric_histogram_facet, list of buckets)
: Count the number of matching entities within each bucket.
Data types:
Histogram facet: facet names with format [a-zA-Z][a-zA-Z0-9_]+.
String: string like “any string with backslash escape for quote(“).”
Number: whole number and floating point number like 10, -1 and -0.01.
List: list of elements with comma(,) separator surrounded by square brackets, for example, [1, 2, 3] and [“one”, “two”, “three”].
Built-in constants:
MIN (minimum number similar to java Double.MIN_VALUE)
MAX (maximum number similar to java Double.MAX_VALUE)
Built-in functions:
bucket(start, end[, label]): bucket built-in function creates a bucket with range of `start, end). Note that the end is exclusive, for example, bucket(1, MAX, “positive number”) or bucket(1, 10).
Job histogram facets:
company_display_name: histogram by [Job.company_display_name`.
employment_type: histogram by
Job.employment_types
, for example, “FULL_TIME”, “PART_TIME”.company_size: histogram by
CompanySize
, for example, “SMALL”, “MEDIUM”, “BIG”.publish_time_in_month: histogram by the
Job.posting_publish_time
in months. Must specify list of numeric buckets in spec.publish_time_in_year: histogram by the
Job.posting_publish_time
in years. Must specify list of numeric buckets in spec.degree_types: histogram by the
Job.degree_types
, for example, “Bachelors”, “Masters”.job_level: histogram by the
Job.job_level
, for example, “Entry Level”.country: histogram by the country code of jobs, for example, “US”, “FR”.
admin1: histogram by the admin1 code of jobs, which is a global placeholder referring to the state, province, or the particular term a country uses to define the geographic structure below the country level, for example, “CA”, “IL”.
city: histogram by a combination of the “city name, admin1 code”. For example, “Mountain View, CA”, “New York, NY”.
admin1_country: histogram by a combination of the “admin1 code, country”, for example, “CA, US”, “IL, US”.
city_coordinate: histogram by the city center’s GPS coordinates (latitude and longitude), for example, 37.4038522,-122.0987765. Since the coordinates of a city center can change, customers may need to refresh them periodically.
locale: histogram by the
Job.language_code
, for example, “en-US”, “fr-FR”.language: histogram by the language subtag of the
Job.language_code
, for example, “en”, “fr”.category: histogram by the
JobCategory
, for example, “COMPUTER_AND_IT”, “HEALTHCARE”.base_compensation_unit: histogram by the
CompensationInfo.CompensationUnit
of base salary, for example, “WEEKLY”, “MONTHLY”.base_compensation: histogram by the base salary. Must specify list of numeric buckets to group results by.
annualized_base_compensation: histogram by the base annualized salary. Must specify list of numeric buckets to group results by.
annualized_total_compensation: histogram by the total annualized salary. Must specify list of numeric buckets to group results by.
string_custom_attribute: histogram by string
Job.custom_attributes
. Values can be accessed via square bracket notations like string_custom_attribute[“key1”].numeric_custom_attribute: histogram by numeric
Job.custom_attributes
. Values can be accessed via square bracket notations like numeric_custom_attribute[“key1”]. Must specify list of numeric buckets to group results by.
Example expressions:
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"])
If a dict is provided, it must be of the same form as the protobuf message
HistogramQuery
job_view (JobView) – The desired job attributes returned for jobs in the search response. Defaults to
JobView.JOB_VIEW_SMALL
if no value is specified.offset (int) –
An integer that specifies the current offset (that is, starting result location, amongst the jobs deemed by the API as relevant) in search results. This field is only considered if
page_token
is unset.For example, 0 means to return results starting from the first matching job, and 10 means to return from the 11th job. This can be used for pagination, (for example, pageSize = 10 and offset = 10 means to return from the second page).
page_size (int) – The maximum number of resources contained in the underlying API response. If page streaming is performed per- resource, this parameter does not affect the return value. If page streaming is performed per-page, this determines the maximum number of resources in a page.
order_by (str) –
The criteria determining how search results are sorted. Default is
"relevance desc"
.Supported options are:
"relevance desc"
: By relevance descending, as determined by the API algorithms. Relevance thresholding of query results is only available with this ordering."posting_publish_time desc"
: ByJob.posting_publish_time
descending."posting_update_time desc"
: ByJob.posting_update_time
descending."title"
: ByJob.title
ascending."title desc"
: ByJob.title
descending."annualized_base_compensation"
: By job’sCompensationInfo.annualized_base_compensation_range
ascending. Jobs whose annualized base compensation is unspecified are put at the end of search results."annualized_base_compensation desc"
: By job’sCompensationInfo.annualized_base_compensation_range
descending. Jobs whose annualized base compensation is unspecified are put at the end of search results."annualized_total_compensation"
: By job’sCompensationInfo.annualized_total_compensation_range
ascending. Jobs whose annualized base compensation is unspecified are put at the end of search results."annualized_total_compensation desc"
: By job’sCompensationInfo.annualized_total_compensation_range
descending. Jobs whose annualized base compensation is unspecified are put at the end of search results."custom_ranking desc"
: By the relevance score adjusted to theSearchJobsRequest.CustomRankingInfo.ranking_expression
with weight factor assigned bySearchJobsRequest.CustomRankingInfo.importance_level
in descending order.Location sorting: Use the special syntax to order jobs by distance:
"distance_from('Hawaii')"
: Order by distance from Hawaii."distance_from(19.89, 155.5)"
: Order by distance from a coordinate."distance_from('Hawaii'), distance_from('Puerto Rico')"
: Order by multiple locations. See details below."distance_from('Hawaii'), distance_from(19.89, 155.5)"
: Order by multiple locations. See details below. The string can have a maximum of 256 characters. When multiple distance centers are provided, a job that is close to any of the distance centers would have a high rank. When a job has multiple locations, the job location closest to one of the distance centers will be used. Jobs that don’t have locations will be ranked at the bottom. Distance is calculated with a precision of 11.3 meters (37.4 feet). Diversification strategy is still applied unless explicitly disabled indiversification_level
.
diversification_level (DiversificationLevel) –
Controls whether highly similar jobs are returned next to each other in the search results. Jobs are identified as highly similar based on their titles, job categories, and locations. Highly similar results are clustered so that only one representative job of the cluster is displayed to the job seeker higher up in the results, with the other jobs being displayed lower down in the results.
Defaults to
DiversificationLevel.SIMPLE
if no value is specified.custom_ranking_info (Union[dict, CustomRankingInfo]) –
Controls over how job documents get ranked on top of existing relevance score (determined by API algorithm).
If a dict is provided, it must be of the same form as the protobuf message
CustomRankingInfo
disable_keyword_match (bool) –
Controls whether to disable exact keyword match on
Job.title
,Job.description
,Job.company_display_name
,Job.addresses
,Job.qualifications
. When disable keyword match is turned off, a keyword match returns jobs that do not match given category filters when there are matching keywords. For example, for the query “program manager,” a result is returned even if the job posting has the title “software developer,” which doesn’t fall into “program manager” ontology, but does have “program manager” appearing in its description.For queries like “cloud” that don’t contain title or location specific ontology, jobs with “cloud” keyword matches are returned regardless of this flag’s value.
Use
Company.keyword_searchable_job_custom_attributes
if company-specific globally matched custom field/attribute string values are needed. Enabling keyword match improves recall of subsequent search requests.Defaults to false.
retry (Optional[google.api_core.retry.Retry]) – A retry object used to retry requests. If
None
is specified, requests will be retried using a default configuration.timeout (Optional[float]) – The amount of time, in seconds, to wait for the request to complete. Note that if
retry
is specified, the timeout applies to each individual attempt.metadata (Optional[Sequence[Tuple[str, str]]]) – Additional metadata that is provided to the method.
- Returns
A
PageIterator
instance. An iterable ofMatchingJob
instances. You can also iterate over the pages of the response using its pages property.- Raises
google.api_core.exceptions.GoogleAPICallError – If the request failed for any reason.
google.api_core.exceptions.RetryError – If the request failed due to a retryable error and retry attempts failed.
ValueError – If the parameters are invalid.
-
search_jobs_for_alert
(parent, request_metadata, search_mode=None, job_query=None, enable_broadening=None, require_precise_result_size=None, histogram_queries=None, job_view=None, offset=None, page_size=None, order_by=None, diversification_level=None, custom_ranking_info=None, disable_keyword_match=None, retry=<object object>, timeout=<object object>, metadata=None)[source]# Searches for jobs using the provided
SearchJobsRequest
.This API call is intended for the use case of targeting passive job seekers (for example, job seekers who have signed up to receive email alerts about potential job opportunities), and has different algorithmic adjustments that are targeted to passive job seekers.
This call constrains the
visibility
of jobs present in the database, and only returns jobs the caller has permission to search against.Example
>>> from google.cloud import talent_v4beta1 >>> >>> client = talent_v4beta1.JobServiceClient() >>> >>> parent = client.tenant_path('[PROJECT]', '[TENANT]') >>> >>> # TODO: Initialize `request_metadata`: >>> request_metadata = {} >>> >>> # Iterate over all results >>> for element in client.search_jobs_for_alert(parent, request_metadata): ... # process element ... pass >>> >>> >>> # Alternatively: >>> >>> # Iterate over results one page at a time >>> for page in client.search_jobs_for_alert(parent, request_metadata).pages: ... for element in page: ... # process element ... pass
- Parameters
parent (str) –
Required. The resource name of the tenant to search within.
The format is “projects/{project_id}/tenants/{tenant_id}”. For example, “projects/foo/tenant/bar”. If tenant id is unspecified, a default tenant is created. For example, “projects/foo”.
request_metadata (Union[dict, RequestMetadata]) –
Required. The meta information collected about the job searcher, used to improve the search quality of the service. The identifiers (such as
user_id
) are provided by users, and must be unique and consistent.If a dict is provided, it must be of the same form as the protobuf message
RequestMetadata
search_mode (SearchMode) –
Mode of a search.
Defaults to
SearchMode.JOB_SEARCH
.job_query (Union[dict, JobQuery]) –
Query used to search against jobs, such as keyword, location filters, etc.
If a dict is provided, it must be of the same form as the protobuf message
JobQuery
enable_broadening (bool) –
Controls whether to broaden the search when it produces sparse results. Broadened queries append results to the end of the matching results list.
Defaults to false.
require_precise_result_size (bool) –
Controls if the search job request requires the return of a precise count of the first 300 results. Setting this to
true
ensures consistency in the number of results per page. Best practice is to set this value to true if a client allows users to jump directly to a non-sequential search results page.Enabling this flag may adversely impact performance.
Defaults to false.
histogram_queries (list[Union[dict, HistogramQuery]]) –
An expression specifies a histogram request against matching jobs.
Expression syntax is an aggregation function call with histogram facets and other options.
Available aggregation function calls are:
count(string_histogram_facet)
: Count the number of matching entities, for each distinct attribute value.count(numeric_histogram_facet, list of buckets)
: Count the number of matching entities within each bucket.
Data types:
Histogram facet: facet names with format [a-zA-Z][a-zA-Z0-9_]+.
String: string like “any string with backslash escape for quote(“).”
Number: whole number and floating point number like 10, -1 and -0.01.
List: list of elements with comma(,) separator surrounded by square brackets, for example, [1, 2, 3] and [“one”, “two”, “three”].
Built-in constants:
MIN (minimum number similar to java Double.MIN_VALUE)
MAX (maximum number similar to java Double.MAX_VALUE)
Built-in functions:
bucket(start, end[, label]): bucket built-in function creates a bucket with range of `start, end). Note that the end is exclusive, for example, bucket(1, MAX, “positive number”) or bucket(1, 10).
Job histogram facets:
company_display_name: histogram by [Job.company_display_name`.
employment_type: histogram by
Job.employment_types
, for example, “FULL_TIME”, “PART_TIME”.company_size: histogram by
CompanySize
, for example, “SMALL”, “MEDIUM”, “BIG”.publish_time_in_month: histogram by the
Job.posting_publish_time
in months. Must specify list of numeric buckets in spec.publish_time_in_year: histogram by the
Job.posting_publish_time
in years. Must specify list of numeric buckets in spec.degree_types: histogram by the
Job.degree_types
, for example, “Bachelors”, “Masters”.job_level: histogram by the
Job.job_level
, for example, “Entry Level”.country: histogram by the country code of jobs, for example, “US”, “FR”.
admin1: histogram by the admin1 code of jobs, which is a global placeholder referring to the state, province, or the particular term a country uses to define the geographic structure below the country level, for example, “CA”, “IL”.
city: histogram by a combination of the “city name, admin1 code”. For example, “Mountain View, CA”, “New York, NY”.
admin1_country: histogram by a combination of the “admin1 code, country”, for example, “CA, US”, “IL, US”.
city_coordinate: histogram by the city center’s GPS coordinates (latitude and longitude), for example, 37.4038522,-122.0987765. Since the coordinates of a city center can change, customers may need to refresh them periodically.
locale: histogram by the
Job.language_code
, for example, “en-US”, “fr-FR”.language: histogram by the language subtag of the
Job.language_code
, for example, “en”, “fr”.category: histogram by the
JobCategory
, for example, “COMPUTER_AND_IT”, “HEALTHCARE”.base_compensation_unit: histogram by the
CompensationInfo.CompensationUnit
of base salary, for example, “WEEKLY”, “MONTHLY”.base_compensation: histogram by the base salary. Must specify list of numeric buckets to group results by.
annualized_base_compensation: histogram by the base annualized salary. Must specify list of numeric buckets to group results by.
annualized_total_compensation: histogram by the total annualized salary. Must specify list of numeric buckets to group results by.
string_custom_attribute: histogram by string
Job.custom_attributes
. Values can be accessed via square bracket notations like string_custom_attribute[“key1”].numeric_custom_attribute: histogram by numeric
Job.custom_attributes
. Values can be accessed via square bracket notations like numeric_custom_attribute[“key1”]. Must specify list of numeric buckets to group results by.
Example expressions:
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"])
If a dict is provided, it must be of the same form as the protobuf message
HistogramQuery
job_view (JobView) – The desired job attributes returned for jobs in the search response. Defaults to
JobView.JOB_VIEW_SMALL
if no value is specified.offset (int) –
An integer that specifies the current offset (that is, starting result location, amongst the jobs deemed by the API as relevant) in search results. This field is only considered if
page_token
is unset.For example, 0 means to return results starting from the first matching job, and 10 means to return from the 11th job. This can be used for pagination, (for example, pageSize = 10 and offset = 10 means to return from the second page).
page_size (int) – The maximum number of resources contained in the underlying API response. If page streaming is performed per- resource, this parameter does not affect the return value. If page streaming is performed per-page, this determines the maximum number of resources in a page.
order_by (str) –
The criteria determining how search results are sorted. Default is
"relevance desc"
.Supported options are:
"relevance desc"
: By relevance descending, as determined by the API algorithms. Relevance thresholding of query results is only available with this ordering."posting_publish_time desc"
: ByJob.posting_publish_time
descending."posting_update_time desc"
: ByJob.posting_update_time
descending."title"
: ByJob.title
ascending."title desc"
: ByJob.title
descending."annualized_base_compensation"
: By job’sCompensationInfo.annualized_base_compensation_range
ascending. Jobs whose annualized base compensation is unspecified are put at the end of search results."annualized_base_compensation desc"
: By job’sCompensationInfo.annualized_base_compensation_range
descending. Jobs whose annualized base compensation is unspecified are put at the end of search results."annualized_total_compensation"
: By job’sCompensationInfo.annualized_total_compensation_range
ascending. Jobs whose annualized base compensation is unspecified are put at the end of search results."annualized_total_compensation desc"
: By job’sCompensationInfo.annualized_total_compensation_range
descending. Jobs whose annualized base compensation is unspecified are put at the end of search results."custom_ranking desc"
: By the relevance score adjusted to theSearchJobsRequest.CustomRankingInfo.ranking_expression
with weight factor assigned bySearchJobsRequest.CustomRankingInfo.importance_level
in descending order.Location sorting: Use the special syntax to order jobs by distance:
"distance_from('Hawaii')"
: Order by distance from Hawaii."distance_from(19.89, 155.5)"
: Order by distance from a coordinate."distance_from('Hawaii'), distance_from('Puerto Rico')"
: Order by multiple locations. See details below."distance_from('Hawaii'), distance_from(19.89, 155.5)"
: Order by multiple locations. See details below. The string can have a maximum of 256 characters. When multiple distance centers are provided, a job that is close to any of the distance centers would have a high rank. When a job has multiple locations, the job location closest to one of the distance centers will be used. Jobs that don’t have locations will be ranked at the bottom. Distance is calculated with a precision of 11.3 meters (37.4 feet). Diversification strategy is still applied unless explicitly disabled indiversification_level
.
diversification_level (DiversificationLevel) –
Controls whether highly similar jobs are returned next to each other in the search results. Jobs are identified as highly similar based on their titles, job categories, and locations. Highly similar results are clustered so that only one representative job of the cluster is displayed to the job seeker higher up in the results, with the other jobs being displayed lower down in the results.
Defaults to
DiversificationLevel.SIMPLE
if no value is specified.custom_ranking_info (Union[dict, CustomRankingInfo]) –
Controls over how job documents get ranked on top of existing relevance score (determined by API algorithm).
If a dict is provided, it must be of the same form as the protobuf message
CustomRankingInfo
disable_keyword_match (bool) –
Controls whether to disable exact keyword match on
Job.title
,Job.description
,Job.company_display_name
,Job.addresses
,Job.qualifications
. When disable keyword match is turned off, a keyword match returns jobs that do not match given category filters when there are matching keywords. For example, for the query “program manager,” a result is returned even if the job posting has the title “software developer,” which doesn’t fall into “program manager” ontology, but does have “program manager” appearing in its description.For queries like “cloud” that don’t contain title or location specific ontology, jobs with “cloud” keyword matches are returned regardless of this flag’s value.
Use
Company.keyword_searchable_job_custom_attributes
if company-specific globally matched custom field/attribute string values are needed. Enabling keyword match improves recall of subsequent search requests.Defaults to false.
retry (Optional[google.api_core.retry.Retry]) – A retry object used to retry requests. If
None
is specified, requests will be retried using a default configuration.timeout (Optional[float]) – The amount of time, in seconds, to wait for the request to complete. Note that if
retry
is specified, the timeout applies to each individual attempt.metadata (Optional[Sequence[Tuple[str, str]]]) – Additional metadata that is provided to the method.
- Returns
A
PageIterator
instance. An iterable ofMatchingJob
instances. You can also iterate over the pages of the response using its pages property.- Raises
google.api_core.exceptions.GoogleAPICallError – If the request failed for any reason.
google.api_core.exceptions.RetryError – If the request failed due to a retryable error and retry attempts failed.
ValueError – If the parameters are invalid.
-
update_job
(job, update_mask=None, retry=<object object>, timeout=<object object>, metadata=None)[source]# Updates specified job.
Typically, updated contents become visible in search results within 10 seconds, but it may take up to 5 minutes.
Example
>>> from google.cloud import talent_v4beta1 >>> >>> client = talent_v4beta1.JobServiceClient() >>> >>> # TODO: Initialize `job`: >>> job = {} >>> >>> response = client.update_job(job)
- Parameters
Required. The Job to be updated.
If a dict is provided, it must be of the same form as the protobuf message
Job
update_mask (Union[dict, FieldMask]) –
Strongly recommended for the best service experience.
If
update_mask
is provided, only the specified fields injob
are updated. Otherwise all the fields are updated.A field mask to restrict the fields that are updated. Only top level fields of
Job
are supported.If a dict is provided, it must be of the same form as the protobuf message
FieldMask
retry (Optional[google.api_core.retry.Retry]) – A retry object used to retry requests. If
None
is specified, requests will be retried using a default configuration.timeout (Optional[float]) – The amount of time, in seconds, to wait for the request to complete. Note that if
retry
is specified, the timeout applies to each individual attempt.metadata (Optional[Sequence[Tuple[str, str]]]) – Additional metadata that is provided to the method.
- Returns
A
Job
instance.- Raises
google.api_core.exceptions.GoogleAPICallError – If the request failed for any reason.
google.api_core.exceptions.RetryError – If the request failed due to a retryable error and retry attempts failed.
ValueError – If the parameters are invalid.
-
class
google.cloud.talent_v4beta1.
ProfileServiceClient
(transport=None, channel=None, credentials=None, client_config=None, client_info=None, client_options=None)[source]# A service that handles profile management, including profile CRUD, enumeration and search.
Constructor.
- Parameters
(Union[ProfileServiceGrpcTransport, (transport) – Callable[[~.Credentials, type], ~.ProfileServiceGrpcTransport]): A transport instance, responsible for actually making the API calls. The default transport uses the gRPC protocol. This argument may also be a callable which returns a transport instance. Callables will be sent the credentials as the first argument and the default transport class as the second argument.
channel (grpc.Channel) – DEPRECATED. A
Channel
instance through which to make calls. This argument is mutually exclusive withcredentials
; providing both will raise an exception.credentials (google.auth.credentials.Credentials) – The authorization credentials to attach to requests. These credentials identify this application to the service. If none are specified, the client will attempt to ascertain the credentials from the environment. This argument is mutually exclusive with providing a transport instance to
transport
; doing so will raise an exception.client_config (dict) – DEPRECATED. A dictionary of call options for each method. If not specified, the default configuration is used.
client_info (google.api_core.gapic_v1.client_info.ClientInfo) – The client info used to send a user-agent string along with API requests. If
None
, then default info will be used. Generally, you only need to set this if you’re developing your own client library.client_options (Union[dict, google.api_core.client_options.ClientOptions]) – Client options used to set user options on the client. API Endpoint should be set through client_options.
-
create_profile
(parent, profile, retry=<object object>, timeout=<object object>, metadata=None)[source]# Creates and returns a new profile.
Example
>>> from google.cloud import talent_v4beta1 >>> >>> client = talent_v4beta1.ProfileServiceClient() >>> >>> parent = client.tenant_path('[PROJECT]', '[TENANT]') >>> >>> # TODO: Initialize `profile`: >>> profile = {} >>> >>> response = client.create_profile(parent, profile)
- Parameters
parent (str) –
Required. The name of the tenant this profile belongs to.
The format is “projects/{project_id}/tenants/{tenant_id}”. For example, “projects/foo/tenants/bar”.
profile (Union[dict, Profile]) –
Required. The profile to be created.
If a dict is provided, it must be of the same form as the protobuf message
Profile
retry (Optional[google.api_core.retry.Retry]) – A retry object used to retry requests. If
None
is specified, requests will be retried using a default configuration.timeout (Optional[float]) – The amount of time, in seconds, to wait for the request to complete. Note that if
retry
is specified, the timeout applies to each individual attempt.metadata (Optional[Sequence[Tuple[str, str]]]) – Additional metadata that is provided to the method.
- Returns
A
Profile
instance.- Raises
google.api_core.exceptions.GoogleAPICallError – If the request failed for any reason.
google.api_core.exceptions.RetryError – If the request failed due to a retryable error and retry attempts failed.
ValueError – If the parameters are invalid.
-
delete_profile
(name, retry=<object object>, timeout=<object object>, metadata=None)[source]# Deletes the specified profile. Prerequisite: The profile has no associated applications or assignments associated.
Example
>>> from google.cloud import talent_v4beta1 >>> >>> client = talent_v4beta1.ProfileServiceClient() >>> >>> name = client.profile_path('[PROJECT]', '[TENANT]', '[PROFILE]') >>> >>> client.delete_profile(name)
- Parameters
name (str) –
Required. Resource name of the profile to be deleted.
The format is “projects/{project_id}/tenants/{tenant_id}/profiles/{profile_id}”. For example, “projects/foo/tenants/bar/profiles/baz”.
retry (Optional[google.api_core.retry.Retry]) – A retry object used to retry requests. If
None
is specified, requests will be retried using a default configuration.timeout (Optional[float]) – The amount of time, in seconds, to wait for the request to complete. Note that if
retry
is specified, the timeout applies to each individual attempt.metadata (Optional[Sequence[Tuple[str, str]]]) – Additional metadata that is provided to the method.
- Raises
google.api_core.exceptions.GoogleAPICallError – If the request failed for any reason.
google.api_core.exceptions.RetryError – If the request failed due to a retryable error and retry attempts failed.
ValueError – If the parameters are invalid.
-
enums
= <module 'google.cloud.talent_v4beta1.gapic.enums' from '/usr/local/lib/python3.7/site-packages/google/cloud/talent_v4beta1/gapic/enums.py'>#
-
classmethod
from_service_account_file
(filename, *args, **kwargs)[source]# Creates an instance of this client using the provided credentials file.
- Parameters
filename (str) – The path to the service account private key json file.
args – Additional arguments to pass to the constructor.
kwargs – Additional arguments to pass to the constructor.
- Returns
The constructed client.
- Return type
-
classmethod
from_service_account_json
(filename, *args, **kwargs)# Creates an instance of this client using the provided credentials file.
- Parameters
filename (str) – The path to the service account private key json file.
args – Additional arguments to pass to the constructor.
kwargs – Additional arguments to pass to the constructor.
- Returns
The constructed client.
- Return type
-
get_profile
(name, retry=<object object>, timeout=<object object>, metadata=None)[source]# Gets the specified profile.
Example
>>> from google.cloud import talent_v4beta1 >>> >>> client = talent_v4beta1.ProfileServiceClient() >>> >>> name = client.profile_path('[PROJECT]', '[TENANT]', '[PROFILE]') >>> >>> response = client.get_profile(name)
- Parameters
name (str) –
Required. Resource name of the profile to get.
The format is “projects/{project_id}/tenants/{tenant_id}/profiles/{profile_id}”. For example, “projects/foo/tenants/bar/profiles/baz”.
retry (Optional[google.api_core.retry.Retry]) – A retry object used to retry requests. If
None
is specified, requests will be retried using a default configuration.timeout (Optional[float]) – The amount of time, in seconds, to wait for the request to complete. Note that if
retry
is specified, the timeout applies to each individual attempt.metadata (Optional[Sequence[Tuple[str, str]]]) – Additional metadata that is provided to the method.
- Returns
A
Profile
instance.- Raises
google.api_core.exceptions.GoogleAPICallError – If the request failed for any reason.
google.api_core.exceptions.RetryError – If the request failed due to a retryable error and retry attempts failed.
ValueError – If the parameters are invalid.
-
list_profiles
(parent, filter_=None, page_size=None, read_mask=None, retry=<object object>, timeout=<object object>, metadata=None)[source]# Lists profiles by filter. The order is unspecified.
Example
>>> from google.cloud import talent_v4beta1 >>> >>> client = talent_v4beta1.ProfileServiceClient() >>> >>> parent = client.tenant_path('[PROJECT]', '[TENANT]') >>> >>> # Iterate over all results >>> for element in client.list_profiles(parent): ... # process element ... pass >>> >>> >>> # Alternatively: >>> >>> # Iterate over results one page at a time >>> for page in client.list_profiles(parent).pages: ... for element in page: ... # process element ... pass
- Parameters
parent (str) –
Required. The resource name of the tenant under which the profile is created.
The format is “projects/{project_id}/tenants/{tenant_id}”. For example, “projects/foo/tenants/bar”.
filter_ (str) –
The filter string specifies the profiles to be enumerated.
Supported operator: =, AND
The field(s) eligible for filtering are:
externalId
groupId
externalId and groupId cannot be specified at the same time. If both externalId and groupId are provided, the API will return a bad request error.
Sample Query:
externalId = “externalId-1”
groupId = “groupId-1”
page_size (int) – The maximum number of resources contained in the underlying API response. If page streaming is performed per- resource, this parameter does not affect the return value. If page streaming is performed per-page, this determines the maximum number of resources in a page.
read_mask (Union[dict, FieldMask]) –
A field mask to specify the profile fields to be listed in response. All fields are listed if it is unset.
Valid values are:
name
If a dict is provided, it must be of the same form as the protobuf message
FieldMask
retry (Optional[google.api_core.retry.Retry]) – A retry object used to retry requests. If
None
is specified, requests will be retried using a default configuration.timeout (Optional[float]) – The amount of time, in seconds, to wait for the request to complete. Note that if
retry
is specified, the timeout applies to each individual attempt.metadata (Optional[Sequence[Tuple[str, str]]]) – Additional metadata that is provided to the method.
- Returns
A
PageIterator
instance. An iterable ofProfile
instances. You can also iterate over the pages of the response using its pages property.- Raises
google.api_core.exceptions.GoogleAPICallError – If the request failed for any reason.
google.api_core.exceptions.RetryError – If the request failed due to a retryable error and retry attempts failed.
ValueError – If the parameters are invalid.
-
classmethod
profile_path
(project, tenant, profile)[source]# Return a fully-qualified profile string.
-
search_profiles
(parent, request_metadata, profile_query=None, page_size=None, offset=None, disable_spell_check=None, order_by=None, case_sensitive_sort=None, histogram_queries=None, result_set_id=None, strict_keywords_search=None, retry=<object object>, timeout=<object object>, metadata=None)[source]# Searches for profiles within a tenant.
For example, search by raw queries “software engineer in Mountain View” or search by structured filters (location filter, education filter, etc.).
See
SearchProfilesRequest
for more information.Example
>>> from google.cloud import talent_v4beta1 >>> >>> client = talent_v4beta1.ProfileServiceClient() >>> >>> parent = client.tenant_path('[PROJECT]', '[TENANT]') >>> >>> # TODO: Initialize `request_metadata`: >>> request_metadata = {} >>> >>> # Iterate over all results >>> for element in client.search_profiles(parent, request_metadata): ... # process element ... pass >>> >>> >>> # Alternatively: >>> >>> # Iterate over results one page at a time >>> for page in client.search_profiles(parent, request_metadata).pages: ... for element in page: ... # process element ... pass
- Parameters
parent (str) –
Required. The resource name of the tenant to search within.
The format is “projects/{project_id}/tenants/{tenant_id}”. For example, “projects/foo/tenants/bar”.
request_metadata (Union[dict, RequestMetadata]) –
Required. The meta information collected about the profile search user. This is used to improve the search quality of the service. These values are provided by users, and must be precise and consistent.
If a dict is provided, it must be of the same form as the protobuf message
RequestMetadata
profile_query (Union[dict, ProfileQuery]) –
Search query to execute. See
ProfileQuery
for more details.If a dict is provided, it must be of the same form as the protobuf message
ProfileQuery
page_size (int) – The maximum number of resources contained in the underlying API response. If page streaming is performed per- resource, this parameter does not affect the return value. If page streaming is performed per-page, this determines the maximum number of resources in a page.
offset (int) –
An integer that specifies the current offset (that is, starting result) in search results. This field is only considered if
page_token
is unset.The maximum allowed value is 5000. Otherwise an error is thrown.
For example, 0 means to search from the first profile, and 10 means to search from the 11th profile. This can be used for pagination, for example pageSize = 10 and offset = 10 means to search from the second page.
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”.
order_by (str) –
The criteria that determines how search results are sorted. Defaults is “relevance desc” if no value is specified.
Supported options are:
”relevance desc”: By descending relevance, as determined by the API algorithms.
”update_date desc”: Sort by
Profile.update_time
in descending order (recently updated profiles first).”create_date desc”: Sort by
Profile.create_time
in descending order (recently created profiles first).”first_name”: Sort by
PersonName.PersonStructuredName.given_name
in ascending order.”first_name desc”: Sort by
PersonName.PersonStructuredName.given_name
in descending order.”last_name”: Sort by
PersonName.PersonStructuredName.family_name
in ascending order.”last_name desc”: Sort by
PersonName.PersonStructuredName.family_name
in ascending order.
case_sensitive_sort (bool) – When sort by field is based on alphabetical order, sort values case sensitively (based on ASCII) when the value is set to true. Default value is case in-sensitive sort (false).
histogram_queries (list[Union[dict, HistogramQuery]]) –
A list of expressions specifies histogram requests against matching profiles for
SearchProfilesRequest
.The expression syntax looks like a function definition with parameters.
Function syntax: function_name(histogram_facet[, list of buckets])
Data types:
Histogram facet: facet names with format [a-zA-Z][a-zA-Z0-9_]+.
String: string like “any string with backslash escape for quote(“).”
Number: whole number and floating point number like 10, -1 and -0.01.
List: list of elements with comma(,) separator surrounded by square brackets. For example, [1, 2, 3] and [“one”, “two”, “three”].
Built-in constants:
MIN (minimum number similar to java Double.MIN_VALUE)
MAX (maximum number similar to java Double.MAX_VALUE)
Built-in functions:
bucket(start, end[, label]) Bucket build-in function creates a bucket with range of `start, end). Note that the end is exclusive. For example, bucket(1, MAX, “positive number”) or bucket(1, 10).
Histogram Facets:
admin1: Admin1 is a global placeholder for referring to state, province, or the particular term a country uses to define the geographic structure below the country level. Examples include states codes such as “CA”, “IL”, “NY”, and provinces, such as “BC”.
locality: Locality is a global placeholder for referring to city, town, or the particular term a country uses to define the geographic structure below the admin1 level. Examples include city names such as “Mountain View” and “New York”.
extended_locality: Extended locality is concatenated version of admin1 and locality with comma separator. For example, “Mountain View, CA” and “New York, NY”.
postal_code: Postal code of profile which follows locale code.
country: Country code (ISO-3166-1 alpha-2 code) of profile, such as US, JP, GB.
job_title: Normalized job titles specified in EmploymentHistory.
company_name: Normalized company name of profiles to match on.
institution: The school name. For example, “MIT”, “University of California, Berkeley”
degree: Highest education degree in ISCED code. Each value in degree covers a specific level of education, without any expansion to upper nor lower levels of education degree.
experience_in_months: experience in months. 0 means 0 month to 1 month (exclusive).
application_date: The application date specifies application start dates. See [ApplicationDateFilter` for more details.
application_outcome_notes: The application outcome reason specifies the reasons behind the outcome of the job application. See
ApplicationOutcomeNotesFilter
for more details.application_job_title: The application job title specifies the job applied for in the application. See
ApplicationJobFilter
for more details.hirable_status: Hirable status specifies the profile’s hirable status.
string_custom_attribute: String custom attributes. Values can be accessed via square bracket notation like string_custom_attribute[“key1”].
numeric_custom_attribute: Numeric custom attributes. Values can be accessed via square bracket notation like numeric_custom_attribute[“key1”].
Example expressions:
count(admin1)
count(experience_in_months, [bucket(0, 12, “1 year”), bucket(12, 36, “1-3 years”), bucket(36, MAX, “3+ years”)])
count(string_custom_attribute[“assigned_recruiter”])
count(numeric_custom_attribute[“favorite_number”], [bucket(MIN, 0, “negative”), bucket(0, MAX, “non-negative”)])
If a dict is provided, it must be of the same form as the protobuf message
HistogramQuery
result_set_id (str) –
An id that uniquely identifies the result set of a
SearchProfiles
call. The id should be retrieved from theSearchProfilesResponse
message returned from a previous invocation ofSearchProfiles
.A result set is an ordered list of search results.
If this field is not set, a new result set is computed based on the
profile_query
. A newresult_set_id
is returned as a handle to access this result set.If this field is set, the service will ignore the resource and
profile_query
values, and simply retrieve a page of results from the corresponding result set. In this case, one and only one ofpage_token
oroffset
must be set.A typical use case is to invoke
SearchProfilesRequest
without this field, then use the resultingresult_set_id
inSearchProfilesResponse
to page through the results.strict_keywords_search (bool) –
This flag is used to indicate whether the service will attempt to understand synonyms and terms related to the search query or treat the query “as is” when it generates a set of results. By default this flag is set to false, thus allowing expanded results to also be returned. For example a search for “software engineer” might also return candidates who have experience in jobs similar to software engineer positions. By setting this flag to true, the service will only attempt to deliver candidates has software engineer in his/her global fields by treating “software engineer” as a keyword.
It is recommended to provide a feature in the UI (such as a checkbox) to allow recruiters to set this flag to true if they intend to search for longer boolean strings.
retry (Optional[google.api_core.retry.Retry]) – A retry object used to retry requests. If
None
is specified, requests will be retried using a default configuration.timeout (Optional[float]) – The amount of time, in seconds, to wait for the request to complete. Note that if
retry
is specified, the timeout applies to each individual attempt.metadata (Optional[Sequence[Tuple[str, str]]]) – Additional metadata that is provided to the method.
- Returns
A
PageIterator
instance. An iterable ofSummarizedProfile
instances. You can also iterate over the pages of the response using its pages property.- Raises
google.api_core.exceptions.GoogleAPICallError – If the request failed for any reason.
google.api_core.exceptions.RetryError – If the request failed due to a retryable error and retry attempts failed.
ValueError – If the parameters are invalid.
-
update_profile
(profile, update_mask=None, retry=<object object>, timeout=<object object>, metadata=None)[source]# Updates the specified profile and returns the updated result.
Example
>>> from google.cloud import talent_v4beta1 >>> >>> client = talent_v4beta1.ProfileServiceClient() >>> >>> # TODO: Initialize `profile`: >>> profile = {} >>> >>> response = client.update_profile(profile)
- Parameters
profile (Union[dict, Profile]) –
Required. Profile to be updated.
If a dict is provided, it must be of the same form as the protobuf message
Profile
update_mask (Union[dict, FieldMask]) –
A field mask to specify the profile fields to update.
A full update is performed if it is unset.
Valid values are:
external_id
source
source_types
uri
is_hirable
create_time
update_time
candidate_update_time
resume_update_time
resume
person_names
addresses
email_addresses
phone_numbers
personal_uris
additional_contact_info
employment_records
education_records
skills
activities
publications
patents
certifications
recruiting_notes
custom_attributes
group_id
external_system
source_note
primary_responsibilities
citizenships
work_authorizations
employee_types
language_code
qualification_summary
allowed_contact_types
preferred_contact_types
contact_availability
language_fluencies
work_preference
industry_experiences
work_environment_experiences
work_availability
security_clearances
references
assessments
interviews
If a dict is provided, it must be of the same form as the protobuf message
FieldMask
retry (Optional[google.api_core.retry.Retry]) – A retry object used to retry requests. If
None
is specified, requests will be retried using a default configuration.timeout (Optional[float]) – The amount of time, in seconds, to wait for the request to complete. Note that if
retry
is specified, the timeout applies to each individual attempt.metadata (Optional[Sequence[Tuple[str, str]]]) – Additional metadata that is provided to the method.
- Returns
A
Profile
instance.- Raises
google.api_core.exceptions.GoogleAPICallError – If the request failed for any reason.
google.api_core.exceptions.RetryError – If the request failed due to a retryable error and retry attempts failed.
ValueError – If the parameters are invalid.
-
class
google.cloud.talent_v4beta1.
TenantServiceClient
(transport=None, channel=None, credentials=None, client_config=None, client_info=None, client_options=None)[source]# A service that handles tenant management, including CRUD and enumeration.
Constructor.
- Parameters
(Union[TenantServiceGrpcTransport, (transport) – Callable[[~.Credentials, type], ~.TenantServiceGrpcTransport]): A transport instance, responsible for actually making the API calls. The default transport uses the gRPC protocol. This argument may also be a callable which returns a transport instance. Callables will be sent the credentials as the first argument and the default transport class as the second argument.
channel (grpc.Channel) – DEPRECATED. A
Channel
instance through which to make calls. This argument is mutually exclusive withcredentials
; providing both will raise an exception.credentials (google.auth.credentials.Credentials) – The authorization credentials to attach to requests. These credentials identify this application to the service. If none are specified, the client will attempt to ascertain the credentials from the environment. This argument is mutually exclusive with providing a transport instance to
transport
; doing so will raise an exception.client_config (dict) – DEPRECATED. A dictionary of call options for each method. If not specified, the default configuration is used.
client_info (google.api_core.gapic_v1.client_info.ClientInfo) – The client info used to send a user-agent string along with API requests. If
None
, then default info will be used. Generally, you only need to set this if you’re developing your own client library.client_options (Union[dict, google.api_core.client_options.ClientOptions]) – Client options used to set user options on the client. API Endpoint should be set through client_options.
-
create_tenant
(parent, tenant, retry=<object object>, timeout=<object object>, metadata=None)[source]# Creates a new tenant entity.
Example
>>> from google.cloud import talent_v4beta1 >>> >>> client = talent_v4beta1.TenantServiceClient() >>> >>> parent = client.project_path('[PROJECT]') >>> >>> # TODO: Initialize `tenant`: >>> tenant = {} >>> >>> response = client.create_tenant(parent, tenant)
- Parameters
parent (str) –
Required. Resource name of the project under which the tenant is created.
The format is “projects/{project_id}”, for example, “projects/foo”.
tenant (Union[dict, Tenant]) –
Required. The tenant to be created.
If a dict is provided, it must be of the same form as the protobuf message
Tenant
retry (Optional[google.api_core.retry.Retry]) – A retry object used to retry requests. If
None
is specified, requests will be retried using a default configuration.timeout (Optional[float]) – The amount of time, in seconds, to wait for the request to complete. Note that if
retry
is specified, the timeout applies to each individual attempt.metadata (Optional[Sequence[Tuple[str, str]]]) – Additional metadata that is provided to the method.
- Returns
A
Tenant
instance.- Raises
google.api_core.exceptions.GoogleAPICallError – If the request failed for any reason.
google.api_core.exceptions.RetryError – If the request failed due to a retryable error and retry attempts failed.
ValueError – If the parameters are invalid.
-
delete_tenant
(name, retry=<object object>, timeout=<object object>, metadata=None)[source]# Deletes specified tenant.
Example
>>> from google.cloud import talent_v4beta1 >>> >>> client = talent_v4beta1.TenantServiceClient() >>> >>> name = client.tenant_path('[PROJECT]', '[TENANT]') >>> >>> client.delete_tenant(name)
- Parameters
name (str) –
Required. The resource name of the tenant to be deleted.
The format is “projects/{project_id}/tenants/{tenant_id}”, for example, “projects/foo/tenants/bar”.
retry (Optional[google.api_core.retry.Retry]) – A retry object used to retry requests. If
None
is specified, requests will be retried using a default configuration.timeout (Optional[float]) – The amount of time, in seconds, to wait for the request to complete. Note that if
retry
is specified, the timeout applies to each individual attempt.metadata (Optional[Sequence[Tuple[str, str]]]) – Additional metadata that is provided to the method.
- Raises
google.api_core.exceptions.GoogleAPICallError – If the request failed for any reason.
google.api_core.exceptions.RetryError – If the request failed due to a retryable error and retry attempts failed.
ValueError – If the parameters are invalid.
-
enums
= <module 'google.cloud.talent_v4beta1.gapic.enums' from '/usr/local/lib/python3.7/site-packages/google/cloud/talent_v4beta1/gapic/enums.py'>#
-
classmethod
from_service_account_file
(filename, *args, **kwargs)[source]# Creates an instance of this client using the provided credentials file.
- Parameters
filename (str) – The path to the service account private key json file.
args – Additional arguments to pass to the constructor.
kwargs – Additional arguments to pass to the constructor.
- Returns
The constructed client.
- Return type
-
classmethod
from_service_account_json
(filename, *args, **kwargs)# Creates an instance of this client using the provided credentials file.
- Parameters
filename (str) – The path to the service account private key json file.
args – Additional arguments to pass to the constructor.
kwargs – Additional arguments to pass to the constructor.
- Returns
The constructed client.
- Return type
-
get_tenant
(name, retry=<object object>, timeout=<object object>, metadata=None)[source]# Retrieves specified tenant.
Example
>>> from google.cloud import talent_v4beta1 >>> >>> client = talent_v4beta1.TenantServiceClient() >>> >>> name = client.tenant_path('[PROJECT]', '[TENANT]') >>> >>> response = client.get_tenant(name)
- Parameters
name (str) –
Required. The resource name of the tenant to be retrieved.
The format is “projects/{project_id}/tenants/{tenant_id}”, for example, “projects/foo/tenants/bar”.
retry (Optional[google.api_core.retry.Retry]) – A retry object used to retry requests. If
None
is specified, requests will be retried using a default configuration.timeout (Optional[float]) – The amount of time, in seconds, to wait for the request to complete. Note that if
retry
is specified, the timeout applies to each individual attempt.metadata (Optional[Sequence[Tuple[str, str]]]) – Additional metadata that is provided to the method.
- Returns
A
Tenant
instance.- Raises
google.api_core.exceptions.GoogleAPICallError – If the request failed for any reason.
google.api_core.exceptions.RetryError – If the request failed due to a retryable error and retry attempts failed.
ValueError – If the parameters are invalid.
-
list_tenants
(parent, page_size=None, retry=<object object>, timeout=<object object>, metadata=None)[source]# Lists all tenants associated with the project.
Example
>>> from google.cloud import talent_v4beta1 >>> >>> client = talent_v4beta1.TenantServiceClient() >>> >>> parent = client.project_path('[PROJECT]') >>> >>> # Iterate over all results >>> for element in client.list_tenants(parent): ... # process element ... pass >>> >>> >>> # Alternatively: >>> >>> # Iterate over results one page at a time >>> for page in client.list_tenants(parent).pages: ... for element in page: ... # process element ... pass
- Parameters
parent (str) –
Required. Resource name of the project under which the tenant is created.
The format is “projects/{project_id}”, for example, “projects/foo”.
page_size (int) – The maximum number of resources contained in the underlying API response. If page streaming is performed per- resource, this parameter does not affect the return value. If page streaming is performed per-page, this determines the maximum number of resources in a page.
retry (Optional[google.api_core.retry.Retry]) – A retry object used to retry requests. If
None
is specified, requests will be retried using a default configuration.timeout (Optional[float]) – The amount of time, in seconds, to wait for the request to complete. Note that if
retry
is specified, the timeout applies to each individual attempt.metadata (Optional[Sequence[Tuple[str, str]]]) – Additional metadata that is provided to the method.
- Returns
A
PageIterator
instance. An iterable ofTenant
instances. You can also iterate over the pages of the response using its pages property.- Raises
google.api_core.exceptions.GoogleAPICallError – If the request failed for any reason.
google.api_core.exceptions.RetryError – If the request failed due to a retryable error and retry attempts failed.
ValueError – If the parameters are invalid.
-
update_tenant
(tenant, update_mask=None, retry=<object object>, timeout=<object object>, metadata=None)[source]# Updates specified tenant.
Example
>>> from google.cloud import talent_v4beta1 >>> >>> client = talent_v4beta1.TenantServiceClient() >>> >>> # TODO: Initialize `tenant`: >>> tenant = {} >>> >>> response = client.update_tenant(tenant)
- Parameters
tenant (Union[dict, Tenant]) –
Required. The tenant resource to replace the current resource in the system.
If a dict is provided, it must be of the same form as the protobuf message
Tenant
update_mask (Union[dict, FieldMask]) –
Strongly recommended for the best service experience.
If
update_mask
is provided, only the specified fields intenant
are updated. Otherwise all the fields are updated.A field mask to specify the tenant fields to be updated. Only top level fields of
Tenant
are supported.If a dict is provided, it must be of the same form as the protobuf message
FieldMask
retry (Optional[google.api_core.retry.Retry]) – A retry object used to retry requests. If
None
is specified, requests will be retried using a default configuration.timeout (Optional[float]) – The amount of time, in seconds, to wait for the request to complete. Note that if
retry
is specified, the timeout applies to each individual attempt.metadata (Optional[Sequence[Tuple[str, str]]]) – Additional metadata that is provided to the method.
- Returns
A
Tenant
instance.- Raises
google.api_core.exceptions.GoogleAPICallError – If the request failed for any reason.
google.api_core.exceptions.RetryError – If the request failed due to a retryable error and retry attempts failed.
ValueError – If the parameters are invalid.