context: // Generated by ProtoGen, Version=2.4.1.473, Culture=neutral, PublicKeyToken=55f7125234beb589.  DO NOT EDIT!
  #pragma warning disable 1591, 0612
  #region Designer generated code
  
  using pb = global::Google.ProtocolBuffers;
  using pbc = global::Google.ProtocolBuffers.Collections;
  using pbd = global::Google.ProtocolBuffers.Descriptors;
  using scg = global::System.Collections.Generic;
  namespace bnet.protocol.achievements {
    
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.4.1.473")]
    public static partial class AchievementsStaticData {
    
      #region Extension registration
      public static void RegisterAllExtensions(pb::ExtensionRegistry registry) {
      }
      #endregion
      #region Static variables
      internal static pbd::MessageDescriptor internal__static_bnet_protocol_achievements_Attribute__Descriptor;
      internal static pb::FieldAccess.FieldAccessorTable<global::bnet.protocol.achievements.Attribute, global::bnet.protocol.achievements.Attribute.Builder> internal__static_bnet_protocol_achievements_Attribute__FieldAccessorTable;
      internal static pbd::MessageDescriptor internal__static_bnet_protocol_achievements_CriteriaModifier__Descriptor;
      internal static pb::FieldAccess.FieldAccessorTable<global::bnet.protocol.achievements.CriteriaModifier, global::bnet.protocol.achievements.CriteriaModifier.Builder> internal__static_bnet_protocol_achievements_CriteriaModifier__FieldAccessorTable;
      internal static pbd::MessageDescriptor internal__static_bnet_protocol_achievements_CriteriaEvent__Descriptor;
      internal static pb::FieldAccess.FieldAccessorTable<global::bnet.protocol.achievements.CriteriaEvent, global::bnet.protocol.achievements.CriteriaEvent.Builder> internal__static_bnet_protocol_achievements_CriteriaEvent__FieldAccessorTable;
      internal static pbd::MessageDescriptor internal__static_bnet_protocol_achievements_StaticCategoryDefinition__Descriptor;
      internal static pb::FieldAccess.FieldAccessorTable<global::bnet.protocol.achievements.StaticCategoryDefinition, global::bnet.protocol.achievements.StaticCategoryDefinition.Builder> internal__static_bnet_protocol_achievements_StaticCategoryDefinition__FieldAccessorTable;
      internal static pbd::MessageDescriptor internal__static_bnet_protocol_achievements_StaticAchievementDefinition__Descriptor;
      internal static pb::FieldAccess.FieldAccessorTable<global::bnet.protocol.achievements.StaticAchievementDefinition, global::bnet.protocol.achievements.StaticAchievementDefinition.Builder> internal__static_bnet_protocol_achievements_StaticAchievementDefinition__FieldAccessorTable;
      internal static pbd::MessageDescriptor internal__static_bnet_protocol_achievements_StaticCriteriaDefinition__Descriptor;
      internal static pb::FieldAccess.FieldAccessorTable<global::bnet.protocol.achievements.StaticCriteriaDefinition, global::bnet.protocol.achievements.StaticCriteriaDefinition.Builder> internal__static_bnet_protocol_achievements_StaticCriteriaDefinition__FieldAccessorTable;
      internal static pbd::MessageDescriptor internal__static_bnet_protocol_achievements_AchievementFile__Descriptor;
      internal static pb::FieldAccess.FieldAccessorTable<global::bnet.protocol.achievements.AchievementFile, global::bnet.protocol.achievements.AchievementFile.Builder> internal__static_bnet_protocol_achievements_AchievementFile__FieldAccessorTable;
      #endregion
      #region Descriptor
      public static pbd::FileDescriptor Descriptor {
        get { return descriptor; }
      }
      private static pbd::FileDescriptor descriptor;
      
      static AchievementsStaticData() {
        byte[] descriptorData = global::System.Convert.FromBase64String(
            "CiNibmV0L2FjaGlldmVtZW50c19zdGF0aWNfZGF0YS5wcm90bxIaYm5ldC5w" + 
            "cm90b2NvbC5hY2hpZXZlbWVudHMiJwoJQXR0cmlidXRlEgsKA2tleRgBIAIo" + 
            "CRINCgV2YWx1ZRgCIAIoCSJjChBDcml0ZXJpYU1vZGlmaWVyEhsKE25lY2Vz" + 
            "c2FyeV9jb25kaXRpb24YASACKAQSDgoGdGFyZ2V0GAIgAigHEg8KB29wZXJh" + 
            "bmQYAyACKA0SEQoJY29tcGFyYW5kGAQgAigEIokBCg1Dcml0ZXJpYUV2ZW50" + 
            "EgoKAmlkGAEgAigEEhQKCWNvbXBhcmFuZBgCIAEoBDoBMBI+Cghtb2RpZmll" + 
            "chgDIAMoCzIsLmJuZXQucHJvdG9jb2wuYWNoaWV2ZW1lbnRzLkNyaXRlcmlh" + 
            "TW9kaWZpZXISFgoOdGltZXJfZHVyYXRpb24YBCABKA0isgEKGFN0YXRpY0Nh" + 
            "dGVnb3J5RGVmaW5pdGlvbhIKCgJpZBgBIAIoDRIRCglwYXJlbnRfaWQYAiAB" + 
            "KAQSKAogT0JTT0xFVEVfZmVhdHVyZWRfYWNoaWV2ZW1lbnRfaWQYAyABKAQS" + 
            "EgoKb3JkZXJfaGludBgEIAIoDRI5CgphdHRyaWJ1dGVzGAUgAygLMiUuYm5l" + 
            "dC5wcm90b2NvbC5hY2hpZXZlbWVudHMuQXR0cmlidXRlIp0CChtTdGF0aWNB" + 
            "Y2hpZXZlbWVudERlZmluaXRpb24SCgoCaWQYASACKAQSIgoac3VwZXJzZWRp" + 
            "bmdfYWNoaWV2ZW1lbnRfaWQYAiABKAQSEwoLY2F0ZWdvcnlfaWQYAyACKA0S" + 
            "GAoQbWluaW11bV9jcml0ZXJpYRgEIAEoDRIUCgxwb2ludHNfdmFsdWUYBSAC" + 
            "KA0SDQoFZmxhZ3MYBiACKA0SEgoKb3JkZXJfaGludBgHIAIoDRIrCiNjcml0" + 
            "ZXJpYV9zaGFyZWRfd2l0aF9hY2hpZXZlbWVudF9pZBgIIAEoBBI5CgphdHRy" + 
            "aWJ1dGVzGAkgAygLMiUuYm5ldC5wcm90b2NvbC5hY2hpZXZlbWVudHMuQXR0" + 
            "cmlidXRlIqQDChhTdGF0aWNDcml0ZXJpYURlZmluaXRpb24SEwoLY3JpdGVy" + 
            "aWFfaWQYASACKAQSHQoVcGFyZW50X2FjaGlldmVtZW50X2lkGAIgAigEEj4K" + 
            "C3N0YXJ0X2V2ZW50GAMgASgLMikuYm5ldC5wcm90b2NvbC5hY2hpZXZlbWVu" + 
            "dHMuQ3JpdGVyaWFFdmVudBJACg1hZHZhbmNlX2V2ZW50GAQgASgLMikuYm5l" + 
            "dC5wcm90b2NvbC5hY2hpZXZlbWVudHMuQ3JpdGVyaWFFdmVudBI9CgpmYWls" + 
            "X2V2ZW50GAUgASgLMikuYm5ldC5wcm90b2NvbC5hY2hpZXZlbWVudHMuQ3Jp" + 
            "dGVyaWFFdmVudBIaChJuZWNlc3NhcnlfcXVhbnRpdHkYBiACKAQSEgoKb3Jk" + 
            "ZXJfaGludBgHIAEoDRIZChFldmFsdXRhdGlvbl9jbGFzcxgIIAIoBxINCgVm" + 
            "bGFncxgJIAIoDRI5CgphdHRyaWJ1dGVzGAogAygLMiUuYm5ldC5wcm90b2Nv" + 
            "bC5hY2hpZXZlbWVudHMuQXR0cmlidXRlIqoCCg9BY2hpZXZlbWVudEZpbGUS" + 
            "RgoIY2F0ZWdvcnkYASADKAsyNC5ibmV0LnByb3RvY29sLmFjaGlldmVtZW50" + 
            "cy5TdGF0aWNDYXRlZ29yeURlZmluaXRpb24STAoLYWNoaWV2ZW1lbnQYAiAD" + 
            "KAsyNy5ibmV0LnByb3RvY29sLmFjaGlldmVtZW50cy5TdGF0aWNBY2hpZXZl" + 
            "bWVudERlZmluaXRpb24SRgoIY3JpdGVyaWEYAyADKAsyNC5ibmV0LnByb3Rv" + 
            "Y29sLmFjaGlldmVtZW50cy5TdGF0aWNDcml0ZXJpYURlZmluaXRpb24SOQoK" + 
            "YXR0cmlidXRlcxgEIAMoCzIlLmJuZXQucHJvdG9jb2wuYWNoaWV2ZW1lbnRz" + 
            "LkF0dHJpYnV0ZSozChFNb2RpZmVyVGFyZ2V0VHlwZRIPCgdTVUJKRUNUEOrE" + 
            "1ZsFEg0KBk9CSkVDVBDqxL0C");
        pbd::FileDescriptor.InternalDescriptorAssigner assigner = delegate(pbd::FileDescriptor root) {
          descriptor = root;
          internal__static_bnet_protocol_achievements_Attribute__Descriptor = Descriptor.MessageTypes[0];
          internal__static_bnet_protocol_achievements_Attribute__FieldAccessorTable = 
              new pb::FieldAccess.FieldAccessorTable<global::bnet.protocol.achievements.Attribute, global::bnet.protocol.achievements.Attribute.Builder>(internal__static_bnet_protocol_achievements_Attribute__Descriptor,
                  new string[] { "Key", "Value", });
          internal__static_bnet_protocol_achievements_CriteriaModifier__Descriptor = Descriptor.MessageTypes[1];
          internal__static_bnet_protocol_achievements_CriteriaModifier__FieldAccessorTable = 
              new pb::FieldAccess.FieldAccessorTable<global::bnet.protocol.achievements.CriteriaModifier, global::bnet.protocol.achievements.CriteriaModifier.Builder>(internal__static_bnet_protocol_achievements_CriteriaModifier__Descriptor,
                  new string[] { "NecessaryCondition", "Target", "Operand", "Comparand", });
          internal__static_bnet_protocol_achievements_CriteriaEvent__Descriptor = Descriptor.MessageTypes[2];
          internal__static_bnet_protocol_achievements_CriteriaEvent__FieldAccessorTable = 
              new pb::FieldAccess.FieldAccessorTable<global::bnet.protocol.achievements.CriteriaEvent, global::bnet.protocol.achievements.CriteriaEvent.Builder>(internal__static_bnet_protocol_achievements_CriteriaEvent__Descriptor,
                  new string[] { "Id", "Comparand", "Modifier", "TimerDuration", });
          internal__static_bnet_protocol_achievements_StaticCategoryDefinition__Descriptor = Descriptor.MessageTypes[3];
          internal__static_bnet_protocol_achievements_StaticCategoryDefinition__FieldAccessorTable = 
              new pb::FieldAccess.FieldAccessorTable<global::bnet.protocol.achievements.StaticCategoryDefinition, global::bnet.protocol.achievements.StaticCategoryDefinition.Builder>(internal__static_bnet_protocol_achievements_StaticCategoryDefinition__Descriptor,
                  new string[] { "Id", "ParentId", "OBSOLETEFeaturedAchievementId", "OrderHint", "Attributes", });
          internal__static_bnet_protocol_achievements_StaticAchievementDefinition__Descriptor = Descriptor.MessageTypes[4];
          internal__static_bnet_protocol_achievements_StaticAchievementDefinition__FieldAccessorTable = 
              new pb::FieldAccess.FieldAccessorTable<global::bnet.protocol.achievements.StaticAchievementDefinition, global::bnet.protocol.achievements.StaticAchievementDefinition.Builder>(internal__static_bnet_protocol_achievements_StaticAchievementDefinition__Descriptor,
                  new string[] { "Id", "SupersedingAchievementId", "CategoryId", "MinimumCriteria", "PointsValue", "Flags", "OrderHint", "CriteriaSharedWithAchievementId", "Attributes", });
          internal__static_bnet_protocol_achievements_StaticCriteriaDefinition__Descriptor = Descriptor.MessageTypes[5];
          internal__static_bnet_protocol_achievements_StaticCriteriaDefinition__FieldAccessorTable = 
              new pb::FieldAccess.FieldAccessorTable<global::bnet.protocol.achievements.StaticCriteriaDefinition, global::bnet.protocol.achievements.StaticCriteriaDefinition.Builder>(internal__static_bnet_protocol_achievements_StaticCriteriaDefinition__Descriptor,
                  new string[] { "CriteriaId", "ParentAchievementId", "StartEvent", "AdvanceEvent", "FailEvent", "NecessaryQuantity", "OrderHint", "EvalutationClass", "Flags", "Attributes", });
          internal__static_bnet_protocol_achievements_AchievementFile__Descriptor = Descriptor.MessageTypes[6];
          internal__static_bnet_protocol_achievements_AchievementFile__FieldAccessorTable = 
              new pb::FieldAccess.FieldAccessorTable<global::bnet.protocol.achievements.AchievementFile, global::bnet.protocol.achievements.AchievementFile.Builder>(internal__static_bnet_protocol_achievements_AchievementFile__Descriptor,
                  new string[] { "Category", "Achievement", "Criteria", "Attributes", });
          return null;
        };
        pbd::FileDescriptor.InternalBuildGeneratedFileFrom(descriptorData,
            new pbd::FileDescriptor[] {
            }, assigner);
      }
      #endregion
      
    }
    #region Enums
    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.4.1.473")]
    public enum ModiferTargetType {
      SUBJECT = 1400201834,
      OBJECT = 5202538,
    }
    
    #endregion
    
    #region Messages
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.4.1.473")]
    public sealed partial class Attribute : pb::GeneratedMessage<Attribute, Attribute.Builder> {
      private Attribute() { }
      private static readonly Attribute defaultInstance = new Attribute().MakeReadOnly();
      private static readonly string[] _attributeFieldNames = new string[] { "key", "value" };
      private static readonly uint[] _attributeFieldTags = new uint[] { 10, 18 };
      public static Attribute DefaultInstance {
        get { return defaultInstance; }
      }
      
      public override Attribute DefaultInstanceForType {
        get { return DefaultInstance; }
      }
      
      protected override Attribute ThisMessage {
        get { return this; }
      }
      
      public static pbd::MessageDescriptor Descriptor {
        get { return global::bnet.protocol.achievements.AchievementsStaticData.internal__static_bnet_protocol_achievements_Attribute__Descriptor; }
      }
      
      protected override pb::FieldAccess.FieldAccessorTable<Attribute, Attribute.Builder> InternalFieldAccessors {
        get { return global::bnet.protocol.achievements.AchievementsStaticData.internal__static_bnet_protocol_achievements_Attribute__FieldAccessorTable; }
      }
      
      public const int KeyFieldNumber = 1;
      private bool hasKey;
      private string key_ = "";
      public bool HasKey {
        get { return hasKey; }
      }
      public string Key {
        get { return key_; }
      }
      
      public const int ValueFieldNumber = 2;
      private bool hasValue;
      private string value_ = "";
      public bool HasValue {
        get { return hasValue; }
      }
      public string Value {
        get { return value_; }
      }
      
      public override bool IsInitialized {
        get {
          if (!hasKey) return false;
          if (!hasValue) return false;
          return true;
        }
      }
      
      public override void WriteTo(pb::ICodedOutputStream output) {
        int size = SerializedSize;
        string[] field_names = _attributeFieldNames;
        if (hasKey) {
          output.WriteString(1, field_names[0], Key);
        }
        if (hasValue) {
          output.WriteString(2, field_names[1], Value);
        }
        UnknownFields.WriteTo(output);
      }
      
      private int memoizedSerializedSize = -1;
      public override int SerializedSize {
        get {
          int size = memoizedSerializedSize;
          if (size != -1) return size;
          
          size = 0;
          if (hasKey) {
            size += pb::CodedOutputStream.ComputeStringSize(1, Key);
          }
          if (hasValue) {
            size += pb::CodedOutputStream.ComputeStringSize(2, Value);
          }
          size += UnknownFields.SerializedSize;
          memoizedSerializedSize = size;
          return size;
        }
      }
      
      public static Attribute ParseFrom(pb::ByteString data) {
        return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
      }
      public static Attribute ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
        return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
      }
      public static Attribute ParseFrom(byte[] data) {
        return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
      }
      public static Attribute ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
        return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
      }
      public static Attribute ParseFrom(global::System.IO.Stream input) {
        return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
      }
      public static Attribute ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
        return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
      }
      public static Attribute ParseDelimitedFrom(global::System.IO.Stream input) {
        return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
      }
      public static Attribute ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
        return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
      }
      public static Attribute ParseFrom(pb::ICodedInputStream input) {
        return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
      }
      public static Attribute ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
        return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
      }
      private Attribute MakeReadOnly() {
        return this;
      }
      
      public static Builder CreateBuilder() { return new Builder(); }
      public override Builder ToBuilder() { return CreateBuilder(this); }
      public override Builder CreateBuilderForType() { return new Builder(); }
      public static Builder CreateBuilder(Attribute prototype) {
        return new Builder(prototype);
      }
      
      [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
      [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
      [global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.4.1.473")]
      public sealed partial class Builder : pb::GeneratedBuilder<Attribute, Builder> {
        protected override Builder ThisBuilder {
          get { return this; }
        }
        public Builder() {
          result = DefaultInstance;
          resultIsReadOnly = true;
        }
        internal Builder(Attribute cloneFrom) {
          result = cloneFrom;
          resultIsReadOnly = true;
        }
        
        private bool resultIsReadOnly;
        private Attribute result;
        
        private Attribute PrepareBuilder() {
          if (resultIsReadOnly) {
            Attribute original = result;
            result = new Attribute();
            resultIsReadOnly = false;
            MergeFrom(original);
          }
          return result;
        }
        
        public override bool IsInitialized {
          get { return result.IsInitialized; }
        }
        
        protected override Attribute MessageBeingBuilt {
          get { return PrepareBuilder(); }
        }
        
        public override Builder Clear() {
          result = DefaultInstance;
          resultIsReadOnly = true;
          return this;
        }
        
        public override Builder Clone() {
          if (resultIsReadOnly) {
            return new Builder(result);
          } else {
            return new Builder().MergeFrom(result);
          }
        }
        
        public override pbd::MessageDescriptor DescriptorForType {
          get { return global::bnet.protocol.achievements.Attribute.Descriptor; }
        }
        
        public override Attribute DefaultInstanceForType {
          get { return global::bnet.protocol.achievements.Attribute.DefaultInstance; }
        }
        
        public override Attribute BuildPartial() {
          if (resultIsReadOnly) {
            return result;
          }
          resultIsReadOnly = true;
          return result.MakeReadOnly();
        }
        
        public override Builder MergeFrom(pb::IMessage other) {
          if (other is Attribute) {
            return MergeFrom((Attribute) other);
          } else {
            base.MergeFrom(other);
            return this;
          }
        }
        
        public override Builder MergeFrom(Attribute other) {
          if (other == global::bnet.protocol.achievements.Attribute.DefaultInstance) return this;
          PrepareBuilder();
          if (other.HasKey) {
            Key = other.Key;
          }
          if (other.HasValue) {
            Value = other.Value;
          }
          this.MergeUnknownFields(other.UnknownFields);
          return this;
        }
        
        public override Builder MergeFrom(pb::ICodedInputStream input) {
          return MergeFrom(input, pb::ExtensionRegistry.Empty);
        }
        
        public override Builder MergeFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
          PrepareBuilder();
          pb::UnknownFieldSet.Builder unknownFields = null;
          uint tag;
          string field_name;
          while (input.ReadTag(out tag, out field_name)) {
            if(tag == 0 && field_name != null) {
              int field_ordinal = global::System.Array.BinarySearch(_attributeFieldNames, field_name, global::System.StringComparer.Ordinal);
              if(field_ordinal >= 0)
                tag = _attributeFieldTags[field_ordinal];
              else {
                if (unknownFields == null) {
                  unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
                }
                ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name);
                continue;
              }
            }
            switch (tag) {
              case 0: {
                throw pb::InvalidProtocolBufferException.InvalidTag();
              }
              default: {
                if (pb::WireFormat.IsEndGroupTag(tag)) {
                  if (unknownFields != null) {
                    this.UnknownFields = unknownFields.Build();
                  }
                  return this;
                }
                if (unknownFields == null) {
                  unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
                }
                ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name);
                break;
              }
              case 10: {
                result.hasKey = input.ReadString(ref result.key_);
                break;
              }
              case 18: {
                result.hasValue = input.ReadString(ref result.value_);
                break;
              }
            }
          }
          
          if (unknownFields != null) {
            this.UnknownFields = unknownFields.Build();
          }
          return this;
        }
        
        
        public bool HasKey {
          get { return result.hasKey; }
        }
        public string Key {
          get { return result.Key; }
          set { SetKey(value); }
        }
        public Builder SetKey(string value) {
          pb::ThrowHelper.ThrowIfNull(value, "value");
          PrepareBuilder();
          result.hasKey = true;
          result.key_ = value;
          return this;
        }
        public Builder ClearKey() {
          PrepareBuilder();
          result.hasKey = false;
          result.key_ = "";
          return this;
        }
        
        public bool HasValue {
          get { return result.hasValue; }
        }
        public string Value {
          get { return result.Value; }
          set { SetValue(value); }
        }
        public Builder SetValue(string value) {
          pb::ThrowHelper.ThrowIfNull(value, "value");
          PrepareBuilder();
          result.hasValue = true;
          result.value_ = value;
          return this;
        }
        public Builder ClearValue() {
          PrepareBuilder();
          result.hasValue = false;
          result.value_ = "";
          return this;
        }
      }
      static Attribute() {
        object.ReferenceEquals(global::bnet.protocol.achievements.AchievementsStaticData.Descriptor, null);
      }
    }
    
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.4.1.473")]
    public sealed partial class CriteriaModifier : pb::GeneratedMessage<CriteriaModifier, CriteriaModifier.Builder> {
      private CriteriaModifier() { }
      private static readonly CriteriaModifier defaultInstance = new CriteriaModifier().MakeReadOnly();
      private static readonly string[] _criteriaModifierFieldNames = new string[] { "comparand", "necessary_condition", "operand", "target" };
      private static readonly uint[] _criteriaModifierFieldTags = new uint[] { 32, 8, 24, 21 };
      public static CriteriaModifier DefaultInstance {
        get { return defaultInstance; }
      }
      
      public override CriteriaModifier DefaultInstanceForType {
        get { return DefaultInstance; }
      }
      
      protected override CriteriaModifier ThisMessage {
        get { return this; }
      }
      
      public static pbd::MessageDescriptor Descriptor {
        get { return global::bnet.protocol.achievements.AchievementsStaticData.internal__static_bnet_protocol_achievements_CriteriaModifier__Descriptor; }
      }
      
      protected override pb::FieldAccess.FieldAccessorTable<CriteriaModifier, CriteriaModifier.Builder> InternalFieldAccessors {
        get { return global::bnet.protocol.achievements.AchievementsStaticData.internal__static_bnet_protocol_achievements_CriteriaModifier__FieldAccessorTable; }
      }
      
      public const int NecessaryConditionFieldNumber = 1;
      private bool hasNecessaryCondition;
      private ulong necessaryCondition_;
      public bool HasNecessaryCondition {
        get { return hasNecessaryCondition; }
      }
      public ulong NecessaryCondition {
        get { return necessaryCondition_; }
      }
      
      public const int TargetFieldNumber = 2;
      private bool hasTarget;
      private uint target_;
      public bool HasTarget {
        get { return hasTarget; }
      }
      public uint Target {
        get { return target_; }
      }
      
      public const int OperandFieldNumber = 3;
      private bool hasOperand;
      private uint operand_;
      public bool HasOperand {
        get { return hasOperand; }
      }
      public uint Operand {
        get { return operand_; }
      }
      
      public const int ComparandFieldNumber = 4;
      private bool hasComparand;
      private ulong comparand_;
      public bool HasComparand {
        get { return hasComparand; }
      }
      public ulong Comparand {
        get { return comparand_; }
      }
      
      public override bool IsInitialized {
        get {
          if (!hasNecessaryCondition) return false;
          if (!hasTarget) return false;
          if (!hasOperand) return false;
          if (!hasComparand) return false;
          return true;
        }
      }
      
      public override void WriteTo(pb::ICodedOutputStream output) {
        int size = SerializedSize;
        string[] field_names = _criteriaModifierFieldNames;
        if (hasNecessaryCondition) {
          output.WriteUInt64(1, field_names[1], NecessaryCondition);
        }
        if (hasTarget) {
          output.WriteFixed32(2, field_names[3], Target);
        }
        if (hasOperand) {
          output.WriteUInt32(3, field_names[2], Operand);
        }
        if (hasComparand) {
          output.WriteUInt64(4, field_names[0], Comparand);
        }
        UnknownFields.WriteTo(output);
      }
      
      private int memoizedSerializedSize = -1;
      public override int SerializedSize {
        get {
          int size = memoizedSerializedSize;
          if (size != -1) return size;
          
          size = 0;
          if (hasNecessaryCondition) {
            size += pb::CodedOutputStream.ComputeUInt64Size(1, NecessaryCondition);
          }
          if (hasTarget) {
            size += pb::CodedOutputStream.ComputeFixed32Size(2, Target);
          }
          if (hasOperand) {
            size += pb::CodedOutputStream.ComputeUInt32Size(3, Operand);
          }
          if (hasComparand) {
            size += pb::CodedOutputStream.ComputeUInt64Size(4, Comparand);
          }
          size += UnknownFields.SerializedSize;
          memoizedSerializedSize = size;
          return size;
        }
      }
      
      public static CriteriaModifier ParseFrom(pb::ByteString data) {
        return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
      }
      public static CriteriaModifier ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
        return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
      }
      public static CriteriaModifier ParseFrom(byte[] data) {
        return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
      }
      public static CriteriaModifier ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
        return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
      }
      public static CriteriaModifier ParseFrom(global::System.IO.Stream input) {
        return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
      }
      public static CriteriaModifier ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
        return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
      }
      public static CriteriaModifier ParseDelimitedFrom(global::System.IO.Stream input) {
        return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
      }
      public static CriteriaModifier ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
        return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
      }
      public static CriteriaModifier ParseFrom(pb::ICodedInputStream input) {
        return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
      }
      public static CriteriaModifier ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
        return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
      }
      private CriteriaModifier MakeReadOnly() {
        return this;
      }
      
      public static Builder CreateBuilder() { return new Builder(); }
      public override Builder ToBuilder() { return CreateBuilder(this); }
      public override Builder CreateBuilderForType() { return new Builder(); }
      public static Builder CreateBuilder(CriteriaModifier prototype) {
        return new Builder(prototype);
      }
      
      [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
      [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
      [global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.4.1.473")]
      public sealed partial class Builder : pb::GeneratedBuilder<CriteriaModifier, Builder> {
        protected override Builder ThisBuilder {
          get { return this; }
        }
        public Builder() {
          result = DefaultInstance;
          resultIsReadOnly = true;
        }
        internal Builder(CriteriaModifier cloneFrom) {
          result = cloneFrom;
          resultIsReadOnly = true;
        }
        
        private bool resultIsReadOnly;
        private CriteriaModifier result;
        
        private CriteriaModifier PrepareBuilder() {
          if (resultIsReadOnly) {
            CriteriaModifier original = result;
            result = new CriteriaModifier();
            resultIsReadOnly = false;
            MergeFrom(original);
          }
          return result;
        }
        
        public override bool IsInitialized {
          get { return result.IsInitialized; }
        }
        
        protected override CriteriaModifier MessageBeingBuilt {
          get { return PrepareBuilder(); }
        }
        
        public override Builder Clear() {
          result = DefaultInstance;
          resultIsReadOnly = true;
          return this;
        }
        
        public override Builder Clone() {
          if (resultIsReadOnly) {
            return new Builder(result);
          } else {
            return new Builder().MergeFrom(result);
          }
        }
        
        public override pbd::MessageDescriptor DescriptorForType {
          get { return global::bnet.protocol.achievements.CriteriaModifier.Descriptor; }
        }
        
        public override CriteriaModifier DefaultInstanceForType {
          get { return global::bnet.protocol.achievements.CriteriaModifier.DefaultInstance; }
        }
        
        public override CriteriaModifier BuildPartial() {
          if (resultIsReadOnly) {
            return result;
          }
          resultIsReadOnly = true;
          return result.MakeReadOnly();
        }
        
        public override Builder MergeFrom(pb::IMessage other) {
          if (other is CriteriaModifier) {
            return MergeFrom((CriteriaModifier) other);
          } else {
            base.MergeFrom(other);
            return this;
          }
        }
        
        public override Builder MergeFrom(CriteriaModifier other) {
          if (other == global::bnet.protocol.achievements.CriteriaModifier.DefaultInstance) return this;
          PrepareBuilder();
          if (other.HasNecessaryCondition) {
            NecessaryCondition = other.NecessaryCondition;
          }
          if (other.HasTarget) {
            Target = other.Target;
          }
          if (other.HasOperand) {
            Operand = other.Operand;
          }
          if (other.HasComparand) {
            Comparand = other.Comparand;
          }
          this.MergeUnknownFields(other.UnknownFields);
          return this;
        }
        
        public override Builder MergeFrom(pb::ICodedInputStream input) {
          return MergeFrom(input, pb::ExtensionRegistry.Empty);
        }
        
        public override Builder MergeFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
          PrepareBuilder();
          pb::UnknownFieldSet.Builder unknownFields = null;
          uint tag;
          string field_name;
          while (input.ReadTag(out tag, out field_name)) {
            if(tag == 0 && field_name != null) {
              int field_ordinal = global::System.Array.BinarySearch(_criteriaModifierFieldNames, field_name, global::System.StringComparer.Ordinal);
              if(field_ordinal >= 0)
                tag = _criteriaModifierFieldTags[field_ordinal];
              else {
                if (unknownFields == null) {
                  unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
                }
                ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name);
                continue;
              }
            }
            switch (tag) {
              case 0: {
                throw pb::InvalidProtocolBufferException.InvalidTag();
              }
              default: {
                if (pb::WireFormat.IsEndGroupTag(tag)) {
                  if (unknownFields != null) {
                    this.UnknownFields = unknownFields.Build();
                  }
                  return this;
                }
                if (unknownFields == null) {
                  unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
                }
                ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name);
                break;
              }
              case 8: {
                result.hasNecessaryCondition = input.ReadUInt64(ref result.necessaryCondition_);
                break;
              }
              case 21: {
                result.hasTarget = input.ReadFixed32(ref result.target_);
                break;
              }
              case 24: {
                result.hasOperand = input.ReadUInt32(ref result.operand_);
                break;
              }
              case 32: {
                result.hasComparand = input.ReadUInt64(ref result.comparand_);
                break;
              }
            }
          }
          
          if (unknownFields != null) {
            this.UnknownFields = unknownFields.Build();
          }
          return this;
        }
        
        
        public bool HasNecessaryCondition {
          get { return result.hasNecessaryCondition; }
        }
        public ulong NecessaryCondition {
          get { return result.NecessaryCondition; }
          set { SetNecessaryCondition(value); }
        }
        public Builder SetNecessaryCondition(ulong value) {
          PrepareBuilder();
          result.hasNecessaryCondition = true;
          result.necessaryCondition_ = value;
          return this;
        }
        public Builder ClearNecessaryCondition() {
          PrepareBuilder();
          result.hasNecessaryCondition = false;
          result.necessaryCondition_ = 0UL;
          return this;
        }
        
        public bool HasTarget {
          get { return result.hasTarget; }
        }
        public uint Target {
  
gt:         get { return result.Target; }