Skip to content

Commit

Permalink
Add 'result_set_id' param to 'ProfileSearchClient.search_profiles'; a…
Browse files Browse the repository at this point in the history
…dd 'ProfileQuery.candidate_availability_filter'; pin 'black' version; dostring tweaks (via synth). (#8597)
  • Loading branch information
yoshi-automation authored and tseaver committed Jul 8, 2019
1 parent 7928e20 commit b891624
Show file tree
Hide file tree
Showing 41 changed files with 2,016 additions and 2,283 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -237,17 +237,14 @@ def create_application(
>>> response = client.create_application(parent, application)
Args:
parent (str): Required.
Resource name of the profile under which the application is created.
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/test-project/tenants/test-tenant/profiles/test-profile".
application (Union[dict, ~google.cloud.talent_v4beta1.types.Application]): Required.
The application to be created.
application (Union[dict, ~google.cloud.talent_v4beta1.types.Application]): Required. The application to be created.
If a dict is provided, it must be of the same form as the protobuf
message :class:`~google.cloud.talent_v4beta1.types.Application`
Expand Down Expand Up @@ -321,9 +318,7 @@ def get_application(
>>> response = client.get_application(name)
Args:
name (str): Required.
The resource name of the application to be retrieved.
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}",
Expand Down Expand Up @@ -399,9 +394,8 @@ def update_application(
>>> response = client.update_application(application)
Args:
application (Union[dict, ~google.cloud.talent_v4beta1.types.Application]): Required.
The application resource to replace the current resource in the system.
application (Union[dict, ~google.cloud.talent_v4beta1.types.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 :class:`~google.cloud.talent_v4beta1.types.Application`
Expand Down Expand Up @@ -485,9 +479,7 @@ def delete_application(
>>> client.delete_application(name)
Args:
name (str): Required.
The resource name of the application to be deleted.
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}",
Expand Down Expand Up @@ -571,9 +563,8 @@ def list_applications(
... pass
Args:
parent (str): Required.
Resource name of the profile under which the application is created.
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}",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,18 +231,15 @@ def create_company(
>>> response = client.create_company(parent, company)
Args:
parent (str): Required.
Resource name of the tenant under which the company is created.
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/api-test-project/tenant/foo".
Tenant id is optional and a default tenant is created if unspecified,
for example, "projects/api-test-project".
company (Union[dict, ~google.cloud.talent_v4beta1.types.Company]): Required.
The company to be created.
company (Union[dict, ~google.cloud.talent_v4beta1.types.Company]): Required. The company to be created.
If a dict is provided, it must be of the same form as the protobuf
message :class:`~google.cloud.talent_v4beta1.types.Company`
Expand Down Expand Up @@ -316,9 +313,7 @@ def get_company(
>>> response = client.get_company(name)
Args:
name (str): Required.
The resource name of the company to be retrieved.
name (str): Required. The resource name of the company to be retrieved.
The format is
"projects/{project\_id}/tenants/{tenant\_id}/companies/{company\_id}",
Expand Down Expand Up @@ -396,9 +391,8 @@ def update_company(
>>> response = client.update_company(company)
Args:
company (Union[dict, ~google.cloud.talent_v4beta1.types.Company]): Required.
The company resource to replace the current resource in the system.
company (Union[dict, ~google.cloud.talent_v4beta1.types.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 :class:`~google.cloud.talent_v4beta1.types.Company`
Expand Down Expand Up @@ -483,9 +477,7 @@ def delete_company(
>>> client.delete_company(name)
Args:
name (str): Required.
The resource name of the company to be deleted.
name (str): Required. The resource name of the company to be deleted.
The format is
"projects/{project\_id}/tenants/{tenant\_id}/companies/{company\_id}",
Expand Down Expand Up @@ -572,9 +564,8 @@ def list_companies(
... pass
Args:
parent (str): Required.
Resource name of the tenant under which the company is created.
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/api-test-project/tenant/foo".
Expand All @@ -586,9 +577,7 @@ def list_companies(
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): Optional.
Set to true if the companies requested must have open jobs.
require_open_jobs (bool): Optional. Set to true if the companies requested must have open jobs.
Defaults to false.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -240,30 +240,22 @@ def complete_query(
>>> response = client.complete_query(parent, query, page_size)
Args:
parent (str): Required.
Resource name of tenant the completion is performed within.
parent (str): Required. Resource name of tenant the completion is performed within.
The format is "projects/{project\_id}/tenants/{tenant\_id}", for
example, "projects/api-test-project/tenant/foo".
Tenant id is optional and the default tenant is used if unspecified, for
example, "projects/api-test-project".
query (str): Required.
The query used to generate suggestions.
query (str): Required. The query used to generate suggestions.
The maximum number of allowed characters is 255.
page_size (int): Required.
Completion result count.
page_size (int): Required. Completion result count.
The maximum allowed page size is 10.
language_codes (list[str]): Optional.
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 <https://tools.ietf.org/html/bcp47>`__.
language_codes (list[str]): Optional. 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 <https://tools.ietf.org/html/bcp47>`__.
For ``CompletionType.JOB_TITLE`` type, only open jobs with the same
``language_codes`` are returned.
Expand All @@ -276,22 +268,18 @@ def complete_query(
``language_codes`` are returned.
The maximum number of allowed characters is 255.
company (str): Optional.
If provided, restricts completion to specified company.
company (str): Optional. If provided, restricts completion to specified company.
The format is
"projects/{project\_id}/tenants/{tenant\_id}/companies/{company\_id}",
for example, "projects/api-test-project/tenants/foo/companies/bar".
Tenant id is optional and the default tenant is used if unspecified, for
example, "projects/api-test-project/companies/bar".
scope (~google.cloud.talent_v4beta1.types.CompletionScope): Optional.
The scope of the completion. The defaults is ``CompletionScope.PUBLIC``.
type_ (~google.cloud.talent_v4beta1.types.CompletionType): Optional.
The completion topic. The default is ``CompletionType.COMBINED``.
scope (~google.cloud.talent_v4beta1.types.CompletionScope): Optional. The scope of the completion. The defaults is
``CompletionScope.PUBLIC``.
type_ (~google.cloud.talent_v4beta1.types.CompletionType): Optional. 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 not
be retried.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -925,8 +925,82 @@ class ProfileEventType(enum.IntEnum):
Attributes:
PROFILE_EVENT_TYPE_UNSPECIFIED (int): Default value.
IMPRESSION (int): The profile is displayed.
VIEW (int): The profile is viewed.
IMPRESSION (int): Send this event when a ``ProfileEvent.profiles`` meets all of the
following criteria:
- Was sent as a part of a result set for a CTS API call.
- Was rendered in the end user's UI (that is, the
``ProfileEvent.recruiter``).
- That UI rendering was displayed in the end user's viewport for >=3
seconds.
In other words, send this event when the end user of the CTS service
actually saw a resulting profile in their viewport.
To understand how to use this event, consider an example:
- The customer's UI for interacting with CTS result sets is accessed by
the end user through a web browser.
- The UI calls for a page size of 15 candidates (that is, 15 candidates
are rendered on each page of results).
- However, the UI design calls for only 5 candidates to be shown at any
given time in the viewport (that is, the end user can only see 5
results at any given time and needs to scroll up or down to view all
15 results).
To render each page of results, the customer will send a request to CTS
with a page size = 15.
- User loads page #1 of results.
- User scrolls down to expose results #1 - #5 and dwells on this view
for 30 seconds.
- Send an IMPRESSION event for result 1, 2, 3, 4, 5.
- User scrolls down a bit, exposing results #2 - #6 in the viewport and
dwells on this view for 5 minutes.
- Send an IMPRESSION event for result 6.
- User scrolls to the bottom of the page, with results #7 - #15 shown
in the viewport for ~5 seconds each.
- Specifically, NO IMPRESSION events are sent for result 7, 8, 9, 10,
11, 12, 13, 14, 15.
- User clicks to the next page and loads page #2 of results.
- Within 2 seconds, user scrolls to expose results #20 - #24 in the
viewport and dwells on this view for 20 mins.
- Send an IMPRESSION event for result 20, 21, 22, 23, 24
- User closes their browser window.
VIEW (int): The VIEW event allows CTS to understand if a candidate's profile was
viewed by an end user (that is, recruiter) of the system for >=3
seconds. This is critical to tracking product metrics and should be sent
for every profile VIEW that happens in the customer's system.
VIEW events should be sent whether an end user views a candidate's
profile as a result of seeing that profile in the result set of a CTS
API request or whether the end user views the profile for some other
reason (that is, clicks to the candidate's profile in the ATS, and so
on).
For a VIEW that happens as a result of seeing the profile in a CTS API
request's result set, the ``ClientEvent.request_id`` should be
populated. If the VIEW happens for some other reason, the [requestId]
should not be populated.
This event requires a valid recruiter and one valid ID in profiles.
To understand how to use this event, consider 2 examples in which a VIEW
event should be sent:
- End user makes a request to the CTS API for a result set.
- Results for the request are shown to the end user.
- End user clicks on one of the candidates that are shown as part of
the results.
- A VIEW event with the ``ClientEvent.request_id`` of the API call in
the first step of this example is sent.
- End user browses to a candidate's profile in the ATS.
- A VIEW event without a ``ClientEvent.request_id`` is sent.
BOOKMARK (int): The profile is bookmarked.
"""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -230,19 +230,15 @@ def create_client_event(
>>> response = client.create_client_event(parent, client_event)
Args:
parent (str): Required.
Resource name of the tenant under which the event is created.
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/api-test-project/tenant/foo".
Tenant id is optional and a default tenant is created if unspecified,
for example, "projects/api-test-project".
client_event (Union[dict, ~google.cloud.talent_v4beta1.types.ClientEvent]): Required.
Events issued when end user interacts with customer's application that
uses Cloud Talent Solution.
client_event (Union[dict, ~google.cloud.talent_v4beta1.types.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 :class:`~google.cloud.talent_v4beta1.types.ClientEvent`
Expand Down
Loading

0 comments on commit b891624

Please sign in to comment.