public void Write(TProtocol oprot) { oprot.IncrementRecursionDepth(); try { TStruct struc = new TStruct("TimeUnit"); oprot.WriteStructBegin(struc); TField field = new TField(); if (MILLIS != null && __isset.MILLIS) { field.Name = "MILLIS"; field.Type = TType.Struct; field.ID = 1; oprot.WriteFieldBegin(field); MILLIS.Write(oprot); oprot.WriteFieldEnd(); } if (MICROS != null && __isset.MICROS) { field.Name = "MICROS"; field.Type = TType.Struct; field.ID = 2; oprot.WriteFieldBegin(field); MICROS.Write(oprot); oprot.WriteFieldEnd(); } if (NANOS != null && __isset.NANOS) { field.Name = "NANOS"; field.Type = TType.Struct; field.ID = 3; oprot.WriteFieldBegin(field); NANOS.Write(oprot); oprot.WriteFieldEnd(); } oprot.WriteFieldStop(); oprot.WriteStructEnd(); } finally { oprot.DecrementRecursionDepth(); } }
public override string ToString() { StringBuilder __sb = new StringBuilder("TimeUnit("); bool __first = true; if (MILLIS != null && __isset.MILLIS) { if (!__first) { __sb.Append(", "); } __first = false; __sb.Append("MILLIS: "); __sb.Append(MILLIS == null ? "<null>" : MILLIS.ToString()); } if (MICROS != null && __isset.MICROS) { if (!__first) { __sb.Append(", "); } __first = false; __sb.Append("MICROS: "); __sb.Append(MICROS == null ? "<null>" : MICROS.ToString()); } if (NANOS != null && __isset.NANOS) { if (!__first) { __sb.Append(", "); } __first = false; __sb.Append("NANOS: "); __sb.Append(NANOS == null ? "<null>" : NANOS.ToString()); } __sb.Append(")"); return(__sb.ToString()); }