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

            if (FailureLogicPackage != null && __isset.FailureLogicPackage)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("FailureLogicPackage: ");
                __sb.Append(FailureLogicPackage);
            }
            if (MinimalCutset != null && __isset.MinimalCutset)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("MinimalCutset: ");
                __sb.Append(MinimalCutset == null ? "<null>" : MinimalCutset.ToString());
            }
            if (InterfaceFailurePropagation != null && __isset.InterfaceFailurePropagation)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("InterfaceFailurePropagation: ");
                __sb.Append(InterfaceFailurePropagation == null ? "<null>" : InterfaceFailurePropagation.ToString());
            }
            if (Failure != null && __isset.Failure)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("Failure: ");
                __sb.Append(Failure == null ? "<null>" : Failure.ToString());
            }
            if (FailureMode != null && __isset.FailureMode)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("FailureMode: ");
                __sb.Append(FailureMode == null ? "<null>" : FailureMode.ToString());
            }
            if (ProbabilityDistribution != null && __isset.ProbabilityDistribution)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("ProbabilityDistribution: ");
                __sb.Append(ProbabilityDistribution == null ? "<null>" : ProbabilityDistribution.ToString());
            }
            if (ProbDistParam != null && __isset.ProbDistParam)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("ProbDistParam: ");
                __sb.Append(ProbDistParam == null ? "<null>" : ProbDistParam.ToString());
            }
            if (FTAArtifact != null && __isset.FTAArtifact)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("FTAArtifact: ");
                __sb.Append(FTAArtifact);
            }
            if (FMEAArtifact != null && __isset.FMEAArtifact)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("FMEAArtifact: ");
                __sb.Append(FMEAArtifact);
            }
            if (MarkovArtifact != null && __isset.MarkovArtifact)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("MarkovArtifact: ");
                __sb.Append(MarkovArtifact);
            }
            __sb.Append(")");
            return(__sb.ToString());
        }
 public void Write(TProtocol oprot)
 {
     oprot.IncrementRecursionDepth();
     try
     {
         TStruct struc = new TStruct("TDDIFailureAnalysisArtifactUnion");
         oprot.WriteStructBegin(struc);
         TField field = new TField();
         if (FailureLogicPackage != null && __isset.FailureLogicPackage)
         {
             field.Name = "FailureLogicPackage";
             field.Type = TType.Struct;
             field.ID   = 1;
             oprot.WriteFieldBegin(field);
             FailureLogicPackage.Write(oprot);
             oprot.WriteFieldEnd();
         }
         if (MinimalCutset != null && __isset.MinimalCutset)
         {
             field.Name = "MinimalCutset";
             field.Type = TType.Struct;
             field.ID   = 2;
             oprot.WriteFieldBegin(field);
             MinimalCutset.Write(oprot);
             oprot.WriteFieldEnd();
         }
         if (InterfaceFailurePropagation != null && __isset.InterfaceFailurePropagation)
         {
             field.Name = "InterfaceFailurePropagation";
             field.Type = TType.Struct;
             field.ID   = 3;
             oprot.WriteFieldBegin(field);
             InterfaceFailurePropagation.Write(oprot);
             oprot.WriteFieldEnd();
         }
         if (Failure != null && __isset.Failure)
         {
             field.Name = "Failure";
             field.Type = TType.Struct;
             field.ID   = 4;
             oprot.WriteFieldBegin(field);
             Failure.Write(oprot);
             oprot.WriteFieldEnd();
         }
         if (FailureMode != null && __isset.FailureMode)
         {
             field.Name = "FailureMode";
             field.Type = TType.Struct;
             field.ID   = 5;
             oprot.WriteFieldBegin(field);
             FailureMode.Write(oprot);
             oprot.WriteFieldEnd();
         }
         if (ProbabilityDistribution != null && __isset.ProbabilityDistribution)
         {
             field.Name = "ProbabilityDistribution";
             field.Type = TType.Struct;
             field.ID   = 6;
             oprot.WriteFieldBegin(field);
             ProbabilityDistribution.Write(oprot);
             oprot.WriteFieldEnd();
         }
         if (ProbDistParam != null && __isset.ProbDistParam)
         {
             field.Name = "ProbDistParam";
             field.Type = TType.Struct;
             field.ID   = 7;
             oprot.WriteFieldBegin(field);
             ProbDistParam.Write(oprot);
             oprot.WriteFieldEnd();
         }
         if (FTAArtifact != null && __isset.FTAArtifact)
         {
             field.Name = "FTAArtifact";
             field.Type = TType.Struct;
             field.ID   = 8;
             oprot.WriteFieldBegin(field);
             FTAArtifact.Write(oprot);
             oprot.WriteFieldEnd();
         }
         if (FMEAArtifact != null && __isset.FMEAArtifact)
         {
             field.Name = "FMEAArtifact";
             field.Type = TType.Struct;
             field.ID   = 9;
             oprot.WriteFieldBegin(field);
             FMEAArtifact.Write(oprot);
             oprot.WriteFieldEnd();
         }
         if (MarkovArtifact != null && __isset.MarkovArtifact)
         {
             field.Name = "MarkovArtifact";
             field.Type = TType.Struct;
             field.ID   = 10;
             oprot.WriteFieldBegin(field);
             MarkovArtifact.Write(oprot);
             oprot.WriteFieldEnd();
         }
         oprot.WriteFieldStop();
         oprot.WriteStructEnd();
     }
     finally
     {
         oprot.DecrementRecursionDepth();
     }
 }