xref: /aosp_15_r20/external/googleapis/google/cloud/automl/v1beta1/io.proto (revision d5c09012810ac0c9f33fe448fb6da8260d444cc9)
1*d5c09012SAndroid Build Coastguard Worker// Copyright 2020 Google LLC
2*d5c09012SAndroid Build Coastguard Worker//
3*d5c09012SAndroid Build Coastguard Worker// Licensed under the Apache License, Version 2.0 (the "License");
4*d5c09012SAndroid Build Coastguard Worker// you may not use this file except in compliance with the License.
5*d5c09012SAndroid Build Coastguard Worker// You may obtain a copy of the License at
6*d5c09012SAndroid Build Coastguard Worker//
7*d5c09012SAndroid Build Coastguard Worker//     http://www.apache.org/licenses/LICENSE-2.0
8*d5c09012SAndroid Build Coastguard Worker//
9*d5c09012SAndroid Build Coastguard Worker// Unless required by applicable law or agreed to in writing, software
10*d5c09012SAndroid Build Coastguard Worker// distributed under the License is distributed on an "AS IS" BASIS,
11*d5c09012SAndroid Build Coastguard Worker// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12*d5c09012SAndroid Build Coastguard Worker// See the License for the specific language governing permissions and
13*d5c09012SAndroid Build Coastguard Worker// limitations under the License.
14*d5c09012SAndroid Build Coastguard Worker
15*d5c09012SAndroid Build Coastguard Workersyntax = "proto3";
16*d5c09012SAndroid Build Coastguard Worker
17*d5c09012SAndroid Build Coastguard Workerpackage google.cloud.automl.v1beta1;
18*d5c09012SAndroid Build Coastguard Worker
19*d5c09012SAndroid Build Coastguard Worker
20*d5c09012SAndroid Build Coastguard Workeroption go_package = "cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb";
21*d5c09012SAndroid Build Coastguard Workeroption java_multiple_files = true;
22*d5c09012SAndroid Build Coastguard Workeroption java_package = "com.google.cloud.automl.v1beta1";
23*d5c09012SAndroid Build Coastguard Workeroption php_namespace = "Google\\Cloud\\AutoMl\\V1beta1";
24*d5c09012SAndroid Build Coastguard Workeroption ruby_package = "Google::Cloud::AutoML::V1beta1";
25*d5c09012SAndroid Build Coastguard Worker
26*d5c09012SAndroid Build Coastguard Worker// Input configuration for ImportData Action.
27*d5c09012SAndroid Build Coastguard Worker//
28*d5c09012SAndroid Build Coastguard Worker// The format of input depends on dataset_metadata the Dataset into which
29*d5c09012SAndroid Build Coastguard Worker// the import is happening has. As input source the
30*d5c09012SAndroid Build Coastguard Worker// [gcs_source][google.cloud.automl.v1beta1.InputConfig.gcs_source]
31*d5c09012SAndroid Build Coastguard Worker// is expected, unless specified otherwise. Additionally any input .CSV file
32*d5c09012SAndroid Build Coastguard Worker// by itself must be 100MB or smaller, unless specified otherwise.
33*d5c09012SAndroid Build Coastguard Worker// If an "example" file (that is, image, video etc.) with identical content
34*d5c09012SAndroid Build Coastguard Worker// (even if it had different GCS_FILE_PATH) is mentioned multiple times, then
35*d5c09012SAndroid Build Coastguard Worker// its label, bounding boxes etc. are appended. The same file should be always
36*d5c09012SAndroid Build Coastguard Worker// provided with the same ML_USE and GCS_FILE_PATH, if it is not, then
37*d5c09012SAndroid Build Coastguard Worker// these values are nondeterministically selected from the given ones.
38*d5c09012SAndroid Build Coastguard Worker//
39*d5c09012SAndroid Build Coastguard Worker// The formats are represented in EBNF with commas being literal and with
40*d5c09012SAndroid Build Coastguard Worker// non-terminal symbols defined near the end of this comment. The formats are:
41*d5c09012SAndroid Build Coastguard Worker//
42*d5c09012SAndroid Build Coastguard Worker//  *  For Image Classification:
43*d5c09012SAndroid Build Coastguard Worker//         CSV file(s) with each line in format:
44*d5c09012SAndroid Build Coastguard Worker//           ML_USE,GCS_FILE_PATH,LABEL,LABEL,...
45*d5c09012SAndroid Build Coastguard Worker//           GCS_FILE_PATH leads to image of up to 30MB in size. Supported
46*d5c09012SAndroid Build Coastguard Worker//           extensions: .JPEG, .GIF, .PNG, .WEBP, .BMP, .TIFF, .ICO
47*d5c09012SAndroid Build Coastguard Worker//           For MULTICLASS classification type, at most one LABEL is allowed
48*d5c09012SAndroid Build Coastguard Worker//           per image. If an image has not yet been labeled, then it should be
49*d5c09012SAndroid Build Coastguard Worker//           mentioned just once with no LABEL.
50*d5c09012SAndroid Build Coastguard Worker//         Some sample rows:
51*d5c09012SAndroid Build Coastguard Worker//           TRAIN,gs://folder/image1.jpg,daisy
52*d5c09012SAndroid Build Coastguard Worker//           TEST,gs://folder/image2.jpg,dandelion,tulip,rose
53*d5c09012SAndroid Build Coastguard Worker//           UNASSIGNED,gs://folder/image3.jpg,daisy
54*d5c09012SAndroid Build Coastguard Worker//           UNASSIGNED,gs://folder/image4.jpg
55*d5c09012SAndroid Build Coastguard Worker//
56*d5c09012SAndroid Build Coastguard Worker//  *  For Image Object Detection:
57*d5c09012SAndroid Build Coastguard Worker//         CSV file(s) with each line in format:
58*d5c09012SAndroid Build Coastguard Worker//           ML_USE,GCS_FILE_PATH,(LABEL,BOUNDING_BOX | ,,,,,,,)
59*d5c09012SAndroid Build Coastguard Worker//           GCS_FILE_PATH leads to image of up to 30MB in size. Supported
60*d5c09012SAndroid Build Coastguard Worker//           extensions: .JPEG, .GIF, .PNG.
61*d5c09012SAndroid Build Coastguard Worker//           Each image is assumed to be exhaustively labeled. The minimum
62*d5c09012SAndroid Build Coastguard Worker//           allowed BOUNDING_BOX edge length is 0.01, and no more than 500
63*d5c09012SAndroid Build Coastguard Worker//           BOUNDING_BOX-es per image are allowed (one BOUNDING_BOX is defined
64*d5c09012SAndroid Build Coastguard Worker//           per line). If an image has not yet been labeled, then it should be
65*d5c09012SAndroid Build Coastguard Worker//           mentioned just once with no LABEL and the ",,,,,,," in place of the
66*d5c09012SAndroid Build Coastguard Worker//           BOUNDING_BOX. For images which are known to not contain any
67*d5c09012SAndroid Build Coastguard Worker//           bounding boxes, they should be labelled explictly as
68*d5c09012SAndroid Build Coastguard Worker//           "NEGATIVE_IMAGE", followed by ",,,,,,," in place of the
69*d5c09012SAndroid Build Coastguard Worker//           BOUNDING_BOX.
70*d5c09012SAndroid Build Coastguard Worker//         Sample rows:
71*d5c09012SAndroid Build Coastguard Worker//           TRAIN,gs://folder/image1.png,car,0.1,0.1,,,0.3,0.3,,
72*d5c09012SAndroid Build Coastguard Worker//           TRAIN,gs://folder/image1.png,bike,.7,.6,,,.8,.9,,
73*d5c09012SAndroid Build Coastguard Worker//           UNASSIGNED,gs://folder/im2.png,car,0.1,0.1,0.2,0.1,0.2,0.3,0.1,0.3
74*d5c09012SAndroid Build Coastguard Worker//           TEST,gs://folder/im3.png,,,,,,,,,
75*d5c09012SAndroid Build Coastguard Worker//           TRAIN,gs://folder/im4.png,NEGATIVE_IMAGE,,,,,,,,,
76*d5c09012SAndroid Build Coastguard Worker//
77*d5c09012SAndroid Build Coastguard Worker//  *  For Video Classification:
78*d5c09012SAndroid Build Coastguard Worker//         CSV file(s) with each line in format:
79*d5c09012SAndroid Build Coastguard Worker//           ML_USE,GCS_FILE_PATH
80*d5c09012SAndroid Build Coastguard Worker//           where ML_USE VALIDATE value should not be used. The GCS_FILE_PATH
81*d5c09012SAndroid Build Coastguard Worker//           should lead to another .csv file which describes examples that have
82*d5c09012SAndroid Build Coastguard Worker//           given ML_USE, using the following row format:
83*d5c09012SAndroid Build Coastguard Worker//           GCS_FILE_PATH,(LABEL,TIME_SEGMENT_START,TIME_SEGMENT_END | ,,)
84*d5c09012SAndroid Build Coastguard Worker//           Here GCS_FILE_PATH leads to a video of up to 50GB in size and up
85*d5c09012SAndroid Build Coastguard Worker//           to 3h duration. Supported extensions: .MOV, .MPEG4, .MP4, .AVI.
86*d5c09012SAndroid Build Coastguard Worker//           TIME_SEGMENT_START and TIME_SEGMENT_END must be within the
87*d5c09012SAndroid Build Coastguard Worker//           length of the video, and end has to be after the start. Any segment
88*d5c09012SAndroid Build Coastguard Worker//           of a video which has one or more labels on it, is considered a
89*d5c09012SAndroid Build Coastguard Worker//           hard negative for all other labels. Any segment with no labels on
90*d5c09012SAndroid Build Coastguard Worker//           it is considered to be unknown. If a whole video is unknown, then
91*d5c09012SAndroid Build Coastguard Worker//           it shuold be mentioned just once with ",," in place of LABEL,
92*d5c09012SAndroid Build Coastguard Worker//           TIME_SEGMENT_START,TIME_SEGMENT_END.
93*d5c09012SAndroid Build Coastguard Worker//         Sample top level CSV file:
94*d5c09012SAndroid Build Coastguard Worker//           TRAIN,gs://folder/train_videos.csv
95*d5c09012SAndroid Build Coastguard Worker//           TEST,gs://folder/test_videos.csv
96*d5c09012SAndroid Build Coastguard Worker//           UNASSIGNED,gs://folder/other_videos.csv
97*d5c09012SAndroid Build Coastguard Worker//         Sample rows of a CSV file for a particular ML_USE:
98*d5c09012SAndroid Build Coastguard Worker//           gs://folder/video1.avi,car,120,180.000021
99*d5c09012SAndroid Build Coastguard Worker//           gs://folder/video1.avi,bike,150,180.000021
100*d5c09012SAndroid Build Coastguard Worker//           gs://folder/vid2.avi,car,0,60.5
101*d5c09012SAndroid Build Coastguard Worker//           gs://folder/vid3.avi,,,
102*d5c09012SAndroid Build Coastguard Worker//
103*d5c09012SAndroid Build Coastguard Worker//  *  For Video Object Tracking:
104*d5c09012SAndroid Build Coastguard Worker//         CSV file(s) with each line in format:
105*d5c09012SAndroid Build Coastguard Worker//           ML_USE,GCS_FILE_PATH
106*d5c09012SAndroid Build Coastguard Worker//           where ML_USE VALIDATE value should not be used. The GCS_FILE_PATH
107*d5c09012SAndroid Build Coastguard Worker//           should lead to another .csv file which describes examples that have
108*d5c09012SAndroid Build Coastguard Worker//           given ML_USE, using one of the following row format:
109*d5c09012SAndroid Build Coastguard Worker//           GCS_FILE_PATH,LABEL,[INSTANCE_ID],TIMESTAMP,BOUNDING_BOX
110*d5c09012SAndroid Build Coastguard Worker//           or
111*d5c09012SAndroid Build Coastguard Worker//           GCS_FILE_PATH,,,,,,,,,,
112*d5c09012SAndroid Build Coastguard Worker//           Here GCS_FILE_PATH leads to a video of up to 50GB in size and up
113*d5c09012SAndroid Build Coastguard Worker//           to 3h duration. Supported extensions: .MOV, .MPEG4, .MP4, .AVI.
114*d5c09012SAndroid Build Coastguard Worker//           Providing INSTANCE_IDs can help to obtain a better model. When
115*d5c09012SAndroid Build Coastguard Worker//           a specific labeled entity leaves the video frame, and shows up
116*d5c09012SAndroid Build Coastguard Worker//           afterwards it is not required, albeit preferable, that the same
117*d5c09012SAndroid Build Coastguard Worker//           INSTANCE_ID is given to it.
118*d5c09012SAndroid Build Coastguard Worker//           TIMESTAMP must be within the length of the video, the
119*d5c09012SAndroid Build Coastguard Worker//           BOUNDING_BOX is assumed to be drawn on the closest video's frame
120*d5c09012SAndroid Build Coastguard Worker//           to the TIMESTAMP. Any mentioned by the TIMESTAMP frame is expected
121*d5c09012SAndroid Build Coastguard Worker//           to be exhaustively labeled and no more than 500 BOUNDING_BOX-es per
122*d5c09012SAndroid Build Coastguard Worker//           frame are allowed. If a whole video is unknown, then it should be
123*d5c09012SAndroid Build Coastguard Worker//           mentioned just once with ",,,,,,,,,," in place of LABEL,
124*d5c09012SAndroid Build Coastguard Worker//           [INSTANCE_ID],TIMESTAMP,BOUNDING_BOX.
125*d5c09012SAndroid Build Coastguard Worker//         Sample top level CSV file:
126*d5c09012SAndroid Build Coastguard Worker//           TRAIN,gs://folder/train_videos.csv
127*d5c09012SAndroid Build Coastguard Worker//           TEST,gs://folder/test_videos.csv
128*d5c09012SAndroid Build Coastguard Worker//           UNASSIGNED,gs://folder/other_videos.csv
129*d5c09012SAndroid Build Coastguard Worker//         Seven sample rows of a CSV file for a particular ML_USE:
130*d5c09012SAndroid Build Coastguard Worker//           gs://folder/video1.avi,car,1,12.10,0.8,0.8,0.9,0.8,0.9,0.9,0.8,0.9
131*d5c09012SAndroid Build Coastguard Worker//           gs://folder/video1.avi,car,1,12.90,0.4,0.8,0.5,0.8,0.5,0.9,0.4,0.9
132*d5c09012SAndroid Build Coastguard Worker//           gs://folder/video1.avi,car,2,12.10,.4,.2,.5,.2,.5,.3,.4,.3
133*d5c09012SAndroid Build Coastguard Worker//           gs://folder/video1.avi,car,2,12.90,.8,.2,,,.9,.3,,
134*d5c09012SAndroid Build Coastguard Worker//           gs://folder/video1.avi,bike,,12.50,.45,.45,,,.55,.55,,
135*d5c09012SAndroid Build Coastguard Worker//           gs://folder/video2.avi,car,1,0,.1,.9,,,.9,.1,,
136*d5c09012SAndroid Build Coastguard Worker//           gs://folder/video2.avi,,,,,,,,,,,
137*d5c09012SAndroid Build Coastguard Worker//  *  For Text Extraction:
138*d5c09012SAndroid Build Coastguard Worker//         CSV file(s) with each line in format:
139*d5c09012SAndroid Build Coastguard Worker//           ML_USE,GCS_FILE_PATH
140*d5c09012SAndroid Build Coastguard Worker//           GCS_FILE_PATH leads to a .JSONL (that is, JSON Lines) file which
141*d5c09012SAndroid Build Coastguard Worker//           either imports text in-line or as documents. Any given
142*d5c09012SAndroid Build Coastguard Worker//           .JSONL file must be 100MB or smaller.
143*d5c09012SAndroid Build Coastguard Worker//           The in-line .JSONL file contains, per line, a proto that wraps a
144*d5c09012SAndroid Build Coastguard Worker//           TextSnippet proto (in json representation) followed by one or more
145*d5c09012SAndroid Build Coastguard Worker//           AnnotationPayload protos (called annotations), which have
146*d5c09012SAndroid Build Coastguard Worker//           display_name and text_extraction detail populated. The given text
147*d5c09012SAndroid Build Coastguard Worker//           is expected to be annotated exhaustively, for example, if you look
148*d5c09012SAndroid Build Coastguard Worker//           for animals and text contains "dolphin" that is not labeled, then
149*d5c09012SAndroid Build Coastguard Worker//           "dolphin" is assumed to not be an animal. Any given text snippet
150*d5c09012SAndroid Build Coastguard Worker//           content must be 10KB or smaller, and also be UTF-8 NFC encoded
151*d5c09012SAndroid Build Coastguard Worker//           (ASCII already is).
152*d5c09012SAndroid Build Coastguard Worker//           The document .JSONL file contains, per line, a proto that wraps a
153*d5c09012SAndroid Build Coastguard Worker//           Document proto. The Document proto must have either document_text
154*d5c09012SAndroid Build Coastguard Worker//           or input_config set. In document_text case, the Document proto may
155*d5c09012SAndroid Build Coastguard Worker//           also contain the spatial information of the document, including
156*d5c09012SAndroid Build Coastguard Worker//           layout, document dimension and page number. In input_config case,
157*d5c09012SAndroid Build Coastguard Worker//           only PDF documents are supported now, and each document may be up
158*d5c09012SAndroid Build Coastguard Worker//           to 2MB large. Currently, annotations on documents cannot be
159*d5c09012SAndroid Build Coastguard Worker//           specified at import.
160*d5c09012SAndroid Build Coastguard Worker//         Three sample CSV rows:
161*d5c09012SAndroid Build Coastguard Worker//           TRAIN,gs://folder/file1.jsonl
162*d5c09012SAndroid Build Coastguard Worker//           VALIDATE,gs://folder/file2.jsonl
163*d5c09012SAndroid Build Coastguard Worker//           TEST,gs://folder/file3.jsonl
164*d5c09012SAndroid Build Coastguard Worker//         Sample in-line JSON Lines file for entity extraction (presented here
165*d5c09012SAndroid Build Coastguard Worker//         with artificial line breaks, but the only actual line break is
166*d5c09012SAndroid Build Coastguard Worker//         denoted by \n).:
167*d5c09012SAndroid Build Coastguard Worker//           {
168*d5c09012SAndroid Build Coastguard Worker//             "document": {
169*d5c09012SAndroid Build Coastguard Worker//               "document_text": {"content": "dog cat"}
170*d5c09012SAndroid Build Coastguard Worker//               "layout": [
171*d5c09012SAndroid Build Coastguard Worker//                 {
172*d5c09012SAndroid Build Coastguard Worker//                   "text_segment": {
173*d5c09012SAndroid Build Coastguard Worker//                     "start_offset": 0,
174*d5c09012SAndroid Build Coastguard Worker//                     "end_offset": 3,
175*d5c09012SAndroid Build Coastguard Worker//                   },
176*d5c09012SAndroid Build Coastguard Worker//                   "page_number": 1,
177*d5c09012SAndroid Build Coastguard Worker//                   "bounding_poly": {
178*d5c09012SAndroid Build Coastguard Worker//                     "normalized_vertices": [
179*d5c09012SAndroid Build Coastguard Worker//                       {"x": 0.1, "y": 0.1},
180*d5c09012SAndroid Build Coastguard Worker//                       {"x": 0.1, "y": 0.3},
181*d5c09012SAndroid Build Coastguard Worker//                       {"x": 0.3, "y": 0.3},
182*d5c09012SAndroid Build Coastguard Worker//                       {"x": 0.3, "y": 0.1},
183*d5c09012SAndroid Build Coastguard Worker//                     ],
184*d5c09012SAndroid Build Coastguard Worker//                   },
185*d5c09012SAndroid Build Coastguard Worker//                   "text_segment_type": TOKEN,
186*d5c09012SAndroid Build Coastguard Worker//                 },
187*d5c09012SAndroid Build Coastguard Worker//                 {
188*d5c09012SAndroid Build Coastguard Worker//                   "text_segment": {
189*d5c09012SAndroid Build Coastguard Worker//                     "start_offset": 4,
190*d5c09012SAndroid Build Coastguard Worker//                     "end_offset": 7,
191*d5c09012SAndroid Build Coastguard Worker//                   },
192*d5c09012SAndroid Build Coastguard Worker//                   "page_number": 1,
193*d5c09012SAndroid Build Coastguard Worker//                   "bounding_poly": {
194*d5c09012SAndroid Build Coastguard Worker//                     "normalized_vertices": [
195*d5c09012SAndroid Build Coastguard Worker//                       {"x": 0.4, "y": 0.1},
196*d5c09012SAndroid Build Coastguard Worker//                       {"x": 0.4, "y": 0.3},
197*d5c09012SAndroid Build Coastguard Worker//                       {"x": 0.8, "y": 0.3},
198*d5c09012SAndroid Build Coastguard Worker//                       {"x": 0.8, "y": 0.1},
199*d5c09012SAndroid Build Coastguard Worker//                     ],
200*d5c09012SAndroid Build Coastguard Worker//                   },
201*d5c09012SAndroid Build Coastguard Worker//                   "text_segment_type": TOKEN,
202*d5c09012SAndroid Build Coastguard Worker//                 }
203*d5c09012SAndroid Build Coastguard Worker//
204*d5c09012SAndroid Build Coastguard Worker//               ],
205*d5c09012SAndroid Build Coastguard Worker//               "document_dimensions": {
206*d5c09012SAndroid Build Coastguard Worker//                 "width": 8.27,
207*d5c09012SAndroid Build Coastguard Worker//                 "height": 11.69,
208*d5c09012SAndroid Build Coastguard Worker//                 "unit": INCH,
209*d5c09012SAndroid Build Coastguard Worker//               }
210*d5c09012SAndroid Build Coastguard Worker//               "page_count": 1,
211*d5c09012SAndroid Build Coastguard Worker//             },
212*d5c09012SAndroid Build Coastguard Worker//             "annotations": [
213*d5c09012SAndroid Build Coastguard Worker//               {
214*d5c09012SAndroid Build Coastguard Worker//                 "display_name": "animal",
215*d5c09012SAndroid Build Coastguard Worker//                 "text_extraction": {"text_segment": {"start_offset": 0,
216*d5c09012SAndroid Build Coastguard Worker//                 "end_offset": 3}}
217*d5c09012SAndroid Build Coastguard Worker//               },
218*d5c09012SAndroid Build Coastguard Worker//               {
219*d5c09012SAndroid Build Coastguard Worker//                 "display_name": "animal",
220*d5c09012SAndroid Build Coastguard Worker//                 "text_extraction": {"text_segment": {"start_offset": 4,
221*d5c09012SAndroid Build Coastguard Worker//                 "end_offset": 7}}
222*d5c09012SAndroid Build Coastguard Worker//               }
223*d5c09012SAndroid Build Coastguard Worker//             ],
224*d5c09012SAndroid Build Coastguard Worker//           }\n
225*d5c09012SAndroid Build Coastguard Worker//           {
226*d5c09012SAndroid Build Coastguard Worker//              "text_snippet": {
227*d5c09012SAndroid Build Coastguard Worker//                "content": "This dog is good."
228*d5c09012SAndroid Build Coastguard Worker//              },
229*d5c09012SAndroid Build Coastguard Worker//              "annotations": [
230*d5c09012SAndroid Build Coastguard Worker//                {
231*d5c09012SAndroid Build Coastguard Worker//                  "display_name": "animal",
232*d5c09012SAndroid Build Coastguard Worker//                  "text_extraction": {
233*d5c09012SAndroid Build Coastguard Worker//                    "text_segment": {"start_offset": 5, "end_offset": 8}
234*d5c09012SAndroid Build Coastguard Worker//                  }
235*d5c09012SAndroid Build Coastguard Worker//                }
236*d5c09012SAndroid Build Coastguard Worker//              ]
237*d5c09012SAndroid Build Coastguard Worker//           }
238*d5c09012SAndroid Build Coastguard Worker//         Sample document JSON Lines file (presented here with artificial line
239*d5c09012SAndroid Build Coastguard Worker//         breaks, but the only actual line break is denoted by \n).:
240*d5c09012SAndroid Build Coastguard Worker//           {
241*d5c09012SAndroid Build Coastguard Worker//             "document": {
242*d5c09012SAndroid Build Coastguard Worker//               "input_config": {
243*d5c09012SAndroid Build Coastguard Worker//                 "gcs_source": { "input_uris": [ "gs://folder/document1.pdf" ]
244*d5c09012SAndroid Build Coastguard Worker//                 }
245*d5c09012SAndroid Build Coastguard Worker//               }
246*d5c09012SAndroid Build Coastguard Worker//             }
247*d5c09012SAndroid Build Coastguard Worker//           }\n
248*d5c09012SAndroid Build Coastguard Worker//           {
249*d5c09012SAndroid Build Coastguard Worker//             "document": {
250*d5c09012SAndroid Build Coastguard Worker//               "input_config": {
251*d5c09012SAndroid Build Coastguard Worker//                 "gcs_source": { "input_uris": [ "gs://folder/document2.pdf" ]
252*d5c09012SAndroid Build Coastguard Worker//                 }
253*d5c09012SAndroid Build Coastguard Worker//               }
254*d5c09012SAndroid Build Coastguard Worker//             }
255*d5c09012SAndroid Build Coastguard Worker//           }
256*d5c09012SAndroid Build Coastguard Worker//
257*d5c09012SAndroid Build Coastguard Worker//  *  For Text Classification:
258*d5c09012SAndroid Build Coastguard Worker//         CSV file(s) with each line in format:
259*d5c09012SAndroid Build Coastguard Worker//           ML_USE,(TEXT_SNIPPET | GCS_FILE_PATH),LABEL,LABEL,...
260*d5c09012SAndroid Build Coastguard Worker//           TEXT_SNIPPET and GCS_FILE_PATH are distinguished by a pattern. If
261*d5c09012SAndroid Build Coastguard Worker//           the column content is a valid gcs file path, i.e. prefixed by
262*d5c09012SAndroid Build Coastguard Worker//           "gs://", it will be treated as a GCS_FILE_PATH, else if the content
263*d5c09012SAndroid Build Coastguard Worker//           is enclosed within double quotes (""), it is
264*d5c09012SAndroid Build Coastguard Worker//           treated as a TEXT_SNIPPET. In the GCS_FILE_PATH case, the path
265*d5c09012SAndroid Build Coastguard Worker//           must lead to a .txt file with UTF-8 encoding, for example,
266*d5c09012SAndroid Build Coastguard Worker//           "gs://folder/content.txt", and the content in it is extracted
267*d5c09012SAndroid Build Coastguard Worker//           as a text snippet. In TEXT_SNIPPET case, the column content
268*d5c09012SAndroid Build Coastguard Worker//           excluding quotes is treated as to be imported text snippet. In
269*d5c09012SAndroid Build Coastguard Worker//           both cases, the text snippet/file size must be within 128kB.
270*d5c09012SAndroid Build Coastguard Worker//           Maximum 100 unique labels are allowed per CSV row.
271*d5c09012SAndroid Build Coastguard Worker//         Sample rows:
272*d5c09012SAndroid Build Coastguard Worker//           TRAIN,"They have bad food and very rude",RudeService,BadFood
273*d5c09012SAndroid Build Coastguard Worker//           TRAIN,gs://folder/content.txt,SlowService
274*d5c09012SAndroid Build Coastguard Worker//           TEST,"Typically always bad service there.",RudeService
275*d5c09012SAndroid Build Coastguard Worker//           VALIDATE,"Stomach ache to go.",BadFood
276*d5c09012SAndroid Build Coastguard Worker//
277*d5c09012SAndroid Build Coastguard Worker//  *  For Text Sentiment:
278*d5c09012SAndroid Build Coastguard Worker//         CSV file(s) with each line in format:
279*d5c09012SAndroid Build Coastguard Worker//           ML_USE,(TEXT_SNIPPET | GCS_FILE_PATH),SENTIMENT
280*d5c09012SAndroid Build Coastguard Worker//           TEXT_SNIPPET and GCS_FILE_PATH are distinguished by a pattern. If
281*d5c09012SAndroid Build Coastguard Worker//           the column content is a valid gcs file path, that is, prefixed by
282*d5c09012SAndroid Build Coastguard Worker//           "gs://", it is treated as a GCS_FILE_PATH, otherwise it is treated
283*d5c09012SAndroid Build Coastguard Worker//           as a TEXT_SNIPPET. In the GCS_FILE_PATH case, the path
284*d5c09012SAndroid Build Coastguard Worker//           must lead to a .txt file with UTF-8 encoding, for example,
285*d5c09012SAndroid Build Coastguard Worker//           "gs://folder/content.txt", and the content in it is extracted
286*d5c09012SAndroid Build Coastguard Worker//           as a text snippet. In TEXT_SNIPPET case, the column content itself
287*d5c09012SAndroid Build Coastguard Worker//           is treated as to be imported text snippet. In both cases, the
288*d5c09012SAndroid Build Coastguard Worker//           text snippet must be up to 500 characters long.
289*d5c09012SAndroid Build Coastguard Worker//         Sample rows:
290*d5c09012SAndroid Build Coastguard Worker//           TRAIN,"@freewrytin this is way too good for your product",2
291*d5c09012SAndroid Build Coastguard Worker//           TRAIN,"I need this product so bad",3
292*d5c09012SAndroid Build Coastguard Worker//           TEST,"Thank you for this product.",4
293*d5c09012SAndroid Build Coastguard Worker//           VALIDATE,gs://folder/content.txt,2
294*d5c09012SAndroid Build Coastguard Worker//
295*d5c09012SAndroid Build Coastguard Worker//   *  For Tables:
296*d5c09012SAndroid Build Coastguard Worker//         Either
297*d5c09012SAndroid Build Coastguard Worker//         [gcs_source][google.cloud.automl.v1beta1.InputConfig.gcs_source] or
298*d5c09012SAndroid Build Coastguard Worker//
299*d5c09012SAndroid Build Coastguard Worker// [bigquery_source][google.cloud.automl.v1beta1.InputConfig.bigquery_source]
300*d5c09012SAndroid Build Coastguard Worker//         can be used. All inputs is concatenated into a single
301*d5c09012SAndroid Build Coastguard Worker//
302*d5c09012SAndroid Build Coastguard Worker// [primary_table][google.cloud.automl.v1beta1.TablesDatasetMetadata.primary_table_name]
303*d5c09012SAndroid Build Coastguard Worker//         For gcs_source:
304*d5c09012SAndroid Build Coastguard Worker//           CSV file(s), where the first row of the first file is the header,
305*d5c09012SAndroid Build Coastguard Worker//           containing unique column names. If the first row of a subsequent
306*d5c09012SAndroid Build Coastguard Worker//           file is the same as the header, then it is also treated as a
307*d5c09012SAndroid Build Coastguard Worker//           header. All other rows contain values for the corresponding
308*d5c09012SAndroid Build Coastguard Worker//           columns.
309*d5c09012SAndroid Build Coastguard Worker//           Each .CSV file by itself must be 10GB or smaller, and their total
310*d5c09012SAndroid Build Coastguard Worker//           size must be 100GB or smaller.
311*d5c09012SAndroid Build Coastguard Worker//           First three sample rows of a CSV file:
312*d5c09012SAndroid Build Coastguard Worker//           "Id","First Name","Last Name","Dob","Addresses"
313*d5c09012SAndroid Build Coastguard Worker//
314*d5c09012SAndroid Build Coastguard Worker// "1","John","Doe","1968-01-22","[{"status":"current","address":"123_First_Avenue","city":"Seattle","state":"WA","zip":"11111","numberOfYears":"1"},{"status":"previous","address":"456_Main_Street","city":"Portland","state":"OR","zip":"22222","numberOfYears":"5"}]"
315*d5c09012SAndroid Build Coastguard Worker//
316*d5c09012SAndroid Build Coastguard Worker// "2","Jane","Doe","1980-10-16","[{"status":"current","address":"789_Any_Avenue","city":"Albany","state":"NY","zip":"33333","numberOfYears":"2"},{"status":"previous","address":"321_Main_Street","city":"Hoboken","state":"NJ","zip":"44444","numberOfYears":"3"}]}
317*d5c09012SAndroid Build Coastguard Worker//         For bigquery_source:
318*d5c09012SAndroid Build Coastguard Worker//           An URI of a BigQuery table. The user data size of the BigQuery
319*d5c09012SAndroid Build Coastguard Worker//           table must be 100GB or smaller.
320*d5c09012SAndroid Build Coastguard Worker//         An imported table must have between 2 and 1,000 columns, inclusive,
321*d5c09012SAndroid Build Coastguard Worker//         and between 1000 and 100,000,000 rows, inclusive. There are at most 5
322*d5c09012SAndroid Build Coastguard Worker//         import data running in parallel.
323*d5c09012SAndroid Build Coastguard Worker//  Definitions:
324*d5c09012SAndroid Build Coastguard Worker//  ML_USE = "TRAIN" | "VALIDATE" | "TEST" | "UNASSIGNED"
325*d5c09012SAndroid Build Coastguard Worker//           Describes how the given example (file) should be used for model
326*d5c09012SAndroid Build Coastguard Worker//           training. "UNASSIGNED" can be used when user has no preference.
327*d5c09012SAndroid Build Coastguard Worker//  GCS_FILE_PATH = A path to file on GCS, e.g. "gs://folder/image1.png".
328*d5c09012SAndroid Build Coastguard Worker//  LABEL = A display name of an object on an image, video etc., e.g. "dog".
329*d5c09012SAndroid Build Coastguard Worker//          Must be up to 32 characters long and can consist only of ASCII
330*d5c09012SAndroid Build Coastguard Worker//          Latin letters A-Z and a-z, underscores(_), and ASCII digits 0-9.
331*d5c09012SAndroid Build Coastguard Worker//          For each label an AnnotationSpec is created which display_name
332*d5c09012SAndroid Build Coastguard Worker//          becomes the label; AnnotationSpecs are given back in predictions.
333*d5c09012SAndroid Build Coastguard Worker//  INSTANCE_ID = A positive integer that identifies a specific instance of a
334*d5c09012SAndroid Build Coastguard Worker//                labeled entity on an example. Used e.g. to track two cars on
335*d5c09012SAndroid Build Coastguard Worker//                a video while being able to tell apart which one is which.
336*d5c09012SAndroid Build Coastguard Worker//  BOUNDING_BOX = VERTEX,VERTEX,VERTEX,VERTEX | VERTEX,,,VERTEX,,
337*d5c09012SAndroid Build Coastguard Worker//                 A rectangle parallel to the frame of the example (image,
338*d5c09012SAndroid Build Coastguard Worker//                 video). If 4 vertices are given they are connected by edges
339*d5c09012SAndroid Build Coastguard Worker//                 in the order provided, if 2 are given they are recognized
340*d5c09012SAndroid Build Coastguard Worker//                 as diagonally opposite vertices of the rectangle.
341*d5c09012SAndroid Build Coastguard Worker//  VERTEX = COORDINATE,COORDINATE
342*d5c09012SAndroid Build Coastguard Worker//           First coordinate is horizontal (x), the second is vertical (y).
343*d5c09012SAndroid Build Coastguard Worker//  COORDINATE = A float in 0 to 1 range, relative to total length of
344*d5c09012SAndroid Build Coastguard Worker//               image or video in given dimension. For fractions the
345*d5c09012SAndroid Build Coastguard Worker//               leading non-decimal 0 can be omitted (i.e. 0.3 = .3).
346*d5c09012SAndroid Build Coastguard Worker//               Point 0,0 is in top left.
347*d5c09012SAndroid Build Coastguard Worker//  TIME_SEGMENT_START = TIME_OFFSET
348*d5c09012SAndroid Build Coastguard Worker//                       Expresses a beginning, inclusive, of a time segment
349*d5c09012SAndroid Build Coastguard Worker//                       within an example that has a time dimension
350*d5c09012SAndroid Build Coastguard Worker//                       (e.g. video).
351*d5c09012SAndroid Build Coastguard Worker//  TIME_SEGMENT_END = TIME_OFFSET
352*d5c09012SAndroid Build Coastguard Worker//                     Expresses an end, exclusive, of a time segment within
353*d5c09012SAndroid Build Coastguard Worker//                     an example that has a time dimension (e.g. video).
354*d5c09012SAndroid Build Coastguard Worker//  TIME_OFFSET = A number of seconds as measured from the start of an
355*d5c09012SAndroid Build Coastguard Worker//                example (e.g. video). Fractions are allowed, up to a
356*d5c09012SAndroid Build Coastguard Worker//                microsecond precision. "inf" is allowed, and it means the end
357*d5c09012SAndroid Build Coastguard Worker//                of the example.
358*d5c09012SAndroid Build Coastguard Worker//  TEXT_SNIPPET = A content of a text snippet, UTF-8 encoded, enclosed within
359*d5c09012SAndroid Build Coastguard Worker//                 double quotes ("").
360*d5c09012SAndroid Build Coastguard Worker//  SENTIMENT = An integer between 0 and
361*d5c09012SAndroid Build Coastguard Worker//              Dataset.text_sentiment_dataset_metadata.sentiment_max
362*d5c09012SAndroid Build Coastguard Worker//              (inclusive). Describes the ordinal of the sentiment - higher
363*d5c09012SAndroid Build Coastguard Worker//              value means a more positive sentiment. All the values are
364*d5c09012SAndroid Build Coastguard Worker//              completely relative, i.e. neither 0 needs to mean a negative or
365*d5c09012SAndroid Build Coastguard Worker//              neutral sentiment nor sentiment_max needs to mean a positive one
366*d5c09012SAndroid Build Coastguard Worker//              - it is just required that 0 is the least positive sentiment
367*d5c09012SAndroid Build Coastguard Worker//              in the data, and sentiment_max is the  most positive one.
368*d5c09012SAndroid Build Coastguard Worker//              The SENTIMENT shouldn't be confused with "score" or "magnitude"
369*d5c09012SAndroid Build Coastguard Worker//              from the previous Natural Language Sentiment Analysis API.
370*d5c09012SAndroid Build Coastguard Worker//              All SENTIMENT values between 0 and sentiment_max must be
371*d5c09012SAndroid Build Coastguard Worker//              represented in the imported data. On prediction the same 0 to
372*d5c09012SAndroid Build Coastguard Worker//              sentiment_max range will be used. The difference between
373*d5c09012SAndroid Build Coastguard Worker//              neighboring sentiment values needs not to be uniform, e.g. 1 and
374*d5c09012SAndroid Build Coastguard Worker//              2 may be similar whereas the difference between 2 and 3 may be
375*d5c09012SAndroid Build Coastguard Worker//              huge.
376*d5c09012SAndroid Build Coastguard Worker//
377*d5c09012SAndroid Build Coastguard Worker//  Errors:
378*d5c09012SAndroid Build Coastguard Worker//  If any of the provided CSV files can't be parsed or if more than certain
379*d5c09012SAndroid Build Coastguard Worker//  percent of CSV rows cannot be processed then the operation fails and
380*d5c09012SAndroid Build Coastguard Worker//  nothing is imported. Regardless of overall success or failure the per-row
381*d5c09012SAndroid Build Coastguard Worker//  failures, up to a certain count cap, is listed in
382*d5c09012SAndroid Build Coastguard Worker//  Operation.metadata.partial_failures.
383*d5c09012SAndroid Build Coastguard Worker//
384*d5c09012SAndroid Build Coastguard Workermessage InputConfig {
385*d5c09012SAndroid Build Coastguard Worker  // The source of the input.
386*d5c09012SAndroid Build Coastguard Worker  oneof source {
387*d5c09012SAndroid Build Coastguard Worker    // The Google Cloud Storage location for the input content.
388*d5c09012SAndroid Build Coastguard Worker    // In ImportData, the gcs_source points to a csv with structure described in
389*d5c09012SAndroid Build Coastguard Worker    // the comment.
390*d5c09012SAndroid Build Coastguard Worker    GcsSource gcs_source = 1;
391*d5c09012SAndroid Build Coastguard Worker
392*d5c09012SAndroid Build Coastguard Worker    // The BigQuery location for the input content.
393*d5c09012SAndroid Build Coastguard Worker    BigQuerySource bigquery_source = 3;
394*d5c09012SAndroid Build Coastguard Worker  }
395*d5c09012SAndroid Build Coastguard Worker
396*d5c09012SAndroid Build Coastguard Worker  // Additional domain-specific parameters describing the semantic of the
397*d5c09012SAndroid Build Coastguard Worker  // imported data, any string must be up to 25000
398*d5c09012SAndroid Build Coastguard Worker  // characters long.
399*d5c09012SAndroid Build Coastguard Worker  //
400*d5c09012SAndroid Build Coastguard Worker  // *  For Tables:
401*d5c09012SAndroid Build Coastguard Worker  //    `schema_inference_version` - (integer) Required. The version of the
402*d5c09012SAndroid Build Coastguard Worker  //        algorithm that should be used for the initial inference of the
403*d5c09012SAndroid Build Coastguard Worker  //        schema (columns' DataTypes) of the table the data is being imported
404*d5c09012SAndroid Build Coastguard Worker  //        into. Allowed values: "1".
405*d5c09012SAndroid Build Coastguard Worker  map<string, string> params = 2;
406*d5c09012SAndroid Build Coastguard Worker}
407*d5c09012SAndroid Build Coastguard Worker
408*d5c09012SAndroid Build Coastguard Worker// Input configuration for BatchPredict Action.
409*d5c09012SAndroid Build Coastguard Worker//
410*d5c09012SAndroid Build Coastguard Worker// The format of input depends on the ML problem of the model used for
411*d5c09012SAndroid Build Coastguard Worker// prediction. As input source the
412*d5c09012SAndroid Build Coastguard Worker// [gcs_source][google.cloud.automl.v1beta1.InputConfig.gcs_source]
413*d5c09012SAndroid Build Coastguard Worker// is expected, unless specified otherwise.
414*d5c09012SAndroid Build Coastguard Worker//
415*d5c09012SAndroid Build Coastguard Worker// The formats are represented in EBNF with commas being literal and with
416*d5c09012SAndroid Build Coastguard Worker// non-terminal symbols defined near the end of this comment. The formats
417*d5c09012SAndroid Build Coastguard Worker// are:
418*d5c09012SAndroid Build Coastguard Worker//
419*d5c09012SAndroid Build Coastguard Worker//  *  For Image Classification:
420*d5c09012SAndroid Build Coastguard Worker//         CSV file(s) with each line having just a single column:
421*d5c09012SAndroid Build Coastguard Worker//           GCS_FILE_PATH
422*d5c09012SAndroid Build Coastguard Worker//           which leads to image of up to 30MB in size. Supported
423*d5c09012SAndroid Build Coastguard Worker//           extensions: .JPEG, .GIF, .PNG. This path is treated as the ID in
424*d5c09012SAndroid Build Coastguard Worker//           the Batch predict output.
425*d5c09012SAndroid Build Coastguard Worker//         Three sample rows:
426*d5c09012SAndroid Build Coastguard Worker//           gs://folder/image1.jpeg
427*d5c09012SAndroid Build Coastguard Worker//           gs://folder/image2.gif
428*d5c09012SAndroid Build Coastguard Worker//           gs://folder/image3.png
429*d5c09012SAndroid Build Coastguard Worker//
430*d5c09012SAndroid Build Coastguard Worker//  *  For Image Object Detection:
431*d5c09012SAndroid Build Coastguard Worker//         CSV file(s) with each line having just a single column:
432*d5c09012SAndroid Build Coastguard Worker//           GCS_FILE_PATH
433*d5c09012SAndroid Build Coastguard Worker//           which leads to image of up to 30MB in size. Supported
434*d5c09012SAndroid Build Coastguard Worker//           extensions: .JPEG, .GIF, .PNG. This path is treated as the ID in
435*d5c09012SAndroid Build Coastguard Worker//           the Batch predict output.
436*d5c09012SAndroid Build Coastguard Worker//         Three sample rows:
437*d5c09012SAndroid Build Coastguard Worker//           gs://folder/image1.jpeg
438*d5c09012SAndroid Build Coastguard Worker//           gs://folder/image2.gif
439*d5c09012SAndroid Build Coastguard Worker//           gs://folder/image3.png
440*d5c09012SAndroid Build Coastguard Worker//  *  For Video Classification:
441*d5c09012SAndroid Build Coastguard Worker//         CSV file(s) with each line in format:
442*d5c09012SAndroid Build Coastguard Worker//           GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END
443*d5c09012SAndroid Build Coastguard Worker//           GCS_FILE_PATH leads to video of up to 50GB in size and up to 3h
444*d5c09012SAndroid Build Coastguard Worker//           duration. Supported extensions: .MOV, .MPEG4, .MP4, .AVI.
445*d5c09012SAndroid Build Coastguard Worker//           TIME_SEGMENT_START and TIME_SEGMENT_END must be within the
446*d5c09012SAndroid Build Coastguard Worker//           length of the video, and end has to be after the start.
447*d5c09012SAndroid Build Coastguard Worker//         Three sample rows:
448*d5c09012SAndroid Build Coastguard Worker//           gs://folder/video1.mp4,10,40
449*d5c09012SAndroid Build Coastguard Worker//           gs://folder/video1.mp4,20,60
450*d5c09012SAndroid Build Coastguard Worker//           gs://folder/vid2.mov,0,inf
451*d5c09012SAndroid Build Coastguard Worker//
452*d5c09012SAndroid Build Coastguard Worker//  *  For Video Object Tracking:
453*d5c09012SAndroid Build Coastguard Worker//         CSV file(s) with each line in format:
454*d5c09012SAndroid Build Coastguard Worker//           GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END
455*d5c09012SAndroid Build Coastguard Worker//           GCS_FILE_PATH leads to video of up to 50GB in size and up to 3h
456*d5c09012SAndroid Build Coastguard Worker//           duration. Supported extensions: .MOV, .MPEG4, .MP4, .AVI.
457*d5c09012SAndroid Build Coastguard Worker//           TIME_SEGMENT_START and TIME_SEGMENT_END must be within the
458*d5c09012SAndroid Build Coastguard Worker//           length of the video, and end has to be after the start.
459*d5c09012SAndroid Build Coastguard Worker//         Three sample rows:
460*d5c09012SAndroid Build Coastguard Worker//           gs://folder/video1.mp4,10,240
461*d5c09012SAndroid Build Coastguard Worker//           gs://folder/video1.mp4,300,360
462*d5c09012SAndroid Build Coastguard Worker//           gs://folder/vid2.mov,0,inf
463*d5c09012SAndroid Build Coastguard Worker//  *  For Text Classification:
464*d5c09012SAndroid Build Coastguard Worker//         CSV file(s) with each line having just a single column:
465*d5c09012SAndroid Build Coastguard Worker//           GCS_FILE_PATH | TEXT_SNIPPET
466*d5c09012SAndroid Build Coastguard Worker//         Any given text file can have size upto 128kB.
467*d5c09012SAndroid Build Coastguard Worker//         Any given text snippet content must have 60,000 characters or less.
468*d5c09012SAndroid Build Coastguard Worker//         Three sample rows:
469*d5c09012SAndroid Build Coastguard Worker//           gs://folder/text1.txt
470*d5c09012SAndroid Build Coastguard Worker//           "Some text content to predict"
471*d5c09012SAndroid Build Coastguard Worker//           gs://folder/text3.pdf
472*d5c09012SAndroid Build Coastguard Worker//         Supported file extensions: .txt, .pdf
473*d5c09012SAndroid Build Coastguard Worker//
474*d5c09012SAndroid Build Coastguard Worker//  *  For Text Sentiment:
475*d5c09012SAndroid Build Coastguard Worker//         CSV file(s) with each line having just a single column:
476*d5c09012SAndroid Build Coastguard Worker//           GCS_FILE_PATH | TEXT_SNIPPET
477*d5c09012SAndroid Build Coastguard Worker//         Any given text file can have size upto 128kB.
478*d5c09012SAndroid Build Coastguard Worker//         Any given text snippet content must have 500 characters or less.
479*d5c09012SAndroid Build Coastguard Worker//         Three sample rows:
480*d5c09012SAndroid Build Coastguard Worker//           gs://folder/text1.txt
481*d5c09012SAndroid Build Coastguard Worker//           "Some text content to predict"
482*d5c09012SAndroid Build Coastguard Worker//           gs://folder/text3.pdf
483*d5c09012SAndroid Build Coastguard Worker//         Supported file extensions: .txt, .pdf
484*d5c09012SAndroid Build Coastguard Worker//
485*d5c09012SAndroid Build Coastguard Worker//  * For Text Extraction
486*d5c09012SAndroid Build Coastguard Worker//         .JSONL (i.e. JSON Lines) file(s) which either provide text in-line or
487*d5c09012SAndroid Build Coastguard Worker//         as documents (for a single BatchPredict call only one of the these
488*d5c09012SAndroid Build Coastguard Worker//         formats may be used).
489*d5c09012SAndroid Build Coastguard Worker//         The in-line .JSONL file(s) contain per line a proto that
490*d5c09012SAndroid Build Coastguard Worker//           wraps a temporary user-assigned TextSnippet ID (string up to 2000
491*d5c09012SAndroid Build Coastguard Worker//           characters long) called "id", a TextSnippet proto (in
492*d5c09012SAndroid Build Coastguard Worker//           json representation) and zero or more TextFeature protos. Any given
493*d5c09012SAndroid Build Coastguard Worker//           text snippet content must have 30,000 characters or less, and also
494*d5c09012SAndroid Build Coastguard Worker//           be UTF-8 NFC encoded (ASCII already is). The IDs provided should be
495*d5c09012SAndroid Build Coastguard Worker//           unique.
496*d5c09012SAndroid Build Coastguard Worker//         The document .JSONL file(s) contain, per line, a proto that wraps a
497*d5c09012SAndroid Build Coastguard Worker//           Document proto with input_config set. Only PDF documents are
498*d5c09012SAndroid Build Coastguard Worker//           supported now, and each document must be up to 2MB large.
499*d5c09012SAndroid Build Coastguard Worker//         Any given .JSONL file must be 100MB or smaller, and no more than 20
500*d5c09012SAndroid Build Coastguard Worker//         files may be given.
501*d5c09012SAndroid Build Coastguard Worker//         Sample in-line JSON Lines file (presented here with artificial line
502*d5c09012SAndroid Build Coastguard Worker//         breaks, but the only actual line break is denoted by \n):
503*d5c09012SAndroid Build Coastguard Worker//           {
504*d5c09012SAndroid Build Coastguard Worker//             "id": "my_first_id",
505*d5c09012SAndroid Build Coastguard Worker//             "text_snippet": { "content": "dog car cat"},
506*d5c09012SAndroid Build Coastguard Worker//             "text_features": [
507*d5c09012SAndroid Build Coastguard Worker//               {
508*d5c09012SAndroid Build Coastguard Worker//                 "text_segment": {"start_offset": 4, "end_offset": 6},
509*d5c09012SAndroid Build Coastguard Worker//                 "structural_type": PARAGRAPH,
510*d5c09012SAndroid Build Coastguard Worker//                 "bounding_poly": {
511*d5c09012SAndroid Build Coastguard Worker//                   "normalized_vertices": [
512*d5c09012SAndroid Build Coastguard Worker//                     {"x": 0.1, "y": 0.1},
513*d5c09012SAndroid Build Coastguard Worker//                     {"x": 0.1, "y": 0.3},
514*d5c09012SAndroid Build Coastguard Worker//                     {"x": 0.3, "y": 0.3},
515*d5c09012SAndroid Build Coastguard Worker//                     {"x": 0.3, "y": 0.1},
516*d5c09012SAndroid Build Coastguard Worker//                   ]
517*d5c09012SAndroid Build Coastguard Worker//                 },
518*d5c09012SAndroid Build Coastguard Worker//               }
519*d5c09012SAndroid Build Coastguard Worker//             ],
520*d5c09012SAndroid Build Coastguard Worker//           }\n
521*d5c09012SAndroid Build Coastguard Worker//           {
522*d5c09012SAndroid Build Coastguard Worker//             "id": "2",
523*d5c09012SAndroid Build Coastguard Worker//             "text_snippet": {
524*d5c09012SAndroid Build Coastguard Worker//               "content": "An elaborate content",
525*d5c09012SAndroid Build Coastguard Worker//               "mime_type": "text/plain"
526*d5c09012SAndroid Build Coastguard Worker//             }
527*d5c09012SAndroid Build Coastguard Worker//           }
528*d5c09012SAndroid Build Coastguard Worker//         Sample document JSON Lines file (presented here with artificial line
529*d5c09012SAndroid Build Coastguard Worker//         breaks, but the only actual line break is denoted by \n).:
530*d5c09012SAndroid Build Coastguard Worker//           {
531*d5c09012SAndroid Build Coastguard Worker//             "document": {
532*d5c09012SAndroid Build Coastguard Worker//               "input_config": {
533*d5c09012SAndroid Build Coastguard Worker//                 "gcs_source": { "input_uris": [ "gs://folder/document1.pdf" ]
534*d5c09012SAndroid Build Coastguard Worker//                 }
535*d5c09012SAndroid Build Coastguard Worker//               }
536*d5c09012SAndroid Build Coastguard Worker//             }
537*d5c09012SAndroid Build Coastguard Worker//           }\n
538*d5c09012SAndroid Build Coastguard Worker//           {
539*d5c09012SAndroid Build Coastguard Worker//             "document": {
540*d5c09012SAndroid Build Coastguard Worker//               "input_config": {
541*d5c09012SAndroid Build Coastguard Worker//                 "gcs_source": { "input_uris": [ "gs://folder/document2.pdf" ]
542*d5c09012SAndroid Build Coastguard Worker//                 }
543*d5c09012SAndroid Build Coastguard Worker//               }
544*d5c09012SAndroid Build Coastguard Worker//             }
545*d5c09012SAndroid Build Coastguard Worker//           }
546*d5c09012SAndroid Build Coastguard Worker//
547*d5c09012SAndroid Build Coastguard Worker//  *  For Tables:
548*d5c09012SAndroid Build Coastguard Worker//         Either
549*d5c09012SAndroid Build Coastguard Worker//         [gcs_source][google.cloud.automl.v1beta1.InputConfig.gcs_source] or
550*d5c09012SAndroid Build Coastguard Worker//
551*d5c09012SAndroid Build Coastguard Worker// [bigquery_source][google.cloud.automl.v1beta1.InputConfig.bigquery_source].
552*d5c09012SAndroid Build Coastguard Worker//         GCS case:
553*d5c09012SAndroid Build Coastguard Worker//           CSV file(s), each by itself 10GB or smaller and total size must be
554*d5c09012SAndroid Build Coastguard Worker//           100GB or smaller, where first file must have a header containing
555*d5c09012SAndroid Build Coastguard Worker//           column names. If the first row of a subsequent file is the same as
556*d5c09012SAndroid Build Coastguard Worker//           the header, then it is also treated as a header. All other rows
557*d5c09012SAndroid Build Coastguard Worker//           contain values for the corresponding columns.
558*d5c09012SAndroid Build Coastguard Worker//           The column names must contain the model's
559*d5c09012SAndroid Build Coastguard Worker//
560*d5c09012SAndroid Build Coastguard Worker// [input_feature_column_specs'][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs]
561*d5c09012SAndroid Build Coastguard Worker//
562*d5c09012SAndroid Build Coastguard Worker// [display_name-s][google.cloud.automl.v1beta1.ColumnSpec.display_name]
563*d5c09012SAndroid Build Coastguard Worker//           (order doesn't matter). The columns corresponding to the model's
564*d5c09012SAndroid Build Coastguard Worker//           input feature column specs must contain values compatible with the
565*d5c09012SAndroid Build Coastguard Worker//           column spec's data types. Prediction on all the rows, i.e. the CSV
566*d5c09012SAndroid Build Coastguard Worker//           lines, will be attempted. For FORECASTING
567*d5c09012SAndroid Build Coastguard Worker//
568*d5c09012SAndroid Build Coastguard Worker// [prediction_type][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]:
569*d5c09012SAndroid Build Coastguard Worker//           all columns having
570*d5c09012SAndroid Build Coastguard Worker//
571*d5c09012SAndroid Build Coastguard Worker// [TIME_SERIES_AVAILABLE_PAST_ONLY][google.cloud.automl.v1beta1.ColumnSpec.ForecastingMetadata.ColumnType]
572*d5c09012SAndroid Build Coastguard Worker//           type will be ignored.
573*d5c09012SAndroid Build Coastguard Worker//           First three sample rows of a CSV file:
574*d5c09012SAndroid Build Coastguard Worker//             "First Name","Last Name","Dob","Addresses"
575*d5c09012SAndroid Build Coastguard Worker//
576*d5c09012SAndroid Build Coastguard Worker// "John","Doe","1968-01-22","[{"status":"current","address":"123_First_Avenue","city":"Seattle","state":"WA","zip":"11111","numberOfYears":"1"},{"status":"previous","address":"456_Main_Street","city":"Portland","state":"OR","zip":"22222","numberOfYears":"5"}]"
577*d5c09012SAndroid Build Coastguard Worker//
578*d5c09012SAndroid Build Coastguard Worker// "Jane","Doe","1980-10-16","[{"status":"current","address":"789_Any_Avenue","city":"Albany","state":"NY","zip":"33333","numberOfYears":"2"},{"status":"previous","address":"321_Main_Street","city":"Hoboken","state":"NJ","zip":"44444","numberOfYears":"3"}]}
579*d5c09012SAndroid Build Coastguard Worker//         BigQuery case:
580*d5c09012SAndroid Build Coastguard Worker//           An URI of a BigQuery table. The user data size of the BigQuery
581*d5c09012SAndroid Build Coastguard Worker//           table must be 100GB or smaller.
582*d5c09012SAndroid Build Coastguard Worker//           The column names must contain the model's
583*d5c09012SAndroid Build Coastguard Worker//
584*d5c09012SAndroid Build Coastguard Worker// [input_feature_column_specs'][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs]
585*d5c09012SAndroid Build Coastguard Worker//
586*d5c09012SAndroid Build Coastguard Worker// [display_name-s][google.cloud.automl.v1beta1.ColumnSpec.display_name]
587*d5c09012SAndroid Build Coastguard Worker//           (order doesn't matter). The columns corresponding to the model's
588*d5c09012SAndroid Build Coastguard Worker//           input feature column specs must contain values compatible with the
589*d5c09012SAndroid Build Coastguard Worker//           column spec's data types. Prediction on all the rows of the table
590*d5c09012SAndroid Build Coastguard Worker//           will be attempted. For FORECASTING
591*d5c09012SAndroid Build Coastguard Worker//
592*d5c09012SAndroid Build Coastguard Worker// [prediction_type][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]:
593*d5c09012SAndroid Build Coastguard Worker//           all columns having
594*d5c09012SAndroid Build Coastguard Worker//
595*d5c09012SAndroid Build Coastguard Worker// [TIME_SERIES_AVAILABLE_PAST_ONLY][google.cloud.automl.v1beta1.ColumnSpec.ForecastingMetadata.ColumnType]
596*d5c09012SAndroid Build Coastguard Worker//           type will be ignored.
597*d5c09012SAndroid Build Coastguard Worker//
598*d5c09012SAndroid Build Coastguard Worker//  Definitions:
599*d5c09012SAndroid Build Coastguard Worker//  GCS_FILE_PATH = A path to file on GCS, e.g. "gs://folder/video.avi".
600*d5c09012SAndroid Build Coastguard Worker//  TEXT_SNIPPET = A content of a text snippet, UTF-8 encoded, enclosed within
601*d5c09012SAndroid Build Coastguard Worker//                 double quotes ("")
602*d5c09012SAndroid Build Coastguard Worker//  TIME_SEGMENT_START = TIME_OFFSET
603*d5c09012SAndroid Build Coastguard Worker//                       Expresses a beginning, inclusive, of a time segment
604*d5c09012SAndroid Build Coastguard Worker//                       within an
605*d5c09012SAndroid Build Coastguard Worker//                       example that has a time dimension (e.g. video).
606*d5c09012SAndroid Build Coastguard Worker//  TIME_SEGMENT_END = TIME_OFFSET
607*d5c09012SAndroid Build Coastguard Worker//                     Expresses an end, exclusive, of a time segment within
608*d5c09012SAndroid Build Coastguard Worker//                     an example that has a time dimension (e.g. video).
609*d5c09012SAndroid Build Coastguard Worker//  TIME_OFFSET = A number of seconds as measured from the start of an
610*d5c09012SAndroid Build Coastguard Worker//                example (e.g. video). Fractions are allowed, up to a
611*d5c09012SAndroid Build Coastguard Worker//                microsecond precision. "inf" is allowed and it means the end
612*d5c09012SAndroid Build Coastguard Worker//                of the example.
613*d5c09012SAndroid Build Coastguard Worker//
614*d5c09012SAndroid Build Coastguard Worker//  Errors:
615*d5c09012SAndroid Build Coastguard Worker//  If any of the provided CSV files can't be parsed or if more than certain
616*d5c09012SAndroid Build Coastguard Worker//  percent of CSV rows cannot be processed then the operation fails and
617*d5c09012SAndroid Build Coastguard Worker//  prediction does not happen. Regardless of overall success or failure the
618*d5c09012SAndroid Build Coastguard Worker//  per-row failures, up to a certain count cap, will be listed in
619*d5c09012SAndroid Build Coastguard Worker//  Operation.metadata.partial_failures.
620*d5c09012SAndroid Build Coastguard Workermessage BatchPredictInputConfig {
621*d5c09012SAndroid Build Coastguard Worker  // Required. The source of the input.
622*d5c09012SAndroid Build Coastguard Worker  oneof source {
623*d5c09012SAndroid Build Coastguard Worker    // The Google Cloud Storage location for the input content.
624*d5c09012SAndroid Build Coastguard Worker    GcsSource gcs_source = 1;
625*d5c09012SAndroid Build Coastguard Worker
626*d5c09012SAndroid Build Coastguard Worker    // The BigQuery location for the input content.
627*d5c09012SAndroid Build Coastguard Worker    BigQuerySource bigquery_source = 2;
628*d5c09012SAndroid Build Coastguard Worker  }
629*d5c09012SAndroid Build Coastguard Worker}
630*d5c09012SAndroid Build Coastguard Worker
631*d5c09012SAndroid Build Coastguard Worker// Input configuration of a [Document][google.cloud.automl.v1beta1.Document].
632*d5c09012SAndroid Build Coastguard Workermessage DocumentInputConfig {
633*d5c09012SAndroid Build Coastguard Worker  // The Google Cloud Storage location of the document file. Only a single path
634*d5c09012SAndroid Build Coastguard Worker  // should be given.
635*d5c09012SAndroid Build Coastguard Worker  // Max supported size: 512MB.
636*d5c09012SAndroid Build Coastguard Worker  // Supported extensions: .PDF.
637*d5c09012SAndroid Build Coastguard Worker  GcsSource gcs_source = 1;
638*d5c09012SAndroid Build Coastguard Worker}
639*d5c09012SAndroid Build Coastguard Worker
640*d5c09012SAndroid Build Coastguard Worker// *  For Translation:
641*d5c09012SAndroid Build Coastguard Worker//         CSV file `translation.csv`, with each line in format:
642*d5c09012SAndroid Build Coastguard Worker//         ML_USE,GCS_FILE_PATH
643*d5c09012SAndroid Build Coastguard Worker//         GCS_FILE_PATH leads to a .TSV file which describes examples that have
644*d5c09012SAndroid Build Coastguard Worker//         given ML_USE, using the following row format per line:
645*d5c09012SAndroid Build Coastguard Worker//         TEXT_SNIPPET (in source language) \t TEXT_SNIPPET (in target
646*d5c09012SAndroid Build Coastguard Worker//         language)
647*d5c09012SAndroid Build Coastguard Worker//
648*d5c09012SAndroid Build Coastguard Worker//   *  For Tables:
649*d5c09012SAndroid Build Coastguard Worker//         Output depends on whether the dataset was imported from GCS or
650*d5c09012SAndroid Build Coastguard Worker//         BigQuery.
651*d5c09012SAndroid Build Coastguard Worker//         GCS case:
652*d5c09012SAndroid Build Coastguard Worker//
653*d5c09012SAndroid Build Coastguard Worker// [gcs_destination][google.cloud.automl.v1beta1.OutputConfig.gcs_destination]
654*d5c09012SAndroid Build Coastguard Worker//           must be set. Exported are CSV file(s) `tables_1.csv`,
655*d5c09012SAndroid Build Coastguard Worker//           `tables_2.csv`,...,`tables_N.csv` with each having as header line
656*d5c09012SAndroid Build Coastguard Worker//           the table's column names, and all other lines contain values for
657*d5c09012SAndroid Build Coastguard Worker//           the header columns.
658*d5c09012SAndroid Build Coastguard Worker//         BigQuery case:
659*d5c09012SAndroid Build Coastguard Worker//
660*d5c09012SAndroid Build Coastguard Worker// [bigquery_destination][google.cloud.automl.v1beta1.OutputConfig.bigquery_destination]
661*d5c09012SAndroid Build Coastguard Worker//           pointing to a BigQuery project must be set. In the given project a
662*d5c09012SAndroid Build Coastguard Worker//           new dataset will be created with name
663*d5c09012SAndroid Build Coastguard Worker//
664*d5c09012SAndroid Build Coastguard Worker// `export_data_<automl-dataset-display-name>_<timestamp-of-export-call>`
665*d5c09012SAndroid Build Coastguard Worker//           where <automl-dataset-display-name> will be made
666*d5c09012SAndroid Build Coastguard Worker//           BigQuery-dataset-name compatible (e.g. most special characters will
667*d5c09012SAndroid Build Coastguard Worker//           become underscores), and timestamp will be in
668*d5c09012SAndroid Build Coastguard Worker//           YYYY_MM_DDThh_mm_ss_sssZ "based on ISO-8601" format. In that
669*d5c09012SAndroid Build Coastguard Worker//           dataset a new table called `primary_table` will be created, and
670*d5c09012SAndroid Build Coastguard Worker//           filled with precisely the same data as this obtained on import.
671*d5c09012SAndroid Build Coastguard Workermessage OutputConfig {
672*d5c09012SAndroid Build Coastguard Worker  // Required. The destination of the output.
673*d5c09012SAndroid Build Coastguard Worker  oneof destination {
674*d5c09012SAndroid Build Coastguard Worker    // The Google Cloud Storage location where the output is to be written to.
675*d5c09012SAndroid Build Coastguard Worker    // For Image Object Detection, Text Extraction, Video Classification and
676*d5c09012SAndroid Build Coastguard Worker    // Tables, in the given directory a new directory will be created with name:
677*d5c09012SAndroid Build Coastguard Worker    // export_data-<dataset-display-name>-<timestamp-of-export-call> where
678*d5c09012SAndroid Build Coastguard Worker    // timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format. All export
679*d5c09012SAndroid Build Coastguard Worker    // output will be written into that directory.
680*d5c09012SAndroid Build Coastguard Worker    GcsDestination gcs_destination = 1;
681*d5c09012SAndroid Build Coastguard Worker
682*d5c09012SAndroid Build Coastguard Worker    // The BigQuery location where the output is to be written to.
683*d5c09012SAndroid Build Coastguard Worker    BigQueryDestination bigquery_destination = 2;
684*d5c09012SAndroid Build Coastguard Worker  }
685*d5c09012SAndroid Build Coastguard Worker}
686*d5c09012SAndroid Build Coastguard Worker
687*d5c09012SAndroid Build Coastguard Worker// Output configuration for BatchPredict Action.
688*d5c09012SAndroid Build Coastguard Worker//
689*d5c09012SAndroid Build Coastguard Worker// As destination the
690*d5c09012SAndroid Build Coastguard Worker//
691*d5c09012SAndroid Build Coastguard Worker// [gcs_destination][google.cloud.automl.v1beta1.BatchPredictOutputConfig.gcs_destination]
692*d5c09012SAndroid Build Coastguard Worker// must be set unless specified otherwise for a domain. If gcs_destination is
693*d5c09012SAndroid Build Coastguard Worker// set then in the given directory a new directory is created. Its name
694*d5c09012SAndroid Build Coastguard Worker// will be
695*d5c09012SAndroid Build Coastguard Worker// "prediction-<model-display-name>-<timestamp-of-prediction-call>",
696*d5c09012SAndroid Build Coastguard Worker// where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format. The contents
697*d5c09012SAndroid Build Coastguard Worker// of it depends on the ML problem the predictions are made for.
698*d5c09012SAndroid Build Coastguard Worker//
699*d5c09012SAndroid Build Coastguard Worker//  *  For Image Classification:
700*d5c09012SAndroid Build Coastguard Worker//         In the created directory files `image_classification_1.jsonl`,
701*d5c09012SAndroid Build Coastguard Worker//         `image_classification_2.jsonl`,...,`image_classification_N.jsonl`
702*d5c09012SAndroid Build Coastguard Worker//         will be created, where N may be 1, and depends on the
703*d5c09012SAndroid Build Coastguard Worker//         total number of the successfully predicted images and annotations.
704*d5c09012SAndroid Build Coastguard Worker//         A single image will be listed only once with all its annotations,
705*d5c09012SAndroid Build Coastguard Worker//         and its annotations will never be split across files.
706*d5c09012SAndroid Build Coastguard Worker//         Each .JSONL file will contain, per line, a JSON representation of a
707*d5c09012SAndroid Build Coastguard Worker//         proto that wraps image's "ID" : "<id_value>" followed by a list of
708*d5c09012SAndroid Build Coastguard Worker//         zero or more AnnotationPayload protos (called annotations), which
709*d5c09012SAndroid Build Coastguard Worker//         have classification detail populated.
710*d5c09012SAndroid Build Coastguard Worker//         If prediction for any image failed (partially or completely), then an
711*d5c09012SAndroid Build Coastguard Worker//         additional `errors_1.jsonl`, `errors_2.jsonl`,..., `errors_N.jsonl`
712*d5c09012SAndroid Build Coastguard Worker//         files will be created (N depends on total number of failed
713*d5c09012SAndroid Build Coastguard Worker//         predictions). These files will have a JSON representation of a proto
714*d5c09012SAndroid Build Coastguard Worker//         that wraps the same "ID" : "<id_value>" but here followed by
715*d5c09012SAndroid Build Coastguard Worker//         exactly one
716*d5c09012SAndroid Build Coastguard Worker//
717*d5c09012SAndroid Build Coastguard Worker// [`google.rpc.Status`](https:
718*d5c09012SAndroid Build Coastguard Worker// //github.com/googleapis/googleapis/blob/master/google/rpc/status.proto)
719*d5c09012SAndroid Build Coastguard Worker//         containing only `code` and `message`fields.
720*d5c09012SAndroid Build Coastguard Worker//
721*d5c09012SAndroid Build Coastguard Worker//  *  For Image Object Detection:
722*d5c09012SAndroid Build Coastguard Worker//         In the created directory files `image_object_detection_1.jsonl`,
723*d5c09012SAndroid Build Coastguard Worker//         `image_object_detection_2.jsonl`,...,`image_object_detection_N.jsonl`
724*d5c09012SAndroid Build Coastguard Worker//         will be created, where N may be 1, and depends on the
725*d5c09012SAndroid Build Coastguard Worker//         total number of the successfully predicted images and annotations.
726*d5c09012SAndroid Build Coastguard Worker//         Each .JSONL file will contain, per line, a JSON representation of a
727*d5c09012SAndroid Build Coastguard Worker//         proto that wraps image's "ID" : "<id_value>" followed by a list of
728*d5c09012SAndroid Build Coastguard Worker//         zero or more AnnotationPayload protos (called annotations), which
729*d5c09012SAndroid Build Coastguard Worker//         have image_object_detection detail populated. A single image will
730*d5c09012SAndroid Build Coastguard Worker//         be listed only once with all its annotations, and its annotations
731*d5c09012SAndroid Build Coastguard Worker//         will never be split across files.
732*d5c09012SAndroid Build Coastguard Worker//         If prediction for any image failed (partially or completely), then
733*d5c09012SAndroid Build Coastguard Worker//         additional `errors_1.jsonl`, `errors_2.jsonl`,..., `errors_N.jsonl`
734*d5c09012SAndroid Build Coastguard Worker//         files will be created (N depends on total number of failed
735*d5c09012SAndroid Build Coastguard Worker//         predictions). These files will have a JSON representation of a proto
736*d5c09012SAndroid Build Coastguard Worker//         that wraps the same "ID" : "<id_value>" but here followed by
737*d5c09012SAndroid Build Coastguard Worker//         exactly one
738*d5c09012SAndroid Build Coastguard Worker//
739*d5c09012SAndroid Build Coastguard Worker// [`google.rpc.Status`](https:
740*d5c09012SAndroid Build Coastguard Worker// //github.com/googleapis/googleapis/blob/master/google/rpc/status.proto)
741*d5c09012SAndroid Build Coastguard Worker//         containing only `code` and `message`fields.
742*d5c09012SAndroid Build Coastguard Worker//  *  For Video Classification:
743*d5c09012SAndroid Build Coastguard Worker//         In the created directory a video_classification.csv file, and a .JSON
744*d5c09012SAndroid Build Coastguard Worker//         file per each video classification requested in the input (i.e. each
745*d5c09012SAndroid Build Coastguard Worker//         line in given CSV(s)), will be created.
746*d5c09012SAndroid Build Coastguard Worker//
747*d5c09012SAndroid Build Coastguard Worker//         The format of video_classification.csv is:
748*d5c09012SAndroid Build Coastguard Worker//
749*d5c09012SAndroid Build Coastguard Worker// GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END,JSON_FILE_NAME,STATUS
750*d5c09012SAndroid Build Coastguard Worker//         where:
751*d5c09012SAndroid Build Coastguard Worker//         GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END = matches 1 to 1
752*d5c09012SAndroid Build Coastguard Worker//             the prediction input lines (i.e. video_classification.csv has
753*d5c09012SAndroid Build Coastguard Worker//             precisely the same number of lines as the prediction input had.)
754*d5c09012SAndroid Build Coastguard Worker//         JSON_FILE_NAME = Name of .JSON file in the output directory, which
755*d5c09012SAndroid Build Coastguard Worker//             contains prediction responses for the video time segment.
756*d5c09012SAndroid Build Coastguard Worker//         STATUS = "OK" if prediction completed successfully, or an error code
757*d5c09012SAndroid Build Coastguard Worker//             with message otherwise. If STATUS is not "OK" then the .JSON file
758*d5c09012SAndroid Build Coastguard Worker//             for that line may not exist or be empty.
759*d5c09012SAndroid Build Coastguard Worker//
760*d5c09012SAndroid Build Coastguard Worker//         Each .JSON file, assuming STATUS is "OK", will contain a list of
761*d5c09012SAndroid Build Coastguard Worker//         AnnotationPayload protos in JSON format, which are the predictions
762*d5c09012SAndroid Build Coastguard Worker//         for the video time segment the file is assigned to in the
763*d5c09012SAndroid Build Coastguard Worker//         video_classification.csv. All AnnotationPayload protos will have
764*d5c09012SAndroid Build Coastguard Worker//         video_classification field set, and will be sorted by
765*d5c09012SAndroid Build Coastguard Worker//         video_classification.type field (note that the returned types are
766*d5c09012SAndroid Build Coastguard Worker//         governed by `classifaction_types` parameter in
767*d5c09012SAndroid Build Coastguard Worker//         [PredictService.BatchPredictRequest.params][]).
768*d5c09012SAndroid Build Coastguard Worker//
769*d5c09012SAndroid Build Coastguard Worker//  *  For Video Object Tracking:
770*d5c09012SAndroid Build Coastguard Worker//         In the created directory a video_object_tracking.csv file will be
771*d5c09012SAndroid Build Coastguard Worker//         created, and multiple files video_object_trackinng_1.json,
772*d5c09012SAndroid Build Coastguard Worker//         video_object_trackinng_2.json,..., video_object_trackinng_N.json,
773*d5c09012SAndroid Build Coastguard Worker//         where N is the number of requests in the input (i.e. the number of
774*d5c09012SAndroid Build Coastguard Worker//         lines in given CSV(s)).
775*d5c09012SAndroid Build Coastguard Worker//
776*d5c09012SAndroid Build Coastguard Worker//         The format of video_object_tracking.csv is:
777*d5c09012SAndroid Build Coastguard Worker//
778*d5c09012SAndroid Build Coastguard Worker// GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END,JSON_FILE_NAME,STATUS
779*d5c09012SAndroid Build Coastguard Worker//         where:
780*d5c09012SAndroid Build Coastguard Worker//         GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END = matches 1 to 1
781*d5c09012SAndroid Build Coastguard Worker//             the prediction input lines (i.e. video_object_tracking.csv has
782*d5c09012SAndroid Build Coastguard Worker//             precisely the same number of lines as the prediction input had.)
783*d5c09012SAndroid Build Coastguard Worker//         JSON_FILE_NAME = Name of .JSON file in the output directory, which
784*d5c09012SAndroid Build Coastguard Worker//             contains prediction responses for the video time segment.
785*d5c09012SAndroid Build Coastguard Worker//         STATUS = "OK" if prediction completed successfully, or an error
786*d5c09012SAndroid Build Coastguard Worker//             code with message otherwise. If STATUS is not "OK" then the .JSON
787*d5c09012SAndroid Build Coastguard Worker//             file for that line may not exist or be empty.
788*d5c09012SAndroid Build Coastguard Worker//
789*d5c09012SAndroid Build Coastguard Worker//         Each .JSON file, assuming STATUS is "OK", will contain a list of
790*d5c09012SAndroid Build Coastguard Worker//         AnnotationPayload protos in JSON format, which are the predictions
791*d5c09012SAndroid Build Coastguard Worker//         for each frame of the video time segment the file is assigned to in
792*d5c09012SAndroid Build Coastguard Worker//         video_object_tracking.csv. All AnnotationPayload protos will have
793*d5c09012SAndroid Build Coastguard Worker//         video_object_tracking field set.
794*d5c09012SAndroid Build Coastguard Worker//  *  For Text Classification:
795*d5c09012SAndroid Build Coastguard Worker//         In the created directory files `text_classification_1.jsonl`,
796*d5c09012SAndroid Build Coastguard Worker//         `text_classification_2.jsonl`,...,`text_classification_N.jsonl`
797*d5c09012SAndroid Build Coastguard Worker//         will be created, where N may be 1, and depends on the
798*d5c09012SAndroid Build Coastguard Worker//         total number of inputs and annotations found.
799*d5c09012SAndroid Build Coastguard Worker//
800*d5c09012SAndroid Build Coastguard Worker//         Each .JSONL file will contain, per line, a JSON representation of a
801*d5c09012SAndroid Build Coastguard Worker//         proto that wraps input text snippet or input text file and a list of
802*d5c09012SAndroid Build Coastguard Worker//         zero or more AnnotationPayload protos (called annotations), which
803*d5c09012SAndroid Build Coastguard Worker//         have classification detail populated. A single text snippet or file
804*d5c09012SAndroid Build Coastguard Worker//         will be listed only once with all its annotations, and its
805*d5c09012SAndroid Build Coastguard Worker//         annotations will never be split across files.
806*d5c09012SAndroid Build Coastguard Worker//
807*d5c09012SAndroid Build Coastguard Worker//         If prediction for any text snippet or file failed (partially or
808*d5c09012SAndroid Build Coastguard Worker//         completely), then additional `errors_1.jsonl`, `errors_2.jsonl`,...,
809*d5c09012SAndroid Build Coastguard Worker//         `errors_N.jsonl` files will be created (N depends on total number of
810*d5c09012SAndroid Build Coastguard Worker//         failed predictions). These files will have a JSON representation of a
811*d5c09012SAndroid Build Coastguard Worker//         proto that wraps input text snippet or input text file followed by
812*d5c09012SAndroid Build Coastguard Worker//         exactly one
813*d5c09012SAndroid Build Coastguard Worker//
814*d5c09012SAndroid Build Coastguard Worker// [`google.rpc.Status`](https:
815*d5c09012SAndroid Build Coastguard Worker// //github.com/googleapis/googleapis/blob/master/google/rpc/status.proto)
816*d5c09012SAndroid Build Coastguard Worker//         containing only `code` and `message`.
817*d5c09012SAndroid Build Coastguard Worker//
818*d5c09012SAndroid Build Coastguard Worker//  *  For Text Sentiment:
819*d5c09012SAndroid Build Coastguard Worker//         In the created directory files `text_sentiment_1.jsonl`,
820*d5c09012SAndroid Build Coastguard Worker//         `text_sentiment_2.jsonl`,...,`text_sentiment_N.jsonl`
821*d5c09012SAndroid Build Coastguard Worker//         will be created, where N may be 1, and depends on the
822*d5c09012SAndroid Build Coastguard Worker//         total number of inputs and annotations found.
823*d5c09012SAndroid Build Coastguard Worker//
824*d5c09012SAndroid Build Coastguard Worker//         Each .JSONL file will contain, per line, a JSON representation of a
825*d5c09012SAndroid Build Coastguard Worker//         proto that wraps input text snippet or input text file and a list of
826*d5c09012SAndroid Build Coastguard Worker//         zero or more AnnotationPayload protos (called annotations), which
827*d5c09012SAndroid Build Coastguard Worker//         have text_sentiment detail populated. A single text snippet or file
828*d5c09012SAndroid Build Coastguard Worker//         will be listed only once with all its annotations, and its
829*d5c09012SAndroid Build Coastguard Worker//         annotations will never be split across files.
830*d5c09012SAndroid Build Coastguard Worker//
831*d5c09012SAndroid Build Coastguard Worker//         If prediction for any text snippet or file failed (partially or
832*d5c09012SAndroid Build Coastguard Worker//         completely), then additional `errors_1.jsonl`, `errors_2.jsonl`,...,
833*d5c09012SAndroid Build Coastguard Worker//         `errors_N.jsonl` files will be created (N depends on total number of
834*d5c09012SAndroid Build Coastguard Worker//         failed predictions). These files will have a JSON representation of a
835*d5c09012SAndroid Build Coastguard Worker//         proto that wraps input text snippet or input text file followed by
836*d5c09012SAndroid Build Coastguard Worker//         exactly one
837*d5c09012SAndroid Build Coastguard Worker//
838*d5c09012SAndroid Build Coastguard Worker// [`google.rpc.Status`](https:
839*d5c09012SAndroid Build Coastguard Worker// //github.com/googleapis/googleapis/blob/master/google/rpc/status.proto)
840*d5c09012SAndroid Build Coastguard Worker//         containing only `code` and `message`.
841*d5c09012SAndroid Build Coastguard Worker//
842*d5c09012SAndroid Build Coastguard Worker//   *  For Text Extraction:
843*d5c09012SAndroid Build Coastguard Worker//         In the created directory files `text_extraction_1.jsonl`,
844*d5c09012SAndroid Build Coastguard Worker//         `text_extraction_2.jsonl`,...,`text_extraction_N.jsonl`
845*d5c09012SAndroid Build Coastguard Worker//         will be created, where N may be 1, and depends on the
846*d5c09012SAndroid Build Coastguard Worker//         total number of inputs and annotations found.
847*d5c09012SAndroid Build Coastguard Worker//         The contents of these .JSONL file(s) depend on whether the input
848*d5c09012SAndroid Build Coastguard Worker//         used inline text, or documents.
849*d5c09012SAndroid Build Coastguard Worker//         If input was inline, then each .JSONL file will contain, per line,
850*d5c09012SAndroid Build Coastguard Worker//           a JSON representation of a proto that wraps given in request text
851*d5c09012SAndroid Build Coastguard Worker//           snippet's "id" (if specified), followed by input text snippet,
852*d5c09012SAndroid Build Coastguard Worker//           and a list of zero or more
853*d5c09012SAndroid Build Coastguard Worker//           AnnotationPayload protos (called annotations), which have
854*d5c09012SAndroid Build Coastguard Worker//           text_extraction detail populated. A single text snippet will be
855*d5c09012SAndroid Build Coastguard Worker//           listed only once with all its annotations, and its annotations will
856*d5c09012SAndroid Build Coastguard Worker//           never be split across files.
857*d5c09012SAndroid Build Coastguard Worker//         If input used documents, then each .JSONL file will contain, per
858*d5c09012SAndroid Build Coastguard Worker//           line, a JSON representation of a proto that wraps given in request
859*d5c09012SAndroid Build Coastguard Worker//           document proto, followed by its OCR-ed representation in the form
860*d5c09012SAndroid Build Coastguard Worker//           of a text snippet, finally followed by a list of zero or more
861*d5c09012SAndroid Build Coastguard Worker//           AnnotationPayload protos (called annotations), which have
862*d5c09012SAndroid Build Coastguard Worker//           text_extraction detail populated and refer, via their indices, to
863*d5c09012SAndroid Build Coastguard Worker//           the OCR-ed text snippet. A single document (and its text snippet)
864*d5c09012SAndroid Build Coastguard Worker//           will be listed only once with all its annotations, and its
865*d5c09012SAndroid Build Coastguard Worker//           annotations will never be split across files.
866*d5c09012SAndroid Build Coastguard Worker//         If prediction for any text snippet failed (partially or completely),
867*d5c09012SAndroid Build Coastguard Worker//         then additional `errors_1.jsonl`, `errors_2.jsonl`,...,
868*d5c09012SAndroid Build Coastguard Worker//         `errors_N.jsonl` files will be created (N depends on total number of
869*d5c09012SAndroid Build Coastguard Worker//         failed predictions). These files will have a JSON representation of a
870*d5c09012SAndroid Build Coastguard Worker//         proto that wraps either the "id" : "<id_value>" (in case of inline)
871*d5c09012SAndroid Build Coastguard Worker//         or the document proto (in case of document) but here followed by
872*d5c09012SAndroid Build Coastguard Worker//         exactly one
873*d5c09012SAndroid Build Coastguard Worker//
874*d5c09012SAndroid Build Coastguard Worker// [`google.rpc.Status`](https:
875*d5c09012SAndroid Build Coastguard Worker// //github.com/googleapis/googleapis/blob/master/google/rpc/status.proto)
876*d5c09012SAndroid Build Coastguard Worker//         containing only `code` and `message`.
877*d5c09012SAndroid Build Coastguard Worker//
878*d5c09012SAndroid Build Coastguard Worker//  *  For Tables:
879*d5c09012SAndroid Build Coastguard Worker//         Output depends on whether
880*d5c09012SAndroid Build Coastguard Worker//
881*d5c09012SAndroid Build Coastguard Worker// [gcs_destination][google.cloud.automl.v1beta1.BatchPredictOutputConfig.gcs_destination]
882*d5c09012SAndroid Build Coastguard Worker//         or
883*d5c09012SAndroid Build Coastguard Worker//
884*d5c09012SAndroid Build Coastguard Worker// [bigquery_destination][google.cloud.automl.v1beta1.BatchPredictOutputConfig.bigquery_destination]
885*d5c09012SAndroid Build Coastguard Worker//         is set (either is allowed).
886*d5c09012SAndroid Build Coastguard Worker//         GCS case:
887*d5c09012SAndroid Build Coastguard Worker//           In the created directory files `tables_1.csv`, `tables_2.csv`,...,
888*d5c09012SAndroid Build Coastguard Worker//           `tables_N.csv` will be created, where N may be 1, and depends on
889*d5c09012SAndroid Build Coastguard Worker//           the total number of the successfully predicted rows.
890*d5c09012SAndroid Build Coastguard Worker//           For all CLASSIFICATION
891*d5c09012SAndroid Build Coastguard Worker//
892*d5c09012SAndroid Build Coastguard Worker// [prediction_type-s][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]:
893*d5c09012SAndroid Build Coastguard Worker//             Each .csv file will contain a header, listing all columns'
894*d5c09012SAndroid Build Coastguard Worker//
895*d5c09012SAndroid Build Coastguard Worker// [display_name-s][google.cloud.automl.v1beta1.ColumnSpec.display_name]
896*d5c09012SAndroid Build Coastguard Worker//             given on input followed by M target column names in the format of
897*d5c09012SAndroid Build Coastguard Worker//
898*d5c09012SAndroid Build Coastguard Worker// "<[target_column_specs][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec]
899*d5c09012SAndroid Build Coastguard Worker//
900*d5c09012SAndroid Build Coastguard Worker// [display_name][google.cloud.automl.v1beta1.ColumnSpec.display_name]>_<target
901*d5c09012SAndroid Build Coastguard Worker//             value>_score" where M is the number of distinct target values,
902*d5c09012SAndroid Build Coastguard Worker//             i.e. number of distinct values in the target column of the table
903*d5c09012SAndroid Build Coastguard Worker//             used to train the model. Subsequent lines will contain the
904*d5c09012SAndroid Build Coastguard Worker//             respective values of successfully predicted rows, with the last,
905*d5c09012SAndroid Build Coastguard Worker//             i.e. the target, columns having the corresponding prediction
906*d5c09012SAndroid Build Coastguard Worker//             [scores][google.cloud.automl.v1beta1.TablesAnnotation.score].
907*d5c09012SAndroid Build Coastguard Worker//           For REGRESSION and FORECASTING
908*d5c09012SAndroid Build Coastguard Worker//
909*d5c09012SAndroid Build Coastguard Worker// [prediction_type-s][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]:
910*d5c09012SAndroid Build Coastguard Worker//             Each .csv file will contain a header, listing all columns'
911*d5c09012SAndroid Build Coastguard Worker//             [display_name-s][google.cloud.automl.v1beta1.display_name] given
912*d5c09012SAndroid Build Coastguard Worker//             on input followed by the predicted target column with name in the
913*d5c09012SAndroid Build Coastguard Worker//             format of
914*d5c09012SAndroid Build Coastguard Worker//
915*d5c09012SAndroid Build Coastguard Worker// "predicted_<[target_column_specs][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec]
916*d5c09012SAndroid Build Coastguard Worker//
917*d5c09012SAndroid Build Coastguard Worker// [display_name][google.cloud.automl.v1beta1.ColumnSpec.display_name]>"
918*d5c09012SAndroid Build Coastguard Worker//             Subsequent lines will contain the respective values of
919*d5c09012SAndroid Build Coastguard Worker//             successfully predicted rows, with the last, i.e. the target,
920*d5c09012SAndroid Build Coastguard Worker//             column having the predicted target value.
921*d5c09012SAndroid Build Coastguard Worker//             If prediction for any rows failed, then an additional
922*d5c09012SAndroid Build Coastguard Worker//             `errors_1.csv`, `errors_2.csv`,..., `errors_N.csv` will be
923*d5c09012SAndroid Build Coastguard Worker//             created (N depends on total number of failed rows). These files
924*d5c09012SAndroid Build Coastguard Worker//             will have analogous format as `tables_*.csv`, but always with a
925*d5c09012SAndroid Build Coastguard Worker//             single target column having
926*d5c09012SAndroid Build Coastguard Worker//
927*d5c09012SAndroid Build Coastguard Worker// [`google.rpc.Status`](https:
928*d5c09012SAndroid Build Coastguard Worker// //github.com/googleapis/googleapis/blob/master/google/rpc/status.proto)
929*d5c09012SAndroid Build Coastguard Worker//             represented as a JSON string, and containing only `code` and
930*d5c09012SAndroid Build Coastguard Worker//             `message`.
931*d5c09012SAndroid Build Coastguard Worker//         BigQuery case:
932*d5c09012SAndroid Build Coastguard Worker//
933*d5c09012SAndroid Build Coastguard Worker// [bigquery_destination][google.cloud.automl.v1beta1.OutputConfig.bigquery_destination]
934*d5c09012SAndroid Build Coastguard Worker//           pointing to a BigQuery project must be set. In the given project a
935*d5c09012SAndroid Build Coastguard Worker//           new dataset will be created with name
936*d5c09012SAndroid Build Coastguard Worker//           `prediction_<model-display-name>_<timestamp-of-prediction-call>`
937*d5c09012SAndroid Build Coastguard Worker//           where <model-display-name> will be made
938*d5c09012SAndroid Build Coastguard Worker//           BigQuery-dataset-name compatible (e.g. most special characters will
939*d5c09012SAndroid Build Coastguard Worker//           become underscores), and timestamp will be in
940*d5c09012SAndroid Build Coastguard Worker//           YYYY_MM_DDThh_mm_ss_sssZ "based on ISO-8601" format. In the dataset
941*d5c09012SAndroid Build Coastguard Worker//           two tables will be created, `predictions`, and `errors`.
942*d5c09012SAndroid Build Coastguard Worker//           The `predictions` table's column names will be the input columns'
943*d5c09012SAndroid Build Coastguard Worker//
944*d5c09012SAndroid Build Coastguard Worker// [display_name-s][google.cloud.automl.v1beta1.ColumnSpec.display_name]
945*d5c09012SAndroid Build Coastguard Worker//           followed by the target column with name in the format of
946*d5c09012SAndroid Build Coastguard Worker//
947*d5c09012SAndroid Build Coastguard Worker// "predicted_<[target_column_specs][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec]
948*d5c09012SAndroid Build Coastguard Worker//
949*d5c09012SAndroid Build Coastguard Worker// [display_name][google.cloud.automl.v1beta1.ColumnSpec.display_name]>"
950*d5c09012SAndroid Build Coastguard Worker//           The input feature columns will contain the respective values of
951*d5c09012SAndroid Build Coastguard Worker//           successfully predicted rows, with the target column having an
952*d5c09012SAndroid Build Coastguard Worker//           ARRAY of
953*d5c09012SAndroid Build Coastguard Worker//
954*d5c09012SAndroid Build Coastguard Worker// [AnnotationPayloads][google.cloud.automl.v1beta1.AnnotationPayload],
955*d5c09012SAndroid Build Coastguard Worker//           represented as STRUCT-s, containing
956*d5c09012SAndroid Build Coastguard Worker//           [TablesAnnotation][google.cloud.automl.v1beta1.TablesAnnotation].
957*d5c09012SAndroid Build Coastguard Worker//           The `errors` table contains rows for which the prediction has
958*d5c09012SAndroid Build Coastguard Worker//           failed, it has analogous input columns while the target column name
959*d5c09012SAndroid Build Coastguard Worker//           is in the format of
960*d5c09012SAndroid Build Coastguard Worker//
961*d5c09012SAndroid Build Coastguard Worker// "errors_<[target_column_specs][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec]
962*d5c09012SAndroid Build Coastguard Worker//
963*d5c09012SAndroid Build Coastguard Worker// [display_name][google.cloud.automl.v1beta1.ColumnSpec.display_name]>",
964*d5c09012SAndroid Build Coastguard Worker//           and as a value has
965*d5c09012SAndroid Build Coastguard Worker//
966*d5c09012SAndroid Build Coastguard Worker// [`google.rpc.Status`](https:
967*d5c09012SAndroid Build Coastguard Worker// //github.com/googleapis/googleapis/blob/master/google/rpc/status.proto)
968*d5c09012SAndroid Build Coastguard Worker//           represented as a STRUCT, and containing only `code` and `message`.
969*d5c09012SAndroid Build Coastguard Workermessage BatchPredictOutputConfig {
970*d5c09012SAndroid Build Coastguard Worker  // Required. The destination of the output.
971*d5c09012SAndroid Build Coastguard Worker  oneof destination {
972*d5c09012SAndroid Build Coastguard Worker    // The Google Cloud Storage location of the directory where the output is to
973*d5c09012SAndroid Build Coastguard Worker    // be written to.
974*d5c09012SAndroid Build Coastguard Worker    GcsDestination gcs_destination = 1;
975*d5c09012SAndroid Build Coastguard Worker
976*d5c09012SAndroid Build Coastguard Worker    // The BigQuery location where the output is to be written to.
977*d5c09012SAndroid Build Coastguard Worker    BigQueryDestination bigquery_destination = 2;
978*d5c09012SAndroid Build Coastguard Worker  }
979*d5c09012SAndroid Build Coastguard Worker}
980*d5c09012SAndroid Build Coastguard Worker
981*d5c09012SAndroid Build Coastguard Worker// Output configuration for ModelExport Action.
982*d5c09012SAndroid Build Coastguard Workermessage ModelExportOutputConfig {
983*d5c09012SAndroid Build Coastguard Worker  // Required. The destination of the output.
984*d5c09012SAndroid Build Coastguard Worker  oneof destination {
985*d5c09012SAndroid Build Coastguard Worker    // The Google Cloud Storage location where the model is to be written to.
986*d5c09012SAndroid Build Coastguard Worker    // This location may only be set for the following model formats:
987*d5c09012SAndroid Build Coastguard Worker    //   "tflite", "edgetpu_tflite", "tf_saved_model", "tf_js", "core_ml".
988*d5c09012SAndroid Build Coastguard Worker    //
989*d5c09012SAndroid Build Coastguard Worker    //  Under the directory given as the destination a new one with name
990*d5c09012SAndroid Build Coastguard Worker    //  "model-export-<model-display-name>-<timestamp-of-export-call>",
991*d5c09012SAndroid Build Coastguard Worker    //  where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format,
992*d5c09012SAndroid Build Coastguard Worker    //  will be created. Inside the model and any of its supporting files
993*d5c09012SAndroid Build Coastguard Worker    //  will be written.
994*d5c09012SAndroid Build Coastguard Worker    GcsDestination gcs_destination = 1;
995*d5c09012SAndroid Build Coastguard Worker
996*d5c09012SAndroid Build Coastguard Worker    // The GCR location where model image is to be pushed to. This location
997*d5c09012SAndroid Build Coastguard Worker    // may only be set for the following model formats:
998*d5c09012SAndroid Build Coastguard Worker    //   "docker".
999*d5c09012SAndroid Build Coastguard Worker    //
1000*d5c09012SAndroid Build Coastguard Worker    // The model image will be created under the given URI.
1001*d5c09012SAndroid Build Coastguard Worker    GcrDestination gcr_destination = 3;
1002*d5c09012SAndroid Build Coastguard Worker  }
1003*d5c09012SAndroid Build Coastguard Worker
1004*d5c09012SAndroid Build Coastguard Worker  // The format in which the model must be exported. The available, and default,
1005*d5c09012SAndroid Build Coastguard Worker  // formats depend on the problem and model type (if given problem and type
1006*d5c09012SAndroid Build Coastguard Worker  // combination doesn't have a format listed, it means its models are not
1007*d5c09012SAndroid Build Coastguard Worker  // exportable):
1008*d5c09012SAndroid Build Coastguard Worker  //
1009*d5c09012SAndroid Build Coastguard Worker  // *  For Image Classification mobile-low-latency-1, mobile-versatile-1,
1010*d5c09012SAndroid Build Coastguard Worker  //        mobile-high-accuracy-1:
1011*d5c09012SAndroid Build Coastguard Worker  //      "tflite" (default), "edgetpu_tflite", "tf_saved_model", "tf_js",
1012*d5c09012SAndroid Build Coastguard Worker  //      "docker".
1013*d5c09012SAndroid Build Coastguard Worker  //
1014*d5c09012SAndroid Build Coastguard Worker  // *  For Image Classification mobile-core-ml-low-latency-1,
1015*d5c09012SAndroid Build Coastguard Worker  //        mobile-core-ml-versatile-1, mobile-core-ml-high-accuracy-1:
1016*d5c09012SAndroid Build Coastguard Worker  //      "core_ml" (default).
1017*d5c09012SAndroid Build Coastguard Worker  //
1018*d5c09012SAndroid Build Coastguard Worker  // *  For Image Object Detection mobile-low-latency-1, mobile-versatile-1,
1019*d5c09012SAndroid Build Coastguard Worker  //        mobile-high-accuracy-1:
1020*d5c09012SAndroid Build Coastguard Worker  //      "tflite", "tf_saved_model", "tf_js".
1021*d5c09012SAndroid Build Coastguard Worker  //
1022*d5c09012SAndroid Build Coastguard Worker  // *  For Video Classification cloud,
1023*d5c09012SAndroid Build Coastguard Worker  //      "tf_saved_model".
1024*d5c09012SAndroid Build Coastguard Worker  //
1025*d5c09012SAndroid Build Coastguard Worker  // *  For Video Object Tracking cloud,
1026*d5c09012SAndroid Build Coastguard Worker  //      "tf_saved_model".
1027*d5c09012SAndroid Build Coastguard Worker  //
1028*d5c09012SAndroid Build Coastguard Worker  // *  For Video Object Tracking mobile-versatile-1:
1029*d5c09012SAndroid Build Coastguard Worker  //      "tflite", "edgetpu_tflite", "tf_saved_model", "docker".
1030*d5c09012SAndroid Build Coastguard Worker  //
1031*d5c09012SAndroid Build Coastguard Worker  // *  For Video Object Tracking mobile-coral-versatile-1:
1032*d5c09012SAndroid Build Coastguard Worker  //      "tflite", "edgetpu_tflite", "docker".
1033*d5c09012SAndroid Build Coastguard Worker  //
1034*d5c09012SAndroid Build Coastguard Worker  // *  For Video Object Tracking mobile-coral-low-latency-1:
1035*d5c09012SAndroid Build Coastguard Worker  //      "tflite", "edgetpu_tflite", "docker".
1036*d5c09012SAndroid Build Coastguard Worker  //
1037*d5c09012SAndroid Build Coastguard Worker  // *  For Video Object Tracking mobile-jetson-versatile-1:
1038*d5c09012SAndroid Build Coastguard Worker  //      "tf_saved_model", "docker".
1039*d5c09012SAndroid Build Coastguard Worker  //
1040*d5c09012SAndroid Build Coastguard Worker  // *  For Tables:
1041*d5c09012SAndroid Build Coastguard Worker  //      "docker".
1042*d5c09012SAndroid Build Coastguard Worker  //
1043*d5c09012SAndroid Build Coastguard Worker  // Formats description:
1044*d5c09012SAndroid Build Coastguard Worker  //
1045*d5c09012SAndroid Build Coastguard Worker  // * tflite - Used for Android mobile devices.
1046*d5c09012SAndroid Build Coastguard Worker  // * edgetpu_tflite - Used for [Edge TPU](https://cloud.google.com/edge-tpu/)
1047*d5c09012SAndroid Build Coastguard Worker  //                    devices.
1048*d5c09012SAndroid Build Coastguard Worker  // * tf_saved_model - A tensorflow model in SavedModel format.
1049*d5c09012SAndroid Build Coastguard Worker  // * tf_js - A [TensorFlow.js](https://www.tensorflow.org/js) model that can
1050*d5c09012SAndroid Build Coastguard Worker  //           be used in the browser and in Node.js using JavaScript.
1051*d5c09012SAndroid Build Coastguard Worker  // * docker - Used for Docker containers. Use the params field to customize
1052*d5c09012SAndroid Build Coastguard Worker  //            the container. The container is verified to work correctly on
1053*d5c09012SAndroid Build Coastguard Worker  //            ubuntu 16.04 operating system. See more at
1054*d5c09012SAndroid Build Coastguard Worker  //            [containers
1055*d5c09012SAndroid Build Coastguard Worker  //
1056*d5c09012SAndroid Build Coastguard Worker  // quickstart](https:
1057*d5c09012SAndroid Build Coastguard Worker  // //cloud.google.com/vision/automl/docs/containers-gcs-quickstart)
1058*d5c09012SAndroid Build Coastguard Worker  // * core_ml - Used for iOS mobile devices.
1059*d5c09012SAndroid Build Coastguard Worker  string model_format = 4;
1060*d5c09012SAndroid Build Coastguard Worker
1061*d5c09012SAndroid Build Coastguard Worker  // Additional model-type and format specific parameters describing the
1062*d5c09012SAndroid Build Coastguard Worker  // requirements for the to be exported model files, any string must be up to
1063*d5c09012SAndroid Build Coastguard Worker  // 25000 characters long.
1064*d5c09012SAndroid Build Coastguard Worker  //
1065*d5c09012SAndroid Build Coastguard Worker  //  * For `docker` format:
1066*d5c09012SAndroid Build Coastguard Worker  //     `cpu_architecture` - (string) "x86_64" (default).
1067*d5c09012SAndroid Build Coastguard Worker  //     `gpu_architecture` - (string) "none" (default), "nvidia".
1068*d5c09012SAndroid Build Coastguard Worker  map<string, string> params = 2;
1069*d5c09012SAndroid Build Coastguard Worker}
1070*d5c09012SAndroid Build Coastguard Worker
1071*d5c09012SAndroid Build Coastguard Worker// Output configuration for ExportEvaluatedExamples Action. Note that this call
1072*d5c09012SAndroid Build Coastguard Worker// is available only for 30 days since the moment the model was evaluated.
1073*d5c09012SAndroid Build Coastguard Worker// The output depends on the domain, as follows (note that only examples from
1074*d5c09012SAndroid Build Coastguard Worker// the TEST set are exported):
1075*d5c09012SAndroid Build Coastguard Worker//
1076*d5c09012SAndroid Build Coastguard Worker//  *  For Tables:
1077*d5c09012SAndroid Build Coastguard Worker//
1078*d5c09012SAndroid Build Coastguard Worker// [bigquery_destination][google.cloud.automl.v1beta1.OutputConfig.bigquery_destination]
1079*d5c09012SAndroid Build Coastguard Worker//       pointing to a BigQuery project must be set. In the given project a
1080*d5c09012SAndroid Build Coastguard Worker//       new dataset will be created with name
1081*d5c09012SAndroid Build Coastguard Worker//
1082*d5c09012SAndroid Build Coastguard Worker// `export_evaluated_examples_<model-display-name>_<timestamp-of-export-call>`
1083*d5c09012SAndroid Build Coastguard Worker//       where <model-display-name> will be made BigQuery-dataset-name
1084*d5c09012SAndroid Build Coastguard Worker//       compatible (e.g. most special characters will become underscores),
1085*d5c09012SAndroid Build Coastguard Worker//       and timestamp will be in YYYY_MM_DDThh_mm_ss_sssZ "based on ISO-8601"
1086*d5c09012SAndroid Build Coastguard Worker//       format. In the dataset an `evaluated_examples` table will be
1087*d5c09012SAndroid Build Coastguard Worker//       created. It will have all the same columns as the
1088*d5c09012SAndroid Build Coastguard Worker//
1089*d5c09012SAndroid Build Coastguard Worker// [primary_table][google.cloud.automl.v1beta1.TablesDatasetMetadata.primary_table_spec_id]
1090*d5c09012SAndroid Build Coastguard Worker//       of the
1091*d5c09012SAndroid Build Coastguard Worker//       [dataset][google.cloud.automl.v1beta1.Model.dataset_id] from which
1092*d5c09012SAndroid Build Coastguard Worker//       the model was created, as they were at the moment of model's
1093*d5c09012SAndroid Build Coastguard Worker//       evaluation (this includes the target column with its ground
1094*d5c09012SAndroid Build Coastguard Worker//       truth), followed by a column called "predicted_<target_column>". That
1095*d5c09012SAndroid Build Coastguard Worker//       last column will contain the model's prediction result for each
1096*d5c09012SAndroid Build Coastguard Worker//       respective row, given as ARRAY of
1097*d5c09012SAndroid Build Coastguard Worker//       [AnnotationPayloads][google.cloud.automl.v1beta1.AnnotationPayload],
1098*d5c09012SAndroid Build Coastguard Worker//       represented as STRUCT-s, containing
1099*d5c09012SAndroid Build Coastguard Worker//       [TablesAnnotation][google.cloud.automl.v1beta1.TablesAnnotation].
1100*d5c09012SAndroid Build Coastguard Workermessage ExportEvaluatedExamplesOutputConfig {
1101*d5c09012SAndroid Build Coastguard Worker  // Required. The destination of the output.
1102*d5c09012SAndroid Build Coastguard Worker  oneof destination {
1103*d5c09012SAndroid Build Coastguard Worker    // The BigQuery location where the output is to be written to.
1104*d5c09012SAndroid Build Coastguard Worker    BigQueryDestination bigquery_destination = 2;
1105*d5c09012SAndroid Build Coastguard Worker  }
1106*d5c09012SAndroid Build Coastguard Worker}
1107*d5c09012SAndroid Build Coastguard Worker
1108*d5c09012SAndroid Build Coastguard Worker// The Google Cloud Storage location for the input content.
1109*d5c09012SAndroid Build Coastguard Workermessage GcsSource {
1110*d5c09012SAndroid Build Coastguard Worker  // Required. Google Cloud Storage URIs to input files, up to 2000 characters
1111*d5c09012SAndroid Build Coastguard Worker  // long. Accepted forms:
1112*d5c09012SAndroid Build Coastguard Worker  // * Full object path, e.g. gs://bucket/directory/object.csv
1113*d5c09012SAndroid Build Coastguard Worker  repeated string input_uris = 1;
1114*d5c09012SAndroid Build Coastguard Worker}
1115*d5c09012SAndroid Build Coastguard Worker
1116*d5c09012SAndroid Build Coastguard Worker// The BigQuery location for the input content.
1117*d5c09012SAndroid Build Coastguard Workermessage BigQuerySource {
1118*d5c09012SAndroid Build Coastguard Worker  // Required. BigQuery URI to a table, up to 2000 characters long.
1119*d5c09012SAndroid Build Coastguard Worker  // Accepted forms:
1120*d5c09012SAndroid Build Coastguard Worker  // *  BigQuery path e.g. bq://projectId.bqDatasetId.bqTableId
1121*d5c09012SAndroid Build Coastguard Worker  string input_uri = 1;
1122*d5c09012SAndroid Build Coastguard Worker}
1123*d5c09012SAndroid Build Coastguard Worker
1124*d5c09012SAndroid Build Coastguard Worker// The Google Cloud Storage location where the output is to be written to.
1125*d5c09012SAndroid Build Coastguard Workermessage GcsDestination {
1126*d5c09012SAndroid Build Coastguard Worker  // Required. Google Cloud Storage URI to output directory, up to 2000
1127*d5c09012SAndroid Build Coastguard Worker  // characters long.
1128*d5c09012SAndroid Build Coastguard Worker  // Accepted forms:
1129*d5c09012SAndroid Build Coastguard Worker  // * Prefix path: gs://bucket/directory
1130*d5c09012SAndroid Build Coastguard Worker  // The requesting user must have write permission to the bucket.
1131*d5c09012SAndroid Build Coastguard Worker  // The directory is created if it doesn't exist.
1132*d5c09012SAndroid Build Coastguard Worker  string output_uri_prefix = 1;
1133*d5c09012SAndroid Build Coastguard Worker}
1134*d5c09012SAndroid Build Coastguard Worker
1135*d5c09012SAndroid Build Coastguard Worker// The BigQuery location for the output content.
1136*d5c09012SAndroid Build Coastguard Workermessage BigQueryDestination {
1137*d5c09012SAndroid Build Coastguard Worker  // Required. BigQuery URI to a project, up to 2000 characters long.
1138*d5c09012SAndroid Build Coastguard Worker  // Accepted forms:
1139*d5c09012SAndroid Build Coastguard Worker  // *  BigQuery path e.g. bq://projectId
1140*d5c09012SAndroid Build Coastguard Worker  string output_uri = 1;
1141*d5c09012SAndroid Build Coastguard Worker}
1142*d5c09012SAndroid Build Coastguard Worker
1143*d5c09012SAndroid Build Coastguard Worker// The GCR location where the image must be pushed to.
1144*d5c09012SAndroid Build Coastguard Workermessage GcrDestination {
1145*d5c09012SAndroid Build Coastguard Worker  // Required. Google Contained Registry URI of the new image, up to 2000
1146*d5c09012SAndroid Build Coastguard Worker  // characters long. See
1147*d5c09012SAndroid Build Coastguard Worker  //
1148*d5c09012SAndroid Build Coastguard Worker  // https:
1149*d5c09012SAndroid Build Coastguard Worker  // //cloud.google.com/container-registry/do
1150*d5c09012SAndroid Build Coastguard Worker  // // cs/pushing-and-pulling#pushing_an_image_to_a_registry
1151*d5c09012SAndroid Build Coastguard Worker  // Accepted forms:
1152*d5c09012SAndroid Build Coastguard Worker  // * [HOSTNAME]/[PROJECT-ID]/[IMAGE]
1153*d5c09012SAndroid Build Coastguard Worker  // * [HOSTNAME]/[PROJECT-ID]/[IMAGE]:[TAG]
1154*d5c09012SAndroid Build Coastguard Worker  //
1155*d5c09012SAndroid Build Coastguard Worker  // The requesting user must have permission to push images the project.
1156*d5c09012SAndroid Build Coastguard Worker  string output_uri = 1;
1157*d5c09012SAndroid Build Coastguard Worker}
1158