-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
114 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
lib/testutils/httpmultibin/grpc_testing/nested_types.proto
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// The purpose of this proto file is to demonstrate that we can have | ||
// nested types and that we should be able to load them correctly. | ||
|
||
syntax = "proto3"; | ||
|
||
package grpc.testing; | ||
|
||
// Example to demonstrate that it is possible to define | ||
// and use message types within other message types | ||
message Outer { // Level 0 | ||
message MiddleAA { // Level 1 | ||
message Inner { // Level 2 | ||
int64 ival = 1; | ||
bool booly = 2; | ||
} | ||
Inner inner = 1; | ||
} | ||
|
||
message MiddleBB { // Level 1 | ||
message Inner { // Level 2 | ||
int32 ival = 1; | ||
bool booly = 2; | ||
} | ||
Inner inner = 1; | ||
} | ||
|
||
MiddleAA middleAA = 1; | ||
MiddleBB middleBB = 2; | ||
} | ||
|
||
// Example to demonstrate that it is possible to reuse | ||
// a message type outside its parent message type | ||
message MeldOuter { | ||
Outer.MiddleAA.Inner innerAA = 1; | ||
Outer.MiddleBB.Inner innerBB = 2; | ||
} |