/** * Autogenerated by Thrift * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING */ package org.apache.cassandra.thrift; import org.apache.commons.lang.builder.HashCodeBuilder; import java.util.List; import java.util.ArrayList; import java.util.Map; import java.util.HashMap; import java.util.EnumMap; import java.util.Set; import java.util.HashSet; import java.util.EnumSet; import java.util.Collections; import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class Cassandra { public interface Iface { public void login(String keyspace, AuthenticationRequest auth_request) throws AuthenticationException, AuthorizationException, org.apache.thrift.TException; /** * Get the Column or SuperColumn at the given column_path. If no value is present, NotFoundException is thrown. (This is * the only method that can throw an exception under non-failure conditions.) * * @param keyspace * @param key * @param column_path * @param consistency_level */ public ColumnOrSuperColumn get(String keyspace, String key, ColumnPath column_path, ConsistencyLevel consistency_level) throws InvalidRequestException, NotFoundException, UnavailableException, TimedOutException, org.apache.thrift.TException; /** * Get the group of columns contained by column_parent (either a ColumnFamily name or a ColumnFamily/SuperColumn name * pair) specified by the given SlicePredicate. If no matching values are found, an empty list is returned. * * @param keyspace * @param key * @param column_parent * @param predicate * @param consistency_level */ public List<ColumnOrSuperColumn> get_slice(String keyspace, String key, ColumnParent column_parent, SlicePredicate predicate, ConsistencyLevel consistency_level) throws InvalidRequestException, UnavailableException, TimedOutException, org.apache.thrift.TException; /** * Perform a get for column_path in parallel on the given list<string> keys. The return value maps keys to the * ColumnOrSuperColumn found. If no value corresponding to a key is present, the key will still be in the map, but both * the column and super_column references of the ColumnOrSuperColumn object it maps to will be null. * @deprecated; use multiget_slice * * @param keyspace * @param keys * @param column_path * @param consistency_level */ public Map<String,ColumnOrSuperColumn> multiget(String keyspace, List<String> keys, ColumnPath column_path, ConsistencyLevel consistency_level) throws InvalidRequestException, UnavailableException, TimedOutException, org.apache.thrift.TException; /** * Performs a get_slice for column_parent and predicate for the given keys in parallel. * * @param keyspace * @param keys * @param column_parent * @param predicate * @param consistency_level */ public Map<String,List<ColumnOrSuperColumn>> multiget_slice(String keyspace, List<String> keys, ColumnParent column_parent, SlicePredicate predicate, ConsistencyLevel consistency_level) throws InvalidRequestException, UnavailableException, TimedOutException, org.apache.thrift.TException; /** * returns the number of columns for a particular <code>key</code> and <code>ColumnFamily</code> or <code>SuperColumn</code>. * * @param keyspace * @param key * @param column_parent * @param consistency_level */ public int get_count(String keyspace, String key, ColumnParent column_parent, ConsistencyLevel consistency_level) throws InvalidRequestException, UnavailableException, TimedOutException, org.apache.thrift.TException; /** * returns a subset of columns for a range of keys. * @Deprecated. Use get_range_slices instead * * @param keyspace * @param column_parent * @param predicate * @param start_key * @param finish_key * @param row_count * @param consistency_level */ public List<KeySlice> get_range_slice(String keyspace, ColumnParent column_parent, SlicePredicate predicate, String start_key, String finish_key, int row_count, ConsistencyLevel consistency_level) throws InvalidRequestException, UnavailableException, TimedOutException, org.apache.thrift.TException; /** * returns a subset of columns for a range of keys. * * @param keyspace * @param column_parent * @param predicate * @param range * @param consistency_level */ public List<KeySlice> get_range_slices(String keyspace, ColumnParent column_parent, SlicePredicate predicate, KeyRange range, ConsistencyLevel consistency_level) throws InvalidRequestException, UnavailableException, TimedOutException, org.apache.thrift.TException; /** * Insert a Column consisting of (column_path.column, value, timestamp) at the given column_path.column_family and optional * column_path.super_column. Note that column_path.column is here required, since a SuperColumn cannot directly contain binary * values -- it can only contain sub-Columns. * * @param keyspace * @param key * @param column_path * @param value * @param timestamp * @param consistency_level */ public void insert(String keyspace, String key, ColumnPath column_path, ByteBuffer value, long timestamp, ConsistencyLevel consistency_level) throws InvalidRequestException, UnavailableException, TimedOutException, org.apache.thrift.TException; /** * Insert Columns or SuperColumns across different Column Families for the same row key. batch_mutation is a * map<string, list<ColumnOrSuperColumn>> -- a map which pairs column family names with the relevant ColumnOrSuperColumn * objects to insert. * @deprecated; use batch_mutate instead * * @param keyspace * @param key * @param cfmap * @param consistency_level */ public void batch_insert(String keyspace, String key, Map<String,List<ColumnOrSuperColumn>> cfmap, ConsistencyLevel consistency_level) throws InvalidRequestException, UnavailableException, TimedOutException, org.apache.thrift.TException; /** * Remove data from the row specified by key at the granularity specified by column_path, and the given timestamp. Note * that all the values in column_path besides column_path.column_family are truly optional: you can remove the entire * row by just specifying the ColumnFamily, or you can remove a SuperColumn or a single Column by specifying those levels too. * * @param keyspace * @param key * @param column_path * @param timestamp * @param consistency_level */ public void remove(String keyspace, String key, ColumnPath column_path, long timestamp, ConsistencyLevel consistency_level) throws InvalidRequestException, UnavailableException, TimedOutException, org.apache.thrift.TException; /** * Mutate many columns or super columns for many row keys. See also: Mutation. * * mutation_map maps key to column family to a list of Mutation objects to take place at that scope. * * * * @param keyspace * @param mutation_map * @param consistency_level */ public void batch_mutate(String keyspace, Map<String,Map<String,List<Mutation>>> mutation_map, ConsistencyLevel consistency_level) throws InvalidRequestException, UnavailableException, TimedOutException, org.apache.thrift.TException; /** * get property whose value is of type string. @Deprecated * * @param property */ public String get_string_property(String property) throws org.apache.thrift.TException; /** * get property whose value is list of strings. @Deprecated * * @param property */ public List<String> get_string_list_property(String property) throws org.apache.thrift.TException; /** * list the defined keyspaces in this cluster */ public Set<String> describe_keyspaces() throws org.apache.thrift.TException; /** * get the cluster name */ public String describe_cluster_name() throws org.apache.thrift.TException; /** * get the thrift api version */ public String describe_version() throws org.apache.thrift.TException; /** * get the token ring: a map of ranges to host addresses, * represented as a set of TokenRange instead of a map from range * to list of endpoints, because you can't use Thrift structs as * map keys: * https://issues.apache.org/jira/browse/THRIFT-162 * * for the same reason, we can't return a set here, even though * order is neither important nor predictable. * * @param keyspace */ public List<TokenRange> describe_ring(String keyspace) throws InvalidRequestException, org.apache.thrift.TException; /** * returns the partitioner used by this cluster */ public String describe_partitioner() throws org.apache.thrift.TException; /** * describe specified keyspace * * @param keyspace */ public Map<String,Map<String,String>> describe_keyspace(String keyspace) throws NotFoundException, org.apache.thrift.TException; /** * experimental API for hadoop/parallel query support. * may change violently and without warning. * * returns list of token strings such that first subrange is (list[0], list[1]], * next is (list[1], list[2]], etc. * * @param start_token * @param end_token * @param keys_per_split */ public List<String> describe_splits(String start_token, String end_token, int keys_per_split) throws org.apache.thrift.TException; } public interface AsyncIface { public void login(String keyspace, AuthenticationRequest auth_request, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.login_call> resultHandler) throws org.apache.thrift.TException; public void get(String keyspace, String key, ColumnPath column_path, ConsistencyLevel consistency_level, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.get_call> resultHandler) throws org.apache.thrift.TException; public void get_slice(String keyspace, String key, ColumnParent column_parent, SlicePredicate predicate, ConsistencyLevel consistency_level, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.get_slice_call> resultHandler) throws org.apache.thrift.TException; public void multiget(String keyspace, List<String> keys, ColumnPath column_path, ConsistencyLevel consistency_level, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.multiget_call> resultHandler) throws org.apache.thrift.TException; public void multiget_slice(String keyspace, List<String> keys, ColumnParent column_parent, SlicePredicate predicate, ConsistencyLevel consistency_level, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.multiget_slice_call> resultHandler) throws org.apache.thrift.TException; public void get_count(String keyspace, String key, ColumnParent column_parent, ConsistencyLevel consistency_level, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.get_count_call> resultHandler) throws org.apache.thrift.TException; public void get_range_slice(String keyspace, ColumnParent column_parent, SlicePredicate predicate, String start_key, String finish_key, int row_count, ConsistencyLevel consistency_level, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.get_range_slice_call> resultHandler) throws org.apache.thrift.TException; public void get_range_slices(String keyspace, ColumnParent column_parent, SlicePredicate predicate, KeyRange range, ConsistencyLevel consistency_level, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.get_range_slices_call> resultHandler) throws org.apache.thrift.TException; public void insert(String keyspace, String key, ColumnPath column_path, ByteBuffer value, long timestamp, ConsistencyLevel consistency_level, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.insert_call> resultHandler) throws org.apache.thrift.TException; public void batch_insert(String keyspace, String key, Map<String,List<ColumnOrSuperColumn>> cfmap, ConsistencyLevel consistency_level, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.batch_insert_call> resultHandler) throws org.apache.thrift.TException; public void remove(String keyspace, String key, ColumnPath column_path, long timestamp, ConsistencyLevel consistency_level, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.remove_call> resultHandler) throws org.apache.thrift.TException; public void batch_mutate(String keyspace, Map<String,Map<String,List<Mutation>>> mutation_map, ConsistencyLevel consistency_level, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.batch_mutate_call> resultHandler) throws org.apache.thrift.TException; public void get_string_property(String property, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.get_string_property_call> resultHandler) throws org.apache.thrift.TException; public void get_string_list_property(String property, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.get_string_list_property_call> resultHandler) throws org.apache.thrift.TException; public void describe_keyspaces(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.describe_keyspaces_call> resultHandler) throws org.apache.thrift.TException; public void describe_cluster_name(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.describe_cluster_name_call> resultHandler) throws org.apache.thrift.TException; public void describe_version(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.describe_version_call> resultHandler) throws org.apache.thrift.TException; public void describe_ring(String keyspace, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.describe_ring_call> resultHandler) throws org.apache.thrift.TException; public void describe_partitioner(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.describe_partitioner_call> resultHandler) throws org.apache.thrift.TException; public void describe_keyspace(String keyspace, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.describe_keyspace_call> resultHandler) throws org.apache.thrift.TException; public void describe_splits(String start_token, String end_token, int keys_per_split, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.describe_splits_call> resultHandler) throws org.apache.thrift.TException; } public static class Client implements org.apache.thrift.TServiceClient, Iface { public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> { public Factory() {} public Client getClient(org.apache.thrift.protocol.TProtocol prot) { return new Client(prot); } public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) { return new Client(iprot, oprot); } } public Client(org.apache.thrift.protocol.TProtocol prot) { this(prot, prot); } public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) { iprot_ = iprot; oprot_ = oprot; } protected org.apache.thrift.protocol.TProtocol iprot_; protected org.apache.thrift.protocol.TProtocol oprot_; protected int seqid_; public org.apache.thrift.protocol.TProtocol getInputProtocol() { return this.iprot_; } public org.apache.thrift.protocol.TProtocol getOutputProtocol() { return this.oprot_; } public void login(String keyspace, AuthenticationRequest auth_request) throws AuthenticationException, AuthorizationException, org.apache.thrift.TException { send_login(keyspace, auth_request); recv_login(); } public void send_login(String keyspace, AuthenticationRequest auth_request) throws org.apache.thrift.TException { oprot_.writeMessageBegin(new org.apache.thrift.protocol.TMessage("login", org.apache.thrift.protocol.TMessageType.CALL, ++seqid_)); login_args args = new login_args(); args.setKeyspace(keyspace); args.setAuth_request(auth_request); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); } public void recv_login() throws AuthenticationException, AuthorizationException, org.apache.thrift.TException { org.apache.thrift.protocol.TMessage msg = iprot_.readMessageBegin(); if (msg.type == org.apache.thrift.protocol.TMessageType.EXCEPTION) { org.apache.thrift.TApplicationException x = org.apache.thrift.TApplicationException.read(iprot_); iprot_.readMessageEnd(); throw x; } if (msg.seqid != seqid_) { throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.BAD_SEQUENCE_ID, "login failed: out of sequence response"); } login_result result = new login_result(); result.read(iprot_); iprot_.readMessageEnd(); if (result.authnx != null) { throw result.authnx; } if (result.authzx != null) { throw result.authzx; } return; } public ColumnOrSuperColumn get(String keyspace, String key, ColumnPath column_path, ConsistencyLevel consistency_level) throws InvalidRequestException, NotFoundException, UnavailableException, TimedOutException, org.apache.thrift.TException { send_get(keyspace, key, column_path, consistency_level); return recv_get(); } public void send_get(String keyspace, String key, ColumnPath column_path, ConsistencyLevel consistency_level) throws org.apache.thrift.TException { oprot_.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get", org.apache.thrift.protocol.TMessageType.CALL, ++seqid_)); get_args args = new get_args(); args.setKeyspace(keyspace); args.setKey(key); args.setColumn_path(column_path); args.setConsistency_level(consistency_level); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); } public ColumnOrSuperColumn recv_get() throws InvalidRequestException, NotFoundException, UnavailableException, TimedOutException, org.apache.thrift.TException { org.apache.thrift.protocol.TMessage msg = iprot_.readMessageBegin(); if (msg.type == org.apache.thrift.protocol.TMessageType.EXCEPTION) { org.apache.thrift.TApplicationException x = org.apache.thrift.TApplicationException.read(iprot_); iprot_.readMessageEnd(); throw x; } if (msg.seqid != seqid_) { throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.BAD_SEQUENCE_ID, "get failed: out of sequence response"); } get_result result = new get_result(); result.read(iprot_); iprot_.readMessageEnd(); if (result.isSetSuccess()) { return result.success; } if (result.ire != null) { throw result.ire; } if (result.nfe != null) { throw result.nfe; } if (result.ue != null) { throw result.ue; } if (result.te != null) { throw result.te; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get failed: unknown result"); } public List<ColumnOrSuperColumn> get_slice(String keyspace, String key, ColumnParent column_parent, SlicePredicate predicate, ConsistencyLevel consistency_level) throws InvalidRequestException, UnavailableException, TimedOutException, org.apache.thrift.TException { send_get_slice(keyspace, key, column_parent, predicate, consistency_level); return recv_get_slice(); } public void send_get_slice(String keyspace, String key, ColumnParent column_parent, SlicePredicate predicate, ConsistencyLevel consistency_level) throws org.apache.thrift.TException { oprot_.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_slice", org.apache.thrift.protocol.TMessageType.CALL, ++seqid_)); get_slice_args args = new get_slice_args(); args.setKeyspace(keyspace); args.setKey(key); args.setColumn_parent(column_parent); args.setPredicate(predicate); args.setConsistency_level(consistency_level); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); } public List<ColumnOrSuperColumn> recv_get_slice() throws InvalidRequestException, UnavailableException, TimedOutException, org.apache.thrift.TException { org.apache.thrift.protocol.TMessage msg = iprot_.readMessageBegin(); if (msg.type == org.apache.thrift.protocol.TMessageType.EXCEPTION) { org.apache.thrift.TApplicationException x = org.apache.thrift.TApplicationException.read(iprot_); iprot_.readMessageEnd(); throw x; } if (msg.seqid != seqid_) { throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.BAD_SEQUENCE_ID, "get_slice failed: out of sequence response"); } get_slice_result result = new get_slice_result(); result.read(iprot_); iprot_.readMessageEnd(); if (result.isSetSuccess()) { return result.success; } if (result.ire != null) { throw result.ire; } if (result.ue != null) { throw result.ue; } if (result.te != null) { throw result.te; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_slice failed: unknown result"); } public Map<String,ColumnOrSuperColumn> multiget(String keyspace, List<String> keys, ColumnPath column_path, ConsistencyLevel consistency_level) throws InvalidRequestException, UnavailableException, TimedOutException, org.apache.thrift.TException { send_multiget(keyspace, keys, column_path, consistency_level); return recv_multiget(); } public void send_multiget(String keyspace, List<String> keys, ColumnPath column_path, ConsistencyLevel consistency_level) throws org.apache.thrift.TException { oprot_.writeMessageBegin(new org.apache.thrift.protocol.TMessage("multiget", org.apache.thrift.protocol.TMessageType.CALL, ++seqid_)); multiget_args args = new multiget_args(); args.setKeyspace(keyspace); args.setKeys(keys); args.setColumn_path(column_path); args.setConsistency_level(consistency_level); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); } public Map<String,ColumnOrSuperColumn> recv_multiget() throws InvalidRequestException, UnavailableException, TimedOutException, org.apache.thrift.TException { org.apache.thrift.protocol.TMessage msg = iprot_.readMessageBegin(); if (msg.type == org.apache.thrift.protocol.TMessageType.EXCEPTION) { org.apache.thrift.TApplicationException x = org.apache.thrift.TApplicationException.read(iprot_); iprot_.readMessageEnd(); throw x; } if (msg.seqid != seqid_) { throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.BAD_SEQUENCE_ID, "multiget failed: out of sequence response"); } multiget_result result = new multiget_result(); result.read(iprot_); iprot_.readMessageEnd(); if (result.isSetSuccess()) { return result.success; } if (result.ire != null) { throw result.ire; } if (result.ue != null) { throw result.ue; } if (result.te != null) { throw result.te; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "multiget failed: unknown result"); } public Map<String,List<ColumnOrSuperColumn>> multiget_slice(String keyspace, List<String> keys, ColumnParent column_parent, SlicePredicate predicate, ConsistencyLevel consistency_level) throws InvalidRequestException, UnavailableException, TimedOutException, org.apache.thrift.TException { send_multiget_slice(keyspace, keys, column_parent, predicate, consistency_level); return recv_multiget_slice(); } public void send_multiget_slice(String keyspace, List<String> keys, ColumnParent column_parent, SlicePredicate predicate, ConsistencyLevel consistency_level) throws org.apache.thrift.TException { oprot_.writeMessageBegin(new org.apache.thrift.protocol.TMessage("multiget_slice", org.apache.thrift.protocol.TMessageType.CALL, ++seqid_)); multiget_slice_args args = new multiget_slice_args(); args.setKeyspace(keyspace); args.setKeys(keys); args.setColumn_parent(column_parent); args.setPredicate(predicate); args.setConsistency_level(consistency_level); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); } public Map<String,List<ColumnOrSuperColumn>> recv_multiget_slice() throws InvalidRequestException, UnavailableException, TimedOutException, org.apache.thrift.TException { org.apache.thrift.protocol.TMessage msg = iprot_.readMessageBegin(); if (msg.type == org.apache.thrift.protocol.TMessageType.EXCEPTION) { org.apache.thrift.TApplicationException x = org.apache.thrift.TApplicationException.read(iprot_); iprot_.readMessageEnd(); throw x; } if (msg.seqid != seqid_) { throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.BAD_SEQUENCE_ID, "multiget_slice failed: out of sequence response"); } multiget_slice_result result = new multiget_slice_result(); result.read(iprot_); iprot_.readMessageEnd(); if (result.isSetSuccess()) { return result.success; } if (result.ire != null) { throw result.ire; } if (result.ue != null) { throw result.ue; } if (result.te != null) { throw result.te; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "multiget_slice failed: unknown result"); } public int get_count(String keyspace, String key, ColumnParent column_parent, ConsistencyLevel consistency_level) throws InvalidRequestException, UnavailableException, TimedOutException, org.apache.thrift.TException { send_get_count(keyspace, key, column_parent, consistency_level); return recv_get_count(); } public void send_get_count(String keyspace, String key, ColumnParent column_parent, ConsistencyLevel consistency_level) throws org.apache.thrift.TException { oprot_.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_count", org.apache.thrift.protocol.TMessageType.CALL, ++seqid_)); get_count_args args = new get_count_args(); args.setKeyspace(keyspace); args.setKey(key); args.setColumn_parent(column_parent); args.setConsistency_level(consistency_level); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); } public int recv_get_count() throws InvalidRequestException, UnavailableException, TimedOutException, org.apache.thrift.TException { org.apache.thrift.protocol.TMessage msg = iprot_.readMessageBegin(); if (msg.type == org.apache.thrift.protocol.TMessageType.EXCEPTION) { org.apache.thrift.TApplicationException x = org.apache.thrift.TApplicationException.read(iprot_); iprot_.readMessageEnd(); throw x; } if (msg.seqid != seqid_) { throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.BAD_SEQUENCE_ID, "get_count failed: out of sequence response"); } get_count_result result = new get_count_result(); result.read(iprot_); iprot_.readMessageEnd(); if (result.isSetSuccess()) { return result.success; } if (result.ire != null) { throw result.ire; } if (result.ue != null) { throw result.ue; } if (result.te != null) { throw result.te; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_count failed: unknown result"); } public List<KeySlice> get_range_slice(String keyspace, ColumnParent column_parent, SlicePredicate predicate, String start_key, String finish_key, int row_count, ConsistencyLevel consistency_level) throws InvalidRequestException, UnavailableException, TimedOutException, org.apache.thrift.TException { send_get_range_slice(keyspace, column_parent, predicate, start_key, finish_key, row_count, consistency_level); return recv_get_range_slice(); } public void send_get_range_slice(String keyspace, ColumnParent column_parent, SlicePredicate predicate, String start_key, String finish_key, int row_count, ConsistencyLevel consistency_level) throws org.apache.thrift.TException { oprot_.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_range_slice", org.apache.thrift.protocol.TMessageType.CALL, ++seqid_)); get_range_slice_args args = new get_range_slice_args(); args.setKeyspace(keyspace); args.setColumn_parent(column_parent); args.setPredicate(predicate); args.setStart_key(start_key); args.setFinish_key(finish_key); args.setRow_count(row_count); args.setConsistency_level(consistency_level); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); } public List<KeySlice> recv_get_range_slice() throws InvalidRequestException, UnavailableException, TimedOutException, org.apache.thrift.TException { org.apache.thrift.protocol.TMessage msg = iprot_.readMessageBegin(); if (msg.type == org.apache.thrift.protocol.TMessageType.EXCEPTION) { org.apache.thrift.TApplicationException x = org.apache.thrift.TApplicationException.read(iprot_); iprot_.readMessageEnd(); throw x; } if (msg.seqid != seqid_) { throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.BAD_SEQUENCE_ID, "get_range_slice failed: out of sequence response"); } get_range_slice_result result = new get_range_slice_result(); result.read(iprot_); iprot_.readMessageEnd(); if (result.isSetSuccess()) { return result.success; } if (result.ire != null) { throw result.ire; } if (result.ue != null) { throw result.ue; } if (result.te != null) { throw result.te; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_range_slice failed: unknown result"); } public List<KeySlice> get_range_slices(String keyspace, ColumnParent column_parent, SlicePredicate predicate, KeyRange range, ConsistencyLevel consistency_level) throws InvalidRequestException, UnavailableException, TimedOutException, org.apache.thrift.TException { send_get_range_slices(keyspace, column_parent, predicate, range, consistency_level); return recv_get_range_slices(); } public void send_get_range_slices(String keyspace, ColumnParent column_parent, SlicePredicate predicate, KeyRange range, ConsistencyLevel consistency_level) throws org.apache.thrift.TException { oprot_.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_range_slices", org.apache.thrift.protocol.TMessageType.CALL, ++seqid_)); get_range_slices_args args = new get_range_slices_args(); args.setKeyspace(keyspace); args.setColumn_parent(column_parent); args.setPredicate(predicate); args.setRange(range); args.setConsistency_level(consistency_level); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); } public List<KeySlice> recv_get_range_slices() throws InvalidRequestException, UnavailableException, TimedOutException, org.apache.thrift.TException { org.apache.thrift.protocol.TMessage msg = iprot_.readMessageBegin(); if (msg.type == org.apache.thrift.protocol.TMessageType.EXCEPTION) { org.apache.thrift.TApplicationException x = org.apache.thrift.TApplicationException.read(iprot_); iprot_.readMessageEnd(); throw x; } if (msg.seqid != seqid_) { throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.BAD_SEQUENCE_ID, "get_range_slices failed: out of sequence response"); } get_range_slices_result result = new get_range_slices_result(); result.read(iprot_); iprot_.readMessageEnd(); if (result.isSetSuccess()) { return result.success; } if (result.ire != null) { throw result.ire; } if (result.ue != null) { throw result.ue; } if (result.te != null) { throw result.te; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_range_slices failed: unknown result"); } public void insert(String keyspace, String key, ColumnPath column_path, ByteBuffer value, long timestamp, ConsistencyLevel consistency_level) throws InvalidRequestException, UnavailableException, TimedOutException, org.apache.thrift.TException { send_insert(keyspace, key, column_path, value, timestamp, consistency_level); recv_insert(); } public void send_insert(String keyspace, String key, ColumnPath column_path, ByteBuffer value, long timestamp, ConsistencyLevel consistency_level) throws org.apache.thrift.TException { oprot_.writeMessageBegin(new org.apache.thrift.protocol.TMessage("insert", org.apache.thrift.protocol.TMessageType.CALL, ++seqid_)); insert_args args = new insert_args(); args.setKeyspace(keyspace); args.setKey(key); args.setColumn_path(column_path); args.setValue(value); args.setTimestamp(timestamp); args.setConsistency_level(consistency_level); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); } public void recv_insert() throws InvalidRequestException, UnavailableException, TimedOutException, org.apache.thrift.TException { org.apache.thrift.protocol.TMessage msg = iprot_.readMessageBegin(); if (msg.type == org.apache.thrift.protocol.TMessageType.EXCEPTION) { org.apache.thrift.TApplicationException x = org.apache.thrift.TApplicationException.read(iprot_); iprot_.readMessageEnd(); throw x; } if (msg.seqid != seqid_) { throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.BAD_SEQUENCE_ID, "insert failed: out of sequence response"); } insert_result result = new insert_result(); result.read(iprot_); iprot_.readMessageEnd(); if (result.ire != null) { throw result.ire; } if (result.ue != null) { throw result.ue; } if (result.te != null) { throw result.te; } return; } public void batch_insert(String keyspace, String key, Map<String,List<ColumnOrSuperColumn>> cfmap, ConsistencyLevel consistency_level) throws InvalidRequestException, UnavailableException, TimedOutException, org.apache.thrift.TException { send_batch_insert(keyspace, key, cfmap, consistency_level); recv_batch_insert(); } public void send_batch_insert(String keyspace, String key, Map<String,List<ColumnOrSuperColumn>> cfmap, ConsistencyLevel consistency_level) throws org.apache.thrift.TException { oprot_.writeMessageBegin(new org.apache.thrift.protocol.TMessage("batch_insert", org.apache.thrift.protocol.TMessageType.CALL, ++seqid_)); batch_insert_args args = new batch_insert_args(); args.setKeyspace(keyspace); args.setKey(key); args.setCfmap(cfmap); args.setConsistency_level(consistency_level); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); } public void recv_batch_insert() throws InvalidRequestException, UnavailableException, TimedOutException, org.apache.thrift.TException { org.apache.thrift.protocol.TMessage msg = iprot_.readMessageBegin(); if (msg.type == org.apache.thrift.protocol.TMessageType.EXCEPTION) { org.apache.thrift.TApplicationException x = org.apache.thrift.TApplicationException.read(iprot_); iprot_.readMessageEnd(); throw x; } if (msg.seqid != seqid_) { throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.BAD_SEQUENCE_ID, "batch_insert failed: out of sequence response"); } batch_insert_result result = new batch_insert_result(); result.read(iprot_); iprot_.readMessageEnd(); if (result.ire != null) { throw result.ire; } if (result.ue != null) { throw result.ue; } if (result.te != null) { throw result.te; } return; } public void remove(String keyspace, String key, ColumnPath column_path, long timestamp, ConsistencyLevel consistency_level) throws InvalidRequestException, UnavailableException, TimedOutException, org.apache.thrift.TException { send_remove(keyspace, key, column_path, timestamp, consistency_level); recv_remove(); } public void send_remove(String keyspace, String key, ColumnPath column_path, long timestamp, ConsistencyLevel consistency_level) throws org.apache.thrift.TException { oprot_.writeMessageBegin(new org.apache.thrift.protocol.TMessage("remove", org.apache.thrift.protocol.TMessageType.CALL, ++seqid_)); remove_args args = new remove_args(); args.setKeyspace(keyspace); args.setKey(key); args.setColumn_path(column_path); args.setTimestamp(timestamp); args.setConsistency_level(consistency_level); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); } public void recv_remove() throws InvalidRequestException, UnavailableException, TimedOutException, org.apache.thrift.TException { org.apache.thrift.protocol.TMessage msg = iprot_.readMessageBegin(); if (msg.type == org.apache.thrift.protocol.TMessageType.EXCEPTION) { org.apache.thrift.TApplicationException x = org.apache.thrift.TApplicationException.read(iprot_); iprot_.readMessageEnd(); throw x; } if (msg.seqid != seqid_) { throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.BAD_SEQUENCE_ID, "remove failed: out of sequence response"); } remove_result result = new remove_result(); result.read(iprot_); iprot_.readMessageEnd(); if (result.ire != null) { throw result.ire; } if (result.ue != null) { throw result.ue; } if (result.te != null) { throw result.te; } return; } public void batch_mutate(String keyspace, Map<String,Map<String,List<Mutation>>> mutation_map, ConsistencyLevel consistency_level) throws InvalidRequestException, UnavailableException, TimedOutException, org.apache.thrift.TException { send_batch_mutate(keyspace, mutation_map, consistency_level); recv_batch_mutate(); } public void send_batch_mutate(String keyspace, Map<String,Map<String,List<Mutation>>> mutation_map, ConsistencyLevel consistency_level) throws org.apache.thrift.TException { oprot_.writeMessageBegin(new org.apache.thrift.protocol.TMessage("batch_mutate", org.apache.thrift.protocol.TMessageType.CALL, ++seqid_)); batch_mutate_args args = new batch_mutate_args(); args.setKeyspace(keyspace); args.setMutation_map(mutation_map); args.setConsistency_level(consistency_level); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); } public void recv_batch_mutate() throws InvalidRequestException, UnavailableException, TimedOutException, org.apache.thrift.TException { org.apache.thrift.protocol.TMessage msg = iprot_.readMessageBegin(); if (msg.type == org.apache.thrift.protocol.TMessageType.EXCEPTION) { org.apache.thrift.TApplicationException x = org.apache.thrift.TApplicationException.read(iprot_); iprot_.readMessageEnd(); throw x; } if (msg.seqid != seqid_) { throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.BAD_SEQUENCE_ID, "batch_mutate failed: out of sequence response"); } batch_mutate_result result = new batch_mutate_result(); result.read(iprot_); iprot_.readMessageEnd(); if (result.ire != null) { throw result.ire; } if (result.ue != null) { throw result.ue; } if (result.te != null) { throw result.te; } return; } public String get_string_property(String property) throws org.apache.thrift.TException { send_get_string_property(property); return recv_get_string_property(); } public void send_get_string_property(String property) throws org.apache.thrift.TException { oprot_.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_string_property", org.apache.thrift.protocol.TMessageType.CALL, ++seqid_)); get_string_property_args args = new get_string_property_args(); args.setProperty(property); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); } public String recv_get_string_property() throws org.apache.thrift.TException { org.apache.thrift.protocol.TMessage msg = iprot_.readMessageBegin(); if (msg.type == org.apache.thrift.protocol.TMessageType.EXCEPTION) { org.apache.thrift.TApplicationException x = org.apache.thrift.TApplicationException.read(iprot_); iprot_.readMessageEnd(); throw x; } if (msg.seqid != seqid_) { throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.BAD_SEQUENCE_ID, "get_string_property failed: out of sequence response"); } get_string_property_result result = new get_string_property_result(); result.read(iprot_); iprot_.readMessageEnd(); if (result.isSetSuccess()) { return result.success; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_string_property failed: unknown result"); } public List<String> get_string_list_property(String property) throws org.apache.thrift.TException { send_get_string_list_property(property); return recv_get_string_list_property(); } public void send_get_string_list_property(String property) throws org.apache.thrift.TException { oprot_.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_string_list_property", org.apache.thrift.protocol.TMessageType.CALL, ++seqid_)); get_string_list_property_args args = new get_string_list_property_args(); args.setProperty(property); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); } public List<String> recv_get_string_list_property() throws org.apache.thrift.TException { org.apache.thrift.protocol.TMessage msg = iprot_.readMessageBegin(); if (msg.type == org.apache.thrift.protocol.TMessageType.EXCEPTION) { org.apache.thrift.TApplicationException x = org.apache.thrift.TApplicationException.read(iprot_); iprot_.readMessageEnd(); throw x; } if (msg.seqid != seqid_) { throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.BAD_SEQUENCE_ID, "get_string_list_property failed: out of sequence response"); } get_string_list_property_result result = new get_string_list_property_result(); result.read(iprot_); iprot_.readMessageEnd(); if (result.isSetSuccess()) { return result.success; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_string_list_property failed: unknown result"); } public Set<String> describe_keyspaces() throws org.apache.thrift.TException { send_describe_keyspaces(); return recv_describe_keyspaces(); } public void send_describe_keyspaces() throws org.apache.thrift.TException { oprot_.writeMessageBegin(new org.apache.thrift.protocol.TMessage("describe_keyspaces", org.apache.thrift.protocol.TMessageType.CALL, ++seqid_)); describe_keyspaces_args args = new describe_keyspaces_args(); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); } public Set<String> recv_describe_keyspaces() throws org.apache.thrift.TException { org.apache.thrift.protocol.TMessage msg = iprot_.readMessageBegin(); if (msg.type == org.apache.thrift.protocol.TMessageType.EXCEPTION) { org.apache.thrift.TApplicationException x = org.apache.thrift.TApplicationException.read(iprot_); iprot_.readMessageEnd(); throw x; } if (msg.seqid != seqid_) { throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.BAD_SEQUENCE_ID, "describe_keyspaces failed: out of sequence response"); } describe_keyspaces_result result = new describe_keyspaces_result(); result.read(iprot_); iprot_.readMessageEnd(); if (result.isSetSuccess()) { return result.success; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "describe_keyspaces failed: unknown result"); } public String describe_cluster_name() throws org.apache.thrift.TException { send_describe_cluster_name(); return recv_describe_cluster_name(); } public void send_describe_cluster_name() throws org.apache.thrift.TException { oprot_.writeMessageBegin(new org.apache.thrift.protocol.TMessage("describe_cluster_name", org.apache.thrift.protocol.TMessageType.CALL, ++seqid_)); describe_cluster_name_args args = new describe_cluster_name_args(); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); } public String recv_describe_cluster_name() throws org.apache.thrift.TException { org.apache.thrift.protocol.TMessage msg = iprot_.readMessageBegin(); if (msg.type == org.apache.thrift.protocol.TMessageType.EXCEPTION) { org.apache.thrift.TApplicationException x = org.apache.thrift.TApplicationException.read(iprot_); iprot_.readMessageEnd(); throw x; } if (msg.seqid != seqid_) { throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.BAD_SEQUENCE_ID, "describe_cluster_name failed: out of sequence response"); } describe_cluster_name_result result = new describe_cluster_name_result(); result.read(iprot_); iprot_.readMessageEnd(); if (result.isSetSuccess()) { return result.success; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "describe_cluster_name failed: unknown result"); } public String describe_version() throws org.apache.thrift.TException { send_describe_version(); return recv_describe_version(); } public void send_describe_version() throws org.apache.thrift.TException { oprot_.writeMessageBegin(new org.apache.thrift.protocol.TMessage("describe_version", org.apache.thrift.protocol.TMessageType.CALL, ++seqid_)); describe_version_args args = new describe_version_args(); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); } public String recv_describe_version() throws org.apache.thrift.TException { org.apache.thrift.protocol.TMessage msg = iprot_.readMessageBegin(); if (msg.type == org.apache.thrift.protocol.TMessageType.EXCEPTION) { org.apache.thrift.TApplicationException x = org.apache.thrift.TApplicationException.read(iprot_); iprot_.readMessageEnd(); throw x; } if (msg.seqid != seqid_) { throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.BAD_SEQUENCE_ID, "describe_version failed: out of sequence response"); } describe_version_result result = new describe_version_result(); result.read(iprot_); iprot_.readMessageEnd(); if (result.isSetSuccess()) { return result.success; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "describe_version failed: unknown result"); } public List<TokenRange> describe_ring(String keyspace) throws InvalidRequestException, org.apache.thrift.TException { send_describe_ring(keyspace); return recv_describe_ring(); } public void send_describe_ring(String keyspace) throws org.apache.thrift.TException { oprot_.writeMessageBegin(new org.apache.thrift.protocol.TMessage("describe_ring", org.apache.thrift.protocol.TMessageType.CALL, ++seqid_)); describe_ring_args args = new describe_ring_args(); args.setKeyspace(keyspace); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); } public List<TokenRange> recv_describe_ring() throws InvalidRequestException, org.apache.thrift.TException { org.apache.thrift.protocol.TMessage msg = iprot_.readMessageBegin(); if (msg.type == org.apache.thrift.protocol.TMessageType.EXCEPTION) { org.apache.thrift.TApplicationException x = org.apache.thrift.TApplicationException.read(iprot_); iprot_.readMessageEnd(); throw x; } if (msg.seqid != seqid_) { throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.BAD_SEQUENCE_ID, "describe_ring failed: out of sequence response"); } describe_ring_result result = new describe_ring_result(); result.read(iprot_); iprot_.readMessageEnd(); if (result.isSetSuccess()) { return result.success; } if (result.ire != null) { throw result.ire; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "describe_ring failed: unknown result"); } public String describe_partitioner() throws org.apache.thrift.TException { send_describe_partitioner(); return recv_describe_partitioner(); } public void send_describe_partitioner() throws org.apache.thrift.TException { oprot_.writeMessageBegin(new org.apache.thrift.protocol.TMessage("describe_partitioner", org.apache.thrift.protocol.TMessageType.CALL, ++seqid_)); describe_partitioner_args args = new describe_partitioner_args(); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); } public String recv_describe_partitioner() throws org.apache.thrift.TException { org.apache.thrift.protocol.TMessage msg = iprot_.readMessageBegin(); if (msg.type == org.apache.thrift.protocol.TMessageType.EXCEPTION) { org.apache.thrift.TApplicationException x = org.apache.thrift.TApplicationException.read(iprot_); iprot_.readMessageEnd(); throw x; } if (msg.seqid != seqid_) { throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.BAD_SEQUENCE_ID, "describe_partitioner failed: out of sequence response"); } describe_partitioner_result result = new describe_partitioner_result(); result.read(iprot_); iprot_.readMessageEnd(); if (result.isSetSuccess()) { return result.success; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "describe_partitioner failed: unknown result"); } public Map<String,Map<String,String>> describe_keyspace(String keyspace) throws NotFoundException, org.apache.thrift.TException { send_describe_keyspace(keyspace); return recv_describe_keyspace(); } public void send_describe_keyspace(String keyspace) throws org.apache.thrift.TException { oprot_.writeMessageBegin(new org.apache.thrift.protocol.TMessage("describe_keyspace", org.apache.thrift.protocol.TMessageType.CALL, ++seqid_)); describe_keyspace_args args = new describe_keyspace_args(); args.setKeyspace(keyspace); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); } public Map<String,Map<String,String>> recv_describe_keyspace() throws NotFoundException, org.apache.thrift.TException { org.apache.thrift.protocol.TMessage msg = iprot_.readMessageBegin(); if (msg.type == org.apache.thrift.protocol.TMessageType.EXCEPTION) { org.apache.thrift.TApplicationException x = org.apache.thrift.TApplicationException.read(iprot_); iprot_.readMessageEnd(); throw x; } if (msg.seqid != seqid_) { throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.BAD_SEQUENCE_ID, "describe_keyspace failed: out of sequence response"); } describe_keyspace_result result = new describe_keyspace_result(); result.read(iprot_); iprot_.readMessageEnd(); if (result.isSetSuccess()) { return result.success; } if (result.nfe != null) { throw result.nfe; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "describe_keyspace failed: unknown result"); } public List<String> describe_splits(String start_token, String end_token, int keys_per_split) throws org.apache.thrift.TException { send_describe_splits(start_token, end_token, keys_per_split); return recv_describe_splits(); } public void send_describe_splits(String start_token, String end_token, int keys_per_split) throws org.apache.thrift.TException { oprot_.writeMessageBegin(new org.apache.thrift.protocol.TMessage("describe_splits", org.apache.thrift.protocol.TMessageType.CALL, ++seqid_)); describe_splits_args args = new describe_splits_args(); args.setStart_token(start_token); args.setEnd_token(end_token); args.setKeys_per_split(keys_per_split); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); } public List<String> recv_describe_splits() throws org.apache.thrift.TException { org.apache.thrift.protocol.TMessage msg = iprot_.readMessageBegin(); if (msg.type == org.apache.thrift.protocol.TMessageType.EXCEPTION) { org.apache.thrift.TApplicationException x = org.apache.thrift.TApplicationException.read(iprot_); iprot_.readMessageEnd(); throw x; } if (msg.seqid != seqid_) { throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.BAD_SEQUENCE_ID, "describe_splits failed: out of sequence response"); } describe_splits_result result = new describe_splits_result(); result.read(iprot_); iprot_.readMessageEnd(); if (result.isSetSuccess()) { return result.success; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "describe_splits failed: unknown result"); } } public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface { public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> { private org.apache.thrift.async.TAsyncClientManager clientManager; private org.apache.thrift.protocol.TProtocolFactory protocolFactory; public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) { this.clientManager = clientManager; this.protocolFactory = protocolFactory; } public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) { return new AsyncClient(protocolFactory, clientManager, transport); } } public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) { super(protocolFactory, clientManager, transport); } public void login(String keyspace, AuthenticationRequest auth_request, org.apache.thrift.async.AsyncMethodCallback<login_call> resultHandler) throws org.apache.thrift.TException { checkReady(); login_call method_call = new login_call(keyspace, auth_request, resultHandler, this, protocolFactory, transport); this.currentMethod = method_call; manager.call(method_call); } public static class login_call extends org.apache.thrift.async.TAsyncMethodCall { private String keyspace; private AuthenticationRequest auth_request; public login_call(String keyspace, AuthenticationRequest auth_request, org.apache.thrift.async.AsyncMethodCallback<login_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.keyspace = keyspace; this.auth_request = auth_request; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("login", org.apache.thrift.protocol.TMessageType.CALL, 0)); login_args args = new login_args(); args.setKeyspace(keyspace); args.setAuth_request(auth_request); args.write(prot); prot.writeMessageEnd(); } public void getResult() throws AuthenticationException, AuthorizationException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); (new Client(prot)).recv_login(); } } public void get(String keyspace, String key, ColumnPath column_path, ConsistencyLevel consistency_level, org.apache.thrift.async.AsyncMethodCallback<get_call> resultHandler) throws org.apache.thrift.TException { checkReady(); get_call method_call = new get_call(keyspace, key, column_path, consistency_level, resultHandler, this, protocolFactory, transport); this.currentMethod = method_call; manager.call(method_call); } public static class get_call extends org.apache.thrift.async.TAsyncMethodCall { private String keyspace; private String key; private ColumnPath column_path; private ConsistencyLevel consistency_level; public get_call(String keyspace, String key, ColumnPath column_path, ConsistencyLevel consistency_level, org.apache.thrift.async.AsyncMethodCallback<get_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.keyspace = keyspace; this.key = key; this.column_path = column_path; this.consistency_level = consistency_level; } 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.setKeyspace(keyspace); args.setKey(key); args.setColumn_path(column_path); args.setConsistency_level(consistency_level); args.write(prot); prot.writeMessageEnd(); } public ColumnOrSuperColumn getResult() throws InvalidRequestException, NotFoundException, UnavailableException, TimedOutException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get(); } } public void get_slice(String keyspace, String key, ColumnParent column_parent, SlicePredicate predicate, ConsistencyLevel consistency_level, org.apache.thrift.async.AsyncMethodCallback<get_slice_call> resultHandler) throws org.apache.thrift.TException { checkReady(); get_slice_call method_call = new get_slice_call(keyspace, key, column_parent, predicate, consistency_level, resultHandler, this, protocolFactory, transport); this.currentMethod = method_call; manager.call(method_call); } public static class get_slice_call extends org.apache.thrift.async.TAsyncMethodCall { private String keyspace; private String key; private ColumnParent column_parent; private SlicePredicate predicate; private ConsistencyLevel consistency_level; public get_slice_call(String keyspace, String key, ColumnParent column_parent, SlicePredicate predicate, ConsistencyLevel consistency_level, org.apache.thrift.async.AsyncMethodCallback<get_slice_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.keyspace = keyspace; this.key = key; this.column_parent = column_parent; this.predicate = predicate; this.consistency_level = consistency_level; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_slice", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_slice_args args = new get_slice_args(); args.setKeyspace(keyspace); args.setKey(key); args.setColumn_parent(column_parent); args.setPredicate(predicate); args.setConsistency_level(consistency_level); args.write(prot); prot.writeMessageEnd(); } public List<ColumnOrSuperColumn> getResult() throws InvalidRequestException, UnavailableException, TimedOutException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_slice(); } } public void multiget(String keyspace, List<String> keys, ColumnPath column_path, ConsistencyLevel consistency_level, org.apache.thrift.async.AsyncMethodCallback<multiget_call> resultHandler) throws org.apache.thrift.TException { checkReady(); multiget_call method_call = new multiget_call(keyspace, keys, column_path, consistency_level, resultHandler, this, protocolFactory, transport); this.currentMethod = method_call; manager.call(method_call); } public static class multiget_call extends org.apache.thrift.async.TAsyncMethodCall { private String keyspace; private List<String> keys; private ColumnPath column_path; private ConsistencyLevel consistency_level; public multiget_call(String keyspace, List<String> keys, ColumnPath column_path, ConsistencyLevel consistency_level, org.apache.thrift.async.AsyncMethodCallback<multiget_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.keyspace = keyspace; this.keys = keys; this.column_path = column_path; this.consistency_level = consistency_level; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("multiget", org.apache.thrift.protocol.TMessageType.CALL, 0)); multiget_args args = new multiget_args(); args.setKeyspace(keyspace); args.setKeys(keys); args.setColumn_path(column_path); args.setConsistency_level(consistency_level); args.write(prot); prot.writeMessageEnd(); } public Map<String,ColumnOrSuperColumn> getResult() throws InvalidRequestException, UnavailableException, TimedOutException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_multiget(); } } public void multiget_slice(String keyspace, List<String> keys, ColumnParent column_parent, SlicePredicate predicate, ConsistencyLevel consistency_level, org.apache.thrift.async.AsyncMethodCallback<multiget_slice_call> resultHandler) throws org.apache.thrift.TException { checkReady(); multiget_slice_call method_call = new multiget_slice_call(keyspace, keys, column_parent, predicate, consistency_level, resultHandler, this, protocolFactory, transport); this.currentMethod = method_call; manager.call(method_call); } public static class multiget_slice_call extends org.apache.thrift.async.TAsyncMethodCall { private String keyspace; private List<String> keys; private ColumnParent column_parent; private SlicePredicate predicate; private ConsistencyLevel consistency_level; public multiget_slice_call(String keyspace, List<String> keys, ColumnParent column_parent, SlicePredicate predicate, ConsistencyLevel consistency_level, org.apache.thrift.async.AsyncMethodCallback<multiget_slice_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.keyspace = keyspace; this.keys = keys; this.column_parent = column_parent; this.predicate = predicate; this.consistency_level = consistency_level; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("multiget_slice", org.apache.thrift.protocol.TMessageType.CALL, 0)); multiget_slice_args args = new multiget_slice_args(); args.setKeyspace(keyspace); args.setKeys(keys); args.setColumn_parent(column_parent); args.setPredicate(predicate); args.setConsistency_level(consistency_level); args.write(prot); prot.writeMessageEnd(); } public Map<String,List<ColumnOrSuperColumn>> getResult() throws InvalidRequestException, UnavailableException, TimedOutException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_multiget_slice(); } } public void get_count(String keyspace, String key, ColumnParent column_parent, ConsistencyLevel consistency_level, org.apache.thrift.async.AsyncMethodCallback<get_count_call> resultHandler) throws org.apache.thrift.TException { checkReady(); get_count_call method_call = new get_count_call(keyspace, key, column_parent, consistency_level, resultHandler, this, protocolFactory, transport); this.currentMethod = method_call; manager.call(method_call); } public static class get_count_call extends org.apache.thrift.async.TAsyncMethodCall { private String keyspace; private String key; private ColumnParent column_parent; private ConsistencyLevel consistency_level; public get_count_call(String keyspace, String key, ColumnParent column_parent, ConsistencyLevel consistency_level, org.apache.thrift.async.AsyncMethodCallback<get_count_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.keyspace = keyspace; this.key = key; this.column_parent = column_parent; this.consistency_level = consistency_level; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_count", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_count_args args = new get_count_args(); args.setKeyspace(keyspace); args.setKey(key); args.setColumn_parent(column_parent); args.setConsistency_level(consistency_level); args.write(prot); prot.writeMessageEnd(); } public int getResult() throws InvalidRequestException, UnavailableException, TimedOutException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_count(); } } public void get_range_slice(String keyspace, ColumnParent column_parent, SlicePredicate predicate, String start_key, String finish_key, int row_count, ConsistencyLevel consistency_level, org.apache.thrift.async.AsyncMethodCallback<get_range_slice_call> resultHandler) throws org.apache.thrift.TException { checkReady(); get_range_slice_call method_call = new get_range_slice_call(keyspace, column_parent, predicate, start_key, finish_key, row_count, consistency_level, resultHandler, this, protocolFactory, transport); this.currentMethod = method_call; manager.call(method_call); } public static class get_range_slice_call extends org.apache.thrift.async.TAsyncMethodCall { private String keyspace; private ColumnParent column_parent; private SlicePredicate predicate; private String start_key; private String finish_key; private int row_count; private ConsistencyLevel consistency_level; public get_range_slice_call(String keyspace, ColumnParent column_parent, SlicePredicate predicate, String start_key, String finish_key, int row_count, ConsistencyLevel consistency_level, org.apache.thrift.async.AsyncMethodCallback<get_range_slice_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.keyspace = keyspace; this.column_parent = column_parent; this.predicate = predicate; this.start_key = start_key; this.finish_key = finish_key; this.row_count = row_count; this.consistency_level = consistency_level; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_range_slice", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_range_slice_args args = new get_range_slice_args(); args.setKeyspace(keyspace); args.setColumn_parent(column_parent); args.setPredicate(predicate); args.setStart_key(start_key); args.setFinish_key(finish_key); args.setRow_count(row_count); args.setConsistency_level(consistency_level); args.write(prot); prot.writeMessageEnd(); } public List<KeySlice> getResult() throws InvalidRequestException, UnavailableException, TimedOutException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_range_slice(); } } public void get_range_slices(String keyspace, ColumnParent column_parent, SlicePredicate predicate, KeyRange range, ConsistencyLevel consistency_level, org.apache.thrift.async.AsyncMethodCallback<get_range_slices_call> resultHandler) throws org.apache.thrift.TException { checkReady(); get_range_slices_call method_call = new get_range_slices_call(keyspace, column_parent, predicate, range, consistency_level, resultHandler, this, protocolFactory, transport); this.currentMethod = method_call; manager.call(method_call); } public static class get_range_slices_call extends org.apache.thrift.async.TAsyncMethodCall { private String keyspace; private ColumnParent column_parent; private SlicePredicate predicate; private KeyRange range; private ConsistencyLevel consistency_level; public get_range_slices_call(String keyspace, ColumnParent column_parent, SlicePredicate predicate, KeyRange range, ConsistencyLevel consistency_level, org.apache.thrift.async.AsyncMethodCallback<get_range_slices_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.keyspace = keyspace; this.column_parent = column_parent; this.predicate = predicate; this.range = range; this.consistency_level = consistency_level; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_range_slices", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_range_slices_args args = new get_range_slices_args(); args.setKeyspace(keyspace); args.setColumn_parent(column_parent); args.setPredicate(predicate); args.setRange(range); args.setConsistency_level(consistency_level); args.write(prot); prot.writeMessageEnd(); } public List<KeySlice> getResult() throws InvalidRequestException, UnavailableException, TimedOutException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_range_slices(); } } public void insert(String keyspace, String key, ColumnPath column_path, ByteBuffer value, long timestamp, ConsistencyLevel consistency_level, org.apache.thrift.async.AsyncMethodCallback<insert_call> resultHandler) throws org.apache.thrift.TException { checkReady(); insert_call method_call = new insert_call(keyspace, key, column_path, value, timestamp, consistency_level, resultHandler, this, protocolFactory, transport); this.currentMethod = method_call; manager.call(method_call); } public static class insert_call extends org.apache.thrift.async.TAsyncMethodCall { private String keyspace; private String key; private ColumnPath column_path; private ByteBuffer value; private long timestamp; private ConsistencyLevel consistency_level; public insert_call(String keyspace, String key, ColumnPath column_path, ByteBuffer value, long timestamp, ConsistencyLevel consistency_level, org.apache.thrift.async.AsyncMethodCallback<insert_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.keyspace = keyspace; this.key = key; this.column_path = column_path; this.value = value; this.timestamp = timestamp; this.consistency_level = consistency_level; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("insert", org.apache.thrift.protocol.TMessageType.CALL, 0)); insert_args args = new insert_args(); args.setKeyspace(keyspace); args.setKey(key); args.setColumn_path(column_path); args.setValue(value); args.setTimestamp(timestamp); args.setConsistency_level(consistency_level); args.write(prot); prot.writeMessageEnd(); } public void getResult() throws InvalidRequestException, UnavailableException, TimedOutException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); (new Client(prot)).recv_insert(); } } public void batch_insert(String keyspace, String key, Map<String,List<ColumnOrSuperColumn>> cfmap, ConsistencyLevel consistency_level, org.apache.thrift.async.AsyncMethodCallback<batch_insert_call> resultHandler) throws org.apache.thrift.TException { checkReady(); batch_insert_call method_call = new batch_insert_call(keyspace, key, cfmap, consistency_level, resultHandler, this, protocolFactory, transport); this.currentMethod = method_call; manager.call(method_call); } public static class batch_insert_call extends org.apache.thrift.async.TAsyncMethodCall { private String keyspace; private String key; private Map<String,List<ColumnOrSuperColumn>> cfmap; private ConsistencyLevel consistency_level; public batch_insert_call(String keyspace, String key, Map<String,List<ColumnOrSuperColumn>> cfmap, ConsistencyLevel consistency_level, org.apache.thrift.async.AsyncMethodCallback<batch_insert_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.keyspace = keyspace; this.key = key; this.cfmap = cfmap; this.consistency_level = consistency_level; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("batch_insert", org.apache.thrift.protocol.TMessageType.CALL, 0)); batch_insert_args args = new batch_insert_args(); args.setKeyspace(keyspace); args.setKey(key); args.setCfmap(cfmap); args.setConsistency_level(consistency_level); args.write(prot); prot.writeMessageEnd(); } public void getResult() throws InvalidRequestException, UnavailableException, TimedOutException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); (new Client(prot)).recv_batch_insert(); } } public void remove(String keyspace, String key, ColumnPath column_path, long timestamp, ConsistencyLevel consistency_level, org.apache.thrift.async.AsyncMethodCallback<remove_call> resultHandler) throws org.apache.thrift.TException { checkReady(); remove_call method_call = new remove_call(keyspace, key, column_path, timestamp, consistency_level, resultHandler, this, protocolFactory, transport); this.currentMethod = method_call; manager.call(method_call); } public static class remove_call extends org.apache.thrift.async.TAsyncMethodCall { private String keyspace; private String key; private ColumnPath column_path; private long timestamp; private ConsistencyLevel consistency_level; public remove_call(String keyspace, String key, ColumnPath column_path, long timestamp, ConsistencyLevel consistency_level, org.apache.thrift.async.AsyncMethodCallback<remove_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.keyspace = keyspace; this.key = key; this.column_path = column_path; this.timestamp = timestamp; this.consistency_level = consistency_level; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("remove", org.apache.thrift.protocol.TMessageType.CALL, 0)); remove_args args = new remove_args(); args.setKeyspace(keyspace); args.setKey(key); args.setColumn_path(column_path); args.setTimestamp(timestamp); args.setConsistency_level(consistency_level); args.write(prot); prot.writeMessageEnd(); } public void getResult() throws InvalidRequestException, UnavailableException, TimedOutException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); (new Client(prot)).recv_remove(); } } public void batch_mutate(String keyspace, Map<String,Map<String,List<Mutation>>> mutation_map, ConsistencyLevel consistency_level, org.apache.thrift.async.AsyncMethodCallback<batch_mutate_call> resultHandler) throws org.apache.thrift.TException { checkReady(); batch_mutate_call method_call = new batch_mutate_call(keyspace, mutation_map, consistency_level, resultHandler, this, protocolFactory, transport); this.currentMethod = method_call; manager.call(method_call); } public static class batch_mutate_call extends org.apache.thrift.async.TAsyncMethodCall { private String keyspace; private Map<String,Map<String,List<Mutation>>> mutation_map; private ConsistencyLevel consistency_level; public batch_mutate_call(String keyspace, Map<String,Map<String,List<Mutation>>> mutation_map, ConsistencyLevel consistency_level, org.apache.thrift.async.AsyncMethodCallback<batch_mutate_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.keyspace = keyspace; this.mutation_map = mutation_map; this.consistency_level = consistency_level; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("batch_mutate", org.apache.thrift.protocol.TMessageType.CALL, 0)); batch_mutate_args args = new batch_mutate_args(); args.setKeyspace(keyspace); args.setMutation_map(mutation_map); args.setConsistency_level(consistency_level); args.write(prot); prot.writeMessageEnd(); } public void getResult() throws InvalidRequestException, UnavailableException, TimedOutException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); (new Client(prot)).recv_batch_mutate(); } } public void get_string_property(String property, org.apache.thrift.async.AsyncMethodCallback<get_string_property_call> resultHandler) throws org.apache.thrift.TException { checkReady(); get_string_property_call method_call = new get_string_property_call(property, resultHandler, this, protocolFactory, transport); this.currentMethod = method_call; manager.call(method_call); } public static class get_string_property_call extends org.apache.thrift.async.TAsyncMethodCall { private String property; public get_string_property_call(String property, org.apache.thrift.async.AsyncMethodCallback<get_string_property_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.property = property; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_string_property", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_string_property_args args = new get_string_property_args(); args.setProperty(property); args.write(prot); prot.writeMessageEnd(); } public String getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_string_property(); } } public void get_string_list_property(String property, org.apache.thrift.async.AsyncMethodCallback<get_string_list_property_call> resultHandler) throws org.apache.thrift.TException { checkReady(); get_string_list_property_call method_call = new get_string_list_property_call(property, resultHandler, this, protocolFactory, transport); this.currentMethod = method_call; manager.call(method_call); } public static class get_string_list_property_call extends org.apache.thrift.async.TAsyncMethodCall { private String property; public get_string_list_property_call(String property, org.apache.thrift.async.AsyncMethodCallback<get_string_list_property_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.property = property; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_string_list_property", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_string_list_property_args args = new get_string_list_property_args(); args.setProperty(property); args.write(prot); prot.writeMessageEnd(); } public List<String> getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_string_list_property(); } } public void describe_keyspaces(org.apache.thrift.async.AsyncMethodCallback<describe_keyspaces_call> resultHandler) throws org.apache.thrift.TException { checkReady(); describe_keyspaces_call method_call = new describe_keyspaces_call(resultHandler, this, protocolFactory, transport); this.currentMethod = method_call; manager.call(method_call); } public static class describe_keyspaces_call extends org.apache.thrift.async.TAsyncMethodCall { public describe_keyspaces_call(org.apache.thrift.async.AsyncMethodCallback<describe_keyspaces_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("describe_keyspaces", org.apache.thrift.protocol.TMessageType.CALL, 0)); describe_keyspaces_args args = new describe_keyspaces_args(); args.write(prot); prot.writeMessageEnd(); } public Set<String> getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_describe_keyspaces(); } } public void describe_cluster_name(org.apache.thrift.async.AsyncMethodCallback<describe_cluster_name_call> resultHandler) throws org.apache.thrift.TException { checkReady(); describe_cluster_name_call method_call = new describe_cluster_name_call(resultHandler, this, protocolFactory, transport); this.currentMethod = method_call; manager.call(method_call); } public static class describe_cluster_name_call extends org.apache.thrift.async.TAsyncMethodCall { public describe_cluster_name_call(org.apache.thrift.async.AsyncMethodCallback<describe_cluster_name_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("describe_cluster_name", org.apache.thrift.protocol.TMessageType.CALL, 0)); describe_cluster_name_args args = new describe_cluster_name_args(); args.write(prot); prot.writeMessageEnd(); } public String getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_describe_cluster_name(); } } public void describe_version(org.apache.thrift.async.AsyncMethodCallback<describe_version_call> resultHandler) throws org.apache.thrift.TException { checkReady(); describe_version_call method_call = new describe_version_call(resultHandler, this, protocolFactory, transport); this.currentMethod = method_call; manager.call(method_call); } public static class describe_version_call extends org.apache.thrift.async.TAsyncMethodCall { public describe_version_call(org.apache.thrift.async.AsyncMethodCallback<describe_version_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("describe_version", org.apache.thrift.protocol.TMessageType.CALL, 0)); describe_version_args args = new describe_version_args(); args.write(prot); prot.writeMessageEnd(); } public String getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_describe_version(); } } public void describe_ring(String keyspace, org.apache.thrift.async.AsyncMethodCallback<describe_ring_call> resultHandler) throws org.apache.thrift.TException { checkReady(); describe_ring_call method_call = new describe_ring_call(keyspace, resultHandler, this, protocolFactory, transport); this.currentMethod = method_call; manager.call(method_call); } public static class describe_ring_call extends org.apache.thrift.async.TAsyncMethodCall { private String keyspace; public describe_ring_call(String keyspace, org.apache.thrift.async.AsyncMethodCallback<describe_ring_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.keyspace = keyspace; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("describe_ring", org.apache.thrift.protocol.TMessageType.CALL, 0)); describe_ring_args args = new describe_ring_args(); args.setKeyspace(keyspace); args.write(prot); prot.writeMessageEnd(); } public List<TokenRange> getResult() throws InvalidRequestException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_describe_ring(); } } public void describe_partitioner(org.apache.thrift.async.AsyncMethodCallback<describe_partitioner_call> resultHandler) throws org.apache.thrift.TException { checkReady(); describe_partitioner_call method_call = new describe_partitioner_call(resultHandler, this, protocolFactory, transport); this.currentMethod = method_call; manager.call(method_call); } public static class describe_partitioner_call extends org.apache.thrift.async.TAsyncMethodCall { public describe_partitioner_call(org.apache.thrift.async.AsyncMethodCallback<describe_partitioner_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("describe_partitioner", org.apache.thrift.protocol.TMessageType.CALL, 0)); describe_partitioner_args args = new describe_partitioner_args(); args.write(prot); prot.writeMessageEnd(); } public String getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_describe_partitioner(); } } public void describe_keyspace(String keyspace, org.apache.thrift.async.AsyncMethodCallback<describe_keyspace_call> resultHandler) throws org.apache.thrift.TException { checkReady(); describe_keyspace_call method_call = new describe_keyspace_call(keyspace, resultHandler, this, protocolFactory, transport); this.currentMethod = method_call; manager.call(method_call); } public static class describe_keyspace_call extends org.apache.thrift.async.TAsyncMethodCall { private String keyspace; public describe_keyspace_call(String keyspace, org.apache.thrift.async.AsyncMethodCallback<describe_keyspace_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.keyspace = keyspace; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("describe_keyspace", org.apache.thrift.protocol.TMessageType.CALL, 0)); describe_keyspace_args args = new describe_keyspace_args(); args.setKeyspace(keyspace); args.write(prot); prot.writeMessageEnd(); } public Map<String,Map<String,String>> getResult() throws NotFoundException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_describe_keyspace(); } } public void describe_splits(String start_token, String end_token, int keys_per_split, org.apache.thrift.async.AsyncMethodCallback<describe_splits_call> resultHandler) throws org.apache.thrift.TException { checkReady(); describe_splits_call method_call = new describe_splits_call(start_token, end_token, keys_per_split, resultHandler, this, protocolFactory, transport); this.currentMethod = method_call; manager.call(method_call); } public static class describe_splits_call extends org.apache.thrift.async.TAsyncMethodCall { private String start_token; private String end_token; private int keys_per_split; public describe_splits_call(String start_token, String end_token, int keys_per_split, org.apache.thrift.async.AsyncMethodCallback<describe_splits_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.start_token = start_token; this.end_token = end_token; this.keys_per_split = keys_per_split; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("describe_splits", org.apache.thrift.protocol.TMessageType.CALL, 0)); describe_splits_args args = new describe_splits_args(); args.setStart_token(start_token); args.setEnd_token(end_token); args.setKeys_per_split(keys_per_split); args.write(prot); prot.writeMessageEnd(); } public List<String> getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_describe_splits(); } } } public static class Processor implements org.apache.thrift.TProcessor { private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName()); public Processor(Iface iface) { iface_ = iface; processMap_.put("login", new login()); processMap_.put("get", new get()); processMap_.put("get_slice", new get_slice()); processMap_.put("multiget", new multiget()); processMap_.put("multiget_slice", new multiget_slice()); processMap_.put("get_count", new get_count()); processMap_.put("get_range_slice", new get_range_slice()); processMap_.put("get_range_slices", new get_range_slices()); processMap_.put("insert", new insert()); processMap_.put("batch_insert", new batch_insert()); processMap_.put("remove", new remove()); processMap_.put("batch_mutate", new batch_mutate()); processMap_.put("get_string_property", new get_string_property()); processMap_.put("get_string_list_property", new get_string_list_property()); processMap_.put("describe_keyspaces", new describe_keyspaces()); processMap_.put("describe_cluster_name", new describe_cluster_name()); processMap_.put("describe_version", new describe_version()); processMap_.put("describe_ring", new describe_ring()); processMap_.put("describe_partitioner", new describe_partitioner()); processMap_.put("describe_keyspace", new describe_keyspace()); processMap_.put("describe_splits", new describe_splits()); } protected static interface ProcessFunction { public void process(int seqid, org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException; } private Iface iface_; protected final HashMap<String,ProcessFunction> processMap_ = new HashMap<String,ProcessFunction>(); public boolean process(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TMessage msg = iprot.readMessageBegin(); ProcessFunction fn = processMap_.get(msg.name); if (fn == null) { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, org.apache.thrift.protocol.TType.STRUCT); iprot.readMessageEnd(); org.apache.thrift.TApplicationException x = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.UNKNOWN_METHOD, "Invalid method name: '"+msg.name+"'"); oprot.writeMessageBegin(new org.apache.thrift.protocol.TMessage(msg.name, org.apache.thrift.protocol.TMessageType.EXCEPTION, msg.seqid)); x.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); return true; } fn.process(msg.seqid, iprot, oprot); return true; } private class login implements ProcessFunction { public void process(int seqid, org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { login_args args = new login_args(); try { args.read(iprot); } catch (org.apache.thrift.protocol.TProtocolException e) { iprot.readMessageEnd(); org.apache.thrift.TApplicationException x = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.PROTOCOL_ERROR, e.getMessage()); oprot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("login", org.apache.thrift.protocol.TMessageType.EXCEPTION, seqid)); x.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); return; } iprot.readMessageEnd(); login_result result = new login_result(); try { iface_.login(args.keyspace, args.auth_request); } catch (AuthenticationException authnx) { result.authnx = authnx; } catch (AuthorizationException authzx) { result.authzx = authzx; } catch (Throwable th) { LOGGER.error("Internal error processing login", th); org.apache.thrift.TApplicationException x = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, "Internal error processing login"); oprot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("login", org.apache.thrift.protocol.TMessageType.EXCEPTION, seqid)); x.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); return; } oprot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("login", org.apache.thrift.protocol.TMessageType.REPLY, seqid)); result.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); } } private class get implements ProcessFunction { public void process(int seqid, org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { get_args args = new get_args(); try { args.read(iprot); } catch (org.apache.thrift.protocol.TProtocolException e) { iprot.readMessageEnd(); org.apache.thrift.TApplicationException x = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.PROTOCOL_ERROR, e.getMessage()); oprot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get", org.apache.thrift.protocol.TMessageType.EXCEPTION, seqid)); x.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); return; } iprot.readMessageEnd(); get_result result = new get_result(); try { result.success = iface_.get(args.keyspace, args.key, args.column_path, args.consistency_level); } catch (InvalidRequestException ire) { result.ire = ire; } catch (NotFoundException nfe) { result.nfe = nfe; } catch (UnavailableException ue) { result.ue = ue; } catch (TimedOutException te) { result.te = te; } catch (Throwable th) { LOGGER.error("Internal error processing get", th); org.apache.thrift.TApplicationException x = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, "Internal error processing get"); oprot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get", org.apache.thrift.protocol.TMessageType.EXCEPTION, seqid)); x.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); return; } oprot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get", org.apache.thrift.protocol.TMessageType.REPLY, seqid)); result.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); } } private class get_slice implements ProcessFunction { public void process(int seqid, org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { get_slice_args args = new get_slice_args(); try { args.read(iprot); } catch (org.apache.thrift.protocol.TProtocolException e) { iprot.readMessageEnd(); org.apache.thrift.TApplicationException x = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.PROTOCOL_ERROR, e.getMessage()); oprot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_slice", org.apache.thrift.protocol.TMessageType.EXCEPTION, seqid)); x.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); return; } iprot.readMessageEnd(); get_slice_result result = new get_slice_result(); try { result.success = iface_.get_slice(args.keyspace, args.key, args.column_parent, args.predicate, args.consistency_level); } catch (InvalidRequestException ire) { result.ire = ire; } catch (UnavailableException ue) { result.ue = ue; } catch (TimedOutException te) { result.te = te; } catch (Throwable th) { LOGGER.error("Internal error processing get_slice", th); org.apache.thrift.TApplicationException x = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, "Internal error processing get_slice"); oprot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_slice", org.apache.thrift.protocol.TMessageType.EXCEPTION, seqid)); x.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); return; } oprot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_slice", org.apache.thrift.protocol.TMessageType.REPLY, seqid)); result.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); } } private class multiget implements ProcessFunction { public void process(int seqid, org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { multiget_args args = new multiget_args(); try { args.read(iprot); } catch (org.apache.thrift.protocol.TProtocolException e) { iprot.readMessageEnd(); org.apache.thrift.TApplicationException x = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.PROTOCOL_ERROR, e.getMessage()); oprot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("multiget", org.apache.thrift.protocol.TMessageType.EXCEPTION, seqid)); x.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); return; } iprot.readMessageEnd(); multiget_result result = new multiget_result(); try { result.success = iface_.multiget(args.keyspace, args.keys, args.column_path, args.consistency_level); } catch (InvalidRequestException ire) { result.ire = ire; } catch (UnavailableException ue) { result.ue = ue; } catch (TimedOutException te) { result.te = te; } catch (Throwable th) { LOGGER.error("Internal error processing multiget", th); org.apache.thrift.TApplicationException x = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, "Internal error processing multiget"); oprot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("multiget", org.apache.thrift.protocol.TMessageType.EXCEPTION, seqid)); x.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); return; } oprot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("multiget", org.apache.thrift.protocol.TMessageType.REPLY, seqid)); result.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); } } private class multiget_slice implements ProcessFunction { public void process(int seqid, org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { multiget_slice_args args = new multiget_slice_args(); try { args.read(iprot); } catch (org.apache.thrift.protocol.TProtocolException e) { iprot.readMessageEnd(); org.apache.thrift.TApplicationException x = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.PROTOCOL_ERROR, e.getMessage()); oprot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("multiget_slice", org.apache.thrift.protocol.TMessageType.EXCEPTION, seqid)); x.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); return; } iprot.readMessageEnd(); multiget_slice_result result = new multiget_slice_result(); try { result.success = iface_.multiget_slice(args.keyspace, args.keys, args.column_parent, args.predicate, args.consistency_level); } catch (InvalidRequestException ire) { result.ire = ire; } catch (UnavailableException ue) { result.ue = ue; } catch (TimedOutException te) { result.te = te; } catch (Throwable th) { LOGGER.error("Internal error processing multiget_slice", th); org.apache.thrift.TApplicationException x = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, "Internal error processing multiget_slice"); oprot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("multiget_slice", org.apache.thrift.protocol.TMessageType.EXCEPTION, seqid)); x.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); return; } oprot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("multiget_slice", org.apache.thrift.protocol.TMessageType.REPLY, seqid)); result.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); } } private class get_count implements ProcessFunction { public void process(int seqid, org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { get_count_args args = new get_count_args(); try { args.read(iprot); } catch (org.apache.thrift.protocol.TProtocolException e) { iprot.readMessageEnd(); org.apache.thrift.TApplicationException x = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.PROTOCOL_ERROR, e.getMessage()); oprot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_count", org.apache.thrift.protocol.TMessageType.EXCEPTION, seqid)); x.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); return; } iprot.readMessageEnd(); get_count_result result = new get_count_result(); try { result.success = iface_.get_count(args.keyspace, args.key, args.column_parent, args.consistency_level); result.setSuccessIsSet(true); } catch (InvalidRequestException ire) { result.ire = ire; } catch (UnavailableException ue) { result.ue = ue; } catch (TimedOutException te) { result.te = te; } catch (Throwable th) { LOGGER.error("Internal error processing get_count", th); org.apache.thrift.TApplicationException x = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, "Internal error processing get_count"); oprot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_count", org.apache.thrift.protocol.TMessageType.EXCEPTION, seqid)); x.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); return; } oprot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_count", org.apache.thrift.protocol.TMessageType.REPLY, seqid)); result.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); } } private class get_range_slice implements ProcessFunction { public void process(int seqid, org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { get_range_slice_args args = new get_range_slice_args(); try { args.read(iprot); } catch (org.apache.thrift.protocol.TProtocolException e) { iprot.readMessageEnd(); org.apache.thrift.TApplicationException x = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.PROTOCOL_ERROR, e.getMessage()); oprot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_range_slice", org.apache.thrift.protocol.TMessageType.EXCEPTION, seqid)); x.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); return; } iprot.readMessageEnd(); get_range_slice_result result = new get_range_slice_result(); try { result.success = iface_.get_range_slice(args.keyspace, args.column_parent, args.predicate, args.start_key, args.finish_key, args.row_count, args.consistency_level); } catch (InvalidRequestException ire) { result.ire = ire; } catch (UnavailableException ue) { result.ue = ue; } catch (TimedOutException te) { result.te = te; } catch (Throwable th) { LOGGER.error("Internal error processing get_range_slice", th); org.apache.thrift.TApplicationException x = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, "Internal error processing get_range_slice"); oprot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_range_slice", org.apache.thrift.protocol.TMessageType.EXCEPTION, seqid)); x.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); return; } oprot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_range_slice", org.apache.thrift.protocol.TMessageType.REPLY, seqid)); result.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); } } private class get_range_slices implements ProcessFunction { public void process(int seqid, org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { get_range_slices_args args = new get_range_slices_args(); try { args.read(iprot); } catch (org.apache.thrift.protocol.TProtocolException e) { iprot.readMessageEnd(); org.apache.thrift.TApplicationException x = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.PROTOCOL_ERROR, e.getMessage()); oprot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_range_slices", org.apache.thrift.protocol.TMessageType.EXCEPTION, seqid)); x.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); return; } iprot.readMessageEnd(); get_range_slices_result result = new get_range_slices_result(); try { result.success = iface_.get_range_slices(args.keyspace, args.column_parent, args.predicate, args.range, args.consistency_level); } catch (InvalidRequestException ire) { result.ire = ire; } catch (UnavailableException ue) { result.ue = ue; } catch (TimedOutException te) { result.te = te; } catch (Throwable th) { LOGGER.error("Internal error processing get_range_slices", th); org.apache.thrift.TApplicationException x = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, "Internal error processing get_range_slices"); oprot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_range_slices", org.apache.thrift.protocol.TMessageType.EXCEPTION, seqid)); x.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); return; } oprot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_range_slices", org.apache.thrift.protocol.TMessageType.REPLY, seqid)); result.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); } } private class insert implements ProcessFunction { public void process(int seqid, org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { insert_args args = new insert_args(); try { args.read(iprot); } catch (org.apache.thrift.protocol.TProtocolException e) { iprot.readMessageEnd(); org.apache.thrift.TApplicationException x = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.PROTOCOL_ERROR, e.getMessage()); oprot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("insert", org.apache.thrift.protocol.TMessageType.EXCEPTION, seqid)); x.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); return; } iprot.readMessageEnd(); insert_result result = new insert_result(); try { iface_.insert(args.keyspace, args.key, args.column_path, args.value, args.timestamp, args.consistency_level); } catch (InvalidRequestException ire) { result.ire = ire; } catch (UnavailableException ue) { result.ue = ue; } catch (TimedOutException te) { result.te = te; } catch (Throwable th) { LOGGER.error("Internal error processing insert", th); org.apache.thrift.TApplicationException x = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, "Internal error processing insert"); oprot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("insert", org.apache.thrift.protocol.TMessageType.EXCEPTION, seqid)); x.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); return; } oprot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("insert", org.apache.thrift.protocol.TMessageType.REPLY, seqid)); result.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); } } private class batch_insert implements ProcessFunction { public void process(int seqid, org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { batch_insert_args args = new batch_insert_args(); try { args.read(iprot); } catch (org.apache.thrift.protocol.TProtocolException e) { iprot.readMessageEnd(); org.apache.thrift.TApplicationException x = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.PROTOCOL_ERROR, e.getMessage()); oprot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("batch_insert", org.apache.thrift.protocol.TMessageType.EXCEPTION, seqid)); x.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); return; } iprot.readMessageEnd(); batch_insert_result result = new batch_insert_result(); try { iface_.batch_insert(args.keyspace, args.key, args.cfmap, args.consistency_level); } catch (InvalidRequestException ire) { result.ire = ire; } catch (UnavailableException ue) { result.ue = ue; } catch (TimedOutException te) { result.te = te; } catch (Throwable th) { LOGGER.error("Internal error processing batch_insert", th); org.apache.thrift.TApplicationException x = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, "Internal error processing batch_insert"); oprot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("batch_insert", org.apache.thrift.protocol.TMessageType.EXCEPTION, seqid)); x.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); return; } oprot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("batch_insert", org.apache.thrift.protocol.TMessageType.REPLY, seqid)); result.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); } } private class remove implements ProcessFunction { public void process(int seqid, org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { remove_args args = new remove_args(); try { args.read(iprot); } catch (org.apache.thrift.protocol.TProtocolException e) { iprot.readMessageEnd(); org.apache.thrift.TApplicationException x = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.PROTOCOL_ERROR, e.getMessage()); oprot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("remove", org.apache.thrift.protocol.TMessageType.EXCEPTION, seqid)); x.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); return; } iprot.readMessageEnd(); remove_result result = new remove_result(); try { iface_.remove(args.keyspace, args.key, args.column_path, args.timestamp, args.consistency_level); } catch (InvalidRequestException ire) { result.ire = ire; } catch (UnavailableException ue) { result.ue = ue; } catch (TimedOutException te) { result.te = te; } catch (Throwable th) { LOGGER.error("Internal error processing remove", th); org.apache.thrift.TApplicationException x = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, "Internal error processing remove"); oprot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("remove", org.apache.thrift.protocol.TMessageType.EXCEPTION, seqid)); x.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); return; } oprot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("remove", org.apache.thrift.protocol.TMessageType.REPLY, seqid)); result.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); } } private class batch_mutate implements ProcessFunction { public void process(int seqid, org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { batch_mutate_args args = new batch_mutate_args(); try { args.read(iprot); } catch (org.apache.thrift.protocol.TProtocolException e) { iprot.readMessageEnd(); org.apache.thrift.TApplicationException x = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.PROTOCOL_ERROR, e.getMessage()); oprot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("batch_mutate", org.apache.thrift.protocol.TMessageType.EXCEPTION, seqid)); x.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); return; } iprot.readMessageEnd(); batch_mutate_result result = new batch_mutate_result(); try { iface_.batch_mutate(args.keyspace, args.mutation_map, args.consistency_level); } catch (InvalidRequestException ire) { result.ire = ire; } catch (UnavailableException ue) { result.ue = ue; } catch (TimedOutException te) { result.te = te; } catch (Throwable th) { LOGGER.error("Internal error processing batch_mutate", th); org.apache.thrift.TApplicationException x = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, "Internal error processing batch_mutate"); oprot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("batch_mutate", org.apache.thrift.protocol.TMessageType.EXCEPTION, seqid)); x.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); return; } oprot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("batch_mutate", org.apache.thrift.protocol.TMessageType.REPLY, seqid)); result.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); } } private class get_string_property implements ProcessFunction { public void process(int seqid, org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { get_string_property_args args = new get_string_property_args(); try { args.read(iprot); } catch (org.apache.thrift.protocol.TProtocolException e) { iprot.readMessageEnd(); org.apache.thrift.TApplicationException x = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.PROTOCOL_ERROR, e.getMessage()); oprot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_string_property", org.apache.thrift.protocol.TMessageType.EXCEPTION, seqid)); x.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); return; } iprot.readMessageEnd(); get_string_property_result result = new get_string_property_result(); result.success = iface_.get_string_property(args.property); oprot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_string_property", org.apache.thrift.protocol.TMessageType.REPLY, seqid)); result.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); } } private class get_string_list_property implements ProcessFunction { public void process(int seqid, org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { get_string_list_property_args args = new get_string_list_property_args(); try { args.read(iprot); } catch (org.apache.thrift.protocol.TProtocolException e) { iprot.readMessageEnd(); org.apache.thrift.TApplicationException x = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.PROTOCOL_ERROR, e.getMessage()); oprot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_string_list_property", org.apache.thrift.protocol.TMessageType.EXCEPTION, seqid)); x.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); return; } iprot.readMessageEnd(); get_string_list_property_result result = new get_string_list_property_result(); result.success = iface_.get_string_list_property(args.property); oprot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_string_list_property", org.apache.thrift.protocol.TMessageType.REPLY, seqid)); result.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); } } private class describe_keyspaces implements ProcessFunction { public void process(int seqid, org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { describe_keyspaces_args args = new describe_keyspaces_args(); try { args.read(iprot); } catch (org.apache.thrift.protocol.TProtocolException e) { iprot.readMessageEnd(); org.apache.thrift.TApplicationException x = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.PROTOCOL_ERROR, e.getMessage()); oprot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("describe_keyspaces", org.apache.thrift.protocol.TMessageType.EXCEPTION, seqid)); x.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); return; } iprot.readMessageEnd(); describe_keyspaces_result result = new describe_keyspaces_result(); result.success = iface_.describe_keyspaces(); oprot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("describe_keyspaces", org.apache.thrift.protocol.TMessageType.REPLY, seqid)); result.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); } } private class describe_cluster_name implements ProcessFunction { public void process(int seqid, org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { describe_cluster_name_args args = new describe_cluster_name_args(); try { args.read(iprot); } catch (org.apache.thrift.protocol.TProtocolException e) { iprot.readMessageEnd(); org.apache.thrift.TApplicationException x = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.PROTOCOL_ERROR, e.getMessage()); oprot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("describe_cluster_name", org.apache.thrift.protocol.TMessageType.EXCEPTION, seqid)); x.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); return; } iprot.readMessageEnd(); describe_cluster_name_result result = new describe_cluster_name_result(); result.success = iface_.describe_cluster_name(); oprot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("describe_cluster_name", org.apache.thrift.protocol.TMessageType.REPLY, seqid)); result.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); } } private class describe_version implements ProcessFunction { public void process(int seqid, org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { describe_version_args args = new describe_version_args(); try { args.read(iprot); } catch (org.apache.thrift.protocol.TProtocolException e) { iprot.readMessageEnd(); org.apache.thrift.TApplicationException x = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.PROTOCOL_ERROR, e.getMessage()); oprot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("describe_version", org.apache.thrift.protocol.TMessageType.EXCEPTION, seqid)); x.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); return; } iprot.readMessageEnd(); describe_version_result result = new describe_version_result(); result.success = iface_.describe_version(); oprot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("describe_version", org.apache.thrift.protocol.TMessageType.REPLY, seqid)); result.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); } } private class describe_ring implements ProcessFunction { public void process(int seqid, org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { describe_ring_args args = new describe_ring_args(); try { args.read(iprot); } catch (org.apache.thrift.protocol.TProtocolException e) { iprot.readMessageEnd(); org.apache.thrift.TApplicationException x = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.PROTOCOL_ERROR, e.getMessage()); oprot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("describe_ring", org.apache.thrift.protocol.TMessageType.EXCEPTION, seqid)); x.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); return; } iprot.readMessageEnd(); describe_ring_result result = new describe_ring_result(); try { result.success = iface_.describe_ring(args.keyspace); } catch (InvalidRequestException ire) { result.ire = ire; } catch (Throwable th) { LOGGER.error("Internal error processing describe_ring", th); org.apache.thrift.TApplicationException x = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, "Internal error processing describe_ring"); oprot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("describe_ring", org.apache.thrift.protocol.TMessageType.EXCEPTION, seqid)); x.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); return; } oprot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("describe_ring", org.apache.thrift.protocol.TMessageType.REPLY, seqid)); result.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); } } private class describe_partitioner implements ProcessFunction { public void process(int seqid, org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { describe_partitioner_args args = new describe_partitioner_args(); try { args.read(iprot); } catch (org.apache.thrift.protocol.TProtocolException e) { iprot.readMessageEnd(); org.apache.thrift.TApplicationException x = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.PROTOCOL_ERROR, e.getMessage()); oprot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("describe_partitioner", org.apache.thrift.protocol.TMessageType.EXCEPTION, seqid)); x.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); return; } iprot.readMessageEnd(); describe_partitioner_result result = new describe_partitioner_result(); result.success = iface_.describe_partitioner(); oprot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("describe_partitioner", org.apache.thrift.protocol.TMessageType.REPLY, seqid)); result.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); } } private class describe_keyspace implements ProcessFunction { public void process(int seqid, org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { describe_keyspace_args args = new describe_keyspace_args(); try { args.read(iprot); } catch (org.apache.thrift.protocol.TProtocolException e) { iprot.readMessageEnd(); org.apache.thrift.TApplicationException x = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.PROTOCOL_ERROR, e.getMessage()); oprot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("describe_keyspace", org.apache.thrift.protocol.TMessageType.EXCEPTION, seqid)); x.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); return; } iprot.readMessageEnd(); describe_keyspace_result result = new describe_keyspace_result(); try { result.success = iface_.describe_keyspace(args.keyspace); } catch (NotFoundException nfe) { result.nfe = nfe; } catch (Throwable th) { LOGGER.error("Internal error processing describe_keyspace", th); org.apache.thrift.TApplicationException x = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, "Internal error processing describe_keyspace"); oprot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("describe_keyspace", org.apache.thrift.protocol.TMessageType.EXCEPTION, seqid)); x.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); return; } oprot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("describe_keyspace", org.apache.thrift.protocol.TMessageType.REPLY, seqid)); result.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); } } private class describe_splits implements ProcessFunction { public void process(int seqid, org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { describe_splits_args args = new describe_splits_args(); try { args.read(iprot); } catch (org.apache.thrift.protocol.TProtocolException e) { iprot.readMessageEnd(); org.apache.thrift.TApplicationException x = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.PROTOCOL_ERROR, e.getMessage()); oprot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("describe_splits", org.apache.thrift.protocol.TMessageType.EXCEPTION, seqid)); x.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); return; } iprot.readMessageEnd(); describe_splits_result result = new describe_splits_result(); result.success = iface_.describe_splits(args.start_token, args.end_token, args.keys_per_split); oprot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("describe_splits", org.apache.thrift.protocol.TMessageType.REPLY, seqid)); result.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); } } } public static class login_args implements org.apache.thrift.TBase<login_args, login_args._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("login_args"); private static final org.apache.thrift.protocol.TField KEYSPACE_FIELD_DESC = new org.apache.thrift.protocol.TField("keyspace", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField AUTH_REQUEST_FIELD_DESC = new org.apache.thrift.protocol.TField("auth_request", org.apache.thrift.protocol.TType.STRUCT, (short)2); public String keyspace; public AuthenticationRequest auth_request; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { KEYSPACE((short)1, "keyspace"), AUTH_REQUEST((short)2, "auth_request"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // KEYSPACE return KEYSPACE; case 2: // AUTH_REQUEST return AUTH_REQUEST; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.KEYSPACE, new org.apache.thrift.meta_data.FieldMetaData("keyspace", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.AUTH_REQUEST, new org.apache.thrift.meta_data.FieldMetaData("auth_request", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, AuthenticationRequest.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(login_args.class, metaDataMap); } public login_args() { } public login_args( String keyspace, AuthenticationRequest auth_request) { this(); this.keyspace = keyspace; this.auth_request = auth_request; } /** * Performs a deep copy on <i>other</i>. */ public login_args(login_args other) { if (other.isSetKeyspace()) { this.keyspace = other.keyspace; } if (other.isSetAuth_request()) { this.auth_request = new AuthenticationRequest(other.auth_request); } } public login_args deepCopy() { return new login_args(this); } @Override public void clear() { this.keyspace = null; this.auth_request = null; } public String getKeyspace() { return this.keyspace; } public login_args setKeyspace(String keyspace) { this.keyspace = keyspace; return this; } public void unsetKeyspace() { this.keyspace = null; } /** Returns true if field keyspace is set (has been assigned a value) and false otherwise */ public boolean isSetKeyspace() { return this.keyspace != null; } public void setKeyspaceIsSet(boolean value) { if (!value) { this.keyspace = null; } } public AuthenticationRequest getAuth_request() { return this.auth_request; } public login_args setAuth_request(AuthenticationRequest auth_request) { this.auth_request = auth_request; return this; } public void unsetAuth_request() { this.auth_request = null; } /** Returns true if field auth_request is set (has been assigned a value) and false otherwise */ public boolean isSetAuth_request() { return this.auth_request != null; } public void setAuth_requestIsSet(boolean value) { if (!value) { this.auth_request = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case KEYSPACE: if (value == null) { unsetKeyspace(); } else { setKeyspace((String)value); } break; case AUTH_REQUEST: if (value == null) { unsetAuth_request(); } else { setAuth_request((AuthenticationRequest)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case KEYSPACE: return getKeyspace(); case AUTH_REQUEST: return getAuth_request(); } throw new IllegalStateException(); } /** 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 KEYSPACE: return isSetKeyspace(); case AUTH_REQUEST: return isSetAuth_request(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof login_args) return this.equals((login_args)that); return false; } public boolean equals(login_args that) { if (that == null) return false; boolean this_present_keyspace = true && this.isSetKeyspace(); boolean that_present_keyspace = true && that.isSetKeyspace(); if (this_present_keyspace || that_present_keyspace) { if (!(this_present_keyspace && that_present_keyspace)) return false; if (!this.keyspace.equals(that.keyspace)) return false; } boolean this_present_auth_request = true && this.isSetAuth_request(); boolean that_present_auth_request = true && that.isSetAuth_request(); if (this_present_auth_request || that_present_auth_request) { if (!(this_present_auth_request && that_present_auth_request)) return false; if (!this.auth_request.equals(that.auth_request)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_keyspace = true && (isSetKeyspace()); builder.append(present_keyspace); if (present_keyspace) builder.append(keyspace); boolean present_auth_request = true && (isSetAuth_request()); builder.append(present_auth_request); if (present_auth_request) builder.append(auth_request); return builder.toHashCode(); } public int compareTo(login_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; login_args typedOther = (login_args)other; lastComparison = Boolean.valueOf(isSetKeyspace()).compareTo(typedOther.isSetKeyspace()); if (lastComparison != 0) { return lastComparison; } if (isSetKeyspace()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.keyspace, typedOther.keyspace); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetAuth_request()).compareTo(typedOther.isSetAuth_request()); if (lastComparison != 0) { return lastComparison; } if (isSetAuth_request()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.auth_request, typedOther.auth_request); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // KEYSPACE if (field.type == org.apache.thrift.protocol.TType.STRING) { this.keyspace = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // AUTH_REQUEST if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.auth_request = new AuthenticationRequest(); this.auth_request.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.keyspace != null) { oprot.writeFieldBegin(KEYSPACE_FIELD_DESC); oprot.writeString(this.keyspace); oprot.writeFieldEnd(); } if (this.auth_request != null) { oprot.writeFieldBegin(AUTH_REQUEST_FIELD_DESC); this.auth_request.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("login_args("); boolean first = true; sb.append("keyspace:"); if (this.keyspace == null) { sb.append("null"); } else { sb.append(this.keyspace); } first = false; if (!first) sb.append(", "); sb.append("auth_request:"); if (this.auth_request == null) { sb.append("null"); } else { sb.append(this.auth_request); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields if (keyspace == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'keyspace' was not present! Struct: " + toString()); } if (auth_request == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'auth_request' was not present! Struct: " + toString()); } } 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); } } 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); } } } public static class login_result implements org.apache.thrift.TBase<login_result, login_result._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("login_result"); private static final org.apache.thrift.protocol.TField AUTHNX_FIELD_DESC = new org.apache.thrift.protocol.TField("authnx", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField AUTHZX_FIELD_DESC = new org.apache.thrift.protocol.TField("authzx", org.apache.thrift.protocol.TType.STRUCT, (short)2); public AuthenticationException authnx; public AuthorizationException authzx; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { AUTHNX((short)1, "authnx"), AUTHZX((short)2, "authzx"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // AUTHNX return AUTHNX; case 2: // AUTHZX return AUTHZX; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.AUTHNX, new org.apache.thrift.meta_data.FieldMetaData("authnx", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.AUTHZX, new org.apache.thrift.meta_data.FieldMetaData("authzx", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(login_result.class, metaDataMap); } public login_result() { } public login_result( AuthenticationException authnx, AuthorizationException authzx) { this(); this.authnx = authnx; this.authzx = authzx; } /** * Performs a deep copy on <i>other</i>. */ public login_result(login_result other) { if (other.isSetAuthnx()) { this.authnx = new AuthenticationException(other.authnx); } if (other.isSetAuthzx()) { this.authzx = new AuthorizationException(other.authzx); } } public login_result deepCopy() { return new login_result(this); } @Override public void clear() { this.authnx = null; this.authzx = null; } public AuthenticationException getAuthnx() { return this.authnx; } public login_result setAuthnx(AuthenticationException authnx) { this.authnx = authnx; return this; } public void unsetAuthnx() { this.authnx = null; } /** Returns true if field authnx is set (has been assigned a value) and false otherwise */ public boolean isSetAuthnx() { return this.authnx != null; } public void setAuthnxIsSet(boolean value) { if (!value) { this.authnx = null; } } public AuthorizationException getAuthzx() { return this.authzx; } public login_result setAuthzx(AuthorizationException authzx) { this.authzx = authzx; return this; } public void unsetAuthzx() { this.authzx = null; } /** Returns true if field authzx is set (has been assigned a value) and false otherwise */ public boolean isSetAuthzx() { return this.authzx != null; } public void setAuthzxIsSet(boolean value) { if (!value) { this.authzx = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case AUTHNX: if (value == null) { unsetAuthnx(); } else { setAuthnx((AuthenticationException)value); } break; case AUTHZX: if (value == null) { unsetAuthzx(); } else { setAuthzx((AuthorizationException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case AUTHNX: return getAuthnx(); case AUTHZX: return getAuthzx(); } throw new IllegalStateException(); } /** 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 AUTHNX: return isSetAuthnx(); case AUTHZX: return isSetAuthzx(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof login_result) return this.equals((login_result)that); return false; } public boolean equals(login_result that) { if (that == null) return false; boolean this_present_authnx = true && this.isSetAuthnx(); boolean that_present_authnx = true && that.isSetAuthnx(); if (this_present_authnx || that_present_authnx) { if (!(this_present_authnx && that_present_authnx)) return false; if (!this.authnx.equals(that.authnx)) return false; } boolean this_present_authzx = true && this.isSetAuthzx(); boolean that_present_authzx = true && that.isSetAuthzx(); if (this_present_authzx || that_present_authzx) { if (!(this_present_authzx && that_present_authzx)) return false; if (!this.authzx.equals(that.authzx)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_authnx = true && (isSetAuthnx()); builder.append(present_authnx); if (present_authnx) builder.append(authnx); boolean present_authzx = true && (isSetAuthzx()); builder.append(present_authzx); if (present_authzx) builder.append(authzx); return builder.toHashCode(); } public int compareTo(login_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; login_result typedOther = (login_result)other; lastComparison = Boolean.valueOf(isSetAuthnx()).compareTo(typedOther.isSetAuthnx()); if (lastComparison != 0) { return lastComparison; } if (isSetAuthnx()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authnx, typedOther.authnx); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetAuthzx()).compareTo(typedOther.isSetAuthzx()); if (lastComparison != 0) { return lastComparison; } if (isSetAuthzx()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authzx, typedOther.authzx); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // AUTHNX if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.authnx = new AuthenticationException(); this.authnx.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // AUTHZX if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.authzx = new AuthorizationException(); this.authzx.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetAuthnx()) { oprot.writeFieldBegin(AUTHNX_FIELD_DESC); this.authnx.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetAuthzx()) { oprot.writeFieldBegin(AUTHZX_FIELD_DESC); this.authzx.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("login_result("); boolean first = true; sb.append("authnx:"); if (this.authnx == null) { sb.append("null"); } else { sb.append(this.authnx); } first = false; if (!first) sb.append(", "); sb.append("authzx:"); if (this.authzx == null) { sb.append("null"); } else { sb.append(this.authzx); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields } 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); } } 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); } } } public static class get_args implements org.apache.thrift.TBase<get_args, get_args._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_args"); private static final org.apache.thrift.protocol.TField KEYSPACE_FIELD_DESC = new org.apache.thrift.protocol.TField("keyspace", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField KEY_FIELD_DESC = new org.apache.thrift.protocol.TField("key", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField COLUMN_PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("column_path", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final org.apache.thrift.protocol.TField CONSISTENCY_LEVEL_FIELD_DESC = new org.apache.thrift.protocol.TField("consistency_level", org.apache.thrift.protocol.TType.I32, (short)4); public String keyspace; public String key; public ColumnPath column_path; /** * * @see ConsistencyLevel */ public ConsistencyLevel consistency_level; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { KEYSPACE((short)1, "keyspace"), KEY((short)2, "key"), COLUMN_PATH((short)3, "column_path"), /** * * @see ConsistencyLevel */ CONSISTENCY_LEVEL((short)4, "consistency_level"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // KEYSPACE return KEYSPACE; case 2: // KEY return KEY; case 3: // COLUMN_PATH return COLUMN_PATH; case 4: // CONSISTENCY_LEVEL return CONSISTENCY_LEVEL; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.KEYSPACE, new org.apache.thrift.meta_data.FieldMetaData("keyspace", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.KEY, new org.apache.thrift.meta_data.FieldMetaData("key", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.COLUMN_PATH, new org.apache.thrift.meta_data.FieldMetaData("column_path", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ColumnPath.class))); tmpMap.put(_Fields.CONSISTENCY_LEVEL, new org.apache.thrift.meta_data.FieldMetaData("consistency_level", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ConsistencyLevel.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_args.class, metaDataMap); } public get_args() { this.consistency_level = org.apache.cassandra.thrift.ConsistencyLevel.ONE; } public get_args( String keyspace, String key, ColumnPath column_path, ConsistencyLevel consistency_level) { this(); this.keyspace = keyspace; this.key = key; this.column_path = column_path; this.consistency_level = consistency_level; } /** * Performs a deep copy on <i>other</i>. */ public get_args(get_args other) { if (other.isSetKeyspace()) { this.keyspace = other.keyspace; } if (other.isSetKey()) { this.key = other.key; } if (other.isSetColumn_path()) { this.column_path = new ColumnPath(other.column_path); } if (other.isSetConsistency_level()) { this.consistency_level = other.consistency_level; } } public get_args deepCopy() { return new get_args(this); } @Override public void clear() { this.keyspace = null; this.key = null; this.column_path = null; this.consistency_level = org.apache.cassandra.thrift.ConsistencyLevel.ONE; } public String getKeyspace() { return this.keyspace; } public get_args setKeyspace(String keyspace) { this.keyspace = keyspace; return this; } public void unsetKeyspace() { this.keyspace = null; } /** Returns true if field keyspace is set (has been assigned a value) and false otherwise */ public boolean isSetKeyspace() { return this.keyspace != null; } public void setKeyspaceIsSet(boolean value) { if (!value) { this.keyspace = null; } } public String getKey() { return this.key; } public get_args setKey(String key) { this.key = key; return this; } public void unsetKey() { this.key = null; } /** Returns true if field key is set (has been assigned a value) and false otherwise */ public boolean isSetKey() { return this.key != null; } public void setKeyIsSet(boolean value) { if (!value) { this.key = null; } } public ColumnPath getColumn_path() { return this.column_path; } public get_args setColumn_path(ColumnPath column_path) { this.column_path = column_path; return this; } public void unsetColumn_path() { this.column_path = null; } /** Returns true if field column_path is set (has been assigned a value) and false otherwise */ public boolean isSetColumn_path() { return this.column_path != null; } public void setColumn_pathIsSet(boolean value) { if (!value) { this.column_path = null; } } /** * * @see ConsistencyLevel */ public ConsistencyLevel getConsistency_level() { return this.consistency_level; } /** * * @see ConsistencyLevel */ public get_args setConsistency_level(ConsistencyLevel consistency_level) { this.consistency_level = consistency_level; return this; } public void unsetConsistency_level() { this.consistency_level = null; } /** Returns true if field consistency_level is set (has been assigned a value) and false otherwise */ public boolean isSetConsistency_level() { return this.consistency_level != null; } public void setConsistency_levelIsSet(boolean value) { if (!value) { this.consistency_level = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case KEYSPACE: if (value == null) { unsetKeyspace(); } else { setKeyspace((String)value); } break; case KEY: if (value == null) { unsetKey(); } else { setKey((String)value); } break; case COLUMN_PATH: if (value == null) { unsetColumn_path(); } else { setColumn_path((ColumnPath)value); } break; case CONSISTENCY_LEVEL: if (value == null) { unsetConsistency_level(); } else { setConsistency_level((ConsistencyLevel)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case KEYSPACE: return getKeyspace(); case KEY: return getKey(); case COLUMN_PATH: return getColumn_path(); case CONSISTENCY_LEVEL: return getConsistency_level(); } throw new IllegalStateException(); } /** 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 KEYSPACE: return isSetKeyspace(); case KEY: return isSetKey(); case COLUMN_PATH: return isSetColumn_path(); case CONSISTENCY_LEVEL: return isSetConsistency_level(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_args) return this.equals((get_args)that); return false; } public boolean equals(get_args that) { if (that == null) return false; boolean this_present_keyspace = true && this.isSetKeyspace(); boolean that_present_keyspace = true && that.isSetKeyspace(); if (this_present_keyspace || that_present_keyspace) { if (!(this_present_keyspace && that_present_keyspace)) return false; if (!this.keyspace.equals(that.keyspace)) return false; } boolean this_present_key = true && this.isSetKey(); boolean that_present_key = true && that.isSetKey(); if (this_present_key || that_present_key) { if (!(this_present_key && that_present_key)) return false; if (!this.key.equals(that.key)) return false; } boolean this_present_column_path = true && this.isSetColumn_path(); boolean that_present_column_path = true && that.isSetColumn_path(); if (this_present_column_path || that_present_column_path) { if (!(this_present_column_path && that_present_column_path)) return false; if (!this.column_path.equals(that.column_path)) return false; } boolean this_present_consistency_level = true && this.isSetConsistency_level(); boolean that_present_consistency_level = true && that.isSetConsistency_level(); if (this_present_consistency_level || that_present_consistency_level) { if (!(this_present_consistency_level && that_present_consistency_level)) return false; if (!this.consistency_level.equals(that.consistency_level)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_keyspace = true && (isSetKeyspace()); builder.append(present_keyspace); if (present_keyspace) builder.append(keyspace); boolean present_key = true && (isSetKey()); builder.append(present_key); if (present_key) builder.append(key); boolean present_column_path = true && (isSetColumn_path()); builder.append(present_column_path); if (present_column_path) builder.append(column_path); boolean present_consistency_level = true && (isSetConsistency_level()); builder.append(present_consistency_level); if (present_consistency_level) builder.append(consistency_level.getValue()); return builder.toHashCode(); } 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(isSetKeyspace()).compareTo(typedOther.isSetKeyspace()); if (lastComparison != 0) { return lastComparison; } if (isSetKeyspace()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.keyspace, typedOther.keyspace); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetKey()).compareTo(typedOther.isSetKey()); if (lastComparison != 0) { return lastComparison; } if (isSetKey()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.key, typedOther.key); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetColumn_path()).compareTo(typedOther.isSetColumn_path()); if (lastComparison != 0) { return lastComparison; } if (isSetColumn_path()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.column_path, typedOther.column_path); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetConsistency_level()).compareTo(typedOther.isSetConsistency_level()); if (lastComparison != 0) { return lastComparison; } if (isSetConsistency_level()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.consistency_level, typedOther.consistency_level); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // KEYSPACE if (field.type == org.apache.thrift.protocol.TType.STRING) { this.keyspace = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // KEY if (field.type == org.apache.thrift.protocol.TType.STRING) { this.key = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 3: // COLUMN_PATH if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.column_path = new ColumnPath(); this.column_path.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 4: // CONSISTENCY_LEVEL if (field.type == org.apache.thrift.protocol.TType.I32) { this.consistency_level = ConsistencyLevel.findByValue(iprot.readI32()); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.keyspace != null) { oprot.writeFieldBegin(KEYSPACE_FIELD_DESC); oprot.writeString(this.keyspace); oprot.writeFieldEnd(); } if (this.key != null) { oprot.writeFieldBegin(KEY_FIELD_DESC); oprot.writeString(this.key); oprot.writeFieldEnd(); } if (this.column_path != null) { oprot.writeFieldBegin(COLUMN_PATH_FIELD_DESC); this.column_path.write(oprot); oprot.writeFieldEnd(); } if (this.consistency_level != null) { oprot.writeFieldBegin(CONSISTENCY_LEVEL_FIELD_DESC); oprot.writeI32(this.consistency_level.getValue()); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_args("); boolean first = true; sb.append("keyspace:"); if (this.keyspace == null) { sb.append("null"); } else { sb.append(this.keyspace); } first = false; if (!first) sb.append(", "); sb.append("key:"); if (this.key == null) { sb.append("null"); } else { sb.append(this.key); } first = false; if (!first) sb.append(", "); sb.append("column_path:"); if (this.column_path == null) { sb.append("null"); } else { sb.append(this.column_path); } first = false; if (!first) sb.append(", "); sb.append("consistency_level:"); if (this.consistency_level == null) { sb.append("null"); } else { sb.append(this.consistency_level); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields if (keyspace == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'keyspace' was not present! Struct: " + toString()); } if (key == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'key' was not present! Struct: " + toString()); } if (column_path == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'column_path' was not present! Struct: " + toString()); } if (consistency_level == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'consistency_level' was not present! Struct: " + toString()); } } 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); } } 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); } } } public static class get_result implements org.apache.thrift.TBase<get_result, get_result._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); private static final org.apache.thrift.protocol.TField IRE_FIELD_DESC = new org.apache.thrift.protocol.TField("ire", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField NFE_FIELD_DESC = new org.apache.thrift.protocol.TField("nfe", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField UE_FIELD_DESC = new org.apache.thrift.protocol.TField("ue", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final org.apache.thrift.protocol.TField TE_FIELD_DESC = new org.apache.thrift.protocol.TField("te", org.apache.thrift.protocol.TType.STRUCT, (short)4); public ColumnOrSuperColumn success; public InvalidRequestException ire; public NotFoundException nfe; public UnavailableException ue; public TimedOutException te; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), IRE((short)1, "ire"), NFE((short)2, "nfe"), UE((short)3, "ue"), TE((short)4, "te"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // IRE return IRE; case 2: // NFE return NFE; case 3: // UE return UE; case 4: // TE return TE; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ColumnOrSuperColumn.class))); tmpMap.put(_Fields.IRE, new org.apache.thrift.meta_data.FieldMetaData("ire", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.NFE, new org.apache.thrift.meta_data.FieldMetaData("nfe", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.UE, new org.apache.thrift.meta_data.FieldMetaData("ue", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.TE, new org.apache.thrift.meta_data.FieldMetaData("te", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_result.class, metaDataMap); } public get_result() { } public get_result( ColumnOrSuperColumn success, InvalidRequestException ire, NotFoundException nfe, UnavailableException ue, TimedOutException te) { this(); this.success = success; this.ire = ire; this.nfe = nfe; this.ue = ue; this.te = te; } /** * Performs a deep copy on <i>other</i>. */ public get_result(get_result other) { if (other.isSetSuccess()) { this.success = new ColumnOrSuperColumn(other.success); } if (other.isSetIre()) { this.ire = new InvalidRequestException(other.ire); } if (other.isSetNfe()) { this.nfe = new NotFoundException(other.nfe); } if (other.isSetUe()) { this.ue = new UnavailableException(other.ue); } if (other.isSetTe()) { this.te = new TimedOutException(other.te); } } public get_result deepCopy() { return new get_result(this); } @Override public void clear() { this.success = null; this.ire = null; this.nfe = null; this.ue = null; this.te = null; } public ColumnOrSuperColumn getSuccess() { return this.success; } public get_result setSuccess(ColumnOrSuperColumn success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } public InvalidRequestException getIre() { return this.ire; } public get_result setIre(InvalidRequestException ire) { this.ire = ire; return this; } public void unsetIre() { this.ire = null; } /** Returns true if field ire is set (has been assigned a value) and false otherwise */ public boolean isSetIre() { return this.ire != null; } public void setIreIsSet(boolean value) { if (!value) { this.ire = null; } } public NotFoundException getNfe() { return this.nfe; } public get_result setNfe(NotFoundException nfe) { this.nfe = nfe; return this; } public void unsetNfe() { this.nfe = null; } /** Returns true if field nfe is set (has been assigned a value) and false otherwise */ public boolean isSetNfe() { return this.nfe != null; } public void setNfeIsSet(boolean value) { if (!value) { this.nfe = null; } } public UnavailableException getUe() { return this.ue; } public get_result setUe(UnavailableException ue) { this.ue = ue; return this; } public void unsetUe() { this.ue = null; } /** Returns true if field ue is set (has been assigned a value) and false otherwise */ public boolean isSetUe() { return this.ue != null; } public void setUeIsSet(boolean value) { if (!value) { this.ue = null; } } public TimedOutException getTe() { return this.te; } public get_result setTe(TimedOutException te) { this.te = te; return this; } public void unsetTe() { this.te = null; } /** Returns true if field te is set (has been assigned a value) and false otherwise */ public boolean isSetTe() { return this.te != null; } public void setTeIsSet(boolean value) { if (!value) { this.te = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((ColumnOrSuperColumn)value); } break; case IRE: if (value == null) { unsetIre(); } else { setIre((InvalidRequestException)value); } break; case NFE: if (value == null) { unsetNfe(); } else { setNfe((NotFoundException)value); } break; case UE: if (value == null) { unsetUe(); } else { setUe((UnavailableException)value); } break; case TE: if (value == null) { unsetTe(); } else { setTe((TimedOutException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case IRE: return getIre(); case NFE: return getNfe(); case UE: return getUe(); case TE: return getTe(); } throw new IllegalStateException(); } /** 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(); case IRE: return isSetIre(); case NFE: return isSetNfe(); case UE: return isSetUe(); case TE: return isSetTe(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_result) return this.equals((get_result)that); return false; } public boolean equals(get_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; } boolean this_present_ire = true && this.isSetIre(); boolean that_present_ire = true && that.isSetIre(); if (this_present_ire || that_present_ire) { if (!(this_present_ire && that_present_ire)) return false; if (!this.ire.equals(that.ire)) return false; } boolean this_present_nfe = true && this.isSetNfe(); boolean that_present_nfe = true && that.isSetNfe(); if (this_present_nfe || that_present_nfe) { if (!(this_present_nfe && that_present_nfe)) return false; if (!this.nfe.equals(that.nfe)) return false; } boolean this_present_ue = true && this.isSetUe(); boolean that_present_ue = true && that.isSetUe(); if (this_present_ue || that_present_ue) { if (!(this_present_ue && that_present_ue)) return false; if (!this.ue.equals(that.ue)) return false; } boolean this_present_te = true && this.isSetTe(); boolean that_present_te = true && that.isSetTe(); if (this_present_te || that_present_te) { if (!(this_present_te && that_present_te)) return false; if (!this.te.equals(that.te)) 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); boolean present_ire = true && (isSetIre()); builder.append(present_ire); if (present_ire) builder.append(ire); boolean present_nfe = true && (isSetNfe()); builder.append(present_nfe); if (present_nfe) builder.append(nfe); boolean present_ue = true && (isSetUe()); builder.append(present_ue); if (present_ue) builder.append(ue); boolean present_te = true && (isSetTe()); builder.append(present_te); if (present_te) builder.append(te); return builder.toHashCode(); } public int compareTo(get_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_result typedOther = (get_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; } } lastComparison = Boolean.valueOf(isSetIre()).compareTo(typedOther.isSetIre()); if (lastComparison != 0) { return lastComparison; } if (isSetIre()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ire, typedOther.ire); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetNfe()).compareTo(typedOther.isSetNfe()); if (lastComparison != 0) { return lastComparison; } if (isSetNfe()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nfe, typedOther.nfe); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetUe()).compareTo(typedOther.isSetUe()); if (lastComparison != 0) { return lastComparison; } if (isSetUe()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ue, typedOther.ue); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTe()).compareTo(typedOther.isSetTe()); if (lastComparison != 0) { return lastComparison; } if (isSetTe()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.te, typedOther.te); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 0: // SUCCESS if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.success = new ColumnOrSuperColumn(); this.success.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 1: // IRE if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.ire = new InvalidRequestException(); this.ire.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // NFE if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.nfe = new NotFoundException(); this.nfe.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 3: // UE if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.ue = new UnavailableException(); this.ue.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 4: // TE if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.te = new TimedOutException(); this.te.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); this.success.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetIre()) { oprot.writeFieldBegin(IRE_FIELD_DESC); this.ire.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetNfe()) { oprot.writeFieldBegin(NFE_FIELD_DESC); this.nfe.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetUe()) { oprot.writeFieldBegin(UE_FIELD_DESC); this.ue.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetTe()) { oprot.writeFieldBegin(TE_FIELD_DESC); this.te.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("ire:"); if (this.ire == null) { sb.append("null"); } else { sb.append(this.ire); } first = false; if (!first) sb.append(", "); sb.append("nfe:"); if (this.nfe == null) { sb.append("null"); } else { sb.append(this.nfe); } first = false; if (!first) sb.append(", "); sb.append("ue:"); if (this.ue == null) { sb.append("null"); } else { sb.append(this.ue); } first = false; if (!first) sb.append(", "); sb.append("te:"); if (this.te == null) { sb.append("null"); } else { sb.append(this.te); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields } 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); } } 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); } } } public static class get_slice_args implements org.apache.thrift.TBase<get_slice_args, get_slice_args._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_slice_args"); private static final org.apache.thrift.protocol.TField KEYSPACE_FIELD_DESC = new org.apache.thrift.protocol.TField("keyspace", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField KEY_FIELD_DESC = new org.apache.thrift.protocol.TField("key", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField COLUMN_PARENT_FIELD_DESC = new org.apache.thrift.protocol.TField("column_parent", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final org.apache.thrift.protocol.TField PREDICATE_FIELD_DESC = new org.apache.thrift.protocol.TField("predicate", org.apache.thrift.protocol.TType.STRUCT, (short)4); private static final org.apache.thrift.protocol.TField CONSISTENCY_LEVEL_FIELD_DESC = new org.apache.thrift.protocol.TField("consistency_level", org.apache.thrift.protocol.TType.I32, (short)5); public String keyspace; public String key; public ColumnParent column_parent; public SlicePredicate predicate; /** * * @see ConsistencyLevel */ public ConsistencyLevel consistency_level; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { KEYSPACE((short)1, "keyspace"), KEY((short)2, "key"), COLUMN_PARENT((short)3, "column_parent"), PREDICATE((short)4, "predicate"), /** * * @see ConsistencyLevel */ CONSISTENCY_LEVEL((short)5, "consistency_level"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // KEYSPACE return KEYSPACE; case 2: // KEY return KEY; case 3: // COLUMN_PARENT return COLUMN_PARENT; case 4: // PREDICATE return PREDICATE; case 5: // CONSISTENCY_LEVEL return CONSISTENCY_LEVEL; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.KEYSPACE, new org.apache.thrift.meta_data.FieldMetaData("keyspace", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.KEY, new org.apache.thrift.meta_data.FieldMetaData("key", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.COLUMN_PARENT, new org.apache.thrift.meta_data.FieldMetaData("column_parent", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ColumnParent.class))); tmpMap.put(_Fields.PREDICATE, new org.apache.thrift.meta_data.FieldMetaData("predicate", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SlicePredicate.class))); tmpMap.put(_Fields.CONSISTENCY_LEVEL, new org.apache.thrift.meta_data.FieldMetaData("consistency_level", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ConsistencyLevel.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_slice_args.class, metaDataMap); } public get_slice_args() { this.consistency_level = org.apache.cassandra.thrift.ConsistencyLevel.ONE; } public get_slice_args( String keyspace, String key, ColumnParent column_parent, SlicePredicate predicate, ConsistencyLevel consistency_level) { this(); this.keyspace = keyspace; this.key = key; this.column_parent = column_parent; this.predicate = predicate; this.consistency_level = consistency_level; } /** * Performs a deep copy on <i>other</i>. */ public get_slice_args(get_slice_args other) { if (other.isSetKeyspace()) { this.keyspace = other.keyspace; } if (other.isSetKey()) { this.key = other.key; } if (other.isSetColumn_parent()) { this.column_parent = new ColumnParent(other.column_parent); } if (other.isSetPredicate()) { this.predicate = new SlicePredicate(other.predicate); } if (other.isSetConsistency_level()) { this.consistency_level = other.consistency_level; } } public get_slice_args deepCopy() { return new get_slice_args(this); } @Override public void clear() { this.keyspace = null; this.key = null; this.column_parent = null; this.predicate = null; this.consistency_level = org.apache.cassandra.thrift.ConsistencyLevel.ONE; } public String getKeyspace() { return this.keyspace; } public get_slice_args setKeyspace(String keyspace) { this.keyspace = keyspace; return this; } public void unsetKeyspace() { this.keyspace = null; } /** Returns true if field keyspace is set (has been assigned a value) and false otherwise */ public boolean isSetKeyspace() { return this.keyspace != null; } public void setKeyspaceIsSet(boolean value) { if (!value) { this.keyspace = null; } } public String getKey() { return this.key; } public get_slice_args setKey(String key) { this.key = key; return this; } public void unsetKey() { this.key = null; } /** Returns true if field key is set (has been assigned a value) and false otherwise */ public boolean isSetKey() { return this.key != null; } public void setKeyIsSet(boolean value) { if (!value) { this.key = null; } } public ColumnParent getColumn_parent() { return this.column_parent; } public get_slice_args setColumn_parent(ColumnParent column_parent) { this.column_parent = column_parent; return this; } public void unsetColumn_parent() { this.column_parent = null; } /** Returns true if field column_parent is set (has been assigned a value) and false otherwise */ public boolean isSetColumn_parent() { return this.column_parent != null; } public void setColumn_parentIsSet(boolean value) { if (!value) { this.column_parent = null; } } public SlicePredicate getPredicate() { return this.predicate; } public get_slice_args setPredicate(SlicePredicate predicate) { this.predicate = predicate; return this; } public void unsetPredicate() { this.predicate = null; } /** Returns true if field predicate is set (has been assigned a value) and false otherwise */ public boolean isSetPredicate() { return this.predicate != null; } public void setPredicateIsSet(boolean value) { if (!value) { this.predicate = null; } } /** * * @see ConsistencyLevel */ public ConsistencyLevel getConsistency_level() { return this.consistency_level; } /** * * @see ConsistencyLevel */ public get_slice_args setConsistency_level(ConsistencyLevel consistency_level) { this.consistency_level = consistency_level; return this; } public void unsetConsistency_level() { this.consistency_level = null; } /** Returns true if field consistency_level is set (has been assigned a value) and false otherwise */ public boolean isSetConsistency_level() { return this.consistency_level != null; } public void setConsistency_levelIsSet(boolean value) { if (!value) { this.consistency_level = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case KEYSPACE: if (value == null) { unsetKeyspace(); } else { setKeyspace((String)value); } break; case KEY: if (value == null) { unsetKey(); } else { setKey((String)value); } break; case COLUMN_PARENT: if (value == null) { unsetColumn_parent(); } else { setColumn_parent((ColumnParent)value); } break; case PREDICATE: if (value == null) { unsetPredicate(); } else { setPredicate((SlicePredicate)value); } break; case CONSISTENCY_LEVEL: if (value == null) { unsetConsistency_level(); } else { setConsistency_level((ConsistencyLevel)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case KEYSPACE: return getKeyspace(); case KEY: return getKey(); case COLUMN_PARENT: return getColumn_parent(); case PREDICATE: return getPredicate(); case CONSISTENCY_LEVEL: return getConsistency_level(); } throw new IllegalStateException(); } /** 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 KEYSPACE: return isSetKeyspace(); case KEY: return isSetKey(); case COLUMN_PARENT: return isSetColumn_parent(); case PREDICATE: return isSetPredicate(); case CONSISTENCY_LEVEL: return isSetConsistency_level(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_slice_args) return this.equals((get_slice_args)that); return false; } public boolean equals(get_slice_args that) { if (that == null) return false; boolean this_present_keyspace = true && this.isSetKeyspace(); boolean that_present_keyspace = true && that.isSetKeyspace(); if (this_present_keyspace || that_present_keyspace) { if (!(this_present_keyspace && that_present_keyspace)) return false; if (!this.keyspace.equals(that.keyspace)) return false; } boolean this_present_key = true && this.isSetKey(); boolean that_present_key = true && that.isSetKey(); if (this_present_key || that_present_key) { if (!(this_present_key && that_present_key)) return false; if (!this.key.equals(that.key)) return false; } boolean this_present_column_parent = true && this.isSetColumn_parent(); boolean that_present_column_parent = true && that.isSetColumn_parent(); if (this_present_column_parent || that_present_column_parent) { if (!(this_present_column_parent && that_present_column_parent)) return false; if (!this.column_parent.equals(that.column_parent)) return false; } boolean this_present_predicate = true && this.isSetPredicate(); boolean that_present_predicate = true && that.isSetPredicate(); if (this_present_predicate || that_present_predicate) { if (!(this_present_predicate && that_present_predicate)) return false; if (!this.predicate.equals(that.predicate)) return false; } boolean this_present_consistency_level = true && this.isSetConsistency_level(); boolean that_present_consistency_level = true && that.isSetConsistency_level(); if (this_present_consistency_level || that_present_consistency_level) { if (!(this_present_consistency_level && that_present_consistency_level)) return false; if (!this.consistency_level.equals(that.consistency_level)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_keyspace = true && (isSetKeyspace()); builder.append(present_keyspace); if (present_keyspace) builder.append(keyspace); boolean present_key = true && (isSetKey()); builder.append(present_key); if (present_key) builder.append(key); boolean present_column_parent = true && (isSetColumn_parent()); builder.append(present_column_parent); if (present_column_parent) builder.append(column_parent); boolean present_predicate = true && (isSetPredicate()); builder.append(present_predicate); if (present_predicate) builder.append(predicate); boolean present_consistency_level = true && (isSetConsistency_level()); builder.append(present_consistency_level); if (present_consistency_level) builder.append(consistency_level.getValue()); return builder.toHashCode(); } public int compareTo(get_slice_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_slice_args typedOther = (get_slice_args)other; lastComparison = Boolean.valueOf(isSetKeyspace()).compareTo(typedOther.isSetKeyspace()); if (lastComparison != 0) { return lastComparison; } if (isSetKeyspace()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.keyspace, typedOther.keyspace); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetKey()).compareTo(typedOther.isSetKey()); if (lastComparison != 0) { return lastComparison; } if (isSetKey()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.key, typedOther.key); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetColumn_parent()).compareTo(typedOther.isSetColumn_parent()); if (lastComparison != 0) { return lastComparison; } if (isSetColumn_parent()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.column_parent, typedOther.column_parent); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPredicate()).compareTo(typedOther.isSetPredicate()); if (lastComparison != 0) { return lastComparison; } if (isSetPredicate()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.predicate, typedOther.predicate); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetConsistency_level()).compareTo(typedOther.isSetConsistency_level()); if (lastComparison != 0) { return lastComparison; } if (isSetConsistency_level()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.consistency_level, typedOther.consistency_level); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // KEYSPACE if (field.type == org.apache.thrift.protocol.TType.STRING) { this.keyspace = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // KEY if (field.type == org.apache.thrift.protocol.TType.STRING) { this.key = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 3: // COLUMN_PARENT if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.column_parent = new ColumnParent(); this.column_parent.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 4: // PREDICATE if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.predicate = new SlicePredicate(); this.predicate.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 5: // CONSISTENCY_LEVEL if (field.type == org.apache.thrift.protocol.TType.I32) { this.consistency_level = ConsistencyLevel.findByValue(iprot.readI32()); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.keyspace != null) { oprot.writeFieldBegin(KEYSPACE_FIELD_DESC); oprot.writeString(this.keyspace); oprot.writeFieldEnd(); } if (this.key != null) { oprot.writeFieldBegin(KEY_FIELD_DESC); oprot.writeString(this.key); oprot.writeFieldEnd(); } if (this.column_parent != null) { oprot.writeFieldBegin(COLUMN_PARENT_FIELD_DESC); this.column_parent.write(oprot); oprot.writeFieldEnd(); } if (this.predicate != null) { oprot.writeFieldBegin(PREDICATE_FIELD_DESC); this.predicate.write(oprot); oprot.writeFieldEnd(); } if (this.consistency_level != null) { oprot.writeFieldBegin(CONSISTENCY_LEVEL_FIELD_DESC); oprot.writeI32(this.consistency_level.getValue()); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_slice_args("); boolean first = true; sb.append("keyspace:"); if (this.keyspace == null) { sb.append("null"); } else { sb.append(this.keyspace); } first = false; if (!first) sb.append(", "); sb.append("key:"); if (this.key == null) { sb.append("null"); } else { sb.append(this.key); } first = false; if (!first) sb.append(", "); sb.append("column_parent:"); if (this.column_parent == null) { sb.append("null"); } else { sb.append(this.column_parent); } first = false; if (!first) sb.append(", "); sb.append("predicate:"); if (this.predicate == null) { sb.append("null"); } else { sb.append(this.predicate); } first = false; if (!first) sb.append(", "); sb.append("consistency_level:"); if (this.consistency_level == null) { sb.append("null"); } else { sb.append(this.consistency_level); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields if (keyspace == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'keyspace' was not present! Struct: " + toString()); } if (key == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'key' was not present! Struct: " + toString()); } if (column_parent == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'column_parent' was not present! Struct: " + toString()); } if (predicate == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'predicate' was not present! Struct: " + toString()); } if (consistency_level == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'consistency_level' was not present! Struct: " + toString()); } } 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); } } 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); } } } public static class get_slice_result implements org.apache.thrift.TBase<get_slice_result, get_slice_result._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_slice_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final org.apache.thrift.protocol.TField IRE_FIELD_DESC = new org.apache.thrift.protocol.TField("ire", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField UE_FIELD_DESC = new org.apache.thrift.protocol.TField("ue", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField TE_FIELD_DESC = new org.apache.thrift.protocol.TField("te", org.apache.thrift.protocol.TType.STRUCT, (short)3); public List<ColumnOrSuperColumn> success; public InvalidRequestException ire; public UnavailableException ue; public TimedOutException te; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), IRE((short)1, "ire"), UE((short)2, "ue"), TE((short)3, "te"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // IRE return IRE; case 2: // UE return UE; case 3: // TE return TE; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ColumnOrSuperColumn.class)))); tmpMap.put(_Fields.IRE, new org.apache.thrift.meta_data.FieldMetaData("ire", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.UE, new org.apache.thrift.meta_data.FieldMetaData("ue", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.TE, new org.apache.thrift.meta_data.FieldMetaData("te", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_slice_result.class, metaDataMap); } public get_slice_result() { } public get_slice_result( List<ColumnOrSuperColumn> success, InvalidRequestException ire, UnavailableException ue, TimedOutException te) { this(); this.success = success; this.ire = ire; this.ue = ue; this.te = te; } /** * Performs a deep copy on <i>other</i>. */ public get_slice_result(get_slice_result other) { if (other.isSetSuccess()) { List<ColumnOrSuperColumn> __this__success = new ArrayList<ColumnOrSuperColumn>(); for (ColumnOrSuperColumn other_element : other.success) { __this__success.add(new ColumnOrSuperColumn(other_element)); } this.success = __this__success; } if (other.isSetIre()) { this.ire = new InvalidRequestException(other.ire); } if (other.isSetUe()) { this.ue = new UnavailableException(other.ue); } if (other.isSetTe()) { this.te = new TimedOutException(other.te); } } public get_slice_result deepCopy() { return new get_slice_result(this); } @Override public void clear() { this.success = null; this.ire = null; this.ue = null; this.te = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } public java.util.Iterator<ColumnOrSuperColumn> getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(ColumnOrSuperColumn elem) { if (this.success == null) { this.success = new ArrayList<ColumnOrSuperColumn>(); } this.success.add(elem); } public List<ColumnOrSuperColumn> getSuccess() { return this.success; } public get_slice_result setSuccess(List<ColumnOrSuperColumn> success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } public InvalidRequestException getIre() { return this.ire; } public get_slice_result setIre(InvalidRequestException ire) { this.ire = ire; return this; } public void unsetIre() { this.ire = null; } /** Returns true if field ire is set (has been assigned a value) and false otherwise */ public boolean isSetIre() { return this.ire != null; } public void setIreIsSet(boolean value) { if (!value) { this.ire = null; } } public UnavailableException getUe() { return this.ue; } public get_slice_result setUe(UnavailableException ue) { this.ue = ue; return this; } public void unsetUe() { this.ue = null; } /** Returns true if field ue is set (has been assigned a value) and false otherwise */ public boolean isSetUe() { return this.ue != null; } public void setUeIsSet(boolean value) { if (!value) { this.ue = null; } } public TimedOutException getTe() { return this.te; } public get_slice_result setTe(TimedOutException te) { this.te = te; return this; } public void unsetTe() { this.te = null; } /** Returns true if field te is set (has been assigned a value) and false otherwise */ public boolean isSetTe() { return this.te != null; } public void setTeIsSet(boolean value) { if (!value) { this.te = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((List<ColumnOrSuperColumn>)value); } break; case IRE: if (value == null) { unsetIre(); } else { setIre((InvalidRequestException)value); } break; case UE: if (value == null) { unsetUe(); } else { setUe((UnavailableException)value); } break; case TE: if (value == null) { unsetTe(); } else { setTe((TimedOutException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case IRE: return getIre(); case UE: return getUe(); case TE: return getTe(); } throw new IllegalStateException(); } /** 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(); case IRE: return isSetIre(); case UE: return isSetUe(); case TE: return isSetTe(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_slice_result) return this.equals((get_slice_result)that); return false; } public boolean equals(get_slice_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; } boolean this_present_ire = true && this.isSetIre(); boolean that_present_ire = true && that.isSetIre(); if (this_present_ire || that_present_ire) { if (!(this_present_ire && that_present_ire)) return false; if (!this.ire.equals(that.ire)) return false; } boolean this_present_ue = true && this.isSetUe(); boolean that_present_ue = true && that.isSetUe(); if (this_present_ue || that_present_ue) { if (!(this_present_ue && that_present_ue)) return false; if (!this.ue.equals(that.ue)) return false; } boolean this_present_te = true && this.isSetTe(); boolean that_present_te = true && that.isSetTe(); if (this_present_te || that_present_te) { if (!(this_present_te && that_present_te)) return false; if (!this.te.equals(that.te)) 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); boolean present_ire = true && (isSetIre()); builder.append(present_ire); if (present_ire) builder.append(ire); boolean present_ue = true && (isSetUe()); builder.append(present_ue); if (present_ue) builder.append(ue); boolean present_te = true && (isSetTe()); builder.append(present_te); if (present_te) builder.append(te); return builder.toHashCode(); } public int compareTo(get_slice_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_slice_result typedOther = (get_slice_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; } } lastComparison = Boolean.valueOf(isSetIre()).compareTo(typedOther.isSetIre()); if (lastComparison != 0) { return lastComparison; } if (isSetIre()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ire, typedOther.ire); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetUe()).compareTo(typedOther.isSetUe()); if (lastComparison != 0) { return lastComparison; } if (isSetUe()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ue, typedOther.ue); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTe()).compareTo(typedOther.isSetTe()); if (lastComparison != 0) { return lastComparison; } if (isSetTe()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.te, typedOther.te); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 0: // SUCCESS if (field.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list21 = iprot.readListBegin(); this.success = new ArrayList<ColumnOrSuperColumn>(_list21.size); for (int _i22 = 0; _i22 < _list21.size; ++_i22) { ColumnOrSuperColumn _elem23; _elem23 = new ColumnOrSuperColumn(); _elem23.read(iprot); this.success.add(_elem23); } iprot.readListEnd(); } } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 1: // IRE if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.ire = new InvalidRequestException(); this.ire.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // UE if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.ue = new UnavailableException(); this.ue.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 3: // TE if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.te = new TimedOutException(); this.te.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size())); for (ColumnOrSuperColumn _iter24 : this.success) { _iter24.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } else if (this.isSetIre()) { oprot.writeFieldBegin(IRE_FIELD_DESC); this.ire.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetUe()) { oprot.writeFieldBegin(UE_FIELD_DESC); this.ue.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetTe()) { oprot.writeFieldBegin(TE_FIELD_DESC); this.te.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_slice_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("ire:"); if (this.ire == null) { sb.append("null"); } else { sb.append(this.ire); } first = false; if (!first) sb.append(", "); sb.append("ue:"); if (this.ue == null) { sb.append("null"); } else { sb.append(this.ue); } first = false; if (!first) sb.append(", "); sb.append("te:"); if (this.te == null) { sb.append("null"); } else { sb.append(this.te); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields } 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); } } 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); } } } public static class multiget_args implements org.apache.thrift.TBase<multiget_args, multiget_args._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("multiget_args"); private static final org.apache.thrift.protocol.TField KEYSPACE_FIELD_DESC = new org.apache.thrift.protocol.TField("keyspace", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField KEYS_FIELD_DESC = new org.apache.thrift.protocol.TField("keys", org.apache.thrift.protocol.TType.LIST, (short)2); private static final org.apache.thrift.protocol.TField COLUMN_PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("column_path", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final org.apache.thrift.protocol.TField CONSISTENCY_LEVEL_FIELD_DESC = new org.apache.thrift.protocol.TField("consistency_level", org.apache.thrift.protocol.TType.I32, (short)4); public String keyspace; public List<String> keys; public ColumnPath column_path; /** * * @see ConsistencyLevel */ public ConsistencyLevel consistency_level; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { KEYSPACE((short)1, "keyspace"), KEYS((short)2, "keys"), COLUMN_PATH((short)3, "column_path"), /** * * @see ConsistencyLevel */ CONSISTENCY_LEVEL((short)4, "consistency_level"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // KEYSPACE return KEYSPACE; case 2: // KEYS return KEYS; case 3: // COLUMN_PATH return COLUMN_PATH; case 4: // CONSISTENCY_LEVEL return CONSISTENCY_LEVEL; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.KEYSPACE, new org.apache.thrift.meta_data.FieldMetaData("keyspace", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.KEYS, new org.apache.thrift.meta_data.FieldMetaData("keys", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); tmpMap.put(_Fields.COLUMN_PATH, new org.apache.thrift.meta_data.FieldMetaData("column_path", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ColumnPath.class))); tmpMap.put(_Fields.CONSISTENCY_LEVEL, new org.apache.thrift.meta_data.FieldMetaData("consistency_level", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ConsistencyLevel.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(multiget_args.class, metaDataMap); } public multiget_args() { this.consistency_level = org.apache.cassandra.thrift.ConsistencyLevel.ONE; } public multiget_args( String keyspace, List<String> keys, ColumnPath column_path, ConsistencyLevel consistency_level) { this(); this.keyspace = keyspace; this.keys = keys; this.column_path = column_path; this.consistency_level = consistency_level; } /** * Performs a deep copy on <i>other</i>. */ public multiget_args(multiget_args other) { if (other.isSetKeyspace()) { this.keyspace = other.keyspace; } if (other.isSetKeys()) { List<String> __this__keys = new ArrayList<String>(); for (String other_element : other.keys) { __this__keys.add(other_element); } this.keys = __this__keys; } if (other.isSetColumn_path()) { this.column_path = new ColumnPath(other.column_path); } if (other.isSetConsistency_level()) { this.consistency_level = other.consistency_level; } } public multiget_args deepCopy() { return new multiget_args(this); } @Override public void clear() { this.keyspace = null; this.keys = null; this.column_path = null; this.consistency_level = org.apache.cassandra.thrift.ConsistencyLevel.ONE; } public String getKeyspace() { return this.keyspace; } public multiget_args setKeyspace(String keyspace) { this.keyspace = keyspace; return this; } public void unsetKeyspace() { this.keyspace = null; } /** Returns true if field keyspace is set (has been assigned a value) and false otherwise */ public boolean isSetKeyspace() { return this.keyspace != null; } public void setKeyspaceIsSet(boolean value) { if (!value) { this.keyspace = null; } } public int getKeysSize() { return (this.keys == null) ? 0 : this.keys.size(); } public java.util.Iterator<String> getKeysIterator() { return (this.keys == null) ? null : this.keys.iterator(); } public void addToKeys(String elem) { if (this.keys == null) { this.keys = new ArrayList<String>(); } this.keys.add(elem); } public List<String> getKeys() { return this.keys; } public multiget_args setKeys(List<String> keys) { this.keys = keys; return this; } public void unsetKeys() { this.keys = null; } /** Returns true if field keys is set (has been assigned a value) and false otherwise */ public boolean isSetKeys() { return this.keys != null; } public void setKeysIsSet(boolean value) { if (!value) { this.keys = null; } } public ColumnPath getColumn_path() { return this.column_path; } public multiget_args setColumn_path(ColumnPath column_path) { this.column_path = column_path; return this; } public void unsetColumn_path() { this.column_path = null; } /** Returns true if field column_path is set (has been assigned a value) and false otherwise */ public boolean isSetColumn_path() { return this.column_path != null; } public void setColumn_pathIsSet(boolean value) { if (!value) { this.column_path = null; } } /** * * @see ConsistencyLevel */ public ConsistencyLevel getConsistency_level() { return this.consistency_level; } /** * * @see ConsistencyLevel */ public multiget_args setConsistency_level(ConsistencyLevel consistency_level) { this.consistency_level = consistency_level; return this; } public void unsetConsistency_level() { this.consistency_level = null; } /** Returns true if field consistency_level is set (has been assigned a value) and false otherwise */ public boolean isSetConsistency_level() { return this.consistency_level != null; } public void setConsistency_levelIsSet(boolean value) { if (!value) { this.consistency_level = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case KEYSPACE: if (value == null) { unsetKeyspace(); } else { setKeyspace((String)value); } break; case KEYS: if (value == null) { unsetKeys(); } else { setKeys((List<String>)value); } break; case COLUMN_PATH: if (value == null) { unsetColumn_path(); } else { setColumn_path((ColumnPath)value); } break; case CONSISTENCY_LEVEL: if (value == null) { unsetConsistency_level(); } else { setConsistency_level((ConsistencyLevel)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case KEYSPACE: return getKeyspace(); case KEYS: return getKeys(); case COLUMN_PATH: return getColumn_path(); case CONSISTENCY_LEVEL: return getConsistency_level(); } throw new IllegalStateException(); } /** 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 KEYSPACE: return isSetKeyspace(); case KEYS: return isSetKeys(); case COLUMN_PATH: return isSetColumn_path(); case CONSISTENCY_LEVEL: return isSetConsistency_level(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof multiget_args) return this.equals((multiget_args)that); return false; } public boolean equals(multiget_args that) { if (that == null) return false; boolean this_present_keyspace = true && this.isSetKeyspace(); boolean that_present_keyspace = true && that.isSetKeyspace(); if (this_present_keyspace || that_present_keyspace) { if (!(this_present_keyspace && that_present_keyspace)) return false; if (!this.keyspace.equals(that.keyspace)) return false; } boolean this_present_keys = true && this.isSetKeys(); boolean that_present_keys = true && that.isSetKeys(); if (this_present_keys || that_present_keys) { if (!(this_present_keys && that_present_keys)) return false; if (!this.keys.equals(that.keys)) return false; } boolean this_present_column_path = true && this.isSetColumn_path(); boolean that_present_column_path = true && that.isSetColumn_path(); if (this_present_column_path || that_present_column_path) { if (!(this_present_column_path && that_present_column_path)) return false; if (!this.column_path.equals(that.column_path)) return false; } boolean this_present_consistency_level = true && this.isSetConsistency_level(); boolean that_present_consistency_level = true && that.isSetConsistency_level(); if (this_present_consistency_level || that_present_consistency_level) { if (!(this_present_consistency_level && that_present_consistency_level)) return false; if (!this.consistency_level.equals(that.consistency_level)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_keyspace = true && (isSetKeyspace()); builder.append(present_keyspace); if (present_keyspace) builder.append(keyspace); boolean present_keys = true && (isSetKeys()); builder.append(present_keys); if (present_keys) builder.append(keys); boolean present_column_path = true && (isSetColumn_path()); builder.append(present_column_path); if (present_column_path) builder.append(column_path); boolean present_consistency_level = true && (isSetConsistency_level()); builder.append(present_consistency_level); if (present_consistency_level) builder.append(consistency_level.getValue()); return builder.toHashCode(); } public int compareTo(multiget_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; multiget_args typedOther = (multiget_args)other; lastComparison = Boolean.valueOf(isSetKeyspace()).compareTo(typedOther.isSetKeyspace()); if (lastComparison != 0) { return lastComparison; } if (isSetKeyspace()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.keyspace, typedOther.keyspace); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetKeys()).compareTo(typedOther.isSetKeys()); if (lastComparison != 0) { return lastComparison; } if (isSetKeys()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.keys, typedOther.keys); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetColumn_path()).compareTo(typedOther.isSetColumn_path()); if (lastComparison != 0) { return lastComparison; } if (isSetColumn_path()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.column_path, typedOther.column_path); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetConsistency_level()).compareTo(typedOther.isSetConsistency_level()); if (lastComparison != 0) { return lastComparison; } if (isSetConsistency_level()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.consistency_level, typedOther.consistency_level); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // KEYSPACE if (field.type == org.apache.thrift.protocol.TType.STRING) { this.keyspace = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // KEYS if (field.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list25 = iprot.readListBegin(); this.keys = new ArrayList<String>(_list25.size); for (int _i26 = 0; _i26 < _list25.size; ++_i26) { String _elem27; _elem27 = iprot.readString(); this.keys.add(_elem27); } iprot.readListEnd(); } } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 3: // COLUMN_PATH if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.column_path = new ColumnPath(); this.column_path.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 4: // CONSISTENCY_LEVEL if (field.type == org.apache.thrift.protocol.TType.I32) { this.consistency_level = ConsistencyLevel.findByValue(iprot.readI32()); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.keyspace != null) { oprot.writeFieldBegin(KEYSPACE_FIELD_DESC); oprot.writeString(this.keyspace); oprot.writeFieldEnd(); } if (this.keys != null) { oprot.writeFieldBegin(KEYS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.keys.size())); for (String _iter28 : this.keys) { oprot.writeString(_iter28); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (this.column_path != null) { oprot.writeFieldBegin(COLUMN_PATH_FIELD_DESC); this.column_path.write(oprot); oprot.writeFieldEnd(); } if (this.consistency_level != null) { oprot.writeFieldBegin(CONSISTENCY_LEVEL_FIELD_DESC); oprot.writeI32(this.consistency_level.getValue()); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("multiget_args("); boolean first = true; sb.append("keyspace:"); if (this.keyspace == null) { sb.append("null"); } else { sb.append(this.keyspace); } first = false; if (!first) sb.append(", "); sb.append("keys:"); if (this.keys == null) { sb.append("null"); } else { sb.append(this.keys); } first = false; if (!first) sb.append(", "); sb.append("column_path:"); if (this.column_path == null) { sb.append("null"); } else { sb.append(this.column_path); } first = false; if (!first) sb.append(", "); sb.append("consistency_level:"); if (this.consistency_level == null) { sb.append("null"); } else { sb.append(this.consistency_level); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields if (keyspace == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'keyspace' was not present! Struct: " + toString()); } if (keys == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'keys' was not present! Struct: " + toString()); } if (column_path == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'column_path' was not present! Struct: " + toString()); } if (consistency_level == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'consistency_level' was not present! Struct: " + toString()); } } 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); } } 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); } } } public static class multiget_result implements org.apache.thrift.TBase<multiget_result, multiget_result._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("multiget_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.MAP, (short)0); private static final org.apache.thrift.protocol.TField IRE_FIELD_DESC = new org.apache.thrift.protocol.TField("ire", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField UE_FIELD_DESC = new org.apache.thrift.protocol.TField("ue", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField TE_FIELD_DESC = new org.apache.thrift.protocol.TField("te", org.apache.thrift.protocol.TType.STRUCT, (short)3); public Map<String,ColumnOrSuperColumn> success; public InvalidRequestException ire; public UnavailableException ue; public TimedOutException te; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), IRE((short)1, "ire"), UE((short)2, "ue"), TE((short)3, "te"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // IRE return IRE; case 2: // UE return UE; case 3: // TE return TE; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ColumnOrSuperColumn.class)))); tmpMap.put(_Fields.IRE, new org.apache.thrift.meta_data.FieldMetaData("ire", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.UE, new org.apache.thrift.meta_data.FieldMetaData("ue", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.TE, new org.apache.thrift.meta_data.FieldMetaData("te", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(multiget_result.class, metaDataMap); } public multiget_result() { } public multiget_result( Map<String,ColumnOrSuperColumn> success, InvalidRequestException ire, UnavailableException ue, TimedOutException te) { this(); this.success = success; this.ire = ire; this.ue = ue; this.te = te; } /** * Performs a deep copy on <i>other</i>. */ public multiget_result(multiget_result other) { if (other.isSetSuccess()) { Map<String,ColumnOrSuperColumn> __this__success = new HashMap<String,ColumnOrSuperColumn>(); for (Map.Entry<String, ColumnOrSuperColumn> other_element : other.success.entrySet()) { String other_element_key = other_element.getKey(); ColumnOrSuperColumn other_element_value = other_element.getValue(); String __this__success_copy_key = other_element_key; ColumnOrSuperColumn __this__success_copy_value = new ColumnOrSuperColumn(other_element_value); __this__success.put(__this__success_copy_key, __this__success_copy_value); } this.success = __this__success; } if (other.isSetIre()) { this.ire = new InvalidRequestException(other.ire); } if (other.isSetUe()) { this.ue = new UnavailableException(other.ue); } if (other.isSetTe()) { this.te = new TimedOutException(other.te); } } public multiget_result deepCopy() { return new multiget_result(this); } @Override public void clear() { this.success = null; this.ire = null; this.ue = null; this.te = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } public void putToSuccess(String key, ColumnOrSuperColumn val) { if (this.success == null) { this.success = new HashMap<String,ColumnOrSuperColumn>(); } this.success.put(key, val); } public Map<String,ColumnOrSuperColumn> getSuccess() { return this.success; } public multiget_result setSuccess(Map<String,ColumnOrSuperColumn> success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } public InvalidRequestException getIre() { return this.ire; } public multiget_result setIre(InvalidRequestException ire) { this.ire = ire; return this; } public void unsetIre() { this.ire = null; } /** Returns true if field ire is set (has been assigned a value) and false otherwise */ public boolean isSetIre() { return this.ire != null; } public void setIreIsSet(boolean value) { if (!value) { this.ire = null; } } public UnavailableException getUe() { return this.ue; } public multiget_result setUe(UnavailableException ue) { this.ue = ue; return this; } public void unsetUe() { this.ue = null; } /** Returns true if field ue is set (has been assigned a value) and false otherwise */ public boolean isSetUe() { return this.ue != null; } public void setUeIsSet(boolean value) { if (!value) { this.ue = null; } } public TimedOutException getTe() { return this.te; } public multiget_result setTe(TimedOutException te) { this.te = te; return this; } public void unsetTe() { this.te = null; } /** Returns true if field te is set (has been assigned a value) and false otherwise */ public boolean isSetTe() { return this.te != null; } public void setTeIsSet(boolean value) { if (!value) { this.te = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((Map<String,ColumnOrSuperColumn>)value); } break; case IRE: if (value == null) { unsetIre(); } else { setIre((InvalidRequestException)value); } break; case UE: if (value == null) { unsetUe(); } else { setUe((UnavailableException)value); } break; case TE: if (value == null) { unsetTe(); } else { setTe((TimedOutException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case IRE: return getIre(); case UE: return getUe(); case TE: return getTe(); } throw new IllegalStateException(); } /** 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(); case IRE: return isSetIre(); case UE: return isSetUe(); case TE: return isSetTe(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof multiget_result) return this.equals((multiget_result)that); return false; } public boolean equals(multiget_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; } boolean this_present_ire = true && this.isSetIre(); boolean that_present_ire = true && that.isSetIre(); if (this_present_ire || that_present_ire) { if (!(this_present_ire && that_present_ire)) return false; if (!this.ire.equals(that.ire)) return false; } boolean this_present_ue = true && this.isSetUe(); boolean that_present_ue = true && that.isSetUe(); if (this_present_ue || that_present_ue) { if (!(this_present_ue && that_present_ue)) return false; if (!this.ue.equals(that.ue)) return false; } boolean this_present_te = true && this.isSetTe(); boolean that_present_te = true && that.isSetTe(); if (this_present_te || that_present_te) { if (!(this_present_te && that_present_te)) return false; if (!this.te.equals(that.te)) 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); boolean present_ire = true && (isSetIre()); builder.append(present_ire); if (present_ire) builder.append(ire); boolean present_ue = true && (isSetUe()); builder.append(present_ue); if (present_ue) builder.append(ue); boolean present_te = true && (isSetTe()); builder.append(present_te); if (present_te) builder.append(te); return builder.toHashCode(); } public int compareTo(multiget_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; multiget_result typedOther = (multiget_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; } } lastComparison = Boolean.valueOf(isSetIre()).compareTo(typedOther.isSetIre()); if (lastComparison != 0) { return lastComparison; } if (isSetIre()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ire, typedOther.ire); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetUe()).compareTo(typedOther.isSetUe()); if (lastComparison != 0) { return lastComparison; } if (isSetUe()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ue, typedOther.ue); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTe()).compareTo(typedOther.isSetTe()); if (lastComparison != 0) { return lastComparison; } if (isSetTe()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.te, typedOther.te); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 0: // SUCCESS if (field.type == org.apache.thrift.protocol.TType.MAP) { { org.apache.thrift.protocol.TMap _map29 = iprot.readMapBegin(); this.success = new HashMap<String,ColumnOrSuperColumn>(2*_map29.size); for (int _i30 = 0; _i30 < _map29.size; ++_i30) { String _key31; ColumnOrSuperColumn _val32; _key31 = iprot.readString(); _val32 = new ColumnOrSuperColumn(); _val32.read(iprot); this.success.put(_key31, _val32); } iprot.readMapEnd(); } } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 1: // IRE if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.ire = new InvalidRequestException(); this.ire.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // UE if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.ue = new UnavailableException(); this.ue.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 3: // TE if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.te = new TimedOutException(); this.te.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, this.success.size())); for (Map.Entry<String, ColumnOrSuperColumn> _iter33 : this.success.entrySet()) { oprot.writeString(_iter33.getKey()); _iter33.getValue().write(oprot); } oprot.writeMapEnd(); } oprot.writeFieldEnd(); } else if (this.isSetIre()) { oprot.writeFieldBegin(IRE_FIELD_DESC); this.ire.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetUe()) { oprot.writeFieldBegin(UE_FIELD_DESC); this.ue.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetTe()) { oprot.writeFieldBegin(TE_FIELD_DESC); this.te.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("multiget_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("ire:"); if (this.ire == null) { sb.append("null"); } else { sb.append(this.ire); } first = false; if (!first) sb.append(", "); sb.append("ue:"); if (this.ue == null) { sb.append("null"); } else { sb.append(this.ue); } first = false; if (!first) sb.append(", "); sb.append("te:"); if (this.te == null) { sb.append("null"); } else { sb.append(this.te); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields } 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); } } 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); } } } public static class multiget_slice_args implements org.apache.thrift.TBase<multiget_slice_args, multiget_slice_args._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("multiget_slice_args"); private static final org.apache.thrift.protocol.TField KEYSPACE_FIELD_DESC = new org.apache.thrift.protocol.TField("keyspace", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField KEYS_FIELD_DESC = new org.apache.thrift.protocol.TField("keys", org.apache.thrift.protocol.TType.LIST, (short)2); private static final org.apache.thrift.protocol.TField COLUMN_PARENT_FIELD_DESC = new org.apache.thrift.protocol.TField("column_parent", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final org.apache.thrift.protocol.TField PREDICATE_FIELD_DESC = new org.apache.thrift.protocol.TField("predicate", org.apache.thrift.protocol.TType.STRUCT, (short)4); private static final org.apache.thrift.protocol.TField CONSISTENCY_LEVEL_FIELD_DESC = new org.apache.thrift.protocol.TField("consistency_level", org.apache.thrift.protocol.TType.I32, (short)5); public String keyspace; public List<String> keys; public ColumnParent column_parent; public SlicePredicate predicate; /** * * @see ConsistencyLevel */ public ConsistencyLevel consistency_level; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { KEYSPACE((short)1, "keyspace"), KEYS((short)2, "keys"), COLUMN_PARENT((short)3, "column_parent"), PREDICATE((short)4, "predicate"), /** * * @see ConsistencyLevel */ CONSISTENCY_LEVEL((short)5, "consistency_level"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // KEYSPACE return KEYSPACE; case 2: // KEYS return KEYS; case 3: // COLUMN_PARENT return COLUMN_PARENT; case 4: // PREDICATE return PREDICATE; case 5: // CONSISTENCY_LEVEL return CONSISTENCY_LEVEL; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.KEYSPACE, new org.apache.thrift.meta_data.FieldMetaData("keyspace", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.KEYS, new org.apache.thrift.meta_data.FieldMetaData("keys", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); tmpMap.put(_Fields.COLUMN_PARENT, new org.apache.thrift.meta_data.FieldMetaData("column_parent", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ColumnParent.class))); tmpMap.put(_Fields.PREDICATE, new org.apache.thrift.meta_data.FieldMetaData("predicate", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SlicePredicate.class))); tmpMap.put(_Fields.CONSISTENCY_LEVEL, new org.apache.thrift.meta_data.FieldMetaData("consistency_level", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ConsistencyLevel.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(multiget_slice_args.class, metaDataMap); } public multiget_slice_args() { this.consistency_level = org.apache.cassandra.thrift.ConsistencyLevel.ONE; } public multiget_slice_args( String keyspace, List<String> keys, ColumnParent column_parent, SlicePredicate predicate, ConsistencyLevel consistency_level) { this(); this.keyspace = keyspace; this.keys = keys; this.column_parent = column_parent; this.predicate = predicate; this.consistency_level = consistency_level; } /** * Performs a deep copy on <i>other</i>. */ public multiget_slice_args(multiget_slice_args other) { if (other.isSetKeyspace()) { this.keyspace = other.keyspace; } if (other.isSetKeys()) { List<String> __this__keys = new ArrayList<String>(); for (String other_element : other.keys) { __this__keys.add(other_element); } this.keys = __this__keys; } if (other.isSetColumn_parent()) { this.column_parent = new ColumnParent(other.column_parent); } if (other.isSetPredicate()) { this.predicate = new SlicePredicate(other.predicate); } if (other.isSetConsistency_level()) { this.consistency_level = other.consistency_level; } } public multiget_slice_args deepCopy() { return new multiget_slice_args(this); } @Override public void clear() { this.keyspace = null; this.keys = null; this.column_parent = null; this.predicate = null; this.consistency_level = org.apache.cassandra.thrift.ConsistencyLevel.ONE; } public String getKeyspace() { return this.keyspace; } public multiget_slice_args setKeyspace(String keyspace) { this.keyspace = keyspace; return this; } public void unsetKeyspace() { this.keyspace = null; } /** Returns true if field keyspace is set (has been assigned a value) and false otherwise */ public boolean isSetKeyspace() { return this.keyspace != null; } public void setKeyspaceIsSet(boolean value) { if (!value) { this.keyspace = null; } } public int getKeysSize() { return (this.keys == null) ? 0 : this.keys.size(); } public java.util.Iterator<String> getKeysIterator() { return (this.keys == null) ? null : this.keys.iterator(); } public void addToKeys(String elem) { if (this.keys == null) { this.keys = new ArrayList<String>(); } this.keys.add(elem); } public List<String> getKeys() { return this.keys; } public multiget_slice_args setKeys(List<String> keys) { this.keys = keys; return this; } public void unsetKeys() { this.keys = null; } /** Returns true if field keys is set (has been assigned a value) and false otherwise */ public boolean isSetKeys() { return this.keys != null; } public void setKeysIsSet(boolean value) { if (!value) { this.keys = null; } } public ColumnParent getColumn_parent() { return this.column_parent; } public multiget_slice_args setColumn_parent(ColumnParent column_parent) { this.column_parent = column_parent; return this; } public void unsetColumn_parent() { this.column_parent = null; } /** Returns true if field column_parent is set (has been assigned a value) and false otherwise */ public boolean isSetColumn_parent() { return this.column_parent != null; } public void setColumn_parentIsSet(boolean value) { if (!value) { this.column_parent = null; } } public SlicePredicate getPredicate() { return this.predicate; } public multiget_slice_args setPredicate(SlicePredicate predicate) { this.predicate = predicate; return this; } public void unsetPredicate() { this.predicate = null; } /** Returns true if field predicate is set (has been assigned a value) and false otherwise */ public boolean isSetPredicate() { return this.predicate != null; } public void setPredicateIsSet(boolean value) { if (!value) { this.predicate = null; } } /** * * @see ConsistencyLevel */ public ConsistencyLevel getConsistency_level() { return this.consistency_level; } /** * * @see ConsistencyLevel */ public multiget_slice_args setConsistency_level(ConsistencyLevel consistency_level) { this.consistency_level = consistency_level; return this; } public void unsetConsistency_level() { this.consistency_level = null; } /** Returns true if field consistency_level is set (has been assigned a value) and false otherwise */ public boolean isSetConsistency_level() { return this.consistency_level != null; } public void setConsistency_levelIsSet(boolean value) { if (!value) { this.consistency_level = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case KEYSPACE: if (value == null) { unsetKeyspace(); } else { setKeyspace((String)value); } break; case KEYS: if (value == null) { unsetKeys(); } else { setKeys((List<String>)value); } break; case COLUMN_PARENT: if (value == null) { unsetColumn_parent(); } else { setColumn_parent((ColumnParent)value); } break; case PREDICATE: if (value == null) { unsetPredicate(); } else { setPredicate((SlicePredicate)value); } break; case CONSISTENCY_LEVEL: if (value == null) { unsetConsistency_level(); } else { setConsistency_level((ConsistencyLevel)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case KEYSPACE: return getKeyspace(); case KEYS: return getKeys(); case COLUMN_PARENT: return getColumn_parent(); case PREDICATE: return getPredicate(); case CONSISTENCY_LEVEL: return getConsistency_level(); } throw new IllegalStateException(); } /** 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 KEYSPACE: return isSetKeyspace(); case KEYS: return isSetKeys(); case COLUMN_PARENT: return isSetColumn_parent(); case PREDICATE: return isSetPredicate(); case CONSISTENCY_LEVEL: return isSetConsistency_level(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof multiget_slice_args) return this.equals((multiget_slice_args)that); return false; } public boolean equals(multiget_slice_args that) { if (that == null) return false; boolean this_present_keyspace = true && this.isSetKeyspace(); boolean that_present_keyspace = true && that.isSetKeyspace(); if (this_present_keyspace || that_present_keyspace) { if (!(this_present_keyspace && that_present_keyspace)) return false; if (!this.keyspace.equals(that.keyspace)) return false; } boolean this_present_keys = true && this.isSetKeys(); boolean that_present_keys = true && that.isSetKeys(); if (this_present_keys || that_present_keys) { if (!(this_present_keys && that_present_keys)) return false; if (!this.keys.equals(that.keys)) return false; } boolean this_present_column_parent = true && this.isSetColumn_parent(); boolean that_present_column_parent = true && that.isSetColumn_parent(); if (this_present_column_parent || that_present_column_parent) { if (!(this_present_column_parent && that_present_column_parent)) return false; if (!this.column_parent.equals(that.column_parent)) return false; } boolean this_present_predicate = true && this.isSetPredicate(); boolean that_present_predicate = true && that.isSetPredicate(); if (this_present_predicate || that_present_predicate) { if (!(this_present_predicate && that_present_predicate)) return false; if (!this.predicate.equals(that.predicate)) return false; } boolean this_present_consistency_level = true && this.isSetConsistency_level(); boolean that_present_consistency_level = true && that.isSetConsistency_level(); if (this_present_consistency_level || that_present_consistency_level) { if (!(this_present_consistency_level && that_present_consistency_level)) return false; if (!this.consistency_level.equals(that.consistency_level)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_keyspace = true && (isSetKeyspace()); builder.append(present_keyspace); if (present_keyspace) builder.append(keyspace); boolean present_keys = true && (isSetKeys()); builder.append(present_keys); if (present_keys) builder.append(keys); boolean present_column_parent = true && (isSetColumn_parent()); builder.append(present_column_parent); if (present_column_parent) builder.append(column_parent); boolean present_predicate = true && (isSetPredicate()); builder.append(present_predicate); if (present_predicate) builder.append(predicate); boolean present_consistency_level = true && (isSetConsistency_level()); builder.append(present_consistency_level); if (present_consistency_level) builder.append(consistency_level.getValue()); return builder.toHashCode(); } public int compareTo(multiget_slice_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; multiget_slice_args typedOther = (multiget_slice_args)other; lastComparison = Boolean.valueOf(isSetKeyspace()).compareTo(typedOther.isSetKeyspace()); if (lastComparison != 0) { return lastComparison; } if (isSetKeyspace()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.keyspace, typedOther.keyspace); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetKeys()).compareTo(typedOther.isSetKeys()); if (lastComparison != 0) { return lastComparison; } if (isSetKeys()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.keys, typedOther.keys); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetColumn_parent()).compareTo(typedOther.isSetColumn_parent()); if (lastComparison != 0) { return lastComparison; } if (isSetColumn_parent()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.column_parent, typedOther.column_parent); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPredicate()).compareTo(typedOther.isSetPredicate()); if (lastComparison != 0) { return lastComparison; } if (isSetPredicate()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.predicate, typedOther.predicate); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetConsistency_level()).compareTo(typedOther.isSetConsistency_level()); if (lastComparison != 0) { return lastComparison; } if (isSetConsistency_level()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.consistency_level, typedOther.consistency_level); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // KEYSPACE if (field.type == org.apache.thrift.protocol.TType.STRING) { this.keyspace = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // KEYS if (field.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list34 = iprot.readListBegin(); this.keys = new ArrayList<String>(_list34.size); for (int _i35 = 0; _i35 < _list34.size; ++_i35) { String _elem36; _elem36 = iprot.readString(); this.keys.add(_elem36); } iprot.readListEnd(); } } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 3: // COLUMN_PARENT if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.column_parent = new ColumnParent(); this.column_parent.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 4: // PREDICATE if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.predicate = new SlicePredicate(); this.predicate.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 5: // CONSISTENCY_LEVEL if (field.type == org.apache.thrift.protocol.TType.I32) { this.consistency_level = ConsistencyLevel.findByValue(iprot.readI32()); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.keyspace != null) { oprot.writeFieldBegin(KEYSPACE_FIELD_DESC); oprot.writeString(this.keyspace); oprot.writeFieldEnd(); } if (this.keys != null) { oprot.writeFieldBegin(KEYS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.keys.size())); for (String _iter37 : this.keys) { oprot.writeString(_iter37); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (this.column_parent != null) { oprot.writeFieldBegin(COLUMN_PARENT_FIELD_DESC); this.column_parent.write(oprot); oprot.writeFieldEnd(); } if (this.predicate != null) { oprot.writeFieldBegin(PREDICATE_FIELD_DESC); this.predicate.write(oprot); oprot.writeFieldEnd(); } if (this.consistency_level != null) { oprot.writeFieldBegin(CONSISTENCY_LEVEL_FIELD_DESC); oprot.writeI32(this.consistency_level.getValue()); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("multiget_slice_args("); boolean first = true; sb.append("keyspace:"); if (this.keyspace == null) { sb.append("null"); } else { sb.append(this.keyspace); } first = false; if (!first) sb.append(", "); sb.append("keys:"); if (this.keys == null) { sb.append("null"); } else { sb.append(this.keys); } first = false; if (!first) sb.append(", "); sb.append("column_parent:"); if (this.column_parent == null) { sb.append("null"); } else { sb.append(this.column_parent); } first = false; if (!first) sb.append(", "); sb.append("predicate:"); if (this.predicate == null) { sb.append("null"); } else { sb.append(this.predicate); } first = false; if (!first) sb.append(", "); sb.append("consistency_level:"); if (this.consistency_level == null) { sb.append("null"); } else { sb.append(this.consistency_level); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields if (keyspace == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'keyspace' was not present! Struct: " + toString()); } if (keys == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'keys' was not present! Struct: " + toString()); } if (column_parent == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'column_parent' was not present! Struct: " + toString()); } if (predicate == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'predicate' was not present! Struct: " + toString()); } if (consistency_level == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'consistency_level' was not present! Struct: " + toString()); } } 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); } } 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); } } } public static class multiget_slice_result implements org.apache.thrift.TBase<multiget_slice_result, multiget_slice_result._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("multiget_slice_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.MAP, (short)0); private static final org.apache.thrift.protocol.TField IRE_FIELD_DESC = new org.apache.thrift.protocol.TField("ire", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField UE_FIELD_DESC = new org.apache.thrift.protocol.TField("ue", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField TE_FIELD_DESC = new org.apache.thrift.protocol.TField("te", org.apache.thrift.protocol.TType.STRUCT, (short)3); public Map<String,List<ColumnOrSuperColumn>> success; public InvalidRequestException ire; public UnavailableException ue; public TimedOutException te; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), IRE((short)1, "ire"), UE((short)2, "ue"), TE((short)3, "te"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // IRE return IRE; case 2: // UE return UE; case 3: // TE return TE; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ColumnOrSuperColumn.class))))); tmpMap.put(_Fields.IRE, new org.apache.thrift.meta_data.FieldMetaData("ire", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.UE, new org.apache.thrift.meta_data.FieldMetaData("ue", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.TE, new org.apache.thrift.meta_data.FieldMetaData("te", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(multiget_slice_result.class, metaDataMap); } public multiget_slice_result() { } public multiget_slice_result( Map<String,List<ColumnOrSuperColumn>> success, InvalidRequestException ire, UnavailableException ue, TimedOutException te) { this(); this.success = success; this.ire = ire; this.ue = ue; this.te = te; } /** * Performs a deep copy on <i>other</i>. */ public multiget_slice_result(multiget_slice_result other) { if (other.isSetSuccess()) { Map<String,List<ColumnOrSuperColumn>> __this__success = new HashMap<String,List<ColumnOrSuperColumn>>(); for (Map.Entry<String, List<ColumnOrSuperColumn>> other_element : other.success.entrySet()) { String other_element_key = other_element.getKey(); List<ColumnOrSuperColumn> other_element_value = other_element.getValue(); String __this__success_copy_key = other_element_key; List<ColumnOrSuperColumn> __this__success_copy_value = new ArrayList<ColumnOrSuperColumn>(); for (ColumnOrSuperColumn other_element_value_element : other_element_value) { __this__success_copy_value.add(new ColumnOrSuperColumn(other_element_value_element)); } __this__success.put(__this__success_copy_key, __this__success_copy_value); } this.success = __this__success; } if (other.isSetIre()) { this.ire = new InvalidRequestException(other.ire); } if (other.isSetUe()) { this.ue = new UnavailableException(other.ue); } if (other.isSetTe()) { this.te = new TimedOutException(other.te); } } public multiget_slice_result deepCopy() { return new multiget_slice_result(this); } @Override public void clear() { this.success = null; this.ire = null; this.ue = null; this.te = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } public void putToSuccess(String key, List<ColumnOrSuperColumn> val) { if (this.success == null) { this.success = new HashMap<String,List<ColumnOrSuperColumn>>(); } this.success.put(key, val); } public Map<String,List<ColumnOrSuperColumn>> getSuccess() { return this.success; } public multiget_slice_result setSuccess(Map<String,List<ColumnOrSuperColumn>> success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } public InvalidRequestException getIre() { return this.ire; } public multiget_slice_result setIre(InvalidRequestException ire) { this.ire = ire; return this; } public void unsetIre() { this.ire = null; } /** Returns true if field ire is set (has been assigned a value) and false otherwise */ public boolean isSetIre() { return this.ire != null; } public void setIreIsSet(boolean value) { if (!value) { this.ire = null; } } public UnavailableException getUe() { return this.ue; } public multiget_slice_result setUe(UnavailableException ue) { this.ue = ue; return this; } public void unsetUe() { this.ue = null; } /** Returns true if field ue is set (has been assigned a value) and false otherwise */ public boolean isSetUe() { return this.ue != null; } public void setUeIsSet(boolean value) { if (!value) { this.ue = null; } } public TimedOutException getTe() { return this.te; } public multiget_slice_result setTe(TimedOutException te) { this.te = te; return this; } public void unsetTe() { this.te = null; } /** Returns true if field te is set (has been assigned a value) and false otherwise */ public boolean isSetTe() { return this.te != null; } public void setTeIsSet(boolean value) { if (!value) { this.te = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((Map<String,List<ColumnOrSuperColumn>>)value); } break; case IRE: if (value == null) { unsetIre(); } else { setIre((InvalidRequestException)value); } break; case UE: if (value == null) { unsetUe(); } else { setUe((UnavailableException)value); } break; case TE: if (value == null) { unsetTe(); } else { setTe((TimedOutException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case IRE: return getIre(); case UE: return getUe(); case TE: return getTe(); } throw new IllegalStateException(); } /** 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(); case IRE: return isSetIre(); case UE: return isSetUe(); case TE: return isSetTe(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof multiget_slice_result) return this.equals((multiget_slice_result)that); return false; } public boolean equals(multiget_slice_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; } boolean this_present_ire = true && this.isSetIre(); boolean that_present_ire = true && that.isSetIre(); if (this_present_ire || that_present_ire) { if (!(this_present_ire && that_present_ire)) return false; if (!this.ire.equals(that.ire)) return false; } boolean this_present_ue = true && this.isSetUe(); boolean that_present_ue = true && that.isSetUe(); if (this_present_ue || that_present_ue) { if (!(this_present_ue && that_present_ue)) return false; if (!this.ue.equals(that.ue)) return false; } boolean this_present_te = true && this.isSetTe(); boolean that_present_te = true && that.isSetTe(); if (this_present_te || that_present_te) { if (!(this_present_te && that_present_te)) return false; if (!this.te.equals(that.te)) 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); boolean present_ire = true && (isSetIre()); builder.append(present_ire); if (present_ire) builder.append(ire); boolean present_ue = true && (isSetUe()); builder.append(present_ue); if (present_ue) builder.append(ue); boolean present_te = true && (isSetTe()); builder.append(present_te); if (present_te) builder.append(te); return builder.toHashCode(); } public int compareTo(multiget_slice_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; multiget_slice_result typedOther = (multiget_slice_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; } } lastComparison = Boolean.valueOf(isSetIre()).compareTo(typedOther.isSetIre()); if (lastComparison != 0) { return lastComparison; } if (isSetIre()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ire, typedOther.ire); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetUe()).compareTo(typedOther.isSetUe()); if (lastComparison != 0) { return lastComparison; } if (isSetUe()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ue, typedOther.ue); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTe()).compareTo(typedOther.isSetTe()); if (lastComparison != 0) { return lastComparison; } if (isSetTe()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.te, typedOther.te); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 0: // SUCCESS if (field.type == org.apache.thrift.protocol.TType.MAP) { { org.apache.thrift.protocol.TMap _map38 = iprot.readMapBegin(); this.success = new HashMap<String,List<ColumnOrSuperColumn>>(2*_map38.size); for (int _i39 = 0; _i39 < _map38.size; ++_i39) { String _key40; List<ColumnOrSuperColumn> _val41; _key40 = iprot.readString(); { org.apache.thrift.protocol.TList _list42 = iprot.readListBegin(); _val41 = new ArrayList<ColumnOrSuperColumn>(_list42.size); for (int _i43 = 0; _i43 < _list42.size; ++_i43) { ColumnOrSuperColumn _elem44; _elem44 = new ColumnOrSuperColumn(); _elem44.read(iprot); _val41.add(_elem44); } iprot.readListEnd(); } this.success.put(_key40, _val41); } iprot.readMapEnd(); } } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 1: // IRE if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.ire = new InvalidRequestException(); this.ire.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // UE if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.ue = new UnavailableException(); this.ue.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 3: // TE if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.te = new TimedOutException(); this.te.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetSuccess()) { 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, this.success.size())); for (Map.Entry<String, List<ColumnOrSuperColumn>> _iter45 : this.success.entrySet()) { oprot.writeString(_iter45.getKey()); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, _iter45.getValue().size())); for (ColumnOrSuperColumn _iter46 : _iter45.getValue()) { _iter46.write(oprot); } oprot.writeListEnd(); } } oprot.writeMapEnd(); } oprot.writeFieldEnd(); } else if (this.isSetIre()) { oprot.writeFieldBegin(IRE_FIELD_DESC); this.ire.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetUe()) { oprot.writeFieldBegin(UE_FIELD_DESC); this.ue.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetTe()) { oprot.writeFieldBegin(TE_FIELD_DESC); this.te.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("multiget_slice_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("ire:"); if (this.ire == null) { sb.append("null"); } else { sb.append(this.ire); } first = false; if (!first) sb.append(", "); sb.append("ue:"); if (this.ue == null) { sb.append("null"); } else { sb.append(this.ue); } first = false; if (!first) sb.append(", "); sb.append("te:"); if (this.te == null) { sb.append("null"); } else { sb.append(this.te); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields } 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); } } 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); } } } public static class get_count_args implements org.apache.thrift.TBase<get_count_args, get_count_args._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_count_args"); private static final org.apache.thrift.protocol.TField KEYSPACE_FIELD_DESC = new org.apache.thrift.protocol.TField("keyspace", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField KEY_FIELD_DESC = new org.apache.thrift.protocol.TField("key", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField COLUMN_PARENT_FIELD_DESC = new org.apache.thrift.protocol.TField("column_parent", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final org.apache.thrift.protocol.TField CONSISTENCY_LEVEL_FIELD_DESC = new org.apache.thrift.protocol.TField("consistency_level", org.apache.thrift.protocol.TType.I32, (short)4); public String keyspace; public String key; public ColumnParent column_parent; /** * * @see ConsistencyLevel */ public ConsistencyLevel consistency_level; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { KEYSPACE((short)1, "keyspace"), KEY((short)2, "key"), COLUMN_PARENT((short)3, "column_parent"), /** * * @see ConsistencyLevel */ CONSISTENCY_LEVEL((short)4, "consistency_level"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // KEYSPACE return KEYSPACE; case 2: // KEY return KEY; case 3: // COLUMN_PARENT return COLUMN_PARENT; case 4: // CONSISTENCY_LEVEL return CONSISTENCY_LEVEL; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.KEYSPACE, new org.apache.thrift.meta_data.FieldMetaData("keyspace", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.KEY, new org.apache.thrift.meta_data.FieldMetaData("key", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.COLUMN_PARENT, new org.apache.thrift.meta_data.FieldMetaData("column_parent", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ColumnParent.class))); tmpMap.put(_Fields.CONSISTENCY_LEVEL, new org.apache.thrift.meta_data.FieldMetaData("consistency_level", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ConsistencyLevel.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_count_args.class, metaDataMap); } public get_count_args() { this.consistency_level = org.apache.cassandra.thrift.ConsistencyLevel.ONE; } public get_count_args( String keyspace, String key, ColumnParent column_parent, ConsistencyLevel consistency_level) { this(); this.keyspace = keyspace; this.key = key; this.column_parent = column_parent; this.consistency_level = consistency_level; } /** * Performs a deep copy on <i>other</i>. */ public get_count_args(get_count_args other) { if (other.isSetKeyspace()) { this.keyspace = other.keyspace; } if (other.isSetKey()) { this.key = other.key; } if (other.isSetColumn_parent()) { this.column_parent = new ColumnParent(other.column_parent); } if (other.isSetConsistency_level()) { this.consistency_level = other.consistency_level; } } public get_count_args deepCopy() { return new get_count_args(this); } @Override public void clear() { this.keyspace = null; this.key = null; this.column_parent = null; this.consistency_level = org.apache.cassandra.thrift.ConsistencyLevel.ONE; } public String getKeyspace() { return this.keyspace; } public get_count_args setKeyspace(String keyspace) { this.keyspace = keyspace; return this; } public void unsetKeyspace() { this.keyspace = null; } /** Returns true if field keyspace is set (has been assigned a value) and false otherwise */ public boolean isSetKeyspace() { return this.keyspace != null; } public void setKeyspaceIsSet(boolean value) { if (!value) { this.keyspace = null; } } public String getKey() { return this.key; } public get_count_args setKey(String key) { this.key = key; return this; } public void unsetKey() { this.key = null; } /** Returns true if field key is set (has been assigned a value) and false otherwise */ public boolean isSetKey() { return this.key != null; } public void setKeyIsSet(boolean value) { if (!value) { this.key = null; } } public ColumnParent getColumn_parent() { return this.column_parent; } public get_count_args setColumn_parent(ColumnParent column_parent) { this.column_parent = column_parent; return this; } public void unsetColumn_parent() { this.column_parent = null; } /** Returns true if field column_parent is set (has been assigned a value) and false otherwise */ public boolean isSetColumn_parent() { return this.column_parent != null; } public void setColumn_parentIsSet(boolean value) { if (!value) { this.column_parent = null; } } /** * * @see ConsistencyLevel */ public ConsistencyLevel getConsistency_level() { return this.consistency_level; } /** * * @see ConsistencyLevel */ public get_count_args setConsistency_level(ConsistencyLevel consistency_level) { this.consistency_level = consistency_level; return this; } public void unsetConsistency_level() { this.consistency_level = null; } /** Returns true if field consistency_level is set (has been assigned a value) and false otherwise */ public boolean isSetConsistency_level() { return this.consistency_level != null; } public void setConsistency_levelIsSet(boolean value) { if (!value) { this.consistency_level = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case KEYSPACE: if (value == null) { unsetKeyspace(); } else { setKeyspace((String)value); } break; case KEY: if (value == null) { unsetKey(); } else { setKey((String)value); } break; case COLUMN_PARENT: if (value == null) { unsetColumn_parent(); } else { setColumn_parent((ColumnParent)value); } break; case CONSISTENCY_LEVEL: if (value == null) { unsetConsistency_level(); } else { setConsistency_level((ConsistencyLevel)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case KEYSPACE: return getKeyspace(); case KEY: return getKey(); case COLUMN_PARENT: return getColumn_parent(); case CONSISTENCY_LEVEL: return getConsistency_level(); } throw new IllegalStateException(); } /** 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 KEYSPACE: return isSetKeyspace(); case KEY: return isSetKey(); case COLUMN_PARENT: return isSetColumn_parent(); case CONSISTENCY_LEVEL: return isSetConsistency_level(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_count_args) return this.equals((get_count_args)that); return false; } public boolean equals(get_count_args that) { if (that == null) return false; boolean this_present_keyspace = true && this.isSetKeyspace(); boolean that_present_keyspace = true && that.isSetKeyspace(); if (this_present_keyspace || that_present_keyspace) { if (!(this_present_keyspace && that_present_keyspace)) return false; if (!this.keyspace.equals(that.keyspace)) return false; } boolean this_present_key = true && this.isSetKey(); boolean that_present_key = true && that.isSetKey(); if (this_present_key || that_present_key) { if (!(this_present_key && that_present_key)) return false; if (!this.key.equals(that.key)) return false; } boolean this_present_column_parent = true && this.isSetColumn_parent(); boolean that_present_column_parent = true && that.isSetColumn_parent(); if (this_present_column_parent || that_present_column_parent) { if (!(this_present_column_parent && that_present_column_parent)) return false; if (!this.column_parent.equals(that.column_parent)) return false; } boolean this_present_consistency_level = true && this.isSetConsistency_level(); boolean that_present_consistency_level = true && that.isSetConsistency_level(); if (this_present_consistency_level || that_present_consistency_level) { if (!(this_present_consistency_level && that_present_consistency_level)) return false; if (!this.consistency_level.equals(that.consistency_level)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_keyspace = true && (isSetKeyspace()); builder.append(present_keyspace); if (present_keyspace) builder.append(keyspace); boolean present_key = true && (isSetKey()); builder.append(present_key); if (present_key) builder.append(key); boolean present_column_parent = true && (isSetColumn_parent()); builder.append(present_column_parent); if (present_column_parent) builder.append(column_parent); boolean present_consistency_level = true && (isSetConsistency_level()); builder.append(present_consistency_level); if (present_consistency_level) builder.append(consistency_level.getValue()); return builder.toHashCode(); } public int compareTo(get_count_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_count_args typedOther = (get_count_args)other; lastComparison = Boolean.valueOf(isSetKeyspace()).compareTo(typedOther.isSetKeyspace()); if (lastComparison != 0) { return lastComparison; } if (isSetKeyspace()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.keyspace, typedOther.keyspace); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetKey()).compareTo(typedOther.isSetKey()); if (lastComparison != 0) { return lastComparison; } if (isSetKey()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.key, typedOther.key); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetColumn_parent()).compareTo(typedOther.isSetColumn_parent()); if (lastComparison != 0) { return lastComparison; } if (isSetColumn_parent()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.column_parent, typedOther.column_parent); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetConsistency_level()).compareTo(typedOther.isSetConsistency_level()); if (lastComparison != 0) { return lastComparison; } if (isSetConsistency_level()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.consistency_level, typedOther.consistency_level); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // KEYSPACE if (field.type == org.apache.thrift.protocol.TType.STRING) { this.keyspace = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // KEY if (field.type == org.apache.thrift.protocol.TType.STRING) { this.key = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 3: // COLUMN_PARENT if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.column_parent = new ColumnParent(); this.column_parent.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 4: // CONSISTENCY_LEVEL if (field.type == org.apache.thrift.protocol.TType.I32) { this.consistency_level = ConsistencyLevel.findByValue(iprot.readI32()); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.keyspace != null) { oprot.writeFieldBegin(KEYSPACE_FIELD_DESC); oprot.writeString(this.keyspace); oprot.writeFieldEnd(); } if (this.key != null) { oprot.writeFieldBegin(KEY_FIELD_DESC); oprot.writeString(this.key); oprot.writeFieldEnd(); } if (this.column_parent != null) { oprot.writeFieldBegin(COLUMN_PARENT_FIELD_DESC); this.column_parent.write(oprot); oprot.writeFieldEnd(); } if (this.consistency_level != null) { oprot.writeFieldBegin(CONSISTENCY_LEVEL_FIELD_DESC); oprot.writeI32(this.consistency_level.getValue()); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_count_args("); boolean first = true; sb.append("keyspace:"); if (this.keyspace == null) { sb.append("null"); } else { sb.append(this.keyspace); } first = false; if (!first) sb.append(", "); sb.append("key:"); if (this.key == null) { sb.append("null"); } else { sb.append(this.key); } first = false; if (!first) sb.append(", "); sb.append("column_parent:"); if (this.column_parent == null) { sb.append("null"); } else { sb.append(this.column_parent); } first = false; if (!first) sb.append(", "); sb.append("consistency_level:"); if (this.consistency_level == null) { sb.append("null"); } else { sb.append(this.consistency_level); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields if (keyspace == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'keyspace' was not present! Struct: " + toString()); } if (key == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'key' was not present! Struct: " + toString()); } if (column_parent == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'column_parent' was not present! Struct: " + toString()); } if (consistency_level == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'consistency_level' was not present! Struct: " + toString()); } } 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); } } 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); } } } public static class get_count_result implements org.apache.thrift.TBase<get_count_result, get_count_result._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_count_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0); private static final org.apache.thrift.protocol.TField IRE_FIELD_DESC = new org.apache.thrift.protocol.TField("ire", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField UE_FIELD_DESC = new org.apache.thrift.protocol.TField("ue", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField TE_FIELD_DESC = new org.apache.thrift.protocol.TField("te", org.apache.thrift.protocol.TType.STRUCT, (short)3); public int success; public InvalidRequestException ire; public UnavailableException ue; public TimedOutException te; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), IRE((short)1, "ire"), UE((short)2, "ue"), TE((short)3, "te"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // IRE return IRE; case 2: // UE return UE; case 3: // TE return TE; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments private static final int __SUCCESS_ISSET_ID = 0; private BitSet __isset_bit_vector = new BitSet(1); public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); tmpMap.put(_Fields.IRE, new org.apache.thrift.meta_data.FieldMetaData("ire", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.UE, new org.apache.thrift.meta_data.FieldMetaData("ue", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.TE, new org.apache.thrift.meta_data.FieldMetaData("te", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_count_result.class, metaDataMap); } public get_count_result() { } public get_count_result( int success, InvalidRequestException ire, UnavailableException ue, TimedOutException te) { this(); this.success = success; setSuccessIsSet(true); this.ire = ire; this.ue = ue; this.te = te; } /** * Performs a deep copy on <i>other</i>. */ public get_count_result(get_count_result other) { __isset_bit_vector.clear(); __isset_bit_vector.or(other.__isset_bit_vector); this.success = other.success; if (other.isSetIre()) { this.ire = new InvalidRequestException(other.ire); } if (other.isSetUe()) { this.ue = new UnavailableException(other.ue); } if (other.isSetTe()) { this.te = new TimedOutException(other.te); } } public get_count_result deepCopy() { return new get_count_result(this); } @Override public void clear() { setSuccessIsSet(false); this.success = 0; this.ire = null; this.ue = null; this.te = null; } public int getSuccess() { return this.success; } public get_count_result setSuccess(int success) { this.success = success; setSuccessIsSet(true); return this; } public void unsetSuccess() { __isset_bit_vector.clear(__SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return __isset_bit_vector.get(__SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { __isset_bit_vector.set(__SUCCESS_ISSET_ID, value); } public InvalidRequestException getIre() { return this.ire; } public get_count_result setIre(InvalidRequestException ire) { this.ire = ire; return this; } public void unsetIre() { this.ire = null; } /** Returns true if field ire is set (has been assigned a value) and false otherwise */ public boolean isSetIre() { return this.ire != null; } public void setIreIsSet(boolean value) { if (!value) { this.ire = null; } } public UnavailableException getUe() { return this.ue; } public get_count_result setUe(UnavailableException ue) { this.ue = ue; return this; } public void unsetUe() { this.ue = null; } /** Returns true if field ue is set (has been assigned a value) and false otherwise */ public boolean isSetUe() { return this.ue != null; } public void setUeIsSet(boolean value) { if (!value) { this.ue = null; } } public TimedOutException getTe() { return this.te; } public get_count_result setTe(TimedOutException te) { this.te = te; return this; } public void unsetTe() { this.te = null; } /** Returns true if field te is set (has been assigned a value) and false otherwise */ public boolean isSetTe() { return this.te != null; } public void setTeIsSet(boolean value) { if (!value) { this.te = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((Integer)value); } break; case IRE: if (value == null) { unsetIre(); } else { setIre((InvalidRequestException)value); } break; case UE: if (value == null) { unsetUe(); } else { setUe((UnavailableException)value); } break; case TE: if (value == null) { unsetTe(); } else { setTe((TimedOutException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return new Integer(getSuccess()); case IRE: return getIre(); case UE: return getUe(); case TE: return getTe(); } throw new IllegalStateException(); } /** 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(); case IRE: return isSetIre(); case UE: return isSetUe(); case TE: return isSetTe(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_count_result) return this.equals((get_count_result)that); return false; } public boolean equals(get_count_result that) { if (that == null) return false; boolean this_present_success = true; boolean that_present_success = true; if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (this.success != that.success) return false; } boolean this_present_ire = true && this.isSetIre(); boolean that_present_ire = true && that.isSetIre(); if (this_present_ire || that_present_ire) { if (!(this_present_ire && that_present_ire)) return false; if (!this.ire.equals(that.ire)) return false; } boolean this_present_ue = true && this.isSetUe(); boolean that_present_ue = true && that.isSetUe(); if (this_present_ue || that_present_ue) { if (!(this_present_ue && that_present_ue)) return false; if (!this.ue.equals(that.ue)) return false; } boolean this_present_te = true && this.isSetTe(); boolean that_present_te = true && that.isSetTe(); if (this_present_te || that_present_te) { if (!(this_present_te && that_present_te)) return false; if (!this.te.equals(that.te)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true; builder.append(present_success); if (present_success) builder.append(success); boolean present_ire = true && (isSetIre()); builder.append(present_ire); if (present_ire) builder.append(ire); boolean present_ue = true && (isSetUe()); builder.append(present_ue); if (present_ue) builder.append(ue); boolean present_te = true && (isSetTe()); builder.append(present_te); if (present_te) builder.append(te); return builder.toHashCode(); } public int compareTo(get_count_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_count_result typedOther = (get_count_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; } } lastComparison = Boolean.valueOf(isSetIre()).compareTo(typedOther.isSetIre()); if (lastComparison != 0) { return lastComparison; } if (isSetIre()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ire, typedOther.ire); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetUe()).compareTo(typedOther.isSetUe()); if (lastComparison != 0) { return lastComparison; } if (isSetUe()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ue, typedOther.ue); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTe()).compareTo(typedOther.isSetTe()); if (lastComparison != 0) { return lastComparison; } if (isSetTe()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.te, typedOther.te); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 0: // SUCCESS if (field.type == org.apache.thrift.protocol.TType.I32) { this.success = iprot.readI32(); setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 1: // IRE if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.ire = new InvalidRequestException(); this.ire.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // UE if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.ue = new UnavailableException(); this.ue.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 3: // TE if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.te = new TimedOutException(); this.te.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeI32(this.success); oprot.writeFieldEnd(); } else if (this.isSetIre()) { oprot.writeFieldBegin(IRE_FIELD_DESC); this.ire.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetUe()) { oprot.writeFieldBegin(UE_FIELD_DESC); this.ue.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetTe()) { oprot.writeFieldBegin(TE_FIELD_DESC); this.te.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_count_result("); boolean first = true; sb.append("success:"); sb.append(this.success); first = false; if (!first) sb.append(", "); sb.append("ire:"); if (this.ire == null) { sb.append("null"); } else { sb.append(this.ire); } first = false; if (!first) sb.append(", "); sb.append("ue:"); if (this.ue == null) { sb.append("null"); } else { sb.append(this.ue); } first = false; if (!first) sb.append(", "); sb.append("te:"); if (this.te == null) { sb.append("null"); } else { sb.append(this.te); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields } 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); } } 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); } } } public static class get_range_slice_args implements org.apache.thrift.TBase<get_range_slice_args, get_range_slice_args._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_range_slice_args"); private static final org.apache.thrift.protocol.TField KEYSPACE_FIELD_DESC = new org.apache.thrift.protocol.TField("keyspace", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField COLUMN_PARENT_FIELD_DESC = new org.apache.thrift.protocol.TField("column_parent", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField PREDICATE_FIELD_DESC = new org.apache.thrift.protocol.TField("predicate", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final org.apache.thrift.protocol.TField START_KEY_FIELD_DESC = new org.apache.thrift.protocol.TField("start_key", org.apache.thrift.protocol.TType.STRING, (short)4); private static final org.apache.thrift.protocol.TField FINISH_KEY_FIELD_DESC = new org.apache.thrift.protocol.TField("finish_key", org.apache.thrift.protocol.TType.STRING, (short)5); private static final org.apache.thrift.protocol.TField ROW_COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("row_count", org.apache.thrift.protocol.TType.I32, (short)6); private static final org.apache.thrift.protocol.TField CONSISTENCY_LEVEL_FIELD_DESC = new org.apache.thrift.protocol.TField("consistency_level", org.apache.thrift.protocol.TType.I32, (short)7); public String keyspace; public ColumnParent column_parent; public SlicePredicate predicate; public String start_key; public String finish_key; public int row_count; /** * * @see ConsistencyLevel */ public ConsistencyLevel consistency_level; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { KEYSPACE((short)1, "keyspace"), COLUMN_PARENT((short)2, "column_parent"), PREDICATE((short)3, "predicate"), START_KEY((short)4, "start_key"), FINISH_KEY((short)5, "finish_key"), ROW_COUNT((short)6, "row_count"), /** * * @see ConsistencyLevel */ CONSISTENCY_LEVEL((short)7, "consistency_level"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // KEYSPACE return KEYSPACE; case 2: // COLUMN_PARENT return COLUMN_PARENT; case 3: // PREDICATE return PREDICATE; case 4: // START_KEY return START_KEY; case 5: // FINISH_KEY return FINISH_KEY; case 6: // ROW_COUNT return ROW_COUNT; case 7: // CONSISTENCY_LEVEL return CONSISTENCY_LEVEL; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments private static final int __ROW_COUNT_ISSET_ID = 0; private BitSet __isset_bit_vector = new BitSet(1); public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.KEYSPACE, new org.apache.thrift.meta_data.FieldMetaData("keyspace", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.COLUMN_PARENT, new org.apache.thrift.meta_data.FieldMetaData("column_parent", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ColumnParent.class))); tmpMap.put(_Fields.PREDICATE, new org.apache.thrift.meta_data.FieldMetaData("predicate", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SlicePredicate.class))); tmpMap.put(_Fields.START_KEY, new org.apache.thrift.meta_data.FieldMetaData("start_key", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.FINISH_KEY, new org.apache.thrift.meta_data.FieldMetaData("finish_key", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.ROW_COUNT, new org.apache.thrift.meta_data.FieldMetaData("row_count", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); tmpMap.put(_Fields.CONSISTENCY_LEVEL, new org.apache.thrift.meta_data.FieldMetaData("consistency_level", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ConsistencyLevel.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_range_slice_args.class, metaDataMap); } public get_range_slice_args() { this.start_key = ""; this.finish_key = ""; this.row_count = 100; this.consistency_level = org.apache.cassandra.thrift.ConsistencyLevel.ONE; } public get_range_slice_args( String keyspace, ColumnParent column_parent, SlicePredicate predicate, String start_key, String finish_key, int row_count, ConsistencyLevel consistency_level) { this(); this.keyspace = keyspace; this.column_parent = column_parent; this.predicate = predicate; this.start_key = start_key; this.finish_key = finish_key; this.row_count = row_count; setRow_countIsSet(true); this.consistency_level = consistency_level; } /** * Performs a deep copy on <i>other</i>. */ public get_range_slice_args(get_range_slice_args other) { __isset_bit_vector.clear(); __isset_bit_vector.or(other.__isset_bit_vector); if (other.isSetKeyspace()) { this.keyspace = other.keyspace; } if (other.isSetColumn_parent()) { this.column_parent = new ColumnParent(other.column_parent); } if (other.isSetPredicate()) { this.predicate = new SlicePredicate(other.predicate); } if (other.isSetStart_key()) { this.start_key = other.start_key; } if (other.isSetFinish_key()) { this.finish_key = other.finish_key; } this.row_count = other.row_count; if (other.isSetConsistency_level()) { this.consistency_level = other.consistency_level; } } public get_range_slice_args deepCopy() { return new get_range_slice_args(this); } @Override public void clear() { this.keyspace = null; this.column_parent = null; this.predicate = null; this.start_key = ""; this.finish_key = ""; this.row_count = 100; this.consistency_level = org.apache.cassandra.thrift.ConsistencyLevel.ONE; } public String getKeyspace() { return this.keyspace; } public get_range_slice_args setKeyspace(String keyspace) { this.keyspace = keyspace; return this; } public void unsetKeyspace() { this.keyspace = null; } /** Returns true if field keyspace is set (has been assigned a value) and false otherwise */ public boolean isSetKeyspace() { return this.keyspace != null; } public void setKeyspaceIsSet(boolean value) { if (!value) { this.keyspace = null; } } public ColumnParent getColumn_parent() { return this.column_parent; } public get_range_slice_args setColumn_parent(ColumnParent column_parent) { this.column_parent = column_parent; return this; } public void unsetColumn_parent() { this.column_parent = null; } /** Returns true if field column_parent is set (has been assigned a value) and false otherwise */ public boolean isSetColumn_parent() { return this.column_parent != null; } public void setColumn_parentIsSet(boolean value) { if (!value) { this.column_parent = null; } } public SlicePredicate getPredicate() { return this.predicate; } public get_range_slice_args setPredicate(SlicePredicate predicate) { this.predicate = predicate; return this; } public void unsetPredicate() { this.predicate = null; } /** Returns true if field predicate is set (has been assigned a value) and false otherwise */ public boolean isSetPredicate() { return this.predicate != null; } public void setPredicateIsSet(boolean value) { if (!value) { this.predicate = null; } } public String getStart_key() { return this.start_key; } public get_range_slice_args setStart_key(String start_key) { this.start_key = start_key; return this; } public void unsetStart_key() { this.start_key = null; } /** Returns true if field start_key is set (has been assigned a value) and false otherwise */ public boolean isSetStart_key() { return this.start_key != null; } public void setStart_keyIsSet(boolean value) { if (!value) { this.start_key = null; } } public String getFinish_key() { return this.finish_key; } public get_range_slice_args setFinish_key(String finish_key) { this.finish_key = finish_key; return this; } public void unsetFinish_key() { this.finish_key = null; } /** Returns true if field finish_key is set (has been assigned a value) and false otherwise */ public boolean isSetFinish_key() { return this.finish_key != null; } public void setFinish_keyIsSet(boolean value) { if (!value) { this.finish_key = null; } } public int getRow_count() { return this.row_count; } public get_range_slice_args setRow_count(int row_count) { this.row_count = row_count; setRow_countIsSet(true); return this; } public void unsetRow_count() { __isset_bit_vector.clear(__ROW_COUNT_ISSET_ID); } /** Returns true if field row_count is set (has been assigned a value) and false otherwise */ public boolean isSetRow_count() { return __isset_bit_vector.get(__ROW_COUNT_ISSET_ID); } public void setRow_countIsSet(boolean value) { __isset_bit_vector.set(__ROW_COUNT_ISSET_ID, value); } /** * * @see ConsistencyLevel */ public ConsistencyLevel getConsistency_level() { return this.consistency_level; } /** * * @see ConsistencyLevel */ public get_range_slice_args setConsistency_level(ConsistencyLevel consistency_level) { this.consistency_level = consistency_level; return this; } public void unsetConsistency_level() { this.consistency_level = null; } /** Returns true if field consistency_level is set (has been assigned a value) and false otherwise */ public boolean isSetConsistency_level() { return this.consistency_level != null; } public void setConsistency_levelIsSet(boolean value) { if (!value) { this.consistency_level = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case KEYSPACE: if (value == null) { unsetKeyspace(); } else { setKeyspace((String)value); } break; case COLUMN_PARENT: if (value == null) { unsetColumn_parent(); } else { setColumn_parent((ColumnParent)value); } break; case PREDICATE: if (value == null) { unsetPredicate(); } else { setPredicate((SlicePredicate)value); } break; case START_KEY: if (value == null) { unsetStart_key(); } else { setStart_key((String)value); } break; case FINISH_KEY: if (value == null) { unsetFinish_key(); } else { setFinish_key((String)value); } break; case ROW_COUNT: if (value == null) { unsetRow_count(); } else { setRow_count((Integer)value); } break; case CONSISTENCY_LEVEL: if (value == null) { unsetConsistency_level(); } else { setConsistency_level((ConsistencyLevel)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case KEYSPACE: return getKeyspace(); case COLUMN_PARENT: return getColumn_parent(); case PREDICATE: return getPredicate(); case START_KEY: return getStart_key(); case FINISH_KEY: return getFinish_key(); case ROW_COUNT: return new Integer(getRow_count()); case CONSISTENCY_LEVEL: return getConsistency_level(); } throw new IllegalStateException(); } /** 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 KEYSPACE: return isSetKeyspace(); case COLUMN_PARENT: return isSetColumn_parent(); case PREDICATE: return isSetPredicate(); case START_KEY: return isSetStart_key(); case FINISH_KEY: return isSetFinish_key(); case ROW_COUNT: return isSetRow_count(); case CONSISTENCY_LEVEL: return isSetConsistency_level(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_range_slice_args) return this.equals((get_range_slice_args)that); return false; } public boolean equals(get_range_slice_args that) { if (that == null) return false; boolean this_present_keyspace = true && this.isSetKeyspace(); boolean that_present_keyspace = true && that.isSetKeyspace(); if (this_present_keyspace || that_present_keyspace) { if (!(this_present_keyspace && that_present_keyspace)) return false; if (!this.keyspace.equals(that.keyspace)) return false; } boolean this_present_column_parent = true && this.isSetColumn_parent(); boolean that_present_column_parent = true && that.isSetColumn_parent(); if (this_present_column_parent || that_present_column_parent) { if (!(this_present_column_parent && that_present_column_parent)) return false; if (!this.column_parent.equals(that.column_parent)) return false; } boolean this_present_predicate = true && this.isSetPredicate(); boolean that_present_predicate = true && that.isSetPredicate(); if (this_present_predicate || that_present_predicate) { if (!(this_present_predicate && that_present_predicate)) return false; if (!this.predicate.equals(that.predicate)) return false; } boolean this_present_start_key = true && this.isSetStart_key(); boolean that_present_start_key = true && that.isSetStart_key(); if (this_present_start_key || that_present_start_key) { if (!(this_present_start_key && that_present_start_key)) return false; if (!this.start_key.equals(that.start_key)) return false; } boolean this_present_finish_key = true && this.isSetFinish_key(); boolean that_present_finish_key = true && that.isSetFinish_key(); if (this_present_finish_key || that_present_finish_key) { if (!(this_present_finish_key && that_present_finish_key)) return false; if (!this.finish_key.equals(that.finish_key)) return false; } boolean this_present_row_count = true; boolean that_present_row_count = true; if (this_present_row_count || that_present_row_count) { if (!(this_present_row_count && that_present_row_count)) return false; if (this.row_count != that.row_count) return false; } boolean this_present_consistency_level = true && this.isSetConsistency_level(); boolean that_present_consistency_level = true && that.isSetConsistency_level(); if (this_present_consistency_level || that_present_consistency_level) { if (!(this_present_consistency_level && that_present_consistency_level)) return false; if (!this.consistency_level.equals(that.consistency_level)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_keyspace = true && (isSetKeyspace()); builder.append(present_keyspace); if (present_keyspace) builder.append(keyspace); boolean present_column_parent = true && (isSetColumn_parent()); builder.append(present_column_parent); if (present_column_parent) builder.append(column_parent); boolean present_predicate = true && (isSetPredicate()); builder.append(present_predicate); if (present_predicate) builder.append(predicate); boolean present_start_key = true && (isSetStart_key()); builder.append(present_start_key); if (present_start_key) builder.append(start_key); boolean present_finish_key = true && (isSetFinish_key()); builder.append(present_finish_key); if (present_finish_key) builder.append(finish_key); boolean present_row_count = true; builder.append(present_row_count); if (present_row_count) builder.append(row_count); boolean present_consistency_level = true && (isSetConsistency_level()); builder.append(present_consistency_level); if (present_consistency_level) builder.append(consistency_level.getValue()); return builder.toHashCode(); } public int compareTo(get_range_slice_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_range_slice_args typedOther = (get_range_slice_args)other; lastComparison = Boolean.valueOf(isSetKeyspace()).compareTo(typedOther.isSetKeyspace()); if (lastComparison != 0) { return lastComparison; } if (isSetKeyspace()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.keyspace, typedOther.keyspace); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetColumn_parent()).compareTo(typedOther.isSetColumn_parent()); if (lastComparison != 0) { return lastComparison; } if (isSetColumn_parent()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.column_parent, typedOther.column_parent); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPredicate()).compareTo(typedOther.isSetPredicate()); if (lastComparison != 0) { return lastComparison; } if (isSetPredicate()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.predicate, typedOther.predicate); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetStart_key()).compareTo(typedOther.isSetStart_key()); if (lastComparison != 0) { return lastComparison; } if (isSetStart_key()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.start_key, typedOther.start_key); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetFinish_key()).compareTo(typedOther.isSetFinish_key()); if (lastComparison != 0) { return lastComparison; } if (isSetFinish_key()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.finish_key, typedOther.finish_key); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetRow_count()).compareTo(typedOther.isSetRow_count()); if (lastComparison != 0) { return lastComparison; } if (isSetRow_count()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.row_count, typedOther.row_count); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetConsistency_level()).compareTo(typedOther.isSetConsistency_level()); if (lastComparison != 0) { return lastComparison; } if (isSetConsistency_level()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.consistency_level, typedOther.consistency_level); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // KEYSPACE if (field.type == org.apache.thrift.protocol.TType.STRING) { this.keyspace = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // COLUMN_PARENT if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.column_parent = new ColumnParent(); this.column_parent.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 3: // PREDICATE if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.predicate = new SlicePredicate(); this.predicate.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 4: // START_KEY if (field.type == org.apache.thrift.protocol.TType.STRING) { this.start_key = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 5: // FINISH_KEY if (field.type == org.apache.thrift.protocol.TType.STRING) { this.finish_key = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 6: // ROW_COUNT if (field.type == org.apache.thrift.protocol.TType.I32) { this.row_count = iprot.readI32(); setRow_countIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 7: // CONSISTENCY_LEVEL if (field.type == org.apache.thrift.protocol.TType.I32) { this.consistency_level = ConsistencyLevel.findByValue(iprot.readI32()); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method if (!isSetRow_count()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'row_count' was not found in serialized data! Struct: " + toString()); } validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.keyspace != null) { oprot.writeFieldBegin(KEYSPACE_FIELD_DESC); oprot.writeString(this.keyspace); oprot.writeFieldEnd(); } if (this.column_parent != null) { oprot.writeFieldBegin(COLUMN_PARENT_FIELD_DESC); this.column_parent.write(oprot); oprot.writeFieldEnd(); } if (this.predicate != null) { oprot.writeFieldBegin(PREDICATE_FIELD_DESC); this.predicate.write(oprot); oprot.writeFieldEnd(); } if (this.start_key != null) { oprot.writeFieldBegin(START_KEY_FIELD_DESC); oprot.writeString(this.start_key); oprot.writeFieldEnd(); } if (this.finish_key != null) { oprot.writeFieldBegin(FINISH_KEY_FIELD_DESC); oprot.writeString(this.finish_key); oprot.writeFieldEnd(); } oprot.writeFieldBegin(ROW_COUNT_FIELD_DESC); oprot.writeI32(this.row_count); oprot.writeFieldEnd(); if (this.consistency_level != null) { oprot.writeFieldBegin(CONSISTENCY_LEVEL_FIELD_DESC); oprot.writeI32(this.consistency_level.getValue()); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_range_slice_args("); boolean first = true; sb.append("keyspace:"); if (this.keyspace == null) { sb.append("null"); } else { sb.append(this.keyspace); } first = false; if (!first) sb.append(", "); sb.append("column_parent:"); if (this.column_parent == null) { sb.append("null"); } else { sb.append(this.column_parent); } first = false; if (!first) sb.append(", "); sb.append("predicate:"); if (this.predicate == null) { sb.append("null"); } else { sb.append(this.predicate); } first = false; if (!first) sb.append(", "); sb.append("start_key:"); if (this.start_key == null) { sb.append("null"); } else { sb.append(this.start_key); } first = false; if (!first) sb.append(", "); sb.append("finish_key:"); if (this.finish_key == null) { sb.append("null"); } else { sb.append(this.finish_key); } first = false; if (!first) sb.append(", "); sb.append("row_count:"); sb.append(this.row_count); first = false; if (!first) sb.append(", "); sb.append("consistency_level:"); if (this.consistency_level == null) { sb.append("null"); } else { sb.append(this.consistency_level); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields if (keyspace == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'keyspace' was not present! Struct: " + toString()); } if (column_parent == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'column_parent' was not present! Struct: " + toString()); } if (predicate == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'predicate' was not present! Struct: " + toString()); } if (start_key == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'start_key' was not present! Struct: " + toString()); } if (finish_key == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'finish_key' was not present! Struct: " + toString()); } // alas, we cannot check 'row_count' because it's a primitive and you chose the non-beans generator. if (consistency_level == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'consistency_level' was not present! Struct: " + toString()); } } 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); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bit_vector = new BitSet(1); 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); } } } public static class get_range_slice_result implements org.apache.thrift.TBase<get_range_slice_result, get_range_slice_result._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_range_slice_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final org.apache.thrift.protocol.TField IRE_FIELD_DESC = new org.apache.thrift.protocol.TField("ire", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField UE_FIELD_DESC = new org.apache.thrift.protocol.TField("ue", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField TE_FIELD_DESC = new org.apache.thrift.protocol.TField("te", org.apache.thrift.protocol.TType.STRUCT, (short)3); public List<KeySlice> success; public InvalidRequestException ire; public UnavailableException ue; public TimedOutException te; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), IRE((short)1, "ire"), UE((short)2, "ue"), TE((short)3, "te"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // IRE return IRE; case 2: // UE return UE; case 3: // TE return TE; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, KeySlice.class)))); tmpMap.put(_Fields.IRE, new org.apache.thrift.meta_data.FieldMetaData("ire", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.UE, new org.apache.thrift.meta_data.FieldMetaData("ue", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.TE, new org.apache.thrift.meta_data.FieldMetaData("te", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_range_slice_result.class, metaDataMap); } public get_range_slice_result() { } public get_range_slice_result( List<KeySlice> success, InvalidRequestException ire, UnavailableException ue, TimedOutException te) { this(); this.success = success; this.ire = ire; this.ue = ue; this.te = te; } /** * Performs a deep copy on <i>other</i>. */ public get_range_slice_result(get_range_slice_result other) { if (other.isSetSuccess()) { List<KeySlice> __this__success = new ArrayList<KeySlice>(); for (KeySlice other_element : other.success) { __this__success.add(new KeySlice(other_element)); } this.success = __this__success; } if (other.isSetIre()) { this.ire = new InvalidRequestException(other.ire); } if (other.isSetUe()) { this.ue = new UnavailableException(other.ue); } if (other.isSetTe()) { this.te = new TimedOutException(other.te); } } public get_range_slice_result deepCopy() { return new get_range_slice_result(this); } @Override public void clear() { this.success = null; this.ire = null; this.ue = null; this.te = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } public java.util.Iterator<KeySlice> getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(KeySlice elem) { if (this.success == null) { this.success = new ArrayList<KeySlice>(); } this.success.add(elem); } public List<KeySlice> getSuccess() { return this.success; } public get_range_slice_result setSuccess(List<KeySlice> success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } public InvalidRequestException getIre() { return this.ire; } public get_range_slice_result setIre(InvalidRequestException ire) { this.ire = ire; return this; } public void unsetIre() { this.ire = null; } /** Returns true if field ire is set (has been assigned a value) and false otherwise */ public boolean isSetIre() { return this.ire != null; } public void setIreIsSet(boolean value) { if (!value) { this.ire = null; } } public UnavailableException getUe() { return this.ue; } public get_range_slice_result setUe(UnavailableException ue) { this.ue = ue; return this; } public void unsetUe() { this.ue = null; } /** Returns true if field ue is set (has been assigned a value) and false otherwise */ public boolean isSetUe() { return this.ue != null; } public void setUeIsSet(boolean value) { if (!value) { this.ue = null; } } public TimedOutException getTe() { return this.te; } public get_range_slice_result setTe(TimedOutException te) { this.te = te; return this; } public void unsetTe() { this.te = null; } /** Returns true if field te is set (has been assigned a value) and false otherwise */ public boolean isSetTe() { return this.te != null; } public void setTeIsSet(boolean value) { if (!value) { this.te = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((List<KeySlice>)value); } break; case IRE: if (value == null) { unsetIre(); } else { setIre((InvalidRequestException)value); } break; case UE: if (value == null) { unsetUe(); } else { setUe((UnavailableException)value); } break; case TE: if (value == null) { unsetTe(); } else { setTe((TimedOutException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case IRE: return getIre(); case UE: return getUe(); case TE: return getTe(); } throw new IllegalStateException(); } /** 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(); case IRE: return isSetIre(); case UE: return isSetUe(); case TE: return isSetTe(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_range_slice_result) return this.equals((get_range_slice_result)that); return false; } public boolean equals(get_range_slice_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; } boolean this_present_ire = true && this.isSetIre(); boolean that_present_ire = true && that.isSetIre(); if (this_present_ire || that_present_ire) { if (!(this_present_ire && that_present_ire)) return false; if (!this.ire.equals(that.ire)) return false; } boolean this_present_ue = true && this.isSetUe(); boolean that_present_ue = true && that.isSetUe(); if (this_present_ue || that_present_ue) { if (!(this_present_ue && that_present_ue)) return false; if (!this.ue.equals(that.ue)) return false; } boolean this_present_te = true && this.isSetTe(); boolean that_present_te = true && that.isSetTe(); if (this_present_te || that_present_te) { if (!(this_present_te && that_present_te)) return false; if (!this.te.equals(that.te)) 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); boolean present_ire = true && (isSetIre()); builder.append(present_ire); if (present_ire) builder.append(ire); boolean present_ue = true && (isSetUe()); builder.append(present_ue); if (present_ue) builder.append(ue); boolean present_te = true && (isSetTe()); builder.append(present_te); if (present_te) builder.append(te); return builder.toHashCode(); } public int compareTo(get_range_slice_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_range_slice_result typedOther = (get_range_slice_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; } } lastComparison = Boolean.valueOf(isSetIre()).compareTo(typedOther.isSetIre()); if (lastComparison != 0) { return lastComparison; } if (isSetIre()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ire, typedOther.ire); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetUe()).compareTo(typedOther.isSetUe()); if (lastComparison != 0) { return lastComparison; } if (isSetUe()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ue, typedOther.ue); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTe()).compareTo(typedOther.isSetTe()); if (lastComparison != 0) { return lastComparison; } if (isSetTe()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.te, typedOther.te); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 0: // SUCCESS if (field.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list47 = iprot.readListBegin(); this.success = new ArrayList<KeySlice>(_list47.size); for (int _i48 = 0; _i48 < _list47.size; ++_i48) { KeySlice _elem49; _elem49 = new KeySlice(); _elem49.read(iprot); this.success.add(_elem49); } iprot.readListEnd(); } } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 1: // IRE if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.ire = new InvalidRequestException(); this.ire.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // UE if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.ue = new UnavailableException(); this.ue.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 3: // TE if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.te = new TimedOutException(); this.te.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size())); for (KeySlice _iter50 : this.success) { _iter50.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } else if (this.isSetIre()) { oprot.writeFieldBegin(IRE_FIELD_DESC); this.ire.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetUe()) { oprot.writeFieldBegin(UE_FIELD_DESC); this.ue.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetTe()) { oprot.writeFieldBegin(TE_FIELD_DESC); this.te.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_range_slice_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("ire:"); if (this.ire == null) { sb.append("null"); } else { sb.append(this.ire); } first = false; if (!first) sb.append(", "); sb.append("ue:"); if (this.ue == null) { sb.append("null"); } else { sb.append(this.ue); } first = false; if (!first) sb.append(", "); sb.append("te:"); if (this.te == null) { sb.append("null"); } else { sb.append(this.te); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields } 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); } } 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); } } } public static class get_range_slices_args implements org.apache.thrift.TBase<get_range_slices_args, get_range_slices_args._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_range_slices_args"); private static final org.apache.thrift.protocol.TField KEYSPACE_FIELD_DESC = new org.apache.thrift.protocol.TField("keyspace", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField COLUMN_PARENT_FIELD_DESC = new org.apache.thrift.protocol.TField("column_parent", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField PREDICATE_FIELD_DESC = new org.apache.thrift.protocol.TField("predicate", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final org.apache.thrift.protocol.TField RANGE_FIELD_DESC = new org.apache.thrift.protocol.TField("range", org.apache.thrift.protocol.TType.STRUCT, (short)4); private static final org.apache.thrift.protocol.TField CONSISTENCY_LEVEL_FIELD_DESC = new org.apache.thrift.protocol.TField("consistency_level", org.apache.thrift.protocol.TType.I32, (short)5); public String keyspace; public ColumnParent column_parent; public SlicePredicate predicate; public KeyRange range; /** * * @see ConsistencyLevel */ public ConsistencyLevel consistency_level; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { KEYSPACE((short)1, "keyspace"), COLUMN_PARENT((short)2, "column_parent"), PREDICATE((short)3, "predicate"), RANGE((short)4, "range"), /** * * @see ConsistencyLevel */ CONSISTENCY_LEVEL((short)5, "consistency_level"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // KEYSPACE return KEYSPACE; case 2: // COLUMN_PARENT return COLUMN_PARENT; case 3: // PREDICATE return PREDICATE; case 4: // RANGE return RANGE; case 5: // CONSISTENCY_LEVEL return CONSISTENCY_LEVEL; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.KEYSPACE, new org.apache.thrift.meta_data.FieldMetaData("keyspace", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.COLUMN_PARENT, new org.apache.thrift.meta_data.FieldMetaData("column_parent", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ColumnParent.class))); tmpMap.put(_Fields.PREDICATE, new org.apache.thrift.meta_data.FieldMetaData("predicate", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SlicePredicate.class))); tmpMap.put(_Fields.RANGE, new org.apache.thrift.meta_data.FieldMetaData("range", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, KeyRange.class))); tmpMap.put(_Fields.CONSISTENCY_LEVEL, new org.apache.thrift.meta_data.FieldMetaData("consistency_level", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ConsistencyLevel.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_range_slices_args.class, metaDataMap); } public get_range_slices_args() { this.consistency_level = org.apache.cassandra.thrift.ConsistencyLevel.ONE; } public get_range_slices_args( String keyspace, ColumnParent column_parent, SlicePredicate predicate, KeyRange range, ConsistencyLevel consistency_level) { this(); this.keyspace = keyspace; this.column_parent = column_parent; this.predicate = predicate; this.range = range; this.consistency_level = consistency_level; } /** * Performs a deep copy on <i>other</i>. */ public get_range_slices_args(get_range_slices_args other) { if (other.isSetKeyspace()) { this.keyspace = other.keyspace; } if (other.isSetColumn_parent()) { this.column_parent = new ColumnParent(other.column_parent); } if (other.isSetPredicate()) { this.predicate = new SlicePredicate(other.predicate); } if (other.isSetRange()) { this.range = new KeyRange(other.range); } if (other.isSetConsistency_level()) { this.consistency_level = other.consistency_level; } } public get_range_slices_args deepCopy() { return new get_range_slices_args(this); } @Override public void clear() { this.keyspace = null; this.column_parent = null; this.predicate = null; this.range = null; this.consistency_level = org.apache.cassandra.thrift.ConsistencyLevel.ONE; } public String getKeyspace() { return this.keyspace; } public get_range_slices_args setKeyspace(String keyspace) { this.keyspace = keyspace; return this; } public void unsetKeyspace() { this.keyspace = null; } /** Returns true if field keyspace is set (has been assigned a value) and false otherwise */ public boolean isSetKeyspace() { return this.keyspace != null; } public void setKeyspaceIsSet(boolean value) { if (!value) { this.keyspace = null; } } public ColumnParent getColumn_parent() { return this.column_parent; } public get_range_slices_args setColumn_parent(ColumnParent column_parent) { this.column_parent = column_parent; return this; } public void unsetColumn_parent() { this.column_parent = null; } /** Returns true if field column_parent is set (has been assigned a value) and false otherwise */ public boolean isSetColumn_parent() { return this.column_parent != null; } public void setColumn_parentIsSet(boolean value) { if (!value) { this.column_parent = null; } } public SlicePredicate getPredicate() { return this.predicate; } public get_range_slices_args setPredicate(SlicePredicate predicate) { this.predicate = predicate; return this; } public void unsetPredicate() { this.predicate = null; } /** Returns true if field predicate is set (has been assigned a value) and false otherwise */ public boolean isSetPredicate() { return this.predicate != null; } public void setPredicateIsSet(boolean value) { if (!value) { this.predicate = null; } } public KeyRange getRange() { return this.range; } public get_range_slices_args setRange(KeyRange range) { this.range = range; return this; } public void unsetRange() { this.range = null; } /** Returns true if field range is set (has been assigned a value) and false otherwise */ public boolean isSetRange() { return this.range != null; } public void setRangeIsSet(boolean value) { if (!value) { this.range = null; } } /** * * @see ConsistencyLevel */ public ConsistencyLevel getConsistency_level() { return this.consistency_level; } /** * * @see ConsistencyLevel */ public get_range_slices_args setConsistency_level(ConsistencyLevel consistency_level) { this.consistency_level = consistency_level; return this; } public void unsetConsistency_level() { this.consistency_level = null; } /** Returns true if field consistency_level is set (has been assigned a value) and false otherwise */ public boolean isSetConsistency_level() { return this.consistency_level != null; } public void setConsistency_levelIsSet(boolean value) { if (!value) { this.consistency_level = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case KEYSPACE: if (value == null) { unsetKeyspace(); } else { setKeyspace((String)value); } break; case COLUMN_PARENT: if (value == null) { unsetColumn_parent(); } else { setColumn_parent((ColumnParent)value); } break; case PREDICATE: if (value == null) { unsetPredicate(); } else { setPredicate((SlicePredicate)value); } break; case RANGE: if (value == null) { unsetRange(); } else { setRange((KeyRange)value); } break; case CONSISTENCY_LEVEL: if (value == null) { unsetConsistency_level(); } else { setConsistency_level((ConsistencyLevel)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case KEYSPACE: return getKeyspace(); case COLUMN_PARENT: return getColumn_parent(); case PREDICATE: return getPredicate(); case RANGE: return getRange(); case CONSISTENCY_LEVEL: return getConsistency_level(); } throw new IllegalStateException(); } /** 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 KEYSPACE: return isSetKeyspace(); case COLUMN_PARENT: return isSetColumn_parent(); case PREDICATE: return isSetPredicate(); case RANGE: return isSetRange(); case CONSISTENCY_LEVEL: return isSetConsistency_level(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_range_slices_args) return this.equals((get_range_slices_args)that); return false; } public boolean equals(get_range_slices_args that) { if (that == null) return false; boolean this_present_keyspace = true && this.isSetKeyspace(); boolean that_present_keyspace = true && that.isSetKeyspace(); if (this_present_keyspace || that_present_keyspace) { if (!(this_present_keyspace && that_present_keyspace)) return false; if (!this.keyspace.equals(that.keyspace)) return false; } boolean this_present_column_parent = true && this.isSetColumn_parent(); boolean that_present_column_parent = true && that.isSetColumn_parent(); if (this_present_column_parent || that_present_column_parent) { if (!(this_present_column_parent && that_present_column_parent)) return false; if (!this.column_parent.equals(that.column_parent)) return false; } boolean this_present_predicate = true && this.isSetPredicate(); boolean that_present_predicate = true && that.isSetPredicate(); if (this_present_predicate || that_present_predicate) { if (!(this_present_predicate && that_present_predicate)) return false; if (!this.predicate.equals(that.predicate)) return false; } boolean this_present_range = true && this.isSetRange(); boolean that_present_range = true && that.isSetRange(); if (this_present_range || that_present_range) { if (!(this_present_range && that_present_range)) return false; if (!this.range.equals(that.range)) return false; } boolean this_present_consistency_level = true && this.isSetConsistency_level(); boolean that_present_consistency_level = true && that.isSetConsistency_level(); if (this_present_consistency_level || that_present_consistency_level) { if (!(this_present_consistency_level && that_present_consistency_level)) return false; if (!this.consistency_level.equals(that.consistency_level)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_keyspace = true && (isSetKeyspace()); builder.append(present_keyspace); if (present_keyspace) builder.append(keyspace); boolean present_column_parent = true && (isSetColumn_parent()); builder.append(present_column_parent); if (present_column_parent) builder.append(column_parent); boolean present_predicate = true && (isSetPredicate()); builder.append(present_predicate); if (present_predicate) builder.append(predicate); boolean present_range = true && (isSetRange()); builder.append(present_range); if (present_range) builder.append(range); boolean present_consistency_level = true && (isSetConsistency_level()); builder.append(present_consistency_level); if (present_consistency_level) builder.append(consistency_level.getValue()); return builder.toHashCode(); } public int compareTo(get_range_slices_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_range_slices_args typedOther = (get_range_slices_args)other; lastComparison = Boolean.valueOf(isSetKeyspace()).compareTo(typedOther.isSetKeyspace()); if (lastComparison != 0) { return lastComparison; } if (isSetKeyspace()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.keyspace, typedOther.keyspace); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetColumn_parent()).compareTo(typedOther.isSetColumn_parent()); if (lastComparison != 0) { return lastComparison; } if (isSetColumn_parent()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.column_parent, typedOther.column_parent); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPredicate()).compareTo(typedOther.isSetPredicate()); if (lastComparison != 0) { return lastComparison; } if (isSetPredicate()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.predicate, typedOther.predicate); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetRange()).compareTo(typedOther.isSetRange()); if (lastComparison != 0) { return lastComparison; } if (isSetRange()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.range, typedOther.range); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetConsistency_level()).compareTo(typedOther.isSetConsistency_level()); if (lastComparison != 0) { return lastComparison; } if (isSetConsistency_level()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.consistency_level, typedOther.consistency_level); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // KEYSPACE if (field.type == org.apache.thrift.protocol.TType.STRING) { this.keyspace = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // COLUMN_PARENT if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.column_parent = new ColumnParent(); this.column_parent.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 3: // PREDICATE if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.predicate = new SlicePredicate(); this.predicate.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 4: // RANGE if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.range = new KeyRange(); this.range.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 5: // CONSISTENCY_LEVEL if (field.type == org.apache.thrift.protocol.TType.I32) { this.consistency_level = ConsistencyLevel.findByValue(iprot.readI32()); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.keyspace != null) { oprot.writeFieldBegin(KEYSPACE_FIELD_DESC); oprot.writeString(this.keyspace); oprot.writeFieldEnd(); } if (this.column_parent != null) { oprot.writeFieldBegin(COLUMN_PARENT_FIELD_DESC); this.column_parent.write(oprot); oprot.writeFieldEnd(); } if (this.predicate != null) { oprot.writeFieldBegin(PREDICATE_FIELD_DESC); this.predicate.write(oprot); oprot.writeFieldEnd(); } if (this.range != null) { oprot.writeFieldBegin(RANGE_FIELD_DESC); this.range.write(oprot); oprot.writeFieldEnd(); } if (this.consistency_level != null) { oprot.writeFieldBegin(CONSISTENCY_LEVEL_FIELD_DESC); oprot.writeI32(this.consistency_level.getValue()); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_range_slices_args("); boolean first = true; sb.append("keyspace:"); if (this.keyspace == null) { sb.append("null"); } else { sb.append(this.keyspace); } first = false; if (!first) sb.append(", "); sb.append("column_parent:"); if (this.column_parent == null) { sb.append("null"); } else { sb.append(this.column_parent); } first = false; if (!first) sb.append(", "); sb.append("predicate:"); if (this.predicate == null) { sb.append("null"); } else { sb.append(this.predicate); } first = false; if (!first) sb.append(", "); sb.append("range:"); if (this.range == null) { sb.append("null"); } else { sb.append(this.range); } first = false; if (!first) sb.append(", "); sb.append("consistency_level:"); if (this.consistency_level == null) { sb.append("null"); } else { sb.append(this.consistency_level); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields if (keyspace == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'keyspace' was not present! Struct: " + toString()); } if (column_parent == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'column_parent' was not present! Struct: " + toString()); } if (predicate == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'predicate' was not present! Struct: " + toString()); } if (range == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'range' was not present! Struct: " + toString()); } if (consistency_level == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'consistency_level' was not present! Struct: " + toString()); } } 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); } } 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); } } } public static class get_range_slices_result implements org.apache.thrift.TBase<get_range_slices_result, get_range_slices_result._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_range_slices_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final org.apache.thrift.protocol.TField IRE_FIELD_DESC = new org.apache.thrift.protocol.TField("ire", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField UE_FIELD_DESC = new org.apache.thrift.protocol.TField("ue", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField TE_FIELD_DESC = new org.apache.thrift.protocol.TField("te", org.apache.thrift.protocol.TType.STRUCT, (short)3); public List<KeySlice> success; public InvalidRequestException ire; public UnavailableException ue; public TimedOutException te; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), IRE((short)1, "ire"), UE((short)2, "ue"), TE((short)3, "te"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // IRE return IRE; case 2: // UE return UE; case 3: // TE return TE; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, KeySlice.class)))); tmpMap.put(_Fields.IRE, new org.apache.thrift.meta_data.FieldMetaData("ire", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.UE, new org.apache.thrift.meta_data.FieldMetaData("ue", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.TE, new org.apache.thrift.meta_data.FieldMetaData("te", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_range_slices_result.class, metaDataMap); } public get_range_slices_result() { } public get_range_slices_result( List<KeySlice> success, InvalidRequestException ire, UnavailableException ue, TimedOutException te) { this(); this.success = success; this.ire = ire; this.ue = ue; this.te = te; } /** * Performs a deep copy on <i>other</i>. */ public get_range_slices_result(get_range_slices_result other) { if (other.isSetSuccess()) { List<KeySlice> __this__success = new ArrayList<KeySlice>(); for (KeySlice other_element : other.success) { __this__success.add(new KeySlice(other_element)); } this.success = __this__success; } if (other.isSetIre()) { this.ire = new InvalidRequestException(other.ire); } if (other.isSetUe()) { this.ue = new UnavailableException(other.ue); } if (other.isSetTe()) { this.te = new TimedOutException(other.te); } } public get_range_slices_result deepCopy() { return new get_range_slices_result(this); } @Override public void clear() { this.success = null; this.ire = null; this.ue = null; this.te = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } public java.util.Iterator<KeySlice> getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(KeySlice elem) { if (this.success == null) { this.success = new ArrayList<KeySlice>(); } this.success.add(elem); } public List<KeySlice> getSuccess() { return this.success; } public get_range_slices_result setSuccess(List<KeySlice> success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } public InvalidRequestException getIre() { return this.ire; } public get_range_slices_result setIre(InvalidRequestException ire) { this.ire = ire; return this; } public void unsetIre() { this.ire = null; } /** Returns true if field ire is set (has been assigned a value) and false otherwise */ public boolean isSetIre() { return this.ire != null; } public void setIreIsSet(boolean value) { if (!value) { this.ire = null; } } public UnavailableException getUe() { return this.ue; } public get_range_slices_result setUe(UnavailableException ue) { this.ue = ue; return this; } public void unsetUe() { this.ue = null; } /** Returns true if field ue is set (has been assigned a value) and false otherwise */ public boolean isSetUe() { return this.ue != null; } public void setUeIsSet(boolean value) { if (!value) { this.ue = null; } } public TimedOutException getTe() { return this.te; } public get_range_slices_result setTe(TimedOutException te) { this.te = te; return this; } public void unsetTe() { this.te = null; } /** Returns true if field te is set (has been assigned a value) and false otherwise */ public boolean isSetTe() { return this.te != null; } public void setTeIsSet(boolean value) { if (!value) { this.te = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((List<KeySlice>)value); } break; case IRE: if (value == null) { unsetIre(); } else { setIre((InvalidRequestException)value); } break; case UE: if (value == null) { unsetUe(); } else { setUe((UnavailableException)value); } break; case TE: if (value == null) { unsetTe(); } else { setTe((TimedOutException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case IRE: return getIre(); case UE: return getUe(); case TE: return getTe(); } throw new IllegalStateException(); } /** 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(); case IRE: return isSetIre(); case UE: return isSetUe(); case TE: return isSetTe(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_range_slices_result) return this.equals((get_range_slices_result)that); return false; } public boolean equals(get_range_slices_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; } boolean this_present_ire = true && this.isSetIre(); boolean that_present_ire = true && that.isSetIre(); if (this_present_ire || that_present_ire) { if (!(this_present_ire && that_present_ire)) return false; if (!this.ire.equals(that.ire)) return false; } boolean this_present_ue = true && this.isSetUe(); boolean that_present_ue = true && that.isSetUe(); if (this_present_ue || that_present_ue) { if (!(this_present_ue && that_present_ue)) return false; if (!this.ue.equals(that.ue)) return false; } boolean this_present_te = true && this.isSetTe(); boolean that_present_te = true && that.isSetTe(); if (this_present_te || that_present_te) { if (!(this_present_te && that_present_te)) return false; if (!this.te.equals(that.te)) 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); boolean present_ire = true && (isSetIre()); builder.append(present_ire); if (present_ire) builder.append(ire); boolean present_ue = true && (isSetUe()); builder.append(present_ue); if (present_ue) builder.append(ue); boolean present_te = true && (isSetTe()); builder.append(present_te); if (present_te) builder.append(te); return builder.toHashCode(); } public int compareTo(get_range_slices_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_range_slices_result typedOther = (get_range_slices_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; } } lastComparison = Boolean.valueOf(isSetIre()).compareTo(typedOther.isSetIre()); if (lastComparison != 0) { return lastComparison; } if (isSetIre()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ire, typedOther.ire); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetUe()).compareTo(typedOther.isSetUe()); if (lastComparison != 0) { return lastComparison; } if (isSetUe()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ue, typedOther.ue); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTe()).compareTo(typedOther.isSetTe()); if (lastComparison != 0) { return lastComparison; } if (isSetTe()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.te, typedOther.te); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 0: // SUCCESS if (field.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list51 = iprot.readListBegin(); this.success = new ArrayList<KeySlice>(_list51.size); for (int _i52 = 0; _i52 < _list51.size; ++_i52) { KeySlice _elem53; _elem53 = new KeySlice(); _elem53.read(iprot); this.success.add(_elem53); } iprot.readListEnd(); } } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 1: // IRE if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.ire = new InvalidRequestException(); this.ire.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // UE if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.ue = new UnavailableException(); this.ue.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 3: // TE if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.te = new TimedOutException(); this.te.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size())); for (KeySlice _iter54 : this.success) { _iter54.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } else if (this.isSetIre()) { oprot.writeFieldBegin(IRE_FIELD_DESC); this.ire.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetUe()) { oprot.writeFieldBegin(UE_FIELD_DESC); this.ue.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetTe()) { oprot.writeFieldBegin(TE_FIELD_DESC); this.te.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_range_slices_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("ire:"); if (this.ire == null) { sb.append("null"); } else { sb.append(this.ire); } first = false; if (!first) sb.append(", "); sb.append("ue:"); if (this.ue == null) { sb.append("null"); } else { sb.append(this.ue); } first = false; if (!first) sb.append(", "); sb.append("te:"); if (this.te == null) { sb.append("null"); } else { sb.append(this.te); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields } 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); } } 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); } } } public static class insert_args implements org.apache.thrift.TBase<insert_args, insert_args._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("insert_args"); private static final org.apache.thrift.protocol.TField KEYSPACE_FIELD_DESC = new org.apache.thrift.protocol.TField("keyspace", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField KEY_FIELD_DESC = new org.apache.thrift.protocol.TField("key", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField COLUMN_PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("column_path", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final org.apache.thrift.protocol.TField VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("value", org.apache.thrift.protocol.TType.STRING, (short)4); private static final org.apache.thrift.protocol.TField TIMESTAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("timestamp", org.apache.thrift.protocol.TType.I64, (short)5); private static final org.apache.thrift.protocol.TField CONSISTENCY_LEVEL_FIELD_DESC = new org.apache.thrift.protocol.TField("consistency_level", org.apache.thrift.protocol.TType.I32, (short)6); public String keyspace; public String key; public ColumnPath column_path; public ByteBuffer value; public long timestamp; /** * * @see ConsistencyLevel */ public ConsistencyLevel consistency_level; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { KEYSPACE((short)1, "keyspace"), KEY((short)2, "key"), COLUMN_PATH((short)3, "column_path"), VALUE((short)4, "value"), TIMESTAMP((short)5, "timestamp"), /** * * @see ConsistencyLevel */ CONSISTENCY_LEVEL((short)6, "consistency_level"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // KEYSPACE return KEYSPACE; case 2: // KEY return KEY; case 3: // COLUMN_PATH return COLUMN_PATH; case 4: // VALUE return VALUE; case 5: // TIMESTAMP return TIMESTAMP; case 6: // CONSISTENCY_LEVEL return CONSISTENCY_LEVEL; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments private static final int __TIMESTAMP_ISSET_ID = 0; private BitSet __isset_bit_vector = new BitSet(1); public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.KEYSPACE, new org.apache.thrift.meta_data.FieldMetaData("keyspace", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.KEY, new org.apache.thrift.meta_data.FieldMetaData("key", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.COLUMN_PATH, new org.apache.thrift.meta_data.FieldMetaData("column_path", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ColumnPath.class))); tmpMap.put(_Fields.VALUE, new org.apache.thrift.meta_data.FieldMetaData("value", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); tmpMap.put(_Fields.TIMESTAMP, new org.apache.thrift.meta_data.FieldMetaData("timestamp", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); tmpMap.put(_Fields.CONSISTENCY_LEVEL, new org.apache.thrift.meta_data.FieldMetaData("consistency_level", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ConsistencyLevel.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(insert_args.class, metaDataMap); } public insert_args() { this.consistency_level = org.apache.cassandra.thrift.ConsistencyLevel.ONE; } public insert_args( String keyspace, String key, ColumnPath column_path, ByteBuffer value, long timestamp, ConsistencyLevel consistency_level) { this(); this.keyspace = keyspace; this.key = key; this.column_path = column_path; this.value = value; this.timestamp = timestamp; setTimestampIsSet(true); this.consistency_level = consistency_level; } /** * Performs a deep copy on <i>other</i>. */ public insert_args(insert_args other) { __isset_bit_vector.clear(); __isset_bit_vector.or(other.__isset_bit_vector); if (other.isSetKeyspace()) { this.keyspace = other.keyspace; } if (other.isSetKey()) { this.key = other.key; } if (other.isSetColumn_path()) { this.column_path = new ColumnPath(other.column_path); } if (other.isSetValue()) { this.value = org.apache.thrift.TBaseHelper.copyBinary(other.value); ; } this.timestamp = other.timestamp; if (other.isSetConsistency_level()) { this.consistency_level = other.consistency_level; } } public insert_args deepCopy() { return new insert_args(this); } @Override public void clear() { this.keyspace = null; this.key = null; this.column_path = null; this.value = null; setTimestampIsSet(false); this.timestamp = 0; this.consistency_level = org.apache.cassandra.thrift.ConsistencyLevel.ONE; } public String getKeyspace() { return this.keyspace; } public insert_args setKeyspace(String keyspace) { this.keyspace = keyspace; return this; } public void unsetKeyspace() { this.keyspace = null; } /** Returns true if field keyspace is set (has been assigned a value) and false otherwise */ public boolean isSetKeyspace() { return this.keyspace != null; } public void setKeyspaceIsSet(boolean value) { if (!value) { this.keyspace = null; } } public String getKey() { return this.key; } public insert_args setKey(String key) { this.key = key; return this; } public void unsetKey() { this.key = null; } /** Returns true if field key is set (has been assigned a value) and false otherwise */ public boolean isSetKey() { return this.key != null; } public void setKeyIsSet(boolean value) { if (!value) { this.key = null; } } public ColumnPath getColumn_path() { return this.column_path; } public insert_args setColumn_path(ColumnPath column_path) { this.column_path = column_path; return this; } public void unsetColumn_path() { this.column_path = null; } /** Returns true if field column_path is set (has been assigned a value) and false otherwise */ public boolean isSetColumn_path() { return this.column_path != null; } public void setColumn_pathIsSet(boolean value) { if (!value) { this.column_path = null; } } public byte[] getValue() { setValue(org.apache.thrift.TBaseHelper.rightSize(value)); return value == null ? null : value.array(); } public ByteBuffer bufferForValue() { return value; } public insert_args setValue(byte[] value) { setValue(value == null ? (ByteBuffer)null : ByteBuffer.wrap(value)); return this; } public insert_args setValue(ByteBuffer value) { this.value = value; return this; } public void unsetValue() { this.value = null; } /** Returns true if field value is set (has been assigned a value) and false otherwise */ public boolean isSetValue() { return this.value != null; } public void setValueIsSet(boolean value) { if (!value) { this.value = null; } } public long getTimestamp() { return this.timestamp; } public insert_args setTimestamp(long timestamp) { this.timestamp = timestamp; setTimestampIsSet(true); return this; } public void unsetTimestamp() { __isset_bit_vector.clear(__TIMESTAMP_ISSET_ID); } /** Returns true if field timestamp is set (has been assigned a value) and false otherwise */ public boolean isSetTimestamp() { return __isset_bit_vector.get(__TIMESTAMP_ISSET_ID); } public void setTimestampIsSet(boolean value) { __isset_bit_vector.set(__TIMESTAMP_ISSET_ID, value); } /** * * @see ConsistencyLevel */ public ConsistencyLevel getConsistency_level() { return this.consistency_level; } /** * * @see ConsistencyLevel */ public insert_args setConsistency_level(ConsistencyLevel consistency_level) { this.consistency_level = consistency_level; return this; } public void unsetConsistency_level() { this.consistency_level = null; } /** Returns true if field consistency_level is set (has been assigned a value) and false otherwise */ public boolean isSetConsistency_level() { return this.consistency_level != null; } public void setConsistency_levelIsSet(boolean value) { if (!value) { this.consistency_level = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case KEYSPACE: if (value == null) { unsetKeyspace(); } else { setKeyspace((String)value); } break; case KEY: if (value == null) { unsetKey(); } else { setKey((String)value); } break; case COLUMN_PATH: if (value == null) { unsetColumn_path(); } else { setColumn_path((ColumnPath)value); } break; case VALUE: if (value == null) { unsetValue(); } else { setValue((ByteBuffer)value); } break; case TIMESTAMP: if (value == null) { unsetTimestamp(); } else { setTimestamp((Long)value); } break; case CONSISTENCY_LEVEL: if (value == null) { unsetConsistency_level(); } else { setConsistency_level((ConsistencyLevel)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case KEYSPACE: return getKeyspace(); case KEY: return getKey(); case COLUMN_PATH: return getColumn_path(); case VALUE: return getValue(); case TIMESTAMP: return new Long(getTimestamp()); case CONSISTENCY_LEVEL: return getConsistency_level(); } throw new IllegalStateException(); } /** 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 KEYSPACE: return isSetKeyspace(); case KEY: return isSetKey(); case COLUMN_PATH: return isSetColumn_path(); case VALUE: return isSetValue(); case TIMESTAMP: return isSetTimestamp(); case CONSISTENCY_LEVEL: return isSetConsistency_level(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof insert_args) return this.equals((insert_args)that); return false; } public boolean equals(insert_args that) { if (that == null) return false; boolean this_present_keyspace = true && this.isSetKeyspace(); boolean that_present_keyspace = true && that.isSetKeyspace(); if (this_present_keyspace || that_present_keyspace) { if (!(this_present_keyspace && that_present_keyspace)) return false; if (!this.keyspace.equals(that.keyspace)) return false; } boolean this_present_key = true && this.isSetKey(); boolean that_present_key = true && that.isSetKey(); if (this_present_key || that_present_key) { if (!(this_present_key && that_present_key)) return false; if (!this.key.equals(that.key)) return false; } boolean this_present_column_path = true && this.isSetColumn_path(); boolean that_present_column_path = true && that.isSetColumn_path(); if (this_present_column_path || that_present_column_path) { if (!(this_present_column_path && that_present_column_path)) return false; if (!this.column_path.equals(that.column_path)) return false; } boolean this_present_value = true && this.isSetValue(); boolean that_present_value = true && that.isSetValue(); if (this_present_value || that_present_value) { if (!(this_present_value && that_present_value)) return false; if (!this.value.equals(that.value)) return false; } boolean this_present_timestamp = true; boolean that_present_timestamp = true; if (this_present_timestamp || that_present_timestamp) { if (!(this_present_timestamp && that_present_timestamp)) return false; if (this.timestamp != that.timestamp) return false; } boolean this_present_consistency_level = true && this.isSetConsistency_level(); boolean that_present_consistency_level = true && that.isSetConsistency_level(); if (this_present_consistency_level || that_present_consistency_level) { if (!(this_present_consistency_level && that_present_consistency_level)) return false; if (!this.consistency_level.equals(that.consistency_level)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_keyspace = true && (isSetKeyspace()); builder.append(present_keyspace); if (present_keyspace) builder.append(keyspace); boolean present_key = true && (isSetKey()); builder.append(present_key); if (present_key) builder.append(key); boolean present_column_path = true && (isSetColumn_path()); builder.append(present_column_path); if (present_column_path) builder.append(column_path); boolean present_value = true && (isSetValue()); builder.append(present_value); if (present_value) builder.append(value); boolean present_timestamp = true; builder.append(present_timestamp); if (present_timestamp) builder.append(timestamp); boolean present_consistency_level = true && (isSetConsistency_level()); builder.append(present_consistency_level); if (present_consistency_level) builder.append(consistency_level.getValue()); return builder.toHashCode(); } public int compareTo(insert_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; insert_args typedOther = (insert_args)other; lastComparison = Boolean.valueOf(isSetKeyspace()).compareTo(typedOther.isSetKeyspace()); if (lastComparison != 0) { return lastComparison; } if (isSetKeyspace()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.keyspace, typedOther.keyspace); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetKey()).compareTo(typedOther.isSetKey()); if (lastComparison != 0) { return lastComparison; } if (isSetKey()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.key, typedOther.key); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetColumn_path()).compareTo(typedOther.isSetColumn_path()); if (lastComparison != 0) { return lastComparison; } if (isSetColumn_path()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.column_path, typedOther.column_path); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetValue()).compareTo(typedOther.isSetValue()); if (lastComparison != 0) { return lastComparison; } if (isSetValue()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, typedOther.value); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(typedOther.isSetTimestamp()); if (lastComparison != 0) { return lastComparison; } if (isSetTimestamp()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timestamp, typedOther.timestamp); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetConsistency_level()).compareTo(typedOther.isSetConsistency_level()); if (lastComparison != 0) { return lastComparison; } if (isSetConsistency_level()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.consistency_level, typedOther.consistency_level); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // KEYSPACE if (field.type == org.apache.thrift.protocol.TType.STRING) { this.keyspace = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // KEY if (field.type == org.apache.thrift.protocol.TType.STRING) { this.key = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 3: // COLUMN_PATH if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.column_path = new ColumnPath(); this.column_path.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 4: // VALUE if (field.type == org.apache.thrift.protocol.TType.STRING) { this.value = iprot.readBinary(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 5: // TIMESTAMP if (field.type == org.apache.thrift.protocol.TType.I64) { this.timestamp = iprot.readI64(); setTimestampIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 6: // CONSISTENCY_LEVEL if (field.type == org.apache.thrift.protocol.TType.I32) { this.consistency_level = ConsistencyLevel.findByValue(iprot.readI32()); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method if (!isSetTimestamp()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'timestamp' was not found in serialized data! Struct: " + toString()); } validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.keyspace != null) { oprot.writeFieldBegin(KEYSPACE_FIELD_DESC); oprot.writeString(this.keyspace); oprot.writeFieldEnd(); } if (this.key != null) { oprot.writeFieldBegin(KEY_FIELD_DESC); oprot.writeString(this.key); oprot.writeFieldEnd(); } if (this.column_path != null) { oprot.writeFieldBegin(COLUMN_PATH_FIELD_DESC); this.column_path.write(oprot); oprot.writeFieldEnd(); } if (this.value != null) { oprot.writeFieldBegin(VALUE_FIELD_DESC); oprot.writeBinary(this.value); oprot.writeFieldEnd(); } oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC); oprot.writeI64(this.timestamp); oprot.writeFieldEnd(); if (this.consistency_level != null) { oprot.writeFieldBegin(CONSISTENCY_LEVEL_FIELD_DESC); oprot.writeI32(this.consistency_level.getValue()); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("insert_args("); boolean first = true; sb.append("keyspace:"); if (this.keyspace == null) { sb.append("null"); } else { sb.append(this.keyspace); } first = false; if (!first) sb.append(", "); sb.append("key:"); if (this.key == null) { sb.append("null"); } else { sb.append(this.key); } first = false; if (!first) sb.append(", "); sb.append("column_path:"); if (this.column_path == null) { sb.append("null"); } else { sb.append(this.column_path); } first = false; if (!first) sb.append(", "); sb.append("value:"); if (this.value == null) { sb.append("null"); } else { org.apache.thrift.TBaseHelper.toString(this.value, sb); } first = false; if (!first) sb.append(", "); sb.append("timestamp:"); sb.append(this.timestamp); first = false; if (!first) sb.append(", "); sb.append("consistency_level:"); if (this.consistency_level == null) { sb.append("null"); } else { sb.append(this.consistency_level); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields if (keyspace == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'keyspace' was not present! Struct: " + toString()); } if (key == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'key' was not present! Struct: " + toString()); } if (column_path == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'column_path' was not present! Struct: " + toString()); } if (value == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'value' was not present! Struct: " + toString()); } // alas, we cannot check 'timestamp' because it's a primitive and you chose the non-beans generator. if (consistency_level == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'consistency_level' was not present! Struct: " + toString()); } } 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); } } 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); } } } public static class insert_result implements org.apache.thrift.TBase<insert_result, insert_result._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("insert_result"); private static final org.apache.thrift.protocol.TField IRE_FIELD_DESC = new org.apache.thrift.protocol.TField("ire", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField UE_FIELD_DESC = new org.apache.thrift.protocol.TField("ue", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField TE_FIELD_DESC = new org.apache.thrift.protocol.TField("te", org.apache.thrift.protocol.TType.STRUCT, (short)3); public InvalidRequestException ire; public UnavailableException ue; public TimedOutException te; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { IRE((short)1, "ire"), UE((short)2, "ue"), TE((short)3, "te"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // IRE return IRE; case 2: // UE return UE; case 3: // TE return TE; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.IRE, new org.apache.thrift.meta_data.FieldMetaData("ire", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.UE, new org.apache.thrift.meta_data.FieldMetaData("ue", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.TE, new org.apache.thrift.meta_data.FieldMetaData("te", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(insert_result.class, metaDataMap); } public insert_result() { } public insert_result( InvalidRequestException ire, UnavailableException ue, TimedOutException te) { this(); this.ire = ire; this.ue = ue; this.te = te; } /** * Performs a deep copy on <i>other</i>. */ public insert_result(insert_result other) { if (other.isSetIre()) { this.ire = new InvalidRequestException(other.ire); } if (other.isSetUe()) { this.ue = new UnavailableException(other.ue); } if (other.isSetTe()) { this.te = new TimedOutException(other.te); } } public insert_result deepCopy() { return new insert_result(this); } @Override public void clear() { this.ire = null; this.ue = null; this.te = null; } public InvalidRequestException getIre() { return this.ire; } public insert_result setIre(InvalidRequestException ire) { this.ire = ire; return this; } public void unsetIre() { this.ire = null; } /** Returns true if field ire is set (has been assigned a value) and false otherwise */ public boolean isSetIre() { return this.ire != null; } public void setIreIsSet(boolean value) { if (!value) { this.ire = null; } } public UnavailableException getUe() { return this.ue; } public insert_result setUe(UnavailableException ue) { this.ue = ue; return this; } public void unsetUe() { this.ue = null; } /** Returns true if field ue is set (has been assigned a value) and false otherwise */ public boolean isSetUe() { return this.ue != null; } public void setUeIsSet(boolean value) { if (!value) { this.ue = null; } } public TimedOutException getTe() { return this.te; } public insert_result setTe(TimedOutException te) { this.te = te; return this; } public void unsetTe() { this.te = null; } /** Returns true if field te is set (has been assigned a value) and false otherwise */ public boolean isSetTe() { return this.te != null; } public void setTeIsSet(boolean value) { if (!value) { this.te = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case IRE: if (value == null) { unsetIre(); } else { setIre((InvalidRequestException)value); } break; case UE: if (value == null) { unsetUe(); } else { setUe((UnavailableException)value); } break; case TE: if (value == null) { unsetTe(); } else { setTe((TimedOutException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case IRE: return getIre(); case UE: return getUe(); case TE: return getTe(); } throw new IllegalStateException(); } /** 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 IRE: return isSetIre(); case UE: return isSetUe(); case TE: return isSetTe(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof insert_result) return this.equals((insert_result)that); return false; } public boolean equals(insert_result that) { if (that == null) return false; boolean this_present_ire = true && this.isSetIre(); boolean that_present_ire = true && that.isSetIre(); if (this_present_ire || that_present_ire) { if (!(this_present_ire && that_present_ire)) return false; if (!this.ire.equals(that.ire)) return false; } boolean this_present_ue = true && this.isSetUe(); boolean that_present_ue = true && that.isSetUe(); if (this_present_ue || that_present_ue) { if (!(this_present_ue && that_present_ue)) return false; if (!this.ue.equals(that.ue)) return false; } boolean this_present_te = true && this.isSetTe(); boolean that_present_te = true && that.isSetTe(); if (this_present_te || that_present_te) { if (!(this_present_te && that_present_te)) return false; if (!this.te.equals(that.te)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_ire = true && (isSetIre()); builder.append(present_ire); if (present_ire) builder.append(ire); boolean present_ue = true && (isSetUe()); builder.append(present_ue); if (present_ue) builder.append(ue); boolean present_te = true && (isSetTe()); builder.append(present_te); if (present_te) builder.append(te); return builder.toHashCode(); } public int compareTo(insert_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; insert_result typedOther = (insert_result)other; lastComparison = Boolean.valueOf(isSetIre()).compareTo(typedOther.isSetIre()); if (lastComparison != 0) { return lastComparison; } if (isSetIre()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ire, typedOther.ire); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetUe()).compareTo(typedOther.isSetUe()); if (lastComparison != 0) { return lastComparison; } if (isSetUe()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ue, typedOther.ue); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTe()).compareTo(typedOther.isSetTe()); if (lastComparison != 0) { return lastComparison; } if (isSetTe()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.te, typedOther.te); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // IRE if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.ire = new InvalidRequestException(); this.ire.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // UE if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.ue = new UnavailableException(); this.ue.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 3: // TE if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.te = new TimedOutException(); this.te.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetIre()) { oprot.writeFieldBegin(IRE_FIELD_DESC); this.ire.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetUe()) { oprot.writeFieldBegin(UE_FIELD_DESC); this.ue.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetTe()) { oprot.writeFieldBegin(TE_FIELD_DESC); this.te.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("insert_result("); boolean first = true; sb.append("ire:"); if (this.ire == null) { sb.append("null"); } else { sb.append(this.ire); } first = false; if (!first) sb.append(", "); sb.append("ue:"); if (this.ue == null) { sb.append("null"); } else { sb.append(this.ue); } first = false; if (!first) sb.append(", "); sb.append("te:"); if (this.te == null) { sb.append("null"); } else { sb.append(this.te); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields } 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); } } 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); } } } public static class batch_insert_args implements org.apache.thrift.TBase<batch_insert_args, batch_insert_args._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("batch_insert_args"); private static final org.apache.thrift.protocol.TField KEYSPACE_FIELD_DESC = new org.apache.thrift.protocol.TField("keyspace", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField KEY_FIELD_DESC = new org.apache.thrift.protocol.TField("key", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField CFMAP_FIELD_DESC = new org.apache.thrift.protocol.TField("cfmap", org.apache.thrift.protocol.TType.MAP, (short)3); private static final org.apache.thrift.protocol.TField CONSISTENCY_LEVEL_FIELD_DESC = new org.apache.thrift.protocol.TField("consistency_level", org.apache.thrift.protocol.TType.I32, (short)4); public String keyspace; public String key; public Map<String,List<ColumnOrSuperColumn>> cfmap; /** * * @see ConsistencyLevel */ public ConsistencyLevel consistency_level; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { KEYSPACE((short)1, "keyspace"), KEY((short)2, "key"), CFMAP((short)3, "cfmap"), /** * * @see ConsistencyLevel */ CONSISTENCY_LEVEL((short)4, "consistency_level"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // KEYSPACE return KEYSPACE; case 2: // KEY return KEY; case 3: // CFMAP return CFMAP; case 4: // CONSISTENCY_LEVEL return CONSISTENCY_LEVEL; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.KEYSPACE, new org.apache.thrift.meta_data.FieldMetaData("keyspace", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.KEY, new org.apache.thrift.meta_data.FieldMetaData("key", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.CFMAP, new org.apache.thrift.meta_data.FieldMetaData("cfmap", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ColumnOrSuperColumn.class))))); tmpMap.put(_Fields.CONSISTENCY_LEVEL, new org.apache.thrift.meta_data.FieldMetaData("consistency_level", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ConsistencyLevel.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(batch_insert_args.class, metaDataMap); } public batch_insert_args() { this.consistency_level = org.apache.cassandra.thrift.ConsistencyLevel.ONE; } public batch_insert_args( String keyspace, String key, Map<String,List<ColumnOrSuperColumn>> cfmap, ConsistencyLevel consistency_level) { this(); this.keyspace = keyspace; this.key = key; this.cfmap = cfmap; this.consistency_level = consistency_level; } /** * Performs a deep copy on <i>other</i>. */ public batch_insert_args(batch_insert_args other) { if (other.isSetKeyspace()) { this.keyspace = other.keyspace; } if (other.isSetKey()) { this.key = other.key; } if (other.isSetCfmap()) { Map<String,List<ColumnOrSuperColumn>> __this__cfmap = new HashMap<String,List<ColumnOrSuperColumn>>(); for (Map.Entry<String, List<ColumnOrSuperColumn>> other_element : other.cfmap.entrySet()) { String other_element_key = other_element.getKey(); List<ColumnOrSuperColumn> other_element_value = other_element.getValue(); String __this__cfmap_copy_key = other_element_key; List<ColumnOrSuperColumn> __this__cfmap_copy_value = new ArrayList<ColumnOrSuperColumn>(); for (ColumnOrSuperColumn other_element_value_element : other_element_value) { __this__cfmap_copy_value.add(new ColumnOrSuperColumn(other_element_value_element)); } __this__cfmap.put(__this__cfmap_copy_key, __this__cfmap_copy_value); } this.cfmap = __this__cfmap; } if (other.isSetConsistency_level()) { this.consistency_level = other.consistency_level; } } public batch_insert_args deepCopy() { return new batch_insert_args(this); } @Override public void clear() { this.keyspace = null; this.key = null; this.cfmap = null; this.consistency_level = org.apache.cassandra.thrift.ConsistencyLevel.ONE; } public String getKeyspace() { return this.keyspace; } public batch_insert_args setKeyspace(String keyspace) { this.keyspace = keyspace; return this; } public void unsetKeyspace() { this.keyspace = null; } /** Returns true if field keyspace is set (has been assigned a value) and false otherwise */ public boolean isSetKeyspace() { return this.keyspace != null; } public void setKeyspaceIsSet(boolean value) { if (!value) { this.keyspace = null; } } public String getKey() { return this.key; } public batch_insert_args setKey(String key) { this.key = key; return this; } public void unsetKey() { this.key = null; } /** Returns true if field key is set (has been assigned a value) and false otherwise */ public boolean isSetKey() { return this.key != null; } public void setKeyIsSet(boolean value) { if (!value) { this.key = null; } } public int getCfmapSize() { return (this.cfmap == null) ? 0 : this.cfmap.size(); } public void putToCfmap(String key, List<ColumnOrSuperColumn> val) { if (this.cfmap == null) { this.cfmap = new HashMap<String,List<ColumnOrSuperColumn>>(); } this.cfmap.put(key, val); } public Map<String,List<ColumnOrSuperColumn>> getCfmap() { return this.cfmap; } public batch_insert_args setCfmap(Map<String,List<ColumnOrSuperColumn>> cfmap) { this.cfmap = cfmap; return this; } public void unsetCfmap() { this.cfmap = null; } /** Returns true if field cfmap is set (has been assigned a value) and false otherwise */ public boolean isSetCfmap() { return this.cfmap != null; } public void setCfmapIsSet(boolean value) { if (!value) { this.cfmap = null; } } /** * * @see ConsistencyLevel */ public ConsistencyLevel getConsistency_level() { return this.consistency_level; } /** * * @see ConsistencyLevel */ public batch_insert_args setConsistency_level(ConsistencyLevel consistency_level) { this.consistency_level = consistency_level; return this; } public void unsetConsistency_level() { this.consistency_level = null; } /** Returns true if field consistency_level is set (has been assigned a value) and false otherwise */ public boolean isSetConsistency_level() { return this.consistency_level != null; } public void setConsistency_levelIsSet(boolean value) { if (!value) { this.consistency_level = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case KEYSPACE: if (value == null) { unsetKeyspace(); } else { setKeyspace((String)value); } break; case KEY: if (value == null) { unsetKey(); } else { setKey((String)value); } break; case CFMAP: if (value == null) { unsetCfmap(); } else { setCfmap((Map<String,List<ColumnOrSuperColumn>>)value); } break; case CONSISTENCY_LEVEL: if (value == null) { unsetConsistency_level(); } else { setConsistency_level((ConsistencyLevel)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case KEYSPACE: return getKeyspace(); case KEY: return getKey(); case CFMAP: return getCfmap(); case CONSISTENCY_LEVEL: return getConsistency_level(); } throw new IllegalStateException(); } /** 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 KEYSPACE: return isSetKeyspace(); case KEY: return isSetKey(); case CFMAP: return isSetCfmap(); case CONSISTENCY_LEVEL: return isSetConsistency_level(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof batch_insert_args) return this.equals((batch_insert_args)that); return false; } public boolean equals(batch_insert_args that) { if (that == null) return false; boolean this_present_keyspace = true && this.isSetKeyspace(); boolean that_present_keyspace = true && that.isSetKeyspace(); if (this_present_keyspace || that_present_keyspace) { if (!(this_present_keyspace && that_present_keyspace)) return false; if (!this.keyspace.equals(that.keyspace)) return false; } boolean this_present_key = true && this.isSetKey(); boolean that_present_key = true && that.isSetKey(); if (this_present_key || that_present_key) { if (!(this_present_key && that_present_key)) return false; if (!this.key.equals(that.key)) return false; } boolean this_present_cfmap = true && this.isSetCfmap(); boolean that_present_cfmap = true && that.isSetCfmap(); if (this_present_cfmap || that_present_cfmap) { if (!(this_present_cfmap && that_present_cfmap)) return false; if (!this.cfmap.equals(that.cfmap)) return false; } boolean this_present_consistency_level = true && this.isSetConsistency_level(); boolean that_present_consistency_level = true && that.isSetConsistency_level(); if (this_present_consistency_level || that_present_consistency_level) { if (!(this_present_consistency_level && that_present_consistency_level)) return false; if (!this.consistency_level.equals(that.consistency_level)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_keyspace = true && (isSetKeyspace()); builder.append(present_keyspace); if (present_keyspace) builder.append(keyspace); boolean present_key = true && (isSetKey()); builder.append(present_key); if (present_key) builder.append(key); boolean present_cfmap = true && (isSetCfmap()); builder.append(present_cfmap); if (present_cfmap) builder.append(cfmap); boolean present_consistency_level = true && (isSetConsistency_level()); builder.append(present_consistency_level); if (present_consistency_level) builder.append(consistency_level.getValue()); return builder.toHashCode(); } public int compareTo(batch_insert_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; batch_insert_args typedOther = (batch_insert_args)other; lastComparison = Boolean.valueOf(isSetKeyspace()).compareTo(typedOther.isSetKeyspace()); if (lastComparison != 0) { return lastComparison; } if (isSetKeyspace()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.keyspace, typedOther.keyspace); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetKey()).compareTo(typedOther.isSetKey()); if (lastComparison != 0) { return lastComparison; } if (isSetKey()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.key, typedOther.key); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetCfmap()).compareTo(typedOther.isSetCfmap()); if (lastComparison != 0) { return lastComparison; } if (isSetCfmap()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cfmap, typedOther.cfmap); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetConsistency_level()).compareTo(typedOther.isSetConsistency_level()); if (lastComparison != 0) { return lastComparison; } if (isSetConsistency_level()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.consistency_level, typedOther.consistency_level); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // KEYSPACE if (field.type == org.apache.thrift.protocol.TType.STRING) { this.keyspace = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // KEY if (field.type == org.apache.thrift.protocol.TType.STRING) { this.key = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 3: // CFMAP if (field.type == org.apache.thrift.protocol.TType.MAP) { { org.apache.thrift.protocol.TMap _map55 = iprot.readMapBegin(); this.cfmap = new HashMap<String,List<ColumnOrSuperColumn>>(2*_map55.size); for (int _i56 = 0; _i56 < _map55.size; ++_i56) { String _key57; List<ColumnOrSuperColumn> _val58; _key57 = iprot.readString(); { org.apache.thrift.protocol.TList _list59 = iprot.readListBegin(); _val58 = new ArrayList<ColumnOrSuperColumn>(_list59.size); for (int _i60 = 0; _i60 < _list59.size; ++_i60) { ColumnOrSuperColumn _elem61; _elem61 = new ColumnOrSuperColumn(); _elem61.read(iprot); _val58.add(_elem61); } iprot.readListEnd(); } this.cfmap.put(_key57, _val58); } iprot.readMapEnd(); } } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 4: // CONSISTENCY_LEVEL if (field.type == org.apache.thrift.protocol.TType.I32) { this.consistency_level = ConsistencyLevel.findByValue(iprot.readI32()); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.keyspace != null) { oprot.writeFieldBegin(KEYSPACE_FIELD_DESC); oprot.writeString(this.keyspace); oprot.writeFieldEnd(); } if (this.key != null) { oprot.writeFieldBegin(KEY_FIELD_DESC); oprot.writeString(this.key); oprot.writeFieldEnd(); } if (this.cfmap != null) { oprot.writeFieldBegin(CFMAP_FIELD_DESC); { oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.LIST, this.cfmap.size())); for (Map.Entry<String, List<ColumnOrSuperColumn>> _iter62 : this.cfmap.entrySet()) { oprot.writeString(_iter62.getKey()); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, _iter62.getValue().size())); for (ColumnOrSuperColumn _iter63 : _iter62.getValue()) { _iter63.write(oprot); } oprot.writeListEnd(); } } oprot.writeMapEnd(); } oprot.writeFieldEnd(); } if (this.consistency_level != null) { oprot.writeFieldBegin(CONSISTENCY_LEVEL_FIELD_DESC); oprot.writeI32(this.consistency_level.getValue()); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("batch_insert_args("); boolean first = true; sb.append("keyspace:"); if (this.keyspace == null) { sb.append("null"); } else { sb.append(this.keyspace); } first = false; if (!first) sb.append(", "); sb.append("key:"); if (this.key == null) { sb.append("null"); } else { sb.append(this.key); } first = false; if (!first) sb.append(", "); sb.append("cfmap:"); if (this.cfmap == null) { sb.append("null"); } else { sb.append(this.cfmap); } first = false; if (!first) sb.append(", "); sb.append("consistency_level:"); if (this.consistency_level == null) { sb.append("null"); } else { sb.append(this.consistency_level); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields if (keyspace == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'keyspace' was not present! Struct: " + toString()); } if (key == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'key' was not present! Struct: " + toString()); } if (cfmap == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'cfmap' was not present! Struct: " + toString()); } if (consistency_level == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'consistency_level' was not present! Struct: " + toString()); } } 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); } } 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); } } } public static class batch_insert_result implements org.apache.thrift.TBase<batch_insert_result, batch_insert_result._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("batch_insert_result"); private static final org.apache.thrift.protocol.TField IRE_FIELD_DESC = new org.apache.thrift.protocol.TField("ire", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField UE_FIELD_DESC = new org.apache.thrift.protocol.TField("ue", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField TE_FIELD_DESC = new org.apache.thrift.protocol.TField("te", org.apache.thrift.protocol.TType.STRUCT, (short)3); public InvalidRequestException ire; public UnavailableException ue; public TimedOutException te; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { IRE((short)1, "ire"), UE((short)2, "ue"), TE((short)3, "te"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // IRE return IRE; case 2: // UE return UE; case 3: // TE return TE; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.IRE, new org.apache.thrift.meta_data.FieldMetaData("ire", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.UE, new org.apache.thrift.meta_data.FieldMetaData("ue", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.TE, new org.apache.thrift.meta_data.FieldMetaData("te", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(batch_insert_result.class, metaDataMap); } public batch_insert_result() { } public batch_insert_result( InvalidRequestException ire, UnavailableException ue, TimedOutException te) { this(); this.ire = ire; this.ue = ue; this.te = te; } /** * Performs a deep copy on <i>other</i>. */ public batch_insert_result(batch_insert_result other) { if (other.isSetIre()) { this.ire = new InvalidRequestException(other.ire); } if (other.isSetUe()) { this.ue = new UnavailableException(other.ue); } if (other.isSetTe()) { this.te = new TimedOutException(other.te); } } public batch_insert_result deepCopy() { return new batch_insert_result(this); } @Override public void clear() { this.ire = null; this.ue = null; this.te = null; } public InvalidRequestException getIre() { return this.ire; } public batch_insert_result setIre(InvalidRequestException ire) { this.ire = ire; return this; } public void unsetIre() { this.ire = null; } /** Returns true if field ire is set (has been assigned a value) and false otherwise */ public boolean isSetIre() { return this.ire != null; } public void setIreIsSet(boolean value) { if (!value) { this.ire = null; } } public UnavailableException getUe() { return this.ue; } public batch_insert_result setUe(UnavailableException ue) { this.ue = ue; return this; } public void unsetUe() { this.ue = null; } /** Returns true if field ue is set (has been assigned a value) and false otherwise */ public boolean isSetUe() { return this.ue != null; } public void setUeIsSet(boolean value) { if (!value) { this.ue = null; } } public TimedOutException getTe() { return this.te; } public batch_insert_result setTe(TimedOutException te) { this.te = te; return this; } public void unsetTe() { this.te = null; } /** Returns true if field te is set (has been assigned a value) and false otherwise */ public boolean isSetTe() { return this.te != null; } public void setTeIsSet(boolean value) { if (!value) { this.te = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case IRE: if (value == null) { unsetIre(); } else { setIre((InvalidRequestException)value); } break; case UE: if (value == null) { unsetUe(); } else { setUe((UnavailableException)value); } break; case TE: if (value == null) { unsetTe(); } else { setTe((TimedOutException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case IRE: return getIre(); case UE: return getUe(); case TE: return getTe(); } throw new IllegalStateException(); } /** 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 IRE: return isSetIre(); case UE: return isSetUe(); case TE: return isSetTe(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof batch_insert_result) return this.equals((batch_insert_result)that); return false; } public boolean equals(batch_insert_result that) { if (that == null) return false; boolean this_present_ire = true && this.isSetIre(); boolean that_present_ire = true && that.isSetIre(); if (this_present_ire || that_present_ire) { if (!(this_present_ire && that_present_ire)) return false; if (!this.ire.equals(that.ire)) return false; } boolean this_present_ue = true && this.isSetUe(); boolean that_present_ue = true && that.isSetUe(); if (this_present_ue || that_present_ue) { if (!(this_present_ue && that_present_ue)) return false; if (!this.ue.equals(that.ue)) return false; } boolean this_present_te = true && this.isSetTe(); boolean that_present_te = true && that.isSetTe(); if (this_present_te || that_present_te) { if (!(this_present_te && that_present_te)) return false; if (!this.te.equals(that.te)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_ire = true && (isSetIre()); builder.append(present_ire); if (present_ire) builder.append(ire); boolean present_ue = true && (isSetUe()); builder.append(present_ue); if (present_ue) builder.append(ue); boolean present_te = true && (isSetTe()); builder.append(present_te); if (present_te) builder.append(te); return builder.toHashCode(); } public int compareTo(batch_insert_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; batch_insert_result typedOther = (batch_insert_result)other; lastComparison = Boolean.valueOf(isSetIre()).compareTo(typedOther.isSetIre()); if (lastComparison != 0) { return lastComparison; } if (isSetIre()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ire, typedOther.ire); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetUe()).compareTo(typedOther.isSetUe()); if (lastComparison != 0) { return lastComparison; } if (isSetUe()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ue, typedOther.ue); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTe()).compareTo(typedOther.isSetTe()); if (lastComparison != 0) { return lastComparison; } if (isSetTe()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.te, typedOther.te); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // IRE if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.ire = new InvalidRequestException(); this.ire.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // UE if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.ue = new UnavailableException(); this.ue.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 3: // TE if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.te = new TimedOutException(); this.te.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetIre()) { oprot.writeFieldBegin(IRE_FIELD_DESC); this.ire.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetUe()) { oprot.writeFieldBegin(UE_FIELD_DESC); this.ue.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetTe()) { oprot.writeFieldBegin(TE_FIELD_DESC); this.te.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("batch_insert_result("); boolean first = true; sb.append("ire:"); if (this.ire == null) { sb.append("null"); } else { sb.append(this.ire); } first = false; if (!first) sb.append(", "); sb.append("ue:"); if (this.ue == null) { sb.append("null"); } else { sb.append(this.ue); } first = false; if (!first) sb.append(", "); sb.append("te:"); if (this.te == null) { sb.append("null"); } else { sb.append(this.te); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields } 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); } } 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); } } } public static class remove_args implements org.apache.thrift.TBase<remove_args, remove_args._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("remove_args"); private static final org.apache.thrift.protocol.TField KEYSPACE_FIELD_DESC = new org.apache.thrift.protocol.TField("keyspace", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField KEY_FIELD_DESC = new org.apache.thrift.protocol.TField("key", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField COLUMN_PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("column_path", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final org.apache.thrift.protocol.TField TIMESTAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("timestamp", org.apache.thrift.protocol.TType.I64, (short)4); private static final org.apache.thrift.protocol.TField CONSISTENCY_LEVEL_FIELD_DESC = new org.apache.thrift.protocol.TField("consistency_level", org.apache.thrift.protocol.TType.I32, (short)5); public String keyspace; public String key; public ColumnPath column_path; public long timestamp; /** * * @see ConsistencyLevel */ public ConsistencyLevel consistency_level; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { KEYSPACE((short)1, "keyspace"), KEY((short)2, "key"), COLUMN_PATH((short)3, "column_path"), TIMESTAMP((short)4, "timestamp"), /** * * @see ConsistencyLevel */ CONSISTENCY_LEVEL((short)5, "consistency_level"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // KEYSPACE return KEYSPACE; case 2: // KEY return KEY; case 3: // COLUMN_PATH return COLUMN_PATH; case 4: // TIMESTAMP return TIMESTAMP; case 5: // CONSISTENCY_LEVEL return CONSISTENCY_LEVEL; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments private static final int __TIMESTAMP_ISSET_ID = 0; private BitSet __isset_bit_vector = new BitSet(1); public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.KEYSPACE, new org.apache.thrift.meta_data.FieldMetaData("keyspace", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.KEY, new org.apache.thrift.meta_data.FieldMetaData("key", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.COLUMN_PATH, new org.apache.thrift.meta_data.FieldMetaData("column_path", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ColumnPath.class))); tmpMap.put(_Fields.TIMESTAMP, new org.apache.thrift.meta_data.FieldMetaData("timestamp", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); tmpMap.put(_Fields.CONSISTENCY_LEVEL, new org.apache.thrift.meta_data.FieldMetaData("consistency_level", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ConsistencyLevel.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(remove_args.class, metaDataMap); } public remove_args() { this.consistency_level = org.apache.cassandra.thrift.ConsistencyLevel.ONE; } public remove_args( String keyspace, String key, ColumnPath column_path, long timestamp, ConsistencyLevel consistency_level) { this(); this.keyspace = keyspace; this.key = key; this.column_path = column_path; this.timestamp = timestamp; setTimestampIsSet(true); this.consistency_level = consistency_level; } /** * Performs a deep copy on <i>other</i>. */ public remove_args(remove_args other) { __isset_bit_vector.clear(); __isset_bit_vector.or(other.__isset_bit_vector); if (other.isSetKeyspace()) { this.keyspace = other.keyspace; } if (other.isSetKey()) { this.key = other.key; } if (other.isSetColumn_path()) { this.column_path = new ColumnPath(other.column_path); } this.timestamp = other.timestamp; if (other.isSetConsistency_level()) { this.consistency_level = other.consistency_level; } } public remove_args deepCopy() { return new remove_args(this); } @Override public void clear() { this.keyspace = null; this.key = null; this.column_path = null; setTimestampIsSet(false); this.timestamp = 0; this.consistency_level = org.apache.cassandra.thrift.ConsistencyLevel.ONE; } public String getKeyspace() { return this.keyspace; } public remove_args setKeyspace(String keyspace) { this.keyspace = keyspace; return this; } public void unsetKeyspace() { this.keyspace = null; } /** Returns true if field keyspace is set (has been assigned a value) and false otherwise */ public boolean isSetKeyspace() { return this.keyspace != null; } public void setKeyspaceIsSet(boolean value) { if (!value) { this.keyspace = null; } } public String getKey() { return this.key; } public remove_args setKey(String key) { this.key = key; return this; } public void unsetKey() { this.key = null; } /** Returns true if field key is set (has been assigned a value) and false otherwise */ public boolean isSetKey() { return this.key != null; } public void setKeyIsSet(boolean value) { if (!value) { this.key = null; } } public ColumnPath getColumn_path() { return this.column_path; } public remove_args setColumn_path(ColumnPath column_path) { this.column_path = column_path; return this; } public void unsetColumn_path() { this.column_path = null; } /** Returns true if field column_path is set (has been assigned a value) and false otherwise */ public boolean isSetColumn_path() { return this.column_path != null; } public void setColumn_pathIsSet(boolean value) { if (!value) { this.column_path = null; } } public long getTimestamp() { return this.timestamp; } public remove_args setTimestamp(long timestamp) { this.timestamp = timestamp; setTimestampIsSet(true); return this; } public void unsetTimestamp() { __isset_bit_vector.clear(__TIMESTAMP_ISSET_ID); } /** Returns true if field timestamp is set (has been assigned a value) and false otherwise */ public boolean isSetTimestamp() { return __isset_bit_vector.get(__TIMESTAMP_ISSET_ID); } public void setTimestampIsSet(boolean value) { __isset_bit_vector.set(__TIMESTAMP_ISSET_ID, value); } /** * * @see ConsistencyLevel */ public ConsistencyLevel getConsistency_level() { return this.consistency_level; } /** * * @see ConsistencyLevel */ public remove_args setConsistency_level(ConsistencyLevel consistency_level) { this.consistency_level = consistency_level; return this; } public void unsetConsistency_level() { this.consistency_level = null; } /** Returns true if field consistency_level is set (has been assigned a value) and false otherwise */ public boolean isSetConsistency_level() { return this.consistency_level != null; } public void setConsistency_levelIsSet(boolean value) { if (!value) { this.consistency_level = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case KEYSPACE: if (value == null) { unsetKeyspace(); } else { setKeyspace((String)value); } break; case KEY: if (value == null) { unsetKey(); } else { setKey((String)value); } break; case COLUMN_PATH: if (value == null) { unsetColumn_path(); } else { setColumn_path((ColumnPath)value); } break; case TIMESTAMP: if (value == null) { unsetTimestamp(); } else { setTimestamp((Long)value); } break; case CONSISTENCY_LEVEL: if (value == null) { unsetConsistency_level(); } else { setConsistency_level((ConsistencyLevel)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case KEYSPACE: return getKeyspace(); case KEY: return getKey(); case COLUMN_PATH: return getColumn_path(); case TIMESTAMP: return new Long(getTimestamp()); case CONSISTENCY_LEVEL: return getConsistency_level(); } throw new IllegalStateException(); } /** 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 KEYSPACE: return isSetKeyspace(); case KEY: return isSetKey(); case COLUMN_PATH: return isSetColumn_path(); case TIMESTAMP: return isSetTimestamp(); case CONSISTENCY_LEVEL: return isSetConsistency_level(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof remove_args) return this.equals((remove_args)that); return false; } public boolean equals(remove_args that) { if (that == null) return false; boolean this_present_keyspace = true && this.isSetKeyspace(); boolean that_present_keyspace = true && that.isSetKeyspace(); if (this_present_keyspace || that_present_keyspace) { if (!(this_present_keyspace && that_present_keyspace)) return false; if (!this.keyspace.equals(that.keyspace)) return false; } boolean this_present_key = true && this.isSetKey(); boolean that_present_key = true && that.isSetKey(); if (this_present_key || that_present_key) { if (!(this_present_key && that_present_key)) return false; if (!this.key.equals(that.key)) return false; } boolean this_present_column_path = true && this.isSetColumn_path(); boolean that_present_column_path = true && that.isSetColumn_path(); if (this_present_column_path || that_present_column_path) { if (!(this_present_column_path && that_present_column_path)) return false; if (!this.column_path.equals(that.column_path)) return false; } boolean this_present_timestamp = true; boolean that_present_timestamp = true; if (this_present_timestamp || that_present_timestamp) { if (!(this_present_timestamp && that_present_timestamp)) return false; if (this.timestamp != that.timestamp) return false; } boolean this_present_consistency_level = true && this.isSetConsistency_level(); boolean that_present_consistency_level = true && that.isSetConsistency_level(); if (this_present_consistency_level || that_present_consistency_level) { if (!(this_present_consistency_level && that_present_consistency_level)) return false; if (!this.consistency_level.equals(that.consistency_level)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_keyspace = true && (isSetKeyspace()); builder.append(present_keyspace); if (present_keyspace) builder.append(keyspace); boolean present_key = true && (isSetKey()); builder.append(present_key); if (present_key) builder.append(key); boolean present_column_path = true && (isSetColumn_path()); builder.append(present_column_path); if (present_column_path) builder.append(column_path); boolean present_timestamp = true; builder.append(present_timestamp); if (present_timestamp) builder.append(timestamp); boolean present_consistency_level = true && (isSetConsistency_level()); builder.append(present_consistency_level); if (present_consistency_level) builder.append(consistency_level.getValue()); return builder.toHashCode(); } public int compareTo(remove_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; remove_args typedOther = (remove_args)other; lastComparison = Boolean.valueOf(isSetKeyspace()).compareTo(typedOther.isSetKeyspace()); if (lastComparison != 0) { return lastComparison; } if (isSetKeyspace()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.keyspace, typedOther.keyspace); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetKey()).compareTo(typedOther.isSetKey()); if (lastComparison != 0) { return lastComparison; } if (isSetKey()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.key, typedOther.key); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetColumn_path()).compareTo(typedOther.isSetColumn_path()); if (lastComparison != 0) { return lastComparison; } if (isSetColumn_path()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.column_path, typedOther.column_path); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(typedOther.isSetTimestamp()); if (lastComparison != 0) { return lastComparison; } if (isSetTimestamp()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timestamp, typedOther.timestamp); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetConsistency_level()).compareTo(typedOther.isSetConsistency_level()); if (lastComparison != 0) { return lastComparison; } if (isSetConsistency_level()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.consistency_level, typedOther.consistency_level); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // KEYSPACE if (field.type == org.apache.thrift.protocol.TType.STRING) { this.keyspace = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // KEY if (field.type == org.apache.thrift.protocol.TType.STRING) { this.key = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 3: // COLUMN_PATH if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.column_path = new ColumnPath(); this.column_path.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 4: // TIMESTAMP if (field.type == org.apache.thrift.protocol.TType.I64) { this.timestamp = iprot.readI64(); setTimestampIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 5: // CONSISTENCY_LEVEL if (field.type == org.apache.thrift.protocol.TType.I32) { this.consistency_level = ConsistencyLevel.findByValue(iprot.readI32()); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method if (!isSetTimestamp()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'timestamp' was not found in serialized data! Struct: " + toString()); } validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.keyspace != null) { oprot.writeFieldBegin(KEYSPACE_FIELD_DESC); oprot.writeString(this.keyspace); oprot.writeFieldEnd(); } if (this.key != null) { oprot.writeFieldBegin(KEY_FIELD_DESC); oprot.writeString(this.key); oprot.writeFieldEnd(); } if (this.column_path != null) { oprot.writeFieldBegin(COLUMN_PATH_FIELD_DESC); this.column_path.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC); oprot.writeI64(this.timestamp); oprot.writeFieldEnd(); if (this.consistency_level != null) { oprot.writeFieldBegin(CONSISTENCY_LEVEL_FIELD_DESC); oprot.writeI32(this.consistency_level.getValue()); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("remove_args("); boolean first = true; sb.append("keyspace:"); if (this.keyspace == null) { sb.append("null"); } else { sb.append(this.keyspace); } first = false; if (!first) sb.append(", "); sb.append("key:"); if (this.key == null) { sb.append("null"); } else { sb.append(this.key); } first = false; if (!first) sb.append(", "); sb.append("column_path:"); if (this.column_path == null) { sb.append("null"); } else { sb.append(this.column_path); } first = false; if (!first) sb.append(", "); sb.append("timestamp:"); sb.append(this.timestamp); first = false; if (!first) sb.append(", "); sb.append("consistency_level:"); if (this.consistency_level == null) { sb.append("null"); } else { sb.append(this.consistency_level); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields if (keyspace == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'keyspace' was not present! Struct: " + toString()); } if (key == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'key' was not present! Struct: " + toString()); } if (column_path == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'column_path' was not present! Struct: " + toString()); } // alas, we cannot check 'timestamp' because it's a primitive and you chose the non-beans generator. } 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); } } 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); } } } public static class remove_result implements org.apache.thrift.TBase<remove_result, remove_result._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("remove_result"); private static final org.apache.thrift.protocol.TField IRE_FIELD_DESC = new org.apache.thrift.protocol.TField("ire", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField UE_FIELD_DESC = new org.apache.thrift.protocol.TField("ue", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField TE_FIELD_DESC = new org.apache.thrift.protocol.TField("te", org.apache.thrift.protocol.TType.STRUCT, (short)3); public InvalidRequestException ire; public UnavailableException ue; public TimedOutException te; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { IRE((short)1, "ire"), UE((short)2, "ue"), TE((short)3, "te"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // IRE return IRE; case 2: // UE return UE; case 3: // TE return TE; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.IRE, new org.apache.thrift.meta_data.FieldMetaData("ire", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.UE, new org.apache.thrift.meta_data.FieldMetaData("ue", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.TE, new org.apache.thrift.meta_data.FieldMetaData("te", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(remove_result.class, metaDataMap); } public remove_result() { } public remove_result( InvalidRequestException ire, UnavailableException ue, TimedOutException te) { this(); this.ire = ire; this.ue = ue; this.te = te; } /** * Performs a deep copy on <i>other</i>. */ public remove_result(remove_result other) { if (other.isSetIre()) { this.ire = new InvalidRequestException(other.ire); } if (other.isSetUe()) { this.ue = new UnavailableException(other.ue); } if (other.isSetTe()) { this.te = new TimedOutException(other.te); } } public remove_result deepCopy() { return new remove_result(this); } @Override public void clear() { this.ire = null; this.ue = null; this.te = null; } public InvalidRequestException getIre() { return this.ire; } public remove_result setIre(InvalidRequestException ire) { this.ire = ire; return this; } public void unsetIre() { this.ire = null; } /** Returns true if field ire is set (has been assigned a value) and false otherwise */ public boolean isSetIre() { return this.ire != null; } public void setIreIsSet(boolean value) { if (!value) { this.ire = null; } } public UnavailableException getUe() { return this.ue; } public remove_result setUe(UnavailableException ue) { this.ue = ue; return this; } public void unsetUe() { this.ue = null; } /** Returns true if field ue is set (has been assigned a value) and false otherwise */ public boolean isSetUe() { return this.ue != null; } public void setUeIsSet(boolean value) { if (!value) { this.ue = null; } } public TimedOutException getTe() { return this.te; } public remove_result setTe(TimedOutException te) { this.te = te; return this; } public void unsetTe() { this.te = null; } /** Returns true if field te is set (has been assigned a value) and false otherwise */ public boolean isSetTe() { return this.te != null; } public void setTeIsSet(boolean value) { if (!value) { this.te = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case IRE: if (value == null) { unsetIre(); } else { setIre((InvalidRequestException)value); } break; case UE: if (value == null) { unsetUe(); } else { setUe((UnavailableException)value); } break; case TE: if (value == null) { unsetTe(); } else { setTe((TimedOutException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case IRE: return getIre(); case UE: return getUe(); case TE: return getTe(); } throw new IllegalStateException(); } /** 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 IRE: return isSetIre(); case UE: return isSetUe(); case TE: return isSetTe(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof remove_result) return this.equals((remove_result)that); return false; } public boolean equals(remove_result that) { if (that == null) return false; boolean this_present_ire = true && this.isSetIre(); boolean that_present_ire = true && that.isSetIre(); if (this_present_ire || that_present_ire) { if (!(this_present_ire && that_present_ire)) return false; if (!this.ire.equals(that.ire)) return false; } boolean this_present_ue = true && this.isSetUe(); boolean that_present_ue = true && that.isSetUe(); if (this_present_ue || that_present_ue) { if (!(this_present_ue && that_present_ue)) return false; if (!this.ue.equals(that.ue)) return false; } boolean this_present_te = true && this.isSetTe(); boolean that_present_te = true && that.isSetTe(); if (this_present_te || that_present_te) { if (!(this_present_te && that_present_te)) return false; if (!this.te.equals(that.te)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_ire = true && (isSetIre()); builder.append(present_ire); if (present_ire) builder.append(ire); boolean present_ue = true && (isSetUe()); builder.append(present_ue); if (present_ue) builder.append(ue); boolean present_te = true && (isSetTe()); builder.append(present_te); if (present_te) builder.append(te); return builder.toHashCode(); } public int compareTo(remove_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; remove_result typedOther = (remove_result)other; lastComparison = Boolean.valueOf(isSetIre()).compareTo(typedOther.isSetIre()); if (lastComparison != 0) { return lastComparison; } if (isSetIre()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ire, typedOther.ire); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetUe()).compareTo(typedOther.isSetUe()); if (lastComparison != 0) { return lastComparison; } if (isSetUe()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ue, typedOther.ue); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTe()).compareTo(typedOther.isSetTe()); if (lastComparison != 0) { return lastComparison; } if (isSetTe()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.te, typedOther.te); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // IRE if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.ire = new InvalidRequestException(); this.ire.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // UE if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.ue = new UnavailableException(); this.ue.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 3: // TE if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.te = new TimedOutException(); this.te.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetIre()) { oprot.writeFieldBegin(IRE_FIELD_DESC); this.ire.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetUe()) { oprot.writeFieldBegin(UE_FIELD_DESC); this.ue.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetTe()) { oprot.writeFieldBegin(TE_FIELD_DESC); this.te.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("remove_result("); boolean first = true; sb.append("ire:"); if (this.ire == null) { sb.append("null"); } else { sb.append(this.ire); } first = false; if (!first) sb.append(", "); sb.append("ue:"); if (this.ue == null) { sb.append("null"); } else { sb.append(this.ue); } first = false; if (!first) sb.append(", "); sb.append("te:"); if (this.te == null) { sb.append("null"); } else { sb.append(this.te); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields } 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); } } 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); } } } public static class batch_mutate_args implements org.apache.thrift.TBase<batch_mutate_args, batch_mutate_args._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("batch_mutate_args"); private static final org.apache.thrift.protocol.TField KEYSPACE_FIELD_DESC = new org.apache.thrift.protocol.TField("keyspace", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField MUTATION_MAP_FIELD_DESC = new org.apache.thrift.protocol.TField("mutation_map", org.apache.thrift.protocol.TType.MAP, (short)2); private static final org.apache.thrift.protocol.TField CONSISTENCY_LEVEL_FIELD_DESC = new org.apache.thrift.protocol.TField("consistency_level", org.apache.thrift.protocol.TType.I32, (short)3); public String keyspace; public Map<String,Map<String,List<Mutation>>> mutation_map; /** * * @see ConsistencyLevel */ public ConsistencyLevel consistency_level; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { KEYSPACE((short)1, "keyspace"), MUTATION_MAP((short)2, "mutation_map"), /** * * @see ConsistencyLevel */ CONSISTENCY_LEVEL((short)3, "consistency_level"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // KEYSPACE return KEYSPACE; case 2: // MUTATION_MAP return MUTATION_MAP; case 3: // CONSISTENCY_LEVEL return CONSISTENCY_LEVEL; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.KEYSPACE, new org.apache.thrift.meta_data.FieldMetaData("keyspace", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.MUTATION_MAP, new org.apache.thrift.meta_data.FieldMetaData("mutation_map", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Mutation.class)))))); tmpMap.put(_Fields.CONSISTENCY_LEVEL, new org.apache.thrift.meta_data.FieldMetaData("consistency_level", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ConsistencyLevel.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(batch_mutate_args.class, metaDataMap); } public batch_mutate_args() { this.consistency_level = org.apache.cassandra.thrift.ConsistencyLevel.ONE; } public batch_mutate_args( String keyspace, Map<String,Map<String,List<Mutation>>> mutation_map, ConsistencyLevel consistency_level) { this(); this.keyspace = keyspace; this.mutation_map = mutation_map; this.consistency_level = consistency_level; } /** * Performs a deep copy on <i>other</i>. */ public batch_mutate_args(batch_mutate_args other) { if (other.isSetKeyspace()) { this.keyspace = other.keyspace; } if (other.isSetMutation_map()) { Map<String,Map<String,List<Mutation>>> __this__mutation_map = new HashMap<String,Map<String,List<Mutation>>>(); for (Map.Entry<String, Map<String,List<Mutation>>> other_element : other.mutation_map.entrySet()) { String other_element_key = other_element.getKey(); Map<String,List<Mutation>> other_element_value = other_element.getValue(); String __this__mutation_map_copy_key = other_element_key; Map<String,List<Mutation>> __this__mutation_map_copy_value = new HashMap<String,List<Mutation>>(); for (Map.Entry<String, List<Mutation>> other_element_value_element : other_element_value.entrySet()) { String other_element_value_element_key = other_element_value_element.getKey(); List<Mutation> other_element_value_element_value = other_element_value_element.getValue(); String __this__mutation_map_copy_value_copy_key = other_element_value_element_key; List<Mutation> __this__mutation_map_copy_value_copy_value = new ArrayList<Mutation>(); for (Mutation other_element_value_element_value_element : other_element_value_element_value) { __this__mutation_map_copy_value_copy_value.add(new Mutation(other_element_value_element_value_element)); } __this__mutation_map_copy_value.put(__this__mutation_map_copy_value_copy_key, __this__mutation_map_copy_value_copy_value); } __this__mutation_map.put(__this__mutation_map_copy_key, __this__mutation_map_copy_value); } this.mutation_map = __this__mutation_map; } if (other.isSetConsistency_level()) { this.consistency_level = other.consistency_level; } } public batch_mutate_args deepCopy() { return new batch_mutate_args(this); } @Override public void clear() { this.keyspace = null; this.mutation_map = null; this.consistency_level = org.apache.cassandra.thrift.ConsistencyLevel.ONE; } public String getKeyspace() { return this.keyspace; } public batch_mutate_args setKeyspace(String keyspace) { this.keyspace = keyspace; return this; } public void unsetKeyspace() { this.keyspace = null; } /** Returns true if field keyspace is set (has been assigned a value) and false otherwise */ public boolean isSetKeyspace() { return this.keyspace != null; } public void setKeyspaceIsSet(boolean value) { if (!value) { this.keyspace = null; } } public int getMutation_mapSize() { return (this.mutation_map == null) ? 0 : this.mutation_map.size(); } public void putToMutation_map(String key, Map<String,List<Mutation>> val) { if (this.mutation_map == null) { this.mutation_map = new HashMap<String,Map<String,List<Mutation>>>(); } this.mutation_map.put(key, val); } public Map<String,Map<String,List<Mutation>>> getMutation_map() { return this.mutation_map; } public batch_mutate_args setMutation_map(Map<String,Map<String,List<Mutation>>> mutation_map) { this.mutation_map = mutation_map; return this; } public void unsetMutation_map() { this.mutation_map = null; } /** Returns true if field mutation_map is set (has been assigned a value) and false otherwise */ public boolean isSetMutation_map() { return this.mutation_map != null; } public void setMutation_mapIsSet(boolean value) { if (!value) { this.mutation_map = null; } } /** * * @see ConsistencyLevel */ public ConsistencyLevel getConsistency_level() { return this.consistency_level; } /** * * @see ConsistencyLevel */ public batch_mutate_args setConsistency_level(ConsistencyLevel consistency_level) { this.consistency_level = consistency_level; return this; } public void unsetConsistency_level() { this.consistency_level = null; } /** Returns true if field consistency_level is set (has been assigned a value) and false otherwise */ public boolean isSetConsistency_level() { return this.consistency_level != null; } public void setConsistency_levelIsSet(boolean value) { if (!value) { this.consistency_level = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case KEYSPACE: if (value == null) { unsetKeyspace(); } else { setKeyspace((String)value); } break; case MUTATION_MAP: if (value == null) { unsetMutation_map(); } else { setMutation_map((Map<String,Map<String,List<Mutation>>>)value); } break; case CONSISTENCY_LEVEL: if (value == null) { unsetConsistency_level(); } else { setConsistency_level((ConsistencyLevel)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case KEYSPACE: return getKeyspace(); case MUTATION_MAP: return getMutation_map(); case CONSISTENCY_LEVEL: return getConsistency_level(); } throw new IllegalStateException(); } /** 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 KEYSPACE: return isSetKeyspace(); case MUTATION_MAP: return isSetMutation_map(); case CONSISTENCY_LEVEL: return isSetConsistency_level(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof batch_mutate_args) return this.equals((batch_mutate_args)that); return false; } public boolean equals(batch_mutate_args that) { if (that == null) return false; boolean this_present_keyspace = true && this.isSetKeyspace(); boolean that_present_keyspace = true && that.isSetKeyspace(); if (this_present_keyspace || that_present_keyspace) { if (!(this_present_keyspace && that_present_keyspace)) return false; if (!this.keyspace.equals(that.keyspace)) return false; } boolean this_present_mutation_map = true && this.isSetMutation_map(); boolean that_present_mutation_map = true && that.isSetMutation_map(); if (this_present_mutation_map || that_present_mutation_map) { if (!(this_present_mutation_map && that_present_mutation_map)) return false; if (!this.mutation_map.equals(that.mutation_map)) return false; } boolean this_present_consistency_level = true && this.isSetConsistency_level(); boolean that_present_consistency_level = true && that.isSetConsistency_level(); if (this_present_consistency_level || that_present_consistency_level) { if (!(this_present_consistency_level && that_present_consistency_level)) return false; if (!this.consistency_level.equals(that.consistency_level)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_keyspace = true && (isSetKeyspace()); builder.append(present_keyspace); if (present_keyspace) builder.append(keyspace); boolean present_mutation_map = true && (isSetMutation_map()); builder.append(present_mutation_map); if (present_mutation_map) builder.append(mutation_map); boolean present_consistency_level = true && (isSetConsistency_level()); builder.append(present_consistency_level); if (present_consistency_level) builder.append(consistency_level.getValue()); return builder.toHashCode(); } public int compareTo(batch_mutate_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; batch_mutate_args typedOther = (batch_mutate_args)other; lastComparison = Boolean.valueOf(isSetKeyspace()).compareTo(typedOther.isSetKeyspace()); if (lastComparison != 0) { return lastComparison; } if (isSetKeyspace()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.keyspace, typedOther.keyspace); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetMutation_map()).compareTo(typedOther.isSetMutation_map()); if (lastComparison != 0) { return lastComparison; } if (isSetMutation_map()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.mutation_map, typedOther.mutation_map); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetConsistency_level()).compareTo(typedOther.isSetConsistency_level()); if (lastComparison != 0) { return lastComparison; } if (isSetConsistency_level()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.consistency_level, typedOther.consistency_level); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // KEYSPACE if (field.type == org.apache.thrift.protocol.TType.STRING) { this.keyspace = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // MUTATION_MAP if (field.type == org.apache.thrift.protocol.TType.MAP) { { org.apache.thrift.protocol.TMap _map64 = iprot.readMapBegin(); this.mutation_map = new HashMap<String,Map<String,List<Mutation>>>(2*_map64.size); for (int _i65 = 0; _i65 < _map64.size; ++_i65) { String _key66; Map<String,List<Mutation>> _val67; _key66 = iprot.readString(); { org.apache.thrift.protocol.TMap _map68 = iprot.readMapBegin(); _val67 = new HashMap<String,List<Mutation>>(2*_map68.size); for (int _i69 = 0; _i69 < _map68.size; ++_i69) { String _key70; List<Mutation> _val71; _key70 = iprot.readString(); { org.apache.thrift.protocol.TList _list72 = iprot.readListBegin(); _val71 = new ArrayList<Mutation>(_list72.size); for (int _i73 = 0; _i73 < _list72.size; ++_i73) { Mutation _elem74; _elem74 = new Mutation(); _elem74.read(iprot); _val71.add(_elem74); } iprot.readListEnd(); } _val67.put(_key70, _val71); } iprot.readMapEnd(); } this.mutation_map.put(_key66, _val67); } iprot.readMapEnd(); } } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 3: // CONSISTENCY_LEVEL if (field.type == org.apache.thrift.protocol.TType.I32) { this.consistency_level = ConsistencyLevel.findByValue(iprot.readI32()); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.keyspace != null) { oprot.writeFieldBegin(KEYSPACE_FIELD_DESC); oprot.writeString(this.keyspace); oprot.writeFieldEnd(); } if (this.mutation_map != null) { oprot.writeFieldBegin(MUTATION_MAP_FIELD_DESC); { oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.MAP, this.mutation_map.size())); for (Map.Entry<String, Map<String,List<Mutation>>> _iter75 : this.mutation_map.entrySet()) { oprot.writeString(_iter75.getKey()); { oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.LIST, _iter75.getValue().size())); for (Map.Entry<String, List<Mutation>> _iter76 : _iter75.getValue().entrySet()) { oprot.writeString(_iter76.getKey()); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, _iter76.getValue().size())); for (Mutation _iter77 : _iter76.getValue()) { _iter77.write(oprot); } oprot.writeListEnd(); } } oprot.writeMapEnd(); } } oprot.writeMapEnd(); } oprot.writeFieldEnd(); } if (this.consistency_level != null) { oprot.writeFieldBegin(CONSISTENCY_LEVEL_FIELD_DESC); oprot.writeI32(this.consistency_level.getValue()); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("batch_mutate_args("); boolean first = true; sb.append("keyspace:"); if (this.keyspace == null) { sb.append("null"); } else { sb.append(this.keyspace); } first = false; if (!first) sb.append(", "); sb.append("mutation_map:"); if (this.mutation_map == null) { sb.append("null"); } else { sb.append(this.mutation_map); } first = false; if (!first) sb.append(", "); sb.append("consistency_level:"); if (this.consistency_level == null) { sb.append("null"); } else { sb.append(this.consistency_level); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields if (keyspace == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'keyspace' was not present! Struct: " + toString()); } if (mutation_map == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'mutation_map' was not present! Struct: " + toString()); } if (consistency_level == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'consistency_level' was not present! Struct: " + toString()); } } 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); } } 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); } } } public static class batch_mutate_result implements org.apache.thrift.TBase<batch_mutate_result, batch_mutate_result._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("batch_mutate_result"); private static final org.apache.thrift.protocol.TField IRE_FIELD_DESC = new org.apache.thrift.protocol.TField("ire", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField UE_FIELD_DESC = new org.apache.thrift.protocol.TField("ue", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField TE_FIELD_DESC = new org.apache.thrift.protocol.TField("te", org.apache.thrift.protocol.TType.STRUCT, (short)3); public InvalidRequestException ire; public UnavailableException ue; public TimedOutException te; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { IRE((short)1, "ire"), UE((short)2, "ue"), TE((short)3, "te"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // IRE return IRE; case 2: // UE return UE; case 3: // TE return TE; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.IRE, new org.apache.thrift.meta_data.FieldMetaData("ire", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.UE, new org.apache.thrift.meta_data.FieldMetaData("ue", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.TE, new org.apache.thrift.meta_data.FieldMetaData("te", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(batch_mutate_result.class, metaDataMap); } public batch_mutate_result() { } public batch_mutate_result( InvalidRequestException ire, UnavailableException ue, TimedOutException te) { this(); this.ire = ire; this.ue = ue; this.te = te; } /** * Performs a deep copy on <i>other</i>. */ public batch_mutate_result(batch_mutate_result other) { if (other.isSetIre()) { this.ire = new InvalidRequestException(other.ire); } if (other.isSetUe()) { this.ue = new UnavailableException(other.ue); } if (other.isSetTe()) { this.te = new TimedOutException(other.te); } } public batch_mutate_result deepCopy() { return new batch_mutate_result(this); } @Override public void clear() { this.ire = null; this.ue = null; this.te = null; } public InvalidRequestException getIre() { return this.ire; } public batch_mutate_result setIre(InvalidRequestException ire) { this.ire = ire; return this; } public void unsetIre() { this.ire = null; } /** Returns true if field ire is set (has been assigned a value) and false otherwise */ public boolean isSetIre() { return this.ire != null; } public void setIreIsSet(boolean value) { if (!value) { this.ire = null; } } public UnavailableException getUe() { return this.ue; } public batch_mutate_result setUe(UnavailableException ue) { this.ue = ue; return this; } public void unsetUe() { this.ue = null; } /** Returns true if field ue is set (has been assigned a value) and false otherwise */ public boolean isSetUe() { return this.ue != null; } public void setUeIsSet(boolean value) { if (!value) { this.ue = null; } } public TimedOutException getTe() { return this.te; } public batch_mutate_result setTe(TimedOutException te) { this.te = te; return this; } public void unsetTe() { this.te = null; } /** Returns true if field te is set (has been assigned a value) and false otherwise */ public boolean isSetTe() { return this.te != null; } public void setTeIsSet(boolean value) { if (!value) { this.te = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case IRE: if (value == null) { unsetIre(); } else { setIre((InvalidRequestException)value); } break; case UE: if (value == null) { unsetUe(); } else { setUe((UnavailableException)value); } break; case TE: if (value == null) { unsetTe(); } else { setTe((TimedOutException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case IRE: return getIre(); case UE: return getUe(); case TE: return getTe(); } throw new IllegalStateException(); } /** 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 IRE: return isSetIre(); case UE: return isSetUe(); case TE: return isSetTe(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof batch_mutate_result) return this.equals((batch_mutate_result)that); return false; } public boolean equals(batch_mutate_result that) { if (that == null) return false; boolean this_present_ire = true && this.isSetIre(); boolean that_present_ire = true && that.isSetIre(); if (this_present_ire || that_present_ire) { if (!(this_present_ire && that_present_ire)) return false; if (!this.ire.equals(that.ire)) return false; } boolean this_present_ue = true && this.isSetUe(); boolean that_present_ue = true && that.isSetUe(); if (this_present_ue || that_present_ue) { if (!(this_present_ue && that_present_ue)) return false; if (!this.ue.equals(that.ue)) return false; } boolean this_present_te = true && this.isSetTe(); boolean that_present_te = true && that.isSetTe(); if (this_present_te || that_present_te) { if (!(this_present_te && that_present_te)) return false; if (!this.te.equals(that.te)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_ire = true && (isSetIre()); builder.append(present_ire); if (present_ire) builder.append(ire); boolean present_ue = true && (isSetUe()); builder.append(present_ue); if (present_ue) builder.append(ue); boolean present_te = true && (isSetTe()); builder.append(present_te); if (present_te) builder.append(te); return builder.toHashCode(); } public int compareTo(batch_mutate_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; batch_mutate_result typedOther = (batch_mutate_result)other; lastComparison = Boolean.valueOf(isSetIre()).compareTo(typedOther.isSetIre()); if (lastComparison != 0) { return lastComparison; } if (isSetIre()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ire, typedOther.ire); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetUe()).compareTo(typedOther.isSetUe()); if (lastComparison != 0) { return lastComparison; } if (isSetUe()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ue, typedOther.ue); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTe()).compareTo(typedOther.isSetTe()); if (lastComparison != 0) { return lastComparison; } if (isSetTe()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.te, typedOther.te); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // IRE if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.ire = new InvalidRequestException(); this.ire.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // UE if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.ue = new UnavailableException(); this.ue.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 3: // TE if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.te = new TimedOutException(); this.te.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetIre()) { oprot.writeFieldBegin(IRE_FIELD_DESC); this.ire.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetUe()) { oprot.writeFieldBegin(UE_FIELD_DESC); this.ue.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetTe()) { oprot.writeFieldBegin(TE_FIELD_DESC); this.te.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("batch_mutate_result("); boolean first = true; sb.append("ire:"); if (this.ire == null) { sb.append("null"); } else { sb.append(this.ire); } first = false; if (!first) sb.append(", "); sb.append("ue:"); if (this.ue == null) { sb.append("null"); } else { sb.append(this.ue); } first = false; if (!first) sb.append(", "); sb.append("te:"); if (this.te == null) { sb.append("null"); } else { sb.append(this.te); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields } 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); } } 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); } } } public static class get_string_property_args implements org.apache.thrift.TBase<get_string_property_args, get_string_property_args._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_string_property_args"); private static final org.apache.thrift.protocol.TField PROPERTY_FIELD_DESC = new org.apache.thrift.protocol.TField("property", org.apache.thrift.protocol.TType.STRING, (short)1); public String property; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { PROPERTY((short)1, "property"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // PROPERTY return PROPERTY; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.PROPERTY, new org.apache.thrift.meta_data.FieldMetaData("property", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_string_property_args.class, metaDataMap); } public get_string_property_args() { } public get_string_property_args( String property) { this(); this.property = property; } /** * Performs a deep copy on <i>other</i>. */ public get_string_property_args(get_string_property_args other) { if (other.isSetProperty()) { this.property = other.property; } } public get_string_property_args deepCopy() { return new get_string_property_args(this); } @Override public void clear() { this.property = null; } public String getProperty() { return this.property; } public get_string_property_args setProperty(String property) { this.property = property; return this; } public void unsetProperty() { this.property = null; } /** Returns true if field property is set (has been assigned a value) and false otherwise */ public boolean isSetProperty() { return this.property != null; } public void setPropertyIsSet(boolean value) { if (!value) { this.property = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case PROPERTY: if (value == null) { unsetProperty(); } else { setProperty((String)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case PROPERTY: return getProperty(); } throw new IllegalStateException(); } /** 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 PROPERTY: return isSetProperty(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_string_property_args) return this.equals((get_string_property_args)that); return false; } public boolean equals(get_string_property_args that) { if (that == null) return false; boolean this_present_property = true && this.isSetProperty(); boolean that_present_property = true && that.isSetProperty(); if (this_present_property || that_present_property) { if (!(this_present_property && that_present_property)) return false; if (!this.property.equals(that.property)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_property = true && (isSetProperty()); builder.append(present_property); if (present_property) builder.append(property); return builder.toHashCode(); } public int compareTo(get_string_property_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_string_property_args typedOther = (get_string_property_args)other; lastComparison = Boolean.valueOf(isSetProperty()).compareTo(typedOther.isSetProperty()); if (lastComparison != 0) { return lastComparison; } if (isSetProperty()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.property, typedOther.property); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // PROPERTY if (field.type == org.apache.thrift.protocol.TType.STRING) { this.property = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.property != null) { oprot.writeFieldBegin(PROPERTY_FIELD_DESC); oprot.writeString(this.property); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_string_property_args("); boolean first = true; sb.append("property:"); if (this.property == null) { sb.append("null"); } else { sb.append(this.property); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields if (property == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'property' was not present! Struct: " + toString()); } } 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); } } 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); } } } public static class get_string_property_result implements org.apache.thrift.TBase<get_string_property_result, get_string_property_result._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_string_property_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0); public String success; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_string_property_result.class, metaDataMap); } public get_string_property_result() { } public get_string_property_result( String success) { this(); this.success = success; } /** * Performs a deep copy on <i>other</i>. */ public get_string_property_result(get_string_property_result other) { if (other.isSetSuccess()) { this.success = other.success; } } public get_string_property_result deepCopy() { return new get_string_property_result(this); } @Override public void clear() { this.success = null; } public String getSuccess() { return this.success; } public get_string_property_result setSuccess(String success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((String)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); } throw new IllegalStateException(); } /** 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(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_string_property_result) return this.equals((get_string_property_result)that); return false; } public boolean equals(get_string_property_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(); } public int compareTo(get_string_property_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_string_property_result typedOther = (get_string_property_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 _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 0: // SUCCESS if (field.type == org.apache.thrift.protocol.TType.STRING) { this.success = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeString(this.success); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_string_property_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields } 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); } } 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); } } } public static class get_string_list_property_args implements org.apache.thrift.TBase<get_string_list_property_args, get_string_list_property_args._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_string_list_property_args"); private static final org.apache.thrift.protocol.TField PROPERTY_FIELD_DESC = new org.apache.thrift.protocol.TField("property", org.apache.thrift.protocol.TType.STRING, (short)1); public String property; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { PROPERTY((short)1, "property"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // PROPERTY return PROPERTY; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.PROPERTY, new org.apache.thrift.meta_data.FieldMetaData("property", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_string_list_property_args.class, metaDataMap); } public get_string_list_property_args() { } public get_string_list_property_args( String property) { this(); this.property = property; } /** * Performs a deep copy on <i>other</i>. */ public get_string_list_property_args(get_string_list_property_args other) { if (other.isSetProperty()) { this.property = other.property; } } public get_string_list_property_args deepCopy() { return new get_string_list_property_args(this); } @Override public void clear() { this.property = null; } public String getProperty() { return this.property; } public get_string_list_property_args setProperty(String property) { this.property = property; return this; } public void unsetProperty() { this.property = null; } /** Returns true if field property is set (has been assigned a value) and false otherwise */ public boolean isSetProperty() { return this.property != null; } public void setPropertyIsSet(boolean value) { if (!value) { this.property = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case PROPERTY: if (value == null) { unsetProperty(); } else { setProperty((String)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case PROPERTY: return getProperty(); } throw new IllegalStateException(); } /** 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 PROPERTY: return isSetProperty(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_string_list_property_args) return this.equals((get_string_list_property_args)that); return false; } public boolean equals(get_string_list_property_args that) { if (that == null) return false; boolean this_present_property = true && this.isSetProperty(); boolean that_present_property = true && that.isSetProperty(); if (this_present_property || that_present_property) { if (!(this_present_property && that_present_property)) return false; if (!this.property.equals(that.property)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_property = true && (isSetProperty()); builder.append(present_property); if (present_property) builder.append(property); return builder.toHashCode(); } public int compareTo(get_string_list_property_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_string_list_property_args typedOther = (get_string_list_property_args)other; lastComparison = Boolean.valueOf(isSetProperty()).compareTo(typedOther.isSetProperty()); if (lastComparison != 0) { return lastComparison; } if (isSetProperty()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.property, typedOther.property); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // PROPERTY if (field.type == org.apache.thrift.protocol.TType.STRING) { this.property = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.property != null) { oprot.writeFieldBegin(PROPERTY_FIELD_DESC); oprot.writeString(this.property); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_string_list_property_args("); boolean first = true; sb.append("property:"); if (this.property == null) { sb.append("null"); } else { sb.append(this.property); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields if (property == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'property' was not present! Struct: " + toString()); } } 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); } } 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); } } } public static class get_string_list_property_result implements org.apache.thrift.TBase<get_string_list_property_result, get_string_list_property_result._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_string_list_property_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); public List<String> success; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_string_list_property_result.class, metaDataMap); } public get_string_list_property_result() { } public get_string_list_property_result( List<String> success) { this(); this.success = success; } /** * Performs a deep copy on <i>other</i>. */ public get_string_list_property_result(get_string_list_property_result other) { if (other.isSetSuccess()) { List<String> __this__success = new ArrayList<String>(); for (String other_element : other.success) { __this__success.add(other_element); } this.success = __this__success; } } public get_string_list_property_result deepCopy() { return new get_string_list_property_result(this); } @Override public void clear() { this.success = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } public java.util.Iterator<String> getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(String elem) { if (this.success == null) { this.success = new ArrayList<String>(); } this.success.add(elem); } public List<String> getSuccess() { return this.success; } public get_string_list_property_result setSuccess(List<String> success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((List<String>)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); } throw new IllegalStateException(); } /** 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(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_string_list_property_result) return this.equals((get_string_list_property_result)that); return false; } public boolean equals(get_string_list_property_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(); } public int compareTo(get_string_list_property_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_string_list_property_result typedOther = (get_string_list_property_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 _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 0: // SUCCESS if (field.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list78 = iprot.readListBegin(); this.success = new ArrayList<String>(_list78.size); for (int _i79 = 0; _i79 < _list78.size; ++_i79) { String _elem80; _elem80 = iprot.readString(); this.success.add(_elem80); } iprot.readListEnd(); } } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.success.size())); for (String _iter81 : this.success) { oprot.writeString(_iter81); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_string_list_property_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields } 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); } } 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); } } } public static class describe_keyspaces_args implements org.apache.thrift.TBase<describe_keyspaces_args, describe_keyspaces_args._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("describe_keyspaces_args"); /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { ; private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(describe_keyspaces_args.class, metaDataMap); } public describe_keyspaces_args() { } /** * Performs a deep copy on <i>other</i>. */ public describe_keyspaces_args(describe_keyspaces_args other) { } public describe_keyspaces_args deepCopy() { return new describe_keyspaces_args(this); } @Override public void clear() { } public void setFieldValue(_Fields field, Object value) { switch (field) { } } public Object getFieldValue(_Fields field) { switch (field) { } throw new IllegalStateException(); } /** 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) { } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof describe_keyspaces_args) return this.equals((describe_keyspaces_args)that); return false; } public boolean equals(describe_keyspaces_args that) { if (that == null) return false; return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); return builder.toHashCode(); } public int compareTo(describe_keyspaces_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; describe_keyspaces_args typedOther = (describe_keyspaces_args)other; return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("describe_keyspaces_args("); boolean first = true; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields } 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); } } 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); } } } public static class describe_keyspaces_result implements org.apache.thrift.TBase<describe_keyspaces_result, describe_keyspaces_result._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("describe_keyspaces_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.SET, (short)0); public Set<String> success; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.SetMetaData(org.apache.thrift.protocol.TType.SET, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(describe_keyspaces_result.class, metaDataMap); } public describe_keyspaces_result() { } public describe_keyspaces_result( Set<String> success) { this(); this.success = success; } /** * Performs a deep copy on <i>other</i>. */ public describe_keyspaces_result(describe_keyspaces_result other) { if (other.isSetSuccess()) { Set<String> __this__success = new HashSet<String>(); for (String other_element : other.success) { __this__success.add(other_element); } this.success = __this__success; } } public describe_keyspaces_result deepCopy() { return new describe_keyspaces_result(this); } @Override public void clear() { this.success = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } public java.util.Iterator<String> getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(String elem) { if (this.success == null) { this.success = new HashSet<String>(); } this.success.add(elem); } public Set<String> getSuccess() { return this.success; } public describe_keyspaces_result setSuccess(Set<String> success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((Set<String>)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); } throw new IllegalStateException(); } /** 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(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof describe_keyspaces_result) return this.equals((describe_keyspaces_result)that); return false; } public boolean equals(describe_keyspaces_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(); } public int compareTo(describe_keyspaces_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; describe_keyspaces_result typedOther = (describe_keyspaces_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 _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 0: // SUCCESS if (field.type == org.apache.thrift.protocol.TType.SET) { { org.apache.thrift.protocol.TSet _set82 = iprot.readSetBegin(); this.success = new HashSet<String>(2*_set82.size); for (int _i83 = 0; _i83 < _set82.size; ++_i83) { String _elem84; _elem84 = iprot.readString(); this.success.add(_elem84); } iprot.readSetEnd(); } } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, this.success.size())); for (String _iter85 : this.success) { oprot.writeString(_iter85); } oprot.writeSetEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("describe_keyspaces_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields } 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); } } 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); } } } public static class describe_cluster_name_args implements org.apache.thrift.TBase<describe_cluster_name_args, describe_cluster_name_args._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("describe_cluster_name_args"); /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { ; private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(describe_cluster_name_args.class, metaDataMap); } public describe_cluster_name_args() { } /** * Performs a deep copy on <i>other</i>. */ public describe_cluster_name_args(describe_cluster_name_args other) { } public describe_cluster_name_args deepCopy() { return new describe_cluster_name_args(this); } @Override public void clear() { } public void setFieldValue(_Fields field, Object value) { switch (field) { } } public Object getFieldValue(_Fields field) { switch (field) { } throw new IllegalStateException(); } /** 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) { } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof describe_cluster_name_args) return this.equals((describe_cluster_name_args)that); return false; } public boolean equals(describe_cluster_name_args that) { if (that == null) return false; return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); return builder.toHashCode(); } public int compareTo(describe_cluster_name_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; describe_cluster_name_args typedOther = (describe_cluster_name_args)other; return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("describe_cluster_name_args("); boolean first = true; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields } 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); } } 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); } } } public static class describe_cluster_name_result implements org.apache.thrift.TBase<describe_cluster_name_result, describe_cluster_name_result._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("describe_cluster_name_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0); public String success; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(describe_cluster_name_result.class, metaDataMap); } public describe_cluster_name_result() { } public describe_cluster_name_result( String success) { this(); this.success = success; } /** * Performs a deep copy on <i>other</i>. */ public describe_cluster_name_result(describe_cluster_name_result other) { if (other.isSetSuccess()) { this.success = other.success; } } public describe_cluster_name_result deepCopy() { return new describe_cluster_name_result(this); } @Override public void clear() { this.success = null; } public String getSuccess() { return this.success; } public describe_cluster_name_result setSuccess(String success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((String)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); } throw new IllegalStateException(); } /** 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(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof describe_cluster_name_result) return this.equals((describe_cluster_name_result)that); return false; } public boolean equals(describe_cluster_name_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(); } public int compareTo(describe_cluster_name_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; describe_cluster_name_result typedOther = (describe_cluster_name_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 _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 0: // SUCCESS if (field.type == org.apache.thrift.protocol.TType.STRING) { this.success = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeString(this.success); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("describe_cluster_name_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields } 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); } } 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); } } } public static class describe_version_args implements org.apache.thrift.TBase<describe_version_args, describe_version_args._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("describe_version_args"); /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { ; private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(describe_version_args.class, metaDataMap); } public describe_version_args() { } /** * Performs a deep copy on <i>other</i>. */ public describe_version_args(describe_version_args other) { } public describe_version_args deepCopy() { return new describe_version_args(this); } @Override public void clear() { } public void setFieldValue(_Fields field, Object value) { switch (field) { } } public Object getFieldValue(_Fields field) { switch (field) { } throw new IllegalStateException(); } /** 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) { } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof describe_version_args) return this.equals((describe_version_args)that); return false; } public boolean equals(describe_version_args that) { if (that == null) return false; return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); return builder.toHashCode(); } public int compareTo(describe_version_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; describe_version_args typedOther = (describe_version_args)other; return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("describe_version_args("); boolean first = true; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields } 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); } } 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); } } } public static class describe_version_result implements org.apache.thrift.TBase<describe_version_result, describe_version_result._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("describe_version_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0); public String success; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(describe_version_result.class, metaDataMap); } public describe_version_result() { } public describe_version_result( String success) { this(); this.success = success; } /** * Performs a deep copy on <i>other</i>. */ public describe_version_result(describe_version_result other) { if (other.isSetSuccess()) { this.success = other.success; } } public describe_version_result deepCopy() { return new describe_version_result(this); } @Override public void clear() { this.success = null; } public String getSuccess() { return this.success; } public describe_version_result setSuccess(String success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((String)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); } throw new IllegalStateException(); } /** 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(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof describe_version_result) return this.equals((describe_version_result)that); return false; } public boolean equals(describe_version_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(); } public int compareTo(describe_version_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; describe_version_result typedOther = (describe_version_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 _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 0: // SUCCESS if (field.type == org.apache.thrift.protocol.TType.STRING) { this.success = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeString(this.success); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("describe_version_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields } 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); } } 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); } } } public static class describe_ring_args implements org.apache.thrift.TBase<describe_ring_args, describe_ring_args._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("describe_ring_args"); private static final org.apache.thrift.protocol.TField KEYSPACE_FIELD_DESC = new org.apache.thrift.protocol.TField("keyspace", org.apache.thrift.protocol.TType.STRING, (short)1); public String keyspace; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { KEYSPACE((short)1, "keyspace"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // KEYSPACE return KEYSPACE; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.KEYSPACE, new org.apache.thrift.meta_data.FieldMetaData("keyspace", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(describe_ring_args.class, metaDataMap); } public describe_ring_args() { } public describe_ring_args( String keyspace) { this(); this.keyspace = keyspace; } /** * Performs a deep copy on <i>other</i>. */ public describe_ring_args(describe_ring_args other) { if (other.isSetKeyspace()) { this.keyspace = other.keyspace; } } public describe_ring_args deepCopy() { return new describe_ring_args(this); } @Override public void clear() { this.keyspace = null; } public String getKeyspace() { return this.keyspace; } public describe_ring_args setKeyspace(String keyspace) { this.keyspace = keyspace; return this; } public void unsetKeyspace() { this.keyspace = null; } /** Returns true if field keyspace is set (has been assigned a value) and false otherwise */ public boolean isSetKeyspace() { return this.keyspace != null; } public void setKeyspaceIsSet(boolean value) { if (!value) { this.keyspace = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case KEYSPACE: if (value == null) { unsetKeyspace(); } else { setKeyspace((String)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case KEYSPACE: return getKeyspace(); } throw new IllegalStateException(); } /** 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 KEYSPACE: return isSetKeyspace(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof describe_ring_args) return this.equals((describe_ring_args)that); return false; } public boolean equals(describe_ring_args that) { if (that == null) return false; boolean this_present_keyspace = true && this.isSetKeyspace(); boolean that_present_keyspace = true && that.isSetKeyspace(); if (this_present_keyspace || that_present_keyspace) { if (!(this_present_keyspace && that_present_keyspace)) return false; if (!this.keyspace.equals(that.keyspace)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_keyspace = true && (isSetKeyspace()); builder.append(present_keyspace); if (present_keyspace) builder.append(keyspace); return builder.toHashCode(); } public int compareTo(describe_ring_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; describe_ring_args typedOther = (describe_ring_args)other; lastComparison = Boolean.valueOf(isSetKeyspace()).compareTo(typedOther.isSetKeyspace()); if (lastComparison != 0) { return lastComparison; } if (isSetKeyspace()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.keyspace, typedOther.keyspace); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // KEYSPACE if (field.type == org.apache.thrift.protocol.TType.STRING) { this.keyspace = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.keyspace != null) { oprot.writeFieldBegin(KEYSPACE_FIELD_DESC); oprot.writeString(this.keyspace); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("describe_ring_args("); boolean first = true; sb.append("keyspace:"); if (this.keyspace == null) { sb.append("null"); } else { sb.append(this.keyspace); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields if (keyspace == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'keyspace' was not present! Struct: " + toString()); } } 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); } } 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); } } } public static class describe_ring_result implements org.apache.thrift.TBase<describe_ring_result, describe_ring_result._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("describe_ring_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final org.apache.thrift.protocol.TField IRE_FIELD_DESC = new org.apache.thrift.protocol.TField("ire", org.apache.thrift.protocol.TType.STRUCT, (short)1); public List<TokenRange> success; public InvalidRequestException ire; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), IRE((short)1, "ire"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // IRE return IRE; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TokenRange.class)))); tmpMap.put(_Fields.IRE, new org.apache.thrift.meta_data.FieldMetaData("ire", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(describe_ring_result.class, metaDataMap); } public describe_ring_result() { } public describe_ring_result( List<TokenRange> success, InvalidRequestException ire) { this(); this.success = success; this.ire = ire; } /** * Performs a deep copy on <i>other</i>. */ public describe_ring_result(describe_ring_result other) { if (other.isSetSuccess()) { List<TokenRange> __this__success = new ArrayList<TokenRange>(); for (TokenRange other_element : other.success) { __this__success.add(new TokenRange(other_element)); } this.success = __this__success; } if (other.isSetIre()) { this.ire = new InvalidRequestException(other.ire); } } public describe_ring_result deepCopy() { return new describe_ring_result(this); } @Override public void clear() { this.success = null; this.ire = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } public java.util.Iterator<TokenRange> getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(TokenRange elem) { if (this.success == null) { this.success = new ArrayList<TokenRange>(); } this.success.add(elem); } public List<TokenRange> getSuccess() { return this.success; } public describe_ring_result setSuccess(List<TokenRange> success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } public InvalidRequestException getIre() { return this.ire; } public describe_ring_result setIre(InvalidRequestException ire) { this.ire = ire; return this; } public void unsetIre() { this.ire = null; } /** Returns true if field ire is set (has been assigned a value) and false otherwise */ public boolean isSetIre() { return this.ire != null; } public void setIreIsSet(boolean value) { if (!value) { this.ire = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((List<TokenRange>)value); } break; case IRE: if (value == null) { unsetIre(); } else { setIre((InvalidRequestException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case IRE: return getIre(); } throw new IllegalStateException(); } /** 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(); case IRE: return isSetIre(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof describe_ring_result) return this.equals((describe_ring_result)that); return false; } public boolean equals(describe_ring_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; } boolean this_present_ire = true && this.isSetIre(); boolean that_present_ire = true && that.isSetIre(); if (this_present_ire || that_present_ire) { if (!(this_present_ire && that_present_ire)) return false; if (!this.ire.equals(that.ire)) 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); boolean present_ire = true && (isSetIre()); builder.append(present_ire); if (present_ire) builder.append(ire); return builder.toHashCode(); } public int compareTo(describe_ring_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; describe_ring_result typedOther = (describe_ring_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; } } lastComparison = Boolean.valueOf(isSetIre()).compareTo(typedOther.isSetIre()); if (lastComparison != 0) { return lastComparison; } if (isSetIre()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ire, typedOther.ire); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 0: // SUCCESS if (field.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list86 = iprot.readListBegin(); this.success = new ArrayList<TokenRange>(_list86.size); for (int _i87 = 0; _i87 < _list86.size; ++_i87) { TokenRange _elem88; _elem88 = new TokenRange(); _elem88.read(iprot); this.success.add(_elem88); } iprot.readListEnd(); } } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 1: // IRE if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.ire = new InvalidRequestException(); this.ire.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size())); for (TokenRange _iter89 : this.success) { _iter89.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } else if (this.isSetIre()) { oprot.writeFieldBegin(IRE_FIELD_DESC); this.ire.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("describe_ring_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("ire:"); if (this.ire == null) { sb.append("null"); } else { sb.append(this.ire); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields } 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); } } 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); } } } public static class describe_partitioner_args implements org.apache.thrift.TBase<describe_partitioner_args, describe_partitioner_args._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("describe_partitioner_args"); /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { ; private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(describe_partitioner_args.class, metaDataMap); } public describe_partitioner_args() { } /** * Performs a deep copy on <i>other</i>. */ public describe_partitioner_args(describe_partitioner_args other) { } public describe_partitioner_args deepCopy() { return new describe_partitioner_args(this); } @Override public void clear() { } public void setFieldValue(_Fields field, Object value) { switch (field) { } } public Object getFieldValue(_Fields field) { switch (field) { } throw new IllegalStateException(); } /** 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) { } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof describe_partitioner_args) return this.equals((describe_partitioner_args)that); return false; } public boolean equals(describe_partitioner_args that) { if (that == null) return false; return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); return builder.toHashCode(); } public int compareTo(describe_partitioner_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; describe_partitioner_args typedOther = (describe_partitioner_args)other; return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("describe_partitioner_args("); boolean first = true; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields } 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); } } 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); } } } public static class describe_partitioner_result implements org.apache.thrift.TBase<describe_partitioner_result, describe_partitioner_result._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("describe_partitioner_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0); public String success; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(describe_partitioner_result.class, metaDataMap); } public describe_partitioner_result() { } public describe_partitioner_result( String success) { this(); this.success = success; } /** * Performs a deep copy on <i>other</i>. */ public describe_partitioner_result(describe_partitioner_result other) { if (other.isSetSuccess()) { this.success = other.success; } } public describe_partitioner_result deepCopy() { return new describe_partitioner_result(this); } @Override public void clear() { this.success = null; } public String getSuccess() { return this.success; } public describe_partitioner_result setSuccess(String success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((String)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); } throw new IllegalStateException(); } /** 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(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof describe_partitioner_result) return this.equals((describe_partitioner_result)that); return false; } public boolean equals(describe_partitioner_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(); } public int compareTo(describe_partitioner_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; describe_partitioner_result typedOther = (describe_partitioner_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 _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 0: // SUCCESS if (field.type == org.apache.thrift.protocol.TType.STRING) { this.success = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeString(this.success); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("describe_partitioner_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields } 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); } } 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); } } } public static class describe_keyspace_args implements org.apache.thrift.TBase<describe_keyspace_args, describe_keyspace_args._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("describe_keyspace_args"); private static final org.apache.thrift.protocol.TField KEYSPACE_FIELD_DESC = new org.apache.thrift.protocol.TField("keyspace", org.apache.thrift.protocol.TType.STRING, (short)1); public String keyspace; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { KEYSPACE((short)1, "keyspace"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // KEYSPACE return KEYSPACE; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.KEYSPACE, new org.apache.thrift.meta_data.FieldMetaData("keyspace", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(describe_keyspace_args.class, metaDataMap); } public describe_keyspace_args() { } public describe_keyspace_args( String keyspace) { this(); this.keyspace = keyspace; } /** * Performs a deep copy on <i>other</i>. */ public describe_keyspace_args(describe_keyspace_args other) { if (other.isSetKeyspace()) { this.keyspace = other.keyspace; } } public describe_keyspace_args deepCopy() { return new describe_keyspace_args(this); } @Override public void clear() { this.keyspace = null; } public String getKeyspace() { return this.keyspace; } public describe_keyspace_args setKeyspace(String keyspace) { this.keyspace = keyspace; return this; } public void unsetKeyspace() { this.keyspace = null; } /** Returns true if field keyspace is set (has been assigned a value) and false otherwise */ public boolean isSetKeyspace() { return this.keyspace != null; } public void setKeyspaceIsSet(boolean value) { if (!value) { this.keyspace = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case KEYSPACE: if (value == null) { unsetKeyspace(); } else { setKeyspace((String)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case KEYSPACE: return getKeyspace(); } throw new IllegalStateException(); } /** 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 KEYSPACE: return isSetKeyspace(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof describe_keyspace_args) return this.equals((describe_keyspace_args)that); return false; } public boolean equals(describe_keyspace_args that) { if (that == null) return false; boolean this_present_keyspace = true && this.isSetKeyspace(); boolean that_present_keyspace = true && that.isSetKeyspace(); if (this_present_keyspace || that_present_keyspace) { if (!(this_present_keyspace && that_present_keyspace)) return false; if (!this.keyspace.equals(that.keyspace)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_keyspace = true && (isSetKeyspace()); builder.append(present_keyspace); if (present_keyspace) builder.append(keyspace); return builder.toHashCode(); } public int compareTo(describe_keyspace_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; describe_keyspace_args typedOther = (describe_keyspace_args)other; lastComparison = Boolean.valueOf(isSetKeyspace()).compareTo(typedOther.isSetKeyspace()); if (lastComparison != 0) { return lastComparison; } if (isSetKeyspace()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.keyspace, typedOther.keyspace); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // KEYSPACE if (field.type == org.apache.thrift.protocol.TType.STRING) { this.keyspace = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.keyspace != null) { oprot.writeFieldBegin(KEYSPACE_FIELD_DESC); oprot.writeString(this.keyspace); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("describe_keyspace_args("); boolean first = true; sb.append("keyspace:"); if (this.keyspace == null) { sb.append("null"); } else { sb.append(this.keyspace); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields if (keyspace == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'keyspace' was not present! Struct: " + toString()); } } 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); } } 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); } } } public static class describe_keyspace_result implements org.apache.thrift.TBase<describe_keyspace_result, describe_keyspace_result._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("describe_keyspace_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.MAP, (short)0); private static final org.apache.thrift.protocol.TField NFE_FIELD_DESC = new org.apache.thrift.protocol.TField("nfe", org.apache.thrift.protocol.TType.STRUCT, (short)1); public Map<String,Map<String,String>> success; public NotFoundException nfe; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), NFE((short)1, "nfe"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // NFE return NFE; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))))); tmpMap.put(_Fields.NFE, new org.apache.thrift.meta_data.FieldMetaData("nfe", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(describe_keyspace_result.class, metaDataMap); } public describe_keyspace_result() { } public describe_keyspace_result( Map<String,Map<String,String>> success, NotFoundException nfe) { this(); this.success = success; this.nfe = nfe; } /** * Performs a deep copy on <i>other</i>. */ public describe_keyspace_result(describe_keyspace_result other) { if (other.isSetSuccess()) { Map<String,Map<String,String>> __this__success = new HashMap<String,Map<String,String>>(); for (Map.Entry<String, Map<String,String>> other_element : other.success.entrySet()) { String other_element_key = other_element.getKey(); Map<String,String> other_element_value = other_element.getValue(); String __this__success_copy_key = other_element_key; Map<String,String> __this__success_copy_value = new HashMap<String,String>(); for (Map.Entry<String, String> other_element_value_element : other_element_value.entrySet()) { String other_element_value_element_key = other_element_value_element.getKey(); String other_element_value_element_value = other_element_value_element.getValue(); String __this__success_copy_value_copy_key = other_element_value_element_key; String __this__success_copy_value_copy_value = other_element_value_element_value; __this__success_copy_value.put(__this__success_copy_value_copy_key, __this__success_copy_value_copy_value); } __this__success.put(__this__success_copy_key, __this__success_copy_value); } this.success = __this__success; } if (other.isSetNfe()) { this.nfe = new NotFoundException(other.nfe); } } public describe_keyspace_result deepCopy() { return new describe_keyspace_result(this); } @Override public void clear() { this.success = null; this.nfe = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } public void putToSuccess(String key, Map<String,String> val) { if (this.success == null) { this.success = new HashMap<String,Map<String,String>>(); } this.success.put(key, val); } public Map<String,Map<String,String>> getSuccess() { return this.success; } public describe_keyspace_result setSuccess(Map<String,Map<String,String>> success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } public NotFoundException getNfe() { return this.nfe; } public describe_keyspace_result setNfe(NotFoundException nfe) { this.nfe = nfe; return this; } public void unsetNfe() { this.nfe = null; } /** Returns true if field nfe is set (has been assigned a value) and false otherwise */ public boolean isSetNfe() { return this.nfe != null; } public void setNfeIsSet(boolean value) { if (!value) { this.nfe = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((Map<String,Map<String,String>>)value); } break; case NFE: if (value == null) { unsetNfe(); } else { setNfe((NotFoundException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case NFE: return getNfe(); } throw new IllegalStateException(); } /** 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(); case NFE: return isSetNfe(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof describe_keyspace_result) return this.equals((describe_keyspace_result)that); return false; } public boolean equals(describe_keyspace_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; } boolean this_present_nfe = true && this.isSetNfe(); boolean that_present_nfe = true && that.isSetNfe(); if (this_present_nfe || that_present_nfe) { if (!(this_present_nfe && that_present_nfe)) return false; if (!this.nfe.equals(that.nfe)) 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); boolean present_nfe = true && (isSetNfe()); builder.append(present_nfe); if (present_nfe) builder.append(nfe); return builder.toHashCode(); } public int compareTo(describe_keyspace_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; describe_keyspace_result typedOther = (describe_keyspace_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; } } lastComparison = Boolean.valueOf(isSetNfe()).compareTo(typedOther.isSetNfe()); if (lastComparison != 0) { return lastComparison; } if (isSetNfe()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nfe, typedOther.nfe); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 0: // SUCCESS if (field.type == org.apache.thrift.protocol.TType.MAP) { { org.apache.thrift.protocol.TMap _map90 = iprot.readMapBegin(); this.success = new HashMap<String,Map<String,String>>(2*_map90.size); for (int _i91 = 0; _i91 < _map90.size; ++_i91) { String _key92; Map<String,String> _val93; _key92 = iprot.readString(); { org.apache.thrift.protocol.TMap _map94 = iprot.readMapBegin(); _val93 = new HashMap<String,String>(2*_map94.size); for (int _i95 = 0; _i95 < _map94.size; ++_i95) { String _key96; String _val97; _key96 = iprot.readString(); _val97 = iprot.readString(); _val93.put(_key96, _val97); } iprot.readMapEnd(); } this.success.put(_key92, _val93); } iprot.readMapEnd(); } } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 1: // NFE if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.nfe = new NotFoundException(); this.nfe.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.MAP, this.success.size())); for (Map.Entry<String, Map<String,String>> _iter98 : this.success.entrySet()) { oprot.writeString(_iter98.getKey()); { oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, _iter98.getValue().size())); for (Map.Entry<String, String> _iter99 : _iter98.getValue().entrySet()) { oprot.writeString(_iter99.getKey()); oprot.writeString(_iter99.getValue()); } oprot.writeMapEnd(); } } oprot.writeMapEnd(); } oprot.writeFieldEnd(); } else if (this.isSetNfe()) { oprot.writeFieldBegin(NFE_FIELD_DESC); this.nfe.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("describe_keyspace_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("nfe:"); if (this.nfe == null) { sb.append("null"); } else { sb.append(this.nfe); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields } 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); } } 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); } } } public static class describe_splits_args implements org.apache.thrift.TBase<describe_splits_args, describe_splits_args._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("describe_splits_args"); private static final org.apache.thrift.protocol.TField START_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("start_token", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField END_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("end_token", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField KEYS_PER_SPLIT_FIELD_DESC = new org.apache.thrift.protocol.TField("keys_per_split", org.apache.thrift.protocol.TType.I32, (short)3); public String start_token; public String end_token; public int keys_per_split; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { START_TOKEN((short)1, "start_token"), END_TOKEN((short)2, "end_token"), KEYS_PER_SPLIT((short)3, "keys_per_split"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // START_TOKEN return START_TOKEN; case 2: // END_TOKEN return END_TOKEN; case 3: // KEYS_PER_SPLIT return KEYS_PER_SPLIT; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments private static final int __KEYS_PER_SPLIT_ISSET_ID = 0; private BitSet __isset_bit_vector = new BitSet(1); public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.START_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("start_token", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.END_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("end_token", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.KEYS_PER_SPLIT, new org.apache.thrift.meta_data.FieldMetaData("keys_per_split", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(describe_splits_args.class, metaDataMap); } public describe_splits_args() { } public describe_splits_args( String start_token, String end_token, int keys_per_split) { this(); this.start_token = start_token; this.end_token = end_token; this.keys_per_split = keys_per_split; setKeys_per_splitIsSet(true); } /** * Performs a deep copy on <i>other</i>. */ public describe_splits_args(describe_splits_args other) { __isset_bit_vector.clear(); __isset_bit_vector.or(other.__isset_bit_vector); if (other.isSetStart_token()) { this.start_token = other.start_token; } if (other.isSetEnd_token()) { this.end_token = other.end_token; } this.keys_per_split = other.keys_per_split; } public describe_splits_args deepCopy() { return new describe_splits_args(this); } @Override public void clear() { this.start_token = null; this.end_token = null; setKeys_per_splitIsSet(false); this.keys_per_split = 0; } public String getStart_token() { return this.start_token; } public describe_splits_args setStart_token(String start_token) { this.start_token = start_token; return this; } public void unsetStart_token() { this.start_token = null; } /** Returns true if field start_token is set (has been assigned a value) and false otherwise */ public boolean isSetStart_token() { return this.start_token != null; } public void setStart_tokenIsSet(boolean value) { if (!value) { this.start_token = null; } } public String getEnd_token() { return this.end_token; } public describe_splits_args setEnd_token(String end_token) { this.end_token = end_token; return this; } public void unsetEnd_token() { this.end_token = null; } /** Returns true if field end_token is set (has been assigned a value) and false otherwise */ public boolean isSetEnd_token() { return this.end_token != null; } public void setEnd_tokenIsSet(boolean value) { if (!value) { this.end_token = null; } } public int getKeys_per_split() { return this.keys_per_split; } public describe_splits_args setKeys_per_split(int keys_per_split) { this.keys_per_split = keys_per_split; setKeys_per_splitIsSet(true); return this; } public void unsetKeys_per_split() { __isset_bit_vector.clear(__KEYS_PER_SPLIT_ISSET_ID); } /** Returns true if field keys_per_split is set (has been assigned a value) and false otherwise */ public boolean isSetKeys_per_split() { return __isset_bit_vector.get(__KEYS_PER_SPLIT_ISSET_ID); } public void setKeys_per_splitIsSet(boolean value) { __isset_bit_vector.set(__KEYS_PER_SPLIT_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { case START_TOKEN: if (value == null) { unsetStart_token(); } else { setStart_token((String)value); } break; case END_TOKEN: if (value == null) { unsetEnd_token(); } else { setEnd_token((String)value); } break; case KEYS_PER_SPLIT: if (value == null) { unsetKeys_per_split(); } else { setKeys_per_split((Integer)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case START_TOKEN: return getStart_token(); case END_TOKEN: return getEnd_token(); case KEYS_PER_SPLIT: return new Integer(getKeys_per_split()); } throw new IllegalStateException(); } /** 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 START_TOKEN: return isSetStart_token(); case END_TOKEN: return isSetEnd_token(); case KEYS_PER_SPLIT: return isSetKeys_per_split(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof describe_splits_args) return this.equals((describe_splits_args)that); return false; } public boolean equals(describe_splits_args that) { if (that == null) return false; boolean this_present_start_token = true && this.isSetStart_token(); boolean that_present_start_token = true && that.isSetStart_token(); if (this_present_start_token || that_present_start_token) { if (!(this_present_start_token && that_present_start_token)) return false; if (!this.start_token.equals(that.start_token)) return false; } boolean this_present_end_token = true && this.isSetEnd_token(); boolean that_present_end_token = true && that.isSetEnd_token(); if (this_present_end_token || that_present_end_token) { if (!(this_present_end_token && that_present_end_token)) return false; if (!this.end_token.equals(that.end_token)) return false; } boolean this_present_keys_per_split = true; boolean that_present_keys_per_split = true; if (this_present_keys_per_split || that_present_keys_per_split) { if (!(this_present_keys_per_split && that_present_keys_per_split)) return false; if (this.keys_per_split != that.keys_per_split) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_start_token = true && (isSetStart_token()); builder.append(present_start_token); if (present_start_token) builder.append(start_token); boolean present_end_token = true && (isSetEnd_token()); builder.append(present_end_token); if (present_end_token) builder.append(end_token); boolean present_keys_per_split = true; builder.append(present_keys_per_split); if (present_keys_per_split) builder.append(keys_per_split); return builder.toHashCode(); } public int compareTo(describe_splits_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; describe_splits_args typedOther = (describe_splits_args)other; lastComparison = Boolean.valueOf(isSetStart_token()).compareTo(typedOther.isSetStart_token()); if (lastComparison != 0) { return lastComparison; } if (isSetStart_token()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.start_token, typedOther.start_token); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetEnd_token()).compareTo(typedOther.isSetEnd_token()); if (lastComparison != 0) { return lastComparison; } if (isSetEnd_token()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.end_token, typedOther.end_token); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetKeys_per_split()).compareTo(typedOther.isSetKeys_per_split()); if (lastComparison != 0) { return lastComparison; } if (isSetKeys_per_split()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.keys_per_split, typedOther.keys_per_split); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // START_TOKEN if (field.type == org.apache.thrift.protocol.TType.STRING) { this.start_token = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // END_TOKEN if (field.type == org.apache.thrift.protocol.TType.STRING) { this.end_token = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 3: // KEYS_PER_SPLIT if (field.type == org.apache.thrift.protocol.TType.I32) { this.keys_per_split = iprot.readI32(); setKeys_per_splitIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method if (!isSetKeys_per_split()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'keys_per_split' was not found in serialized data! Struct: " + toString()); } validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.start_token != null) { oprot.writeFieldBegin(START_TOKEN_FIELD_DESC); oprot.writeString(this.start_token); oprot.writeFieldEnd(); } if (this.end_token != null) { oprot.writeFieldBegin(END_TOKEN_FIELD_DESC); oprot.writeString(this.end_token); oprot.writeFieldEnd(); } oprot.writeFieldBegin(KEYS_PER_SPLIT_FIELD_DESC); oprot.writeI32(this.keys_per_split); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("describe_splits_args("); boolean first = true; sb.append("start_token:"); if (this.start_token == null) { sb.append("null"); } else { sb.append(this.start_token); } first = false; if (!first) sb.append(", "); sb.append("end_token:"); if (this.end_token == null) { sb.append("null"); } else { sb.append(this.end_token); } first = false; if (!first) sb.append(", "); sb.append("keys_per_split:"); sb.append(this.keys_per_split); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields if (start_token == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'start_token' was not present! Struct: " + toString()); } if (end_token == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'end_token' was not present! Struct: " + toString()); } // alas, we cannot check 'keys_per_split' because it's a primitive and you chose the non-beans generator. } 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); } } 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); } } } public static class describe_splits_result implements org.apache.thrift.TBase<describe_splits_result, describe_splits_result._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("describe_splits_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); public List<String> success; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(describe_splits_result.class, metaDataMap); } public describe_splits_result() { } public describe_splits_result( List<String> success) { this(); this.success = success; } /** * Performs a deep copy on <i>other</i>. */ public describe_splits_result(describe_splits_result other) { if (other.isSetSuccess()) { List<String> __this__success = new ArrayList<String>(); for (String other_element : other.success) { __this__success.add(other_element); } this.success = __this__success; } } public describe_splits_result deepCopy() { return new describe_splits_result(this); } @Override public void clear() { this.success = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } public java.util.Iterator<String> getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(String elem) { if (this.success == null) { this.success = new ArrayList<String>(); } this.success.add(elem); } public List<String> getSuccess() { return this.success; } public describe_splits_result setSuccess(List<String> success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((List<String>)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); } throw new IllegalStateException(); } /** 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(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof describe_splits_result) return this.equals((describe_splits_result)that); return false; } public boolean equals(describe_splits_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(); } public int compareTo(describe_splits_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; describe_splits_result typedOther = (describe_splits_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 _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 0: // SUCCESS if (field.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list100 = iprot.readListBegin(); this.success = new ArrayList<String>(_list100.size); for (int _i101 = 0; _i101 < _list100.size; ++_i101) { String _elem102; _elem102 = iprot.readString(); this.success.add(_elem102); } iprot.readListEnd(); } } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.success.size())); for (String _iter103 : this.success) { oprot.writeString(_iter103); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("describe_splits_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields } 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); } } 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); } } } }