// <auto-generated>
//     Generated by the protocol buffer compiler.  DO NOT EDIT!
//     source: messages2.proto.orig
// </auto-generated>
#pragma warning disable 1591, 0612, 3021
#region Designer generated code

using pb = global::LC.Google.Protobuf;
using pbc = global::LC.Google.Protobuf.Collections;
using pbr = global::LC.Google.Protobuf.Reflection;
using scg = global::System.Collections.Generic;
namespace LeanCloud.Realtime.Internal.Protocol {

  /// <summary>Holder for reflection information generated from messages2.proto.orig</summary>
  public static partial class Messages2ProtoReflection {

    #region Descriptor
    /// <summary>File descriptor for messages2.proto.orig</summary>
    public static pbr::FileDescriptor Descriptor {
      get { return descriptor; }
    }
    private static pbr::FileDescriptor descriptor;

    static Messages2ProtoReflection() {
      byte[] descriptorData = global::System.Convert.FromBase64String(
          string.Concat(
            "ChRtZXNzYWdlczIucHJvdG8ub3JpZxIVcHVzaF9zZXJ2ZXIubWVzc2FnZXMy",
            "ImEKD1NlbWFudGljVmVyc2lvbhINCgVtYWpvchgBIAEoBRINCgVtaW5vchgC",
            "IAEoBRINCgVwYXRjaBgDIAEoBRISCgpwcmVSZWxlYXNlGAQgASgJEg0KBWJ1",
            "aWxkGAUgASgJIjQKDkFuZHJvaWRWZXJzaW9uEhAKCGNvZGVuYW1lGAEgASgJ",
            "EhAKCGFwaUxldmVsGAIgASgJItEBCgpTeXN0ZW1JbmZvEjUKCmRldmljZVR5",
            "cGUYASABKA4yIS5wdXNoX3NlcnZlci5tZXNzYWdlczIuRGV2aWNlVHlwZRI5",
            "Cglvc1ZlcnNpb24YAiABKAsyJi5wdXNoX3NlcnZlci5tZXNzYWdlczIuU2Vt",
            "YW50aWNWZXJzaW9uEj0KDmFuZHJvaWRWZXJzaW9uGAMgASgLMiUucHVzaF9z",
            "ZXJ2ZXIubWVzc2FnZXMyLkFuZHJvaWRWZXJzaW9uEhIKCmlzRW11bGF0b3IY",
            "BCABKAgiIQoRSnNvbk9iamVjdE1lc3NhZ2USDAoEZGF0YRgBIAIoCSK2AQoL",
            "VW5yZWFkVHVwbGUSCwoDY2lkGAEgAigJEg4KBnVucmVhZBgCIAIoBRILCgNt",
            "aWQYAyABKAkSEQoJdGltZXN0YW1wGAQgASgDEgwKBGZyb20YBSABKAkSDAoE",
            "ZGF0YRgGIAEoCRIWCg5wYXRjaFRpbWVzdGFtcBgHIAEoAxIRCgltZW50aW9u",
            "ZWQYCCABKAgSEQoJYmluYXJ5TXNnGAkgASgMEhAKCGNvbnZUeXBlGAogASgF",
            "IsYBCgdMb2dJdGVtEgwKBGZyb20YASABKAkSDAoEZGF0YRgCIAEoCRIRCgl0",
            "aW1lc3RhbXAYAyABKAMSDQoFbXNnSWQYBCABKAkSDQoFYWNrQXQYBSABKAMS",
            "DgoGcmVhZEF0GAYgASgDEhYKDnBhdGNoVGltZXN0YW1wGAcgASgDEhIKCm1l",
            "bnRpb25BbGwYCCABKAgSEwoLbWVudGlvblBpZHMYCSADKAkSCwoDYmluGAog",
            "ASgIEhAKCGNvbnZUeXBlGAsgASgFIjsKDkNvbnZNZW1iZXJJbmZvEgsKA3Bp",
            "ZBgBIAEoCRIMCgRyb2xlGAIgASgJEg4KBmluZm9JZBgDIAEoCSJFCgxMb2dp",
            "bkNvbW1hbmQSNQoKc3lzdGVtSW5mbxgBIAEoCzIhLnB1c2hfc2VydmVyLm1l",
            "c3NhZ2VzMi5TeXN0ZW1JbmZvIicKD0xvZ2dlZGluQ29tbWFuZBIUCgxwdXNo",
            "RGlzYWJsZWQYASABKAgiYgoLRGF0YUNvbW1hbmQSCwoDaWRzGAEgAygJEjUK",
            "A21zZxgCIAMoCzIoLnB1c2hfc2VydmVyLm1lc3NhZ2VzMi5Kc29uT2JqZWN0",
            "TWVzc2FnZRIPCgdvZmZsaW5lGAMgASgIIogDCg5TZXNzaW9uQ29tbWFuZBIJ",
            "CgF0GAEgASgDEgkKAW4YAiABKAkSCQoBcxgDIAEoCRIKCgJ1YRgEIAEoCRIJ",
            "CgFyGAUgASgIEgsKA3RhZxgGIAEoCRIQCghkZXZpY2VJZBgHIAEoCRIWCg5z",
            "ZXNzaW9uUGVlcklkcxgIIAMoCRIcChRvbmxpbmVTZXNzaW9uUGVlcklkcxgJ",
            "IAMoCRIKCgJzdBgKIAEoCRINCgVzdFR0bBgLIAEoBRIMCgRjb2RlGAwgASgF",
            "Eg4KBnJlYXNvbhgNIAEoCRITCgtkZXZpY2VUb2tlbhgOIAEoCRIKCgJzcBgP",
            "IAEoCBIOCgZkZXRhaWwYECABKAkSGwoTbGFzdFVucmVhZE5vdGlmVGltZRgR",
            "IAEoAxIVCg1sYXN0UGF0Y2hUaW1lGBIgASgDEhQKDGNvbmZpZ0JpdG1hcBgT",
            "IAEoAxI1CgpzeXN0ZW1JbmZvGBQgASgLMiEucHVzaF9zZXJ2ZXIubWVzc2Fn",
            "ZXMyLlN5c3RlbUluZm8iawoMRXJyb3JDb21tYW5kEgwKBGNvZGUYASACKAUS",
            "DgoGcmVhc29uGAIgAigJEg8KB2FwcENvZGUYAyABKAUSDgoGZGV0YWlsGAQg",
            "ASgJEgwKBHBpZHMYBSADKAkSDgoGYXBwTXNnGAYgASgJIt4CCg1EaXJlY3RD",
            "b21tYW5kEgsKA21zZxgBIAEoCRILCgN1aWQYAiABKAkSEgoKZnJvbVBlZXJJ",
            "ZBgDIAEoCRIRCgl0aW1lc3RhbXAYBCABKAMSDwoHb2ZmbGluZRgFIAEoCBIP",
            "CgdoYXNNb3JlGAYgASgIEhEKCXRvUGVlcklkcxgHIAMoCRIJCgFyGAogASgI",
            "EgsKA2NpZBgLIAEoCRIKCgJpZBgMIAEoCRIRCgl0cmFuc2llbnQYDSABKAgS",
            "CgoCZHQYDiABKAkSDgoGcm9vbUlkGA8gASgJEhAKCHB1c2hEYXRhGBAgASgJ",
            "EgwKBHdpbGwYESABKAgSFgoOcGF0Y2hUaW1lc3RhbXAYEiABKAMSEQoJYmlu",
            "YXJ5TXNnGBMgASgMEhMKC21lbnRpb25QaWRzGBQgAygJEhIKCm1lbnRpb25B",
            "bGwYFSABKAgSEAoIY29udlR5cGUYFiABKAUitgEKCkFja0NvbW1hbmQSDAoE",
            "Y29kZRgBIAEoBRIOCgZyZWFzb24YAiABKAkSCwoDbWlkGAMgASgJEgsKA2Np",
            "ZBgEIAEoCRIJCgF0GAUgASgDEgsKA3VpZBgGIAEoCRIOCgZmcm9tdHMYByAB",
            "KAMSDAoEdG90cxgIIAEoAxIMCgR0eXBlGAkgASgJEgsKA2lkcxgKIAMoCRIP",
            "CgdhcHBDb2RlGAsgASgFEg4KBmFwcE1zZxgMIAEoCSJVCg1VbnJlYWRDb21t",
            "YW5kEjEKBWNvbnZzGAEgAygLMiIucHVzaF9zZXJ2ZXIubWVzc2FnZXMyLlVu",
            "cmVhZFR1cGxlEhEKCW5vdGlmVGltZRgCIAEoAyKRBwoLQ29udkNvbW1hbmQS",
            "CQoBbRgBIAMoCRIRCgl0cmFuc2llbnQYAiABKAgSDgoGdW5pcXVlGAMgASgI",
            "EgsKA2NpZBgEIAEoCRINCgVjZGF0ZRgFIAEoCRIOCgZpbml0QnkYBiABKAkS",
            "DAoEc29ydBgHIAEoCRINCgVsaW1pdBgIIAEoBRIMCgRza2lwGAkgASgFEgwK",
            "BGZsYWcYCiABKAUSDQoFY291bnQYCyABKAUSDQoFdWRhdGUYDCABKAkSCQoB",
            "dBgNIAEoAxIJCgFuGA4gASgJEgkKAXMYDyABKAkSEQoJc3RhdHVzU3ViGBAg",
            "ASgIEhEKCXN0YXR1c1B1YhgRIAEoCBIRCglzdGF0dXNUVEwYEiABKAUSEAoI",
            "dW5pcXVlSWQYEyABKAkSFgoOdGFyZ2V0Q2xpZW50SWQYFCABKAkSGAoQbWF4",
            "UmVhZFRpbWVzdGFtcBgVIAEoAxIXCg9tYXhBY2tUaW1lc3RhbXAYFiABKAMS",
            "FwoPcXVlcnlBbGxNZW1iZXJzGBcgASgIEjoKDW1heFJlYWRUdXBsZXMYGCAD",
            "KAsyIy5wdXNoX3NlcnZlci5tZXNzYWdlczIuTWF4UmVhZFR1cGxlEgwKBGNp",
            "ZHMYGSADKAkSMwoEaW5mbxgaIAEoCzIlLnB1c2hfc2VydmVyLm1lc3NhZ2Vz",
            "Mi5Db252TWVtYmVySW5mbxIQCgh0ZW1wQ29udhgbIAEoCBITCgt0ZW1wQ29u",
            "dlRUTBgcIAEoBRITCgt0ZW1wQ29udklkcxgdIAMoCRITCgthbGxvd2VkUGlk",
            "cxgeIAMoCRI3CgpmYWlsZWRQaWRzGB8gAygLMiMucHVzaF9zZXJ2ZXIubWVz",
            "c2FnZXMyLkVycm9yQ29tbWFuZBIMCgRuZXh0GCggASgJEjkKB3Jlc3VsdHMY",
            "ZCABKAsyKC5wdXNoX3NlcnZlci5tZXNzYWdlczIuSnNvbk9iamVjdE1lc3Nh",
            "Z2USNwoFd2hlcmUYZSABKAsyKC5wdXNoX3NlcnZlci5tZXNzYWdlczIuSnNv",
            "bk9iamVjdE1lc3NhZ2USNgoEYXR0chhnIAEoCzIoLnB1c2hfc2VydmVyLm1l",
            "c3NhZ2VzMi5Kc29uT2JqZWN0TWVzc2FnZRI+CgxhdHRyTW9kaWZpZWQYaCAB",
            "KAsyKC5wdXNoX3NlcnZlci5tZXNzYWdlczIuSnNvbk9iamVjdE1lc3NhZ2Ui",
            "eAoLUm9vbUNvbW1hbmQSDgoGcm9vbUlkGAEgASgJEgkKAXMYAiABKAkSCQoB",
            "dBgDIAEoAxIJCgFuGAQgASgJEhEKCXRyYW5zaWVudBgFIAEoCBITCgtyb29t",
            "UGVlcklkcxgGIAMoCRIQCghieVBlZXJJZBgHIAEoCSLcAgoLTG9nc0NvbW1h",
            "bmQSCwoDY2lkGAEgASgJEgkKAWwYAiABKAUSDQoFbGltaXQYAyABKAUSCQoB",
            "dBgEIAEoAxIKCgJ0dBgFIAEoAxIMCgR0bWlkGAYgASgJEgsKA21pZBgHIAEo",
            "CRIQCghjaGVja3N1bRgIIAEoCRIOCgZzdG9yZWQYCSABKAgSSQoJZGlyZWN0",
            "aW9uGAogASgOMjEucHVzaF9zZXJ2ZXIubWVzc2FnZXMyLkxvZ3NDb21tYW5k",
            "LlF1ZXJ5RGlyZWN0aW9uOgNPTEQSEQoJdEluY2x1ZGVkGAsgASgIEhIKCnR0",
            "SW5jbHVkZWQYDCABKAgSDgoGbGN0eXBlGA0gASgFEiwKBGxvZ3MYaSADKAsy",
            "Hi5wdXNoX3NlcnZlci5tZXNzYWdlczIuTG9nSXRlbSIiCg5RdWVyeURpcmVj",
            "dGlvbhIHCgNPTEQQARIHCgNORVcQAiJMCgpSY3BDb21tYW5kEgoKAmlkGAEg",
            "ASgJEgsKA2NpZBgCIAEoCRIJCgF0GAMgASgDEgwKBHJlYWQYBCABKAgSDAoE",
            "ZnJvbRgFIAEoCSI4CglSZWFkVHVwbGUSCwoDY2lkGAEgAigJEhEKCXRpbWVz",
            "dGFtcBgCIAEoAxILCgNtaWQYAyABKAkiTgoMTWF4UmVhZFR1cGxlEgsKA3Bp",
            "ZBgBIAEoCRIXCg9tYXhBY2tUaW1lc3RhbXAYAiABKAMSGAoQbWF4UmVhZFRp",
            "bWVzdGFtcBgDIAEoAyJZCgtSZWFkQ29tbWFuZBILCgNjaWQYASABKAkSDAoE",
            "Y2lkcxgCIAMoCRIvCgVjb252cxgDIAMoCzIgLnB1c2hfc2VydmVyLm1lc3Nh",
            "Z2VzMi5SZWFkVHVwbGUiaQoPUHJlc2VuY2VDb21tYW5kEjEKBnN0YXR1cxgB",
            "IAEoDjIhLnB1c2hfc2VydmVyLm1lc3NhZ2VzMi5TdGF0dXNUeXBlEhYKDnNl",
            "c3Npb25QZWVySWRzGAIgAygJEgsKA2NpZBgDIAEoCSI/Cg1SZXBvcnRDb21t",
            "YW5kEhIKCmluaXRpYXRpdmUYASABKAgSDAoEdHlwZRgCIAEoCRIMCgRkYXRh",
            "GAMgASgJIuABCglQYXRjaEl0ZW0SCwoDY2lkGAEgASgJEgsKA21pZBgCIAEo",
            "CRIRCgl0aW1lc3RhbXAYAyABKAMSDgoGcmVjYWxsGAQgASgIEgwKBGRhdGEY",
            "BSABKAkSFgoOcGF0Y2hUaW1lc3RhbXAYBiABKAMSDAoEZnJvbRgHIAEoCRIR",
            "CgliaW5hcnlNc2cYCCABKAwSEgoKbWVudGlvbkFsbBgJIAEoCBITCgttZW50",
            "aW9uUGlkcxgKIAMoCRIRCglwYXRjaENvZGUYCyABKAMSEwoLcGF0Y2hSZWFz",
            "b24YDCABKAkiWAoMUGF0Y2hDb21tYW5kEjEKB3BhdGNoZXMYASADKAsyIC5w",
            "dXNoX3NlcnZlci5tZXNzYWdlczIuUGF0Y2hJdGVtEhUKDWxhc3RQYXRjaFRp",
            "bWUYAiABKAMiqQEKDVB1YnN1YkNvbW1hbmQSCwoDY2lkGAEgASgJEgwKBGNp",
            "ZHMYAiADKAkSDQoFdG9waWMYAyABKAkSEAoIc3VidG9waWMYBCABKAkSDgoG",
            "dG9waWNzGAUgAygJEhEKCXN1YnRvcGljcxgGIAMoCRI5CgdyZXN1bHRzGAcg",
            "ASgLMigucHVzaF9zZXJ2ZXIubWVzc2FnZXMyLkpzb25PYmplY3RNZXNzYWdl",
            "IogCChBCbGFja2xpc3RDb21tYW5kEg4KBnNyY0NpZBgBIAEoCRIOCgZ0b1Bp",
            "ZHMYAiADKAkSDgoGc3JjUGlkGAMgASgJEg4KBnRvQ2lkcxgEIAMoCRINCgVs",
            "aW1pdBgFIAEoBRIMCgRuZXh0GAYgASgJEhMKC2Jsb2NrZWRQaWRzGAggAygJ",
            "EhMKC2Jsb2NrZWRDaWRzGAkgAygJEhMKC2FsbG93ZWRQaWRzGAogAygJEjcK",
            "CmZhaWxlZFBpZHMYCyADKAsyIy5wdXNoX3NlcnZlci5tZXNzYWdlczIuRXJy",
            "b3JDb21tYW5kEgkKAXQYDCABKAMSCQoBbhgNIAEoCRIJCgFzGA4gASgJIsMK",
            "Cg5HZW5lcmljQ29tbWFuZBIvCgNjbWQYASABKA4yIi5wdXNoX3NlcnZlci5t",
            "ZXNzYWdlczIuQ29tbWFuZFR5cGUSKQoCb3AYAiABKA4yHS5wdXNoX3NlcnZl",
            "ci5tZXNzYWdlczIuT3BUeXBlEg0KBWFwcElkGAMgASgJEg4KBnBlZXJJZBgE",
            "IAEoCRIJCgFpGAUgASgFEhYKDmluc3RhbGxhdGlvbklkGAYgASgJEhAKCHBy",
            "aW9yaXR5GAcgASgFEg8KB3NlcnZpY2UYCCABKAUSEAoIc2VydmVyVHMYCSAB",
            "KAMSEAoIY2xpZW50VHMYCiABKAMSGAoQbm90aWZpY2F0aW9uVHlwZRgLIAEo",
            "BRI5Cgxsb2dpbk1lc3NhZ2UYZCABKAsyIy5wdXNoX3NlcnZlci5tZXNzYWdl",
            "czIuTG9naW5Db21tYW5kEjcKC2RhdGFNZXNzYWdlGGUgASgLMiIucHVzaF9z",
            "ZXJ2ZXIubWVzc2FnZXMyLkRhdGFDb21tYW5kEj0KDnNlc3Npb25NZXNzYWdl",
            "GGYgASgLMiUucHVzaF9zZXJ2ZXIubWVzc2FnZXMyLlNlc3Npb25Db21tYW5k",
            "EjkKDGVycm9yTWVzc2FnZRhnIAEoCzIjLnB1c2hfc2VydmVyLm1lc3NhZ2Vz",
            "Mi5FcnJvckNvbW1hbmQSOwoNZGlyZWN0TWVzc2FnZRhoIAEoCzIkLnB1c2hf",
            "c2VydmVyLm1lc3NhZ2VzMi5EaXJlY3RDb21tYW5kEjUKCmFja01lc3NhZ2UY",
            "aSABKAsyIS5wdXNoX3NlcnZlci5tZXNzYWdlczIuQWNrQ29tbWFuZBI7Cg11",
            "bnJlYWRNZXNzYWdlGGogASgLMiQucHVzaF9zZXJ2ZXIubWVzc2FnZXMyLlVu",
            "cmVhZENvbW1hbmQSNwoLcmVhZE1lc3NhZ2UYayABKAsyIi5wdXNoX3NlcnZl",
            "ci5tZXNzYWdlczIuUmVhZENvbW1hbmQSNQoKcmNwTWVzc2FnZRhsIAEoCzIh",
            "LnB1c2hfc2VydmVyLm1lc3NhZ2VzMi5SY3BDb21tYW5kEjcKC2xvZ3NNZXNz",
            "YWdlGG0gASgLMiIucHVzaF9zZXJ2ZXIubWVzc2FnZXMyLkxvZ3NDb21tYW5k",
            "EjcKC2NvbnZNZXNzYWdlGG4gASgLMiIucHVzaF9zZXJ2ZXIubWVzc2FnZXMy",
            "LkNvbnZDb21tYW5kEjcKC3Jvb21NZXNzYWdlGG8gASgLMiIucHVzaF9zZXJ2",
            "ZXIubWVzc2FnZXMyLlJvb21Db21tYW5kEj8KD3ByZXNlbmNlTWVzc2FnZRhw",
            "IAEoCzImLnB1c2hfc2VydmVyLm1lc3NhZ2VzMi5QcmVzZW5jZUNvbW1hbmQS",
            "OwoNcmVwb3J0TWVzc2FnZRhxIAEoCzIkLnB1c2hfc2VydmVyLm1lc3NhZ2Vz",
            "Mi5SZXBvcnRDb21tYW5kEjkKDHBhdGNoTWVzc2FnZRhyIAEoCzIjLnB1c2hf",
            "c2VydmVyLm1lc3NhZ2VzMi5QYXRjaENvbW1hbmQSOwoNcHVic3ViTWVzc2Fn",
            "ZRhzIAEoCzIkLnB1c2hfc2VydmVyLm1lc3NhZ2VzMi5QdWJzdWJDb21tYW5k",
            "EkEKEGJsYWNrbGlzdE1lc3NhZ2UYdCABKAsyJy5wdXNoX3NlcnZlci5tZXNz",
            "YWdlczIuQmxhY2tsaXN0Q29tbWFuZBI/Cg9sb2dnZWRpbk1lc3NhZ2UYdSAB",
            "KAsyJi5wdXNoX3NlcnZlci5tZXNzYWdlczIuTG9nZ2VkaW5Db21tYW5kKosC",
            "CgtDb21tYW5kVHlwZRILCgdzZXNzaW9uEAASCAoEY29udhABEgoKBmRpcmVj",
            "dBACEgcKA2FjaxADEgcKA3JjcBAEEgoKBnVucmVhZBAFEggKBGxvZ3MQBhIJ",
            "CgVlcnJvchAHEgkKBWxvZ2luEAgSCAoEZGF0YRAJEggKBHJvb20QChIICgRy",
            "ZWFkEAsSDAoIcHJlc2VuY2UQDBIKCgZyZXBvcnQQDRIICgRlY2hvEA4SDAoI",
            "bG9nZ2VkaW4QDxIKCgZsb2dvdXQQEBINCglsb2dnZWRvdXQQERIJCgVwYXRj",
            "aBASEgoKBnB1YnN1YhATEg0KCWJsYWNrbGlzdBAUEgoKBmdvYXdheRAVKo0I",
            "CgZPcFR5cGUSCAoEb3BlbhABEgcKA2FkZBACEgoKBnJlbW92ZRADEgkKBWNs",
            "b3NlEAQSCgoGb3BlbmVkEAUSCgoGY2xvc2VkEAYSCQoFcXVlcnkQBxIQCgxx",
            "dWVyeV9yZXN1bHQQCBIMCghjb25mbGljdBAJEgkKBWFkZGVkEAoSCwoHcmVt",
            "b3ZlZBALEgsKB3JlZnJlc2gQDBINCglyZWZyZXNoZWQQDRIJCgVzdGFydBAe",
            "EgsKB3N0YXJ0ZWQQHxIKCgZqb2luZWQQIBISCg5tZW1iZXJzX2pvaW5lZBAh",
            "EggKBGxlZnQQJxIQCgxtZW1iZXJzX2xlZnQQKBILCgdyZXN1bHRzECoSCQoF",
            "Y291bnQQKxIKCgZyZXN1bHQQLBIKCgZ1cGRhdGUQLRILCgd1cGRhdGVkEC4S",
            "CAoEbXV0ZRAvEgoKBnVubXV0ZRAwEgoKBnN0YXR1cxAxEgsKB21lbWJlcnMQ",
            "MhIMCghtYXhfcmVhZBAzEg0KCWlzX21lbWJlchA0EhYKEm1lbWJlcl9pbmZv",
            "X3VwZGF0ZRA1EhcKE21lbWJlcl9pbmZvX3VwZGF0ZWQQNhIXChNtZW1iZXJf",
            "aW5mb19jaGFuZ2VkEDcSCAoEam9pbhBQEgoKBmludml0ZRBREgkKBWxlYXZl",
            "EFISCAoEa2ljaxBTEgoKBnJlamVjdBBUEgsKB2ludml0ZWQQVRIKCgZraWNr",
            "ZWQQVhIKCgZ1cGxvYWQQZBIMCgh1cGxvYWRlZBBlEg0KCXN1YnNjcmliZRB4",
            "Eg4KCnN1YnNjcmliZWQQeRIPCgt1bnN1YnNjcmliZRB6EhAKDHVuc3Vic2Ny",
            "aWJlZBB7EhEKDWlzX3N1YnNjcmliZWQQfBILCgZtb2RpZnkQlgESDQoIbW9k",
            "aWZpZWQQlwESCgoFYmxvY2sQqgESDAoHdW5ibG9jaxCrARIMCgdibG9ja2Vk",
            "EKwBEg4KCXVuYmxvY2tlZBCtARIUCg9tZW1iZXJzX2Jsb2NrZWQQrgESFgoR",
            "bWVtYmVyc191bmJsb2NrZWQQrwESEAoLY2hlY2tfYmxvY2sQsAESEQoMY2hl",
            "Y2tfcmVzdWx0ELEBEg8KCmFkZF9zaHV0dXAQtAESEgoNcmVtb3ZlX3NodXR1",
            "cBC1ARIRCgxxdWVyeV9zaHV0dXAQtgESEQoMc2h1dHVwX2FkZGVkELcBEhMK",
            "DnNodXR1cF9yZW1vdmVkELgBEhIKDXNodXR1cF9yZXN1bHQQuQESDQoIc2h1",
            "dHVwZWQQugESDwoKdW5zaHV0dXBlZBC7ARIVChBtZW1iZXJzX3NodXR1cGVk",
            "ELwBEhcKEm1lbWJlcnNfdW5zaHV0dXBlZBC9ARIRCgxjaGVja19zaHV0dXAQ",
            "vgEqHQoKU3RhdHVzVHlwZRIGCgJvbhABEgcKA29mZhACKi8KCkRldmljZVR5",
            "cGUSCwoHdW5rbm93bhAAEgsKB2FuZHJvaWQQARIHCgNpb3MQAkIuogIEQVZJ",
            "TaoCJExlYW5DbG91ZC5SZWFsdGltZS5JbnRlcm5hbC5Qcm90b2NvbA=="));
      descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
          new pbr::FileDescriptor[] { },
          new pbr::GeneratedClrTypeInfo(new[] {typeof(global::LeanCloud.Realtime.Internal.Protocol.CommandType), typeof(global::LeanCloud.Realtime.Internal.Protocol.OpType), typeof(global::LeanCloud.Realtime.Internal.Protocol.StatusType), typeof(global::LeanCloud.Realtime.Internal.Protocol.DeviceType), }, null, new pbr::GeneratedClrTypeInfo[] {
            new pbr::GeneratedClrTypeInfo(typeof(global::LeanCloud.Realtime.Internal.Protocol.SemanticVersion), global::LeanCloud.Realtime.Internal.Protocol.SemanticVersion.Parser, new[]{ "Major", "Minor", "Patch", "PreRelease", "Build" }, null, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::LeanCloud.Realtime.Internal.Protocol.AndroidVersion), global::LeanCloud.Realtime.Internal.Protocol.AndroidVersion.Parser, new[]{ "Codename", "ApiLevel" }, null, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::LeanCloud.Realtime.Internal.Protocol.SystemInfo), global::LeanCloud.Realtime.Internal.Protocol.SystemInfo.Parser, new[]{ "DeviceType", "OsVersion", "AndroidVersion", "IsEmulator" }, null, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::LeanCloud.Realtime.Internal.Protocol.JsonObjectMessage), global::LeanCloud.Realtime.Internal.Protocol.JsonObjectMessage.Parser, new[]{ "Data" }, null, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::LeanCloud.Realtime.Internal.Protocol.UnreadTuple), global::LeanCloud.Realtime.Internal.Protocol.UnreadTuple.Parser, new[]{ "Cid", "Unread", "Mid", "Timestamp", "From", "Data", "PatchTimestamp", "Mentioned", "BinaryMsg", "ConvType" }, null, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::LeanCloud.Realtime.Internal.Protocol.LogItem), global::LeanCloud.Realtime.Internal.Protocol.LogItem.Parser, new[]{ "From", "Data", "Timestamp", "MsgId", "AckAt", "ReadAt", "PatchTimestamp", "MentionAll", "MentionPids", "Bin", "ConvType" }, null, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::LeanCloud.Realtime.Internal.Protocol.ConvMemberInfo), global::LeanCloud.Realtime.Internal.Protocol.ConvMemberInfo.Parser, new[]{ "Pid", "Role", "InfoId" }, null, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::LeanCloud.Realtime.Internal.Protocol.LoginCommand), global::LeanCloud.Realtime.Internal.Protocol.LoginCommand.Parser, new[]{ "SystemInfo" }, null, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::LeanCloud.Realtime.Internal.Protocol.LoggedinCommand), global::LeanCloud.Realtime.Internal.Protocol.LoggedinCommand.Parser, new[]{ "PushDisabled" }, null, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::LeanCloud.Realtime.Internal.Protocol.DataCommand), global::LeanCloud.Realtime.Internal.Protocol.DataCommand.Parser, new[]{ "Ids", "Msg", "Offline" }, null, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::LeanCloud.Realtime.Internal.Protocol.SessionCommand), global::LeanCloud.Realtime.Internal.Protocol.SessionCommand.Parser, new[]{ "T", "N", "S", "Ua", "R", "Tag", "DeviceId", "SessionPeerIds", "OnlineSessionPeerIds", "St", "StTtl", "Code", "Reason", "DeviceToken", "Sp", "Detail", "LastUnreadNotifTime", "LastPatchTime", "ConfigBitmap", "SystemInfo" }, null, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::LeanCloud.Realtime.Internal.Protocol.ErrorCommand), global::LeanCloud.Realtime.Internal.Protocol.ErrorCommand.Parser, new[]{ "Code", "Reason", "AppCode", "Detail", "Pids", "AppMsg" }, null, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::LeanCloud.Realtime.Internal.Protocol.DirectCommand), global::LeanCloud.Realtime.Internal.Protocol.DirectCommand.Parser, new[]{ "Msg", "Uid", "FromPeerId", "Timestamp", "Offline", "HasMore", "ToPeerIds", "R", "Cid", "Id", "Transient", "Dt", "RoomId", "PushData", "Will", "PatchTimestamp", "BinaryMsg", "MentionPids", "MentionAll", "ConvType" }, null, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::LeanCloud.Realtime.Internal.Protocol.AckCommand), global::LeanCloud.Realtime.Internal.Protocol.AckCommand.Parser, new[]{ "Code", "Reason", "Mid", "Cid", "T", "Uid", "Fromts", "Tots", "Type", "Ids", "AppCode", "AppMsg" }, null, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::LeanCloud.Realtime.Internal.Protocol.UnreadCommand), global::LeanCloud.Realtime.Internal.Protocol.UnreadCommand.Parser, new[]{ "Convs", "NotifTime" }, null, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::LeanCloud.Realtime.Internal.Protocol.ConvCommand), global::LeanCloud.Realtime.Internal.Protocol.ConvCommand.Parser, new[]{ "M", "Transient", "Unique", "Cid", "Cdate", "InitBy", "Sort", "Limit", "Skip", "Flag", "Count", "Udate", "T", "N", "S", "StatusSub", "StatusPub", "StatusTTL", "UniqueId", "TargetClientId", "MaxReadTimestamp", "MaxAckTimestamp", "QueryAllMembers", "MaxReadTuples", "Cids", "Info", "TempConv", "TempConvTTL", "TempConvIds", "AllowedPids", "FailedPids", "Next", "Results", "Where", "Attr", "AttrModified" }, null, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::LeanCloud.Realtime.Internal.Protocol.RoomCommand), global::LeanCloud.Realtime.Internal.Protocol.RoomCommand.Parser, new[]{ "RoomId", "S", "T", "N", "Transient", "RoomPeerIds", "ByPeerId" }, null, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::LeanCloud.Realtime.Internal.Protocol.LogsCommand), global::LeanCloud.Realtime.Internal.Protocol.LogsCommand.Parser, new[]{ "Cid", "L", "Limit", "T", "Tt", "Tmid", "Mid", "Checksum", "Stored", "Direction", "TIncluded", "TtIncluded", "Lctype", "Logs" }, null, new[]{ typeof(global::LeanCloud.Realtime.Internal.Protocol.LogsCommand.Types.QueryDirection) }, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::LeanCloud.Realtime.Internal.Protocol.RcpCommand), global::LeanCloud.Realtime.Internal.Protocol.RcpCommand.Parser, new[]{ "Id", "Cid", "T", "Read", "From" }, null, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::LeanCloud.Realtime.Internal.Protocol.ReadTuple), global::LeanCloud.Realtime.Internal.Protocol.ReadTuple.Parser, new[]{ "Cid", "Timestamp", "Mid" }, null, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::LeanCloud.Realtime.Internal.Protocol.MaxReadTuple), global::LeanCloud.Realtime.Internal.Protocol.MaxReadTuple.Parser, new[]{ "Pid", "MaxAckTimestamp", "MaxReadTimestamp" }, null, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::LeanCloud.Realtime.Internal.Protocol.ReadCommand), global::LeanCloud.Realtime.Internal.Protocol.ReadCommand.Parser, new[]{ "Cid", "Cids", "Convs" }, null, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::LeanCloud.Realtime.Internal.Protocol.PresenceCommand), global::LeanCloud.Realtime.Internal.Protocol.PresenceCommand.Parser, new[]{ "Status", "SessionPeerIds", "Cid" }, null, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::LeanCloud.Realtime.Internal.Protocol.ReportCommand), global::LeanCloud.Realtime.Internal.Protocol.ReportCommand.Parser, new[]{ "Initiative", "Type", "Data" }, null, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::LeanCloud.Realtime.Internal.Protocol.PatchItem), global::LeanCloud.Realtime.Internal.Protocol.PatchItem.Parser, new[]{ "Cid", "Mid", "Timestamp", "Recall", "Data", "PatchTimestamp", "From", "BinaryMsg", "MentionAll", "MentionPids", "PatchCode", "PatchReason" }, null, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::LeanCloud.Realtime.Internal.Protocol.PatchCommand), global::LeanCloud.Realtime.Internal.Protocol.PatchCommand.Parser, new[]{ "Patches", "LastPatchTime" }, null, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::LeanCloud.Realtime.Internal.Protocol.PubsubCommand), global::LeanCloud.Realtime.Internal.Protocol.PubsubCommand.Parser, new[]{ "Cid", "Cids", "Topic", "Subtopic", "Topics", "Subtopics", "Results" }, null, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::LeanCloud.Realtime.Internal.Protocol.BlacklistCommand), global::LeanCloud.Realtime.Internal.Protocol.BlacklistCommand.Parser, new[]{ "SrcCid", "ToPids", "SrcPid", "ToCids", "Limit", "Next", "BlockedPids", "BlockedCids", "AllowedPids", "FailedPids", "T", "N", "S" }, null, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::LeanCloud.Realtime.Internal.Protocol.GenericCommand), global::LeanCloud.Realtime.Internal.Protocol.GenericCommand.Parser, new[]{ "Cmd", "Op", "AppId", "PeerId", "I", "InstallationId", "Priority", "Service", "ServerTs", "ClientTs", "NotificationType", "LoginMessage", "DataMessage", "SessionMessage", "ErrorMessage", "DirectMessage", "AckMessage", "UnreadMessage", "ReadMessage", "RcpMessage", "LogsMessage", "ConvMessage", "RoomMessage", "PresenceMessage", "ReportMessage", "PatchMessage", "PubsubMessage", "BlacklistMessage", "LoggedinMessage" }, null, null, null, null)
          }));
    }
    #endregion

  }
  #region Enums
  public enum CommandType {
    [pbr::OriginalName("session")] Session = 0,
    [pbr::OriginalName("conv")] Conv = 1,
    [pbr::OriginalName("direct")] Direct = 2,
    [pbr::OriginalName("ack")] Ack = 3,
    [pbr::OriginalName("rcp")] Rcp = 4,
    [pbr::OriginalName("unread")] Unread = 5,
    [pbr::OriginalName("logs")] Logs = 6,
    [pbr::OriginalName("error")] Error = 7,
    [pbr::OriginalName("login")] Login = 8,
    [pbr::OriginalName("data")] Data = 9,
    [pbr::OriginalName("room")] Room = 10,
    [pbr::OriginalName("read")] Read = 11,
    [pbr::OriginalName("presence")] Presence = 12,
    [pbr::OriginalName("report")] Report = 13,
    [pbr::OriginalName("echo")] Echo = 14,
    [pbr::OriginalName("loggedin")] Loggedin = 15,
    [pbr::OriginalName("logout")] Logout = 16,
    [pbr::OriginalName("loggedout")] Loggedout = 17,
    [pbr::OriginalName("patch")] Patch = 18,
    [pbr::OriginalName("pubsub")] Pubsub = 19,
    [pbr::OriginalName("blacklist")] Blacklist = 20,
    [pbr::OriginalName("goaway")] Goaway = 21,
  }

  public enum OpType {
    /// <summary>
    /// session
    /// </summary>
    [pbr::OriginalName("open")] Open = 1,
    [pbr::OriginalName("add")] Add = 2,
    [pbr::OriginalName("remove")] Remove = 3,
    [pbr::OriginalName("close")] Close = 4,
    [pbr::OriginalName("opened")] Opened = 5,
    [pbr::OriginalName("closed")] Closed = 6,
    [pbr::OriginalName("query")] Query = 7,
    [pbr::OriginalName("query_result")] QueryResult = 8,
    [pbr::OriginalName("conflict")] Conflict = 9,
    [pbr::OriginalName("added")] Added = 10,
    [pbr::OriginalName("removed")] Removed = 11,
    [pbr::OriginalName("refresh")] Refresh = 12,
    [pbr::OriginalName("refreshed")] Refreshed = 13,
    /// <summary>
    /// conv
    /// </summary>
    [pbr::OriginalName("start")] Start = 30,
    [pbr::OriginalName("started")] Started = 31,
    [pbr::OriginalName("joined")] Joined = 32,
    [pbr::OriginalName("members_joined")] MembersJoined = 33,
    /// <summary>
    /// add = 34; reuse session.add
    /// added = 35; reuse session.added
    /// remove = 37; reuse session.remove
    /// removed = 38; reuse session.removed
    /// </summary>
    [pbr::OriginalName("left")] Left = 39,
    [pbr::OriginalName("members_left")] MembersLeft = 40,
    /// <summary>
    ///  query = 41; reuse session.query
    /// </summary>
    [pbr::OriginalName("results")] Results = 42,
    [pbr::OriginalName("count")] Count = 43,
    [pbr::OriginalName("result")] Result = 44,
    [pbr::OriginalName("update")] Update = 45,
    [pbr::OriginalName("updated")] Updated = 46,
    [pbr::OriginalName("mute")] Mute = 47,
    [pbr::OriginalName("unmute")] Unmute = 48,
    [pbr::OriginalName("status")] Status = 49,
    [pbr::OriginalName("members")] Members = 50,
    [pbr::OriginalName("max_read")] MaxRead = 51,
    [pbr::OriginalName("is_member")] IsMember = 52,
    [pbr::OriginalName("member_info_update")] MemberInfoUpdate = 53,
    [pbr::OriginalName("member_info_updated")] MemberInfoUpdated = 54,
    [pbr::OriginalName("member_info_changed")] MemberInfoChanged = 55,
    /// <summary>
    /// room
    /// </summary>
    [pbr::OriginalName("join")] Join = 80,
    [pbr::OriginalName("invite")] Invite = 81,
    [pbr::OriginalName("leave")] Leave = 82,
    [pbr::OriginalName("kick")] Kick = 83,
    [pbr::OriginalName("reject")] Reject = 84,
    [pbr::OriginalName("invited")] Invited = 85,
    /// <summary>
    ///  joined = 32; reuse the value in conv section
    ///  left = 39; reuse the value in conv section
    /// </summary>
    [pbr::OriginalName("kicked")] Kicked = 86,
    /// <summary>
    /// report
    /// </summary>
    [pbr::OriginalName("upload")] Upload = 100,
    [pbr::OriginalName("uploaded")] Uploaded = 101,
    /// <summary>
    /// pubsub
    /// </summary>
    [pbr::OriginalName("subscribe")] Subscribe = 120,
    [pbr::OriginalName("subscribed")] Subscribed = 121,
    [pbr::OriginalName("unsubscribe")] Unsubscribe = 122,
    [pbr::OriginalName("unsubscribed")] Unsubscribed = 123,
    [pbr::OriginalName("is_subscribed")] IsSubscribed = 124,
    /// <summary>
    /// patch
    /// </summary>
    [pbr::OriginalName("modify")] Modify = 150,
    [pbr::OriginalName("modified")] Modified = 151,
    /// <summary>
    /// blacklist, query, query_result defined with 7, 8
    /// </summary>
    [pbr::OriginalName("block")] Block = 170,
    [pbr::OriginalName("unblock")] Unblock = 171,
    [pbr::OriginalName("blocked")] Blocked = 172,
    [pbr::OriginalName("unblocked")] Unblocked = 173,
    [pbr::OriginalName("members_blocked")] MembersBlocked = 174,
    [pbr::OriginalName("members_unblocked")] MembersUnblocked = 175,
    [pbr::OriginalName("check_block")] CheckBlock = 176,
    [pbr::OriginalName("check_result")] CheckResult = 177,
    [pbr::OriginalName("add_shutup")] AddShutup = 180,
    [pbr::OriginalName("remove_shutup")] RemoveShutup = 181,
    [pbr::OriginalName("query_shutup")] QueryShutup = 182,
    [pbr::OriginalName("shutup_added")] ShutupAdded = 183,
    [pbr::OriginalName("shutup_removed")] ShutupRemoved = 184,
    [pbr::OriginalName("shutup_result")] ShutupResult = 185,
    [pbr::OriginalName("shutuped")] Shutuped = 186,
    [pbr::OriginalName("unshutuped")] Unshutuped = 187,
    [pbr::OriginalName("members_shutuped")] MembersShutuped = 188,
    [pbr::OriginalName("members_unshutuped")] MembersUnshutuped = 189,
    /// <summary>
    /// check_result define in 177
    /// </summary>
    [pbr::OriginalName("check_shutup")] CheckShutup = 190,
  }

  public enum StatusType {
    [pbr::OriginalName("on")] On = 1,
    [pbr::OriginalName("off")] Off = 2,
  }

  public enum DeviceType {
    [pbr::OriginalName("unknown")] Unknown = 0,
    [pbr::OriginalName("android")] Android = 1,
    [pbr::OriginalName("ios")] Ios = 2,
  }

  #endregion

  #region Messages
  public sealed partial class SemanticVersion : pb::IMessage<SemanticVersion> {
    private static readonly pb::MessageParser<SemanticVersion> _parser = new pb::MessageParser<SemanticVersion>(() => new SemanticVersion());
    private pb::UnknownFieldSet _unknownFields;
    private int _hasBits0;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pb::MessageParser<SemanticVersion> Parser { get { return _parser; } }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pbr::MessageDescriptor Descriptor {
      get { return global::LeanCloud.Realtime.Internal.Protocol.Messages2ProtoReflection.Descriptor.MessageTypes[0]; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public SemanticVersion() {
      OnConstruction();
    }

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public SemanticVersion(SemanticVersion other) : this() {
      _hasBits0 = other._hasBits0;
      major_ = other.major_;
      minor_ = other.minor_;
      patch_ = other.patch_;
      preRelease_ = other.preRelease_;
      build_ = other.build_;
      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public SemanticVersion Clone() {
      return new SemanticVersion(this);
    }

    /// <summary>Field number for the "major" field.</summary>
    public const int MajorFieldNumber = 1;
    private readonly static int MajorDefaultValue = 0;

    private int major_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public int Major {
      get { if ((_hasBits0 & 1) != 0) { return major_; } else { return MajorDefaultValue; } }
      set {
        _hasBits0 |= 1;
        major_ = value;
      }
    }
    /// <summary>Gets whether the "major" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasMajor {
      get { return (_hasBits0 & 1) != 0; }
    }
    /// <summary>Clears the value of the "major" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearMajor() {
      _hasBits0 &= ~1;
    }

    /// <summary>Field number for the "minor" field.</summary>
    public const int MinorFieldNumber = 2;
    private readonly static int MinorDefaultValue = 0;

    private int minor_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public int Minor {
      get { if ((_hasBits0 & 2) != 0) { return minor_; } else { return MinorDefaultValue; } }
      set {
        _hasBits0 |= 2;
        minor_ = value;
      }
    }
    /// <summary>Gets whether the "minor" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasMinor {
      get { return (_hasBits0 & 2) != 0; }
    }
    /// <summary>Clears the value of the "minor" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearMinor() {
      _hasBits0 &= ~2;
    }

    /// <summary>Field number for the "patch" field.</summary>
    public const int PatchFieldNumber = 3;
    private readonly static int PatchDefaultValue = 0;

    private int patch_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public int Patch {
      get { if ((_hasBits0 & 4) != 0) { return patch_; } else { return PatchDefaultValue; } }
      set {
        _hasBits0 |= 4;
        patch_ = value;
      }
    }
    /// <summary>Gets whether the "patch" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasPatch {
      get { return (_hasBits0 & 4) != 0; }
    }
    /// <summary>Clears the value of the "patch" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearPatch() {
      _hasBits0 &= ~4;
    }

    /// <summary>Field number for the "preRelease" field.</summary>
    public const int PreReleaseFieldNumber = 4;
    private readonly static string PreReleaseDefaultValue = "";

    private string preRelease_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string PreRelease {
      get { return preRelease_ ?? PreReleaseDefaultValue; }
      set {
        preRelease_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }
    /// <summary>Gets whether the "preRelease" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasPreRelease {
      get { return preRelease_ != null; }
    }
    /// <summary>Clears the value of the "preRelease" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearPreRelease() {
      preRelease_ = null;
    }

    /// <summary>Field number for the "build" field.</summary>
    public const int BuildFieldNumber = 5;
    private readonly static string BuildDefaultValue = "";

    private string build_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string Build {
      get { return build_ ?? BuildDefaultValue; }
      set {
        build_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }
    /// <summary>Gets whether the "build" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasBuild {
      get { return build_ != null; }
    }
    /// <summary>Clears the value of the "build" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearBuild() {
      build_ = null;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override bool Equals(object other) {
      return Equals(other as SemanticVersion);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool Equals(SemanticVersion other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (Major != other.Major) return false;
      if (Minor != other.Minor) return false;
      if (Patch != other.Patch) return false;
      if (PreRelease != other.PreRelease) return false;
      if (Build != other.Build) return false;
      return Equals(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override int GetHashCode() {
      int hash = 1;
      if (HasMajor) hash ^= Major.GetHashCode();
      if (HasMinor) hash ^= Minor.GetHashCode();
      if (HasPatch) hash ^= Patch.GetHashCode();
      if (HasPreRelease) hash ^= PreRelease.GetHashCode();
      if (HasBuild) hash ^= Build.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 (HasMajor) {
        output.WriteRawTag(8);
        output.WriteInt32(Major);
      }
      if (HasMinor) {
        output.WriteRawTag(16);
        output.WriteInt32(Minor);
      }
      if (HasPatch) {
        output.WriteRawTag(24);
        output.WriteInt32(Patch);
      }
      if (HasPreRelease) {
        output.WriteRawTag(34);
        output.WriteString(PreRelease);
      }
      if (HasBuild) {
        output.WriteRawTag(42);
        output.WriteString(Build);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(output);
      }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public int CalculateSize() {
      int size = 0;
      if (HasMajor) {
        size += 1 + pb::CodedOutputStream.ComputeInt32Size(Major);
      }
      if (HasMinor) {
        size += 1 + pb::CodedOutputStream.ComputeInt32Size(Minor);
      }
      if (HasPatch) {
        size += 1 + pb::CodedOutputStream.ComputeInt32Size(Patch);
      }
      if (HasPreRelease) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(PreRelease);
      }
      if (HasBuild) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(Build);
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void MergeFrom(SemanticVersion other) {
      if (other == null) {
        return;
      }
      if (other.HasMajor) {
        Major = other.Major;
      }
      if (other.HasMinor) {
        Minor = other.Minor;
      }
      if (other.HasPatch) {
        Patch = other.Patch;
      }
      if (other.HasPreRelease) {
        PreRelease = other.PreRelease;
      }
      if (other.HasBuild) {
        Build = other.Build;
      }
      _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: {
            Major = input.ReadInt32();
            break;
          }
          case 16: {
            Minor = input.ReadInt32();
            break;
          }
          case 24: {
            Patch = input.ReadInt32();
            break;
          }
          case 34: {
            PreRelease = input.ReadString();
            break;
          }
          case 42: {
            Build = input.ReadString();
            break;
          }
        }
      }
    }

  }

  public sealed partial class AndroidVersion : pb::IMessage<AndroidVersion> {
    private static readonly pb::MessageParser<AndroidVersion> _parser = new pb::MessageParser<AndroidVersion>(() => new AndroidVersion());
    private pb::UnknownFieldSet _unknownFields;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pb::MessageParser<AndroidVersion> Parser { get { return _parser; } }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pbr::MessageDescriptor Descriptor {
      get { return global::LeanCloud.Realtime.Internal.Protocol.Messages2ProtoReflection.Descriptor.MessageTypes[1]; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public AndroidVersion() {
      OnConstruction();
    }

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public AndroidVersion(AndroidVersion other) : this() {
      codename_ = other.codename_;
      apiLevel_ = other.apiLevel_;
      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public AndroidVersion Clone() {
      return new AndroidVersion(this);
    }

    /// <summary>Field number for the "codename" field.</summary>
    public const int CodenameFieldNumber = 1;
    private readonly static string CodenameDefaultValue = "";

    private string codename_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string Codename {
      get { return codename_ ?? CodenameDefaultValue; }
      set {
        codename_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }
    /// <summary>Gets whether the "codename" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasCodename {
      get { return codename_ != null; }
    }
    /// <summary>Clears the value of the "codename" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearCodename() {
      codename_ = null;
    }

    /// <summary>Field number for the "apiLevel" field.</summary>
    public const int ApiLevelFieldNumber = 2;
    private readonly static string ApiLevelDefaultValue = "";

    private string apiLevel_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string ApiLevel {
      get { return apiLevel_ ?? ApiLevelDefaultValue; }
      set {
        apiLevel_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }
    /// <summary>Gets whether the "apiLevel" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasApiLevel {
      get { return apiLevel_ != null; }
    }
    /// <summary>Clears the value of the "apiLevel" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearApiLevel() {
      apiLevel_ = null;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override bool Equals(object other) {
      return Equals(other as AndroidVersion);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool Equals(AndroidVersion other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (Codename != other.Codename) return false;
      if (ApiLevel != other.ApiLevel) return false;
      return Equals(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override int GetHashCode() {
      int hash = 1;
      if (HasCodename) hash ^= Codename.GetHashCode();
      if (HasApiLevel) hash ^= ApiLevel.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 (HasCodename) {
        output.WriteRawTag(10);
        output.WriteString(Codename);
      }
      if (HasApiLevel) {
        output.WriteRawTag(18);
        output.WriteString(ApiLevel);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(output);
      }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public int CalculateSize() {
      int size = 0;
      if (HasCodename) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(Codename);
      }
      if (HasApiLevel) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(ApiLevel);
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void MergeFrom(AndroidVersion other) {
      if (other == null) {
        return;
      }
      if (other.HasCodename) {
        Codename = other.Codename;
      }
      if (other.HasApiLevel) {
        ApiLevel = other.ApiLevel;
      }
      _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: {
            Codename = input.ReadString();
            break;
          }
          case 18: {
            ApiLevel = input.ReadString();
            break;
          }
        }
      }
    }

  }

  public sealed partial class SystemInfo : pb::IMessage<SystemInfo> {
    private static readonly pb::MessageParser<SystemInfo> _parser = new pb::MessageParser<SystemInfo>(() => new SystemInfo());
    private pb::UnknownFieldSet _unknownFields;
    private int _hasBits0;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pb::MessageParser<SystemInfo> Parser { get { return _parser; } }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pbr::MessageDescriptor Descriptor {
      get { return global::LeanCloud.Realtime.Internal.Protocol.Messages2ProtoReflection.Descriptor.MessageTypes[2]; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public SystemInfo() {
      OnConstruction();
    }

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public SystemInfo(SystemInfo other) : this() {
      _hasBits0 = other._hasBits0;
      deviceType_ = other.deviceType_;
      osVersion_ = other.HasOsVersion ? other.osVersion_.Clone() : null;
      androidVersion_ = other.HasAndroidVersion ? other.androidVersion_.Clone() : null;
      isEmulator_ = other.isEmulator_;
      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public SystemInfo Clone() {
      return new SystemInfo(this);
    }

    /// <summary>Field number for the "deviceType" field.</summary>
    public const int DeviceTypeFieldNumber = 1;
    private readonly static global::LeanCloud.Realtime.Internal.Protocol.DeviceType DeviceTypeDefaultValue = global::LeanCloud.Realtime.Internal.Protocol.DeviceType.Unknown;

    private global::LeanCloud.Realtime.Internal.Protocol.DeviceType deviceType_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public global::LeanCloud.Realtime.Internal.Protocol.DeviceType DeviceType {
      get { if ((_hasBits0 & 1) != 0) { return deviceType_; } else { return DeviceTypeDefaultValue; } }
      set {
        _hasBits0 |= 1;
        deviceType_ = value;
      }
    }
    /// <summary>Gets whether the "deviceType" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasDeviceType {
      get { return (_hasBits0 & 1) != 0; }
    }
    /// <summary>Clears the value of the "deviceType" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearDeviceType() {
      _hasBits0 &= ~1;
    }

    /// <summary>Field number for the "osVersion" field.</summary>
    public const int OsVersionFieldNumber = 2;
    private global::LeanCloud.Realtime.Internal.Protocol.SemanticVersion osVersion_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public global::LeanCloud.Realtime.Internal.Protocol.SemanticVersion OsVersion {
      get { return osVersion_; }
      set {
        osVersion_ = value;
      }
    }
    /// <summary>Gets whether the osVersion field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasOsVersion {
      get { return osVersion_ != null; }
    }
    /// <summary>Clears the value of the osVersion field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearOsVersion() {
      osVersion_ = null;
    }

    /// <summary>Field number for the "androidVersion" field.</summary>
    public const int AndroidVersionFieldNumber = 3;
    private global::LeanCloud.Realtime.Internal.Protocol.AndroidVersion androidVersion_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public global::LeanCloud.Realtime.Internal.Protocol.AndroidVersion AndroidVersion {
      get { return androidVersion_; }
      set {
        androidVersion_ = value;
      }
    }
    /// <summary>Gets whether the androidVersion field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasAndroidVersion {
      get { return androidVersion_ != null; }
    }
    /// <summary>Clears the value of the androidVersion field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearAndroidVersion() {
      androidVersion_ = null;
    }

    /// <summary>Field number for the "isEmulator" field.</summary>
    public const int IsEmulatorFieldNumber = 4;
    private readonly static bool IsEmulatorDefaultValue = false;

    private bool isEmulator_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool IsEmulator {
      get { if ((_hasBits0 & 2) != 0) { return isEmulator_; } else { return IsEmulatorDefaultValue; } }
      set {
        _hasBits0 |= 2;
        isEmulator_ = value;
      }
    }
    /// <summary>Gets whether the "isEmulator" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasIsEmulator {
      get { return (_hasBits0 & 2) != 0; }
    }
    /// <summary>Clears the value of the "isEmulator" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearIsEmulator() {
      _hasBits0 &= ~2;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override bool Equals(object other) {
      return Equals(other as SystemInfo);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool Equals(SystemInfo other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (DeviceType != other.DeviceType) return false;
      if (!object.Equals(OsVersion, other.OsVersion)) return false;
      if (!object.Equals(AndroidVersion, other.AndroidVersion)) return false;
      if (IsEmulator != other.IsEmulator) return false;
      return Equals(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override int GetHashCode() {
      int hash = 1;
      if (HasDeviceType) hash ^= DeviceType.GetHashCode();
      if (HasOsVersion) hash ^= OsVersion.GetHashCode();
      if (HasAndroidVersion) hash ^= AndroidVersion.GetHashCode();
      if (HasIsEmulator) hash ^= IsEmulator.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 (HasDeviceType) {
        output.WriteRawTag(8);
        output.WriteEnum((int) DeviceType);
      }
      if (HasOsVersion) {
        output.WriteRawTag(18);
        output.WriteMessage(OsVersion);
      }
      if (HasAndroidVersion) {
        output.WriteRawTag(26);
        output.WriteMessage(AndroidVersion);
      }
      if (HasIsEmulator) {
        output.WriteRawTag(32);
        output.WriteBool(IsEmulator);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(output);
      }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public int CalculateSize() {
      int size = 0;
      if (HasDeviceType) {
        size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) DeviceType);
      }
      if (HasOsVersion) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(OsVersion);
      }
      if (HasAndroidVersion) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(AndroidVersion);
      }
      if (HasIsEmulator) {
        size += 1 + 1;
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void MergeFrom(SystemInfo other) {
      if (other == null) {
        return;
      }
      if (other.HasDeviceType) {
        DeviceType = other.DeviceType;
      }
      if (other.HasOsVersion) {
        if (!HasOsVersion) {
          OsVersion = new global::LeanCloud.Realtime.Internal.Protocol.SemanticVersion();
        }
        OsVersion.MergeFrom(other.OsVersion);
      }
      if (other.HasAndroidVersion) {
        if (!HasAndroidVersion) {
          AndroidVersion = new global::LeanCloud.Realtime.Internal.Protocol.AndroidVersion();
        }
        AndroidVersion.MergeFrom(other.AndroidVersion);
      }
      if (other.HasIsEmulator) {
        IsEmulator = other.IsEmulator;
      }
      _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: {
            DeviceType = (global::LeanCloud.Realtime.Internal.Protocol.DeviceType) input.ReadEnum();
            break;
          }
          case 18: {
            if (!HasOsVersion) {
              OsVersion = new global::LeanCloud.Realtime.Internal.Protocol.SemanticVersion();
            }
            input.ReadMessage(OsVersion);
            break;
          }
          case 26: {
            if (!HasAndroidVersion) {
              AndroidVersion = new global::LeanCloud.Realtime.Internal.Protocol.AndroidVersion();
            }
            input.ReadMessage(AndroidVersion);
            break;
          }
          case 32: {
            IsEmulator = input.ReadBool();
            break;
          }
        }
      }
    }

  }

  public sealed partial class JsonObjectMessage : pb::IMessage<JsonObjectMessage> {
    private static readonly pb::MessageParser<JsonObjectMessage> _parser = new pb::MessageParser<JsonObjectMessage>(() => new JsonObjectMessage());
    private pb::UnknownFieldSet _unknownFields;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pb::MessageParser<JsonObjectMessage> Parser { get { return _parser; } }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pbr::MessageDescriptor Descriptor {
      get { return global::LeanCloud.Realtime.Internal.Protocol.Messages2ProtoReflection.Descriptor.MessageTypes[3]; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public JsonObjectMessage() {
      OnConstruction();
    }

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public JsonObjectMessage(JsonObjectMessage other) : this() {
      data_ = other.data_;
      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public JsonObjectMessage Clone() {
      return new JsonObjectMessage(this);
    }

    /// <summary>Field number for the "data" field.</summary>
    public const int DataFieldNumber = 1;
    private readonly static string DataDefaultValue = "";

    private string data_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string Data {
      get { return data_ ?? DataDefaultValue; }
      set {
        data_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }
    /// <summary>Gets whether the "data" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasData {
      get { return data_ != null; }
    }
    /// <summary>Clears the value of the "data" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearData() {
      data_ = null;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override bool Equals(object other) {
      return Equals(other as JsonObjectMessage);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool Equals(JsonObjectMessage other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (Data != other.Data) return false;
      return Equals(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override int GetHashCode() {
      int hash = 1;
      if (HasData) hash ^= Data.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 (HasData) {
        output.WriteRawTag(10);
        output.WriteString(Data);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(output);
      }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public int CalculateSize() {
      int size = 0;
      if (HasData) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(Data);
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void MergeFrom(JsonObjectMessage other) {
      if (other == null) {
        return;
      }
      if (other.HasData) {
        Data = other.Data;
      }
      _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: {
            Data = input.ReadString();
            break;
          }
        }
      }
    }

  }

  public sealed partial class UnreadTuple : pb::IMessage<UnreadTuple> {
    private static readonly pb::MessageParser<UnreadTuple> _parser = new pb::MessageParser<UnreadTuple>(() => new UnreadTuple());
    private pb::UnknownFieldSet _unknownFields;
    private int _hasBits0;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pb::MessageParser<UnreadTuple> Parser { get { return _parser; } }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pbr::MessageDescriptor Descriptor {
      get { return global::LeanCloud.Realtime.Internal.Protocol.Messages2ProtoReflection.Descriptor.MessageTypes[4]; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public UnreadTuple() {
      OnConstruction();
    }

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public UnreadTuple(UnreadTuple other) : this() {
      _hasBits0 = other._hasBits0;
      cid_ = other.cid_;
      unread_ = other.unread_;
      mid_ = other.mid_;
      timestamp_ = other.timestamp_;
      from_ = other.from_;
      data_ = other.data_;
      patchTimestamp_ = other.patchTimestamp_;
      mentioned_ = other.mentioned_;
      binaryMsg_ = other.binaryMsg_;
      convType_ = other.convType_;
      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public UnreadTuple Clone() {
      return new UnreadTuple(this);
    }

    /// <summary>Field number for the "cid" field.</summary>
    public const int CidFieldNumber = 1;
    private readonly static string CidDefaultValue = "";

    private string cid_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string Cid {
      get { return cid_ ?? CidDefaultValue; }
      set {
        cid_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }
    /// <summary>Gets whether the "cid" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasCid {
      get { return cid_ != null; }
    }
    /// <summary>Clears the value of the "cid" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearCid() {
      cid_ = null;
    }

    /// <summary>Field number for the "unread" field.</summary>
    public const int UnreadFieldNumber = 2;
    private readonly static int UnreadDefaultValue = 0;

    private int unread_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public int Unread {
      get { if ((_hasBits0 & 1) != 0) { return unread_; } else { return UnreadDefaultValue; } }
      set {
        _hasBits0 |= 1;
        unread_ = value;
      }
    }
    /// <summary>Gets whether the "unread" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasUnread {
      get { return (_hasBits0 & 1) != 0; }
    }
    /// <summary>Clears the value of the "unread" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearUnread() {
      _hasBits0 &= ~1;
    }

    /// <summary>Field number for the "mid" field.</summary>
    public const int MidFieldNumber = 3;
    private readonly static string MidDefaultValue = "";

    private string mid_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string Mid {
      get { return mid_ ?? MidDefaultValue; }
      set {
        mid_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }
    /// <summary>Gets whether the "mid" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasMid {
      get { return mid_ != null; }
    }
    /// <summary>Clears the value of the "mid" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearMid() {
      mid_ = null;
    }

    /// <summary>Field number for the "timestamp" field.</summary>
    public const int TimestampFieldNumber = 4;
    private readonly static long TimestampDefaultValue = 0L;

    private long timestamp_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public long Timestamp {
      get { if ((_hasBits0 & 2) != 0) { return timestamp_; } else { return TimestampDefaultValue; } }
      set {
        _hasBits0 |= 2;
        timestamp_ = value;
      }
    }
    /// <summary>Gets whether the "timestamp" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasTimestamp {
      get { return (_hasBits0 & 2) != 0; }
    }
    /// <summary>Clears the value of the "timestamp" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearTimestamp() {
      _hasBits0 &= ~2;
    }

    /// <summary>Field number for the "from" field.</summary>
    public const int FromFieldNumber = 5;
    private readonly static string FromDefaultValue = "";

    private string from_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string From {
      get { return from_ ?? FromDefaultValue; }
      set {
        from_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }
    /// <summary>Gets whether the "from" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasFrom {
      get { return from_ != null; }
    }
    /// <summary>Clears the value of the "from" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearFrom() {
      from_ = null;
    }

    /// <summary>Field number for the "data" field.</summary>
    public const int DataFieldNumber = 6;
    private readonly static string DataDefaultValue = "";

    private string data_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string Data {
      get { return data_ ?? DataDefaultValue; }
      set {
        data_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }
    /// <summary>Gets whether the "data" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasData {
      get { return data_ != null; }
    }
    /// <summary>Clears the value of the "data" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearData() {
      data_ = null;
    }

    /// <summary>Field number for the "patchTimestamp" field.</summary>
    public const int PatchTimestampFieldNumber = 7;
    private readonly static long PatchTimestampDefaultValue = 0L;

    private long patchTimestamp_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public long PatchTimestamp {
      get { if ((_hasBits0 & 4) != 0) { return patchTimestamp_; } else { return PatchTimestampDefaultValue; } }
      set {
        _hasBits0 |= 4;
        patchTimestamp_ = value;
      }
    }
    /// <summary>Gets whether the "patchTimestamp" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasPatchTimestamp {
      get { return (_hasBits0 & 4) != 0; }
    }
    /// <summary>Clears the value of the "patchTimestamp" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearPatchTimestamp() {
      _hasBits0 &= ~4;
    }

    /// <summary>Field number for the "mentioned" field.</summary>
    public const int MentionedFieldNumber = 8;
    private readonly static bool MentionedDefaultValue = false;

    private bool mentioned_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool Mentioned {
      get { if ((_hasBits0 & 8) != 0) { return mentioned_; } else { return MentionedDefaultValue; } }
      set {
        _hasBits0 |= 8;
        mentioned_ = value;
      }
    }
    /// <summary>Gets whether the "mentioned" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasMentioned {
      get { return (_hasBits0 & 8) != 0; }
    }
    /// <summary>Clears the value of the "mentioned" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearMentioned() {
      _hasBits0 &= ~8;
    }

    /// <summary>Field number for the "binaryMsg" field.</summary>
    public const int BinaryMsgFieldNumber = 9;
    private readonly static pb::ByteString BinaryMsgDefaultValue = pb::ByteString.Empty;

    private pb::ByteString binaryMsg_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public pb::ByteString BinaryMsg {
      get { return binaryMsg_ ?? BinaryMsgDefaultValue; }
      set {
        binaryMsg_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }
    /// <summary>Gets whether the "binaryMsg" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasBinaryMsg {
      get { return binaryMsg_ != null; }
    }
    /// <summary>Clears the value of the "binaryMsg" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearBinaryMsg() {
      binaryMsg_ = null;
    }

    /// <summary>Field number for the "convType" field.</summary>
    public const int ConvTypeFieldNumber = 10;
    private readonly static int ConvTypeDefaultValue = 0;

    private int convType_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public int ConvType {
      get { if ((_hasBits0 & 16) != 0) { return convType_; } else { return ConvTypeDefaultValue; } }
      set {
        _hasBits0 |= 16;
        convType_ = value;
      }
    }
    /// <summary>Gets whether the "convType" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasConvType {
      get { return (_hasBits0 & 16) != 0; }
    }
    /// <summary>Clears the value of the "convType" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearConvType() {
      _hasBits0 &= ~16;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override bool Equals(object other) {
      return Equals(other as UnreadTuple);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool Equals(UnreadTuple other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (Cid != other.Cid) return false;
      if (Unread != other.Unread) return false;
      if (Mid != other.Mid) return false;
      if (Timestamp != other.Timestamp) return false;
      if (From != other.From) return false;
      if (Data != other.Data) return false;
      if (PatchTimestamp != other.PatchTimestamp) return false;
      if (Mentioned != other.Mentioned) return false;
      if (BinaryMsg != other.BinaryMsg) return false;
      if (ConvType != other.ConvType) return false;
      return Equals(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override int GetHashCode() {
      int hash = 1;
      if (HasCid) hash ^= Cid.GetHashCode();
      if (HasUnread) hash ^= Unread.GetHashCode();
      if (HasMid) hash ^= Mid.GetHashCode();
      if (HasTimestamp) hash ^= Timestamp.GetHashCode();
      if (HasFrom) hash ^= From.GetHashCode();
      if (HasData) hash ^= Data.GetHashCode();
      if (HasPatchTimestamp) hash ^= PatchTimestamp.GetHashCode();
      if (HasMentioned) hash ^= Mentioned.GetHashCode();
      if (HasBinaryMsg) hash ^= BinaryMsg.GetHashCode();
      if (HasConvType) hash ^= ConvType.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 (HasCid) {
        output.WriteRawTag(10);
        output.WriteString(Cid);
      }
      if (HasUnread) {
        output.WriteRawTag(16);
        output.WriteInt32(Unread);
      }
      if (HasMid) {
        output.WriteRawTag(26);
        output.WriteString(Mid);
      }
      if (HasTimestamp) {
        output.WriteRawTag(32);
        output.WriteInt64(Timestamp);
      }
      if (HasFrom) {
        output.WriteRawTag(42);
        output.WriteString(From);
      }
      if (HasData) {
        output.WriteRawTag(50);
        output.WriteString(Data);
      }
      if (HasPatchTimestamp) {
        output.WriteRawTag(56);
        output.WriteInt64(PatchTimestamp);
      }
      if (HasMentioned) {
        output.WriteRawTag(64);
        output.WriteBool(Mentioned);
      }
      if (HasBinaryMsg) {
        output.WriteRawTag(74);
        output.WriteBytes(BinaryMsg);
      }
      if (HasConvType) {
        output.WriteRawTag(80);
        output.WriteInt32(ConvType);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(output);
      }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public int CalculateSize() {
      int size = 0;
      if (HasCid) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(Cid);
      }
      if (HasUnread) {
        size += 1 + pb::CodedOutputStream.ComputeInt32Size(Unread);
      }
      if (HasMid) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(Mid);
      }
      if (HasTimestamp) {
        size += 1 + pb::CodedOutputStream.ComputeInt64Size(Timestamp);
      }
      if (HasFrom) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(From);
      }
      if (HasData) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(Data);
      }
      if (HasPatchTimestamp) {
        size += 1 + pb::CodedOutputStream.ComputeInt64Size(PatchTimestamp);
      }
      if (HasMentioned) {
        size += 1 + 1;
      }
      if (HasBinaryMsg) {
        size += 1 + pb::CodedOutputStream.ComputeBytesSize(BinaryMsg);
      }
      if (HasConvType) {
        size += 1 + pb::CodedOutputStream.ComputeInt32Size(ConvType);
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void MergeFrom(UnreadTuple other) {
      if (other == null) {
        return;
      }
      if (other.HasCid) {
        Cid = other.Cid;
      }
      if (other.HasUnread) {
        Unread = other.Unread;
      }
      if (other.HasMid) {
        Mid = other.Mid;
      }
      if (other.HasTimestamp) {
        Timestamp = other.Timestamp;
      }
      if (other.HasFrom) {
        From = other.From;
      }
      if (other.HasData) {
        Data = other.Data;
      }
      if (other.HasPatchTimestamp) {
        PatchTimestamp = other.PatchTimestamp;
      }
      if (other.HasMentioned) {
        Mentioned = other.Mentioned;
      }
      if (other.HasBinaryMsg) {
        BinaryMsg = other.BinaryMsg;
      }
      if (other.HasConvType) {
        ConvType = other.ConvType;
      }
      _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: {
            Cid = input.ReadString();
            break;
          }
          case 16: {
            Unread = input.ReadInt32();
            break;
          }
          case 26: {
            Mid = input.ReadString();
            break;
          }
          case 32: {
            Timestamp = input.ReadInt64();
            break;
          }
          case 42: {
            From = input.ReadString();
            break;
          }
          case 50: {
            Data = input.ReadString();
            break;
          }
          case 56: {
            PatchTimestamp = input.ReadInt64();
            break;
          }
          case 64: {
            Mentioned = input.ReadBool();
            break;
          }
          case 74: {
            BinaryMsg = input.ReadBytes();
            break;
          }
          case 80: {
            ConvType = input.ReadInt32();
            break;
          }
        }
      }
    }

  }

  public sealed partial class LogItem : pb::IMessage<LogItem> {
    private static readonly pb::MessageParser<LogItem> _parser = new pb::MessageParser<LogItem>(() => new LogItem());
    private pb::UnknownFieldSet _unknownFields;
    private int _hasBits0;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pb::MessageParser<LogItem> Parser { get { return _parser; } }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pbr::MessageDescriptor Descriptor {
      get { return global::LeanCloud.Realtime.Internal.Protocol.Messages2ProtoReflection.Descriptor.MessageTypes[5]; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public LogItem() {
      OnConstruction();
    }

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public LogItem(LogItem other) : this() {
      _hasBits0 = other._hasBits0;
      from_ = other.from_;
      data_ = other.data_;
      timestamp_ = other.timestamp_;
      msgId_ = other.msgId_;
      ackAt_ = other.ackAt_;
      readAt_ = other.readAt_;
      patchTimestamp_ = other.patchTimestamp_;
      mentionAll_ = other.mentionAll_;
      mentionPids_ = other.mentionPids_.Clone();
      bin_ = other.bin_;
      convType_ = other.convType_;
      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public LogItem Clone() {
      return new LogItem(this);
    }

    /// <summary>Field number for the "from" field.</summary>
    public const int FromFieldNumber = 1;
    private readonly static string FromDefaultValue = "";

    private string from_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string From {
      get { return from_ ?? FromDefaultValue; }
      set {
        from_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }
    /// <summary>Gets whether the "from" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasFrom {
      get { return from_ != null; }
    }
    /// <summary>Clears the value of the "from" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearFrom() {
      from_ = null;
    }

    /// <summary>Field number for the "data" field.</summary>
    public const int DataFieldNumber = 2;
    private readonly static string DataDefaultValue = "";

    private string data_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string Data {
      get { return data_ ?? DataDefaultValue; }
      set {
        data_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }
    /// <summary>Gets whether the "data" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasData {
      get { return data_ != null; }
    }
    /// <summary>Clears the value of the "data" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearData() {
      data_ = null;
    }

    /// <summary>Field number for the "timestamp" field.</summary>
    public const int TimestampFieldNumber = 3;
    private readonly static long TimestampDefaultValue = 0L;

    private long timestamp_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public long Timestamp {
      get { if ((_hasBits0 & 1) != 0) { return timestamp_; } else { return TimestampDefaultValue; } }
      set {
        _hasBits0 |= 1;
        timestamp_ = value;
      }
    }
    /// <summary>Gets whether the "timestamp" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasTimestamp {
      get { return (_hasBits0 & 1) != 0; }
    }
    /// <summary>Clears the value of the "timestamp" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearTimestamp() {
      _hasBits0 &= ~1;
    }

    /// <summary>Field number for the "msgId" field.</summary>
    public const int MsgIdFieldNumber = 4;
    private readonly static string MsgIdDefaultValue = "";

    private string msgId_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string MsgId {
      get { return msgId_ ?? MsgIdDefaultValue; }
      set {
        msgId_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }
    /// <summary>Gets whether the "msgId" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasMsgId {
      get { return msgId_ != null; }
    }
    /// <summary>Clears the value of the "msgId" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearMsgId() {
      msgId_ = null;
    }

    /// <summary>Field number for the "ackAt" field.</summary>
    public const int AckAtFieldNumber = 5;
    private readonly static long AckAtDefaultValue = 0L;

    private long ackAt_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public long AckAt {
      get { if ((_hasBits0 & 2) != 0) { return ackAt_; } else { return AckAtDefaultValue; } }
      set {
        _hasBits0 |= 2;
        ackAt_ = value;
      }
    }
    /// <summary>Gets whether the "ackAt" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasAckAt {
      get { return (_hasBits0 & 2) != 0; }
    }
    /// <summary>Clears the value of the "ackAt" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearAckAt() {
      _hasBits0 &= ~2;
    }

    /// <summary>Field number for the "readAt" field.</summary>
    public const int ReadAtFieldNumber = 6;
    private readonly static long ReadAtDefaultValue = 0L;

    private long readAt_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public long ReadAt {
      get { if ((_hasBits0 & 4) != 0) { return readAt_; } else { return ReadAtDefaultValue; } }
      set {
        _hasBits0 |= 4;
        readAt_ = value;
      }
    }
    /// <summary>Gets whether the "readAt" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasReadAt {
      get { return (_hasBits0 & 4) != 0; }
    }
    /// <summary>Clears the value of the "readAt" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearReadAt() {
      _hasBits0 &= ~4;
    }

    /// <summary>Field number for the "patchTimestamp" field.</summary>
    public const int PatchTimestampFieldNumber = 7;
    private readonly static long PatchTimestampDefaultValue = 0L;

    private long patchTimestamp_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public long PatchTimestamp {
      get { if ((_hasBits0 & 8) != 0) { return patchTimestamp_; } else { return PatchTimestampDefaultValue; } }
      set {
        _hasBits0 |= 8;
        patchTimestamp_ = value;
      }
    }
    /// <summary>Gets whether the "patchTimestamp" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasPatchTimestamp {
      get { return (_hasBits0 & 8) != 0; }
    }
    /// <summary>Clears the value of the "patchTimestamp" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearPatchTimestamp() {
      _hasBits0 &= ~8;
    }

    /// <summary>Field number for the "mentionAll" field.</summary>
    public const int MentionAllFieldNumber = 8;
    private readonly static bool MentionAllDefaultValue = false;

    private bool mentionAll_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool MentionAll {
      get { if ((_hasBits0 & 16) != 0) { return mentionAll_; } else { return MentionAllDefaultValue; } }
      set {
        _hasBits0 |= 16;
        mentionAll_ = value;
      }
    }
    /// <summary>Gets whether the "mentionAll" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasMentionAll {
      get { return (_hasBits0 & 16) != 0; }
    }
    /// <summary>Clears the value of the "mentionAll" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearMentionAll() {
      _hasBits0 &= ~16;
    }

    /// <summary>Field number for the "mentionPids" field.</summary>
    public const int MentionPidsFieldNumber = 9;
    private static readonly pb::FieldCodec<string> _repeated_mentionPids_codec
        = pb::FieldCodec.ForString(74);
    private readonly pbc::RepeatedField<string> mentionPids_ = new pbc::RepeatedField<string>();
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public pbc::RepeatedField<string> MentionPids {
      get { return mentionPids_; }
    }

    /// <summary>Field number for the "bin" field.</summary>
    public const int BinFieldNumber = 10;
    private readonly static bool BinDefaultValue = false;

    private bool bin_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool Bin {
      get { if ((_hasBits0 & 32) != 0) { return bin_; } else { return BinDefaultValue; } }
      set {
        _hasBits0 |= 32;
        bin_ = value;
      }
    }
    /// <summary>Gets whether the "bin" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasBin {
      get { return (_hasBits0 & 32) != 0; }
    }
    /// <summary>Clears the value of the "bin" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearBin() {
      _hasBits0 &= ~32;
    }

    /// <summary>Field number for the "convType" field.</summary>
    public const int ConvTypeFieldNumber = 11;
    private readonly static int ConvTypeDefaultValue = 0;

    private int convType_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public int ConvType {
      get { if ((_hasBits0 & 64) != 0) { return convType_; } else { return ConvTypeDefaultValue; } }
      set {
        _hasBits0 |= 64;
        convType_ = value;
      }
    }
    /// <summary>Gets whether the "convType" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasConvType {
      get { return (_hasBits0 & 64) != 0; }
    }
    /// <summary>Clears the value of the "convType" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearConvType() {
      _hasBits0 &= ~64;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override bool Equals(object other) {
      return Equals(other as LogItem);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool Equals(LogItem other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (From != other.From) return false;
      if (Data != other.Data) return false;
      if (Timestamp != other.Timestamp) return false;
      if (MsgId != other.MsgId) return false;
      if (AckAt != other.AckAt) return false;
      if (ReadAt != other.ReadAt) return false;
      if (PatchTimestamp != other.PatchTimestamp) return false;
      if (MentionAll != other.MentionAll) return false;
      if(!mentionPids_.Equals(other.mentionPids_)) return false;
      if (Bin != other.Bin) return false;
      if (ConvType != other.ConvType) return false;
      return Equals(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override int GetHashCode() {
      int hash = 1;
      if (HasFrom) hash ^= From.GetHashCode();
      if (HasData) hash ^= Data.GetHashCode();
      if (HasTimestamp) hash ^= Timestamp.GetHashCode();
      if (HasMsgId) hash ^= MsgId.GetHashCode();
      if (HasAckAt) hash ^= AckAt.GetHashCode();
      if (HasReadAt) hash ^= ReadAt.GetHashCode();
      if (HasPatchTimestamp) hash ^= PatchTimestamp.GetHashCode();
      if (HasMentionAll) hash ^= MentionAll.GetHashCode();
      hash ^= mentionPids_.GetHashCode();
      if (HasBin) hash ^= Bin.GetHashCode();
      if (HasConvType) hash ^= ConvType.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 (HasFrom) {
        output.WriteRawTag(10);
        output.WriteString(From);
      }
      if (HasData) {
        output.WriteRawTag(18);
        output.WriteString(Data);
      }
      if (HasTimestamp) {
        output.WriteRawTag(24);
        output.WriteInt64(Timestamp);
      }
      if (HasMsgId) {
        output.WriteRawTag(34);
        output.WriteString(MsgId);
      }
      if (HasAckAt) {
        output.WriteRawTag(40);
        output.WriteInt64(AckAt);
      }
      if (HasReadAt) {
        output.WriteRawTag(48);
        output.WriteInt64(ReadAt);
      }
      if (HasPatchTimestamp) {
        output.WriteRawTag(56);
        output.WriteInt64(PatchTimestamp);
      }
      if (HasMentionAll) {
        output.WriteRawTag(64);
        output.WriteBool(MentionAll);
      }
      mentionPids_.WriteTo(output, _repeated_mentionPids_codec);
      if (HasBin) {
        output.WriteRawTag(80);
        output.WriteBool(Bin);
      }
      if (HasConvType) {
        output.WriteRawTag(88);
        output.WriteInt32(ConvType);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(output);
      }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public int CalculateSize() {
      int size = 0;
      if (HasFrom) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(From);
      }
      if (HasData) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(Data);
      }
      if (HasTimestamp) {
        size += 1 + pb::CodedOutputStream.ComputeInt64Size(Timestamp);
      }
      if (HasMsgId) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(MsgId);
      }
      if (HasAckAt) {
        size += 1 + pb::CodedOutputStream.ComputeInt64Size(AckAt);
      }
      if (HasReadAt) {
        size += 1 + pb::CodedOutputStream.ComputeInt64Size(ReadAt);
      }
      if (HasPatchTimestamp) {
        size += 1 + pb::CodedOutputStream.ComputeInt64Size(PatchTimestamp);
      }
      if (HasMentionAll) {
        size += 1 + 1;
      }
      size += mentionPids_.CalculateSize(_repeated_mentionPids_codec);
      if (HasBin) {
        size += 1 + 1;
      }
      if (HasConvType) {
        size += 1 + pb::CodedOutputStream.ComputeInt32Size(ConvType);
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void MergeFrom(LogItem other) {
      if (other == null) {
        return;
      }
      if (other.HasFrom) {
        From = other.From;
      }
      if (other.HasData) {
        Data = other.Data;
      }
      if (other.HasTimestamp) {
        Timestamp = other.Timestamp;
      }
      if (other.HasMsgId) {
        MsgId = other.MsgId;
      }
      if (other.HasAckAt) {
        AckAt = other.AckAt;
      }
      if (other.HasReadAt) {
        ReadAt = other.ReadAt;
      }
      if (other.HasPatchTimestamp) {
        PatchTimestamp = other.PatchTimestamp;
      }
      if (other.HasMentionAll) {
        MentionAll = other.MentionAll;
      }
      mentionPids_.Add(other.mentionPids_);
      if (other.HasBin) {
        Bin = other.Bin;
      }
      if (other.HasConvType) {
        ConvType = other.ConvType;
      }
      _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: {
            From = input.ReadString();
            break;
          }
          case 18: {
            Data = input.ReadString();
            break;
          }
          case 24: {
            Timestamp = input.ReadInt64();
            break;
          }
          case 34: {
            MsgId = input.ReadString();
            break;
          }
          case 40: {
            AckAt = input.ReadInt64();
            break;
          }
          case 48: {
            ReadAt = input.ReadInt64();
            break;
          }
          case 56: {
            PatchTimestamp = input.ReadInt64();
            break;
          }
          case 64: {
            MentionAll = input.ReadBool();
            break;
          }
          case 74: {
            mentionPids_.AddEntriesFrom(input, _repeated_mentionPids_codec);
            break;
          }
          case 80: {
            Bin = input.ReadBool();
            break;
          }
          case 88: {
            ConvType = input.ReadInt32();
            break;
          }
        }
      }
    }

  }

  public sealed partial class ConvMemberInfo : pb::IMessage<ConvMemberInfo> {
    private static readonly pb::MessageParser<ConvMemberInfo> _parser = new pb::MessageParser<ConvMemberInfo>(() => new ConvMemberInfo());
    private pb::UnknownFieldSet _unknownFields;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pb::MessageParser<ConvMemberInfo> Parser { get { return _parser; } }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pbr::MessageDescriptor Descriptor {
      get { return global::LeanCloud.Realtime.Internal.Protocol.Messages2ProtoReflection.Descriptor.MessageTypes[6]; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public ConvMemberInfo() {
      OnConstruction();
    }

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public ConvMemberInfo(ConvMemberInfo other) : this() {
      pid_ = other.pid_;
      role_ = other.role_;
      infoId_ = other.infoId_;
      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public ConvMemberInfo Clone() {
      return new ConvMemberInfo(this);
    }

    /// <summary>Field number for the "pid" field.</summary>
    public const int PidFieldNumber = 1;
    private readonly static string PidDefaultValue = "";

    private string pid_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string Pid {
      get { return pid_ ?? PidDefaultValue; }
      set {
        pid_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }
    /// <summary>Gets whether the "pid" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasPid {
      get { return pid_ != null; }
    }
    /// <summary>Clears the value of the "pid" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearPid() {
      pid_ = null;
    }

    /// <summary>Field number for the "role" field.</summary>
    public const int RoleFieldNumber = 2;
    private readonly static string RoleDefaultValue = "";

    private string role_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string Role {
      get { return role_ ?? RoleDefaultValue; }
      set {
        role_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }
    /// <summary>Gets whether the "role" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasRole {
      get { return role_ != null; }
    }
    /// <summary>Clears the value of the "role" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearRole() {
      role_ = null;
    }

    /// <summary>Field number for the "infoId" field.</summary>
    public const int InfoIdFieldNumber = 3;
    private readonly static string InfoIdDefaultValue = "";

    private string infoId_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string InfoId {
      get { return infoId_ ?? InfoIdDefaultValue; }
      set {
        infoId_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }
    /// <summary>Gets whether the "infoId" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasInfoId {
      get { return infoId_ != null; }
    }
    /// <summary>Clears the value of the "infoId" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearInfoId() {
      infoId_ = null;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override bool Equals(object other) {
      return Equals(other as ConvMemberInfo);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool Equals(ConvMemberInfo other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (Pid != other.Pid) return false;
      if (Role != other.Role) return false;
      if (InfoId != other.InfoId) return false;
      return Equals(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override int GetHashCode() {
      int hash = 1;
      if (HasPid) hash ^= Pid.GetHashCode();
      if (HasRole) hash ^= Role.GetHashCode();
      if (HasInfoId) hash ^= InfoId.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 (HasPid) {
        output.WriteRawTag(10);
        output.WriteString(Pid);
      }
      if (HasRole) {
        output.WriteRawTag(18);
        output.WriteString(Role);
      }
      if (HasInfoId) {
        output.WriteRawTag(26);
        output.WriteString(InfoId);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(output);
      }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public int CalculateSize() {
      int size = 0;
      if (HasPid) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(Pid);
      }
      if (HasRole) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(Role);
      }
      if (HasInfoId) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(InfoId);
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void MergeFrom(ConvMemberInfo other) {
      if (other == null) {
        return;
      }
      if (other.HasPid) {
        Pid = other.Pid;
      }
      if (other.HasRole) {
        Role = other.Role;
      }
      if (other.HasInfoId) {
        InfoId = other.InfoId;
      }
      _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: {
            Pid = input.ReadString();
            break;
          }
          case 18: {
            Role = input.ReadString();
            break;
          }
          case 26: {
            InfoId = input.ReadString();
            break;
          }
        }
      }
    }

  }

  public sealed partial class LoginCommand : pb::IMessage<LoginCommand> {
    private static readonly pb::MessageParser<LoginCommand> _parser = new pb::MessageParser<LoginCommand>(() => new LoginCommand());
    private pb::UnknownFieldSet _unknownFields;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pb::MessageParser<LoginCommand> Parser { get { return _parser; } }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pbr::MessageDescriptor Descriptor {
      get { return global::LeanCloud.Realtime.Internal.Protocol.Messages2ProtoReflection.Descriptor.MessageTypes[7]; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public LoginCommand() {
      OnConstruction();
    }

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public LoginCommand(LoginCommand other) : this() {
      systemInfo_ = other.HasSystemInfo ? other.systemInfo_.Clone() : null;
      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public LoginCommand Clone() {
      return new LoginCommand(this);
    }

    /// <summary>Field number for the "systemInfo" field.</summary>
    public const int SystemInfoFieldNumber = 1;
    private global::LeanCloud.Realtime.Internal.Protocol.SystemInfo systemInfo_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public global::LeanCloud.Realtime.Internal.Protocol.SystemInfo SystemInfo {
      get { return systemInfo_; }
      set {
        systemInfo_ = value;
      }
    }
    /// <summary>Gets whether the systemInfo field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasSystemInfo {
      get { return systemInfo_ != null; }
    }
    /// <summary>Clears the value of the systemInfo field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearSystemInfo() {
      systemInfo_ = null;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override bool Equals(object other) {
      return Equals(other as LoginCommand);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool Equals(LoginCommand other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (!object.Equals(SystemInfo, other.SystemInfo)) return false;
      return Equals(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override int GetHashCode() {
      int hash = 1;
      if (HasSystemInfo) hash ^= SystemInfo.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 (HasSystemInfo) {
        output.WriteRawTag(10);
        output.WriteMessage(SystemInfo);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(output);
      }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public int CalculateSize() {
      int size = 0;
      if (HasSystemInfo) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(SystemInfo);
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void MergeFrom(LoginCommand other) {
      if (other == null) {
        return;
      }
      if (other.HasSystemInfo) {
        if (!HasSystemInfo) {
          SystemInfo = new global::LeanCloud.Realtime.Internal.Protocol.SystemInfo();
        }
        SystemInfo.MergeFrom(other.SystemInfo);
      }
      _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: {
            if (!HasSystemInfo) {
              SystemInfo = new global::LeanCloud.Realtime.Internal.Protocol.SystemInfo();
            }
            input.ReadMessage(SystemInfo);
            break;
          }
        }
      }
    }

  }

  public sealed partial class LoggedinCommand : pb::IMessage<LoggedinCommand> {
    private static readonly pb::MessageParser<LoggedinCommand> _parser = new pb::MessageParser<LoggedinCommand>(() => new LoggedinCommand());
    private pb::UnknownFieldSet _unknownFields;
    private int _hasBits0;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pb::MessageParser<LoggedinCommand> Parser { get { return _parser; } }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pbr::MessageDescriptor Descriptor {
      get { return global::LeanCloud.Realtime.Internal.Protocol.Messages2ProtoReflection.Descriptor.MessageTypes[8]; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public LoggedinCommand() {
      OnConstruction();
    }

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public LoggedinCommand(LoggedinCommand other) : this() {
      _hasBits0 = other._hasBits0;
      pushDisabled_ = other.pushDisabled_;
      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public LoggedinCommand Clone() {
      return new LoggedinCommand(this);
    }

    /// <summary>Field number for the "pushDisabled" field.</summary>
    public const int PushDisabledFieldNumber = 1;
    private readonly static bool PushDisabledDefaultValue = false;

    private bool pushDisabled_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool PushDisabled {
      get { if ((_hasBits0 & 1) != 0) { return pushDisabled_; } else { return PushDisabledDefaultValue; } }
      set {
        _hasBits0 |= 1;
        pushDisabled_ = value;
      }
    }
    /// <summary>Gets whether the "pushDisabled" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasPushDisabled {
      get { return (_hasBits0 & 1) != 0; }
    }
    /// <summary>Clears the value of the "pushDisabled" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearPushDisabled() {
      _hasBits0 &= ~1;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override bool Equals(object other) {
      return Equals(other as LoggedinCommand);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool Equals(LoggedinCommand other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (PushDisabled != other.PushDisabled) return false;
      return Equals(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override int GetHashCode() {
      int hash = 1;
      if (HasPushDisabled) hash ^= PushDisabled.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 (HasPushDisabled) {
        output.WriteRawTag(8);
        output.WriteBool(PushDisabled);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(output);
      }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public int CalculateSize() {
      int size = 0;
      if (HasPushDisabled) {
        size += 1 + 1;
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void MergeFrom(LoggedinCommand other) {
      if (other == null) {
        return;
      }
      if (other.HasPushDisabled) {
        PushDisabled = other.PushDisabled;
      }
      _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: {
            PushDisabled = input.ReadBool();
            break;
          }
        }
      }
    }

  }

  public sealed partial class DataCommand : pb::IMessage<DataCommand> {
    private static readonly pb::MessageParser<DataCommand> _parser = new pb::MessageParser<DataCommand>(() => new DataCommand());
    private pb::UnknownFieldSet _unknownFields;
    private int _hasBits0;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pb::MessageParser<DataCommand> Parser { get { return _parser; } }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pbr::MessageDescriptor Descriptor {
      get { return global::LeanCloud.Realtime.Internal.Protocol.Messages2ProtoReflection.Descriptor.MessageTypes[9]; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public DataCommand() {
      OnConstruction();
    }

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public DataCommand(DataCommand other) : this() {
      _hasBits0 = other._hasBits0;
      ids_ = other.ids_.Clone();
      msg_ = other.msg_.Clone();
      offline_ = other.offline_;
      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public DataCommand Clone() {
      return new DataCommand(this);
    }

    /// <summary>Field number for the "ids" field.</summary>
    public const int IdsFieldNumber = 1;
    private static readonly pb::FieldCodec<string> _repeated_ids_codec
        = pb::FieldCodec.ForString(10);
    private readonly pbc::RepeatedField<string> ids_ = new pbc::RepeatedField<string>();
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public pbc::RepeatedField<string> Ids {
      get { return ids_; }
    }

    /// <summary>Field number for the "msg" field.</summary>
    public const int MsgFieldNumber = 2;
    private static readonly pb::FieldCodec<global::LeanCloud.Realtime.Internal.Protocol.JsonObjectMessage> _repeated_msg_codec
        = pb::FieldCodec.ForMessage(18, global::LeanCloud.Realtime.Internal.Protocol.JsonObjectMessage.Parser);
    private readonly pbc::RepeatedField<global::LeanCloud.Realtime.Internal.Protocol.JsonObjectMessage> msg_ = new pbc::RepeatedField<global::LeanCloud.Realtime.Internal.Protocol.JsonObjectMessage>();
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public pbc::RepeatedField<global::LeanCloud.Realtime.Internal.Protocol.JsonObjectMessage> Msg {
      get { return msg_; }
    }

    /// <summary>Field number for the "offline" field.</summary>
    public const int OfflineFieldNumber = 3;
    private readonly static bool OfflineDefaultValue = false;

    private bool offline_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool Offline {
      get { if ((_hasBits0 & 1) != 0) { return offline_; } else { return OfflineDefaultValue; } }
      set {
        _hasBits0 |= 1;
        offline_ = value;
      }
    }
    /// <summary>Gets whether the "offline" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasOffline {
      get { return (_hasBits0 & 1) != 0; }
    }
    /// <summary>Clears the value of the "offline" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearOffline() {
      _hasBits0 &= ~1;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override bool Equals(object other) {
      return Equals(other as DataCommand);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool Equals(DataCommand other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if(!ids_.Equals(other.ids_)) return false;
      if(!msg_.Equals(other.msg_)) return false;
      if (Offline != other.Offline) return false;
      return Equals(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override int GetHashCode() {
      int hash = 1;
      hash ^= ids_.GetHashCode();
      hash ^= msg_.GetHashCode();
      if (HasOffline) hash ^= Offline.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) {
      ids_.WriteTo(output, _repeated_ids_codec);
      msg_.WriteTo(output, _repeated_msg_codec);
      if (HasOffline) {
        output.WriteRawTag(24);
        output.WriteBool(Offline);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(output);
      }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public int CalculateSize() {
      int size = 0;
      size += ids_.CalculateSize(_repeated_ids_codec);
      size += msg_.CalculateSize(_repeated_msg_codec);
      if (HasOffline) {
        size += 1 + 1;
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void MergeFrom(DataCommand other) {
      if (other == null) {
        return;
      }
      ids_.Add(other.ids_);
      msg_.Add(other.msg_);
      if (other.HasOffline) {
        Offline = other.Offline;
      }
      _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: {
            ids_.AddEntriesFrom(input, _repeated_ids_codec);
            break;
          }
          case 18: {
            msg_.AddEntriesFrom(input, _repeated_msg_codec);
            break;
          }
          case 24: {
            Offline = input.ReadBool();
            break;
          }
        }
      }
    }

  }

  public sealed partial class SessionCommand : pb::IMessage<SessionCommand> {
    private static readonly pb::MessageParser<SessionCommand> _parser = new pb::MessageParser<SessionCommand>(() => new SessionCommand());
    private pb::UnknownFieldSet _unknownFields;
    private int _hasBits0;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pb::MessageParser<SessionCommand> Parser { get { return _parser; } }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pbr::MessageDescriptor Descriptor {
      get { return global::LeanCloud.Realtime.Internal.Protocol.Messages2ProtoReflection.Descriptor.MessageTypes[10]; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public SessionCommand() {
      OnConstruction();
    }

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public SessionCommand(SessionCommand other) : this() {
      _hasBits0 = other._hasBits0;
      t_ = other.t_;
      n_ = other.n_;
      s_ = other.s_;
      ua_ = other.ua_;
      r_ = other.r_;
      tag_ = other.tag_;
      deviceId_ = other.deviceId_;
      sessionPeerIds_ = other.sessionPeerIds_.Clone();
      onlineSessionPeerIds_ = other.onlineSessionPeerIds_.Clone();
      st_ = other.st_;
      stTtl_ = other.stTtl_;
      code_ = other.code_;
      reason_ = other.reason_;
      deviceToken_ = other.deviceToken_;
      sp_ = other.sp_;
      detail_ = other.detail_;
      lastUnreadNotifTime_ = other.lastUnreadNotifTime_;
      lastPatchTime_ = other.lastPatchTime_;
      configBitmap_ = other.configBitmap_;
      systemInfo_ = other.HasSystemInfo ? other.systemInfo_.Clone() : null;
      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public SessionCommand Clone() {
      return new SessionCommand(this);
    }

    /// <summary>Field number for the "t" field.</summary>
    public const int TFieldNumber = 1;
    private readonly static long TDefaultValue = 0L;

    private long t_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public long T {
      get { if ((_hasBits0 & 1) != 0) { return t_; } else { return TDefaultValue; } }
      set {
        _hasBits0 |= 1;
        t_ = value;
      }
    }
    /// <summary>Gets whether the "t" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasT {
      get { return (_hasBits0 & 1) != 0; }
    }
    /// <summary>Clears the value of the "t" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearT() {
      _hasBits0 &= ~1;
    }

    /// <summary>Field number for the "n" field.</summary>
    public const int NFieldNumber = 2;
    private readonly static string NDefaultValue = "";

    private string n_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string N {
      get { return n_ ?? NDefaultValue; }
      set {
        n_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }
    /// <summary>Gets whether the "n" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasN {
      get { return n_ != null; }
    }
    /// <summary>Clears the value of the "n" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearN() {
      n_ = null;
    }

    /// <summary>Field number for the "s" field.</summary>
    public const int SFieldNumber = 3;
    private readonly static string SDefaultValue = "";

    private string s_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string S {
      get { return s_ ?? SDefaultValue; }
      set {
        s_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }
    /// <summary>Gets whether the "s" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasS {
      get { return s_ != null; }
    }
    /// <summary>Clears the value of the "s" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearS() {
      s_ = null;
    }

    /// <summary>Field number for the "ua" field.</summary>
    public const int UaFieldNumber = 4;
    private readonly static string UaDefaultValue = "";

    private string ua_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string Ua {
      get { return ua_ ?? UaDefaultValue; }
      set {
        ua_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }
    /// <summary>Gets whether the "ua" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasUa {
      get { return ua_ != null; }
    }
    /// <summary>Clears the value of the "ua" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearUa() {
      ua_ = null;
    }

    /// <summary>Field number for the "r" field.</summary>
    public const int RFieldNumber = 5;
    private readonly static bool RDefaultValue = false;

    private bool r_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool R {
      get { if ((_hasBits0 & 2) != 0) { return r_; } else { return RDefaultValue; } }
      set {
        _hasBits0 |= 2;
        r_ = value;
      }
    }
    /// <summary>Gets whether the "r" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasR {
      get { return (_hasBits0 & 2) != 0; }
    }
    /// <summary>Clears the value of the "r" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearR() {
      _hasBits0 &= ~2;
    }

    /// <summary>Field number for the "tag" field.</summary>
    public const int TagFieldNumber = 6;
    private readonly static string TagDefaultValue = "";

    private string tag_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string Tag {
      get { return tag_ ?? TagDefaultValue; }
      set {
        tag_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }
    /// <summary>Gets whether the "tag" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasTag {
      get { return tag_ != null; }
    }
    /// <summary>Clears the value of the "tag" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearTag() {
      tag_ = null;
    }

    /// <summary>Field number for the "deviceId" field.</summary>
    public const int DeviceIdFieldNumber = 7;
    private readonly static string DeviceIdDefaultValue = "";

    private string deviceId_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string DeviceId {
      get { return deviceId_ ?? DeviceIdDefaultValue; }
      set {
        deviceId_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }
    /// <summary>Gets whether the "deviceId" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasDeviceId {
      get { return deviceId_ != null; }
    }
    /// <summary>Clears the value of the "deviceId" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearDeviceId() {
      deviceId_ = null;
    }

    /// <summary>Field number for the "sessionPeerIds" field.</summary>
    public const int SessionPeerIdsFieldNumber = 8;
    private static readonly pb::FieldCodec<string> _repeated_sessionPeerIds_codec
        = pb::FieldCodec.ForString(66);
    private readonly pbc::RepeatedField<string> sessionPeerIds_ = new pbc::RepeatedField<string>();
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public pbc::RepeatedField<string> SessionPeerIds {
      get { return sessionPeerIds_; }
    }

    /// <summary>Field number for the "onlineSessionPeerIds" field.</summary>
    public const int OnlineSessionPeerIdsFieldNumber = 9;
    private static readonly pb::FieldCodec<string> _repeated_onlineSessionPeerIds_codec
        = pb::FieldCodec.ForString(74);
    private readonly pbc::RepeatedField<string> onlineSessionPeerIds_ = new pbc::RepeatedField<string>();
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public pbc::RepeatedField<string> OnlineSessionPeerIds {
      get { return onlineSessionPeerIds_; }
    }

    /// <summary>Field number for the "st" field.</summary>
    public const int StFieldNumber = 10;
    private readonly static string StDefaultValue = "";

    private string st_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string St {
      get { return st_ ?? StDefaultValue; }
      set {
        st_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }
    /// <summary>Gets whether the "st" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasSt {
      get { return st_ != null; }
    }
    /// <summary>Clears the value of the "st" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearSt() {
      st_ = null;
    }

    /// <summary>Field number for the "stTtl" field.</summary>
    public const int StTtlFieldNumber = 11;
    private readonly static int StTtlDefaultValue = 0;

    private int stTtl_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public int StTtl {
      get { if ((_hasBits0 & 4) != 0) { return stTtl_; } else { return StTtlDefaultValue; } }
      set {
        _hasBits0 |= 4;
        stTtl_ = value;
      }
    }
    /// <summary>Gets whether the "stTtl" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasStTtl {
      get { return (_hasBits0 & 4) != 0; }
    }
    /// <summary>Clears the value of the "stTtl" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearStTtl() {
      _hasBits0 &= ~4;
    }

    /// <summary>Field number for the "code" field.</summary>
    public const int CodeFieldNumber = 12;
    private readonly static int CodeDefaultValue = 0;

    private int code_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public int Code {
      get { if ((_hasBits0 & 8) != 0) { return code_; } else { return CodeDefaultValue; } }
      set {
        _hasBits0 |= 8;
        code_ = value;
      }
    }
    /// <summary>Gets whether the "code" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasCode {
      get { return (_hasBits0 & 8) != 0; }
    }
    /// <summary>Clears the value of the "code" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearCode() {
      _hasBits0 &= ~8;
    }

    /// <summary>Field number for the "reason" field.</summary>
    public const int ReasonFieldNumber = 13;
    private readonly static string ReasonDefaultValue = "";

    private string reason_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string Reason {
      get { return reason_ ?? ReasonDefaultValue; }
      set {
        reason_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }
    /// <summary>Gets whether the "reason" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasReason {
      get { return reason_ != null; }
    }
    /// <summary>Clears the value of the "reason" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearReason() {
      reason_ = null;
    }

    /// <summary>Field number for the "deviceToken" field.</summary>
    public const int DeviceTokenFieldNumber = 14;
    private readonly static string DeviceTokenDefaultValue = "";

    private string deviceToken_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string DeviceToken {
      get { return deviceToken_ ?? DeviceTokenDefaultValue; }
      set {
        deviceToken_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }
    /// <summary>Gets whether the "deviceToken" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasDeviceToken {
      get { return deviceToken_ != null; }
    }
    /// <summary>Clears the value of the "deviceToken" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearDeviceToken() {
      deviceToken_ = null;
    }

    /// <summary>Field number for the "sp" field.</summary>
    public const int SpFieldNumber = 15;
    private readonly static bool SpDefaultValue = false;

    private bool sp_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool Sp {
      get { if ((_hasBits0 & 16) != 0) { return sp_; } else { return SpDefaultValue; } }
      set {
        _hasBits0 |= 16;
        sp_ = value;
      }
    }
    /// <summary>Gets whether the "sp" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasSp {
      get { return (_hasBits0 & 16) != 0; }
    }
    /// <summary>Clears the value of the "sp" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearSp() {
      _hasBits0 &= ~16;
    }

    /// <summary>Field number for the "detail" field.</summary>
    public const int DetailFieldNumber = 16;
    private readonly static string DetailDefaultValue = "";

    private string detail_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string Detail {
      get { return detail_ ?? DetailDefaultValue; }
      set {
        detail_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }
    /// <summary>Gets whether the "detail" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasDetail {
      get { return detail_ != null; }
    }
    /// <summary>Clears the value of the "detail" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearDetail() {
      detail_ = null;
    }

    /// <summary>Field number for the "lastUnreadNotifTime" field.</summary>
    public const int LastUnreadNotifTimeFieldNumber = 17;
    private readonly static long LastUnreadNotifTimeDefaultValue = 0L;

    private long lastUnreadNotifTime_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public long LastUnreadNotifTime {
      get { if ((_hasBits0 & 32) != 0) { return lastUnreadNotifTime_; } else { return LastUnreadNotifTimeDefaultValue; } }
      set {
        _hasBits0 |= 32;
        lastUnreadNotifTime_ = value;
      }
    }
    /// <summary>Gets whether the "lastUnreadNotifTime" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasLastUnreadNotifTime {
      get { return (_hasBits0 & 32) != 0; }
    }
    /// <summary>Clears the value of the "lastUnreadNotifTime" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearLastUnreadNotifTime() {
      _hasBits0 &= ~32;
    }

    /// <summary>Field number for the "lastPatchTime" field.</summary>
    public const int LastPatchTimeFieldNumber = 18;
    private readonly static long LastPatchTimeDefaultValue = 0L;

    private long lastPatchTime_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public long LastPatchTime {
      get { if ((_hasBits0 & 64) != 0) { return lastPatchTime_; } else { return LastPatchTimeDefaultValue; } }
      set {
        _hasBits0 |= 64;
        lastPatchTime_ = value;
      }
    }
    /// <summary>Gets whether the "lastPatchTime" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasLastPatchTime {
      get { return (_hasBits0 & 64) != 0; }
    }
    /// <summary>Clears the value of the "lastPatchTime" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearLastPatchTime() {
      _hasBits0 &= ~64;
    }

    /// <summary>Field number for the "configBitmap" field.</summary>
    public const int ConfigBitmapFieldNumber = 19;
    private readonly static long ConfigBitmapDefaultValue = 0L;

    private long configBitmap_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public long ConfigBitmap {
      get { if ((_hasBits0 & 128) != 0) { return configBitmap_; } else { return ConfigBitmapDefaultValue; } }
      set {
        _hasBits0 |= 128;
        configBitmap_ = value;
      }
    }
    /// <summary>Gets whether the "configBitmap" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasConfigBitmap {
      get { return (_hasBits0 & 128) != 0; }
    }
    /// <summary>Clears the value of the "configBitmap" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearConfigBitmap() {
      _hasBits0 &= ~128;
    }

    /// <summary>Field number for the "systemInfo" field.</summary>
    public const int SystemInfoFieldNumber = 20;
    private global::LeanCloud.Realtime.Internal.Protocol.SystemInfo systemInfo_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public global::LeanCloud.Realtime.Internal.Protocol.SystemInfo SystemInfo {
      get { return systemInfo_; }
      set {
        systemInfo_ = value;
      }
    }
    /// <summary>Gets whether the systemInfo field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasSystemInfo {
      get { return systemInfo_ != null; }
    }
    /// <summary>Clears the value of the systemInfo field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearSystemInfo() {
      systemInfo_ = null;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override bool Equals(object other) {
      return Equals(other as SessionCommand);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool Equals(SessionCommand other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (T != other.T) return false;
      if (N != other.N) return false;
      if (S != other.S) return false;
      if (Ua != other.Ua) return false;
      if (R != other.R) return false;
      if (Tag != other.Tag) return false;
      if (DeviceId != other.DeviceId) return false;
      if(!sessionPeerIds_.Equals(other.sessionPeerIds_)) return false;
      if(!onlineSessionPeerIds_.Equals(other.onlineSessionPeerIds_)) return false;
      if (St != other.St) return false;
      if (StTtl != other.StTtl) return false;
      if (Code != other.Code) return false;
      if (Reason != other.Reason) return false;
      if (DeviceToken != other.DeviceToken) return false;
      if (Sp != other.Sp) return false;
      if (Detail != other.Detail) return false;
      if (LastUnreadNotifTime != other.LastUnreadNotifTime) return false;
      if (LastPatchTime != other.LastPatchTime) return false;
      if (ConfigBitmap != other.ConfigBitmap) return false;
      if (!object.Equals(SystemInfo, other.SystemInfo)) return false;
      return Equals(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override int GetHashCode() {
      int hash = 1;
      if (HasT) hash ^= T.GetHashCode();
      if (HasN) hash ^= N.GetHashCode();
      if (HasS) hash ^= S.GetHashCode();
      if (HasUa) hash ^= Ua.GetHashCode();
      if (HasR) hash ^= R.GetHashCode();
      if (HasTag) hash ^= Tag.GetHashCode();
      if (HasDeviceId) hash ^= DeviceId.GetHashCode();
      hash ^= sessionPeerIds_.GetHashCode();
      hash ^= onlineSessionPeerIds_.GetHashCode();
      if (HasSt) hash ^= St.GetHashCode();
      if (HasStTtl) hash ^= StTtl.GetHashCode();
      if (HasCode) hash ^= Code.GetHashCode();
      if (HasReason) hash ^= Reason.GetHashCode();
      if (HasDeviceToken) hash ^= DeviceToken.GetHashCode();
      if (HasSp) hash ^= Sp.GetHashCode();
      if (HasDetail) hash ^= Detail.GetHashCode();
      if (HasLastUnreadNotifTime) hash ^= LastUnreadNotifTime.GetHashCode();
      if (HasLastPatchTime) hash ^= LastPatchTime.GetHashCode();
      if (HasConfigBitmap) hash ^= ConfigBitmap.GetHashCode();
      if (HasSystemInfo) hash ^= SystemInfo.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 (HasT) {
        output.WriteRawTag(8);
        output.WriteInt64(T);
      }
      if (HasN) {
        output.WriteRawTag(18);
        output.WriteString(N);
      }
      if (HasS) {
        output.WriteRawTag(26);
        output.WriteString(S);
      }
      if (HasUa) {
        output.WriteRawTag(34);
        output.WriteString(Ua);
      }
      if (HasR) {
        output.WriteRawTag(40);
        output.WriteBool(R);
      }
      if (HasTag) {
        output.WriteRawTag(50);
        output.WriteString(Tag);
      }
      if (HasDeviceId) {
        output.WriteRawTag(58);
        output.WriteString(DeviceId);
      }
      sessionPeerIds_.WriteTo(output, _repeated_sessionPeerIds_codec);
      onlineSessionPeerIds_.WriteTo(output, _repeated_onlineSessionPeerIds_codec);
      if (HasSt) {
        output.WriteRawTag(82);
        output.WriteString(St);
      }
      if (HasStTtl) {
        output.WriteRawTag(88);
        output.WriteInt32(StTtl);
      }
      if (HasCode) {
        output.WriteRawTag(96);
        output.WriteInt32(Code);
      }
      if (HasReason) {
        output.WriteRawTag(106);
        output.WriteString(Reason);
      }
      if (HasDeviceToken) {
        output.WriteRawTag(114);
        output.WriteString(DeviceToken);
      }
      if (HasSp) {
        output.WriteRawTag(120);
        output.WriteBool(Sp);
      }
      if (HasDetail) {
        output.WriteRawTag(130, 1);
        output.WriteString(Detail);
      }
      if (HasLastUnreadNotifTime) {
        output.WriteRawTag(136, 1);
        output.WriteInt64(LastUnreadNotifTime);
      }
      if (HasLastPatchTime) {
        output.WriteRawTag(144, 1);
        output.WriteInt64(LastPatchTime);
      }
      if (HasConfigBitmap) {
        output.WriteRawTag(152, 1);
        output.WriteInt64(ConfigBitmap);
      }
      if (HasSystemInfo) {
        output.WriteRawTag(162, 1);
        output.WriteMessage(SystemInfo);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(output);
      }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public int CalculateSize() {
      int size = 0;
      if (HasT) {
        size += 1 + pb::CodedOutputStream.ComputeInt64Size(T);
      }
      if (HasN) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(N);
      }
      if (HasS) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(S);
      }
      if (HasUa) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(Ua);
      }
      if (HasR) {
        size += 1 + 1;
      }
      if (HasTag) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(Tag);
      }
      if (HasDeviceId) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(DeviceId);
      }
      size += sessionPeerIds_.CalculateSize(_repeated_sessionPeerIds_codec);
      size += onlineSessionPeerIds_.CalculateSize(_repeated_onlineSessionPeerIds_codec);
      if (HasSt) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(St);
      }
      if (HasStTtl) {
        size += 1 + pb::CodedOutputStream.ComputeInt32Size(StTtl);
      }
      if (HasCode) {
        size += 1 + pb::CodedOutputStream.ComputeInt32Size(Code);
      }
      if (HasReason) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(Reason);
      }
      if (HasDeviceToken) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(DeviceToken);
      }
      if (HasSp) {
        size += 1 + 1;
      }
      if (HasDetail) {
        size += 2 + pb::CodedOutputStream.ComputeStringSize(Detail);
      }
      if (HasLastUnreadNotifTime) {
        size += 2 + pb::CodedOutputStream.ComputeInt64Size(LastUnreadNotifTime);
      }
      if (HasLastPatchTime) {
        size += 2 + pb::CodedOutputStream.ComputeInt64Size(LastPatchTime);
      }
      if (HasConfigBitmap) {
        size += 2 + pb::CodedOutputStream.ComputeInt64Size(ConfigBitmap);
      }
      if (HasSystemInfo) {
        size += 2 + pb::CodedOutputStream.ComputeMessageSize(SystemInfo);
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void MergeFrom(SessionCommand other) {
      if (other == null) {
        return;
      }
      if (other.HasT) {
        T = other.T;
      }
      if (other.HasN) {
        N = other.N;
      }
      if (other.HasS) {
        S = other.S;
      }
      if (other.HasUa) {
        Ua = other.Ua;
      }
      if (other.HasR) {
        R = other.R;
      }
      if (other.HasTag) {
        Tag = other.Tag;
      }
      if (other.HasDeviceId) {
        DeviceId = other.DeviceId;
      }
      sessionPeerIds_.Add(other.sessionPeerIds_);
      onlineSessionPeerIds_.Add(other.onlineSessionPeerIds_);
      if (other.HasSt) {
        St = other.St;
      }
      if (other.HasStTtl) {
        StTtl = other.StTtl;
      }
      if (other.HasCode) {
        Code = other.Code;
      }
      if (other.HasReason) {
        Reason = other.Reason;
      }
      if (other.HasDeviceToken) {
        DeviceToken = other.DeviceToken;
      }
      if (other.HasSp) {
        Sp = other.Sp;
      }
      if (other.HasDetail) {
        Detail = other.Detail;
      }
      if (other.HasLastUnreadNotifTime) {
        LastUnreadNotifTime = other.LastUnreadNotifTime;
      }
      if (other.HasLastPatchTime) {
        LastPatchTime = other.LastPatchTime;
      }
      if (other.HasConfigBitmap) {
        ConfigBitmap = other.ConfigBitmap;
      }
      if (other.HasSystemInfo) {
        if (!HasSystemInfo) {
          SystemInfo = new global::LeanCloud.Realtime.Internal.Protocol.SystemInfo();
        }
        SystemInfo.MergeFrom(other.SystemInfo);
      }
      _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: {
            T = input.ReadInt64();
            break;
          }
          case 18: {
            N = input.ReadString();
            break;
          }
          case 26: {
            S = input.ReadString();
            break;
          }
          case 34: {
            Ua = input.ReadString();
            break;
          }
          case 40: {
            R = input.ReadBool();
            break;
          }
          case 50: {
            Tag = input.ReadString();
            break;
          }
          case 58: {
            DeviceId = input.ReadString();
            break;
          }
          case 66: {
            sessionPeerIds_.AddEntriesFrom(input, _repeated_sessionPeerIds_codec);
            break;
          }
          case 74: {
            onlineSessionPeerIds_.AddEntriesFrom(input, _repeated_onlineSessionPeerIds_codec);
            break;
          }
          case 82: {
            St = input.ReadString();
            break;
          }
          case 88: {
            StTtl = input.ReadInt32();
            break;
          }
          case 96: {
            Code = input.ReadInt32();
            break;
          }
          case 106: {
            Reason = input.ReadString();
            break;
          }
          case 114: {
            DeviceToken = input.ReadString();
            break;
          }
          case 120: {
            Sp = input.ReadBool();
            break;
          }
          case 130: {
            Detail = input.ReadString();
            break;
          }
          case 136: {
            LastUnreadNotifTime = input.ReadInt64();
            break;
          }
          case 144: {
            LastPatchTime = input.ReadInt64();
            break;
          }
          case 152: {
            ConfigBitmap = input.ReadInt64();
            break;
          }
          case 162: {
            if (!HasSystemInfo) {
              SystemInfo = new global::LeanCloud.Realtime.Internal.Protocol.SystemInfo();
            }
            input.ReadMessage(SystemInfo);
            break;
          }
        }
      }
    }

  }

  public sealed partial class ErrorCommand : pb::IMessage<ErrorCommand> {
    private static readonly pb::MessageParser<ErrorCommand> _parser = new pb::MessageParser<ErrorCommand>(() => new ErrorCommand());
    private pb::UnknownFieldSet _unknownFields;
    private int _hasBits0;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pb::MessageParser<ErrorCommand> Parser { get { return _parser; } }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pbr::MessageDescriptor Descriptor {
      get { return global::LeanCloud.Realtime.Internal.Protocol.Messages2ProtoReflection.Descriptor.MessageTypes[11]; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public ErrorCommand() {
      OnConstruction();
    }

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public ErrorCommand(ErrorCommand other) : this() {
      _hasBits0 = other._hasBits0;
      code_ = other.code_;
      reason_ = other.reason_;
      appCode_ = other.appCode_;
      detail_ = other.detail_;
      pids_ = other.pids_.Clone();
      appMsg_ = other.appMsg_;
      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public ErrorCommand Clone() {
      return new ErrorCommand(this);
    }

    /// <summary>Field number for the "code" field.</summary>
    public const int CodeFieldNumber = 1;
    private readonly static int CodeDefaultValue = 0;

    private int code_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public int Code {
      get { if ((_hasBits0 & 1) != 0) { return code_; } else { return CodeDefaultValue; } }
      set {
        _hasBits0 |= 1;
        code_ = value;
      }
    }
    /// <summary>Gets whether the "code" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasCode {
      get { return (_hasBits0 & 1) != 0; }
    }
    /// <summary>Clears the value of the "code" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearCode() {
      _hasBits0 &= ~1;
    }

    /// <summary>Field number for the "reason" field.</summary>
    public const int ReasonFieldNumber = 2;
    private readonly static string ReasonDefaultValue = "";

    private string reason_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string Reason {
      get { return reason_ ?? ReasonDefaultValue; }
      set {
        reason_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }
    /// <summary>Gets whether the "reason" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasReason {
      get { return reason_ != null; }
    }
    /// <summary>Clears the value of the "reason" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearReason() {
      reason_ = null;
    }

    /// <summary>Field number for the "appCode" field.</summary>
    public const int AppCodeFieldNumber = 3;
    private readonly static int AppCodeDefaultValue = 0;

    private int appCode_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public int AppCode {
      get { if ((_hasBits0 & 2) != 0) { return appCode_; } else { return AppCodeDefaultValue; } }
      set {
        _hasBits0 |= 2;
        appCode_ = value;
      }
    }
    /// <summary>Gets whether the "appCode" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasAppCode {
      get { return (_hasBits0 & 2) != 0; }
    }
    /// <summary>Clears the value of the "appCode" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearAppCode() {
      _hasBits0 &= ~2;
    }

    /// <summary>Field number for the "detail" field.</summary>
    public const int DetailFieldNumber = 4;
    private readonly static string DetailDefaultValue = "";

    private string detail_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string Detail {
      get { return detail_ ?? DetailDefaultValue; }
      set {
        detail_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }
    /// <summary>Gets whether the "detail" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasDetail {
      get { return detail_ != null; }
    }
    /// <summary>Clears the value of the "detail" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearDetail() {
      detail_ = null;
    }

    /// <summary>Field number for the "pids" field.</summary>
    public const int PidsFieldNumber = 5;
    private static readonly pb::FieldCodec<string> _repeated_pids_codec
        = pb::FieldCodec.ForString(42);
    private readonly pbc::RepeatedField<string> pids_ = new pbc::RepeatedField<string>();
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public pbc::RepeatedField<string> Pids {
      get { return pids_; }
    }

    /// <summary>Field number for the "appMsg" field.</summary>
    public const int AppMsgFieldNumber = 6;
    private readonly static string AppMsgDefaultValue = "";

    private string appMsg_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string AppMsg {
      get { return appMsg_ ?? AppMsgDefaultValue; }
      set {
        appMsg_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }
    /// <summary>Gets whether the "appMsg" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasAppMsg {
      get { return appMsg_ != null; }
    }
    /// <summary>Clears the value of the "appMsg" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearAppMsg() {
      appMsg_ = null;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override bool Equals(object other) {
      return Equals(other as ErrorCommand);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool Equals(ErrorCommand other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (Code != other.Code) return false;
      if (Reason != other.Reason) return false;
      if (AppCode != other.AppCode) return false;
      if (Detail != other.Detail) return false;
      if(!pids_.Equals(other.pids_)) return false;
      if (AppMsg != other.AppMsg) return false;
      return Equals(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override int GetHashCode() {
      int hash = 1;
      if (HasCode) hash ^= Code.GetHashCode();
      if (HasReason) hash ^= Reason.GetHashCode();
      if (HasAppCode) hash ^= AppCode.GetHashCode();
      if (HasDetail) hash ^= Detail.GetHashCode();
      hash ^= pids_.GetHashCode();
      if (HasAppMsg) hash ^= AppMsg.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 (HasCode) {
        output.WriteRawTag(8);
        output.WriteInt32(Code);
      }
      if (HasReason) {
        output.WriteRawTag(18);
        output.WriteString(Reason);
      }
      if (HasAppCode) {
        output.WriteRawTag(24);
        output.WriteInt32(AppCode);
      }
      if (HasDetail) {
        output.WriteRawTag(34);
        output.WriteString(Detail);
      }
      pids_.WriteTo(output, _repeated_pids_codec);
      if (HasAppMsg) {
        output.WriteRawTag(50);
        output.WriteString(AppMsg);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(output);
      }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public int CalculateSize() {
      int size = 0;
      if (HasCode) {
        size += 1 + pb::CodedOutputStream.ComputeInt32Size(Code);
      }
      if (HasReason) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(Reason);
      }
      if (HasAppCode) {
        size += 1 + pb::CodedOutputStream.ComputeInt32Size(AppCode);
      }
      if (HasDetail) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(Detail);
      }
      size += pids_.CalculateSize(_repeated_pids_codec);
      if (HasAppMsg) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(AppMsg);
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void MergeFrom(ErrorCommand other) {
      if (other == null) {
        return;
      }
      if (other.HasCode) {
        Code = other.Code;
      }
      if (other.HasReason) {
        Reason = other.Reason;
      }
      if (other.HasAppCode) {
        AppCode = other.AppCode;
      }
      if (other.HasDetail) {
        Detail = other.Detail;
      }
      pids_.Add(other.pids_);
      if (other.HasAppMsg) {
        AppMsg = other.AppMsg;
      }
      _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: {
            Code = input.ReadInt32();
            break;
          }
          case 18: {
            Reason = input.ReadString();
            break;
          }
          case 24: {
            AppCode = input.ReadInt32();
            break;
          }
          case 34: {
            Detail = input.ReadString();
            break;
          }
          case 42: {
            pids_.AddEntriesFrom(input, _repeated_pids_codec);
            break;
          }
          case 50: {
            AppMsg = input.ReadString();
            break;
          }
        }
      }
    }

  }

  public sealed partial class DirectCommand : pb::IMessage<DirectCommand> {
    private static readonly pb::MessageParser<DirectCommand> _parser = new pb::MessageParser<DirectCommand>(() => new DirectCommand());
    private pb::UnknownFieldSet _unknownFields;
    private int _hasBits0;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pb::MessageParser<DirectCommand> Parser { get { return _parser; } }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pbr::MessageDescriptor Descriptor {
      get { return global::LeanCloud.Realtime.Internal.Protocol.Messages2ProtoReflection.Descriptor.MessageTypes[12]; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public DirectCommand() {
      OnConstruction();
    }

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public DirectCommand(DirectCommand other) : this() {
      _hasBits0 = other._hasBits0;
      msg_ = other.msg_;
      uid_ = other.uid_;
      fromPeerId_ = other.fromPeerId_;
      timestamp_ = other.timestamp_;
      offline_ = other.offline_;
      hasMore_ = other.hasMore_;
      toPeerIds_ = other.toPeerIds_.Clone();
      r_ = other.r_;
      cid_ = other.cid_;
      id_ = other.id_;
      transient_ = other.transient_;
      dt_ = other.dt_;
      roomId_ = other.roomId_;
      pushData_ = other.pushData_;
      will_ = other.will_;
      patchTimestamp_ = other.patchTimestamp_;
      binaryMsg_ = other.binaryMsg_;
      mentionPids_ = other.mentionPids_.Clone();
      mentionAll_ = other.mentionAll_;
      convType_ = other.convType_;
      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public DirectCommand Clone() {
      return new DirectCommand(this);
    }

    /// <summary>Field number for the "msg" field.</summary>
    public const int MsgFieldNumber = 1;
    private readonly static string MsgDefaultValue = "";

    private string msg_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string Msg {
      get { return msg_ ?? MsgDefaultValue; }
      set {
        msg_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }
    /// <summary>Gets whether the "msg" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasMsg {
      get { return msg_ != null; }
    }
    /// <summary>Clears the value of the "msg" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearMsg() {
      msg_ = null;
    }

    /// <summary>Field number for the "uid" field.</summary>
    public const int UidFieldNumber = 2;
    private readonly static string UidDefaultValue = "";

    private string uid_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string Uid {
      get { return uid_ ?? UidDefaultValue; }
      set {
        uid_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }
    /// <summary>Gets whether the "uid" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasUid {
      get { return uid_ != null; }
    }
    /// <summary>Clears the value of the "uid" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearUid() {
      uid_ = null;
    }

    /// <summary>Field number for the "fromPeerId" field.</summary>
    public const int FromPeerIdFieldNumber = 3;
    private readonly static string FromPeerIdDefaultValue = "";

    private string fromPeerId_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string FromPeerId {
      get { return fromPeerId_ ?? FromPeerIdDefaultValue; }
      set {
        fromPeerId_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }
    /// <summary>Gets whether the "fromPeerId" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasFromPeerId {
      get { return fromPeerId_ != null; }
    }
    /// <summary>Clears the value of the "fromPeerId" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearFromPeerId() {
      fromPeerId_ = null;
    }

    /// <summary>Field number for the "timestamp" field.</summary>
    public const int TimestampFieldNumber = 4;
    private readonly static long TimestampDefaultValue = 0L;

    private long timestamp_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public long Timestamp {
      get { if ((_hasBits0 & 1) != 0) { return timestamp_; } else { return TimestampDefaultValue; } }
      set {
        _hasBits0 |= 1;
        timestamp_ = value;
      }
    }
    /// <summary>Gets whether the "timestamp" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasTimestamp {
      get { return (_hasBits0 & 1) != 0; }
    }
    /// <summary>Clears the value of the "timestamp" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearTimestamp() {
      _hasBits0 &= ~1;
    }

    /// <summary>Field number for the "offline" field.</summary>
    public const int OfflineFieldNumber = 5;
    private readonly static bool OfflineDefaultValue = false;

    private bool offline_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool Offline {
      get { if ((_hasBits0 & 2) != 0) { return offline_; } else { return OfflineDefaultValue; } }
      set {
        _hasBits0 |= 2;
        offline_ = value;
      }
    }
    /// <summary>Gets whether the "offline" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasOffline {
      get { return (_hasBits0 & 2) != 0; }
    }
    /// <summary>Clears the value of the "offline" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearOffline() {
      _hasBits0 &= ~2;
    }

    /// <summary>Field number for the "hasMore" field.</summary>
    public const int HasMoreFieldNumber = 6;
    private readonly static bool HasMoreDefaultValue = false;

    private bool hasMore_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasMore {
      get { if ((_hasBits0 & 4) != 0) { return hasMore_; } else { return HasMoreDefaultValue; } }
      set {
        _hasBits0 |= 4;
        hasMore_ = value;
      }
    }
    /// <summary>Gets whether the "hasMore" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasHasMore {
      get { return (_hasBits0 & 4) != 0; }
    }
    /// <summary>Clears the value of the "hasMore" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearHasMore() {
      _hasBits0 &= ~4;
    }

    /// <summary>Field number for the "toPeerIds" field.</summary>
    public const int ToPeerIdsFieldNumber = 7;
    private static readonly pb::FieldCodec<string> _repeated_toPeerIds_codec
        = pb::FieldCodec.ForString(58);
    private readonly pbc::RepeatedField<string> toPeerIds_ = new pbc::RepeatedField<string>();
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public pbc::RepeatedField<string> ToPeerIds {
      get { return toPeerIds_; }
    }

    /// <summary>Field number for the "r" field.</summary>
    public const int RFieldNumber = 10;
    private readonly static bool RDefaultValue = false;

    private bool r_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool R {
      get { if ((_hasBits0 & 8) != 0) { return r_; } else { return RDefaultValue; } }
      set {
        _hasBits0 |= 8;
        r_ = value;
      }
    }
    /// <summary>Gets whether the "r" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasR {
      get { return (_hasBits0 & 8) != 0; }
    }
    /// <summary>Clears the value of the "r" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearR() {
      _hasBits0 &= ~8;
    }

    /// <summary>Field number for the "cid" field.</summary>
    public const int CidFieldNumber = 11;
    private readonly static string CidDefaultValue = "";

    private string cid_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string Cid {
      get { return cid_ ?? CidDefaultValue; }
      set {
        cid_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }
    /// <summary>Gets whether the "cid" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasCid {
      get { return cid_ != null; }
    }
    /// <summary>Clears the value of the "cid" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearCid() {
      cid_ = null;
    }

    /// <summary>Field number for the "id" field.</summary>
    public const int IdFieldNumber = 12;
    private readonly static string IdDefaultValue = "";

    private string id_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string Id {
      get { return id_ ?? IdDefaultValue; }
      set {
        id_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }
    /// <summary>Gets whether the "id" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasId {
      get { return id_ != null; }
    }
    /// <summary>Clears the value of the "id" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearId() {
      id_ = null;
    }

    /// <summary>Field number for the "transient" field.</summary>
    public const int TransientFieldNumber = 13;
    private readonly static bool TransientDefaultValue = false;

    private bool transient_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool Transient {
      get { if ((_hasBits0 & 16) != 0) { return transient_; } else { return TransientDefaultValue; } }
      set {
        _hasBits0 |= 16;
        transient_ = value;
      }
    }
    /// <summary>Gets whether the "transient" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasTransient {
      get { return (_hasBits0 & 16) != 0; }
    }
    /// <summary>Clears the value of the "transient" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearTransient() {
      _hasBits0 &= ~16;
    }

    /// <summary>Field number for the "dt" field.</summary>
    public const int DtFieldNumber = 14;
    private readonly static string DtDefaultValue = "";

    private string dt_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string Dt {
      get { return dt_ ?? DtDefaultValue; }
      set {
        dt_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }
    /// <summary>Gets whether the "dt" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasDt {
      get { return dt_ != null; }
    }
    /// <summary>Clears the value of the "dt" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearDt() {
      dt_ = null;
    }

    /// <summary>Field number for the "roomId" field.</summary>
    public const int RoomIdFieldNumber = 15;
    private readonly static string RoomIdDefaultValue = "";

    private string roomId_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string RoomId {
      get { return roomId_ ?? RoomIdDefaultValue; }
      set {
        roomId_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }
    /// <summary>Gets whether the "roomId" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasRoomId {
      get { return roomId_ != null; }
    }
    /// <summary>Clears the value of the "roomId" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearRoomId() {
      roomId_ = null;
    }

    /// <summary>Field number for the "pushData" field.</summary>
    public const int PushDataFieldNumber = 16;
    private readonly static string PushDataDefaultValue = "";

    private string pushData_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string PushData {
      get { return pushData_ ?? PushDataDefaultValue; }
      set {
        pushData_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }
    /// <summary>Gets whether the "pushData" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasPushData {
      get { return pushData_ != null; }
    }
    /// <summary>Clears the value of the "pushData" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearPushData() {
      pushData_ = null;
    }

    /// <summary>Field number for the "will" field.</summary>
    public const int WillFieldNumber = 17;
    private readonly static bool WillDefaultValue = false;

    private bool will_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool Will {
      get { if ((_hasBits0 & 32) != 0) { return will_; } else { return WillDefaultValue; } }
      set {
        _hasBits0 |= 32;
        will_ = value;
      }
    }
    /// <summary>Gets whether the "will" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasWill {
      get { return (_hasBits0 & 32) != 0; }
    }
    /// <summary>Clears the value of the "will" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearWill() {
      _hasBits0 &= ~32;
    }

    /// <summary>Field number for the "patchTimestamp" field.</summary>
    public const int PatchTimestampFieldNumber = 18;
    private readonly static long PatchTimestampDefaultValue = 0L;

    private long patchTimestamp_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public long PatchTimestamp {
      get { if ((_hasBits0 & 64) != 0) { return patchTimestamp_; } else { return PatchTimestampDefaultValue; } }
      set {
        _hasBits0 |= 64;
        patchTimestamp_ = value;
      }
    }
    /// <summary>Gets whether the "patchTimestamp" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasPatchTimestamp {
      get { return (_hasBits0 & 64) != 0; }
    }
    /// <summary>Clears the value of the "patchTimestamp" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearPatchTimestamp() {
      _hasBits0 &= ~64;
    }

    /// <summary>Field number for the "binaryMsg" field.</summary>
    public const int BinaryMsgFieldNumber = 19;
    private readonly static pb::ByteString BinaryMsgDefaultValue = pb::ByteString.Empty;

    private pb::ByteString binaryMsg_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public pb::ByteString BinaryMsg {
      get { return binaryMsg_ ?? BinaryMsgDefaultValue; }
      set {
        binaryMsg_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }
    /// <summary>Gets whether the "binaryMsg" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasBinaryMsg {
      get { return binaryMsg_ != null; }
    }
    /// <summary>Clears the value of the "binaryMsg" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearBinaryMsg() {
      binaryMsg_ = null;
    }

    /// <summary>Field number for the "mentionPids" field.</summary>
    public const int MentionPidsFieldNumber = 20;
    private static readonly pb::FieldCodec<string> _repeated_mentionPids_codec
        = pb::FieldCodec.ForString(162);
    private readonly pbc::RepeatedField<string> mentionPids_ = new pbc::RepeatedField<string>();
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public pbc::RepeatedField<string> MentionPids {
      get { return mentionPids_; }
    }

    /// <summary>Field number for the "mentionAll" field.</summary>
    public const int MentionAllFieldNumber = 21;
    private readonly static bool MentionAllDefaultValue = false;

    private bool mentionAll_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool MentionAll {
      get { if ((_hasBits0 & 128) != 0) { return mentionAll_; } else { return MentionAllDefaultValue; } }
      set {
        _hasBits0 |= 128;
        mentionAll_ = value;
      }
    }
    /// <summary>Gets whether the "mentionAll" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasMentionAll {
      get { return (_hasBits0 & 128) != 0; }
    }
    /// <summary>Clears the value of the "mentionAll" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearMentionAll() {
      _hasBits0 &= ~128;
    }

    /// <summary>Field number for the "convType" field.</summary>
    public const int ConvTypeFieldNumber = 22;
    private readonly static int ConvTypeDefaultValue = 0;

    private int convType_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public int ConvType {
      get { if ((_hasBits0 & 256) != 0) { return convType_; } else { return ConvTypeDefaultValue; } }
      set {
        _hasBits0 |= 256;
        convType_ = value;
      }
    }
    /// <summary>Gets whether the "convType" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasConvType {
      get { return (_hasBits0 & 256) != 0; }
    }
    /// <summary>Clears the value of the "convType" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearConvType() {
      _hasBits0 &= ~256;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override bool Equals(object other) {
      return Equals(other as DirectCommand);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool Equals(DirectCommand other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (Msg != other.Msg) return false;
      if (Uid != other.Uid) return false;
      if (FromPeerId != other.FromPeerId) return false;
      if (Timestamp != other.Timestamp) return false;
      if (Offline != other.Offline) return false;
      if (HasMore != other.HasMore) return false;
      if(!toPeerIds_.Equals(other.toPeerIds_)) return false;
      if (R != other.R) return false;
      if (Cid != other.Cid) return false;
      if (Id != other.Id) return false;
      if (Transient != other.Transient) return false;
      if (Dt != other.Dt) return false;
      if (RoomId != other.RoomId) return false;
      if (PushData != other.PushData) return false;
      if (Will != other.Will) return false;
      if (PatchTimestamp != other.PatchTimestamp) return false;
      if (BinaryMsg != other.BinaryMsg) return false;
      if(!mentionPids_.Equals(other.mentionPids_)) return false;
      if (MentionAll != other.MentionAll) return false;
      if (ConvType != other.ConvType) return false;
      return Equals(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override int GetHashCode() {
      int hash = 1;
      if (HasMsg) hash ^= Msg.GetHashCode();
      if (HasUid) hash ^= Uid.GetHashCode();
      if (HasFromPeerId) hash ^= FromPeerId.GetHashCode();
      if (HasTimestamp) hash ^= Timestamp.GetHashCode();
      if (HasOffline) hash ^= Offline.GetHashCode();
      if (HasHasMore) hash ^= HasMore.GetHashCode();
      hash ^= toPeerIds_.GetHashCode();
      if (HasR) hash ^= R.GetHashCode();
      if (HasCid) hash ^= Cid.GetHashCode();
      if (HasId) hash ^= Id.GetHashCode();
      if (HasTransient) hash ^= Transient.GetHashCode();
      if (HasDt) hash ^= Dt.GetHashCode();
      if (HasRoomId) hash ^= RoomId.GetHashCode();
      if (HasPushData) hash ^= PushData.GetHashCode();
      if (HasWill) hash ^= Will.GetHashCode();
      if (HasPatchTimestamp) hash ^= PatchTimestamp.GetHashCode();
      if (HasBinaryMsg) hash ^= BinaryMsg.GetHashCode();
      hash ^= mentionPids_.GetHashCode();
      if (HasMentionAll) hash ^= MentionAll.GetHashCode();
      if (HasConvType) hash ^= ConvType.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 (HasMsg) {
        output.WriteRawTag(10);
        output.WriteString(Msg);
      }
      if (HasUid) {
        output.WriteRawTag(18);
        output.WriteString(Uid);
      }
      if (HasFromPeerId) {
        output.WriteRawTag(26);
        output.WriteString(FromPeerId);
      }
      if (HasTimestamp) {
        output.WriteRawTag(32);
        output.WriteInt64(Timestamp);
      }
      if (HasOffline) {
        output.WriteRawTag(40);
        output.WriteBool(Offline);
      }
      if (HasHasMore) {
        output.WriteRawTag(48);
        output.WriteBool(HasMore);
      }
      toPeerIds_.WriteTo(output, _repeated_toPeerIds_codec);
      if (HasR) {
        output.WriteRawTag(80);
        output.WriteBool(R);
      }
      if (HasCid) {
        output.WriteRawTag(90);
        output.WriteString(Cid);
      }
      if (HasId) {
        output.WriteRawTag(98);
        output.WriteString(Id);
      }
      if (HasTransient) {
        output.WriteRawTag(104);
        output.WriteBool(Transient);
      }
      if (HasDt) {
        output.WriteRawTag(114);
        output.WriteString(Dt);
      }
      if (HasRoomId) {
        output.WriteRawTag(122);
        output.WriteString(RoomId);
      }
      if (HasPushData) {
        output.WriteRawTag(130, 1);
        output.WriteString(PushData);
      }
      if (HasWill) {
        output.WriteRawTag(136, 1);
        output.WriteBool(Will);
      }
      if (HasPatchTimestamp) {
        output.WriteRawTag(144, 1);
        output.WriteInt64(PatchTimestamp);
      }
      if (HasBinaryMsg) {
        output.WriteRawTag(154, 1);
        output.WriteBytes(BinaryMsg);
      }
      mentionPids_.WriteTo(output, _repeated_mentionPids_codec);
      if (HasMentionAll) {
        output.WriteRawTag(168, 1);
        output.WriteBool(MentionAll);
      }
      if (HasConvType) {
        output.WriteRawTag(176, 1);
        output.WriteInt32(ConvType);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(output);
      }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public int CalculateSize() {
      int size = 0;
      if (HasMsg) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(Msg);
      }
      if (HasUid) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(Uid);
      }
      if (HasFromPeerId) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(FromPeerId);
      }
      if (HasTimestamp) {
        size += 1 + pb::CodedOutputStream.ComputeInt64Size(Timestamp);
      }
      if (HasOffline) {
        size += 1 + 1;
      }
      if (HasHasMore) {
        size += 1 + 1;
      }
      size += toPeerIds_.CalculateSize(_repeated_toPeerIds_codec);
      if (HasR) {
        size += 1 + 1;
      }
      if (HasCid) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(Cid);
      }
      if (HasId) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(Id);
      }
      if (HasTransient) {
        size += 1 + 1;
      }
      if (HasDt) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(Dt);
      }
      if (HasRoomId) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(RoomId);
      }
      if (HasPushData) {
        size += 2 + pb::CodedOutputStream.ComputeStringSize(PushData);
      }
      if (HasWill) {
        size += 2 + 1;
      }
      if (HasPatchTimestamp) {
        size += 2 + pb::CodedOutputStream.ComputeInt64Size(PatchTimestamp);
      }
      if (HasBinaryMsg) {
        size += 2 + pb::CodedOutputStream.ComputeBytesSize(BinaryMsg);
      }
      size += mentionPids_.CalculateSize(_repeated_mentionPids_codec);
      if (HasMentionAll) {
        size += 2 + 1;
      }
      if (HasConvType) {
        size += 2 + pb::CodedOutputStream.ComputeInt32Size(ConvType);
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void MergeFrom(DirectCommand other) {
      if (other == null) {
        return;
      }
      if (other.HasMsg) {
        Msg = other.Msg;
      }
      if (other.HasUid) {
        Uid = other.Uid;
      }
      if (other.HasFromPeerId) {
        FromPeerId = other.FromPeerId;
      }
      if (other.HasTimestamp) {
        Timestamp = other.Timestamp;
      }
      if (other.HasOffline) {
        Offline = other.Offline;
      }
      if (other.HasHasMore) {
        HasMore = other.HasMore;
      }
      toPeerIds_.Add(other.toPeerIds_);
      if (other.HasR) {
        R = other.R;
      }
      if (other.HasCid) {
        Cid = other.Cid;
      }
      if (other.HasId) {
        Id = other.Id;
      }
      if (other.HasTransient) {
        Transient = other.Transient;
      }
      if (other.HasDt) {
        Dt = other.Dt;
      }
      if (other.HasRoomId) {
        RoomId = other.RoomId;
      }
      if (other.HasPushData) {
        PushData = other.PushData;
      }
      if (other.HasWill) {
        Will = other.Will;
      }
      if (other.HasPatchTimestamp) {
        PatchTimestamp = other.PatchTimestamp;
      }
      if (other.HasBinaryMsg) {
        BinaryMsg = other.BinaryMsg;
      }
      mentionPids_.Add(other.mentionPids_);
      if (other.HasMentionAll) {
        MentionAll = other.MentionAll;
      }
      if (other.HasConvType) {
        ConvType = other.ConvType;
      }
      _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: {
            Msg = input.ReadString();
            break;
          }
          case 18: {
            Uid = input.ReadString();
            break;
          }
          case 26: {
            FromPeerId = input.ReadString();
            break;
          }
          case 32: {
            Timestamp = input.ReadInt64();
            break;
          }
          case 40: {
            Offline = input.ReadBool();
            break;
          }
          case 48: {
            HasMore = input.ReadBool();
            break;
          }
          case 58: {
            toPeerIds_.AddEntriesFrom(input, _repeated_toPeerIds_codec);
            break;
          }
          case 80: {
            R = input.ReadBool();
            break;
          }
          case 90: {
            Cid = input.ReadString();
            break;
          }
          case 98: {
            Id = input.ReadString();
            break;
          }
          case 104: {
            Transient = input.ReadBool();
            break;
          }
          case 114: {
            Dt = input.ReadString();
            break;
          }
          case 122: {
            RoomId = input.ReadString();
            break;
          }
          case 130: {
            PushData = input.ReadString();
            break;
          }
          case 136: {
            Will = input.ReadBool();
            break;
          }
          case 144: {
            PatchTimestamp = input.ReadInt64();
            break;
          }
          case 154: {
            BinaryMsg = input.ReadBytes();
            break;
          }
          case 162: {
            mentionPids_.AddEntriesFrom(input, _repeated_mentionPids_codec);
            break;
          }
          case 168: {
            MentionAll = input.ReadBool();
            break;
          }
          case 176: {
            ConvType = input.ReadInt32();
            break;
          }
        }
      }
    }

  }

  public sealed partial class AckCommand : pb::IMessage<AckCommand> {
    private static readonly pb::MessageParser<AckCommand> _parser = new pb::MessageParser<AckCommand>(() => new AckCommand());
    private pb::UnknownFieldSet _unknownFields;
    private int _hasBits0;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pb::MessageParser<AckCommand> Parser { get { return _parser; } }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pbr::MessageDescriptor Descriptor {
      get { return global::LeanCloud.Realtime.Internal.Protocol.Messages2ProtoReflection.Descriptor.MessageTypes[13]; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public AckCommand() {
      OnConstruction();
    }

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public AckCommand(AckCommand other) : this() {
      _hasBits0 = other._hasBits0;
      code_ = other.code_;
      reason_ = other.reason_;
      mid_ = other.mid_;
      cid_ = other.cid_;
      t_ = other.t_;
      uid_ = other.uid_;
      fromts_ = other.fromts_;
      tots_ = other.tots_;
      type_ = other.type_;
      ids_ = other.ids_.Clone();
      appCode_ = other.appCode_;
      appMsg_ = other.appMsg_;
      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public AckCommand Clone() {
      return new AckCommand(this);
    }

    /// <summary>Field number for the "code" field.</summary>
    public const int CodeFieldNumber = 1;
    private readonly static int CodeDefaultValue = 0;

    private int code_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public int Code {
      get { if ((_hasBits0 & 1) != 0) { return code_; } else { return CodeDefaultValue; } }
      set {
        _hasBits0 |= 1;
        code_ = value;
      }
    }
    /// <summary>Gets whether the "code" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasCode {
      get { return (_hasBits0 & 1) != 0; }
    }
    /// <summary>Clears the value of the "code" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearCode() {
      _hasBits0 &= ~1;
    }

    /// <summary>Field number for the "reason" field.</summary>
    public const int ReasonFieldNumber = 2;
    private readonly static string ReasonDefaultValue = "";

    private string reason_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string Reason {
      get { return reason_ ?? ReasonDefaultValue; }
      set {
        reason_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }
    /// <summary>Gets whether the "reason" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasReason {
      get { return reason_ != null; }
    }
    /// <summary>Clears the value of the "reason" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearReason() {
      reason_ = null;
    }

    /// <summary>Field number for the "mid" field.</summary>
    public const int MidFieldNumber = 3;
    private readonly static string MidDefaultValue = "";

    private string mid_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string Mid {
      get { return mid_ ?? MidDefaultValue; }
      set {
        mid_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }
    /// <summary>Gets whether the "mid" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasMid {
      get { return mid_ != null; }
    }
    /// <summary>Clears the value of the "mid" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearMid() {
      mid_ = null;
    }

    /// <summary>Field number for the "cid" field.</summary>
    public const int CidFieldNumber = 4;
    private readonly static string CidDefaultValue = "";

    private string cid_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string Cid {
      get { return cid_ ?? CidDefaultValue; }
      set {
        cid_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }
    /// <summary>Gets whether the "cid" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasCid {
      get { return cid_ != null; }
    }
    /// <summary>Clears the value of the "cid" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearCid() {
      cid_ = null;
    }

    /// <summary>Field number for the "t" field.</summary>
    public const int TFieldNumber = 5;
    private readonly static long TDefaultValue = 0L;

    private long t_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public long T {
      get { if ((_hasBits0 & 2) != 0) { return t_; } else { return TDefaultValue; } }
      set {
        _hasBits0 |= 2;
        t_ = value;
      }
    }
    /// <summary>Gets whether the "t" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasT {
      get { return (_hasBits0 & 2) != 0; }
    }
    /// <summary>Clears the value of the "t" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearT() {
      _hasBits0 &= ~2;
    }

    /// <summary>Field number for the "uid" field.</summary>
    public const int UidFieldNumber = 6;
    private readonly static string UidDefaultValue = "";

    private string uid_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string Uid {
      get { return uid_ ?? UidDefaultValue; }
      set {
        uid_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }
    /// <summary>Gets whether the "uid" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasUid {
      get { return uid_ != null; }
    }
    /// <summary>Clears the value of the "uid" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearUid() {
      uid_ = null;
    }

    /// <summary>Field number for the "fromts" field.</summary>
    public const int FromtsFieldNumber = 7;
    private readonly static long FromtsDefaultValue = 0L;

    private long fromts_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public long Fromts {
      get { if ((_hasBits0 & 4) != 0) { return fromts_; } else { return FromtsDefaultValue; } }
      set {
        _hasBits0 |= 4;
        fromts_ = value;
      }
    }
    /// <summary>Gets whether the "fromts" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasFromts {
      get { return (_hasBits0 & 4) != 0; }
    }
    /// <summary>Clears the value of the "fromts" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearFromts() {
      _hasBits0 &= ~4;
    }

    /// <summary>Field number for the "tots" field.</summary>
    public const int TotsFieldNumber = 8;
    private readonly static long TotsDefaultValue = 0L;

    private long tots_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public long Tots {
      get { if ((_hasBits0 & 8) != 0) { return tots_; } else { return TotsDefaultValue; } }
      set {
        _hasBits0 |= 8;
        tots_ = value;
      }
    }
    /// <summary>Gets whether the "tots" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasTots {
      get { return (_hasBits0 & 8) != 0; }
    }
    /// <summary>Clears the value of the "tots" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearTots() {
      _hasBits0 &= ~8;
    }

    /// <summary>Field number for the "type" field.</summary>
    public const int TypeFieldNumber = 9;
    private readonly static string TypeDefaultValue = "";

    private string type_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string Type {
      get { return type_ ?? TypeDefaultValue; }
      set {
        type_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }
    /// <summary>Gets whether the "type" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasType {
      get { return type_ != null; }
    }
    /// <summary>Clears the value of the "type" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearType() {
      type_ = null;
    }

    /// <summary>Field number for the "ids" field.</summary>
    public const int IdsFieldNumber = 10;
    private static readonly pb::FieldCodec<string> _repeated_ids_codec
        = pb::FieldCodec.ForString(82);
    private readonly pbc::RepeatedField<string> ids_ = new pbc::RepeatedField<string>();
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public pbc::RepeatedField<string> Ids {
      get { return ids_; }
    }

    /// <summary>Field number for the "appCode" field.</summary>
    public const int AppCodeFieldNumber = 11;
    private readonly static int AppCodeDefaultValue = 0;

    private int appCode_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public int AppCode {
      get { if ((_hasBits0 & 16) != 0) { return appCode_; } else { return AppCodeDefaultValue; } }
      set {
        _hasBits0 |= 16;
        appCode_ = value;
      }
    }
    /// <summary>Gets whether the "appCode" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasAppCode {
      get { return (_hasBits0 & 16) != 0; }
    }
    /// <summary>Clears the value of the "appCode" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearAppCode() {
      _hasBits0 &= ~16;
    }

    /// <summary>Field number for the "appMsg" field.</summary>
    public const int AppMsgFieldNumber = 12;
    private readonly static string AppMsgDefaultValue = "";

    private string appMsg_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string AppMsg {
      get { return appMsg_ ?? AppMsgDefaultValue; }
      set {
        appMsg_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }
    /// <summary>Gets whether the "appMsg" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasAppMsg {
      get { return appMsg_ != null; }
    }
    /// <summary>Clears the value of the "appMsg" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearAppMsg() {
      appMsg_ = null;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override bool Equals(object other) {
      return Equals(other as AckCommand);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool Equals(AckCommand other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (Code != other.Code) return false;
      if (Reason != other.Reason) return false;
      if (Mid != other.Mid) return false;
      if (Cid != other.Cid) return false;
      if (T != other.T) return false;
      if (Uid != other.Uid) return false;
      if (Fromts != other.Fromts) return false;
      if (Tots != other.Tots) return false;
      if (Type != other.Type) return false;
      if(!ids_.Equals(other.ids_)) return false;
      if (AppCode != other.AppCode) return false;
      if (AppMsg != other.AppMsg) return false;
      return Equals(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override int GetHashCode() {
      int hash = 1;
      if (HasCode) hash ^= Code.GetHashCode();
      if (HasReason) hash ^= Reason.GetHashCode();
      if (HasMid) hash ^= Mid.GetHashCode();
      if (HasCid) hash ^= Cid.GetHashCode();
      if (HasT) hash ^= T.GetHashCode();
      if (HasUid) hash ^= Uid.GetHashCode();
      if (HasFromts) hash ^= Fromts.GetHashCode();
      if (HasTots) hash ^= Tots.GetHashCode();
      if (HasType) hash ^= Type.GetHashCode();
      hash ^= ids_.GetHashCode();
      if (HasAppCode) hash ^= AppCode.GetHashCode();
      if (HasAppMsg) hash ^= AppMsg.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 (HasCode) {
        output.WriteRawTag(8);
        output.WriteInt32(Code);
      }
      if (HasReason) {
        output.WriteRawTag(18);
        output.WriteString(Reason);
      }
      if (HasMid) {
        output.WriteRawTag(26);
        output.WriteString(Mid);
      }
      if (HasCid) {
        output.WriteRawTag(34);
        output.WriteString(Cid);
      }
      if (HasT) {
        output.WriteRawTag(40);
        output.WriteInt64(T);
      }
      if (HasUid) {
        output.WriteRawTag(50);
        output.WriteString(Uid);
      }
      if (HasFromts) {
        output.WriteRawTag(56);
        output.WriteInt64(Fromts);
      }
      if (HasTots) {
        output.WriteRawTag(64);
        output.WriteInt64(Tots);
      }
      if (HasType) {
        output.WriteRawTag(74);
        output.WriteString(Type);
      }
      ids_.WriteTo(output, _repeated_ids_codec);
      if (HasAppCode) {
        output.WriteRawTag(88);
        output.WriteInt32(AppCode);
      }
      if (HasAppMsg) {
        output.WriteRawTag(98);
        output.WriteString(AppMsg);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(output);
      }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public int CalculateSize() {
      int size = 0;
      if (HasCode) {
        size += 1 + pb::CodedOutputStream.ComputeInt32Size(Code);
      }
      if (HasReason) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(Reason);
      }
      if (HasMid) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(Mid);
      }
      if (HasCid) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(Cid);
      }
      if (HasT) {
        size += 1 + pb::CodedOutputStream.ComputeInt64Size(T);
      }
      if (HasUid) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(Uid);
      }
      if (HasFromts) {
        size += 1 + pb::CodedOutputStream.ComputeInt64Size(Fromts);
      }
      if (HasTots) {
        size += 1 + pb::CodedOutputStream.ComputeInt64Size(Tots);
      }
      if (HasType) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(Type);
      }
      size += ids_.CalculateSize(_repeated_ids_codec);
      if (HasAppCode) {
        size += 1 + pb::CodedOutputStream.ComputeInt32Size(AppCode);
      }
      if (HasAppMsg) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(AppMsg);
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void MergeFrom(AckCommand other) {
      if (other == null) {
        return;
      }
      if (other.HasCode) {
        Code = other.Code;
      }
      if (other.HasReason) {
        Reason = other.Reason;
      }
      if (other.HasMid) {
        Mid = other.Mid;
      }
      if (other.HasCid) {
        Cid = other.Cid;
      }
      if (other.HasT) {
        T = other.T;
      }
      if (other.HasUid) {
        Uid = other.Uid;
      }
      if (other.HasFromts) {
        Fromts = other.Fromts;
      }
      if (other.HasTots) {
        Tots = other.Tots;
      }
      if (other.HasType) {
        Type = other.Type;
      }
      ids_.Add(other.ids_);
      if (other.HasAppCode) {
        AppCode = other.AppCode;
      }
      if (other.HasAppMsg) {
        AppMsg = other.AppMsg;
      }
      _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: {
            Code = input.ReadInt32();
            break;
          }
          case 18: {
            Reason = input.ReadString();
            break;
          }
          case 26: {
            Mid = input.ReadString();
            break;
          }
          case 34: {
            Cid = input.ReadString();
            break;
          }
          case 40: {
            T = input.ReadInt64();
            break;
          }
          case 50: {
            Uid = input.ReadString();
            break;
          }
          case 56: {
            Fromts = input.ReadInt64();
            break;
          }
          case 64: {
            Tots = input.ReadInt64();
            break;
          }
          case 74: {
            Type = input.ReadString();
            break;
          }
          case 82: {
            ids_.AddEntriesFrom(input, _repeated_ids_codec);
            break;
          }
          case 88: {
            AppCode = input.ReadInt32();
            break;
          }
          case 98: {
            AppMsg = input.ReadString();
            break;
          }
        }
      }
    }

  }

  public sealed partial class UnreadCommand : pb::IMessage<UnreadCommand> {
    private static readonly pb::MessageParser<UnreadCommand> _parser = new pb::MessageParser<UnreadCommand>(() => new UnreadCommand());
    private pb::UnknownFieldSet _unknownFields;
    private int _hasBits0;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pb::MessageParser<UnreadCommand> Parser { get { return _parser; } }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pbr::MessageDescriptor Descriptor {
      get { return global::LeanCloud.Realtime.Internal.Protocol.Messages2ProtoReflection.Descriptor.MessageTypes[14]; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public UnreadCommand() {
      OnConstruction();
    }

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public UnreadCommand(UnreadCommand other) : this() {
      _hasBits0 = other._hasBits0;
      convs_ = other.convs_.Clone();
      notifTime_ = other.notifTime_;
      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public UnreadCommand Clone() {
      return new UnreadCommand(this);
    }

    /// <summary>Field number for the "convs" field.</summary>
    public const int ConvsFieldNumber = 1;
    private static readonly pb::FieldCodec<global::LeanCloud.Realtime.Internal.Protocol.UnreadTuple> _repeated_convs_codec
        = pb::FieldCodec.ForMessage(10, global::LeanCloud.Realtime.Internal.Protocol.UnreadTuple.Parser);
    private readonly pbc::RepeatedField<global::LeanCloud.Realtime.Internal.Protocol.UnreadTuple> convs_ = new pbc::RepeatedField<global::LeanCloud.Realtime.Internal.Protocol.UnreadTuple>();
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public pbc::RepeatedField<global::LeanCloud.Realtime.Internal.Protocol.UnreadTuple> Convs {
      get { return convs_; }
    }

    /// <summary>Field number for the "notifTime" field.</summary>
    public const int NotifTimeFieldNumber = 2;
    private readonly static long NotifTimeDefaultValue = 0L;

    private long notifTime_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public long NotifTime {
      get { if ((_hasBits0 & 1) != 0) { return notifTime_; } else { return NotifTimeDefaultValue; } }
      set {
        _hasBits0 |= 1;
        notifTime_ = value;
      }
    }
    /// <summary>Gets whether the "notifTime" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasNotifTime {
      get { return (_hasBits0 & 1) != 0; }
    }
    /// <summary>Clears the value of the "notifTime" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearNotifTime() {
      _hasBits0 &= ~1;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override bool Equals(object other) {
      return Equals(other as UnreadCommand);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool Equals(UnreadCommand other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if(!convs_.Equals(other.convs_)) return false;
      if (NotifTime != other.NotifTime) return false;
      return Equals(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override int GetHashCode() {
      int hash = 1;
      hash ^= convs_.GetHashCode();
      if (HasNotifTime) hash ^= NotifTime.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) {
      convs_.WriteTo(output, _repeated_convs_codec);
      if (HasNotifTime) {
        output.WriteRawTag(16);
        output.WriteInt64(NotifTime);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(output);
      }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public int CalculateSize() {
      int size = 0;
      size += convs_.CalculateSize(_repeated_convs_codec);
      if (HasNotifTime) {
        size += 1 + pb::CodedOutputStream.ComputeInt64Size(NotifTime);
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void MergeFrom(UnreadCommand other) {
      if (other == null) {
        return;
      }
      convs_.Add(other.convs_);
      if (other.HasNotifTime) {
        NotifTime = other.NotifTime;
      }
      _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: {
            convs_.AddEntriesFrom(input, _repeated_convs_codec);
            break;
          }
          case 16: {
            NotifTime = input.ReadInt64();
            break;
          }
        }
      }
    }

  }

  public sealed partial class ConvCommand : pb::IMessage<ConvCommand> {
    private static readonly pb::MessageParser<ConvCommand> _parser = new pb::MessageParser<ConvCommand>(() => new ConvCommand());
    private pb::UnknownFieldSet _unknownFields;
    private int _hasBits0;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pb::MessageParser<ConvCommand> Parser { get { return _parser; } }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pbr::MessageDescriptor Descriptor {
      get { return global::LeanCloud.Realtime.Internal.Protocol.Messages2ProtoReflection.Descriptor.MessageTypes[15]; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public ConvCommand() {
      OnConstruction();
    }

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public ConvCommand(ConvCommand other) : this() {
      _hasBits0 = other._hasBits0;
      m_ = other.m_.Clone();
      transient_ = other.transient_;
      unique_ = other.unique_;
      cid_ = other.cid_;
      cdate_ = other.cdate_;
      initBy_ = other.initBy_;
      sort_ = other.sort_;
      limit_ = other.limit_;
      skip_ = other.skip_;
      flag_ = other.flag_;
      count_ = other.count_;
      udate_ = other.udate_;
      t_ = other.t_;
      n_ = other.n_;
      s_ = other.s_;
      statusSub_ = other.statusSub_;
      statusPub_ = other.statusPub_;
      statusTTL_ = other.statusTTL_;
      uniqueId_ = other.uniqueId_;
      targetClientId_ = other.targetClientId_;
      maxReadTimestamp_ = other.maxReadTimestamp_;
      maxAckTimestamp_ = other.maxAckTimestamp_;
      queryAllMembers_ = other.queryAllMembers_;
      maxReadTuples_ = other.maxReadTuples_.Clone();
      cids_ = other.cids_.Clone();
      info_ = other.HasInfo ? other.info_.Clone() : null;
      tempConv_ = other.tempConv_;
      tempConvTTL_ = other.tempConvTTL_;
      tempConvIds_ = other.tempConvIds_.Clone();
      allowedPids_ = other.allowedPids_.Clone();
      failedPids_ = other.failedPids_.Clone();
      next_ = other.next_;
      results_ = other.HasResults ? other.results_.Clone() : null;
      where_ = other.HasWhere ? other.where_.Clone() : null;
      attr_ = other.HasAttr ? other.attr_.Clone() : null;
      attrModified_ = other.HasAttrModified ? other.attrModified_.Clone() : null;
      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public ConvCommand Clone() {
      return new ConvCommand(this);
    }

    /// <summary>Field number for the "m" field.</summary>
    public const int MFieldNumber = 1;
    private static readonly pb::FieldCodec<string> _repeated_m_codec
        = pb::FieldCodec.ForString(10);
    private readonly pbc::RepeatedField<string> m_ = new pbc::RepeatedField<string>();
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public pbc::RepeatedField<string> M {
      get { return m_; }
    }

    /// <summary>Field number for the "transient" field.</summary>
    public const int TransientFieldNumber = 2;
    private readonly static bool TransientDefaultValue = false;

    private bool transient_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool Transient {
      get { if ((_hasBits0 & 1) != 0) { return transient_; } else { return TransientDefaultValue; } }
      set {
        _hasBits0 |= 1;
        transient_ = value;
      }
    }
    /// <summary>Gets whether the "transient" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasTransient {
      get { return (_hasBits0 & 1) != 0; }
    }
    /// <summary>Clears the value of the "transient" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearTransient() {
      _hasBits0 &= ~1;
    }

    /// <summary>Field number for the "unique" field.</summary>
    public const int UniqueFieldNumber = 3;
    private readonly static bool UniqueDefaultValue = false;

    private bool unique_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool Unique {
      get { if ((_hasBits0 & 2) != 0) { return unique_; } else { return UniqueDefaultValue; } }
      set {
        _hasBits0 |= 2;
        unique_ = value;
      }
    }
    /// <summary>Gets whether the "unique" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasUnique {
      get { return (_hasBits0 & 2) != 0; }
    }
    /// <summary>Clears the value of the "unique" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearUnique() {
      _hasBits0 &= ~2;
    }

    /// <summary>Field number for the "cid" field.</summary>
    public const int CidFieldNumber = 4;
    private readonly static string CidDefaultValue = "";

    private string cid_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string Cid {
      get { return cid_ ?? CidDefaultValue; }
      set {
        cid_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }
    /// <summary>Gets whether the "cid" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasCid {
      get { return cid_ != null; }
    }
    /// <summary>Clears the value of the "cid" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearCid() {
      cid_ = null;
    }

    /// <summary>Field number for the "cdate" field.</summary>
    public const int CdateFieldNumber = 5;
    private readonly static string CdateDefaultValue = "";

    private string cdate_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string Cdate {
      get { return cdate_ ?? CdateDefaultValue; }
      set {
        cdate_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }
    /// <summary>Gets whether the "cdate" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasCdate {
      get { return cdate_ != null; }
    }
    /// <summary>Clears the value of the "cdate" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearCdate() {
      cdate_ = null;
    }

    /// <summary>Field number for the "initBy" field.</summary>
    public const int InitByFieldNumber = 6;
    private readonly static string InitByDefaultValue = "";

    private string initBy_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string InitBy {
      get { return initBy_ ?? InitByDefaultValue; }
      set {
        initBy_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }
    /// <summary>Gets whether the "initBy" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasInitBy {
      get { return initBy_ != null; }
    }
    /// <summary>Clears the value of the "initBy" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearInitBy() {
      initBy_ = null;
    }

    /// <summary>Field number for the "sort" field.</summary>
    public const int SortFieldNumber = 7;
    private readonly static string SortDefaultValue = "";

    private string sort_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string Sort {
      get { return sort_ ?? SortDefaultValue; }
      set {
        sort_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }
    /// <summary>Gets whether the "sort" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasSort {
      get { return sort_ != null; }
    }
    /// <summary>Clears the value of the "sort" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearSort() {
      sort_ = null;
    }

    /// <summary>Field number for the "limit" field.</summary>
    public const int LimitFieldNumber = 8;
    private readonly static int LimitDefaultValue = 0;

    private int limit_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public int Limit {
      get { if ((_hasBits0 & 4) != 0) { return limit_; } else { return LimitDefaultValue; } }
      set {
        _hasBits0 |= 4;
        limit_ = value;
      }
    }
    /// <summary>Gets whether the "limit" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasLimit {
      get { return (_hasBits0 & 4) != 0; }
    }
    /// <summary>Clears the value of the "limit" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearLimit() {
      _hasBits0 &= ~4;
    }

    /// <summary>Field number for the "skip" field.</summary>
    public const int SkipFieldNumber = 9;
    private readonly static int SkipDefaultValue = 0;

    private int skip_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public int Skip {
      get { if ((_hasBits0 & 8) != 0) { return skip_; } else { return SkipDefaultValue; } }
      set {
        _hasBits0 |= 8;
        skip_ = value;
      }
    }
    /// <summary>Gets whether the "skip" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasSkip {
      get { return (_hasBits0 & 8) != 0; }
    }
    /// <summary>Clears the value of the "skip" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearSkip() {
      _hasBits0 &= ~8;
    }

    /// <summary>Field number for the "flag" field.</summary>
    public const int FlagFieldNumber = 10;
    private readonly static int FlagDefaultValue = 0;

    private int flag_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public int Flag {
      get { if ((_hasBits0 & 16) != 0) { return flag_; } else { return FlagDefaultValue; } }
      set {
        _hasBits0 |= 16;
        flag_ = value;
      }
    }
    /// <summary>Gets whether the "flag" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasFlag {
      get { return (_hasBits0 & 16) != 0; }
    }
    /// <summary>Clears the value of the "flag" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearFlag() {
      _hasBits0 &= ~16;
    }

    /// <summary>Field number for the "count" field.</summary>
    public const int CountFieldNumber = 11;
    private readonly static int CountDefaultValue = 0;

    private int count_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public int Count {
      get { if ((_hasBits0 & 32) != 0) { return count_; } else { return CountDefaultValue; } }
      set {
        _hasBits0 |= 32;
        count_ = value;
      }
    }
    /// <summary>Gets whether the "count" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasCount {
      get { return (_hasBits0 & 32) != 0; }
    }
    /// <summary>Clears the value of the "count" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearCount() {
      _hasBits0 &= ~32;
    }

    /// <summary>Field number for the "udate" field.</summary>
    public const int UdateFieldNumber = 12;
    private readonly static string UdateDefaultValue = "";

    private string udate_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string Udate {
      get { return udate_ ?? UdateDefaultValue; }
      set {
        udate_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }
    /// <summary>Gets whether the "udate" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasUdate {
      get { return udate_ != null; }
    }
    /// <summary>Clears the value of the "udate" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearUdate() {
      udate_ = null;
    }

    /// <summary>Field number for the "t" field.</summary>
    public const int TFieldNumber = 13;
    private readonly static long TDefaultValue = 0L;

    private long t_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public long T {
      get { if ((_hasBits0 & 64) != 0) { return t_; } else { return TDefaultValue; } }
      set {
        _hasBits0 |= 64;
        t_ = value;
      }
    }
    /// <summary>Gets whether the "t" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasT {
      get { return (_hasBits0 & 64) != 0; }
    }
    /// <summary>Clears the value of the "t" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearT() {
      _hasBits0 &= ~64;
    }

    /// <summary>Field number for the "n" field.</summary>
    public const int NFieldNumber = 14;
    private readonly static string NDefaultValue = "";

    private string n_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string N {
      get { return n_ ?? NDefaultValue; }
      set {
        n_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }
    /// <summary>Gets whether the "n" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasN {
      get { return n_ != null; }
    }
    /// <summary>Clears the value of the "n" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearN() {
      n_ = null;
    }

    /// <summary>Field number for the "s" field.</summary>
    public const int SFieldNumber = 15;
    private readonly static string SDefaultValue = "";

    private string s_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string S {
      get { return s_ ?? SDefaultValue; }
      set {
        s_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }
    /// <summary>Gets whether the "s" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasS {
      get { return s_ != null; }
    }
    /// <summary>Clears the value of the "s" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearS() {
      s_ = null;
    }

    /// <summary>Field number for the "statusSub" field.</summary>
    public const int StatusSubFieldNumber = 16;
    private readonly static bool StatusSubDefaultValue = false;

    private bool statusSub_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool StatusSub {
      get { if ((_hasBits0 & 128) != 0) { return statusSub_; } else { return StatusSubDefaultValue; } }
      set {
        _hasBits0 |= 128;
        statusSub_ = value;
      }
    }
    /// <summary>Gets whether the "statusSub" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasStatusSub {
      get { return (_hasBits0 & 128) != 0; }
    }
    /// <summary>Clears the value of the "statusSub" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearStatusSub() {
      _hasBits0 &= ~128;
    }

    /// <summary>Field number for the "statusPub" field.</summary>
    public const int StatusPubFieldNumber = 17;
    private readonly static bool StatusPubDefaultValue = false;

    private bool statusPub_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool StatusPub {
      get { if ((_hasBits0 & 256) != 0) { return statusPub_; } else { return StatusPubDefaultValue; } }
      set {
        _hasBits0 |= 256;
        statusPub_ = value;
      }
    }
    /// <summary>Gets whether the "statusPub" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasStatusPub {
      get { return (_hasBits0 & 256) != 0; }
    }
    /// <summary>Clears the value of the "statusPub" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearStatusPub() {
      _hasBits0 &= ~256;
    }

    /// <summary>Field number for the "statusTTL" field.</summary>
    public const int StatusTTLFieldNumber = 18;
    private readonly static int StatusTTLDefaultValue = 0;

    private int statusTTL_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public int StatusTTL {
      get { if ((_hasBits0 & 512) != 0) { return statusTTL_; } else { return StatusTTLDefaultValue; } }
      set {
        _hasBits0 |= 512;
        statusTTL_ = value;
      }
    }
    /// <summary>Gets whether the "statusTTL" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasStatusTTL {
      get { return (_hasBits0 & 512) != 0; }
    }
    /// <summary>Clears the value of the "statusTTL" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearStatusTTL() {
      _hasBits0 &= ~512;
    }

    /// <summary>Field number for the "uniqueId" field.</summary>
    public const int UniqueIdFieldNumber = 19;
    private readonly static string UniqueIdDefaultValue = "";

    private string uniqueId_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string UniqueId {
      get { return uniqueId_ ?? UniqueIdDefaultValue; }
      set {
        uniqueId_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }
    /// <summary>Gets whether the "uniqueId" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasUniqueId {
      get { return uniqueId_ != null; }
    }
    /// <summary>Clears the value of the "uniqueId" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearUniqueId() {
      uniqueId_ = null;
    }

    /// <summary>Field number for the "targetClientId" field.</summary>
    public const int TargetClientIdFieldNumber = 20;
    private readonly static string TargetClientIdDefaultValue = "";

    private string targetClientId_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string TargetClientId {
      get { return targetClientId_ ?? TargetClientIdDefaultValue; }
      set {
        targetClientId_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }
    /// <summary>Gets whether the "targetClientId" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasTargetClientId {
      get { return targetClientId_ != null; }
    }
    /// <summary>Clears the value of the "targetClientId" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearTargetClientId() {
      targetClientId_ = null;
    }

    /// <summary>Field number for the "maxReadTimestamp" field.</summary>
    public const int MaxReadTimestampFieldNumber = 21;
    private readonly static long MaxReadTimestampDefaultValue = 0L;

    private long maxReadTimestamp_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public long MaxReadTimestamp {
      get { if ((_hasBits0 & 1024) != 0) { return maxReadTimestamp_; } else { return MaxReadTimestampDefaultValue; } }
      set {
        _hasBits0 |= 1024;
        maxReadTimestamp_ = value;
      }
    }
    /// <summary>Gets whether the "maxReadTimestamp" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasMaxReadTimestamp {
      get { return (_hasBits0 & 1024) != 0; }
    }
    /// <summary>Clears the value of the "maxReadTimestamp" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearMaxReadTimestamp() {
      _hasBits0 &= ~1024;
    }

    /// <summary>Field number for the "maxAckTimestamp" field.</summary>
    public const int MaxAckTimestampFieldNumber = 22;
    private readonly static long MaxAckTimestampDefaultValue = 0L;

    private long maxAckTimestamp_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public long MaxAckTimestamp {
      get { if ((_hasBits0 & 2048) != 0) { return maxAckTimestamp_; } else { return MaxAckTimestampDefaultValue; } }
      set {
        _hasBits0 |= 2048;
        maxAckTimestamp_ = value;
      }
    }
    /// <summary>Gets whether the "maxAckTimestamp" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasMaxAckTimestamp {
      get { return (_hasBits0 & 2048) != 0; }
    }
    /// <summary>Clears the value of the "maxAckTimestamp" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearMaxAckTimestamp() {
      _hasBits0 &= ~2048;
    }

    /// <summary>Field number for the "queryAllMembers" field.</summary>
    public const int QueryAllMembersFieldNumber = 23;
    private readonly static bool QueryAllMembersDefaultValue = false;

    private bool queryAllMembers_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool QueryAllMembers {
      get { if ((_hasBits0 & 4096) != 0) { return queryAllMembers_; } else { return QueryAllMembersDefaultValue; } }
      set {
        _hasBits0 |= 4096;
        queryAllMembers_ = value;
      }
    }
    /// <summary>Gets whether the "queryAllMembers" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasQueryAllMembers {
      get { return (_hasBits0 & 4096) != 0; }
    }
    /// <summary>Clears the value of the "queryAllMembers" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearQueryAllMembers() {
      _hasBits0 &= ~4096;
    }

    /// <summary>Field number for the "maxReadTuples" field.</summary>
    public const int MaxReadTuplesFieldNumber = 24;
    private static readonly pb::FieldCodec<global::LeanCloud.Realtime.Internal.Protocol.MaxReadTuple> _repeated_maxReadTuples_codec
        = pb::FieldCodec.ForMessage(194, global::LeanCloud.Realtime.Internal.Protocol.MaxReadTuple.Parser);
    private readonly pbc::RepeatedField<global::LeanCloud.Realtime.Internal.Protocol.MaxReadTuple> maxReadTuples_ = new pbc::RepeatedField<global::LeanCloud.Realtime.Internal.Protocol.MaxReadTuple>();
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public pbc::RepeatedField<global::LeanCloud.Realtime.Internal.Protocol.MaxReadTuple> MaxReadTuples {
      get { return maxReadTuples_; }
    }

    /// <summary>Field number for the "cids" field.</summary>
    public const int CidsFieldNumber = 25;
    private static readonly pb::FieldCodec<string> _repeated_cids_codec
        = pb::FieldCodec.ForString(202);
    private readonly pbc::RepeatedField<string> cids_ = new pbc::RepeatedField<string>();
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public pbc::RepeatedField<string> Cids {
      get { return cids_; }
    }

    /// <summary>Field number for the "info" field.</summary>
    public const int InfoFieldNumber = 26;
    private global::LeanCloud.Realtime.Internal.Protocol.ConvMemberInfo info_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public global::LeanCloud.Realtime.Internal.Protocol.ConvMemberInfo Info {
      get { return info_; }
      set {
        info_ = value;
      }
    }
    /// <summary>Gets whether the info field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasInfo {
      get { return info_ != null; }
    }
    /// <summary>Clears the value of the info field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearInfo() {
      info_ = null;
    }

    /// <summary>Field number for the "tempConv" field.</summary>
    public const int TempConvFieldNumber = 27;
    private readonly static bool TempConvDefaultValue = false;

    private bool tempConv_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool TempConv {
      get { if ((_hasBits0 & 8192) != 0) { return tempConv_; } else { return TempConvDefaultValue; } }
      set {
        _hasBits0 |= 8192;
        tempConv_ = value;
      }
    }
    /// <summary>Gets whether the "tempConv" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasTempConv {
      get { return (_hasBits0 & 8192) != 0; }
    }
    /// <summary>Clears the value of the "tempConv" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearTempConv() {
      _hasBits0 &= ~8192;
    }

    /// <summary>Field number for the "tempConvTTL" field.</summary>
    public const int TempConvTTLFieldNumber = 28;
    private readonly static int TempConvTTLDefaultValue = 0;

    private int tempConvTTL_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public int TempConvTTL {
      get { if ((_hasBits0 & 16384) != 0) { return tempConvTTL_; } else { return TempConvTTLDefaultValue; } }
      set {
        _hasBits0 |= 16384;
        tempConvTTL_ = value;
      }
    }
    /// <summary>Gets whether the "tempConvTTL" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasTempConvTTL {
      get { return (_hasBits0 & 16384) != 0; }
    }
    /// <summary>Clears the value of the "tempConvTTL" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearTempConvTTL() {
      _hasBits0 &= ~16384;
    }

    /// <summary>Field number for the "tempConvIds" field.</summary>
    public const int TempConvIdsFieldNumber = 29;
    private static readonly pb::FieldCodec<string> _repeated_tempConvIds_codec
        = pb::FieldCodec.ForString(234);
    private readonly pbc::RepeatedField<string> tempConvIds_ = new pbc::RepeatedField<string>();
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public pbc::RepeatedField<string> TempConvIds {
      get { return tempConvIds_; }
    }

    /// <summary>Field number for the "allowedPids" field.</summary>
    public const int AllowedPidsFieldNumber = 30;
    private static readonly pb::FieldCodec<string> _repeated_allowedPids_codec
        = pb::FieldCodec.ForString(242);
    private readonly pbc::RepeatedField<string> allowedPids_ = new pbc::RepeatedField<string>();
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public pbc::RepeatedField<string> AllowedPids {
      get { return allowedPids_; }
    }

    /// <summary>Field number for the "failedPids" field.</summary>
    public const int FailedPidsFieldNumber = 31;
    private static readonly pb::FieldCodec<global::LeanCloud.Realtime.Internal.Protocol.ErrorCommand> _repeated_failedPids_codec
        = pb::FieldCodec.ForMessage(250, global::LeanCloud.Realtime.Internal.Protocol.ErrorCommand.Parser);
    private readonly pbc::RepeatedField<global::LeanCloud.Realtime.Internal.Protocol.ErrorCommand> failedPids_ = new pbc::RepeatedField<global::LeanCloud.Realtime.Internal.Protocol.ErrorCommand>();
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public pbc::RepeatedField<global::LeanCloud.Realtime.Internal.Protocol.ErrorCommand> FailedPids {
      get { return failedPids_; }
    }

    /// <summary>Field number for the "next" field.</summary>
    public const int NextFieldNumber = 40;
    private readonly static string NextDefaultValue = "";

    private string next_;
    /// <summary>
    /// used in shutup query
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string Next {
      get { return next_ ?? NextDefaultValue; }
      set {
        next_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }
    /// <summary>Gets whether the "next" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasNext {
      get { return next_ != null; }
    }
    /// <summary>Clears the value of the "next" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearNext() {
      next_ = null;
    }

    /// <summary>Field number for the "results" field.</summary>
    public const int ResultsFieldNumber = 100;
    private global::LeanCloud.Realtime.Internal.Protocol.JsonObjectMessage results_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public global::LeanCloud.Realtime.Internal.Protocol.JsonObjectMessage Results {
      get { return results_; }
      set {
        results_ = value;
      }
    }
    /// <summary>Gets whether the results field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasResults {
      get { return results_ != null; }
    }
    /// <summary>Clears the value of the results field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearResults() {
      results_ = null;
    }

    /// <summary>Field number for the "where" field.</summary>
    public const int WhereFieldNumber = 101;
    private global::LeanCloud.Realtime.Internal.Protocol.JsonObjectMessage where_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public global::LeanCloud.Realtime.Internal.Protocol.JsonObjectMessage Where {
      get { return where_; }
      set {
        where_ = value;
      }
    }
    /// <summary>Gets whether the where field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasWhere {
      get { return where_ != null; }
    }
    /// <summary>Clears the value of the where field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearWhere() {
      where_ = null;
    }

    /// <summary>Field number for the "attr" field.</summary>
    public const int AttrFieldNumber = 103;
    private global::LeanCloud.Realtime.Internal.Protocol.JsonObjectMessage attr_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public global::LeanCloud.Realtime.Internal.Protocol.JsonObjectMessage Attr {
      get { return attr_; }
      set {
        attr_ = value;
      }
    }
    /// <summary>Gets whether the attr field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasAttr {
      get { return attr_ != null; }
    }
    /// <summary>Clears the value of the attr field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearAttr() {
      attr_ = null;
    }

    /// <summary>Field number for the "attrModified" field.</summary>
    public const int AttrModifiedFieldNumber = 104;
    private global::LeanCloud.Realtime.Internal.Protocol.JsonObjectMessage attrModified_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public global::LeanCloud.Realtime.Internal.Protocol.JsonObjectMessage AttrModified {
      get { return attrModified_; }
      set {
        attrModified_ = value;
      }
    }
    /// <summary>Gets whether the attrModified field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasAttrModified {
      get { return attrModified_ != null; }
    }
    /// <summary>Clears the value of the attrModified field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearAttrModified() {
      attrModified_ = null;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override bool Equals(object other) {
      return Equals(other as ConvCommand);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool Equals(ConvCommand other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if(!m_.Equals(other.m_)) return false;
      if (Transient != other.Transient) return false;
      if (Unique != other.Unique) return false;
      if (Cid != other.Cid) return false;
      if (Cdate != other.Cdate) return false;
      if (InitBy != other.InitBy) return false;
      if (Sort != other.Sort) return false;
      if (Limit != other.Limit) return false;
      if (Skip != other.Skip) return false;
      if (Flag != other.Flag) return false;
      if (Count != other.Count) return false;
      if (Udate != other.Udate) return false;
      if (T != other.T) return false;
      if (N != other.N) return false;
      if (S != other.S) return false;
      if (StatusSub != other.StatusSub) return false;
      if (StatusPub != other.StatusPub) return false;
      if (StatusTTL != other.StatusTTL) return false;
      if (UniqueId != other.UniqueId) return false;
      if (TargetClientId != other.TargetClientId) return false;
      if (MaxReadTimestamp != other.MaxReadTimestamp) return false;
      if (MaxAckTimestamp != other.MaxAckTimestamp) return false;
      if (QueryAllMembers != other.QueryAllMembers) return false;
      if(!maxReadTuples_.Equals(other.maxReadTuples_)) return false;
      if(!cids_.Equals(other.cids_)) return false;
      if (!object.Equals(Info, other.Info)) return false;
      if (TempConv != other.TempConv) return false;
      if (TempConvTTL != other.TempConvTTL) return false;
      if(!tempConvIds_.Equals(other.tempConvIds_)) return false;
      if(!allowedPids_.Equals(other.allowedPids_)) return false;
      if(!failedPids_.Equals(other.failedPids_)) return false;
      if (Next != other.Next) return false;
      if (!object.Equals(Results, other.Results)) return false;
      if (!object.Equals(Where, other.Where)) return false;
      if (!object.Equals(Attr, other.Attr)) return false;
      if (!object.Equals(AttrModified, other.AttrModified)) return false;
      return Equals(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override int GetHashCode() {
      int hash = 1;
      hash ^= m_.GetHashCode();
      if (HasTransient) hash ^= Transient.GetHashCode();
      if (HasUnique) hash ^= Unique.GetHashCode();
      if (HasCid) hash ^= Cid.GetHashCode();
      if (HasCdate) hash ^= Cdate.GetHashCode();
      if (HasInitBy) hash ^= InitBy.GetHashCode();
      if (HasSort) hash ^= Sort.GetHashCode();
      if (HasLimit) hash ^= Limit.GetHashCode();
      if (HasSkip) hash ^= Skip.GetHashCode();
      if (HasFlag) hash ^= Flag.GetHashCode();
      if (HasCount) hash ^= Count.GetHashCode();
      if (HasUdate) hash ^= Udate.GetHashCode();
      if (HasT) hash ^= T.GetHashCode();
      if (HasN) hash ^= N.GetHashCode();
      if (HasS) hash ^= S.GetHashCode();
      if (HasStatusSub) hash ^= StatusSub.GetHashCode();
      if (HasStatusPub) hash ^= StatusPub.GetHashCode();
      if (HasStatusTTL) hash ^= StatusTTL.GetHashCode();
      if (HasUniqueId) hash ^= UniqueId.GetHashCode();
      if (HasTargetClientId) hash ^= TargetClientId.GetHashCode();
      if (HasMaxReadTimestamp) hash ^= MaxReadTimestamp.GetHashCode();
      if (HasMaxAckTimestamp) hash ^= MaxAckTimestamp.GetHashCode();
      if (HasQueryAllMembers) hash ^= QueryAllMembers.GetHashCode();
      hash ^= maxReadTuples_.GetHashCode();
      hash ^= cids_.GetHashCode();
      if (HasInfo) hash ^= Info.GetHashCode();
      if (HasTempConv) hash ^= TempConv.GetHashCode();
      if (HasTempConvTTL) hash ^= TempConvTTL.GetHashCode();
      hash ^= tempConvIds_.GetHashCode();
      hash ^= allowedPids_.GetHashCode();
      hash ^= failedPids_.GetHashCode();
      if (HasNext) hash ^= Next.GetHashCode();
      if (HasResults) hash ^= Results.GetHashCode();
      if (HasWhere) hash ^= Where.GetHashCode();
      if (HasAttr) hash ^= Attr.GetHashCode();
      if (HasAttrModified) hash ^= AttrModified.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) {
      m_.WriteTo(output, _repeated_m_codec);
      if (HasTransient) {
        output.WriteRawTag(16);
        output.WriteBool(Transient);
      }
      if (HasUnique) {
        output.WriteRawTag(24);
        output.WriteBool(Unique);
      }
      if (HasCid) {
        output.WriteRawTag(34);
        output.WriteString(Cid);
      }
      if (HasCdate) {
        output.WriteRawTag(42);
        output.WriteString(Cdate);
      }
      if (HasInitBy) {
        output.WriteRawTag(50);
        output.WriteString(InitBy);
      }
      if (HasSort) {
        output.WriteRawTag(58);
        output.WriteString(Sort);
      }
      if (HasLimit) {
        output.WriteRawTag(64);
        output.WriteInt32(Limit);
      }
      if (HasSkip) {
        output.WriteRawTag(72);
        output.WriteInt32(Skip);
      }
      if (HasFlag) {
        output.WriteRawTag(80);
        output.WriteInt32(Flag);
      }
      if (HasCount) {
        output.WriteRawTag(88);
        output.WriteInt32(Count);
      }
      if (HasUdate) {
        output.WriteRawTag(98);
        output.WriteString(Udate);
      }
      if (HasT) {
        output.WriteRawTag(104);
        output.WriteInt64(T);
      }
      if (HasN) {
        output.WriteRawTag(114);
        output.WriteString(N);
      }
      if (HasS) {
        output.WriteRawTag(122);
        output.WriteString(S);
      }
      if (HasStatusSub) {
        output.WriteRawTag(128, 1);
        output.WriteBool(StatusSub);
      }
      if (HasStatusPub) {
        output.WriteRawTag(136, 1);
        output.WriteBool(StatusPub);
      }
      if (HasStatusTTL) {
        output.WriteRawTag(144, 1);
        output.WriteInt32(StatusTTL);
      }
      if (HasUniqueId) {
        output.WriteRawTag(154, 1);
        output.WriteString(UniqueId);
      }
      if (HasTargetClientId) {
        output.WriteRawTag(162, 1);
        output.WriteString(TargetClientId);
      }
      if (HasMaxReadTimestamp) {
        output.WriteRawTag(168, 1);
        output.WriteInt64(MaxReadTimestamp);
      }
      if (HasMaxAckTimestamp) {
        output.WriteRawTag(176, 1);
        output.WriteInt64(MaxAckTimestamp);
      }
      if (HasQueryAllMembers) {
        output.WriteRawTag(184, 1);
        output.WriteBool(QueryAllMembers);
      }
      maxReadTuples_.WriteTo(output, _repeated_maxReadTuples_codec);
      cids_.WriteTo(output, _repeated_cids_codec);
      if (HasInfo) {
        output.WriteRawTag(210, 1);
        output.WriteMessage(Info);
      }
      if (HasTempConv) {
        output.WriteRawTag(216, 1);
        output.WriteBool(TempConv);
      }
      if (HasTempConvTTL) {
        output.WriteRawTag(224, 1);
        output.WriteInt32(TempConvTTL);
      }
      tempConvIds_.WriteTo(output, _repeated_tempConvIds_codec);
      allowedPids_.WriteTo(output, _repeated_allowedPids_codec);
      failedPids_.WriteTo(output, _repeated_failedPids_codec);
      if (HasNext) {
        output.WriteRawTag(194, 2);
        output.WriteString(Next);
      }
      if (HasResults) {
        output.WriteRawTag(162, 6);
        output.WriteMessage(Results);
      }
      if (HasWhere) {
        output.WriteRawTag(170, 6);
        output.WriteMessage(Where);
      }
      if (HasAttr) {
        output.WriteRawTag(186, 6);
        output.WriteMessage(Attr);
      }
      if (HasAttrModified) {
        output.WriteRawTag(194, 6);
        output.WriteMessage(AttrModified);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(output);
      }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public int CalculateSize() {
      int size = 0;
      size += m_.CalculateSize(_repeated_m_codec);
      if (HasTransient) {
        size += 1 + 1;
      }
      if (HasUnique) {
        size += 1 + 1;
      }
      if (HasCid) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(Cid);
      }
      if (HasCdate) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(Cdate);
      }
      if (HasInitBy) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(InitBy);
      }
      if (HasSort) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(Sort);
      }
      if (HasLimit) {
        size += 1 + pb::CodedOutputStream.ComputeInt32Size(Limit);
      }
      if (HasSkip) {
        size += 1 + pb::CodedOutputStream.ComputeInt32Size(Skip);
      }
      if (HasFlag) {
        size += 1 + pb::CodedOutputStream.ComputeInt32Size(Flag);
      }
      if (HasCount) {
        size += 1 + pb::CodedOutputStream.ComputeInt32Size(Count);
      }
      if (HasUdate) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(Udate);
      }
      if (HasT) {
        size += 1 + pb::CodedOutputStream.ComputeInt64Size(T);
      }
      if (HasN) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(N);
      }
      if (HasS) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(S);
      }
      if (HasStatusSub) {
        size += 2 + 1;
      }
      if (HasStatusPub) {
        size += 2 + 1;
      }
      if (HasStatusTTL) {
        size += 2 + pb::CodedOutputStream.ComputeInt32Size(StatusTTL);
      }
      if (HasUniqueId) {
        size += 2 + pb::CodedOutputStream.ComputeStringSize(UniqueId);
      }
      if (HasTargetClientId) {
        size += 2 + pb::CodedOutputStream.ComputeStringSize(TargetClientId);
      }
      if (HasMaxReadTimestamp) {
        size += 2 + pb::CodedOutputStream.ComputeInt64Size(MaxReadTimestamp);
      }
      if (HasMaxAckTimestamp) {
        size += 2 + pb::CodedOutputStream.ComputeInt64Size(MaxAckTimestamp);
      }
      if (HasQueryAllMembers) {
        size += 2 + 1;
      }
      size += maxReadTuples_.CalculateSize(_repeated_maxReadTuples_codec);
      size += cids_.CalculateSize(_repeated_cids_codec);
      if (HasInfo) {
        size += 2 + pb::CodedOutputStream.ComputeMessageSize(Info);
      }
      if (HasTempConv) {
        size += 2 + 1;
      }
      if (HasTempConvTTL) {
        size += 2 + pb::CodedOutputStream.ComputeInt32Size(TempConvTTL);
      }
      size += tempConvIds_.CalculateSize(_repeated_tempConvIds_codec);
      size += allowedPids_.CalculateSize(_repeated_allowedPids_codec);
      size += failedPids_.CalculateSize(_repeated_failedPids_codec);
      if (HasNext) {
        size += 2 + pb::CodedOutputStream.ComputeStringSize(Next);
      }
      if (HasResults) {
        size += 2 + pb::CodedOutputStream.ComputeMessageSize(Results);
      }
      if (HasWhere) {
        size += 2 + pb::CodedOutputStream.ComputeMessageSize(Where);
      }
      if (HasAttr) {
        size += 2 + pb::CodedOutputStream.ComputeMessageSize(Attr);
      }
      if (HasAttrModified) {
        size += 2 + pb::CodedOutputStream.ComputeMessageSize(AttrModified);
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void MergeFrom(ConvCommand other) {
      if (other == null) {
        return;
      }
      m_.Add(other.m_);
      if (other.HasTransient) {
        Transient = other.Transient;
      }
      if (other.HasUnique) {
        Unique = other.Unique;
      }
      if (other.HasCid) {
        Cid = other.Cid;
      }
      if (other.HasCdate) {
        Cdate = other.Cdate;
      }
      if (other.HasInitBy) {
        InitBy = other.InitBy;
      }
      if (other.HasSort) {
        Sort = other.Sort;
      }
      if (other.HasLimit) {
        Limit = other.Limit;
      }
      if (other.HasSkip) {
        Skip = other.Skip;
      }
      if (other.HasFlag) {
        Flag = other.Flag;
      }
      if (other.HasCount) {
        Count = other.Count;
      }
      if (other.HasUdate) {
        Udate = other.Udate;
      }
      if (other.HasT) {
        T = other.T;
      }
      if (other.HasN) {
        N = other.N;
      }
      if (other.HasS) {
        S = other.S;
      }
      if (other.HasStatusSub) {
        StatusSub = other.StatusSub;
      }
      if (other.HasStatusPub) {
        StatusPub = other.StatusPub;
      }
      if (other.HasStatusTTL) {
        StatusTTL = other.StatusTTL;
      }
      if (other.HasUniqueId) {
        UniqueId = other.UniqueId;
      }
      if (other.HasTargetClientId) {
        TargetClientId = other.TargetClientId;
      }
      if (other.HasMaxReadTimestamp) {
        MaxReadTimestamp = other.MaxReadTimestamp;
      }
      if (other.HasMaxAckTimestamp) {
        MaxAckTimestamp = other.MaxAckTimestamp;
      }
      if (other.HasQueryAllMembers) {
        QueryAllMembers = other.QueryAllMembers;
      }
      maxReadTuples_.Add(other.maxReadTuples_);
      cids_.Add(other.cids_);
      if (other.HasInfo) {
        if (!HasInfo) {
          Info = new global::LeanCloud.Realtime.Internal.Protocol.ConvMemberInfo();
        }
        Info.MergeFrom(other.Info);
      }
      if (other.HasTempConv) {
        TempConv = other.TempConv;
      }
      if (other.HasTempConvTTL) {
        TempConvTTL = other.TempConvTTL;
      }
      tempConvIds_.Add(other.tempConvIds_);
      allowedPids_.Add(other.allowedPids_);
      failedPids_.Add(other.failedPids_);
      if (other.HasNext) {
        Next = other.Next;
      }
      if (other.HasResults) {
        if (!HasResults) {
          Results = new global::LeanCloud.Realtime.Internal.Protocol.JsonObjectMessage();
        }
        Results.MergeFrom(other.Results);
      }
      if (other.HasWhere) {
        if (!HasWhere) {
          Where = new global::LeanCloud.Realtime.Internal.Protocol.JsonObjectMessage();
        }
        Where.MergeFrom(other.Where);
      }
      if (other.HasAttr) {
        if (!HasAttr) {
          Attr = new global::LeanCloud.Realtime.Internal.Protocol.JsonObjectMessage();
        }
        Attr.MergeFrom(other.Attr);
      }
      if (other.HasAttrModified) {
        if (!HasAttrModified) {
          AttrModified = new global::LeanCloud.Realtime.Internal.Protocol.JsonObjectMessage();
        }
        AttrModified.MergeFrom(other.AttrModified);
      }
      _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: {
            m_.AddEntriesFrom(input, _repeated_m_codec);
            break;
          }
          case 16: {
            Transient = input.ReadBool();
            break;
          }
          case 24: {
            Unique = input.ReadBool();
            break;
          }
          case 34: {
            Cid = input.ReadString();
            break;
          }
          case 42: {
            Cdate = input.ReadString();
            break;
          }
          case 50: {
            InitBy = input.ReadString();
            break;
          }
          case 58: {
            Sort = input.ReadString();
            break;
          }
          case 64: {
            Limit = input.ReadInt32();
            break;
          }
          case 72: {
            Skip = input.ReadInt32();
            break;
          }
          case 80: {
            Flag = input.ReadInt32();
            break;
          }
          case 88: {
            Count = input.ReadInt32();
            break;
          }
          case 98: {
            Udate = input.ReadString();
            break;
          }
          case 104: {
            T = input.ReadInt64();
            break;
          }
          case 114: {
            N = input.ReadString();
            break;
          }
          case 122: {
            S = input.ReadString();
            break;
          }
          case 128: {
            StatusSub = input.ReadBool();
            break;
          }
          case 136: {
            StatusPub = input.ReadBool();
            break;
          }
          case 144: {
            StatusTTL = input.ReadInt32();
            break;
          }
          case 154: {
            UniqueId = input.ReadString();
            break;
          }
          case 162: {
            TargetClientId = input.ReadString();
            break;
          }
          case 168: {
            MaxReadTimestamp = input.ReadInt64();
            break;
          }
          case 176: {
            MaxAckTimestamp = input.ReadInt64();
            break;
          }
          case 184: {
            QueryAllMembers = input.ReadBool();
            break;
          }
          case 194: {
            maxReadTuples_.AddEntriesFrom(input, _repeated_maxReadTuples_codec);
            break;
          }
          case 202: {
            cids_.AddEntriesFrom(input, _repeated_cids_codec);
            break;
          }
          case 210: {
            if (!HasInfo) {
              Info = new global::LeanCloud.Realtime.Internal.Protocol.ConvMemberInfo();
            }
            input.ReadMessage(Info);
            break;
          }
          case 216: {
            TempConv = input.ReadBool();
            break;
          }
          case 224: {
            TempConvTTL = input.ReadInt32();
            break;
          }
          case 234: {
            tempConvIds_.AddEntriesFrom(input, _repeated_tempConvIds_codec);
            break;
          }
          case 242: {
            allowedPids_.AddEntriesFrom(input, _repeated_allowedPids_codec);
            break;
          }
          case 250: {
            failedPids_.AddEntriesFrom(input, _repeated_failedPids_codec);
            break;
          }
          case 322: {
            Next = input.ReadString();
            break;
          }
          case 802: {
            if (!HasResults) {
              Results = new global::LeanCloud.Realtime.Internal.Protocol.JsonObjectMessage();
            }
            input.ReadMessage(Results);
            break;
          }
          case 810: {
            if (!HasWhere) {
              Where = new global::LeanCloud.Realtime.Internal.Protocol.JsonObjectMessage();
            }
            input.ReadMessage(Where);
            break;
          }
          case 826: {
            if (!HasAttr) {
              Attr = new global::LeanCloud.Realtime.Internal.Protocol.JsonObjectMessage();
            }
            input.ReadMessage(Attr);
            break;
          }
          case 834: {
            if (!HasAttrModified) {
              AttrModified = new global::LeanCloud.Realtime.Internal.Protocol.JsonObjectMessage();
            }
            input.ReadMessage(AttrModified);
            break;
          }
        }
      }
    }

  }

  public sealed partial class RoomCommand : pb::IMessage<RoomCommand> {
    private static readonly pb::MessageParser<RoomCommand> _parser = new pb::MessageParser<RoomCommand>(() => new RoomCommand());
    private pb::UnknownFieldSet _unknownFields;
    private int _hasBits0;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pb::MessageParser<RoomCommand> Parser { get { return _parser; } }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pbr::MessageDescriptor Descriptor {
      get { return global::LeanCloud.Realtime.Internal.Protocol.Messages2ProtoReflection.Descriptor.MessageTypes[16]; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public RoomCommand() {
      OnConstruction();
    }

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public RoomCommand(RoomCommand other) : this() {
      _hasBits0 = other._hasBits0;
      roomId_ = other.roomId_;
      s_ = other.s_;
      t_ = other.t_;
      n_ = other.n_;
      transient_ = other.transient_;
      roomPeerIds_ = other.roomPeerIds_.Clone();
      byPeerId_ = other.byPeerId_;
      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public RoomCommand Clone() {
      return new RoomCommand(this);
    }

    /// <summary>Field number for the "roomId" field.</summary>
    public const int RoomIdFieldNumber = 1;
    private readonly static string RoomIdDefaultValue = "";

    private string roomId_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string RoomId {
      get { return roomId_ ?? RoomIdDefaultValue; }
      set {
        roomId_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }
    /// <summary>Gets whether the "roomId" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasRoomId {
      get { return roomId_ != null; }
    }
    /// <summary>Clears the value of the "roomId" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearRoomId() {
      roomId_ = null;
    }

    /// <summary>Field number for the "s" field.</summary>
    public const int SFieldNumber = 2;
    private readonly static string SDefaultValue = "";

    private string s_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string S {
      get { return s_ ?? SDefaultValue; }
      set {
        s_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }
    /// <summary>Gets whether the "s" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasS {
      get { return s_ != null; }
    }
    /// <summary>Clears the value of the "s" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearS() {
      s_ = null;
    }

    /// <summary>Field number for the "t" field.</summary>
    public const int TFieldNumber = 3;
    private readonly static long TDefaultValue = 0L;

    private long t_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public long T {
      get { if ((_hasBits0 & 1) != 0) { return t_; } else { return TDefaultValue; } }
      set {
        _hasBits0 |= 1;
        t_ = value;
      }
    }
    /// <summary>Gets whether the "t" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasT {
      get { return (_hasBits0 & 1) != 0; }
    }
    /// <summary>Clears the value of the "t" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearT() {
      _hasBits0 &= ~1;
    }

    /// <summary>Field number for the "n" field.</summary>
    public const int NFieldNumber = 4;
    private readonly static string NDefaultValue = "";

    private string n_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string N {
      get { return n_ ?? NDefaultValue; }
      set {
        n_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }
    /// <summary>Gets whether the "n" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasN {
      get { return n_ != null; }
    }
    /// <summary>Clears the value of the "n" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearN() {
      n_ = null;
    }

    /// <summary>Field number for the "transient" field.</summary>
    public const int TransientFieldNumber = 5;
    private readonly static bool TransientDefaultValue = false;

    private bool transient_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool Transient {
      get { if ((_hasBits0 & 2) != 0) { return transient_; } else { return TransientDefaultValue; } }
      set {
        _hasBits0 |= 2;
        transient_ = value;
      }
    }
    /// <summary>Gets whether the "transient" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasTransient {
      get { return (_hasBits0 & 2) != 0; }
    }
    /// <summary>Clears the value of the "transient" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearTransient() {
      _hasBits0 &= ~2;
    }

    /// <summary>Field number for the "roomPeerIds" field.</summary>
    public const int RoomPeerIdsFieldNumber = 6;
    private static readonly pb::FieldCodec<string> _repeated_roomPeerIds_codec
        = pb::FieldCodec.ForString(50);
    private readonly pbc::RepeatedField<string> roomPeerIds_ = new pbc::RepeatedField<string>();
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public pbc::RepeatedField<string> RoomPeerIds {
      get { return roomPeerIds_; }
    }

    /// <summary>Field number for the "byPeerId" field.</summary>
    public const int ByPeerIdFieldNumber = 7;
    private readonly static string ByPeerIdDefaultValue = "";

    private string byPeerId_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string ByPeerId {
      get { return byPeerId_ ?? ByPeerIdDefaultValue; }
      set {
        byPeerId_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }
    /// <summary>Gets whether the "byPeerId" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasByPeerId {
      get { return byPeerId_ != null; }
    }
    /// <summary>Clears the value of the "byPeerId" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearByPeerId() {
      byPeerId_ = null;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override bool Equals(object other) {
      return Equals(other as RoomCommand);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool Equals(RoomCommand other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (RoomId != other.RoomId) return false;
      if (S != other.S) return false;
      if (T != other.T) return false;
      if (N != other.N) return false;
      if (Transient != other.Transient) return false;
      if(!roomPeerIds_.Equals(other.roomPeerIds_)) return false;
      if (ByPeerId != other.ByPeerId) return false;
      return Equals(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override int GetHashCode() {
      int hash = 1;
      if (HasRoomId) hash ^= RoomId.GetHashCode();
      if (HasS) hash ^= S.GetHashCode();
      if (HasT) hash ^= T.GetHashCode();
      if (HasN) hash ^= N.GetHashCode();
      if (HasTransient) hash ^= Transient.GetHashCode();
      hash ^= roomPeerIds_.GetHashCode();
      if (HasByPeerId) hash ^= ByPeerId.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 (HasRoomId) {
        output.WriteRawTag(10);
        output.WriteString(RoomId);
      }
      if (HasS) {
        output.WriteRawTag(18);
        output.WriteString(S);
      }
      if (HasT) {
        output.WriteRawTag(24);
        output.WriteInt64(T);
      }
      if (HasN) {
        output.WriteRawTag(34);
        output.WriteString(N);
      }
      if (HasTransient) {
        output.WriteRawTag(40);
        output.WriteBool(Transient);
      }
      roomPeerIds_.WriteTo(output, _repeated_roomPeerIds_codec);
      if (HasByPeerId) {
        output.WriteRawTag(58);
        output.WriteString(ByPeerId);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(output);
      }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public int CalculateSize() {
      int size = 0;
      if (HasRoomId) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(RoomId);
      }
      if (HasS) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(S);
      }
      if (HasT) {
        size += 1 + pb::CodedOutputStream.ComputeInt64Size(T);
      }
      if (HasN) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(N);
      }
      if (HasTransient) {
        size += 1 + 1;
      }
      size += roomPeerIds_.CalculateSize(_repeated_roomPeerIds_codec);
      if (HasByPeerId) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(ByPeerId);
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void MergeFrom(RoomCommand other) {
      if (other == null) {
        return;
      }
      if (other.HasRoomId) {
        RoomId = other.RoomId;
      }
      if (other.HasS) {
        S = other.S;
      }
      if (other.HasT) {
        T = other.T;
      }
      if (other.HasN) {
        N = other.N;
      }
      if (other.HasTransient) {
        Transient = other.Transient;
      }
      roomPeerIds_.Add(other.roomPeerIds_);
      if (other.HasByPeerId) {
        ByPeerId = other.ByPeerId;
      }
      _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: {
            RoomId = input.ReadString();
            break;
          }
          case 18: {
            S = input.ReadString();
            break;
          }
          case 24: {
            T = input.ReadInt64();
            break;
          }
          case 34: {
            N = input.ReadString();
            break;
          }
          case 40: {
            Transient = input.ReadBool();
            break;
          }
          case 50: {
            roomPeerIds_.AddEntriesFrom(input, _repeated_roomPeerIds_codec);
            break;
          }
          case 58: {
            ByPeerId = input.ReadString();
            break;
          }
        }
      }
    }

  }

  public sealed partial class LogsCommand : pb::IMessage<LogsCommand> {
    private static readonly pb::MessageParser<LogsCommand> _parser = new pb::MessageParser<LogsCommand>(() => new LogsCommand());
    private pb::UnknownFieldSet _unknownFields;
    private int _hasBits0;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pb::MessageParser<LogsCommand> Parser { get { return _parser; } }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pbr::MessageDescriptor Descriptor {
      get { return global::LeanCloud.Realtime.Internal.Protocol.Messages2ProtoReflection.Descriptor.MessageTypes[17]; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public LogsCommand() {
      OnConstruction();
    }

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public LogsCommand(LogsCommand other) : this() {
      _hasBits0 = other._hasBits0;
      cid_ = other.cid_;
      l_ = other.l_;
      limit_ = other.limit_;
      t_ = other.t_;
      tt_ = other.tt_;
      tmid_ = other.tmid_;
      mid_ = other.mid_;
      checksum_ = other.checksum_;
      stored_ = other.stored_;
      direction_ = other.direction_;
      tIncluded_ = other.tIncluded_;
      ttIncluded_ = other.ttIncluded_;
      lctype_ = other.lctype_;
      logs_ = other.logs_.Clone();
      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public LogsCommand Clone() {
      return new LogsCommand(this);
    }

    /// <summary>Field number for the "cid" field.</summary>
    public const int CidFieldNumber = 1;
    private readonly static string CidDefaultValue = "";

    private string cid_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string Cid {
      get { return cid_ ?? CidDefaultValue; }
      set {
        cid_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }
    /// <summary>Gets whether the "cid" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasCid {
      get { return cid_ != null; }
    }
    /// <summary>Clears the value of the "cid" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearCid() {
      cid_ = null;
    }

    /// <summary>Field number for the "l" field.</summary>
    public const int LFieldNumber = 2;
    private readonly static int LDefaultValue = 0;

    private int l_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public int L {
      get { if ((_hasBits0 & 1) != 0) { return l_; } else { return LDefaultValue; } }
      set {
        _hasBits0 |= 1;
        l_ = value;
      }
    }
    /// <summary>Gets whether the "l" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasL {
      get { return (_hasBits0 & 1) != 0; }
    }
    /// <summary>Clears the value of the "l" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearL() {
      _hasBits0 &= ~1;
    }

    /// <summary>Field number for the "limit" field.</summary>
    public const int LimitFieldNumber = 3;
    private readonly static int LimitDefaultValue = 0;

    private int limit_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public int Limit {
      get { if ((_hasBits0 & 2) != 0) { return limit_; } else { return LimitDefaultValue; } }
      set {
        _hasBits0 |= 2;
        limit_ = value;
      }
    }
    /// <summary>Gets whether the "limit" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasLimit {
      get { return (_hasBits0 & 2) != 0; }
    }
    /// <summary>Clears the value of the "limit" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearLimit() {
      _hasBits0 &= ~2;
    }

    /// <summary>Field number for the "t" field.</summary>
    public const int TFieldNumber = 4;
    private readonly static long TDefaultValue = 0L;

    private long t_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public long T {
      get { if ((_hasBits0 & 4) != 0) { return t_; } else { return TDefaultValue; } }
      set {
        _hasBits0 |= 4;
        t_ = value;
      }
    }
    /// <summary>Gets whether the "t" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasT {
      get { return (_hasBits0 & 4) != 0; }
    }
    /// <summary>Clears the value of the "t" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearT() {
      _hasBits0 &= ~4;
    }

    /// <summary>Field number for the "tt" field.</summary>
    public const int TtFieldNumber = 5;
    private readonly static long TtDefaultValue = 0L;

    private long tt_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public long Tt {
      get { if ((_hasBits0 & 8) != 0) { return tt_; } else { return TtDefaultValue; } }
      set {
        _hasBits0 |= 8;
        tt_ = value;
      }
    }
    /// <summary>Gets whether the "tt" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasTt {
      get { return (_hasBits0 & 8) != 0; }
    }
    /// <summary>Clears the value of the "tt" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearTt() {
      _hasBits0 &= ~8;
    }

    /// <summary>Field number for the "tmid" field.</summary>
    public const int TmidFieldNumber = 6;
    private readonly static string TmidDefaultValue = "";

    private string tmid_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string Tmid {
      get { return tmid_ ?? TmidDefaultValue; }
      set {
        tmid_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }
    /// <summary>Gets whether the "tmid" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasTmid {
      get { return tmid_ != null; }
    }
    /// <summary>Clears the value of the "tmid" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearTmid() {
      tmid_ = null;
    }

    /// <summary>Field number for the "mid" field.</summary>
    public const int MidFieldNumber = 7;
    private readonly static string MidDefaultValue = "";

    private string mid_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string Mid {
      get { return mid_ ?? MidDefaultValue; }
      set {
        mid_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }
    /// <summary>Gets whether the "mid" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasMid {
      get { return mid_ != null; }
    }
    /// <summary>Clears the value of the "mid" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearMid() {
      mid_ = null;
    }

    /// <summary>Field number for the "checksum" field.</summary>
    public const int ChecksumFieldNumber = 8;
    private readonly static string ChecksumDefaultValue = "";

    private string checksum_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string Checksum {
      get { return checksum_ ?? ChecksumDefaultValue; }
      set {
        checksum_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }
    /// <summary>Gets whether the "checksum" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasChecksum {
      get { return checksum_ != null; }
    }
    /// <summary>Clears the value of the "checksum" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearChecksum() {
      checksum_ = null;
    }

    /// <summary>Field number for the "stored" field.</summary>
    public const int StoredFieldNumber = 9;
    private readonly static bool StoredDefaultValue = false;

    private bool stored_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool Stored {
      get { if ((_hasBits0 & 16) != 0) { return stored_; } else { return StoredDefaultValue; } }
      set {
        _hasBits0 |= 16;
        stored_ = value;
      }
    }
    /// <summary>Gets whether the "stored" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasStored {
      get { return (_hasBits0 & 16) != 0; }
    }
    /// <summary>Clears the value of the "stored" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearStored() {
      _hasBits0 &= ~16;
    }

    /// <summary>Field number for the "direction" field.</summary>
    public const int DirectionFieldNumber = 10;
    private readonly static global::LeanCloud.Realtime.Internal.Protocol.LogsCommand.Types.QueryDirection DirectionDefaultValue = global::LeanCloud.Realtime.Internal.Protocol.LogsCommand.Types.QueryDirection.Old;

    private global::LeanCloud.Realtime.Internal.Protocol.LogsCommand.Types.QueryDirection direction_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public global::LeanCloud.Realtime.Internal.Protocol.LogsCommand.Types.QueryDirection Direction {
      get { if ((_hasBits0 & 32) != 0) { return direction_; } else { return DirectionDefaultValue; } }
      set {
        _hasBits0 |= 32;
        direction_ = value;
      }
    }
    /// <summary>Gets whether the "direction" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasDirection {
      get { return (_hasBits0 & 32) != 0; }
    }
    /// <summary>Clears the value of the "direction" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearDirection() {
      _hasBits0 &= ~32;
    }

    /// <summary>Field number for the "tIncluded" field.</summary>
    public const int TIncludedFieldNumber = 11;
    private readonly static bool TIncludedDefaultValue = false;

    private bool tIncluded_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool TIncluded {
      get { if ((_hasBits0 & 64) != 0) { return tIncluded_; } else { return TIncludedDefaultValue; } }
      set {
        _hasBits0 |= 64;
        tIncluded_ = value;
      }
    }
    /// <summary>Gets whether the "tIncluded" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasTIncluded {
      get { return (_hasBits0 & 64) != 0; }
    }
    /// <summary>Clears the value of the "tIncluded" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearTIncluded() {
      _hasBits0 &= ~64;
    }

    /// <summary>Field number for the "ttIncluded" field.</summary>
    public const int TtIncludedFieldNumber = 12;
    private readonly static bool TtIncludedDefaultValue = false;

    private bool ttIncluded_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool TtIncluded {
      get { if ((_hasBits0 & 128) != 0) { return ttIncluded_; } else { return TtIncludedDefaultValue; } }
      set {
        _hasBits0 |= 128;
        ttIncluded_ = value;
      }
    }
    /// <summary>Gets whether the "ttIncluded" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasTtIncluded {
      get { return (_hasBits0 & 128) != 0; }
    }
    /// <summary>Clears the value of the "ttIncluded" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearTtIncluded() {
      _hasBits0 &= ~128;
    }

    /// <summary>Field number for the "lctype" field.</summary>
    public const int LctypeFieldNumber = 13;
    private readonly static int LctypeDefaultValue = 0;

    private int lctype_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public int Lctype {
      get { if ((_hasBits0 & 256) != 0) { return lctype_; } else { return LctypeDefaultValue; } }
      set {
        _hasBits0 |= 256;
        lctype_ = value;
      }
    }
    /// <summary>Gets whether the "lctype" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasLctype {
      get { return (_hasBits0 & 256) != 0; }
    }
    /// <summary>Clears the value of the "lctype" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearLctype() {
      _hasBits0 &= ~256;
    }

    /// <summary>Field number for the "logs" field.</summary>
    public const int LogsFieldNumber = 105;
    private static readonly pb::FieldCodec<global::LeanCloud.Realtime.Internal.Protocol.LogItem> _repeated_logs_codec
        = pb::FieldCodec.ForMessage(842, global::LeanCloud.Realtime.Internal.Protocol.LogItem.Parser);
    private readonly pbc::RepeatedField<global::LeanCloud.Realtime.Internal.Protocol.LogItem> logs_ = new pbc::RepeatedField<global::LeanCloud.Realtime.Internal.Protocol.LogItem>();
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public pbc::RepeatedField<global::LeanCloud.Realtime.Internal.Protocol.LogItem> Logs {
      get { return logs_; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override bool Equals(object other) {
      return Equals(other as LogsCommand);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool Equals(LogsCommand other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (Cid != other.Cid) return false;
      if (L != other.L) return false;
      if (Limit != other.Limit) return false;
      if (T != other.T) return false;
      if (Tt != other.Tt) return false;
      if (Tmid != other.Tmid) return false;
      if (Mid != other.Mid) return false;
      if (Checksum != other.Checksum) return false;
      if (Stored != other.Stored) return false;
      if (Direction != other.Direction) return false;
      if (TIncluded != other.TIncluded) return false;
      if (TtIncluded != other.TtIncluded) return false;
      if (Lctype != other.Lctype) return false;
      if(!logs_.Equals(other.logs_)) return false;
      return Equals(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override int GetHashCode() {
      int hash = 1;
      if (HasCid) hash ^= Cid.GetHashCode();
      if (HasL) hash ^= L.GetHashCode();
      if (HasLimit) hash ^= Limit.GetHashCode();
      if (HasT) hash ^= T.GetHashCode();
      if (HasTt) hash ^= Tt.GetHashCode();
      if (HasTmid) hash ^= Tmid.GetHashCode();
      if (HasMid) hash ^= Mid.GetHashCode();
      if (HasChecksum) hash ^= Checksum.GetHashCode();
      if (HasStored) hash ^= Stored.GetHashCode();
      if (HasDirection) hash ^= Direction.GetHashCode();
      if (HasTIncluded) hash ^= TIncluded.GetHashCode();
      if (HasTtIncluded) hash ^= TtIncluded.GetHashCode();
      if (HasLctype) hash ^= Lctype.GetHashCode();
      hash ^= logs_.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 (HasCid) {
        output.WriteRawTag(10);
        output.WriteString(Cid);
      }
      if (HasL) {
        output.WriteRawTag(16);
        output.WriteInt32(L);
      }
      if (HasLimit) {
        output.WriteRawTag(24);
        output.WriteInt32(Limit);
      }
      if (HasT) {
        output.WriteRawTag(32);
        output.WriteInt64(T);
      }
      if (HasTt) {
        output.WriteRawTag(40);
        output.WriteInt64(Tt);
      }
      if (HasTmid) {
        output.WriteRawTag(50);
        output.WriteString(Tmid);
      }
      if (HasMid) {
        output.WriteRawTag(58);
        output.WriteString(Mid);
      }
      if (HasChecksum) {
        output.WriteRawTag(66);
        output.WriteString(Checksum);
      }
      if (HasStored) {
        output.WriteRawTag(72);
        output.WriteBool(Stored);
      }
      if (HasDirection) {
        output.WriteRawTag(80);
        output.WriteEnum((int) Direction);
      }
      if (HasTIncluded) {
        output.WriteRawTag(88);
        output.WriteBool(TIncluded);
      }
      if (HasTtIncluded) {
        output.WriteRawTag(96);
        output.WriteBool(TtIncluded);
      }
      if (HasLctype) {
        output.WriteRawTag(104);
        output.WriteInt32(Lctype);
      }
      logs_.WriteTo(output, _repeated_logs_codec);
      if (_unknownFields != null) {
        _unknownFields.WriteTo(output);
      }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public int CalculateSize() {
      int size = 0;
      if (HasCid) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(Cid);
      }
      if (HasL) {
        size += 1 + pb::CodedOutputStream.ComputeInt32Size(L);
      }
      if (HasLimit) {
        size += 1 + pb::CodedOutputStream.ComputeInt32Size(Limit);
      }
      if (HasT) {
        size += 1 + pb::CodedOutputStream.ComputeInt64Size(T);
      }
      if (HasTt) {
        size += 1 + pb::CodedOutputStream.ComputeInt64Size(Tt);
      }
      if (HasTmid) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(Tmid);
      }
      if (HasMid) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(Mid);
      }
      if (HasChecksum) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(Checksum);
      }
      if (HasStored) {
        size += 1 + 1;
      }
      if (HasDirection) {
        size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Direction);
      }
      if (HasTIncluded) {
        size += 1 + 1;
      }
      if (HasTtIncluded) {
        size += 1 + 1;
      }
      if (HasLctype) {
        size += 1 + pb::CodedOutputStream.ComputeInt32Size(Lctype);
      }
      size += logs_.CalculateSize(_repeated_logs_codec);
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void MergeFrom(LogsCommand other) {
      if (other == null) {
        return;
      }
      if (other.HasCid) {
        Cid = other.Cid;
      }
      if (other.HasL) {
        L = other.L;
      }
      if (other.HasLimit) {
        Limit = other.Limit;
      }
      if (other.HasT) {
        T = other.T;
      }
      if (other.HasTt) {
        Tt = other.Tt;
      }
      if (other.HasTmid) {
        Tmid = other.Tmid;
      }
      if (other.HasMid) {
        Mid = other.Mid;
      }
      if (other.HasChecksum) {
        Checksum = other.Checksum;
      }
      if (other.HasStored) {
        Stored = other.Stored;
      }
      if (other.HasDirection) {
        Direction = other.Direction;
      }
      if (other.HasTIncluded) {
        TIncluded = other.TIncluded;
      }
      if (other.HasTtIncluded) {
        TtIncluded = other.TtIncluded;
      }
      if (other.HasLctype) {
        Lctype = other.Lctype;
      }
      logs_.Add(other.logs_);
      _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: {
            Cid = input.ReadString();
            break;
          }
          case 16: {
            L = input.ReadInt32();
            break;
          }
          case 24: {
            Limit = input.ReadInt32();
            break;
          }
          case 32: {
            T = input.ReadInt64();
            break;
          }
          case 40: {
            Tt = input.ReadInt64();
            break;
          }
          case 50: {
            Tmid = input.ReadString();
            break;
          }
          case 58: {
            Mid = input.ReadString();
            break;
          }
          case 66: {
            Checksum = input.ReadString();
            break;
          }
          case 72: {
            Stored = input.ReadBool();
            break;
          }
          case 80: {
            Direction = (global::LeanCloud.Realtime.Internal.Protocol.LogsCommand.Types.QueryDirection) input.ReadEnum();
            break;
          }
          case 88: {
            TIncluded = input.ReadBool();
            break;
          }
          case 96: {
            TtIncluded = input.ReadBool();
            break;
          }
          case 104: {
            Lctype = input.ReadInt32();
            break;
          }
          case 842: {
            logs_.AddEntriesFrom(input, _repeated_logs_codec);
            break;
          }
        }
      }
    }

    #region Nested types
    /// <summary>Container for nested types declared in the LogsCommand message type.</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static partial class Types {
      public enum QueryDirection {
        [pbr::OriginalName("OLD")] Old = 1,
        [pbr::OriginalName("NEW")] New = 2,
      }

    }
    #endregion

  }

  public sealed partial class RcpCommand : pb::IMessage<RcpCommand> {
    private static readonly pb::MessageParser<RcpCommand> _parser = new pb::MessageParser<RcpCommand>(() => new RcpCommand());
    private pb::UnknownFieldSet _unknownFields;
    private int _hasBits0;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pb::MessageParser<RcpCommand> Parser { get { return _parser; } }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pbr::MessageDescriptor Descriptor {
      get { return global::LeanCloud.Realtime.Internal.Protocol.Messages2ProtoReflection.Descriptor.MessageTypes[18]; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public RcpCommand() {
      OnConstruction();
    }

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public RcpCommand(RcpCommand other) : this() {
      _hasBits0 = other._hasBits0;
      id_ = other.id_;
      cid_ = other.cid_;
      t_ = other.t_;
      read_ = other.read_;
      from_ = other.from_;
      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public RcpCommand Clone() {
      return new RcpCommand(this);
    }

    /// <summary>Field number for the "id" field.</summary>
    public const int IdFieldNumber = 1;
    private readonly static string IdDefaultValue = "";

    private string id_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string Id {
      get { return id_ ?? IdDefaultValue; }
      set {
        id_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }
    /// <summary>Gets whether the "id" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasId {
      get { return id_ != null; }
    }
    /// <summary>Clears the value of the "id" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearId() {
      id_ = null;
    }

    /// <summary>Field number for the "cid" field.</summary>
    public const int CidFieldNumber = 2;
    private readonly static string CidDefaultValue = "";

    private string cid_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string Cid {
      get { return cid_ ?? CidDefaultValue; }
      set {
        cid_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }
    /// <summary>Gets whether the "cid" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasCid {
      get { return cid_ != null; }
    }
    /// <summary>Clears the value of the "cid" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearCid() {
      cid_ = null;
    }

    /// <summary>Field number for the "t" field.</summary>
    public const int TFieldNumber = 3;
    private readonly static long TDefaultValue = 0L;

    private long t_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public long T {
      get { if ((_hasBits0 & 1) != 0) { return t_; } else { return TDefaultValue; } }
      set {
        _hasBits0 |= 1;
        t_ = value;
      }
    }
    /// <summary>Gets whether the "t" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasT {
      get { return (_hasBits0 & 1) != 0; }
    }
    /// <summary>Clears the value of the "t" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearT() {
      _hasBits0 &= ~1;
    }

    /// <summary>Field number for the "read" field.</summary>
    public const int ReadFieldNumber = 4;
    private readonly static bool ReadDefaultValue = false;

    private bool read_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool Read {
      get { if ((_hasBits0 & 2) != 0) { return read_; } else { return ReadDefaultValue; } }
      set {
        _hasBits0 |= 2;
        read_ = value;
      }
    }
    /// <summary>Gets whether the "read" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasRead {
      get { return (_hasBits0 & 2) != 0; }
    }
    /// <summary>Clears the value of the "read" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearRead() {
      _hasBits0 &= ~2;
    }

    /// <summary>Field number for the "from" field.</summary>
    public const int FromFieldNumber = 5;
    private readonly static string FromDefaultValue = "";

    private string from_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string From {
      get { return from_ ?? FromDefaultValue; }
      set {
        from_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }
    /// <summary>Gets whether the "from" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasFrom {
      get { return from_ != null; }
    }
    /// <summary>Clears the value of the "from" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearFrom() {
      from_ = null;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override bool Equals(object other) {
      return Equals(other as RcpCommand);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool Equals(RcpCommand other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (Id != other.Id) return false;
      if (Cid != other.Cid) return false;
      if (T != other.T) return false;
      if (Read != other.Read) return false;
      if (From != other.From) return false;
      return Equals(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override int GetHashCode() {
      int hash = 1;
      if (HasId) hash ^= Id.GetHashCode();
      if (HasCid) hash ^= Cid.GetHashCode();
      if (HasT) hash ^= T.GetHashCode();
      if (HasRead) hash ^= Read.GetHashCode();
      if (HasFrom) hash ^= From.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 (HasId) {
        output.WriteRawTag(10);
        output.WriteString(Id);
      }
      if (HasCid) {
        output.WriteRawTag(18);
        output.WriteString(Cid);
      }
      if (HasT) {
        output.WriteRawTag(24);
        output.WriteInt64(T);
      }
      if (HasRead) {
        output.WriteRawTag(32);
        output.WriteBool(Read);
      }
      if (HasFrom) {
        output.WriteRawTag(42);
        output.WriteString(From);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(output);
      }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public int CalculateSize() {
      int size = 0;
      if (HasId) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(Id);
      }
      if (HasCid) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(Cid);
      }
      if (HasT) {
        size += 1 + pb::CodedOutputStream.ComputeInt64Size(T);
      }
      if (HasRead) {
        size += 1 + 1;
      }
      if (HasFrom) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(From);
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void MergeFrom(RcpCommand other) {
      if (other == null) {
        return;
      }
      if (other.HasId) {
        Id = other.Id;
      }
      if (other.HasCid) {
        Cid = other.Cid;
      }
      if (other.HasT) {
        T = other.T;
      }
      if (other.HasRead) {
        Read = other.Read;
      }
      if (other.HasFrom) {
        From = other.From;
      }
      _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: {
            Id = input.ReadString();
            break;
          }
          case 18: {
            Cid = input.ReadString();
            break;
          }
          case 24: {
            T = input.ReadInt64();
            break;
          }
          case 32: {
            Read = input.ReadBool();
            break;
          }
          case 42: {
            From = input.ReadString();
            break;
          }
        }
      }
    }

  }

  public sealed partial class ReadTuple : pb::IMessage<ReadTuple> {
    private static readonly pb::MessageParser<ReadTuple> _parser = new pb::MessageParser<ReadTuple>(() => new ReadTuple());
    private pb::UnknownFieldSet _unknownFields;
    private int _hasBits0;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pb::MessageParser<ReadTuple> Parser { get { return _parser; } }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pbr::MessageDescriptor Descriptor {
      get { return global::LeanCloud.Realtime.Internal.Protocol.Messages2ProtoReflection.Descriptor.MessageTypes[19]; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public ReadTuple() {
      OnConstruction();
    }

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public ReadTuple(ReadTuple other) : this() {
      _hasBits0 = other._hasBits0;
      cid_ = other.cid_;
      timestamp_ = other.timestamp_;
      mid_ = other.mid_;
      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public ReadTuple Clone() {
      return new ReadTuple(this);
    }

    /// <summary>Field number for the "cid" field.</summary>
    public const int CidFieldNumber = 1;
    private readonly static string CidDefaultValue = "";

    private string cid_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string Cid {
      get { return cid_ ?? CidDefaultValue; }
      set {
        cid_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }
    /// <summary>Gets whether the "cid" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasCid {
      get { return cid_ != null; }
    }
    /// <summary>Clears the value of the "cid" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearCid() {
      cid_ = null;
    }

    /// <summary>Field number for the "timestamp" field.</summary>
    public const int TimestampFieldNumber = 2;
    private readonly static long TimestampDefaultValue = 0L;

    private long timestamp_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public long Timestamp {
      get { if ((_hasBits0 & 1) != 0) { return timestamp_; } else { return TimestampDefaultValue; } }
      set {
        _hasBits0 |= 1;
        timestamp_ = value;
      }
    }
    /// <summary>Gets whether the "timestamp" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasTimestamp {
      get { return (_hasBits0 & 1) != 0; }
    }
    /// <summary>Clears the value of the "timestamp" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearTimestamp() {
      _hasBits0 &= ~1;
    }

    /// <summary>Field number for the "mid" field.</summary>
    public const int MidFieldNumber = 3;
    private readonly static string MidDefaultValue = "";

    private string mid_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string Mid {
      get { return mid_ ?? MidDefaultValue; }
      set {
        mid_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }
    /// <summary>Gets whether the "mid" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasMid {
      get { return mid_ != null; }
    }
    /// <summary>Clears the value of the "mid" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearMid() {
      mid_ = null;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override bool Equals(object other) {
      return Equals(other as ReadTuple);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool Equals(ReadTuple other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (Cid != other.Cid) return false;
      if (Timestamp != other.Timestamp) return false;
      if (Mid != other.Mid) return false;
      return Equals(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override int GetHashCode() {
      int hash = 1;
      if (HasCid) hash ^= Cid.GetHashCode();
      if (HasTimestamp) hash ^= Timestamp.GetHashCode();
      if (HasMid) hash ^= Mid.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 (HasCid) {
        output.WriteRawTag(10);
        output.WriteString(Cid);
      }
      if (HasTimestamp) {
        output.WriteRawTag(16);
        output.WriteInt64(Timestamp);
      }
      if (HasMid) {
        output.WriteRawTag(26);
        output.WriteString(Mid);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(output);
      }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public int CalculateSize() {
      int size = 0;
      if (HasCid) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(Cid);
      }
      if (HasTimestamp) {
        size += 1 + pb::CodedOutputStream.ComputeInt64Size(Timestamp);
      }
      if (HasMid) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(Mid);
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void MergeFrom(ReadTuple other) {
      if (other == null) {
        return;
      }
      if (other.HasCid) {
        Cid = other.Cid;
      }
      if (other.HasTimestamp) {
        Timestamp = other.Timestamp;
      }
      if (other.HasMid) {
        Mid = other.Mid;
      }
      _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: {
            Cid = input.ReadString();
            break;
          }
          case 16: {
            Timestamp = input.ReadInt64();
            break;
          }
          case 26: {
            Mid = input.ReadString();
            break;
          }
        }
      }
    }

  }

  public sealed partial class MaxReadTuple : pb::IMessage<MaxReadTuple> {
    private static readonly pb::MessageParser<MaxReadTuple> _parser = new pb::MessageParser<MaxReadTuple>(() => new MaxReadTuple());
    private pb::UnknownFieldSet _unknownFields;
    private int _hasBits0;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pb::MessageParser<MaxReadTuple> Parser { get { return _parser; } }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pbr::MessageDescriptor Descriptor {
      get { return global::LeanCloud.Realtime.Internal.Protocol.Messages2ProtoReflection.Descriptor.MessageTypes[20]; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public MaxReadTuple() {
      OnConstruction();
    }

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public MaxReadTuple(MaxReadTuple other) : this() {
      _hasBits0 = other._hasBits0;
      pid_ = other.pid_;
      maxAckTimestamp_ = other.maxAckTimestamp_;
      maxReadTimestamp_ = other.maxReadTimestamp_;
      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public MaxReadTuple Clone() {
      return new MaxReadTuple(this);
    }

    /// <summary>Field number for the "pid" field.</summary>
    public const int PidFieldNumber = 1;
    private readonly static string PidDefaultValue = "";

    private string pid_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string Pid {
      get { return pid_ ?? PidDefaultValue; }
      set {
        pid_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }
    /// <summary>Gets whether the "pid" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasPid {
      get { return pid_ != null; }
    }
    /// <summary>Clears the value of the "pid" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearPid() {
      pid_ = null;
    }

    /// <summary>Field number for the "maxAckTimestamp" field.</summary>
    public const int MaxAckTimestampFieldNumber = 2;
    private readonly static long MaxAckTimestampDefaultValue = 0L;

    private long maxAckTimestamp_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public long MaxAckTimestamp {
      get { if ((_hasBits0 & 1) != 0) { return maxAckTimestamp_; } else { return MaxAckTimestampDefaultValue; } }
      set {
        _hasBits0 |= 1;
        maxAckTimestamp_ = value;
      }
    }
    /// <summary>Gets whether the "maxAckTimestamp" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasMaxAckTimestamp {
      get { return (_hasBits0 & 1) != 0; }
    }
    /// <summary>Clears the value of the "maxAckTimestamp" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearMaxAckTimestamp() {
      _hasBits0 &= ~1;
    }

    /// <summary>Field number for the "maxReadTimestamp" field.</summary>
    public const int MaxReadTimestampFieldNumber = 3;
    private readonly static long MaxReadTimestampDefaultValue = 0L;

    private long maxReadTimestamp_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public long MaxReadTimestamp {
      get { if ((_hasBits0 & 2) != 0) { return maxReadTimestamp_; } else { return MaxReadTimestampDefaultValue; } }
      set {
        _hasBits0 |= 2;
        maxReadTimestamp_ = value;
      }
    }
    /// <summary>Gets whether the "maxReadTimestamp" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasMaxReadTimestamp {
      get { return (_hasBits0 & 2) != 0; }
    }
    /// <summary>Clears the value of the "maxReadTimestamp" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearMaxReadTimestamp() {
      _hasBits0 &= ~2;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override bool Equals(object other) {
      return Equals(other as MaxReadTuple);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool Equals(MaxReadTuple other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (Pid != other.Pid) return false;
      if (MaxAckTimestamp != other.MaxAckTimestamp) return false;
      if (MaxReadTimestamp != other.MaxReadTimestamp) return false;
      return Equals(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override int GetHashCode() {
      int hash = 1;
      if (HasPid) hash ^= Pid.GetHashCode();
      if (HasMaxAckTimestamp) hash ^= MaxAckTimestamp.GetHashCode();
      if (HasMaxReadTimestamp) hash ^= MaxReadTimestamp.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 (HasPid) {
        output.WriteRawTag(10);
        output.WriteString(Pid);
      }
      if (HasMaxAckTimestamp) {
        output.WriteRawTag(16);
        output.WriteInt64(MaxAckTimestamp);
      }
      if (HasMaxReadTimestamp) {
        output.WriteRawTag(24);
        output.WriteInt64(MaxReadTimestamp);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(output);
      }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public int CalculateSize() {
      int size = 0;
      if (HasPid) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(Pid);
      }
      if (HasMaxAckTimestamp) {
        size += 1 + pb::CodedOutputStream.ComputeInt64Size(MaxAckTimestamp);
      }
      if (HasMaxReadTimestamp) {
        size += 1 + pb::CodedOutputStream.ComputeInt64Size(MaxReadTimestamp);
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void MergeFrom(MaxReadTuple other) {
      if (other == null) {
        return;
      }
      if (other.HasPid) {
        Pid = other.Pid;
      }
      if (other.HasMaxAckTimestamp) {
        MaxAckTimestamp = other.MaxAckTimestamp;
      }
      if (other.HasMaxReadTimestamp) {
        MaxReadTimestamp = other.MaxReadTimestamp;
      }
      _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: {
            Pid = input.ReadString();
            break;
          }
          case 16: {
            MaxAckTimestamp = input.ReadInt64();
            break;
          }
          case 24: {
            MaxReadTimestamp = input.ReadInt64();
            break;
          }
        }
      }
    }

  }

  public sealed partial class ReadCommand : pb::IMessage<ReadCommand> {
    private static readonly pb::MessageParser<ReadCommand> _parser = new pb::MessageParser<ReadCommand>(() => new ReadCommand());
    private pb::UnknownFieldSet _unknownFields;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pb::MessageParser<ReadCommand> Parser { get { return _parser; } }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pbr::MessageDescriptor Descriptor {
      get { return global::LeanCloud.Realtime.Internal.Protocol.Messages2ProtoReflection.Descriptor.MessageTypes[21]; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public ReadCommand() {
      OnConstruction();
    }

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public ReadCommand(ReadCommand other) : this() {
      cid_ = other.cid_;
      cids_ = other.cids_.Clone();
      convs_ = other.convs_.Clone();
      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public ReadCommand Clone() {
      return new ReadCommand(this);
    }

    /// <summary>Field number for the "cid" field.</summary>
    public const int CidFieldNumber = 1;
    private readonly static string CidDefaultValue = "";

    private string cid_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string Cid {
      get { return cid_ ?? CidDefaultValue; }
      set {
        cid_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }
    /// <summary>Gets whether the "cid" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasCid {
      get { return cid_ != null; }
    }
    /// <summary>Clears the value of the "cid" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearCid() {
      cid_ = null;
    }

    /// <summary>Field number for the "cids" field.</summary>
    public const int CidsFieldNumber = 2;
    private static readonly pb::FieldCodec<string> _repeated_cids_codec
        = pb::FieldCodec.ForString(18);
    private readonly pbc::RepeatedField<string> cids_ = new pbc::RepeatedField<string>();
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public pbc::RepeatedField<string> Cids {
      get { return cids_; }
    }

    /// <summary>Field number for the "convs" field.</summary>
    public const int ConvsFieldNumber = 3;
    private static readonly pb::FieldCodec<global::LeanCloud.Realtime.Internal.Protocol.ReadTuple> _repeated_convs_codec
        = pb::FieldCodec.ForMessage(26, global::LeanCloud.Realtime.Internal.Protocol.ReadTuple.Parser);
    private readonly pbc::RepeatedField<global::LeanCloud.Realtime.Internal.Protocol.ReadTuple> convs_ = new pbc::RepeatedField<global::LeanCloud.Realtime.Internal.Protocol.ReadTuple>();
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public pbc::RepeatedField<global::LeanCloud.Realtime.Internal.Protocol.ReadTuple> Convs {
      get { return convs_; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override bool Equals(object other) {
      return Equals(other as ReadCommand);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool Equals(ReadCommand other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (Cid != other.Cid) return false;
      if(!cids_.Equals(other.cids_)) return false;
      if(!convs_.Equals(other.convs_)) return false;
      return Equals(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override int GetHashCode() {
      int hash = 1;
      if (HasCid) hash ^= Cid.GetHashCode();
      hash ^= cids_.GetHashCode();
      hash ^= convs_.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 (HasCid) {
        output.WriteRawTag(10);
        output.WriteString(Cid);
      }
      cids_.WriteTo(output, _repeated_cids_codec);
      convs_.WriteTo(output, _repeated_convs_codec);
      if (_unknownFields != null) {
        _unknownFields.WriteTo(output);
      }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public int CalculateSize() {
      int size = 0;
      if (HasCid) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(Cid);
      }
      size += cids_.CalculateSize(_repeated_cids_codec);
      size += convs_.CalculateSize(_repeated_convs_codec);
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void MergeFrom(ReadCommand other) {
      if (other == null) {
        return;
      }
      if (other.HasCid) {
        Cid = other.Cid;
      }
      cids_.Add(other.cids_);
      convs_.Add(other.convs_);
      _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: {
            Cid = input.ReadString();
            break;
          }
          case 18: {
            cids_.AddEntriesFrom(input, _repeated_cids_codec);
            break;
          }
          case 26: {
            convs_.AddEntriesFrom(input, _repeated_convs_codec);
            break;
          }
        }
      }
    }

  }

  public sealed partial class PresenceCommand : pb::IMessage<PresenceCommand> {
    private static readonly pb::MessageParser<PresenceCommand> _parser = new pb::MessageParser<PresenceCommand>(() => new PresenceCommand());
    private pb::UnknownFieldSet _unknownFields;
    private int _hasBits0;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pb::MessageParser<PresenceCommand> Parser { get { return _parser; } }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pbr::MessageDescriptor Descriptor {
      get { return global::LeanCloud.Realtime.Internal.Protocol.Messages2ProtoReflection.Descriptor.MessageTypes[22]; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public PresenceCommand() {
      OnConstruction();
    }

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public PresenceCommand(PresenceCommand other) : this() {
      _hasBits0 = other._hasBits0;
      status_ = other.status_;
      sessionPeerIds_ = other.sessionPeerIds_.Clone();
      cid_ = other.cid_;
      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public PresenceCommand Clone() {
      return new PresenceCommand(this);
    }

    /// <summary>Field number for the "status" field.</summary>
    public const int StatusFieldNumber = 1;
    private readonly static global::LeanCloud.Realtime.Internal.Protocol.StatusType StatusDefaultValue = global::LeanCloud.Realtime.Internal.Protocol.StatusType.On;

    private global::LeanCloud.Realtime.Internal.Protocol.StatusType status_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public global::LeanCloud.Realtime.Internal.Protocol.StatusType Status {
      get { if ((_hasBits0 & 1) != 0) { return status_; } else { return StatusDefaultValue; } }
      set {
        _hasBits0 |= 1;
        status_ = value;
      }
    }
    /// <summary>Gets whether the "status" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasStatus {
      get { return (_hasBits0 & 1) != 0; }
    }
    /// <summary>Clears the value of the "status" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearStatus() {
      _hasBits0 &= ~1;
    }

    /// <summary>Field number for the "sessionPeerIds" field.</summary>
    public const int SessionPeerIdsFieldNumber = 2;
    private static readonly pb::FieldCodec<string> _repeated_sessionPeerIds_codec
        = pb::FieldCodec.ForString(18);
    private readonly pbc::RepeatedField<string> sessionPeerIds_ = new pbc::RepeatedField<string>();
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public pbc::RepeatedField<string> SessionPeerIds {
      get { return sessionPeerIds_; }
    }

    /// <summary>Field number for the "cid" field.</summary>
    public const int CidFieldNumber = 3;
    private readonly static string CidDefaultValue = "";

    private string cid_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string Cid {
      get { return cid_ ?? CidDefaultValue; }
      set {
        cid_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }
    /// <summary>Gets whether the "cid" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasCid {
      get { return cid_ != null; }
    }
    /// <summary>Clears the value of the "cid" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearCid() {
      cid_ = null;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override bool Equals(object other) {
      return Equals(other as PresenceCommand);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool Equals(PresenceCommand other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (Status != other.Status) return false;
      if(!sessionPeerIds_.Equals(other.sessionPeerIds_)) return false;
      if (Cid != other.Cid) return false;
      return Equals(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override int GetHashCode() {
      int hash = 1;
      if (HasStatus) hash ^= Status.GetHashCode();
      hash ^= sessionPeerIds_.GetHashCode();
      if (HasCid) hash ^= Cid.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 (HasStatus) {
        output.WriteRawTag(8);
        output.WriteEnum((int) Status);
      }
      sessionPeerIds_.WriteTo(output, _repeated_sessionPeerIds_codec);
      if (HasCid) {
        output.WriteRawTag(26);
        output.WriteString(Cid);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(output);
      }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public int CalculateSize() {
      int size = 0;
      if (HasStatus) {
        size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Status);
      }
      size += sessionPeerIds_.CalculateSize(_repeated_sessionPeerIds_codec);
      if (HasCid) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(Cid);
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void MergeFrom(PresenceCommand other) {
      if (other == null) {
        return;
      }
      if (other.HasStatus) {
        Status = other.Status;
      }
      sessionPeerIds_.Add(other.sessionPeerIds_);
      if (other.HasCid) {
        Cid = other.Cid;
      }
      _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: {
            Status = (global::LeanCloud.Realtime.Internal.Protocol.StatusType) input.ReadEnum();
            break;
          }
          case 18: {
            sessionPeerIds_.AddEntriesFrom(input, _repeated_sessionPeerIds_codec);
            break;
          }
          case 26: {
            Cid = input.ReadString();
            break;
          }
        }
      }
    }

  }

  public sealed partial class ReportCommand : pb::IMessage<ReportCommand> {
    private static readonly pb::MessageParser<ReportCommand> _parser = new pb::MessageParser<ReportCommand>(() => new ReportCommand());
    private pb::UnknownFieldSet _unknownFields;
    private int _hasBits0;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pb::MessageParser<ReportCommand> Parser { get { return _parser; } }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pbr::MessageDescriptor Descriptor {
      get { return global::LeanCloud.Realtime.Internal.Protocol.Messages2ProtoReflection.Descriptor.MessageTypes[23]; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public ReportCommand() {
      OnConstruction();
    }

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public ReportCommand(ReportCommand other) : this() {
      _hasBits0 = other._hasBits0;
      initiative_ = other.initiative_;
      type_ = other.type_;
      data_ = other.data_;
      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public ReportCommand Clone() {
      return new ReportCommand(this);
    }

    /// <summary>Field number for the "initiative" field.</summary>
    public const int InitiativeFieldNumber = 1;
    private readonly static bool InitiativeDefaultValue = false;

    private bool initiative_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool Initiative {
      get { if ((_hasBits0 & 1) != 0) { return initiative_; } else { return InitiativeDefaultValue; } }
      set {
        _hasBits0 |= 1;
        initiative_ = value;
      }
    }
    /// <summary>Gets whether the "initiative" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasInitiative {
      get { return (_hasBits0 & 1) != 0; }
    }
    /// <summary>Clears the value of the "initiative" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearInitiative() {
      _hasBits0 &= ~1;
    }

    /// <summary>Field number for the "type" field.</summary>
    public const int TypeFieldNumber = 2;
    private readonly static string TypeDefaultValue = "";

    private string type_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string Type {
      get { return type_ ?? TypeDefaultValue; }
      set {
        type_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }
    /// <summary>Gets whether the "type" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasType {
      get { return type_ != null; }
    }
    /// <summary>Clears the value of the "type" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearType() {
      type_ = null;
    }

    /// <summary>Field number for the "data" field.</summary>
    public const int DataFieldNumber = 3;
    private readonly static string DataDefaultValue = "";

    private string data_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string Data {
      get { return data_ ?? DataDefaultValue; }
      set {
        data_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }
    /// <summary>Gets whether the "data" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasData {
      get { return data_ != null; }
    }
    /// <summary>Clears the value of the "data" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearData() {
      data_ = null;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override bool Equals(object other) {
      return Equals(other as ReportCommand);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool Equals(ReportCommand other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (Initiative != other.Initiative) return false;
      if (Type != other.Type) return false;
      if (Data != other.Data) return false;
      return Equals(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override int GetHashCode() {
      int hash = 1;
      if (HasInitiative) hash ^= Initiative.GetHashCode();
      if (HasType) hash ^= Type.GetHashCode();
      if (HasData) hash ^= Data.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 (HasInitiative) {
        output.WriteRawTag(8);
        output.WriteBool(Initiative);
      }
      if (HasType) {
        output.WriteRawTag(18);
        output.WriteString(Type);
      }
      if (HasData) {
        output.WriteRawTag(26);
        output.WriteString(Data);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(output);
      }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public int CalculateSize() {
      int size = 0;
      if (HasInitiative) {
        size += 1 + 1;
      }
      if (HasType) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(Type);
      }
      if (HasData) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(Data);
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void MergeFrom(ReportCommand other) {
      if (other == null) {
        return;
      }
      if (other.HasInitiative) {
        Initiative = other.Initiative;
      }
      if (other.HasType) {
        Type = other.Type;
      }
      if (other.HasData) {
        Data = other.Data;
      }
      _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: {
            Initiative = input.ReadBool();
            break;
          }
          case 18: {
            Type = input.ReadString();
            break;
          }
          case 26: {
            Data = input.ReadString();
            break;
          }
        }
      }
    }

  }

  public sealed partial class PatchItem : pb::IMessage<PatchItem> {
    private static readonly pb::MessageParser<PatchItem> _parser = new pb::MessageParser<PatchItem>(() => new PatchItem());
    private pb::UnknownFieldSet _unknownFields;
    private int _hasBits0;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pb::MessageParser<PatchItem> Parser { get { return _parser; } }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pbr::MessageDescriptor Descriptor {
      get { return global::LeanCloud.Realtime.Internal.Protocol.Messages2ProtoReflection.Descriptor.MessageTypes[24]; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public PatchItem() {
      OnConstruction();
    }

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public PatchItem(PatchItem other) : this() {
      _hasBits0 = other._hasBits0;
      cid_ = other.cid_;
      mid_ = other.mid_;
      timestamp_ = other.timestamp_;
      recall_ = other.recall_;
      data_ = other.data_;
      patchTimestamp_ = other.patchTimestamp_;
      from_ = other.from_;
      binaryMsg_ = other.binaryMsg_;
      mentionAll_ = other.mentionAll_;
      mentionPids_ = other.mentionPids_.Clone();
      patchCode_ = other.patchCode_;
      patchReason_ = other.patchReason_;
      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public PatchItem Clone() {
      return new PatchItem(this);
    }

    /// <summary>Field number for the "cid" field.</summary>
    public const int CidFieldNumber = 1;
    private readonly static string CidDefaultValue = "";

    private string cid_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string Cid {
      get { return cid_ ?? CidDefaultValue; }
      set {
        cid_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }
    /// <summary>Gets whether the "cid" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasCid {
      get { return cid_ != null; }
    }
    /// <summary>Clears the value of the "cid" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearCid() {
      cid_ = null;
    }

    /// <summary>Field number for the "mid" field.</summary>
    public const int MidFieldNumber = 2;
    private readonly static string MidDefaultValue = "";

    private string mid_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string Mid {
      get { return mid_ ?? MidDefaultValue; }
      set {
        mid_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }
    /// <summary>Gets whether the "mid" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasMid {
      get { return mid_ != null; }
    }
    /// <summary>Clears the value of the "mid" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearMid() {
      mid_ = null;
    }

    /// <summary>Field number for the "timestamp" field.</summary>
    public const int TimestampFieldNumber = 3;
    private readonly static long TimestampDefaultValue = 0L;

    private long timestamp_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public long Timestamp {
      get { if ((_hasBits0 & 1) != 0) { return timestamp_; } else { return TimestampDefaultValue; } }
      set {
        _hasBits0 |= 1;
        timestamp_ = value;
      }
    }
    /// <summary>Gets whether the "timestamp" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasTimestamp {
      get { return (_hasBits0 & 1) != 0; }
    }
    /// <summary>Clears the value of the "timestamp" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearTimestamp() {
      _hasBits0 &= ~1;
    }

    /// <summary>Field number for the "recall" field.</summary>
    public const int RecallFieldNumber = 4;
    private readonly static bool RecallDefaultValue = false;

    private bool recall_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool Recall {
      get { if ((_hasBits0 & 2) != 0) { return recall_; } else { return RecallDefaultValue; } }
      set {
        _hasBits0 |= 2;
        recall_ = value;
      }
    }
    /// <summary>Gets whether the "recall" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasRecall {
      get { return (_hasBits0 & 2) != 0; }
    }
    /// <summary>Clears the value of the "recall" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearRecall() {
      _hasBits0 &= ~2;
    }

    /// <summary>Field number for the "data" field.</summary>
    public const int DataFieldNumber = 5;
    private readonly static string DataDefaultValue = "";

    private string data_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string Data {
      get { return data_ ?? DataDefaultValue; }
      set {
        data_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }
    /// <summary>Gets whether the "data" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasData {
      get { return data_ != null; }
    }
    /// <summary>Clears the value of the "data" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearData() {
      data_ = null;
    }

    /// <summary>Field number for the "patchTimestamp" field.</summary>
    public const int PatchTimestampFieldNumber = 6;
    private readonly static long PatchTimestampDefaultValue = 0L;

    private long patchTimestamp_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public long PatchTimestamp {
      get { if ((_hasBits0 & 4) != 0) { return patchTimestamp_; } else { return PatchTimestampDefaultValue; } }
      set {
        _hasBits0 |= 4;
        patchTimestamp_ = value;
      }
    }
    /// <summary>Gets whether the "patchTimestamp" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasPatchTimestamp {
      get { return (_hasBits0 & 4) != 0; }
    }
    /// <summary>Clears the value of the "patchTimestamp" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearPatchTimestamp() {
      _hasBits0 &= ~4;
    }

    /// <summary>Field number for the "from" field.</summary>
    public const int FromFieldNumber = 7;
    private readonly static string FromDefaultValue = "";

    private string from_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string From {
      get { return from_ ?? FromDefaultValue; }
      set {
        from_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }
    /// <summary>Gets whether the "from" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasFrom {
      get { return from_ != null; }
    }
    /// <summary>Clears the value of the "from" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearFrom() {
      from_ = null;
    }

    /// <summary>Field number for the "binaryMsg" field.</summary>
    public const int BinaryMsgFieldNumber = 8;
    private readonly static pb::ByteString BinaryMsgDefaultValue = pb::ByteString.Empty;

    private pb::ByteString binaryMsg_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public pb::ByteString BinaryMsg {
      get { return binaryMsg_ ?? BinaryMsgDefaultValue; }
      set {
        binaryMsg_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }
    /// <summary>Gets whether the "binaryMsg" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasBinaryMsg {
      get { return binaryMsg_ != null; }
    }
    /// <summary>Clears the value of the "binaryMsg" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearBinaryMsg() {
      binaryMsg_ = null;
    }

    /// <summary>Field number for the "mentionAll" field.</summary>
    public const int MentionAllFieldNumber = 9;
    private readonly static bool MentionAllDefaultValue = false;

    private bool mentionAll_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool MentionAll {
      get { if ((_hasBits0 & 8) != 0) { return mentionAll_; } else { return MentionAllDefaultValue; } }
      set {
        _hasBits0 |= 8;
        mentionAll_ = value;
      }
    }
    /// <summary>Gets whether the "mentionAll" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasMentionAll {
      get { return (_hasBits0 & 8) != 0; }
    }
    /// <summary>Clears the value of the "mentionAll" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearMentionAll() {
      _hasBits0 &= ~8;
    }

    /// <summary>Field number for the "mentionPids" field.</summary>
    public const int MentionPidsFieldNumber = 10;
    private static readonly pb::FieldCodec<string> _repeated_mentionPids_codec
        = pb::FieldCodec.ForString(82);
    private readonly pbc::RepeatedField<string> mentionPids_ = new pbc::RepeatedField<string>();
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public pbc::RepeatedField<string> MentionPids {
      get { return mentionPids_; }
    }

    /// <summary>Field number for the "patchCode" field.</summary>
    public const int PatchCodeFieldNumber = 11;
    private readonly static long PatchCodeDefaultValue = 0L;

    private long patchCode_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public long PatchCode {
      get { if ((_hasBits0 & 16) != 0) { return patchCode_; } else { return PatchCodeDefaultValue; } }
      set {
        _hasBits0 |= 16;
        patchCode_ = value;
      }
    }
    /// <summary>Gets whether the "patchCode" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasPatchCode {
      get { return (_hasBits0 & 16) != 0; }
    }
    /// <summary>Clears the value of the "patchCode" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearPatchCode() {
      _hasBits0 &= ~16;
    }

    /// <summary>Field number for the "patchReason" field.</summary>
    public const int PatchReasonFieldNumber = 12;
    private readonly static string PatchReasonDefaultValue = "";

    private string patchReason_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string PatchReason {
      get { return patchReason_ ?? PatchReasonDefaultValue; }
      set {
        patchReason_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }
    /// <summary>Gets whether the "patchReason" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasPatchReason {
      get { return patchReason_ != null; }
    }
    /// <summary>Clears the value of the "patchReason" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearPatchReason() {
      patchReason_ = null;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override bool Equals(object other) {
      return Equals(other as PatchItem);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool Equals(PatchItem other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (Cid != other.Cid) return false;
      if (Mid != other.Mid) return false;
      if (Timestamp != other.Timestamp) return false;
      if (Recall != other.Recall) return false;
      if (Data != other.Data) return false;
      if (PatchTimestamp != other.PatchTimestamp) return false;
      if (From != other.From) return false;
      if (BinaryMsg != other.BinaryMsg) return false;
      if (MentionAll != other.MentionAll) return false;
      if(!mentionPids_.Equals(other.mentionPids_)) return false;
      if (PatchCode != other.PatchCode) return false;
      if (PatchReason != other.PatchReason) return false;
      return Equals(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override int GetHashCode() {
      int hash = 1;
      if (HasCid) hash ^= Cid.GetHashCode();
      if (HasMid) hash ^= Mid.GetHashCode();
      if (HasTimestamp) hash ^= Timestamp.GetHashCode();
      if (HasRecall) hash ^= Recall.GetHashCode();
      if (HasData) hash ^= Data.GetHashCode();
      if (HasPatchTimestamp) hash ^= PatchTimestamp.GetHashCode();
      if (HasFrom) hash ^= From.GetHashCode();
      if (HasBinaryMsg) hash ^= BinaryMsg.GetHashCode();
      if (HasMentionAll) hash ^= MentionAll.GetHashCode();
      hash ^= mentionPids_.GetHashCode();
      if (HasPatchCode) hash ^= PatchCode.GetHashCode();
      if (HasPatchReason) hash ^= PatchReason.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 (HasCid) {
        output.WriteRawTag(10);
        output.WriteString(Cid);
      }
      if (HasMid) {
        output.WriteRawTag(18);
        output.WriteString(Mid);
      }
      if (HasTimestamp) {
        output.WriteRawTag(24);
        output.WriteInt64(Timestamp);
      }
      if (HasRecall) {
        output.WriteRawTag(32);
        output.WriteBool(Recall);
      }
      if (HasData) {
        output.WriteRawTag(42);
        output.WriteString(Data);
      }
      if (HasPatchTimestamp) {
        output.WriteRawTag(48);
        output.WriteInt64(PatchTimestamp);
      }
      if (HasFrom) {
        output.WriteRawTag(58);
        output.WriteString(From);
      }
      if (HasBinaryMsg) {
        output.WriteRawTag(66);
        output.WriteBytes(BinaryMsg);
      }
      if (HasMentionAll) {
        output.WriteRawTag(72);
        output.WriteBool(MentionAll);
      }
      mentionPids_.WriteTo(output, _repeated_mentionPids_codec);
      if (HasPatchCode) {
        output.WriteRawTag(88);
        output.WriteInt64(PatchCode);
      }
      if (HasPatchReason) {
        output.WriteRawTag(98);
        output.WriteString(PatchReason);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(output);
      }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public int CalculateSize() {
      int size = 0;
      if (HasCid) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(Cid);
      }
      if (HasMid) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(Mid);
      }
      if (HasTimestamp) {
        size += 1 + pb::CodedOutputStream.ComputeInt64Size(Timestamp);
      }
      if (HasRecall) {
        size += 1 + 1;
      }
      if (HasData) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(Data);
      }
      if (HasPatchTimestamp) {
        size += 1 + pb::CodedOutputStream.ComputeInt64Size(PatchTimestamp);
      }
      if (HasFrom) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(From);
      }
      if (HasBinaryMsg) {
        size += 1 + pb::CodedOutputStream.ComputeBytesSize(BinaryMsg);
      }
      if (HasMentionAll) {
        size += 1 + 1;
      }
      size += mentionPids_.CalculateSize(_repeated_mentionPids_codec);
      if (HasPatchCode) {
        size += 1 + pb::CodedOutputStream.ComputeInt64Size(PatchCode);
      }
      if (HasPatchReason) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(PatchReason);
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void MergeFrom(PatchItem other) {
      if (other == null) {
        return;
      }
      if (other.HasCid) {
        Cid = other.Cid;
      }
      if (other.HasMid) {
        Mid = other.Mid;
      }
      if (other.HasTimestamp) {
        Timestamp = other.Timestamp;
      }
      if (other.HasRecall) {
        Recall = other.Recall;
      }
      if (other.HasData) {
        Data = other.Data;
      }
      if (other.HasPatchTimestamp) {
        PatchTimestamp = other.PatchTimestamp;
      }
      if (other.HasFrom) {
        From = other.From;
      }
      if (other.HasBinaryMsg) {
        BinaryMsg = other.BinaryMsg;
      }
      if (other.HasMentionAll) {
        MentionAll = other.MentionAll;
      }
      mentionPids_.Add(other.mentionPids_);
      if (other.HasPatchCode) {
        PatchCode = other.PatchCode;
      }
      if (other.HasPatchReason) {
        PatchReason = other.PatchReason;
      }
      _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: {
            Cid = input.ReadString();
            break;
          }
          case 18: {
            Mid = input.ReadString();
            break;
          }
          case 24: {
            Timestamp = input.ReadInt64();
            break;
          }
          case 32: {
            Recall = input.ReadBool();
            break;
          }
          case 42: {
            Data = input.ReadString();
            break;
          }
          case 48: {
            PatchTimestamp = input.ReadInt64();
            break;
          }
          case 58: {
            From = input.ReadString();
            break;
          }
          case 66: {
            BinaryMsg = input.ReadBytes();
            break;
          }
          case 72: {
            MentionAll = input.ReadBool();
            break;
          }
          case 82: {
            mentionPids_.AddEntriesFrom(input, _repeated_mentionPids_codec);
            break;
          }
          case 88: {
            PatchCode = input.ReadInt64();
            break;
          }
          case 98: {
            PatchReason = input.ReadString();
            break;
          }
        }
      }
    }

  }

  public sealed partial class PatchCommand : pb::IMessage<PatchCommand> {
    private static readonly pb::MessageParser<PatchCommand> _parser = new pb::MessageParser<PatchCommand>(() => new PatchCommand());
    private pb::UnknownFieldSet _unknownFields;
    private int _hasBits0;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pb::MessageParser<PatchCommand> Parser { get { return _parser; } }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pbr::MessageDescriptor Descriptor {
      get { return global::LeanCloud.Realtime.Internal.Protocol.Messages2ProtoReflection.Descriptor.MessageTypes[25]; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public PatchCommand() {
      OnConstruction();
    }

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public PatchCommand(PatchCommand other) : this() {
      _hasBits0 = other._hasBits0;
      patches_ = other.patches_.Clone();
      lastPatchTime_ = other.lastPatchTime_;
      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public PatchCommand Clone() {
      return new PatchCommand(this);
    }

    /// <summary>Field number for the "patches" field.</summary>
    public const int PatchesFieldNumber = 1;
    private static readonly pb::FieldCodec<global::LeanCloud.Realtime.Internal.Protocol.PatchItem> _repeated_patches_codec
        = pb::FieldCodec.ForMessage(10, global::LeanCloud.Realtime.Internal.Protocol.PatchItem.Parser);
    private readonly pbc::RepeatedField<global::LeanCloud.Realtime.Internal.Protocol.PatchItem> patches_ = new pbc::RepeatedField<global::LeanCloud.Realtime.Internal.Protocol.PatchItem>();
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public pbc::RepeatedField<global::LeanCloud.Realtime.Internal.Protocol.PatchItem> Patches {
      get { return patches_; }
    }

    /// <summary>Field number for the "lastPatchTime" field.</summary>
    public const int LastPatchTimeFieldNumber = 2;
    private readonly static long LastPatchTimeDefaultValue = 0L;

    private long lastPatchTime_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public long LastPatchTime {
      get { if ((_hasBits0 & 1) != 0) { return lastPatchTime_; } else { return LastPatchTimeDefaultValue; } }
      set {
        _hasBits0 |= 1;
        lastPatchTime_ = value;
      }
    }
    /// <summary>Gets whether the "lastPatchTime" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasLastPatchTime {
      get { return (_hasBits0 & 1) != 0; }
    }
    /// <summary>Clears the value of the "lastPatchTime" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearLastPatchTime() {
      _hasBits0 &= ~1;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override bool Equals(object other) {
      return Equals(other as PatchCommand);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool Equals(PatchCommand other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if(!patches_.Equals(other.patches_)) return false;
      if (LastPatchTime != other.LastPatchTime) return false;
      return Equals(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override int GetHashCode() {
      int hash = 1;
      hash ^= patches_.GetHashCode();
      if (HasLastPatchTime) hash ^= LastPatchTime.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) {
      patches_.WriteTo(output, _repeated_patches_codec);
      if (HasLastPatchTime) {
        output.WriteRawTag(16);
        output.WriteInt64(LastPatchTime);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(output);
      }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public int CalculateSize() {
      int size = 0;
      size += patches_.CalculateSize(_repeated_patches_codec);
      if (HasLastPatchTime) {
        size += 1 + pb::CodedOutputStream.ComputeInt64Size(LastPatchTime);
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void MergeFrom(PatchCommand other) {
      if (other == null) {
        return;
      }
      patches_.Add(other.patches_);
      if (other.HasLastPatchTime) {
        LastPatchTime = other.LastPatchTime;
      }
      _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: {
            patches_.AddEntriesFrom(input, _repeated_patches_codec);
            break;
          }
          case 16: {
            LastPatchTime = input.ReadInt64();
            break;
          }
        }
      }
    }

  }

  public sealed partial class PubsubCommand : pb::IMessage<PubsubCommand> {
    private static readonly pb::MessageParser<PubsubCommand> _parser = new pb::MessageParser<PubsubCommand>(() => new PubsubCommand());
    private pb::UnknownFieldSet _unknownFields;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pb::MessageParser<PubsubCommand> Parser { get { return _parser; } }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pbr::MessageDescriptor Descriptor {
      get { return global::LeanCloud.Realtime.Internal.Protocol.Messages2ProtoReflection.Descriptor.MessageTypes[26]; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public PubsubCommand() {
      OnConstruction();
    }

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public PubsubCommand(PubsubCommand other) : this() {
      cid_ = other.cid_;
      cids_ = other.cids_.Clone();
      topic_ = other.topic_;
      subtopic_ = other.subtopic_;
      topics_ = other.topics_.Clone();
      subtopics_ = other.subtopics_.Clone();
      results_ = other.HasResults ? other.results_.Clone() : null;
      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public PubsubCommand Clone() {
      return new PubsubCommand(this);
    }

    /// <summary>Field number for the "cid" field.</summary>
    public const int CidFieldNumber = 1;
    private readonly static string CidDefaultValue = "";

    private string cid_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string Cid {
      get { return cid_ ?? CidDefaultValue; }
      set {
        cid_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }
    /// <summary>Gets whether the "cid" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasCid {
      get { return cid_ != null; }
    }
    /// <summary>Clears the value of the "cid" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearCid() {
      cid_ = null;
    }

    /// <summary>Field number for the "cids" field.</summary>
    public const int CidsFieldNumber = 2;
    private static readonly pb::FieldCodec<string> _repeated_cids_codec
        = pb::FieldCodec.ForString(18);
    private readonly pbc::RepeatedField<string> cids_ = new pbc::RepeatedField<string>();
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public pbc::RepeatedField<string> Cids {
      get { return cids_; }
    }

    /// <summary>Field number for the "topic" field.</summary>
    public const int TopicFieldNumber = 3;
    private readonly static string TopicDefaultValue = "";

    private string topic_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string Topic {
      get { return topic_ ?? TopicDefaultValue; }
      set {
        topic_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }
    /// <summary>Gets whether the "topic" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasTopic {
      get { return topic_ != null; }
    }
    /// <summary>Clears the value of the "topic" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearTopic() {
      topic_ = null;
    }

    /// <summary>Field number for the "subtopic" field.</summary>
    public const int SubtopicFieldNumber = 4;
    private readonly static string SubtopicDefaultValue = "";

    private string subtopic_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string Subtopic {
      get { return subtopic_ ?? SubtopicDefaultValue; }
      set {
        subtopic_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }
    /// <summary>Gets whether the "subtopic" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasSubtopic {
      get { return subtopic_ != null; }
    }
    /// <summary>Clears the value of the "subtopic" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearSubtopic() {
      subtopic_ = null;
    }

    /// <summary>Field number for the "topics" field.</summary>
    public const int TopicsFieldNumber = 5;
    private static readonly pb::FieldCodec<string> _repeated_topics_codec
        = pb::FieldCodec.ForString(42);
    private readonly pbc::RepeatedField<string> topics_ = new pbc::RepeatedField<string>();
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public pbc::RepeatedField<string> Topics {
      get { return topics_; }
    }

    /// <summary>Field number for the "subtopics" field.</summary>
    public const int SubtopicsFieldNumber = 6;
    private static readonly pb::FieldCodec<string> _repeated_subtopics_codec
        = pb::FieldCodec.ForString(50);
    private readonly pbc::RepeatedField<string> subtopics_ = new pbc::RepeatedField<string>();
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public pbc::RepeatedField<string> Subtopics {
      get { return subtopics_; }
    }

    /// <summary>Field number for the "results" field.</summary>
    public const int ResultsFieldNumber = 7;
    private global::LeanCloud.Realtime.Internal.Protocol.JsonObjectMessage results_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public global::LeanCloud.Realtime.Internal.Protocol.JsonObjectMessage Results {
      get { return results_; }
      set {
        results_ = value;
      }
    }
    /// <summary>Gets whether the results field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasResults {
      get { return results_ != null; }
    }
    /// <summary>Clears the value of the results field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearResults() {
      results_ = null;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override bool Equals(object other) {
      return Equals(other as PubsubCommand);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool Equals(PubsubCommand other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (Cid != other.Cid) return false;
      if(!cids_.Equals(other.cids_)) return false;
      if (Topic != other.Topic) return false;
      if (Subtopic != other.Subtopic) return false;
      if(!topics_.Equals(other.topics_)) return false;
      if(!subtopics_.Equals(other.subtopics_)) return false;
      if (!object.Equals(Results, other.Results)) return false;
      return Equals(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override int GetHashCode() {
      int hash = 1;
      if (HasCid) hash ^= Cid.GetHashCode();
      hash ^= cids_.GetHashCode();
      if (HasTopic) hash ^= Topic.GetHashCode();
      if (HasSubtopic) hash ^= Subtopic.GetHashCode();
      hash ^= topics_.GetHashCode();
      hash ^= subtopics_.GetHashCode();
      if (HasResults) hash ^= Results.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 (HasCid) {
        output.WriteRawTag(10);
        output.WriteString(Cid);
      }
      cids_.WriteTo(output, _repeated_cids_codec);
      if (HasTopic) {
        output.WriteRawTag(26);
        output.WriteString(Topic);
      }
      if (HasSubtopic) {
        output.WriteRawTag(34);
        output.WriteString(Subtopic);
      }
      topics_.WriteTo(output, _repeated_topics_codec);
      subtopics_.WriteTo(output, _repeated_subtopics_codec);
      if (HasResults) {
        output.WriteRawTag(58);
        output.WriteMessage(Results);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(output);
      }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public int CalculateSize() {
      int size = 0;
      if (HasCid) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(Cid);
      }
      size += cids_.CalculateSize(_repeated_cids_codec);
      if (HasTopic) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(Topic);
      }
      if (HasSubtopic) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(Subtopic);
      }
      size += topics_.CalculateSize(_repeated_topics_codec);
      size += subtopics_.CalculateSize(_repeated_subtopics_codec);
      if (HasResults) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(Results);
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void MergeFrom(PubsubCommand other) {
      if (other == null) {
        return;
      }
      if (other.HasCid) {
        Cid = other.Cid;
      }
      cids_.Add(other.cids_);
      if (other.HasTopic) {
        Topic = other.Topic;
      }
      if (other.HasSubtopic) {
        Subtopic = other.Subtopic;
      }
      topics_.Add(other.topics_);
      subtopics_.Add(other.subtopics_);
      if (other.HasResults) {
        if (!HasResults) {
          Results = new global::LeanCloud.Realtime.Internal.Protocol.JsonObjectMessage();
        }
        Results.MergeFrom(other.Results);
      }
      _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: {
            Cid = input.ReadString();
            break;
          }
          case 18: {
            cids_.AddEntriesFrom(input, _repeated_cids_codec);
            break;
          }
          case 26: {
            Topic = input.ReadString();
            break;
          }
          case 34: {
            Subtopic = input.ReadString();
            break;
          }
          case 42: {
            topics_.AddEntriesFrom(input, _repeated_topics_codec);
            break;
          }
          case 50: {
            subtopics_.AddEntriesFrom(input, _repeated_subtopics_codec);
            break;
          }
          case 58: {
            if (!HasResults) {
              Results = new global::LeanCloud.Realtime.Internal.Protocol.JsonObjectMessage();
            }
            input.ReadMessage(Results);
            break;
          }
        }
      }
    }

  }

  public sealed partial class BlacklistCommand : pb::IMessage<BlacklistCommand> {
    private static readonly pb::MessageParser<BlacklistCommand> _parser = new pb::MessageParser<BlacklistCommand>(() => new BlacklistCommand());
    private pb::UnknownFieldSet _unknownFields;
    private int _hasBits0;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pb::MessageParser<BlacklistCommand> Parser { get { return _parser; } }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pbr::MessageDescriptor Descriptor {
      get { return global::LeanCloud.Realtime.Internal.Protocol.Messages2ProtoReflection.Descriptor.MessageTypes[27]; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public BlacklistCommand() {
      OnConstruction();
    }

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public BlacklistCommand(BlacklistCommand other) : this() {
      _hasBits0 = other._hasBits0;
      srcCid_ = other.srcCid_;
      toPids_ = other.toPids_.Clone();
      srcPid_ = other.srcPid_;
      toCids_ = other.toCids_.Clone();
      limit_ = other.limit_;
      next_ = other.next_;
      blockedPids_ = other.blockedPids_.Clone();
      blockedCids_ = other.blockedCids_.Clone();
      allowedPids_ = other.allowedPids_.Clone();
      failedPids_ = other.failedPids_.Clone();
      t_ = other.t_;
      n_ = other.n_;
      s_ = other.s_;
      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public BlacklistCommand Clone() {
      return new BlacklistCommand(this);
    }

    /// <summary>Field number for the "srcCid" field.</summary>
    public const int SrcCidFieldNumber = 1;
    private readonly static string SrcCidDefaultValue = "";

    private string srcCid_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string SrcCid {
      get { return srcCid_ ?? SrcCidDefaultValue; }
      set {
        srcCid_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }
    /// <summary>Gets whether the "srcCid" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasSrcCid {
      get { return srcCid_ != null; }
    }
    /// <summary>Clears the value of the "srcCid" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearSrcCid() {
      srcCid_ = null;
    }

    /// <summary>Field number for the "toPids" field.</summary>
    public const int ToPidsFieldNumber = 2;
    private static readonly pb::FieldCodec<string> _repeated_toPids_codec
        = pb::FieldCodec.ForString(18);
    private readonly pbc::RepeatedField<string> toPids_ = new pbc::RepeatedField<string>();
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public pbc::RepeatedField<string> ToPids {
      get { return toPids_; }
    }

    /// <summary>Field number for the "srcPid" field.</summary>
    public const int SrcPidFieldNumber = 3;
    private readonly static string SrcPidDefaultValue = "";

    private string srcPid_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string SrcPid {
      get { return srcPid_ ?? SrcPidDefaultValue; }
      set {
        srcPid_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }
    /// <summary>Gets whether the "srcPid" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasSrcPid {
      get { return srcPid_ != null; }
    }
    /// <summary>Clears the value of the "srcPid" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearSrcPid() {
      srcPid_ = null;
    }

    /// <summary>Field number for the "toCids" field.</summary>
    public const int ToCidsFieldNumber = 4;
    private static readonly pb::FieldCodec<string> _repeated_toCids_codec
        = pb::FieldCodec.ForString(34);
    private readonly pbc::RepeatedField<string> toCids_ = new pbc::RepeatedField<string>();
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public pbc::RepeatedField<string> ToCids {
      get { return toCids_; }
    }

    /// <summary>Field number for the "limit" field.</summary>
    public const int LimitFieldNumber = 5;
    private readonly static int LimitDefaultValue = 0;

    private int limit_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public int Limit {
      get { if ((_hasBits0 & 1) != 0) { return limit_; } else { return LimitDefaultValue; } }
      set {
        _hasBits0 |= 1;
        limit_ = value;
      }
    }
    /// <summary>Gets whether the "limit" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasLimit {
      get { return (_hasBits0 & 1) != 0; }
    }
    /// <summary>Clears the value of the "limit" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearLimit() {
      _hasBits0 &= ~1;
    }

    /// <summary>Field number for the "next" field.</summary>
    public const int NextFieldNumber = 6;
    private readonly static string NextDefaultValue = "";

    private string next_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string Next {
      get { return next_ ?? NextDefaultValue; }
      set {
        next_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }
    /// <summary>Gets whether the "next" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasNext {
      get { return next_ != null; }
    }
    /// <summary>Clears the value of the "next" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearNext() {
      next_ = null;
    }

    /// <summary>Field number for the "blockedPids" field.</summary>
    public const int BlockedPidsFieldNumber = 8;
    private static readonly pb::FieldCodec<string> _repeated_blockedPids_codec
        = pb::FieldCodec.ForString(66);
    private readonly pbc::RepeatedField<string> blockedPids_ = new pbc::RepeatedField<string>();
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public pbc::RepeatedField<string> BlockedPids {
      get { return blockedPids_; }
    }

    /// <summary>Field number for the "blockedCids" field.</summary>
    public const int BlockedCidsFieldNumber = 9;
    private static readonly pb::FieldCodec<string> _repeated_blockedCids_codec
        = pb::FieldCodec.ForString(74);
    private readonly pbc::RepeatedField<string> blockedCids_ = new pbc::RepeatedField<string>();
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public pbc::RepeatedField<string> BlockedCids {
      get { return blockedCids_; }
    }

    /// <summary>Field number for the "allowedPids" field.</summary>
    public const int AllowedPidsFieldNumber = 10;
    private static readonly pb::FieldCodec<string> _repeated_allowedPids_codec
        = pb::FieldCodec.ForString(82);
    private readonly pbc::RepeatedField<string> allowedPids_ = new pbc::RepeatedField<string>();
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public pbc::RepeatedField<string> AllowedPids {
      get { return allowedPids_; }
    }

    /// <summary>Field number for the "failedPids" field.</summary>
    public const int FailedPidsFieldNumber = 11;
    private static readonly pb::FieldCodec<global::LeanCloud.Realtime.Internal.Protocol.ErrorCommand> _repeated_failedPids_codec
        = pb::FieldCodec.ForMessage(90, global::LeanCloud.Realtime.Internal.Protocol.ErrorCommand.Parser);
    private readonly pbc::RepeatedField<global::LeanCloud.Realtime.Internal.Protocol.ErrorCommand> failedPids_ = new pbc::RepeatedField<global::LeanCloud.Realtime.Internal.Protocol.ErrorCommand>();
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public pbc::RepeatedField<global::LeanCloud.Realtime.Internal.Protocol.ErrorCommand> FailedPids {
      get { return failedPids_; }
    }

    /// <summary>Field number for the "t" field.</summary>
    public const int TFieldNumber = 12;
    private readonly static long TDefaultValue = 0L;

    private long t_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public long T {
      get { if ((_hasBits0 & 2) != 0) { return t_; } else { return TDefaultValue; } }
      set {
        _hasBits0 |= 2;
        t_ = value;
      }
    }
    /// <summary>Gets whether the "t" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasT {
      get { return (_hasBits0 & 2) != 0; }
    }
    /// <summary>Clears the value of the "t" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearT() {
      _hasBits0 &= ~2;
    }

    /// <summary>Field number for the "n" field.</summary>
    public const int NFieldNumber = 13;
    private readonly static string NDefaultValue = "";

    private string n_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string N {
      get { return n_ ?? NDefaultValue; }
      set {
        n_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }
    /// <summary>Gets whether the "n" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasN {
      get { return n_ != null; }
    }
    /// <summary>Clears the value of the "n" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearN() {
      n_ = null;
    }

    /// <summary>Field number for the "s" field.</summary>
    public const int SFieldNumber = 14;
    private readonly static string SDefaultValue = "";

    private string s_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string S {
      get { return s_ ?? SDefaultValue; }
      set {
        s_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }
    /// <summary>Gets whether the "s" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasS {
      get { return s_ != null; }
    }
    /// <summary>Clears the value of the "s" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearS() {
      s_ = null;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override bool Equals(object other) {
      return Equals(other as BlacklistCommand);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool Equals(BlacklistCommand other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (SrcCid != other.SrcCid) return false;
      if(!toPids_.Equals(other.toPids_)) return false;
      if (SrcPid != other.SrcPid) return false;
      if(!toCids_.Equals(other.toCids_)) return false;
      if (Limit != other.Limit) return false;
      if (Next != other.Next) return false;
      if(!blockedPids_.Equals(other.blockedPids_)) return false;
      if(!blockedCids_.Equals(other.blockedCids_)) return false;
      if(!allowedPids_.Equals(other.allowedPids_)) return false;
      if(!failedPids_.Equals(other.failedPids_)) return false;
      if (T != other.T) return false;
      if (N != other.N) return false;
      if (S != other.S) return false;
      return Equals(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override int GetHashCode() {
      int hash = 1;
      if (HasSrcCid) hash ^= SrcCid.GetHashCode();
      hash ^= toPids_.GetHashCode();
      if (HasSrcPid) hash ^= SrcPid.GetHashCode();
      hash ^= toCids_.GetHashCode();
      if (HasLimit) hash ^= Limit.GetHashCode();
      if (HasNext) hash ^= Next.GetHashCode();
      hash ^= blockedPids_.GetHashCode();
      hash ^= blockedCids_.GetHashCode();
      hash ^= allowedPids_.GetHashCode();
      hash ^= failedPids_.GetHashCode();
      if (HasT) hash ^= T.GetHashCode();
      if (HasN) hash ^= N.GetHashCode();
      if (HasS) hash ^= S.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 (HasSrcCid) {
        output.WriteRawTag(10);
        output.WriteString(SrcCid);
      }
      toPids_.WriteTo(output, _repeated_toPids_codec);
      if (HasSrcPid) {
        output.WriteRawTag(26);
        output.WriteString(SrcPid);
      }
      toCids_.WriteTo(output, _repeated_toCids_codec);
      if (HasLimit) {
        output.WriteRawTag(40);
        output.WriteInt32(Limit);
      }
      if (HasNext) {
        output.WriteRawTag(50);
        output.WriteString(Next);
      }
      blockedPids_.WriteTo(output, _repeated_blockedPids_codec);
      blockedCids_.WriteTo(output, _repeated_blockedCids_codec);
      allowedPids_.WriteTo(output, _repeated_allowedPids_codec);
      failedPids_.WriteTo(output, _repeated_failedPids_codec);
      if (HasT) {
        output.WriteRawTag(96);
        output.WriteInt64(T);
      }
      if (HasN) {
        output.WriteRawTag(106);
        output.WriteString(N);
      }
      if (HasS) {
        output.WriteRawTag(114);
        output.WriteString(S);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(output);
      }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public int CalculateSize() {
      int size = 0;
      if (HasSrcCid) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(SrcCid);
      }
      size += toPids_.CalculateSize(_repeated_toPids_codec);
      if (HasSrcPid) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(SrcPid);
      }
      size += toCids_.CalculateSize(_repeated_toCids_codec);
      if (HasLimit) {
        size += 1 + pb::CodedOutputStream.ComputeInt32Size(Limit);
      }
      if (HasNext) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(Next);
      }
      size += blockedPids_.CalculateSize(_repeated_blockedPids_codec);
      size += blockedCids_.CalculateSize(_repeated_blockedCids_codec);
      size += allowedPids_.CalculateSize(_repeated_allowedPids_codec);
      size += failedPids_.CalculateSize(_repeated_failedPids_codec);
      if (HasT) {
        size += 1 + pb::CodedOutputStream.ComputeInt64Size(T);
      }
      if (HasN) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(N);
      }
      if (HasS) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(S);
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void MergeFrom(BlacklistCommand other) {
      if (other == null) {
        return;
      }
      if (other.HasSrcCid) {
        SrcCid = other.SrcCid;
      }
      toPids_.Add(other.toPids_);
      if (other.HasSrcPid) {
        SrcPid = other.SrcPid;
      }
      toCids_.Add(other.toCids_);
      if (other.HasLimit) {
        Limit = other.Limit;
      }
      if (other.HasNext) {
        Next = other.Next;
      }
      blockedPids_.Add(other.blockedPids_);
      blockedCids_.Add(other.blockedCids_);
      allowedPids_.Add(other.allowedPids_);
      failedPids_.Add(other.failedPids_);
      if (other.HasT) {
        T = other.T;
      }
      if (other.HasN) {
        N = other.N;
      }
      if (other.HasS) {
        S = other.S;
      }
      _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: {
            SrcCid = input.ReadString();
            break;
          }
          case 18: {
            toPids_.AddEntriesFrom(input, _repeated_toPids_codec);
            break;
          }
          case 26: {
            SrcPid = input.ReadString();
            break;
          }
          case 34: {
            toCids_.AddEntriesFrom(input, _repeated_toCids_codec);
            break;
          }
          case 40: {
            Limit = input.ReadInt32();
            break;
          }
          case 50: {
            Next = input.ReadString();
            break;
          }
          case 66: {
            blockedPids_.AddEntriesFrom(input, _repeated_blockedPids_codec);
            break;
          }
          case 74: {
            blockedCids_.AddEntriesFrom(input, _repeated_blockedCids_codec);
            break;
          }
          case 82: {
            allowedPids_.AddEntriesFrom(input, _repeated_allowedPids_codec);
            break;
          }
          case 90: {
            failedPids_.AddEntriesFrom(input, _repeated_failedPids_codec);
            break;
          }
          case 96: {
            T = input.ReadInt64();
            break;
          }
          case 106: {
            N = input.ReadString();
            break;
          }
          case 114: {
            S = input.ReadString();
            break;
          }
        }
      }
    }

  }

  public sealed partial class GenericCommand : pb::IMessage<GenericCommand> {
    private static readonly pb::MessageParser<GenericCommand> _parser = new pb::MessageParser<GenericCommand>(() => new GenericCommand());
    private pb::UnknownFieldSet _unknownFields;
    private int _hasBits0;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pb::MessageParser<GenericCommand> Parser { get { return _parser; } }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pbr::MessageDescriptor Descriptor {
      get { return global::LeanCloud.Realtime.Internal.Protocol.Messages2ProtoReflection.Descriptor.MessageTypes[28]; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public GenericCommand() {
      OnConstruction();
    }

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public GenericCommand(GenericCommand other) : this() {
      _hasBits0 = other._hasBits0;
      cmd_ = other.cmd_;
      op_ = other.op_;
      appId_ = other.appId_;
      peerId_ = other.peerId_;
      i_ = other.i_;
      installationId_ = other.installationId_;
      priority_ = other.priority_;
      service_ = other.service_;
      serverTs_ = other.serverTs_;
      clientTs_ = other.clientTs_;
      notificationType_ = other.notificationType_;
      loginMessage_ = other.HasLoginMessage ? other.loginMessage_.Clone() : null;
      dataMessage_ = other.HasDataMessage ? other.dataMessage_.Clone() : null;
      sessionMessage_ = other.HasSessionMessage ? other.sessionMessage_.Clone() : null;
      errorMessage_ = other.HasErrorMessage ? other.errorMessage_.Clone() : null;
      directMessage_ = other.HasDirectMessage ? other.directMessage_.Clone() : null;
      ackMessage_ = other.HasAckMessage ? other.ackMessage_.Clone() : null;
      unreadMessage_ = other.HasUnreadMessage ? other.unreadMessage_.Clone() : null;
      readMessage_ = other.HasReadMessage ? other.readMessage_.Clone() : null;
      rcpMessage_ = other.HasRcpMessage ? other.rcpMessage_.Clone() : null;
      logsMessage_ = other.HasLogsMessage ? other.logsMessage_.Clone() : null;
      convMessage_ = other.HasConvMessage ? other.convMessage_.Clone() : null;
      roomMessage_ = other.HasRoomMessage ? other.roomMessage_.Clone() : null;
      presenceMessage_ = other.HasPresenceMessage ? other.presenceMessage_.Clone() : null;
      reportMessage_ = other.HasReportMessage ? other.reportMessage_.Clone() : null;
      patchMessage_ = other.HasPatchMessage ? other.patchMessage_.Clone() : null;
      pubsubMessage_ = other.HasPubsubMessage ? other.pubsubMessage_.Clone() : null;
      blacklistMessage_ = other.HasBlacklistMessage ? other.blacklistMessage_.Clone() : null;
      loggedinMessage_ = other.HasLoggedinMessage ? other.loggedinMessage_.Clone() : null;
      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public GenericCommand Clone() {
      return new GenericCommand(this);
    }

    /// <summary>Field number for the "cmd" field.</summary>
    public const int CmdFieldNumber = 1;
    private readonly static global::LeanCloud.Realtime.Internal.Protocol.CommandType CmdDefaultValue = global::LeanCloud.Realtime.Internal.Protocol.CommandType.Session;

    private global::LeanCloud.Realtime.Internal.Protocol.CommandType cmd_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public global::LeanCloud.Realtime.Internal.Protocol.CommandType Cmd {
      get { if ((_hasBits0 & 1) != 0) { return cmd_; } else { return CmdDefaultValue; } }
      set {
        _hasBits0 |= 1;
        cmd_ = value;
      }
    }
    /// <summary>Gets whether the "cmd" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasCmd {
      get { return (_hasBits0 & 1) != 0; }
    }
    /// <summary>Clears the value of the "cmd" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearCmd() {
      _hasBits0 &= ~1;
    }

    /// <summary>Field number for the "op" field.</summary>
    public const int OpFieldNumber = 2;
    private readonly static global::LeanCloud.Realtime.Internal.Protocol.OpType OpDefaultValue = global::LeanCloud.Realtime.Internal.Protocol.OpType.Open;

    private global::LeanCloud.Realtime.Internal.Protocol.OpType op_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public global::LeanCloud.Realtime.Internal.Protocol.OpType Op {
      get { if ((_hasBits0 & 2) != 0) { return op_; } else { return OpDefaultValue; } }
      set {
        _hasBits0 |= 2;
        op_ = value;
      }
    }
    /// <summary>Gets whether the "op" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasOp {
      get { return (_hasBits0 & 2) != 0; }
    }
    /// <summary>Clears the value of the "op" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearOp() {
      _hasBits0 &= ~2;
    }

    /// <summary>Field number for the "appId" field.</summary>
    public const int AppIdFieldNumber = 3;
    private readonly static string AppIdDefaultValue = "";

    private string appId_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string AppId {
      get { return appId_ ?? AppIdDefaultValue; }
      set {
        appId_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }
    /// <summary>Gets whether the "appId" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasAppId {
      get { return appId_ != null; }
    }
    /// <summary>Clears the value of the "appId" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearAppId() {
      appId_ = null;
    }

    /// <summary>Field number for the "peerId" field.</summary>
    public const int PeerIdFieldNumber = 4;
    private readonly static string PeerIdDefaultValue = "";

    private string peerId_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string PeerId {
      get { return peerId_ ?? PeerIdDefaultValue; }
      set {
        peerId_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }
    /// <summary>Gets whether the "peerId" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasPeerId {
      get { return peerId_ != null; }
    }
    /// <summary>Clears the value of the "peerId" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearPeerId() {
      peerId_ = null;
    }

    /// <summary>Field number for the "i" field.</summary>
    public const int IFieldNumber = 5;
    private readonly static int IDefaultValue = 0;

    private int i_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public int I {
      get { if ((_hasBits0 & 4) != 0) { return i_; } else { return IDefaultValue; } }
      set {
        _hasBits0 |= 4;
        i_ = value;
      }
    }
    /// <summary>Gets whether the "i" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasI {
      get { return (_hasBits0 & 4) != 0; }
    }
    /// <summary>Clears the value of the "i" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearI() {
      _hasBits0 &= ~4;
    }

    /// <summary>Field number for the "installationId" field.</summary>
    public const int InstallationIdFieldNumber = 6;
    private readonly static string InstallationIdDefaultValue = "";

    private string installationId_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string InstallationId {
      get { return installationId_ ?? InstallationIdDefaultValue; }
      set {
        installationId_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }
    /// <summary>Gets whether the "installationId" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasInstallationId {
      get { return installationId_ != null; }
    }
    /// <summary>Clears the value of the "installationId" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearInstallationId() {
      installationId_ = null;
    }

    /// <summary>Field number for the "priority" field.</summary>
    public const int PriorityFieldNumber = 7;
    private readonly static int PriorityDefaultValue = 0;

    private int priority_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public int Priority {
      get { if ((_hasBits0 & 8) != 0) { return priority_; } else { return PriorityDefaultValue; } }
      set {
        _hasBits0 |= 8;
        priority_ = value;
      }
    }
    /// <summary>Gets whether the "priority" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasPriority {
      get { return (_hasBits0 & 8) != 0; }
    }
    /// <summary>Clears the value of the "priority" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearPriority() {
      _hasBits0 &= ~8;
    }

    /// <summary>Field number for the "service" field.</summary>
    public const int ServiceFieldNumber = 8;
    private readonly static int ServiceDefaultValue = 0;

    private int service_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public int Service {
      get { if ((_hasBits0 & 16) != 0) { return service_; } else { return ServiceDefaultValue; } }
      set {
        _hasBits0 |= 16;
        service_ = value;
      }
    }
    /// <summary>Gets whether the "service" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasService {
      get { return (_hasBits0 & 16) != 0; }
    }
    /// <summary>Clears the value of the "service" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearService() {
      _hasBits0 &= ~16;
    }

    /// <summary>Field number for the "serverTs" field.</summary>
    public const int ServerTsFieldNumber = 9;
    private readonly static long ServerTsDefaultValue = 0L;

    private long serverTs_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public long ServerTs {
      get { if ((_hasBits0 & 32) != 0) { return serverTs_; } else { return ServerTsDefaultValue; } }
      set {
        _hasBits0 |= 32;
        serverTs_ = value;
      }
    }
    /// <summary>Gets whether the "serverTs" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasServerTs {
      get { return (_hasBits0 & 32) != 0; }
    }
    /// <summary>Clears the value of the "serverTs" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearServerTs() {
      _hasBits0 &= ~32;
    }

    /// <summary>Field number for the "clientTs" field.</summary>
    public const int ClientTsFieldNumber = 10;
    private readonly static long ClientTsDefaultValue = 0L;

    private long clientTs_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public long ClientTs {
      get { if ((_hasBits0 & 64) != 0) { return clientTs_; } else { return ClientTsDefaultValue; } }
      set {
        _hasBits0 |= 64;
        clientTs_ = value;
      }
    }
    /// <summary>Gets whether the "clientTs" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasClientTs {
      get { return (_hasBits0 & 64) != 0; }
    }
    /// <summary>Clears the value of the "clientTs" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearClientTs() {
      _hasBits0 &= ~64;
    }

    /// <summary>Field number for the "notificationType" field.</summary>
    public const int NotificationTypeFieldNumber = 11;
    private readonly static int NotificationTypeDefaultValue = 0;

    private int notificationType_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public int NotificationType {
      get { if ((_hasBits0 & 128) != 0) { return notificationType_; } else { return NotificationTypeDefaultValue; } }
      set {
        _hasBits0 |= 128;
        notificationType_ = value;
      }
    }
    /// <summary>Gets whether the "notificationType" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasNotificationType {
      get { return (_hasBits0 & 128) != 0; }
    }
    /// <summary>Clears the value of the "notificationType" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearNotificationType() {
      _hasBits0 &= ~128;
    }

    /// <summary>Field number for the "loginMessage" field.</summary>
    public const int LoginMessageFieldNumber = 100;
    private global::LeanCloud.Realtime.Internal.Protocol.LoginCommand loginMessage_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public global::LeanCloud.Realtime.Internal.Protocol.LoginCommand LoginMessage {
      get { return loginMessage_; }
      set {
        loginMessage_ = value;
      }
    }
    /// <summary>Gets whether the loginMessage field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasLoginMessage {
      get { return loginMessage_ != null; }
    }
    /// <summary>Clears the value of the loginMessage field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearLoginMessage() {
      loginMessage_ = null;
    }

    /// <summary>Field number for the "dataMessage" field.</summary>
    public const int DataMessageFieldNumber = 101;
    private global::LeanCloud.Realtime.Internal.Protocol.DataCommand dataMessage_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public global::LeanCloud.Realtime.Internal.Protocol.DataCommand DataMessage {
      get { return dataMessage_; }
      set {
        dataMessage_ = value;
      }
    }
    /// <summary>Gets whether the dataMessage field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasDataMessage {
      get { return dataMessage_ != null; }
    }
    /// <summary>Clears the value of the dataMessage field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearDataMessage() {
      dataMessage_ = null;
    }

    /// <summary>Field number for the "sessionMessage" field.</summary>
    public const int SessionMessageFieldNumber = 102;
    private global::LeanCloud.Realtime.Internal.Protocol.SessionCommand sessionMessage_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public global::LeanCloud.Realtime.Internal.Protocol.SessionCommand SessionMessage {
      get { return sessionMessage_; }
      set {
        sessionMessage_ = value;
      }
    }
    /// <summary>Gets whether the sessionMessage field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasSessionMessage {
      get { return sessionMessage_ != null; }
    }
    /// <summary>Clears the value of the sessionMessage field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearSessionMessage() {
      sessionMessage_ = null;
    }

    /// <summary>Field number for the "errorMessage" field.</summary>
    public const int ErrorMessageFieldNumber = 103;
    private global::LeanCloud.Realtime.Internal.Protocol.ErrorCommand errorMessage_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public global::LeanCloud.Realtime.Internal.Protocol.ErrorCommand ErrorMessage {
      get { return errorMessage_; }
      set {
        errorMessage_ = value;
      }
    }
    /// <summary>Gets whether the errorMessage field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasErrorMessage {
      get { return errorMessage_ != null; }
    }
    /// <summary>Clears the value of the errorMessage field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearErrorMessage() {
      errorMessage_ = null;
    }

    /// <summary>Field number for the "directMessage" field.</summary>
    public const int DirectMessageFieldNumber = 104;
    private global::LeanCloud.Realtime.Internal.Protocol.DirectCommand directMessage_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public global::LeanCloud.Realtime.Internal.Protocol.DirectCommand DirectMessage {
      get { return directMessage_; }
      set {
        directMessage_ = value;
      }
    }
    /// <summary>Gets whether the directMessage field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasDirectMessage {
      get { return directMessage_ != null; }
    }
    /// <summary>Clears the value of the directMessage field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearDirectMessage() {
      directMessage_ = null;
    }

    /// <summary>Field number for the "ackMessage" field.</summary>
    public const int AckMessageFieldNumber = 105;
    private global::LeanCloud.Realtime.Internal.Protocol.AckCommand ackMessage_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public global::LeanCloud.Realtime.Internal.Protocol.AckCommand AckMessage {
      get { return ackMessage_; }
      set {
        ackMessage_ = value;
      }
    }
    /// <summary>Gets whether the ackMessage field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasAckMessage {
      get { return ackMessage_ != null; }
    }
    /// <summary>Clears the value of the ackMessage field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearAckMessage() {
      ackMessage_ = null;
    }

    /// <summary>Field number for the "unreadMessage" field.</summary>
    public const int UnreadMessageFieldNumber = 106;
    private global::LeanCloud.Realtime.Internal.Protocol.UnreadCommand unreadMessage_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public global::LeanCloud.Realtime.Internal.Protocol.UnreadCommand UnreadMessage {
      get { return unreadMessage_; }
      set {
        unreadMessage_ = value;
      }
    }
    /// <summary>Gets whether the unreadMessage field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasUnreadMessage {
      get { return unreadMessage_ != null; }
    }
    /// <summary>Clears the value of the unreadMessage field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearUnreadMessage() {
      unreadMessage_ = null;
    }

    /// <summary>Field number for the "readMessage" field.</summary>
    public const int ReadMessageFieldNumber = 107;
    private global::LeanCloud.Realtime.Internal.Protocol.ReadCommand readMessage_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public global::LeanCloud.Realtime.Internal.Protocol.ReadCommand ReadMessage {
      get { return readMessage_; }
      set {
        readMessage_ = value;
      }
    }
    /// <summary>Gets whether the readMessage field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasReadMessage {
      get { return readMessage_ != null; }
    }
    /// <summary>Clears the value of the readMessage field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearReadMessage() {
      readMessage_ = null;
    }

    /// <summary>Field number for the "rcpMessage" field.</summary>
    public const int RcpMessageFieldNumber = 108;
    private global::LeanCloud.Realtime.Internal.Protocol.RcpCommand rcpMessage_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public global::LeanCloud.Realtime.Internal.Protocol.RcpCommand RcpMessage {
      get { return rcpMessage_; }
      set {
        rcpMessage_ = value;
      }
    }
    /// <summary>Gets whether the rcpMessage field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasRcpMessage {
      get { return rcpMessage_ != null; }
    }
    /// <summary>Clears the value of the rcpMessage field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearRcpMessage() {
      rcpMessage_ = null;
    }

    /// <summary>Field number for the "logsMessage" field.</summary>
    public const int LogsMessageFieldNumber = 109;
    private global::LeanCloud.Realtime.Internal.Protocol.LogsCommand logsMessage_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public global::LeanCloud.Realtime.Internal.Protocol.LogsCommand LogsMessage {
      get { return logsMessage_; }
      set {
        logsMessage_ = value;
      }
    }
    /// <summary>Gets whether the logsMessage field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasLogsMessage {
      get { return logsMessage_ != null; }
    }
    /// <summary>Clears the value of the logsMessage field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearLogsMessage() {
      logsMessage_ = null;
    }

    /// <summary>Field number for the "convMessage" field.</summary>
    public const int ConvMessageFieldNumber = 110;
    private global::LeanCloud.Realtime.Internal.Protocol.ConvCommand convMessage_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public global::LeanCloud.Realtime.Internal.Protocol.ConvCommand ConvMessage {
      get { return convMessage_; }
      set {
        convMessage_ = value;
      }
    }
    /// <summary>Gets whether the convMessage field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasConvMessage {
      get { return convMessage_ != null; }
    }
    /// <summary>Clears the value of the convMessage field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearConvMessage() {
      convMessage_ = null;
    }

    /// <summary>Field number for the "roomMessage" field.</summary>
    public const int RoomMessageFieldNumber = 111;
    private global::LeanCloud.Realtime.Internal.Protocol.RoomCommand roomMessage_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public global::LeanCloud.Realtime.Internal.Protocol.RoomCommand RoomMessage {
      get { return roomMessage_; }
      set {
        roomMessage_ = value;
      }
    }
    /// <summary>Gets whether the roomMessage field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasRoomMessage {
      get { return roomMessage_ != null; }
    }
    /// <summary>Clears the value of the roomMessage field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearRoomMessage() {
      roomMessage_ = null;
    }

    /// <summary>Field number for the "presenceMessage" field.</summary>
    public const int PresenceMessageFieldNumber = 112;
    private global::LeanCloud.Realtime.Internal.Protocol.PresenceCommand presenceMessage_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public global::LeanCloud.Realtime.Internal.Protocol.PresenceCommand PresenceMessage {
      get { return presenceMessage_; }
      set {
        presenceMessage_ = value;
      }
    }
    /// <summary>Gets whether the presenceMessage field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasPresenceMessage {
      get { return presenceMessage_ != null; }
    }
    /// <summary>Clears the value of the presenceMessage field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearPresenceMessage() {
      presenceMessage_ = null;
    }

    /// <summary>Field number for the "reportMessage" field.</summary>
    public const int ReportMessageFieldNumber = 113;
    private global::LeanCloud.Realtime.Internal.Protocol.ReportCommand reportMessage_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public global::LeanCloud.Realtime.Internal.Protocol.ReportCommand ReportMessage {
      get { return reportMessage_; }
      set {
        reportMessage_ = value;
      }
    }
    /// <summary>Gets whether the reportMessage field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasReportMessage {
      get { return reportMessage_ != null; }
    }
    /// <summary>Clears the value of the reportMessage field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearReportMessage() {
      reportMessage_ = null;
    }

    /// <summary>Field number for the "patchMessage" field.</summary>
    public const int PatchMessageFieldNumber = 114;
    private global::LeanCloud.Realtime.Internal.Protocol.PatchCommand patchMessage_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public global::LeanCloud.Realtime.Internal.Protocol.PatchCommand PatchMessage {
      get { return patchMessage_; }
      set {
        patchMessage_ = value;
      }
    }
    /// <summary>Gets whether the patchMessage field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasPatchMessage {
      get { return patchMessage_ != null; }
    }
    /// <summary>Clears the value of the patchMessage field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearPatchMessage() {
      patchMessage_ = null;
    }

    /// <summary>Field number for the "pubsubMessage" field.</summary>
    public const int PubsubMessageFieldNumber = 115;
    private global::LeanCloud.Realtime.Internal.Protocol.PubsubCommand pubsubMessage_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public global::LeanCloud.Realtime.Internal.Protocol.PubsubCommand PubsubMessage {
      get { return pubsubMessage_; }
      set {
        pubsubMessage_ = value;
      }
    }
    /// <summary>Gets whether the pubsubMessage field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasPubsubMessage {
      get { return pubsubMessage_ != null; }
    }
    /// <summary>Clears the value of the pubsubMessage field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearPubsubMessage() {
      pubsubMessage_ = null;
    }

    /// <summary>Field number for the "blacklistMessage" field.</summary>
    public const int BlacklistMessageFieldNumber = 116;
    private global::LeanCloud.Realtime.Internal.Protocol.BlacklistCommand blacklistMessage_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public global::LeanCloud.Realtime.Internal.Protocol.BlacklistCommand BlacklistMessage {
      get { return blacklistMessage_; }
      set {
        blacklistMessage_ = value;
      }
    }
    /// <summary>Gets whether the blacklistMessage field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasBlacklistMessage {
      get { return blacklistMessage_ != null; }
    }
    /// <summary>Clears the value of the blacklistMessage field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearBlacklistMessage() {
      blacklistMessage_ = null;
    }

    /// <summary>Field number for the "loggedinMessage" field.</summary>
    public const int LoggedinMessageFieldNumber = 117;
    private global::LeanCloud.Realtime.Internal.Protocol.LoggedinCommand loggedinMessage_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public global::LeanCloud.Realtime.Internal.Protocol.LoggedinCommand LoggedinMessage {
      get { return loggedinMessage_; }
      set {
        loggedinMessage_ = value;
      }
    }
    /// <summary>Gets whether the loggedinMessage field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool HasLoggedinMessage {
      get { return loggedinMessage_ != null; }
    }
    /// <summary>Clears the value of the loggedinMessage field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearLoggedinMessage() {
      loggedinMessage_ = null;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override bool Equals(object other) {
      return Equals(other as GenericCommand);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool Equals(GenericCommand other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (Cmd != other.Cmd) return false;
      if (Op != other.Op) return false;
      if (AppId != other.AppId) return false;
      if (PeerId != other.PeerId) return false;
      if (I != other.I) return false;
      if (InstallationId != other.InstallationId) return false;
      if (Priority != other.Priority) return false;
      if (Service != other.Service) return false;
      if (ServerTs != other.ServerTs) return false;
      if (ClientTs != other.ClientTs) return false;
      if (NotificationType != other.NotificationType) return false;
      if (!object.Equals(LoginMessage, other.LoginMessage)) return false;
      if (!object.Equals(DataMessage, other.DataMessage)) return false;
      if (!object.Equals(SessionMessage, other.SessionMessage)) return false;
      if (!object.Equals(ErrorMessage, other.ErrorMessage)) return false;
      if (!object.Equals(DirectMessage, other.DirectMessage)) return false;
      if (!object.Equals(AckMessage, other.AckMessage)) return false;
      if (!object.Equals(UnreadMessage, other.UnreadMessage)) return false;
      if (!object.Equals(ReadMessage, other.ReadMessage)) return false;
      if (!object.Equals(RcpMessage, other.RcpMessage)) return false;
      if (!object.Equals(LogsMessage, other.LogsMessage)) return false;
      if (!object.Equals(ConvMessage, other.ConvMessage)) return false;
      if (!object.Equals(RoomMessage, other.RoomMessage)) return false;
      if (!object.Equals(PresenceMessage, other.PresenceMessage)) return false;
      if (!object.Equals(ReportMessage, other.ReportMessage)) return false;
      if (!object.Equals(PatchMessage, other.PatchMessage)) return false;
      if (!object.Equals(PubsubMessage, other.PubsubMessage)) return false;
      if (!object.Equals(BlacklistMessage, other.BlacklistMessage)) return false;
      if (!object.Equals(LoggedinMessage, other.LoggedinMessage)) return false;
      return Equals(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override int GetHashCode() {
      int hash = 1;
      if (HasCmd) hash ^= Cmd.GetHashCode();
      if (HasOp) hash ^= Op.GetHashCode();
      if (HasAppId) hash ^= AppId.GetHashCode();
      if (HasPeerId) hash ^= PeerId.GetHashCode();
      if (HasI) hash ^= I.GetHashCode();
      if (HasInstallationId) hash ^= InstallationId.GetHashCode();
      if (HasPriority) hash ^= Priority.GetHashCode();
      if (HasService) hash ^= Service.GetHashCode();
      if (HasServerTs) hash ^= ServerTs.GetHashCode();
      if (HasClientTs) hash ^= ClientTs.GetHashCode();
      if (HasNotificationType) hash ^= NotificationType.GetHashCode();
      if (HasLoginMessage) hash ^= LoginMessage.GetHashCode();
      if (HasDataMessage) hash ^= DataMessage.GetHashCode();
      if (HasSessionMessage) hash ^= SessionMessage.GetHashCode();
      if (HasErrorMessage) hash ^= ErrorMessage.GetHashCode();
      if (HasDirectMessage) hash ^= DirectMessage.GetHashCode();
      if (HasAckMessage) hash ^= AckMessage.GetHashCode();
      if (HasUnreadMessage) hash ^= UnreadMessage.GetHashCode();
      if (HasReadMessage) hash ^= ReadMessage.GetHashCode();
      if (HasRcpMessage) hash ^= RcpMessage.GetHashCode();
      if (HasLogsMessage) hash ^= LogsMessage.GetHashCode();
      if (HasConvMessage) hash ^= ConvMessage.GetHashCode();
      if (HasRoomMessage) hash ^= RoomMessage.GetHashCode();
      if (HasPresenceMessage) hash ^= PresenceMessage.GetHashCode();
      if (HasReportMessage) hash ^= ReportMessage.GetHashCode();
      if (HasPatchMessage) hash ^= PatchMessage.GetHashCode();
      if (HasPubsubMessage) hash ^= PubsubMessage.GetHashCode();
      if (HasBlacklistMessage) hash ^= BlacklistMessage.GetHashCode();
      if (HasLoggedinMessage) hash ^= LoggedinMessage.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 (HasCmd) {
        output.WriteRawTag(8);
        output.WriteEnum((int) Cmd);
      }
      if (HasOp) {
        output.WriteRawTag(16);
        output.WriteEnum((int) Op);
      }
      if (HasAppId) {
        output.WriteRawTag(26);
        output.WriteString(AppId);
      }
      if (HasPeerId) {
        output.WriteRawTag(34);
        output.WriteString(PeerId);
      }
      if (HasI) {
        output.WriteRawTag(40);
        output.WriteInt32(I);
      }
      if (HasInstallationId) {
        output.WriteRawTag(50);
        output.WriteString(InstallationId);
      }
      if (HasPriority) {
        output.WriteRawTag(56);
        output.WriteInt32(Priority);
      }
      if (HasService) {
        output.WriteRawTag(64);
        output.WriteInt32(Service);
      }
      if (HasServerTs) {
        output.WriteRawTag(72);
        output.WriteInt64(ServerTs);
      }
      if (HasClientTs) {
        output.WriteRawTag(80);
        output.WriteInt64(ClientTs);
      }
      if (HasNotificationType) {
        output.WriteRawTag(88);
        output.WriteInt32(NotificationType);
      }
      if (HasLoginMessage) {
        output.WriteRawTag(162, 6);
        output.WriteMessage(LoginMessage);
      }
      if (HasDataMessage) {
        output.WriteRawTag(170, 6);
        output.WriteMessage(DataMessage);
      }
      if (HasSessionMessage) {
        output.WriteRawTag(178, 6);
        output.WriteMessage(SessionMessage);
      }
      if (HasErrorMessage) {
        output.WriteRawTag(186, 6);
        output.WriteMessage(ErrorMessage);
      }
      if (HasDirectMessage) {
        output.WriteRawTag(194, 6);
        output.WriteMessage(DirectMessage);
      }
      if (HasAckMessage) {
        output.WriteRawTag(202, 6);
        output.WriteMessage(AckMessage);
      }
      if (HasUnreadMessage) {
        output.WriteRawTag(210, 6);
        output.WriteMessage(UnreadMessage);
      }
      if (HasReadMessage) {
        output.WriteRawTag(218, 6);
        output.WriteMessage(ReadMessage);
      }
      if (HasRcpMessage) {
        output.WriteRawTag(226, 6);
        output.WriteMessage(RcpMessage);
      }
      if (HasLogsMessage) {
        output.WriteRawTag(234, 6);
        output.WriteMessage(LogsMessage);
      }
      if (HasConvMessage) {
        output.WriteRawTag(242, 6);
        output.WriteMessage(ConvMessage);
      }
      if (HasRoomMessage) {
        output.WriteRawTag(250, 6);
        output.WriteMessage(RoomMessage);
      }
      if (HasPresenceMessage) {
        output.WriteRawTag(130, 7);
        output.WriteMessage(PresenceMessage);
      }
      if (HasReportMessage) {
        output.WriteRawTag(138, 7);
        output.WriteMessage(ReportMessage);
      }
      if (HasPatchMessage) {
        output.WriteRawTag(146, 7);
        output.WriteMessage(PatchMessage);
      }
      if (HasPubsubMessage) {
        output.WriteRawTag(154, 7);
        output.WriteMessage(PubsubMessage);
      }
      if (HasBlacklistMessage) {
        output.WriteRawTag(162, 7);
        output.WriteMessage(BlacklistMessage);
      }
      if (HasLoggedinMessage) {
        output.WriteRawTag(170, 7);
        output.WriteMessage(LoggedinMessage);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(output);
      }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public int CalculateSize() {
      int size = 0;
      if (HasCmd) {
        size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Cmd);
      }
      if (HasOp) {
        size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Op);
      }
      if (HasAppId) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(AppId);
      }
      if (HasPeerId) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(PeerId);
      }
      if (HasI) {
        size += 1 + pb::CodedOutputStream.ComputeInt32Size(I);
      }
      if (HasInstallationId) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(InstallationId);
      }
      if (HasPriority) {
        size += 1 + pb::CodedOutputStream.ComputeInt32Size(Priority);
      }
      if (HasService) {
        size += 1 + pb::CodedOutputStream.ComputeInt32Size(Service);
      }
      if (HasServerTs) {
        size += 1 + pb::CodedOutputStream.ComputeInt64Size(ServerTs);
      }
      if (HasClientTs) {
        size += 1 + pb::CodedOutputStream.ComputeInt64Size(ClientTs);
      }
      if (HasNotificationType) {
        size += 1 + pb::CodedOutputStream.ComputeInt32Size(NotificationType);
      }
      if (HasLoginMessage) {
        size += 2 + pb::CodedOutputStream.ComputeMessageSize(LoginMessage);
      }
      if (HasDataMessage) {
        size += 2 + pb::CodedOutputStream.ComputeMessageSize(DataMessage);
      }
      if (HasSessionMessage) {
        size += 2 + pb::CodedOutputStream.ComputeMessageSize(SessionMessage);
      }
      if (HasErrorMessage) {
        size += 2 + pb::CodedOutputStream.ComputeMessageSize(ErrorMessage);
      }
      if (HasDirectMessage) {
        size += 2 + pb::CodedOutputStream.ComputeMessageSize(DirectMessage);
      }
      if (HasAckMessage) {
        size += 2 + pb::CodedOutputStream.ComputeMessageSize(AckMessage);
      }
      if (HasUnreadMessage) {
        size += 2 + pb::CodedOutputStream.ComputeMessageSize(UnreadMessage);
      }
      if (HasReadMessage) {
        size += 2 + pb::CodedOutputStream.ComputeMessageSize(ReadMessage);
      }
      if (HasRcpMessage) {
        size += 2 + pb::CodedOutputStream.ComputeMessageSize(RcpMessage);
      }
      if (HasLogsMessage) {
        size += 2 + pb::CodedOutputStream.ComputeMessageSize(LogsMessage);
      }
      if (HasConvMessage) {
        size += 2 + pb::CodedOutputStream.ComputeMessageSize(ConvMessage);
      }
      if (HasRoomMessage) {
        size += 2 + pb::CodedOutputStream.ComputeMessageSize(RoomMessage);
      }
      if (HasPresenceMessage) {
        size += 2 + pb::CodedOutputStream.ComputeMessageSize(PresenceMessage);
      }
      if (HasReportMessage) {
        size += 2 + pb::CodedOutputStream.ComputeMessageSize(ReportMessage);
      }
      if (HasPatchMessage) {
        size += 2 + pb::CodedOutputStream.ComputeMessageSize(PatchMessage);
      }
      if (HasPubsubMessage) {
        size += 2 + pb::CodedOutputStream.ComputeMessageSize(PubsubMessage);
      }
      if (HasBlacklistMessage) {
        size += 2 + pb::CodedOutputStream.ComputeMessageSize(BlacklistMessage);
      }
      if (HasLoggedinMessage) {
        size += 2 + pb::CodedOutputStream.ComputeMessageSize(LoggedinMessage);
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void MergeFrom(GenericCommand other) {
      if (other == null) {
        return;
      }
      if (other.HasCmd) {
        Cmd = other.Cmd;
      }
      if (other.HasOp) {
        Op = other.Op;
      }
      if (other.HasAppId) {
        AppId = other.AppId;
      }
      if (other.HasPeerId) {
        PeerId = other.PeerId;
      }
      if (other.HasI) {
        I = other.I;
      }
      if (other.HasInstallationId) {
        InstallationId = other.InstallationId;
      }
      if (other.HasPriority) {
        Priority = other.Priority;
      }
      if (other.HasService) {
        Service = other.Service;
      }
      if (other.HasServerTs) {
        ServerTs = other.ServerTs;
      }
      if (other.HasClientTs) {
        ClientTs = other.ClientTs;
      }
      if (other.HasNotificationType) {
        NotificationType = other.NotificationType;
      }
      if (other.HasLoginMessage) {
        if (!HasLoginMessage) {
          LoginMessage = new global::LeanCloud.Realtime.Internal.Protocol.LoginCommand();
        }
        LoginMessage.MergeFrom(other.LoginMessage);
      }
      if (other.HasDataMessage) {
        if (!HasDataMessage) {
          DataMessage = new global::LeanCloud.Realtime.Internal.Protocol.DataCommand();
        }
        DataMessage.MergeFrom(other.DataMessage);
      }
      if (other.HasSessionMessage) {
        if (!HasSessionMessage) {
          SessionMessage = new global::LeanCloud.Realtime.Internal.Protocol.SessionCommand();
        }
        SessionMessage.MergeFrom(other.SessionMessage);
      }
      if (other.HasErrorMessage) {
        if (!HasErrorMessage) {
          ErrorMessage = new global::LeanCloud.Realtime.Internal.Protocol.ErrorCommand();
        }
        ErrorMessage.MergeFrom(other.ErrorMessage);
      }
      if (other.HasDirectMessage) {
        if (!HasDirectMessage) {
          DirectMessage = new global::LeanCloud.Realtime.Internal.Protocol.DirectCommand();
        }
        DirectMessage.MergeFrom(other.DirectMessage);
      }
      if (other.HasAckMessage) {
        if (!HasAckMessage) {
          AckMessage = new global::LeanCloud.Realtime.Internal.Protocol.AckCommand();
        }
        AckMessage.MergeFrom(other.AckMessage);
      }
      if (other.HasUnreadMessage) {
        if (!HasUnreadMessage) {
          UnreadMessage = new global::LeanCloud.Realtime.Internal.Protocol.UnreadCommand();
        }
        UnreadMessage.MergeFrom(other.UnreadMessage);
      }
      if (other.HasReadMessage) {
        if (!HasReadMessage) {
          ReadMessage = new global::LeanCloud.Realtime.Internal.Protocol.ReadCommand();
        }
        ReadMessage.MergeFrom(other.ReadMessage);
      }
      if (other.HasRcpMessage) {
        if (!HasRcpMessage) {
          RcpMessage = new global::LeanCloud.Realtime.Internal.Protocol.RcpCommand();
        }
        RcpMessage.MergeFrom(other.RcpMessage);
      }
      if (other.HasLogsMessage) {
        if (!HasLogsMessage) {
          LogsMessage = new global::LeanCloud.Realtime.Internal.Protocol.LogsCommand();
        }
        LogsMessage.MergeFrom(other.LogsMessage);
      }
      if (other.HasConvMessage) {
        if (!HasConvMessage) {
          ConvMessage = new global::LeanCloud.Realtime.Internal.Protocol.ConvCommand();
        }
        ConvMessage.MergeFrom(other.ConvMessage);
      }
      if (other.HasRoomMessage) {
        if (!HasRoomMessage) {
          RoomMessage = new global::LeanCloud.Realtime.Internal.Protocol.RoomCommand();
        }
        RoomMessage.MergeFrom(other.RoomMessage);
      }
      if (other.HasPresenceMessage) {
        if (!HasPresenceMessage) {
          PresenceMessage = new global::LeanCloud.Realtime.Internal.Protocol.PresenceCommand();
        }
        PresenceMessage.MergeFrom(other.PresenceMessage);
      }
      if (other.HasReportMessage) {
        if (!HasReportMessage) {
          ReportMessage = new global::LeanCloud.Realtime.Internal.Protocol.ReportCommand();
        }
        ReportMessage.MergeFrom(other.ReportMessage);
      }
      if (other.HasPatchMessage) {
        if (!HasPatchMessage) {
          PatchMessage = new global::LeanCloud.Realtime.Internal.Protocol.PatchCommand();
        }
        PatchMessage.MergeFrom(other.PatchMessage);
      }
      if (other.HasPubsubMessage) {
        if (!HasPubsubMessage) {
          PubsubMessage = new global::LeanCloud.Realtime.Internal.Protocol.PubsubCommand();
        }
        PubsubMessage.MergeFrom(other.PubsubMessage);
      }
      if (other.HasBlacklistMessage) {
        if (!HasBlacklistMessage) {
          BlacklistMessage = new global::LeanCloud.Realtime.Internal.Protocol.BlacklistCommand();
        }
        BlacklistMessage.MergeFrom(other.BlacklistMessage);
      }
      if (other.HasLoggedinMessage) {
        if (!HasLoggedinMessage) {
          LoggedinMessage = new global::LeanCloud.Realtime.Internal.Protocol.LoggedinCommand();
        }
        LoggedinMessage.MergeFrom(other.LoggedinMessage);
      }
      _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: {
            Cmd = (global::LeanCloud.Realtime.Internal.Protocol.CommandType) input.ReadEnum();
            break;
          }
          case 16: {
            Op = (global::LeanCloud.Realtime.Internal.Protocol.OpType) input.ReadEnum();
            break;
          }
          case 26: {
            AppId = input.ReadString();
            break;
          }
          case 34: {
            PeerId = input.ReadString();
            break;
          }
          case 40: {
            I = input.ReadInt32();
            break;
          }
          case 50: {
            InstallationId = input.ReadString();
            break;
          }
          case 56: {
            Priority = input.ReadInt32();
            break;
          }
          case 64: {
            Service = input.ReadInt32();
            break;
          }
          case 72: {
            ServerTs = input.ReadInt64();
            break;
          }
          case 80: {
            ClientTs = input.ReadInt64();
            break;
          }
          case 88: {
            NotificationType = input.ReadInt32();
            break;
          }
          case 802: {
            if (!HasLoginMessage) {
              LoginMessage = new global::LeanCloud.Realtime.Internal.Protocol.LoginCommand();
            }
            input.ReadMessage(LoginMessage);
            break;
          }
          case 810: {
            if (!HasDataMessage) {
              DataMessage = new global::LeanCloud.Realtime.Internal.Protocol.DataCommand();
            }
            input.ReadMessage(DataMessage);
            break;
          }
          case 818: {
            if (!HasSessionMessage) {
              SessionMessage = new global::LeanCloud.Realtime.Internal.Protocol.SessionCommand();
            }
            input.ReadMessage(SessionMessage);
            break;
          }
          case 826: {
            if (!HasErrorMessage) {
              ErrorMessage = new global::LeanCloud.Realtime.Internal.Protocol.ErrorCommand();
            }
            input.ReadMessage(ErrorMessage);
            break;
          }
          case 834: {
            if (!HasDirectMessage) {
              DirectMessage = new global::LeanCloud.Realtime.Internal.Protocol.DirectCommand();
            }
            input.ReadMessage(DirectMessage);
            break;
          }
          case 842: {
            if (!HasAckMessage) {
              AckMessage = new global::LeanCloud.Realtime.Internal.Protocol.AckCommand();
            }
            input.ReadMessage(AckMessage);
            break;
          }
          case 850: {
            if (!HasUnreadMessage) {
              UnreadMessage = new global::LeanCloud.Realtime.Internal.Protocol.UnreadCommand();
            }
            input.ReadMessage(UnreadMessage);
            break;
          }
          case 858: {
            if (!HasReadMessage) {
              ReadMessage = new global::LeanCloud.Realtime.Internal.Protocol.ReadCommand();
            }
            input.ReadMessage(ReadMessage);
            break;
          }
          case 866: {
            if (!HasRcpMessage) {
              RcpMessage = new global::LeanCloud.Realtime.Internal.Protocol.RcpCommand();
            }
            input.ReadMessage(RcpMessage);
            break;
          }
          case 874: {
            if (!HasLogsMessage) {
              LogsMessage = new global::LeanCloud.Realtime.Internal.Protocol.LogsCommand();
            }
            input.ReadMessage(LogsMessage);
            break;
          }
          case 882: {
            if (!HasConvMessage) {
              ConvMessage = new global::LeanCloud.Realtime.Internal.Protocol.ConvCommand();
            }
            input.ReadMessage(ConvMessage);
            break;
          }
          case 890: {
            if (!HasRoomMessage) {
              RoomMessage = new global::LeanCloud.Realtime.Internal.Protocol.RoomCommand();
            }
            input.ReadMessage(RoomMessage);
            break;
          }
          case 898: {
            if (!HasPresenceMessage) {
              PresenceMessage = new global::LeanCloud.Realtime.Internal.Protocol.PresenceCommand();
            }
            input.ReadMessage(PresenceMessage);
            break;
          }
          case 906: {
            if (!HasReportMessage) {
              ReportMessage = new global::LeanCloud.Realtime.Internal.Protocol.ReportCommand();
            }
            input.ReadMessage(ReportMessage);
            break;
          }
          case 914: {
            if (!HasPatchMessage) {
              PatchMessage = new global::LeanCloud.Realtime.Internal.Protocol.PatchCommand();
            }
            input.ReadMessage(PatchMessage);
            break;
          }
          case 922: {
            if (!HasPubsubMessage) {
              PubsubMessage = new global::LeanCloud.Realtime.Internal.Protocol.PubsubCommand();
            }
            input.ReadMessage(PubsubMessage);
            break;
          }
          case 930: {
            if (!HasBlacklistMessage) {
              BlacklistMessage = new global::LeanCloud.Realtime.Internal.Protocol.BlacklistCommand();
            }
            input.ReadMessage(BlacklistMessage);
            break;
          }
          case 938: {
            if (!HasLoggedinMessage) {
              LoggedinMessage = new global::LeanCloud.Realtime.Internal.Protocol.LoggedinCommand();
            }
            input.ReadMessage(LoggedinMessage);
            break;
          }
        }
      }
    }

  }

  #endregion

}

#endregion Designer generated code
