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

import "ansys/api/discovery/v1/commonmessages.proto";
import "ansys/api/discovery/v1/physics/physicsmessages.proto";

option csharp_namespace = "Ansys.Api.Discovery.V1.Physics.Conditions.SolidTemperature";

service SolidTemperature
{
  rpc CreateVolumetric(TemperatureCreationRequest) returns (TemperatureCreationResponse);

  rpc CreateSurface(TemperatureCreationRequest) returns (TemperatureCreationResponse);

  rpc SetLocation(SetLocationExtendedRequest) returns(SetResponse);

  rpc SetMagnitude(SetQuantityRequest) returns(SetResponse);

  rpc GetAll(ParentEntityRequest) returns (GetAllResponse);
}

//Requests and responses
message TemperatureCreationRequest{
  ScopedCreationData creation_data = 1;
  Quantity temperature = 2;
}

message TemperatureCreationResponse{
  CreationResponse condition_response = 1;
  TemperatureDefinition condition_data = 2;
}

// Definitions
message TemperatureDefinition {
  GuidEntityIdentifier id = 1;
  GuidEntityIdentifier parent_id = 2;
  string label = 3;
  repeated string locations = 4;
  bool suppressed = 5;
  Quantity magnitude = 6;
}

message GetAllResponse{
  repeated TemperatureDefinition temperature_conditions = 1;
  bool success = 2;
  string message = 3;
}