// Proto file representing the EDB NetClass

syntax = "proto3";

package ansys.api.edb.v1;

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

service NetClassService {
  rpc Create(NetClassCreationMessage) returns (EDBObjMessage) {}
  
  rpc FindByName(EDBObjNameMessage) returns (EDBObjMessage) {}

  rpc GetName(EDBObjMessage) returns (google.protobuf.StringValue) {}

  rpc SetName(EDBObjNameMessage) returns (google.protobuf.Empty) {}

  rpc GetDescription(EDBObjMessage) returns (google.protobuf.StringValue) {}

  rpc SetDescription(StringPropertyMessage) returns (google.protobuf.Empty) {}

  rpc IsPowerGround(EDBObjMessage) returns (google.protobuf.BoolValue) {}
  
  rpc GetNets(EDBObjMessage) returns (EDBObjCollectionMessage) {}
  rpc StreamNets(EDBObjMessage) returns (stream EDBObjCollectionMessage) {}
  
  rpc AddNet(NetClassEditMessage) returns (google.protobuf.Empty) {}

  rpc RemoveNet(NetClassEditMessage) returns (google.protobuf.Empty) {}

  rpc ContainsNet(NetClassEditMessage) returns (google.protobuf.BoolValue) {}    
}

// Message for Create
message NetClassCreationMessage {
  EDBObjMessage layout = 1;
  string name = 2;
}

message NetClassEditMessage {
  EDBObjMessage netclass = 1;
  EDBObjMessage net = 2;
}
