protobuf_option_test/protobuf/bin/ProtoOption.proto

66 lines
2.1 KiB
Protocol Buffer
Raw Normal View History

syntax = "proto3";
package OPTIONTEST;
import "google/protobuf/wrappers.proto";
import "google/protobuf/descriptor.proto";
//option cc_enable_arenas = false;
/// <20>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>
extend google.protobuf.FileOptions
{
string File_Option = 10000;
}
option (File_Option) = "ProtoOption.proto.FiledOptions";
/// <20><>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>
extend google.protobuf.MessageOptions
{
AdditionOption messageOption = 10001;
}
/// <20>ֶβ<D6B6><CEB2><EFBFBD>
extend google.protobuf.FieldOptions {
AdditionOption filedOptipn = 10002;
}
/// <20><><EFBFBD><EFBFBD><EFBFBD>ֶβ<D6B6><CEB2><EFBFBD>
message AdditionOption
{
string s = 1;
int32 n = 2;
double d = 3;
bool b = 4;
}
message Non_Option_Message {
option (messageOption).s = "Non_Option_Message";
option (messageOption).n = 1001;
int32 id = 1;
string sourceid = 2;
double d = 3;
bool b = 4;
google.protobuf.DoubleValue FCFF = 5;
}
message Single_Option_Message
{
option (messageOption).s = "Single_Option_Message";
option (messageOption).n = 1002;
int32 id = 1 [(filedOptipn).s = "id", (filedOptipn).n = 1 ] ;
string sourceid = 2;
double d = 3;
bool b = 4;
google.protobuf.DoubleValue FCFF = 5;
}
message Full_Option_Message
{
option(messageOption).s = "Full_Option_Message";
option (messageOption).n = 1003;
int32 id = 1 [(filedOptipn).s = "id", (filedOptipn).n = 1, (filedOptipn).d = 1.11, (filedOptipn).b = false ] ;
string sourceid = 2 [(filedOptipn).s = "source", (filedOptipn).n = 2, (filedOptipn).d = 2.22, (filedOptipn).b = true ] ;
double d = 3 [(filedOptipn).s = "double", (filedOptipn).n = 3, (filedOptipn).d = 3.33, (filedOptipn).b = false ] ;
bool b = 4 [(filedOptipn).s = "bool", (filedOptipn).n = 4, (filedOptipn).d = 4.44, (filedOptipn).b = true ] ;
google.protobuf.DoubleValue FCFF = 5 [(filedOptipn).s = "protobuf.doublevalue", (filedOptipn).n = 5, (filedOptipn).d = 5.55, (filedOptipn).b = false ] ;
}