mirror of
https://github.com/protocolbuffers/protobuf
synced 2026-08-26 02:23:14 -04:00
89 lines
2.4 KiB
Protocol Buffer
89 lines
2.4 KiB
Protocol Buffer
// 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: matthewtoia@google.com (Matt Toia)
|
|
|
|
syntax = "proto2";
|
|
|
|
package google.protobuf.python.internal;
|
|
|
|
import "google/protobuf/internal/factory_test1.proto";
|
|
|
|
enum Factory2Enum {
|
|
FACTORY_2_VALUE_0 = 0;
|
|
FACTORY_2_VALUE_1 = 1;
|
|
}
|
|
|
|
message Factory2Message {
|
|
optional int32 mandatory = 1;
|
|
optional Factory2Enum factory_2_enum = 2;
|
|
enum NestedFactory2Enum {
|
|
NESTED_FACTORY_2_VALUE_0 = 0;
|
|
NESTED_FACTORY_2_VALUE_1 = 1;
|
|
}
|
|
optional NestedFactory2Enum nested_factory_2_enum = 3;
|
|
message NestedFactory2Message {
|
|
optional string value = 1;
|
|
}
|
|
optional NestedFactory2Message nested_factory_2_message = 4;
|
|
optional Factory1Message factory_1_message = 5;
|
|
optional Factory1Enum factory_1_enum = 6;
|
|
optional Factory1Message.NestedFactory1Enum nested_factory_1_enum = 7;
|
|
optional Factory1Message.NestedFactory1Message nested_factory_1_message = 8;
|
|
optional Factory2Message circular_message = 9;
|
|
optional string scalar_value = 10;
|
|
repeated string list_value = 11;
|
|
repeated group Grouped = 12 {
|
|
optional string part_1 = 13;
|
|
optional string part_2 = 14;
|
|
}
|
|
optional LoopMessage loop = 15;
|
|
optional int32 int_with_default = 16 [default = 1776];
|
|
optional double double_with_default = 17 [default = 9.99];
|
|
optional string string_with_default = 18 [default = "hello world"];
|
|
optional bool bool_with_default = 19 [default = false];
|
|
optional Factory2Enum enum_with_default = 20 [default = FACTORY_2_VALUE_1];
|
|
optional bytes bytes_with_default = 21 [default = "a\373\000c"];
|
|
|
|
extend Factory1Message {
|
|
optional string one_more_field = 1001;
|
|
}
|
|
|
|
oneof oneof_field {
|
|
int32 oneof_int = 22;
|
|
string oneof_string = 23;
|
|
}
|
|
}
|
|
|
|
message LoopMessage {
|
|
optional Factory2Message loop = 1;
|
|
}
|
|
|
|
message MessageWithNestedEnumOnly {
|
|
enum NestedEnum {
|
|
NESTED_MESSAGE_ENUM_0 = 0;
|
|
}
|
|
}
|
|
|
|
extend Factory1Message {
|
|
optional string another_field = 1002;
|
|
}
|
|
|
|
message MessageWithOption {
|
|
option no_standard_descriptor_accessor = true;
|
|
|
|
optional int32 field1 = 1;
|
|
}
|
|
|
|
message FactoryMessageExtension {
|
|
optional int32 a = 1;
|
|
}
|
|
|
|
extend Factory1Message {
|
|
optional FactoryMessageExtension message_field1 = 1003;
|
|
optional FactoryMessageExtension message_field2 = 1004;
|
|
}
|