context: // Generated by ProtoGen, Version=2.3.0.277, Culture=neutral, PublicKeyToken=17b3b1f090c3ea48.  DO NOT EDIT!
  #pragma warning disable 1591
  #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 {
    
    namespace Proto {
      
      [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
      [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
      [global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
      public static partial class ContentHandle {
      
        #region Extension registration
        public static void RegisterAllExtensions(pb::ExtensionRegistry registry) {
        }
        #endregion
        #region Static variables
        internal static pbd::MessageDescriptor internal__static_bnet_protocol_ContentHandle__Descriptor;
        internal static pb::FieldAccess.FieldAccessorTable<global::bnet.protocol.ContentHandle, global::bnet.protocol.ContentHandle.Builder> internal__static_bnet_protocol_ContentHandle__FieldAccessorTable;
        #endregion
        #region Descriptor
        public static pbd::FileDescriptor Descriptor {
          get { return descriptor; }
        }
        private static pbd::FileDescriptor descriptor;
        
        static ContentHandle() {
          byte[] descriptorData = global::System.Convert.FromBase64String(
              "CiFsaWIvcHJvdG9jb2wvY29udGVudF9oYW5kbGUucHJvdG8SDWJuZXQucHJv" + 
              "dG9jb2wiPAoNQ29udGVudEhhbmRsZRIOCgZyZWdpb24YASACKAcSDQoFdXNh" + 
              "Z2UYAiACKAcSDAoEaGFzaBgDIAIoDA==");
          pbd::FileDescriptor.InternalDescriptorAssigner assigner = delegate(pbd::FileDescriptor root) {
            descriptor = root;
            internal__static_bnet_protocol_ContentHandle__Descriptor = Descriptor.MessageTypes[0];
            internal__static_bnet_protocol_ContentHandle__FieldAccessorTable = 
                new pb::FieldAccess.FieldAccessorTable<global::bnet.protocol.ContentHandle, global::bnet.protocol.ContentHandle.Builder>(internal__static_bnet_protocol_ContentHandle__Descriptor,
                    new string[] { "Region", "Usage", "Hash", });
            return null;
          };
          pbd::FileDescriptor.InternalBuildGeneratedFileFrom(descriptorData,
              new pbd::FileDescriptor[] {
              }, assigner);
        }
        #endregion
        
      }
    }
    #region Messages
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
    public sealed partial class ContentHandle : pb::GeneratedMessage<ContentHandle, ContentHandle.Builder> {
      private static readonly ContentHandle defaultInstance = new Builder().BuildPartial();
      private static readonly string[] _contentHandleFieldNames = new string[] { "hash", "region", "usage" };
      private static readonly uint[] _contentHandleFieldTags = new uint[] { 26, 13, 21 };
      public static ContentHandle DefaultInstance {
        get { return defaultInstance; }
      }
      
      public override ContentHandle DefaultInstanceForType {
        get { return defaultInstance; }
      }
      
      protected override ContentHandle ThisMessage {
        get { return this; }
      }
      
      public static pbd::MessageDescriptor Descriptor {
        get { return global::bnet.protocol.Proto.ContentHandle.internal__static_bnet_protocol_ContentHandle__Descriptor; }
      }
      
      protected override pb::FieldAccess.FieldAccessorTable<ContentHandle, ContentHandle.Builder> InternalFieldAccessors {
        get { return global::bnet.protocol.Proto.ContentHandle.internal__static_bnet_protocol_ContentHandle__FieldAccessorTable; }
      }
      
      public const int RegionFieldNumber = 1;
      private bool hasRegion;
      private uint region_;
      public bool HasRegion {
        get { return hasRegion; }
      }
      public uint Region {
        get { return region_; }
      }
      
      public const int UsageFieldNumber = 2;
      private bool hasUsage;
      private uint usage_;
      public bool HasUsage {
        get { return hasUsage; }
      }
      public uint Usage {
        get { return usage_; }
      }
      
      public const int HashFieldNumber = 3;
      private bool hasHash;
      private pb::ByteString hash_ = pb::ByteString.Empty;
      public bool HasHash {
        get { return hasHash; }
      }
      public pb::ByteString Hash {
        get { return hash_; }
      }
      
      public override bool IsInitialized {
        get {
          if (!hasRegion) return false;
          if (!hasUsage) return false;
          if (!hasHash) return false;
          return true;
        }
      }
      
      public override void WriteTo(pb::ICodedOutputStream output) {
        int size = SerializedSize;
        string[] field_names = _contentHandleFieldNames;
        if (hasRegion) {
          output.WriteFixed32(1, field_names[1], Region);
        }
        if (hasUsage) {
          output.WriteFixed32(2, field_names[2], Usage);
        }
        if (hasHash) {
          output.WriteBytes(3, field_names[0], Hash);
        }
        UnknownFields.WriteTo(output);
      }
      
      private int memoizedSerializedSize = -1;
      public override int SerializedSize {
        get {
          int size = memoizedSerializedSize;
          if (size != -1) return size;
          
          size = 0;
          if (hasRegion) {
            size += pb::CodedOutputStream.ComputeFixed32Size(1, Region);
          }
          if (hasUsage) {
            size += pb::CodedOutputStream.ComputeFixed32Size(2, Usage);
          }
          if (hasHash) {
            size += pb::CodedOutputStream.ComputeBytesSize(3, Hash);
          }
          size += UnknownFields.SerializedSize;
          memoizedSerializedSize = size;
          return size;
        }
      }
      
      public static ContentHandle ParseFrom(pb::ByteString data) {
        return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
      }
      public static ContentHandle ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
        return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
      }
      public static ContentHandle ParseFrom(byte[] data) {
        return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
      }
      public static ContentHandle ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
        return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
      }
      public static ContentHandle ParseFrom(global::System.IO.Stream input) {
        return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
      }
      public static ContentHandle ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
        return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
      }
      public static ContentHandle ParseDelimitedFrom(global::System.IO.Stream input) {
        return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
      }
      public static ContentHandle ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
        return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
      }
      public static ContentHandle ParseFrom(pb::ICodedInputStream input) {
        return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
      }
      public static ContentHandle ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
        return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
      }
      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(ContentHandle prototype) {
        return (Builder) new Builder().MergeFrom(prototype);
      }
      
      [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
      [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
      [global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
      public sealed partial class Builder : pb::GeneratedBuilder<ContentHandle, Builder> {
        protected override Builder ThisBuilder {
          get { return this; }
        }
        public Builder() {}
        
        ContentHandle result = new ContentHandle();
        
        protected override ContentHandle MessageBeingBuilt {
          get { return result; }
        }
        
        public override Builder Clear() {
          result = new ContentHandle();
          return this;
        }
        
        public override Builder Clone() {
          return new Builder().MergeFrom(result);
        }
        
        public override pbd::MessageDescriptor DescriptorForType {
          get { return global::bnet.protocol.ContentHandle.Descriptor; }
        }
        
        public override ContentHandle DefaultInstanceForType {
          get { return global::bnet.protocol.ContentHandle.DefaultInstance; }
        }
        
        public override ContentHandle BuildPartial() {
          if (result == null) {
            throw new global::System.InvalidOperationException("build() has already been called on this Builder");
          }
          ContentHandle returnMe = result;
          result = null;
          return returnMe;
        }
        
        public override Builder MergeFrom(pb::IMessage other) {
          if (other is ContentHandle) {
            return MergeFrom((ContentHandle) other);
          } else {
            base.MergeFrom(other);
            return this;
          }
        }
        
        public override Builder MergeFrom(ContentHandle other) {
          if (other == global::bnet.protocol.ContentHandle.DefaultInstance) return this;
          if (other.HasRegion) {
            Region = other.Region;
          }
          if (other.HasUsage) {
            Usage = other.Usage;
          }
          if (other.HasHash) {
            Hash = other.Hash;
          }
          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) {
          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(_contentHandleFieldNames, field_name, global::System.StringComparer.Ordinal);
              if(field_ordinal >= 0)
                tag = _contentHandleFieldTags[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 13: {
                result.hasRegion = input.ReadFixed32(ref result.region_);
                break;
              }
              case 21: {
                result.hasUsage = input.ReadFixed32(ref result.usage_);
                break;
              }
              case 26: {
                result.hasHash = input.ReadBytes(ref result.hash_);
                break;
              }
            }
          }
          
          if (unknownFields != null) {
            this.UnknownFields = unknownFields.Build();
          }
          return this;
        }
        
        
        public bool HasRegion {
  
gt:         get { return result.hasRegion; }