// Proto file representing the EDB Cell class

syntax = "proto3";

package ansys.api.edb.v1;

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


service CellService {
  // Creates a cell
  rpc Create (CellCreationMessage) returns (EDBObjMessage) {}

  // Gets the layout of the provided cell
  rpc GetLayout (EDBObjMessage) returns (EDBObjMessage) {}

  // Get the flattened layout
  rpc GetFlattenedLayout (EDBObjMessage) returns (EDBObjMessage) {}

  // Find cell by name or id
  rpc Find (CellFindMessage) returns (EDBObjMessage) {}

  // Delete a cell
  rpc Delete (EDBObjMessage) returns (google.protobuf.Empty) {}

  // Get the database
  rpc GetDatabase (EDBObjMessage) returns (EDBObjMessage) {}

  // Get whether the cell is of type footprint
  rpc IsFootprint (EDBObjMessage) returns (google.protobuf.BoolValue) {}

  // Get whether the cell is a black box
  rpc IsBlackBox (EDBObjMessage) returns (google.protobuf.BoolValue) {}

  // Set whether the cell is a black box
  rpc SetBlackBox (BoolPropertyMessage) returns (google.protobuf.Empty) {}

  // Get whether the cell supresses pads
  rpc GetSuppressPads (EDBObjMessage) returns (google.protobuf.BoolValue) {}

  // Set whether the cell supresses pads
  rpc SetSuppressPads (BoolPropertyMessage) returns (google.protobuf.Empty) {}

  // Get whether the anti pads is always on
  rpc GetAntiPadsAlwaysOn (EDBObjMessage) returns (google.protobuf.BoolValue) {}

  // Set whether the anti pads is always on
  rpc SetAntiPadsAlwaysOn (BoolPropertyMessage) returns (google.protobuf.Empty) {}

  // Get the option for anti pads
  rpc GetAntiPadsOption (EDBObjMessage) returns (google.protobuf.Int64Value) {}

  // Set the option for anti pads
  rpc SetAntiPadsOption (IntPropertyMessage) returns (google.protobuf.Empty) {}

  // Get whether the cell is a symbolic footprint
  rpc IsSymbolicFootprint (EDBObjMessage) returns (google.protobuf.BoolValue) {}

  // Get the name of the cell
  rpc GetName (EDBObjMessage) returns (google.protobuf.StringValue) {}

  // Set the name of the cell
  rpc SetName (StringPropertyMessage) returns (google.protobuf.Empty) {}

  // Get the cell's design mode
  rpc GetDesignMode (EDBObjMessage) returns (DesignModeMessage) {}

  // Set the cell's design mode
  rpc SetDesignMode (DesignModePropertyMessage) returns (google.protobuf.Empty) {}

  // Get HFSS extent info
  rpc GetHfssExtentInfo (EDBObjMessage) returns (HfssExtentInfoMessage) {}

  // Set HFSS extent info
  rpc SetHfssExtentInfo (CellSetHfssExtentsMessage) returns (google.protobuf.Empty) {}

  // Get temperature settings
  rpc GetTemperatureSettings (EDBObjMessage) returns (TemperatureSettingsMessage) {}

  // Set temperature settings
  rpc SetTemperatureSettings (CellSetTemperatureSettingsMessage) returns (google.protobuf.Empty) {}

  // Cut out a polygon
  rpc CutOut (CellCutOutMessage) returns (EDBObjMessage) {}

  // Get a list of property ids.
  rpc GetProductPropertyIds (GetProductPropertyIdsMessage) returns (ProductPropertyIdsMessage) {}

  // Get product properies
  rpc GetProductProperty (GetProductPropertyMessage) returns (google.protobuf.StringValue) {}

  // Set a product property value
  rpc SetProductProperty (SetProductPropertyMessage) returns (google.protobuf.Empty) {}

  // Delete a simulation setup by name
  rpc DeleteSimulationSetup (StringPropertyMessage) returns (google.protobuf.Empty) {}

  // Get simulation setups
  rpc GetSimulationSetups (EDBObjMessage) returns (EDBObjCollectionMessage) {}
  rpc StreamSimulationSetups (EDBObjMessage) returns (stream EDBObjCollectionMessage) {}

  // Generate auto HFSS regions
  rpc GenerateAutoHFSSRegions (EDBObjMessage) returns (google.protobuf.Empty) {}

  // Generate via smart box
  rpc GenerateViaSmartBox (StringPropertyMessage) returns (PolygonDataListMessage) {}
}

message CellCreationMessage {
  EDBObjMessage database = 1;
  CellType type = 2;
  string name = 3;
}

message CellSetHfssExtentsMessage {
  EDBObjMessage cell = 1;
  HfssExtentInfoMessage info = 2;
}

message CellCutOutMessage {
  EDBObjMessage cell = 1;
  EDBObjCollectionMessage included_nets = 2;
  EDBObjCollectionMessage clipped_nets = 3;
  PolygonDataMessage clipping_polygon = 4;
  bool clean_clipping = 5;
}

message CellFindMessage {
  EDBObjMessage database = 1;
  CellType type = 2;
  oneof query {
    string name = 3;
	sint64 id = 4;
  }
}

message CellSetTemperatureSettingsMessage {
  EDBObjMessage cell = 1;
  TemperatureSettingsMessage temp_settings = 2;
}
