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

syntax = "proto2";

package google.protobuf.python.internal;

enum TopLevelEnumTest1 {
  TOP_LEVEL_ENUM_TEST_1_NONE = 0;
  TOP_LEVEL_ENUM_TEST_1_ONE = 1;
}

extend DescriptorPoolTest1 {
  optional TopLevelEnumTest1 top_level_extension_test1 = 1000;
}

service DescriptorPoolTestService {}

message DescriptorPoolTest1 {
  extensions 1000 to max;

  enum NestedEnum {
    ALPHA = 1;
    BETA = 2;
  }

  optional NestedEnum nested_enum = 1 [default = BETA];

  message NestedMessage {
    enum NestedEnum {
      EPSILON = 5;
      ZETA = 6;
    }
    optional NestedEnum nested_enum = 1 [default = ZETA];
    optional string nested_field = 2 [default = "beta"];
    optional DeepNestedMessage deep_nested_message = 3;

    message DeepNestedMessage {
      enum NestedEnum {
        ETA = 7;
        THETA = 8;
      }
      optional NestedEnum nested_enum = 1 [default = ETA];
      optional string nested_field = 2 [default = "theta"];
    }
  }

  optional NestedMessage nested_message = 2;
}

message DescriptorPoolTest2 {
  enum NestedEnum {
    GAMMA = 3;
    DELTA = 4;
  }

  optional NestedEnum nested_enum = 1 [default = GAMMA];

  message NestedMessage {
    enum NestedEnum {
      IOTA = 9;
      KAPPA = 10;
    }
    optional NestedEnum nested_enum = 1 [default = IOTA];
    optional string nested_field = 2 [default = "delta"];
    optional DeepNestedMessage deep_nested_message = 3;

    message DeepNestedMessage {
      enum NestedEnum {
        LAMBDA = 11;
        MU = 12;

        reserved - 1;
        reserved 536870913;  // 0x20000001
      }
      optional NestedEnum nested_enum = 1 [default = MU];
      optional string nested_field = 2 [default = "lambda"];
    }
  }

  optional NestedMessage nested_message = 2;
}
