Jan Tattermusch | 7897ae9 | 2017-06-07 22:57:36 +0200 | [diff] [blame] | 1 | // Copyright 2015 gRPC authors. |
Tim Emiola | 8f505f7 | 2015-02-05 17:34:47 -0800 | [diff] [blame] | 2 | // |
Jan Tattermusch | 7897ae9 | 2017-06-07 22:57:36 +0200 | [diff] [blame] | 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 |
Tim Emiola | 8f505f7 | 2015-02-05 17:34:47 -0800 | [diff] [blame] | 6 | // |
Jan Tattermusch | 7897ae9 | 2017-06-07 22:57:36 +0200 | [diff] [blame] | 7 | // http://www.apache.org/licenses/LICENSE-2.0 |
Tim Emiola | 8f505f7 | 2015-02-05 17:34:47 -0800 | [diff] [blame] | 8 | // |
Jan Tattermusch | 7897ae9 | 2017-06-07 22:57:36 +0200 | [diff] [blame] | 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. |
Tim Emiola | 8f505f7 | 2015-02-05 17:34:47 -0800 | [diff] [blame] | 14 | |
| 15 | syntax = "proto3"; |
| 16 | |
Eric Anderson | 8d3ae46 | 2016-02-03 10:07:44 -0800 | [diff] [blame] | 17 | option java_multiple_files = true; |
| 18 | option java_package = "io.grpc.examples.helloworld"; |
| 19 | option java_outer_classname = "HelloWorldProto"; |
Jorge Canizales | e3534c3 | 2015-06-02 02:02:28 -0700 | [diff] [blame] | 20 | option objc_class_prefix = "HLW"; |
Tim Emiola | 8f505f7 | 2015-02-05 17:34:47 -0800 | [diff] [blame] | 21 | |
| 22 | package helloworld; |
| 23 | |
Tim Emiola | 66e79fa | 2015-02-18 14:07:48 -0800 | [diff] [blame] | 24 | // The greeting service definition. |
Tim Emiola | c5a093c | 2015-02-18 14:28:50 -0800 | [diff] [blame] | 25 | service Greeter { |
Tim Emiola | 66e79fa | 2015-02-18 14:07:48 -0800 | [diff] [blame] | 26 | // Sends a greeting |
Yang Gao | 600d70c | 2015-02-20 10:50:46 -0800 | [diff] [blame] | 27 | rpc SayHello (HelloRequest) returns (HelloReply) {} |
Tim Emiola | 66e79fa | 2015-02-18 14:07:48 -0800 | [diff] [blame] | 28 | } |
| 29 | |
Tim Emiola | 8f505f7 | 2015-02-05 17:34:47 -0800 | [diff] [blame] | 30 | // The request message containing the user's name. |
| 31 | message HelloRequest { |
Tim Emiola | 66e79fa | 2015-02-18 14:07:48 -0800 | [diff] [blame] | 32 | string name = 1; |
Tim Emiola | 8f505f7 | 2015-02-05 17:34:47 -0800 | [diff] [blame] | 33 | } |
| 34 | |
| 35 | // The response message containing the greetings |
| 36 | message HelloReply { |
Tim Emiola | 66e79fa | 2015-02-18 14:07:48 -0800 | [diff] [blame] | 37 | string message = 1; |
Tim Emiola | 8f505f7 | 2015-02-05 17:34:47 -0800 | [diff] [blame] | 38 | } |