// Copyright 2021 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.documentai.v1beta3;

import "google/api/resource.proto";
import "google/api/annotations.proto";

option csharp_namespace = "Google.Cloud.DocumentAI.V1Beta3";
option go_package = "google.golang.org/genproto/googleapis/cloud/documentai/v1beta3;documentai";
option java_multiple_files = true;
option java_outer_classname = "DocumentAiProcessorType";
option java_package = "com.google.cloud.documentai.v1beta3";
option php_namespace = "Google\\Cloud\\DocumentAI\\V1beta3";
option ruby_package = "Google::Cloud::DocumentAI::V1beta3";

// A processor type is responsible for performing a certain document
// understanding task on a certain type of document.
message ProcessorType {
  option (google.api.resource) = {
    type: "documentai.googleapis.com/ProcessorType"
    pattern: "projects/{project}/locations/{location}/processorTypes/{processor_type}"
  };

  // The location information about where the processor is available.
  message LocationInfo {
    // The location id.
    string location_id = 1;
  }

  // The resource name of the processor type.
  string name = 1;

  // The type of the processor.
  string type = 2;

  // The processor category.
  string category = 3;

  // The locations in which this processor is available.
  repeated LocationInfo available_locations = 4;

  // Whether the processor type allows creation. If yes, user can create a
  // processor of this processor type. Otherwise, user needs to require for
  // whitelisting.
  bool allow_creation = 6;
}
