// Copyright 2019 Google LLC.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

syntax = "proto3";

package google.cloud.automl.v1;

import "google/cloud/automl/v1/io.proto";
import "google/protobuf/any.proto";
import "google/protobuf/duration.proto";
import "google/protobuf/struct.proto";
import "google/api/annotations.proto";

option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1;automl";
option csharp_namespace = "Google.Cloud.AutoML.V1";
option java_multiple_files = true;
option java_package = "com.google.cloud.automl.v1";
option php_namespace = "Google\\Cloud\\AutoML\\V1";
option ruby_package = "Google::Cloud::AutoML::V1";

// A representation of a text snippet.
message TextSnippet {
  // Required. The content of the text snippet as a string. Up to 250000
  // characters long.
  string content = 1;

  // Optional. The format of [content][google.cloud.automl.v1.TextSnippet.content]. Currently the only two allowed
  // values are "text/html" and "text/plain". If left blank, the format is
  // automatically determined from the type of the uploaded [content][google.cloud.automl.v1.TextSnippet.content].
  string mime_type = 2;

  // Output only. HTTP URI where you can download the content.
  string content_uri = 4;
}

// Example data used for training or prediction.
message ExamplePayload {
  // Required. Input only. The example data.
  oneof payload {
    // Example text.
    TextSnippet text_snippet = 2;
  }
}
