All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.cinchapi.concourse.thrift.ConcourseService Maven / Gradle / Ivy

Go to download

This is the api to interact with Concourse, a schemaless and distributed version control database with optimistic availability, serializable transactions and full-text search. Concourse provides a more intuitive approach to data management that is easy to deploy, access and scale with minimal tuning while also maintaining the referential integrity and ACID characteristics of traditional database systems.

The newest version!
/**
 * Autogenerated by Thrift Compiler (0.9.0)
 *
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 *  @generated
 */
package org.cinchapi.concourse.thrift;

import org.apache.thrift.scheme.IScheme;
import org.apache.thrift.scheme.SchemeFactory;
import org.apache.thrift.scheme.StandardScheme;

import org.apache.thrift.scheme.TupleScheme;
import org.apache.thrift.protocol.TTupleProtocol;
import org.apache.thrift.protocol.TProtocolException;
import org.apache.thrift.EncodingUtils;
import org.apache.thrift.TException;

import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.util.LinkedHashMap;
import java.util.EnumMap;
import java.util.Set;
import java.util.LinkedHashSet;
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;

@SuppressWarnings({ "rawtypes", "serial", "unchecked", "unused" })
public class ConcourseService {

  /**
   * The RPC protocol that forms the basis of cross-language client/server
   * communication in Concourse. This is considered a public API; however
   * it is intended to be wrapped in a more expressive APIs in the target
   * implementation language.
   */
  public interface Iface {

    /**
     * Login to the service. A user must login to receive an {@link AccessToken}
     * which is required for all other method invocations.
     * 
     * @param username
     * @param password
     */
    public AccessToken login(String username, String password) throws org.apache.thrift.TException;

    /**
     * Logout of the service and deauthorize {@code token}.
     * 
     * @param token
     */
    public void logout(AccessToken token) throws org.apache.thrift.TException;

