// Copyright AGNTCY Contributors (https://github.com/agntcy)
// SPDX-License-Identifier: Apache-2.0

// Example proto demonstrating cross-package type references with
// protoc-gen-slimrpc-go.  The service mixes types defined locally in this
// file with google.protobuf.Empty from an imported proto, showing how the
// generator automatically adds the required emptypb import and qualifies the
// type name.  Use with types_import/types_alias in buf.gen.yaml to place the
// slimrpc stubs in a separate Go package from the proto types.

syntax = "proto3";

package example_service;

option go_package = "github.com/agntcy/slim/data-plane/slimrpc-compiler/examples/types";

import "google/protobuf/empty.proto";

service Test {
  // Standard methods whose types live in this package.
  rpc ExampleUnaryUnary(ExampleRequest) returns (ExampleResponse);
  rpc ExampleUnaryStream(ExampleRequest) returns (stream ExampleResponse);
  rpc ExampleStreamUnary(stream ExampleRequest) returns (ExampleResponse);
  rpc ExampleStreamStream(stream ExampleRequest) returns (stream ExampleResponse);

  // Delete returns google.protobuf.Empty — a type from an imported proto file.
  // This is the scenario the functional test is designed to verify.
  rpc Delete(DeleteRequest) returns (google.protobuf.Empty);
}

message ExampleRequest {
  string example_string = 1;
  int64  example_integer = 2;
}

message ExampleResponse {
  string example_string = 1;
  int64  example_integer = 2;
}

message DeleteRequest {
  string id = 1;
}
