syntax = "proto2";

package scalapb;

option java_package = "org.mlflow.scalapb_interface";

import "google/protobuf/descriptor.proto";

message ScalaPbOptions {
  // If set then it overrides the java_package and package.
  optional string package_name = 1;

  // If true, the compiler does not append the proto base file name
  // into the generated package name. If false (the default), the
  // generated scala package name is the package_name.basename where
  // basename is the proto file name without the .proto extension.
  optional bool flat_package = 2;

  // Adds the following imports at the top of the file (this is meant
  // to provide implicit TypeMappers)
  repeated string import = 3;
}

extend google.protobuf.FileOptions {
  // File-level optionals for ScalaPB.
  // Extension number officially assigned by protobuf-global-extension-registry@google.com
  optional ScalaPbOptions options = 1020;
}

message MessageOptions {
  // additional classes and traits to mix in to the case class.
  repeated string extends = 1;
}

extend google.protobuf.MessageOptions {
  // Message-level optionals for ScalaPB.
  // Extension number officially assigned by protobuf-global-extension-registry@google.com
  optional MessageOptions message = 1020;
}

message FieldOptions {
  optional string type = 1;
}

extend google.protobuf.FieldOptions {
  // File-level optionals for ScalaPB.
  // Extension number officially assigned by protobuf-global-extension-registry@google.com
  optional FieldOptions field = 1020;
}
