From 18e0a2e5ec883d665a4e8fe57a1eb3e603340de7 Mon Sep 17 00:00:00 2001 From: Jon Skeet Date: Thu, 1 Oct 2015 10:38:01 +0100 Subject: Generated code from previous commit. --- .../Reflection/DescriptorProtoFile.cs | 641 +++++++++++++++++++++ 1 file changed, 641 insertions(+) (limited to 'csharp/src/Google.Protobuf/Reflection') diff --git a/csharp/src/Google.Protobuf/Reflection/DescriptorProtoFile.cs b/csharp/src/Google.Protobuf/Reflection/DescriptorProtoFile.cs index 410df3c5..1e6a77ab 100644 --- a/csharp/src/Google.Protobuf/Reflection/DescriptorProtoFile.cs +++ b/csharp/src/Google.Protobuf/Reflection/DescriptorProtoFile.cs @@ -162,6 +162,10 @@ namespace Google.Protobuf.Reflection { } #region Messages + /// + /// The protocol compiler can output a FileDescriptorSet containing the .proto + /// files it parses. + /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] internal sealed partial class FileDescriptorSet : pb::IMessage { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new FileDescriptorSet()); @@ -189,6 +193,7 @@ namespace Google.Protobuf.Reflection { return new FileDescriptorSet(this); } + /// Field number for the "file" field. public const int FileFieldNumber = 1; private static readonly pb::FieldCodec _repeated_file_codec = pb::FieldCodec.ForMessage(10, global::Google.Protobuf.Reflection.FileDescriptorProto.Parser); @@ -256,6 +261,9 @@ namespace Google.Protobuf.Reflection { } + /// + /// Describes a complete .proto file. + /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] internal sealed partial class FileDescriptorProto : pb::IMessage { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new FileDescriptorProto()); @@ -294,8 +302,12 @@ namespace Google.Protobuf.Reflection { return new FileDescriptorProto(this); } + /// Field number for the "name" field. public const int NameFieldNumber = 1; private string name_ = ""; + /// + /// file name, relative to root of source tree + /// public string Name { get { return name_; } set { @@ -303,8 +315,12 @@ namespace Google.Protobuf.Reflection { } } + /// Field number for the "package" field. public const int PackageFieldNumber = 2; private string package_ = ""; + /// + /// e.g. "foo", "foo.bar", etc. + /// public string Package { get { return package_; } set { @@ -312,38 +328,56 @@ namespace Google.Protobuf.Reflection { } } + /// Field number for the "dependency" field. public const int DependencyFieldNumber = 3; private static readonly pb::FieldCodec _repeated_dependency_codec = pb::FieldCodec.ForString(26); private readonly pbc::RepeatedField dependency_ = new pbc::RepeatedField(); + /// + /// Names of files imported by this file. + /// public pbc::RepeatedField Dependency { get { return dependency_; } } + /// Field number for the "public_dependency" field. public const int PublicDependencyFieldNumber = 10; private static readonly pb::FieldCodec _repeated_publicDependency_codec = pb::FieldCodec.ForInt32(80); private readonly pbc::RepeatedField publicDependency_ = new pbc::RepeatedField(); + /// + /// Indexes of the public imported files in the dependency list above. + /// public pbc::RepeatedField PublicDependency { get { return publicDependency_; } } + /// Field number for the "weak_dependency" field. public const int WeakDependencyFieldNumber = 11; private static readonly pb::FieldCodec _repeated_weakDependency_codec = pb::FieldCodec.ForInt32(88); private readonly pbc::RepeatedField weakDependency_ = new pbc::RepeatedField(); + /// + /// Indexes of the weak imported files in the dependency list. + /// For Google-internal migration only. Do not use. + /// public pbc::RepeatedField WeakDependency { get { return weakDependency_; } } + /// Field number for the "message_type" field. public const int MessageTypeFieldNumber = 4; private static readonly pb::FieldCodec _repeated_messageType_codec = pb::FieldCodec.ForMessage(34, global::Google.Protobuf.Reflection.DescriptorProto.Parser); private readonly pbc::RepeatedField messageType_ = new pbc::RepeatedField(); + /// + /// All top-level definitions in this file. + /// public pbc::RepeatedField MessageType { get { return messageType_; } } + /// Field number for the "enum_type" field. public const int EnumTypeFieldNumber = 5; private static readonly pb::FieldCodec _repeated_enumType_codec = pb::FieldCodec.ForMessage(42, global::Google.Protobuf.Reflection.EnumDescriptorProto.Parser); @@ -352,6 +386,7 @@ namespace Google.Protobuf.Reflection { get { return enumType_; } } + /// Field number for the "service" field. public const int ServiceFieldNumber = 6; private static readonly pb::FieldCodec _repeated_service_codec = pb::FieldCodec.ForMessage(50, global::Google.Protobuf.Reflection.ServiceDescriptorProto.Parser); @@ -360,6 +395,7 @@ namespace Google.Protobuf.Reflection { get { return service_; } } + /// Field number for the "extension" field. public const int ExtensionFieldNumber = 7; private static readonly pb::FieldCodec _repeated_extension_codec = pb::FieldCodec.ForMessage(58, global::Google.Protobuf.Reflection.FieldDescriptorProto.Parser); @@ -368,6 +404,7 @@ namespace Google.Protobuf.Reflection { get { return extension_; } } + /// Field number for the "options" field. public const int OptionsFieldNumber = 8; private global::Google.Protobuf.Reflection.FileOptions options_; public global::Google.Protobuf.Reflection.FileOptions Options { @@ -377,8 +414,15 @@ namespace Google.Protobuf.Reflection { } } + /// Field number for the "source_code_info" field. public const int SourceCodeInfoFieldNumber = 9; private global::Google.Protobuf.Reflection.SourceCodeInfo sourceCodeInfo_; + /// + /// This field contains optional information about the original source code. + /// You may safely remove this entire field without harming runtime + /// functionality of the descriptors -- the information is needed only by + /// development tools. + /// public global::Google.Protobuf.Reflection.SourceCodeInfo SourceCodeInfo { get { return sourceCodeInfo_; } set { @@ -386,8 +430,13 @@ namespace Google.Protobuf.Reflection { } } + /// Field number for the "syntax" field. public const int SyntaxFieldNumber = 12; private string syntax_ = ""; + /// + /// The syntax of the proto file. + /// The supported values are "proto2" and "proto3". + /// public string Syntax { get { return syntax_; } set { @@ -602,6 +651,9 @@ namespace Google.Protobuf.Reflection { } + /// + /// Describes a message type. + /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] internal sealed partial class DescriptorProto : pb::IMessage { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new DescriptorProto()); @@ -638,6 +690,7 @@ namespace Google.Protobuf.Reflection { return new DescriptorProto(this); } + /// Field number for the "name" field. public const int NameFieldNumber = 1; private string name_ = ""; public string Name { @@ -647,6 +700,7 @@ namespace Google.Protobuf.Reflection { } } + /// Field number for the "field" field. public const int FieldFieldNumber = 2; private static readonly pb::FieldCodec _repeated_field_codec = pb::FieldCodec.ForMessage(18, global::Google.Protobuf.Reflection.FieldDescriptorProto.Parser); @@ -655,6 +709,7 @@ namespace Google.Protobuf.Reflection { get { return field_; } } + /// Field number for the "extension" field. public const int ExtensionFieldNumber = 6; private static readonly pb::FieldCodec _repeated_extension_codec = pb::FieldCodec.ForMessage(50, global::Google.Protobuf.Reflection.FieldDescriptorProto.Parser); @@ -663,6 +718,7 @@ namespace Google.Protobuf.Reflection { get { return extension_; } } + /// Field number for the "nested_type" field. public const int NestedTypeFieldNumber = 3; private static readonly pb::FieldCodec _repeated_nestedType_codec = pb::FieldCodec.ForMessage(26, global::Google.Protobuf.Reflection.DescriptorProto.Parser); @@ -671,6 +727,7 @@ namespace Google.Protobuf.Reflection { get { return nestedType_; } } + /// Field number for the "enum_type" field. public const int EnumTypeFieldNumber = 4; private static readonly pb::FieldCodec _repeated_enumType_codec = pb::FieldCodec.ForMessage(34, global::Google.Protobuf.Reflection.EnumDescriptorProto.Parser); @@ -679,6 +736,7 @@ namespace Google.Protobuf.Reflection { get { return enumType_; } } + /// Field number for the "extension_range" field. public const int ExtensionRangeFieldNumber = 5; private static readonly pb::FieldCodec _repeated_extensionRange_codec = pb::FieldCodec.ForMessage(42, global::Google.Protobuf.Reflection.DescriptorProto.Types.ExtensionRange.Parser); @@ -687,6 +745,7 @@ namespace Google.Protobuf.Reflection { get { return extensionRange_; } } + /// Field number for the "oneof_decl" field. public const int OneofDeclFieldNumber = 8; private static readonly pb::FieldCodec _repeated_oneofDecl_codec = pb::FieldCodec.ForMessage(66, global::Google.Protobuf.Reflection.OneofDescriptorProto.Parser); @@ -695,6 +754,7 @@ namespace Google.Protobuf.Reflection { get { return oneofDecl_; } } + /// Field number for the "options" field. public const int OptionsFieldNumber = 7; private global::Google.Protobuf.Reflection.MessageOptions options_; public global::Google.Protobuf.Reflection.MessageOptions Options { @@ -704,6 +764,7 @@ namespace Google.Protobuf.Reflection { } } + /// Field number for the "reserved_range" field. public const int ReservedRangeFieldNumber = 9; private static readonly pb::FieldCodec _repeated_reservedRange_codec = pb::FieldCodec.ForMessage(74, global::Google.Protobuf.Reflection.DescriptorProto.Types.ReservedRange.Parser); @@ -712,10 +773,15 @@ namespace Google.Protobuf.Reflection { get { return reservedRange_; } } + /// Field number for the "reserved_name" field. public const int ReservedNameFieldNumber = 10; private static readonly pb::FieldCodec _repeated_reservedName_codec = pb::FieldCodec.ForString(82); private readonly pbc::RepeatedField reservedName_ = new pbc::RepeatedField(); + /// + /// Reserved field names, which may not be used by fields in the same message. + /// A given name may only be reserved once. + /// public pbc::RepeatedField ReservedName { get { return reservedName_; } } @@ -910,6 +976,7 @@ namespace Google.Protobuf.Reflection { return new ExtensionRange(this); } + /// Field number for the "start" field. public const int StartFieldNumber = 1; private int start_; public int Start { @@ -919,6 +986,7 @@ namespace Google.Protobuf.Reflection { } } + /// Field number for the "end" field. public const int EndFieldNumber = 2; private int end_; public int End { @@ -1010,6 +1078,11 @@ namespace Google.Protobuf.Reflection { } + /// + /// Range of reserved tag numbers. Reserved tag numbers may not be used by + /// fields or extension ranges in the same message. Reserved ranges may + /// not overlap. + /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] internal sealed partial class ReservedRange : pb::IMessage { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ReservedRange()); @@ -1038,8 +1111,12 @@ namespace Google.Protobuf.Reflection { return new ReservedRange(this); } + /// Field number for the "start" field. public const int StartFieldNumber = 1; private int start_; + /// + /// Inclusive. + /// public int Start { get { return start_; } set { @@ -1047,8 +1124,12 @@ namespace Google.Protobuf.Reflection { } } + /// Field number for the "end" field. public const int EndFieldNumber = 2; private int end_; + /// + /// Exclusive. + /// public int End { get { return end_; } set { @@ -1143,6 +1224,9 @@ namespace Google.Protobuf.Reflection { } + /// + /// Describes a field within a message. + /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] internal sealed partial class FieldDescriptorProto : pb::IMessage { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new FieldDescriptorProto()); @@ -1178,6 +1262,7 @@ namespace Google.Protobuf.Reflection { return new FieldDescriptorProto(this); } + /// Field number for the "name" field. public const int NameFieldNumber = 1; private string name_ = ""; public string Name { @@ -1187,6 +1272,7 @@ namespace Google.Protobuf.Reflection { } } + /// Field number for the "number" field. public const int NumberFieldNumber = 3; private int number_; public int Number { @@ -1196,6 +1282,7 @@ namespace Google.Protobuf.Reflection { } } + /// Field number for the "label" field. public const int LabelFieldNumber = 4; private global::Google.Protobuf.Reflection.FieldDescriptorProto.Types.Label label_ = global::Google.Protobuf.Reflection.FieldDescriptorProto.Types.Label.LABEL_OPTIONAL; public global::Google.Protobuf.Reflection.FieldDescriptorProto.Types.Label Label { @@ -1205,8 +1292,13 @@ namespace Google.Protobuf.Reflection { } } + /// Field number for the "type" field. public const int TypeFieldNumber = 5; private global::Google.Protobuf.Reflection.FieldDescriptorProto.Types.Type type_ = global::Google.Protobuf.Reflection.FieldDescriptorProto.Types.Type.TYPE_DOUBLE; + /// + /// If type_name is set, this need not be set. If both this and type_name + /// are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. + /// public global::Google.Protobuf.Reflection.FieldDescriptorProto.Types.Type Type { get { return type_; } set { @@ -1214,8 +1306,16 @@ namespace Google.Protobuf.Reflection { } } + /// Field number for the "type_name" field. public const int TypeNameFieldNumber = 6; private string typeName_ = ""; + /// + /// For message and enum types, this is the name of the type. If the name + /// starts with a '.', it is fully-qualified. Otherwise, C++-like scoping + /// rules are used to find the type (i.e. first the nested types within this + /// message are searched, then within the parent, on up to the root + /// namespace). + /// public string TypeName { get { return typeName_; } set { @@ -1223,8 +1323,13 @@ namespace Google.Protobuf.Reflection { } } + /// Field number for the "extendee" field. public const int ExtendeeFieldNumber = 2; private string extendee_ = ""; + /// + /// For extensions, this is the name of the type being extended. It is + /// resolved in the same manner as type_name. + /// public string Extendee { get { return extendee_; } set { @@ -1232,8 +1337,16 @@ namespace Google.Protobuf.Reflection { } } + /// Field number for the "default_value" field. public const int DefaultValueFieldNumber = 7; private string defaultValue_ = ""; + /// + /// For numeric types, contains the original text representation of the value. + /// For booleans, "true" or "false". + /// For strings, contains the default text contents (not escaped in any way). + /// For bytes, contains the C escaped value. All bytes >= 128 are escaped. + /// TODO(kenton): Base-64 encode? + /// public string DefaultValue { get { return defaultValue_; } set { @@ -1241,8 +1354,13 @@ namespace Google.Protobuf.Reflection { } } + /// Field number for the "oneof_index" field. public const int OneofIndexFieldNumber = 9; private int oneofIndex_; + /// + /// If set, gives the index of a oneof in the containing type's oneof_decl + /// list. This field is a member of that oneof. + /// public int OneofIndex { get { return oneofIndex_; } set { @@ -1250,6 +1368,7 @@ namespace Google.Protobuf.Reflection { } } + /// Field number for the "options" field. public const int OptionsFieldNumber = 8; private global::Google.Protobuf.Reflection.FieldOptions options_; public global::Google.Protobuf.Reflection.FieldOptions Options { @@ -1462,29 +1581,62 @@ namespace Google.Protobuf.Reflection { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public static partial class Types { internal enum Type { + /// + /// 0 is reserved for errors. + /// Order is weird for historical reasons. + /// TYPE_DOUBLE = 1, TYPE_FLOAT = 2, + /// + /// Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if + /// negative values are likely. + /// TYPE_INT64 = 3, TYPE_UINT64 = 4, + /// + /// Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if + /// negative values are likely. + /// TYPE_INT32 = 5, TYPE_FIXED64 = 6, TYPE_FIXED32 = 7, TYPE_BOOL = 8, TYPE_STRING = 9, + /// + /// Tag-delimited aggregate. + /// TYPE_GROUP = 10, + /// + /// Length-delimited aggregate. + /// TYPE_MESSAGE = 11, + /// + /// New in version 2. + /// TYPE_BYTES = 12, TYPE_UINT32 = 13, TYPE_ENUM = 14, TYPE_SFIXED32 = 15, TYPE_SFIXED64 = 16, + /// + /// Uses ZigZag encoding. + /// TYPE_SINT32 = 17, + /// + /// Uses ZigZag encoding. + /// TYPE_SINT64 = 18, } internal enum Label { + /// + /// 0 is reserved for errors + /// LABEL_OPTIONAL = 1, LABEL_REQUIRED = 2, + /// + /// TODO(sanjay): Should we add LABEL_MAP? + /// LABEL_REPEATED = 3, } @@ -1493,6 +1645,9 @@ namespace Google.Protobuf.Reflection { } + /// + /// Describes a oneof. + /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] internal sealed partial class OneofDescriptorProto : pb::IMessage { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new OneofDescriptorProto()); @@ -1520,6 +1675,7 @@ namespace Google.Protobuf.Reflection { return new OneofDescriptorProto(this); } + /// Field number for the "name" field. public const int NameFieldNumber = 1; private string name_ = ""; public string Name { @@ -1595,6 +1751,9 @@ namespace Google.Protobuf.Reflection { } + /// + /// Describes an enum type. + /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] internal sealed partial class EnumDescriptorProto : pb::IMessage { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new EnumDescriptorProto()); @@ -1624,6 +1783,7 @@ namespace Google.Protobuf.Reflection { return new EnumDescriptorProto(this); } + /// Field number for the "name" field. public const int NameFieldNumber = 1; private string name_ = ""; public string Name { @@ -1633,6 +1793,7 @@ namespace Google.Protobuf.Reflection { } } + /// Field number for the "value" field. public const int ValueFieldNumber = 2; private static readonly pb::FieldCodec _repeated_value_codec = pb::FieldCodec.ForMessage(18, global::Google.Protobuf.Reflection.EnumValueDescriptorProto.Parser); @@ -1641,6 +1802,7 @@ namespace Google.Protobuf.Reflection { get { return value_; } } + /// Field number for the "options" field. public const int OptionsFieldNumber = 3; private global::Google.Protobuf.Reflection.EnumOptions options_; public global::Google.Protobuf.Reflection.EnumOptions Options { @@ -1747,6 +1909,9 @@ namespace Google.Protobuf.Reflection { } + /// + /// Describes a value within an enum. + /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] internal sealed partial class EnumValueDescriptorProto : pb::IMessage { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new EnumValueDescriptorProto()); @@ -1776,6 +1941,7 @@ namespace Google.Protobuf.Reflection { return new EnumValueDescriptorProto(this); } + /// Field number for the "name" field. public const int NameFieldNumber = 1; private string name_ = ""; public string Name { @@ -1785,6 +1951,7 @@ namespace Google.Protobuf.Reflection { } } + /// Field number for the "number" field. public const int NumberFieldNumber = 2; private int number_; public int Number { @@ -1794,6 +1961,7 @@ namespace Google.Protobuf.Reflection { } } + /// Field number for the "options" field. public const int OptionsFieldNumber = 3; private global::Google.Protobuf.Reflection.EnumValueOptions options_; public global::Google.Protobuf.Reflection.EnumValueOptions Options { @@ -1907,6 +2075,9 @@ namespace Google.Protobuf.Reflection { } + /// + /// Describes a service. + /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] internal sealed partial class ServiceDescriptorProto : pb::IMessage { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ServiceDescriptorProto()); @@ -1936,6 +2107,7 @@ namespace Google.Protobuf.Reflection { return new ServiceDescriptorProto(this); } + /// Field number for the "name" field. public const int NameFieldNumber = 1; private string name_ = ""; public string Name { @@ -1945,6 +2117,7 @@ namespace Google.Protobuf.Reflection { } } + /// Field number for the "method" field. public const int MethodFieldNumber = 2; private static readonly pb::FieldCodec _repeated_method_codec = pb::FieldCodec.ForMessage(18, global::Google.Protobuf.Reflection.MethodDescriptorProto.Parser); @@ -1953,6 +2126,7 @@ namespace Google.Protobuf.Reflection { get { return method_; } } + /// Field number for the "options" field. public const int OptionsFieldNumber = 3; private global::Google.Protobuf.Reflection.ServiceOptions options_; public global::Google.Protobuf.Reflection.ServiceOptions Options { @@ -2059,6 +2233,9 @@ namespace Google.Protobuf.Reflection { } + /// + /// Describes a method of a service. + /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] internal sealed partial class MethodDescriptorProto : pb::IMessage { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new MethodDescriptorProto()); @@ -2091,6 +2268,7 @@ namespace Google.Protobuf.Reflection { return new MethodDescriptorProto(this); } + /// Field number for the "name" field. public const int NameFieldNumber = 1; private string name_ = ""; public string Name { @@ -2100,8 +2278,13 @@ namespace Google.Protobuf.Reflection { } } + /// Field number for the "input_type" field. public const int InputTypeFieldNumber = 2; private string inputType_ = ""; + /// + /// Input and output type names. These are resolved in the same way as + /// FieldDescriptorProto.type_name, but must refer to a message type. + /// public string InputType { get { return inputType_; } set { @@ -2109,6 +2292,7 @@ namespace Google.Protobuf.Reflection { } } + /// Field number for the "output_type" field. public const int OutputTypeFieldNumber = 3; private string outputType_ = ""; public string OutputType { @@ -2118,6 +2302,7 @@ namespace Google.Protobuf.Reflection { } } + /// Field number for the "options" field. public const int OptionsFieldNumber = 4; private global::Google.Protobuf.Reflection.MethodOptions options_; public global::Google.Protobuf.Reflection.MethodOptions Options { @@ -2127,8 +2312,12 @@ namespace Google.Protobuf.Reflection { } } + /// Field number for the "client_streaming" field. public const int ClientStreamingFieldNumber = 5; private bool clientStreaming_; + /// + /// Identifies if client streams multiple client messages + /// public bool ClientStreaming { get { return clientStreaming_; } set { @@ -2136,8 +2325,12 @@ namespace Google.Protobuf.Reflection { } } + /// Field number for the "server_streaming" field. public const int ServerStreamingFieldNumber = 6; private bool serverStreaming_; + /// + /// Identifies if server streams multiple server messages + /// public bool ServerStreaming { get { return serverStreaming_; } set { @@ -2339,8 +2532,15 @@ namespace Google.Protobuf.Reflection { return new FileOptions(this); } + /// Field number for the "java_package" field. public const int JavaPackageFieldNumber = 1; private string javaPackage_ = ""; + /// + /// Sets the Java package where classes generated from this .proto will be + /// placed. By default, the proto package is used, but this is often + /// inappropriate because proto packages do not normally start with backwards + /// domain names. + /// public string JavaPackage { get { return javaPackage_; } set { @@ -2348,8 +2548,16 @@ namespace Google.Protobuf.Reflection { } } + /// Field number for the "java_outer_classname" field. public const int JavaOuterClassnameFieldNumber = 8; private string javaOuterClassname_ = ""; + /// + /// If set, all the classes from the .proto file are wrapped in a single + /// outer class with the given name. This applies to both Proto1 + /// (equivalent to the old "--one_java_file" option) and Proto2 (where + /// a .proto always translates to a single class, but you may want to + /// explicitly choose the class name). + /// public string JavaOuterClassname { get { return javaOuterClassname_; } set { @@ -2357,8 +2565,17 @@ namespace Google.Protobuf.Reflection { } } + /// Field number for the "java_multiple_files" field. public const int JavaMultipleFilesFieldNumber = 10; private bool javaMultipleFiles_; + /// + /// If set true, then the Java code generator will generate a separate .java + /// file for each top-level message, enum, and service defined in the .proto + /// file. Thus, these types will *not* be nested inside the outer class + /// named by java_outer_classname. However, the outer class will still be + /// generated to contain the file's getDescriptor() method as well as any + /// top-level extensions defined in the file. + /// public bool JavaMultipleFiles { get { return javaMultipleFiles_; } set { @@ -2366,8 +2583,23 @@ namespace Google.Protobuf.Reflection { } } + /// Field number for the "java_generate_equals_and_hash" field. public const int JavaGenerateEqualsAndHashFieldNumber = 20; private bool javaGenerateEqualsAndHash_; + /// + /// If set true, then the Java code generator will generate equals() and + /// hashCode() methods for all messages defined in the .proto file. + /// This increases generated code size, potentially substantially for large + /// protos, which may harm a memory-constrained application. + /// - In the full runtime this is a speed optimization, as the + /// AbstractMessage base class includes reflection-based implementations of + /// these methods. + /// - In the lite runtime, setting this option changes the semantics of + /// equals() and hashCode() to more closely match those of the full runtime; + /// the generated methods compute their results based on field values rather + /// than object identity. (Implementations should not assume that hashcodes + /// will be consistent across runtimes or versions of the protocol compiler.) + /// public bool JavaGenerateEqualsAndHash { get { return javaGenerateEqualsAndHash_; } set { @@ -2375,8 +2607,17 @@ namespace Google.Protobuf.Reflection { } } + /// Field number for the "java_string_check_utf8" field. public const int JavaStringCheckUtf8FieldNumber = 27; private bool javaStringCheckUtf8_; + /// + /// If set true, then the Java2 code generator will generate code that + /// throws an exception whenever an attempt is made to assign a non-UTF-8 + /// byte sequence to a string field. + /// Message reflection will do the same. + /// However, an extension field still accepts non-UTF-8 byte sequences. + /// This option has no effect on when used with the lite runtime. + /// public bool JavaStringCheckUtf8 { get { return javaStringCheckUtf8_; } set { @@ -2384,6 +2625,7 @@ namespace Google.Protobuf.Reflection { } } + /// Field number for the "optimize_for" field. public const int OptimizeForFieldNumber = 9; private global::Google.Protobuf.Reflection.FileOptions.Types.OptimizeMode optimizeFor_ = global::Google.Protobuf.Reflection.FileOptions.Types.OptimizeMode.SPEED; public global::Google.Protobuf.Reflection.FileOptions.Types.OptimizeMode OptimizeFor { @@ -2393,8 +2635,16 @@ namespace Google.Protobuf.Reflection { } } + /// Field number for the "go_package" field. public const int GoPackageFieldNumber = 11; private string goPackage_ = ""; + /// + /// Sets the Go package where structs generated from this .proto will be + /// placed. If omitted, the Go package will be derived from the following: + /// - The basename of the package import path, if provided. + /// - Otherwise, the package statement in the .proto file, if present. + /// - Otherwise, the basename of the .proto file, without extension. + /// public string GoPackage { get { return goPackage_; } set { @@ -2402,8 +2652,20 @@ namespace Google.Protobuf.Reflection { } } + /// Field number for the "cc_generic_services" field. public const int CcGenericServicesFieldNumber = 16; private bool ccGenericServices_; + /// + /// Should generic services be generated in each language? "Generic" services + /// are not specific to any particular RPC system. They are generated by the + /// main code generators in each language (without additional plugins). + /// Generic services were the only kind of service generation supported by + /// early versions of google.protobuf. + /// Generic services are now considered deprecated in favor of using plugins + /// that generate code specific to your particular RPC system. Therefore, + /// these default to false. Old code which depends on generic services should + /// explicitly set them to true. + /// public bool CcGenericServices { get { return ccGenericServices_; } set { @@ -2411,6 +2673,7 @@ namespace Google.Protobuf.Reflection { } } + /// Field number for the "java_generic_services" field. public const int JavaGenericServicesFieldNumber = 17; private bool javaGenericServices_; public bool JavaGenericServices { @@ -2420,6 +2683,7 @@ namespace Google.Protobuf.Reflection { } } + /// Field number for the "py_generic_services" field. public const int PyGenericServicesFieldNumber = 18; private bool pyGenericServices_; public bool PyGenericServices { @@ -2429,8 +2693,15 @@ namespace Google.Protobuf.Reflection { } } + /// Field number for the "deprecated" field. public const int DeprecatedFieldNumber = 23; private bool deprecated_; + /// + /// Is this file deprecated? + /// Depending on the target platform, this can emit Deprecated annotations + /// for everything in the file, or it will be completely ignored; in the very + /// least, this is a formalization for deprecating files. + /// public bool Deprecated { get { return deprecated_; } set { @@ -2438,8 +2709,13 @@ namespace Google.Protobuf.Reflection { } } + /// Field number for the "cc_enable_arenas" field. public const int CcEnableArenasFieldNumber = 31; private bool ccEnableArenas_; + /// + /// Enables the use of arenas for the proto messages in this file. This applies + /// only to generated classes for C++. + /// public bool CcEnableArenas { get { return ccEnableArenas_; } set { @@ -2447,8 +2723,13 @@ namespace Google.Protobuf.Reflection { } } + /// Field number for the "objc_class_prefix" field. public const int ObjcClassPrefixFieldNumber = 36; private string objcClassPrefix_ = ""; + /// + /// Sets the objective c class prefix which is prepended to all objective c + /// generated classes from this .proto. There is no default. + /// public string ObjcClassPrefix { get { return objcClassPrefix_; } set { @@ -2456,8 +2737,12 @@ namespace Google.Protobuf.Reflection { } } + /// Field number for the "csharp_namespace" field. public const int CsharpNamespaceFieldNumber = 37; private string csharpNamespace_ = ""; + /// + /// Namespace for generated classes; defaults to the package. + /// public string CsharpNamespace { get { return csharpNamespace_; } set { @@ -2465,8 +2750,13 @@ namespace Google.Protobuf.Reflection { } } + /// Field number for the "javanano_use_deprecated_package" field. public const int JavananoUseDeprecatedPackageFieldNumber = 38; private bool javananoUseDeprecatedPackage_; + /// + /// Whether the nano proto compiler should generate in the deprecated non-nano + /// suffixed package. + /// public bool JavananoUseDeprecatedPackage { get { return javananoUseDeprecatedPackage_; } set { @@ -2474,10 +2764,14 @@ namespace Google.Protobuf.Reflection { } } + /// Field number for the "uninterpreted_option" field. public const int UninterpretedOptionFieldNumber = 999; private static readonly pb::FieldCodec _repeated_uninterpretedOption_codec = pb::FieldCodec.ForMessage(7994, global::Google.Protobuf.Reflection.UninterpretedOption.Parser); private readonly pbc::RepeatedField uninterpretedOption_ = new pbc::RepeatedField(); + /// + /// The parser stores options it doesn't recognize here. See above. + /// public pbc::RepeatedField UninterpretedOption { get { return uninterpretedOption_; } } @@ -2783,9 +3077,21 @@ namespace Google.Protobuf.Reflection { /// Container for nested types declared in the FileOptions message type. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public static partial class Types { + /// + /// Generated classes can be optimized for speed or code size. + /// internal enum OptimizeMode { + /// + /// Generate complete code for parsing, serialization, + /// SPEED = 1, + /// + /// etc. + /// CODE_SIZE = 2, + /// + /// Generate code using MessageLite and the lite runtime. + /// LITE_RUNTIME = 3, } @@ -2825,8 +3131,26 @@ namespace Google.Protobuf.Reflection { return new MessageOptions(this); } + /// Field number for the "message_set_wire_format" field. public const int MessageSetWireFormatFieldNumber = 1; private bool messageSetWireFormat_; + /// + /// Set true to use the old proto1 MessageSet wire format for extensions. + /// This is provided for backwards-compatibility with the MessageSet wire + /// format. You should not use this for any other reason: It's less + /// efficient, has fewer features, and is more complicated. + /// The message must be defined exactly as follows: + /// message Foo { + /// option message_set_wire_format = true; + /// extensions 4 to max; + /// } + /// Note that the message cannot have any defined fields; MessageSets only + /// have extensions. + /// All extensions of your type must be singular messages; e.g. they cannot + /// be int32s, enums, or repeated messages. + /// Because this is an option, the above two restrictions are not enforced by + /// the protocol compiler. + /// public bool MessageSetWireFormat { get { return messageSetWireFormat_; } set { @@ -2834,8 +3158,14 @@ namespace Google.Protobuf.Reflection { } } + /// Field number for the "no_standard_descriptor_accessor" field. public const int NoStandardDescriptorAccessorFieldNumber = 2; private bool noStandardDescriptorAccessor_; + /// + /// Disables the generation of the standard "descriptor()" accessor, which can + /// conflict with a field of the same name. This is meant to make migration + /// from proto1 easier; new code should avoid fields named "descriptor". + /// public bool NoStandardDescriptorAccessor { get { return noStandardDescriptorAccessor_; } set { @@ -2843,8 +3173,15 @@ namespace Google.Protobuf.Reflection { } } + /// Field number for the "deprecated" field. public const int DeprecatedFieldNumber = 3; private bool deprecated_; + /// + /// Is this message deprecated? + /// Depending on the target platform, this can emit Deprecated annotations + /// for the message, or it will be completely ignored; in the very least, + /// this is a formalization for deprecating messages. + /// public bool Deprecated { get { return deprecated_; } set { @@ -2852,8 +3189,29 @@ namespace Google.Protobuf.Reflection { } } + /// Field number for the "map_entry" field. public const int MapEntryFieldNumber = 7; private bool mapEntry_; + /// + /// Whether the message is an automatically generated map entry type for the + /// maps field. + /// For maps fields: + /// map<KeyType, ValueType> map_field = 1; + /// The parsed descriptor looks like: + /// message MapFieldEntry { + /// option map_entry = true; + /// optional KeyType key = 1; + /// optional ValueType value = 2; + /// } + /// repeated MapFieldEntry map_field = 1; + /// Implementations may choose not to generate the map_entry=true message, but + /// use a native map in the target language to hold the keys and values. + /// The reflection APIs in such implementions still need to work as + /// if the field is a repeated message field. + /// NOTE: Do not set the option in .proto files. Always use the maps syntax + /// instead. The option should only be implicitly set by the proto compiler + /// parser. + /// public bool MapEntry { get { return mapEntry_; } set { @@ -2861,10 +3219,14 @@ namespace Google.Protobuf.Reflection { } } + /// Field number for the "uninterpreted_option" field. public const int UninterpretedOptionFieldNumber = 999; private static readonly pb::FieldCodec _repeated_uninterpretedOption_codec = pb::FieldCodec.ForMessage(7994, global::Google.Protobuf.Reflection.UninterpretedOption.Parser); private readonly pbc::RepeatedField uninterpretedOption_ = new pbc::RepeatedField(); + /// + /// The parser stores options it doesn't recognize here. See above. + /// public pbc::RepeatedField UninterpretedOption { get { return uninterpretedOption_; } } @@ -3025,8 +3387,15 @@ namespace Google.Protobuf.Reflection { return new FieldOptions(this); } + /// Field number for the "ctype" field. public const int CtypeFieldNumber = 1; private global::Google.Protobuf.Reflection.FieldOptions.Types.CType ctype_ = global::Google.Protobuf.Reflection.FieldOptions.Types.CType.STRING; + /// + /// The ctype option instructs the C++ code generator to use a different + /// representation of the field than it normally would. See the specific + /// options below. This option is not yet implemented in the open source + /// release -- sorry, we'll try to include it in a future version! + /// public global::Google.Protobuf.Reflection.FieldOptions.Types.CType Ctype { get { return ctype_; } set { @@ -3034,8 +3403,16 @@ namespace Google.Protobuf.Reflection { } } + /// Field number for the "packed" field. public const int PackedFieldNumber = 2; private bool packed_; + /// + /// The packed option can be enabled for repeated primitive fields to enable + /// a more efficient representation on the wire. Rather than repeatedly + /// writing the tag and type for each element, the entire array is encoded as + /// a single length-delimited blob. In proto3, only explicit setting it to + /// false will avoid using packed encoding. + /// public bool Packed { get { return packed_; } set { @@ -3043,8 +3420,20 @@ namespace Google.Protobuf.Reflection { } } + /// Field number for the "jstype" field. public const int JstypeFieldNumber = 6; private global::Google.Protobuf.Reflection.FieldOptions.Types.JSType jstype_ = global::Google.Protobuf.Reflection.FieldOptions.Types.JSType.JS_NORMAL; + /// + /// The jstype option determines the JavaScript type used for values of the + /// field. The option is permitted only for 64 bit integral and fixed types + /// (int64, uint64, sint64, fixed64, sfixed64). By default these types are + /// represented as JavaScript strings. This avoids loss of precision that can + /// happen when a large value is converted to a floating point JavaScript + /// numbers. Specifying JS_NUMBER for the jstype causes the generated + /// JavaScript code to use the JavaScript "number" type instead of strings. + /// This option is an enum to permit additional types to be added, + /// e.g. goog.math.Integer. + /// public global::Google.Protobuf.Reflection.FieldOptions.Types.JSType Jstype { get { return jstype_; } set { @@ -3052,8 +3441,35 @@ namespace Google.Protobuf.Reflection { } } + /// Field number for the "lazy" field. public const int LazyFieldNumber = 5; private bool lazy_; + /// + /// Should this field be parsed lazily? Lazy applies only to message-type + /// fields. It means that when the outer message is initially parsed, the + /// inner message's contents will not be parsed but instead stored in encoded + /// form. The inner message will actually be parsed when it is first accessed. + /// This is only a hint. Implementations are free to choose whether to use + /// eager or lazy parsing regardless of the value of this option. However, + /// setting this option true suggests that the protocol author believes that + /// using lazy parsing on this field is worth the additional bookkeeping + /// overhead typically needed to implement it. + /// This option does not affect the public interface of any generated code; + /// all method signatures remain the same. Furthermore, thread-safety of the + /// interface is not affected by this option; const methods remain safe to + /// call from multiple threads concurrently, while non-const methods continue + /// to require exclusive access. + /// Note that implementations may choose not to check required fields within + /// a lazy sub-message. That is, calling IsInitialized() on the outher message + /// may return true even if the inner message has missing required fields. + /// This is necessary because otherwise the inner message would have to be + /// parsed in order to perform the check, defeating the purpose of lazy + /// parsing. An implementation which chooses not to check required fields + /// must be consistent about it. That is, for any particular sub-message, the + /// implementation must either *always* check its required fields, or *never* + /// check its required fields, regardless of whether or not the message has + /// been parsed. + /// public bool Lazy { get { return lazy_; } set { @@ -3061,8 +3477,15 @@ namespace Google.Protobuf.Reflection { } } + /// Field number for the "deprecated" field. public const int DeprecatedFieldNumber = 3; private bool deprecated_; + /// + /// Is this field deprecated? + /// Depending on the target platform, this can emit Deprecated annotations + /// for accessors, or it will be completely ignored; in the very least, this + /// is a formalization for deprecating fields. + /// public bool Deprecated { get { return deprecated_; } set { @@ -3070,8 +3493,12 @@ namespace Google.Protobuf.Reflection { } } + /// Field number for the "weak" field. public const int WeakFieldNumber = 10; private bool weak_; + /// + /// For Google-internal migration only. Do not use. + /// public bool Weak { get { return weak_; } set { @@ -3079,10 +3506,14 @@ namespace Google.Protobuf.Reflection { } } + /// Field number for the "uninterpreted_option" field. public const int UninterpretedOptionFieldNumber = 999; private static readonly pb::FieldCodec _repeated_uninterpretedOption_codec = pb::FieldCodec.ForMessage(7994, global::Google.Protobuf.Reflection.UninterpretedOption.Parser); private readonly pbc::RepeatedField uninterpretedOption_ = new pbc::RepeatedField(); + /// + /// The parser stores options it doesn't recognize here. See above. + /// public pbc::RepeatedField UninterpretedOption { get { return uninterpretedOption_; } } @@ -3245,14 +3676,26 @@ namespace Google.Protobuf.Reflection { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public static partial class Types { internal enum CType { + /// + /// Default mode. + /// STRING = 0, CORD = 1, STRING_PIECE = 2, } internal enum JSType { + /// + /// Use the default type. + /// JS_NORMAL = 0, + /// + /// Use JavaScript strings. + /// JS_STRING = 1, + /// + /// Use JavaScript numbers. + /// JS_NUMBER = 2, } @@ -3290,8 +3733,13 @@ namespace Google.Protobuf.Reflection { return new EnumOptions(this); } + /// Field number for the "allow_alias" field. public const int AllowAliasFieldNumber = 2; private bool allowAlias_; + /// + /// Set this option to true to allow mapping different tag names to the same + /// value. + /// public bool AllowAlias { get { return allowAlias_; } set { @@ -3299,8 +3747,15 @@ namespace Google.Protobuf.Reflection { } } + /// Field number for the "deprecated" field. public const int DeprecatedFieldNumber = 3; private bool deprecated_; + /// + /// Is this enum deprecated? + /// Depending on the target platform, this can emit Deprecated annotations + /// for the enum, or it will be completely ignored; in the very least, this + /// is a formalization for deprecating enums. + /// public bool Deprecated { get { return deprecated_; } set { @@ -3308,10 +3763,14 @@ namespace Google.Protobuf.Reflection { } } + /// Field number for the "uninterpreted_option" field. public const int UninterpretedOptionFieldNumber = 999; private static readonly pb::FieldCodec _repeated_uninterpretedOption_codec = pb::FieldCodec.ForMessage(7994, global::Google.Protobuf.Reflection.UninterpretedOption.Parser); private readonly pbc::RepeatedField uninterpretedOption_ = new pbc::RepeatedField(); + /// + /// The parser stores options it doesn't recognize here. See above. + /// public pbc::RepeatedField UninterpretedOption { get { return uninterpretedOption_; } } @@ -3435,8 +3894,15 @@ namespace Google.Protobuf.Reflection { return new EnumValueOptions(this); } + /// Field number for the "deprecated" field. public const int DeprecatedFieldNumber = 1; private bool deprecated_; + /// + /// Is this enum value deprecated? + /// Depending on the target platform, this can emit Deprecated annotations + /// for the enum value, or it will be completely ignored; in the very least, + /// this is a formalization for deprecating enum values. + /// public bool Deprecated { get { return deprecated_; } set { @@ -3444,10 +3910,14 @@ namespace Google.Protobuf.Reflection { } } + /// Field number for the "uninterpreted_option" field. public const int UninterpretedOptionFieldNumber = 999; private static readonly pb::FieldCodec _repeated_uninterpretedOption_codec = pb::FieldCodec.ForMessage(7994, global::Google.Protobuf.Reflection.UninterpretedOption.Parser); private readonly pbc::RepeatedField uninterpretedOption_ = new pbc::RepeatedField(); + /// + /// The parser stores options it doesn't recognize here. See above. + /// public pbc::RepeatedField UninterpretedOption { get { return uninterpretedOption_; } } @@ -3555,8 +4025,15 @@ namespace Google.Protobuf.Reflection { return new ServiceOptions(this); } + /// Field number for the "deprecated" field. public const int DeprecatedFieldNumber = 33; private bool deprecated_; + /// + /// Is this service deprecated? + /// Depending on the target platform, this can emit Deprecated annotations + /// for the service, or it will be completely ignored; in the very least, + /// this is a formalization for deprecating services. + /// public bool Deprecated { get { return deprecated_; } set { @@ -3564,10 +4041,14 @@ namespace Google.Protobuf.Reflection { } } + /// Field number for the "uninterpreted_option" field. public const int UninterpretedOptionFieldNumber = 999; private static readonly pb::FieldCodec _repeated_uninterpretedOption_codec = pb::FieldCodec.ForMessage(7994, global::Google.Protobuf.Reflection.UninterpretedOption.Parser); private readonly pbc::RepeatedField uninterpretedOption_ = new pbc::RepeatedField(); + /// + /// The parser stores options it doesn't recognize here. See above. + /// public pbc::RepeatedField UninterpretedOption { get { return uninterpretedOption_; } } @@ -3675,8 +4156,15 @@ namespace Google.Protobuf.Reflection { return new MethodOptions(this); } + /// Field number for the "deprecated" field. public const int DeprecatedFieldNumber = 33; private bool deprecated_; + /// + /// Is this method deprecated? + /// Depending on the target platform, this can emit Deprecated annotations + /// for the method, or it will be completely ignored; in the very least, + /// this is a formalization for deprecating methods. + /// public bool Deprecated { get { return deprecated_; } set { @@ -3684,10 +4172,14 @@ namespace Google.Protobuf.Reflection { } } + /// Field number for the "uninterpreted_option" field. public const int UninterpretedOptionFieldNumber = 999; private static readonly pb::FieldCodec _repeated_uninterpretedOption_codec = pb::FieldCodec.ForMessage(7994, global::Google.Protobuf.Reflection.UninterpretedOption.Parser); private readonly pbc::RepeatedField uninterpretedOption_ = new pbc::RepeatedField(); + /// + /// The parser stores options it doesn't recognize here. See above. + /// public pbc::RepeatedField UninterpretedOption { get { return uninterpretedOption_; } } @@ -3767,6 +4259,14 @@ namespace Google.Protobuf.Reflection { } + /// + /// A message representing a option the parser does not recognize. This only + /// appears in options protos created by the compiler::Parser class. + /// DescriptorPool resolves these when building Descriptor objects. Therefore, + /// options protos in descriptor objects (e.g. returned by Descriptor::options(), + /// or produced by Descriptor::CopyTo()) will never have UninterpretedOptions + /// in them. + /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] internal sealed partial class UninterpretedOption : pb::IMessage { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new UninterpretedOption()); @@ -3800,6 +4300,7 @@ namespace Google.Protobuf.Reflection { return new UninterpretedOption(this); } + /// Field number for the "name" field. public const int NameFieldNumber = 2; private static readonly pb::FieldCodec _repeated_name_codec = pb::FieldCodec.ForMessage(18, global::Google.Protobuf.Reflection.UninterpretedOption.Types.NamePart.Parser); @@ -3808,8 +4309,13 @@ namespace Google.Protobuf.Reflection { get { return name_; } } + /// Field number for the "identifier_value" field. public const int IdentifierValueFieldNumber = 3; private string identifierValue_ = ""; + /// + /// The value of the uninterpreted option, in whatever type the tokenizer + /// identified it as during parsing. Exactly one of these should be set. + /// public string IdentifierValue { get { return identifierValue_; } set { @@ -3817,6 +4323,7 @@ namespace Google.Protobuf.Reflection { } } + /// Field number for the "positive_int_value" field. public const int PositiveIntValueFieldNumber = 4; private ulong positiveIntValue_; public ulong PositiveIntValue { @@ -3826,6 +4333,7 @@ namespace Google.Protobuf.Reflection { } } + /// Field number for the "negative_int_value" field. public const int NegativeIntValueFieldNumber = 5; private long negativeIntValue_; public long NegativeIntValue { @@ -3835,6 +4343,7 @@ namespace Google.Protobuf.Reflection { } } + /// Field number for the "double_value" field. public const int DoubleValueFieldNumber = 6; private double doubleValue_; public double DoubleValue { @@ -3844,6 +4353,7 @@ namespace Google.Protobuf.Reflection { } } + /// Field number for the "string_value" field. public const int StringValueFieldNumber = 7; private pb::ByteString stringValue_ = pb::ByteString.Empty; public pb::ByteString StringValue { @@ -3853,6 +4363,7 @@ namespace Google.Protobuf.Reflection { } } + /// Field number for the "aggregate_value" field. public const int AggregateValueFieldNumber = 8; private string aggregateValue_ = ""; public string AggregateValue { @@ -4019,6 +4530,13 @@ namespace Google.Protobuf.Reflection { /// Container for nested types declared in the UninterpretedOption message type. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public static partial class Types { + /// + /// The name of the uninterpreted option. Each string represents a segment in + /// a dot-separated name. is_extension is true iff a segment represents an + /// extension (denoted with parentheses in options specs in .proto files). + /// E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents + /// "foo.(bar.baz).qux". + /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] internal sealed partial class NamePart : pb::IMessage { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new NamePart()); @@ -4047,6 +4565,7 @@ namespace Google.Protobuf.Reflection { return new NamePart(this); } + /// Field number for the "name_part" field. public const int NamePart_FieldNumber = 1; private string namePart_ = ""; public string NamePart_ { @@ -4056,6 +4575,7 @@ namespace Google.Protobuf.Reflection { } } + /// Field number for the "is_extension" field. public const int IsExtensionFieldNumber = 2; private bool isExtension_; public bool IsExtension { @@ -4152,6 +4672,10 @@ namespace Google.Protobuf.Reflection { } + /// + /// Encapsulates information about the original source file from which a + /// FileDescriptorProto was generated. + /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] internal sealed partial class SourceCodeInfo : pb::IMessage { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SourceCodeInfo()); @@ -4179,10 +4703,54 @@ namespace Google.Protobuf.Reflection { return new SourceCodeInfo(this); } + /// Field number for the "location" field. public const int LocationFieldNumber = 1; private static readonly pb::FieldCodec _repeated_location_codec = pb::FieldCodec.ForMessage(10, global::Google.Protobuf.Reflection.SourceCodeInfo.Types.Location.Parser); private readonly pbc::RepeatedField location_ = new pbc::RepeatedField(); + /// + /// A Location identifies a piece of source code in a .proto file which + /// corresponds to a particular definition. This information is intended + /// to be useful to IDEs, code indexers, documentation generators, and similar + /// tools. + /// For example, say we have a file like: + /// message Foo { + /// optional string foo = 1; + /// } + /// Let's look at just the field definition: + /// optional string foo = 1; + /// ^ ^^ ^^ ^ ^^^ + /// a bc de f ghi + /// We have the following locations: + /// span path represents + /// [a,i) [ 4, 0, 2, 0 ] The whole field definition. + /// [a,b) [ 4, 0, 2, 0, 4 ] The label (optional). + /// [c,d) [ 4, 0, 2, 0, 5 ] The type (string). + /// [e,f) [ 4, 0, 2, 0, 1 ] The name (foo). + /// [g,h) [ 4, 0, 2, 0, 3 ] The number (1). + /// Notes: + /// - A location may refer to a repeated field itself (i.e. not to any + /// particular index within it). This is used whenever a set of elements are + /// logically enclosed in a single code segment. For example, an entire + /// extend block (possibly containing multiple extension definitions) will + /// have an outer location whose path refers to the "extensions" repeated + /// field without an index. + /// - Multiple locations may have the same path. This happens when a single + /// logical declaration is spread out across multiple places. The most + /// obvious example is the "extend" block again -- there may be multiple + /// extend blocks in the same scope, each of which will have the same path. + /// - A location's span is not always a subset of its parent's span. For + /// example, the "extendee" of an extension declaration appears at the + /// beginning of the "extend" block and is shared by all extensions within + /// the block. + /// - Just because a location's span is a subset of some other location's span + /// does not mean that it is a descendent. For example, a "group" defines + /// both a type and a field in a single declaration. Thus, the locations + /// corresponding to the type and field and their components will overlap. + /// - Code which tries to interpret locations should probably be designed to + /// ignore those that it doesn't understand, as more types of locations could + /// be recorded in the future. + /// public pbc::RepeatedField Location { get { return location_; } } @@ -4279,24 +4847,95 @@ namespace Google.Protobuf.Reflection { return new Location(this); } + /// Field number for the "path" field. public const int PathFieldNumber = 1; private static readonly pb::FieldCodec _repeated_path_codec = pb::FieldCodec.ForInt32(10); private readonly pbc::RepeatedField path_ = new pbc::RepeatedField(); + /// + /// Identifies which part of the FileDescriptorProto was defined at this + /// location. + /// Each element is a field number or an index. They form a path from + /// the root FileDescriptorProto to the place where the definition. For + /// example, this path: + /// [ 4, 3, 2, 7, 1 ] + /// refers to: + /// file.message_type(3) // 4, 3 + /// .field(7) // 2, 7 + /// .name() // 1 + /// This is because FileDescriptorProto.message_type has field number 4: + /// repeated DescriptorProto message_type = 4; + /// and DescriptorProto.field has field number 2: + /// repeated FieldDescriptorProto field = 2; + /// and FieldDescriptorProto.name has field number 1: + /// optional string name = 1; + /// Thus, the above path gives the location of a field name. If we removed + /// the last element: + /// [ 4, 3, 2, 7 ] + /// this path refers to the whole field declaration (from the beginning + /// of the label to the terminating semicolon). + /// public pbc::RepeatedField Path { get { return path_; } } + /// Field number for the "span" field. public const int SpanFieldNumber = 2; private static readonly pb::FieldCodec _repeated_span_codec = pb::FieldCodec.ForInt32(18); private readonly pbc::RepeatedField span_ = new pbc::RepeatedField(); + /// + /// Always has exactly three or four elements: start line, start column, + /// end line (optional, otherwise assumed same as start line), end column. + /// These are packed into a single field for efficiency. Note that line + /// and column numbers are zero-based -- typically you will want to add + /// 1 to each before displaying to a user. + /// public pbc::RepeatedField Span { get { return span_; } } + /// Field number for the "leading_comments" field. public const int LeadingCommentsFieldNumber = 3; private string leadingComments_ = ""; + /// + /// If this SourceCodeInfo represents a complete declaration, these are any + /// comments appearing before and after the declaration which appear to be + /// attached to the declaration. + /// A series of line comments appearing on consecutive lines, with no other + /// tokens appearing on those lines, will be treated as a single comment. + /// leading_detached_comments will keep paragraphs of comments that appear + /// before (but not connected to) the current element. Each paragraph, + /// separated by empty lines, will be one comment element in the repeated + /// field. + /// Only the comment content is provided; comment markers (e.g. //) are + /// stripped out. For block comments, leading whitespace and an asterisk + /// will be stripped from the beginning of each line other than the first. + /// Newlines are included in the output. + /// Examples: + /// optional int32 foo = 1; // Comment attached to foo. + /// // Comment attached to bar. + /// optional int32 bar = 2; + /// optional string baz = 3; + /// // Comment attached to baz. + /// // Another line attached to baz. + /// // Comment attached to qux. + /// // + /// // Another line attached to qux. + /// optional double qux = 4; + /// // Detached comment for corge. This is not leading or trailing comments + /// // to qux or corge because there are blank lines separating it from + /// // both. + /// // Detached comment for corge paragraph 2. + /// optional string corge = 5; + /// /* Block comment attached + /// * to corge. Leading asterisks + /// * will be removed. */ + /// /* Block comment attached to + /// * grault. */ + /// optional int32 grault = 6; + /// // ignored detached comments. + /// public string LeadingComments { get { return leadingComments_; } set { @@ -4304,6 +4943,7 @@ namespace Google.Protobuf.Reflection { } } + /// Field number for the "trailing_comments" field. public const int TrailingCommentsFieldNumber = 4; private string trailingComments_ = ""; public string TrailingComments { @@ -4313,6 +4953,7 @@ namespace Google.Protobuf.Reflection { } } + /// Field number for the "leading_detached_comments" field. public const int LeadingDetachedCommentsFieldNumber = 6; private static readonly pb::FieldCodec _repeated_leadingDetachedComments_codec = pb::FieldCodec.ForString(50); -- cgit v1.2.3