// 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

// Author: kenton@google.com (Kenton Varda)
//  Based on original Protocol Buffers design by
//  Sanjay Ghemawat, Jeff Dean, and others.
//
// This file contains messages for testing repeated field comparison
// LINT: ALLOW_GROUPS

syntax = "proto2";

package protobuf_unittest;

import "google/protobuf/any.proto";

option optimize_for = SPEED;

message TestField {
  optional int32 a = 3;
  optional int32 b = 4;
  optional int32 c = 1;
  repeated int32 rc = 2;
  optional TestField m = 5;
  repeated TestField rm = 6;

  extend TestDiffMessage {
    optional TestField tf = 100;
  }
}

message TestDiffMessage {
  repeated group Item = 1 {
    optional int32 a = 2;       // Test basic repeated field comparison.
    optional string b = 4;      // Test basic repeated field comparison.
    repeated int32 ra = 3;      // Test SetOfSet Comparison.
    repeated string rb = 5;     // Test TreatAsMap when key is repeated
    optional TestField m = 6;   // Test TreatAsMap when key is a message
    repeated TestField rm = 7;  // Test TreatAsMap when key is a repeated
                                // message
    map<string, int32> mp = 8;  // Test for map comparisons
  }

  optional int32 v = 13 [deprecated = true];
  optional string w = 14;
  optional TestField m = 15;
  repeated int32 rv = 11;                          // Test for combinations
  repeated string rw = 10;                         // Test for combinations
  repeated TestField rm = 12 [deprecated = true];  // Test for combinations
  repeated google.protobuf.Any rany =
      16;  // Test for repeated Any type resolution
  extensions 100 to 199;
}
