Built motion from commit 44377920.|2.6.11
[motion2.git] / legacy-libs / google-proto-files / google / cloud / talent / v4beta1 / resume_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/profile.proto";
22
23 option go_package = "google.golang.org/genproto/googleapis/cloud/talent/v4beta1;talent";
24 option java_multiple_files = true;
25 option java_outer_classname = "ResumeServiceProto";
26 option java_package = "com.google.cloud.talent.v4beta1";
27 option objc_class_prefix = "CTS";
28
29 // A service that handles resume parsing.
30 service ResumeService {
31   // Parses a resume into a [Profile][google.cloud.talent.v4beta1.Profile]. The
32   // API attempts to fill out the following profile fields if present within the
33   // resume:
34   //
35   // * personNames
36   // * addresses
37   // * emailAddress
38   // * phoneNumbers
39   // * personalUris
40   // * employmentRecords
41   // * educationRecords
42   // * skills
43   //
44   // Note that some attributes in these fields may not be populated if they're
45   // not present within the resume or unrecognizable by the resume parser.
46   //
47   // This API does not save the resume or profile. To create a profile from this
48   // resume, clients need to call the CreateProfile method again with the
49   // profile returned.
50   //
51   // The following list of formats are supported:
52   //
53   // * PDF
54   // * TXT
55   // * DOC
56   // * RTF
57   // * DOCX
58   // * PNG (only when [ParseResumeRequest.enable_ocr][] is set to `true`,
59   // otherwise an error is thrown)
60   rpc ParseResume(ParseResumeRequest) returns (ParseResumeResponse) {
61     option (google.api.http) = {
62       post: "/v4beta1/{parent=projects/*}/resumes:parse"
63       body: "*"
64     };
65   }
66 }
67
68 // Parse resume request.
69 message ParseResumeRequest {
70   // Required.
71   //
72   // The resource name of the project.
73   //
74   // The format is "projects/{project_id}", for example,
75   // "projects/api-test-project".
76   string parent = 1;
77
78   // Required.
79   //
80   // The bytes of the resume file in common format, for example, PDF, TXT.
81   // UTF-8 encoding is required if the resume is text-based, otherwise an error
82   // is thrown.
83   bytes resume = 2;
84
85   // Optional.
86   //
87   // The region code indicating where the resume is from. Values
88   // are as per the ISO-3166-2 format. For example, US, FR, DE.
89   //
90   // This value is optional, but providing this value improves the resume
91   // parsing quality and performance.
92   //
93   // An error is thrown if the regionCode is invalid.
94   string region_code = 3;
95
96   // Optional.
97   //
98   // The language code of contents in the resume.
99   //
100   // Language codes must be in BCP-47 format, such as "en-US" or "sr-Latn".
101   // For more information, see
102   // [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47){:
103   // class="external" target="_blank" }.
104   string language_code = 4;
105
106   // Optional.
107   //
108   // Options that change how the resume parse is performed.
109   ParseResumeOptions options = 5;
110 }
111
112 // Options that change how the resume parse is performed.
113 message ParseResumeOptions {
114   // Optional.
115   //
116   // Controls whether Optical Character Recognition (OCR) is enabled.
117   //
118   // OCR is used to decipher pictorial resumes, or resumes that have some
119   // element of pictorial detail (for example, contact information placed within
120   // an image in a pdf). Note that the API call has a higher latency if OCR is
121   // enabled.
122   bool enable_ocr = 1;
123
124   // Optional.
125   //
126   // Controls whether detected skills are included in the parsed profile from
127   // sections of the resume other than just skills sections.
128   //
129   // Normally, returned skills are limited to those taken from a resume section
130   // intended to list skills. When enabled, this feature causes detected
131   // skills in other sections to also be included in the returned profile.
132   bool enable_full_skill_detection = 2;
133 }
134
135 // Parse resume response.
136 message ParseResumeResponse {
137   // The profile parsed from resume.
138   Profile profile = 1;
139
140   // Raw text from resume.
141   string raw_text = 2;
142 }