public override string ToString() { StringBuilder __sb = new StringBuilder("GetMeta_result("); bool __first = true; if (Success != null && __isset.success) { if (!__first) { __sb.Append(", "); } __first = false; __sb.Append("Success: "); __sb.Append(Success == null ? "<null>" : Success.ToString()); } if (NetException != null && __isset.netException) { if (!__first) { __sb.Append(", "); } __first = false; __sb.Append("NetException: "); __sb.Append(NetException == null ? "<null>" : NetException.ToString()); } if (NotFoundException != null && __isset.notFoundException) { if (!__first) { __sb.Append(", "); } __first = false; __sb.Append("NotFoundException: "); __sb.Append(NotFoundException == null ? "<null>" : NotFoundException.ToString()); } if (UnknownException != null && __isset.unknownException) { if (!__first) { __sb.Append(", "); } __first = false; __sb.Append("UnknownException: "); __sb.Append(UnknownException == null ? "<null>" : UnknownException.ToString()); } if (MetaNotFoundException != null && __isset.metaNotFoundException) { if (!__first) { __sb.Append(", "); } __first = false; __sb.Append("MetaNotFoundException: "); __sb.Append(MetaNotFoundException == null ? "<null>" : MetaNotFoundException.ToString()); } __sb.Append(")"); return(__sb.ToString()); }
public void Write(TProtocol oprot) { oprot.IncrementRecursionDepth(); try { TStruct struc = new TStruct("GetMeta_result"); oprot.WriteStructBegin(struc); TField field = new TField(); if (this.__isset.success) { if (Success != null) { field.Name = "Success"; field.Type = TType.Struct; field.ID = 0; oprot.WriteFieldBegin(field); Success.Write(oprot); oprot.WriteFieldEnd(); } } else if (this.__isset.netException) { if (NetException != null) { field.Name = "NetException"; field.Type = TType.Struct; field.ID = 1; oprot.WriteFieldBegin(field); NetException.Write(oprot); oprot.WriteFieldEnd(); } } else if (this.__isset.notFoundException) { if (NotFoundException != null) { field.Name = "NotFoundException"; field.Type = TType.Struct; field.ID = 2; oprot.WriteFieldBegin(field); NotFoundException.Write(oprot); oprot.WriteFieldEnd(); } } else if (this.__isset.unknownException) { if (UnknownException != null) { field.Name = "UnknownException"; field.Type = TType.Struct; field.ID = 3; oprot.WriteFieldBegin(field); UnknownException.Write(oprot); oprot.WriteFieldEnd(); } } else if (this.__isset.metaNotFoundException) { if (MetaNotFoundException != null) { field.Name = "MetaNotFoundException"; field.Type = TType.Struct; field.ID = 4; oprot.WriteFieldBegin(field); MetaNotFoundException.Write(oprot); oprot.WriteFieldEnd(); } } oprot.WriteFieldStop(); oprot.WriteStructEnd(); } finally { oprot.DecrementRecursionDepth(); } }
public void Read(TProtocol iprot) { iprot.IncrementRecursionDepth(); try { TField field; iprot.ReadStructBegin(); while (true) { field = iprot.ReadFieldBegin(); if (field.Type == TType.Stop) { break; } switch (field.ID) { case 0: if (field.Type == TType.Struct) { Success = new OpenGraphMeta(); Success.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 1: if (field.Type == TType.Struct) { NetException = new NetException(); NetException.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 2: if (field.Type == TType.Struct) { NotFoundException = new NotFoundException(); NotFoundException.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 3: if (field.Type == TType.Struct) { UnknownException = new UnknownException(); UnknownException.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 4: if (field.Type == TType.Struct) { MetaNotFoundException = new MetaNotFoundException(); MetaNotFoundException.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; default: TProtocolUtil.Skip(iprot, field.Type); break; } iprot.ReadFieldEnd(); } iprot.ReadStructEnd(); } finally { iprot.DecrementRecursionDepth(); } }