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

// This file contains messages that extend MessageSet.

syntax = "proto2";

package google.protobuf.internal;

// A message with message_set_wire_format.
message TestMessageSet {
  option message_set_wire_format = true;

  extensions 4 to max;
}

message TestMessageSetExtension1 {
  extend TestMessageSet {
    optional TestExtension first_extension = 2534113;
  }
  extend TestMessageSet {
    optional TestMessageSetExtension1 message_set_extension = 98418603;
  }
  optional int32 i = 15;
  optional TestMessageSet sub_msg = 16;
}

message TestMessageSetExtension2 {
  extend TestMessageSet {
    optional TestMessageSetExtension2 message_set_extension = 98418634;
  }
  optional string str = 25;
}

message TestMessageSetExtension3 {
  optional string text = 35;
}

message TestExtension {
  optional string str = 1;
}

extend TestMessageSet {
  optional TestMessageSetExtension3 message_set_extension3 = 98418655;
}

// This message was used to generate
// //net/proto2/python/internal/testdata/message_set_message, but is commented
// out since it must not actually exist in code, to simulate an "unknown"
// extension.
// message TestMessageSetUnknownExtension {
//   extend TestMessageSet {
//     optional TestMessageSetUnknownExtension message_set_extension = 56141421;
//   }
//   optional int64 a = 1;
// }
