public Object getFieldValue(_Fields field) { switch (field) { case DOMAIN_NAME: return get_domain_name(); case KEY: return get_key(); } throw new IllegalStateException(); }
public int compareTo(get_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_args typedOther = (get_args)other; lastComparison = Boolean.valueOf(is_set_domain_name()).compareTo(typedOther.is_set_domain_name()); if (lastComparison != 0) { return lastComparison; } if (is_set_domain_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.domain_name, typedOther.domain_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(is_set_key()).compareTo(typedOther.is_set_key()); if (lastComparison != 0) { return lastComparison; } if (is_set_key()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.key, typedOther.key); if (lastComparison != 0) { return lastComparison; } } return 0; }
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); } }
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.domain_name = iprot.readString(); struct.set_domain_name_isSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.key = iprot.readBinary(); struct.set_key_isSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); struct.validate();
public boolean equals(get_args that) { if (that == null) return false; boolean this_present_domain_name = true && this.is_set_domain_name(); boolean that_present_domain_name = true && that.is_set_domain_name(); if (this_present_domain_name || that_present_domain_name) { if (!(this_present_domain_name && that_present_domain_name)) return false; if (!this.domain_name.equals(that.domain_name)) return false; } boolean this_present_key = true && this.is_set_key(); boolean that_present_key = true && that.is_set_key(); if (this_present_key || that_present_key) { if (!(this_present_key && that_present_key)) return false; if (!this.key.equals(that.key)) return false; } return true; }
@Override public void write(org.apache.thrift.protocol.TProtocol prot, get_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.is_set_domain_name()) { optionals.set(0); } if (struct.is_set_key()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.is_set_domain_name()) { oprot.writeString(struct.domain_name); } if (struct.is_set_key()) { oprot.writeBinary(struct.key); } }
public void setFieldValue(_Fields field, Object value) { switch (field) { case DOMAIN_NAME: if (value == null) { unset_domain_name(); } else { set_domain_name((String)value); } break; case KEY: if (value == null) { unset_key(); } else { set_key((ByteBuffer)value); } break; } }
public get_args getEmptyArgsInstance() { return new get_args(); }
@Override public void read(org.apache.thrift.protocol.TProtocol prot, get_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.domain_name = iprot.readString(); struct.set_domain_name_isSet(true); } if (incoming.get(1)) { struct.key = iprot.readBinary(); struct.set_key_isSet(true); } } }
public get_args deepCopy() { return new get_args(this); }
public byte[] get_key() { set_key(org.apache.thrift.TBaseHelper.rightSize(key)); return key == null ? null : key.array(); }
public get_args set_key(byte[] key) { set_key(key == null ? (ByteBuffer)null : ByteBuffer.wrap(key)); return this; }
@Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_domain_name = true && (is_set_domain_name()); builder.append(present_domain_name); if (present_domain_name) builder.append(domain_name); boolean present_key = true && (is_set_key()); builder.append(present_key); if (present_key) builder.append(key); 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 DOMAIN_NAME: return is_set_domain_name(); case KEY: return is_set_key(); } throw new IllegalStateException(); }
/** * Performs a deep copy on <i>other</i>. */ public get_args(get_args other) { if (other.is_set_domain_name()) { this.domain_name = other.domain_name; } if (other.is_set_key()) { this.key = org.apache.thrift.TBaseHelper.copyBinary(other.key); ; } }
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_args args = new get_args(); args.set_domain_name(domain_name); args.set_key(key); args.write(prot); prot.writeMessageEnd(); }
public void send_get(String domain_name, ByteBuffer key) throws org.apache.thrift.TException { get_args args = new get_args(); args.set_domain_name(domain_name); args.set_key(key); sendBase("get", args); }
@Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_args) return this.equals((get_args)that); return false; }