// Copyright 2020 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.visualinspection.v1beta1;

import "google/api/annotations.proto";
import "google/api/field_behavior.proto";
import "google/api/resource.proto";
import "google/cloud/visualinspection/v1beta1/metrics.proto";

option csharp_namespace = "Google.Cloud.VisualInspection.V1Beta1";
option php_namespace = "Google\\Cloud\\VisualInspection\\V1beta1";
option ruby_package = "Google::Cloud::VisualInspection::V1beta1";
option go_package = "google.golang.org/genproto/googleapis/cloud/visualinspection/v1beta1;visualinspection";
option java_multiple_files = true;
option java_package = "com.google.cloud.visualinspection.v1beta1";

// ModelEvaluation for visual inspection solutions.
message ModelEvaluation {
  option (google.api.resource) = {
    type: "visualinspection.googleapis.com/ModelEvaluation"
    pattern: "projects/{project}/locations/{location}/solutions/{solution}/modules/{module}/models/{model}/modelEvaluations/{model_evaluation}"
  };

  // Output only. Resource name for ModelEvaluation generated by the system.
  string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];

  // Deprecated, use metrics_map instead.
  // Metrics for this evaluation.
  Metrics metrics = 2 [deprecated = true];

  // Output only. Deprecated, use eval_annotation_sets_map instead.
  // The AnnotationSets containing output Annotations on the eval set. These
  // will be readonly AnnotationSets belonging to the Solution's Dataset and
  // have the same lifetime as the Model to which it belongs.
  repeated string eval_annotation_sets = 3
      [deprecated = true, (google.api.field_behavior) = OUTPUT_ONLY];

  // Output only. Map of the Metrics for this model evaluation. The key is a
  // name for the Metrics entry. Individual Modules define which Metrics they
  // support and typically there will be a map entry for every output the Module
  // produces.
  map<string, Metrics> metrics_map = 4
      [(google.api.field_behavior) = OUTPUT_ONLY];

  // Output only. Map of the evaluation annotation sets for this model. The keys
  // are the name of module outputs annotation fields and the values are the
  // annotation sets ids containing output Annotations on the eval set. These
  // will be readonly AnnotationSets belonging to the Solution's Dataset and
  // have the same lifetime as the Model to which it belongs.
  map<string, string> eval_annotation_sets_map = 5
      [(google.api.field_behavior) = OUTPUT_ONLY];
}
