Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,7 @@ To publicly release the packages, ensure your branch is up-to-date and then push
git tag v0.5.0
git push --tags
```

#### Google protobuf files

The Google third-party protobuf files were obtained from [googleapis](https://github.com/googleapis/googleapis).
2 changes: 1 addition & 1 deletion ansys/api/additive/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.7.0-dev7
2.0.0-dev0
8 changes: 7 additions & 1 deletion ansys/api/additive/v0/additive_materials.proto
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ package ansys.api.additive.v0.materials;
option csharp_namespace = "Ansys.Api.Additive.Materials";

import "ansys/api/additive/v0/additive_domain.proto";
import "google/longrunning/operations.proto";
import "google/protobuf/empty.proto";

service MaterialsService {
Expand All @@ -18,7 +19,12 @@ service MaterialsService {

rpc GetMaterial (GetMaterialRequest) returns (AdditiveMaterial);

rpc TuneMaterial (TuneMaterialRequest) returns (stream TuneMaterialResponse);
rpc TuneMaterial (TuneMaterialRequest) returns (google.longrunning.Operation) {
option (google.longrunning.operation_info) = {
response_type: "TuneMaterialResponse"
metadata_type: "OperationMetadata"
};
}
}

message AddMaterialRequest {
Expand Down
21 changes: 21 additions & 0 deletions ansys/api/additive/v0/additive_operations.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// Copyright (c) 2024 ANSYS, Inc.

syntax = "proto3";

package ansys.api.additive.v0;

option csharp_namespace = "Ansys.Api.Additive";

import "ansys/api/additive/v0/additive_domain.proto";
import "google/protobuf/timestamp.proto";

// Metadata for a long running operation
message OperationMetadata {
google.protobuf.Timestamp creation_time = 1;
google.protobuf.Timestamp end_time = 2;
string simulation_id = 3;
string context = 4;
string message = 5;
float percent_complete = 6;
ProgressState state = 7;
}
18 changes: 16 additions & 2 deletions ansys/api/additive/v0/additive_simulation.proto
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,26 @@ package ansys.api.additive.v0.simulation;
option csharp_namespace = "Ansys.Api.Additive.Simulation";

import "ansys/api/additive/v0/additive_domain.proto";
import "google/longrunning/operations.proto";

service SimulationService {
rpc Simulate(SimulationRequest) returns (stream SimulationResponse);
rpc Simulate(SimulationRequest) returns (google.longrunning.Operation) {
option (google.longrunning.operation_info) = {
response_type: "SimulationResponse"
metadata_type: "OperationMetadata"
};
}

rpc UploadFile(stream UploadFileRequest) returns (stream UploadFileResponse);

rpc DownloadFile(DownloadFileRequest) returns (stream DownloadFileResponse);
rpc Mesh(MeshRequest) returns (stream MeshResponse);

rpc Mesh(MeshRequest) returns (google.longrunning.Operation) {
option (google.longrunning.operation_info) = {
response_type: "MeshResponse"
metadata_type: "OperationMetadata"
};
}
}

message SimulationResponse {
Expand Down
4 changes: 2 additions & 2 deletions csharp/Ansys.Api.Additive.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
<Protobuf Include="../google/**/*.proto" ProtoRoot=".." GrpcServices="both" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Google.Protobuf" Version="3.21.9" />
<PackageReference Include="Grpc" Version="2.46.5" />
<PackageReference Include="Google.Protobuf" Version="3.26.1" />
<PackageReference Include="Grpc" Version="2.46.6" />
<PackageReference Include="Grpc.Tools" Version="2.50.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
Expand Down
Loading