// Proto file representing the EDB VariableServer class

syntax = "proto3";

package ansys.api.edb.v1;

import "ansys/api/edb/v1/edb_messages.proto";

service VariableServerService {
  rpc AddVariable (AddVariableMessage) returns (google.protobuf.Empty) {}

  rpc AddMenuVariable (AddMenuVariableMessage) returns (google.protobuf.Empty) {}

  rpc DeleteVariable (VariableNameMessage) returns (google.protobuf.Empty) {}

  rpc SetVariableValue (SetVariableMessage) returns (google.protobuf.Empty) {}

  rpc GetVariableValue (VariableNameMessage) returns (ValueMessage) {}

  rpc IsParameter (VariableNameMessage) returns (google.protobuf.BoolValue) {}

  rpc GetAllVariableNames (EDBObjMessage) returns (GetVariableNamesMessage) {}

  rpc GetVariableDesc (VariableNameMessage) returns (google.protobuf.StringValue) {}

  rpc SetVariableDesc (SetDescriptionMessage) returns (google.protobuf.Empty) {}
}

message AddVariableMessage {
    EDBObjMessage variable_owner = 1;
    string name = 2;
    ValueMessage value = 3;
    bool isparam = 4;
}

message AddMenuVariableMessage {
  EDBObjMessage variable_owner = 1;
  string name = 2;
  uint64 index = 3;
  repeated ValueMessage values = 4;
  bool isparam = 5;
}

message VariableNameMessage {
  EDBObjMessage variable_owner = 1;
  string name = 2;
}

message SetVariableMessage {
    EDBObjMessage variable_owner = 1;
    string name = 2;
    ValueMessage value = 3;
}

message SetDescriptionMessage {
  EDBObjMessage variable_owner = 1;
  string name = 2;
  string desc = 3;
}

message GetVariableNamesMessage {
  repeated string names = 2;
}
