diff options
Diffstat (limited to 'csharp/src/Google.Protobuf')
11 files changed, 1399 insertions, 0 deletions
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 + /// <summary> + /// The protocol compiler can output a FileDescriptorSet containing the .proto + /// files it parses. + /// </summary> [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] internal sealed partial class FileDescriptorSet : pb::IMessage<FileDescriptorSet> { private static readonly pb::MessageParser<FileDescriptorSet> _parser = new pb::MessageParser<FileDescriptorSet>(() => new FileDescriptorSet()); @@ -189,6 +193,7 @@ namespace Google.Protobuf.Reflection { return new FileDescriptorSet(this); } + /// <summary>Field number for the "file" field.</summary> public const int FileFieldNumber = 1; private static readonly pb::FieldCodec<global::Google.Protobuf.Reflection.FileDescriptorProto> _repeated_file_codec = pb::FieldCodec.ForMessage(10, global::Google.Protobuf.Reflection.FileDescriptorProto.Parser); @@ -256,6 +261,9 @@ namespace Google.Protobuf.Reflection { } + /// <summary> + /// Describes a complete .proto file. + /// </summary> [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] internal sealed partial class FileDescriptorProto : pb::IMessage<FileDescriptorProto> { private static readonly pb::MessageParser<FileDescriptorProto> _parser = new pb::MessageParser<FileDescriptorProto>(() => new FileDescriptorProto()); @@ -294,8 +302,12 @@ namespace Google.Protobuf.Reflection { return new FileDescriptorProto(this); } + /// <summary>Field number for the "name" field.</summary> public const int NameFieldNumber = 1; private string name_ = ""; + /// <summary> + /// file name, relative to root of source tree + /// </summary> public string Name { get { return name_; } set { @@ -303,8 +315,12 @@ namespace Google.Protobuf.Reflection { } } + /// <summary>Field number for the "package" field.</summary> public const int PackageFieldNumber = 2; private string package_ = ""; + /// <summary> + /// e.g. "foo", "foo.bar", etc. + /// </summary> public string Package { get { return package_; } set { @@ -312,38 +328,56 @@ namespace Google.Protobuf.Reflection { } } + /// <summary>Field number for the "dependency" field.</summary> public const int DependencyFieldNumber = 3; private static readonly pb::FieldCodec<string> _repeated_dependency_codec = pb::FieldCodec.ForString(26); private readonly pbc::RepeatedField<string> dependency_ = new pbc::RepeatedField<string>(); + /// <summary> + /// Names of files imported by this file. + /// </summary> public pbc::RepeatedField<string> Dependency { get { return dependency_; } } + /// <summary>Field number for the "public_dependency" field.</summary> public const int PublicDependencyFieldNumber = 10; private static readonly pb::FieldCodec<int> _repeated_publicDependency_codec = pb::FieldCodec.ForInt32(80); private readonly pbc::RepeatedField<int> publicDependency_ = new pbc::RepeatedField<int>(); + /// <summary> + /// Indexes of the public imported files in the dependency list above. + /// </summary> public pbc::RepeatedField<int> PublicDependency { get { return publicDependency_; } } + /// <summary>Field number for the "weak_dependency" field.</summary> public const int WeakDependencyFieldNumber = 11; private static readonly pb::FieldCodec<int> _repeated_weakDependency_codec = pb::FieldCodec.ForInt32(88); private readonly pbc::RepeatedField<int> weakDependency_ = new pbc::RepeatedField<int>(); + /// <summary> + /// Indexes of the weak imported files in the dependency list. + /// For Google-internal migration only. Do not use. + /// </summary> public pbc::RepeatedField<int> WeakDependency { get { return weakDependency_; } } + /// <summary>Field number for the "message_type" field.</summary> public const int MessageTypeFieldNumber = 4; private static readonly pb::FieldCodec<global::Google.Protobuf.Reflection.DescriptorProto> _repeated_messageType_codec = pb::FieldCodec.ForMessage(34, global::Google.Protobuf.Reflection.DescriptorProto.Parser); private readonly pbc::RepeatedField<global::Google.Protobuf.Reflection.DescriptorProto> messageType_ = new pbc::RepeatedField<global::Google.Protobuf.Reflection.DescriptorProto>(); + /// <summary> + /// All top-level definitions in this file. + /// </summary> public pbc::RepeatedField<global::Google.Protobuf.Reflection.DescriptorProto> MessageType { get { return messageType_; } } + /// <summary>Field number for the "enum_type" field.</summary> public const int EnumTypeFieldNumber = 5; private static readonly pb::FieldCodec<global::Google.Protobuf.Reflection.EnumDescriptorProto> _repeated_enumType_codec = pb::FieldCodec.ForMessage(42, global::Google.Protobuf.Reflection.EnumDescriptorProto.Parser); @@ -352,6 +386,7 @@ namespace Google.Protobuf.Reflection { get { return enumType_; } } + /// <summary>Field number for the "service" field.</summary> public const int ServiceFieldNumber = 6; private static readonly pb::FieldCodec<global::Google.Protobuf.Reflection.ServiceDescriptorProto> _repeated_service_codec = pb::FieldCodec.ForMessage(50, global::Google.Protobuf.Reflection.ServiceDescriptorProto.Parser); @@ -360,6 +395,7 @@ namespace Google.Protobuf.Reflection { get { return service_; } } + /// <summary>Field number for the "extension" field.</summary> public const int ExtensionFieldNumber = 7; private static readonly pb::FieldCodec<global::Google.Protobuf.Reflection.FieldDescriptorProto> _repeated_extension_codec = pb::FieldCodec.ForMessage(58, global::Google.Protobuf.Reflection.FieldDescriptorProto.Parser); @@ -368,6 +404,7 @@ namespace Google.Protobuf.Reflection { get { return extension_; } } + /// <summary>Field number for the "options" field.</summary> 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 { } } + /// <summary>Field number for the "source_code_info" field.</summary> public const int SourceCodeInfoFieldNumber = 9; private global::Google.Protobuf.Reflection.SourceCodeInfo sourceCodeInfo_; + /// <summary> + /// 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. + /// </summary> public global::Google.Protobuf.Reflection.SourceCodeInfo SourceCodeInfo { get { return sourceCodeInfo_; } set { @@ -386,8 +430,13 @@ namespace Google.Protobuf.Reflection { } } + /// <summary>Field number for the "syntax" field.</summary> public const int SyntaxFieldNumber = 12; private string syntax_ = ""; + /// <summary> + /// The syntax of the proto file. + /// The supported values are "proto2" and "proto3". + /// </summary> public string Syntax { get { return syntax_; } set { @@ -602,6 +651,9 @@ namespace Google.Protobuf.Reflection { } + /// <summary> + /// Describes a message type. + /// </summary> [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] internal sealed partial class DescriptorProto : pb::IMessage<DescriptorProto> { private static readonly pb::MessageParser<DescriptorProto> _parser = new pb::MessageParser<DescriptorProto>(() => new DescriptorProto()); @@ -638,6 +690,7 @@ namespace Google.Protobuf.Reflection { return new DescriptorProto(this); } + /// <summary>Field number for the "name" field.</summary> public const int NameFieldNumber = 1; private string name_ = ""; public string Name { @@ -647,6 +700,7 @@ namespace Google.Protobuf.Reflection { } } + /// <summary>Field number for the "field" field.</summary> public const int FieldFieldNumber = 2; private static readonly pb::FieldCodec<global::Google.Protobuf.Reflection.FieldDescriptorProto> _repeated_field_codec = pb::FieldCodec.ForMessage(18, global::Google.Protobuf.Reflection.FieldDescriptorProto.Parser); @@ -655,6 +709,7 @@ namespace Google.Protobuf.Reflection { get { return field_; } } + /// <summary>Field number for the "extension" field.</summary> public const int ExtensionFieldNumber = 6; private static readonly pb::FieldCodec<global::Google.Protobuf.Reflection.FieldDescriptorProto> _repeated_extension_codec = pb::FieldCodec.ForMessage(50, global::Google.Protobuf.Reflection.FieldDescriptorProto.Parser); @@ -663,6 +718,7 @@ namespace Google.Protobuf.Reflection { get { return extension_; } } + /// <summary>Field number for the "nested_type" field.</summary> public const int NestedTypeFieldNumber = 3; private static readonly pb::FieldCodec<global::Google.Protobuf.Reflection.DescriptorProto> _repeated_nestedType_codec = pb::FieldCodec.ForMessage(26, global::Google.Protobuf.Reflection.DescriptorProto.Parser); @@ -671,6 +727,7 @@ namespace Google.Protobuf.Reflection { get { return nestedType_; } } + /// <summary>Field number for the "enum_type" field.</summary> public const int EnumTypeFieldNumber = 4; private static readonly pb::FieldCodec<global::Google.Protobuf.Reflection.EnumDescriptorProto> _repeated_enumType_codec = pb::FieldCodec.ForMessage(34, global::Google.Protobuf.Reflection.EnumDescriptorProto.Parser); @@ -679,6 +736,7 @@ namespace Google.Protobuf.Reflection { get { return enumType_; } } + /// <summary>Field number for the "extension_range" field.</summary> public const int ExtensionRangeFieldNumber = 5; private static readonly pb::FieldCodec<global::Google.Protobuf.Reflection.DescriptorProto.Types.ExtensionRange> _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_; } } + /// <summary>Field number for the "oneof_decl" field.</summary> public const int OneofDeclFieldNumber = 8; private static readonly pb::FieldCodec<global::Google.Protobuf.Reflection.OneofDescriptorProto> _repeated_oneofDecl_codec = pb::FieldCodec.ForMessage(66, global::Google.Protobuf.Reflection.OneofDescriptorProto.Parser); @@ -695,6 +754,7 @@ namespace Google.Protobuf.Reflection { get { return oneofDecl_; } } + /// <summary>Field number for the "options" field.</summary> 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 { } } + /// <summary>Field number for the "reserved_range" field.</summary> public const int ReservedRangeFieldNumber = 9; private static readonly pb::FieldCodec<global::Google.Protobuf.Reflection.DescriptorProto.Types.ReservedRange> _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_; } } + /// <summary>Field number for the "reserved_name" field.</summary> public const int ReservedNameFieldNumber = 10; private static readonly pb::FieldCodec<string> _repeated_reservedName_codec = pb::FieldCodec.ForString(82); private readonly pbc::RepeatedField<string> reservedName_ = new pbc::RepeatedField<string>(); + /// <summary> + /// Reserved field names, which may not be used by fields in the same message. + /// A given name may only be reserved once. + /// </summary> public pbc::RepeatedField<string> ReservedName { get { return reservedName_; } } @@ -910,6 +976,7 @@ namespace Google.Protobuf.Reflection { return new ExtensionRange(this); } + /// <summary>Field number for the "start" field.</summary> public const int StartFieldNumber = 1; private int start_; public int Start { @@ -919,6 +986,7 @@ namespace Google.Protobuf.Reflection { } } + /// <summary>Field number for the "end" field.</summary> public const int EndFieldNumber = 2; private int end_; public int End { @@ -1010,6 +1078,11 @@ namespace Google.Protobuf.Reflection { } + /// <summary> + /// 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. + /// </summary> [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] internal sealed partial class ReservedRange : pb::IMessage<ReservedRange> { private static readonly pb::MessageParser<ReservedRange> _parser = new pb::MessageParser<ReservedRange>(() => new ReservedRange()); @@ -1038,8 +1111,12 @@ namespace Google.Protobuf.Reflection { return new ReservedRange(this); } + /// <summary>Field number for the "start" field.</summary> public const int StartFieldNumber = 1; private int start_; + /// <summary> + /// Inclusive. + /// </summary> public int Start { get { return start_; } set { @@ -1047,8 +1124,12 @@ namespace Google.Protobuf.Reflection { } } + /// <summary>Field number for the "end" field.</summary> public const int EndFieldNumber = 2; private int end_; + /// <summary> + /// Exclusive. + /// </summary> public int End { get { return end_; } set { @@ -1143,6 +1224,9 @@ namespace Google.Protobuf.Reflection { } + /// <summary> + /// Describes a field within a message. + /// </summary> [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] internal sealed partial class FieldDescriptorProto : pb::IMessage<FieldDescriptorProto> { private static readonly pb::MessageParser<FieldDescriptorProto> _parser = new pb::MessageParser<FieldDescriptorProto>(() => new FieldDescriptorProto()); @@ -1178,6 +1262,7 @@ namespace Google.Protobuf.Reflection { return new FieldDescriptorProto(this); } + /// <summary>Field number for the "name" field.</summary> public const int NameFieldNumber = 1; private string name_ = ""; public string Name { @@ -1187,6 +1272,7 @@ namespace Google.Protobuf.Reflection { } } + /// <summary>Field number for the "number" field.</summary> public const int NumberFieldNumber = 3; private int number_; public int Number { @@ -1196,6 +1282,7 @@ namespace Google.Protobuf.Reflection { } } + /// <summary>Field number for the "label" field.</summary> 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 { } } + /// <summary>Field number for the "type" field.</summary> public const int TypeFieldNumber = 5; private global::Google.Protobuf.Reflection.FieldDescriptorProto.Types.Type type_ = global::Google.Protobuf.Reflection.FieldDescriptorProto.Types.Type.TYPE_DOUBLE; + /// <summary> + /// 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. + /// </summary> public global::Google.Protobuf.Reflection.FieldDescriptorProto.Types.Type Type { get { return type_; } set { @@ -1214,8 +1306,16 @@ namespace Google.Protobuf.Reflection { } } + /// <summary>Field number for the "type_name" field.</summary> public const int TypeNameFieldNumber = 6; private string typeName_ = ""; + /// <summary> + /// 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). + /// </summary> public string TypeName { get { return typeName_; } set { @@ -1223,8 +1323,13 @@ namespace Google.Protobuf.Reflection { } } + /// <summary>Field number for the "extendee" field.</summary> public const int ExtendeeFieldNumber = 2; private string extendee_ = ""; + /// <summary> + /// For extensions, this is the name of the type being extended. It is + /// resolved in the same manner as type_name. + /// </summary> public string Extendee { get { return extendee_; } set { @@ -1232,8 +1337,16 @@ namespace Google.Protobuf.Reflection { } } + /// <summary>Field number for the "default_value" field.</summary> public const int DefaultValueFieldNumber = 7; private string defaultValue_ = ""; + /// <summary> + /// 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? + /// </summary> public string DefaultValue { get { return defaultValue_; } set { @@ -1241,8 +1354,13 @@ namespace Google.Protobuf.Reflection { } } + /// <summary>Field number for the "oneof_index" field.</summary> public const int OneofIndexFieldNumber = 9; private int oneofIndex_; + /// <summary> + /// If set, gives the index of a oneof in the containing type's oneof_decl + /// list. This field is a member of that oneof. + /// </summary> public int OneofIndex { get { return oneofIndex_; } set { @@ -1250,6 +1368,7 @@ namespace Google.Protobuf.Reflection { } } + /// <summary>Field number for the "options" field.</summary> 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 { + /// <summary> + /// 0 is reserved for errors. + /// Order is weird for historical reasons. + /// </summary> TYPE_DOUBLE = 1, TYPE_FLOAT = 2, + /// <summary> + /// Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if + /// negative values are likely. + /// </summary> TYPE_INT64 = 3, TYPE_UINT64 = 4, + /// <summary> + /// Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if + /// negative values are likely. + /// </summary> TYPE_INT32 = 5, TYPE_FIXED64 = 6, TYPE_FIXED32 = 7, TYPE_BOOL = 8, TYPE_STRING = 9, + /// <summary> + /// Tag-delimited aggregate. + /// </summary> TYPE_GROUP = 10, + /// <summary> + /// Length-delimited aggregate. + /// </summary> TYPE_MESSAGE = 11, + /// <summary> + /// New in version 2. + /// </summary> TYPE_BYTES = 12, TYPE_UINT32 = 13, TYPE_ENUM = 14, TYPE_SFIXED32 = 15, TYPE_SFIXED64 = 16, + /// <summary> + /// Uses ZigZag encoding. + /// </summary> TYPE_SINT32 = 17, + /// <summary> + /// Uses ZigZag encoding. + /// </summary> TYPE_SINT64 = 18, } internal enum Label { + /// <summary> + /// 0 is reserved for errors + /// </summary> LABEL_OPTIONAL = 1, LABEL_REQUIRED = 2, + /// <summary> + /// TODO(sanjay): Should we add LABEL_MAP? + /// </summary> LABEL_REPEATED = 3, } @@ -1493,6 +1645,9 @@ namespace Google.Protobuf.Reflection { } + /// <summary> + /// Describes a oneof. + /// </summary> [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] internal sealed partial class OneofDescriptorProto : pb::IMessage<OneofDescriptorProto> { private static readonly pb::MessageParser<OneofDescriptorProto> _parser = new pb::MessageParser<OneofDescriptorProto>(() => new OneofDescriptorProto()); @@ -1520,6 +1675,7 @@ namespace Google.Protobuf.Reflection { return new OneofDescriptorProto(this); } + /// <summary>Field number for the "name" field.</summary> public const int NameFieldNumber = 1; private string name_ = ""; public string Name { @@ -1595,6 +1751,9 @@ namespace Google.Protobuf.Reflection { } + /// <summary> + /// Describes an enum type. + /// </summary> [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] internal sealed partial class EnumDescriptorProto : pb::IMessage<EnumDescriptorProto> { private static readonly pb::MessageParser<EnumDescriptorProto> _parser = new pb::MessageParser<EnumDescriptorProto>(() => new EnumDescriptorProto()); @@ -1624,6 +1783,7 @@ namespace Google.Protobuf.Reflection { return new EnumDescriptorProto(this); } + /// <summary>Field number for the "name" field.</summary> public const int NameFieldNumber = 1; private string name_ = ""; public string Name { @@ -1633,6 +1793,7 @@ namespace Google.Protobuf.Reflection { } } + /// <summary>Field number for the "value" field.</summary> public const int ValueFieldNumber = 2; private static readonly pb::FieldCodec<global::Google.Protobuf.Reflection.EnumValueDescriptorProto> _repeated_value_codec = pb::FieldCodec.ForMessage(18, global::Google.Protobuf.Reflection.EnumValueDescriptorProto.Parser); @@ -1641,6 +1802,7 @@ namespace Google.Protobuf.Reflection { get { return value_; } } + /// <summary>Field number for the "options" field.</summary> 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 { } + /// <summary> + /// Describes a value within an enum. + /// </summary> [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] internal sealed partial class EnumValueDescriptorProto : pb::IMessage<EnumValueDescriptorProto> { private static readonly pb::MessageParser<EnumValueDescriptorProto> _parser = new pb::MessageParser<EnumValueDescriptorProto>(() => new EnumValueDescriptorProto()); @@ -1776,6 +1941,7 @@ namespace Google.Protobuf.Reflection { return new EnumValueDescriptorProto(this); } + /// <summary>Field number for the "name" field.</summary> public const int NameFieldNumber = 1; private string name_ = ""; public string Name { @@ -1785,6 +1951,7 @@ namespace Google.Protobuf.Reflection { } } + /// <summary>Field number for the "number" field.</summary> public const int NumberFieldNumber = 2; private int number_; public int Number { @@ -1794,6 +1961,7 @@ namespace Google.Protobuf.Reflection { } } + /// <summary>Field number for the "options" field.</summary> 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 { } + /// <summary> + /// Describes a service. + /// </summary> [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] internal sealed partial class ServiceDescriptorProto : pb::IMessage<ServiceDescriptorProto> { private static readonly pb::MessageParser<ServiceDescriptorProto> _parser = new pb::MessageParser<ServiceDescriptorProto>(() => new ServiceDescriptorProto()); @@ -1936,6 +2107,7 @@ namespace Google.Protobuf.Reflection { return new ServiceDescriptorProto(this); } + /// <summary>Field number for the "name" field.</summary> public const int NameFieldNumber = 1; private string name_ = ""; public string Name { @@ -1945,6 +2117,7 @@ namespace Google.Protobuf.Reflection { } } + /// <summary>Field number for the "method" field.</summary> public const int MethodFieldNumber = 2; private static readonly pb::FieldCodec<global::Google.Protobuf.Reflection.MethodDescriptorProto> _repeated_method_codec = pb::FieldCodec.ForMessage(18, global::Google.Protobuf.Reflection.MethodDescriptorProto.Parser); @@ -1953,6 +2126,7 @@ namespace Google.Protobuf.Reflection { get { return method_; } } + /// <summary>Field number for the "options" field.</summary> 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 { } + /// <summary> + /// Describes a method of a service. + /// </summary> [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] internal sealed partial class MethodDescriptorProto : pb::IMessage<MethodDescriptorProto> { private static readonly pb::MessageParser<MethodDescriptorProto> _parser = new pb::MessageParser<MethodDescriptorProto>(() => new MethodDescriptorProto()); @@ -2091,6 +2268,7 @@ namespace Google.Protobuf.Reflection { return new MethodDescriptorProto(this); } + /// <summary>Field number for the "name" field.</summary> public const int NameFieldNumber = 1; private string name_ = ""; public string Name { @@ -2100,8 +2278,13 @@ namespace Google.Protobuf.Reflection { } } + /// <summary>Field number for the "input_type" field.</summary> public const int InputTypeFieldNumber = 2; private string inputType_ = ""; + /// <summary> + /// Input and output type names. These are resolved in the same way as + /// FieldDescriptorProto.type_name, but must refer to a message type. + /// </summary> public string InputType { get { return inputType_; } set { @@ -2109,6 +2292,7 @@ namespace Google.Protobuf.Reflection { } } + /// <summary>Field number for the "output_type" field.</summary> public const int OutputTypeFieldNumber = 3; private string outputType_ = ""; public string OutputType { @@ -2118,6 +2302,7 @@ namespace Google.Protobuf.Reflection { } } + /// <summary>Field number for the "options" field.</summary> 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 { } } + /// <summary>Field number for the "client_streaming" field.</summary> public const int ClientStreamingFieldNumber = 5; private bool clientStreaming_; + /// <summary> + /// Identifies if client streams multiple client messages + /// </summary> public bool ClientStreaming { get { return clientStreaming_; } set { @@ -2136,8 +2325,12 @@ namespace Google.Protobuf.Reflection { } } + /// <summary>Field number for the "server_streaming" field.</summary> public const int ServerStreamingFieldNumber = 6; private bool serverStreaming_; + /// <summary> + /// Identifies if server streams multiple server messages + /// </summary> public bool ServerStreaming { get { return serverStreaming_; } set { @@ -2339,8 +2532,15 @@ namespace Google.Protobuf.Reflection { return new FileOptions(this); } + /// <summary>Field number for the "java_package" field.</summary> public const int JavaPackageFieldNumber = 1; private string javaPackage_ = ""; + /// <summary> + /// 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. + /// </summary> public string JavaPackage { get { return javaPackage_; } set { @@ -2348,8 +2548,16 @@ namespace Google.Protobuf.Reflection { } } + /// <summary>Field number for the "java_outer_classname" field.</summary> public const int JavaOuterClassnameFieldNumber = 8; private string javaOuterClassname_ = ""; + /// <summary> + /// 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). + /// </summary> public string JavaOuterClassname { get { return javaOuterClassname_; } set { @@ -2357,8 +2565,17 @@ namespace Google.Protobuf.Reflection { } } + /// <summary>Field number for the "java_multiple_files" field.</summary> public const int JavaMultipleFilesFieldNumber = 10; private bool javaMultipleFiles_; + /// <summary> + /// 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. + /// </summary> public bool JavaMultipleFiles { get { return javaMultipleFiles_; } set { @@ -2366,8 +2583,23 @@ namespace Google.Protobuf.Reflection { } } + /// <summary>Field number for the "java_generate_equals_and_hash" field.</summary> public const int JavaGenerateEqualsAndHashFieldNumber = 20; private bool javaGenerateEqualsAndHash_; + /// <summary> + /// 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.) + /// </summary> public bool JavaGenerateEqualsAndHash { get { return javaGenerateEqualsAndHash_; } set { @@ -2375,8 +2607,17 @@ namespace Google.Protobuf.Reflection { } } + /// <summary>Field number for the "java_string_check_utf8" field.</summary> public const int JavaStringCheckUtf8FieldNumber = 27; private bool javaStringCheckUtf8_; + /// <summary> + /// 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. + /// </summary> public bool JavaStringCheckUtf8 { get { return javaStringCheckUtf8_; } set { @@ -2384,6 +2625,7 @@ namespace Google.Protobuf.Reflection { } } + /// <summary>Field number for the "optimize_for" field.</summary> 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 { } } + /// <summary>Field number for the "go_package" field.</summary> public const int GoPackageFieldNumber = 11; private string goPackage_ = ""; + /// <summary> + /// 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. + /// </summary> public string GoPackage { get { return goPackage_; } set { @@ -2402,8 +2652,20 @@ namespace Google.Protobuf.Reflection { } } + /// <summary>Field number for the "cc_generic_services" field.</summary> public const int CcGenericServicesFieldNumber = 16; private bool ccGenericServices_; + /// <summary> + /// 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. + /// </summary> public bool CcGenericServices { get { return ccGenericServices_; } set { @@ -2411,6 +2673,7 @@ namespace Google.Protobuf.Reflection { } } + /// <summary>Field number for the "java_generic_services" field.</summary> public const int JavaGenericServicesFieldNumber = 17; private bool javaGenericServices_; public bool JavaGenericServices { @@ -2420,6 +2683,7 @@ namespace Google.Protobuf.Reflection { } } + /// <summary>Field number for the "py_generic_services" field.</summary> public const int PyGenericServicesFieldNumber = 18; private bool pyGenericServices_; public bool PyGenericServices { @@ -2429,8 +2693,15 @@ namespace Google.Protobuf.Reflection { } } + /// <summary>Field number for the "deprecated" field.</summary> public const int DeprecatedFieldNumber = 23; private bool deprecated_; + /// <summary> + /// 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. + /// </summary> public bool Deprecated { get { return deprecated_; } set { @@ -2438,8 +2709,13 @@ namespace Google.Protobuf.Reflection { } } + /// <summary>Field number for the "cc_enable_arenas" field.</summary> public const int CcEnableArenasFieldNumber = 31; private bool ccEnableArenas_; + /// <summary> + /// Enables the use of arenas for the proto messages in this file. This applies + /// only to generated classes for C++. + /// </summary> public bool CcEnableArenas { get { return ccEnableArenas_; } set { @@ -2447,8 +2723,13 @@ namespace Google.Protobuf.Reflection { } } + /// <summary>Field number for the "objc_class_prefix" field.</summary> public const int ObjcClassPrefixFieldNumber = 36; private string objcClassPrefix_ = ""; + /// <summary> + /// Sets the objective c class prefix which is prepended to all objective c + /// generated classes from this .proto. There is no default. + /// </summary> public string ObjcClassPrefix { get { return objcClassPrefix_; } set { @@ -2456,8 +2737,12 @@ namespace Google.Protobuf.Reflection { } } + /// <summary>Field number for the "csharp_namespace" field.</summary> public const int CsharpNamespaceFieldNumber = 37; private string csharpNamespace_ = ""; + /// <summary> + /// Namespace for generated classes; defaults to the package. + /// </summary> public string CsharpNamespace { get { return csharpNamespace_; } set { @@ -2465,8 +2750,13 @@ namespace Google.Protobuf.Reflection { } } + /// <summary>Field number for the "javanano_use_deprecated_package" field.</summary> public const int JavananoUseDeprecatedPackageFieldNumber = 38; private bool javananoUseDeprecatedPackage_; + /// <summary> + /// Whether the nano proto compiler should generate in the deprecated non-nano + /// suffixed package. + /// </summary> public bool JavananoUseDeprecatedPackage { get { return javananoUseDeprecatedPackage_; } set { @@ -2474,10 +2764,14 @@ namespace Google.Protobuf.Reflection { } } + /// <summary>Field number for the "uninterpreted_option" field.</summary> public const int UninterpretedOptionFieldNumber = 999; private static readonly pb::FieldCodec<global::Google.Protobuf.Reflection.UninterpretedOption> _repeated_uninterpretedOption_codec = pb::FieldCodec.ForMessage(7994, global::Google.Protobuf.Reflection.UninterpretedOption.Parser); private readonly pbc::RepeatedField<global::Google.Protobuf.Reflection.UninterpretedOption> uninterpretedOption_ = new pbc::RepeatedField<global::Google.Protobuf.Reflection.UninterpretedOption>(); + /// <summary> + /// The parser stores options it doesn't recognize here. See above. + /// </summary> public pbc::RepeatedField<global::Google.Protobuf.Reflection.UninterpretedOption> UninterpretedOption { get { return uninterpretedOption_; } } @@ -2783,9 +3077,21 @@ namespace Google.Protobuf.Reflection { /// <summary>Container for nested types declared in the FileOptions message type.</summary> [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public static partial class Types { + /// <summary> + /// Generated classes can be optimized for speed or code size. + /// </summary> internal enum OptimizeMode { + /// <summary> + /// Generate complete code for parsing, serialization, + /// </summary> SPEED = 1, + /// <summary> + /// etc. + /// </summary> CODE_SIZE = 2, + /// <summary> + /// Generate code using MessageLite and the lite runtime. + /// </summary> LITE_RUNTIME = 3, } @@ -2825,8 +3131,26 @@ namespace Google.Protobuf.Reflection { return new MessageOptions(this); } + /// <summary>Field number for the "message_set_wire_format" field.</summary> public const int MessageSetWireFormatFieldNumber = 1; private bool messageSetWireFormat_; + /// <summary> + /// 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. + /// </summary> public bool MessageSetWireFormat { get { return messageSetWireFormat_; } set { @@ -2834,8 +3158,14 @@ namespace Google.Protobuf.Reflection { } } + /// <summary>Field number for the "no_standard_descriptor_accessor" field.</summary> public const int NoStandardDescriptorAccessorFieldNumber = 2; private bool noStandardDescriptorAccessor_; + /// <summary> + /// 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". + /// </summary> public bool NoStandardDescriptorAccessor { get { return noStandardDescriptorAccessor_; } set { @@ -2843,8 +3173,15 @@ namespace Google.Protobuf.Reflection { } } + /// <summary>Field number for the "deprecated" field.</summary> public const int DeprecatedFieldNumber = 3; private bool deprecated_; + /// <summary> + /// 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. + /// </summary> public bool Deprecated { get { return deprecated_; } set { @@ -2852,8 +3189,29 @@ namespace Google.Protobuf.Reflection { } } + /// <summary>Field number for the "map_entry" field.</summary> public const int MapEntryFieldNumber = 7; private bool mapEntry_; + /// <summary> + /// 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. + /// </summary> public bool MapEntry { get { return mapEntry_; } set { @@ -2861,10 +3219,14 @@ namespace Google.Protobuf.Reflection { } } + /// <summary>Field number for the "uninterpreted_option" field.</summary> public const int UninterpretedOptionFieldNumber = 999; private static readonly pb::FieldCodec<global::Google.Protobuf.Reflection.UninterpretedOption> _repeated_uninterpretedOption_codec = pb::FieldCodec.ForMessage(7994, global::Google.Protobuf.Reflection.UninterpretedOption.Parser); private readonly pbc::RepeatedField<global::Google.Protobuf.Reflection.UninterpretedOption> uninterpretedOption_ = new pbc::RepeatedField<global::Google.Protobuf.Reflection.UninterpretedOption>(); + /// <summary> + /// The parser stores options it doesn't recognize here. See above. + /// </summary> public pbc::RepeatedField<global::Google.Protobuf.Reflection.UninterpretedOption> UninterpretedOption { get { return uninterpretedOption_; } } @@ -3025,8 +3387,15 @@ namespace Google.Protobuf.Reflection { return new FieldOptions(this); } + /// <summary>Field number for the "ctype" field.</summary> public const int CtypeFieldNumber = 1; private global::Google.Protobuf.Reflection.FieldOptions.Types.CType ctype_ = global::Google.Protobuf.Reflection.FieldOptions.Types.CType.STRING; + /// <summary> + /// 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! + /// </summary> public global::Google.Protobuf.Reflection.FieldOptions.Types.CType Ctype { get { return ctype_; } set { @@ -3034,8 +3403,16 @@ namespace Google.Protobuf.Reflection { } } + /// <summary>Field number for the "packed" field.</summary> public const int PackedFieldNumber = 2; private bool packed_; + /// <summary> + /// 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. + /// </summary> public bool Packed { get { return packed_; } set { @@ -3043,8 +3420,20 @@ namespace Google.Protobuf.Reflection { } } + /// <summary>Field number for the "jstype" field.</summary> public const int JstypeFieldNumber = 6; private global::Google.Protobuf.Reflection.FieldOptions.Types.JSType jstype_ = global::Google.Protobuf.Reflection.FieldOptions.Types.JSType.JS_NORMAL; + /// <summary> + /// 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. + /// </summary> public global::Google.Protobuf.Reflection.FieldOptions.Types.JSType Jstype { get { return jstype_; } set { @@ -3052,8 +3441,35 @@ namespace Google.Protobuf.Reflection { } } + /// <summary>Field number for the "lazy" field.</summary> public const int LazyFieldNumber = 5; private bool lazy_; + /// <summary> + /// 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. + /// </summary> public bool Lazy { get { return lazy_; } set { @@ -3061,8 +3477,15 @@ namespace Google.Protobuf.Reflection { } } + /// <summary>Field number for the "deprecated" field.</summary> public const int DeprecatedFieldNumber = 3; private bool deprecated_; + /// <summary> + /// 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. + /// </summary> public bool Deprecated { get { return deprecated_; } set { @@ -3070,8 +3493,12 @@ namespace Google.Protobuf.Reflection { } } + /// <summary>Field number for the "weak" field.</summary> public const int WeakFieldNumber = 10; private bool weak_; + /// <summary> + /// For Google-internal migration only. Do not use. + /// </summary> public bool Weak { get { return weak_; } set { @@ -3079,10 +3506,14 @@ namespace Google.Protobuf.Reflection { } } + /// <summary>Field number for the "uninterpreted_option" field.</summary> public const int UninterpretedOptionFieldNumber = 999; private static readonly pb::FieldCodec<global::Google.Protobuf.Reflection.UninterpretedOption> _repeated_uninterpretedOption_codec = pb::FieldCodec.ForMessage(7994, global::Google.Protobuf.Reflection.UninterpretedOption.Parser); private readonly pbc::RepeatedField<global::Google.Protobuf.Reflection.UninterpretedOption> uninterpretedOption_ = new pbc::RepeatedField<global::Google.Protobuf.Reflection.UninterpretedOption>(); + /// <summary> + /// The parser stores options it doesn't recognize here. See above. + /// </summary> public pbc::RepeatedField<global::Google.Protobuf.Reflection.UninterpretedOption> UninterpretedOption { get { return uninterpretedOption_; } } @@ -3245,14 +3676,26 @@ namespace Google.Protobuf.Reflection { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public static partial class Types { internal enum CType { + /// <summary> + /// Default mode. + /// </summary> STRING = 0, CORD = 1, STRING_PIECE = 2, } internal enum JSType { + /// <summary> + /// Use the default type. + /// </summary> JS_NORMAL = 0, + /// <summary> + /// Use JavaScript strings. + /// </summary> JS_STRING = 1, + /// <summary> + /// Use JavaScript numbers. + /// </summary> JS_NUMBER = 2, } @@ -3290,8 +3733,13 @@ namespace Google.Protobuf.Reflection { return new EnumOptions(this); } + /// <summary>Field number for the "allow_alias" field.</summary> public const int AllowAliasFieldNumber = 2; private bool allowAlias_; + /// <summary> + /// Set this option to true to allow mapping different tag names to the same + /// value. + /// </summary> public bool AllowAlias { get { return allowAlias_; } set { @@ -3299,8 +3747,15 @@ namespace Google.Protobuf.Reflection { } } + /// <summary>Field number for the "deprecated" field.</summary> public const int DeprecatedFieldNumber = 3; private bool deprecated_; + /// <summary> + /// 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. + /// </summary> public bool Deprecated { get { return deprecated_; } set { @@ -3308,10 +3763,14 @@ namespace Google.Protobuf.Reflection { } } + /// <summary>Field number for the "uninterpreted_option" field.</summary> public const int UninterpretedOptionFieldNumber = 999; private static readonly pb::FieldCodec<global::Google.Protobuf.Reflection.UninterpretedOption> _repeated_uninterpretedOption_codec = pb::FieldCodec.ForMessage(7994, global::Google.Protobuf.Reflection.UninterpretedOption.Parser); private readonly pbc::RepeatedField<global::Google.Protobuf.Reflection.UninterpretedOption> uninterpretedOption_ = new pbc::RepeatedField<global::Google.Protobuf.Reflection.UninterpretedOption>(); + /// <summary> + /// The parser stores options it doesn't recognize here. See above. + /// </summary> public pbc::RepeatedField<global::Google.Protobuf.Reflection.UninterpretedOption> UninterpretedOption { get { return uninterpretedOption_; } } @@ -3435,8 +3894,15 @@ namespace Google.Protobuf.Reflection { return new EnumValueOptions(this); } + /// <summary>Field number for the "deprecated" field.</summary> public const int DeprecatedFieldNumber = 1; private bool deprecated_; + /// <summary> + /// 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. + /// </summary> public bool Deprecated { get { return deprecated_; } set { @@ -3444,10 +3910,14 @@ namespace Google.Protobuf.Reflection { } } + /// <summary>Field number for the "uninterpreted_option" field.</summary> public const int UninterpretedOptionFieldNumber = 999; private static readonly pb::FieldCodec<global::Google.Protobuf.Reflection.UninterpretedOption> _repeated_uninterpretedOption_codec = pb::FieldCodec.ForMessage(7994, global::Google.Protobuf.Reflection.UninterpretedOption.Parser); private readonly pbc::RepeatedField<global::Google.Protobuf.Reflection.UninterpretedOption> uninterpretedOption_ = new pbc::RepeatedField<global::Google.Protobuf.Reflection.UninterpretedOption>(); + /// <summary> + /// The parser stores options it doesn't recognize here. See above. + /// </summary> public pbc::RepeatedField<global::Google.Protobuf.Reflection.UninterpretedOption> UninterpretedOption { get { return uninterpretedOption_; } } @@ -3555,8 +4025,15 @@ namespace Google.Protobuf.Reflection { return new ServiceOptions(this); } + /// <summary>Field number for the "deprecated" field.</summary> public const int DeprecatedFieldNumber = 33; private bool deprecated_; + /// <summary> + /// 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. + /// </summary> public bool Deprecated { get { return deprecated_; } set { @@ -3564,10 +4041,14 @@ namespace Google.Protobuf.Reflection { } } + /// <summary>Field number for the "uninterpreted_option" field.</summary> public const int UninterpretedOptionFieldNumber = 999; private static readonly pb::FieldCodec<global::Google.Protobuf.Reflection.UninterpretedOption> _repeated_uninterpretedOption_codec = pb::FieldCodec.ForMessage(7994, global::Google.Protobuf.Reflection.UninterpretedOption.Parser); private readonly pbc::RepeatedField<global::Google.Protobuf.Reflection.UninterpretedOption> uninterpretedOption_ = new pbc::RepeatedField<global::Google.Protobuf.Reflection.UninterpretedOption>(); + /// <summary> + /// The parser stores options it doesn't recognize here. See above. + /// </summary> public pbc::RepeatedField<global::Google.Protobuf.Reflection.UninterpretedOption> UninterpretedOption { get { return uninterpretedOption_; } } @@ -3675,8 +4156,15 @@ namespace Google.Protobuf.Reflection { return new MethodOptions(this); } + /// <summary>Field number for the "deprecated" field.</summary> public const int DeprecatedFieldNumber = 33; private bool deprecated_; + /// <summary> + /// 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. + /// </summary> public bool Deprecated { get { return deprecated_; } set { @@ -3684,10 +4172,14 @@ namespace Google.Protobuf.Reflection { } } + /// <summary>Field number for the "uninterpreted_option" field.</summary> public const int UninterpretedOptionFieldNumber = 999; private static readonly pb::FieldCodec<global::Google.Protobuf.Reflection.UninterpretedOption> _repeated_uninterpretedOption_codec = pb::FieldCodec.ForMessage(7994, global::Google.Protobuf.Reflection.UninterpretedOption.Parser); private readonly pbc::RepeatedField<global::Google.Protobuf.Reflection.UninterpretedOption> uninterpretedOption_ = new pbc::RepeatedField<global::Google.Protobuf.Reflection.UninterpretedOption>(); + /// <summary> + /// The parser stores options it doesn't recognize here. See above. + /// </summary> public pbc::RepeatedField<global::Google.Protobuf.Reflection.UninterpretedOption> UninterpretedOption { get { return uninterpretedOption_; } } @@ -3767,6 +4259,14 @@ namespace Google.Protobuf.Reflection { } + /// <summary> + /// 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. + /// </summary> [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] internal sealed partial class UninterpretedOption : pb::IMessage<UninterpretedOption> { private static readonly pb::MessageParser<UninterpretedOption> _parser = new pb::MessageParser<UninterpretedOption>(() => new UninterpretedOption()); @@ -3800,6 +4300,7 @@ namespace Google.Protobuf.Reflection { return new UninterpretedOption(this); } + /// <summary>Field number for the "name" field.</summary> public const int NameFieldNumber = 2; private static readonly pb::FieldCodec<global::Google.Protobuf.Reflection.UninterpretedOption.Types.NamePart> _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_; } } + /// <summary>Field number for the "identifier_value" field.</summary> public const int IdentifierValueFieldNumber = 3; private string identifierValue_ = ""; + /// <summary> + /// The value of the uninterpreted option, in whatever type the tokenizer + /// identified it as during parsing. Exactly one of these should be set. + /// </summary> public string IdentifierValue { get { return identifierValue_; } set { @@ -3817,6 +4323,7 @@ namespace Google.Protobuf.Reflection { } } + /// <summary>Field number for the "positive_int_value" field.</summary> public const int PositiveIntValueFieldNumber = 4; private ulong positiveIntValue_; public ulong PositiveIntValue { @@ -3826,6 +4333,7 @@ namespace Google.Protobuf.Reflection { } } + /// <summary>Field number for the "negative_int_value" field.</summary> public const int NegativeIntValueFieldNumber = 5; private long negativeIntValue_; public long NegativeIntValue { @@ -3835,6 +4343,7 @@ namespace Google.Protobuf.Reflection { } } + /// <summary>Field number for the "double_value" field.</summary> public const int DoubleValueFieldNumber = 6; private double doubleValue_; public double DoubleValue { @@ -3844,6 +4353,7 @@ namespace Google.Protobuf.Reflection { } } + /// <summary>Field number for the "string_value" field.</summary> public const int StringValueFieldNumber = 7; private pb::ByteString stringValue_ = pb::ByteString.Empty; public pb::ByteString StringValue { @@ -3853,6 +4363,7 @@ namespace Google.Protobuf.Reflection { } } + /// <summary>Field number for the "aggregate_value" field.</summary> public const int AggregateValueFieldNumber = 8; private string aggregateValue_ = ""; public string AggregateValue { @@ -4019,6 +4530,13 @@ namespace Google.Protobuf.Reflection { /// <summary>Container for nested types declared in the UninterpretedOption message type.</summary> [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public static partial class Types { + /// <summary> + /// 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". + /// </summary> [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] internal sealed partial class NamePart : pb::IMessage<NamePart> { private static readonly pb::MessageParser<NamePart> _parser = new pb::MessageParser<NamePart>(() => new NamePart()); @@ -4047,6 +4565,7 @@ namespace Google.Protobuf.Reflection { return new NamePart(this); } + /// <summary>Field number for the "name_part" field.</summary> public const int NamePart_FieldNumber = 1; private string namePart_ = ""; public string NamePart_ { @@ -4056,6 +4575,7 @@ namespace Google.Protobuf.Reflection { } } + /// <summary>Field number for the "is_extension" field.</summary> public const int IsExtensionFieldNumber = 2; private bool isExtension_; public bool IsExtension { @@ -4152,6 +4672,10 @@ namespace Google.Protobuf.Reflection { } + /// <summary> + /// Encapsulates information about the original source file from which a + /// FileDescriptorProto was generated. + /// </summary> [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] internal sealed partial class SourceCodeInfo : pb::IMessage<SourceCodeInfo> { private static readonly pb::MessageParser<SourceCodeInfo> _parser = new pb::MessageParser<SourceCodeInfo>(() => new SourceCodeInfo()); @@ -4179,10 +4703,54 @@ namespace Google.Protobuf.Reflection { return new SourceCodeInfo(this); } + /// <summary>Field number for the "location" field.</summary> public const int LocationFieldNumber = 1; private static readonly pb::FieldCodec<global::Google.Protobuf.Reflection.SourceCodeInfo.Types.Location> _repeated_location_codec = pb::FieldCodec.ForMessage(10, global::Google.Protobuf.Reflection.SourceCodeInfo.Types.Location.Parser); private readonly pbc::RepeatedField<global::Google.Protobuf.Reflection.SourceCodeInfo.Types.Location> location_ = new pbc::RepeatedField<global::Google.Protobuf.Reflection.SourceCodeInfo.Types.Location>(); + /// <summary> + /// 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. + /// </summary> public pbc::RepeatedField<global::Google.Protobuf.Reflection.SourceCodeInfo.Types.Location> Location { get { return location_; } } @@ -4279,24 +4847,95 @@ namespace Google.Protobuf.Reflection { return new Location(this); } + /// <summary>Field number for the "path" field.</summary> public const int PathFieldNumber = 1; private static readonly pb::FieldCodec<int> _repeated_path_codec = pb::FieldCodec.ForInt32(10); private readonly pbc::RepeatedField<int> path_ = new pbc::RepeatedField<int>(); + /// <summary> + /// 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). + /// </summary> public pbc::RepeatedField<int> Path { get { return path_; } } + /// <summary>Field number for the "span" field.</summary> public const int SpanFieldNumber = 2; private static readonly pb::FieldCodec<int> _repeated_span_codec = pb::FieldCodec.ForInt32(18); private readonly pbc::RepeatedField<int> span_ = new pbc::RepeatedField<int>(); + /// <summary> + /// 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. + /// </summary> public pbc::RepeatedField<int> Span { get { return span_; } } + /// <summary>Field number for the "leading_comments" field.</summary> public const int LeadingCommentsFieldNumber = 3; private string leadingComments_ = ""; + /// <summary> + /// 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. + /// </summary> public string LeadingComments { get { return leadingComments_; } set { @@ -4304,6 +4943,7 @@ namespace Google.Protobuf.Reflection { } } + /// <summary>Field number for the "trailing_comments" field.</summary> public const int TrailingCommentsFieldNumber = 4; private string trailingComments_ = ""; public string TrailingComments { @@ -4313,6 +4953,7 @@ namespace Google.Protobuf.Reflection { } } + /// <summary>Field number for the "leading_detached_comments" field.</summary> public const int LeadingDetachedCommentsFieldNumber = 6; private static readonly pb::FieldCodec<string> _repeated_leadingDetachedComments_codec = pb::FieldCodec.ForString(50); diff --git a/csharp/src/Google.Protobuf/WellKnownTypes/Any.cs b/csharp/src/Google.Protobuf/WellKnownTypes/Any.cs index 6bcdfdef..4a704018 100644 --- a/csharp/src/Google.Protobuf/WellKnownTypes/Any.cs +++ b/csharp/src/Google.Protobuf/WellKnownTypes/Any.cs @@ -40,6 +40,33 @@ namespace Google.Protobuf.WellKnownTypes { } } #region Messages + /// <summary> + /// `Any` contains an arbitrary serialized message along with a URL + /// that describes the type of the serialized message. + /// JSON + /// ==== + /// The JSON representation of an `Any` value uses the regular + /// representation of the deserialized, embedded message, with an + /// additional field `@type` which contains the type URL. Example: + /// package google.profile; + /// message Person { + /// string first_name = 1; + /// string last_name = 2; + /// } + /// { + /// "@type": "type.googleapis.com/google.profile.Person", + /// "firstName": <string>, + /// "lastName": <string> + /// } + /// If the embedded message type is well-known and has a custom JSON + /// representation, that representation will be embedded adding a field + /// `value` which holds the custom JSON in addition to the the `@type` + /// field. Example (for message [google.protobuf.Duration][google.protobuf.Duration]): + /// { + /// "@type": "type.googleapis.com/google.protobuf.Duration", + /// "value": "1.212s" + /// } + /// </summary> [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public sealed partial class Any : pb::IMessage<Any> { private static readonly pb::MessageParser<Any> _parser = new pb::MessageParser<Any>(() => new Any()); @@ -68,8 +95,27 @@ namespace Google.Protobuf.WellKnownTypes { return new Any(this); } + /// <summary>Field number for the "type_url" field.</summary> public const int TypeUrlFieldNumber = 1; private string typeUrl_ = ""; + /// <summary> + /// A URL/resource name whose content describes the type of the + /// serialized message. + /// For URLs which use the schema `http`, `https`, or no schema, the + /// following restrictions and interpretations apply: + /// * If no schema is provided, `https` is assumed. + /// * The last segment of the URL's path must represent the fully + /// qualified name of the type (as in `path/google.protobuf.Duration`). + /// * An HTTP GET on the URL must yield a [google.protobuf.Type][google.protobuf.Type] + /// value in binary format, or produce an error. + /// * Applications are allowed to cache lookup results based on the + /// URL, or have them precompiled into a binary to avoid any + /// lookup. Therefore, binary compatibility needs to be preserved + /// on changes to types. (Use versioned type names to manage + /// breaking changes.) + /// Schemas other than `http`, `https` (or the empty schema) might be + /// used with implementation specific semantics. + /// </summary> public string TypeUrl { get { return typeUrl_; } set { @@ -77,8 +123,12 @@ namespace Google.Protobuf.WellKnownTypes { } } + /// <summary>Field number for the "value" field.</summary> public const int ValueFieldNumber = 2; private pb::ByteString value_ = pb::ByteString.Empty; + /// <summary> + /// Must be valid serialized data of the above specified type. + /// </summary> public pb::ByteString Value { get { return value_; } set { diff --git a/csharp/src/Google.Protobuf/WellKnownTypes/Api.cs b/csharp/src/Google.Protobuf/WellKnownTypes/Api.cs index f2166ca5..2c64314d 100644 --- a/csharp/src/Google.Protobuf/WellKnownTypes/Api.cs +++ b/csharp/src/Google.Protobuf/WellKnownTypes/Api.cs @@ -54,6 +54,9 @@ namespace Google.Protobuf.WellKnownTypes { } } #region Messages + /// <summary> + /// Api is a light-weight descriptor for a protocol buffer service. + /// </summary> [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public sealed partial class Api : pb::IMessage<Api> { private static readonly pb::MessageParser<Api> _parser = new pb::MessageParser<Api>(() => new Api()); @@ -87,8 +90,13 @@ namespace Google.Protobuf.WellKnownTypes { return new Api(this); } + /// <summary>Field number for the "name" field.</summary> public const int NameFieldNumber = 1; private string name_ = ""; + /// <summary> + /// The fully qualified name of this api, including package name + /// followed by the api's simple name. + /// </summary> public string Name { get { return name_; } set { @@ -96,24 +104,53 @@ namespace Google.Protobuf.WellKnownTypes { } } + /// <summary>Field number for the "methods" field.</summary> public const int MethodsFieldNumber = 2; private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownTypes.Method> _repeated_methods_codec = pb::FieldCodec.ForMessage(18, global::Google.Protobuf.WellKnownTypes.Method.Parser); private readonly pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Method> methods_ = new pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Method>(); + /// <summary> + /// The methods of this api, in unspecified order. + /// </summary> public pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Method> Methods { get { return methods_; } } + /// <summary>Field number for the "options" field.</summary> public const int OptionsFieldNumber = 3; private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownTypes.Option> _repeated_options_codec = pb::FieldCodec.ForMessage(26, global::Google.Protobuf.WellKnownTypes.Option.Parser); private readonly pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Option> options_ = new pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Option>(); + /// <summary> + /// Any metadata attached to the API. + /// </summary> public pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Option> Options { get { return options_; } } + /// <summary>Field number for the "version" field.</summary> public const int VersionFieldNumber = 4; private string version_ = ""; + /// <summary> + /// A version string for this api. If specified, must have the form + /// `major-version.minor-version`, as in `1.10`. If the minor version + /// is omitted, it defaults to zero. If the entire version field is + /// empty, the major version is derived from the package name, as + /// outlined below. If the field is not empty, the version in the + /// package name will be verified to be consistent with what is + /// provided here. + /// The versioning schema uses [semantic + /// versioning](http://semver.org) where the major version number + /// indicates a breaking change and the minor version an additive, + /// non-breaking change. Both version numbers are signals to users + /// what to expect from different versions, and should be carefully + /// chosen based on the product plan. + /// The major version is also reflected in the package name of the + /// API, which must end in `v<major-version>`, as in + /// `google.feature.v1`. For major versions 0 and 1, the suffix can + /// be omitted. Zero major versions must only be used for + /// experimental, none-GA apis. + /// </summary> public string Version { get { return version_; } set { @@ -121,8 +158,13 @@ namespace Google.Protobuf.WellKnownTypes { } } + /// <summary>Field number for the "source_context" field.</summary> public const int SourceContextFieldNumber = 5; private global::Google.Protobuf.WellKnownTypes.SourceContext sourceContext_; + /// <summary> + /// Source context for the protocol buffer service represented by this + /// message. + /// </summary> public global::Google.Protobuf.WellKnownTypes.SourceContext SourceContext { get { return sourceContext_; } set { @@ -130,16 +172,24 @@ namespace Google.Protobuf.WellKnownTypes { } } + /// <summary>Field number for the "mixins" field.</summary> public const int MixinsFieldNumber = 6; private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownTypes.Mixin> _repeated_mixins_codec = pb::FieldCodec.ForMessage(50, global::Google.Protobuf.WellKnownTypes.Mixin.Parser); private readonly pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Mixin> mixins_ = new pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Mixin>(); + /// <summary> + /// Included APIs. See [Mixin][]. + /// </summary> public pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Mixin> Mixins { get { return mixins_; } } + /// <summary>Field number for the "syntax" field.</summary> public const int SyntaxFieldNumber = 7; private global::Google.Protobuf.WellKnownTypes.Syntax syntax_ = global::Google.Protobuf.WellKnownTypes.Syntax.SYNTAX_PROTO2; + /// <summary> + /// The source syntax of the service. + /// </summary> public global::Google.Protobuf.WellKnownTypes.Syntax Syntax { get { return syntax_; } set { @@ -294,6 +344,9 @@ namespace Google.Protobuf.WellKnownTypes { } + /// <summary> + /// Method represents a method of an api. + /// </summary> [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public sealed partial class Method : pb::IMessage<Method> { private static readonly pb::MessageParser<Method> _parser = new pb::MessageParser<Method>(() => new Method()); @@ -327,8 +380,12 @@ namespace Google.Protobuf.WellKnownTypes { return new Method(this); } + /// <summary>Field number for the "name" field.</summary> public const int NameFieldNumber = 1; private string name_ = ""; + /// <summary> + /// The simple name of this method. + /// </summary> public string Name { get { return name_; } set { @@ -336,8 +393,12 @@ namespace Google.Protobuf.WellKnownTypes { } } + /// <summary>Field number for the "request_type_url" field.</summary> public const int RequestTypeUrlFieldNumber = 2; private string requestTypeUrl_ = ""; + /// <summary> + /// A URL of the input message type. + /// </summary> public string RequestTypeUrl { get { return requestTypeUrl_; } set { @@ -345,8 +406,12 @@ namespace Google.Protobuf.WellKnownTypes { } } + /// <summary>Field number for the "request_streaming" field.</summary> public const int RequestStreamingFieldNumber = 3; private bool requestStreaming_; + /// <summary> + /// If true, the request is streamed. + /// </summary> public bool RequestStreaming { get { return requestStreaming_; } set { @@ -354,8 +419,12 @@ namespace Google.Protobuf.WellKnownTypes { } } + /// <summary>Field number for the "response_type_url" field.</summary> public const int ResponseTypeUrlFieldNumber = 4; private string responseTypeUrl_ = ""; + /// <summary> + /// The URL of the output message type. + /// </summary> public string ResponseTypeUrl { get { return responseTypeUrl_; } set { @@ -363,8 +432,12 @@ namespace Google.Protobuf.WellKnownTypes { } } + /// <summary>Field number for the "response_streaming" field.</summary> public const int ResponseStreamingFieldNumber = 5; private bool responseStreaming_; + /// <summary> + /// If true, the response is streamed. + /// </summary> public bool ResponseStreaming { get { return responseStreaming_; } set { @@ -372,16 +445,24 @@ namespace Google.Protobuf.WellKnownTypes { } } + /// <summary>Field number for the "options" field.</summary> public const int OptionsFieldNumber = 6; private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownTypes.Option> _repeated_options_codec = pb::FieldCodec.ForMessage(50, global::Google.Protobuf.WellKnownTypes.Option.Parser); private readonly pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Option> options_ = new pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Option>(); + /// <summary> + /// Any metadata attached to the method. + /// </summary> public pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Option> Options { get { return options_; } } + /// <summary>Field number for the "syntax" field.</summary> public const int SyntaxFieldNumber = 7; private global::Google.Protobuf.WellKnownTypes.Syntax syntax_ = global::Google.Protobuf.WellKnownTypes.Syntax.SYNTAX_PROTO2; + /// <summary> + /// The source syntax of this method. + /// </summary> public global::Google.Protobuf.WellKnownTypes.Syntax Syntax { get { return syntax_; } set { @@ -544,6 +625,70 @@ namespace Google.Protobuf.WellKnownTypes { } + /// <summary> + /// Declares an API to be included in this API. The including API must + /// redeclare all the methods from the included API, but documentation + /// and options are inherited as follows: + /// - If after comment and whitespace stripping, the documentation + /// string of the redeclared method is empty, it will be inherited + /// from the original method. + /// - Each annotation belonging to the service config (http, + /// visibility) which is not set in the redeclared method will be + /// inherited. + /// - If an http annotation is inherited, the path pattern will be + /// modified as follows. Any version prefix will be replaced by the + /// version of the including API plus the [root][] path if specified. + /// Example of a simple mixin: + /// package google.acl.v1; + /// service AccessControl { + /// // Get the underlying ACL object. + /// rpc GetAcl(GetAclRequest) returns (Acl) { + /// option (google.api.http).get = "/v1/{resource=**}:getAcl"; + /// } + /// } + /// package google.storage.v2; + /// service Storage { + /// // (-- see AccessControl.GetAcl --) + /// rpc GetAcl(GetAclRequest) returns (Acl); + /// // Get a data record. + /// rpc GetData(GetDataRequest) returns (Data) { + /// option (google.api.http).get = "/v2/{resource=**}"; + /// } + /// } + /// Example of a mixin configuration: + /// apis: + /// - name: google.storage.v2.Storage + /// mixins: + /// - name: google.acl.v1.AccessControl + /// The mixin construct implies that all methods in `AccessControl` are + /// also declared with same name and request/response types in + /// `Storage`. A documentation generator or annotation processor will + /// see the effective `Storage.GetAcl` method after inherting + /// documentation and annotations as follows: + /// service Storage { + /// // Get the underlying ACL object. + /// rpc GetAcl(GetAclRequest) returns (Acl) { + /// option (google.api.http).get = "/v2/{resource=**}:getAcl"; + /// } + /// ... + /// } + /// Note how the version in the path pattern changed from `v1` to `v2`. + /// If the `root` field in the mixin is specified, it should be a + /// relative path under which inherited HTTP paths are placed. Example: + /// apis: + /// - name: google.storage.v2.Storage + /// mixins: + /// - name: google.acl.v1.AccessControl + /// root: acls + /// This implies the following inherited HTTP annotation: + /// service Storage { + /// // Get the underlying ACL object. + /// rpc GetAcl(GetAclRequest) returns (Acl) { + /// option (google.api.http).get = "/v2/acls/{resource=**}:getAcl"; + /// } + /// ... + /// } + /// </summary> [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public sealed partial class Mixin : pb::IMessage<Mixin> { private static readonly pb::MessageParser<Mixin> _parser = new pb::MessageParser<Mixin>(() => new Mixin()); @@ -572,8 +717,12 @@ namespace Google.Protobuf.WellKnownTypes { return new Mixin(this); } + /// <summary>Field number for the "name" field.</summary> public const int NameFieldNumber = 1; private string name_ = ""; + /// <summary> + /// The fully qualified name of the API which is included. + /// </summary> public string Name { get { return name_; } set { @@ -581,8 +730,13 @@ namespace Google.Protobuf.WellKnownTypes { } } + /// <summary>Field number for the "root" field.</summary> public const int RootFieldNumber = 2; private string root_ = ""; + /// <summary> + /// If non-empty specifies a path under which inherited HTTP paths + /// are rooted. + /// </summary> public string Root { get { return root_; } set { diff --git a/csharp/src/Google.Protobuf/WellKnownTypes/Duration.cs b/csharp/src/Google.Protobuf/WellKnownTypes/Duration.cs index e671eac8..39251e2e 100644 --- a/csharp/src/Google.Protobuf/WellKnownTypes/Duration.cs +++ b/csharp/src/Google.Protobuf/WellKnownTypes/Duration.cs @@ -41,6 +41,40 @@ namespace Google.Protobuf.WellKnownTypes { } } #region Messages + /// <summary> + /// A Duration represents a signed, fixed-length span of time represented + /// as a count of seconds and fractions of seconds at nanosecond + /// resolution. It is independent of any calendar and concepts like "day" + /// or "month". It is related to Timestamp in that the difference between + /// two Timestamp values is a Duration and it can be added or subtracted + /// from a Timestamp. Range is approximately +-10,000 years. + /// Example 1: Compute Duration from two Timestamps in pseudo code. + /// Timestamp start = ...; + /// Timestamp end = ...; + /// Duration duration = ...; + /// duration.seconds = end.seconds - start.seconds; + /// duration.nanos = end.nanos - start.nanos; + /// if (duration.seconds < 0 && duration.nanos > 0) { + /// duration.seconds += 1; + /// duration.nanos -= 1000000000; + /// } else if (durations.seconds > 0 && duration.nanos < 0) { + /// duration.seconds -= 1; + /// duration.nanos += 1000000000; + /// } + /// Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. + /// Timestamp start = ...; + /// Duration duration = ...; + /// Timestamp end = ...; + /// end.seconds = start.seconds + duration.seconds; + /// end.nanos = start.nanos + duration.nanos; + /// if (end.nanos < 0) { + /// end.seconds -= 1; + /// end.nanos += 1000000000; + /// } else if (end.nanos >= 1000000000) { + /// end.seconds += 1; + /// end.nanos -= 1000000000; + /// } + /// </summary> [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public sealed partial class Duration : pb::IMessage<Duration> { private static readonly pb::MessageParser<Duration> _parser = new pb::MessageParser<Duration>(() => new Duration()); @@ -69,8 +103,13 @@ namespace Google.Protobuf.WellKnownTypes { return new Duration(this); } + /// <summary>Field number for the "seconds" field.</summary> public const int SecondsFieldNumber = 1; private long seconds_; + /// <summary> + /// Signed seconds of the span of time. Must be from -315,576,000,000 + /// to +315,576,000,000 inclusive. + /// </summary> public long Seconds { get { return seconds_; } set { @@ -78,8 +117,17 @@ namespace Google.Protobuf.WellKnownTypes { } } + /// <summary>Field number for the "nanos" field.</summary> public const int NanosFieldNumber = 2; private int nanos_; + /// <summary> + /// Signed fractions of a second at nanosecond resolution of the span + /// of time. Durations less than one second are represented with a 0 + /// `seconds` field and a positive or negative `nanos` field. For durations + /// of one second or more, a non-zero value for the `nanos` field must be + /// of the same sign as the `seconds` field. Must be from -999,999,999 + /// to +999,999,999 inclusive. + /// </summary> public int Nanos { get { return nanos_; } set { diff --git a/csharp/src/Google.Protobuf/WellKnownTypes/Empty.cs b/csharp/src/Google.Protobuf/WellKnownTypes/Empty.cs index 050f7476..18223a9e 100644 --- a/csharp/src/Google.Protobuf/WellKnownTypes/Empty.cs +++ b/csharp/src/Google.Protobuf/WellKnownTypes/Empty.cs @@ -40,6 +40,15 @@ namespace Google.Protobuf.WellKnownTypes { } } #region Messages + /// <summary> + /// A generic empty message that you can re-use to avoid defining duplicated + /// empty messages in your APIs. A typical example is to use it as the request + /// or the response type of an API method. For instance: + /// service Foo { + /// rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); + /// } + /// The JSON representation for `Empty` is empty JSON object `{}`. + /// </summary> [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public sealed partial class Empty : pb::IMessage<Empty> { private static readonly pb::MessageParser<Empty> _parser = new pb::MessageParser<Empty>(() => new Empty()); diff --git a/csharp/src/Google.Protobuf/WellKnownTypes/FieldMask.cs b/csharp/src/Google.Protobuf/WellKnownTypes/FieldMask.cs index 14acf394..33c814ef 100644 --- a/csharp/src/Google.Protobuf/WellKnownTypes/FieldMask.cs +++ b/csharp/src/Google.Protobuf/WellKnownTypes/FieldMask.cs @@ -40,6 +40,103 @@ namespace Google.Protobuf.WellKnownTypes { } } #region Messages + /// <summary> + /// `FieldMask` represents a set of symbolic field paths, for example: + /// paths: "f.a" + /// paths: "f.b.d" + /// Here `f` represents a field in some root message, `a` and `b` + /// fields in the message found in `f`, and `d` a field found in the + /// message in `f.b`. + /// Field masks are used to specify a subset of fields that should be + /// returned by a get operation or modified by an update operation. + /// Field masks also have a custom JSON encoding (see below). + /// # Field Masks in Projections + /// When used in the context of a projection, a response message or + /// sub-message is filtered by the API to only contain those fields as + /// specified in the mask. For example, if the mask in the previous + /// example is applied to a response message as follows: + /// f { + /// a : 22 + /// b { + /// d : 1 + /// x : 2 + /// } + /// y : 13 + /// } + /// z: 8 + /// The result will not contain specific values for fields x,y and z + /// (there value will be set to the default, and omitted in proto text + /// output): + /// f { + /// a : 22 + /// b { + /// d : 1 + /// } + /// } + /// A repeated field is not allowed except at the last position of a + /// field mask. + /// If a FieldMask object is not present in a get operation, the + /// operation applies to all fields (as if a FieldMask of all fields + /// had been specified). + /// Note that a field mask does not necessarily applies to the + /// top-level response message. In case of a REST get operation, the + /// field mask applies directly to the response, but in case of a REST + /// list operation, the mask instead applies to each individual message + /// in the returned resource list. In case of a REST custom method, + /// other definitions may be used. Where the mask applies will be + /// clearly documented together with its declaration in the API. In + /// any case, the effect on the returned resource/resources is required + /// behavior for APIs. + /// # Field Masks in Update Operations + /// A field mask in update operations specifies which fields of the + /// targeted resource are going to be updated. The API is required + /// to only change the values of the fields as specified in the mask + /// and leave the others untouched. If a resource is passed in to + /// describe the updated values, the API ignores the values of all + /// fields not covered by the mask. + /// In order to reset a field's value to the default, the field must + /// be in the mask and set to the default value in the provided resource. + /// Hence, in order to reset all fields of a resource, provide a default + /// instance of the resource and set all fields in the mask, or do + /// not provide a mask as described below. + /// If a field mask is not present on update, the operation applies to + /// all fields (as if a field mask of all fields has been specified). + /// Note that in the presence of schema evolution, this may mean that + /// fields the client does not know and has therefore not filled into + /// the request will be reset to their default. If this is unwanted + /// behavior, a specific service may require a client to always specify + /// a field mask, producing an error if not. + /// As with get operations, the location of the resource which + /// describes the updated values in the request message depends on the + /// operation kind. In any case, the effect of the field mask is + /// required to be honored by the API. + /// ## Considerations for HTTP REST + /// The HTTP kind of an update operation which uses a field mask must + /// be set to PATCH instead of PUT in order to satisfy HTTP semantics + /// (PUT must only be used for full updates). + /// # JSON Encoding of Field Masks + /// In JSON, a field mask is encoded as a single string where paths are + /// separated by a comma. Fields name in each path are converted + /// to/from lower-camel naming conventions. + /// As an example, consider the following message declarations: + /// message Profile { + /// User user = 1; + /// Photo photo = 2; + /// } + /// message User { + /// string display_name = 1; + /// string address = 2; + /// } + /// In proto a field mask for `Profile` may look as such: + /// mask { + /// paths: "user.display_name" + /// paths: "photo" + /// } + /// In JSON, the same mask is represented as below: + /// { + /// mask: "user.displayName,photo" + /// } + /// </summary> [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public sealed partial class FieldMask : pb::IMessage<FieldMask> { private static readonly pb::MessageParser<FieldMask> _parser = new pb::MessageParser<FieldMask>(() => new FieldMask()); @@ -67,10 +164,14 @@ namespace Google.Protobuf.WellKnownTypes { return new FieldMask(this); } + /// <summary>Field number for the "paths" field.</summary> public const int PathsFieldNumber = 1; private static readonly pb::FieldCodec<string> _repeated_paths_codec = pb::FieldCodec.ForString(10); private readonly pbc::RepeatedField<string> paths_ = new pbc::RepeatedField<string>(); + /// <summary> + /// The set of field mask paths. + /// </summary> public pbc::RepeatedField<string> Paths { get { return paths_; } } diff --git a/csharp/src/Google.Protobuf/WellKnownTypes/SourceContext.cs b/csharp/src/Google.Protobuf/WellKnownTypes/SourceContext.cs index e4d063b0..d87c54bd 100644 --- a/csharp/src/Google.Protobuf/WellKnownTypes/SourceContext.cs +++ b/csharp/src/Google.Protobuf/WellKnownTypes/SourceContext.cs @@ -41,6 +41,10 @@ namespace Google.Protobuf.WellKnownTypes { } } #region Messages + /// <summary> + /// `SourceContext` represents information about the source of a + /// protobuf element, like the file in which it is defined. + /// </summary> [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public sealed partial class SourceContext : pb::IMessage<SourceContext> { private static readonly pb::MessageParser<SourceContext> _parser = new pb::MessageParser<SourceContext>(() => new SourceContext()); @@ -68,8 +72,13 @@ namespace Google.Protobuf.WellKnownTypes { return new SourceContext(this); } + /// <summary>Field number for the "file_name" field.</summary> public const int FileNameFieldNumber = 1; private string fileName_ = ""; + /// <summary> + /// The path-qualified name of the .proto file that contained the associated + /// protobuf element. For example: `"google/protobuf/source.proto"`. + /// </summary> public string FileName { get { return fileName_; } set { diff --git a/csharp/src/Google.Protobuf/WellKnownTypes/Struct.cs b/csharp/src/Google.Protobuf/WellKnownTypes/Struct.cs index 257d52d8..a9961bea 100644 --- a/csharp/src/Google.Protobuf/WellKnownTypes/Struct.cs +++ b/csharp/src/Google.Protobuf/WellKnownTypes/Struct.cs @@ -52,13 +52,30 @@ namespace Google.Protobuf.WellKnownTypes { } } #region Enums + /// <summary> + /// `NullValue` is a singleton enumeration to represent the null value for the + /// `Value` type union. + /// The JSON representation for `NullValue` is JSON `null`. + /// </summary> public enum NullValue { + /// <summary> + /// Null value. + /// </summary> NULL_VALUE = 0, } #endregion #region Messages + /// <summary> + /// `Struct` represents a structured data value, consisting of fields + /// which map to dynamically typed values. In some languages, `Struct` + /// might be supported by a native representation. For example, in + /// scripting languages like JS a struct is represented as an + /// object. The details of that representation are described together + /// with the proto support for the language. + /// The JSON representation for `Struct` is JSON object. + /// </summary> [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public sealed partial class Struct : pb::IMessage<Struct> { private static readonly pb::MessageParser<Struct> _parser = new pb::MessageParser<Struct>(() => new Struct()); @@ -86,10 +103,14 @@ namespace Google.Protobuf.WellKnownTypes { return new Struct(this); } + /// <summary>Field number for the "fields" field.</summary> public const int FieldsFieldNumber = 1; private static readonly pbc::MapField<string, global::Google.Protobuf.WellKnownTypes.Value>.Codec _map_fields_codec = new pbc::MapField<string, global::Google.Protobuf.WellKnownTypes.Value>.Codec(pb::FieldCodec.ForString(10), pb::FieldCodec.ForMessage(18, global::Google.Protobuf.WellKnownTypes.Value.Parser), 10); private readonly pbc::MapField<string, global::Google.Protobuf.WellKnownTypes.Value> fields_ = new pbc::MapField<string, global::Google.Protobuf.WellKnownTypes.Value>(); + /// <summary> + /// Map of dynamically typed values. + /// </summary> public pbc::MapField<string, global::Google.Protobuf.WellKnownTypes.Value> Fields { get { return fields_; } } @@ -153,6 +174,13 @@ namespace Google.Protobuf.WellKnownTypes { } + /// <summary> + /// `Value` represents a dynamically typed value which can be either + /// null, a number, a string, a boolean, a recursive struct value, or a + /// list of values. A producer of value is expected to set one of that + /// variants, absence of any variant indicates an error. + /// The JSON representation for `Value` is JSON value. + /// </summary> [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public sealed partial class Value : pb::IMessage<Value> { private static readonly pb::MessageParser<Value> _parser = new pb::MessageParser<Value>(() => new Value()); @@ -200,7 +228,11 @@ namespace Google.Protobuf.WellKnownTypes { return new Value(this); } + /// <summary>Field number for the "null_value" field.</summary> public const int NullValueFieldNumber = 1; + /// <summary> + /// Represents a null value. + /// </summary> public global::Google.Protobuf.WellKnownTypes.NullValue NullValue { get { return kindCase_ == KindOneofCase.NullValue ? (global::Google.Protobuf.WellKnownTypes.NullValue) kind_ : global::Google.Protobuf.WellKnownTypes.NullValue.NULL_VALUE; } set { @@ -209,7 +241,11 @@ namespace Google.Protobuf.WellKnownTypes { } } + /// <summary>Field number for the "number_value" field.</summary> public const int NumberValueFieldNumber = 2; + /// <summary> + /// Represents a double value. + /// </summary> public double NumberValue { get { return kindCase_ == KindOneofCase.NumberValue ? (double) kind_ : 0D; } set { @@ -218,7 +254,11 @@ namespace Google.Protobuf.WellKnownTypes { } } + /// <summary>Field number for the "string_value" field.</summary> public const int StringValueFieldNumber = 3; + /// <summary> + /// Represents a string value. + /// </summary> public string StringValue { get { return kindCase_ == KindOneofCase.StringValue ? (string) kind_ : ""; } set { @@ -227,7 +267,11 @@ namespace Google.Protobuf.WellKnownTypes { } } + /// <summary>Field number for the "bool_value" field.</summary> public const int BoolValueFieldNumber = 4; + /// <summary> + /// Represents a boolean value. + /// </summary> public bool BoolValue { get { return kindCase_ == KindOneofCase.BoolValue ? (bool) kind_ : false; } set { @@ -236,7 +280,11 @@ namespace Google.Protobuf.WellKnownTypes { } } + /// <summary>Field number for the "struct_value" field.</summary> public const int StructValueFieldNumber = 5; + /// <summary> + /// Represents a structured value. + /// </summary> public global::Google.Protobuf.WellKnownTypes.Struct StructValue { get { return kindCase_ == KindOneofCase.StructValue ? (global::Google.Protobuf.WellKnownTypes.Struct) kind_ : null; } set { @@ -245,7 +293,11 @@ namespace Google.Protobuf.WellKnownTypes { } } + /// <summary>Field number for the "list_value" field.</summary> public const int ListValueFieldNumber = 6; + /// <summary> + /// Represents a repeated `Value`. + /// </summary> public global::Google.Protobuf.WellKnownTypes.ListValue ListValue { get { return kindCase_ == KindOneofCase.ListValue ? (global::Google.Protobuf.WellKnownTypes.ListValue) kind_ : null; } set { @@ -435,6 +487,10 @@ namespace Google.Protobuf.WellKnownTypes { } + /// <summary> + /// `ListValue` is a wrapper around a repeated field of values. + /// The JSON representation for `ListValue` is JSON array. + /// </summary> [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public sealed partial class ListValue : pb::IMessage<ListValue> { private static readonly pb::MessageParser<ListValue> _parser = new pb::MessageParser<ListValue>(() => new ListValue()); @@ -462,10 +518,14 @@ namespace Google.Protobuf.WellKnownTypes { return new ListValue(this); } + /// <summary>Field number for the "values" field.</summary> public const int ValuesFieldNumber = 1; private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownTypes.Value> _repeated_values_codec = pb::FieldCodec.ForMessage(10, global::Google.Protobuf.WellKnownTypes.Value.Parser); private readonly pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Value> values_ = new pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Value>(); + /// <summary> + /// Repeated field of dynamically typed values. + /// </summary> public pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Value> Values { get { return values_; } } diff --git a/csharp/src/Google.Protobuf/WellKnownTypes/Timestamp.cs b/csharp/src/Google.Protobuf/WellKnownTypes/Timestamp.cs index 6b186b37..f372f8fd 100644 --- a/csharp/src/Google.Protobuf/WellKnownTypes/Timestamp.cs +++ b/csharp/src/Google.Protobuf/WellKnownTypes/Timestamp.cs @@ -41,6 +41,47 @@ namespace Google.Protobuf.WellKnownTypes { } } #region Messages + /// <summary> + /// A Timestamp represents a point in time independent of any time zone + /// or calendar, represented as seconds and fractions of seconds at + /// nanosecond resolution in UTC Epoch time. It is encoded using the + /// Proleptic Gregorian Calendar which extends the Gregorian calendar + /// backwards to year one. It is encoded assuming all minutes are 60 + /// seconds long, i.e. leap seconds are "smeared" so that no leap second + /// table is needed for interpretation. Range is from + /// 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. + /// By restricting to that range, we ensure that we can convert to + /// and from RFC 3339 date strings. + /// See [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt). + /// Example 1: Compute Timestamp from POSIX `time()`. + /// Timestamp timestamp; + /// timestamp.set_seconds(time(NULL)); + /// timestamp.set_nanos(0); + /// Example 2: Compute Timestamp from POSIX `gettimeofday()`. + /// struct timeval tv; + /// gettimeofday(&tv, NULL); + /// Timestamp timestamp; + /// timestamp.set_seconds(tv.tv_sec); + /// timestamp.set_nanos(tv.tv_usec * 1000); + /// Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + /// FILETIME ft; + /// GetSystemTimeAsFileTime(&ft); + /// UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + /// // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + /// // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + /// Timestamp timestamp; + /// timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + /// timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + /// Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + /// long millis = System.currentTimeMillis(); + /// Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + /// .setNanos((int) ((millis % 1000) * 1000000)).build(); + /// Example 5: Compute Timestamp from current time in Python. + /// now = time.time() + /// seconds = int(now) + /// nanos = int((now - seconds) * 10**9) + /// timestamp = Timestamp(seconds=seconds, nanos=nanos) + /// </summary> [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public sealed partial class Timestamp : pb::IMessage<Timestamp> { private static readonly pb::MessageParser<Timestamp> _parser = new pb::MessageParser<Timestamp>(() => new Timestamp()); @@ -69,8 +110,14 @@ namespace Google.Protobuf.WellKnownTypes { return new Timestamp(this); } + /// <summary>Field number for the "seconds" field.</summary> public const int SecondsFieldNumber = 1; private long seconds_; + /// <summary> + /// Represents seconds of UTC time since Unix epoch + /// 1970-01-01T00:00:00Z. Must be from from 0001-01-01T00:00:00Z to + /// 9999-12-31T23:59:59Z inclusive. + /// </summary> public long Seconds { get { return seconds_; } set { @@ -78,8 +125,15 @@ namespace Google.Protobuf.WellKnownTypes { } } + /// <summary>Field number for the "nanos" field.</summary> public const int NanosFieldNumber = 2; private int nanos_; + /// <summary> + /// Non-negative fractions of a second at nanosecond resolution. Negative + /// second values with fractions must still have non-negative nanos values + /// that count forward in time. Must be from 0 to 999,999,999 + /// inclusive. + /// </summary> public int Nanos { get { return nanos_; } set { diff --git a/csharp/src/Google.Protobuf/WellKnownTypes/Type.cs b/csharp/src/Google.Protobuf/WellKnownTypes/Type.cs index 48039d66..3be90853 100644 --- a/csharp/src/Google.Protobuf/WellKnownTypes/Type.cs +++ b/csharp/src/Google.Protobuf/WellKnownTypes/Type.cs @@ -74,14 +74,26 @@ namespace Google.Protobuf.WellKnownTypes { } } #region Enums + /// <summary> + /// Syntax specifies the syntax in which a service element was defined. + /// </summary> public enum Syntax { + /// <summary> + /// Syntax "proto2" + /// </summary> SYNTAX_PROTO2 = 0, + /// <summary> + /// Syntax "proto3" + /// </summary> SYNTAX_PROTO3 = 1, } #endregion #region Messages + /// <summary> + /// A light-weight descriptor for a proto message type. + /// </summary> [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public sealed partial class Type : pb::IMessage<Type> { private static readonly pb::MessageParser<Type> _parser = new pb::MessageParser<Type>(() => new Type()); @@ -114,8 +126,12 @@ namespace Google.Protobuf.WellKnownTypes { return new Type(this); } + /// <summary>Field number for the "name" field.</summary> public const int NameFieldNumber = 1; private string name_ = ""; + /// <summary> + /// The fully qualified message name. + /// </summary> public string Name { get { return name_; } set { @@ -123,32 +139,48 @@ namespace Google.Protobuf.WellKnownTypes { } } + /// <summary>Field number for the "fields" field.</summary> public const int FieldsFieldNumber = 2; private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownTypes.Field> _repeated_fields_codec = pb::FieldCodec.ForMessage(18, global::Google.Protobuf.WellKnownTypes.Field.Parser); private readonly pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Field> fields_ = new pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Field>(); + /// <summary> + /// The list of fields. + /// </summary> public pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Field> Fields { get { return fields_; } } + /// <summary>Field number for the "oneofs" field.</summary> public const int OneofsFieldNumber = 3; private static readonly pb::FieldCodec<string> _repeated_oneofs_codec = pb::FieldCodec.ForString(26); private readonly pbc::RepeatedField<string> oneofs_ = new pbc::RepeatedField<string>(); + /// <summary> + /// The list of oneof definitions. + /// </summary> public pbc::RepeatedField<string> Oneofs { get { return oneofs_; } } + /// <summary>Field number for the "options" field.</summary> public const int OptionsFieldNumber = 4; private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownTypes.Option> _repeated_options_codec = pb::FieldCodec.ForMessage(34, global::Google.Protobuf.WellKnownTypes.Option.Parser); private readonly pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Option> options_ = new pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Option>(); + /// <summary> + /// The proto options. + /// </summary> public pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Option> Options { get { return options_; } } + /// <summary>Field number for the "source_context" field.</summary> public const int SourceContextFieldNumber = 5; private global::Google.Protobuf.WellKnownTypes.SourceContext sourceContext_; + /// <summary> + /// The source context. + /// </summary> public global::Google.Protobuf.WellKnownTypes.SourceContext SourceContext { get { return sourceContext_; } set { @@ -156,8 +188,12 @@ namespace Google.Protobuf.WellKnownTypes { } } + /// <summary>Field number for the "syntax" field.</summary> public const int SyntaxFieldNumber = 6; private global::Google.Protobuf.WellKnownTypes.Syntax syntax_ = global::Google.Protobuf.WellKnownTypes.Syntax.SYNTAX_PROTO2; + /// <summary> + /// The source syntax. + /// </summary> public global::Google.Protobuf.WellKnownTypes.Syntax Syntax { get { return syntax_; } set { @@ -296,6 +332,9 @@ namespace Google.Protobuf.WellKnownTypes { } + /// <summary> + /// Field represents a single field of a message type. + /// </summary> [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public sealed partial class Field : pb::IMessage<Field> { private static readonly pb::MessageParser<Field> _parser = new pb::MessageParser<Field>(() => new Field()); @@ -331,8 +370,12 @@ namespace Google.Protobuf.WellKnownTypes { return new Field(this); } + /// <summary>Field number for the "kind" field.</summary> public const int KindFieldNumber = 1; private global::Google.Protobuf.WellKnownTypes.Field.Types.Kind kind_ = global::Google.Protobuf.WellKnownTypes.Field.Types.Kind.TYPE_UNKNOWN; + /// <summary> + /// The field kind. + /// </summary> public global::Google.Protobuf.WellKnownTypes.Field.Types.Kind Kind { get { return kind_; } set { @@ -340,8 +383,12 @@ namespace Google.Protobuf.WellKnownTypes { } } + /// <summary>Field number for the "cardinality" field.</summary> public const int CardinalityFieldNumber = 2; private global::Google.Protobuf.WellKnownTypes.Field.Types.Cardinality cardinality_ = global::Google.Protobuf.WellKnownTypes.Field.Types.Cardinality.CARDINALITY_UNKNOWN; + /// <summary> + /// The field cardinality, i.e. optional/required/repeated. + /// </summary> public global::Google.Protobuf.WellKnownTypes.Field.Types.Cardinality Cardinality { get { return cardinality_; } set { @@ -349,8 +396,12 @@ namespace Google.Protobuf.WellKnownTypes { } } + /// <summary>Field number for the "number" field.</summary> public const int NumberFieldNumber = 3; private int number_; + /// <summary> + /// The proto field number. + /// </summary> public int Number { get { return number_; } set { @@ -358,8 +409,12 @@ namespace Google.Protobuf.WellKnownTypes { } } + /// <summary>Field number for the "name" field.</summary> public const int NameFieldNumber = 4; private string name_ = ""; + /// <summary> + /// The field name. + /// </summary> public string Name { get { return name_; } set { @@ -367,8 +422,13 @@ namespace Google.Protobuf.WellKnownTypes { } } + /// <summary>Field number for the "type_url" field.</summary> public const int TypeUrlFieldNumber = 6; private string typeUrl_ = ""; + /// <summary> + /// The type URL (without the scheme) when the type is MESSAGE or ENUM, + /// such as `type.googleapis.com/google.protobuf.Empty`. + /// </summary> public string TypeUrl { get { return typeUrl_; } set { @@ -376,8 +436,12 @@ namespace Google.Protobuf.WellKnownTypes { } } + /// <summary>Field number for the "oneof_index" field.</summary> public const int OneofIndexFieldNumber = 7; private int oneofIndex_; + /// <summary> + /// Index in Type.oneofs. Starts at 1. Zero means no oneof mapping. + /// </summary> public int OneofIndex { get { return oneofIndex_; } set { @@ -385,8 +449,12 @@ namespace Google.Protobuf.WellKnownTypes { } } + /// <summary>Field number for the "packed" field.</summary> public const int PackedFieldNumber = 8; private bool packed_; + /// <summary> + /// Whether to use alternative packed wire representation. + /// </summary> public bool Packed { get { return packed_; } set { @@ -394,16 +462,24 @@ namespace Google.Protobuf.WellKnownTypes { } } + /// <summary>Field number for the "options" field.</summary> public const int OptionsFieldNumber = 9; private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownTypes.Option> _repeated_options_codec = pb::FieldCodec.ForMessage(74, global::Google.Protobuf.WellKnownTypes.Option.Parser); private readonly pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Option> options_ = new pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Option>(); + /// <summary> + /// The proto options. + /// </summary> public pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Option> Options { get { return options_; } } + /// <summary>Field number for the "json_name" field.</summary> public const int JsonNameFieldNumber = 10; private string jsonName_ = ""; + /// <summary> + /// The JSON name for this field. + /// </summary> public string JsonName { get { return jsonName_; } set { @@ -600,32 +676,108 @@ namespace Google.Protobuf.WellKnownTypes { /// <summary>Container for nested types declared in the Field message type.</summary> [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public static partial class Types { + /// <summary> + /// Kind represents a basic field type. + /// </summary> public enum Kind { + /// <summary> + /// Field type unknown. + /// </summary> TYPE_UNKNOWN = 0, + /// <summary> + /// Field type double. + /// </summary> TYPE_DOUBLE = 1, + /// <summary> + /// Field type float. + /// </summary> TYPE_FLOAT = 2, + /// <summary> + /// Field type int64. + /// </summary> TYPE_INT64 = 3, + /// <summary> + /// Field type uint64. + /// </summary> TYPE_UINT64 = 4, + /// <summary> + /// Field type int32. + /// </summary> TYPE_INT32 = 5, + /// <summary> + /// Field type fixed64. + /// </summary> TYPE_FIXED64 = 6, + /// <summary> + /// Field type fixed32. + /// </summary> TYPE_FIXED32 = 7, + /// <summary> + /// Field type bool. + /// </summary> TYPE_BOOL = 8, + /// <summary> + /// Field type string. + /// </summary> TYPE_STRING = 9, + /// <summary> + /// Field type group (deprecated proto2 type) + /// </summary> TYPE_GROUP = 10, + /// <summary> + /// Field type message. + /// </summary> TYPE_MESSAGE = 11, + /// <summary> + /// Field type bytes. + /// </summary> TYPE_BYTES = 12, + /// <summary> + /// Field type uint32. + /// </summary> TYPE_UINT32 = 13, + /// <summary> + /// Field type enum. + /// </summary> TYPE_ENUM = 14, + /// <summary> + /// Field type sfixed32. + /// </summary> TYPE_SFIXED32 = 15, + /// <summary> + /// Field type sfixed64. + /// </summary> TYPE_SFIXED64 = 16, + /// <summary> + /// Field type sint32. + /// </summary> TYPE_SINT32 = 17, + /// <summary> + /// Field type sint64. + /// </summary> TYPE_SINT64 = 18, } + /// <summary> + /// Cardinality represents whether a field is optional, required, or + /// repeated. + /// </summary> public enum Cardinality { + /// <summary> + /// The field cardinality is unknown. Typically an error condition. + /// </summary> CARDINALITY_UNKNOWN = 0, + /// <summary> + /// For optional fields. + /// </summary> CARDINALITY_OPTIONAL = 1, + /// <summary> + /// For required fields. Not used for proto3. + /// </summary> CARDINALITY_REQUIRED = 2, + /// <summary> + /// For repeated fields. + /// </summary> CARDINALITY_REPEATED = 3, } @@ -634,6 +786,9 @@ namespace Google.Protobuf.WellKnownTypes { } + /// <summary> + /// Enum type definition. + /// </summary> [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public sealed partial class Enum : pb::IMessage<Enum> { private static readonly pb::MessageParser<Enum> _parser = new pb::MessageParser<Enum>(() => new Enum()); @@ -665,8 +820,12 @@ namespace Google.Protobuf.WellKnownTypes { return new Enum(this); } + /// <summary>Field number for the "name" field.</summary> public const int NameFieldNumber = 1; private string name_ = ""; + /// <summary> + /// Enum type name. + /// </summary> public string Name { get { return name_; } set { @@ -674,24 +833,36 @@ namespace Google.Protobuf.WellKnownTypes { } } + /// <summary>Field number for the "enumvalue" field.</summary> public const int EnumvalueFieldNumber = 2; private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownTypes.EnumValue> _repeated_enumvalue_codec = pb::FieldCodec.ForMessage(18, global::Google.Protobuf.WellKnownTypes.EnumValue.Parser); private readonly pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.EnumValue> enumvalue_ = new pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.EnumValue>(); + /// <summary> + /// Enum value definitions. + /// </summary> public pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.EnumValue> Enumvalue { get { return enumvalue_; } } + /// <summary>Field number for the "options" field.</summary> public const int OptionsFieldNumber = 3; private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownTypes.Option> _repeated_options_codec = pb::FieldCodec.ForMessage(26, global::Google.Protobuf.WellKnownTypes.Option.Parser); private readonly pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Option> options_ = new pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Option>(); + /// <summary> + /// Proto options for the enum type. + /// </summary> public pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Option> Options { get { return options_; } } + /// <summary>Field number for the "source_context" field.</summary> public const int SourceContextFieldNumber = 4; private global::Google.Protobuf.WellKnownTypes.SourceContext sourceContext_; + /// <summary> + /// The source context. + /// </summary> public global::Google.Protobuf.WellKnownTypes.SourceContext SourceContext { get { return sourceContext_; } set { @@ -699,8 +870,12 @@ namespace Google.Protobuf.WellKnownTypes { } } + /// <summary>Field number for the "syntax" field.</summary> public const int SyntaxFieldNumber = 5; private global::Google.Protobuf.WellKnownTypes.Syntax syntax_ = global::Google.Protobuf.WellKnownTypes.Syntax.SYNTAX_PROTO2; + /// <summary> + /// The source syntax. + /// </summary> public global::Google.Protobuf.WellKnownTypes.Syntax Syntax { get { return syntax_; } set { @@ -830,6 +1005,9 @@ namespace Google.Protobuf.WellKnownTypes { } + /// <summary> + /// Enum value definition. + /// </summary> [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public sealed partial class EnumValue : pb::IMessage<EnumValue> { private static readonly pb::MessageParser<EnumValue> _parser = new pb::MessageParser<EnumValue>(() => new EnumValue()); @@ -859,8 +1037,12 @@ namespace Google.Protobuf.WellKnownTypes { return new EnumValue(this); } + /// <summary>Field number for the "name" field.</summary> public const int NameFieldNumber = 1; private string name_ = ""; + /// <summary> + /// Enum value name. + /// </summary> public string Name { get { return name_; } set { @@ -868,8 +1050,12 @@ namespace Google.Protobuf.WellKnownTypes { } } + /// <summary>Field number for the "number" field.</summary> public const int NumberFieldNumber = 2; private int number_; + /// <summary> + /// Enum value number. + /// </summary> public int Number { get { return number_; } set { @@ -877,10 +1063,14 @@ namespace Google.Protobuf.WellKnownTypes { } } + /// <summary>Field number for the "options" field.</summary> public const int OptionsFieldNumber = 3; private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownTypes.Option> _repeated_options_codec = pb::FieldCodec.ForMessage(26, global::Google.Protobuf.WellKnownTypes.Option.Parser); private readonly pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Option> options_ = new pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Option>(); + /// <summary> + /// Proto options for the enum value. + /// </summary> public pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Option> Options { get { return options_; } } @@ -976,6 +1166,9 @@ namespace Google.Protobuf.WellKnownTypes { } + /// <summary> + /// Proto option attached to messages/fields/enums etc. + /// </summary> [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public sealed partial class Option : pb::IMessage<Option> { private static readonly pb::MessageParser<Option> _parser = new pb::MessageParser<Option>(() => new Option()); @@ -1004,8 +1197,12 @@ namespace Google.Protobuf.WellKnownTypes { return new Option(this); } + /// <summary>Field number for the "name" field.</summary> public const int NameFieldNumber = 1; private string name_ = ""; + /// <summary> + /// Proto option name. + /// </summary> public string Name { get { return name_; } set { @@ -1013,8 +1210,12 @@ namespace Google.Protobuf.WellKnownTypes { } } + /// <summary>Field number for the "value" field.</summary> public const int ValueFieldNumber = 2; private global::Google.Protobuf.WellKnownTypes.Any value_; + /// <summary> + /// Proto option value. + /// </summary> public global::Google.Protobuf.WellKnownTypes.Any Value { get { return value_; } set { diff --git a/csharp/src/Google.Protobuf/WellKnownTypes/Wrappers.cs b/csharp/src/Google.Protobuf/WellKnownTypes/Wrappers.cs index e5d9e7d4..d26395f8 100644 --- a/csharp/src/Google.Protobuf/WellKnownTypes/Wrappers.cs +++ b/csharp/src/Google.Protobuf/WellKnownTypes/Wrappers.cs @@ -50,6 +50,10 @@ namespace Google.Protobuf.WellKnownTypes { } #region Messages + /// <summary> + /// Wrapper message for `double`. + /// The JSON representation for `DoubleValue` is JSON number. + /// </summary> [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public sealed partial class DoubleValue : pb::IMessage<DoubleValue> { private static readonly pb::MessageParser<DoubleValue> _parser = new pb::MessageParser<DoubleValue>(() => new DoubleValue()); @@ -77,8 +81,12 @@ namespace Google.Protobuf.WellKnownTypes { return new DoubleValue(this); } + /// <summary>Field number for the "value" field.</summary> public const int ValueFieldNumber = 1; private double value_; + /// <summary> + /// The double value. + /// </summary> public double Value { get { return value_; } set { @@ -152,6 +160,10 @@ namespace Google.Protobuf.WellKnownTypes { } + /// <summary> + /// Wrapper message for `float`. + /// The JSON representation for `FloatValue` is JSON number. + /// </summary> [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public sealed partial class FloatValue : pb::IMessage<FloatValue> { private static readonly pb::MessageParser<FloatValue> _parser = new pb::MessageParser<FloatValue>(() => new FloatValue()); @@ -179,8 +191,12 @@ namespace Google.Protobuf.WellKnownTypes { return new FloatValue(this); } + /// <summary>Field number for the "value" field.</summary> public const int ValueFieldNumber = 1; private float value_; + /// <summary> + /// The float value. + /// </summary> public float Value { get { return value_; } set { @@ -254,6 +270,10 @@ namespace Google.Protobuf.WellKnownTypes { } + /// <summary> + /// Wrapper message for `int64`. + /// The JSON representation for `Int64Value` is JSON string. + /// </summary> [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public sealed partial class Int64Value : pb::IMessage<Int64Value> { private static readonly pb::MessageParser<Int64Value> _parser = new pb::MessageParser<Int64Value>(() => new Int64Value()); @@ -281,8 +301,12 @@ namespace Google.Protobuf.WellKnownTypes { return new Int64Value(this); } + /// <summary>Field number for the "value" field.</summary> public const int ValueFieldNumber = 1; private long value_; + /// <summary> + /// The int64 value. + /// </summary> public long Value { get { return value_; } set { @@ -356,6 +380,10 @@ namespace Google.Protobuf.WellKnownTypes { } + /// <summary> + /// Wrapper message for `uint64`. + /// The JSON representation for `UInt64Value` is JSON string. + /// </summary> [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public sealed partial class UInt64Value : pb::IMessage<UInt64Value> { private static readonly pb::MessageParser<UInt64Value> _parser = new pb::MessageParser<UInt64Value>(() => new UInt64Value()); @@ -383,8 +411,12 @@ namespace Google.Protobuf.WellKnownTypes { return new UInt64Value(this); } + /// <summary>Field number for the "value" field.</summary> public const int ValueFieldNumber = 1; private ulong value_; + /// <summary> + /// The uint64 value. + /// </summary> public ulong Value { get { return value_; } set { @@ -458,6 +490,10 @@ namespace Google.Protobuf.WellKnownTypes { } + /// <summary> + /// Wrapper message for `int32`. + /// The JSON representation for `Int32Value` is JSON number. + /// </summary> [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public sealed partial class Int32Value : pb::IMessage<Int32Value> { private static readonly pb::MessageParser<Int32Value> _parser = new pb::MessageParser<Int32Value>(() => new Int32Value()); @@ -485,8 +521,12 @@ namespace Google.Protobuf.WellKnownTypes { return new Int32Value(this); } + /// <summary>Field number for the "value" field.</summary> public const int ValueFieldNumber = 1; private int value_; + /// <summary> + /// The int32 value. + /// </summary> public int Value { get { return value_; } set { @@ -560,6 +600,10 @@ namespace Google.Protobuf.WellKnownTypes { } + /// <summary> + /// Wrapper message for `uint32`. + /// The JSON representation for `UInt32Value` is JSON number. + /// </summary> [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public sealed partial class UInt32Value : pb::IMessage<UInt32Value> { private static readonly pb::MessageParser<UInt32Value> _parser = new pb::MessageParser<UInt32Value>(() => new UInt32Value()); @@ -587,8 +631,12 @@ namespace Google.Protobuf.WellKnownTypes { return new UInt32Value(this); } + /// <summary>Field number for the "value" field.</summary> public const int ValueFieldNumber = 1; private uint value_; + /// <summary> + /// The uint32 value. + /// </summary> public uint Value { get { return value_; } set { @@ -662,6 +710,10 @@ namespace Google.Protobuf.WellKnownTypes { } + /// <summary> + /// Wrapper message for `bool`. + /// The JSON representation for `BoolValue` is JSON `true` and `false`. + /// </summary> [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public sealed partial class BoolValue : pb::IMessage<BoolValue> { private static readonly pb::MessageParser<BoolValue> _parser = new pb::MessageParser<BoolValue>(() => new BoolValue()); @@ -689,8 +741,12 @@ namespace Google.Protobuf.WellKnownTypes { return new BoolValue(this); } + /// <summary>Field number for the "value" field.</summary> public const int ValueFieldNumber = 1; private bool value_; + /// <summary> + /// The bool value. + /// </summary> public bool Value { get { return value_; } set { @@ -764,6 +820,10 @@ namespace Google.Protobuf.WellKnownTypes { } + /// <summary> + /// Wrapper message for `string`. + /// The JSON representation for `StringValue` is JSON string. + /// </summary> [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public sealed partial class StringValue : pb::IMessage<StringValue> { private static readonly pb::MessageParser<StringValue> _parser = new pb::MessageParser<StringValue>(() => new StringValue()); @@ -791,8 +851,12 @@ namespace Google.Protobuf.WellKnownTypes { return new StringValue(this); } + /// <summary>Field number for the "value" field.</summary> public const int ValueFieldNumber = 1; private string value_ = ""; + /// <summary> + /// The string value. + /// </summary> public string Value { get { return value_; } set { @@ -866,6 +930,10 @@ namespace Google.Protobuf.WellKnownTypes { } + /// <summary> + /// Wrapper message for `bytes`. + /// The JSON representation for `BytesValue` is JSON string. + /// </summary> [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public sealed partial class BytesValue : pb::IMessage<BytesValue> { private static readonly pb::MessageParser<BytesValue> _parser = new pb::MessageParser<BytesValue>(() => new BytesValue()); @@ -893,8 +961,12 @@ namespace Google.Protobuf.WellKnownTypes { return new BytesValue(this); } + /// <summary>Field number for the "value" field.</summary> public const int ValueFieldNumber = 1; private pb::ByteString value_ = pb::ByteString.Empty; + /// <summary> + /// The bytes value. + /// </summary> public pb::ByteString Value { get { return value_; } set { |