| // Copyright 2013 Google Inc. All rights reserved. |
| |
| syntax = "proto2"; |
| |
| package proto2; |
| |
| option java_package = "com.google.protobuf"; |
| option java_outer_classname = "DescriptorProtos"; |
| option optimize_for = SPEED; |
| |
| message FileDescriptorSet { |
| repeated FileDescriptorProto file = 1; |
| } |
| |
| message FileDescriptorProto { |
| optional string name = 1; |
| optional string package = 2; |
| repeated string dependency = 3; |
| repeated int32 public_dependency = 10; |
| repeated int32 weak_dependency = 11; |
| repeated DescriptorProto message_type = 4; |
| repeated EnumDescriptorProto enum_type = 5; |
| repeated ServiceDescriptorProto service = 6; |
| repeated FieldDescriptorProto extension = 7; |
| optional FileOptions options = 8; |
| optional SourceCodeInfo source_code_info = 9; |
| } |
| |
| message DescriptorProto { |
| optional string name = 1; |
| repeated FieldDescriptorProto field = 2; |
| repeated FieldDescriptorProto extension = 6; |
| repeated DescriptorProto nested_type = 3; |
| repeated EnumDescriptorProto enum_type = 4; |
| message ExtensionRange { |
| optional int32 start = 1; |
| optional int32 end = 2; |
| } |
| repeated ExtensionRange extension_range = 5; |
| optional MessageOptions options = 7; |
| } |
| |
| message FieldDescriptorProto { |
| enum Type { |
| TYPE_DOUBLE = 1; |
| TYPE_FLOAT = 2; |
| TYPE_INT64 = 3; |
| TYPE_UINT64 = 4; |
| TYPE_INT32 = 5; |
| TYPE_FIXED64 = 6; |
| TYPE_FIXED32 = 7; |
| TYPE_BOOL = 8; |
| TYPE_STRING = 9; |
| TYPE_GROUP = 10; |
| TYPE_MESSAGE = 11; |
| TYPE_BYTES = 12; |
| TYPE_UINT32 = 13; |
| TYPE_ENUM = 14; |
| TYPE_SFIXED32 = 15; |
| TYPE_SFIXED64 = 16; |
| TYPE_SINT32 = 17; |
| TYPE_SINT64 = 18; |
| }; |
| enum Label { |
| LABEL_OPTIONAL = 1; |
| LABEL_REQUIRED = 2; |
| LABEL_REPEATED = 3; |
| }; |
| optional string name = 1; |
| optional int32 number = 3; |
| optional Label label = 4; |
| optional Type type = 5; |
| optional string type_name = 6; |
| optional string extendee = 2; |
| optional string default_value = 7; |
| optional FieldOptions options = 8; |
| } |
| |
| message EnumDescriptorProto { |
| optional string name = 1; |
| repeated EnumValueDescriptorProto value = 2; |
| optional EnumOptions options = 3; |
| } |
| |
| message EnumValueDescriptorProto { |
| optional string name = 1; |
| optional int32 number = 2; |
| optional EnumValueOptions options = 3; |
| } |
| |
| message ServiceDescriptorProto { |
| optional string name = 1; |
| repeated MethodDescriptorProto method = 2; |
| repeated StreamDescriptorProto stream = 4; |
| optional ServiceOptions options = 3; |
| } |
| |
| message MethodDescriptorProto { |
| optional string name = 1; |
| optional string input_type = 2; |
| optional string output_type = 3; |
| optional MethodOptions options = 4; |
| } |
| |
| message StreamDescriptorProto { |
| optional string name = 1; |
| optional string client_message_type = 2; |
| optional string server_message_type = 3; |
| optional StreamOptions options = 4; |
| } |
| |
| message FileOptions { |
| optional int32 cc_api_version = 2 [default=2]; |
| enum CompatibilityLevel { |
| NO_COMPATIBILITY = 0; |
| PROTO1_COMPATIBLE = 100; |
| DEPRECATED_PROTO1_COMPATIBLE = 50; |
| } |
| optional CompatibilityLevel cc_api_compatibility = 15 [default=NO_COMPATIBILITY]; |
| optional bool cc_proto_array_compatible = 22 [default=true]; |
| optional bool cc_utf8_verification = 24 [default=true]; |
| optional bool cc_proto1_text_format = 25 [default=false]; |
| optional string java_package = 1; |
| optional int32 py_api_version = 4 [default=2]; |
| optional int32 java_api_version = 5 [default=2]; |
| optional bool java_use_javaproto2 = 6 [default=true]; |
| optional bool java_java5_enums = 7 [default=true]; |
| optional bool java_generate_rpc_baseimpl = 13 [default=false]; |
| optional bool java_use_javastrings = 21 [default=false]; |
| optional string java_alt_api_package = 19; |
| optional string java_outer_classname = 8; |
| optional bool java_multiple_files = 10 [default=false]; |
| optional bool java_generate_equals_and_hash = 20 [default=false]; |
| enum OptimizeMode { |
| SPEED = 1; |
| CODE_SIZE = 2; |
| LITE_RUNTIME = 3; |
| } |
| optional OptimizeMode optimize_for = 9 [default=SPEED]; |
| optional string go_package = 11; |
| optional string javascript_package = 12; |
| optional int32 szl_api_version = 14 [default=1]; |
| optional bool java_generic_services = 17 [default=false]; |
| optional bool py_generic_services = 18 [default=false]; |
| optional bool deprecated = 23 [default=false]; |
| repeated UninterpretedOption uninterpreted_option = 999; |
| extensions 1000 to max; |
| } |
| |
| message MessageOptions { |
| optional bool message_set_wire_format = 1 [default=false]; |
| optional bool no_standard_descriptor_accessor = 2 [default=false]; |
| optional bool deprecated = 3 [default=false]; |
| repeated UninterpretedOption uninterpreted_option = 999; |
| extensions 1000 to max; |
| } |
| |
| message FieldOptions { |
| optional CType ctype = 1 [default = STRING]; |
| enum CType { |
| STRING = 0; |
| CORD = 1; |
| STRING_PIECE = 2; |
| } |
| optional bool packed = 2; |
| optional JType jtype = 4 [default = NORMAL]; |
| enum JType { |
| NORMAL = 0; |
| BYTES = 1; |
| } |
| optional JSType jstype = 6 [default = JS_NORMAL]; |
| enum JSType { |
| JS_NORMAL = 0; |
| JS_STRING = 1; |
| JS_NUMBER = 2; |
| } |
| optional bool lazy = 5 [default=false]; |
| optional bool deprecated = 3 [default=false]; |
| optional string experimental_map_key = 9; |
| optional bool weak = 10 [default=false]; |
| message UpgradedOption { |
| optional string name = 1; |
| optional string value = 2; |
| }; |
| repeated UpgradedOption upgraded_option = 11; |
| repeated UninterpretedOption uninterpreted_option = 999; |
| extensions 1000 to max; |
| } |
| |
| message EnumOptions { |
| optional string proto1_name = 1; |
| optional bool allow_alias = 2; |
| optional bool deprecated = 3 [default=false]; |
| repeated UninterpretedOption uninterpreted_option = 999; |
| extensions 1000 to max; |
| } |
| |
| message EnumValueOptions { |
| optional bool deprecated = 1 [default=false]; |
| repeated UninterpretedOption uninterpreted_option = 999; |
| extensions 1000 to max; |
| } |
| |
| message ServiceOptions { |
| optional bool multicast_stub = 20 [default=false]; |
| optional double failure_detection_delay = 16 [default=-1.0]; |
| optional bool deprecated = 33 [default=false]; |
| repeated UninterpretedOption uninterpreted_option = 999; |
| extensions 1000 to max; |
| } |
| |
| message MethodOptions { |
| enum Protocol { |
| TCP = 0; |
| UDP = 1; |
| } |
| enum SecurityLevel { |
| NONE = 0; |
| INTEGRITY = 1; |
| PRIVACY_AND_INTEGRITY = 2; |
| STRONG_PRIVACY_AND_INTEGRITY = 3; |
| } |
| enum Format { |
| UNCOMPRESSED = 0; |
| ZIPPY_COMPRESSED = 1; |
| } |
| optional double deadline = 8 [default=-1.0]; |
| optional bool duplicate_suppression = 9 [default=false]; |
| optional bool fail_fast = 10 [default=false]; |
| optional sint32 client_logging = 11 [default=256]; |
| optional sint32 server_logging = 12 [default=256]; |
| optional SecurityLevel security_level = 13 [default=NONE]; |
| optional Format response_format = 15 [default=UNCOMPRESSED]; |
| optional Format request_format = 17 [default=UNCOMPRESSED]; |
| optional string stream_type = 18; |
| optional bool deprecated = 33 [default=false]; |
| repeated UninterpretedOption uninterpreted_option = 999; |
| extensions 1000 to max; |
| } |
| |
| message StreamOptions { |
| enum TokenUnit { |
| MESSAGE = 0; |
| BYTE = 1; |
| } |
| optional int64 client_initial_tokens = 1 [default=-1]; |
| optional int64 server_initial_tokens = 2 [default=-1]; |
| optional TokenUnit token_unit = 3 [default=MESSAGE]; |
| optional MethodOptions.SecurityLevel security_level = 4 [default=NONE]; |
| optional string security_label = 5; |
| optional int32 client_logging = 6 [default=256]; |
| optional int32 server_logging = 7 [default=256]; |
| optional bool deprecated = 33 [default=false]; |
| repeated UninterpretedOption uninterpreted_option = 999; |
| extensions 1000 to max; |
| } |
| |
| message UninterpretedOption { |
| message NamePart { |
| required string name_part = 1; |
| required bool is_extension = 2; |
| } |
| repeated NamePart name = 2; |
| optional string identifier_value = 3; |
| optional uint64 positive_int_value = 4; |
| optional int64 negative_int_value = 5; |
| optional double double_value = 6; |
| optional bytes string_value = 7; |
| optional string aggregate_value = 8; |
| } |
| |
| message SourceCodeInfo { |
| repeated Location location = 1; |
| message Location { |
| repeated int32 path = 1 [packed=true]; |
| repeated int32 span = 2 [packed=true]; |
| optional string leading_comments = 3; |
| optional string trailing_comments = 4; |
| } |
| } |