public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); } throw new IllegalStateException(); }
@Override public void write(org.apache.thrift.protocol.TProtocol prot, get_all_related_paths_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); for (Map.Entry<String, List<String>> _iter147 : struct.success.entrySet()) { oprot.writeString(_iter147.getKey()); { oprot.writeI32(_iter147.getValue().size()); for (String _iter148 : _iter147.getValue()) { oprot.writeString(_iter148); } } } } } }
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } }
struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); struct.validate();
@Override public void read(org.apache.thrift.protocol.TProtocol prot, get_all_related_paths_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { { org.apache.thrift.protocol.TMap _map149 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.LIST, iprot.readI32()); struct.success = new HashMap<String,List<String>>(2*_map149.size); for (int _i150 = 0; _i150 < _map149.size; ++_i150) { String _key151; // required List<String> _val152; // required _key151 = iprot.readString(); { org.apache.thrift.protocol.TList _list153 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); _val152 = new ArrayList<String>(_list153.size); for (int _i154 = 0; _i154 < _list153.size; ++_i154) { String _elem155; // required _elem155 = iprot.readString(); _val152.add(_elem155); } } struct.success.put(_key151, _val152); } } struct.setSuccessIsSet(true); } } }
public void write(org.apache.thrift.protocol.TProtocol oprot, get_all_related_paths_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.LIST, struct.success.size())); for (Map.Entry<String, List<String>> _iter145 : struct.success.entrySet()) { oprot.writeString(_iter145.getKey()); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, _iter145.getValue().size())); for (String _iter146 : _iter145.getValue()) { oprot.writeString(_iter146); } oprot.writeListEnd(); } } oprot.writeMapEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); }
/** * Performs a deep copy on <i>other</i>. */ public get_all_related_paths_result(get_all_related_paths_result other) { if (other.isSetSuccess()) { Map<String,List<String>> __this__success = new HashMap<String,List<String>>(); for (Map.Entry<String, List<String>> other_element : other.success.entrySet()) { String other_element_key = other_element.getKey(); List<String> other_element_value = other_element.getValue(); String __this__success_copy_key = other_element_key; List<String> __this__success_copy_value = new ArrayList<String>(); for (String other_element_value_element : other_element_value) { __this__success_copy_value.add(other_element_value_element); } __this__success.put(__this__success_copy_key, __this__success_copy_value); } this.success = __this__success; } }
public int compareTo(get_all_related_paths_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_all_related_paths_result typedOther = (get_all_related_paths_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } return 0; }
public get_all_related_paths_result deepCopy() { return new get_all_related_paths_result(this); }
public boolean equals(get_all_related_paths_result that) { if (that == null) return false; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } return true; }
@Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true && (isSetSuccess()); builder.append(present_success); if (present_success) builder.append(success); return builder.toHashCode(); }
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); } throw new IllegalStateException(); }
public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((Map<String,List<String>>)value); } break; } }
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } }
public get_all_related_paths_result getResult(I iface, get_all_related_paths_args args) throws org.apache.thrift.TException { get_all_related_paths_result result = new get_all_related_paths_result(); result.success = iface.get_all_related_paths(args.path, args.exactMatch); return result; } }
@Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_all_related_paths_result) return this.equals((get_all_related_paths_result)that); return false; }
public Map<String,List<String>> recv_get_all_related_paths() throws org.apache.thrift.TException { get_all_related_paths_result result = new get_all_related_paths_result(); receiveBase(result, "get_all_related_paths"); if (result.isSetSuccess()) { return result.success; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_all_related_paths failed: unknown result"); }