public void Write(TProtocol oprot) { oprot.IncrementRecursionDepth(); try { TStruct struc = new TStruct("TDDIInterfaceFailureUnion"); oprot.WriteStructBegin(struc); TField field = new TField(); if (OutputFailure != null && __isset.OutputFailure) { field.Name = "OutputFailure"; field.Type = TType.Struct; field.ID = 1; oprot.WriteFieldBegin(field); OutputFailure.Write(oprot); oprot.WriteFieldEnd(); } if (InputFailure != null && __isset.InputFailure) { field.Name = "InputFailure"; field.Type = TType.Struct; field.ID = 2; oprot.WriteFieldBegin(field); InputFailure.Write(oprot); oprot.WriteFieldEnd(); } oprot.WriteFieldStop(); oprot.WriteStructEnd(); } finally { oprot.DecrementRecursionDepth(); } }
public void Write(TProtocol oprot) { oprot.IncrementRecursionDepth(); try { TStruct struc = new TStruct("TDDIFailState"); 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 _iter822 in KeyValueMaps) { _iter822.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.FailureRate) { field.Name = "FailureRate"; field.Type = TType.Double; field.ID = 8; oprot.WriteFieldBegin(field); oprot.WriteDouble(FailureRate); oprot.WriteFieldEnd(); } if (FailureMode != null && __isset.FailureMode) { field.Name = "FailureMode"; field.Type = TType.Struct; field.ID = 9; oprot.WriteFieldBegin(field); FailureMode.Write(oprot); oprot.WriteFieldEnd(); } if (ProbabilityDistribution != null && __isset.ProbabilityDistribution) { field.Name = "ProbabilityDistribution"; field.Type = TType.Struct; field.ID = 10; oprot.WriteFieldBegin(field); ProbabilityDistribution.Write(oprot); oprot.WriteFieldEnd(); } if (OutputFailure != null && __isset.OutputFailure) { field.Name = "OutputFailure"; field.Type = TType.Struct; field.ID = 11; oprot.WriteFieldBegin(field); OutputFailure.Write(oprot); oprot.WriteFieldEnd(); } if (AssociatedStates != null && __isset.AssociatedStates) { field.Name = "AssociatedStates"; field.Type = TType.List; field.ID = 12; oprot.WriteFieldBegin(field); { oprot.WriteListBegin(new TList(TType.Struct, AssociatedStates.Count)); foreach (TDDIState _iter823 in AssociatedStates) { _iter823.Write(oprot); } oprot.WriteListEnd(); } oprot.WriteFieldEnd(); } oprot.WriteFieldStop(); oprot.WriteStructEnd(); } finally { oprot.DecrementRecursionDepth(); } }