/**
 * <auto-generated>
 * Autogenerated by Thrift Compiler (0.22.0)
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 * </auto-generated>
 */
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 PetShopItemItem : TBase
  {
    private int _Id;
    private int _GroupId;
    private int _Page;
    private int _ItemId;
    private string _Icon;
    private int _ReqId;
    private int _Level;
    private string _SellType;
    private int _SellPrice;
    private int _Mood;
    private string _BagItem;
    private string _Animation;
    private string _MouthPos;
    private string _BubbleRes;
    private int _Exp;
    private int _Cooldown;
    private int _Dailystorage;
    private string _Name;

    [DataMember(Order = 0)]
    public int Id
    {
      get
      {
        return _Id;
      }
      set
      {
        __isset.Id = true;
        this._Id = value;
      }
    }

    [DataMember(Order = 0)]
    public int GroupId
    {
      get
      {
        return _GroupId;
      }
      set
      {
        __isset.GroupId = true;
        this._GroupId = value;
      }
    }

    [DataMember(Order = 0)]
    public int Page
    {
      get
      {
        return _Page;
      }
      set
      {
        __isset.Page = true;
        this._Page = value;
      }
    }

    [DataMember(Order = 0)]
    public int ItemId
    {
      get
      {
        return _ItemId;
      }
      set
      {
        __isset.ItemId = true;
        this._ItemId = value;
      }
    }

    [DataMember(Order = 0)]
    public string Icon
    {
      get
      {
        return _Icon;
      }
      set
      {
        __isset.Icon = true;
        this._Icon = value;
      }
    }

    [DataMember(Order = 0)]
    public int ReqId
    {
      get
      {
        return _ReqId;
      }
      set
      {
        __isset.ReqId = true;
        this._ReqId = value;
      }
    }

    [DataMember(Order = 0)]
    public int Level
    {
      get
      {
        return _Level;
      }
      set
      {
        __isset.Level = true;
        this._Level = value;
      }
    }

    [DataMember(Order = 0)]
    public string SellType
    {
      get
      {
        return _SellType;
      }
      set
      {
        __isset.SellType = true;
        this._SellType = value;
      }
    }

    [DataMember(Order = 0)]
    public int SellPrice
    {
      get
      {
        return _SellPrice;
      }
      set
      {
        __isset.SellPrice = true;
        this._SellPrice = value;
      }
    }

    [DataMember(Order = 0)]
    public int Mood
    {
      get
      {
        return _Mood;
      }
      set
      {
        __isset.Mood = true;
        this._Mood = value;
      }
    }

    [DataMember(Order = 0)]
    public string BagItem
    {
      get
      {
        return _BagItem;
      }
      set
      {
        __isset.BagItem = true;
        this._BagItem = value;
      }
    }

    [DataMember(Order = 0)]
    public string Animation
    {
      get
      {
        return _Animation;
      }
      set
      {
        __isset.Animation = true;
        this._Animation = value;
      }
    }

    [DataMember(Order = 0)]
    public string MouthPos
    {
      get
      {
        return _MouthPos;
      }
      set
      {
        __isset.MouthPos = true;
        this._MouthPos = value;
      }
    }

    [DataMember(Order = 0)]
    public string BubbleRes
    {
      get
      {
        return _BubbleRes;
      }
      set
      {
        __isset.BubbleRes = true;
        this._BubbleRes = value;
      }
    }

    [DataMember(Order = 0)]
    public int Exp
    {
      get
      {
        return _Exp;
      }
      set
      {
        __isset.Exp = true;
        this._Exp = value;
      }
    }

    [DataMember(Order = 0)]
    public int Cooldown
    {
      get
      {
        return _Cooldown;
      }
      set
      {
        __isset.Cooldown = true;
        this._Cooldown = value;
      }
    }

    [DataMember(Order = 0)]
    public int Dailystorage
    {
      get
      {
        return _Dailystorage;
      }
      set
      {
        __isset.Dailystorage = true;
        this._Dailystorage = value;
      }
    }

    [DataMember(Order = 0)]
    public string Name
    {
      get
      {
        return _Name;
      }
      set
      {
        __isset.Name = true;
        this._Name = value;
      }
    }


    [DataMember(Order = 1)]
    public Isset __isset;
    [DataContract]
    public struct Isset
    {
      [DataMember]
      public bool Id;
      [DataMember]
      public bool GroupId;
      [DataMember]
      public bool Page;
      [DataMember]
      public bool ItemId;
      [DataMember]
      public bool Icon;
      [DataMember]
      public bool ReqId;
      [DataMember]
      public bool Level;
      [DataMember]
      public bool SellType;
      [DataMember]
      public bool SellPrice;
      [DataMember]
      public bool Mood;
      [DataMember]
      public bool BagItem;
      [DataMember]
      public bool Animation;
      [DataMember]
      public bool MouthPos;
      [DataMember]
      public bool BubbleRes;
      [DataMember]
      public bool Exp;
      [DataMember]
      public bool Cooldown;
      [DataMember]
      public bool Dailystorage;
      [DataMember]
      public bool Name;
    }

    #region XmlSerializer support

    public bool ShouldSerializeId()
    {
      return __isset.Id;
    }

    public bool ShouldSerializeGroupId()
    {
      return __isset.GroupId;
    }

    public bool ShouldSerializePage()
    {
      return __isset.Page;
    }

    public bool ShouldSerializeItemId()
    {
      return __isset.ItemId;
    }

    public bool ShouldSerializeIcon()
    {
      return __isset.Icon;
    }

    public bool ShouldSerializeReqId()
    {
      return __isset.ReqId;
    }

    public bool ShouldSerializeLevel()
    {
      return __isset.Level;
    }

    public bool ShouldSerializeSellType()
    {
      return __isset.SellType;
    }

    public bool ShouldSerializeSellPrice()
    {
      return __isset.SellPrice;
    }

    public bool ShouldSerializeMood()
    {
      return __isset.Mood;
    }

    public bool ShouldSerializeBagItem()
    {
      return __isset.BagItem;
    }

    public bool ShouldSerializeAnimation()
    {
      return __isset.Animation;
    }

    public bool ShouldSerializeMouthPos()
    {
      return __isset.MouthPos;
    }

    public bool ShouldSerializeBubbleRes()
    {
      return __isset.BubbleRes;
    }

    public bool ShouldSerializeExp()
    {
      return __isset.Exp;
    }

    public bool ShouldSerializeCooldown()
    {
      return __isset.Cooldown;
    }

    public bool ShouldSerializeDailystorage()
    {
      return __isset.Dailystorage;
    }

    public bool ShouldSerializeName()
    {
      return __isset.Name;
    }

    #endregion XmlSerializer support

    public PetShopItemItem()
    {
    }

    public PetShopItemItem DeepCopy()
    {
      var tmp0 = new PetShopItemItem();
      if(__isset.Id)
      {
        tmp0.Id = this.Id;
      }
      tmp0.__isset.Id = this.__isset.Id;
      if(__isset.GroupId)
      {
        tmp0.GroupId = this.GroupId;
      }
      tmp0.__isset.GroupId = this.__isset.GroupId;
      if(__isset.Page)
      {
        tmp0.Page = this.Page;
      }
      tmp0.__isset.Page = this.__isset.Page;
      if(__isset.ItemId)
      {
        tmp0.ItemId = this.ItemId;
      }
      tmp0.__isset.ItemId = this.__isset.ItemId;
      if((Icon != null) && __isset.Icon)
      {
        tmp0.Icon = this.Icon;
      }
      tmp0.__isset.Icon = this.__isset.Icon;
      if(__isset.ReqId)
      {
        tmp0.ReqId = this.ReqId;
      }
      tmp0.__isset.ReqId = this.__isset.ReqId;
      if(__isset.Level)
      {
        tmp0.Level = this.Level;
      }
      tmp0.__isset.Level = this.__isset.Level;
      if((SellType != null) && __isset.SellType)
      {
        tmp0.SellType = this.SellType;
      }
      tmp0.__isset.SellType = this.__isset.SellType;
      if(__isset.SellPrice)
      {
        tmp0.SellPrice = this.SellPrice;
      }
      tmp0.__isset.SellPrice = this.__isset.SellPrice;
      if(__isset.Mood)
      {
        tmp0.Mood = this.Mood;
      }
      tmp0.__isset.Mood = this.__isset.Mood;
      if((BagItem != null) && __isset.BagItem)
      {
        tmp0.BagItem = this.BagItem;
      }
      tmp0.__isset.BagItem = this.__isset.BagItem;
      if((Animation != null) && __isset.Animation)
      {
        tmp0.Animation = this.Animation;
      }
      tmp0.__isset.Animation = this.__isset.Animation;
      if((MouthPos != null) && __isset.MouthPos)
      {
        tmp0.MouthPos = this.MouthPos;
      }
      tmp0.__isset.MouthPos = this.__isset.MouthPos;
      if((BubbleRes != null) && __isset.BubbleRes)
      {
        tmp0.BubbleRes = this.BubbleRes;
      }
      tmp0.__isset.BubbleRes = this.__isset.BubbleRes;
      if(__isset.Exp)
      {
        tmp0.Exp = this.Exp;
      }
      tmp0.__isset.Exp = this.__isset.Exp;
      if(__isset.Cooldown)
      {
        tmp0.Cooldown = this.Cooldown;
      }
      tmp0.__isset.Cooldown = this.__isset.Cooldown;
      if(__isset.Dailystorage)
      {
        tmp0.Dailystorage = this.Dailystorage;
      }
      tmp0.__isset.Dailystorage = this.__isset.Dailystorage;
      if((Name != null) && __isset.Name)
      {
        tmp0.Name = this.Name;
      }
      tmp0.__isset.Name = this.__isset.Name;
      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)
              {
                GroupId = await iprot.ReadI32Async(cancellationToken);
              }
              else
              {
                await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
              }
              break;
            case 3:
              if (field.Type == TType.I32)
              {
                Page = await iprot.ReadI32Async(cancellationToken);
              }
              else
              {
                await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
              }
              break;
            case 4:
              if (field.Type == TType.I32)
              {
                ItemId = await iprot.ReadI32Async(cancellationToken);
              }
              else
              {
                await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
              }
              break;
            case 5:
              if (field.Type == TType.String)
              {
                Icon = await iprot.ReadStringAsync(cancellationToken);
              }
              else
              {
                await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
              }
              break;
            case 6:
              if (field.Type == TType.I32)
              {
                ReqId = await iprot.ReadI32Async(cancellationToken);
              }
              else
              {
                await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
              }
              break;
            case 7:
              if (field.Type == TType.I32)
              {
                Level = await iprot.ReadI32Async(cancellationToken);
              }
              else
              {
                await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
              }
              break;
            case 8:
              if (field.Type == TType.String)
              {
                SellType = await iprot.ReadStringAsync(cancellationToken);
              }
              else
              {
                await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
              }
              break;
            case 9:
              if (field.Type == TType.I32)
              {
                SellPrice = await iprot.ReadI32Async(cancellationToken);
              }
              else
              {
                await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
              }
              break;
            case 10:
              if (field.Type == TType.I32)
              {
                Mood = await iprot.ReadI32Async(cancellationToken);
              }
              else
              {
                await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
              }
              break;
            case 11:
              if (field.Type == TType.String)
              {
                BagItem = await iprot.ReadStringAsync(cancellationToken);
              }
              else
              {
                await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
              }
              break;
            case 12:
              if (field.Type == TType.String)
              {
                Animation = await iprot.ReadStringAsync(cancellationToken);
              }
              else
              {
                await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
              }
              break;
            case 13:
              if (field.Type == TType.String)
              {
                MouthPos = await iprot.ReadStringAsync(cancellationToken);
              }
              else
              {
                await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
              }
              break;
            case 14:
              if (field.Type == TType.String)
              {
                BubbleRes = await iprot.ReadStringAsync(cancellationToken);
              }
              else
              {
                await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
              }
              break;
            case 15:
              if (field.Type == TType.I32)
              {
                Exp = await iprot.ReadI32Async(cancellationToken);
              }
              else
              {
                await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
              }
              break;
            case 16:
              if (field.Type == TType.I32)
              {
                Cooldown = await iprot.ReadI32Async(cancellationToken);
              }
              else
              {
                await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
              }
              break;
            case 17:
              if (field.Type == TType.I32)
              {
                Dailystorage = await iprot.ReadI32Async(cancellationToken);
              }
              else
              {
                await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
              }
              break;
            case 18:
              if (field.Type == TType.String)
              {
                Name = 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("PetShopItemItem");
        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.GroupId)
        {
          tmp2.Name = "GroupId";
          tmp2.Type = TType.I32;
          tmp2.ID = 2;
          await oprot.WriteFieldBeginAsync(tmp2, cancellationToken);
          await oprot.WriteI32Async(GroupId, cancellationToken);
          await oprot.WriteFieldEndAsync(cancellationToken);
        }
        if(__isset.Page)
        {
          tmp2.Name = "Page";
          tmp2.Type = TType.I32;
          tmp2.ID = 3;
          await oprot.WriteFieldBeginAsync(tmp2, cancellationToken);
          await oprot.WriteI32Async(Page, cancellationToken);
          await oprot.WriteFieldEndAsync(cancellationToken);
        }
        if(__isset.ItemId)
        {
          tmp2.Name = "ItemId";
          tmp2.Type = TType.I32;
          tmp2.ID = 4;
          await oprot.WriteFieldBeginAsync(tmp2, cancellationToken);
          await oprot.WriteI32Async(ItemId, cancellationToken);
          await oprot.WriteFieldEndAsync(cancellationToken);
        }
        if((Icon != null) && __isset.Icon)
        {
          tmp2.Name = "Icon";
          tmp2.Type = TType.String;
          tmp2.ID = 5;
          await oprot.WriteFieldBeginAsync(tmp2, cancellationToken);
          await oprot.WriteStringAsync(Icon, cancellationToken);
          await oprot.WriteFieldEndAsync(cancellationToken);
        }
        if(__isset.ReqId)
        {
          tmp2.Name = "ReqId";
          tmp2.Type = TType.I32;
          tmp2.ID = 6;
          await oprot.WriteFieldBeginAsync(tmp2, cancellationToken);
          await oprot.WriteI32Async(ReqId, cancellationToken);
          await oprot.WriteFieldEndAsync(cancellationToken);
        }
        if(__isset.Level)
        {
          tmp2.Name = "Level";
          tmp2.Type = TType.I32;
          tmp2.ID = 7;
          await oprot.WriteFieldBeginAsync(tmp2, cancellationToken);
          await oprot.WriteI32Async(Level, cancellationToken);
          await oprot.WriteFieldEndAsync(cancellationToken);
        }
        if((SellType != null) && __isset.SellType)
        {
          tmp2.Name = "SellType";
          tmp2.Type = TType.String;
          tmp2.ID = 8;
          await oprot.WriteFieldBeginAsync(tmp2, cancellationToken);
          await oprot.WriteStringAsync(SellType, cancellationToken);
          await oprot.WriteFieldEndAsync(cancellationToken);
        }
        if(__isset.SellPrice)
        {
          tmp2.Name = "SellPrice";
          tmp2.Type = TType.I32;
          tmp2.ID = 9;
          await oprot.WriteFieldBeginAsync(tmp2, cancellationToken);
          await oprot.WriteI32Async(SellPrice, cancellationToken);
          await oprot.WriteFieldEndAsync(cancellationToken);
        }
        if(__isset.Mood)
        {
          tmp2.Name = "Mood";
          tmp2.Type = TType.I32;
          tmp2.ID = 10;
          await oprot.WriteFieldBeginAsync(tmp2, cancellationToken);
          await oprot.WriteI32Async(Mood, cancellationToken);
          await oprot.WriteFieldEndAsync(cancellationToken);
        }
        if((BagItem != null) && __isset.BagItem)
        {
          tmp2.Name = "BagItem";
          tmp2.Type = TType.String;
          tmp2.ID = 11;
          await oprot.WriteFieldBeginAsync(tmp2, cancellationToken);
          await oprot.WriteStringAsync(BagItem, cancellationToken);
          await oprot.WriteFieldEndAsync(cancellationToken);
        }
        if((Animation != null) && __isset.Animation)
        {
          tmp2.Name = "Animation";
          tmp2.Type = TType.String;
          tmp2.ID = 12;
          await oprot.WriteFieldBeginAsync(tmp2, cancellationToken);
          await oprot.WriteStringAsync(Animation, cancellationToken);
          await oprot.WriteFieldEndAsync(cancellationToken);
        }
        if((MouthPos != null) && __isset.MouthPos)
        {
          tmp2.Name = "MouthPos";
          tmp2.Type = TType.String;
          tmp2.ID = 13;
          await oprot.WriteFieldBeginAsync(tmp2, cancellationToken);
          await oprot.WriteStringAsync(MouthPos, cancellationToken);
          await oprot.WriteFieldEndAsync(cancellationToken);
        }
        if((BubbleRes != null) && __isset.BubbleRes)
        {
          tmp2.Name = "BubbleRes";
          tmp2.Type = TType.String;
          tmp2.ID = 14;
          await oprot.WriteFieldBeginAsync(tmp2, cancellationToken);
          await oprot.WriteStringAsync(BubbleRes, cancellationToken);
          await oprot.WriteFieldEndAsync(cancellationToken);
        }
        if(__isset.Exp)
        {
          tmp2.Name = "Exp";
          tmp2.Type = TType.I32;
          tmp2.ID = 15;
          await oprot.WriteFieldBeginAsync(tmp2, cancellationToken);
          await oprot.WriteI32Async(Exp, cancellationToken);
          await oprot.WriteFieldEndAsync(cancellationToken);
        }
        if(__isset.Cooldown)
        {
          tmp2.Name = "Cooldown";
          tmp2.Type = TType.I32;
          tmp2.ID = 16;
          await oprot.WriteFieldBeginAsync(tmp2, cancellationToken);
          await oprot.WriteI32Async(Cooldown, cancellationToken);
          await oprot.WriteFieldEndAsync(cancellationToken);
        }
        if(__isset.Dailystorage)
        {
          tmp2.Name = "Dailystorage";
          tmp2.Type = TType.I32;
          tmp2.ID = 17;
          await oprot.WriteFieldBeginAsync(tmp2, cancellationToken);
          await oprot.WriteI32Async(Dailystorage, cancellationToken);
          await oprot.WriteFieldEndAsync(cancellationToken);
        }
        if((Name != null) && __isset.Name)
        {
          tmp2.Name = "Name";
          tmp2.Type = TType.String;
          tmp2.ID = 18;
          await oprot.WriteFieldBeginAsync(tmp2, cancellationToken);
          await oprot.WriteStringAsync(Name, 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 PetShopItemItem 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.GroupId == other.__isset.GroupId) && ((!__isset.GroupId) || (global::System.Object.Equals(GroupId, other.GroupId))))
        && ((__isset.Page == other.__isset.Page) && ((!__isset.Page) || (global::System.Object.Equals(Page, other.Page))))
        && ((__isset.ItemId == other.__isset.ItemId) && ((!__isset.ItemId) || (global::System.Object.Equals(ItemId, other.ItemId))))
        && ((__isset.Icon == other.__isset.Icon) && ((!__isset.Icon) || (global::System.Object.Equals(Icon, other.Icon))))
        && ((__isset.ReqId == other.__isset.ReqId) && ((!__isset.ReqId) || (global::System.Object.Equals(ReqId, other.ReqId))))
        && ((__isset.Level == other.__isset.Level) && ((!__isset.Level) || (global::System.Object.Equals(Level, other.Level))))
        && ((__isset.SellType == other.__isset.SellType) && ((!__isset.SellType) || (global::System.Object.Equals(SellType, other.SellType))))
        && ((__isset.SellPrice == other.__isset.SellPrice) && ((!__isset.SellPrice) || (global::System.Object.Equals(SellPrice, other.SellPrice))))
        && ((__isset.Mood == other.__isset.Mood) && ((!__isset.Mood) || (global::System.Object.Equals(Mood, other.Mood))))
        && ((__isset.BagItem == other.__isset.BagItem) && ((!__isset.BagItem) || (global::System.Object.Equals(BagItem, other.BagItem))))
        && ((__isset.Animation == other.__isset.Animation) && ((!__isset.Animation) || (global::System.Object.Equals(Animation, other.Animation))))
        && ((__isset.MouthPos == other.__isset.MouthPos) && ((!__isset.MouthPos) || (global::System.Object.Equals(MouthPos, other.MouthPos))))
        && ((__isset.BubbleRes == other.__isset.BubbleRes) && ((!__isset.BubbleRes) || (global::System.Object.Equals(BubbleRes, other.BubbleRes))))
        && ((__isset.Exp == other.__isset.Exp) && ((!__isset.Exp) || (global::System.Object.Equals(Exp, other.Exp))))
        && ((__isset.Cooldown == other.__isset.Cooldown) && ((!__isset.Cooldown) || (global::System.Object.Equals(Cooldown, other.Cooldown))))
        && ((__isset.Dailystorage == other.__isset.Dailystorage) && ((!__isset.Dailystorage) || (global::System.Object.Equals(Dailystorage, other.Dailystorage))))
        && ((__isset.Name == other.__isset.Name) && ((!__isset.Name) || (global::System.Object.Equals(Name, other.Name))));
    }

    public override int GetHashCode() {
      int hashcode = 157;
      unchecked {
        if(__isset.Id)
        {
          hashcode = (hashcode * 397) + Id.GetHashCode();
        }
        if(__isset.GroupId)
        {
          hashcode = (hashcode * 397) + GroupId.GetHashCode();
        }
        if(__isset.Page)
        {
          hashcode = (hashcode * 397) + Page.GetHashCode();
        }
        if(__isset.ItemId)
        {
          hashcode = (hashcode * 397) + ItemId.GetHashCode();
        }
        if((Icon != null) && __isset.Icon)
        {
          hashcode = (hashcode * 397) + Icon.GetHashCode();
        }
        if(__isset.ReqId)
        {
          hashcode = (hashcode * 397) + ReqId.GetHashCode();
        }
        if(__isset.Level)
        {
          hashcode = (hashcode * 397) + Level.GetHashCode();
        }
        if((SellType != null) && __isset.SellType)
        {
          hashcode = (hashcode * 397) + SellType.GetHashCode();
        }
        if(__isset.SellPrice)
        {
          hashcode = (hashcode * 397) + SellPrice.GetHashCode();
        }
        if(__isset.Mood)
        {
          hashcode = (hashcode * 397) + Mood.GetHashCode();
        }
        if((BagItem != null) && __isset.BagItem)
        {
          hashcode = (hashcode * 397) + BagItem.GetHashCode();
        }
        if((Animation != null) && __isset.Animation)
        {
          hashcode = (hashcode * 397) + Animation.GetHashCode();
        }
        if((MouthPos != null) && __isset.MouthPos)
        {
          hashcode = (hashcode * 397) + MouthPos.GetHashCode();
        }
        if((BubbleRes != null) && __isset.BubbleRes)
        {
          hashcode = (hashcode * 397) + BubbleRes.GetHashCode();
        }
        if(__isset.Exp)
        {
          hashcode = (hashcode * 397) + Exp.GetHashCode();
        }
        if(__isset.Cooldown)
        {
          hashcode = (hashcode * 397) + Cooldown.GetHashCode();
        }
        if(__isset.Dailystorage)
        {
          hashcode = (hashcode * 397) + Dailystorage.GetHashCode();
        }
        if((Name != null) && __isset.Name)
        {
          hashcode = (hashcode * 397) + Name.GetHashCode();
        }
      }
      return hashcode;
    }

    public override string ToString()
    {
      var tmp3 = new StringBuilder("PetShopItemItem(");
      int tmp4 = 0;
      if(__isset.Id)
      {
        if(0 < tmp4++) { tmp3.Append(", "); }
        tmp3.Append("Id: ");
        Id.ToString(tmp3);
      }
      if(__isset.GroupId)
      {
        if(0 < tmp4++) { tmp3.Append(", "); }
        tmp3.Append("GroupId: ");
        GroupId.ToString(tmp3);
      }
      if(__isset.Page)
      {
        if(0 < tmp4++) { tmp3.Append(", "); }
        tmp3.Append("Page: ");
        Page.ToString(tmp3);
      }
      if(__isset.ItemId)
      {
        if(0 < tmp4++) { tmp3.Append(", "); }
        tmp3.Append("ItemId: ");
        ItemId.ToString(tmp3);
      }
      if((Icon != null) && __isset.Icon)
      {
        if(0 < tmp4++) { tmp3.Append(", "); }
        tmp3.Append("Icon: ");
        Icon.ToString(tmp3);
      }
      if(__isset.ReqId)
      {
        if(0 < tmp4++) { tmp3.Append(", "); }
        tmp3.Append("ReqId: ");
        ReqId.ToString(tmp3);
      }
      if(__isset.Level)
      {
        if(0 < tmp4++) { tmp3.Append(", "); }
        tmp3.Append("Level: ");
        Level.ToString(tmp3);
      }
      if((SellType != null) && __isset.SellType)
      {
        if(0 < tmp4++) { tmp3.Append(", "); }
        tmp3.Append("SellType: ");
        SellType.ToString(tmp3);
      }
      if(__isset.SellPrice)
      {
        if(0 < tmp4++) { tmp3.Append(", "); }
        tmp3.Append("SellPrice: ");
        SellPrice.ToString(tmp3);
      }
      if(__isset.Mood)
      {
        if(0 < tmp4++) { tmp3.Append(", "); }
        tmp3.Append("Mood: ");
        Mood.ToString(tmp3);
      }
      if((BagItem != null) && __isset.BagItem)
      {
        if(0 < tmp4++) { tmp3.Append(", "); }
        tmp3.Append("BagItem: ");
        BagItem.ToString(tmp3);
      }
      if((Animation != null) && __isset.Animation)
      {
        if(0 < tmp4++) { tmp3.Append(", "); }
        tmp3.Append("Animation: ");
        Animation.ToString(tmp3);
      }
      if((MouthPos != null) && __isset.MouthPos)
      {
        if(0 < tmp4++) { tmp3.Append(", "); }
        tmp3.Append("MouthPos: ");
        MouthPos.ToString(tmp3);
      }
      if((BubbleRes != null) && __isset.BubbleRes)
      {
        if(0 < tmp4++) { tmp3.Append(", "); }
        tmp3.Append("BubbleRes: ");
        BubbleRes.ToString(tmp3);
      }
      if(__isset.Exp)
      {
        if(0 < tmp4++) { tmp3.Append(", "); }
        tmp3.Append("Exp: ");
        Exp.ToString(tmp3);
      }
      if(__isset.Cooldown)
      {
        if(0 < tmp4++) { tmp3.Append(", "); }
        tmp3.Append("Cooldown: ");
        Cooldown.ToString(tmp3);
      }
      if(__isset.Dailystorage)
      {
        if(0 < tmp4++) { tmp3.Append(", "); }
        tmp3.Append("Dailystorage: ");
        Dailystorage.ToString(tmp3);
      }
      if((Name != null) && __isset.Name)
      {
        if(0 < tmp4++) { tmp3.Append(", "); }
        tmp3.Append("Name: ");
        Name.ToString(tmp3);
      }
      tmp3.Append(')');
      return tmp3.ToString();
    }
  }

}
