From 18e0a2e5ec883d665a4e8fe57a1eb3e603340de7 Mon Sep 17 00:00:00 2001 From: Jon Skeet Date: Thu, 1 Oct 2015 10:38:01 +0100 Subject: Generated code from previous commit. --- csharp/src/Google.Protobuf/WellKnownTypes/Type.cs | 201 ++++++++++++++++++++++ 1 file changed, 201 insertions(+) (limited to 'csharp/src/Google.Protobuf/WellKnownTypes/Type.cs') 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 + /// + /// Syntax specifies the syntax in which a service element was defined. + /// public enum Syntax { + /// + /// Syntax "proto2" + /// SYNTAX_PROTO2 = 0, + /// + /// Syntax "proto3" + /// SYNTAX_PROTO3 = 1, } #endregion #region Messages + /// + /// A light-weight descriptor for a proto message type. + /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public sealed partial class Type : pb::IMessage { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Type()); @@ -114,8 +126,12 @@ namespace Google.Protobuf.WellKnownTypes { return new Type(this); } + /// Field number for the "name" field. public const int NameFieldNumber = 1; private string name_ = ""; + /// + /// The fully qualified message name. + /// public string Name { get { return name_; } set { @@ -123,32 +139,48 @@ namespace Google.Protobuf.WellKnownTypes { } } + /// Field number for the "fields" field. public const int FieldsFieldNumber = 2; private static readonly pb::FieldCodec _repeated_fields_codec = pb::FieldCodec.ForMessage(18, global::Google.Protobuf.WellKnownTypes.Field.Parser); private readonly pbc::RepeatedField fields_ = new pbc::RepeatedField(); + /// + /// The list of fields. + /// public pbc::RepeatedField Fields { get { return fields_; } } + /// Field number for the "oneofs" field. public const int OneofsFieldNumber = 3; private static readonly pb::FieldCodec _repeated_oneofs_codec = pb::FieldCodec.ForString(26); private readonly pbc::RepeatedField oneofs_ = new pbc::RepeatedField(); + /// + /// The list of oneof definitions. + /// public pbc::RepeatedField Oneofs { get { return oneofs_; } } + /// Field number for the "options" field. public const int OptionsFieldNumber = 4; private static readonly pb::FieldCodec _repeated_options_codec = pb::FieldCodec.ForMessage(34, global::Google.Protobuf.WellKnownTypes.Option.Parser); private readonly pbc::RepeatedField options_ = new pbc::RepeatedField(); + /// + /// The proto options. + /// public pbc::RepeatedField Options { get { return options_; } } + /// Field number for the "source_context" field. public const int SourceContextFieldNumber = 5; private global::Google.Protobuf.WellKnownTypes.SourceContext sourceContext_; + /// + /// The source context. + /// public global::Google.Protobuf.WellKnownTypes.SourceContext SourceContext { get { return sourceContext_; } set { @@ -156,8 +188,12 @@ namespace Google.Protobuf.WellKnownTypes { } } + /// Field number for the "syntax" field. public const int SyntaxFieldNumber = 6; private global::Google.Protobuf.WellKnownTypes.Syntax syntax_ = global::Google.Protobuf.WellKnownTypes.Syntax.SYNTAX_PROTO2; + /// + /// The source syntax. + /// public global::Google.Protobuf.WellKnownTypes.Syntax Syntax { get { return syntax_; } set { @@ -296,6 +332,9 @@ namespace Google.Protobuf.WellKnownTypes { } + /// + /// Field represents a single field of a message type. + /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public sealed partial class Field : pb::IMessage { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Field()); @@ -331,8 +370,12 @@ namespace Google.Protobuf.WellKnownTypes { return new Field(this); } + /// Field number for the "kind" field. public const int KindFieldNumber = 1; private global::Google.Protobuf.WellKnownTypes.Field.Types.Kind kind_ = global::Google.Protobuf.WellKnownTypes.Field.Types.Kind.TYPE_UNKNOWN; + /// + /// The field kind. + /// public global::Google.Protobuf.WellKnownTypes.Field.Types.Kind Kind { get { return kind_; } set { @@ -340,8 +383,12 @@ namespace Google.Protobuf.WellKnownTypes { } } + /// Field number for the "cardinality" field. public const int CardinalityFieldNumber = 2; private global::Google.Protobuf.WellKnownTypes.Field.Types.Cardinality cardinality_ = global::Google.Protobuf.WellKnownTypes.Field.Types.Cardinality.CARDINALITY_UNKNOWN; + /// + /// The field cardinality, i.e. optional/required/repeated. + /// public global::Google.Protobuf.WellKnownTypes.Field.Types.Cardinality Cardinality { get { return cardinality_; } set { @@ -349,8 +396,12 @@ namespace Google.Protobuf.WellKnownTypes { } } + /// Field number for the "number" field. public const int NumberFieldNumber = 3; private int number_; + /// + /// The proto field number. + /// public int Number { get { return number_; } set { @@ -358,8 +409,12 @@ namespace Google.Protobuf.WellKnownTypes { } } + /// Field number for the "name" field. public const int NameFieldNumber = 4; private string name_ = ""; + /// + /// The field name. + /// public string Name { get { return name_; } set { @@ -367,8 +422,13 @@ namespace Google.Protobuf.WellKnownTypes { } } + /// Field number for the "type_url" field. public const int TypeUrlFieldNumber = 6; private string typeUrl_ = ""; + /// + /// The type URL (without the scheme) when the type is MESSAGE or ENUM, + /// such as `type.googleapis.com/google.protobuf.Empty`. + /// public string TypeUrl { get { return typeUrl_; } set { @@ -376,8 +436,12 @@ namespace Google.Protobuf.WellKnownTypes { } } + /// Field number for the "oneof_index" field. public const int OneofIndexFieldNumber = 7; private int oneofIndex_; + /// + /// Index in Type.oneofs. Starts at 1. Zero means no oneof mapping. + /// public int OneofIndex { get { return oneofIndex_; } set { @@ -385,8 +449,12 @@ namespace Google.Protobuf.WellKnownTypes { } } + /// Field number for the "packed" field. public const int PackedFieldNumber = 8; private bool packed_; + /// + /// Whether to use alternative packed wire representation. + /// public bool Packed { get { return packed_; } set { @@ -394,16 +462,24 @@ namespace Google.Protobuf.WellKnownTypes { } } + /// Field number for the "options" field. public const int OptionsFieldNumber = 9; private static readonly pb::FieldCodec _repeated_options_codec = pb::FieldCodec.ForMessage(74, global::Google.Protobuf.WellKnownTypes.Option.Parser); private readonly pbc::RepeatedField options_ = new pbc::RepeatedField(); + /// + /// The proto options. + /// public pbc::RepeatedField Options { get { return options_; } } + /// Field number for the "json_name" field. public const int JsonNameFieldNumber = 10; private string jsonName_ = ""; + /// + /// The JSON name for this field. + /// public string JsonName { get { return jsonName_; } set { @@ -600,32 +676,108 @@ namespace Google.Protobuf.WellKnownTypes { /// Container for nested types declared in the Field message type. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public static partial class Types { + /// + /// Kind represents a basic field type. + /// public enum Kind { + /// + /// Field type unknown. + /// TYPE_UNKNOWN = 0, + /// + /// Field type double. + /// TYPE_DOUBLE = 1, + /// + /// Field type float. + /// TYPE_FLOAT = 2, + /// + /// Field type int64. + /// TYPE_INT64 = 3, + /// + /// Field type uint64. + /// TYPE_UINT64 = 4, + /// + /// Field type int32. + /// TYPE_INT32 = 5, + /// + /// Field type fixed64. + /// TYPE_FIXED64 = 6, + /// + /// Field type fixed32. + /// TYPE_FIXED32 = 7, + /// + /// Field type bool. + /// TYPE_BOOL = 8, + /// + /// Field type string. + /// TYPE_STRING = 9, + /// + /// Field type group (deprecated proto2 type) + /// TYPE_GROUP = 10, + /// + /// Field type message. + /// TYPE_MESSAGE = 11, + /// + /// Field type bytes. + /// TYPE_BYTES = 12, + /// + /// Field type uint32. + /// TYPE_UINT32 = 13, + /// + /// Field type enum. + /// TYPE_ENUM = 14, + /// + /// Field type sfixed32. + /// TYPE_SFIXED32 = 15, + /// + /// Field type sfixed64. + /// TYPE_SFIXED64 = 16, + /// + /// Field type sint32. + /// TYPE_SINT32 = 17, + /// + /// Field type sint64. + /// TYPE_SINT64 = 18, } + /// + /// Cardinality represents whether a field is optional, required, or + /// repeated. + /// public enum Cardinality { + /// + /// The field cardinality is unknown. Typically an error condition. + /// CARDINALITY_UNKNOWN = 0, + /// + /// For optional fields. + /// CARDINALITY_OPTIONAL = 1, + /// + /// For required fields. Not used for proto3. + /// CARDINALITY_REQUIRED = 2, + /// + /// For repeated fields. + /// CARDINALITY_REPEATED = 3, } @@ -634,6 +786,9 @@ namespace Google.Protobuf.WellKnownTypes { } + /// + /// Enum type definition. + /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public sealed partial class Enum : pb::IMessage { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Enum()); @@ -665,8 +820,12 @@ namespace Google.Protobuf.WellKnownTypes { return new Enum(this); } + /// Field number for the "name" field. public const int NameFieldNumber = 1; private string name_ = ""; + /// + /// Enum type name. + /// public string Name { get { return name_; } set { @@ -674,24 +833,36 @@ namespace Google.Protobuf.WellKnownTypes { } } + /// Field number for the "enumvalue" field. public const int EnumvalueFieldNumber = 2; private static readonly pb::FieldCodec _repeated_enumvalue_codec = pb::FieldCodec.ForMessage(18, global::Google.Protobuf.WellKnownTypes.EnumValue.Parser); private readonly pbc::RepeatedField enumvalue_ = new pbc::RepeatedField(); + /// + /// Enum value definitions. + /// public pbc::RepeatedField Enumvalue { get { return enumvalue_; } } + /// Field number for the "options" field. public const int OptionsFieldNumber = 3; private static readonly pb::FieldCodec _repeated_options_codec = pb::FieldCodec.ForMessage(26, global::Google.Protobuf.WellKnownTypes.Option.Parser); private readonly pbc::RepeatedField options_ = new pbc::RepeatedField(); + /// + /// Proto options for the enum type. + /// public pbc::RepeatedField Options { get { return options_; } } + /// Field number for the "source_context" field. public const int SourceContextFieldNumber = 4; private global::Google.Protobuf.WellKnownTypes.SourceContext sourceContext_; + /// + /// The source context. + /// public global::Google.Protobuf.WellKnownTypes.SourceContext SourceContext { get { return sourceContext_; } set { @@ -699,8 +870,12 @@ namespace Google.Protobuf.WellKnownTypes { } } + /// Field number for the "syntax" field. public const int SyntaxFieldNumber = 5; private global::Google.Protobuf.WellKnownTypes.Syntax syntax_ = global::Google.Protobuf.WellKnownTypes.Syntax.SYNTAX_PROTO2; + /// + /// The source syntax. + /// public global::Google.Protobuf.WellKnownTypes.Syntax Syntax { get { return syntax_; } set { @@ -830,6 +1005,9 @@ namespace Google.Protobuf.WellKnownTypes { } + /// + /// Enum value definition. + /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public sealed partial class EnumValue : pb::IMessage { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new EnumValue()); @@ -859,8 +1037,12 @@ namespace Google.Protobuf.WellKnownTypes { return new EnumValue(this); } + /// Field number for the "name" field. public const int NameFieldNumber = 1; private string name_ = ""; + /// + /// Enum value name. + /// public string Name { get { return name_; } set { @@ -868,8 +1050,12 @@ namespace Google.Protobuf.WellKnownTypes { } } + /// Field number for the "number" field. public const int NumberFieldNumber = 2; private int number_; + /// + /// Enum value number. + /// public int Number { get { return number_; } set { @@ -877,10 +1063,14 @@ namespace Google.Protobuf.WellKnownTypes { } } + /// Field number for the "options" field. public const int OptionsFieldNumber = 3; private static readonly pb::FieldCodec _repeated_options_codec = pb::FieldCodec.ForMessage(26, global::Google.Protobuf.WellKnownTypes.Option.Parser); private readonly pbc::RepeatedField options_ = new pbc::RepeatedField(); + /// + /// Proto options for the enum value. + /// public pbc::RepeatedField Options { get { return options_; } } @@ -976,6 +1166,9 @@ namespace Google.Protobuf.WellKnownTypes { } + /// + /// Proto option attached to messages/fields/enums etc. + /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public sealed partial class Option : pb::IMessage