/** * * Autogenerated by Thrift Compiler (0.22.0) * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * */ using System; using System.Collections; using System.Collections.Generic; using System.Text; using System.IO; using System.Linq; using System.Threading; using System.Threading.Tasks; using Thrift; using Thrift.Collections; using System.Runtime.Serialization; using Thrift.Protocol; using Thrift.Protocol.Entities; using Thrift.Protocol.Utilities; using Thrift.Transport; using Thrift.Transport.Client; #pragma warning disable IDE0079 // remove unnecessary pragmas #pragma warning disable IDE0017 // object init can be simplified #pragma warning disable IDE0028 // collection init can be simplified #pragma warning disable IDE0305 // collection init can be simplified #pragma warning disable IDE0034 // simplify default expression #pragma warning disable IDE0066 // use switch expression #pragma warning disable IDE0090 // simplify new expression #pragma warning disable IDE0290 // use primary CTOR #pragma warning disable IDE1006 // parts of the code use IDL spelling #pragma warning disable CA1822 // empty DeepCopy() methods still non-static #pragma warning disable IDE0083 // pattern matching "that is not SomeType" requires net5.0 but we still support earlier versions namespace Byway.Thrift.Data { [DataContract(Namespace="")] public partial class DialogDataItem : TBase { private int _Id; private int _Area; private int _Building; private int _BuildLv; private int _SortId; private string _Group; private string _Direct; private string _Icon; private string _Title; private string _Content; private string _BubbleType; private string _Phone; private string _Status; [DataMember(Order = 0)] public int Id { get { return _Id; } set { __isset.Id = true; this._Id = value; } } [DataMember(Order = 0)] public int Area { get { return _Area; } set { __isset.Area = true; this._Area = value; } } [DataMember(Order = 0)] public int Building { get { return _Building; } set { __isset.Building = true; this._Building = value; } } [DataMember(Order = 0)] public int BuildLv { get { return _BuildLv; } set { __isset.BuildLv = true; this._BuildLv = value; } } [DataMember(Order = 0)] public int SortId { get { return _SortId; } set { __isset.SortId = true; this._SortId = value; } } [DataMember(Order = 0)] public string Group { get { return _Group; } set { __isset.@Group = true; this._Group = value; } } [DataMember(Order = 0)] public string Direct { get { return _Direct; } set { __isset.Direct = true; this._Direct = value; } } [DataMember(Order = 0)] public string Icon { get { return _Icon; } set { __isset.Icon = true; this._Icon = value; } } [DataMember(Order = 0)] public string Title { get { return _Title; } set { __isset.Title = true; this._Title = value; } } [DataMember(Order = 0)] public string Content { get { return _Content; } set { __isset.Content = true; this._Content = value; } } [DataMember(Order = 0)] public string BubbleType { get { return _BubbleType; } set { __isset.BubbleType = true; this._BubbleType = value; } } [DataMember(Order = 0)] public string Phone { get { return _Phone; } set { __isset.Phone = true; this._Phone = value; } } [DataMember(Order = 0)] public string Status { get { return _Status; } set { __isset.Status = true; this._Status = value; } } [DataMember(Order = 1)] public Isset __isset; [DataContract] public struct Isset { [DataMember] public bool Id; [DataMember] public bool Area; [DataMember] public bool Building; [DataMember] public bool BuildLv; [DataMember] public bool SortId; [DataMember] public bool @Group; [DataMember] public bool Direct; [DataMember] public bool Icon; [DataMember] public bool Title; [DataMember] public bool Content; [DataMember] public bool BubbleType; [DataMember] public bool Phone; [DataMember] public bool Status; } #region XmlSerializer support public bool ShouldSerializeId() { return __isset.Id; } public bool ShouldSerializeArea() { return __isset.Area; } public bool ShouldSerializeBuilding() { return __isset.Building; } public bool ShouldSerializeBuildLv() { return __isset.BuildLv; } public bool ShouldSerializeSortId() { return __isset.SortId; } public bool ShouldSerializeGroup() { return __isset.@Group; } public bool ShouldSerializeDirect() { return __isset.Direct; } public bool ShouldSerializeIcon() { return __isset.Icon; } public bool ShouldSerializeTitle() { return __isset.Title; } public bool ShouldSerializeContent() { return __isset.Content; } public bool ShouldSerializeBubbleType() { return __isset.BubbleType; } public bool ShouldSerializePhone() { return __isset.Phone; } public bool ShouldSerializeStatus() { return __isset.Status; } #endregion XmlSerializer support public DialogDataItem() { } public DialogDataItem DeepCopy() { var tmp0 = new DialogDataItem(); if(__isset.Id) { tmp0.Id = this.Id; } tmp0.__isset.Id = this.__isset.Id; if(__isset.Area) { tmp0.Area = this.Area; } tmp0.__isset.Area = this.__isset.Area; if(__isset.Building) { tmp0.Building = this.Building; } tmp0.__isset.Building = this.__isset.Building; if(__isset.BuildLv) { tmp0.BuildLv = this.BuildLv; } tmp0.__isset.BuildLv = this.__isset.BuildLv; if(__isset.SortId) { tmp0.SortId = this.SortId; } tmp0.__isset.SortId = this.__isset.SortId; if((Group != null) && __isset.@Group) { tmp0.Group = this.Group; } tmp0.__isset.@Group = this.__isset.@Group; if((Direct != null) && __isset.Direct) { tmp0.Direct = this.Direct; } tmp0.__isset.Direct = this.__isset.Direct; if((Icon != null) && __isset.Icon) { tmp0.Icon = this.Icon; } tmp0.__isset.Icon = this.__isset.Icon; if((Title != null) && __isset.Title) { tmp0.Title = this.Title; } tmp0.__isset.Title = this.__isset.Title; if((Content != null) && __isset.Content) { tmp0.Content = this.Content; } tmp0.__isset.Content = this.__isset.Content; if((BubbleType != null) && __isset.BubbleType) { tmp0.BubbleType = this.BubbleType; } tmp0.__isset.BubbleType = this.__isset.BubbleType; if((Phone != null) && __isset.Phone) { tmp0.Phone = this.Phone; } tmp0.__isset.Phone = this.__isset.Phone; if((Status != null) && __isset.Status) { tmp0.Status = this.Status; } tmp0.__isset.Status = this.__isset.Status; return tmp0; } public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken) { iprot.IncrementRecursionDepth(); try { TField field; await iprot.ReadStructBeginAsync(cancellationToken); while (true) { field = await iprot.ReadFieldBeginAsync(cancellationToken); if (field.Type == TType.Stop) { break; } switch (field.ID) { case 1: if (field.Type == TType.I32) { Id = await iprot.ReadI32Async(cancellationToken); } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; case 2: if (field.Type == TType.I32) { Area = await iprot.ReadI32Async(cancellationToken); } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; case 3: if (field.Type == TType.I32) { Building = await iprot.ReadI32Async(cancellationToken); } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; case 4: if (field.Type == TType.I32) { BuildLv = await iprot.ReadI32Async(cancellationToken); } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; case 5: if (field.Type == TType.I32) { SortId = await iprot.ReadI32Async(cancellationToken); } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; case 6: if (field.Type == TType.String) { Group = await iprot.ReadStringAsync(cancellationToken); } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; case 7: if (field.Type == TType.String) { Direct = await iprot.ReadStringAsync(cancellationToken); } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; case 8: if (field.Type == TType.String) { Icon = await iprot.ReadStringAsync(cancellationToken); } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; case 9: if (field.Type == TType.String) { Title = await iprot.ReadStringAsync(cancellationToken); } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; case 10: if (field.Type == TType.String) { Content = await iprot.ReadStringAsync(cancellationToken); } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; case 11: if (field.Type == TType.String) { BubbleType = await iprot.ReadStringAsync(cancellationToken); } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; case 12: if (field.Type == TType.String) { Phone = await iprot.ReadStringAsync(cancellationToken); } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; case 13: if (field.Type == TType.String) { Status = await iprot.ReadStringAsync(cancellationToken); } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; default: await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); break; } await iprot.ReadFieldEndAsync(cancellationToken); } await iprot.ReadStructEndAsync(cancellationToken); } finally { iprot.DecrementRecursionDepth(); } } public async global::System.Threading.Tasks.Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken) { oprot.IncrementRecursionDepth(); try { var tmp1 = new TStruct("DialogDataItem"); await oprot.WriteStructBeginAsync(tmp1, cancellationToken); var tmp2 = new TField(); if(__isset.Id) { tmp2.Name = "Id"; tmp2.Type = TType.I32; tmp2.ID = 1; await oprot.WriteFieldBeginAsync(tmp2, cancellationToken); await oprot.WriteI32Async(Id, cancellationToken); await oprot.WriteFieldEndAsync(cancellationToken); } if(__isset.Area) { tmp2.Name = "Area"; tmp2.Type = TType.I32; tmp2.ID = 2; await oprot.WriteFieldBeginAsync(tmp2, cancellationToken); await oprot.WriteI32Async(Area, cancellationToken); await oprot.WriteFieldEndAsync(cancellationToken); } if(__isset.Building) { tmp2.Name = "Building"; tmp2.Type = TType.I32; tmp2.ID = 3; await oprot.WriteFieldBeginAsync(tmp2, cancellationToken); await oprot.WriteI32Async(Building, cancellationToken); await oprot.WriteFieldEndAsync(cancellationToken); } if(__isset.BuildLv) { tmp2.Name = "BuildLv"; tmp2.Type = TType.I32; tmp2.ID = 4; await oprot.WriteFieldBeginAsync(tmp2, cancellationToken); await oprot.WriteI32Async(BuildLv, cancellationToken); await oprot.WriteFieldEndAsync(cancellationToken); } if(__isset.SortId) { tmp2.Name = "SortId"; tmp2.Type = TType.I32; tmp2.ID = 5; await oprot.WriteFieldBeginAsync(tmp2, cancellationToken); await oprot.WriteI32Async(SortId, cancellationToken); await oprot.WriteFieldEndAsync(cancellationToken); } if((Group != null) && __isset.@Group) { tmp2.Name = "Group"; tmp2.Type = TType.String; tmp2.ID = 6; await oprot.WriteFieldBeginAsync(tmp2, cancellationToken); await oprot.WriteStringAsync(Group, cancellationToken); await oprot.WriteFieldEndAsync(cancellationToken); } if((Direct != null) && __isset.Direct) { tmp2.Name = "Direct"; tmp2.Type = TType.String; tmp2.ID = 7; await oprot.WriteFieldBeginAsync(tmp2, cancellationToken); await oprot.WriteStringAsync(Direct, cancellationToken); await oprot.WriteFieldEndAsync(cancellationToken); } if((Icon != null) && __isset.Icon) { tmp2.Name = "Icon"; tmp2.Type = TType.String; tmp2.ID = 8; await oprot.WriteFieldBeginAsync(tmp2, cancellationToken); await oprot.WriteStringAsync(Icon, cancellationToken); await oprot.WriteFieldEndAsync(cancellationToken); } if((Title != null) && __isset.Title) { tmp2.Name = "Title"; tmp2.Type = TType.String; tmp2.ID = 9; await oprot.WriteFieldBeginAsync(tmp2, cancellationToken); await oprot.WriteStringAsync(Title, cancellationToken); await oprot.WriteFieldEndAsync(cancellationToken); } if((Content != null) && __isset.Content) { tmp2.Name = "Content"; tmp2.Type = TType.String; tmp2.ID = 10; await oprot.WriteFieldBeginAsync(tmp2, cancellationToken); await oprot.WriteStringAsync(Content, cancellationToken); await oprot.WriteFieldEndAsync(cancellationToken); } if((BubbleType != null) && __isset.BubbleType) { tmp2.Name = "BubbleType"; tmp2.Type = TType.String; tmp2.ID = 11; await oprot.WriteFieldBeginAsync(tmp2, cancellationToken); await oprot.WriteStringAsync(BubbleType, cancellationToken); await oprot.WriteFieldEndAsync(cancellationToken); } if((Phone != null) && __isset.Phone) { tmp2.Name = "Phone"; tmp2.Type = TType.String; tmp2.ID = 12; await oprot.WriteFieldBeginAsync(tmp2, cancellationToken); await oprot.WriteStringAsync(Phone, cancellationToken); await oprot.WriteFieldEndAsync(cancellationToken); } if((Status != null) && __isset.Status) { tmp2.Name = "Status"; tmp2.Type = TType.String; tmp2.ID = 13; await oprot.WriteFieldBeginAsync(tmp2, cancellationToken); await oprot.WriteStringAsync(Status, cancellationToken); await oprot.WriteFieldEndAsync(cancellationToken); } await oprot.WriteFieldStopAsync(cancellationToken); await oprot.WriteStructEndAsync(cancellationToken); } finally { oprot.DecrementRecursionDepth(); } } public override bool Equals(object that) { if (!(that is DialogDataItem other)) return false; if (ReferenceEquals(this, other)) return true; return ((__isset.Id == other.__isset.Id) && ((!__isset.Id) || (global::System.Object.Equals(Id, other.Id)))) && ((__isset.Area == other.__isset.Area) && ((!__isset.Area) || (global::System.Object.Equals(Area, other.Area)))) && ((__isset.Building == other.__isset.Building) && ((!__isset.Building) || (global::System.Object.Equals(Building, other.Building)))) && ((__isset.BuildLv == other.__isset.BuildLv) && ((!__isset.BuildLv) || (global::System.Object.Equals(BuildLv, other.BuildLv)))) && ((__isset.SortId == other.__isset.SortId) && ((!__isset.SortId) || (global::System.Object.Equals(SortId, other.SortId)))) && ((__isset.@Group == other.__isset.@Group) && ((!__isset.@Group) || (global::System.Object.Equals(Group, other.Group)))) && ((__isset.Direct == other.__isset.Direct) && ((!__isset.Direct) || (global::System.Object.Equals(Direct, other.Direct)))) && ((__isset.Icon == other.__isset.Icon) && ((!__isset.Icon) || (global::System.Object.Equals(Icon, other.Icon)))) && ((__isset.Title == other.__isset.Title) && ((!__isset.Title) || (global::System.Object.Equals(Title, other.Title)))) && ((__isset.Content == other.__isset.Content) && ((!__isset.Content) || (global::System.Object.Equals(Content, other.Content)))) && ((__isset.BubbleType == other.__isset.BubbleType) && ((!__isset.BubbleType) || (global::System.Object.Equals(BubbleType, other.BubbleType)))) && ((__isset.Phone == other.__isset.Phone) && ((!__isset.Phone) || (global::System.Object.Equals(Phone, other.Phone)))) && ((__isset.Status == other.__isset.Status) && ((!__isset.Status) || (global::System.Object.Equals(Status, other.Status)))); } public override int GetHashCode() { int hashcode = 157; unchecked { if(__isset.Id) { hashcode = (hashcode * 397) + Id.GetHashCode(); } if(__isset.Area) { hashcode = (hashcode * 397) + Area.GetHashCode(); } if(__isset.Building) { hashcode = (hashcode * 397) + Building.GetHashCode(); } if(__isset.BuildLv) { hashcode = (hashcode * 397) + BuildLv.GetHashCode(); } if(__isset.SortId) { hashcode = (hashcode * 397) + SortId.GetHashCode(); } if((Group != null) && __isset.@Group) { hashcode = (hashcode * 397) + Group.GetHashCode(); } if((Direct != null) && __isset.Direct) { hashcode = (hashcode * 397) + Direct.GetHashCode(); } if((Icon != null) && __isset.Icon) { hashcode = (hashcode * 397) + Icon.GetHashCode(); } if((Title != null) && __isset.Title) { hashcode = (hashcode * 397) + Title.GetHashCode(); } if((Content != null) && __isset.Content) { hashcode = (hashcode * 397) + Content.GetHashCode(); } if((BubbleType != null) && __isset.BubbleType) { hashcode = (hashcode * 397) + BubbleType.GetHashCode(); } if((Phone != null) && __isset.Phone) { hashcode = (hashcode * 397) + Phone.GetHashCode(); } if((Status != null) && __isset.Status) { hashcode = (hashcode * 397) + Status.GetHashCode(); } } return hashcode; } public override string ToString() { var tmp3 = new StringBuilder("DialogDataItem("); int tmp4 = 0; if(__isset.Id) { if(0 < tmp4++) { tmp3.Append(", "); } tmp3.Append("Id: "); Id.ToString(tmp3); } if(__isset.Area) { if(0 < tmp4++) { tmp3.Append(", "); } tmp3.Append("Area: "); Area.ToString(tmp3); } if(__isset.Building) { if(0 < tmp4++) { tmp3.Append(", "); } tmp3.Append("Building: "); Building.ToString(tmp3); } if(__isset.BuildLv) { if(0 < tmp4++) { tmp3.Append(", "); } tmp3.Append("BuildLv: "); BuildLv.ToString(tmp3); } if(__isset.SortId) { if(0 < tmp4++) { tmp3.Append(", "); } tmp3.Append("SortId: "); SortId.ToString(tmp3); } if((Group != null) && __isset.@Group) { if(0 < tmp4++) { tmp3.Append(", "); } tmp3.Append("Group: "); Group.ToString(tmp3); } if((Direct != null) && __isset.Direct) { if(0 < tmp4++) { tmp3.Append(", "); } tmp3.Append("Direct: "); Direct.ToString(tmp3); } if((Icon != null) && __isset.Icon) { if(0 < tmp4++) { tmp3.Append(", "); } tmp3.Append("Icon: "); Icon.ToString(tmp3); } if((Title != null) && __isset.Title) { if(0 < tmp4++) { tmp3.Append(", "); } tmp3.Append("Title: "); Title.ToString(tmp3); } if((Content != null) && __isset.Content) { if(0 < tmp4++) { tmp3.Append(", "); } tmp3.Append("Content: "); Content.ToString(tmp3); } if((BubbleType != null) && __isset.BubbleType) { if(0 < tmp4++) { tmp3.Append(", "); } tmp3.Append("BubbleType: "); BubbleType.ToString(tmp3); } if((Phone != null) && __isset.Phone) { if(0 < tmp4++) { tmp3.Append(", "); } tmp3.Append("Phone: "); Phone.ToString(tmp3); } if((Status != null) && __isset.Status) { if(0 < tmp4++) { tmp3.Append(", "); } tmp3.Append("Status: "); Status.ToString(tmp3); } tmp3.Append(')'); return tmp3.ToString(); } } }