// Proto file representing the Cell Instance class

syntax = "proto3";

// Package
package ansys.api.edb.v1;

// Imports
import "ansys/api/edb/v1/edb_messages.proto";
import "ansys/api/edb/v1/hierarchy_obj.proto";
import "ansys/api/edb/v1/transform3d.proto";

// CellInstance Service definition
service CellInstanceService {
  // Create a cellinstance with ref layout
  rpc Create(CellInstanceCreationMessage) returns (EDBObjMessage) {}

  // Create a cellinstance with component
  rpc CreateWithComponent(CellInstanceCreationMessage) returns (EDBObjMessage) {}

  // Finds a cellinstance by name in the given layout
  rpc FindByName(ObjectNameInLayoutMessage) returns (EDBObjMessage) {}

  // Get the reference layout
  rpc GetReferenceLayout(EDBObjMessage) returns (EDBObjMessage) {}

  // Terminal Instances
  rpc GetTermInsts(EDBObjMessage) returns (EDBObjCollectionMessage) {}
  rpc StreamTermInsts(EDBObjMessage) returns (stream EDBObjCollectionMessage) {}

  // Get if component is 3dplaced
  rpc GetIs3DPlacement(EDBObjMessage) returns (google.protobuf.BoolValue) {}

  // Set if component is 3dplaced
  rpc Set3DPlacement(BoolPropertyMessage) returns (google.protobuf.Empty) {}

  // Get 3d transform values
  rpc Get3DTransform(EDBObjMessage) returns (EDBObjMessage) {}

  // Set 3d transform values
  rpc Set3DTransform(PointerPropertyMessage) returns (google.protobuf.Empty) {}

  // Get Parameter Override
  rpc GetParameterOverride(StringPropertyMessage) returns (ValueMessage) {}

  // Set Parameter Override
  rpc SetParameterOverride(CellInstanceParameterOverride) returns (google.protobuf.Empty) {}
}

message CellInstanceCreationMessage {
  ObjectNameInLayoutMessage target = 1;
  EDBObjMessage ref = 2;
}

message CellInstanceParameterOverride {
  EDBObjMessage target = 1;
  string pname = 2;
  ValueMessage pval = 3;
}