aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/google/protobuf/util/internal/testdata/oneofs.proto
diff options
context:
space:
mode:
Diffstat (limited to 'src/google/protobuf/util/internal/testdata/oneofs.proto')
-rw-r--r--src/google/protobuf/util/internal/testdata/oneofs.proto31
1 files changed, 20 insertions, 11 deletions
diff --git a/src/google/protobuf/util/internal/testdata/oneofs.proto b/src/google/protobuf/util/internal/testdata/oneofs.proto
index 5bc9fa08..c37da083 100644
--- a/src/google/protobuf/util/internal/testdata/oneofs.proto
+++ b/src/google/protobuf/util/internal/testdata/oneofs.proto
@@ -28,7 +28,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Proto to test oneofs.
+// Proto to test proto3 oneofs.
syntax = "proto3";
import "google/protobuf/any.proto";
@@ -36,7 +36,6 @@ import "google/protobuf/struct.proto";
import "google/protobuf/timestamp.proto";
package google.protobuf.testing.oneofs;
-option java_package = "com.google.protobuf.testing.oneofs";
message OneOfsRequest {
string value = 1;
@@ -45,24 +44,34 @@ message OneOfsRequest {
int32 int_data = 3;
// Simple message
Data message_data = 4;
+ MoreData more_data = 5;
// Well known types
- google.protobuf.Struct struct_data = 5;
- google.protobuf.Value value_data = 6;
- google.protobuf.ListValue list_value_data = 7;
- google.protobuf.Timestamp ts_data = 8;
+ google.protobuf.Struct struct_data = 6;
+ google.protobuf.Value value_data = 7;
+ google.protobuf.ListValue list_value_data = 8;
+ google.protobuf.Timestamp ts_data = 9;
}
google.protobuf.Any any_data = 19;
}
+message RequestWithSimpleOneof {
+ string value = 1;
+ oneof data {
+ string str_data = 2;
+ int32 int_data = 3;
+ Data message_data = 4;
+ MoreData more_data = 5;
+ }
+}
+
message Data {
int32 data_value = 1;
}
-message Response {
- string value = 1;
+message MoreData {
+ string str_value = 1;
}
-service TestService {
- // Test call.
- rpc Call(OneOfsRequest) returns (Response);
+message Response {
+ string value = 1;
}