syntax = "proto3";
package plm.v1;

import "geometry/v1/pose.proto";
import "plm/v1/process.proto";
import "plm/v1/sequence_authoring.proto";
import "plm/v1/task.proto";

option csharp_namespace = "Messages.Plm.V1";
option go_package = "github.com/cobotar/protocol/messages/plm/v1";

message StoredProcessMessage { // TODO: rename to recipe?
  string id = 2;
  string name = 3;
  string description = 4;
  ProcessType type = 5;
  geometry.v1.LocalizedPose frame = 6;
  string root_sequence_id = 7;
  repeated StoredSequenceMessage sequences = 8;
  repeated TaskMessage tasks = 9; // TODO: make 'interchanceable', such that multiple variants can be selected
}

message StoredProcessesMessage {
  repeated StoredProcessMessage processes = 1;
}

message NewProcessMessage {
  string name = 3;
  string description = 4;
  ProcessType type = 5;
}

message UpdateProcessMessage {
  string id = 2;
  string name = 3;
  string description = 4;
  ProcessType type = 5;
  geometry.v1.LocalizedPose frame = 6;
  string root_sequence_id = 7;
}

message DeleteProcessMessage {
  string process_id = 1;
}
