// 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)
//
// A proto file which tests the java_multiple_files option.

syntax = "proto2";

// Some generic_services option(s) added automatically.
// See:  http://go/proto2-generic-services-default
package protobuf_unittest;

import "google/protobuf/descriptor.proto";
import "google/protobuf/unittest.proto";

option java_generic_services = true;  // auto-added
option java_multiple_files = true;
option java_outer_classname = "MultipleFilesTestProto";

message MessageWithNoOuter {
  message NestedMessage {
    optional int32 i = 1;
  }
  enum NestedEnum {
    BAZ = 3;
  }
  optional NestedMessage nested = 1;
  repeated TestAllTypes foreign = 2;
  optional NestedEnum nested_enum = 3;
  optional EnumWithNoOuter foreign_enum = 4;
}

extend google.protobuf.EnumValueOptions {
  optional int32 enum_value_option = 7654321;
}

enum EnumWithNoOuter {
  FOO = 1 [(enum_value_option) = 12345];
  BAR = 2;
}

service ServiceWithNoOuter {
  rpc Foo(MessageWithNoOuter) returns (TestAllTypes);
}

extend TestAllExtensions {
  optional int32 extension_with_outer = 1234567;
}
