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

            if (TerminologyElement != null && __isset.TerminologyElement)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("TerminologyElement: ");
                __sb.Append(TerminologyElement);
            }
            if (AssuranceCasePackage != null && __isset.AssuranceCasePackage)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("AssuranceCasePackage: ");
                __sb.Append(AssuranceCasePackage == null ? "<null>" : AssuranceCasePackage.ToString());
            }
            if (ArtifactPackage != null && __isset.ArtifactPackage)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("ArtifactPackage: ");
                __sb.Append(ArtifactPackage == null ? "<null>" : ArtifactPackage.ToString());
            }
            if (ArtifactGroup != null && __isset.ArtifactGroup)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("ArtifactGroup: ");
                __sb.Append(ArtifactGroup == null ? "<null>" : ArtifactGroup.ToString());
            }
            if (ArtifactAsset != null && __isset.ArtifactAsset)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("ArtifactAsset: ");
                __sb.Append(ArtifactAsset == null ? "<null>" : ArtifactAsset.ToString());
            }
            if (ArgumentationElement != null && __isset.ArgumentationElement)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("ArgumentationElement: ");
                __sb.Append(ArgumentationElement == null ? "<null>" : ArgumentationElement.ToString());
            }
            __sb.Append(")");
            return(__sb.ToString());
        }
 public void Write(TProtocol oprot)
 {
     oprot.IncrementRecursionDepth();
     try
     {
         TStruct struc = new TStruct("TDDIArtifactElementUnion");
         oprot.WriteStructBegin(struc);
         TField field = new TField();
         if (TerminologyElement != null && __isset.TerminologyElement)
         {
             field.Name = "TerminologyElement";
             field.Type = TType.Struct;
             field.ID   = 1;
             oprot.WriteFieldBegin(field);
             TerminologyElement.Write(oprot);
             oprot.WriteFieldEnd();
         }
         if (AssuranceCasePackage != null && __isset.AssuranceCasePackage)
         {
             field.Name = "AssuranceCasePackage";
             field.Type = TType.Struct;
             field.ID   = 2;
             oprot.WriteFieldBegin(field);
             AssuranceCasePackage.Write(oprot);
             oprot.WriteFieldEnd();
         }
         if (ArtifactPackage != null && __isset.ArtifactPackage)
         {
             field.Name = "ArtifactPackage";
             field.Type = TType.Struct;
             field.ID   = 3;
             oprot.WriteFieldBegin(field);
             ArtifactPackage.Write(oprot);
             oprot.WriteFieldEnd();
         }
         if (ArtifactGroup != null && __isset.ArtifactGroup)
         {
             field.Name = "ArtifactGroup";
             field.Type = TType.Struct;
             field.ID   = 4;
             oprot.WriteFieldBegin(field);
             ArtifactGroup.Write(oprot);
             oprot.WriteFieldEnd();
         }
         if (ArtifactAsset != null && __isset.ArtifactAsset)
         {
             field.Name = "ArtifactAsset";
             field.Type = TType.Struct;
             field.ID   = 5;
             oprot.WriteFieldBegin(field);
             ArtifactAsset.Write(oprot);
             oprot.WriteFieldEnd();
         }
         if (ArgumentationElement != null && __isset.ArgumentationElement)
         {
             field.Name = "ArgumentationElement";
             field.Type = TType.Struct;
             field.ID   = 6;
             oprot.WriteFieldBegin(field);
             ArgumentationElement.Write(oprot);
             oprot.WriteFieldEnd();
         }
         oprot.WriteFieldStop();
         oprot.WriteStructEnd();
     }
     finally
     {
         oprot.DecrementRecursionDepth();
     }
 }