1 // Copyright 2019 Google LLC.
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
7 // http://www.apache.org/licenses/LICENSE-2.0
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.
18 package google.cloud.talent.v4beta1;
20 import "google/api/annotations.proto";
21 import "google/cloud/talent/v4beta1/common.proto";
22 import "google/cloud/talent/v4beta1/filters.proto";
23 import "google/cloud/talent/v4beta1/histogram.proto";
24 import "google/cloud/talent/v4beta1/profile.proto";
25 import "google/protobuf/empty.proto";
26 import "google/protobuf/field_mask.proto";
28 option go_package = "google.golang.org/genproto/googleapis/cloud/talent/v4beta1;talent";
29 option java_multiple_files = true;
30 option java_outer_classname = "ProfileServiceProto";
31 option java_package = "com.google.cloud.talent.v4beta1";
32 option objc_class_prefix = "CTS";
34 // A service that handles profile management, including profile CRUD,
35 // enumeration and search.
36 service ProfileService {
37 // Lists profiles by filter. The order is unspecified.
38 rpc ListProfiles(ListProfilesRequest) returns (ListProfilesResponse) {
39 option (google.api.http) = {
40 get: "/v4beta1/{parent=projects/*/tenants/*}/profiles"
44 // Creates and returns a new profile.
45 rpc CreateProfile(CreateProfileRequest) returns (Profile) {
46 option (google.api.http) = {
47 post: "/v4beta1/{parent=projects/*/tenants/*}/profiles"
52 // Gets the specified profile.
53 rpc GetProfile(GetProfileRequest) returns (Profile) {
54 option (google.api.http) = {
55 get: "/v4beta1/{name=projects/*/tenants/*/profiles/*}"
59 // Updates the specified profile and returns the updated result.
60 rpc UpdateProfile(UpdateProfileRequest) returns (Profile) {
61 option (google.api.http) = {
62 patch: "/v4beta1/{profile.name=projects/*/tenants/*/profiles/*}"
67 // Deletes the specified profile.
68 rpc DeleteProfile(DeleteProfileRequest) returns (google.protobuf.Empty) {
69 option (google.api.http) = {
70 delete: "/v4beta1/{name=projects/*/tenants/*/profiles/*}"
74 // Searches for profiles within a tenant.
76 // For example, search by raw queries "software engineer in Mountain View" or
77 // search by structured filters (location filter, education filter, etc.).
80 // [SearchProfilesRequest][google.cloud.talent.v4beta1.SearchProfilesRequest]
81 // for more information.
82 rpc SearchProfiles(SearchProfilesRequest) returns (SearchProfilesResponse) {
83 option (google.api.http) = {
84 post: "/v4beta1/{parent=projects/*/tenants/*}:search"
90 // List profiles request.
91 message ListProfilesRequest {
94 // The resource name of the tenant under which the job is created.
96 // The format is "projects/{project_id}/tenants/{tenant_id}", for example,
97 // "projects/api-test-project/tenants/foo".
102 // The token that specifies the current offset (that is, starting result).
104 // Please set the value to
105 // [ListProfilesResponse.next_page_token][google.cloud.talent.v4beta1.ListProfilesResponse.next_page_token]
106 // to continue the list.
107 string page_token = 2;
111 // The maximum number of profiles to be returned, at most 100.
113 // Default is 100 unless a positive number smaller than 100 is specified.
118 // A field mask to specify the profile fields to be listed in response.
119 // All fields are listed if it is unset.
124 google.protobuf.FieldMask field_mask = 4;
127 // The List profiles response object.
128 message ListProfilesResponse {
129 // Profiles for the specific tenant.
130 repeated Profile profiles = 1;
132 // A token to retrieve the next page of results. This is empty if there are no
134 string next_page_token = 2;
137 // Create profile request.
138 message CreateProfileRequest {
141 // The name of the tenant this profile belongs to.
143 // The format is "projects/{project_id}/tenants/{tenant_id}", for example,
144 // "projects/api-test-project/tenants/foo".
149 // The profile to be created.
153 // Get profile request.
154 message GetProfileRequest {
157 // Resource name of the profile to get.
160 // "projects/{project_id}/tenants/{tenant_id}/profiles/{profile_id}",
161 // for example, "projects/api-test-project/tenants/foo/profiles/bar".
165 // Update profile request
166 message UpdateProfileRequest {
169 // Profile to be updated.
174 // A field mask to specify the profile fields to update.
176 // A full update is performed if it is unset.
192 // * additionalContactInfo
193 // * employmentRecords
194 // * educationRecords
202 // * customAttributes
203 google.protobuf.FieldMask update_mask = 2;
206 // Delete profile request.
207 message DeleteProfileRequest {
210 // Resource name of the profile to be deleted.
213 // "projects/{project_id}/tenants/{tenant_id}/profiles/{profile_id}",
214 // for example, "projects/api-test-project/tenants/foo/profiles/bar".
218 // The request body of the `SearchProfiles` call.
219 message SearchProfilesRequest {
222 // The resource name of the tenant to search within.
224 // The format is "projects/{project_id}/tenants/{tenant_id}", for example,
225 // "projects/api-test-project/tenants/foo".
230 // The meta information collected about the profile search user. This is used
231 // to improve the search quality of the service. These values are provided by
232 // users, and must be precise and consistent.
233 RequestMetadata request_metadata = 2;
237 // Search query to execute. See
238 // [ProfileQuery][google.cloud.talent.v4beta1.ProfileQuery] for more details.
239 ProfileQuery profile_query = 3;
243 // A limit on the number of profiles returned in the search results.
244 // A value above the default value 10 can increase search response time.
246 // The maximum value allowed is 100. Otherwise an error is thrown.
251 // The pageToken, similar to offset enables users of the API to paginate
252 // through the search results. To retrieve the first page of results, set the
253 // pageToken to empty. The search response includes a
254 // [nextPageToken][google.cloud.talent.v4beta1.SearchProfilesResponse.next_page_token]
255 // field that can be used to populate the pageToken field for the next page of
256 // results. Using pageToken instead of offset increases the performance of the
257 // API, especially compared to larger offset values.
258 string page_token = 5;
262 // An integer that specifies the current offset (that is, starting result) in
263 // search results. This field is only considered if
264 // [page_token][google.cloud.talent.v4beta1.SearchProfilesRequest.page_token]
267 // The maximum allowed value is 5000. Otherwise an error is thrown.
269 // For example, 0 means to search from the first profile, and 10 means to
270 // search from the 11th profile. This can be used for pagination, for example
271 // pageSize = 10 and offset = 10 means to search from the second page.
276 // This flag controls the spell-check feature. If `false`, the
277 // service attempts to correct a misspelled query.
279 // For example, "enginee" is corrected to "engineer".
280 bool disable_spell_check = 7;
284 // The criteria that determines how search results are sorted.
285 // Defaults is "relevance desc" if no value is specified.
287 // Supported options are:
289 // * "relevance desc": By descending relevance, as determined by the API
291 // * "update_date desc": Sort by [Profile.update_date][] in descending order
292 // (recently updated profiles first).
293 // * "create_date desc": Sort by [Profile.create_date][] in descending order
294 // (recently created profiles first).
295 // * "first_name": Sort by [PersonStrcuturedName.given_name][] in ascending
297 // * "first_name desc": Sort by [PersonStrcuturedName.given_name][] in
299 // * "last_name": Sort by [PersonStrcuturedName.family_name][] in ascending
301 // * "last_name desc": Sort by [PersonStrcuturedName.family_name][] in
307 // When sort by field is based on alphabetical order, sort values case
308 // sensitively (based on ASCII) when the value is set to true. Default value
309 // is case in-sensitive sort (false).
310 bool case_sensitive_sort = 9;
314 // A list of expressions specifies histogram requests against matching
316 // [SearchProfilesRequest][google.cloud.talent.v4beta1.SearchProfilesRequest].
318 // The expression syntax looks like a function definition with optional
321 // Function syntax: function_name(histogram_facet[, list of buckets])
325 // * Histogram facet: facet names with format [a-zA-Z][a-zA-Z0-9_]+.
326 // * String: string like "any string with backslash escape for quote(\")."
327 // * Number: whole number and floating point number like 10, -1 and -0.01.
328 // * List: list of elements with comma(,) separator surrounded by square
329 // brackets. For example, [1, 2, 3] and ["one", "two", "three"].
331 // Built-in constants:
333 // * MIN (minimum number similar to java Double.MIN_VALUE)
334 // * MAX (maximum number similar to java Double.MAX_VALUE)
336 // Built-in functions:
338 // * bucket(start, end[, label])
339 // Bucket build-in function creates a bucket with range of [start, end). Note
340 // that the end is exclusive.
341 // For example, bucket(1, MAX, "positive number") or bucket(1, 10).
345 // * admin1: Admin1 is a global placeholder for referring to state, province,
346 // or the particular term a country uses to define the geographic structure
347 // below the country level. Examples include states codes such as "CA", "IL",
348 // "NY", and provinces, such as "BC".
349 // * locality: Locality is a global placeholder for referring to city, town,
350 // or the particular term a country uses to define the geographic structure
351 // below the admin1 level. Examples include city names such as
352 // "Mountain View" and "New York".
353 // * extended_locality: Extended locality is concatenated version of admin1
354 // and locality with comma separator. For example, "Mountain View, CA" and
356 // * postal_code: Postal code of profile which follows locale code.
357 // * country: Country code (ISO-3166-1 alpha-2 code) of profile, such as US,
359 // * job_title: Normalized job titles specified in EmploymentHistory.
360 // * company_name: Normalized company name of profiles to match on.
361 // * institution: The school name. For example, "MIT",
362 // "University of California, Berkeley"
363 // * degree: Highest education degree in ISCED code. Each value in degree
364 // covers specific level of education, without any expansion to upper nor
365 // lower levels of education degree.
366 // * experience_in_months: experience in months. 0 means 0 month to 1 month
368 // * application_date: The application date specifies application start dates.
370 // [ApplicationDateFilter][google.cloud.talent.v4beta1.ApplicationDateFilter]
372 // * application_outcome_reason: The application outcome reason specifies the
373 // outcome reasons of job application.
375 // [ApplicationOutcomeReasonFilter][google.cloud.talent.v4beta1.ApplicationOutcomeReasonFilter]
377 // * application_last_stage: The application last stage specifies the last
378 // stage of job application.
380 // [ApplicationLastStageFilter][google.cloud.talent.v4beta1.ApplicationLastStageFilter]
382 // * application_job_title: The application job title specifies the job
383 // applied for in the application.
385 // [ApplicationJobFilter][google.cloud.talent.v4beta1.ApplicationJobFilter]
387 // * application_status: The application status specifies the status of job
390 // [ApplicationStatusFilter][google.cloud.talent.v4beta1.ApplicationStatusFilter]
392 // * hirable_status: Hirable status specifies the profile's hirable status.
393 // * string_custom_attribute: String custom attributes. Values can be accessed
394 // via square bracket notation like string_custom_attribute["key1"].
395 // * numeric_custom_attribute: Numeric custom attributes. Values can be
396 // accessed via square bracket notation like numeric_custom_attribute["key1"].
398 // Example expressions:
401 // * count(experience_in_months, [bucket(0, 12, "1 year"),
402 // bucket(12, 36, "1-3 years"), bucket(36, MAX, "3+ years")])
403 // * count(string_custom_attribute["assigned_recruiter"])
404 // * count(numeric_custom_attribute["favorite_number"],
405 // [bucket(MIN, 0, "negative"), bucket(0, MAX, "non-negative")])
406 repeated HistogramQuery histogram_queries = 10;
409 // Response of SearchProfiles method.
410 message SearchProfilesResponse {
411 // An estimation of the number of profiles that match the specified query.
413 // This number isn't guaranteed to be accurate.
414 int64 estimated_total_size = 1;
416 // The spell checking result, and correction.
417 SpellingCorrection spell_correction = 2;
419 // Additional information for the API invocation, such as the request
421 ResponseMetadata metadata = 3;
423 // A token to retrieve the next page of results. This is empty if there are no
425 string next_page_token = 4;
427 // The histogram results that match with specified
428 // [SearchProfilesRequest.histogram_queries][google.cloud.talent.v4beta1.SearchProfilesRequest.histogram_queries].
429 repeated HistogramQueryResult histogram_query_results = 5;
431 // The profile entities that match the specified
432 // [SearchProfilesRequest][google.cloud.talent.v4beta1.SearchProfilesRequest].
433 repeated SummarizedProfile summarized_profiles = 6;
438 // Profile entry with metadata inside
439 // [SearchProfilesResponse][google.cloud.talent.v4beta1.SearchProfilesResponse].
440 message SummarizedProfile {
441 // A list of profiles that are linked by [Profile.cluster_id][].
442 repeated Profile profiles = 1;
444 // A profile summary shows the profile summary and how the profile matches the
447 // In profile summary, the profiles with the same [Profile.cluster_id][] are
448 // merged together. Among profiles, same education/employment records may be
449 // slightly different but they are merged into one with best efforts.
451 // For example, in one profile the school name is "UC Berkeley" and the field
452 // study is "Computer Science" and in another one the school name is
453 // "University of California at Berkeley" and the field study is "CS". The API
454 // merges these two inputs into one and selects one value for each field. For
455 // example, the school name in summary is set to "University of California at
456 // Berkeley" and the field of study is set to "Computer Science".