syntax = "proto3";

package gosdn.southbound;

import "google/protobuf/descriptor.proto";

option go_package = "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/southbound";

service SbiService {
  rpc GetSchema(GetSchemaRequest) returns (stream Payload);
  //{
  // NOTE: probably the most intuitive route, but obviously we should go for
  // something like: /pnd/{pid}/sbi/{sid}/schema and provide the information
  // about the schema
  // get: "/pnds/{pid}/onds/{did}/schema"
  //};
}

message GetSchemaRequest {
  int64 timestamp = 1;
  string pid = 2;
  string sid = 3;
}

message Payload {
  bytes chunk = 1;
}

message SouthboundInterface {
  string id = 1;
  Type type = 2;
}

// Changed according to style guide:
// https://docs.buf.build/best-practices/style-guide#enums
enum Type {
  TYPE_UNSPECIFIED = 0;
  TYPE_OPENCONFIG = 1;
  TYPE_CONTAINERISED = 2;
  TYPE_PLUGIN = 3;
}
