// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

syntax = "proto2";

package protos;

option java_package = "protos";
option java_multiple_files = true;

message OneofMsg {
  // Field numbers are intentionally rearranged to test serialization order.
  optional string regular_string = 3;
  optional int32 regular_int = 2;
  optional OneofFoo regular_message = 5;

  oneof oneof_group {
    string oneof_string = 6;
    int32 oneof_int = 4;
    OneofFoo oneof_message = 1;
  }
}

message OneofFoo {
  optional string foo = 1;
}
