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

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

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

service Mass
{
  //Mass condition methods
  rpc CreateMass(MassCreationRequest) returns (MassCreationResponse);

  rpc ChangeMassLocation(ChangeLocationRequest) returns(ChangeResponse);

  rpc ChangeMassMagnitude(ChangeQuantityRequest) returns (ChangeResponse);

  rpc ChangeMassUseRemotePointEnabled(ChangeBooleanRequest) returns (ChangeResponse);
  rpc ChangeMassRemotePositionX(ChangeQuantityRequest) returns (ChangeResponse);
  rpc ChangeMassRemotePositionY(ChangeQuantityRequest) returns (ChangeResponse);
  rpc ChangeMassRemotePositionZ(ChangeQuantityRequest) returns (ChangeResponse);
}

// Mass
message MassCreationRequest{
  ScopedCreationData creation_data = 1;
  MassProperties mass_properties = 2;
}

message MassCreationResponse{
  CreationResponse condition_response = 1;
  MassDefinition condition_data = 2;
}

// Mass condition definitions
message MassProperties {
  Quantity mass_magnitude = 1;
  OptionalVector remote_point = 2;
}

message MassDefinition {
  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;
  MassProperties mass = 6;
}