// Copyright 2021 Lightbend Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

syntax = "proto3";

package com.example;

import "google/protobuf/any.proto";
import "akkaserverless/annotations.proto";

message Example {
    string field1 = 1;
    string field2 = 2;
}

message PrimitiveLike {
    string field1 = 1;
    string field2 = 2;
    string field15 = 15;
}

message In {
    string field = 1 [(akkaserverless.field).entity_key = true];
}

message Out {
    string field = 1;
}

service ExampleService {
    rpc DoSomething(In) returns (Out);
    rpc StreamSomething(In) returns (stream Out);
    rpc PublishJsonToTopic(In) returns (google.protobuf.Any);
    rpc Fail(In) returns (Out);
}

service ExampleServiceTwo {
    rpc DoSomethingOne(In) returns (Out);
    rpc DoSomethingTwo(In) returns (Out);
    rpc Fail(In) returns (Out);
}

service ExampleServiceThree {
    rpc DoSomethingOne(In) returns (Out);
    rpc DoSomethingTwo(In) returns (Out);
    rpc Fail(In) returns (Out);
}
