// Copyright 2025, ANSYS Inc. Unauthorized use, distribution or duplication is prohibited.
syntax = "proto3";
package ansys.api.discovery.v0.connections.contact;

import "ansys/api/dbu/v0/dbumodels.proto";
import "ansys/api/discovery/v0/discoverymodels.proto";

option csharp_namespace = "Ansys.Api.Discovery.V0.Connections";

service Contact
{
  //Contact condition methods
  rpc CreateContact(ContactCreationRequest) returns (ContactCreationResponse);

  rpc ChangeContactSide1Location(ChangeLocationRequest) returns(ChangeResponse);
  rpc ChangeContactSide2Location(ChangeLocationRequest) returns(ChangeResponse);

  rpc ChangeContactType(ChangeContactTypeRequest) returns (ChangeResponse);
  rpc ChangeContactPairs(ChangeContactPairRequest) returns (ChangeResponse);
  rpc SplitContact(ChangeEmptyRequest) returns (ChangeResponse);

  rpc ChangeContactFrictionCoefficient(ChangeDoubleRequest) returns (ChangeResponse);
  rpc ChangeContactStiffnessFactor(ChangeDoubleRequest) returns (ChangeResponse);
  rpc ChangeContactDetectionRadiusFactor(ChangeDoubleRequest) returns (ChangeResponse);
  rpc ChangeContactOffset(ChangeQuantityRequest) returns (ChangeResponse);
  rpc ChangeContactShearStrength(ChangeQuantityRequest) returns (ChangeResponse);
  rpc ChangeContactTensileStrength(ChangeQuantityRequest) returns (ChangeResponse);
  rpc ChangeContactAreStrengthLimitsSet(ChangeBooleanRequest) returns (ChangeResponse);
  rpc ChangeContactAdjustGapOrOverlap(ChangeBooleanRequest) returns (ChangeResponse);
  rpc ChangeContactMakeJustTouching(ChangeBooleanRequest) returns (ChangeResponse);
  rpc ChangeContactIdealize(ChangeBooleanRequest) returns (ChangeResponse);
  rpc ChangeContactSpecifyThermalConductance(ChangeSpecifyConductanceRequest) returns (ChangeResponse);
  rpc ChangeContactSpecifyElectricConductance(ChangeSpecifyConductanceRequest) returns (ChangeResponse);
  rpc ChangeContactConductanceThickness(ChangeQuantityRequest) returns (ChangeResponse);
  rpc ChangeContactConductanceMaterial(ChangeAssignmentRequest) returns (ChangeResponse);
  rpc ChangeContactThermalContactConductivity(ChangeQuantityRequest) returns (ChangeResponse);
  rpc ChangeContactElectricContactConductivity(ChangeQuantityRequest) returns (ChangeResponse);
  rpc ChangeContactThermalContactConductance(ChangeQuantityRequest) returns (ChangeResponse);
  rpc ChangeContactElectricContactConductance(ChangeQuantityRequest) returns (ChangeResponse);
}

message ContactCreationRequest{
  DoubleSidedScopedCreationData creation_data = 1;
  ContactProperties contact_properties = 2;
}

message ContactCreationResponse{
  CreationResponse condition_response = 1;
  ContactDefinition condition_data = 2;
}

message ChangeContactTypeRequest{
  ansys.api.dbu.v0.PhysicsEntityIdentifier object_id = 1;
  ContactType contact_type = 2;
}

message ChangeContactPairRequest{
  ansys.api.dbu.v0.PhysicsEntityIdentifier object_id = 1;
  ContactPairs contact_pairs = 2;
}

// Contact condition definitions



message ContactDefinition {
  ansys.api.dbu.v0.PhysicsEntityIdentifier id = 1;
  ansys.api.dbu.v0.PhysicsEntityIdentifier parent_id = 2;
  string label = 3;
  repeated string side1_locations = 4;
  repeated string side2_locations = 5;
  bool suppressed = 6;
  ContactProperties contact = 7;
}