// Copyright 2010-2020, 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
// met:
//
//     * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//     * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
//     * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

// This protocol message is used only for test program.

syntax = "proto2";

package mozc.net;

enum TestEnum {
  ENUM_A = 0;
  ENUM_B = 1;
  ENUM_C = 2;
}

message SubMsg {
  optional double double_value = 1;
  optional float float_value = 2;
  optional int32 int32_value = 3;
  optional int64 int64_value = 4;
  optional uint32 uint32_value = 5;
  optional uint64 uint64_value = 6;
  optional sint32 sint32_value = 7;
  optional sint64 sint64_value = 8;
  optional fixed32 fixed32_value = 9;
  optional fixed64 fixed64_value = 10;
  optional sfixed32 sfixed32_value = 11;
  optional sfixed64 sfixed64_value = 12;
  optional bool bool_value = 13;
  optional string string_value = 14;
  optional bytes bytes_value = 15;
  optional TestEnum enum_value = 16;

  repeated double repeated_double_value = 101;
  repeated float repeated_float_value = 102;
  repeated int32 repeated_int32_value = 103;
  repeated int64 repeated_int64_value = 104;
  repeated uint32 repeated_uint32_value = 105;
  repeated uint64 repeated_uint64_value = 106;
  repeated sint32 repeated_sint32_value = 107;
  repeated sint64 repeated_sint64_value = 108;
  repeated fixed32 repeated_fixed32_value = 109;
  repeated fixed64 repeated_fixed64_value = 110;
  repeated sfixed32 repeated_sfixed32_value = 111;
  repeated sfixed64 repeated_sfixed64_value = 112;
  repeated bool repeated_bool_value = 113;
  repeated string repeated_string_value = 114;
  repeated bytes repeated_bytes_value = 115;
  repeated TestEnum repeated_enum_value = 116;

  required double required_double_value = 201 [default = 201.0];
  required float required_float_value = 202 [default = 202.0];
  required int32 required_int32_value = 203 [default = 203];
  required int64 required_int64_value = 204 [default = 204];
  required uint32 required_uint32_value = 205 [default = 205];
  required uint64 required_uint64_value = 206 [default = 206];
  required sint32 required_sint32_value = 207 [default = 207];
  required sint64 required_sint64_value = 208 [default = 208];
  required fixed32 required_fixed32_value = 209 [default = 209];
  required fixed64 required_fixed64_value = 210 [default = 210];
  required sfixed32 required_sfixed32_value = 211 [default = 211];
  required sfixed64 required_sfixed64_value = 212 [default = 212];
  required bool required_bool_value = 213 [default = true];
  required string required_string_value = 214 [default = 'TEST'];
  required bytes required_bytes_value = 215 [default = 'TEST'];
  required TestEnum required_enum_value = 216 [default = ENUM_C];
}

message TestMsg {
  enum TestInnerEnum {
    ENUM_0 = 0;
    ENUM_1 = 1;
    ENUM_2 = 2;
  }
  optional double double_value = 1;
  optional float float_value = 2;
  optional int32 int32_value = 3;
  optional int64 int64_value = 4;
  optional uint32 uint32_value = 5;
  optional uint64 uint64_value = 6;
  optional sint32 sint32_value = 7;
  optional sint64 sint64_value = 8;
  optional fixed32 fixed32_value = 9;
  optional fixed64 fixed64_value = 10;
  optional sfixed32 sfixed32_value = 11;
  optional sfixed64 sfixed64_value = 12;
  optional bool bool_value = 13;
  optional string string_value = 14;
  optional bytes bytes_value = 15;
  optional TestEnum enum_value = 16;
  optional TestInnerEnum innerenum_value = 17;

  repeated double repeated_double_value = 101;
  repeated float repeated_float_value = 102;
  repeated int32 repeated_int32_value = 103;
  repeated int64 repeated_int64_value = 104;
  repeated uint32 repeated_uint32_value = 105;
  repeated uint64 repeated_uint64_value = 106;
  repeated sint32 repeated_sint32_value = 107;
  repeated sint64 repeated_sint64_value = 108;
  repeated fixed32 repeated_fixed32_value = 109;
  repeated fixed64 repeated_fixed64_value = 110;
  repeated sfixed32 repeated_sfixed32_value = 111;
  repeated sfixed64 repeated_sfixed64_value = 112;
  repeated bool repeated_bool_value = 113;
  repeated string repeated_string_value = 114;
  repeated bytes repeated_bytes_value = 115;
  repeated TestEnum repeated_enum_value = 116;
  repeated TestInnerEnum repeated_innerenum_value = 117;

  required double required_double_value = 201 [default = 201.0];
  required float required_float_value = 202 [default = 202.0];
  required int32 required_int32_value = 203 [default = 203];
  required int64 required_int64_value = 204 [default = 204];
  required uint32 required_uint32_value = 205 [default = 205];
  required uint64 required_uint64_value = 206 [default = 206];
  required sint32 required_sint32_value = 207 [default = 207];
  required sint64 required_sint64_value = 208 [default = 208];
  required fixed32 required_fixed32_value = 209 [default = 209];
  required fixed64 required_fixed64_value = 210 [default = 210];
  required sfixed32 required_sfixed32_value = 211 [default = 211];
  required sfixed64 required_sfixed64_value = 212 [default = 212];
  required bool required_bool_value = 213 [default = true];
  required string required_string_value = 214 [default = 'TEST'];
  required bytes required_bytes_value = 215 [default = 'TEST'];
  required TestEnum required_enum_value = 216 [default = ENUM_C];
  required TestInnerEnum required_innerenum_value = 217 [default = ENUM_2];

  optional SubMsg sub_message = 300;
  repeated SubMsg repeated_sub_message = 301;
  required SubMsg required_sub_message = 302;
}
