// Proto file representing the EDB ViaGroup class

syntax = "proto3";

package ansys.api.edb.v1;

import "ansys/api/edb/v1/edb_messages.proto";
import "ansys/api/edb/v1/polygon_data.proto";
import "ansys/api/edb/v1/refs.proto";
import "ansys/api/edb/v1/hierarchy_obj.proto";

// ViaGroup service definition
service ViaGroupService {
  // Creates ViaGroups
  rpc CreateWithPrimitives(ViaGroupCreateWithPrimitivesMessage) returns (EDBObjCollectionMessage) {}

  // Creates a ViaGroup with outline
  rpc CreateWithOutline(ViaGroupCreateWithOutlineMessage) returns (EDBObjMessage) {}

  // Find the ViaGroup by name in the given layout
  rpc FindByName(ObjectNameInLayoutMessage) returns (EDBObjMessage) {}

  // Get the ViaGroup outline
  rpc GetOutline(EDBObjMessage) returns (PolygonDataMessage) {}

  // Get conductor percentage of the ViaGroup
  rpc GetConductorPercentage(EDBObjMessage) returns (google.protobuf.DoubleValue) {}

  // Check if the ViaGroup is persistent
  rpc IsPersistent(EDBObjMessage) returns (google.protobuf.BoolValue) {}
}

message ViaGroupCreateWithPrimitivesMessage {
  EDBObjMessage layout = 1;
  EDBObjCollectionMessage primitives = 2;
  bool is_persistent = 3;
}

message ViaGroupCreateWithOutlineMessage {
  EDBObjMessage layout = 1;
  PolygonDataMessage points = 2;
  double conductivity_ratio = 3;
  LayerRefMessage layer = 4;
  NetRefMessage net = 5;
}
