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

            if (__isset.Id)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("Id: ");
                __sb.Append(Id);
            }
            if (Name != null && __isset.Name)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("Name: ");
                __sb.Append(Name);
            }
            if (Description != null && __isset.Description)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("Description: ");
                __sb.Append(Description);
            }
            if (__isset.IsCitation)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("IsCitation: ");
                __sb.Append(IsCitation);
            }
            if (__isset.IsAbstract)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("IsAbstract: ");
                __sb.Append(IsAbstract);
            }
            if (KeyValueMaps != null && __isset.KeyValueMaps)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("KeyValueMaps: ");
                __sb.Append(KeyValueMaps);
            }
            if (CitedElement != null && __isset.CitedElement)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("CitedElement: ");
                __sb.Append(CitedElement == null ? "<null>" : CitedElement.ToString());
            }
            if (__isset.Probability)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("Probability: ");
                __sb.Append(Probability);
            }
            if (ProbabilityDistribution != null && __isset.ProbabilityDistribution)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("ProbabilityDistribution: ");
                __sb.Append(ProbabilityDistribution == null ? "<null>" : ProbabilityDistribution.ToString());
            }
            if (FromFailState != null && __isset.FromFailState)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("FromFailState: ");
                __sb.Append(FromFailState == null ? "<null>" : FromFailState.ToString());
            }
            if (ToFailState != null && __isset.ToFailState)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("ToFailState: ");
                __sb.Append(ToFailState == null ? "<null>" : ToFailState.ToString());
            }
            if (FromState != null && __isset.FromState)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("FromState: ");
                __sb.Append(FromState == null ? "<null>" : FromState.ToString());
            }
            if (ToState != null && __isset.ToState)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("ToState: ");
                __sb.Append(ToState == null ? "<null>" : ToState.ToString());
            }
            __sb.Append(")");
            return(__sb.ToString());
        }
 public void Write(TProtocol oprot)
 {
     oprot.IncrementRecursionDepth();
     try
     {
         TStruct struc = new TStruct("TDDITransition");
         oprot.WriteStructBegin(struc);
         TField field = new TField();
         if (__isset.Id)
         {
             field.Name = "Id";
             field.Type = TType.I64;
             field.ID   = 1;
             oprot.WriteFieldBegin(field);
             oprot.WriteI64(Id);
             oprot.WriteFieldEnd();
         }
         if (Name != null && __isset.Name)
         {
             field.Name = "Name";
             field.Type = TType.String;
             field.ID   = 2;
             oprot.WriteFieldBegin(field);
             oprot.WriteString(Name);
             oprot.WriteFieldEnd();
         }
         if (Description != null && __isset.Description)
         {
             field.Name = "Description";
             field.Type = TType.String;
             field.ID   = 3;
             oprot.WriteFieldBegin(field);
             oprot.WriteString(Description);
             oprot.WriteFieldEnd();
         }
         if (__isset.IsCitation)
         {
             field.Name = "IsCitation";
             field.Type = TType.Bool;
             field.ID   = 4;
             oprot.WriteFieldBegin(field);
             oprot.WriteBool(IsCitation);
             oprot.WriteFieldEnd();
         }
         if (__isset.IsAbstract)
         {
             field.Name = "IsAbstract";
             field.Type = TType.Bool;
             field.ID   = 5;
             oprot.WriteFieldBegin(field);
             oprot.WriteBool(IsAbstract);
             oprot.WriteFieldEnd();
         }
         if (KeyValueMaps != null && __isset.KeyValueMaps)
         {
             field.Name = "KeyValueMaps";
             field.Type = TType.List;
             field.ID   = 6;
             oprot.WriteFieldBegin(field);
             {
                 oprot.WriteListBegin(new TList(TType.Struct, KeyValueMaps.Count));
                 foreach (TDDIKeyValueMapRef _iter827 in KeyValueMaps)
                 {
                     _iter827.Write(oprot);
                 }
                 oprot.WriteListEnd();
             }
             oprot.WriteFieldEnd();
         }
         if (CitedElement != null && __isset.CitedElement)
         {
             field.Name = "CitedElement";
             field.Type = TType.Struct;
             field.ID   = 7;
             oprot.WriteFieldBegin(field);
             CitedElement.Write(oprot);
             oprot.WriteFieldEnd();
         }
         if (__isset.Probability)
         {
             field.Name = "Probability";
             field.Type = TType.Double;
             field.ID   = 8;
             oprot.WriteFieldBegin(field);
             oprot.WriteDouble(Probability);
             oprot.WriteFieldEnd();
         }
         if (ProbabilityDistribution != null && __isset.ProbabilityDistribution)
         {
             field.Name = "ProbabilityDistribution";
             field.Type = TType.Struct;
             field.ID   = 9;
             oprot.WriteFieldBegin(field);
             ProbabilityDistribution.Write(oprot);
             oprot.WriteFieldEnd();
         }
         if (FromFailState != null && __isset.FromFailState)
         {
             field.Name = "FromFailState";
             field.Type = TType.Struct;
             field.ID   = 10;
             oprot.WriteFieldBegin(field);
             FromFailState.Write(oprot);
             oprot.WriteFieldEnd();
         }
         if (ToFailState != null && __isset.ToFailState)
         {
             field.Name = "ToFailState";
             field.Type = TType.Struct;
             field.ID   = 11;
             oprot.WriteFieldBegin(field);
             ToFailState.Write(oprot);
             oprot.WriteFieldEnd();
         }
         if (FromState != null && __isset.FromState)
         {
             field.Name = "FromState";
             field.Type = TType.Struct;
             field.ID   = 12;
             oprot.WriteFieldBegin(field);
             FromState.Write(oprot);
             oprot.WriteFieldEnd();
         }
         if (ToState != null && __isset.ToState)
         {
             field.Name = "ToState";
             field.Type = TType.Struct;
             field.ID   = 13;
             oprot.WriteFieldBegin(field);
             ToState.Write(oprot);
             oprot.WriteFieldEnd();
         }
         oprot.WriteFieldStop();
         oprot.WriteStructEnd();
     }
     finally
     {
         oprot.DecrementRecursionDepth();
     }
 }