Built motion from commit 6a09e18b.|2.6.11
[motion2.git] / legacy-libs / google-proto-files / google / cloud / talent / v4beta1 / profile_service.proto
1 // Copyright 2019 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 //
15
16 syntax = "proto3";
17
18 package google.cloud.talent.v4beta1;
19
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";
27
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";
33
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"
41     };
42   }
43
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"
48       body: "*"
49     };
50   }
51
52   // Gets the specified profile.
53   rpc GetProfile(GetProfileRequest) returns (Profile) {
54     option (google.api.http) = {
55       get: "/v4beta1/{name=projects/*/tenants/*/profiles/*}"
56     };
57   }
58
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/*}"
63       body: "*"
64     };
65   }
66
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/*}"
71     };
72   }
73
74   // Searches for profiles within a tenant.
75   //
76   // For example, search by raw queries "software engineer in Mountain View" or
77   // search by structured filters (location filter, education filter, etc.).
78   //
79   // See
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"
85       body: "*"
86     };
87   }
88 }
89
90 // List profiles request.
91 message ListProfilesRequest {
92   // Required.
93   //
94   // The resource name of the tenant under which the job is created.
95   //
96   // The format is "projects/{project_id}/tenants/{tenant_id}", for example,
97   // "projects/api-test-project/tenants/foo".
98   string parent = 1;
99
100   // Optional.
101   //
102   // The token that specifies the current offset (that is, starting result).
103   //
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;
108
109   // Optional.
110   //
111   // The maximum number of profiles to be returned, at most 100.
112   //
113   // Default is 100 unless a positive number smaller than 100 is specified.
114   int32 page_size = 3;
115
116   // Optional.
117   //
118   // A field mask to specify the profile fields to be listed in response.
119   // All fields are listed if it is unset.
120   //
121   // Valid values are:
122   //
123   // * name
124   google.protobuf.FieldMask field_mask = 4;
125 }
126
127 // The List profiles response object.
128 message ListProfilesResponse {
129   // Profiles for the specific tenant.
130   repeated Profile profiles = 1;
131
132   // A token to retrieve the next page of results. This is empty if there are no
133   // more results.
134   string next_page_token = 2;
135 }
136
137 // Create profile request.
138 message CreateProfileRequest {
139   // Required.
140   //
141   // The name of the tenant this profile belongs to.
142   //
143   // The format is "projects/{project_id}/tenants/{tenant_id}", for example,
144   // "projects/api-test-project/tenants/foo".
145   string parent = 1;
146
147   // Required.
148   //
149   // The profile to be created.
150   Profile profile = 2;
151 }
152
153 // Get profile request.
154 message GetProfileRequest {
155   // Required.
156   //
157   // Resource name of the profile to get.
158   //
159   // The format is
160   // "projects/{project_id}/tenants/{tenant_id}/profiles/{profile_id}",
161   // for example, "projects/api-test-project/tenants/foo/profiles/bar".
162   string name = 1;
163 }
164
165 // Update profile request
166 message UpdateProfileRequest {
167   // Required.
168   //
169   // Profile to be updated.
170   Profile profile = 1;
171
172   // Optional.
173   //
174   // A field mask to specify the profile fields to update.
175   //
176   // A full update is performed if it is unset.
177   //
178   // Valid values are:
179   //
180   // * externalId
181   // * source
182   // * uri
183   // * isHirable
184   // * createTime
185   // * updateTime
186   // * resumeHrxml
187   // * personNames
188   // * addresses
189   // * emailAddresses
190   // * phoneNumbers
191   // * personalUris
192   // * additionalContactInfo
193   // * employmentRecords
194   // * educationRecords
195   // * skills
196   // * projects
197   // * publications
198   // * patents
199   // * certifications
200   // * jobApplications
201   // * recruitingNotes
202   // * customAttributes
203   google.protobuf.FieldMask update_mask = 2;
204 }
205
206 // Delete profile request.
207 message DeleteProfileRequest {
208   // Required.
209   //
210   // Resource name of the profile to be deleted.
211   //
212   // The format is
213   // "projects/{project_id}/tenants/{tenant_id}/profiles/{profile_id}",
214   // for example, "projects/api-test-project/tenants/foo/profiles/bar".
215   string name = 1;
216 }
217
218 // The request body of the `SearchProfiles` call.
219 message SearchProfilesRequest {
220   // Required.
221   //
222   // The resource name of the tenant to search within.
223   //
224   // The format is "projects/{project_id}/tenants/{tenant_id}", for example,
225   // "projects/api-test-project/tenants/foo".
226   string parent = 1;
227
228   // Required.
229   //
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;
234
235   // Optional.
236   //
237   // Search query to execute. See
238   // [ProfileQuery][google.cloud.talent.v4beta1.ProfileQuery] for more details.
239   ProfileQuery profile_query = 3;
240
241   // Optional.
242   //
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.
245   //
246   // The maximum value allowed is 100. Otherwise an error is thrown.
247   int32 page_size = 4;
248
249   // Optional.
250   //
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;
259
260   // Optional.
261   //
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]
265   // is unset.
266   //
267   // The maximum allowed value is 5000. Otherwise an error is thrown.
268   //
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.
272   int32 offset = 6;
273
274   // Optional.
275   //
276   // This flag controls the spell-check feature. If `false`, the
277   // service attempts to correct a misspelled query.
278   //
279   // For example, "enginee" is corrected to "engineer".
280   bool disable_spell_check = 7;
281
282   // Optional.
283   //
284   // The criteria that determines how search results are sorted.
285   // Defaults is "relevance desc" if no value is specified.
286   //
287   // Supported options are:
288   //
289   // * "relevance desc": By descending relevance, as determined by the API
290   //    algorithms.
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
296   //   order.
297   // * "first_name desc": Sort by [PersonStrcuturedName.given_name][] in
298   //   descending order.
299   // * "last_name": Sort by [PersonStrcuturedName.family_name][] in ascending
300   //   order.
301   // * "last_name desc": Sort by [PersonStrcuturedName.family_name][] in
302   //   ascending order.
303   string order_by = 8;
304
305   // Optional.
306   //
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;
311
312   // Optional.
313   //
314   // A list of expressions specifies histogram requests against matching
315   // profiles for
316   // [SearchProfilesRequest][google.cloud.talent.v4beta1.SearchProfilesRequest].
317   //
318   // The expression syntax looks like a function definition with optional
319   // parameters.
320   //
321   // Function syntax: function_name(histogram_facet[, list of buckets])
322   //
323   // Data types:
324   //
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"].
330   //
331   // Built-in constants:
332   //
333   // * MIN (minimum number similar to java Double.MIN_VALUE)
334   // * MAX (maximum number similar to java Double.MAX_VALUE)
335   //
336   // Built-in functions:
337   //
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).
342   //
343   // Histogram Facets:
344   //
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
355   // "New York, NY".
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,
358   //  JP, GB.
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
367   // (exclusive).
368   // * application_date: The application date specifies application start dates.
369   // See
370   // [ApplicationDateFilter][google.cloud.talent.v4beta1.ApplicationDateFilter]
371   // for more details.
372   // * application_outcome_reason: The application outcome reason specifies the
373   // outcome reasons of job application.
374   // See
375   // [ApplicationOutcomeReasonFilter][google.cloud.talent.v4beta1.ApplicationOutcomeReasonFilter]
376   // for more details.
377   // * application_last_stage: The application last stage specifies the last
378   // stage of job application.
379   // See
380   // [ApplicationLastStageFilter][google.cloud.talent.v4beta1.ApplicationLastStageFilter]
381   // for more details.
382   // * application_job_title: The application job title specifies the job
383   // applied for in the application.
384   // See
385   // [ApplicationJobFilter][google.cloud.talent.v4beta1.ApplicationJobFilter]
386   // for more details.
387   // * application_status: The application status specifies the status of job
388   // application.
389   // See
390   // [ApplicationStatusFilter][google.cloud.talent.v4beta1.ApplicationStatusFilter]
391   // for more details.
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"].
397   //
398   // Example expressions:
399   //
400   // * count(admin1)
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;
407 }
408
409 // Response of SearchProfiles method.
410 message SearchProfilesResponse {
411   // An estimation of the number of profiles that match the specified query.
412   //
413   // This number isn't guaranteed to be accurate.
414   int64 estimated_total_size = 1;
415
416   // The spell checking result, and correction.
417   SpellingCorrection spell_correction = 2;
418
419   // Additional information for the API invocation, such as the request
420   // tracking id.
421   ResponseMetadata metadata = 3;
422
423   // A token to retrieve the next page of results. This is empty if there are no
424   // more results.
425   string next_page_token = 4;
426
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;
430
431   // The profile entities that match the specified
432   // [SearchProfilesRequest][google.cloud.talent.v4beta1.SearchProfilesRequest].
433   repeated SummarizedProfile summarized_profiles = 6;
434 }
435
436 // Output only.
437 //
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;
443
444   // A profile summary shows the profile summary and how the profile matches the
445   // search query.
446   //
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.
450   //
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".
457   Profile summary = 2;
458 }