syntax = "proto3";

package nominal.ingest.v2;

import "buf/validate/validate.proto";
import "nominal/protos/gen/v1/alias.proto";
import "nominal/protos/types/time/timestamp_parsers.proto";

option java_multiple_files = true;
option java_package = "io.nominal.ingest.v2";

// Source file location.
message IngestSource {
  oneof source {
    option (buf.validate.oneof) = {required: true};

    S3IngestSource s3 = 1;
    GcsIngestSource gcs = 2;
    PresignedFileIngestSource presigned_file = 3;
  }
}

message S3IngestSource {
  string path = 1 [(buf.validate.field).required = true];
}

message GcsIngestSource {
  string path = 1 [(buf.validate.field).required = true];
}

message PresignedFileIngestSource {
  string url = 1 [(buf.validate.field).required = true];
}

// Timestamp metadata for ingest items that derive timestamps from an input column or field.
message TimestampMetadata {
  string column = 1 [
    (buf.validate.field).required = true,
    (nominal.gen.v1.alias) = {java_name: "io.nominal.api.ColumnName"}
  ];
  nominal.types.time.TimestampType type = 2 [(buf.validate.field).required = true];
}
