//
// Copyright 2021 The Feast Authors
//
// 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
//
//     https://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 feast.core;
option java_package = "feast.proto.core";
option java_outer_classname = "ValidationProfile";
option go_package = "github.com/feast-dev/feast/go/protos/feast/core";

message GEValidationProfiler {
  message UserDefinedProfiler {
      // The python-syntax function body (serialized by dill)
      bytes body = 1;
  }

  UserDefinedProfiler profiler = 1;
}

message GEValidationProfile {
  // JSON-serialized ExpectationSuite object
  bytes expectation_suite = 1;
}

message ValidationReference {
  // Unique name of validation reference within the project
  string name = 1;
  // Name of saved dataset used as reference dataset
  string reference_dataset_name = 2;
  // Name of Feast project that this object source belongs to
  string project = 3;
  // Description of the validation reference
  string description = 4;
  // User defined metadata
  map<string,string> tags = 5;

  // validation profiler
  oneof profiler {
    GEValidationProfiler ge_profiler = 6;
  }

  // (optional) cached validation profile (to avoid constant recalculation)
  oneof cached_profile {
    GEValidationProfile ge_profile = 7;
  }
}
