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

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