// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc.  All rights reserved.
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file or at
// https://developers.google.com/open-source/licenses/bsd

// LINT: LEGACY_NAMES

syntax = "proto2";

package json_test_proto2;

option java_package = "com.google.protobuf.util.proto";
option java_outer_classname = "JsonTestProto2";

message TestAllTypesProto2 {
  enum NestedEnum {
    FOO = 0;
    BAR = 1;
    BAZ = 2;
  }

  enum AliasedEnum {
    option allow_alias = true;

    ALIAS_FOO = 0;
    ALIAS_BAR = 1;
    ALIAS_BAZ = 2;
    QUX = 2;
    qux = 2;
    bAz = 2;
  }
  message NestedMessage {
    optional int32 value = 1;
  }

  optional int32 optional_int32 = 1;
  optional int64 optional_int64 = 2;
  optional uint32 optional_uint32 = 3;
  optional uint64 optional_uint64 = 4;
  optional sint32 optional_sint32 = 5;
  optional sint64 optional_sint64 = 6;
  optional fixed32 optional_fixed32 = 7;
  optional fixed64 optional_fixed64 = 8;
  optional sfixed32 optional_sfixed32 = 9;
  optional sfixed64 optional_sfixed64 = 10;
  optional float optional_float = 11;
  optional double optional_double = 12;
  optional bool optional_bool = 13;
  optional string optional_string = 14;
  optional bytes optional_bytes = 15;
  optional NestedMessage optional_nested_message = 18;
  optional NestedEnum optional_nested_enum = 21;
  optional AliasedEnum optional_aliased_enum = 52;
  optional TestRecursive optional_recursive = 53;

  // Repeated
  repeated int32 repeated_int32 = 31;
  repeated int64 repeated_int64 = 32;
  repeated uint32 repeated_uint32 = 33;
  repeated uint64 repeated_uint64 = 34;
  repeated sint32 repeated_sint32 = 35;
  repeated sint64 repeated_sint64 = 36;
  repeated fixed32 repeated_fixed32 = 37;
  repeated fixed64 repeated_fixed64 = 38;
  repeated sfixed32 repeated_sfixed32 = 39;
  repeated sfixed64 repeated_sfixed64 = 40;
  repeated float repeated_float = 41;
  repeated double repeated_double = 42;
  repeated bool repeated_bool = 43;
  repeated string repeated_string = 44;
  repeated bytes repeated_bytes = 45;
  repeated NestedMessage repeated_nested_message = 48;
  repeated NestedEnum repeated_nested_enum = 51;
  repeated TestRecursive repeated_recursive = 55;
}

message TestRecursive {
  optional int32 value = 1;
  optional TestRecursive nested = 2;
}
