1// Protocol Buffers - Google's data interchange format 2// Copyright 2008 Google Inc. All rights reserved. 3// 4// Use of this source code is governed by a BSD-style 5// license that can be found in the LICENSE file or at 6// https://developers.google.com/open-source/licenses/bsd 7 8// Author: matthewtoia@google.com (Matt Toia) 9 10syntax = "proto2"; 11 12package google.protobuf.python.internal; 13 14import "google/protobuf/internal/factory_test1.proto"; 15 16enum Factory2Enum { 17 FACTORY_2_VALUE_0 = 0; 18 FACTORY_2_VALUE_1 = 1; 19} 20 21message Factory2Message { 22 optional int32 mandatory = 1; 23 optional Factory2Enum factory_2_enum = 2; 24 enum NestedFactory2Enum { 25 NESTED_FACTORY_2_VALUE_0 = 0; 26 NESTED_FACTORY_2_VALUE_1 = 1; 27 } 28 optional NestedFactory2Enum nested_factory_2_enum = 3; 29 message NestedFactory2Message { 30 optional string value = 1; 31 } 32 optional NestedFactory2Message nested_factory_2_message = 4; 33 optional Factory1Message factory_1_message = 5; 34 optional Factory1Enum factory_1_enum = 6; 35 optional Factory1Message.NestedFactory1Enum nested_factory_1_enum = 7; 36 optional Factory1Message.NestedFactory1Message nested_factory_1_message = 8; 37 optional Factory2Message circular_message = 9; 38 optional string scalar_value = 10; 39 repeated string list_value = 11; 40 repeated group Grouped = 12 { 41 optional string part_1 = 13; 42 optional string part_2 = 14; 43 } 44 optional LoopMessage loop = 15; 45 optional int32 int_with_default = 16 [default = 1776]; 46 optional double double_with_default = 17 [default = 9.99]; 47 optional string string_with_default = 18 [default = "hello world"]; 48 optional bool bool_with_default = 19 [default = false]; 49 optional Factory2Enum enum_with_default = 20 [default = FACTORY_2_VALUE_1]; 50 optional bytes bytes_with_default = 21 [default = "a\373\000c"]; 51 52 extend Factory1Message { 53 optional string one_more_field = 1001; 54 } 55 56 oneof oneof_field { 57 int32 oneof_int = 22; 58 string oneof_string = 23; 59 } 60} 61 62message LoopMessage { 63 optional Factory2Message loop = 1; 64} 65 66message MessageWithNestedEnumOnly { 67 enum NestedEnum { 68 NESTED_MESSAGE_ENUM_0 = 0; 69 } 70} 71 72extend Factory1Message { 73 optional string another_field = 1002; 74} 75 76message MessageWithOption { 77 option no_standard_descriptor_accessor = true; 78 79 optional int32 field1 = 1; 80} 81