syntax = "proto3";
package ar.v1;

import "ar/v1/property.proto";
import "buf/validate/validate.proto";

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

enum RobotType {
  ROBOT_TYPE_UNSPECIFIED = 0;
  ROBOT_TYPE_UR3E = 10;
  ROBOT_TYPE_UR5E = 11;
  ROBOT_TYPE_UR10E = 12;
  ROBOT_TYPE_KUKA_IIWA = 20;
}

enum RobotDriverType {
  ROBOT_DRIVER_TYPE_UNSPECIFIED = 0;
  ROBOT_DRIVER_TYPE_UR = 1;
}

message RobotMessage {
  string id = 1; // Autogenerated id
  string name = 2 [(buf.validate.field).string = {
    min_len: 1
    max_len: 64
  }]; // Name of the robot
  string icon = 3; // Optional icon representing the robot
  string description = 4; // Optional description of the robot
  RobotType type = 5 [
    (buf.validate.field).required = true,
    (buf.validate.field).enum.defined_only = true
  ];
  RobotDriverType robot_driver_type = 6 [
    (buf.validate.field).required = true,
    (buf.validate.field).enum.defined_only = true
  ];
  string coupler_model_id = 7 [(buf.validate.field).string.prefix = 'model-'];
  string end_effector_model_id = 8 [(buf.validate.field).string.prefix = 'model-'];
  repeated ar.v1.Property properties = 9;
}

message RobotMessages {
  repeated RobotMessage robots = 1;
}
