// 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: Naoki Iwasaki (niwasaki@google.com)
//
// A proto file with lazy fields

syntax = "proto2";

package protobuf_unittest;

message LazyMessageLite {
  optional int32 num = 1;
  optional int32 num_with_default = 2 [default = 421];
  optional LazyInnerMessageLite inner = 3 [lazy = true];
  repeated LazyInnerMessageLite repeated_inner = 4 [lazy = true];

  oneof oneof_field {
    int32 oneof_num = 5;
    LazyInnerMessageLite oneof_inner = 6 [lazy = true];
  }
}

message LazyInnerMessageLite {
  optional int32 num = 1;
  optional int32 num_with_default = 2 [default = 42];
  optional LazyNestedInnerMessageLite nested = 3 [lazy = true];

  extensions 1000 to max;
}

message LazyExtension {
  extend LazyInnerMessageLite {
    optional LazyExtension extension = 1000;
  }
  optional string name = 1;
}

message LazyNestedInnerMessageLite {
  optional int32 num = 1;
  optional int32 num_with_default = 2 [default = 4];
}
