// Proto file representing the via layers

syntax = "proto3";

package ansys.api.edb.v1;

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

// Via layer service definition
service ViaLayerService {
  // Creates a via layer
  rpc Create (ViaLayerCreationMessage) returns (EDBObjMessage) {}

  // Get the name of the upper or lower reference layer of the via layer.
  rpc GetRefLayerName (ViaLayerRefLayerIdMessage) returns (google.protobuf.StringValue) {}

  // Sets the upper or lower reference layer of the via layer
  rpc SetRefLayer (SetViaLayerRefLayerMessage) returns (google.protobuf.Empty) {}
}

// Message for ViaLayerService::Create
message ViaLayerCreationMessage {
  string via_layer_name = 1;
  string lower_ref_layer_name = 2;
  string upper_ref_layer_name = 3;
  string material_name = 4;
}

message ViaLayerRefLayerIdMessage {
  EDBObjMessage via_layer = 1;
  bool is_upper_ref = 2;
}

message SetViaLayerRefLayerMessage {
  ViaLayerRefLayerIdMessage via_layer_ref_layer_id = 1;
  EDBObjMessage new_ref_layer = 2;
}
