public void Write(TProtocol oprot)
 {
     oprot.IncrementRecursionDepth();
     try
     {
         TStruct struc = new TStruct("TDDIUtilityElementUnion");
         oprot.WriteStructBegin(struc);
         TField field = new TField();
         if (Description != null && __isset.Description)
         {
             field.Name = "Description";
             field.Type = TType.Struct;
             field.ID   = 1;
             oprot.WriteFieldBegin(field);
             Description.Write(oprot);
             oprot.WriteFieldEnd();
         }
         if (ImplementationConstraint != null && __isset.ImplementationConstraint)
         {
             field.Name = "ImplementationConstraint";
             field.Type = TType.Struct;
             field.ID   = 2;
             oprot.WriteFieldBegin(field);
             ImplementationConstraint.Write(oprot);
             oprot.WriteFieldEnd();
         }
         if (Note != null && __isset.Note)
         {
             field.Name = "Note";
             field.Type = TType.Struct;
             field.ID   = 3;
             oprot.WriteFieldBegin(field);
             Note.Write(oprot);
             oprot.WriteFieldEnd();
         }
         if (TaggedValue != null && __isset.TaggedValue)
         {
             field.Name = "TaggedValue";
             field.Type = TType.Struct;
             field.ID   = 4;
             oprot.WriteFieldBegin(field);
             TaggedValue.Write(oprot);
             oprot.WriteFieldEnd();
         }
         oprot.WriteFieldStop();
         oprot.WriteStructEnd();
     }
     finally
     {
         oprot.DecrementRecursionDepth();
     }
 }
        public override string ToString()
        {
            StringBuilder __sb    = new StringBuilder("TDDIUtilityElementUnion(");
            bool          __first = true;

            if (Description != null && __isset.Description)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("Description: ");
                __sb.Append(Description == null ? "<null>" : Description.ToString());
            }
            if (ImplementationConstraint != null && __isset.ImplementationConstraint)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("ImplementationConstraint: ");
                __sb.Append(ImplementationConstraint == null ? "<null>" : ImplementationConstraint.ToString());
            }
            if (Note != null && __isset.Note)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("Note: ");
                __sb.Append(Note == null ? "<null>" : Note.ToString());
            }
            if (TaggedValue != null && __isset.TaggedValue)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("TaggedValue: ");
                __sb.Append(TaggedValue == null ? "<null>" : TaggedValue.ToString());
            }
            __sb.Append(")");
            return(__sb.ToString());
        }