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

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