    /**
     * Turn on {@code staging} mode so that all subsequent changes are collected
     * in a staging area before possibly being committed to the database. Staged
     * operations are guaranteed to be reliable, all or nothing units of work that
     * allow correct  recovery from failures and provide isolation between clients
     * so the database is always in a consistent state.
     * 

* After this method returns, all subsequent operations will be done in * {@code staging} mode until either {@link #abort(AccessToken)} or * {@link #commit(AccessToken)} is invoked. *

* * @param token */ public TransactionToken stage(AccessToken token) throws org.apache.thrift.TException; /** * Abort and remove any changes that are currently sitting in the staging area. *

* After this function returns, all subsequent operations will commit to the * database immediately until {@link #stage(AccessToken)} is invoked. *

* * @param creds * @param transaction */ public void abort(AccessToken creds, TransactionToken transaction) throws org.apache.thrift.TException; /** * Attempt to permanently commit all the changes that are currently sitting in * the staging area to the database. This function only returns {@code true} * if all the changes can be successfully applied to the database. Otherwise, * this function returns {@code false} and all the changes are aborted. *

* After this function returns, all subsequent operations will commit to the * database immediately until {@link #stage(AccessToken)} is invoked. *

* * @param creds * @param transaction */ public boolean commit(AccessToken creds, TransactionToken transaction) throws org.apache.thrift.TException; /** * Add {@code key} as {@code value} to {@code record}. This method returns * {@code true} if there is no mapping from {@code key} to {@code value} * in {@code record} prior to invocation. * * @param key * @param value * @param record * @param creds * @param transaction */ public boolean add(String key, TObject value, long record, AccessToken creds, TransactionToken transaction) throws org.apache.thrift.TException; /** * Remove {@code key} as {@code value} from {@code record}. This method returns * {@code true} if there is a mapping from {@code key} to {@code value} in * {@code record} prior to invocation. * * @param key * @param value * @param record * @param creds * @param transaction */ public boolean remove(String key, TObject value, long record, AccessToken creds, TransactionToken transaction) throws org.apache.thrift.TException; /** * Audit {@code record} or {@code key} in {@code record}. This method returns a * map from timestamp to a string describing the revision that occurred. * * @param record * @param key * @param creds * @param transaction */ public Map audit(long record, String key, AccessToken creds, TransactionToken transaction) throws org.apache.thrift.TException; /** * Describe {@code record} at {@code timestamp}. This method returns keys for * fields in {@code record} that contain at least one value at {@code timestamp}. * * @param record * @param timestamp * @param creds * @param transaction */ public Set describe(long record, long timestamp, AccessToken creds, TransactionToken transaction) throws org.apache.thrift.TException; /** * Fetch {@code key} from {@code record} at {@code timestamp}. This method returns * the values that exist in the field mapped from {@code key} at {@code timestamp}. * * @param key * @param record * @param timestamp * @param creds * @param transaction */ public Set fetch(String key, long record, long timestamp, AccessToken creds, TransactionToken transaction) throws org.apache.thrift.TException; /** * Find {@code key} {@code operator} {@code values} at {@code timestamp}. This * method returns the records that match the criteria at {@code timestamp}. * * @param key * @param operator * @param values * @param timestamp * @param creds * @param transaction */ public Set find(String key, Operator operator, List values, long timestamp, AccessToken creds, TransactionToken transaction) throws org.apache.thrift.TException; /** * Ping {@code record}. This method returns {@code true} if {@code record} has at * least one populated field. * * @param record * @param creds * @param transaction */ public boolean ping(long record, AccessToken creds, TransactionToken transaction) throws org.apache.thrift.TException; /** * Search {@code key} for {@code query}. This method returns the records that have * a value matching {@code query} in the field mapped from {@code key}. * * @param key * @param query * @param creds * @param transaction */ public Set search(String key, String query, AccessToken creds, TransactionToken transaction) throws org.apache.thrift.TException; /** * Verify {@code key} as {@code value} in {@code record} at {@code timestamp}. This * method returns {@code true} if the field contains {@code value} at * {@code timestamp}. * * @param key * @param value * @param record * @param timestamp * @param creds * @param transaction */ public boolean verify(String key, TObject value, long record, long timestamp, AccessToken creds, TransactionToken transaction) throws org.apache.thrift.TException; /** * Revert {@code key} in {@code record} to {@code timestamp}. * * @param key * @param record * @param timestamp * @param creds * @param token */ public void revert(String key, long record, long timestamp, AccessToken creds, TransactionToken token) throws org.apache.thrift.TException; } public interface AsyncIface { public void login(String username, String password, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void logout(AccessToken token, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void stage(AccessToken token, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void abort(AccessToken creds, TransactionToken transaction, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void commit(AccessToken creds, TransactionToken transaction, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void add(String key, TObject value, long record, AccessToken creds, TransactionToken transaction, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void remove(String key, TObject value, long record, AccessToken creds, TransactionToken transaction, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void audit(long record, String key, AccessToken creds, TransactionToken transaction, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void describe(long record, long timestamp, AccessToken creds, TransactionToken transaction, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void fetch(String key, long record, long timestamp, AccessToken creds, TransactionToken transaction, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void find(String key, Operator operator, List values, long timestamp, AccessToken creds, TransactionToken transaction, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void ping(long record, AccessToken creds, TransactionToken transaction, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void search(String key, String query, AccessToken creds, TransactionToken transaction, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void verify(String key, TObject value, long record, long timestamp, AccessToken creds, TransactionToken transaction, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void revert(String key, long record, long timestamp, AccessToken creds, TransactionToken token, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; } public static class Client extends org.apache.thrift.TServiceClient implements Iface { public static class Factory implements org.apache.thrift.TServiceClientFactory { 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) { super(prot, prot); } public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) { super(iprot, oprot); } public AccessToken login(String username, String password) throws org.apache.thrift.TException { send_login(username, password); return recv_login(); } public void send_login(String username, String password) throws org.apache.thrift.TException { login_args args = new login_args(); args.setUsername(username); args.setPassword(password); sendBase("login", args); } public AccessToken recv_login() throws org.apache.thrift.TException { login_result result = new login_result(); receiveBase(result, "login"); if (result.isSetSuccess()) { return result.success; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "login failed: unknown result"); } public void logout(AccessToken token) throws org.apache.thrift.TException { send_logout(token); recv_logout(); } public void send_logout(AccessToken token) throws org.apache.thrift.TException { logout_args args = new logout_args(); args.setToken(token); sendBase("logout", args); } public void recv_logout() throws org.apache.thrift.TException { logout_result result = new logout_result(); receiveBase(result, "logout"); return; } public TransactionToken stage(AccessToken token) throws org.apache.thrift.TException { send_stage(token); return recv_stage(); } public void send_stage(AccessToken token) throws org.apache.thrift.TException { stage_args args = new stage_args(); args.setToken(token); sendBase("stage", args); } public TransactionToken recv_stage() throws org.apache.thrift.TException { stage_result result = new stage_result(); receiveBase(result, "stage"); if (result.isSetSuccess()) { return result.success; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "stage failed: unknown result"); } public void abort(AccessToken creds, TransactionToken transaction) throws org.apache.thrift.TException { send_abort(creds, transaction); recv_abort(); } public void send_abort(AccessToken creds, TransactionToken transaction) throws org.apache.thrift.TException { abort_args args = new abort_args(); args.setCreds(creds); args.setTransaction(transaction); sendBase("abort", args); } public void recv_abort() throws org.apache.thrift.TException { abort_result result = new abort_result(); receiveBase(result, "abort"); return; } public boolean commit(AccessToken creds, TransactionToken transaction) throws org.apache.thrift.TException { send_commit(creds, transaction); return recv_commit(); } public void send_commit(AccessToken creds, TransactionToken transaction) throws org.apache.thrift.TException { commit_args args = new commit_args(); args.setCreds(creds); args.setTransaction(transaction); sendBase("commit", args); } public boolean recv_commit() throws org.apache.thrift.TException { commit_result result = new commit_result(); receiveBase(result, "commit"); if (result.isSetSuccess()) { return result.success; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "commit failed: unknown result"); } public boolean add(String key, TObject value, long record, AccessToken creds, TransactionToken transaction) throws org.apache.thrift.TException { send_add(key, value, record, creds, transaction); return recv_add(); } public void send_add(String key, TObject value, long record, AccessToken creds, TransactionToken transaction) throws org.apache.thrift.TException { add_args args = new add_args(); args.setKey(key); args.setValue(value); args.setRecord(record); args.setCreds(creds); args.setTransaction(transaction); sendBase("add", args); } public boolean recv_add() throws org.apache.thrift.TException { add_result result = new add_result(); receiveBase(result, "add"); if (result.isSetSuccess()) { return result.success; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "add failed: unknown result"); } public boolean remove(String key, TObject value, long record, AccessToken creds, TransactionToken transaction) throws org.apache.thrift.TException { send_remove(key, value, record, creds, transaction); return recv_remove(); } public void send_remove(String key, TObject value, long record, AccessToken creds, TransactionToken transaction) throws org.apache.thrift.TException { remove_args args = new remove_args(); args.setKey(key); args.setValue(value); args.setRecord(record); args.setCreds(creds); args.setTransaction(transaction); sendBase("remove", args); } public boolean recv_remove() throws org.apache.thrift.TException { remove_result result = new remove_result(); receiveBase(result, "remove"); if (result.isSetSuccess()) { return result.success; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "remove failed: unknown result"); } public Map audit(long record, String key, AccessToken creds, TransactionToken transaction) throws org.apache.thrift.TException { send_audit(record, key, creds, transaction); return recv_audit(); } public void send_audit(long record, String key, AccessToken creds, TransactionToken transaction) throws org.apache.thrift.TException { audit_args args = new audit_args(); args.setRecord(record); args.setKey(key); args.setCreds(creds); args.setTransaction(transaction); sendBase("audit", args); } public Map recv_audit() throws org.apache.thrift.TException { audit_result result = new audit_result(); receiveBase(result, "audit"); if (result.isSetSuccess()) { return result.success; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "audit failed: unknown result"); } public Set describe(long record, long timestamp, AccessToken creds, TransactionToken transaction) throws org.apache.thrift.TException { send_describe(record, timestamp, creds, transaction); return recv_describe(); } public void send_describe(long record, long timestamp, AccessToken creds, TransactionToken transaction) throws org.apache.thrift.TException { describe_args args = new describe_args(); args.setRecord(record); args.setTimestamp(timestamp); args.setCreds(creds); args.setTransaction(transaction); sendBase("describe", args); } public Set recv_describe() throws org.apache.thrift.TException { describe_result result = new describe_result(); receiveBase(result, "describe"); if (result.isSetSuccess()) { return result.success; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "describe failed: unknown result"); } public Set fetch(String key, long record, long timestamp, AccessToken creds, TransactionToken transaction) throws org.apache.thrift.TException { send_fetch(key, record, timestamp, creds, transaction); return recv_fetch(); } public void send_fetch(String key, long record, long timestamp, AccessToken creds, TransactionToken transaction) throws org.apache.thrift.TException { fetch_args args = new fetch_args(); args.setKey(key); args.setRecord(record); args.setTimestamp(timestamp); args.setCreds(creds); args.setTransaction(transaction); sendBase("fetch", args); } public Set recv_fetch() throws org.apache.thrift.TException { fetch_result result = new fetch_result(); receiveBase(result, "fetch"); if (result.isSetSuccess()) { return result.success; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "fetch failed: unknown result"); } public Set find(String key, Operator operator, List values, long timestamp, AccessToken creds, TransactionToken transaction) throws org.apache.thrift.TException { send_find(key, operator, values, timestamp, creds, transaction); return recv_find(); } public void send_find(String key, Operator operator, List values, long timestamp, AccessToken creds, TransactionToken transaction) throws org.apache.thrift.TException { find_args args = new find_args(); args.setKey(key); args.setOperator(operator); args.setValues(values); args.setTimestamp(timestamp); args.setCreds(creds); args.setTransaction(transaction); sendBase("find", args); } public Set recv_find() throws org.apache.thrift.TException { find_result result = new find_result(); receiveBase(result, "find"); if (result.isSetSuccess()) { return result.success; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "find failed: unknown result"); } public boolean ping(long record, AccessToken creds, TransactionToken transaction) throws org.apache.thrift.TException { send_ping(record, creds, transaction); return recv_ping(); } public void send_ping(long record, AccessToken creds, TransactionToken transaction) throws org.apache.thrift.TException { ping_args args = new ping_args(); args.setRecord(record); args.setCreds(creds); args.setTransaction(transaction); sendBase("ping", args); } public boolean recv_ping() throws org.apache.thrift.TException { ping_result result = new ping_result(); receiveBase(result, "ping"); if (result.isSetSuccess()) { return result.success; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "ping failed: unknown result"); } public Set search(String key, String query, AccessToken creds, TransactionToken transaction) throws org.apache.thrift.TException { send_search(key, query, creds, transaction); return recv_search(); } public void send_search(String key, String query, AccessToken creds, TransactionToken transaction) throws org.apache.thrift.TException { search_args args = new search_args(); args.setKey(key); args.setQuery(query); args.setCreds(creds); args.setTransaction(transaction); sendBase("search", args); } public Set recv_search() throws org.apache.thrift.TException { search_result result = new search_result(); receiveBase(result, "search"); if (result.isSetSuccess()) { return result.success; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "search failed: unknown result"); } public boolean verify(String key, TObject value, long record, long timestamp, AccessToken creds, TransactionToken transaction) throws org.apache.thrift.TException { send_verify(key, value, record, timestamp, creds, transaction); return recv_verify(); } public void send_verify(String key, TObject value, long record, long timestamp, AccessToken creds, TransactionToken transaction) throws org.apache.thrift.TException { verify_args args = new verify_args(); args.setKey(key); args.setValue(value); args.setRecord(record); args.setTimestamp(timestamp); args.setCreds(creds); args.setTransaction(transaction); sendBase("verify", args); } public boolean recv_verify() throws org.apache.thrift.TException { verify_result result = new verify_result(); receiveBase(result, "verify"); if (result.isSetSuccess()) { return result.success; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "verify failed: unknown result"); } public void revert(String key, long record, long timestamp, AccessToken creds, TransactionToken token) throws org.apache.thrift.TException { send_revert(key, record, timestamp, creds, token); recv_revert(); } public void send_revert(String key, long record, long timestamp, AccessToken creds, TransactionToken token) throws org.apache.thrift.TException { revert_args args = new revert_args(); args.setKey(key); args.setRecord(record); args.setTimestamp(timestamp); args.setCreds(creds); args.setToken(token); sendBase("revert", args); } public void recv_revert() throws org.apache.thrift.TException { revert_result result = new revert_result(); receiveBase(result, "revert"); return; } } public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface { public static class Factory implements org.apache.thrift.async.TAsyncClientFactory { 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 username, String password, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); login_call method_call = new login_call(username, password, 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 username; private String password; public login_call(String username, String password, org.apache.thrift.async.AsyncMethodCallback 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.username = username; this.password = password; } 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.setUsername(username); args.setPassword(password); args.write(prot); prot.writeMessageEnd(); } public AccessToken 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_login(); } } public void logout(AccessToken token, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); logout_call method_call = new logout_call(token, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class logout_call extends org.apache.thrift.async.TAsyncMethodCall { private AccessToken token; public logout_call(AccessToken token, org.apache.thrift.async.AsyncMethodCallback 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.token = token; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("logout", org.apache.thrift.protocol.TMessageType.CALL, 0)); logout_args args = new logout_args(); args.setToken(token); args.write(prot); prot.writeMessageEnd(); } public void 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); (new Client(prot)).recv_logout(); } } public void stage(AccessToken token, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); stage_call method_call = new stage_call(token, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class stage_call extends org.apache.thrift.async.TAsyncMethodCall { private AccessToken token; public stage_call(AccessToken token, org.apache.thrift.async.AsyncMethodCallback 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.token = token; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("stage", org.apache.thrift.protocol.TMessageType.CALL, 0)); stage_args args = new stage_args(); args.setToken(token); args.write(prot); prot.writeMessageEnd(); } public TransactionToken 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_stage(); } } public void abort(AccessToken creds, TransactionToken transaction, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); abort_call method_call = new abort_call(creds, transaction, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class abort_call extends org.apache.thrift.async.TAsyncMethodCall { private AccessToken creds; private TransactionToken transaction; public abort_call(AccessToken creds, TransactionToken transaction, org.apache.thrift.async.AsyncMethodCallback 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.creds = creds; this.transaction = transaction; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("abort", org.apache.thrift.protocol.TMessageType.CALL, 0)); abort_args args = new abort_args(); args.setCreds(creds); args.setTransaction(transaction); args.write(prot); prot.writeMessageEnd(); } public void 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); (new Client(prot)).recv_abort(); } } public void commit(AccessToken creds, TransactionToken transaction, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); commit_call method_call = new commit_call(creds, transaction, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class commit_call extends org.apache.thrift.async.TAsyncMethodCall { private AccessToken creds; private TransactionToken transaction; public commit_call(AccessToken creds, TransactionToken transaction, org.apache.thrift.async.AsyncMethodCallback 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.creds = creds; this.transaction = transaction; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("commit", org.apache.thrift.protocol.TMessageType.CALL, 0)); commit_args args = new commit_args(); args.setCreds(creds); args.setTransaction(transaction); args.write(prot); prot.writeMessageEnd(); } public boolean 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_commit(); } } public void add(String key, TObject value, long record, AccessToken creds, TransactionToken transaction, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); add_call method_call = new add_call(key, value, record, creds, transaction, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class add_call extends org.apache.thrift.async.TAsyncMethodCall { private String key; private TObject value; private long record; private AccessToken creds; private TransactionToken transaction; public add_call(String key, TObject value, long record, AccessToken creds, TransactionToken transaction, org.apache.thrift.async.AsyncMethodCallback 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.key = key; this.value = value; this.record = record; this.creds = creds; this.transaction = transaction; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("add", org.apache.thrift.protocol.TMessageType.CALL, 0)); add_args args = new add_args(); args.setKey(key); args.setValue(value); args.setRecord(record); args.setCreds(creds); args.setTransaction(transaction); args.write(prot); prot.writeMessageEnd(); } public boolean 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_add(); } } public void remove(String key, TObject value, long record, AccessToken creds, TransactionToken transaction, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); remove_call method_call = new remove_call(key, value, record, creds, transaction, 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 key; private TObject value; private long record; private AccessToken creds; private TransactionToken transaction; public remove_call(String key, TObject value, long record, AccessToken creds, TransactionToken transaction, org.apache.thrift.async.AsyncMethodCallback 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.key = key; this.value = value; this.record = record; this.creds = creds; this.transaction = transaction; } 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.setKey(key); args.setValue(value); args.setRecord(record); args.setCreds(creds); args.setTransaction(transaction); args.write(prot); prot.writeMessageEnd(); } public boolean 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_remove(); } } public void audit(long record, String key, AccessToken creds, TransactionToken transaction, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); audit_call method_call = new audit_call(record, key, creds, transaction, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class audit_call extends org.apache.thrift.async.TAsyncMethodCall { private long record; private String key; private AccessToken creds; private TransactionToken transaction; public audit_call(long record, String key, AccessToken creds, TransactionToken transaction, org.apache.thrift.async.AsyncMethodCallback 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.record = record; this.key = key; this.creds = creds; this.transaction = transaction; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("audit", org.apache.thrift.protocol.TMessageType.CALL, 0)); audit_args args = new audit_args(); args.setRecord(record); args.setKey(key); args.setCreds(creds); args.setTransaction(transaction); args.write(prot); prot.writeMessageEnd(); } public Map 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_audit(); } } public void describe(long record, long timestamp, AccessToken creds, TransactionToken transaction, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); describe_call method_call = new describe_call(record, timestamp, creds, transaction, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class describe_call extends org.apache.thrift.async.TAsyncMethodCall { private long record; private long timestamp; private AccessToken creds; private TransactionToken transaction; public describe_call(long record, long timestamp, AccessToken creds, TransactionToken transaction, org.apache.thrift.async.AsyncMethodCallback 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.record = record; this.timestamp = timestamp; this.creds = creds; this.transaction = transaction; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("describe", org.apache.thrift.protocol.TMessageType.CALL, 0)); describe_args args = new describe_args(); args.setRecord(record); args.setTimestamp(timestamp); args.setCreds(creds); args.setTransaction(transaction); args.write(prot); prot.writeMessageEnd(); } public Set 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(); } } public void fetch(String key, long record, long timestamp, AccessToken creds, TransactionToken transaction, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); fetch_call method_call = new fetch_call(key, record, timestamp, creds, transaction, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class fetch_call extends org.apache.thrift.async.TAsyncMethodCall { private String key; private long record; private long timestamp; private AccessToken creds; private TransactionToken transaction; public fetch_call(String key, long record, long timestamp, AccessToken creds, TransactionToken transaction, org.apache.thrift.async.AsyncMethodCallback 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.key = key; this.record = record; this.timestamp = timestamp; this.creds = creds; this.transaction = transaction; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("fetch", org.apache.thrift.protocol.TMessageType.CALL, 0)); fetch_args args = new fetch_args(); args.setKey(key); args.setRecord(record); args.setTimestamp(timestamp); args.setCreds(creds); args.setTransaction(transaction); args.write(prot); prot.writeMessageEnd(); } public Set 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_fetch(); } } public void find(String key, Operator operator, List values, long timestamp, AccessToken creds, TransactionToken transaction, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); find_call method_call = new find_call(key, operator, values, timestamp, creds, transaction, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class find_call extends org.apache.thrift.async.TAsyncMethodCall { private String key; private Operator operator; private List values; private long timestamp; private AccessToken creds; private TransactionToken transaction; public find_call(String key, Operator operator, List values, long timestamp, AccessToken creds, TransactionToken transaction, org.apache.thrift.async.AsyncMethodCallback 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.key = key; this.operator = operator; this.values = values; this.timestamp = timestamp; this.creds = creds; this.transaction = transaction; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("find", org.apache.thrift.protocol.TMessageType.CALL, 0)); find_args args = new find_args(); args.setKey(key); args.setOperator(operator); args.setValues(values); args.setTimestamp(timestamp); args.setCreds(creds); args.setTransaction(transaction); args.write(prot); prot.writeMessageEnd(); } public Set 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_find(); } } public void ping(long record, AccessToken creds, TransactionToken transaction, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); ping_call method_call = new ping_call(record, creds, transaction, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class ping_call extends org.apache.thrift.async.TAsyncMethodCall { private long record; private AccessToken creds; private TransactionToken transaction; public ping_call(long record, AccessToken creds, TransactionToken transaction, org.apache.thrift.async.AsyncMethodCallback 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.record = record; this.creds = creds; this.transaction = transaction; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("ping", org.apache.thrift.protocol.TMessageType.CALL, 0)); ping_args args = new ping_args(); args.setRecord(record); args.setCreds(creds); args.setTransaction(transaction); args.write(prot); prot.writeMessageEnd(); } public boolean 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_ping(); } } public void search(String key, String query, AccessToken creds, TransactionToken transaction, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); search_call method_call = new search_call(key, query, creds, transaction, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class search_call extends org.apache.thrift.async.TAsyncMethodCall { private String key; private String query; private AccessToken creds; private TransactionToken transaction; public search_call(String key, String query, AccessToken creds, TransactionToken transaction, org.apache.thrift.async.AsyncMethodCallback 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.key = key; this.query = query; this.creds = creds; this.transaction = transaction; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("search", org.apache.thrift.protocol.TMessageType.CALL, 0)); search_args args = new search_args(); args.setKey(key); args.setQuery(query); args.setCreds(creds); args.setTransaction(transaction); args.write(prot); prot.writeMessageEnd(); } public Set 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_search(); } } public void verify(String key, TObject value, long record, long timestamp, AccessToken creds, TransactionToken transaction, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); verify_call method_call = new verify_call(key, value, record, timestamp, creds, transaction, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class verify_call extends org.apache.thrift.async.TAsyncMethodCall { private String key; private TObject value; private long record; private long timestamp; private AccessToken creds; private TransactionToken transaction; public verify_call(String key, TObject value, long record, long timestamp, AccessToken creds, TransactionToken transaction, org.apache.thrift.async.AsyncMethodCallback 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.key = key; this.value = value; this.record = record; this.timestamp = timestamp; this.creds = creds; this.transaction = transaction; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("verify", org.apache.thrift.protocol.TMessageType.CALL, 0)); verify_args args = new verify_args(); args.setKey(key); args.setValue(value); args.setRecord(record); args.setTimestamp(timestamp); args.setCreds(creds); args.setTransaction(transaction); args.write(prot); prot.writeMessageEnd(); } public boolean 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_verify(); } } public void revert(String key, long record, long timestamp, AccessToken creds, TransactionToken token, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); revert_call method_call = new revert_call(key, record, timestamp, creds, token, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class revert_call extends org.apache.thrift.async.TAsyncMethodCall { private String key; private long record; private long timestamp; private AccessToken creds; private TransactionToken token; public revert_call(String key, long record, long timestamp, AccessToken creds, TransactionToken token, org.apache.thrift.async.AsyncMethodCallback 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.key = key; this.record = record; this.timestamp = timestamp; this.creds = creds; this.token = token; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("revert", org.apache.thrift.protocol.TMessageType.CALL, 0)); revert_args args = new revert_args(); args.setKey(key); args.setRecord(record); args.setTimestamp(timestamp); args.setCreds(creds); args.setToken(token); args.write(prot); prot.writeMessageEnd(); } public void 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); (new Client(prot)).recv_revert(); } } } public static class Processor extends org.apache.thrift.TBaseProcessor implements org.apache.thrift.TProcessor { private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName()); public Processor(I iface) { super(iface, getProcessMap(new LinkedHashMap>())); } protected Processor(I iface, Map> processMap) { super(iface, getProcessMap(processMap)); } private static Map> getProcessMap(Map> processMap) { processMap.put("login", new login()); processMap.put("logout", new logout()); processMap.put("stage", new stage()); processMap.put("abort", new abort()); processMap.put("commit", new commit()); processMap.put("add", new add()); processMap.put("remove", new remove()); processMap.put("audit", new audit()); processMap.put("describe", new describe()); processMap.put("fetch", new fetch()); processMap.put("find", new find()); processMap.put("ping", new ping()); processMap.put("search", new search()); processMap.put("verify", new verify()); processMap.put("revert", new revert()); return processMap; } public static class login extends org.apache.thrift.ProcessFunction { public login() { super("login"); } public login_args getEmptyArgsInstance() { return new login_args(); } protected boolean isOneway() { return false; } public login_result getResult(I iface, login_args args) throws org.apache.thrift.TException { login_result result = new login_result(); result.success = iface.login(args.username, args.password); return result; } } public static class logout extends org.apache.thrift.ProcessFunction { public logout() { super("logout"); } public logout_args getEmptyArgsInstance() { return new logout_args(); } protected boolean isOneway() { return false; } public logout_result getResult(I iface, logout_args args) throws org.apache.thrift.TException { logout_result result = new logout_result(); iface.logout(args.token); return result; } } public static class stage extends org.apache.thrift.ProcessFunction { public stage() { super("stage"); } public stage_args getEmptyArgsInstance() { return new stage_args(); } protected boolean isOneway() { return false; } public stage_result getResult(I iface, stage_args args) throws org.apache.thrift.TException { stage_result result = new stage_result(); result.success = iface.stage(args.token); return result; } } public static class abort extends org.apache.thrift.ProcessFunction { public abort() { super("abort"); } public abort_args getEmptyArgsInstance() { return new abort_args(); } protected boolean isOneway() { return false; } public abort_result getResult(I iface, abort_args args) throws org.apache.thrift.TException { abort_result result = new abort_result(); iface.abort(args.creds, args.transaction); return result; } } public static class commit extends org.apache.thrift.ProcessFunction { public commit() { super("commit"); } public commit_args getEmptyArgsInstance() { return new commit_args(); } protected boolean isOneway() { return false; } public commit_result getResult(I iface, commit_args args) throws org.apache.thrift.TException { commit_result result = new commit_result(); result.success = iface.commit(args.creds, args.transaction); result.setSuccessIsSet(true); return result; } } public static class add extends org.apache.thrift.ProcessFunction { public add() { super("add"); } public add_args getEmptyArgsInstance() { return new add_args(); } protected boolean isOneway() { return false; } public add_result getResult(I iface, add_args args) throws org.apache.thrift.TException { add_result result = new add_result(); result.success = iface.add(args.key, args.value, args.record, args.creds, args.transaction); result.setSuccessIsSet(true); return result; } } public static class remove extends org.apache.thrift.ProcessFunction { public remove() { super("remove"); } public remove_args getEmptyArgsInstance() { return new remove_args(); } protected boolean isOneway() { return false; } public remove_result getResult(I iface, remove_args args) throws org.apache.thrift.TException { remove_result result = new remove_result(); result.success = iface.remove(args.key, args.value, args.record, args.creds, args.transaction); result.setSuccessIsSet(true); return result; } } public static class audit extends org.apache.thrift.ProcessFunction { public audit() { super("audit"); } public audit_args getEmptyArgsInstance() { return new audit_args(); } protected boolean isOneway() { return false; } public audit_result getResult(I iface, audit_args args) throws org.apache.thrift.TException { audit_result result = new audit_result(); result.success = iface.audit(args.record, args.key, args.creds, args.transaction); return result; } } public static class describe extends org.apache.thrift.ProcessFunction { public describe() { super("describe"); } public describe_args getEmptyArgsInstance() { return new describe_args(); } protected boolean isOneway() { return false; } public describe_result getResult(I iface, describe_args args) throws org.apache.thrift.TException { describe_result result = new describe_result(); result.success = iface.describe(args.record, args.timestamp, args.creds, args.transaction); return result; } } public static class fetch extends org.apache.thrift.ProcessFunction { public fetch() { super("fetch"); } public fetch_args getEmptyArgsInstance() { return new fetch_args(); } protected boolean isOneway() { return false; } public fetch_result getResult(I iface, fetch_args args) throws org.apache.thrift.TException { fetch_result result = new fetch_result(); result.success = iface.fetch(args.key, args.record, args.timestamp, args.creds, args.transaction); return result; } } public static class find extends org.apache.thrift.ProcessFunction { public find() { super("find"); } public find_args getEmptyArgsInstance() { return new find_args(); } protected boolean isOneway() { return false; } public find_result getResult(I iface, find_args args) throws org.apache.thrift.TException { find_result result = new find_result(); result.success = iface.find(args.key, args.operator, args.values, args.timestamp, args.creds, args.transaction); return result; } } public static class ping extends org.apache.thrift.ProcessFunction { public ping() { super("ping"); } public ping_args getEmptyArgsInstance() { return new ping_args(); } protected boolean isOneway() { return false; } public ping_result getResult(I iface, ping_args args) throws org.apache.thrift.TException { ping_result result = new ping_result(); result.success = iface.ping(args.record, args.creds, args.transaction); result.setSuccessIsSet(true); return result; } } public static class search extends org.apache.thrift.ProcessFunction { public search() { super("search"); } public search_args getEmptyArgsInstance() { return new search_args(); } protected boolean isOneway() { return false; } public search_result getResult(I iface, search_args args) throws org.apache.thrift.TException { search_result result = new search_result(); result.success = iface.search(args.key, args.query, args.creds, args.transaction); return result; } } public static class verify extends org.apache.thrift.ProcessFunction { public verify() { super("verify"); } public verify_args getEmptyArgsInstance() { return new verify_args(); } protected boolean isOneway() { return false; } public verify_result getResult(I iface, verify_args args) throws org.apache.thrift.TException { verify_result result = new verify_result(); result.success = iface.verify(args.key, args.value, args.record, args.timestamp, args.creds, args.transaction); result.setSuccessIsSet(true); return result; } } public static class revert extends org.apache.thrift.ProcessFunction { public revert() { super("revert"); } public revert_args getEmptyArgsInstance() { return new revert_args(); } protected boolean isOneway() { return false; } public revert_result getResult(I iface, revert_args args) throws org.apache.thrift.TException { revert_result result = new revert_result(); iface.revert(args.key, args.record, args.timestamp, args.creds, args.token); return result; } } } public static class login_args implements org.apache.thrift.TBase, 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 USERNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("username", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField PASSWORD_FIELD_DESC = new org.apache.thrift.protocol.TField("password", org.apache.thrift.protocol.TType.STRING, (short)2); private static final Map, SchemeFactory> schemes = new LinkedHashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new login_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new login_argsTupleSchemeFactory()); } public String username; // required public String password; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { USERNAME((short)1, "username"), PASSWORD((short)2, "password"); private static final Map byName = new LinkedHashMap(); 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: // USERNAME return USERNAME; case 2: // PASSWORD return PASSWORD; 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.USERNAME, new org.apache.thrift.meta_data.FieldMetaData("username", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.PASSWORD, new org.apache.thrift.meta_data.FieldMetaData("password", 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(login_args.class, metaDataMap); } public login_args() { } public login_args( String username, String password) { this(); this.username = username; this.password = password; } /** * Performs a deep copy on other. */ public login_args(login_args other) { if (other.isSetUsername()) { this.username = other.username; } if (other.isSetPassword()) { this.password = other.password; } } public login_args deepCopy() { return new login_args(this); } @Override public void clear() { this.username = null; this.password = null; } public String getUsername() { return this.username; } public login_args setUsername(String username) { this.username = username; return this; } public void unsetUsername() { this.username = null; } /** Returns true if field username is set (has been assigned a value) and false otherwise */ public boolean isSetUsername() { return this.username != null; } public void setUsernameIsSet(boolean value) { if (!value) { this.username = null; } } public String getPassword() { return this.password; } public login_args setPassword(String password) { this.password = password; return this; } public void unsetPassword() { this.password = null; } /** Returns true if field password is set (has been assigned a value) and false otherwise */ public boolean isSetPassword() { return this.password != null; } public void setPasswordIsSet(boolean value) { if (!value) { this.password = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case USERNAME: if (value == null) { unsetUsername(); } else { setUsername((String)value); } break; case PASSWORD: if (value == null) { unsetPassword(); } else { setPassword((String)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case USERNAME: return getUsername(); case PASSWORD: return getPassword(); } 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 USERNAME: return isSetUsername(); case PASSWORD: return isSetPassword(); } 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_username = true && this.isSetUsername(); boolean that_present_username = true && that.isSetUsername(); if (this_present_username || that_present_username) { if (!(this_present_username && that_present_username)) return false; if (!this.username.equals(that.username)) return false; } boolean this_present_password = true && this.isSetPassword(); boolean that_present_password = true && that.isSetPassword(); if (this_present_password || that_present_password) { if (!(this_present_password && that_present_password)) return false; if (!this.password.equals(that.password)) return false; } return true; } @Override public int hashCode() { return 0; } 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(isSetUsername()).compareTo(typedOther.isSetUsername()); if (lastComparison != 0) { return lastComparison; } if (isSetUsername()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.username, typedOther.username); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPassword()).compareTo(typedOther.isSetPassword()); if (lastComparison != 0) { return lastComparison; } if (isSetPassword()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.password, typedOther.password); 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 { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("login_args("); boolean first = true; sb.append("username:"); if (this.username == null) { sb.append("null"); } else { sb.append(this.username); } first = false; if (!first) sb.append(", "); sb.append("password:"); if (this.password == null) { sb.append("null"); } else { sb.append(this.password); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } 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); } } private static class login_argsStandardSchemeFactory implements SchemeFactory { public login_argsStandardScheme getScheme() { return new login_argsStandardScheme(); } } private static class login_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, login_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // USERNAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.username = iprot.readString(); struct.setUsernameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // PASSWORD if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.password = iprot.readString(); struct.setPasswordIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, login_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.username != null) { oprot.writeFieldBegin(USERNAME_FIELD_DESC); oprot.writeString(struct.username); oprot.writeFieldEnd(); } if (struct.password != null) { oprot.writeFieldBegin(PASSWORD_FIELD_DESC); oprot.writeString(struct.password); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class login_argsTupleSchemeFactory implements SchemeFactory { public login_argsTupleScheme getScheme() { return new login_argsTupleScheme(); } } private static class login_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, login_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetUsername()) { optionals.set(0); } if (struct.isSetPassword()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetUsername()) { oprot.writeString(struct.username); } if (struct.isSetPassword()) { oprot.writeString(struct.password); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, login_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.username = iprot.readString(); struct.setUsernameIsSet(true); } if (incoming.get(1)) { struct.password = iprot.readString(); struct.setPasswordIsSet(true); } } } } public static class login_result implements org.apache.thrift.TBase, 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 SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); private static final Map, SchemeFactory> schemes = new LinkedHashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new login_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new login_resultTupleSchemeFactory()); } public AccessToken success; // required /** 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 byName = new LinkedHashMap(); 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.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, AccessToken.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(login_result.class, metaDataMap); } public login_result() { } public login_result( AccessToken success) { this(); this.success = success; } /** * Performs a deep copy on other. */ public login_result(login_result other) { if (other.isSetSuccess()) { this.success = new AccessToken(other.success); } } public login_result deepCopy() { return new login_result(this); } @Override public void clear() { this.success = null; } public AccessToken getSuccess() { return this.success; } public login_result setSuccess(AccessToken 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((AccessToken)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 login_result) return this.equals((login_result)that); return false; } public boolean equals(login_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() { return 0; } 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(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 { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("login_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 // check for sub-struct validity if (success != null) { success.validate(); } } 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); } } private static class login_resultStandardSchemeFactory implements SchemeFactory { public login_resultStandardScheme getScheme() { return new login_resultStandardScheme(); } } private static class login_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, login_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.success = new AccessToken(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, login_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); struct.success.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class login_resultTupleSchemeFactory implements SchemeFactory { public login_resultTupleScheme getScheme() { return new login_resultTupleScheme(); } } private static class login_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, login_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetSuccess()) { struct.success.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, login_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.success = new AccessToken(); struct.success.read(iprot); struct.setSuccessIsSet(true); } } } } public static class logout_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("logout_args"); private static final org.apache.thrift.protocol.TField TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("token", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new LinkedHashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new logout_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new logout_argsTupleSchemeFactory()); } public AccessToken token; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { TOKEN((short)1, "token"); private static final Map byName = new LinkedHashMap(); 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: // TOKEN return TOKEN; 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.TOKEN, new org.apache.thrift.meta_data.FieldMetaData("token", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, AccessToken.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(logout_args.class, metaDataMap); } public logout_args() { } public logout_args( AccessToken token) { this(); this.token = token; } /** * Performs a deep copy on other. */ public logout_args(logout_args other) { if (other.isSetToken()) { this.token = new AccessToken(other.token); } } public logout_args deepCopy() { return new logout_args(this); } @Override public void clear() { this.token = null; } public AccessToken getToken() { return this.token; } public logout_args setToken(AccessToken token) { this.token = token; return this; } public void unsetToken() { this.token = null; } /** Returns true if field token is set (has been assigned a value) and false otherwise */ public boolean isSetToken() { return this.token != null; } public void setTokenIsSet(boolean value) { if (!value) { this.token = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case TOKEN: if (value == null) { unsetToken(); } else { setToken((AccessToken)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case TOKEN: return getToken(); } 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 TOKEN: return isSetToken(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof logout_args) return this.equals((logout_args)that); return false; } public boolean equals(logout_args that) { if (that == null) return false; boolean this_present_token = true && this.isSetToken(); boolean that_present_token = true && that.isSetToken(); if (this_present_token || that_present_token) { if (!(this_present_token && that_present_token)) return false; if (!this.token.equals(that.token)) return false; } return true; } @Override public int hashCode() { return 0; } public int compareTo(logout_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; logout_args typedOther = (logout_args)other; lastComparison = Boolean.valueOf(isSetToken()).compareTo(typedOther.isSetToken()); if (lastComparison != 0) { return lastComparison; } if (isSetToken()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.token, typedOther.token); 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 { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("logout_args("); boolean first = true; sb.append("token:"); if (this.token == null) { sb.append("null"); } else { sb.append(this.token); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (token != null) { token.validate(); } } 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); } } private static class logout_argsStandardSchemeFactory implements SchemeFactory { public logout_argsStandardScheme getScheme() { return new logout_argsStandardScheme(); } } private static class logout_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, logout_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // TOKEN if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.token = new AccessToken(); struct.token.read(iprot); struct.setTokenIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, logout_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.token != null) { oprot.writeFieldBegin(TOKEN_FIELD_DESC); struct.token.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class logout_argsTupleSchemeFactory implements SchemeFactory { public logout_argsTupleScheme getScheme() { return new logout_argsTupleScheme(); } } private static class logout_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, logout_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetToken()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetToken()) { struct.token.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, logout_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.token = new AccessToken(); struct.token.read(iprot); struct.setTokenIsSet(true); } } } } public static class logout_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("logout_result"); private static final Map, SchemeFactory> schemes = new LinkedHashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new logout_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new logout_resultTupleSchemeFactory()); } /** 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 byName = new LinkedHashMap(); 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(logout_result.class, metaDataMap); } public logout_result() { } /** * Performs a deep copy on other. */ public logout_result(logout_result other) { } public logout_result deepCopy() { return new logout_result(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 logout_result) return this.equals((logout_result)that); return false; } public boolean equals(logout_result that) { if (that == null) return false; return true; } @Override public int hashCode() { return 0; } public int compareTo(logout_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; logout_result typedOther = (logout_result)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 { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("logout_result("); boolean first = true; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } 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); } } private static class logout_resultStandardSchemeFactory implements SchemeFactory { public logout_resultStandardScheme getScheme() { return new logout_resultStandardScheme(); } } private static class logout_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, logout_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, logout_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class logout_resultTupleSchemeFactory implements SchemeFactory { public logout_resultTupleScheme getScheme() { return new logout_resultTupleScheme(); } } private static class logout_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, logout_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; } @Override public void read(org.apache.thrift.protocol.TProtocol prot, logout_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; } } } public static class stage_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("stage_args"); private static final org.apache.thrift.protocol.TField TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("token", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new LinkedHashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new stage_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new stage_argsTupleSchemeFactory()); } public AccessToken token; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { TOKEN((short)1, "token"); private static final Map byName = new LinkedHashMap(); 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: // TOKEN return TOKEN; 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.TOKEN, new org.apache.thrift.meta_data.FieldMetaData("token", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, AccessToken.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(stage_args.class, metaDataMap); } public stage_args() { } public stage_args( AccessToken token) { this(); this.token = token; } /** * Performs a deep copy on other. */ public stage_args(stage_args other) { if (other.isSetToken()) { this.token = new AccessToken(other.token); } } public stage_args deepCopy() { return new stage_args(this); } @Override public void clear() { this.token = null; } public AccessToken getToken() { return this.token; } public stage_args setToken(AccessToken token) { this.token = token; return this; } public void unsetToken() { this.token = null; } /** Returns true if field token is set (has been assigned a value) and false otherwise */ public boolean isSetToken() { return this.token != null; } public void setTokenIsSet(boolean value) { if (!value) { this.token = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case TOKEN: if (value == null) { unsetToken(); } else { setToken((AccessToken)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case TOKEN: return getToken(); } 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 TOKEN: return isSetToken(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof stage_args) return this.equals((stage_args)that); return false; } public boolean equals(stage_args that) { if (that == null) return false; boolean this_present_token = true && this.isSetToken(); boolean that_present_token = true && that.isSetToken(); if (this_present_token || that_present_token) { if (!(this_present_token && that_present_token)) return false; if (!this.token.equals(that.token)) return false; } return true; } @Override public int hashCode() { return 0; } public int compareTo(stage_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; stage_args typedOther = (stage_args)other; lastComparison = Boolean.valueOf(isSetToken()).compareTo(typedOther.isSetToken()); if (lastComparison != 0) { return lastComparison; } if (isSetToken()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.token, typedOther.token); 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 { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("stage_args("); boolean first = true; sb.append("token:"); if (this.token == null) { sb.append("null"); } else { sb.append(this.token); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (token != null) { token.validate(); } } 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); } } private static class stage_argsStandardSchemeFactory implements SchemeFactory { public stage_argsStandardScheme getScheme() { return new stage_argsStandardScheme(); } } private static class stage_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, stage_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // TOKEN if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.token = new AccessToken(); struct.token.read(iprot); struct.setTokenIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, stage_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.token != null) { oprot.writeFieldBegin(TOKEN_FIELD_DESC); struct.token.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class stage_argsTupleSchemeFactory implements SchemeFactory { public stage_argsTupleScheme getScheme() { return new stage_argsTupleScheme(); } } private static class stage_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, stage_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetToken()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetToken()) { struct.token.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, stage_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.token = new AccessToken(); struct.token.read(iprot); struct.setTokenIsSet(true); } } } } public static class stage_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("stage_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 Map, SchemeFactory> schemes = new LinkedHashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new stage_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new stage_resultTupleSchemeFactory()); } public TransactionToken success; // required /** 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 byName = new LinkedHashMap(); 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.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TransactionToken.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(stage_result.class, metaDataMap); } public stage_result() { } public stage_result( TransactionToken success) { this(); this.success = success; } /** * Performs a deep copy on other. */ public stage_result(stage_result other) { if (other.isSetSuccess()) { this.success = new TransactionToken(other.success); } } public stage_result deepCopy() { return new stage_result(this); } @Override public void clear() { this.success = null; } public TransactionToken getSuccess() { return this.success; } public stage_result setSuccess(TransactionToken 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((TransactionToken)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 stage_result) return this.equals((stage_result)that); return false; } public boolean equals(stage_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() { return 0; } public int compareTo(stage_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; stage_result typedOther = (stage_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 { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("stage_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 // check for sub-struct validity if (success != null) { success.validate(); } } 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); } } private static class stage_resultStandardSchemeFactory implements SchemeFactory { public stage_resultStandardScheme getScheme() { return new stage_resultStandardScheme(); } } private static class stage_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, stage_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.success = new TransactionToken(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, stage_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); struct.success.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class stage_resultTupleSchemeFactory implements SchemeFactory { public stage_resultTupleScheme getScheme() { return new stage_resultTupleScheme(); } } private static class stage_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, stage_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetSuccess()) { struct.success.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, stage_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.success = new TransactionToken(); struct.success.read(iprot); struct.setSuccessIsSet(true); } } } } public static class abort_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("abort_args"); private static final org.apache.thrift.protocol.TField CREDS_FIELD_DESC = new org.apache.thrift.protocol.TField("creds", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField TRANSACTION_FIELD_DESC = new org.apache.thrift.protocol.TField("transaction", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final Map, SchemeFactory> schemes = new LinkedHashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new abort_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new abort_argsTupleSchemeFactory()); } public AccessToken creds; // required public TransactionToken transaction; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { CREDS((short)1, "creds"), TRANSACTION((short)2, "transaction"); private static final Map byName = new LinkedHashMap(); 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: // CREDS return CREDS; case 2: // TRANSACTION return TRANSACTION; 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.CREDS, new org.apache.thrift.meta_data.FieldMetaData("creds", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, AccessToken.class))); tmpMap.put(_Fields.TRANSACTION, new org.apache.thrift.meta_data.FieldMetaData("transaction", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TransactionToken.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(abort_args.class, metaDataMap); } public abort_args() { } public abort_args( AccessToken creds, TransactionToken transaction) { this(); this.creds = creds; this.transaction = transaction; } /** * Performs a deep copy on other. */ public abort_args(abort_args other) { if (other.isSetCreds()) { this.creds = new AccessToken(other.creds); } if (other.isSetTransaction()) { this.transaction = new TransactionToken(other.transaction); } } public abort_args deepCopy() { return new abort_args(this); } @Override public void clear() { this.creds = null; this.transaction = null; } public AccessToken getCreds() { return this.creds; } public abort_args setCreds(AccessToken creds) { this.creds = creds; return this; } public void unsetCreds() { this.creds = null; } /** Returns true if field creds is set (has been assigned a value) and false otherwise */ public boolean isSetCreds() { return this.creds != null; } public void setCredsIsSet(boolean value) { if (!value) { this.creds = null; } } public TransactionToken getTransaction() { return this.transaction; } public abort_args setTransaction(TransactionToken transaction) { this.transaction = transaction; return this; } public void unsetTransaction() { this.transaction = null; } /** Returns true if field transaction is set (has been assigned a value) and false otherwise */ public boolean isSetTransaction() { return this.transaction != null; } public void setTransactionIsSet(boolean value) { if (!value) { this.transaction = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case CREDS: if (value == null) { unsetCreds(); } else { setCreds((AccessToken)value); } break; case TRANSACTION: if (value == null) { unsetTransaction(); } else { setTransaction((TransactionToken)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case CREDS: return getCreds(); case TRANSACTION: return getTransaction(); } 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 CREDS: return isSetCreds(); case TRANSACTION: return isSetTransaction(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof abort_args) return this.equals((abort_args)that); return false; } public boolean equals(abort_args that) { if (that == null) return false; boolean this_present_creds = true && this.isSetCreds(); boolean that_present_creds = true && that.isSetCreds(); if (this_present_creds || that_present_creds) { if (!(this_present_creds && that_present_creds)) return false; if (!this.creds.equals(that.creds)) return false; } boolean this_present_transaction = true && this.isSetTransaction(); boolean that_present_transaction = true && that.isSetTransaction(); if (this_present_transaction || that_present_transaction) { if (!(this_present_transaction && that_present_transaction)) return false; if (!this.transaction.equals(that.transaction)) return false; } return true; } @Override public int hashCode() { return 0; } public int compareTo(abort_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; abort_args typedOther = (abort_args)other; lastComparison = Boolean.valueOf(isSetCreds()).compareTo(typedOther.isSetCreds()); if (lastComparison != 0) { return lastComparison; } if (isSetCreds()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.creds, typedOther.creds); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTransaction()).compareTo(typedOther.isSetTransaction()); if (lastComparison != 0) { return lastComparison; } if (isSetTransaction()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.transaction, typedOther.transaction); 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 { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("abort_args("); boolean first = true; sb.append("creds:"); if (this.creds == null) { sb.append("null"); } else { sb.append(this.creds); } first = false; if (!first) sb.append(", "); sb.append("transaction:"); if (this.transaction == null) { sb.append("null"); } else { sb.append(this.transaction); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (creds != null) { creds.validate(); } if (transaction != null) { transaction.validate(); } } 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); } } private static class abort_argsStandardSchemeFactory implements SchemeFactory { public abort_argsStandardScheme getScheme() { return new abort_argsStandardScheme(); } } private static class abort_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, abort_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // CREDS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.creds = new AccessToken(); struct.creds.read(iprot); struct.setCredsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // TRANSACTION if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.transaction = new TransactionToken(); struct.transaction.read(iprot); struct.setTransactionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, abort_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.creds != null) { oprot.writeFieldBegin(CREDS_FIELD_DESC); struct.creds.write(oprot); oprot.writeFieldEnd(); } if (struct.transaction != null) { oprot.writeFieldBegin(TRANSACTION_FIELD_DESC); struct.transaction.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class abort_argsTupleSchemeFactory implements SchemeFactory { public abort_argsTupleScheme getScheme() { return new abort_argsTupleScheme(); } } private static class abort_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, abort_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetCreds()) { optionals.set(0); } if (struct.isSetTransaction()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetCreds()) { struct.creds.write(oprot); } if (struct.isSetTransaction()) { struct.transaction.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, abort_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.creds = new AccessToken(); struct.creds.read(iprot); struct.setCredsIsSet(true); } if (incoming.get(1)) { struct.transaction = new TransactionToken(); struct.transaction.read(iprot); struct.setTransactionIsSet(true); } } } } public static class abort_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("abort_result"); private static final Map, SchemeFactory> schemes = new LinkedHashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new abort_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new abort_resultTupleSchemeFactory()); } /** 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 byName = new LinkedHashMap(); 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(abort_result.class, metaDataMap); } public abort_result() { } /** * Performs a deep copy on other. */ public abort_result(abort_result other) { } public abort_result deepCopy() { return new abort_result(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 abort_result) return this.equals((abort_result)that); return false; } public boolean equals(abort_result that) { if (that == null) return false; return true; } @Override public int hashCode() { return 0; } public int compareTo(abort_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; abort_result typedOther = (abort_result)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 { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("abort_result("); boolean first = true; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } 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); } } private static class abort_resultStandardSchemeFactory implements SchemeFactory { public abort_resultStandardScheme getScheme() { return new abort_resultStandardScheme(); } } private static class abort_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, abort_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, abort_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class abort_resultTupleSchemeFactory implements SchemeFactory { public abort_resultTupleScheme getScheme() { return new abort_resultTupleScheme(); } } private static class abort_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, abort_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; } @Override public void read(org.apache.thrift.protocol.TProtocol prot, abort_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; } } } public static class commit_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("commit_args"); private static final org.apache.thrift.protocol.TField CREDS_FIELD_DESC = new org.apache.thrift.protocol.TField("creds", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField TRANSACTION_FIELD_DESC = new org.apache.thrift.protocol.TField("transaction", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final Map, SchemeFactory> schemes = new LinkedHashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new commit_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new commit_argsTupleSchemeFactory()); } public AccessToken creds; // required public TransactionToken transaction; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { CREDS((short)1, "creds"), TRANSACTION((short)2, "transaction"); private static final Map byName = new LinkedHashMap(); 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: // CREDS return CREDS; case 2: // TRANSACTION return TRANSACTION; 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.CREDS, new org.apache.thrift.meta_data.FieldMetaData("creds", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, AccessToken.class))); tmpMap.put(_Fields.TRANSACTION, new org.apache.thrift.meta_data.FieldMetaData("transaction", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TransactionToken.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(commit_args.class, metaDataMap); } public commit_args() { } public commit_args( AccessToken creds, TransactionToken transaction) { this(); this.creds = creds; this.transaction = transaction; } /** * Performs a deep copy on other. */ public commit_args(commit_args other) { if (other.isSetCreds()) { this.creds = new AccessToken(other.creds); } if (other.isSetTransaction()) { this.transaction = new TransactionToken(other.transaction); } } public commit_args deepCopy() { return new commit_args(this); } @Override public void clear() { this.creds = null; this.transaction = null; } public AccessToken getCreds() { return this.creds; } public commit_args setCreds(AccessToken creds) { this.creds = creds; return this; } public void unsetCreds() { this.creds = null; } /** Returns true if field creds is set (has been assigned a value) and false otherwise */ public boolean isSetCreds() { return this.creds != null; } public void setCredsIsSet(boolean value) { if (!value) { this.creds = null; } } public TransactionToken getTransaction() { return this.transaction; } public commit_args setTransaction(TransactionToken transaction) { this.transaction = transaction; return this; } public void unsetTransaction() { this.transaction = null; } /** Returns true if field transaction is set (has been assigned a value) and false otherwise */ public boolean isSetTransaction() { return this.transaction != null; } public void setTransactionIsSet(boolean value) { if (!value) { this.transaction = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case CREDS: if (value == null) { unsetCreds(); } else { setCreds((AccessToken)value); } break; case TRANSACTION: if (value == null) { unsetTransaction(); } else { setTransaction((TransactionToken)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case CREDS: return getCreds(); case TRANSACTION: return getTransaction(); } 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 CREDS: return isSetCreds(); case TRANSACTION: return isSetTransaction(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof commit_args) return this.equals((commit_args)that); return false; } public boolean equals(commit_args that) { if (that == null) return false; boolean this_present_creds = true && this.isSetCreds(); boolean that_present_creds = true && that.isSetCreds(); if (this_present_creds || that_present_creds) { if (!(this_present_creds && that_present_creds)) return false; if (!this.creds.equals(that.creds)) return false; } boolean this_present_transaction = true && this.isSetTransaction(); boolean that_present_transaction = true && that.isSetTransaction(); if (this_present_transaction || that_present_transaction) { if (!(this_present_transaction && that_present_transaction)) return false; if (!this.transaction.equals(that.transaction)) return false; } return true; } @Override public int hashCode() { return 0; } public int compareTo(commit_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; commit_args typedOther = (commit_args)other; lastComparison = Boolean.valueOf(isSetCreds()).compareTo(typedOther.isSetCreds()); if (lastComparison != 0) { return lastComparison; } if (isSetCreds()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.creds, typedOther.creds); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTransaction()).compareTo(typedOther.isSetTransaction()); if (lastComparison != 0) { return lastComparison; } if (isSetTransaction()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.transaction, typedOther.transaction); 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 { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("commit_args("); boolean first = true; sb.append("creds:"); if (this.creds == null) { sb.append("null"); } else { sb.append(this.creds); } first = false; if (!first) sb.append(", "); sb.append("transaction:"); if (this.transaction == null) { sb.append("null"); } else { sb.append(this.transaction); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (creds != null) { creds.validate(); } if (transaction != null) { transaction.validate(); } } 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); } } private static class commit_argsStandardSchemeFactory implements SchemeFactory { public commit_argsStandardScheme getScheme() { return new commit_argsStandardScheme(); } } private static class commit_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, commit_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // CREDS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.creds = new AccessToken(); struct.creds.read(iprot); struct.setCredsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // TRANSACTION if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.transaction = new TransactionToken(); struct.transaction.read(iprot); struct.setTransactionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, commit_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.creds != null) { oprot.writeFieldBegin(CREDS_FIELD_DESC); struct.creds.write(oprot); oprot.writeFieldEnd(); } if (struct.transaction != null) { oprot.writeFieldBegin(TRANSACTION_FIELD_DESC); struct.transaction.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class commit_argsTupleSchemeFactory implements SchemeFactory { public commit_argsTupleScheme getScheme() { return new commit_argsTupleScheme(); } } private static class commit_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, commit_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetCreds()) { optionals.set(0); } if (struct.isSetTransaction()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetCreds()) { struct.creds.write(oprot); } if (struct.isSetTransaction()) { struct.transaction.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, commit_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.creds = new AccessToken(); struct.creds.read(iprot); struct.setCredsIsSet(true); } if (incoming.get(1)) { struct.transaction = new TransactionToken(); struct.transaction.read(iprot); struct.setTransactionIsSet(true); } } } } public static class commit_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("commit_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0); private static final Map, SchemeFactory> schemes = new LinkedHashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new commit_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new commit_resultTupleSchemeFactory()); } public boolean success; // required /** 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 byName = new LinkedHashMap(); 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 private static final int __SUCCESS_ISSET_ID = 0; private byte __isset_bitfield = 0; 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.BOOL))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(commit_result.class, metaDataMap); } public commit_result() { } public commit_result( boolean success) { this(); this.success = success; setSuccessIsSet(true); } /** * Performs a deep copy on other. */ public commit_result(commit_result other) { __isset_bitfield = other.__isset_bitfield; this.success = other.success; } public commit_result deepCopy() { return new commit_result(this); } @Override public void clear() { setSuccessIsSet(false); this.success = false; } public boolean isSuccess() { return this.success; } public commit_result setSuccess(boolean success) { this.success = success; setSuccessIsSet(true); return this; } public void unsetSuccess() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((Boolean)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return Boolean.valueOf(isSuccess()); } 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 commit_result) return this.equals((commit_result)that); return false; } public boolean equals(commit_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; } return true; } @Override public int hashCode() { return 0; } public int compareTo(commit_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; commit_result typedOther = (commit_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 { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("commit_result("); boolean first = true; sb.append("success:"); sb.append(this.success); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } 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_bitfield = 0; 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); } } private static class commit_resultStandardSchemeFactory implements SchemeFactory { public commit_resultStandardScheme getScheme() { return new commit_resultStandardScheme(); } } private static class commit_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, commit_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.success = iprot.readBool(); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, commit_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeBool(struct.success); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class commit_resultTupleSchemeFactory implements SchemeFactory { public commit_resultTupleScheme getScheme() { return new commit_resultTupleScheme(); } } private static class commit_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, commit_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetSuccess()) { oprot.writeBool(struct.success); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, commit_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.success = iprot.readBool(); struct.setSuccessIsSet(true); } } } } public static class add_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("add_args"); 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)1); private static final org.apache.thrift.protocol.TField VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("value", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField RECORD_FIELD_DESC = new org.apache.thrift.protocol.TField("record", org.apache.thrift.protocol.TType.I64, (short)3); private static final org.apache.thrift.protocol.TField CREDS_FIELD_DESC = new org.apache.thrift.protocol.TField("creds", org.apache.thrift.protocol.TType.STRUCT, (short)4); private static final org.apache.thrift.protocol.TField TRANSACTION_FIELD_DESC = new org.apache.thrift.protocol.TField("transaction", org.apache.thrift.protocol.TType.STRUCT, (short)5); private static final Map, SchemeFactory> schemes = new LinkedHashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new add_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new add_argsTupleSchemeFactory()); } public String key; // required public TObject value; // required public long record; // required public AccessToken creds; // required public TransactionToken transaction; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { KEY((short)1, "key"), VALUE((short)2, "value"), RECORD((short)3, "record"), CREDS((short)4, "creds"), TRANSACTION((short)5, "transaction"); private static final Map byName = new LinkedHashMap(); 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: // KEY return KEY; case 2: // VALUE return VALUE; case 3: // RECORD return RECORD; case 4: // CREDS return CREDS; case 5: // TRANSACTION return TRANSACTION; 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 __RECORD_ISSET_ID = 0; private byte __isset_bitfield = 0; 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.KEY, new org.apache.thrift.meta_data.FieldMetaData("key", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.VALUE, new org.apache.thrift.meta_data.FieldMetaData("value", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TObject.class))); tmpMap.put(_Fields.RECORD, new org.apache.thrift.meta_data.FieldMetaData("record", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); tmpMap.put(_Fields.CREDS, new org.apache.thrift.meta_data.FieldMetaData("creds", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, AccessToken.class))); tmpMap.put(_Fields.TRANSACTION, new org.apache.thrift.meta_data.FieldMetaData("transaction", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TransactionToken.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(add_args.class, metaDataMap); } public add_args() { } public add_args( String key, TObject value, long record, AccessToken creds, TransactionToken transaction) { this(); this.key = key; this.value = value; this.record = record; setRecordIsSet(true); this.creds = creds; this.transaction = transaction; } /** * Performs a deep copy on other. */ public add_args(add_args other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetKey()) { this.key = other.key; } if (other.isSetValue()) { this.value = new TObject(other.value); } this.record = other.record; if (other.isSetCreds()) { this.creds = new AccessToken(other.creds); } if (other.isSetTransaction()) { this.transaction = new TransactionToken(other.transaction); } } public add_args deepCopy() { return new add_args(this); } @Override public void clear() { this.key = null; this.value = null; setRecordIsSet(false); this.record = 0; this.creds = null; this.transaction = null; } public String getKey() { return this.key; } public add_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 TObject getValue() { return this.value; } public add_args setValue(TObject 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 getRecord() { return this.record; } public add_args setRecord(long record) { this.record = record; setRecordIsSet(true); return this; } public void unsetRecord() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __RECORD_ISSET_ID); } /** Returns true if field record is set (has been assigned a value) and false otherwise */ public boolean isSetRecord() { return EncodingUtils.testBit(__isset_bitfield, __RECORD_ISSET_ID); } public void setRecordIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __RECORD_ISSET_ID, value); } public AccessToken getCreds() { return this.creds; } public add_args setCreds(AccessToken creds) { this.creds = creds; return this; } public void unsetCreds() { this.creds = null; } /** Returns true if field creds is set (has been assigned a value) and false otherwise */ public boolean isSetCreds() { return this.creds != null; } public void setCredsIsSet(boolean value) { if (!value) { this.creds = null; } } public TransactionToken getTransaction() { return this.transaction; } public add_args setTransaction(TransactionToken transaction) { this.transaction = transaction; return this; } public void unsetTransaction() { this.transaction = null; } /** Returns true if field transaction is set (has been assigned a value) and false otherwise */ public boolean isSetTransaction() { return this.transaction != null; } public void setTransactionIsSet(boolean value) { if (!value) { this.transaction = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case KEY: if (value == null) { unsetKey(); } else { setKey((String)value); } break; case VALUE: if (value == null) { unsetValue(); } else { setValue((TObject)value); } break; case RECORD: if (value == null) { unsetRecord(); } else { setRecord((Long)value); } break; case CREDS: if (value == null) { unsetCreds(); } else { setCreds((AccessToken)value); } break; case TRANSACTION: if (value == null) { unsetTransaction(); } else { setTransaction((TransactionToken)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case KEY: return getKey(); case VALUE: return getValue(); case RECORD: return Long.valueOf(getRecord()); case CREDS: return getCreds(); case TRANSACTION: return getTransaction(); } 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 KEY: return isSetKey(); case VALUE: return isSetValue(); case RECORD: return isSetRecord(); case CREDS: return isSetCreds(); case TRANSACTION: return isSetTransaction(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof add_args) return this.equals((add_args)that); return false; } public boolean equals(add_args that) { if (that == null) 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_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_record = true; boolean that_present_record = true; if (this_present_record || that_present_record) { if (!(this_present_record && that_present_record)) return false; if (this.record != that.record) return false; } boolean this_present_creds = true && this.isSetCreds(); boolean that_present_creds = true && that.isSetCreds(); if (this_present_creds || that_present_creds) { if (!(this_present_creds && that_present_creds)) return false; if (!this.creds.equals(that.creds)) return false; } boolean this_present_transaction = true && this.isSetTransaction(); boolean that_present_transaction = true && that.isSetTransaction(); if (this_present_transaction || that_present_transaction) { if (!(this_present_transaction && that_present_transaction)) return false; if (!this.transaction.equals(that.transaction)) return false; } return true; } @Override public int hashCode() { return 0; } public int compareTo(add_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; add_args typedOther = (add_args)other; 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(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(isSetRecord()).compareTo(typedOther.isSetRecord()); if (lastComparison != 0) { return lastComparison; } if (isSetRecord()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.record, typedOther.record); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetCreds()).compareTo(typedOther.isSetCreds()); if (lastComparison != 0) { return lastComparison; } if (isSetCreds()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.creds, typedOther.creds); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTransaction()).compareTo(typedOther.isSetTransaction()); if (lastComparison != 0) { return lastComparison; } if (isSetTransaction()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.transaction, typedOther.transaction); 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 { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("add_args("); boolean first = true; sb.append("key:"); if (this.key == null) { sb.append("null"); } else { sb.append(this.key); } first = false; if (!first) sb.append(", "); sb.append("value:"); if (this.value == null) { sb.append("null"); } else { sb.append(this.value); } first = false; if (!first) sb.append(", "); sb.append("record:"); sb.append(this.record); first = false; if (!first) sb.append(", "); sb.append("creds:"); if (this.creds == null) { sb.append("null"); } else { sb.append(this.creds); } first = false; if (!first) sb.append(", "); sb.append("transaction:"); if (this.transaction == null) { sb.append("null"); } else { sb.append(this.transaction); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (value != null) { value.validate(); } if (creds != null) { creds.validate(); } if (transaction != null) { transaction.validate(); } } 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_bitfield = 0; 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); } } private static class add_argsStandardSchemeFactory implements SchemeFactory { public add_argsStandardScheme getScheme() { return new add_argsStandardScheme(); } } private static class add_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, add_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // KEY if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.key = iprot.readString(); struct.setKeyIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // VALUE if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.value = new TObject(); struct.value.read(iprot); struct.setValueIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // RECORD if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.record = iprot.readI64(); struct.setRecordIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // CREDS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.creds = new AccessToken(); struct.creds.read(iprot); struct.setCredsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 5: // TRANSACTION if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.transaction = new TransactionToken(); struct.transaction.read(iprot); struct.setTransactionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, add_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.key != null) { oprot.writeFieldBegin(KEY_FIELD_DESC); oprot.writeString(struct.key); oprot.writeFieldEnd(); } if (struct.value != null) { oprot.writeFieldBegin(VALUE_FIELD_DESC); struct.value.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldBegin(RECORD_FIELD_DESC); oprot.writeI64(struct.record); oprot.writeFieldEnd(); if (struct.creds != null) { oprot.writeFieldBegin(CREDS_FIELD_DESC); struct.creds.write(oprot); oprot.writeFieldEnd(); } if (struct.transaction != null) { oprot.writeFieldBegin(TRANSACTION_FIELD_DESC); struct.transaction.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class add_argsTupleSchemeFactory implements SchemeFactory { public add_argsTupleScheme getScheme() { return new add_argsTupleScheme(); } } private static class add_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, add_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetKey()) { optionals.set(0); } if (struct.isSetValue()) { optionals.set(1); } if (struct.isSetRecord()) { optionals.set(2); } if (struct.isSetCreds()) { optionals.set(3); } if (struct.isSetTransaction()) { optionals.set(4); } oprot.writeBitSet(optionals, 5); if (struct.isSetKey()) { oprot.writeString(struct.key); } if (struct.isSetValue()) { struct.value.write(oprot); } if (struct.isSetRecord()) { oprot.writeI64(struct.record); } if (struct.isSetCreds()) { struct.creds.write(oprot); } if (struct.isSetTransaction()) { struct.transaction.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, add_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(5); if (incoming.get(0)) { struct.key = iprot.readString(); struct.setKeyIsSet(true); } if (incoming.get(1)) { struct.value = new TObject(); struct.value.read(iprot); struct.setValueIsSet(true); } if (incoming.get(2)) { struct.record = iprot.readI64(); struct.setRecordIsSet(true); } if (incoming.get(3)) { struct.creds = new AccessToken(); struct.creds.read(iprot); struct.setCredsIsSet(true); } if (incoming.get(4)) { struct.transaction = new TransactionToken(); struct.transaction.read(iprot); struct.setTransactionIsSet(true); } } } } public static class add_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("add_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0); private static final Map, SchemeFactory> schemes = new LinkedHashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new add_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new add_resultTupleSchemeFactory()); } public boolean success; // required /** 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 byName = new LinkedHashMap(); 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 private static final int __SUCCESS_ISSET_ID = 0; private byte __isset_bitfield = 0; 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.BOOL))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(add_result.class, metaDataMap); } public add_result() { } public add_result( boolean success) { this(); this.success = success; setSuccessIsSet(true); } /** * Performs a deep copy on other. */ public add_result(add_result other) { __isset_bitfield = other.__isset_bitfield; this.success = other.success; } public add_result deepCopy() { return new add_result(this); } @Override public void clear() { setSuccessIsSet(false); this.success = false; } public boolean isSuccess() { return this.success; } public add_result setSuccess(boolean success) { this.success = success; setSuccessIsSet(true); return this; } public void unsetSuccess() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((Boolean)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return Boolean.valueOf(isSuccess()); } 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 add_result) return this.equals((add_result)that); return false; } public boolean equals(add_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; } return true; } @Override public int hashCode() { return 0; } public int compareTo(add_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; add_result typedOther = (add_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 { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("add_result("); boolean first = true; sb.append("success:"); sb.append(this.success); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } 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_bitfield = 0; 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); } } private static class add_resultStandardSchemeFactory implements SchemeFactory { public add_resultStandardScheme getScheme() { return new add_resultStandardScheme(); } } private static class add_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, add_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.success = iprot.readBool(); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, add_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeBool(struct.success); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class add_resultTupleSchemeFactory implements SchemeFactory { public add_resultTupleScheme getScheme() { return new add_resultTupleScheme(); } } private static class add_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, add_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetSuccess()) { oprot.writeBool(struct.success); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, add_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.success = iprot.readBool(); struct.setSuccessIsSet(true); } } } } public static class remove_args implements org.apache.thrift.TBase, 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 KEY_FIELD_DESC = new org.apache.thrift.protocol.TField("key", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("value", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField RECORD_FIELD_DESC = new org.apache.thrift.protocol.TField("record", org.apache.thrift.protocol.TType.I64, (short)3); private static final org.apache.thrift.protocol.TField CREDS_FIELD_DESC = new org.apache.thrift.protocol.TField("creds", org.apache.thrift.protocol.TType.STRUCT, (short)4); private static final org.apache.thrift.protocol.TField TRANSACTION_FIELD_DESC = new org.apache.thrift.protocol.TField("transaction", org.apache.thrift.protocol.TType.STRUCT, (short)5); private static final Map, SchemeFactory> schemes = new LinkedHashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new remove_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new remove_argsTupleSchemeFactory()); } public String key; // required public TObject value; // required public long record; // required public AccessToken creds; // required public TransactionToken transaction; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { KEY((short)1, "key"), VALUE((short)2, "value"), RECORD((short)3, "record"), CREDS((short)4, "creds"), TRANSACTION((short)5, "transaction"); private static final Map byName = new LinkedHashMap(); 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: // KEY return KEY; case 2: // VALUE return VALUE; case 3: // RECORD return RECORD; case 4: // CREDS return CREDS; case 5: // TRANSACTION return TRANSACTION; 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 __RECORD_ISSET_ID = 0; private byte __isset_bitfield = 0; 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.KEY, new org.apache.thrift.meta_data.FieldMetaData("key", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.VALUE, new org.apache.thrift.meta_data.FieldMetaData("value", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TObject.class))); tmpMap.put(_Fields.RECORD, new org.apache.thrift.meta_data.FieldMetaData("record", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); tmpMap.put(_Fields.CREDS, new org.apache.thrift.meta_data.FieldMetaData("creds", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, AccessToken.class))); tmpMap.put(_Fields.TRANSACTION, new org.apache.thrift.meta_data.FieldMetaData("transaction", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TransactionToken.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(remove_args.class, metaDataMap); } public remove_args() { } public remove_args( String key, TObject value, long record, AccessToken creds, TransactionToken transaction) { this(); this.key = key; this.value = value; this.record = record; setRecordIsSet(true); this.creds = creds; this.transaction = transaction; } /** * Performs a deep copy on other. */ public remove_args(remove_args other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetKey()) { this.key = other.key; } if (other.isSetValue()) { this.value = new TObject(other.value); } this.record = other.record; if (other.isSetCreds()) { this.creds = new AccessToken(other.creds); } if (other.isSetTransaction()) { this.transaction = new TransactionToken(other.transaction); } } public remove_args deepCopy() { return new remove_args(this); } @Override public void clear() { this.key = null; this.value = null; setRecordIsSet(false); this.record = 0; this.creds = null; this.transaction = 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 TObject getValue() { return this.value; } public remove_args setValue(TObject 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 getRecord() { return this.record; } public remove_args setRecord(long record) { this.record = record; setRecordIsSet(true); return this; } public void unsetRecord() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __RECORD_ISSET_ID); } /** Returns true if field record is set (has been assigned a value) and false otherwise */ public boolean isSetRecord() { return EncodingUtils.testBit(__isset_bitfield, __RECORD_ISSET_ID); } public void setRecordIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __RECORD_ISSET_ID, value); } public AccessToken getCreds() { return this.creds; } public remove_args setCreds(AccessToken creds) { this.creds = creds; return this; } public void unsetCreds() { this.creds = null; } /** Returns true if field creds is set (has been assigned a value) and false otherwise */ public boolean isSetCreds() { return this.creds != null; } public void setCredsIsSet(boolean value) { if (!value) { this.creds = null; } } public TransactionToken getTransaction() { return this.transaction; } public remove_args setTransaction(TransactionToken transaction) { this.transaction = transaction; return this; } public void unsetTransaction() { this.transaction = null; } /** Returns true if field transaction is set (has been assigned a value) and false otherwise */ public boolean isSetTransaction() { return this.transaction != null; } public void setTransactionIsSet(boolean value) { if (!value) { this.transaction = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case KEY: if (value == null) { unsetKey(); } else { setKey((String)value); } break; case VALUE: if (value == null) { unsetValue(); } else { setValue((TObject)value); } break; case RECORD: if (value == null) { unsetRecord(); } else { setRecord((Long)value); } break; case CREDS: if (value == null) { unsetCreds(); } else { setCreds((AccessToken)value); } break; case TRANSACTION: if (value == null) { unsetTransaction(); } else { setTransaction((TransactionToken)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case KEY: return getKey(); case VALUE: return getValue(); case RECORD: return Long.valueOf(getRecord()); case CREDS: return getCreds(); case TRANSACTION: return getTransaction(); } 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 KEY: return isSetKey(); case VALUE: return isSetValue(); case RECORD: return isSetRecord(); case CREDS: return isSetCreds(); case TRANSACTION: return isSetTransaction(); } 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_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_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_record = true; boolean that_present_record = true; if (this_present_record || that_present_record) { if (!(this_present_record && that_present_record)) return false; if (this.record != that.record) return false; } boolean this_present_creds = true && this.isSetCreds(); boolean that_present_creds = true && that.isSetCreds(); if (this_present_creds || that_present_creds) { if (!(this_present_creds && that_present_creds)) return false; if (!this.creds.equals(that.creds)) return false; } boolean this_present_transaction = true && this.isSetTransaction(); boolean that_present_transaction = true && that.isSetTransaction(); if (this_present_transaction || that_present_transaction) { if (!(this_present_transaction && that_present_transaction)) return false; if (!this.transaction.equals(that.transaction)) return false; } return true; } @Override public int hashCode() { return 0; } 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(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(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(isSetRecord()).compareTo(typedOther.isSetRecord()); if (lastComparison != 0) { return lastComparison; } if (isSetRecord()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.record, typedOther.record); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetCreds()).compareTo(typedOther.isSetCreds()); if (lastComparison != 0) { return lastComparison; } if (isSetCreds()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.creds, typedOther.creds); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTransaction()).compareTo(typedOther.isSetTransaction()); if (lastComparison != 0) { return lastComparison; } if (isSetTransaction()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.transaction, typedOther.transaction); 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 { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("remove_args("); boolean first = true; sb.append("key:"); if (this.key == null) { sb.append("null"); } else { sb.append(this.key); } first = false; if (!first) sb.append(", "); sb.append("value:"); if (this.value == null) { sb.append("null"); } else { sb.append(this.value); } first = false; if (!first) sb.append(", "); sb.append("record:"); sb.append(this.record); first = false; if (!first) sb.append(", "); sb.append("creds:"); if (this.creds == null) { sb.append("null"); } else { sb.append(this.creds); } first = false; if (!first) sb.append(", "); sb.append("transaction:"); if (this.transaction == null) { sb.append("null"); } else { sb.append(this.transaction); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (value != null) { value.validate(); } if (creds != null) { creds.validate(); } if (transaction != null) { transaction.validate(); } } 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_bitfield = 0; 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); } } private static class remove_argsStandardSchemeFactory implements SchemeFactory { public remove_argsStandardScheme getScheme() { return new remove_argsStandardScheme(); } } private static class remove_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, remove_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // KEY if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.key = iprot.readString(); struct.setKeyIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // VALUE if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.value = new TObject(); struct.value.read(iprot); struct.setValueIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // RECORD if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.record = iprot.readI64(); struct.setRecordIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // CREDS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.creds = new AccessToken(); struct.creds.read(iprot); struct.setCredsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 5: // TRANSACTION if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.transaction = new TransactionToken(); struct.transaction.read(iprot); struct.setTransactionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, remove_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.key != null) { oprot.writeFieldBegin(KEY_FIELD_DESC); oprot.writeString(struct.key); oprot.writeFieldEnd(); } if (struct.value != null) { oprot.writeFieldBegin(VALUE_FIELD_DESC); struct.value.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldBegin(RECORD_FIELD_DESC); oprot.writeI64(struct.record); oprot.writeFieldEnd(); if (struct.creds != null) { oprot.writeFieldBegin(CREDS_FIELD_DESC); struct.creds.write(oprot); oprot.writeFieldEnd(); } if (struct.transaction != null) { oprot.writeFieldBegin(TRANSACTION_FIELD_DESC); struct.transaction.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class remove_argsTupleSchemeFactory implements SchemeFactory { public remove_argsTupleScheme getScheme() { return new remove_argsTupleScheme(); } } private static class remove_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, remove_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetKey()) { optionals.set(0); } if (struct.isSetValue()) { optionals.set(1); } if (struct.isSetRecord()) { optionals.set(2); } if (struct.isSetCreds()) { optionals.set(3); } if (struct.isSetTransaction()) { optionals.set(4); } oprot.writeBitSet(optionals, 5); if (struct.isSetKey()) { oprot.writeString(struct.key); } if (struct.isSetValue()) { struct.value.write(oprot); } if (struct.isSetRecord()) { oprot.writeI64(struct.record); } if (struct.isSetCreds()) { struct.creds.write(oprot); } if (struct.isSetTransaction()) { struct.transaction.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, remove_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(5); if (incoming.get(0)) { struct.key = iprot.readString(); struct.setKeyIsSet(true); } if (incoming.get(1)) { struct.value = new TObject(); struct.value.read(iprot); struct.setValueIsSet(true); } if (incoming.get(2)) { struct.record = iprot.readI64(); struct.setRecordIsSet(true); } if (incoming.get(3)) { struct.creds = new AccessToken(); struct.creds.read(iprot); struct.setCredsIsSet(true); } if (incoming.get(4)) { struct.transaction = new TransactionToken(); struct.transaction.read(iprot); struct.setTransactionIsSet(true); } } } } public static class remove_result implements org.apache.thrift.TBase, 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 SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0); private static final Map, SchemeFactory> schemes = new LinkedHashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new remove_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new remove_resultTupleSchemeFactory()); } public boolean success; // required /** 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 byName = new LinkedHashMap(); 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 private static final int __SUCCESS_ISSET_ID = 0; private byte __isset_bitfield = 0; 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.BOOL))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(remove_result.class, metaDataMap); } public remove_result() { } public remove_result( boolean success) { this(); this.success = success; setSuccessIsSet(true); } /** * Performs a deep copy on other. */ public remove_result(remove_result other) { __isset_bitfield = other.__isset_bitfield; this.success = other.success; } public remove_result deepCopy() { return new remove_result(this); } @Override public void clear() { setSuccessIsSet(false); this.success = false; } public boolean isSuccess() { return this.success; } public remove_result setSuccess(boolean success) { this.success = success; setSuccessIsSet(true); return this; } public void unsetSuccess() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((Boolean)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return Boolean.valueOf(isSuccess()); } 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 remove_result) return this.equals((remove_result)that); return false; } public boolean equals(remove_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; } return true; } @Override public int hashCode() { return 0; } 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(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 { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("remove_result("); boolean first = true; sb.append("success:"); sb.append(this.success); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } 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_bitfield = 0; 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); } } private static class remove_resultStandardSchemeFactory implements SchemeFactory { public remove_resultStandardScheme getScheme() { return new remove_resultStandardScheme(); } } private static class remove_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, remove_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.success = iprot.readBool(); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, remove_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeBool(struct.success); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class remove_resultTupleSchemeFactory implements SchemeFactory { public remove_resultTupleScheme getScheme() { return new remove_resultTupleScheme(); } } private static class remove_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, remove_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetSuccess()) { oprot.writeBool(struct.success); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, remove_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.success = iprot.readBool(); struct.setSuccessIsSet(true); } } } } public static class audit_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("audit_args"); private static final org.apache.thrift.protocol.TField RECORD_FIELD_DESC = new org.apache.thrift.protocol.TField("record", org.apache.thrift.protocol.TType.I64, (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 CREDS_FIELD_DESC = new org.apache.thrift.protocol.TField("creds", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final org.apache.thrift.protocol.TField TRANSACTION_FIELD_DESC = new org.apache.thrift.protocol.TField("transaction", org.apache.thrift.protocol.TType.STRUCT, (short)5); private static final Map, SchemeFactory> schemes = new LinkedHashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new audit_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new audit_argsTupleSchemeFactory()); } public long record; // required public String key; // required public AccessToken creds; // required public TransactionToken transaction; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { RECORD((short)1, "record"), KEY((short)2, "key"), CREDS((short)3, "creds"), TRANSACTION((short)5, "transaction"); private static final Map byName = new LinkedHashMap(); 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: // RECORD return RECORD; case 2: // KEY return KEY; case 3: // CREDS return CREDS; case 5: // TRANSACTION return TRANSACTION; 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 __RECORD_ISSET_ID = 0; private byte __isset_bitfield = 0; 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.RECORD, new org.apache.thrift.meta_data.FieldMetaData("record", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); tmpMap.put(_Fields.KEY, new org.apache.thrift.meta_data.FieldMetaData("key", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.CREDS, new org.apache.thrift.meta_data.FieldMetaData("creds", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, AccessToken.class))); tmpMap.put(_Fields.TRANSACTION, new org.apache.thrift.meta_data.FieldMetaData("transaction", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TransactionToken.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(audit_args.class, metaDataMap); } public audit_args() { } public audit_args( long record, String key, AccessToken creds, TransactionToken transaction) { this(); this.record = record; setRecordIsSet(true); this.key = key; this.creds = creds; this.transaction = transaction; } /** * Performs a deep copy on other. */ public audit_args(audit_args other) { __isset_bitfield = other.__isset_bitfield; this.record = other.record; if (other.isSetKey()) { this.key = other.key; } if (other.isSetCreds()) { this.creds = new AccessToken(other.creds); } if (other.isSetTransaction()) { this.transaction = new TransactionToken(other.transaction); } } public audit_args deepCopy() { return new audit_args(this); } @Override public void clear() { setRecordIsSet(false); this.record = 0; this.key = null; this.creds = null; this.transaction = null; } public long getRecord() { return this.record; } public audit_args setRecord(long record) { this.record = record; setRecordIsSet(true); return this; } public void unsetRecord() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __RECORD_ISSET_ID); } /** Returns true if field record is set (has been assigned a value) and false otherwise */ public boolean isSetRecord() { return EncodingUtils.testBit(__isset_bitfield, __RECORD_ISSET_ID); } public void setRecordIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __RECORD_ISSET_ID, value); } public String getKey() { return this.key; } public audit_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 AccessToken getCreds() { return this.creds; } public audit_args setCreds(AccessToken creds) { this.creds = creds; return this; } public void unsetCreds() { this.creds = null; } /** Returns true if field creds is set (has been assigned a value) and false otherwise */ public boolean isSetCreds() { return this.creds != null; } public void setCredsIsSet(boolean value) { if (!value) { this.creds = null; } } public TransactionToken getTransaction() { return this.transaction; } public audit_args setTransaction(TransactionToken transaction) { this.transaction = transaction; return this; } public void unsetTransaction() { this.transaction = null; } /** Returns true if field transaction is set (has been assigned a value) and false otherwise */ public boolean isSetTransaction() { return this.transaction != null; } public void setTransactionIsSet(boolean value) { if (!value) { this.transaction = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case RECORD: if (value == null) { unsetRecord(); } else { setRecord((Long)value); } break; case KEY: if (value == null) { unsetKey(); } else { setKey((String)value); } break; case CREDS: if (value == null) { unsetCreds(); } else { setCreds((AccessToken)value); } break; case TRANSACTION: if (value == null) { unsetTransaction(); } else { setTransaction((TransactionToken)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case RECORD: return Long.valueOf(getRecord()); case KEY: return getKey(); case CREDS: return getCreds(); case TRANSACTION: return getTransaction(); } 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 RECORD: return isSetRecord(); case KEY: return isSetKey(); case CREDS: return isSetCreds(); case TRANSACTION: return isSetTransaction(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof audit_args) return this.equals((audit_args)that); return false; } public boolean equals(audit_args that) { if (that == null) return false; boolean this_present_record = true; boolean that_present_record = true; if (this_present_record || that_present_record) { if (!(this_present_record && that_present_record)) return false; if (this.record != that.record) 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_creds = true && this.isSetCreds(); boolean that_present_creds = true && that.isSetCreds(); if (this_present_creds || that_present_creds) { if (!(this_present_creds && that_present_creds)) return false; if (!this.creds.equals(that.creds)) return false; } boolean this_present_transaction = true && this.isSetTransaction(); boolean that_present_transaction = true && that.isSetTransaction(); if (this_present_transaction || that_present_transaction) { if (!(this_present_transaction && that_present_transaction)) return false; if (!this.transaction.equals(that.transaction)) return false; } return true; } @Override public int hashCode() { return 0; } public int compareTo(audit_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; audit_args typedOther = (audit_args)other; lastComparison = Boolean.valueOf(isSetRecord()).compareTo(typedOther.isSetRecord()); if (lastComparison != 0) { return lastComparison; } if (isSetRecord()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.record, typedOther.record); 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(isSetCreds()).compareTo(typedOther.isSetCreds()); if (lastComparison != 0) { return lastComparison; } if (isSetCreds()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.creds, typedOther.creds); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTransaction()).compareTo(typedOther.isSetTransaction()); if (lastComparison != 0) { return lastComparison; } if (isSetTransaction()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.transaction, typedOther.transaction); 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 { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("audit_args("); boolean first = true; sb.append("record:"); sb.append(this.record); 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("creds:"); if (this.creds == null) { sb.append("null"); } else { sb.append(this.creds); } first = false; if (!first) sb.append(", "); sb.append("transaction:"); if (this.transaction == null) { sb.append("null"); } else { sb.append(this.transaction); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (creds != null) { creds.validate(); } if (transaction != null) { transaction.validate(); } } 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_bitfield = 0; 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); } } private static class audit_argsStandardSchemeFactory implements SchemeFactory { public audit_argsStandardScheme getScheme() { return new audit_argsStandardScheme(); } } private static class audit_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, audit_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // RECORD if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.record = iprot.readI64(); struct.setRecordIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // KEY if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.key = iprot.readString(); struct.setKeyIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // CREDS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.creds = new AccessToken(); struct.creds.read(iprot); struct.setCredsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 5: // TRANSACTION if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.transaction = new TransactionToken(); struct.transaction.read(iprot); struct.setTransactionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, audit_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldBegin(RECORD_FIELD_DESC); oprot.writeI64(struct.record); oprot.writeFieldEnd(); if (struct.key != null) { oprot.writeFieldBegin(KEY_FIELD_DESC); oprot.writeString(struct.key); oprot.writeFieldEnd(); } if (struct.creds != null) { oprot.writeFieldBegin(CREDS_FIELD_DESC); struct.creds.write(oprot); oprot.writeFieldEnd(); } if (struct.transaction != null) { oprot.writeFieldBegin(TRANSACTION_FIELD_DESC); struct.transaction.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class audit_argsTupleSchemeFactory implements SchemeFactory { public audit_argsTupleScheme getScheme() { return new audit_argsTupleScheme(); } } private static class audit_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, audit_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetRecord()) { optionals.set(0); } if (struct.isSetKey()) { optionals.set(1); } if (struct.isSetCreds()) { optionals.set(2); } if (struct.isSetTransaction()) { optionals.set(3); } oprot.writeBitSet(optionals, 4); if (struct.isSetRecord()) { oprot.writeI64(struct.record); } if (struct.isSetKey()) { oprot.writeString(struct.key); } if (struct.isSetCreds()) { struct.creds.write(oprot); } if (struct.isSetTransaction()) { struct.transaction.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, audit_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { struct.record = iprot.readI64(); struct.setRecordIsSet(true); } if (incoming.get(1)) { struct.key = iprot.readString(); struct.setKeyIsSet(true); } if (incoming.get(2)) { struct.creds = new AccessToken(); struct.creds.read(iprot); struct.setCredsIsSet(true); } if (incoming.get(3)) { struct.transaction = new TransactionToken(); struct.transaction.read(iprot); struct.setTransactionIsSet(true); } } } } public static class audit_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("audit_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 Map, SchemeFactory> schemes = new LinkedHashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new audit_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new audit_resultTupleSchemeFactory()); } public Map success; // required /** 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 byName = new LinkedHashMap(); 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.MapMetaData(org.apache.thrift.protocol.TType.MAP, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64), new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(audit_result.class, metaDataMap); } public audit_result() { } public audit_result( Map success) { this(); this.success = success; } /** * Performs a deep copy on other. */ public audit_result(audit_result other) { if (other.isSetSuccess()) { Map __this__success = new LinkedHashMap(); for (Map.Entry other_element : other.success.entrySet()) { Long other_element_key = other_element.getKey(); String other_element_value = other_element.getValue(); Long __this__success_copy_key = other_element_key; String __this__success_copy_value = other_element_value; __this__success.put(__this__success_copy_key, __this__success_copy_value); } this.success = __this__success; } } public audit_result deepCopy() { return new audit_result(this); } @Override public void clear() { this.success = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } public void putToSuccess(long key, String val) { if (this.success == null) { this.success = new LinkedHashMap(); } this.success.put(key, val); } public Map getSuccess() { return this.success; } public audit_result setSuccess(Map 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((Map)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 audit_result) return this.equals((audit_result)that); return false; } public boolean equals(audit_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() { return 0; } public int compareTo(audit_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; audit_result typedOther = (audit_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 { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("audit_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 // check for sub-struct validity } 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); } } private static class audit_resultStandardSchemeFactory implements SchemeFactory { public audit_resultStandardScheme getScheme() { return new audit_resultStandardScheme(); } } private static class audit_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, audit_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { { org.apache.thrift.protocol.TMap _map0 = iprot.readMapBegin(); struct.success = new LinkedHashMap(2*_map0.size); for (int _i1 = 0; _i1 < _map0.size; ++_i1) { long _key2; // optional String _val3; // required _key2 = iprot.readI64(); _val3 = iprot.readString(); struct.success.put(_key2, _val3); } iprot.readMapEnd(); } struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, audit_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I64, org.apache.thrift.protocol.TType.STRING, struct.success.size())); for (Map.Entry _iter4 : struct.success.entrySet()) { oprot.writeI64(_iter4.getKey()); oprot.writeString(_iter4.getValue()); } oprot.writeMapEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class audit_resultTupleSchemeFactory implements SchemeFactory { public audit_resultTupleScheme getScheme() { return new audit_resultTupleScheme(); } } private static class audit_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, audit_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); for (Map.Entry _iter5 : struct.success.entrySet()) { oprot.writeI64(_iter5.getKey()); oprot.writeString(_iter5.getValue()); } } } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, audit_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { { org.apache.thrift.protocol.TMap _map6 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I64, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.success = new LinkedHashMap(2*_map6.size); for (int _i7 = 0; _i7 < _map6.size; ++_i7) { long _key8; // optional String _val9; // required _key8 = iprot.readI64(); _val9 = iprot.readString(); struct.success.put(_key8, _val9); } } struct.setSuccessIsSet(true); } } } } public static class describe_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("describe_args"); private static final org.apache.thrift.protocol.TField RECORD_FIELD_DESC = new org.apache.thrift.protocol.TField("record", org.apache.thrift.protocol.TType.I64, (short)1); 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)2); private static final org.apache.thrift.protocol.TField CREDS_FIELD_DESC = new org.apache.thrift.protocol.TField("creds", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final org.apache.thrift.protocol.TField TRANSACTION_FIELD_DESC = new org.apache.thrift.protocol.TField("transaction", org.apache.thrift.protocol.TType.STRUCT, (short)4); private static final Map, SchemeFactory> schemes = new LinkedHashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new describe_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new describe_argsTupleSchemeFactory()); } public long record; // required public long timestamp; // required public AccessToken creds; // required public TransactionToken transaction; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { RECORD((short)1, "record"), TIMESTAMP((short)2, "timestamp"), CREDS((short)3, "creds"), TRANSACTION((short)4, "transaction"); private static final Map byName = new LinkedHashMap(); 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: // RECORD return RECORD; case 2: // TIMESTAMP return TIMESTAMP; case 3: // CREDS return CREDS; case 4: // TRANSACTION return TRANSACTION; 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 __RECORD_ISSET_ID = 0; private static final int __TIMESTAMP_ISSET_ID = 1; private byte __isset_bitfield = 0; 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.RECORD, new org.apache.thrift.meta_data.FieldMetaData("record", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); tmpMap.put(_Fields.TIMESTAMP, new org.apache.thrift.meta_data.FieldMetaData("timestamp", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); tmpMap.put(_Fields.CREDS, new org.apache.thrift.meta_data.FieldMetaData("creds", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, AccessToken.class))); tmpMap.put(_Fields.TRANSACTION, new org.apache.thrift.meta_data.FieldMetaData("transaction", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TransactionToken.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(describe_args.class, metaDataMap); } public describe_args() { } public describe_args( long record, long timestamp, AccessToken creds, TransactionToken transaction) { this(); this.record = record; setRecordIsSet(true); this.timestamp = timestamp; setTimestampIsSet(true); this.creds = creds; this.transaction = transaction; } /** * Performs a deep copy on other. */ public describe_args(describe_args other) { __isset_bitfield = other.__isset_bitfield; this.record = other.record; this.timestamp = other.timestamp; if (other.isSetCreds()) { this.creds = new AccessToken(other.creds); } if (other.isSetTransaction()) { this.transaction = new TransactionToken(other.transaction); } } public describe_args deepCopy() { return new describe_args(this); } @Override public void clear() { setRecordIsSet(false); this.record = 0; setTimestampIsSet(false); this.timestamp = 0; this.creds = null; this.transaction = null; } public long getRecord() { return this.record; } public describe_args setRecord(long record) { this.record = record; setRecordIsSet(true); return this; } public void unsetRecord() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __RECORD_ISSET_ID); } /** Returns true if field record is set (has been assigned a value) and false otherwise */ public boolean isSetRecord() { return EncodingUtils.testBit(__isset_bitfield, __RECORD_ISSET_ID); } public void setRecordIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __RECORD_ISSET_ID, value); } public long getTimestamp() { return this.timestamp; } public describe_args setTimestamp(long timestamp) { this.timestamp = timestamp; setTimestampIsSet(true); return this; } public void unsetTimestamp() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TIMESTAMP_ISSET_ID); } /** Returns true if field timestamp is set (has been assigned a value) and false otherwise */ public boolean isSetTimestamp() { return EncodingUtils.testBit(__isset_bitfield, __TIMESTAMP_ISSET_ID); } public void setTimestampIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TIMESTAMP_ISSET_ID, value); } public AccessToken getCreds() { return this.creds; } public describe_args setCreds(AccessToken creds) { this.creds = creds; return this; } public void unsetCreds() { this.creds = null; } /** Returns true if field creds is set (has been assigned a value) and false otherwise */ public boolean isSetCreds() { return this.creds != null; } public void setCredsIsSet(boolean value) { if (!value) { this.creds = null; } } public TransactionToken getTransaction() { return this.transaction; } public describe_args setTransaction(TransactionToken transaction) { this.transaction = transaction; return this; } public void unsetTransaction() { this.transaction = null; } /** Returns true if field transaction is set (has been assigned a value) and false otherwise */ public boolean isSetTransaction() { return this.transaction != null; } public void setTransactionIsSet(boolean value) { if (!value) { this.transaction = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case RECORD: if (value == null) { unsetRecord(); } else { setRecord((Long)value); } break; case TIMESTAMP: if (value == null) { unsetTimestamp(); } else { setTimestamp((Long)value); } break; case CREDS: if (value == null) { unsetCreds(); } else { setCreds((AccessToken)value); } break; case TRANSACTION: if (value == null) { unsetTransaction(); } else { setTransaction((TransactionToken)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case RECORD: return Long.valueOf(getRecord()); case TIMESTAMP: return Long.valueOf(getTimestamp()); case CREDS: return getCreds(); case TRANSACTION: return getTransaction(); } 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 RECORD: return isSetRecord(); case TIMESTAMP: return isSetTimestamp(); case CREDS: return isSetCreds(); case TRANSACTION: return isSetTransaction(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof describe_args) return this.equals((describe_args)that); return false; } public boolean equals(describe_args that) { if (that == null) return false; boolean this_present_record = true; boolean that_present_record = true; if (this_present_record || that_present_record) { if (!(this_present_record && that_present_record)) return false; if (this.record != that.record) 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_creds = true && this.isSetCreds(); boolean that_present_creds = true && that.isSetCreds(); if (this_present_creds || that_present_creds) { if (!(this_present_creds && that_present_creds)) return false; if (!this.creds.equals(that.creds)) return false; } boolean this_present_transaction = true && this.isSetTransaction(); boolean that_present_transaction = true && that.isSetTransaction(); if (this_present_transaction || that_present_transaction) { if (!(this_present_transaction && that_present_transaction)) return false; if (!this.transaction.equals(that.transaction)) return false; } return true; } @Override public int hashCode() { return 0; } public int compareTo(describe_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; describe_args typedOther = (describe_args)other; lastComparison = Boolean.valueOf(isSetRecord()).compareTo(typedOther.isSetRecord()); if (lastComparison != 0) { return lastComparison; } if (isSetRecord()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.record, typedOther.record); 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(isSetCreds()).compareTo(typedOther.isSetCreds()); if (lastComparison != 0) { return lastComparison; } if (isSetCreds()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.creds, typedOther.creds); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTransaction()).compareTo(typedOther.isSetTransaction()); if (lastComparison != 0) { return lastComparison; } if (isSetTransaction()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.transaction, typedOther.transaction); 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 { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("describe_args("); boolean first = true; sb.append("record:"); sb.append(this.record); first = false; if (!first) sb.append(", "); sb.append("timestamp:"); sb.append(this.timestamp); first = false; if (!first) sb.append(", "); sb.append("creds:"); if (this.creds == null) { sb.append("null"); } else { sb.append(this.creds); } first = false; if (!first) sb.append(", "); sb.append("transaction:"); if (this.transaction == null) { sb.append("null"); } else { sb.append(this.transaction); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (creds != null) { creds.validate(); } if (transaction != null) { transaction.validate(); } } 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_bitfield = 0; 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); } } private static class describe_argsStandardSchemeFactory implements SchemeFactory { public describe_argsStandardScheme getScheme() { return new describe_argsStandardScheme(); } } private static class describe_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, describe_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // RECORD if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.record = iprot.readI64(); struct.setRecordIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // TIMESTAMP if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.timestamp = iprot.readI64(); struct.setTimestampIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // CREDS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.creds = new AccessToken(); struct.creds.read(iprot); struct.setCredsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // TRANSACTION if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.transaction = new TransactionToken(); struct.transaction.read(iprot); struct.setTransactionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, describe_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldBegin(RECORD_FIELD_DESC); oprot.writeI64(struct.record); oprot.writeFieldEnd(); oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC); oprot.writeI64(struct.timestamp); oprot.writeFieldEnd(); if (struct.creds != null) { oprot.writeFieldBegin(CREDS_FIELD_DESC); struct.creds.write(oprot); oprot.writeFieldEnd(); } if (struct.transaction != null) { oprot.writeFieldBegin(TRANSACTION_FIELD_DESC); struct.transaction.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class describe_argsTupleSchemeFactory implements SchemeFactory { public describe_argsTupleScheme getScheme() { return new describe_argsTupleScheme(); } } private static class describe_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, describe_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetRecord()) { optionals.set(0); } if (struct.isSetTimestamp()) { optionals.set(1); } if (struct.isSetCreds()) { optionals.set(2); } if (struct.isSetTransaction()) { optionals.set(3); } oprot.writeBitSet(optionals, 4); if (struct.isSetRecord()) { oprot.writeI64(struct.record); } if (struct.isSetTimestamp()) { oprot.writeI64(struct.timestamp); } if (struct.isSetCreds()) { struct.creds.write(oprot); } if (struct.isSetTransaction()) { struct.transaction.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, describe_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { struct.record = iprot.readI64(); struct.setRecordIsSet(true); } if (incoming.get(1)) { struct.timestamp = iprot.readI64(); struct.setTimestampIsSet(true); } if (incoming.get(2)) { struct.creds = new AccessToken(); struct.creds.read(iprot); struct.setCredsIsSet(true); } if (incoming.get(3)) { struct.transaction = new TransactionToken(); struct.transaction.read(iprot); struct.setTransactionIsSet(true); } } } } public static class describe_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("describe_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); private static final Map, SchemeFactory> schemes = new LinkedHashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new describe_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new describe_resultTupleSchemeFactory()); } public Set success; // required /** 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 byName = new LinkedHashMap(); 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_result.class, metaDataMap); } public describe_result() { } public describe_result( Set success) { this(); this.success = success; } /** * Performs a deep copy on other. */ public describe_result(describe_result other) { if (other.isSetSuccess()) { Set __this__success = new LinkedHashSet(); for (String other_element : other.success) { __this__success.add(other_element); } this.success = __this__success; } } public describe_result deepCopy() { return new describe_result(this); } @Override public void clear() { this.success = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } public java.util.Iterator getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(String elem) { if (this.success == null) { this.success = new LinkedHashSet(); } this.success.add(elem); } public Set getSuccess() { return this.success; } public describe_result setSuccess(Set 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)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_result) return this.equals((describe_result)that); return false; } public boolean equals(describe_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() { return 0; } public int compareTo(describe_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; describe_result typedOther = (describe_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 { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("describe_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 // check for sub-struct validity } 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); } } private static class describe_resultStandardSchemeFactory implements SchemeFactory { public describe_resultStandardScheme getScheme() { return new describe_resultStandardScheme(); } } private static class describe_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, describe_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.SET) { { org.apache.thrift.protocol.TSet _set10 = iprot.readSetBegin(); struct.success = new LinkedHashSet(2*_set10.size); for (int _i11 = 0; _i11 < _set10.size; ++_i11) { String _elem12; // required _elem12 = iprot.readString(); struct.success.add(_elem12); } iprot.readSetEnd(); } struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, describe_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, struct.success.size())); for (String _iter13 : struct.success) { oprot.writeString(_iter13); } oprot.writeSetEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class describe_resultTupleSchemeFactory implements SchemeFactory { public describe_resultTupleScheme getScheme() { return new describe_resultTupleScheme(); } } private static class describe_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, describe_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); for (String _iter14 : struct.success) { oprot.writeString(_iter14); } } } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, describe_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { { org.apache.thrift.protocol.TSet _set15 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.success = new LinkedHashSet(2*_set15.size); for (int _i16 = 0; _i16 < _set15.size; ++_i16) { String _elem17; // required _elem17 = iprot.readString(); struct.success.add(_elem17); } } struct.setSuccessIsSet(true); } } } } public static class fetch_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fetch_args"); 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)1); private static final org.apache.thrift.protocol.TField RECORD_FIELD_DESC = new org.apache.thrift.protocol.TField("record", org.apache.thrift.protocol.TType.I64, (short)2); 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)3); private static final org.apache.thrift.protocol.TField CREDS_FIELD_DESC = new org.apache.thrift.protocol.TField("creds", org.apache.thrift.protocol.TType.STRUCT, (short)4); private static final org.apache.thrift.protocol.TField TRANSACTION_FIELD_DESC = new org.apache.thrift.protocol.TField("transaction", org.apache.thrift.protocol.TType.STRUCT, (short)5); private static final Map, SchemeFactory> schemes = new LinkedHashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new fetch_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new fetch_argsTupleSchemeFactory()); } public String key; // required public long record; // required public long timestamp; // required public AccessToken creds; // required public TransactionToken transaction; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { KEY((short)1, "key"), RECORD((short)2, "record"), TIMESTAMP((short)3, "timestamp"), CREDS((short)4, "creds"), TRANSACTION((short)5, "transaction"); private static final Map byName = new LinkedHashMap(); 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: // KEY return KEY; case 2: // RECORD return RECORD; case 3: // TIMESTAMP return TIMESTAMP; case 4: // CREDS return CREDS; case 5: // TRANSACTION return TRANSACTION; 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 __RECORD_ISSET_ID = 0; private static final int __TIMESTAMP_ISSET_ID = 1; private byte __isset_bitfield = 0; 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.KEY, new org.apache.thrift.meta_data.FieldMetaData("key", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.RECORD, new org.apache.thrift.meta_data.FieldMetaData("record", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); tmpMap.put(_Fields.TIMESTAMP, new org.apache.thrift.meta_data.FieldMetaData("timestamp", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); tmpMap.put(_Fields.CREDS, new org.apache.thrift.meta_data.FieldMetaData("creds", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, AccessToken.class))); tmpMap.put(_Fields.TRANSACTION, new org.apache.thrift.meta_data.FieldMetaData("transaction", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TransactionToken.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(fetch_args.class, metaDataMap); } public fetch_args() { } public fetch_args( String key, long record, long timestamp, AccessToken creds, TransactionToken transaction) { this(); this.key = key; this.record = record; setRecordIsSet(true); this.timestamp = timestamp; setTimestampIsSet(true); this.creds = creds; this.transaction = transaction; } /** * Performs a deep copy on other. */ public fetch_args(fetch_args other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetKey()) { this.key = other.key; } this.record = other.record; this.timestamp = other.timestamp; if (other.isSetCreds()) { this.creds = new AccessToken(other.creds); } if (other.isSetTransaction()) { this.transaction = new TransactionToken(other.transaction); } } public fetch_args deepCopy() { return new fetch_args(this); } @Override public void clear() { this.key = null; setRecordIsSet(false); this.record = 0; setTimestampIsSet(false); this.timestamp = 0; this.creds = null; this.transaction = null; } public String getKey() { return this.key; } public fetch_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 long getRecord() { return this.record; } public fetch_args setRecord(long record) { this.record = record; setRecordIsSet(true); return this; } public void unsetRecord() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __RECORD_ISSET_ID); } /** Returns true if field record is set (has been assigned a value) and false otherwise */ public boolean isSetRecord() { return EncodingUtils.testBit(__isset_bitfield, __RECORD_ISSET_ID); } public void setRecordIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __RECORD_ISSET_ID, value); } public long getTimestamp() { return this.timestamp; } public fetch_args setTimestamp(long timestamp) { this.timestamp = timestamp; setTimestampIsSet(true); return this; } public void unsetTimestamp() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TIMESTAMP_ISSET_ID); } /** Returns true if field timestamp is set (has been assigned a value) and false otherwise */ public boolean isSetTimestamp() { return EncodingUtils.testBit(__isset_bitfield, __TIMESTAMP_ISSET_ID); } public void setTimestampIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TIMESTAMP_ISSET_ID, value); } public AccessToken getCreds() { return this.creds; } public fetch_args setCreds(AccessToken creds) { this.creds = creds; return this; } public void unsetCreds() { this.creds = null; } /** Returns true if field creds is set (has been assigned a value) and false otherwise */ public boolean isSetCreds() { return this.creds != null; } public void setCredsIsSet(boolean value) { if (!value) { this.creds = null; } } public TransactionToken getTransaction() { return this.transaction; } public fetch_args setTransaction(TransactionToken transaction) { this.transaction = transaction; return this; } public void unsetTransaction() { this.transaction = null; } /** Returns true if field transaction is set (has been assigned a value) and false otherwise */ public boolean isSetTransaction() { return this.transaction != null; } public void setTransactionIsSet(boolean value) { if (!value) { this.transaction = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case KEY: if (value == null) { unsetKey(); } else { setKey((String)value); } break; case RECORD: if (value == null) { unsetRecord(); } else { setRecord((Long)value); } break; case TIMESTAMP: if (value == null) { unsetTimestamp(); } else { setTimestamp((Long)value); } break; case CREDS: if (value == null) { unsetCreds(); } else { setCreds((AccessToken)value); } break; case TRANSACTION: if (value == null) { unsetTransaction(); } else { setTransaction((TransactionToken)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case KEY: return getKey(); case RECORD: return Long.valueOf(getRecord()); case TIMESTAMP: return Long.valueOf(getTimestamp()); case CREDS: return getCreds(); case TRANSACTION: return getTransaction(); } 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 KEY: return isSetKey(); case RECORD: return isSetRecord(); case TIMESTAMP: return isSetTimestamp(); case CREDS: return isSetCreds(); case TRANSACTION: return isSetTransaction(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof fetch_args) return this.equals((fetch_args)that); return false; } public boolean equals(fetch_args that) { if (that == null) 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_record = true; boolean that_present_record = true; if (this_present_record || that_present_record) { if (!(this_present_record && that_present_record)) return false; if (this.record != that.record) 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_creds = true && this.isSetCreds(); boolean that_present_creds = true && that.isSetCreds(); if (this_present_creds || that_present_creds) { if (!(this_present_creds && that_present_creds)) return false; if (!this.creds.equals(that.creds)) return false; } boolean this_present_transaction = true && this.isSetTransaction(); boolean that_present_transaction = true && that.isSetTransaction(); if (this_present_transaction || that_present_transaction) { if (!(this_present_transaction && that_present_transaction)) return false; if (!this.transaction.equals(that.transaction)) return false; } return true; } @Override public int hashCode() { return 0; } public int compareTo(fetch_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; fetch_args typedOther = (fetch_args)other; 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(isSetRecord()).compareTo(typedOther.isSetRecord()); if (lastComparison != 0) { return lastComparison; } if (isSetRecord()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.record, typedOther.record); 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(isSetCreds()).compareTo(typedOther.isSetCreds()); if (lastComparison != 0) { return lastComparison; } if (isSetCreds()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.creds, typedOther.creds); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTransaction()).compareTo(typedOther.isSetTransaction()); if (lastComparison != 0) { return lastComparison; } if (isSetTransaction()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.transaction, typedOther.transaction); 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 { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("fetch_args("); boolean first = true; sb.append("key:"); if (this.key == null) { sb.append("null"); } else { sb.append(this.key); } first = false; if (!first) sb.append(", "); sb.append("record:"); sb.append(this.record); first = false; if (!first) sb.append(", "); sb.append("timestamp:"); sb.append(this.timestamp); first = false; if (!first) sb.append(", "); sb.append("creds:"); if (this.creds == null) { sb.append("null"); } else { sb.append(this.creds); } first = false; if (!first) sb.append(", "); sb.append("transaction:"); if (this.transaction == null) { sb.append("null"); } else { sb.append(this.transaction); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (creds != null) { creds.validate(); } if (transaction != null) { transaction.validate(); } } 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_bitfield = 0; 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); } } private static class fetch_argsStandardSchemeFactory implements SchemeFactory { public fetch_argsStandardScheme getScheme() { return new fetch_argsStandardScheme(); } } private static class fetch_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, fetch_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // KEY if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.key = iprot.readString(); struct.setKeyIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // RECORD if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.record = iprot.readI64(); struct.setRecordIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // TIMESTAMP if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.timestamp = iprot.readI64(); struct.setTimestampIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // CREDS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.creds = new AccessToken(); struct.creds.read(iprot); struct.setCredsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 5: // TRANSACTION if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.transaction = new TransactionToken(); struct.transaction.read(iprot); struct.setTransactionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, fetch_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.key != null) { oprot.writeFieldBegin(KEY_FIELD_DESC); oprot.writeString(struct.key); oprot.writeFieldEnd(); } oprot.writeFieldBegin(RECORD_FIELD_DESC); oprot.writeI64(struct.record); oprot.writeFieldEnd(); oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC); oprot.writeI64(struct.timestamp); oprot.writeFieldEnd(); if (struct.creds != null) { oprot.writeFieldBegin(CREDS_FIELD_DESC); struct.creds.write(oprot); oprot.writeFieldEnd(); } if (struct.transaction != null) { oprot.writeFieldBegin(TRANSACTION_FIELD_DESC); struct.transaction.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class fetch_argsTupleSchemeFactory implements SchemeFactory { public fetch_argsTupleScheme getScheme() { return new fetch_argsTupleScheme(); } } private static class fetch_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, fetch_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetKey()) { optionals.set(0); } if (struct.isSetRecord()) { optionals.set(1); } if (struct.isSetTimestamp()) { optionals.set(2); } if (struct.isSetCreds()) { optionals.set(3); } if (struct.isSetTransaction()) { optionals.set(4); } oprot.writeBitSet(optionals, 5); if (struct.isSetKey()) { oprot.writeString(struct.key); } if (struct.isSetRecord()) { oprot.writeI64(struct.record); } if (struct.isSetTimestamp()) { oprot.writeI64(struct.timestamp); } if (struct.isSetCreds()) { struct.creds.write(oprot); } if (struct.isSetTransaction()) { struct.transaction.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, fetch_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(5); if (incoming.get(0)) { struct.key = iprot.readString(); struct.setKeyIsSet(true); } if (incoming.get(1)) { struct.record = iprot.readI64(); struct.setRecordIsSet(true); } if (incoming.get(2)) { struct.timestamp = iprot.readI64(); struct.setTimestampIsSet(true); } if (incoming.get(3)) { struct.creds = new AccessToken(); struct.creds.read(iprot); struct.setCredsIsSet(true); } if (incoming.get(4)) { struct.transaction = new TransactionToken(); struct.transaction.read(iprot); struct.setTransactionIsSet(true); } } } } public static class fetch_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fetch_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); private static final Map, SchemeFactory> schemes = new LinkedHashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new fetch_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new fetch_resultTupleSchemeFactory()); } public Set success; // required /** 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 byName = new LinkedHashMap(); 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.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TObject.class)))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(fetch_result.class, metaDataMap); } public fetch_result() { } public fetch_result( Set success) { this(); this.success = success; } /** * Performs a deep copy on other. */ public fetch_result(fetch_result other) { if (other.isSetSuccess()) { Set __this__success = new LinkedHashSet(); for (TObject other_element : other.success) { __this__success.add(new TObject(other_element)); } this.success = __this__success; } } public fetch_result deepCopy() { return new fetch_result(this); } @Override public void clear() { this.success = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } public java.util.Iterator getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(TObject elem) { if (this.success == null) { this.success = new LinkedHashSet(); } this.success.add(elem); } public Set getSuccess() { return this.success; } public fetch_result setSuccess(Set 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)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 fetch_result) return this.equals((fetch_result)that); return false; } public boolean equals(fetch_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() { return 0; } public int compareTo(fetch_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; fetch_result typedOther = (fetch_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 { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("fetch_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 // check for sub-struct validity } 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); } } private static class fetch_resultStandardSchemeFactory implements SchemeFactory { public fetch_resultStandardScheme getScheme() { return new fetch_resultStandardScheme(); } } private static class fetch_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, fetch_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.SET) { { org.apache.thrift.protocol.TSet _set18 = iprot.readSetBegin(); struct.success = new LinkedHashSet(2*_set18.size); for (int _i19 = 0; _i19 < _set18.size; ++_i19) { TObject _elem20; // required _elem20 = new TObject(); _elem20.read(iprot); struct.success.add(_elem20); } iprot.readSetEnd(); } struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, fetch_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); for (TObject _iter21 : struct.success) { _iter21.write(oprot); } oprot.writeSetEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class fetch_resultTupleSchemeFactory implements SchemeFactory { public fetch_resultTupleScheme getScheme() { return new fetch_resultTupleScheme(); } } private static class fetch_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, fetch_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); for (TObject _iter22 : struct.success) { _iter22.write(oprot); } } } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, fetch_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { { org.apache.thrift.protocol.TSet _set23 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.success = new LinkedHashSet(2*_set23.size); for (int _i24 = 0; _i24 < _set23.size; ++_i24) { TObject _elem25; // required _elem25 = new TObject(); _elem25.read(iprot); struct.success.add(_elem25); } } struct.setSuccessIsSet(true); } } } } public static class find_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("find_args"); 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)1); private static final org.apache.thrift.protocol.TField OPERATOR_FIELD_DESC = new org.apache.thrift.protocol.TField("operator", org.apache.thrift.protocol.TType.I32, (short)2); private static final org.apache.thrift.protocol.TField VALUES_FIELD_DESC = new org.apache.thrift.protocol.TField("values", org.apache.thrift.protocol.TType.LIST, (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 CREDS_FIELD_DESC = new org.apache.thrift.protocol.TField("creds", org.apache.thrift.protocol.TType.STRUCT, (short)5); private static final org.apache.thrift.protocol.TField TRANSACTION_FIELD_DESC = new org.apache.thrift.protocol.TField("transaction", org.apache.thrift.protocol.TType.STRUCT, (short)6); private static final Map, SchemeFactory> schemes = new LinkedHashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new find_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new find_argsTupleSchemeFactory()); } public String key; // required /** * * @see Operator */ public Operator operator; // required public List values; // required public long timestamp; // required public AccessToken creds; // required public TransactionToken transaction; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { KEY((short)1, "key"), /** * * @see Operator */ OPERATOR((short)2, "operator"), VALUES((short)3, "values"), TIMESTAMP((short)4, "timestamp"), CREDS((short)5, "creds"), TRANSACTION((short)6, "transaction"); private static final Map byName = new LinkedHashMap(); 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: // KEY return KEY; case 2: // OPERATOR return OPERATOR; case 3: // VALUES return VALUES; case 4: // TIMESTAMP return TIMESTAMP; case 5: // CREDS return CREDS; case 6: // TRANSACTION return TRANSACTION; 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 byte __isset_bitfield = 0; 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.KEY, new org.apache.thrift.meta_data.FieldMetaData("key", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.OPERATOR, new org.apache.thrift.meta_data.FieldMetaData("operator", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, Operator.class))); tmpMap.put(_Fields.VALUES, new org.apache.thrift.meta_data.FieldMetaData("values", 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, TObject.class)))); tmpMap.put(_Fields.TIMESTAMP, new org.apache.thrift.meta_data.FieldMetaData("timestamp", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); tmpMap.put(_Fields.CREDS, new org.apache.thrift.meta_data.FieldMetaData("creds", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, AccessToken.class))); tmpMap.put(_Fields.TRANSACTION, new org.apache.thrift.meta_data.FieldMetaData("transaction", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TransactionToken.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(find_args.class, metaDataMap); } public find_args() { } public find_args( String key, Operator operator, List values, long timestamp, AccessToken creds, TransactionToken transaction) { this(); this.key = key; this.operator = operator; this.values = values; this.timestamp = timestamp; setTimestampIsSet(true); this.creds = creds; this.transaction = transaction; } /** * Performs a deep copy on other. */ public find_args(find_args other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetKey()) { this.key = other.key; } if (other.isSetOperator()) { this.operator = other.operator; } if (other.isSetValues()) { List __this__values = new ArrayList(); for (TObject other_element : other.values) { __this__values.add(new TObject(other_element)); } this.values = __this__values; } this.timestamp = other.timestamp; if (other.isSetCreds()) { this.creds = new AccessToken(other.creds); } if (other.isSetTransaction()) { this.transaction = new TransactionToken(other.transaction); } } public find_args deepCopy() { return new find_args(this); } @Override public void clear() { this.key = null; this.operator = null; this.values = null; setTimestampIsSet(false); this.timestamp = 0; this.creds = null; this.transaction = null; } public String getKey() { return this.key; } public find_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; } } /** * * @see Operator */ public Operator getOperator() { return this.operator; } /** * * @see Operator */ public find_args setOperator(Operator operator) { this.operator = operator; return this; } public void unsetOperator() { this.operator = null; } /** Returns true if field operator is set (has been assigned a value) and false otherwise */ public boolean isSetOperator() { return this.operator != null; } public void setOperatorIsSet(boolean value) { if (!value) { this.operator = null; } } public int getValuesSize() { return (this.values == null) ? 0 : this.values.size(); } public java.util.Iterator getValuesIterator() { return (this.values == null) ? null : this.values.iterator(); } public void addToValues(TObject elem) { if (this.values == null) { this.values = new ArrayList(); } this.values.add(elem); } public List getValues() { return this.values; } public find_args setValues(List values) { this.values = values; return this; } public void unsetValues() { this.values = null; } /** Returns true if field values is set (has been assigned a value) and false otherwise */ public boolean isSetValues() { return this.values != null; } public void setValuesIsSet(boolean value) { if (!value) { this.values = null; } } public long getTimestamp() { return this.timestamp; } public find_args setTimestamp(long timestamp) { this.timestamp = timestamp; setTimestampIsSet(true); return this; } public void unsetTimestamp() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TIMESTAMP_ISSET_ID); } /** Returns true if field timestamp is set (has been assigned a value) and false otherwise */ public boolean isSetTimestamp() { return EncodingUtils.testBit(__isset_bitfield, __TIMESTAMP_ISSET_ID); } public void setTimestampIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TIMESTAMP_ISSET_ID, value); } public AccessToken getCreds() { return this.creds; } public find_args setCreds(AccessToken creds) { this.creds = creds; return this; } public void unsetCreds() { this.creds = null; } /** Returns true if field creds is set (has been assigned a value) and false otherwise */ public boolean isSetCreds() { return this.creds != null; } public void setCredsIsSet(boolean value) { if (!value) { this.creds = null; } } public TransactionToken getTransaction() { return this.transaction; } public find_args setTransaction(TransactionToken transaction) { this.transaction = transaction; return this; } public void unsetTransaction() { this.transaction = null; } /** Returns true if field transaction is set (has been assigned a value) and false otherwise */ public boolean isSetTransaction() { return this.transaction != null; } public void setTransactionIsSet(boolean value) { if (!value) { this.transaction = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case KEY: if (value == null) { unsetKey(); } else { setKey((String)value); } break; case OPERATOR: if (value == null) { unsetOperator(); } else { setOperator((Operator)value); } break; case VALUES: if (value == null) { unsetValues(); } else { setValues((List)value); } break; case TIMESTAMP: if (value == null) { unsetTimestamp(); } else { setTimestamp((Long)value); } break; case CREDS: if (value == null) { unsetCreds(); } else { setCreds((AccessToken)value); } break; case TRANSACTION: if (value == null) { unsetTransaction(); } else { setTransaction((TransactionToken)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case KEY: return getKey(); case OPERATOR: return getOperator(); case VALUES: return getValues(); case TIMESTAMP: return Long.valueOf(getTimestamp()); case CREDS: return getCreds(); case TRANSACTION: return getTransaction(); } 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 KEY: return isSetKey(); case OPERATOR: return isSetOperator(); case VALUES: return isSetValues(); case TIMESTAMP: return isSetTimestamp(); case CREDS: return isSetCreds(); case TRANSACTION: return isSetTransaction(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof find_args) return this.equals((find_args)that); return false; } public boolean equals(find_args that) { if (that == null) 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_operator = true && this.isSetOperator(); boolean that_present_operator = true && that.isSetOperator(); if (this_present_operator || that_present_operator) { if (!(this_present_operator && that_present_operator)) return false; if (!this.operator.equals(that.operator)) return false; } boolean this_present_values = true && this.isSetValues(); boolean that_present_values = true && that.isSetValues(); if (this_present_values || that_present_values) { if (!(this_present_values && that_present_values)) return false; if (!this.values.equals(that.values)) 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_creds = true && this.isSetCreds(); boolean that_present_creds = true && that.isSetCreds(); if (this_present_creds || that_present_creds) { if (!(this_present_creds && that_present_creds)) return false; if (!this.creds.equals(that.creds)) return false; } boolean this_present_transaction = true && this.isSetTransaction(); boolean that_present_transaction = true && that.isSetTransaction(); if (this_present_transaction || that_present_transaction) { if (!(this_present_transaction && that_present_transaction)) return false; if (!this.transaction.equals(that.transaction)) return false; } return true; } @Override public int hashCode() { return 0; } public int compareTo(find_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; find_args typedOther = (find_args)other; 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(isSetOperator()).compareTo(typedOther.isSetOperator()); if (lastComparison != 0) { return lastComparison; } if (isSetOperator()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operator, typedOther.operator); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetValues()).compareTo(typedOther.isSetValues()); if (lastComparison != 0) { return lastComparison; } if (isSetValues()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.values, typedOther.values); 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(isSetCreds()).compareTo(typedOther.isSetCreds()); if (lastComparison != 0) { return lastComparison; } if (isSetCreds()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.creds, typedOther.creds); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTransaction()).compareTo(typedOther.isSetTransaction()); if (lastComparison != 0) { return lastComparison; } if (isSetTransaction()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.transaction, typedOther.transaction); 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 { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("find_args("); boolean first = true; sb.append("key:"); if (this.key == null) { sb.append("null"); } else { sb.append(this.key); } first = false; if (!first) sb.append(", "); sb.append("operator:"); if (this.operator == null) { sb.append("null"); } else { sb.append(this.operator); } first = false; if (!first) sb.append(", "); sb.append("values:"); if (this.values == null) { sb.append("null"); } else { sb.append(this.values); } first = false; if (!first) sb.append(", "); sb.append("timestamp:"); sb.append(this.timestamp); first = false; if (!first) sb.append(", "); sb.append("creds:"); if (this.creds == null) { sb.append("null"); } else { sb.append(this.creds); } first = false; if (!first) sb.append(", "); sb.append("transaction:"); if (this.transaction == null) { sb.append("null"); } else { sb.append(this.transaction); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (creds != null) { creds.validate(); } if (transaction != null) { transaction.validate(); } } 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_bitfield = 0; 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); } } private static class find_argsStandardSchemeFactory implements SchemeFactory { public find_argsStandardScheme getScheme() { return new find_argsStandardScheme(); } } private static class find_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, find_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // KEY if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.key = iprot.readString(); struct.setKeyIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // OPERATOR if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.operator = Operator.findByValue(iprot.readI32()); struct.setOperatorIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // VALUES if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list26 = iprot.readListBegin(); struct.values = new ArrayList(_list26.size); for (int _i27 = 0; _i27 < _list26.size; ++_i27) { TObject _elem28; // required _elem28 = new TObject(); _elem28.read(iprot); struct.values.add(_elem28); } iprot.readListEnd(); } struct.setValuesIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // TIMESTAMP if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.timestamp = iprot.readI64(); struct.setTimestampIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 5: // CREDS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.creds = new AccessToken(); struct.creds.read(iprot); struct.setCredsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 6: // TRANSACTION if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.transaction = new TransactionToken(); struct.transaction.read(iprot); struct.setTransactionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, find_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.key != null) { oprot.writeFieldBegin(KEY_FIELD_DESC); oprot.writeString(struct.key); oprot.writeFieldEnd(); } if (struct.operator != null) { oprot.writeFieldBegin(OPERATOR_FIELD_DESC); oprot.writeI32(struct.operator.getValue()); oprot.writeFieldEnd(); } if (struct.values != null) { oprot.writeFieldBegin(VALUES_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.values.size())); for (TObject _iter29 : struct.values) { _iter29.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC); oprot.writeI64(struct.timestamp); oprot.writeFieldEnd(); if (struct.creds != null) { oprot.writeFieldBegin(CREDS_FIELD_DESC); struct.creds.write(oprot); oprot.writeFieldEnd(); } if (struct.transaction != null) { oprot.writeFieldBegin(TRANSACTION_FIELD_DESC); struct.transaction.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class find_argsTupleSchemeFactory implements SchemeFactory { public find_argsTupleScheme getScheme() { return new find_argsTupleScheme(); } } private static class find_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, find_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetKey()) { optionals.set(0); } if (struct.isSetOperator()) { optionals.set(1); } if (struct.isSetValues()) { optionals.set(2); } if (struct.isSetTimestamp()) { optionals.set(3); } if (struct.isSetCreds()) { optionals.set(4); } if (struct.isSetTransaction()) { optionals.set(5); } oprot.writeBitSet(optionals, 6); if (struct.isSetKey()) { oprot.writeString(struct.key); } if (struct.isSetOperator()) { oprot.writeI32(struct.operator.getValue()); } if (struct.isSetValues()) { { oprot.writeI32(struct.values.size()); for (TObject _iter30 : struct.values) { _iter30.write(oprot); } } } if (struct.isSetTimestamp()) { oprot.writeI64(struct.timestamp); } if (struct.isSetCreds()) { struct.creds.write(oprot); } if (struct.isSetTransaction()) { struct.transaction.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, find_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(6); if (incoming.get(0)) { struct.key = iprot.readString(); struct.setKeyIsSet(true); } if (incoming.get(1)) { struct.operator = Operator.findByValue(iprot.readI32()); struct.setOperatorIsSet(true); } if (incoming.get(2)) { { org.apache.thrift.protocol.TList _list31 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.values = new ArrayList(_list31.size); for (int _i32 = 0; _i32 < _list31.size; ++_i32) { TObject _elem33; // required _elem33 = new TObject(); _elem33.read(iprot); struct.values.add(_elem33); } } struct.setValuesIsSet(true); } if (incoming.get(3)) { struct.timestamp = iprot.readI64(); struct.setTimestampIsSet(true); } if (incoming.get(4)) { struct.creds = new AccessToken(); struct.creds.read(iprot); struct.setCredsIsSet(true); } if (incoming.get(5)) { struct.transaction = new TransactionToken(); struct.transaction.read(iprot); struct.setTransactionIsSet(true); } } } } public static class find_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("find_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); private static final Map, SchemeFactory> schemes = new LinkedHashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new find_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new find_resultTupleSchemeFactory()); } public Set success; // required /** 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 byName = new LinkedHashMap(); 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.I64)))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(find_result.class, metaDataMap); } public find_result() { } public find_result( Set success) { this(); this.success = success; } /** * Performs a deep copy on other. */ public find_result(find_result other) { if (other.isSetSuccess()) { Set __this__success = new LinkedHashSet(); for (Long other_element : other.success) { __this__success.add(other_element); } this.success = __this__success; } } public find_result deepCopy() { return new find_result(this); } @Override public void clear() { this.success = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } public java.util.Iterator getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(long elem) { if (this.success == null) { this.success = new LinkedHashSet(); } this.success.add(elem); } public Set getSuccess() { return this.success; } public find_result setSuccess(Set 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)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 find_result) return this.equals((find_result)that); return false; } public boolean equals(find_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() { return 0; } public int compareTo(find_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; find_result typedOther = (find_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 { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("find_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 // check for sub-struct validity } 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); } } private static class find_resultStandardSchemeFactory implements SchemeFactory { public find_resultStandardScheme getScheme() { return new find_resultStandardScheme(); } } private static class find_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, find_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.SET) { { org.apache.thrift.protocol.TSet _set34 = iprot.readSetBegin(); struct.success = new LinkedHashSet(2*_set34.size); for (int _i35 = 0; _i35 < _set34.size; ++_i35) { long _elem36; // required _elem36 = iprot.readI64(); struct.success.add(_elem36); } iprot.readSetEnd(); } struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, find_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.I64, struct.success.size())); for (long _iter37 : struct.success) { oprot.writeI64(_iter37); } oprot.writeSetEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class find_resultTupleSchemeFactory implements SchemeFactory { public find_resultTupleScheme getScheme() { return new find_resultTupleScheme(); } } private static class find_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, find_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); for (long _iter38 : struct.success) { oprot.writeI64(_iter38); } } } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, find_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { { org.apache.thrift.protocol.TSet _set39 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.I64, iprot.readI32()); struct.success = new LinkedHashSet(2*_set39.size); for (int _i40 = 0; _i40 < _set39.size; ++_i40) { long _elem41; // required _elem41 = iprot.readI64(); struct.success.add(_elem41); } } struct.setSuccessIsSet(true); } } } } public static class ping_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ping_args"); private static final org.apache.thrift.protocol.TField RECORD_FIELD_DESC = new org.apache.thrift.protocol.TField("record", org.apache.thrift.protocol.TType.I64, (short)1); private static final org.apache.thrift.protocol.TField CREDS_FIELD_DESC = new org.apache.thrift.protocol.TField("creds", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField TRANSACTION_FIELD_DESC = new org.apache.thrift.protocol.TField("transaction", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final Map, SchemeFactory> schemes = new LinkedHashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new ping_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new ping_argsTupleSchemeFactory()); } public long record; // required public AccessToken creds; // required public TransactionToken transaction; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { RECORD((short)1, "record"), CREDS((short)2, "creds"), TRANSACTION((short)3, "transaction"); private static final Map byName = new LinkedHashMap(); 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: // RECORD return RECORD; case 2: // CREDS return CREDS; case 3: // TRANSACTION return TRANSACTION; 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 __RECORD_ISSET_ID = 0; private byte __isset_bitfield = 0; 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.RECORD, new org.apache.thrift.meta_data.FieldMetaData("record", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); tmpMap.put(_Fields.CREDS, new org.apache.thrift.meta_data.FieldMetaData("creds", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, AccessToken.class))); tmpMap.put(_Fields.TRANSACTION, new org.apache.thrift.meta_data.FieldMetaData("transaction", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TransactionToken.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ping_args.class, metaDataMap); } public ping_args() { } public ping_args( long record, AccessToken creds, TransactionToken transaction) { this(); this.record = record; setRecordIsSet(true); this.creds = creds; this.transaction = transaction; } /** * Performs a deep copy on other. */ public ping_args(ping_args other) { __isset_bitfield = other.__isset_bitfield; this.record = other.record; if (other.isSetCreds()) { this.creds = new AccessToken(other.creds); } if (other.isSetTransaction()) { this.transaction = new TransactionToken(other.transaction); } } public ping_args deepCopy() { return new ping_args(this); } @Override public void clear() { setRecordIsSet(false); this.record = 0; this.creds = null; this.transaction = null; } public long getRecord() { return this.record; } public ping_args setRecord(long record) { this.record = record; setRecordIsSet(true); return this; } public void unsetRecord() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __RECORD_ISSET_ID); } /** Returns true if field record is set (has been assigned a value) and false otherwise */ public boolean isSetRecord() { return EncodingUtils.testBit(__isset_bitfield, __RECORD_ISSET_ID); } public void setRecordIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __RECORD_ISSET_ID, value); } public AccessToken getCreds() { return this.creds; } public ping_args setCreds(AccessToken creds) { this.creds = creds; return this; } public void unsetCreds() { this.creds = null; } /** Returns true if field creds is set (has been assigned a value) and false otherwise */ public boolean isSetCreds() { return this.creds != null; } public void setCredsIsSet(boolean value) { if (!value) { this.creds = null; } } public TransactionToken getTransaction() { return this.transaction; } public ping_args setTransaction(TransactionToken transaction) { this.transaction = transaction; return this; } public void unsetTransaction() { this.transaction = null; } /** Returns true if field transaction is set (has been assigned a value) and false otherwise */ public boolean isSetTransaction() { return this.transaction != null; } public void setTransactionIsSet(boolean value) { if (!value) { this.transaction = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case RECORD: if (value == null) { unsetRecord(); } else { setRecord((Long)value); } break; case CREDS: if (value == null) { unsetCreds(); } else { setCreds((AccessToken)value); } break; case TRANSACTION: if (value == null) { unsetTransaction(); } else { setTransaction((TransactionToken)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case RECORD: return Long.valueOf(getRecord()); case CREDS: return getCreds(); case TRANSACTION: return getTransaction(); } 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 RECORD: return isSetRecord(); case CREDS: return isSetCreds(); case TRANSACTION: return isSetTransaction(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof ping_args) return this.equals((ping_args)that); return false; } public boolean equals(ping_args that) { if (that == null) return false; boolean this_present_record = true; boolean that_present_record = true; if (this_present_record || that_present_record) { if (!(this_present_record && that_present_record)) return false; if (this.record != that.record) return false; } boolean this_present_creds = true && this.isSetCreds(); boolean that_present_creds = true && that.isSetCreds(); if (this_present_creds || that_present_creds) { if (!(this_present_creds && that_present_creds)) return false; if (!this.creds.equals(that.creds)) return false; } boolean this_present_transaction = true && this.isSetTransaction(); boolean that_present_transaction = true && that.isSetTransaction(); if (this_present_transaction || that_present_transaction) { if (!(this_present_transaction && that_present_transaction)) return false; if (!this.transaction.equals(that.transaction)) return false; } return true; } @Override public int hashCode() { return 0; } public int compareTo(ping_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; ping_args typedOther = (ping_args)other; lastComparison = Boolean.valueOf(isSetRecord()).compareTo(typedOther.isSetRecord()); if (lastComparison != 0) { return lastComparison; } if (isSetRecord()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.record, typedOther.record); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetCreds()).compareTo(typedOther.isSetCreds()); if (lastComparison != 0) { return lastComparison; } if (isSetCreds()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.creds, typedOther.creds); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTransaction()).compareTo(typedOther.isSetTransaction()); if (lastComparison != 0) { return lastComparison; } if (isSetTransaction()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.transaction, typedOther.transaction); 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 { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("ping_args("); boolean first = true; sb.append("record:"); sb.append(this.record); first = false; if (!first) sb.append(", "); sb.append("creds:"); if (this.creds == null) { sb.append("null"); } else { sb.append(this.creds); } first = false; if (!first) sb.append(", "); sb.append("transaction:"); if (this.transaction == null) { sb.append("null"); } else { sb.append(this.transaction); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (creds != null) { creds.validate(); } if (transaction != null) { transaction.validate(); } } 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_bitfield = 0; 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); } } private static class ping_argsStandardSchemeFactory implements SchemeFactory { public ping_argsStandardScheme getScheme() { return new ping_argsStandardScheme(); } } private static class ping_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, ping_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // RECORD if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.record = iprot.readI64(); struct.setRecordIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // CREDS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.creds = new AccessToken(); struct.creds.read(iprot); struct.setCredsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // TRANSACTION if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.transaction = new TransactionToken(); struct.transaction.read(iprot); struct.setTransactionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, ping_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldBegin(RECORD_FIELD_DESC); oprot.writeI64(struct.record); oprot.writeFieldEnd(); if (struct.creds != null) { oprot.writeFieldBegin(CREDS_FIELD_DESC); struct.creds.write(oprot); oprot.writeFieldEnd(); } if (struct.transaction != null) { oprot.writeFieldBegin(TRANSACTION_FIELD_DESC); struct.transaction.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class ping_argsTupleSchemeFactory implements SchemeFactory { public ping_argsTupleScheme getScheme() { return new ping_argsTupleScheme(); } } private static class ping_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, ping_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetRecord()) { optionals.set(0); } if (struct.isSetCreds()) { optionals.set(1); } if (struct.isSetTransaction()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetRecord()) { oprot.writeI64(struct.record); } if (struct.isSetCreds()) { struct.creds.write(oprot); } if (struct.isSetTransaction()) { struct.transaction.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, ping_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.record = iprot.readI64(); struct.setRecordIsSet(true); } if (incoming.get(1)) { struct.creds = new AccessToken(); struct.creds.read(iprot); struct.setCredsIsSet(true); } if (incoming.get(2)) { struct.transaction = new TransactionToken(); struct.transaction.read(iprot); struct.setTransactionIsSet(true); } } } } public static class ping_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ping_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0); private static final Map, SchemeFactory> schemes = new LinkedHashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new ping_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new ping_resultTupleSchemeFactory()); } public boolean success; // required /** 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 byName = new LinkedHashMap(); 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 private static final int __SUCCESS_ISSET_ID = 0; private byte __isset_bitfield = 0; 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.BOOL))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ping_result.class, metaDataMap); } public ping_result() { } public ping_result( boolean success) { this(); this.success = success; setSuccessIsSet(true); } /** * Performs a deep copy on other. */ public ping_result(ping_result other) { __isset_bitfield = other.__isset_bitfield; this.success = other.success; } public ping_result deepCopy() { return new ping_result(this); } @Override public void clear() { setSuccessIsSet(false); this.success = false; } public boolean isSuccess() { return this.success; } public ping_result setSuccess(boolean success) { this.success = success; setSuccessIsSet(true); return this; } public void unsetSuccess() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((Boolean)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return Boolean.valueOf(isSuccess()); } 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 ping_result) return this.equals((ping_result)that); return false; } public boolean equals(ping_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; } return true; } @Override public int hashCode() { return 0; } public int compareTo(ping_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; ping_result typedOther = (ping_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 { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("ping_result("); boolean first = true; sb.append("success:"); sb.append(this.success); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } 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_bitfield = 0; 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); } } private static class ping_resultStandardSchemeFactory implements SchemeFactory { public ping_resultStandardScheme getScheme() { return new ping_resultStandardScheme(); } } private static class ping_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, ping_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.success = iprot.readBool(); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, ping_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeBool(struct.success); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class ping_resultTupleSchemeFactory implements SchemeFactory { public ping_resultTupleScheme getScheme() { return new ping_resultTupleScheme(); } } private static class ping_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, ping_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetSuccess()) { oprot.writeBool(struct.success); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, ping_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.success = iprot.readBool(); struct.setSuccessIsSet(true); } } } } public static class search_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("search_args"); 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)1); private static final org.apache.thrift.protocol.TField QUERY_FIELD_DESC = new org.apache.thrift.protocol.TField("query", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField CREDS_FIELD_DESC = new org.apache.thrift.protocol.TField("creds", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final org.apache.thrift.protocol.TField TRANSACTION_FIELD_DESC = new org.apache.thrift.protocol.TField("transaction", org.apache.thrift.protocol.TType.STRUCT, (short)4); private static final Map, SchemeFactory> schemes = new LinkedHashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new search_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new search_argsTupleSchemeFactory()); } public String key; // required public String query; // required public AccessToken creds; // required public TransactionToken transaction; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { KEY((short)1, "key"), QUERY((short)2, "query"), CREDS((short)3, "creds"), TRANSACTION((short)4, "transaction"); private static final Map byName = new LinkedHashMap(); 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: // KEY return KEY; case 2: // QUERY return QUERY; case 3: // CREDS return CREDS; case 4: // TRANSACTION return TRANSACTION; 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.KEY, new org.apache.thrift.meta_data.FieldMetaData("key", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.QUERY, new org.apache.thrift.meta_data.FieldMetaData("query", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.CREDS, new org.apache.thrift.meta_data.FieldMetaData("creds", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, AccessToken.class))); tmpMap.put(_Fields.TRANSACTION, new org.apache.thrift.meta_data.FieldMetaData("transaction", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TransactionToken.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(search_args.class, metaDataMap); } public search_args() { } public search_args( String key, String query, AccessToken creds, TransactionToken transaction) { this(); this.key = key; this.query = query; this.creds = creds; this.transaction = transaction; } /** * Performs a deep copy on other. */ public search_args(search_args other) { if (other.isSetKey()) { this.key = other.key; } if (other.isSetQuery()) { this.query = other.query; } if (other.isSetCreds()) { this.creds = new AccessToken(other.creds); } if (other.isSetTransaction()) { this.transaction = new TransactionToken(other.transaction); } } public search_args deepCopy() { return new search_args(this); } @Override public void clear() { this.key = null; this.query = null; this.creds = null; this.transaction = null; } public String getKey() { return this.key; } public search_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 String getQuery() { return this.query; } public search_args setQuery(String query) { this.query = query; return this; } public void unsetQuery() { this.query = null; } /** Returns true if field query is set (has been assigned a value) and false otherwise */ public boolean isSetQuery() { return this.query != null; } public void setQueryIsSet(boolean value) { if (!value) { this.query = null; } } public AccessToken getCreds() { return this.creds; } public search_args setCreds(AccessToken creds) { this.creds = creds; return this; } public void unsetCreds() { this.creds = null; } /** Returns true if field creds is set (has been assigned a value) and false otherwise */ public boolean isSetCreds() { return this.creds != null; } public void setCredsIsSet(boolean value) { if (!value) { this.creds = null; } } public TransactionToken getTransaction() { return this.transaction; } public search_args setTransaction(TransactionToken transaction) { this.transaction = transaction; return this; } public void unsetTransaction() { this.transaction = null; } /** Returns true if field transaction is set (has been assigned a value) and false otherwise */ public boolean isSetTransaction() { return this.transaction != null; } public void setTransactionIsSet(boolean value) { if (!value) { this.transaction = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case KEY: if (value == null) { unsetKey(); } else { setKey((String)value); } break; case QUERY: if (value == null) { unsetQuery(); } else { setQuery((String)value); } break; case CREDS: if (value == null) { unsetCreds(); } else { setCreds((AccessToken)value); } break; case TRANSACTION: if (value == null) { unsetTransaction(); } else { setTransaction((TransactionToken)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case KEY: return getKey(); case QUERY: return getQuery(); case CREDS: return getCreds(); case TRANSACTION: return getTransaction(); } 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 KEY: return isSetKey(); case QUERY: return isSetQuery(); case CREDS: return isSetCreds(); case TRANSACTION: return isSetTransaction(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof search_args) return this.equals((search_args)that); return false; } public boolean equals(search_args that) { if (that == null) 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_query = true && this.isSetQuery(); boolean that_present_query = true && that.isSetQuery(); if (this_present_query || that_present_query) { if (!(this_present_query && that_present_query)) return false; if (!this.query.equals(that.query)) return false; } boolean this_present_creds = true && this.isSetCreds(); boolean that_present_creds = true && that.isSetCreds(); if (this_present_creds || that_present_creds) { if (!(this_present_creds && that_present_creds)) return false; if (!this.creds.equals(that.creds)) return false; } boolean this_present_transaction = true && this.isSetTransaction(); boolean that_present_transaction = true && that.isSetTransaction(); if (this_present_transaction || that_present_transaction) { if (!(this_present_transaction && that_present_transaction)) return false; if (!this.transaction.equals(that.transaction)) return false; } return true; } @Override public int hashCode() { return 0; } public int compareTo(search_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; search_args typedOther = (search_args)other; 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(isSetQuery()).compareTo(typedOther.isSetQuery()); if (lastComparison != 0) { return lastComparison; } if (isSetQuery()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.query, typedOther.query); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetCreds()).compareTo(typedOther.isSetCreds()); if (lastComparison != 0) { return lastComparison; } if (isSetCreds()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.creds, typedOther.creds); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTransaction()).compareTo(typedOther.isSetTransaction()); if (lastComparison != 0) { return lastComparison; } if (isSetTransaction()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.transaction, typedOther.transaction); 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 { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("search_args("); boolean first = true; sb.append("key:"); if (this.key == null) { sb.append("null"); } else { sb.append(this.key); } first = false; if (!first) sb.append(", "); sb.append("query:"); if (this.query == null) { sb.append("null"); } else { sb.append(this.query); } first = false; if (!first) sb.append(", "); sb.append("creds:"); if (this.creds == null) { sb.append("null"); } else { sb.append(this.creds); } first = false; if (!first) sb.append(", "); sb.append("transaction:"); if (this.transaction == null) { sb.append("null"); } else { sb.append(this.transaction); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (creds != null) { creds.validate(); } if (transaction != null) { transaction.validate(); } } 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); } } private static class search_argsStandardSchemeFactory implements SchemeFactory { public search_argsStandardScheme getScheme() { return new search_argsStandardScheme(); } } private static class search_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, search_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // KEY if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.key = iprot.readString(); struct.setKeyIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // QUERY if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.query = iprot.readString(); struct.setQueryIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // CREDS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.creds = new AccessToken(); struct.creds.read(iprot); struct.setCredsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // TRANSACTION if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.transaction = new TransactionToken(); struct.transaction.read(iprot); struct.setTransactionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, search_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.key != null) { oprot.writeFieldBegin(KEY_FIELD_DESC); oprot.writeString(struct.key); oprot.writeFieldEnd(); } if (struct.query != null) { oprot.writeFieldBegin(QUERY_FIELD_DESC); oprot.writeString(struct.query); oprot.writeFieldEnd(); } if (struct.creds != null) { oprot.writeFieldBegin(CREDS_FIELD_DESC); struct.creds.write(oprot); oprot.writeFieldEnd(); } if (struct.transaction != null) { oprot.writeFieldBegin(TRANSACTION_FIELD_DESC); struct.transaction.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class search_argsTupleSchemeFactory implements SchemeFactory { public search_argsTupleScheme getScheme() { return new search_argsTupleScheme(); } } private static class search_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, search_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetKey()) { optionals.set(0); } if (struct.isSetQuery()) { optionals.set(1); } if (struct.isSetCreds()) { optionals.set(2); } if (struct.isSetTransaction()) { optionals.set(3); } oprot.writeBitSet(optionals, 4); if (struct.isSetKey()) { oprot.writeString(struct.key); } if (struct.isSetQuery()) { oprot.writeString(struct.query); } if (struct.isSetCreds()) { struct.creds.write(oprot); } if (struct.isSetTransaction()) { struct.transaction.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, search_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { struct.key = iprot.readString(); struct.setKeyIsSet(true); } if (incoming.get(1)) { struct.query = iprot.readString(); struct.setQueryIsSet(true); } if (incoming.get(2)) { struct.creds = new AccessToken(); struct.creds.read(iprot); struct.setCredsIsSet(true); } if (incoming.get(3)) { struct.transaction = new TransactionToken(); struct.transaction.read(iprot); struct.setTransactionIsSet(true); } } } } public static class search_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("search_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); private static final Map, SchemeFactory> schemes = new LinkedHashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new search_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new search_resultTupleSchemeFactory()); } public Set success; // required /** 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 byName = new LinkedHashMap(); 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.I64)))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(search_result.class, metaDataMap); } public search_result() { } public search_result( Set success) { this(); this.success = success; } /** * Performs a deep copy on other. */ public search_result(search_result other) { if (other.isSetSuccess()) { Set __this__success = new LinkedHashSet(); for (Long other_element : other.success) { __this__success.add(other_element); } this.success = __this__success; } } public search_result deepCopy() { return new search_result(this); } @Override public void clear() { this.success = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } public java.util.Iterator getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(long elem) { if (this.success == null) { this.success = new LinkedHashSet(); } this.success.add(elem); } public Set getSuccess() { return this.success; } public search_result setSuccess(Set 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)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 search_result) return this.equals((search_result)that); return false; } public boolean equals(search_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() { return 0; } public int compareTo(search_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; search_result typedOther = (search_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 { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("search_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 // check for sub-struct validity } 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); } } private static class search_resultStandardSchemeFactory implements SchemeFactory { public search_resultStandardScheme getScheme() { return new search_resultStandardScheme(); } } private static class search_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, search_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.SET) { { org.apache.thrift.protocol.TSet _set42 = iprot.readSetBegin(); struct.success = new LinkedHashSet(2*_set42.size); for (int _i43 = 0; _i43 < _set42.size; ++_i43) { long _elem44; // required _elem44 = iprot.readI64(); struct.success.add(_elem44); } iprot.readSetEnd(); } struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, search_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.I64, struct.success.size())); for (long _iter45 : struct.success) { oprot.writeI64(_iter45); } oprot.writeSetEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class search_resultTupleSchemeFactory implements SchemeFactory { public search_resultTupleScheme getScheme() { return new search_resultTupleScheme(); } } private static class search_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, search_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); for (long _iter46 : struct.success) { oprot.writeI64(_iter46); } } } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, search_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { { org.apache.thrift.protocol.TSet _set47 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.I64, iprot.readI32()); struct.success = new LinkedHashSet(2*_set47.size); for (int _i48 = 0; _i48 < _set47.size; ++_i48) { long _elem49; // required _elem49 = iprot.readI64(); struct.success.add(_elem49); } } struct.setSuccessIsSet(true); } } } } public static class verify_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("verify_args"); 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)1); private static final org.apache.thrift.protocol.TField VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("value", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField RECORD_FIELD_DESC = new org.apache.thrift.protocol.TField("record", org.apache.thrift.protocol.TType.I64, (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 CREDS_FIELD_DESC = new org.apache.thrift.protocol.TField("creds", org.apache.thrift.protocol.TType.STRUCT, (short)5); private static final org.apache.thrift.protocol.TField TRANSACTION_FIELD_DESC = new org.apache.thrift.protocol.TField("transaction", org.apache.thrift.protocol.TType.STRUCT, (short)6); private static final Map, SchemeFactory> schemes = new LinkedHashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new verify_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new verify_argsTupleSchemeFactory()); } public String key; // required public TObject value; // required public long record; // required public long timestamp; // required public AccessToken creds; // required public TransactionToken transaction; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { KEY((short)1, "key"), VALUE((short)2, "value"), RECORD((short)3, "record"), TIMESTAMP((short)4, "timestamp"), CREDS((short)5, "creds"), TRANSACTION((short)6, "transaction"); private static final Map byName = new LinkedHashMap(); 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: // KEY return KEY; case 2: // VALUE return VALUE; case 3: // RECORD return RECORD; case 4: // TIMESTAMP return TIMESTAMP; case 5: // CREDS return CREDS; case 6: // TRANSACTION return TRANSACTION; 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 __RECORD_ISSET_ID = 0; private static final int __TIMESTAMP_ISSET_ID = 1; private byte __isset_bitfield = 0; 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.KEY, new org.apache.thrift.meta_data.FieldMetaData("key", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.VALUE, new org.apache.thrift.meta_data.FieldMetaData("value", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TObject.class))); tmpMap.put(_Fields.RECORD, new org.apache.thrift.meta_data.FieldMetaData("record", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); tmpMap.put(_Fields.TIMESTAMP, new org.apache.thrift.meta_data.FieldMetaData("timestamp", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); tmpMap.put(_Fields.CREDS, new org.apache.thrift.meta_data.FieldMetaData("creds", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, AccessToken.class))); tmpMap.put(_Fields.TRANSACTION, new org.apache.thrift.meta_data.FieldMetaData("transaction", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TransactionToken.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(verify_args.class, metaDataMap); } public verify_args() { } public verify_args( String key, TObject value, long record, long timestamp, AccessToken creds, TransactionToken transaction) { this(); this.key = key; this.value = value; this.record = record; setRecordIsSet(true); this.timestamp = timestamp; setTimestampIsSet(true); this.creds = creds; this.transaction = transaction; } /** * Performs a deep copy on other. */ public verify_args(verify_args other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetKey()) { this.key = other.key; } if (other.isSetValue()) { this.value = new TObject(other.value); } this.record = other.record; this.timestamp = other.timestamp; if (other.isSetCreds()) { this.creds = new AccessToken(other.creds); } if (other.isSetTransaction()) { this.transaction = new TransactionToken(other.transaction); } } public verify_args deepCopy() { return new verify_args(this); } @Override public void clear() { this.key = null; this.value = null; setRecordIsSet(false); this.record = 0; setTimestampIsSet(false); this.timestamp = 0; this.creds = null; this.transaction = null; } public String getKey() { return this.key; } public verify_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 TObject getValue() { return this.value; } public verify_args setValue(TObject 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 getRecord() { return this.record; } public verify_args setRecord(long record) { this.record = record; setRecordIsSet(true); return this; } public void unsetRecord() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __RECORD_ISSET_ID); } /** Returns true if field record is set (has been assigned a value) and false otherwise */ public boolean isSetRecord() { return EncodingUtils.testBit(__isset_bitfield, __RECORD_ISSET_ID); } public void setRecordIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __RECORD_ISSET_ID, value); } public long getTimestamp() { return this.timestamp; } public verify_args setTimestamp(long timestamp) { this.timestamp = timestamp; setTimestampIsSet(true); return this; } public void unsetTimestamp() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TIMESTAMP_ISSET_ID); } /** Returns true if field timestamp is set (has been assigned a value) and false otherwise */ public boolean isSetTimestamp() { return EncodingUtils.testBit(__isset_bitfield, __TIMESTAMP_ISSET_ID); } public void setTimestampIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TIMESTAMP_ISSET_ID, value); } public AccessToken getCreds() { return this.creds; } public verify_args setCreds(AccessToken creds) { this.creds = creds; return this; } public void unsetCreds() { this.creds = null; } /** Returns true if field creds is set (has been assigned a value) and false otherwise */ public boolean isSetCreds() { return this.creds != null; } public void setCredsIsSet(boolean value) { if (!value) { this.creds = null; } } public TransactionToken getTransaction() { return this.transaction; } public verify_args setTransaction(TransactionToken transaction) { this.transaction = transaction; return this; } public void unsetTransaction() { this.transaction = null; } /** Returns true if field transaction is set (has been assigned a value) and false otherwise */ public boolean isSetTransaction() { return this.transaction != null; } public void setTransactionIsSet(boolean value) { if (!value) { this.transaction = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case KEY: if (value == null) { unsetKey(); } else { setKey((String)value); } break; case VALUE: if (value == null) { unsetValue(); } else { setValue((TObject)value); } break; case RECORD: if (value == null) { unsetRecord(); } else { setRecord((Long)value); } break; case TIMESTAMP: if (value == null) { unsetTimestamp(); } else { setTimestamp((Long)value); } break; case CREDS: if (value == null) { unsetCreds(); } else { setCreds((AccessToken)value); } break; case TRANSACTION: if (value == null) { unsetTransaction(); } else { setTransaction((TransactionToken)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case KEY: return getKey(); case VALUE: return getValue(); case RECORD: return Long.valueOf(getRecord()); case TIMESTAMP: return Long.valueOf(getTimestamp()); case CREDS: return getCreds(); case TRANSACTION: return getTransaction(); } 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 KEY: return isSetKey(); case VALUE: return isSetValue(); case RECORD: return isSetRecord(); case TIMESTAMP: return isSetTimestamp(); case CREDS: return isSetCreds(); case TRANSACTION: return isSetTransaction(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof verify_args) return this.equals((verify_args)that); return false; } public boolean equals(verify_args that) { if (that == null) 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_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_record = true; boolean that_present_record = true; if (this_present_record || that_present_record) { if (!(this_present_record && that_present_record)) return false; if (this.record != that.record) 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_creds = true && this.isSetCreds(); boolean that_present_creds = true && that.isSetCreds(); if (this_present_creds || that_present_creds) { if (!(this_present_creds && that_present_creds)) return false; if (!this.creds.equals(that.creds)) return false; } boolean this_present_transaction = true && this.isSetTransaction(); boolean that_present_transaction = true && that.isSetTransaction(); if (this_present_transaction || that_present_transaction) { if (!(this_present_transaction && that_present_transaction)) return false; if (!this.transaction.equals(that.transaction)) return false; } return true; } @Override public int hashCode() { return 0; } public int compareTo(verify_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; verify_args typedOther = (verify_args)other; 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(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(isSetRecord()).compareTo(typedOther.isSetRecord()); if (lastComparison != 0) { return lastComparison; } if (isSetRecord()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.record, typedOther.record); 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(isSetCreds()).compareTo(typedOther.isSetCreds()); if (lastComparison != 0) { return lastComparison; } if (isSetCreds()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.creds, typedOther.creds); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTransaction()).compareTo(typedOther.isSetTransaction()); if (lastComparison != 0) { return lastComparison; } if (isSetTransaction()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.transaction, typedOther.transaction); 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 { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("verify_args("); boolean first = true; sb.append("key:"); if (this.key == null) { sb.append("null"); } else { sb.append(this.key); } first = false; if (!first) sb.append(", "); sb.append("value:"); if (this.value == null) { sb.append("null"); } else { sb.append(this.value); } first = false; if (!first) sb.append(", "); sb.append("record:"); sb.append(this.record); first = false; if (!first) sb.append(", "); sb.append("timestamp:"); sb.append(this.timestamp); first = false; if (!first) sb.append(", "); sb.append("creds:"); if (this.creds == null) { sb.append("null"); } else { sb.append(this.creds); } first = false; if (!first) sb.append(", "); sb.append("transaction:"); if (this.transaction == null) { sb.append("null"); } else { sb.append(this.transaction); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (value != null) { value.validate(); } if (creds != null) { creds.validate(); } if (transaction != null) { transaction.validate(); } } 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_bitfield = 0; 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); } } private static class verify_argsStandardSchemeFactory implements SchemeFactory { public verify_argsStandardScheme getScheme() { return new verify_argsStandardScheme(); } } private static class verify_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, verify_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // KEY if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.key = iprot.readString(); struct.setKeyIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // VALUE if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.value = new TObject(); struct.value.read(iprot); struct.setValueIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // RECORD if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.record = iprot.readI64(); struct.setRecordIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // TIMESTAMP if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.timestamp = iprot.readI64(); struct.setTimestampIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 5: // CREDS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.creds = new AccessToken(); struct.creds.read(iprot); struct.setCredsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 6: // TRANSACTION if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.transaction = new TransactionToken(); struct.transaction.read(iprot); struct.setTransactionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, verify_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.key != null) { oprot.writeFieldBegin(KEY_FIELD_DESC); oprot.writeString(struct.key); oprot.writeFieldEnd(); } if (struct.value != null) { oprot.writeFieldBegin(VALUE_FIELD_DESC); struct.value.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldBegin(RECORD_FIELD_DESC); oprot.writeI64(struct.record); oprot.writeFieldEnd(); oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC); oprot.writeI64(struct.timestamp); oprot.writeFieldEnd(); if (struct.creds != null) { oprot.writeFieldBegin(CREDS_FIELD_DESC); struct.creds.write(oprot); oprot.writeFieldEnd(); } if (struct.transaction != null) { oprot.writeFieldBegin(TRANSACTION_FIELD_DESC); struct.transaction.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class verify_argsTupleSchemeFactory implements SchemeFactory { public verify_argsTupleScheme getScheme() { return new verify_argsTupleScheme(); } } private static class verify_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, verify_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetKey()) { optionals.set(0); } if (struct.isSetValue()) { optionals.set(1); } if (struct.isSetRecord()) { optionals.set(2); } if (struct.isSetTimestamp()) { optionals.set(3); } if (struct.isSetCreds()) { optionals.set(4); } if (struct.isSetTransaction()) { optionals.set(5); } oprot.writeBitSet(optionals, 6); if (struct.isSetKey()) { oprot.writeString(struct.key); } if (struct.isSetValue()) { struct.value.write(oprot); } if (struct.isSetRecord()) { oprot.writeI64(struct.record); } if (struct.isSetTimestamp()) { oprot.writeI64(struct.timestamp); } if (struct.isSetCreds()) { struct.creds.write(oprot); } if (struct.isSetTransaction()) { struct.transaction.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, verify_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(6); if (incoming.get(0)) { struct.key = iprot.readString(); struct.setKeyIsSet(true); } if (incoming.get(1)) { struct.value = new TObject(); struct.value.read(iprot); struct.setValueIsSet(true); } if (incoming.get(2)) { struct.record = iprot.readI64(); struct.setRecordIsSet(true); } if (incoming.get(3)) { struct.timestamp = iprot.readI64(); struct.setTimestampIsSet(true); } if (incoming.get(4)) { struct.creds = new AccessToken(); struct.creds.read(iprot); struct.setCredsIsSet(true); } if (incoming.get(5)) { struct.transaction = new TransactionToken(); struct.transaction.read(iprot); struct.setTransactionIsSet(true); } } } } public static class verify_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("verify_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0); private static final Map, SchemeFactory> schemes = new LinkedHashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new verify_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new verify_resultTupleSchemeFactory()); } public boolean success; // required /** 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 byName = new LinkedHashMap(); 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 private static final int __SUCCESS_ISSET_ID = 0; private byte __isset_bitfield = 0; 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.BOOL))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(verify_result.class, metaDataMap); } public verify_result() { } public verify_result( boolean success) { this(); this.success = success; setSuccessIsSet(true); } /** * Performs a deep copy on other. */ public verify_result(verify_result other) { __isset_bitfield = other.__isset_bitfield; this.success = other.success; } public verify_result deepCopy() { return new verify_result(this); } @Override public void clear() { setSuccessIsSet(false); this.success = false; } public boolean isSuccess() { return this.success; } public verify_result setSuccess(boolean success) { this.success = success; setSuccessIsSet(true); return this; } public void unsetSuccess() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((Boolean)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return Boolean.valueOf(isSuccess()); } 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 verify_result) return this.equals((verify_result)that); return false; } public boolean equals(verify_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; } return true; } @Override public int hashCode() { return 0; } public int compareTo(verify_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; verify_result typedOther = (verify_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 { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("verify_result("); boolean first = true; sb.append("success:"); sb.append(this.success); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } 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_bitfield = 0; 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); } } private static class verify_resultStandardSchemeFactory implements SchemeFactory { public verify_resultStandardScheme getScheme() { return new verify_resultStandardScheme(); } } private static class verify_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, verify_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.success = iprot.readBool(); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, verify_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeBool(struct.success); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class verify_resultTupleSchemeFactory implements SchemeFactory { public verify_resultTupleScheme getScheme() { return new verify_resultTupleScheme(); } } private static class verify_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, verify_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetSuccess()) { oprot.writeBool(struct.success); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, verify_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.success = iprot.readBool(); struct.setSuccessIsSet(true); } } } } public static class revert_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("revert_args"); 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)1); private static final org.apache.thrift.protocol.TField RECORD_FIELD_DESC = new org.apache.thrift.protocol.TField("record", org.apache.thrift.protocol.TType.I64, (short)2); 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)3); private static final org.apache.thrift.protocol.TField CREDS_FIELD_DESC = new org.apache.thrift.protocol.TField("creds", org.apache.thrift.protocol.TType.STRUCT, (short)4); private static final org.apache.thrift.protocol.TField TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("token", org.apache.thrift.protocol.TType.STRUCT, (short)5); private static final Map, SchemeFactory> schemes = new LinkedHashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new revert_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new revert_argsTupleSchemeFactory()); } public String key; // required public long record; // required public long timestamp; // required public AccessToken creds; // required public TransactionToken token; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { KEY((short)1, "key"), RECORD((short)2, "record"), TIMESTAMP((short)3, "timestamp"), CREDS((short)4, "creds"), TOKEN((short)5, "token"); private static final Map byName = new LinkedHashMap(); 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: // KEY return KEY; case 2: // RECORD return RECORD; case 3: // TIMESTAMP return TIMESTAMP; case 4: // CREDS return CREDS; case 5: // TOKEN return TOKEN; 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 __RECORD_ISSET_ID = 0; private static final int __TIMESTAMP_ISSET_ID = 1; private byte __isset_bitfield = 0; 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.KEY, new org.apache.thrift.meta_data.FieldMetaData("key", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.RECORD, new org.apache.thrift.meta_data.FieldMetaData("record", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); tmpMap.put(_Fields.TIMESTAMP, new org.apache.thrift.meta_data.FieldMetaData("timestamp", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); tmpMap.put(_Fields.CREDS, new org.apache.thrift.meta_data.FieldMetaData("creds", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, AccessToken.class))); tmpMap.put(_Fields.TOKEN, new org.apache.thrift.meta_data.FieldMetaData("token", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TransactionToken.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(revert_args.class, metaDataMap); } public revert_args() { } public revert_args( String key, long record, long timestamp, AccessToken creds, TransactionToken token) { this(); this.key = key; this.record = record; setRecordIsSet(true); this.timestamp = timestamp; setTimestampIsSet(true); this.creds = creds; this.token = token; } /** * Performs a deep copy on other. */ public revert_args(revert_args other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetKey()) { this.key = other.key; } this.record = other.record; this.timestamp = other.timestamp; if (other.isSetCreds()) { this.creds = new AccessToken(other.creds); } if (other.isSetToken()) { this.token = new TransactionToken(other.token); } } public revert_args deepCopy() { return new revert_args(this); } @Override public void clear() { this.key = null; setRecordIsSet(false); this.record = 0; setTimestampIsSet(false); this.timestamp = 0; this.creds = null; this.token = null; } public String getKey() { return this.key; } public revert_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 long getRecord() { return this.record; } public revert_args setRecord(long record) { this.record = record; setRecordIsSet(true); return this; } public void unsetRecord() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __RECORD_ISSET_ID); } /** Returns true if field record is set (has been assigned a value) and false otherwise */ public boolean isSetRecord() { return EncodingUtils.testBit(__isset_bitfield, __RECORD_ISSET_ID); } public void setRecordIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __RECORD_ISSET_ID, value); } public long getTimestamp() { return this.timestamp; } public revert_args setTimestamp(long timestamp) { this.timestamp = timestamp; setTimestampIsSet(true); return this; } public void unsetTimestamp() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TIMESTAMP_ISSET_ID); } /** Returns true if field timestamp is set (has been assigned a value) and false otherwise */ public boolean isSetTimestamp() { return EncodingUtils.testBit(__isset_bitfield, __TIMESTAMP_ISSET_ID); } public void setTimestampIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TIMESTAMP_ISSET_ID, value); } public AccessToken getCreds() { return this.creds; } public revert_args setCreds(AccessToken creds) { this.creds = creds; return this; } public void unsetCreds() { this.creds = null; } /** Returns true if field creds is set (has been assigned a value) and false otherwise */ public boolean isSetCreds() { return this.creds != null; } public void setCredsIsSet(boolean value) { if (!value) { this.creds = null; } } public TransactionToken getToken() { return this.token; } public revert_args setToken(TransactionToken token) { this.token = token; return this; } public void unsetToken() { this.token = null; } /** Returns true if field token is set (has been assigned a value) and false otherwise */ public boolean isSetToken() { return this.token != null; } public void setTokenIsSet(boolean value) { if (!value) { this.token = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case KEY: if (value == null) { unsetKey(); } else { setKey((String)value); } break; case RECORD: if (value == null) { unsetRecord(); } else { setRecord((Long)value); } break; case TIMESTAMP: if (value == null) { unsetTimestamp(); } else { setTimestamp((Long)value); } break; case CREDS: if (value == null) { unsetCreds(); } else { setCreds((AccessToken)value); } break; case TOKEN: if (value == null) { unsetToken(); } else { setToken((TransactionToken)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case KEY: return getKey(); case RECORD: return Long.valueOf(getRecord()); case TIMESTAMP: return Long.valueOf(getTimestamp()); case CREDS: return getCreds(); case TOKEN: return getToken(); } 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 KEY: return isSetKey(); case RECORD: return isSetRecord(); case TIMESTAMP: return isSetTimestamp(); case CREDS: return isSetCreds(); case TOKEN: return isSetToken(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof revert_args) return this.equals((revert_args)that); return false; } public boolean equals(revert_args that) { if (that == null) 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_record = true; boolean that_present_record = true; if (this_present_record || that_present_record) { if (!(this_present_record && that_present_record)) return false; if (this.record != that.record) 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_creds = true && this.isSetCreds(); boolean that_present_creds = true && that.isSetCreds(); if (this_present_creds || that_present_creds) { if (!(this_present_creds && that_present_creds)) return false; if (!this.creds.equals(that.creds)) return false; } boolean this_present_token = true && this.isSetToken(); boolean that_present_token = true && that.isSetToken(); if (this_present_token || that_present_token) { if (!(this_present_token && that_present_token)) return false; if (!this.token.equals(that.token)) return false; } return true; } @Override public int hashCode() { return 0; } public int compareTo(revert_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; revert_args typedOther = (revert_args)other; 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(isSetRecord()).compareTo(typedOther.isSetRecord()); if (lastComparison != 0) { return lastComparison; } if (isSetRecord()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.record, typedOther.record); 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(isSetCreds()).compareTo(typedOther.isSetCreds()); if (lastComparison != 0) { return lastComparison; } if (isSetCreds()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.creds, typedOther.creds); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetToken()).compareTo(typedOther.isSetToken()); if (lastComparison != 0) { return lastComparison; } if (isSetToken()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.token, typedOther.token); 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 { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("revert_args("); boolean first = true; sb.append("key:"); if (this.key == null) { sb.append("null"); } else { sb.append(this.key); } first = false; if (!first) sb.append(", "); sb.append("record:"); sb.append(this.record); first = false; if (!first) sb.append(", "); sb.append("timestamp:"); sb.append(this.timestamp); first = false; if (!first) sb.append(", "); sb.append("creds:"); if (this.creds == null) { sb.append("null"); } else { sb.append(this.creds); } first = false; if (!first) sb.append(", "); sb.append("token:"); if (this.token == null) { sb.append("null"); } else { sb.append(this.token); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (creds != null) { creds.validate(); } if (token != null) { token.validate(); } } 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_bitfield = 0; 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); } } private static class revert_argsStandardSchemeFactory implements SchemeFactory { public revert_argsStandardScheme getScheme() { return new revert_argsStandardScheme(); } } private static class revert_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, revert_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // KEY if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.key = iprot.readString(); struct.setKeyIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // RECORD if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.record = iprot.readI64(); struct.setRecordIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // TIMESTAMP if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.timestamp = iprot.readI64(); struct.setTimestampIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // CREDS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.creds = new AccessToken(); struct.creds.read(iprot); struct.setCredsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 5: // TOKEN if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.token = new TransactionToken(); struct.token.read(iprot); struct.setTokenIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, revert_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.key != null) { oprot.writeFieldBegin(KEY_FIELD_DESC); oprot.writeString(struct.key); oprot.writeFieldEnd(); } oprot.writeFieldBegin(RECORD_FIELD_DESC); oprot.writeI64(struct.record); oprot.writeFieldEnd(); oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC); oprot.writeI64(struct.timestamp); oprot.writeFieldEnd(); if (struct.creds != null) { oprot.writeFieldBegin(CREDS_FIELD_DESC); struct.creds.write(oprot); oprot.writeFieldEnd(); } if (struct.token != null) { oprot.writeFieldBegin(TOKEN_FIELD_DESC); struct.token.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class revert_argsTupleSchemeFactory implements SchemeFactory { public revert_argsTupleScheme getScheme() { return new revert_argsTupleScheme(); } } private static class revert_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, revert_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetKey()) { optionals.set(0); } if (struct.isSetRecord()) { optionals.set(1); } if (struct.isSetTimestamp()) { optionals.set(2); } if (struct.isSetCreds()) { optionals.set(3); } if (struct.isSetToken()) { optionals.set(4); } oprot.writeBitSet(optionals, 5); if (struct.isSetKey()) { oprot.writeString(struct.key); } if (struct.isSetRecord()) { oprot.writeI64(struct.record); } if (struct.isSetTimestamp()) { oprot.writeI64(struct.timestamp); } if (struct.isSetCreds()) { struct.creds.write(oprot); } if (struct.isSetToken()) { struct.token.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, revert_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(5); if (incoming.get(0)) { struct.key = iprot.readString(); struct.setKeyIsSet(true); } if (incoming.get(1)) { struct.record = iprot.readI64(); struct.setRecordIsSet(true); } if (incoming.get(2)) { struct.timestamp = iprot.readI64(); struct.setTimestampIsSet(true); } if (incoming.get(3)) { struct.creds = new AccessToken(); struct.creds.read(iprot); struct.setCredsIsSet(true); } if (incoming.get(4)) { struct.token = new TransactionToken(); struct.token.read(iprot); struct.setTokenIsSet(true); } } } } public static class revert_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("revert_result"); private static final Map, SchemeFactory> schemes = new LinkedHashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new revert_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new revert_resultTupleSchemeFactory()); } /** 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 byName = new LinkedHashMap(); 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(revert_result.class, metaDataMap); } public revert_result() { } /** * Performs a deep copy on other. */ public revert_result(revert_result other) { } public revert_result deepCopy() { return new revert_result(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 revert_result) return this.equals((revert_result)that); return false; } public boolean equals(revert_result that) { if (that == null) return false; return true; } @Override public int hashCode() { return 0; } public int compareTo(revert_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; revert_result typedOther = (revert_result)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 { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("revert_result("); boolean first = true; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } 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); } } private static class revert_resultStandardSchemeFactory implements SchemeFactory { public revert_resultStandardScheme getScheme() { return new revert_resultStandardScheme(); } } private static class revert_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, revert_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, revert_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class revert_resultTupleSchemeFactory implements SchemeFactory { public revert_resultTupleScheme getScheme() { return new revert_resultTupleScheme(); } } private static class revert_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, revert_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; } @Override public void read(org.apache.thrift.protocol.TProtocol prot, revert_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; } } } }