1// Copyright (C) 2016 The Dagger Authors. 2// 3// Licensed under the Apache License, Version 2.0 (the "License"); 4// you may not use this file except in compliance with the License. 5// You may obtain a copy of the License at 6// 7// http://www.apache.org/licenses/LICENSE-2.0 8// 9// Unless required by applicable law or agreed to in writing, software 10// distributed under the License is distributed on an "AS IS" BASIS, 11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12// See the License for the specific language governing permissions and 13// limitations under the License. 14 15syntax = "proto3"; 16 17package test; 18 19enum CoffeeType { 20 UNKNOWN = 0; 21 DRIP = 1; 22 POUR_OVER = 2; 23 ESPRESSO = 3; 24 AMERICANO = 4; 25 LATTE = 5; 26} 27 28message CoffeeRequest { 29 repeated CoffeeType type = 1; 30} 31 32message CoffeeResponse { 33 repeated CoffeeType cup = 1; 34 string message = 2; 35} 36 37service Barista { 38 rpc UnaryGetCoffee(CoffeeRequest) returns (CoffeeResponse) { 39 } 40 41 rpc ClientStreamingGetCoffee(stream CoffeeRequest) returns (CoffeeResponse) { 42 } 43 44 rpc ServerStreamingGetCoffee(CoffeeRequest) returns (stream CoffeeResponse) { 45 } 46 47 rpc BidiStreamingGetCoffee(stream CoffeeRequest) 48 returns (stream CoffeeResponse) { 49 } 50} 51