Index: third_party/grpc/src/php/tests/generated_code/math.proto |
diff --git a/third_party/protobuf/java/src/test/java/com/google/protobuf/lite_equals_and_hash.proto b/third_party/grpc/src/php/tests/generated_code/math.proto |
similarity index 51% |
copy from third_party/protobuf/java/src/test/java/com/google/protobuf/lite_equals_and_hash.proto |
copy to third_party/grpc/src/php/tests/generated_code/math.proto |
index 86837250580af4232889dafbd4870936098d4556..c872ee6e0b2a2f499f7994d206f4eb7f10a10267 100644 |
--- a/third_party/protobuf/java/src/test/java/com/google/protobuf/lite_equals_and_hash.proto |
+++ b/third_party/grpc/src/php/tests/generated_code/math.proto |
@@ -1,6 +1,6 @@ |
-// Protocol Buffers - Google's data interchange format |
-// Copyright 2008 Google Inc. All rights reserved. |
-// https://developers.google.com/protocol-buffers/ |
+ |
+// Copyright 2015, Google Inc. |
+// All rights reserved. |
// |
// Redistribution and use in source and binary forms, with or without |
// modification, are permitted provided that the following conditions are |
@@ -28,45 +28,56 @@ |
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
-// Author: pbogle@google.com (Phil Bogle) |
+// TODO: start using src/proto/math/math.proto and remove this file once |
+// PHP supports proto3. |
syntax = "proto2"; |
-package protobuf_unittest.lite_equals_and_hash; |
- |
-// This proto definition is used to test that java_generate_equals_and_hash |
-// works correctly with the LITE_RUNTIME. |
-option java_generate_equals_and_hash = true; |
-option optimize_for = LITE_RUNTIME; |
- |
-message Foo { |
- optional int32 value = 1; |
- repeated Bar bar = 2; |
+package math; |
- extensions 100 to max; |
+message DivArgs { |
+ optional int64 dividend = 1 [default = 0]; |
+ optional int64 divisor = 2 [default = 0]; |
} |
-message Bar { |
- extend Foo { |
- optional Bar foo_ext = 100; |
- } |
+message DivReply { |
+ optional int64 quotient = 1 [default = 0]; |
+ optional int64 remainder = 2 [default = 0]; |
+} |
- optional string name = 1; |
+message FibArgs { |
+ optional int64 limit = 1 [default = 0]; |
} |
-message BarPrime { |
- optional string name = 1; |
+message Num { |
+ optional int64 num = 1 [default = 0]; |
} |
-message Empty { |
+message FibReply { |
+ optional int64 count = 1 [default = 0]; |
} |
-extend Foo { |
- optional int32 varint = 101; |
- optional fixed32 fixed32 = 102; |
- optional fixed64 fixed64 = 103; |
- optional group MyGroup = 104 { |
- optional string group_value = 1; |
+service Math { |
+ // Div divides args.dividend by args.divisor and returns the quotient and |
+ // remainder. |
+ rpc Div (DivArgs) returns (DivReply) { |
} |
-} |
+ // DivMany accepts an arbitrary number of division args from the client stream |
+ // and sends back the results in the reply stream. The stream continues until |
+ // the client closes its end; the server does the same after sending all the |
+ // replies. The stream ends immediately if either end aborts. |
+ rpc DivMany (stream DivArgs) returns (stream DivReply) { |
+ } |
+ |
+ // Fib generates numbers in the Fibonacci sequence. If args.limit > 0, Fib |
+ // generates up to limit numbers; otherwise it continues until the call is |
+ // canceled. Unlike Fib above, Fib has no final FibReply. |
+ rpc Fib (FibArgs) returns (stream Num) { |
+ } |
+ |
+ // Sum sums a stream of numbers, returning the final result once the stream |
+ // is closed. |
+ rpc Sum (stream Num) returns (Num) { |
+ } |
+} |