public override int GetHashCode() { int hashcode = 157; unchecked { if (__isset.primitiveEntry) { hashcode = (hashcode * 397) + PrimitiveEntry.GetHashCode(); } if (__isset.arrayEntry) { hashcode = (hashcode * 397) + ArrayEntry.GetHashCode(); } if (__isset.mapEntry) { hashcode = (hashcode * 397) + MapEntry.GetHashCode(); } if (__isset.structEntry) { hashcode = (hashcode * 397) + StructEntry.GetHashCode(); } if (__isset.unionEntry) { hashcode = (hashcode * 397) + UnionEntry.GetHashCode(); } if (__isset.userDefinedTypeEntry) { hashcode = (hashcode * 397) + UserDefinedTypeEntry.GetHashCode(); } } return(hashcode); }
public override string ToString() { StringBuilder sb = new StringBuilder("TTypeEntry("); sb.Append("PrimitiveEntry: "); sb.Append(PrimitiveEntry == null ? "<null>" : PrimitiveEntry.ToString()); sb.Append(",ArrayEntry: "); sb.Append(ArrayEntry == null ? "<null>" : ArrayEntry.ToString()); sb.Append(",MapEntry: "); sb.Append(MapEntry == null ? "<null>" : MapEntry.ToString()); sb.Append(",StructEntry: "); sb.Append(StructEntry == null ? "<null>" : StructEntry.ToString()); sb.Append(",UnionEntry: "); sb.Append(UnionEntry == null ? "<null>" : UnionEntry.ToString()); sb.Append(",UserDefinedTypeEntry: "); sb.Append(UserDefinedTypeEntry == null ? "<null>" : UserDefinedTypeEntry.ToString()); sb.Append(")"); return(sb.ToString()); }
public void Write(TProtocol oprot) { TStruct struc = new TStruct("TTypeEntry"); oprot.WriteStructBegin(struc); TField field = new TField(); if (PrimitiveEntry != null && __isset.primitiveEntry) { field.Name = "primitiveEntry"; field.Type = TType.Struct; field.ID = 1; oprot.WriteFieldBegin(field); PrimitiveEntry.Write(oprot); oprot.WriteFieldEnd(); } if (ArrayEntry != null && __isset.arrayEntry) { field.Name = "arrayEntry"; field.Type = TType.Struct; field.ID = 2; oprot.WriteFieldBegin(field); ArrayEntry.Write(oprot); oprot.WriteFieldEnd(); } if (MapEntry != null && __isset.mapEntry) { field.Name = "mapEntry"; field.Type = TType.Struct; field.ID = 3; oprot.WriteFieldBegin(field); MapEntry.Write(oprot); oprot.WriteFieldEnd(); } if (StructEntry != null && __isset.structEntry) { field.Name = "structEntry"; field.Type = TType.Struct; field.ID = 4; oprot.WriteFieldBegin(field); StructEntry.Write(oprot); oprot.WriteFieldEnd(); } if (UnionEntry != null && __isset.unionEntry) { field.Name = "unionEntry"; field.Type = TType.Struct; field.ID = 5; oprot.WriteFieldBegin(field); UnionEntry.Write(oprot); oprot.WriteFieldEnd(); } if (UserDefinedTypeEntry != null && __isset.userDefinedTypeEntry) { field.Name = "userDefinedTypeEntry"; field.Type = TType.Struct; field.ID = 6; oprot.WriteFieldBegin(field); UserDefinedTypeEntry.Write(oprot); oprot.WriteFieldEnd(); } oprot.WriteFieldStop(); oprot.WriteStructEnd(); }
public override string ToString() { var sb = new StringBuilder("TTypeEntry("); bool __first = true; if (PrimitiveEntry != null && __isset.primitiveEntry) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("PrimitiveEntry: "); sb.Append(PrimitiveEntry == null ? "<null>" : PrimitiveEntry.ToString()); } if (ArrayEntry != null && __isset.arrayEntry) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("ArrayEntry: "); sb.Append(ArrayEntry == null ? "<null>" : ArrayEntry.ToString()); } if (MapEntry != null && __isset.mapEntry) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("MapEntry: "); sb.Append(MapEntry == null ? "<null>" : MapEntry.ToString()); } if (StructEntry != null && __isset.structEntry) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("StructEntry: "); sb.Append(StructEntry == null ? "<null>" : StructEntry.ToString()); } if (UnionEntry != null && __isset.unionEntry) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("UnionEntry: "); sb.Append(UnionEntry == null ? "<null>" : UnionEntry.ToString()); } if (UserDefinedTypeEntry != null && __isset.userDefinedTypeEntry) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("UserDefinedTypeEntry: "); sb.Append(UserDefinedTypeEntry == null ? "<null>" : UserDefinedTypeEntry.ToString()); } sb.Append(")"); return(sb.ToString()); }
public async Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken) { oprot.IncrementRecursionDepth(); try { var struc = new TStruct("TTypeEntry"); await oprot.WriteStructBeginAsync(struc, cancellationToken); var field = new TField(); if (PrimitiveEntry != null && __isset.primitiveEntry) { field.Name = "primitiveEntry"; field.Type = TType.Struct; field.ID = 1; await oprot.WriteFieldBeginAsync(field, cancellationToken); await PrimitiveEntry.WriteAsync(oprot, cancellationToken); await oprot.WriteFieldEndAsync(cancellationToken); } if (ArrayEntry != null && __isset.arrayEntry) { field.Name = "arrayEntry"; field.Type = TType.Struct; field.ID = 2; await oprot.WriteFieldBeginAsync(field, cancellationToken); await ArrayEntry.WriteAsync(oprot, cancellationToken); await oprot.WriteFieldEndAsync(cancellationToken); } if (MapEntry != null && __isset.mapEntry) { field.Name = "mapEntry"; field.Type = TType.Struct; field.ID = 3; await oprot.WriteFieldBeginAsync(field, cancellationToken); await MapEntry.WriteAsync(oprot, cancellationToken); await oprot.WriteFieldEndAsync(cancellationToken); } if (StructEntry != null && __isset.structEntry) { field.Name = "structEntry"; field.Type = TType.Struct; field.ID = 4; await oprot.WriteFieldBeginAsync(field, cancellationToken); await StructEntry.WriteAsync(oprot, cancellationToken); await oprot.WriteFieldEndAsync(cancellationToken); } if (UnionEntry != null && __isset.unionEntry) { field.Name = "unionEntry"; field.Type = TType.Struct; field.ID = 5; await oprot.WriteFieldBeginAsync(field, cancellationToken); await UnionEntry.WriteAsync(oprot, cancellationToken); await oprot.WriteFieldEndAsync(cancellationToken); } if (UserDefinedTypeEntry != null && __isset.userDefinedTypeEntry) { field.Name = "userDefinedTypeEntry"; field.Type = TType.Struct; field.ID = 6; await oprot.WriteFieldBeginAsync(field, cancellationToken); await UserDefinedTypeEntry.WriteAsync(oprot, cancellationToken); await oprot.WriteFieldEndAsync(cancellationToken); } await oprot.WriteFieldStopAsync(cancellationToken); await oprot.WriteStructEndAsync(cancellationToken); } finally { oprot.DecrementRecursionDepth(); } }