// Proto file representing the EDB Circle class

syntax = "proto3";

package ansys.api.edb.v1;

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

enum BondwireType {
  APD_BONDWIRE = 0;
  JEDEC4_BONDWIRE = 1;
  JEDEC5_BONDWIRE = 2;
  NUM_OF_BONDWIRE_TYPE = 3;
  INVALID_BONDWIRE_TYPE = -1;
}

enum BondwireCrossSectionType {
  BONDWIRE_ROUND = 0;
  BONDWIRE_RECTANGLE = 1;
  INVALID_BONDWIRE_CROSS_SECTION_TYPE = -1;
}

// Bondwire service definition
service BondwireService {
  // Create Bondwire
  rpc Create (BondwireCreateMessage) returns (EDBObjMessage) {}

  // Get Material
  rpc GetMaterial (BondwireBoolMessage) returns (google.protobuf.StringValue) {}

  // Set Material
  rpc SetMaterial (SetMaterialMessage) returns (google.protobuf.Empty) {}

  // Get Bondwire Type
  rpc GetType (EDBObjMessage) returns (BondwireTypeMessage) {}

  // Set Bondwire Type
  rpc SetType (SetBondwireTypeMessage) returns (google.protobuf.Empty) {}

  // Get Cross Section Type
  rpc GetCrossSectionType (EDBObjMessage) returns (GetCrossSectionTypeMessage) {}

  // Set Type
  rpc SetCrossSectionType (SetCrossSectionTypeMessage) returns (google.protobuf.Empty) {}

  // Get Cross Section Type
  rpc GetCrossSectionHeight (EDBObjMessage) returns (ValueMessage) {}

  // Set Type
  rpc SetCrossSectionHeight (SetCrossSectionHeightMessage) returns (google.protobuf.Empty) {}

  // Get Bondwire Definition Name
  rpc GetDefinitionName (BondwireBoolMessage) returns (google.protobuf.StringValue) {}
  
  // Set Bondwire Definition Name
  rpc SetDefinitionName (SetDefinitionNameMessage) returns (google.protobuf.Empty) {}
  
  // Get Start Elevation Layer
  rpc GetStartElevation (GetElevationMessage) returns (EDBObjMessage) {}
  
  // Set Start Elevation Layer
  rpc SetStartElevation (SetElevationMessage) returns (google.protobuf.Empty) {}
  
  // Get End Elevation Layer
  rpc GetEndElevation (GetElevationMessage) returns (EDBObjMessage) {}
  
  // Set End Elevation Layer
  rpc SetEndElevation (SetElevationMessage) returns (google.protobuf.Empty) {}
  
  // Get Trajectory Values
  rpc GetTraj (EDBObjMessage) returns (BondwireTrajMessage) {}
  
  // Set Trajectory Values
  rpc SetTraj (SetBondwireTrajMessage) returns (google.protobuf.Empty) {}
  
  // Get Width Value
  rpc GetWidthValue (EDBObjMessage) returns (ValueMessage) {}
  
  // Get Width Value
  rpc SetWidthValue (BondwireValueMessage) returns (google.protobuf.Empty) {} 
}

message BondwireCreateMessage {
  EDBObjMessage layout = 1;
  NetRefMessage net = 2;
  BondwireType bondwire_type = 3;
  string definition_name = 4;
  string placement_layer = 5;
  ValueMessage width = 6;
  string material = 7;
  EDBObjMessage start_context = 8;
  string start_layer_name = 9;
  ValueMessage start_x = 10;
  ValueMessage start_y = 11;
  EDBObjMessage end_context = 12;
  string end_layer_name = 13;
  ValueMessage end_x = 14;
  ValueMessage end_y = 15;
}

message BondwireBoolMessage {
  EDBObjMessage target = 1;
  bool evaluated = 2;
}

message SetMaterialMessage {
  EDBObjMessage target = 1;
  string material = 2;
}

message BondwireTypeMessage {
  BondwireType type = 1;
}

message SetBondwireTypeMessage {
  EDBObjMessage target = 1;
  BondwireType type = 2;
}

message GetCrossSectionTypeMessage {
  BondwireCrossSectionType type = 1;
}

message SetCrossSectionTypeMessage {
  EDBObjMessage target = 1;
  BondwireCrossSectionType type = 2;
}

message SetCrossSectionHeightMessage {
  EDBObjMessage target = 1;
  ValueMessage height = 2;
}

message SetDefinitionNameMessage {
  EDBObjMessage target = 1;
  string definition_name = 2;
}

message GetElevationMessage {
  EDBObjMessage bw = 1;
  EDBObjMessage cell_instance = 2;
}

message SetElevationMessage {
  GetElevationMessage target = 1;
  string lyrname = 2;
}

message BondwireValueMessage {
  EDBObjMessage target = 1;
  ValueMessage value = 2;
}

message BondwireTrajMessage {
  ValueMessage x1 = 1;
  ValueMessage y1 = 2;
  ValueMessage x2 = 3;
  ValueMessage y2 = 4;
}

message SetBondwireTrajMessage {
  EDBObjMessage target = 1;
  BondwireTrajMessage traj = 2;
}