|
| 1 | +// Copyright 2019 Google LLC. |
| 2 | +// |
| 3 | +// Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | +// you may not use this file except in compliance with the License. |
| 5 | +// You may obtain a copy of the License at |
| 6 | +// |
| 7 | +// http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +// |
| 9 | +// Unless required by applicable law or agreed to in writing, software |
| 10 | +// distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | +// See the License for the specific language governing permissions and |
| 13 | +// limitations under the License. |
| 14 | +// |
| 15 | + |
| 16 | +syntax = "proto3"; |
| 17 | + |
| 18 | +package google.cloud.automl.v1; |
| 19 | + |
| 20 | +import "google/api/annotations.proto"; |
| 21 | + |
| 22 | +option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1;automl"; |
| 23 | +option csharp_namespace = "Google.Cloud.AutoML.V1"; |
| 24 | +option java_multiple_files = true; |
| 25 | +option java_package = "com.google.cloud.automl.v1"; |
| 26 | +option php_namespace = "Google\\Cloud\\AutoML\\V1"; |
| 27 | +option ruby_package = "Google::Cloud::AutoML::V1"; |
| 28 | + |
| 29 | +// Input configuration for ImportData Action. |
| 30 | +// |
| 31 | +// The format of input depends on dataset_metadata the Dataset into which |
| 32 | +// the import is happening has. As input source the |
| 33 | +// [gcs_source][google.cloud.automl.v1beta1.InputConfig.gcs_source] |
| 34 | +// is expected, unless specified otherwise. Additionally any input .CSV file |
| 35 | +// by itself must be 100MB or smaller, unless specified otherwise. |
| 36 | +// If an "example" file (that is, image, video etc.) with identical content |
| 37 | +// (even if it had different GCS_FILE_PATH) is mentioned multiple times, then |
| 38 | +// its label, bounding boxes etc. are appended. The same file should be always |
| 39 | +// provided with the same ML_USE and GCS_FILE_PATH, if it is not, then |
| 40 | +// these values are nondeterministically selected from the given ones. |
| 41 | +// |
| 42 | +// Errors: |
| 43 | +// If any of the provided CSV files can't be parsed or if more than certain |
| 44 | +// percent of CSV rows cannot be processed then the operation fails and |
| 45 | +// nothing is imported. Regardless of overall success or failure the per-row |
| 46 | +// failures, up to a certain count cap, is listed in |
| 47 | +// Operation.metadata.partial_failures. |
| 48 | +// |
| 49 | +message InputConfig { |
| 50 | + // The source of the input. |
| 51 | + oneof source { |
| 52 | + // The Google Cloud Storage location for the input content. |
| 53 | + // In ImportData, the gcs_source points to a csv with structure described in |
| 54 | + // the comment. |
| 55 | + GcsSource gcs_source = 1; |
| 56 | + } |
| 57 | + |
| 58 | + // Additional domain-specific parameters describing the semantic of the |
| 59 | + // imported data, any string must be up to 25000 |
| 60 | + // characters long. |
| 61 | + map<string, string> params = 2; |
| 62 | +} |
| 63 | + |
| 64 | +// * For Translation: |
| 65 | +// CSV file `translation.csv`, with each line in format: |
| 66 | +// ML_USE,GCS_FILE_PATH |
| 67 | +// GCS_FILE_PATH leads to a .TSV file which describes examples that have |
| 68 | +// given ML_USE, using the following row format per line: |
| 69 | +// TEXT_SNIPPET (in source language) \t TEXT_SNIPPET (in target |
| 70 | +// language) |
| 71 | +// |
| 72 | +// `export_data_<automl-dataset-display-name>_<timestamp-of-export-call>` |
| 73 | +// where <automl-dataset-display-name> will be made |
| 74 | +// BigQuery-dataset-name compatible (e.g. most special characters will |
| 75 | +// become underscores), and timestamp will be in |
| 76 | +// YYYY_MM_DDThh_mm_ss_sssZ "based on ISO-8601" format. In that |
| 77 | +// dataset a new table called `primary_table` will be created, and |
| 78 | +// filled with precisely the same data as this obtained on import. |
| 79 | +message OutputConfig { |
| 80 | + // Required. The destination of the output. |
| 81 | + oneof destination { |
| 82 | + // The Google Cloud Storage location where the output is to be written to. |
| 83 | + // For Image Object Detection, Text Extraction, Video Classification and |
| 84 | + // Tables, in the given directory a new directory will be created with name: |
| 85 | + // export_data-<dataset-display-name>-<timestamp-of-export-call> where |
| 86 | + // timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format. All export |
| 87 | + // output will be written into that directory. |
| 88 | + GcsDestination gcs_destination = 1; |
| 89 | + } |
| 90 | +} |
| 91 | + |
| 92 | +// The Google Cloud Storage location for the input content. |
| 93 | +message GcsSource { |
| 94 | + // Required. Google Cloud Storage URIs to input files, up to 2000 characters |
| 95 | + // long. Accepted forms: |
| 96 | + // * Full object path, e.g. gs://bucket/directory/object.csv |
| 97 | + repeated string input_uris = 1; |
| 98 | +} |
| 99 | + |
| 100 | +// The Google Cloud Storage location where the output is to be written to. |
| 101 | +message GcsDestination { |
| 102 | + // Required. Google Cloud Storage URI to output directory, up to 2000 |
| 103 | + // characters long. |
| 104 | + // Accepted forms: |
| 105 | + // * Prefix path: gs://bucket/directory |
| 106 | + // The requesting user must have write permission to the bucket. |
| 107 | + // The directory is created if it doesn't exist. |
| 108 | + string output_uri_prefix = 1; |
| 109 | +} |
0 commit comments