/**
 * <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 DecorateCostItem : TBase
  {
    private int _Id;
    private int _AreaId;
    private int _SortId;
    private int _CostCount;
    private string _Title;
    private string _Icon;
    private string _Pos;
    private string _Action;
    private string _Spine;
    private string _Button;
    private string _Build;
    private string _Shine;
    private string _Origin;
    private string _DecoratePos;
    private string _Skip;
    private string _MapPethomeId;
    private string _PetExp;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


    [DataMember(Order = 1)]
    public Isset __isset;
    [DataContract]
    public struct Isset
    {
      [DataMember]
      public bool Id;
      [DataMember]
      public bool AreaId;
      [DataMember]
      public bool SortId;
      [DataMember]
      public bool CostCount;
      [DataMember]
      public bool Title;
      [DataMember]
      public bool Icon;
      [DataMember]
      public bool Pos;
      [DataMember]
      public bool Action;
      [DataMember]
      public bool Spine;
      [DataMember]
      public bool Button;
      [DataMember]
      public bool Build;
      [DataMember]
      public bool Shine;
      [DataMember]
      public bool Origin;
      [DataMember]
      public bool DecoratePos;
      [DataMember]
      public bool Skip;
      [DataMember]
      public bool MapPethomeId;
      [DataMember]
      public bool PetExp;
    }

    #region XmlSerializer support

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

    public bool ShouldSerializeAreaId()
    {
      return __isset.AreaId;
    }

    public bool ShouldSerializeSortId()
    {
      return __isset.SortId;
    }

    public bool ShouldSerializeCostCount()
    {
      return __isset.CostCount;
    }

    public bool ShouldSerializeTitle()
    {
      return __isset.Title;
    }

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

    public bool ShouldSerializePos()
    {
      return __isset.Pos;
    }

    public bool ShouldSerializeAction()
    {
      return __isset.Action;
    }

    public bool ShouldSerializeSpine()
    {
      return __isset.Spine;
    }

    public bool ShouldSerializeButton()
    {
      return __isset.Button;
    }

    public bool ShouldSerializeBuild()
    {
      return __isset.Build;
    }

    public bool ShouldSerializeShine()
    {
      return __isset.Shine;
    }

    public bool ShouldSerializeOrigin()
    {
      return __isset.Origin;
    }

    public bool ShouldSerializeDecoratePos()
    {
      return __isset.DecoratePos;
    }

    public bool ShouldSerializeSkip()
    {
      return __isset.Skip;
    }

    public bool ShouldSerializeMapPethomeId()
    {
      return __isset.MapPethomeId;
    }

    public bool ShouldSerializePetExp()
    {
      return __isset.PetExp;
    }

    #endregion XmlSerializer support

    public DecorateCostItem()
    {
    }

    public DecorateCostItem DeepCopy()
    {
      var tmp0 = new DecorateCostItem();
      if(__isset.Id)
      {
        tmp0.Id = this.Id;
      }
      tmp0.__isset.Id = this.__isset.Id;
      if(__isset.AreaId)
      {
        tmp0.AreaId = this.AreaId;
      }
      tmp0.__isset.AreaId = this.__isset.AreaId;
      if(__isset.SortId)
      {
        tmp0.SortId = this.SortId;
      }
      tmp0.__isset.SortId = this.__isset.SortId;
      if(__isset.CostCount)
      {
        tmp0.CostCount = this.CostCount;
      }
      tmp0.__isset.CostCount = this.__isset.CostCount;
      if((Title != null) && __isset.Title)
      {
        tmp0.Title = this.Title;
      }
      tmp0.__isset.Title = this.__isset.Title;
      if((Icon != null) && __isset.Icon)
      {
        tmp0.Icon = this.Icon;
      }
      tmp0.__isset.Icon = this.__isset.Icon;
      if((Pos != null) && __isset.Pos)
      {
        tmp0.Pos = this.Pos;
      }
      tmp0.__isset.Pos = this.__isset.Pos;
      if((Action != null) && __isset.Action)
      {
        tmp0.Action = this.Action;
      }
      tmp0.__isset.Action = this.__isset.Action;
      if((Spine != null) && __isset.Spine)
      {
        tmp0.Spine = this.Spine;
      }
      tmp0.__isset.Spine = this.__isset.Spine;
      if((Button != null) && __isset.Button)
      {
        tmp0.Button = this.Button;
      }
      tmp0.__isset.Button = this.__isset.Button;
      if((Build != null) && __isset.Build)
      {
        tmp0.Build = this.Build;
      }
      tmp0.__isset.Build = this.__isset.Build;
      if((Shine != null) && __isset.Shine)
      {
        tmp0.Shine = this.Shine;
      }
      tmp0.__isset.Shine = this.__isset.Shine;
      if((Origin != null) && __isset.Origin)
      {
        tmp0.Origin = this.Origin;
      }
      tmp0.__isset.Origin = this.__isset.Origin;
      if((DecoratePos != null) && __isset.DecoratePos)
      {
        tmp0.DecoratePos = this.DecoratePos;
      }
      tmp0.__isset.DecoratePos = this.__isset.DecoratePos;
      if((Skip != null) && __isset.Skip)
      {
        tmp0.Skip = this.Skip;
      }
      tmp0.__isset.Skip = this.__isset.Skip;
      if((MapPethomeId != null) && __isset.MapPethomeId)
      {
        tmp0.MapPethomeId = this.MapPethomeId;
      }
      tmp0.__isset.MapPethomeId = this.__isset.MapPethomeId;
      if((PetExp != null) && __isset.PetExp)
      {
        tmp0.PetExp = this.PetExp;
      }
      tmp0.__isset.PetExp = this.__isset.PetExp;
      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)
              {
                AreaId = await iprot.ReadI32Async(cancellationToken);
              }
              else
              {
                await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
              }
              break;
            case 3:
              if (field.Type == TType.I32)
              {
                SortId = await iprot.ReadI32Async(cancellationToken);
              }
              else
              {
                await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
              }
              break;
            case 4:
              if (field.Type == TType.I32)
              {
                CostCount = await iprot.ReadI32Async(cancellationToken);
              }
              else
              {
                await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
              }
              break;
            case 5:
              if (field.Type == TType.String)
              {
                Title = await iprot.ReadStringAsync(cancellationToken);
              }
              else
              {
                await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
              }
              break;
            case 6:
              if (field.Type == TType.String)
              {
                Icon = await iprot.ReadStringAsync(cancellationToken);
              }
              else
              {
                await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
              }
              break;
            case 7:
              if (field.Type == TType.String)
              {
                Pos = await iprot.ReadStringAsync(cancellationToken);
              }
              else
              {
                await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
              }
              break;
            case 8:
              if (field.Type == TType.String)
              {
                Action = await iprot.ReadStringAsync(cancellationToken);
              }
              else
              {
                await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
              }
              break;
            case 9:
              if (field.Type == TType.String)
              {
                Spine = await iprot.ReadStringAsync(cancellationToken);
              }
              else
              {
                await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
              }
              break;
            case 10:
              if (field.Type == TType.String)
              {
                Button = await iprot.ReadStringAsync(cancellationToken);
              }
              else
              {
                await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
              }
              break;
            case 11:
              if (field.Type == TType.String)
              {
                Build = await iprot.ReadStringAsync(cancellationToken);
              }
              else
              {
                await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
              }
              break;
            case 12:
              if (field.Type == TType.String)
              {
                Shine = await iprot.ReadStringAsync(cancellationToken);
              }
              else
              {
                await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
              }
              break;
            case 13:
              if (field.Type == TType.String)
              {
                Origin = await iprot.ReadStringAsync(cancellationToken);
              }
              else
              {
                await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
              }
              break;
            case 14:
              if (field.Type == TType.String)
              {
                DecoratePos = await iprot.ReadStringAsync(cancellationToken);
              }
              else
              {
                await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
              }
              break;
            case 15:
              if (field.Type == TType.String)
              {
                Skip = await iprot.ReadStringAsync(cancellationToken);
              }
              else
              {
                await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
              }
              break;
            case 16:
              if (field.Type == TType.String)
              {
                MapPethomeId = await iprot.ReadStringAsync(cancellationToken);
              }
              else
              {
                await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
              }
              break;
            case 17:
              if (field.Type == TType.String)
              {
                PetExp = 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("DecorateCostItem");
        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.AreaId)
        {
          tmp2.Name = "AreaId";
          tmp2.Type = TType.I32;
          tmp2.ID = 2;
          await oprot.WriteFieldBeginAsync(tmp2, cancellationToken);
          await oprot.WriteI32Async(AreaId, cancellationToken);
          await oprot.WriteFieldEndAsync(cancellationToken);
        }
        if(__isset.SortId)
        {
          tmp2.Name = "SortId";
          tmp2.Type = TType.I32;
          tmp2.ID = 3;
          await oprot.WriteFieldBeginAsync(tmp2, cancellationToken);
          await oprot.WriteI32Async(SortId, cancellationToken);
          await oprot.WriteFieldEndAsync(cancellationToken);
        }
        if(__isset.CostCount)
        {
          tmp2.Name = "CostCount";
          tmp2.Type = TType.I32;
          tmp2.ID = 4;
          await oprot.WriteFieldBeginAsync(tmp2, cancellationToken);
          await oprot.WriteI32Async(CostCount, cancellationToken);
          await oprot.WriteFieldEndAsync(cancellationToken);
        }
        if((Title != null) && __isset.Title)
        {
          tmp2.Name = "Title";
          tmp2.Type = TType.String;
          tmp2.ID = 5;
          await oprot.WriteFieldBeginAsync(tmp2, cancellationToken);
          await oprot.WriteStringAsync(Title, cancellationToken);
          await oprot.WriteFieldEndAsync(cancellationToken);
        }
        if((Icon != null) && __isset.Icon)
        {
          tmp2.Name = "Icon";
          tmp2.Type = TType.String;
          tmp2.ID = 6;
          await oprot.WriteFieldBeginAsync(tmp2, cancellationToken);
          await oprot.WriteStringAsync(Icon, cancellationToken);
          await oprot.WriteFieldEndAsync(cancellationToken);
        }
        if((Pos != null) && __isset.Pos)
        {
          tmp2.Name = "Pos";
          tmp2.Type = TType.String;
          tmp2.ID = 7;
          await oprot.WriteFieldBeginAsync(tmp2, cancellationToken);
          await oprot.WriteStringAsync(Pos, cancellationToken);
          await oprot.WriteFieldEndAsync(cancellationToken);
        }
        if((Action != null) && __isset.Action)
        {
          tmp2.Name = "Action";
          tmp2.Type = TType.String;
          tmp2.ID = 8;
          await oprot.WriteFieldBeginAsync(tmp2, cancellationToken);
          await oprot.WriteStringAsync(Action, cancellationToken);
          await oprot.WriteFieldEndAsync(cancellationToken);
        }
        if((Spine != null) && __isset.Spine)
        {
          tmp2.Name = "Spine";
          tmp2.Type = TType.String;
          tmp2.ID = 9;
          await oprot.WriteFieldBeginAsync(tmp2, cancellationToken);
          await oprot.WriteStringAsync(Spine, cancellationToken);
          await oprot.WriteFieldEndAsync(cancellationToken);
        }
        if((Button != null) && __isset.Button)
        {
          tmp2.Name = "Button";
          tmp2.Type = TType.String;
          tmp2.ID = 10;
          await oprot.WriteFieldBeginAsync(tmp2, cancellationToken);
          await oprot.WriteStringAsync(Button, cancellationToken);
          await oprot.WriteFieldEndAsync(cancellationToken);
        }
        if((Build != null) && __isset.Build)
        {
          tmp2.Name = "Build";
          tmp2.Type = TType.String;
          tmp2.ID = 11;
          await oprot.WriteFieldBeginAsync(tmp2, cancellationToken);
          await oprot.WriteStringAsync(Build, cancellationToken);
          await oprot.WriteFieldEndAsync(cancellationToken);
        }
        if((Shine != null) && __isset.Shine)
        {
          tmp2.Name = "Shine";
          tmp2.Type = TType.String;
          tmp2.ID = 12;
          await oprot.WriteFieldBeginAsync(tmp2, cancellationToken);
          await oprot.WriteStringAsync(Shine, cancellationToken);
          await oprot.WriteFieldEndAsync(cancellationToken);
        }
        if((Origin != null) && __isset.Origin)
        {
          tmp2.Name = "Origin";
          tmp2.Type = TType.String;
          tmp2.ID = 13;
          await oprot.WriteFieldBeginAsync(tmp2, cancellationToken);
          await oprot.WriteStringAsync(Origin, cancellationToken);
          await oprot.WriteFieldEndAsync(cancellationToken);
        }
        if((DecoratePos != null) && __isset.DecoratePos)
        {
          tmp2.Name = "DecoratePos";
          tmp2.Type = TType.String;
          tmp2.ID = 14;
          await oprot.WriteFieldBeginAsync(tmp2, cancellationToken);
          await oprot.WriteStringAsync(DecoratePos, cancellationToken);
          await oprot.WriteFieldEndAsync(cancellationToken);
        }
        if((Skip != null) && __isset.Skip)
        {
          tmp2.Name = "Skip";
          tmp2.Type = TType.String;
          tmp2.ID = 15;
          await oprot.WriteFieldBeginAsync(tmp2, cancellationToken);
          await oprot.WriteStringAsync(Skip, cancellationToken);
          await oprot.WriteFieldEndAsync(cancellationToken);
        }
        if((MapPethomeId != null) && __isset.MapPethomeId)
        {
          tmp2.Name = "MapPethomeId";
          tmp2.Type = TType.String;
          tmp2.ID = 16;
          await oprot.WriteFieldBeginAsync(tmp2, cancellationToken);
          await oprot.WriteStringAsync(MapPethomeId, cancellationToken);
          await oprot.WriteFieldEndAsync(cancellationToken);
        }
        if((PetExp != null) && __isset.PetExp)
        {
          tmp2.Name = "PetExp";
          tmp2.Type = TType.String;
          tmp2.ID = 17;
          await oprot.WriteFieldBeginAsync(tmp2, cancellationToken);
          await oprot.WriteStringAsync(PetExp, 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 DecorateCostItem 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.AreaId == other.__isset.AreaId) && ((!__isset.AreaId) || (global::System.Object.Equals(AreaId, other.AreaId))))
        && ((__isset.SortId == other.__isset.SortId) && ((!__isset.SortId) || (global::System.Object.Equals(SortId, other.SortId))))
        && ((__isset.CostCount == other.__isset.CostCount) && ((!__isset.CostCount) || (global::System.Object.Equals(CostCount, other.CostCount))))
        && ((__isset.Title == other.__isset.Title) && ((!__isset.Title) || (global::System.Object.Equals(Title, other.Title))))
        && ((__isset.Icon == other.__isset.Icon) && ((!__isset.Icon) || (global::System.Object.Equals(Icon, other.Icon))))
        && ((__isset.Pos == other.__isset.Pos) && ((!__isset.Pos) || (global::System.Object.Equals(Pos, other.Pos))))
        && ((__isset.Action == other.__isset.Action) && ((!__isset.Action) || (global::System.Object.Equals(Action, other.Action))))
        && ((__isset.Spine == other.__isset.Spine) && ((!__isset.Spine) || (global::System.Object.Equals(Spine, other.Spine))))
        && ((__isset.Button == other.__isset.Button) && ((!__isset.Button) || (global::System.Object.Equals(Button, other.Button))))
        && ((__isset.Build == other.__isset.Build) && ((!__isset.Build) || (global::System.Object.Equals(Build, other.Build))))
        && ((__isset.Shine == other.__isset.Shine) && ((!__isset.Shine) || (global::System.Object.Equals(Shine, other.Shine))))
        && ((__isset.Origin == other.__isset.Origin) && ((!__isset.Origin) || (global::System.Object.Equals(Origin, other.Origin))))
        && ((__isset.DecoratePos == other.__isset.DecoratePos) && ((!__isset.DecoratePos) || (global::System.Object.Equals(DecoratePos, other.DecoratePos))))
        && ((__isset.Skip == other.__isset.Skip) && ((!__isset.Skip) || (global::System.Object.Equals(Skip, other.Skip))))
        && ((__isset.MapPethomeId == other.__isset.MapPethomeId) && ((!__isset.MapPethomeId) || (global::System.Object.Equals(MapPethomeId, other.MapPethomeId))))
        && ((__isset.PetExp == other.__isset.PetExp) && ((!__isset.PetExp) || (global::System.Object.Equals(PetExp, other.PetExp))));
    }

    public override int GetHashCode() {
      int hashcode = 157;
      unchecked {
        if(__isset.Id)
        {
          hashcode = (hashcode * 397) + Id.GetHashCode();
        }
        if(__isset.AreaId)
        {
          hashcode = (hashcode * 397) + AreaId.GetHashCode();
        }
        if(__isset.SortId)
        {
          hashcode = (hashcode * 397) + SortId.GetHashCode();
        }
        if(__isset.CostCount)
        {
          hashcode = (hashcode * 397) + CostCount.GetHashCode();
        }
        if((Title != null) && __isset.Title)
        {
          hashcode = (hashcode * 397) + Title.GetHashCode();
        }
        if((Icon != null) && __isset.Icon)
        {
          hashcode = (hashcode * 397) + Icon.GetHashCode();
        }
        if((Pos != null) && __isset.Pos)
        {
          hashcode = (hashcode * 397) + Pos.GetHashCode();
        }
        if((Action != null) && __isset.Action)
        {
          hashcode = (hashcode * 397) + Action.GetHashCode();
        }
        if((Spine != null) && __isset.Spine)
        {
          hashcode = (hashcode * 397) + Spine.GetHashCode();
        }
        if((Button != null) && __isset.Button)
        {
          hashcode = (hashcode * 397) + Button.GetHashCode();
        }
        if((Build != null) && __isset.Build)
        {
          hashcode = (hashcode * 397) + Build.GetHashCode();
        }
        if((Shine != null) && __isset.Shine)
        {
          hashcode = (hashcode * 397) + Shine.GetHashCode();
        }
        if((Origin != null) && __isset.Origin)
        {
          hashcode = (hashcode * 397) + Origin.GetHashCode();
        }
        if((DecoratePos != null) && __isset.DecoratePos)
        {
          hashcode = (hashcode * 397) + DecoratePos.GetHashCode();
        }
        if((Skip != null) && __isset.Skip)
        {
          hashcode = (hashcode * 397) + Skip.GetHashCode();
        }
        if((MapPethomeId != null) && __isset.MapPethomeId)
        {
          hashcode = (hashcode * 397) + MapPethomeId.GetHashCode();
        }
        if((PetExp != null) && __isset.PetExp)
        {
          hashcode = (hashcode * 397) + PetExp.GetHashCode();
        }
      }
      return hashcode;
    }

    public override string ToString()
    {
      var tmp3 = new StringBuilder("DecorateCostItem(");
      int tmp4 = 0;
      if(__isset.Id)
      {
        if(0 < tmp4++) { tmp3.Append(", "); }
        tmp3.Append("Id: ");
        Id.ToString(tmp3);
      }
      if(__isset.AreaId)
      {
        if(0 < tmp4++) { tmp3.Append(", "); }
        tmp3.Append("AreaId: ");
        AreaId.ToString(tmp3);
      }
      if(__isset.SortId)
      {
        if(0 < tmp4++) { tmp3.Append(", "); }
        tmp3.Append("SortId: ");
        SortId.ToString(tmp3);
      }
      if(__isset.CostCount)
      {
        if(0 < tmp4++) { tmp3.Append(", "); }
        tmp3.Append("CostCount: ");
        CostCount.ToString(tmp3);
      }
      if((Title != null) && __isset.Title)
      {
        if(0 < tmp4++) { tmp3.Append(", "); }
        tmp3.Append("Title: ");
        Title.ToString(tmp3);
      }
      if((Icon != null) && __isset.Icon)
      {
        if(0 < tmp4++) { tmp3.Append(", "); }
        tmp3.Append("Icon: ");
        Icon.ToString(tmp3);
      }
      if((Pos != null) && __isset.Pos)
      {
        if(0 < tmp4++) { tmp3.Append(", "); }
        tmp3.Append("Pos: ");
        Pos.ToString(tmp3);
      }
      if((Action != null) && __isset.Action)
      {
        if(0 < tmp4++) { tmp3.Append(", "); }
        tmp3.Append("Action: ");
        Action.ToString(tmp3);
      }
      if((Spine != null) && __isset.Spine)
      {
        if(0 < tmp4++) { tmp3.Append(", "); }
        tmp3.Append("Spine: ");
        Spine.ToString(tmp3);
      }
      if((Button != null) && __isset.Button)
      {
        if(0 < tmp4++) { tmp3.Append(", "); }
        tmp3.Append("Button: ");
        Button.ToString(tmp3);
      }
      if((Build != null) && __isset.Build)
      {
        if(0 < tmp4++) { tmp3.Append(", "); }
        tmp3.Append("Build: ");
        Build.ToString(tmp3);
      }
      if((Shine != null) && __isset.Shine)
      {
        if(0 < tmp4++) { tmp3.Append(", "); }
        tmp3.Append("Shine: ");
        Shine.ToString(tmp3);
      }
      if((Origin != null) && __isset.Origin)
      {
        if(0 < tmp4++) { tmp3.Append(", "); }
        tmp3.Append("Origin: ");
        Origin.ToString(tmp3);
      }
      if((DecoratePos != null) && __isset.DecoratePos)
      {
        if(0 < tmp4++) { tmp3.Append(", "); }
        tmp3.Append("DecoratePos: ");
        DecoratePos.ToString(tmp3);
      }
      if((Skip != null) && __isset.Skip)
      {
        if(0 < tmp4++) { tmp3.Append(", "); }
        tmp3.Append("Skip: ");
        Skip.ToString(tmp3);
      }
      if((MapPethomeId != null) && __isset.MapPethomeId)
      {
        if(0 < tmp4++) { tmp3.Append(", "); }
        tmp3.Append("MapPethomeId: ");
        MapPethomeId.ToString(tmp3);
      }
      if((PetExp != null) && __isset.PetExp)
      {
        if(0 < tmp4++) { tmp3.Append(", "); }
        tmp3.Append("PetExp: ");
        PetExp.ToString(tmp3);
      }
      tmp3.Append(')');
      return tmp3.ToString();
    }
  }

}
