syntax = "proto3";

// Excess Body Service
// Used to test server context cancellation with Unary and ServerStream methods
// when client sends more data than expected.
package grpc.gateway.examples.internal.proto.examplepb;

import "google/api/annotations.proto";
import "google/protobuf/empty.proto";

option go_package = "github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/proto/examplepb";

service ExcessBodyService {
  rpc NoBodyRpc(google.protobuf.Empty) returns (google.protobuf.Empty) {
    option (google.api.http) = {post: "/rpc/excess-body/rpc"};
  }
  rpc NoBodyServerStream(google.protobuf.Empty) returns (stream google.protobuf.Empty) {
    option (google.api.http) = {post: "/rpc/excess-body/stream"};
  }
  rpc WithBodyRpc(google.protobuf.Empty) returns (google.protobuf.Empty) {
    option (google.api.http) = {
      post: "/rpc/excess-body/rpc/with-body"
      body: "*"
    };
  }
  rpc WithBodyServerStream(google.protobuf.Empty) returns (stream google.protobuf.Empty) {
    option (google.api.http) = {
      post: "/rpc/excess-body/stream/with-body"
      body: "*"
    };
  }
}
