diff --git a/setup.py b/setup.py index 1fef10d..9ccd3d8 100644 --- a/setup.py +++ b/setup.py @@ -41,7 +41,8 @@ }, entry_points={ "ansys.tools.protoc_helper.proto_provider": [ - "ansys.api.acp.v0=ansys.api.acp.v0" + "ansys.api.acp.v0=ansys.api.acp.v0", + "ansys.api.acp.internal=ansys.api.acp.internal", ], }, cmdclass=CMDCLASS_OVERRIDE, diff --git a/src/ansys/api/acp/internal/tree.proto b/src/ansys/api/acp/internal/tree.proto new file mode 100644 index 0000000..9151960 --- /dev/null +++ b/src/ansys/api/acp/internal/tree.proto @@ -0,0 +1,52 @@ +// Copyright (C) 2022 - 2025 ANSYS, Inc. and/or its affiliates. +// SPDX-License-Identifier: MIT +// +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + +syntax = "proto3"; +package ansys.api.acp.internal.tree; + +// The package name 'internal' has special meaning in Go: +// other modules cannot import it. +// To avoid this, we use 'unstable' instead of 'internal'. +// This only affects the generated Go code. +option go_package = "github.com/ansys/ansys-api-acp/ansys/api/acp/unstable/tree"; + +// This is an internal proto definition and should not be +// used in any public interface. +// Stability and backwards compatibility is not guaranteed. + +import "ansys/api/acp/v0/base.proto"; + +message TreeObject { + ansys.api.acp.v0.base.BasicInfo basic_info = 1; + ansys.api.acp.v0.base.ResourcePath leaf_resource_path = 2; +} + +message ListTreeObjectsRequest { + // The resource path must represent a model + ansys.api.acp.v0.base.ResourcePath resource_path = 1; +} + +message FlatTree { repeated TreeObject tree_objects = 1; } + +service TreeObjectService { + rpc ListTreeObjects(ListTreeObjectsRequest) returns (FlatTree); +}