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

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

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

service Bearing
{
  //Bearing condition methods
  rpc CreateBearing(BearingCreationRequest) returns (BearingCreationResponse);

  rpc ChangeBearingLocation(ChangeLocationRequest) returns(ChangeResponse);

  rpc ChangeBearingRadialForce(ChangeQuantityRequest) returns (ChangeResponse);
  rpc ChangeBearingThrustForce(ChangeQuantityRequest) returns (ChangeResponse);
  rpc ChangeBearingAngle(ChangeQuantityRequest) returns (ChangeResponse);
}

//Bearing
message BearingCreationRequest{
  ScopedCreationData creation_data = 1;
  BearingProperties bearing_properties = 2;
}

message BearingCreationResponse{
  CreationResponse condition_response = 1;
  BearingDefinition condition_data = 2;
}

// Bearing condition definitions
message BearingProperties {
  Quantity radial_force = 1;
  Quantity thrust_force = 2;
  Quantity angle = 3;
}

message BearingDefinition {
  ansys.api.dbu.v0.PhysicsEntityIdentifier id = 1;
  ansys.api.dbu.v0.PhysicsEntityIdentifier parent_id = 2;
  string label = 3;
  repeated string locations = 4;
  bool suppressed = 5;
  BearingProperties bearing = 6;
}
