// // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/protobuf/type.proto // #pragma warning disable 1591, 0612, 3021 #region Designer generated code using pb = global::Google.Protobuf; using pbc = global::Google.Protobuf.Collections; using pbr = global::Google.Protobuf.Reflection; using scg = global::System.Collections.Generic; namespace Google.Protobuf.WellKnownTypes { /// Holder for reflection information generated from google/protobuf/type.proto public static partial class TypeReflection { #region Descriptor /// File descriptor for google/protobuf/type.proto public static pbr::FileDescriptor Descriptor { get { return descriptor; } } private static pbr::FileDescriptor descriptor; static TypeReflection() { byte[] descriptorData = global::System.Convert.FromBase64String( string.Concat( "Chpnb29nbGUvcHJvdG9idWYvdHlwZS5wcm90bxIPZ29vZ2xlLnByb3RvYnVm", "Ghlnb29nbGUvcHJvdG9idWYvYW55LnByb3RvGiRnb29nbGUvcHJvdG9idWYv", "c291cmNlX2NvbnRleHQucHJvdG8i1wEKBFR5cGUSDAoEbmFtZRgBIAEoCRIm", "CgZmaWVsZHMYAiADKAsyFi5nb29nbGUucHJvdG9idWYuRmllbGQSDgoGb25l", "b2ZzGAMgAygJEigKB29wdGlvbnMYBCADKAsyFy5nb29nbGUucHJvdG9idWYu", "T3B0aW9uEjYKDnNvdXJjZV9jb250ZXh0GAUgASgLMh4uZ29vZ2xlLnByb3Rv", "YnVmLlNvdXJjZUNvbnRleHQSJwoGc3ludGF4GAYgASgOMhcuZ29vZ2xlLnBy", "b3RvYnVmLlN5bnRheCLVBQoFRmllbGQSKQoEa2luZBgBIAEoDjIbLmdvb2ds", "ZS5wcm90b2J1Zi5GaWVsZC5LaW5kEjcKC2NhcmRpbmFsaXR5GAIgASgOMiIu", "Z29vZ2xlLnByb3RvYnVmLkZpZWxkLkNhcmRpbmFsaXR5Eg4KBm51bWJlchgD", "IAEoBRIMCgRuYW1lGAQgASgJEhAKCHR5cGVfdXJsGAYgASgJEhMKC29uZW9m", "X2luZGV4GAcgASgFEg4KBnBhY2tlZBgIIAEoCBIoCgdvcHRpb25zGAkgAygL", "MhcuZ29vZ2xlLnByb3RvYnVmLk9wdGlvbhIRCglqc29uX25hbWUYCiABKAkS", "FQoNZGVmYXVsdF92YWx1ZRgLIAEoCSLIAgoES2luZBIQCgxUWVBFX1VOS05P", "V04QABIPCgtUWVBFX0RPVUJMRRABEg4KClRZUEVfRkxPQVQQAhIOCgpUWVBF", "X0lOVDY0EAMSDwoLVFlQRV9VSU5UNjQQBBIOCgpUWVBFX0lOVDMyEAUSEAoM", "VFlQRV9GSVhFRDY0EAYSEAoMVFlQRV9GSVhFRDMyEAcSDQoJVFlQRV9CT09M", "EAgSDwoLVFlQRV9TVFJJTkcQCRIOCgpUWVBFX0dST1VQEAoSEAoMVFlQRV9N", "RVNTQUdFEAsSDgoKVFlQRV9CWVRFUxAMEg8KC1RZUEVfVUlOVDMyEA0SDQoJ", "VFlQRV9FTlVNEA4SEQoNVFlQRV9TRklYRUQzMhAPEhEKDVRZUEVfU0ZJWEVE", "NjQQEBIPCgtUWVBFX1NJTlQzMhAREg8KC1RZUEVfU0lOVDY0EBIidAoLQ2Fy", "ZGluYWxpdHkSFwoTQ0FSRElOQUxJVFlfVU5LTk9XThAAEhgKFENBUkRJTkFM", "SVRZX09QVElPTkFMEAESGAoUQ0FSRElOQUxJVFlfUkVRVUlSRUQQAhIYChRD", "QVJESU5BTElUWV9SRVBFQVRFRBADIs4BCgRFbnVtEgwKBG5hbWUYASABKAkS", "LQoJZW51bXZhbHVlGAIgAygLMhouZ29vZ2xlLnByb3RvYnVmLkVudW1WYWx1", "ZRIoCgdvcHRpb25zGAMgAygLMhcuZ29vZ2xlLnByb3RvYnVmLk9wdGlvbhI2", "Cg5zb3VyY2VfY29udGV4dBgEIAEoCzIeLmdvb2dsZS5wcm90b2J1Zi5Tb3Vy", "Y2VDb250ZXh0EicKBnN5bnRheBgFIAEoDjIXLmdvb2dsZS5wcm90b2J1Zi5T", "eW50YXgiUwoJRW51bVZhbHVlEgwKBG5hbWUYASABKAkSDgoGbnVtYmVyGAIg", "ASgFEigKB29wdGlvbnMYAyADKAsyFy5nb29nbGUucHJvdG9idWYuT3B0aW9u", "IjsKBk9wdGlvbhIMCgRuYW1lGAEgASgJEiMKBXZhbHVlGAIgASgLMhQuZ29v", "Z2xlLnByb3RvYnVmLkFueSouCgZTeW50YXgSEQoNU1lOVEFYX1BST1RPMhAA", "EhEKDVNZTlRBWF9QUk9UTzMQAUJ9ChNjb20uZ29vZ2xlLnByb3RvYnVmQglU", "eXBlUHJvdG9QAVovZ29vZ2xlLmdvbGFuZy5vcmcvZ2VucHJvdG8vcHJvdG9i", "dWYvcHR5cGU7cHR5cGX4AQGiAgNHUEKqAh5Hb29nbGUuUHJvdG9idWYuV2Vs", "bEtub3duVHlwZXNiBnByb3RvMw==")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { global::Google.Protobuf.WellKnownTypes.AnyReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.SourceContextReflection.Descriptor, }, new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Google.Protobuf.WellKnownTypes.Syntax), }, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.WellKnownTypes.Type), global::Google.Protobuf.WellKnownTypes.Type.Parser, new[]{ "Name", "Fields", "Oneofs", "Options", "SourceContext", "Syntax" }, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.WellKnownTypes.Field), global::Google.Protobuf.WellKnownTypes.Field.Parser, new[]{ "Kind", "Cardinality", "Number", "Name", "TypeUrl", "OneofIndex", "Packed", "Options", "JsonName", "DefaultValue" }, null, new[]{ typeof(global::Google.Protobuf.WellKnownTypes.Field.Types.Kind), typeof(global::Google.Protobuf.WellKnownTypes.Field.Types.Cardinality) }, null), new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.WellKnownTypes.Enum), global::Google.Protobuf.WellKnownTypes.Enum.Parser, new[]{ "Name", "Enumvalue", "Options", "SourceContext", "Syntax" }, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.WellKnownTypes.EnumValue), global::Google.Protobuf.WellKnownTypes.EnumValue.Parser, new[]{ "Name", "Number", "Options" }, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.WellKnownTypes.Option), global::Google.Protobuf.WellKnownTypes.Option.Parser, new[]{ "Name", "Value" }, null, null, null) })); } #endregion } #region Enums /// /// The syntax in which a protocol buffer element is defined. /// public enum Syntax { /// /// Syntax `proto2`. /// [pbr::OriginalName("SYNTAX_PROTO2")] Proto2 = 0, /// /// Syntax `proto3`. /// [pbr::OriginalName("SYNTAX_PROTO3")] Proto3 = 1, } #endregion #region Messages /// /// A protocol buffer message type. /// public sealed partial class Type : pb::IMessage { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Type()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pbr::MessageDescriptor Descriptor { get { return global::Google.Protobuf.WellKnownTypes.TypeReflection.Descriptor.MessageTypes[0]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public Type() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public Type(Type other) : this() { name_ = other.name_; fields_ = other.fields_.Clone(); oneofs_ = other.oneofs_.Clone(); options_ = other.options_.Clone(); sourceContext_ = other.sourceContext_ != null ? other.sourceContext_.Clone() : null; syntax_ = other.syntax_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public Type Clone() { return new Type(this); } /// Field number for the "name" field. public const int NameFieldNumber = 1; private string name_ = ""; /// /// The fully qualified message name. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public string Name { get { return name_; } set { name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } /// 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. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 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 types appearing in `oneof` definitions in this type. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 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 protocol buffer options. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 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. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public global::Google.Protobuf.WellKnownTypes.SourceContext SourceContext { get { return sourceContext_; } set { sourceContext_ = value; } } /// Field number for the "syntax" field. public const int SyntaxFieldNumber = 6; private global::Google.Protobuf.WellKnownTypes.Syntax syntax_ = 0; /// /// The source syntax. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public global::Google.Protobuf.WellKnownTypes.Syntax Syntax { get { return syntax_; } set { syntax_ = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override bool Equals(object other) { return Equals(other as Type); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public bool Equals(Type other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } if (Name != other.Name) return false; if(!fields_.Equals(other.fields_)) return false; if(!oneofs_.Equals(other.oneofs_)) return false; if(!options_.Equals(other.options_)) return false; if (!object.Equals(SourceContext, other.SourceContext)) return false; if (Syntax != other.Syntax) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override int GetHashCode() { int hash = 1; if (Name.Length != 0) hash ^= Name.GetHashCode(); hash ^= fields_.GetHashCode(); hash ^= oneofs_.GetHashCode(); hash ^= options_.GetHashCode(); if (sourceContext_ != null) hash ^= SourceContext.GetHashCode(); if (Syntax != 0) hash ^= Syntax.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return hash; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public void WriteTo(pb::CodedOutputStream output) { if (Name.Length != 0) { output.WriteRawTag(10); output.WriteString(Name); } fields_.WriteTo(output, _repeated_fields_codec); oneofs_.WriteTo(output, _repeated_oneofs_codec); options_.WriteTo(output, _repeated_options_codec); if (sourceContext_ != null) { output.WriteRawTag(42); output.WriteMessage(SourceContext); } if (Syntax != 0) { output.WriteRawTag(48); output.WriteEnum((int) Syntax); } if (_unknownFields != null) { _unknownFields.WriteTo(output); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public int CalculateSize() { int size = 0; if (Name.Length != 0) { size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); } size += fields_.CalculateSize(_repeated_fields_codec); size += oneofs_.CalculateSize(_repeated_oneofs_codec); size += options_.CalculateSize(_repeated_options_codec); if (sourceContext_ != null) { size += 1 + pb::CodedOutputStream.ComputeMessageSize(SourceContext); } if (Syntax != 0) { size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Syntax); } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } return size; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public void MergeFrom(Type other) { if (other == null) { return; } if (other.Name.Length != 0) { Name = other.Name; } fields_.Add(other.fields_); oneofs_.Add(other.oneofs_); options_.Add(other.options_); if (other.sourceContext_ != null) { if (sourceContext_ == null) { sourceContext_ = new global::Google.Protobuf.WellKnownTypes.SourceContext(); } SourceContext.MergeFrom(other.SourceContext); } if (other.Syntax != 0) { Syntax = other.Syntax; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public void MergeFrom(pb::CodedInputStream input) { uint tag; while ((tag = input.ReadTag()) != 0) { switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10: { Name = input.ReadString(); break; } case 18: { fields_.AddEntriesFrom(input, _repeated_fields_codec); break; } case 26: { oneofs_.AddEntriesFrom(input, _repeated_oneofs_codec); break; } case 34: { options_.AddEntriesFrom(input, _repeated_options_codec); break; } case 42: { if (sourceContext_ == null) { sourceContext_ = new global::Google.Protobuf.WellKnownTypes.SourceContext(); } input.ReadMessage(sourceContext_); break; } case 48: { syntax_ = (global::Google.Protobuf.WellKnownTypes.Syntax) input.ReadEnum(); break; } } } } } /// /// A single field of a message type. /// public sealed partial class Field : pb::IMessage { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Field()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pbr::MessageDescriptor Descriptor { get { return global::Google.Protobuf.WellKnownTypes.TypeReflection.Descriptor.MessageTypes[1]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public Field() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public Field(Field other) : this() { kind_ = other.kind_; cardinality_ = other.cardinality_; number_ = other.number_; name_ = other.name_; typeUrl_ = other.typeUrl_; oneofIndex_ = other.oneofIndex_; packed_ = other.packed_; options_ = other.options_.Clone(); jsonName_ = other.jsonName_; defaultValue_ = other.defaultValue_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public Field Clone() { return new Field(this); } /// Field number for the "kind" field. public const int KindFieldNumber = 1; private global::Google.Protobuf.WellKnownTypes.Field.Types.Kind kind_ = 0; /// /// The field type. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public global::Google.Protobuf.WellKnownTypes.Field.Types.Kind Kind { get { return kind_; } set { kind_ = value; } } /// Field number for the "cardinality" field. public const int CardinalityFieldNumber = 2; private global::Google.Protobuf.WellKnownTypes.Field.Types.Cardinality cardinality_ = 0; /// /// The field cardinality. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public global::Google.Protobuf.WellKnownTypes.Field.Types.Cardinality Cardinality { get { return cardinality_; } set { cardinality_ = value; } } /// Field number for the "number" field. public const int NumberFieldNumber = 3; private int number_; /// /// The field number. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public int Number { get { return number_; } set { number_ = value; } } /// Field number for the "name" field. public const int NameFieldNumber = 4; private string name_ = ""; /// /// The field name. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public string Name { get { return name_; } set { name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } /// Field number for the "type_url" field. public const int TypeUrlFieldNumber = 6; private string typeUrl_ = ""; /// /// The field type URL, without the scheme, for message or enumeration /// types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public string TypeUrl { get { return typeUrl_; } set { typeUrl_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } /// Field number for the "oneof_index" field. public const int OneofIndexFieldNumber = 7; private int oneofIndex_; /// /// The index of the field type in `Type.oneofs`, for message or enumeration /// types. The first type has index 1; zero means the type is not in the list. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public int OneofIndex { get { return oneofIndex_; } set { oneofIndex_ = value; } } /// Field number for the "packed" field. public const int PackedFieldNumber = 8; private bool packed_; /// /// Whether to use alternative packed wire representation. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public bool Packed { get { return packed_; } set { packed_ = value; } } /// 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 protocol buffer options. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public pbc::RepeatedField Options { get { return options_; } } /// Field number for the "json_name" field. public const int JsonNameFieldNumber = 10; private string jsonName_ = ""; /// /// The field JSON name. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public string JsonName { get { return jsonName_; } set { jsonName_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } /// Field number for the "default_value" field. public const int DefaultValueFieldNumber = 11; private string defaultValue_ = ""; /// /// The string value of the default value of this field. Proto2 syntax only. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public string DefaultValue { get { return defaultValue_; } set { defaultValue_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override bool Equals(object other) { return Equals(other as Field); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public bool Equals(Field other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } if (Kind != other.Kind) return false; if (Cardinality != other.Cardinality) return false; if (Number != other.Number) return false; if (Name != other.Name) return false; if (TypeUrl != other.TypeUrl) return false; if (OneofIndex != other.OneofIndex) return false; if (Packed != other.Packed) return false; if(!options_.Equals(other.options_)) return false; if (JsonName != other.JsonName) return false; if (DefaultValue != other.DefaultValue) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override int GetHashCode() { int hash = 1; if (Kind != 0) hash ^= Kind.GetHashCode(); if (Cardinality != 0) hash ^= Cardinality.GetHashCode(); if (Number != 0) hash ^= Number.GetHashCode(); if (Name.Length != 0) hash ^= Name.GetHashCode(); if (TypeUrl.Length != 0) hash ^= TypeUrl.GetHashCode(); if (OneofIndex != 0) hash ^= OneofIndex.GetHashCode(); if (Packed != false) hash ^= Packed.GetHashCode(); hash ^= options_.GetHashCode(); if (JsonName.Length != 0) hash ^= JsonName.GetHashCode(); if (DefaultValue.Length != 0) hash ^= DefaultValue.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return hash; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public void WriteTo(pb::CodedOutputStream output) { if (Kind != 0) { output.WriteRawTag(8); output.WriteEnum((int) Kind); } if (Cardinality != 0) { output.WriteRawTag(16); output.WriteEnum((int) Cardinality); } if (Number != 0) { output.WriteRawTag(24); output.WriteInt32(Number); } if (Name.Length != 0) { output.WriteRawTag(34); output.WriteString(Name); } if (TypeUrl.Length != 0) { output.WriteRawTag(50); output.WriteString(TypeUrl); } if (OneofIndex != 0) { output.WriteRawTag(56); output.WriteInt32(OneofIndex); } if (Packed != false) { output.WriteRawTag(64); output.WriteBool(Packed); } options_.WriteTo(output, _repeated_options_codec); if (JsonName.Length != 0) { output.WriteRawTag(82); output.WriteString(JsonName); } if (DefaultValue.Length != 0) { output.WriteRawTag(90); output.WriteString(DefaultValue); } if (_unknownFields != null) { _unknownFields.WriteTo(output); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public int CalculateSize() { int size = 0; if (Kind != 0) { size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Kind); } if (Cardinality != 0) { size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Cardinality); } if (Number != 0) { size += 1 + pb::CodedOutputStream.ComputeInt32Size(Number); } if (Name.Length != 0) { size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); } if (TypeUrl.Length != 0) { size += 1 + pb::CodedOutputStream.ComputeStringSize(TypeUrl); } if (OneofIndex != 0) { size += 1 + pb::CodedOutputStream.ComputeInt32Size(OneofIndex); } if (Packed != false) { size += 1 + 1; } size += options_.CalculateSize(_repeated_options_codec); if (JsonName.Length != 0) { size += 1 + pb::CodedOutputStream.ComputeStringSize(JsonName); } if (DefaultValue.Length != 0) { size += 1 + pb::CodedOutputStream.ComputeStringSize(DefaultValue); } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } return size; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public void MergeFrom(Field other) { if (other == null) { return; } if (other.Kind != 0) { Kind = other.Kind; } if (other.Cardinality != 0) { Cardinality = other.Cardinality; } if (other.Number != 0) { Number = other.Number; } if (other.Name.Length != 0) { Name = other.Name; } if (other.TypeUrl.Length != 0) { TypeUrl = other.TypeUrl; } if (other.OneofIndex != 0) { OneofIndex = other.OneofIndex; } if (other.Packed != false) { Packed = other.Packed; } options_.Add(other.options_); if (other.JsonName.Length != 0) { JsonName = other.JsonName; } if (other.DefaultValue.Length != 0) { DefaultValue = other.DefaultValue; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public void MergeFrom(pb::CodedInputStream input) { uint tag; while ((tag = input.ReadTag()) != 0) { switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 8: { kind_ = (global::Google.Protobuf.WellKnownTypes.Field.Types.Kind) input.ReadEnum(); break; } case 16: { cardinality_ = (global::Google.Protobuf.WellKnownTypes.Field.Types.Cardinality) input.ReadEnum(); break; } case 24: { Number = input.ReadInt32(); break; } case 34: { Name = input.ReadString(); break; } case 50: { TypeUrl = input.ReadString(); break; } case 56: { OneofIndex = input.ReadInt32(); break; } case 64: { Packed = input.ReadBool(); break; } case 74: { options_.AddEntriesFrom(input, _repeated_options_codec); break; } case 82: { JsonName = input.ReadString(); break; } case 90: { DefaultValue = input.ReadString(); break; } } } } #region Nested types /// Container for nested types declared in the Field message type. [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static partial class Types { /// /// Basic field types. /// public enum Kind { /// /// Field type unknown. /// [pbr::OriginalName("TYPE_UNKNOWN")] TypeUnknown = 0, /// /// Field type double. /// [pbr::OriginalName("TYPE_DOUBLE")] TypeDouble = 1, /// /// Field type float. /// [pbr::OriginalName("TYPE_FLOAT")] TypeFloat = 2, /// /// Field type int64. /// [pbr::OriginalName("TYPE_INT64")] TypeInt64 = 3, /// /// Field type uint64. /// [pbr::OriginalName("TYPE_UINT64")] TypeUint64 = 4, /// /// Field type int32. /// [pbr::OriginalName("TYPE_INT32")] TypeInt32 = 5, /// /// Field type fixed64. /// [pbr::OriginalName("TYPE_FIXED64")] TypeFixed64 = 6, /// /// Field type fixed32. /// [pbr::OriginalName("TYPE_FIXED32")] TypeFixed32 = 7, /// /// Field type bool. /// [pbr::OriginalName("TYPE_BOOL")] TypeBool = 8, /// /// Field type string. /// [pbr::OriginalName("TYPE_STRING")] TypeString = 9, /// /// Field type group. Proto2 syntax only, and deprecated. /// [pbr::OriginalName("TYPE_GROUP")] TypeGroup = 10, /// /// Field type message. /// [pbr::OriginalName("TYPE_MESSAGE")] TypeMessage = 11, /// /// Field type bytes. /// [pbr::OriginalName("TYPE_BYTES")] TypeBytes = 12, /// /// Field type uint32. /// [pbr::OriginalName("TYPE_UINT32")] TypeUint32 = 13, /// /// Field type enum. /// [pbr::OriginalName("TYPE_ENUM")] TypeEnum = 14, /// /// Field type sfixed32. /// [pbr::OriginalName("TYPE_SFIXED32")] TypeSfixed32 = 15, /// /// Field type sfixed64. /// [pbr::OriginalName("TYPE_SFIXED64")] TypeSfixed64 = 16, /// /// Field type sint32. /// [pbr::OriginalName("TYPE_SINT32")] TypeSint32 = 17, /// /// Field type sint64. /// [pbr::OriginalName("TYPE_SINT64")] TypeSint64 = 18, } /// /// Whether a field is optional, required, or repeated. /// public enum Cardinality { /// /// For fields with unknown cardinality. /// [pbr::OriginalName("CARDINALITY_UNKNOWN")] Unknown = 0, /// /// For optional fields. /// [pbr::OriginalName("CARDINALITY_OPTIONAL")] Optional = 1, /// /// For required fields. Proto2 syntax only. /// [pbr::OriginalName("CARDINALITY_REQUIRED")] Required = 2, /// /// For repeated fields. /// [pbr::OriginalName("CARDINALITY_REPEATED")] Repeated = 3, } } #endregion } /// /// Enum type definition. /// public sealed partial class Enum : pb::IMessage { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Enum()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pbr::MessageDescriptor Descriptor { get { return global::Google.Protobuf.WellKnownTypes.TypeReflection.Descriptor.MessageTypes[2]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public Enum() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public Enum(Enum other) : this() { name_ = other.name_; enumvalue_ = other.enumvalue_.Clone(); options_ = other.options_.Clone(); sourceContext_ = other.sourceContext_ != null ? other.sourceContext_.Clone() : null; syntax_ = other.syntax_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public Enum Clone() { return new Enum(this); } /// Field number for the "name" field. public const int NameFieldNumber = 1; private string name_ = ""; /// /// Enum type name. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public string Name { get { return name_; } set { name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } /// 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. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 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(); /// /// Protocol buffer options. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 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. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public global::Google.Protobuf.WellKnownTypes.SourceContext SourceContext { get { return sourceContext_; } set { sourceContext_ = value; } } /// Field number for the "syntax" field. public const int SyntaxFieldNumber = 5; private global::Google.Protobuf.WellKnownTypes.Syntax syntax_ = 0; /// /// The source syntax. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public global::Google.Protobuf.WellKnownTypes.Syntax Syntax { get { return syntax_; } set { syntax_ = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override bool Equals(object other) { return Equals(other as Enum); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public bool Equals(Enum other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } if (Name != other.Name) return false; if(!enumvalue_.Equals(other.enumvalue_)) return false; if(!options_.Equals(other.options_)) return false; if (!object.Equals(SourceContext, other.SourceContext)) return false; if (Syntax != other.Syntax) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override int GetHashCode() { int hash = 1; if (Name.Length != 0) hash ^= Name.GetHashCode(); hash ^= enumvalue_.GetHashCode(); hash ^= options_.GetHashCode(); if (sourceContext_ != null) hash ^= SourceContext.GetHashCode(); if (Syntax != 0) hash ^= Syntax.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return hash; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public void WriteTo(pb::CodedOutputStream output) { if (Name.Length != 0) { output.WriteRawTag(10); output.WriteString(Name); } enumvalue_.WriteTo(output, _repeated_enumvalue_codec); options_.WriteTo(output, _repeated_options_codec); if (sourceContext_ != null) { output.WriteRawTag(34); output.WriteMessage(SourceContext); } if (Syntax != 0) { output.WriteRawTag(40); output.WriteEnum((int) Syntax); } if (_unknownFields != null) { _unknownFields.WriteTo(output); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public int CalculateSize() { int size = 0; if (Name.Length != 0) { size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); } size += enumvalue_.CalculateSize(_repeated_enumvalue_codec); size += options_.CalculateSize(_repeated_options_codec); if (sourceContext_ != null) { size += 1 + pb::CodedOutputStream.ComputeMessageSize(SourceContext); } if (Syntax != 0) { size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Syntax); } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } return size; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public void MergeFrom(Enum other) { if (other == null) { return; } if (other.Name.Length != 0) { Name = other.Name; } enumvalue_.Add(other.enumvalue_); options_.Add(other.options_); if (other.sourceContext_ != null) { if (sourceContext_ == null) { sourceContext_ = new global::Google.Protobuf.WellKnownTypes.SourceContext(); } SourceContext.MergeFrom(other.SourceContext); } if (other.Syntax != 0) { Syntax = other.Syntax; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public void MergeFrom(pb::CodedInputStream input) { uint tag; while ((tag = input.ReadTag()) != 0) { switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10: { Name = input.ReadString(); break; } case 18: { enumvalue_.AddEntriesFrom(input, _repeated_enumvalue_codec); break; } case 26: { options_.AddEntriesFrom(input, _repeated_options_codec); break; } case 34: { if (sourceContext_ == null) { sourceContext_ = new global::Google.Protobuf.WellKnownTypes.SourceContext(); } input.ReadMessage(sourceContext_); break; } case 40: { syntax_ = (global::Google.Protobuf.WellKnownTypes.Syntax) input.ReadEnum(); break; } } } } } /// /// Enum value definition. /// public sealed partial class EnumValue : pb::IMessage { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new EnumValue()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pbr::MessageDescriptor Descriptor { get { return global::Google.Protobuf.WellKnownTypes.TypeReflection.Descriptor.MessageTypes[3]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public EnumValue() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public EnumValue(EnumValue other) : this() { name_ = other.name_; number_ = other.number_; options_ = other.options_.Clone(); _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public EnumValue Clone() { return new EnumValue(this); } /// Field number for the "name" field. public const int NameFieldNumber = 1; private string name_ = ""; /// /// Enum value name. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public string Name { get { return name_; } set { name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } /// Field number for the "number" field. public const int NumberFieldNumber = 2; private int number_; /// /// Enum value number. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public int Number { get { return number_; } set { number_ = value; } } /// 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(); /// /// Protocol buffer options. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public pbc::RepeatedField Options { get { return options_; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override bool Equals(object other) { return Equals(other as EnumValue); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public bool Equals(EnumValue other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } if (Name != other.Name) return false; if (Number != other.Number) return false; if(!options_.Equals(other.options_)) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override int GetHashCode() { int hash = 1; if (Name.Length != 0) hash ^= Name.GetHashCode(); if (Number != 0) hash ^= Number.GetHashCode(); hash ^= options_.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return hash; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public void WriteTo(pb::CodedOutputStream output) { if (Name.Length != 0) { output.WriteRawTag(10); output.WriteString(Name); } if (Number != 0) { output.WriteRawTag(16); output.WriteInt32(Number); } options_.WriteTo(output, _repeated_options_codec); if (_unknownFields != null) { _unknownFields.WriteTo(output); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public int CalculateSize() { int size = 0; if (Name.Length != 0) { size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); } if (Number != 0) { size += 1 + pb::CodedOutputStream.ComputeInt32Size(Number); } size += options_.CalculateSize(_repeated_options_codec); if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } return size; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public void MergeFrom(EnumValue other) { if (other == null) { return; } if (other.Name.Length != 0) { Name = other.Name; } if (other.Number != 0) { Number = other.Number; } options_.Add(other.options_); _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public void MergeFrom(pb::CodedInputStream input) { uint tag; while ((tag = input.ReadTag()) != 0) { switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10: { Name = input.ReadString(); break; } case 16: { Number = input.ReadInt32(); break; } case 26: { options_.AddEntriesFrom(input, _repeated_options_codec); break; } } } } } /// /// A protocol buffer option, which can be attached to a message, field, /// enumeration, etc. /// public sealed partial class Option : pb::IMessage