public override string ToString()
        {
            StringBuilder __sb    = new StringBuilder("TDDIAbstractCause(");
            bool          __first = true;

            if (UsedCause != null && __isset.UsedCause)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("UsedCause: ");
                __sb.Append(UsedCause == null ? "<null>" : UsedCause.ToString());
            }
            if (__isset.UsedCauseType)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("UsedCauseType: ");
                __sb.Append(UsedCauseType);
            }
            __sb.Append(")");
            return(__sb.ToString());
        }
 public void Write(TProtocol oprot)
 {
     oprot.IncrementRecursionDepth();
     try
     {
         TStruct struc = new TStruct("TDDIAbstractCause");
         oprot.WriteStructBegin(struc);
         TField field = new TField();
         if (UsedCause != null && __isset.UsedCause)
         {
             field.Name = "UsedCause";
             field.Type = TType.Struct;
             field.ID   = 1;
             oprot.WriteFieldBegin(field);
             UsedCause.Write(oprot);
             oprot.WriteFieldEnd();
         }
         if (__isset.UsedCauseType)
         {
             field.Name = "UsedCauseType";
             field.Type = TType.I32;
             field.ID   = 2;
             oprot.WriteFieldBegin(field);
             oprot.WriteI32((int)UsedCauseType);
             oprot.WriteFieldEnd();
         }
         oprot.WriteFieldStop();
         oprot.WriteStructEnd();
     }
     finally
     {
         oprot.DecrementRecursionDepth();
     }
 }