1// Copyright 2023 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15syntax = "proto3";
16
17package google.cloud.talent.v4beta1;
18
19import "google/api/field_behavior.proto";
20import "google/protobuf/timestamp.proto";
21
22option go_package = "cloud.google.com/go/talent/apiv4beta1/talentpb;talentpb";
23option java_multiple_files = true;
24option java_outer_classname = "EventProto";
25option java_package = "com.google.cloud.talent.v4beta1";
26option objc_class_prefix = "CTS";
27
28// An event issued when an end user interacts with the application that
29// implements Cloud Talent Solution. Providing this information improves the
30// quality of results for the API clients, enabling the
31// service to perform optimally. The number of events sent must be consistent
32// with other calls, such as job searches, issued to the service by the client.
33message ClientEvent {
34  // Strongly recommended for the best service experience.
35  //
36  // A unique ID generated in the API responses. It can be found in
37  // [ResponseMetadata.request_id][google.cloud.talent.v4beta1.ResponseMetadata.request_id].
38  string request_id = 1;
39
40  // Required. A unique identifier, generated by the client application.
41  string event_id = 2 [(google.api.field_behavior) = REQUIRED];
42
43  // Required. The timestamp of the event.
44  google.protobuf.Timestamp create_time = 4
45      [(google.api.field_behavior) = REQUIRED];
46
47  // Required.
48  //
49  // The detail information of a specific event type.
50  oneof event {
51    // An event issued when a job seeker interacts with the application that
52    // implements Cloud Talent Solution.
53    JobEvent job_event = 5;
54  }
55
56  // Notes about the event provided by recruiters or other users, for example,
57  // feedback on why a profile was bookmarked.
58  string event_notes = 9;
59}
60
61// An event issued when a job seeker interacts with the application that
62// implements Cloud Talent Solution.
63message JobEvent {
64  // An enumeration of an event attributed to the behavior of the end user,
65  // such as a job seeker.
66  enum JobEventType {
67    // The event is unspecified by other provided values.
68    JOB_EVENT_TYPE_UNSPECIFIED = 0;
69
70    // The job seeker or other entity interacting with the service has
71    // had a job rendered in their view, such as in a list of search results in
72    // a compressed or clipped format. This event is typically associated with
73    // the viewing of a jobs list on a single page by a job seeker.
74    IMPRESSION = 1;
75
76    // The job seeker, or other entity interacting with the service, has
77    // viewed the details of a job, including the full description. This
78    // event doesn't apply to the viewing a snippet of a job appearing as a
79    // part of the job search results. Viewing a snippet is associated with an
80    // [impression][google.cloud.talent.v4beta1.JobEvent.JobEventType.IMPRESSION]).
81    VIEW = 2;
82
83    // The job seeker or other entity interacting with the service
84    // performed an action to view a job and was redirected to a different
85    // website for job.
86    VIEW_REDIRECT = 3;
87
88    // The job seeker or other entity interacting with the service
89    // began the process or demonstrated the intention of applying for a job.
90    APPLICATION_START = 4;
91
92    // The job seeker or other entity interacting with the service
93    // submitted an application for a job.
94    APPLICATION_FINISH = 5;
95
96    // The job seeker or other entity interacting with the service
97    // submitted an application for a job with a single click without
98    // entering information. If a job seeker performs this action, send only
99    // this event to the service. Do not also send
100    // [JobEventType.APPLICATION_START][google.cloud.talent.v4beta1.JobEvent.JobEventType.APPLICATION_START]
101    // or
102    // [JobEventType.APPLICATION_FINISH][google.cloud.talent.v4beta1.JobEvent.JobEventType.APPLICATION_FINISH]
103    // events.
104    APPLICATION_QUICK_SUBMISSION = 6;
105
106    // The job seeker or other entity interacting with the service
107    // performed an action to apply to a job and was redirected to a different
108    // website to complete the application.
109    APPLICATION_REDIRECT = 7;
110
111    // The job seeker or other entity interacting with the service began the
112    // process or demonstrated the intention of applying for a job from the
113    // search results page without viewing the details of the job posting.
114    // If sending this event, JobEventType.VIEW event shouldn't be sent.
115    APPLICATION_START_FROM_SEARCH = 8;
116
117    // The job seeker, or other entity interacting with the service, performs an
118    // action with a single click from the search results page to apply to a job
119    // (without viewing the details of the job posting), and is redirected
120    // to a different website to complete the application. If a candidate
121    // performs this action, send only this event to the service. Do not also
122    // send
123    // [JobEventType.APPLICATION_START][google.cloud.talent.v4beta1.JobEvent.JobEventType.APPLICATION_START],
124    // [JobEventType.APPLICATION_FINISH][google.cloud.talent.v4beta1.JobEvent.JobEventType.APPLICATION_FINISH]
125    // or
126    // [JobEventType.VIEW][google.cloud.talent.v4beta1.JobEvent.JobEventType.VIEW]
127    // events.
128    APPLICATION_REDIRECT_FROM_SEARCH = 9;
129
130    // This event should be used when a company submits an application
131    // on behalf of a job seeker. This event is intended for use by staffing
132    // agencies attempting to place candidates.
133    APPLICATION_COMPANY_SUBMIT = 10;
134
135    // The job seeker or other entity interacting with the service demonstrated
136    // an interest in a job by bookmarking or saving it.
137    BOOKMARK = 11;
138
139    // The job seeker or other entity interacting with the service was
140    // sent a notification, such as an email alert or device notification,
141    // containing one or more jobs listings generated by the service.
142    NOTIFICATION = 12;
143
144    // The job seeker or other entity interacting with the service was
145    // employed by the hiring entity (employer). Send this event
146    // only if the job seeker was hired through an application that was
147    // initiated by a search conducted through the Cloud Talent Solution
148    // service.
149    HIRED = 13;
150
151    // A recruiter or staffing agency submitted an application on behalf of the
152    // candidate after interacting with the service to identify a suitable job
153    // posting.
154    SENT_CV = 14;
155
156    // The entity interacting with the service (for example, the job seeker),
157    // was granted an initial interview by the hiring entity (employer). This
158    // event should only be sent if the job seeker was granted an interview as
159    // part of an application that was initiated by a search conducted through /
160    // recommendation provided by the Cloud Talent Solution service.
161    INTERVIEW_GRANTED = 15;
162  }
163
164  // Required. The type of the event (see
165  // [JobEventType][google.cloud.talent.v4beta1.JobEvent.JobEventType]).
166  JobEventType type = 1 [(google.api.field_behavior) = REQUIRED];
167
168  // Required. The [job name(s)][google.cloud.talent.v4beta1.Job.name]
169  // associated with this event. For example, if this is an
170  // [impression][google.cloud.talent.v4beta1.JobEvent.JobEventType.IMPRESSION]
171  // event, this field contains the identifiers of all jobs shown to the job
172  // seeker. If this was a
173  // [view][google.cloud.talent.v4beta1.JobEvent.JobEventType.VIEW] event, this
174  // field contains the identifier of the viewed job.
175  //
176  // The format is
177  // "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}", for
178  // example, "projects/foo/tenants/bar/jobs/baz".
179  repeated string jobs = 2 [(google.api.field_behavior) = REQUIRED];
180
181  // The [profile name][google.cloud.talent.v4beta1.Profile.name] associated
182  // with this client event.
183  //
184  // The format is
185  // "projects/{project_id}/tenants/{tenant_id}/profiles/{profile_id}",
186  // for example, "projects/foo/tenants/bar/profiles/baz".
187  string profile = 3;
188}
189